katoikia-app/web-ui/web-react/node_modules/primereact/galleria/galleria.cjs.min.js

2 lines
25 KiB
JavaScript

"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("primereact/utils"),i=require("primereact/ripple"),n=require("primereact/api"),s=require("primereact/csstransition"),r=require("primereact/portal");function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=a(e),l=a(n);function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function u(e,t,i){return t&&c(e.prototype,t),i&&c(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function h(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function d(e,t){return d=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},d(e,t)}function m(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&d(e,t)}function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function f(e,t){if(t&&("object"===v(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return h(e)}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function I(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function y(){return y=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(e[n]=i[n])}return e},y.apply(this,arguments)}function g(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var w=function(n){m(l,e.Component);var s,r,a=(s=l,r=g(),function(){var e,t=b(s);if(r){var i=b(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return f(this,e)});function l(e){var t;return p(this,l),(t=a.call(this,e)).navForward=t.navForward.bind(h(t)),t.navBackward=t.navBackward.bind(h(t)),t.next=t.next.bind(h(t)),t.prev=t.prev.bind(h(t)),t}return u(l,[{key:"step",value:function(e){this.itemsContainer&&(this.itemsContainer.style.transform=this.isVertical()?"translate3d(0, ".concat(100*e,"%, 0)"):"translate3d(".concat(100*e,"%, 0, 0)"),this.itemsContainer.style.transition="transform 500ms ease 0s")}},{key:"next",value:function(){this.props.onActiveItemChange({index:this.props.circular&&this.props.value.length-1===this.props.activeItemIndex?0:this.props.activeItemIndex+1})}},{key:"prev",value:function(){this.props.onActiveItemChange({index:this.props.circular&&0===this.props.activeItemIndex?this.props.value.length-1:0!==this.props.activeItemIndex?this.props.activeItemIndex-1:0})}},{key:"stopSlideShow",value:function(){this.props.slideShowActive&&this.props.stopSlideShow&&this.props.stopSlideShow()}},{key:"navBackward",value:function(e){this.stopSlideShow(),this.prev(),e&&e.cancelable&&e.preventDefault()}},{key:"navForward",value:function(e){this.stopSlideShow(),this.next(),e&&e.cancelable&&e.preventDefault()}},{key:"onIndicatorClick",value:function(e){this.stopSlideShow(),this.props.onActiveItemChange({index:e})}},{key:"onIndicatorMouseEnter",value:function(e){this.props.changeItemOnIndicatorHover&&(this.stopSlideShow(),this.props.onActiveItemChange({index:e}))}},{key:"onIndicatorKeyDown",value:function(e,t){13===e.which&&(this.stopSlideShow(),this.props.onActiveItemChange({index:t}))}},{key:"componentDidMount",value:function(){this.props.autoPlay&&this.props.startSlideShow()}},{key:"renderBackwardNavigator",value:function(){if(this.props.showItemNavigators){var e=!this.props.circular&&0===this.props.activeItemIndex,n=t.classNames("p-galleria-item-prev p-galleria-item-nav p-link",{"p-disabled":e});return o.default.createElement("button",{type:"button",className:n,onClick:this.navBackward,disabled:e},o.default.createElement("span",{className:"p-galleria-item-prev-icon pi pi-chevron-left"}),o.default.createElement(i.Ripple,null))}return null}},{key:"renderForwardNavigator",value:function(){if(this.props.showItemNavigators){var e=!this.props.circular&&this.props.activeItemIndex===this.props.value.length-1,n=t.classNames("p-galleria-item-next p-galleria-item-nav p-link",{"p-disabled":e});return o.default.createElement("button",{type:"button",className:n,onClick:this.navForward,disabled:e},o.default.createElement("span",{className:"p-galleria-item-next-icon pi pi-chevron-right"}),o.default.createElement(i.Ripple,null))}return null}},{key:"renderCaption",value:function(){if(this.props.caption){var e=this.props.caption(this.props.value[this.props.activeItemIndex]);return o.default.createElement("div",{className:"p-galleria-caption"},e)}return null}},{key:"renderIndicator",value:function(e){var n=this,s=this.props.indicator&&this.props.indicator(e),r=t.classNames("p-galleria-indicator",{"p-highlight":this.props.activeItemIndex===e});return s||(s=o.default.createElement("button",{type:"button",tabIndex:-1,className:"p-link"},o.default.createElement(i.Ripple,null))),o.default.createElement("li",{className:r,key:"p-galleria-indicator-"+e,tabIndex:0,onClick:function(){return n.onIndicatorClick(e)},onMouseEnter:function(){return n.onIndicatorMouseEnter(e)},onKeyDown:function(t){return n.onIndicatorKeyDown(t,e)}},s)}},{key:"renderIndicators",value:function(){if(this.props.showIndicators){for(var e=t.classNames("p-galleria-indicators p-reset",this.props.indicatorsContentClassName),i=[],n=0;n<this.props.value.length;n++)i.push(this.renderIndicator(n));return o.default.createElement("ul",{className:e},i)}return null}},{key:"render",value:function(){var e=this,t=this.props.itemTemplate&&this.props.itemTemplate(this.props.value[this.props.activeItemIndex]),i=this.renderBackwardNavigator(),n=this.renderForwardNavigator(),s=this.renderCaption(),r=this.renderIndicators();return o.default.createElement("div",{ref:function(t){return e.props.forwardRef(t)},className:"p-galleria-item-wrapper"},o.default.createElement("div",{className:"p-galleria-item-container"},i,o.default.createElement("div",{className:"p-galleria-item"},t),n,s),r)}}]),l}(),S=o.default.forwardRef((function(e,t){return o.default.createElement(w,y({forwardRef:t},e))}));function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function x(e){if(Array.isArray(e))return k(e)}function E(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function C(e,t){if(e){if("string"==typeof e)return k(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?k(e,t):void 0}}function N(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function O(e){var t=V();return function(){var i,n=b(e);if(t){var s=b(this).constructor;i=Reflect.construct(n,arguments,s)}else i=n.apply(this,arguments);return f(this,i)}}function V(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var P=function(i){m(s,e.Component);var n=O(s);function s(e){var t;return p(this,s),(t=n.call(this,e)).onItemClick=t.onItemClick.bind(h(t)),t.onItemKeyDown=t.onItemKeyDown.bind(h(t)),t}return u(s,[{key:"onItemClick",value:function(e){this.props.onItemClick({originalEvent:e,index:this.props.index})}},{key:"onItemKeyDown",value:function(e){13===e.which&&this.props.onItemClick({originalEvent:e,index:this.props.index})}},{key:"render",value:function(){var e=this.props.template&&this.props.template(this.props.item),i=t.classNames(this.props.className,"p-galleria-thumbnail-item",{"p-galleria-thumbnail-item-current":this.props.current,"p-galleria-thumbnail-item-active":this.props.active,"p-galleria-thumbnail-item-start":this.props.start,"p-galleria-thumbnail-item-end":this.props.end});return o.default.createElement("div",{className:i},o.default.createElement("div",{className:"p-galleria-thumbnail-item-content",tabIndex:this.props.active?0:null,onClick:this.onItemClick,onKeyDown:this.onItemKeyDown},e))}}]),s}();I(P,"defaultProps",{index:null,template:null,item:null,current:!1,active:!1,start:!1,end:!1,className:null,onItemClick:null});var T=function(n){m(r,e.Component);var s=O(r);function r(e){var i;return p(this,r),(i=s.call(this,e)).state={numVisible:e.numVisible,totalShiftedItems:0,page:0},i.navForward=i.navForward.bind(h(i)),i.navBackward=i.navBackward.bind(h(i)),i.onTransitionEnd=i.onTransitionEnd.bind(h(i)),i.onTouchStart=i.onTouchStart.bind(h(i)),i.onTouchMove=i.onTouchMove.bind(h(i)),i.onTouchEnd=i.onTouchEnd.bind(h(i)),i.onItemClick=i.onItemClick.bind(h(i)),i.attributeSelector=t.UniqueComponentId(),i}return u(r,[{key:"step",value:function(e){var i=this.state.totalShiftedItems+e;e<0&&-1*i+this.state.numVisible>this.props.value.length-1?i=this.state.numVisible-this.props.value.length:e>0&&i>0&&(i=0),this.props.circular&&(e<0&&this.props.value.length-1===this.props.activeItemIndex?i=0:e>0&&0===this.props.activeItemIndex&&(i=this.state.numVisible-this.props.value.length)),this.itemsContainer&&(t.DomHandler.removeClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transform=this.props.isVertical?"translate3d(0, ".concat(i*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(i*(100/this.state.numVisible),"%, 0, 0)"),this.itemsContainer.style.transition="transform 500ms ease 0s"),this.setState({totalShiftedItems:i})}},{key:"stopSlideShow",value:function(){this.props.slideShowActive&&this.props.stopSlideShow&&this.props.stopSlideShow()}},{key:"getMedianItemIndex",value:function(){var e=Math.floor(this.state.numVisible/2);return this.state.numVisible%2?e:e-1}},{key:"navBackward",value:function(e){this.stopSlideShow();var t=0!==this.props.activeItemIndex?this.props.activeItemIndex-1:0;this.state.numVisible-(t+this.state.totalShiftedItems)-1>this.getMedianItemIndex()&&(-1*this.state.totalShiftedItems!=0||this.props.circular)&&this.step(1),this.props.onActiveItemChange({index:this.props.circular&&0===this.props.activeItemIndex?this.props.value.length-1:t}),e.cancelable&&e.preventDefault()}},{key:"navForward",value:function(e){this.stopSlideShow();var t=this.props.activeItemIndex+1;t+this.state.totalShiftedItems>this.getMedianItemIndex()&&(-1*this.state.totalShiftedItems<this.getTotalPageNumber()-1||this.props.circular)&&this.step(-1),this.props.onActiveItemChange({index:this.props.circular&&this.props.value.length-1===this.props.activeItemIndex?0:t}),e.cancelable&&e.preventDefault()}},{key:"onItemClick",value:function(e){this.stopSlideShow();var t=e.index;if(t!==this.props.activeItemIndex){var i=t+this.state.totalShiftedItems,n=0;t<this.props.activeItemIndex?(n=this.state.numVisible-i-1-this.getMedianItemIndex())>0&&-1*this.state.totalShiftedItems!=0&&this.step(n):(n=this.getMedianItemIndex()-i)<0&&-1*this.state.totalShiftedItems<this.getTotalPageNumber()-1&&this.step(n),this.props.onActiveItemChange({index:t})}}},{key:"onTransitionEnd",value:function(e){this.itemsContainer&&"transform"===e.propertyName&&(t.DomHandler.addClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="")}},{key:"onTouchStart",value:function(e){var t=e.changedTouches[0];this.startPos={x:t.pageX,y:t.pageY}}},{key:"onTouchMove",value:function(e){e.cancelable&&e.preventDefault()}},{key:"onTouchEnd",value:function(e){var t=e.changedTouches[0];this.changePageOnTouch(e,this.props.isVertical?t.pageY-this.startPos.y:t.pageX-this.startPos.x)}},{key:"changePageOnTouch",value:function(e,t){t<0?this.navForward(e):this.navBackward(e)}},{key:"getTotalPageNumber",value:function(){return this.props.value.length>this.state.numVisible?this.props.value.length-this.state.numVisible+1:0}},{key:"createStyle",value:function(){this.thumbnailsStyle||(this.thumbnailsStyle=t.DomHandler.createInlineStyle(l.default.nonce));var e,i="\n .p-galleria-thumbnail-items[".concat(this.attributeSelector,"] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100/this.state.numVisible,"%\n }\n ");if(this.props.responsiveOptions){this.responsiveOptions=x(e=this.props.responsiveOptions)||E(e)||C(e)||N(),this.responsiveOptions.sort((function(e,t){var i=e.breakpoint,n=t.breakpoint;return-1*(null==i&&null!=n?-1:null!=i&&null==n?1:null==i&&null==n?0:"string"==typeof i&&"string"==typeof n?i.localeCompare(n,void 0,{numeric:!0}):i<n?-1:i>n?1:0)}));for(var n=0;n<this.responsiveOptions.length;n++){var s=this.responsiveOptions[n];i+="\n @media screen and (max-width: ".concat(s.breakpoint,") {\n .p-galleria-thumbnail-items[").concat(this.attributeSelector,"] .p-galleria-thumbnail-item {\n flex: 1 0 ").concat(100/s.numVisible,"%\n }\n }\n ")}}this.thumbnailsStyle.innerHTML=i}},{key:"calculatePosition",value:function(){if(this.itemsContainer&&this.responsiveOptions){for(var e=window.innerWidth,t={numVisible:this.props.numVisible},i=0;i<this.responsiveOptions.length;i++){var n=this.responsiveOptions[i];parseInt(n.breakpoint,10)>=e&&(t=n)}this.state.numVisible!==t.numVisible&&this.setState({numVisible:t.numVisible})}}},{key:"bindDocumentListeners",value:function(){var e=this;this.documentResizeListener||(this.documentResizeListener=function(){e.calculatePosition()},window.addEventListener("resize",this.documentResizeListener))}},{key:"unbindDocumentListeners",value:function(){this.documentResizeListener&&(window.removeEventListener("resize",this.documentResizeListener),this.documentResizeListener=null)}},{key:"componentDidMount",value:function(){this.itemsContainer&&this.itemsContainer.setAttribute(this.attributeSelector,""),this.createStyle(),this.calculatePosition(),this.props.responsiveOptions&&this.bindDocumentListeners()}},{key:"componentDidUpdate",value:function(e,i){var n=this.state.totalShiftedItems;i.numVisible===this.state.numVisible&&e.activeItemIndex===this.props.activeItemIndex||((n=this.props.activeItemIndex<=this.getMedianItemIndex()?0:this.props.value.length-this.state.numVisible+this.getMedianItemIndex()<this.props.activeItemIndex?this.state.numVisible-this.props.value.length:this.props.value.length-this.state.numVisible<this.props.activeItemIndex&&this.state.numVisible%2==0?-1*this.props.activeItemIndex+this.getMedianItemIndex()+1:-1*this.props.activeItemIndex+this.getMedianItemIndex())!==this.state.totalShiftedItems&&this.setState({totalShiftedItems:n}),this.itemsContainer.style.transform=this.props.isVertical?"translate3d(0, ".concat(n*(100/this.state.numVisible),"%, 0)"):"translate3d(".concat(n*(100/this.state.numVisible),"%, 0, 0)"),e.activeItemIndex!==this.props.activeItemIndex&&(t.DomHandler.removeClass(this.itemsContainer,"p-items-hidden"),this.itemsContainer.style.transition="transform 500ms ease 0s"))}},{key:"componentWillUnmount",value:function(){this.props.responsiveOptions&&this.unbindDocumentListeners()}},{key:"renderItems",value:function(){var e=this;return this.props.value.map((function(t,i){var n=-1*e.state.totalShiftedItems,s=n+e.state.numVisible-1;return o.default.createElement(P,{key:i,index:i,template:e.props.itemTemplate,item:t,active:n<=i&&s>=i,start:n===i,end:s===i,onItemClick:e.onItemClick,current:e.props.activeItemIndex===i})}))}},{key:"renderBackwardNavigator",value:function(){if(this.props.showThumbnailNavigators){var e=!this.props.circular&&0===this.props.activeItemIndex||this.props.value.length<=this.state.numVisible,n=t.classNames("p-galleria-thumbnail-prev p-link",{"p-disabled":e}),s=t.classNames("p-galleria-thumbnail-prev-icon pi",{"pi-chevron-left":!this.props.isVertical,"pi-chevron-up":this.props.isVertical});return o.default.createElement("button",{className:n,onClick:this.navBackward,disabled:e},o.default.createElement("span",{className:s}),o.default.createElement(i.Ripple,null))}return null}},{key:"renderForwardNavigator",value:function(){if(this.props.showThumbnailNavigators){var e=!this.props.circular&&this.props.activeItemIndex===this.props.value.length-1||this.props.value.length<=this.state.numVisible,n=t.classNames("p-galleria-thumbnail-next p-link",{"p-disabled":e}),s=t.classNames("p-galleria-thumbnail-next-icon pi",{"pi-chevron-right":!this.props.isVertical,"pi-chevron-down":this.props.isVertical});return o.default.createElement("button",{className:n,onClick:this.navForward,disabled:e},o.default.createElement("span",{className:s}),o.default.createElement(i.Ripple,null))}return null}},{key:"renderContent",value:function(){var e=this,t=this.renderItems(),i=this.props.isVertical?this.props.contentHeight:"",n=this.renderBackwardNavigator(),s=this.renderForwardNavigator();return o.default.createElement("div",{className:"p-galleria-thumbnail-container"},n,o.default.createElement("div",{className:"p-galleria-thumbnail-items-container",style:{height:i}},o.default.createElement("div",{ref:function(t){return e.itemsContainer=t},className:"p-galleria-thumbnail-items",onTransitionEnd:this.onTransitionEnd,onTouchStart:this.onTouchStart,onTouchMove:this.onTouchMove,onTouchEnd:this.onTouchEnd},t)),s)}},{key:"render",value:function(){var e=this.renderContent();return o.default.createElement("div",{className:"p-galleria-thumbnail-wrapper"},e)}}]),r}();function A(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function R(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?A(Object(i),!0).forEach((function(t){I(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):A(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function D(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}var j=function(n){m(v,e.Component);var a,c,d=(a=v,c=D(),function(){var e,t=b(a);if(c){var i=b(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return f(this,e)});function v(e){var t;return p(this,v),(t=d.call(this,e)).state={visible:!1,numVisible:e.numVisible,slideShowActive:!1},t.props.onItemChange||(t.state=R(R({},t.state),{},{activeIndex:e.activeIndex})),t.onActiveItemChange=t.onActiveItemChange.bind(h(t)),t.show=t.show.bind(h(t)),t.hide=t.hide.bind(h(t)),t.startSlideShow=t.startSlideShow.bind(h(t)),t.stopSlideShow=t.stopSlideShow.bind(h(t)),t.onEnter=t.onEnter.bind(h(t)),t.onEntering=t.onEntering.bind(h(t)),t.onEntered=t.onEntered.bind(h(t)),t.onExit=t.onExit.bind(h(t)),t.onExited=t.onExited.bind(h(t)),t.galleriaRef=o.default.createRef(),t}return u(v,[{key:"activeItemIndex",get:function(){return this.props.onItemChange?this.props.activeIndex:this.state.activeIndex}},{key:"onActiveItemChange",value:function(e){this.props.onItemChange?this.props.onItemChange(e):this.setState({activeIndex:e.index})}},{key:"show",value:function(){this.setState({visible:!0})}},{key:"hide",value:function(){this.setState({visible:!1})}},{key:"onEnter",value:function(){t.DomHandler.addClass(document.body,"p-overflow-hidden")}},{key:"onEntering",value:function(){t.ZIndexUtils.set("modal",this.mask,l.default.autoZIndex,this.props.baseZIndex||l.default.zIndex.modal),t.DomHandler.addMultipleClasses(this.mask,"p-component-overlay p-component-overlay-enter")}},{key:"onEntered",value:function(){this.props.onShow&&this.props.onShow()}},{key:"onExit",value:function(){t.DomHandler.removeClass(document.body,"p-overflow-hidden"),t.DomHandler.addClass(this.mask,"p-component-overlay-leave")}},{key:"onExited",value:function(){t.ZIndexUtils.clear(this.mask),this.props.onHide&&this.props.onHide()}},{key:"isAutoPlayActive",value:function(){return this.state.slideShowActive}},{key:"startSlideShow",value:function(){var e=this;this.interval=setInterval((function(){e.onActiveItemChange({index:e.props.circular&&e.props.value.length-1===e.activeItemIndex?0:e.activeItemIndex+1})}),this.props.transitionInterval),this.setState({slideShowActive:!0})}},{key:"stopSlideShow",value:function(){this.interval&&clearInterval(this.interval),this.setState({slideShowActive:!1})}},{key:"getPositionClassName",value:function(e,t){var i=["top","left","bottom","right"].find((function(e){return e===t}));return i?"".concat(e,"-").concat(i):""}},{key:"isVertical",value:function(){return"left"===this.props.thumbnailsPosition||"right"===this.props.thumbnailsPosition}},{key:"componentDidUpdate",value:function(e,t){e.value!==this.props.value&&this.props.value&&this.props.value.length<this.state.numVisible&&this.setState({numVisible:this.props.value.length}),e.numVisible!==this.props.numVisible&&this.setState({numVisible:this.props.numVisible})}},{key:"componentWillUnmount",value:function(){this.state.slideShowActive&&this.stopSlideShow(),t.ZIndexUtils.clear(this.mask)}},{key:"renderHeader",value:function(){return this.props.header?o.default.createElement("div",{className:"p-galleria-header"},this.props.header):null}},{key:"renderFooter",value:function(){return this.props.footer?o.default.createElement("div",{className:"p-galleria-footer"},this.props.footer):null}},{key:"renderElement",value:function(){var e=this,n=this.isVertical(),s=this.props.showThumbnails&&this.getPositionClassName("p-galleria-thumbnails",this.props.thumbnailsPosition),r=this.props.showIndicators&&this.getPositionClassName("p-galleria-indicators",this.props.indicatorsPosition),a=t.classNames("p-galleria p-component",this.props.className,{"p-galleria-fullscreen":this.props.fullScreen,"p-galleria-indicator-onitem":this.props.showIndicatorsOnItem,"p-galleria-item-nav-onhover":this.props.showItemNavigatorsOnHover&&!this.props.fullScreen},s,r),l=this.props.fullScreen&&o.default.createElement("button",{type:"button",className:"p-galleria-close p-link",onClick:this.hide},o.default.createElement("span",{className:"p-galleria-close-icon pi pi-times"}),o.default.createElement(i.Ripple,null)),p=this.renderHeader(),c=this.renderFooter();return o.default.createElement("div",{ref:this.galleriaRef,id:this.props.id,className:a,style:this.props.style},l,p,o.default.createElement("div",{className:"p-galleria-content"},o.default.createElement(S,{ref:function(t){return e.previewContent=t},value:this.props.value,activeItemIndex:this.activeItemIndex,onActiveItemChange:this.onActiveItemChange,itemTemplate:this.props.item,circular:this.props.circular,caption:this.props.caption,showIndicators:this.props.showIndicators,changeItemOnIndicatorHover:this.props.changeItemOnIndicatorHover,indicator:this.props.indicator,showItemNavigators:this.props.showItemNavigators,autoPlay:this.props.autoPlay,slideShowActive:this.state.slideShowActive,startSlideShow:this.startSlideShow,stopSlideShow:this.stopSlideShow}),this.props.showThumbnails&&o.default.createElement(T,{value:this.props.value,activeItemIndex:this.activeItemIndex,onActiveItemChange:this.onActiveItemChange,itemTemplate:this.props.thumbnail,numVisible:this.state.numVisible,responsiveOptions:this.props.responsiveOptions,circular:this.props.circular,isVertical:n,contentHeight:this.props.verticalThumbnailViewPortHeight,showThumbnailNavigators:this.props.showThumbnailNavigators,autoPlay:this.props.autoPlay,slideShowActive:this.state.slideShowActive,stopSlideShow:this.stopSlideShow})),c)}},{key:"renderGalleria",value:function(){var e=this,i=this.renderElement();if(this.props.fullScreen){var n=t.classNames("p-galleria-mask",{"p-galleria-visible":this.state.visible});return o.default.createElement(r.Portal,{element:o.default.createElement("div",{ref:function(t){return e.mask=t},className:n},o.default.createElement(s.CSSTransition,{nodeRef:this.galleriaRef,classNames:"p-galleria",in:this.state.visible,timeout:{enter:150,exit:150},options:this.props.transitionOptions,unmountOnExit:!0,onEnter:this.onEnter,onEntering:this.onEntering,onEntered:this.onEntered,onExit:this.onExit,onExited:this.onExited},i))})}return i}},{key:"render",value:function(){return this.props.value&&this.props.value.length>0&&this.renderGalleria()}}]),v}();I(j,"defaultProps",{id:null,value:null,activeIndex:0,fullScreen:!1,item:null,thumbnail:null,indicator:null,caption:null,className:null,style:null,header:null,footer:null,numVisible:3,responsiveOptions:null,showItemNavigators:!1,showThumbnailNavigators:!0,showItemNavigatorsOnHover:!1,changeItemOnIndicatorHover:!1,circular:!1,autoPlay:!1,transitionInterval:4e3,showThumbnails:!0,thumbnailsPosition:"bottom",verticalThumbnailViewPortHeight:"300px",showIndicators:!1,showIndicatorsOnItem:!1,indicatorsPosition:"bottom",baseZIndex:0,transitionOptions:null,onItemChange:null}),exports.Galleria=j;