primereact 10.6.3 → 10.6.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/accordion/accordion.cjs.js +14 -16
- package/accordion/accordion.cjs.min.js +1 -1
- package/accordion/accordion.d.ts +4 -0
- package/accordion/accordion.esm.js +14 -16
- package/accordion/accordion.esm.min.js +1 -1
- package/accordion/accordion.js +14 -16
- package/accordion/accordion.min.js +1 -1
- package/api/api.cjs.js +109 -38
- package/api/api.cjs.min.js +1 -1
- package/api/api.d.ts +5 -0
- package/api/api.esm.js +109 -38
- package/api/api.esm.min.js +1 -1
- package/api/api.js +109 -38
- package/api/api.min.js +1 -1
- package/autocomplete/autocomplete.cjs.js +7 -7
- package/autocomplete/autocomplete.cjs.min.js +1 -1
- package/autocomplete/autocomplete.esm.js +7 -7
- package/autocomplete/autocomplete.esm.min.js +1 -1
- package/autocomplete/autocomplete.js +7 -7
- package/autocomplete/autocomplete.min.js +1 -1
- package/breadcrumb/breadcrumb.cjs.js +1 -1
- package/breadcrumb/breadcrumb.cjs.min.js +1 -1
- package/breadcrumb/breadcrumb.esm.js +1 -1
- package/breadcrumb/breadcrumb.esm.min.js +1 -1
- package/breadcrumb/breadcrumb.js +1 -1
- package/breadcrumb/breadcrumb.min.js +1 -1
- package/buttongroup/buttongroup.d.ts +1 -6
- package/calendar/calendar.cjs.js +23 -6
- package/calendar/calendar.cjs.min.js +1 -1
- package/calendar/calendar.esm.js +23 -6
- package/calendar/calendar.esm.min.js +1 -1
- package/calendar/calendar.js +23 -6
- package/calendar/calendar.min.js +1 -1
- package/carousel/carousel.cjs.js +6 -2
- package/carousel/carousel.cjs.min.js +1 -1
- package/carousel/carousel.esm.js +7 -3
- package/carousel/carousel.esm.min.js +1 -1
- package/carousel/carousel.js +6 -2
- package/carousel/carousel.min.js +1 -1
- package/checkbox/checkbox.d.ts +6 -1
- package/chips/chips.cjs.js +12 -12
- package/chips/chips.cjs.min.js +1 -1
- package/chips/chips.esm.js +12 -12
- package/chips/chips.esm.min.js +1 -1
- package/chips/chips.js +12 -12
- package/chips/chips.min.js +1 -1
- package/core/core.js +313 -174
- package/core/core.min.js +7 -7
- package/datatable/datatable.cjs.js +17 -6
- package/datatable/datatable.cjs.min.js +1 -1
- package/datatable/datatable.d.ts +27 -27
- package/datatable/datatable.esm.js +17 -6
- package/datatable/datatable.esm.min.js +1 -1
- package/datatable/datatable.js +17 -6
- package/datatable/datatable.min.js +1 -1
- package/dialog/dialog.cjs.js +143 -92
- package/dialog/dialog.cjs.min.js +1 -1
- package/dialog/dialog.esm.js +144 -93
- package/dialog/dialog.esm.min.js +1 -1
- package/dialog/dialog.js +144 -93
- package/dialog/dialog.min.js +1 -1
- package/dropdown/dropdown.cjs.js +39 -40
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.d.ts +17 -17
- package/dropdown/dropdown.esm.js +39 -40
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +39 -40
- package/dropdown/dropdown.min.js +1 -1
- package/editor/editor.cjs.js +2 -2
- package/editor/editor.cjs.min.js +1 -1
- package/editor/editor.esm.js +2 -2
- package/editor/editor.esm.min.js +1 -1
- package/editor/editor.js +2 -2
- package/editor/editor.min.js +1 -1
- package/fileupload/fileupload.d.ts +4 -0
- package/floatlabel/floatlabel.d.ts +5 -0
- package/galleria/galleria.cjs.js +9 -3
- package/galleria/galleria.cjs.min.js +1 -1
- package/galleria/galleria.esm.js +10 -4
- package/galleria/galleria.esm.min.js +1 -1
- package/galleria/galleria.js +9 -3
- package/galleria/galleria.min.js +1 -1
- package/inputnumber/inputnumber.cjs.js +11 -1
- package/inputnumber/inputnumber.cjs.min.js +1 -1
- package/inputnumber/inputnumber.esm.js +11 -1
- package/inputnumber/inputnumber.esm.min.js +1 -1
- package/inputnumber/inputnumber.js +11 -1
- package/inputnumber/inputnumber.min.js +1 -1
- package/inputotp/inputotp.cjs.js +9 -9
- package/inputotp/inputotp.cjs.min.js +1 -1
- package/inputotp/inputotp.esm.js +9 -9
- package/inputotp/inputotp.esm.min.js +1 -1
- package/inputotp/inputotp.js +9 -9
- package/inputotp/inputotp.min.js +1 -1
- package/inputotp/package.json +1 -1
- package/keyfilter/keyfilter.cjs.js +3 -1
- package/keyfilter/keyfilter.cjs.min.js +1 -1
- package/keyfilter/keyfilter.esm.js +3 -1
- package/keyfilter/keyfilter.esm.min.js +1 -1
- package/keyfilter/keyfilter.js +3 -1
- package/keyfilter/keyfilter.min.js +1 -1
- package/listbox/listbox.cjs.js +2 -6
- package/listbox/listbox.cjs.min.js +1 -1
- package/listbox/listbox.esm.js +2 -6
- package/listbox/listbox.esm.min.js +1 -1
- package/listbox/listbox.js +2 -6
- package/listbox/listbox.min.js +1 -1
- package/megamenu/megamenu.cjs.js +10 -6
- package/megamenu/megamenu.cjs.min.js +1 -1
- package/megamenu/megamenu.esm.js +10 -6
- package/megamenu/megamenu.esm.min.js +1 -1
- package/megamenu/megamenu.js +10 -6
- package/megamenu/megamenu.min.js +1 -1
- package/menu/menu.cjs.js +23 -5
- package/menu/menu.cjs.min.js +1 -1
- package/menu/menu.d.ts +19 -0
- package/menu/menu.esm.js +23 -5
- package/menu/menu.esm.min.js +1 -1
- package/menu/menu.js +23 -5
- package/menu/menu.min.js +1 -1
- package/messages/messages.cjs.js +1 -1
- package/messages/messages.cjs.min.js +1 -1
- package/messages/messages.esm.js +1 -1
- package/messages/messages.esm.min.js +1 -1
- package/messages/messages.js +1 -1
- package/messages/messages.min.js +1 -1
- package/metergroup/metergroup.cjs.js +33 -12
- package/metergroup/metergroup.cjs.min.js +1 -1
- package/metergroup/metergroup.esm.js +6 -5
- package/metergroup/metergroup.esm.min.js +1 -1
- package/metergroup/metergroup.js +32 -11
- package/metergroup/metergroup.min.js +1 -1
- package/multiselect/multiselect.cjs.js +18 -3
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.d.ts +17 -17
- package/multiselect/multiselect.esm.js +18 -3
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +18 -3
- package/multiselect/multiselect.min.js +1 -1
- package/overlaypanel/overlaypanel.cjs.js +3 -0
- package/overlaypanel/overlaypanel.cjs.min.js +1 -1
- package/overlaypanel/overlaypanel.d.ts +5 -0
- package/overlaypanel/overlaypanel.esm.js +3 -0
- package/overlaypanel/overlaypanel.esm.min.js +1 -1
- package/overlaypanel/overlaypanel.js +3 -0
- package/overlaypanel/overlaypanel.min.js +1 -1
- package/package.json +1 -1
- package/paginator/paginator.cjs.js +6 -0
- package/paginator/paginator.cjs.min.js +1 -1
- package/paginator/paginator.esm.js +6 -0
- package/paginator/paginator.esm.min.js +1 -1
- package/paginator/paginator.js +6 -0
- package/paginator/paginator.min.js +1 -1
- package/panelmenu/panelmenu.cjs.js +1 -2
- package/panelmenu/panelmenu.cjs.min.js +1 -1
- package/panelmenu/panelmenu.esm.js +1 -2
- package/panelmenu/panelmenu.esm.min.js +1 -1
- package/panelmenu/panelmenu.js +1 -2
- package/panelmenu/panelmenu.min.js +1 -1
- package/passthrough/tailwind/index.cjs.js +14 -4
- package/passthrough/tailwind/index.cjs.min.js +1 -1
- package/passthrough/tailwind/index.esm.js +14 -4
- package/passthrough/tailwind/index.esm.min.js +1 -1
- package/passthrough/tailwind/index.js +14 -4
- package/passthrough/tailwind/index.min.js +1 -1
- package/password/password.cjs.js +104 -15
- package/password/password.cjs.min.js +1 -1
- package/password/password.d.ts +10 -10
- package/password/password.esm.js +104 -15
- package/password/password.esm.min.js +1 -1
- package/password/password.js +105 -16
- package/password/password.min.js +1 -1
- package/picklist/picklist.cjs.js +6 -0
- package/picklist/picklist.cjs.min.js +1 -1
- package/picklist/picklist.esm.js +6 -0
- package/picklist/picklist.esm.min.js +1 -1
- package/picklist/picklist.js +6 -0
- package/picklist/picklist.min.js +1 -1
- package/primereact.all.cjs.js +1121 -920
- package/primereact.all.cjs.min.js +1 -1
- package/primereact.all.esm.js +1121 -920
- package/primereact.all.esm.min.js +1 -1
- package/primereact.all.js +1121 -920
- package/primereact.all.min.js +1 -1
- package/ripple/ripple.d.ts +32 -0
- package/splitter/splitter.cjs.js +6 -1
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +6 -1
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +6 -1
- package/splitter/splitter.min.js +1 -1
- package/stepper/stepper.cjs.js +14 -4
- package/stepper/stepper.cjs.min.js +1 -1
- package/stepper/stepper.d.ts +13 -1
- package/stepper/stepper.esm.js +14 -4
- package/stepper/stepper.esm.min.js +1 -1
- package/stepper/stepper.js +14 -4
- package/stepper/stepper.min.js +1 -1
- package/stepperpanel/stepperpanel.cjs.js +0 -5
- package/stepperpanel/stepperpanel.cjs.min.js +1 -1
- package/stepperpanel/stepperpanel.d.ts +1 -1
- package/stepperpanel/stepperpanel.esm.js +0 -5
- package/stepperpanel/stepperpanel.esm.min.js +1 -1
- package/stepperpanel/stepperpanel.js +2 -6
- package/stepperpanel/stepperpanel.min.js +1 -1
- package/tabview/tabview.cjs.js +1 -1
- package/tabview/tabview.cjs.min.js +1 -1
- package/tabview/tabview.d.ts +4 -0
- package/tabview/tabview.esm.js +1 -1
- package/tabview/tabview.esm.min.js +1 -1
- package/tabview/tabview.js +1 -1
- package/tabview/tabview.min.js +1 -1
- package/toast/toast.cjs.js +7 -1
- package/toast/toast.cjs.min.js +1 -1
- package/toast/toast.esm.js +7 -1
- package/toast/toast.esm.min.js +1 -1
- package/toast/toast.js +7 -1
- package/toast/toast.min.js +1 -1
- package/treeselect/treeselect.cjs.js +12 -2
- package/treeselect/treeselect.cjs.min.js +1 -1
- package/treeselect/treeselect.esm.js +12 -2
- package/treeselect/treeselect.esm.min.js +1 -1
- package/treeselect/treeselect.js +12 -2
- package/treeselect/treeselect.min.js +1 -1
- package/treetable/treetable.cjs.js +8 -0
- package/treetable/treetable.cjs.min.js +1 -1
- package/treetable/treetable.esm.js +8 -0
- package/treetable/treetable.esm.min.js +1 -1
- package/treetable/treetable.js +8 -0
- package/treetable/treetable.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.js +1 -1
- package/tristatecheckbox/tristatecheckbox.cjs.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.js +1 -1
- package/tristatecheckbox/tristatecheckbox.esm.min.js +1 -1
- package/tristatecheckbox/tristatecheckbox.js +1 -1
- package/tristatecheckbox/tristatecheckbox.min.js +1 -1
- package/virtualscroller/virtualscroller.d.ts +3 -3
- package/web-types.json +61 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.multiselect=function(e,t,n,l,r,o,i,a,c,u,s,p,f,d,m,b,v,h,y){"use strict";function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function O(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var x=O(t),I=g(n);function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},E.apply(this,arguments)}function S(e){return S="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},S(e)}function k(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==S(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function j(e){var t=k(e,"string");return"symbol"===S(t)?t:String(t)}function w(e,t,n){return(t=j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function N(e){if(Array.isArray(e))return C(e)}function D(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function P(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function F(){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 U(e){return N(e)||D(e)||P(e)||F()}function L(e){throw new TypeError('"'+e+'" is read-only')}function A(e){if(Array.isArray(e))return e}function M(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,r,o,i,a=[],c=!0,u=!1;try{if(o=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(l=o.call(n)).done)&&(a.push(l.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(i=n.return(),Object(i)!==i))return}finally{if(u)throw r}}return a}}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){return A(e)||M(e,t)||P(e,t)||T()}var R=l.ComponentBase.extend({defaultProps:{__TYPE:"MultiSelect",appendTo:null,ariaLabelledBy:null,checkboxIcon:null,className:null,clearIcon:null,closeIcon:null,dataKey:null,disabled:!1,display:"comma",dropdownIcon:null,emptyFilterMessage:null,emptyMessage:null,filter:!1,filterBy:null,filterInputAutoFocus:!0,filterLocale:void 0,selectOnFocus:!1,focusOnHover:!0,autoOptionFocus:!1,filterMatchMode:"contains",filterPlaceholder:null,filterTemplate:null,fixedPlaceholder:!1,flex:!1,id:null,inline:!1,inputId:null,inputRef:null,invalid:!1,variant:null,itemCheckboxIcon:null,itemClassName:null,itemTemplate:null,loading:!1,loadingIcon:null,maxSelectedLabels:null,name:null,onBlur:null,onChange:null,onClick:null,onFilter:null,onFocus:null,onHide:null,onRemove:null,onSelectAll:null,onShow:null,optionDisabled:null,optionGroupChildren:null,optionGroupLabel:null,optionGroupTemplate:null,optionLabel:null,optionValue:null,options:null,overlayVisible:!1,panelClassName:null,panelFooterTemplate:null,panelHeaderTemplate:null,panelStyle:null,placeholder:null,removeIcon:null,resetFilterOnHide:!1,scrollHeight:"200px",selectAll:!1,selectAllLabel:null,selectedItemTemplate:null,selectedItemsLabel:"{0} items selected",selectionLimit:null,showClear:!1,showSelectAll:!0,style:null,tabIndex:0,tooltip:null,tooltipOptions:null,transitionOptions:null,useOptionAsValue:!1,value:null,virtualScrollerOptions:null,children:void 0},css:{classes:{root:function(e){var t=e.props,n=e.context,l=e.focusedState,r=e.overlayVisibleState;return p.classNames("p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===t.display,"p-disabled":t.disabled,"p-invalid":t.invalid,"p-variant-filled":t.variant?"filled"===t.variant:n&&"filled"===n.inputStyle,"p-multiselect-clearable":t.showClear&&!t.disabled,"p-focus":l,"p-inputwrapper-filled":p.ObjectUtils.isNotEmpty(t.value),"p-inputwrapper-focus":l||r})},label:function(e){var t=e.props,n=e.empty;return p.classNames("p-multiselect-label",{"p-placeholder":n&&t.placeholder,"p-multiselect-label-empty":n&&!t.placeholder&&!t.selectedItemTemplate,"p-multiselect-items-label":!n&&"chip"!==t.display&&t.value.length>t.maxSelectedLabels})},panel:function(e){var t=e.panelProps,n=e.context;return p.classNames("p-multiselect-panel p-component",{"p-multiselect-inline":t.inline,"p-multiselect-flex":t.flex,"p-multiselect-limited":!e.allowOptionSelect,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===I.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===I.default.ripple})},list:function(e){return"p-multiselect-items p-component"},labelContainer:"p-multiselect-label-container",triggerIcon:"p-multiselect-trigger-icon p-c",trigger:"p-multiselect-trigger",clearIcon:"p-multiselect-clear-icon",tokenLabel:"p-multiselect-token-label",token:"p-multiselect-token",removeTokenIcon:"p-multiselect-token-icon",wrapper:"p-multiselect-items-wrapper",emptyMessage:"p-multiselect-empty-message",itemGroup:"p-multiselect-item-group",closeButton:"p-multiselect-close p-link",header:"p-multiselect-header",closeIcon:"p-multiselect-close-icon",headerCheckboxContainer:"p-multiselect-select-all",headerCheckboxIcon:"p-multiselect-select-all p-checkbox-icon p-c",headerSelectAllLabel:"p-multiselect-select-all-label",filterContainer:"p-multiselect-filter-container",filterIcon:"p-multiselect-filter-icon",item:function(e){var t=e.itemProps;return p.classNames("p-multiselect-item",{"p-highlight":t.selected,"p-disabled":t.disabled,"p-focus":t.focusedOptionIndex===t.index})},checkboxContainer:"p-checkbox p-component",checkboxIcon:"p-checkbox-icon p-c",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-multiselect {\n display: inline-flex;\n user-select: none;\n cursor: pointer;\n }\n \n .p-multiselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n cursor: pointer;\n }\n \n .p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n }\n \n .p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-multiselect-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-multiselect-token-icon {\n cursor: pointer;\n }\n \n .p-multiselect .p-multiselect-panel {\n min-width: 100%;\n }\n \n .p-multiselect-inline.p-multiselect-panel {\n border: none;\n position: initial;\n background: none;\n box-shadow: none;\n }\n \n .p-multiselect-inline.p-multiselect-panel .p-multiselect-items {\n padding: 0;\n }\n \n .p-multiselect-flex.p-multiselect-panel .p-multiselect-items {\n display: flex;\n flex-wrap: wrap;\n }\n \n .p-multiselect-items-wrapper {\n overflow: auto;\n }\n \n .p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-multiselect-item {\n cursor: pointer;\n display: flex;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n outline: none;\n }\n \n .p-multiselect-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .p-multiselect-select-all-label {\n margin-left: 0.5rem;\n }\n \n .p-multiselect-filter-container {\n position: relative;\n flex: 1 1 auto;\n }\n \n .p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-multiselect-filter-container .p-inputtext {\n width: 100%;\n }\n \n .p-multiselect-close {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n }\n \n .p-multiselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n right: 3rem;\n }\n \n .p-fluid .p-multiselect {\n display: flex;\n }\n}\n",inlineStyles:{root:function(e){var t=e.props;return t.showClear&&!t.disabled&&{position:"relative"}},itemGroup:function(e){var t=e.scrollerOptions;return{height:t.props?t.props.itemSize:void 0}}}}}),V=l.ComponentBase.extend({defaultProps:{__TYPE:"Checkbox",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,icon:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,name:null,onChange:null,onContextMenu:null,onMouseDown:null,readOnly:!1,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,value:null,children:void 0},css:{classes:{box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon",root:function(e){var t=e.props,n=e.context;return p.classNames("p-checkbox p-component",{"p-highlight":e.checked,"p-disabled":t.disabled,"p-invalid":t.invalid,"p-variant-filled":t.variant?"filled"===t.variant:n&&"filled"===n.inputStyle})}}}});function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=x.memo(x.forwardRef((function(e,t){var o=r.useMergeProps(),i=x.useContext(n.PrimeReactContext),a=V.getProps(e,i),c=V.setMetaData({props:a,context:{checked:a.checked===a.trueValue,disabled:a.disabled}}),u=c.ptm,f=c.cx;l.useHandleStyle(V.css.styles,c.isUnstyled,{name:"checkbox"});var d=x.useRef(null),m=x.useRef(a.inputRef),v=function(){return a.checked===a.trueValue},h=function(e){if(!a.disabled&&!a.readonly&&a.onChange){var t,n=v()?a.falseValue:a.trueValue;if(null==a||null===(t=a.onChange)||void 0===t||t.call(a,{originalEvent:e,value:a.value,checked:n,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{type:"checkbox",name:a.name,id:a.id,value:a.value,checked:n}}),e.defaultPrevented)return;p.DomHandler.focus(m.current)}};x.useImperativeHandle(t,(function(){return{props:a,focus:function(){return p.DomHandler.focus(m.current)},getElement:function(){return d.current},getInput:function(){return m.current}}})),x.useEffect((function(){p.ObjectUtils.combinedRefs(m,a.inputRef)}),[m,a.inputRef]),r.useUpdateEffect((function(){m.current.checked=v()}),[a.checked,a.trueValue]),r.useMountEffect((function(){a.autoFocus&&p.DomHandler.focus(m.current,a.autoFocus)}));var y,g,O,I,S,k=v(),j=p.ObjectUtils.isNotEmpty(a.tooltip),w=V.getOtherProps(a),C=o({id:a.id,className:p.classNames(a.className,f("root",{checked:k,context:i})),style:a.style,"data-p-highlight":k,"data-p-disabled":a.disabled,onContextMenu:a.onContextMenu,onMouseDown:a.onMouseDown},w,u("root"));return x.createElement(x.Fragment,null,x.createElement("div",E({ref:d},C),(I=p.ObjectUtils.reduceKeys(w,p.DomHandler.ARIA_PROPS),S=o(K({id:a.inputId,type:"checkbox",className:f("input"),name:a.name,tabIndex:a.tabIndex,onFocus:function(e){var t;null==a||null===(t=a.onFocus)||void 0===t||t.call(a)},onBlur:function(e){var t;null==a||null===(t=a.onBlur)||void 0===t||t.call(a)},onChange:function(e){return h(e)},disabled:a.disabled,readOnly:a.readOnly,required:a.required,"aria-invalid":a.invalid,checked:k},I),u("input")),x.createElement("input",E({ref:m},S))),(y=o({className:f("icon")},u("icon")),g=o({className:f("box",{checked:k}),"data-p-highlight":k,"data-p-disabled":a.disabled},u("box")),O=p.IconUtils.getJSXIcon(k?a.icon||x.createElement(b.CheckIcon,y):null,K({},y),{props:a,checked:k}),x.createElement("div",g,O))),j&&x.createElement(s.Tooltip,E({target:d,content:a.tooltip,pt:u("tooltip")},a.tooltipOptions)))})));function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}J.displayName="Checkbox";var B=x.memo((function(e){var t=r.useMergeProps(),l=e.ptm,o=e.cx,i=e.isUnstyled,c={filter:function(e){return s(e)},reset:function(){return e.resetFilter()}},u=function(t,n){return l(t,_({hostName:e.hostName},n))},s=function(t){e.onFilter&&e.onFilter({originalEvent:t,query:t.target.value})},f=function(t){if(e.onSelectAll)e.onSelectAll({originalEvent:t,checked:e.selectAll});else{var n=e.isAllSelected()?[]:e.visibleOptions.filter((function(t){return e.isValidOption(t)})).map((function(t){return e.getOptionValue(t)}));e.updateModel(t,n,n)}},d=function(){var n=t({className:o("filterIcon")},u("filterIcon")),r=p.IconUtils.getJSXIcon(e.filterIcon||x.createElement(v.SearchIcon,n),_({},n),{props:e});if(e.filter){var i=t({className:o("filterContainer")},u("filterContainer")),a=x.createElement("div",i,x.createElement(h.InputText,{ref:e.filterRef,type:"text",role:"searchbox",value:e.filterValue,onChange:s,className:"p-multiselect-filter",placeholder:e.filterPlaceholder,pt:l("filterInput"),__parentMetadata:{parent:e.metaData}}),r);if(e.filterTemplate)a=p.ObjectUtils.getJSXElement(e.filterTemplate,{className:i.className,element:a,filterOptions:c,onFilter:s,filterIconClassName:e.filterIconClassName,props:e});return x.createElement(x.Fragment,null,a)}return null}(),m=e.id?e.id+"_selectall":p.UniqueComponentId(),g=t({htmlFor:m,className:o("headerSelectAllLabel")},u("headerSelectAllLabel")),O=t({className:o("headerCheckboxIcon")},u("headerCheckboxIcon")),I=t({className:o("headerCheckboxContainer")},u("headerCheckboxContainer")),E=p.IconUtils.getJSXIcon(e.itemCheckboxIcon||x.createElement(b.CheckIcon,O),_({},O),{selected:e.selected}),S=e.showSelectAll&&x.createElement("div",I,x.createElement(J,{id:m,checked:e.selectAll,onChange:f,role:"checkbox","aria-checked":e.selectAll,icon:E,pt:l("headerCheckbox"),unstyled:i()}),!e.filter&&x.createElement("label",g,e.selectAllLabel)),k=t({className:o("closeIcon"),"aria-hidden":!0},u("closeIcon")),j=p.IconUtils.getJSXIcon(e.closeIcon||x.createElement(a.TimesIcon,k),_({},k),{props:e}),w=t({className:o("header")},u("header")),C=t({type:"button",className:o("closeButton"),"aria-label":n.localeOption("close"),onClick:e.onClose},u("closeButton")),N=x.createElement("button",C,j,x.createElement(y.Ripple,null)),D=x.createElement("div",w,S,d,N);return e.template?p.ObjectUtils.getJSXElement(e.template,{className:"p-multiselect-header",checkboxElement:S,checked:e.selectAll,onChange:f,filterElement:d,closeElement:N,closeElementClassName:"p-multiselect-close p-link",closeIconClassName:"p-multiselect-close-icon",onCloseClick:e.onClose,element:D,itemCheckboxIcon:E,props:e}):D}));function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}B.displayName="MultiSelectHeader";var Z=x.memo((function(e){var t=H(x.useState(!1),2),n=t[0],l=t[1],o=x.useRef(null),i=r.useMergeProps(),a=e.ptm,c=e.cx,u=e.isUnstyled,s=function(t){return a(t,{hostName:e.hostName,context:{selected:e.selected,disabled:e.disabled,focused:n,focusedIndex:e.focusedIndex,index:e.index}})},f=i({className:c("checkboxIcon")},s("checkboxIcon")),d=e.selected?p.IconUtils.getJSXIcon(e.checkboxIcon||x.createElement(b.CheckIcon,f),z({},f),{selected:e.selected}):null,m=e.template?p.ObjectUtils.getJSXElement(e.template,e.option):e.label,v=e.disabled?-1:e.tabIndex,h=i({className:c("checkboxContainer")},s("checkboxContainer")),g=i({className:p.classNames(e.className,e.option.className,c("item",{itemProps:e})),style:e.style,onClick:function(t){e.onClick&&e.onClick(t,e.option),t.preventDefault(),t.stopPropagation()},onFocus:function(e){var t;l(!0),null==o||null===(t=o.current)||void 0===t||t.getInput().focus()},onBlur:function(e){l(!1)},onMouseMove:function(t){return null==e?void 0:e.onMouseMove(t,e.index)},tabIndex:v,role:"option","aria-selected":e.selected,"data-p-highlight":e.selected,"data-p-disabled":e.disabled},s("item"));return x.createElement("li",g,x.createElement("div",h,x.createElement(J,{ref:o,checked:e.selected,icon:d,pt:a("checkbox"),unstyled:u()})),x.createElement("span",null,m),x.createElement(y.Ripple,null))}));function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Z.displayName="MultiSelectItem";var $=x.memo(x.forwardRef((function(e,t){var l=x.useRef(null),o=x.useRef(null),i=r.useMergeProps(),a=x.useContext(n.PrimeReactContext),c=e.ptm,u=e.cx,s=e.sx,b=e.isUnstyled,v=function(t,n){return c(t,Y({hostName:e.hostName},n))},h=function(){e.onEnter((function(){if(l.current){var t=e.getSelectedOptionIndex();-1!==t&&setTimeout((function(){return l.current.scrollToIndex(t)}),0)}}))},y=function(){e.onEntered((function(){e.filter&&e.filterInputAutoFocus&&o.current&&p.DomHandler.focus(o.current,!1)}))},g=function(t){l.current&&l.current.scrollToIndex(0),e.onFilterInputChange&&e.onFilterInputChange(t)},O=function(){if(e.panelFooterTemplate){var t=p.ObjectUtils.getJSXElement(e.panelFooterTemplate,e,e.onOverlayHide);return x.createElement("div",{className:"p-multiselect-footer"},t)}return null},I=function(t,n){var l;e.focusOnHover&&(null==e||null===(l=e.changeFocusedOptionIndex)||void 0===l||l.call(e,t,n))},S=function(t,n){return e.getOptionGroupChildren(t).map((function(t,l){var r=e.getOptionLabel(t),o=l+"_"+e.getOptionRenderKey(t),i=e.isOptionDisabled(t),a=i?null:e.tabIndex||0,s=e.isSelected(t);return x.createElement(Z,{hostName:e.hostName,index:l,key:o,focusedOptionIndex:e.focusedOptionIndex,label:r,option:t,style:n,template:e.itemTemplate,selected:s,onClick:e.onOptionSelect,onMouseMove:I,tabIndex:a,disabled:i,className:e.itemClassName,checkboxIcon:e.checkboxIcon,isUnstyled:b,ptm:c,cx:u})}))},k=function(){var t=p.ObjectUtils.getJSXElement(e.emptyFilterMessage,e)||n.localeOption("emptyFilterMessage"),l=i({className:u("emptyMessage")},v("emptyMessage"));return x.createElement("li",l,t)},j=function(t,n){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={height:l.props?l.props.itemSize:void 0};if(e.optionGroupLabel){var o=e.optionGroupTemplate?p.ObjectUtils.getJSXElement(e.optionGroupTemplate,t,n):e.getOptionGroupLabel(t),a=S(t,r),f=n+"_"+e.getOptionGroupRenderKey(t),d=i({className:u("itemGroup"),style:s("itemGroup",{scrollerOptions:l})},v("itemGroup"));return x.createElement(x.Fragment,{key:f},x.createElement("li",d,o),a)}var m=e.getOptionLabel(t),h=n+"_"+e.getOptionRenderKey(t),y=e.isOptionDisabled(t),g=y?null:e.tabIndex||0,O=e.isSelected(t);return x.createElement(Z,{hostName:e.hostName,key:h,focusedOptionIndex:e.focusedOptionIndex,label:m,option:t,style:r,index:n,template:e.itemTemplate,selected:O,onClick:e.onOptionSelect,onMouseMove:I,tabIndex:g,disabled:y,className:e.itemClassName,checkboxIcon:e.checkboxIcon,isUnstyled:b,ptm:c,cx:u})},w=function(){if(e.virtualScrollerOptions){var t=Y(Y({},e.virtualScrollerOptions),{style:Y(Y({},e.virtualScrollerOptions.style),{height:e.scrollHeight}),className:p.classNames("p-multiselect-items-wrapper",e.virtualScrollerOptions.className),items:e.visibleOptions,autoSize:!0,onLazyLoad:function(t){return e.virtualScrollerOptions.onLazyLoad(Y(Y({},t),{filter:e.filterValue}))},itemTemplate:function(e,t){return e&&j(e,t.index,t)},contentTemplate:function(t){var n=e.visibleOptions&&e.visibleOptions.length||!e.hasFilter?t.children:k(),l=i({ref:t.contentRef,style:t.style,className:p.classNames(t.className,u("list",{virtualScrollerProps:e.virtualScrollerOptions})),role:"listbox","aria-multiselectable":!0},v("list"));return x.createElement("ul",l,n)}});return x.createElement(m.VirtualScroller,E({ref:l},t,{pt:c("virtualScroller"),__parentMetadata:{parent:e.metaData}}))}var r,o,a=p.ObjectUtils.isNotEmpty(e.visibleOptions)?e.visibleOptions.map(j):e.hasFilter?k():(r=p.ObjectUtils.getJSXElement(e.emptyMessage,e)||n.localeOption("emptyMessage"),o=i({className:u("emptyMessage")},v("emptyMessage")),x.createElement("li",o,r)),s=i({className:u("wrapper"),style:{maxHeight:e.scrollHeight}},v("wrapper")),f=i({className:u("list"),role:"listbox","aria-multiselectable":!0},v("list"));return x.createElement("div",s,x.createElement("ul",f,a))},C=function(){var n=e.allowOptionSelect(),l=x.createElement(B,{hostName:e.hostName,id:e.id,filter:e.filter,filterRef:o,filterValue:e.filterValue,filterTemplate:e.filterTemplate,visibleOptions:e.visibleOptions,isValidOption:e.isValidOption,getOptionValue:e.getOptionValue,updateModel:e.updateModel,onFilter:g,filterPlaceholder:e.filterPlaceholder,onClose:e.onCloseClick,showSelectAll:e.showSelectAll,selectAll:e.isAllSelected(),selectAllLabel:e.selectAllLabel,onSelectAll:e.onSelectAll,template:e.panelHeaderTemplate,resetFilter:e.resetFilter,closeIcon:e.closeIcon,filterIcon:e.filterIcon,itemCheckboxIcon:e.itemCheckboxIcon,ptm:c,cx:u,isUnstyled:b,metaData:e.metaData}),r=w(),s=O(),d=i({className:p.classNames(e.panelClassName,u("panel",{panelProps:e,context:a,allowOptionSelect:n})),style:e.panelStyle,onClick:e.onClick},v("panel"));if(e.inline)return x.createElement("div",E({ref:t},d),r,s);var m=i({classNames:u("transition"),in:e.in,timeout:{enter:120,exit:100},options:e.transitionOptions,unmountOnExit:!0,onEnter:h,onEntered:y,onExit:e.onExit,onExited:e.onExited},v("transition")),I=i({ref:e.firstHiddenFocusableElementOnOverlay,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:e.onFirstHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},c("hiddenFirstFocusableEl")),S=i({ref:e.lastHiddenFocusableElementOnOverlay,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:e.onLastHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},c("hiddenLastFocusableEl"));return x.createElement(f.CSSTransition,E({nodeRef:t},m),x.createElement("div",E({ref:t},d),x.createElement("span",I),l,r,s,x.createElement("span",S)))}();return e.inline?C:x.createElement(d.Portal,{element:C,appendTo:e.appendTo})})));function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ne(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var l=0,r=function(){};return{s:r,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,i=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(a)throw o}}}}function ne(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}$.displayName="MultiSelectPanel";var re=x.memo(x.forwardRef((function(e,t){var f=r.useMergeProps(),d=x.useContext(n.PrimeReactContext),m=R.getProps(e,d),b=H(x.useState(null),2),v=b[0],h=b[1],y=H(x.useState(!1),2),g=y[0],O=y[1],S=H(x.useState(""),2),k=S[0],j=S[1],C=H(x.useState(-1),2),N=C[0],D=C[1],P=H(x.useState(!1),2),F=P[0],A=P[1],M=H(x.useState(m.inline),2),T=M[0],V=M[1],G=x.useRef(null),K=x.useRef(null),J=x.useRef(null),X=x.useRef(null),_=x.useRef(null),B=x.useRef(m.inputRef),q=x.useRef(null),z=x.useRef(null),Z=k&&k.trim().length>0,W=p.ObjectUtils.isEmpty(m.value),Y=m.optionValue?null:m.dataKey,Q={props:m,state:{filterState:k,focused:F,overlayVisible:T}},ne=R.setMetaData(Q),le=ne.ptm,re=ne.cx,oe=ne.sx,ie=ne.isUnstyled;l.useHandleStyle(R.css.styles,ie,{name:"multiselect"});var ae=H(r.useOverlayListener({target:G,overlay:z,listener:function(e,t){t.valid&&("outside"===t.type?!Ne(e)&&!De(e)&&we():we())},when:T}),2),ce=ae[0],ue=ae[1],se=function(e){var t=Ke()&&e<ct.length-1?ct.slice(e+1).findIndex((function(e){return Be(e)})):-1;return t>-1?t+e+1:-1},pe=function(e){var t=Ke()&&e>0?p.ObjectUtils.findLastIndex(ct.slice(0,e),(function(e){return Be(e)})):-1;return t>-1?t:-1},fe=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=-1;return Ke()&&(n=t?-1===(n=pe(e))?se(e):n:-1===(n=se(e))?pe(e):n),n>-1?n:e},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===t&&(t=fe(n,!0)),-1===n&&(n=fe(t)),-1!==t&&-1!==n){var l=Math.min(t,n),r=Math.max(t,n),o=ct.slice(l,r+1).filter((function(e){return _e(e)})).map((function(e){return Te(e)}));Ee(e,o,o)}},me=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(!m.disabled&&!Re(t)){var l=null;l=Ue(t)?m.value.filter((function(e){return!p.ObjectUtils.equals(e,Te(t),Y)})):[].concat(U(m.value||[]),[Te(t)]),Ee(e,l,t),-1!==n&&h(n)}},be=function(e){if(T){var t=-1!==v?$e(v):g?We():ze();e.shiftKey&&de(e,N,t),tt(e,t)}else je(),m.editable&&tt(e,qe());e.preventDefault()},ve=function(e){if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==v&&me(e,ct[v]),T&&we(),e.preventDefault();else{var t=-1!==v?Qe(v):g?Ye():Ze();tt(e,t),!T&&je(),e.preventDefault()}},he=function(e){T?-1!==v&&(e.shiftKey?de(e,v):me(e,ct[v])):(h(-1),be(e)),e.preventDefault()},ye=function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){t.setSelectionRange(0,e.shiftKey?t.value.length:0),h(-1)}else{var n=e.metaKey||e.ctrlKey,l=We();e.shiftKey&&n&&de(e,l,N),tt(e,l),!T&&je()}e.preventDefault()},ge=function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),L("focusedOptionIndex")}else{var l=e.metaKey||e.ctrlKey,r=Ye();e.shiftKey&&l&&de(e,N,r),tt(e,r),!T&&je()}e.preventDefault()},Oe=function(e){e.preventDefault()},xe=function(e){e.preventDefault()},Ie=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(T&&Je()?(p.DomHandler.focus(e.shiftKey?_.current:X.current),e.preventDefault()):(-1!==v&&me(e,ct[v]),T&&we(filter)))},Ee=function(e,t,n){m.onChange&&m.onChange({originalEvent:e,value:t,selectedOption:n,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{name:m.name,id:m.id,value:t}})},Se=function(){j(""),m.onFilter&&m.onFilter({filter:""})},ke=function(e){var t;T&&((t=e?e.currentTarget:p.DomHandler.findSingle(z.current,'li[data-p-highlight="true"]'))&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"}))},je=function(){V(!0),h(-1!==v?v:m.autoOptionFocus?ze():qe()),p.DomHandler.focus(B.current)},we=function(){h(-1),V(!1),O(!1)},Ce=function(){p.DomHandler.alignOverlay(z.current,q.current.parentElement,m.appendTo||d&&d.appendTo||I.default.appendTo)},Ne=function(e){return"clearicon"===p.DomHandler.getAttribute(e.target,"data-pc-section")},De=function(e){return"headercheckboxcontainer"===p.DomHandler.getAttribute(e.target,"data-pc-section")},Pe=function(e){return z.current&&z.current.contains(e.target)},Fe=function(e,t){return t.findIndex((function(t){return e.some((function(e){return p.ObjectUtils.equals(e,Te(t),Y)}))}))},Ue=function(e){if(m.value){var t=Te(e),n=Ve(e);return m.value.some((function(e){return p.ObjectUtils.equals(n?e:Te(e),t,Y)}))}return!1},Le=function(e){var t;if(m.options)if(m.optionGroupLabel){var n,l=te(m.options);try{for(l.s();!(n=l.n()).done;){if(t=Ae(e,He(n.value)))break}}catch(e){l.e(e)}finally{l.f()}}else t=Ae(e,m.options),p.ObjectUtils.isEmpty(t)&&(t=Ae(e,m.value));return t?Me(t):null},Ae=function(e,t){return t.find((function(t){return p.ObjectUtils.equals(Te(t),e,Y)}))},Me=function(e){return m.optionLabel?p.ObjectUtils.resolveFieldData(e,m.optionLabel):e&&void 0!==e.label?e.label:e},Te=function(e){if(m.useOptionAsValue)return e;if(m.optionValue){var t=p.ObjectUtils.resolveFieldData(e,m.optionValue);return null!==t?t:e}return e&&void 0!==e.value?e.value:e},He=function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupChildren)},Re=function(e){return m.optionDisabled?p.ObjectUtils.isFunction(m.optionDisabled)?m.optionDisabled(e):p.ObjectUtils.resolveFieldData(e,m.optionDisabled):!(!e||void 0===e.disabled)&&e.disabled},Ve=function(e){return!m.useOptionAsValue&&m.optionValue||e&&void 0!==e.value},Ge=function(e){return m.optionGroupLabel&&e.optionGroup&&e.group},Ke=function(){return p.ObjectUtils.isNotEmpty(m.value)},Je=function(){return p.DomHandler.getFocusableElements(z.current,':not([data-p-hidden-focusable="true"])').length>0},Xe=function(e){var t;return _e(e)&&(null===(t=Me(e))||void 0===t?void 0:t.toLocaleLowerCase(m.filterLocale).startsWith(K.current.toLocaleLowerCase(m.filterLocale)))},_e=function(e){return p.ObjectUtils.isNotEmpty(e)&&!(Re(e)||Ge(e))},Be=function(e){return _e(e)&&Ue(e)},qe=function(){if(Ke())for(var e,t=function(){var e=m.value[n],t=ct.findIndex((function(t){return Be(t)&&(n=e,l=Te(t),p.ObjectUtils.equals(n,l,Y));var n,l}));if(t>-1)return{v:t}},n=m.value.length-1;n>=0;n--)if(e=t())return e.v;return-1},ze=function(){var e=qe();return e<0?We():e},Ze=function(){var e=qe();return e<0?Ye():e},We=function(){return ct.findIndex((function(e){return _e(e)}))},Ye=function(){return p.ObjectUtils.findLastIndex(ct,(function(e){return _e(e)}))},$e=function(e){var t=e<ct.length-1?ct.slice(e+1).findIndex((function(e){return _e(e)})):-1;return t>-1?t+e+1:e},Qe=function(e){var t=e>0?p.ObjectUtils.findLastIndex(ct.slice(0,e),(function(e){return _e(e)})):-1;return t>-1?t:e},et=function(e){K.current=(K.current||"")+e.key;var t=-1;p.ObjectUtils.isNotEmpty(K.current)&&(-1===(t=-1!==v?-1===(t=ct.slice(v).findIndex((function(e){return Xe(e)})))?ct.slice(0,v).findIndex((function(e){return Xe(e)})):t+v:ct.findIndex((function(e){return Xe(e)})))&&-1===v&&(t=ze()),-1!==t&&tt(e,t)),J.current&&clearTimeout(J.current),J.current=setTimeout((function(){K.current="",J.current=null}),500)},tt=function(e,t){v!==t&&(h(t),ke(e),m.selectOnFocus&&me(e,ct[t],!1))},nt=function(e,t){var n=m.value.filter((function(e){return!p.ObjectUtils.equals(e,t,Y)}));m.onRemove&&m.onRemove({originalEvent:e,value:n}),Ee(e,n,t)},lt=function(){var e=/{(.*?)}/,t=m.selectedItemsLabel||n.localeOption("selectionMessage");return e.test(t)?t.replace(t.match(e)[0],m.value.length+""):t},rt=function(){if(!W&&!m.fixedPlaceholder)return p.ObjectUtils.isNotEmpty(m.maxSelectedLabels)&&m.value.length>m.maxSelectedLabels?lt():p.ObjectUtils.isArray(m.value)?m.value.reduce((function(e,t,n){return e+(0!==n?", ":"")+Le(t)}),""):""};x.useImperativeHandle(t,(function(){return{props:m,show:je,hide:we,focus:function(){return p.DomHandler.focus(B.current)},getElement:function(){return G.current},getOverlay:function(){return z.current},getInput:function(){return B.current}}})),r.useMountEffect((function(){Ce()})),x.useEffect((function(){p.ObjectUtils.combinedRefs(B,m.inputRef)}),[B,m.inputRef]),x.useEffect((function(){setTimeout((function(){m.overlayVisible?je():we()}),100)}),[m.overlayVisible]),r.useUpdateEffect((function(){T&&k&&Z&&Ce()}),[T,k,Z]),r.useUnmountEffect((function(){p.ZIndexUtils.clear(z.current)}));var ot,it,at,ct=function(){if(Z){var e=k.trim().toLocaleLowerCase(m.filterLocale),t=m.filterBy?m.filterBy.split(","):[m.optionLabel||"label"];if(m.optionGroupLabel){var l,r=[],o=te(m.options);try{for(o.s();!(l=o.n()).done;){var i=l.value,a=n.FilterService.filter(He(i),t,e,m.filterMatchMode,m.filterLocale);a&&a.length&&r.push(ee(ee({},i),w({},m.optionGroupChildren,a)))}}catch(e){o.e(e)}finally{o.f()}return r}return n.FilterService.filter(m.options,t,e,m.filterMatchMode,m.filterLocale)}return m.options}(),ut=p.ObjectUtils.isNotEmpty(m.tooltip),st=R.getOtherProps(m),pt=p.ObjectUtils.reduceKeys(st,p.DomHandler.ARIA_PROPS),ft=f({className:re("triggerIcon")},le("triggerIcon")),dt=f({className:re("trigger")},le("trigger")),mt=m.loadingIcon?p.IconUtils.getJSXIcon(m.loadingIcon,ee({},ft),{props:m}):x.createElement(i.SpinnerIcon,E({spin:!0},ft)),bt=m.dropdownIcon?p.IconUtils.getJSXIcon(m.dropdownIcon,ee({},ft),{props:m}):x.createElement(o.ChevronDownIcon,ft),vt=x.createElement("div",dt,m.loading?mt:bt),ht=!m.inline&&(ot=m.selectedItemTemplate?W?p.ObjectUtils.getJSXElement(m.selectedItemTemplate):p.ObjectUtils.isNotEmpty(m.maxSelectedLabels)&&m.value.length>m.maxSelectedLabels?lt():m.value.map((function(e,t){var n=p.ObjectUtils.getJSXElement(m.selectedItemTemplate,e);return x.createElement(x.Fragment,{key:t},n)})):"chip"!==m.display||W?rt():m.value.slice(0,m.maxSelectedLabels||m.value.length).map((function(e,t){var n={context:{value:e,index:t}},l=Le(e),r=f({key:t,className:re("removeTokenIcon"),onClick:function(t){return nt(t,e)}},le("removeTokenIcon",n)),o=!m.disabled&&(m.removeIcon?p.IconUtils.getJSXIcon(m.removeIcon,ee({},r),{props:m}):x.createElement(c.TimesCircleIcon,r)),i=f({className:re("token")},le("token",n)),a=f({key:l+t,className:re("tokenLabel")},le("tokenLabel",n));return x.createElement("div",E({},i,{key:l}),x.createElement("span",a,l),o)})),it=f({ref:q,className:re("labelContainer")},le("labelContainer")),at=f({className:re("label",{empty:W})},le("label")),x.createElement("div",it,x.createElement("div",at,ot||m.placeholder||"empty"))),yt=!m.inline&&function(){var e=f({className:re("clearIcon"),onClick:function(e){return Ee(e,[],[])}},le("clearIcon")),t=p.IconUtils.getJSXIcon(m.clearIcon||x.createElement(a.TimesIcon,e),ee({},e),{props:m});return W||!m.showClear||m.disabled?null:t}(),gt=f(ee(ee({ref:G,id:m.id,style:ee(ee({},m.style),oe("root")),className:p.classNames(m.className,re("root",{focusedState:F,context:d,overlayVisibleState:T}))},st),{},{onClick:function(e){m.inline||m.disabled||m.loading||Pe(e)||"removetokenicon"===p.DomHandler.getAttribute(e.target,"data-pc-section")||Ne(e)||(T?we():je(),p.DomHandler.focus(B.current),e.preventDefault()),O(!0)}}),R.getOtherProps(m),le("root")),Ot=f({className:"p-hidden-accessible","data-p-hidden-accessible":!0},le("hiddenInputWrapper")),xt=f(ee({ref:B,id:m.inputId,name:m.name,type:"text",onFocus:function(e){A(!0),m.onFocus&&m.onFocus(e)},onBlur:function(e){A(!1),m.onBlur&&m.onBlur(e)},onKeyDown:function(e){var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowUp":if(m.inline)break;ve(e);break;case"ArrowDown":if(m.inline)break;be(e);break;case"Space":case"NumpadEnter":case"Enter":if(m.inline)break;he(e);break;case"Home":if(m.inline)break;ye(e),e.preventDefault();break;case"End":if(m.inline)break;ge(e),e.preventDefault();break;case"PageDown":xe(e);break;case"PageUp":Oe(e);break;case"Escape":if(m.inline)break;we();break;case"Tab":Ie(e);break;case"ShiftLeft":case"ShiftRight":D(v);break;default:if("KeyA"===e.code&&t){var n=ct.filter((function(e){return _e(e)})).map((function(e){return Te(e)}));Ee(e,n,n),e.preventDefault();break}!t&&p.ObjectUtils.isPrintableCharacter(e.key)&&(!T&&je(),et(e),e.preventDefault())}O(!1)},role:"combobox","aria-expanded":T,disabled:m.disabled,tabIndex:m.disabled?-1:m.tabIndex},pt),le("input"));return x.createElement(x.Fragment,null,x.createElement("div",gt,x.createElement("div",Ot,x.createElement("input",E({},xt,{readOnly:!0}))),!m.inline&&x.createElement(x.Fragment,null,ht,yt,vt),x.createElement($,E({hostName:"MultiSelect",ref:z,visibleOptions:ct},m,{onClick:function(e){u.OverlayService.emit("overlay-click",{originalEvent:e,target:G.current})},onOverlayHide:we,filterValue:k,focusedOptionIndex:v,onFirstHiddenFocus:function(e){var t=e.relatedTarget===B.current?p.DomHandler.getFirstFocusableElement(z.current,':not([data-p-hidden-focusable="true"])'):B.current;p.DomHandler.focus(t)},onLastHiddenFocus:function(e){var t=e.relatedTarget===B.current?p.DomHandler.getLastFocusableElement(z.current,':not([data-p-hidden-focusable="true"])'):B.current;p.DomHandler.focus(t)},firstHiddenFocusableElementOnOverlay:X,lastHiddenFocusableElementOnOverlay:_,setFocusedOptionIndex:h,hasFilter:Z,isValidOption:_e,getOptionValue:Te,updateModel:Ee,onFilterInputChange:function(e){var t=e.query;j(t),m.onFilter&&m.onFilter({originalEvent:e,filter:t})},resetFilter:Se,onCloseClick:function(e){we(),p.DomHandler.focus(B.current),e.preventDefault(),e.stopPropagation()},onSelectAll:function(e){if(m.onSelectAll)m.onSelectAll(e);else{var t=null;if(e.checked){if(t=[],ct){var n=ct.filter((function(e){return Re(e)&&Ue(e)}));t=n.map((function(e){return Te(e)}))}}else if(ct){var l=ct.filter((function(e){return!Re(e)||Ue(e)}));m.optionGroupLabel?(t=[],l.forEach((function(e){return t=[].concat(U(t),U(He(e).filter((function(e){return!Re(e)})).map((function(e){return Te(e)}))))}))):t=l.map((function(e){return Te(e)}))}Ee(e.originalEvent,t,t)}},getOptionLabel:Me,getOptionRenderKey:function(e){return m.dataKey?p.ObjectUtils.resolveFieldData(e,m.dataKey):Me(e)},isOptionDisabled:Re,getOptionGroupChildren:He,getOptionGroupLabel:function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupLabel)},getOptionGroupRenderKey:function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupLabel)},isSelected:Ue,getSelectedOptionIndex:function(){if(null!=m.value&&m.options){if(m.optionGroupLabel){var e=0,t=m.options.findIndex((function(t,n){return(e=n)&&-1!==Fe(m.value,He(t))}));return-1!==t?{group:e,option:t}:-1}return Fe(m.value,m.options)}return-1},isAllSelected:function(){if(m.onSelectAll)return m.selectAll;if(p.ObjectUtils.isEmpty(ct))return!1;var e=ct.filter((function(e){return!Re(e)}));if(m.optionGroupLabel){var t,n=!0,l=te(e);try{for(l.s();!(t=l.n()).done;){!0===He(t.value).filter((function(e){return!Re(e)})).some((function(e){return!Ue(e)}))&&(n=!1)}}catch(e){l.e(e)}finally{l.f()}return n}return!e.some((function(e){return!Ue(e)}))},onOptionSelect:me,allowOptionSelect:function(){return!m.selectionLimit||!m.value||m.value&&m.value.length<m.selectionLimit},in:T,onEnter:function(e){p.ZIndexUtils.set("overlay",z.current,d&&d.autoZIndex||I.default.autoZIndex,d&&d.zIndex.overlay||I.default.zIndex.overlay),p.DomHandler.addStyles(z.current,{position:"absolute",top:"0",left:"0"}),Ce(),ke(),e&&e()},onEntered:function(e){e&&e(),ce(),m.onShow&&m.onShow()},onExit:function(){ue()},onExited:function(){m.filter&&m.resetFilterOnHide&&Se(),p.ZIndexUtils.clear(z.current),m.onHide&&m.onHide()},ptm:le,cx:re,sx:oe,isUnstyled:ie,metaData:Q,changeFocusedOptionIndex:tt}))),ut&&x.createElement(s.Tooltip,E({target:G,content:m.tooltip,pt:le("tooltip")},m.tooltipOptions)))})));return re.displayName="MultiSelect",e.MultiSelect=re,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.icons.chevrondown,primereact.icons.spinner,primereact.icons.times,primereact.icons.timescircle,primereact.overlayservice,primereact.tooltip,primereact.utils,primereact.csstransition,primereact.portal,primereact.virtualscroller,primereact.icons.check,primereact.icons.search,primereact.inputtext,primereact.ripple);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.multiselect=function(e,t,n,l,r,i,o,a,c,u,s,p,f,d,m,b,v,h,y){"use strict";function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function O(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var l=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,l.get?l:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var x=O(t),I=g(n);function E(){return E=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var l in n)Object.prototype.hasOwnProperty.call(n,l)&&(e[l]=n[l])}return e},E.apply(this,arguments)}function S(e){return S="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},S(e)}function k(e,t){if("object"!==S(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var l=n.call(e,t||"default");if("object"!==S(l))return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}function j(e){var t=k(e,"string");return"symbol"===S(t)?t:String(t)}function w(e,t,n){return(t=j(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function C(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}function N(e){if(Array.isArray(e))return C(e)}function P(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e,t){if(e){if("string"==typeof e)return C(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?C(e,t):void 0}}function F(){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 U(e){return N(e)||P(e)||D(e)||F()}function L(e){throw new TypeError('"'+e+'" is read-only')}function A(e){if(Array.isArray(e))return e}function M(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var l,r,i,o,a=[],c=!0,u=!1;try{if(i=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;c=!1}else for(;!(c=(l=i.call(n)).done)&&(a.push(l.value),a.length!==t);c=!0);}catch(e){u=!0,r=e}finally{try{if(!c&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(u)throw r}}return a}}function T(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function H(e,t){return A(e)||M(e,t)||D(e,t)||T()}var R=l.ComponentBase.extend({defaultProps:{__TYPE:"MultiSelect",appendTo:null,ariaLabelledBy:null,checkboxIcon:null,className:null,clearIcon:null,closeIcon:null,dataKey:null,disabled:!1,display:"comma",dropdownIcon:null,emptyFilterMessage:null,emptyMessage:null,filter:!1,filterBy:null,filterInputAutoFocus:!0,filterLocale:void 0,selectOnFocus:!1,focusOnHover:!0,autoOptionFocus:!1,filterMatchMode:"contains",filterPlaceholder:null,filterTemplate:null,fixedPlaceholder:!1,flex:!1,id:null,inline:!1,inputId:null,inputRef:null,invalid:!1,variant:null,itemCheckboxIcon:null,itemClassName:null,itemTemplate:null,loading:!1,loadingIcon:null,maxSelectedLabels:null,name:null,onBlur:null,onChange:null,onClick:null,onFilter:null,onFocus:null,onHide:null,onRemove:null,onSelectAll:null,onShow:null,optionDisabled:null,optionGroupChildren:null,optionGroupLabel:null,optionGroupTemplate:null,optionLabel:null,optionValue:null,options:null,overlayVisible:!1,panelClassName:null,panelFooterTemplate:null,panelHeaderTemplate:null,panelStyle:null,placeholder:null,removeIcon:null,resetFilterOnHide:!1,scrollHeight:"200px",selectAll:!1,selectAllLabel:null,selectedItemTemplate:null,selectedItemsLabel:"{0} items selected",selectionLimit:null,showClear:!1,showSelectAll:!0,style:null,tabIndex:0,tooltip:null,tooltipOptions:null,transitionOptions:null,useOptionAsValue:!1,value:null,virtualScrollerOptions:null,children:void 0},css:{classes:{root:function(e){var t=e.props,n=e.context,l=e.focusedState,r=e.overlayVisibleState;return p.classNames("p-multiselect p-component p-inputwrapper",{"p-multiselect-chip":"chip"===t.display,"p-disabled":t.disabled,"p-invalid":t.invalid,"p-variant-filled":t.variant?"filled"===t.variant:n&&"filled"===n.inputStyle,"p-multiselect-clearable":t.showClear&&!t.disabled,"p-focus":l,"p-inputwrapper-filled":p.ObjectUtils.isNotEmpty(t.value),"p-inputwrapper-focus":l||r})},label:function(e){var t=e.props,n=e.empty;return p.classNames("p-multiselect-label",{"p-placeholder":n&&t.placeholder,"p-multiselect-label-empty":n&&!t.placeholder&&!t.selectedItemTemplate,"p-multiselect-items-label":!n&&"chip"!==t.display&&t.value.length>t.maxSelectedLabels})},panel:function(e){var t=e.panelProps,n=e.context;return p.classNames("p-multiselect-panel p-component",{"p-multiselect-inline":t.inline,"p-multiselect-flex":t.flex,"p-multiselect-limited":!e.allowOptionSelect,"p-input-filled":n&&"filled"===n.inputStyle||"filled"===I.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===I.default.ripple})},list:function(e){return"p-multiselect-items p-component"},labelContainer:"p-multiselect-label-container",triggerIcon:"p-multiselect-trigger-icon p-c",trigger:"p-multiselect-trigger",clearIcon:"p-multiselect-clear-icon",tokenLabel:"p-multiselect-token-label",token:"p-multiselect-token",removeTokenIcon:"p-multiselect-token-icon",wrapper:"p-multiselect-items-wrapper",emptyMessage:"p-multiselect-empty-message",itemGroup:"p-multiselect-item-group",closeButton:"p-multiselect-close p-link",header:"p-multiselect-header",closeIcon:"p-multiselect-close-icon",headerCheckboxContainer:"p-multiselect-select-all",headerCheckboxIcon:"p-multiselect-select-all p-checkbox-icon p-c",headerSelectAllLabel:"p-multiselect-select-all-label",filterContainer:"p-multiselect-filter-container",filterIcon:"p-multiselect-filter-icon",item:function(e){var t=e.itemProps;return p.classNames("p-multiselect-item",{"p-highlight":t.selected,"p-disabled":t.disabled,"p-focus":t.focusedOptionIndex===t.index})},checkboxContainer:"p-checkbox p-component",checkboxIcon:"p-checkbox-icon p-c",transition:"p-connected-overlay"},styles:"\n@layer primereact {\n .p-multiselect {\n display: inline-flex;\n user-select: none;\n cursor: pointer;\n }\n \n .p-multiselect-trigger {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n cursor: pointer;\n }\n \n .p-multiselect-label-container {\n overflow: hidden;\n flex: 1 1 auto;\n cursor: pointer;\n }\n \n .p-multiselect-label {\n display: block;\n white-space: nowrap;\n cursor: pointer;\n overflow: hidden;\n text-overflow: ellipsis;\n }\n \n .p-multiselect-label-empty {\n overflow: hidden;\n visibility: hidden;\n }\n \n .p-multiselect-token {\n cursor: default;\n display: inline-flex;\n align-items: center;\n flex: 0 0 auto;\n }\n \n .p-multiselect-token-icon {\n cursor: pointer;\n }\n \n .p-multiselect .p-multiselect-panel {\n min-width: 100%;\n }\n \n .p-multiselect-inline.p-multiselect-panel {\n border: none;\n position: initial;\n background: none;\n box-shadow: none;\n }\n \n .p-multiselect-inline.p-multiselect-panel .p-multiselect-items {\n padding: 0;\n }\n \n .p-multiselect-flex.p-multiselect-panel .p-multiselect-items {\n display: flex;\n flex-wrap: wrap;\n }\n \n .p-multiselect-items-wrapper {\n overflow: auto;\n }\n \n .p-multiselect-items {\n margin: 0;\n padding: 0;\n list-style-type: none;\n }\n \n .p-multiselect-item {\n cursor: pointer;\n display: flex;\n align-items: center;\n font-weight: normal;\n white-space: nowrap;\n position: relative;\n overflow: hidden;\n outline: none;\n }\n \n .p-multiselect-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n }\n \n .p-multiselect-select-all-label {\n margin-left: 0.5rem;\n }\n \n .p-multiselect-filter-container {\n position: relative;\n flex: 1 1 auto;\n }\n \n .p-multiselect-filter-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n }\n \n .p-multiselect-filter-container .p-inputtext {\n width: 100%;\n }\n \n .p-multiselect-close {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n overflow: hidden;\n position: relative;\n margin-left: auto;\n }\n \n .p-multiselect-clear-icon {\n position: absolute;\n top: 50%;\n margin-top: -.5rem;\n right: 3rem;\n }\n \n .p-fluid .p-multiselect {\n display: flex;\n }\n}\n",inlineStyles:{root:function(e){var t=e.props;return t.showClear&&!t.disabled&&{position:"relative"}},itemGroup:function(e){var t=e.scrollerOptions;return{height:t.props?t.props.itemSize:void 0}}}}}),V=l.ComponentBase.extend({defaultProps:{__TYPE:"Checkbox",autoFocus:!1,checked:!1,className:null,disabled:!1,falseValue:!1,icon:null,id:null,inputId:null,inputRef:null,invalid:!1,variant:null,name:null,onChange:null,onContextMenu:null,onMouseDown:null,readOnly:!1,required:!1,style:null,tabIndex:null,tooltip:null,tooltipOptions:null,trueValue:!0,value:null,children:void 0},css:{classes:{box:"p-checkbox-box",input:"p-checkbox-input",icon:"p-checkbox-icon",root:function(e){var t=e.props,n=e.context;return p.classNames("p-checkbox p-component",{"p-highlight":e.checked,"p-disabled":t.disabled,"p-invalid":t.invalid,"p-variant-filled":t.variant?"filled"===t.variant:n&&"filled"===n.inputStyle})}}}});function G(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?G(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):G(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var J=x.memo(x.forwardRef((function(e,t){var i=r.useMergeProps(),o=x.useContext(n.PrimeReactContext),a=V.getProps(e,o),c=V.setMetaData({props:a,context:{checked:a.checked===a.trueValue,disabled:a.disabled}}),u=c.ptm,f=c.cx;l.useHandleStyle(V.css.styles,c.isUnstyled,{name:"checkbox"});var d=x.useRef(null),m=x.useRef(a.inputRef),v=function(){return a.checked===a.trueValue},h=function(e){if(!a.disabled&&!a.readonly&&a.onChange){var t,n=v()?a.falseValue:a.trueValue;if(null==a||null===(t=a.onChange)||void 0===t||t.call(a,{originalEvent:e,value:a.value,checked:n,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{type:"checkbox",name:a.name,id:a.id,value:a.value,checked:n}}),e.defaultPrevented)return;p.DomHandler.focus(m.current)}};x.useImperativeHandle(t,(function(){return{props:a,focus:function(){return p.DomHandler.focus(m.current)},getElement:function(){return d.current},getInput:function(){return m.current}}})),x.useEffect((function(){p.ObjectUtils.combinedRefs(m,a.inputRef)}),[m,a.inputRef]),r.useUpdateEffect((function(){m.current.checked=v()}),[a.checked,a.trueValue]),r.useMountEffect((function(){a.autoFocus&&p.DomHandler.focus(m.current,a.autoFocus)}));var y,g,O,I,S,k=v(),j=p.ObjectUtils.isNotEmpty(a.tooltip),w=V.getOtherProps(a),C=i({id:a.id,className:p.classNames(a.className,f("root",{checked:k,context:o})),style:a.style,"data-p-highlight":k,"data-p-disabled":a.disabled,onContextMenu:a.onContextMenu,onMouseDown:a.onMouseDown},w,u("root"));return x.createElement(x.Fragment,null,x.createElement("div",E({ref:d},C),(I=p.ObjectUtils.reduceKeys(w,p.DomHandler.ARIA_PROPS),S=i(K({id:a.inputId,type:"checkbox",className:f("input"),name:a.name,tabIndex:a.tabIndex,onFocus:function(e){var t;null==a||null===(t=a.onFocus)||void 0===t||t.call(a)},onBlur:function(e){var t;null==a||null===(t=a.onBlur)||void 0===t||t.call(a)},onChange:function(e){return h(e)},disabled:a.disabled,readOnly:a.readOnly,required:a.required,"aria-invalid":a.invalid,checked:k},I),u("input")),x.createElement("input",E({ref:m},S))),(y=i({className:f("icon")},u("icon")),g=i({className:f("box",{checked:k}),"data-p-highlight":k,"data-p-disabled":a.disabled},u("box")),O=p.IconUtils.getJSXIcon(k?a.icon||x.createElement(b.CheckIcon,y):null,K({},y),{props:a,checked:k}),x.createElement("div",g,O))),j&&x.createElement(s.Tooltip,E({target:d,content:a.tooltip,pt:u("tooltip")},a.tooltipOptions)))})));function X(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?X(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):X(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}J.displayName="Checkbox";var B=x.memo((function(e){var t=r.useMergeProps(),l=e.ptm,i=e.cx,o=e.isUnstyled,c={filter:function(e){return s(e)},reset:function(){return e.resetFilter()}},u=function(t,n){return l(t,_({hostName:e.hostName},n))},s=function(t){e.onFilter&&e.onFilter({originalEvent:t,query:t.target.value})},f=function(t){if(e.onSelectAll)e.onSelectAll({originalEvent:t,checked:e.selectAll});else{var n=e.isAllSelected()?[]:e.visibleOptions.filter((function(t){return e.isValidOption(t)})).map((function(t){return e.getOptionValue(t)}));e.updateModel(t,n,n)}},d=function(){var n=t({className:i("filterIcon")},u("filterIcon")),r=p.IconUtils.getJSXIcon(e.filterIcon||x.createElement(v.SearchIcon,n),_({},n),{props:e});if(e.filter){var o=t({className:i("filterContainer")},u("filterContainer")),a=x.createElement("div",o,x.createElement(h.InputText,{ref:e.filterRef,type:"text",role:"searchbox",value:e.filterValue,onChange:s,className:"p-multiselect-filter",placeholder:e.filterPlaceholder,pt:l("filterInput"),__parentMetadata:{parent:e.metaData}}),r);if(e.filterTemplate)a=p.ObjectUtils.getJSXElement(e.filterTemplate,{className:o.className,element:a,filterOptions:c,onFilter:s,filterIconClassName:e.filterIconClassName,props:e});return x.createElement(x.Fragment,null,a)}return null}(),m=e.id?e.id+"_selectall":p.UniqueComponentId(),g=t({htmlFor:m,className:i("headerSelectAllLabel")},u("headerSelectAllLabel")),O=t({className:i("headerCheckboxIcon")},u("headerCheckboxIcon")),I=t({className:i("headerCheckboxContainer")},u("headerCheckboxContainer")),E=p.IconUtils.getJSXIcon(e.itemCheckboxIcon||x.createElement(b.CheckIcon,O),_({},O),{selected:e.selected}),S=e.showSelectAll&&x.createElement("div",I,x.createElement(J,{id:m,checked:e.selectAll,onChange:f,role:"checkbox","aria-checked":e.selectAll,icon:E,pt:l("headerCheckbox"),unstyled:o()}),!e.filter&&x.createElement("label",g,e.selectAllLabel)),k=t({className:i("closeIcon"),"aria-hidden":!0},u("closeIcon")),j=p.IconUtils.getJSXIcon(e.closeIcon||x.createElement(a.TimesIcon,k),_({},k),{props:e}),w=t({className:i("header")},u("header")),C=t({type:"button",className:i("closeButton"),"aria-label":n.localeOption("close"),onClick:e.onClose},u("closeButton")),N=x.createElement("button",C,j,x.createElement(y.Ripple,null)),P=x.createElement("div",w,S,d,N);return e.template?p.ObjectUtils.getJSXElement(e.template,{className:"p-multiselect-header",checkboxElement:S,checked:e.selectAll,onChange:f,filterElement:d,closeElement:N,closeElementClassName:"p-multiselect-close p-link",closeIconClassName:"p-multiselect-close-icon",onCloseClick:e.onClose,element:P,itemCheckboxIcon:E,props:e}):P}));function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}B.displayName="MultiSelectHeader";var Z=x.memo((function(e){var t=H(x.useState(!1),2),n=t[0],l=t[1],i=x.useRef(null),o=r.useMergeProps(),a=e.ptm,c=e.cx,u=e.isUnstyled,s=function(t){return a(t,{hostName:e.hostName,context:{selected:e.selected,disabled:e.disabled,focused:n,focusedIndex:e.focusedIndex,index:e.index}})},f=o({className:c("checkboxIcon")},s("checkboxIcon")),d=e.selected?p.IconUtils.getJSXIcon(e.checkboxIcon||x.createElement(b.CheckIcon,f),z({},f),{selected:e.selected}):null,m=e.template?p.ObjectUtils.getJSXElement(e.template,e.option):e.label,v=e.disabled?-1:e.tabIndex,h=o({className:c("checkboxContainer")},s("checkboxContainer")),g=o({className:p.classNames(e.className,e.option.className,c("item",{itemProps:e})),style:e.style,onClick:function(t){e.onClick&&e.onClick(t,e.option),t.preventDefault(),t.stopPropagation()},onFocus:function(e){var t;l(!0),null==i||null===(t=i.current)||void 0===t||t.getInput().focus()},onBlur:function(e){l(!1)},onMouseMove:function(t){return null==e?void 0:e.onMouseMove(t,e.index)},tabIndex:v,role:"option","aria-selected":e.selected,"data-p-highlight":e.selected,"data-p-disabled":e.disabled},s("item"));return x.createElement("li",g,x.createElement("div",h,x.createElement(J,{ref:i,checked:e.selected,icon:d,pt:a("checkbox"),unstyled:u()})),x.createElement("span",null,m),x.createElement(y.Ripple,null))}));function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function Y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Z.displayName="MultiSelectItem";var $=x.memo(x.forwardRef((function(e,t){var l=x.useRef(null),i=x.useRef(null),o=r.useMergeProps(),a=x.useContext(n.PrimeReactContext),c=e.ptm,u=e.cx,s=e.sx,b=e.isUnstyled,v=function(t,n){return c(t,Y({hostName:e.hostName},n))},h=function(){e.onEnter((function(){if(l.current){var t=e.getSelectedOptionIndex();-1!==t&&setTimeout((function(){return l.current.scrollToIndex(t)}),0)}}))},y=function(){e.onEntered((function(){e.filter&&e.filterInputAutoFocus&&i.current&&p.DomHandler.focus(i.current,!1)}))},g=function(t){l.current&&l.current.scrollToIndex(0),e.onFilterInputChange&&e.onFilterInputChange(t)},O=function(){if(e.panelFooterTemplate){var t=p.ObjectUtils.getJSXElement(e.panelFooterTemplate,e,e.onOverlayHide);return x.createElement("div",{className:"p-multiselect-footer"},t)}return null},I=function(t,n){var l;e.focusOnHover&&(null==e||null===(l=e.changeFocusedOptionIndex)||void 0===l||l.call(e,t,n))},S=function(t,n){return e.getOptionGroupChildren(t).map((function(t,l){var r=e.getOptionLabel(t),i=l+"_"+e.getOptionRenderKey(t),o=e.isOptionDisabled(t),a=o?null:e.tabIndex||0,s=e.isSelected(t);return x.createElement(Z,{hostName:e.hostName,index:l,key:i,focusedOptionIndex:e.focusedOptionIndex,label:r,option:t,style:n,template:e.itemTemplate,selected:s,onClick:e.onOptionSelect,onMouseMove:I,tabIndex:a,disabled:o,className:e.itemClassName,checkboxIcon:e.checkboxIcon,isUnstyled:b,ptm:c,cx:u})}))},k=function(){var t=p.ObjectUtils.getJSXElement(e.emptyFilterMessage,e)||n.localeOption("emptyFilterMessage"),l=o({className:u("emptyMessage")},v("emptyMessage"));return x.createElement("li",l,t)},j=function(t,n){var l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={height:l.props?l.props.itemSize:void 0};if(e.optionGroupLabel){var i=e.optionGroupTemplate?p.ObjectUtils.getJSXElement(e.optionGroupTemplate,t,n):e.getOptionGroupLabel(t),a=S(t,r),f=n+"_"+e.getOptionGroupRenderKey(t),d=o({className:u("itemGroup"),style:s("itemGroup",{scrollerOptions:l})},v("itemGroup"));return x.createElement(x.Fragment,{key:f},x.createElement("li",d,i),a)}var m=e.getOptionLabel(t),h=n+"_"+e.getOptionRenderKey(t),y=e.isOptionDisabled(t),g=y?null:e.tabIndex||0,O=e.isSelected(t);return x.createElement(Z,{hostName:e.hostName,key:h,focusedOptionIndex:e.focusedOptionIndex,label:m,option:t,style:r,index:n,template:e.itemTemplate,selected:O,onClick:e.onOptionSelect,onMouseMove:I,tabIndex:g,disabled:y,className:e.itemClassName,checkboxIcon:e.checkboxIcon,isUnstyled:b,ptm:c,cx:u})},w=function(){if(e.virtualScrollerOptions){var t=Y(Y({},e.virtualScrollerOptions),{style:Y(Y({},e.virtualScrollerOptions.style),{height:e.scrollHeight}),className:p.classNames("p-multiselect-items-wrapper",e.virtualScrollerOptions.className),items:e.visibleOptions,autoSize:!0,onLazyLoad:function(t){return e.virtualScrollerOptions.onLazyLoad(Y(Y({},t),{filter:e.filterValue}))},itemTemplate:function(e,t){return e&&j(e,t.index,t)},contentTemplate:function(t){var n=e.visibleOptions&&e.visibleOptions.length||!e.hasFilter?t.children:k(),l=o({ref:t.contentRef,style:t.style,className:p.classNames(t.className,u("list",{virtualScrollerProps:e.virtualScrollerOptions})),role:"listbox","aria-multiselectable":!0},v("list"));return x.createElement("ul",l,n)}});return x.createElement(m.VirtualScroller,E({ref:l},t,{pt:c("virtualScroller"),__parentMetadata:{parent:e.metaData}}))}var r,i,a=p.ObjectUtils.isNotEmpty(e.visibleOptions)?e.visibleOptions.map(j):e.hasFilter?k():(r=p.ObjectUtils.getJSXElement(e.emptyMessage,e)||n.localeOption("emptyMessage"),i=o({className:u("emptyMessage")},v("emptyMessage")),x.createElement("li",i,r)),s=o({className:u("wrapper"),style:{maxHeight:e.scrollHeight}},v("wrapper")),f=o({className:u("list"),role:"listbox","aria-multiselectable":!0},v("list"));return x.createElement("div",s,x.createElement("ul",f,a))},C=function(){var n=e.allowOptionSelect(),l=x.createElement(B,{hostName:e.hostName,id:e.id,filter:e.filter,filterRef:i,filterValue:e.filterValue,filterTemplate:e.filterTemplate,visibleOptions:e.visibleOptions,isValidOption:e.isValidOption,getOptionValue:e.getOptionValue,updateModel:e.updateModel,onFilter:g,filterPlaceholder:e.filterPlaceholder,onClose:e.onCloseClick,showSelectAll:e.showSelectAll,selectAll:e.isAllSelected(),selectAllLabel:e.selectAllLabel,onSelectAll:e.onSelectAll,template:e.panelHeaderTemplate,resetFilter:e.resetFilter,closeIcon:e.closeIcon,filterIcon:e.filterIcon,itemCheckboxIcon:e.itemCheckboxIcon,ptm:c,cx:u,isUnstyled:b,metaData:e.metaData}),r=w(),s=O(),d=o({className:p.classNames(e.panelClassName,u("panel",{panelProps:e,context:a,allowOptionSelect:n})),style:e.panelStyle,onClick:e.onClick},v("panel"));if(e.inline)return x.createElement("div",E({ref:t},d),r,s);var m=o({classNames:u("transition"),in:e.in,timeout:{enter:120,exit:100},options:e.transitionOptions,unmountOnExit:!0,onEnter:h,onEntered:y,onExit:e.onExit,onExited:e.onExited},v("transition")),I=o({ref:e.firstHiddenFocusableElementOnOverlay,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:e.onFirstHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},c("hiddenFirstFocusableEl")),S=o({ref:e.lastHiddenFocusableElementOnOverlay,role:"presentation","aria-hidden":"true",className:"p-hidden-accessible p-hidden-focusable",tabIndex:"0",onFocus:e.onLastHiddenFocus,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0},c("hiddenLastFocusableEl"));return x.createElement(f.CSSTransition,E({nodeRef:t},m),x.createElement("div",E({ref:t},d),x.createElement("span",I),l,r,s,x.createElement("span",S)))}();return e.inline?C:x.createElement(d.Portal,{element:C,appendTo:e.appendTo})})));function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,l)}return n}function ee(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){w(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function te(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=ne(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var l=0,r=function(){};return{s:r,n:function(){return l>=e.length?{done:!0}:{done:!1,value:e[l++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,o=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==n.return||n.return()}finally{if(a)throw i}}}}function ne(e,t){if(e){if("string"==typeof e)return le(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?le(e,t):void 0}}function le(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,l=new Array(t);n<t;n++)l[n]=e[n];return l}$.displayName="MultiSelectPanel";var re=x.memo(x.forwardRef((function(e,t){var f=r.useMergeProps(),d=x.useContext(n.PrimeReactContext),m=R.getProps(e,d),b=H(x.useState(null),2),v=b[0],h=b[1],y=H(x.useState(!1),2),g=y[0],O=y[1],S=H(x.useState(""),2),k=S[0],j=S[1],C=H(x.useState(-1),2),N=C[0],P=C[1],D=H(x.useState(!1),2),F=D[0],A=D[1],M=H(x.useState(m.inline),2),T=M[0],V=M[1],G=x.useRef(null),K=x.useRef(null),J=x.useRef(null),X=x.useRef(null),_=x.useRef(null),B=x.useRef(m.inputRef),q=x.useRef(null),z=x.useRef(null),Z=k&&k.trim().length>0,W=p.ObjectUtils.isEmpty(m.value),Y=m.optionValue?null:m.dataKey,Q={props:m,state:{filterState:k,focused:F,overlayVisible:T}},ne=R.setMetaData(Q),le=ne.ptm,re=ne.cx,ie=ne.sx,oe=ne.isUnstyled;l.useHandleStyle(R.css.styles,oe,{name:"multiselect"});var ae=H(r.useOverlayListener({target:G,overlay:z,listener:function(e,t){t.valid&&("outside"===t.type?!Pe(e)&&!De(e)&&Ce():Ce())},when:T}),2),ce=ae[0],ue=ae[1],se=function(){return!m.selectionLimit||!m.value||m.value&&m.value.length<m.selectionLimit},pe=function(e){var t=Je()&&e<ut.length-1?ut.slice(e+1).findIndex((function(e){return qe(e)})):-1;return t>-1?t+e+1:-1},fe=function(e){var t=Je()&&e>0?p.ObjectUtils.findLastIndex(ut.slice(0,e),(function(e){return qe(e)})):-1;return t>-1?t:-1},de=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=-1;return Je()&&(n=t?-1===(n=fe(e))?pe(e):n:-1===(n=pe(e))?fe(e):n),n>-1?n:e},me=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:-1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(-1===t&&(t=de(n,!0)),-1===n&&(n=de(t)),-1!==t&&-1!==n){var l=Math.min(t,n),r=Math.max(t,n),i=ut.slice(l,r+1).filter((function(e){return Be(e)})).map((function(e){return He(e)}));Se(e,i,i)}},be=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;if(!m.disabled&&!Ve(t)){var l=null;l=Le(t)?m.value.filter((function(e){return!p.ObjectUtils.equals(e,He(t),Y)})):[].concat(U(m.value||[]),[He(t)]),Se(e,l,t),-1!==n&&h(n)}},ve=function(e){if(T){var t=-1!==v?Qe(v):g?Ye():Ze();e.shiftKey&&me(e,N,t),nt(e,t)}else we(),m.editable&&nt(e,ze());e.preventDefault()},he=function(e){if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==v&&be(e,ut[v]),T&&Ce(),e.preventDefault();else{var t=-1!==v?et(v):g?$e():We();nt(e,t),!T&&we(),e.preventDefault()}},ye=function(e){T?-1!==v&&(e.shiftKey?me(e,v):be(e,ut[v])):(h(-1),ve(e)),e.preventDefault()},ge=function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){t.setSelectionRange(0,e.shiftKey?t.value.length:0),h(-1)}else{var n=e.metaKey||e.ctrlKey,l=Ye();e.shiftKey&&n&&me(e,l,N),nt(e,l),!T&&we()}e.preventDefault()},Oe=function(e){var t=e.currentTarget;if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var n=t.value.length;t.setSelectionRange(e.shiftKey?0:n,n),L("focusedOptionIndex")}else{var l=e.metaKey||e.ctrlKey,r=$e();e.shiftKey&&l&&me(e,N,r),nt(e,r),!T&&we()}e.preventDefault()},xe=function(e){e.preventDefault()},Ie=function(e){e.preventDefault()},Ee=function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(T&&Xe()?(p.DomHandler.focus(e.shiftKey?_.current:X.current),e.preventDefault()):(-1!==v&&be(e,ut[v]),T&&Ce(filter)))},Se=function(e,t,n){m.onChange&&m.onChange({originalEvent:e,value:t,selectedOption:n,stopPropagation:function(){null==e||e.stopPropagation()},preventDefault:function(){null==e||e.preventDefault()},target:{name:m.name,id:m.id,value:t}})},ke=function(){j(""),m.onFilter&&m.onFilter({filter:""})},je=function(e){var t;T&&((t=e?e.currentTarget:p.DomHandler.findSingle(z.current,'li[data-p-highlight="true"]'))&&t.scrollIntoView&&t.scrollIntoView({block:"nearest",inline:"nearest"}))},we=function(){V(!0),h(-1!==v?v:m.autoOptionFocus?Ze():ze()),p.DomHandler.focus(B.current)},Ce=function(){h(-1),V(!1),O(!1)},Ne=function(){p.DomHandler.alignOverlay(z.current,q.current.parentElement,m.appendTo||d&&d.appendTo||I.default.appendTo)},Pe=function(e){return"clearicon"===p.DomHandler.getAttribute(e.target,"data-pc-section")},De=function(e){return"headercheckboxcontainer"===p.DomHandler.getAttribute(e.target,"data-pc-section")},Fe=function(e){return z.current&&z.current.contains(e.target)},Ue=function(e,t){return t.findIndex((function(t){return e.some((function(e){return p.ObjectUtils.equals(e,He(t),Y)}))}))},Le=function(e){if(m.value){var t=He(e),n=Ge(e);return m.value.some((function(e){return p.ObjectUtils.equals(n?e:He(e),t,Y)}))}return!1},Ae=function(e){var t;if(m.options)if(m.optionGroupLabel){var n,l=te(m.options);try{for(l.s();!(n=l.n()).done;){if(t=Me(e,Re(n.value)))break}}catch(e){l.e(e)}finally{l.f()}}else t=Me(e,m.options),p.ObjectUtils.isEmpty(t)&&(t=Me(e,m.value));return t?Te(t):null},Me=function(e,t){return t.find((function(t){return p.ObjectUtils.equals(He(t),e,Y)}))},Te=function(e){return m.optionLabel?p.ObjectUtils.resolveFieldData(e,m.optionLabel):e&&void 0!==e.label?e.label:e},He=function(e){if(m.useOptionAsValue)return e;if(m.optionValue){var t=p.ObjectUtils.resolveFieldData(e,m.optionValue);return null!==t?t:e}return e&&void 0!==e.value?e.value:e},Re=function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupChildren)},Ve=function(e){var t;if(!se()&&!Le(e))return!0;var n=m.optionDisabled;return n?p.ObjectUtils.isFunction(n)?n(e):p.ObjectUtils.resolveFieldData(e,n):e&&null!==(t=e.disabled)&&void 0!==t&&t},Ge=function(e){return!m.useOptionAsValue&&m.optionValue||e&&void 0!==e.value},Ke=function(e){return m.optionGroupLabel&&e.optionGroup&&e.group},Je=function(){return p.ObjectUtils.isNotEmpty(m.value)},Xe=function(){return p.DomHandler.getFocusableElements(z.current,':not([data-p-hidden-focusable="true"])').length>0},_e=function(e){var t;return Be(e)&&(null===(t=Te(e))||void 0===t?void 0:t.toLocaleLowerCase(m.filterLocale).startsWith(K.current.toLocaleLowerCase(m.filterLocale)))},Be=function(e){return p.ObjectUtils.isNotEmpty(e)&&!(Ve(e)||Ke(e))},qe=function(e){return Be(e)&&Le(e)},ze=function(){if(Je())for(var e,t=function(){var e=m.value[n],t=ut.findIndex((function(t){return qe(t)&&(n=e,l=He(t),p.ObjectUtils.equals(n,l,Y));var n,l}));if(t>-1)return{v:t}},n=m.value.length-1;n>=0;n--)if(e=t())return e.v;return-1},Ze=function(){var e=ze();return e<0?Ye():e},We=function(){var e=ze();return e<0?$e():e},Ye=function(){return ut.findIndex((function(e){return Be(e)}))},$e=function(){return p.ObjectUtils.findLastIndex(ut,(function(e){return Be(e)}))},Qe=function(e){var t=e<ut.length-1?ut.slice(e+1).findIndex((function(e){return Be(e)})):-1;return t>-1?t+e+1:e},et=function(e){var t=e>0?p.ObjectUtils.findLastIndex(ut.slice(0,e),(function(e){return Be(e)})):-1;return t>-1?t:e},tt=function(e){K.current=(K.current||"")+e.key;var t=-1;p.ObjectUtils.isNotEmpty(K.current)&&(-1===(t=-1!==v?-1===(t=ut.slice(v).findIndex((function(e){return _e(e)})))?ut.slice(0,v).findIndex((function(e){return _e(e)})):t+v:ut.findIndex((function(e){return _e(e)})))&&-1===v&&(t=Ze()),-1!==t&&nt(e,t)),J.current&&clearTimeout(J.current),J.current=setTimeout((function(){K.current="",J.current=null}),500)},nt=function(e,t){v!==t&&(h(t),je(e),m.selectOnFocus&&be(e,ut[t],!1))},lt=function(e,t){var n=m.value.filter((function(e){return!p.ObjectUtils.equals(e,t,Y)}));m.onRemove&&m.onRemove({originalEvent:e,value:n}),Se(e,n,t)},rt=function(){var e=/{(.*?)}/,t=m.selectedItemsLabel||n.localeOption("selectionMessage");return e.test(t)?t.replace(t.match(e)[0],m.value.length+""):t},it=function(){if(!W&&!m.fixedPlaceholder)return p.ObjectUtils.isNotEmpty(m.maxSelectedLabels)&&m.value.length>m.maxSelectedLabels?rt():p.ObjectUtils.isArray(m.value)?m.value.reduce((function(e,t,n){return e+(0!==n?", ":"")+Ae(t)}),""):""};x.useImperativeHandle(t,(function(){return{props:m,show:we,hide:Ce,focus:function(){return p.DomHandler.focus(B.current)},getElement:function(){return G.current},getOverlay:function(){return z.current},getInput:function(){return B.current}}})),r.useMountEffect((function(){Ne()})),x.useEffect((function(){p.ObjectUtils.combinedRefs(B,m.inputRef)}),[B,m.inputRef]),x.useEffect((function(){setTimeout((function(){m.overlayVisible?we():Ce()}),100)}),[m.overlayVisible]),r.useUpdateEffect((function(){T&&k&&Z&&Ne()}),[T,k,Z]),r.useUnmountEffect((function(){p.ZIndexUtils.clear(z.current)}));var ot,at,ct,ut=function(){if(Z){var e=k.trim().toLocaleLowerCase(m.filterLocale),t=m.filterBy?m.filterBy.split(","):[m.optionLabel||"label"];if(m.optionGroupLabel){var l,r=[],i=te(m.options);try{for(i.s();!(l=i.n()).done;){var o=l.value,a=n.FilterService.filter(Re(o),t,e,m.filterMatchMode,m.filterLocale);a&&a.length&&r.push(ee(ee({},o),w({},m.optionGroupChildren,a)))}}catch(e){i.e(e)}finally{i.f()}return r}return n.FilterService.filter(m.options,t,e,m.filterMatchMode,m.filterLocale)}return m.options}(),st=p.ObjectUtils.isNotEmpty(m.tooltip),pt=R.getOtherProps(m),ft=p.ObjectUtils.reduceKeys(pt,p.DomHandler.ARIA_PROPS),dt=f({className:re("triggerIcon")},le("triggerIcon")),mt=f({className:re("trigger")},le("trigger")),bt=m.loadingIcon?p.IconUtils.getJSXIcon(m.loadingIcon,ee({},dt),{props:m}):x.createElement(o.SpinnerIcon,E({spin:!0},dt)),vt=m.dropdownIcon?p.IconUtils.getJSXIcon(m.dropdownIcon,ee({},dt),{props:m}):x.createElement(i.ChevronDownIcon,dt),ht=x.createElement("div",mt,m.loading?bt:vt),yt=!m.inline&&(ot=m.selectedItemTemplate?W?p.ObjectUtils.getJSXElement(m.selectedItemTemplate):p.ObjectUtils.isNotEmpty(m.maxSelectedLabels)&&m.value.length>m.maxSelectedLabels?rt():m.value.map((function(e,t){var n=p.ObjectUtils.getJSXElement(m.selectedItemTemplate,e);return x.createElement(x.Fragment,{key:t},n)})):"chip"!==m.display||W?it():m.value.slice(0,m.maxSelectedLabels||m.value.length).map((function(e,t){var n={context:{value:e,index:t}},l=Ae(e),r=f({key:t,className:re("removeTokenIcon"),onClick:function(t){return lt(t,e)}},le("removeTokenIcon",n)),i=!m.disabled&&(m.removeIcon?p.IconUtils.getJSXIcon(m.removeIcon,ee({},r),{props:m}):x.createElement(c.TimesCircleIcon,r)),o=f({className:re("token")},le("token",n)),a=f({key:l+t,className:re("tokenLabel")},le("tokenLabel",n));return x.createElement("div",E({},o,{key:l}),x.createElement("span",a,l),i)})),at=f({ref:q,className:re("labelContainer")},le("labelContainer")),ct=f({className:re("label",{empty:W})},le("label")),x.createElement("div",at,x.createElement("div",ct,ot||m.placeholder||"empty"))),gt=!m.inline&&function(){var e=f({className:re("clearIcon"),onClick:function(e){return Se(e,[],[])}},le("clearIcon")),t=p.IconUtils.getJSXIcon(m.clearIcon||x.createElement(a.TimesIcon,e),ee({},e),{props:m});return W||!m.showClear||m.disabled?null:t}(),Ot=f(ee(ee({ref:G,id:m.id,style:ee(ee({},m.style),ie("root")),className:p.classNames(m.className,re("root",{focusedState:F,context:d,overlayVisibleState:T}))},pt),{},{onClick:function(e){m.inline||m.disabled||m.loading||Fe(e)||"removetokenicon"===p.DomHandler.getAttribute(e.target,"data-pc-section")||Pe(e)||(T?Ce():we(),p.DomHandler.focus(B.current),e.preventDefault()),O(!0)}}),R.getOtherProps(m),le("root")),xt=f({className:"p-hidden-accessible","data-p-hidden-accessible":!0},le("hiddenInputWrapper")),It=f(ee({ref:B,id:m.inputId,name:m.name,type:"text",onFocus:function(e){A(!0),m.onFocus&&m.onFocus(e)},onBlur:function(e){A(!1),m.onBlur&&m.onBlur(e)},onKeyDown:function(e){var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowUp":if(m.inline)break;he(e);break;case"ArrowDown":if(m.inline)break;ve(e);break;case"Space":case"NumpadEnter":case"Enter":if(m.inline)break;ye(e);break;case"Home":if(m.inline)break;ge(e),e.preventDefault();break;case"End":if(m.inline)break;Oe(e),e.preventDefault();break;case"PageDown":Ie(e);break;case"PageUp":xe(e);break;case"Escape":if(m.inline)break;Ce();break;case"Tab":Ee(e);break;case"ShiftLeft":case"ShiftRight":P(v);break;default:if("KeyA"===e.code&&t){var n=ut.filter((function(e){return Be(e)})).map((function(e){return He(e)}));Se(e,n,n),e.preventDefault();break}!t&&p.ObjectUtils.isPrintableCharacter(e.key)&&(!T&&we(),tt(e),e.preventDefault())}O(!1)},role:"combobox","aria-expanded":T,disabled:m.disabled,tabIndex:m.disabled?-1:m.tabIndex},ft),le("input"));return x.createElement(x.Fragment,null,x.createElement("div",Ot,x.createElement("div",xt,x.createElement("input",E({},It,{readOnly:!0}))),!m.inline&&x.createElement(x.Fragment,null,yt,gt,ht),x.createElement($,E({hostName:"MultiSelect",ref:z,visibleOptions:ut},m,{onClick:function(e){u.OverlayService.emit("overlay-click",{originalEvent:e,target:G.current})},onOverlayHide:Ce,filterValue:k,focusedOptionIndex:v,onFirstHiddenFocus:function(e){var t=e.relatedTarget===B.current?p.DomHandler.getFirstFocusableElement(z.current,':not([data-p-hidden-focusable="true"])'):B.current;p.DomHandler.focus(t)},onLastHiddenFocus:function(e){var t=e.relatedTarget===B.current?p.DomHandler.getLastFocusableElement(z.current,':not([data-p-hidden-focusable="true"])'):B.current;p.DomHandler.focus(t)},firstHiddenFocusableElementOnOverlay:X,lastHiddenFocusableElementOnOverlay:_,setFocusedOptionIndex:h,hasFilter:Z,isValidOption:Be,getOptionValue:He,updateModel:Se,onFilterInputChange:function(e){var t=e.query;j(t),m.onFilter&&m.onFilter({originalEvent:e,filter:t})},resetFilter:ke,onCloseClick:function(e){Ce(),p.DomHandler.focus(B.current),e.preventDefault(),e.stopPropagation()},onSelectAll:function(e){if(m.onSelectAll)m.onSelectAll(e);else{var t=null;if(e.checked){if(t=[],ut){var n=ut.filter((function(e){return Ve(e)&&Le(e)}));t=n.map((function(e){return He(e)}))}}else if(ut){var l=ut.filter((function(e){return!Ve(e)||Le(e)}));m.optionGroupLabel?(t=[],l.forEach((function(e){return t=[].concat(U(t),U(Re(e).filter((function(e){return!Ve(e)})).map((function(e){return He(e)}))))}))):t=l.map((function(e){return He(e)}))}m.selectionLimit&&t&&t.length&&(t=t.slice(0,m.selectionLimit)),Se(e.originalEvent,t,t)}},getOptionLabel:Te,getOptionRenderKey:function(e){return m.dataKey?p.ObjectUtils.resolveFieldData(e,m.dataKey):Te(e)},isOptionDisabled:Ve,getOptionGroupChildren:Re,getOptionGroupLabel:function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupLabel)},getOptionGroupRenderKey:function(e){return p.ObjectUtils.resolveFieldData(e,m.optionGroupLabel)},isSelected:Le,getSelectedOptionIndex:function(){if(null!=m.value&&m.options){if(m.optionGroupLabel){var e=0,t=m.options.findIndex((function(t,n){return(e=n)&&-1!==Ue(m.value,Re(t))}));return-1!==t?{group:e,option:t}:-1}return Ue(m.value,m.options)}return-1},isAllSelected:function(){if(m.onSelectAll)return m.selectAll;if(p.ObjectUtils.isEmpty(ut))return!1;var e=ut.filter((function(e){return!Ve(e)}));if(m.optionGroupLabel){var t,n=!0,l=te(e);try{for(l.s();!(t=l.n()).done;){!0===Re(t.value).filter((function(e){return!Ve(e)})).some((function(e){return!Le(e)}))&&(n=!1)}}catch(e){l.e(e)}finally{l.f()}return n}return!e.some((function(e){return!Le(e)}))},onOptionSelect:be,allowOptionSelect:se,in:T,onEnter:function(e){p.ZIndexUtils.set("overlay",z.current,d&&d.autoZIndex||I.default.autoZIndex,d&&d.zIndex.overlay||I.default.zIndex.overlay),p.DomHandler.addStyles(z.current,{position:"absolute",top:"0",left:"0"}),Ne(),je(),e&&e()},onEntered:function(e){e&&e(),ce(),m.onShow&&m.onShow()},onExit:function(){ue()},onExited:function(){m.filter&&m.resetFilterOnHide&&ke(),p.ZIndexUtils.clear(z.current),m.onHide&&m.onHide()},ptm:le,cx:re,sx:ie,isUnstyled:oe,metaData:Q,changeFocusedOptionIndex:nt}))),st&&x.createElement(s.Tooltip,E({target:G,content:m.tooltip,pt:le("tooltip")},m.tooltipOptions)))})));return re.displayName="MultiSelect",e.MultiSelect=re,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.hooks,primereact.icons.chevrondown,primereact.icons.spinner,primereact.icons.times,primereact.icons.timescircle,primereact.overlayservice,primereact.tooltip,primereact.utils,primereact.csstransition,primereact.portal,primereact.virtualscroller,primereact.icons.check,primereact.icons.search,primereact.inputtext,primereact.ripple);
|
|
@@ -371,6 +371,9 @@ var OverlayPanel = /*#__PURE__*/React__namespace.forwardRef(function (inProps, r
|
|
|
371
371
|
show: show,
|
|
372
372
|
hide: hide,
|
|
373
373
|
align: align,
|
|
374
|
+
isVisible: function isVisible() {
|
|
375
|
+
return visibleState;
|
|
376
|
+
},
|
|
374
377
|
getElement: function getElement() {
|
|
375
378
|
return overlayRef.current;
|
|
376
379
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),o=require("primereact/hooks"),a=require("primereact/icons/times"),l=require("primereact/overlayservice"),i=require("primereact/portal"),c=require("primereact/ripple"),u=require("primereact/utils");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var f=p(e),y=s(n);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},v.apply(this,arguments)}function d(e){return d="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},d(e)}function m(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function b(e){var n=m(e,"string");return"symbol"===d(n)?n:String(n)}function O(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a,l,i=[],c=!0,u=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=a.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return h(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,n){return O(e)||g(e,n)||S(e,n)||w()}var P=t.ComponentBase.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return u.classNames("p-overlaypanel p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===y.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===y.default.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,o,a;r=e,a=t[n],(o=b(o=n))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=f.forwardRef((function(e,s){var p=o.useMergeProps(),d=f.useContext(n.PrimeReactContext),m=P.getProps(e,d),b=x(f.useState(!1),2),O=b[0],g=b[1],h=P.setMetaData({props:m,state:{visible:O}}),S=h.ptm,w=h.cx,j=h.isUnstyled;t.useHandleStyle(P.css.styles,j,{name:"overlaypanel"});var I=f.useRef(""),k=f.useRef(null),D=f.useRef(null),C=f.useRef(!1),A=f.useRef(null),H=f.useRef(null),N=x(o.useOverlayListener({target:D,overlay:k,listener:function(e,n){if(n.valid)switch(n.type){case"outside":m.dismissable&&!C.current&&Z();break;case"resize":case"scroll":case"orientationchange":V()}C.current=!1},when:O}),2),T=N[0],R=N[1],q=O&&m.closeOnEscape,_=o.useDisplayOrder("overlay-panel",q);o.useGlobalOnEscapeKey({callback:function(){Z()},when:q&&_,priority:[o.ESC_KEY_HANDLING_PRIORITIES.OVERLAY_PANEL,_]});var L=function(e){return k&&k.current&&!(k.current.isSameNode(e)||k.current.contains(e))},M=function(e,n){return null!=D.current&&D.current!==(n||e.currentTarget||e.target)},U=function(){C.current=!0},z=function(e,n){O?(Z(),M(e,n)&&(D.current=n||e.currentTarget||e.target,setTimeout((function(){Y(e,D.current)}),200))):Y(e,n)},Y=function(e,n){D.current=n||e.currentTarget||e.target,O?V():(g(!0),H.current=function(e){!L(e.target)&&(C.current=!0)},l.OverlayService.on("overlay-click",H.current))},Z=function(){g(!1),l.OverlayService.off("overlay-click",H.current),H.current=null},B=function(){k.current.setAttribute(I.current,""),u.ZIndexUtils.set("overlay",k.current,d&&d.autoZIndex||y.default.autoZIndex,d&&d.zIndex.overlay||y.default.zIndex.overlay),u.DomHandler.addStyles(k.current,{position:"absolute",top:"0",left:"0"}),V()},G=function(){T(),m.onShow&&m.onShow()},K=function(){R()},J=function(){u.ZIndexUtils.clear(k.current),m.onHide&&m.onHide()},V=function(){if(D.current&&k.current){u.DomHandler.absolutePosition(k.current,D.current);var e=u.DomHandler.getOffset(k.current),n=u.DomHandler.getOffset(D.current),t=0;e.left<n.left&&(t=n.left-e.left),k.current.style.setProperty("--overlayArrowLeft","".concat(t,"px")),e.top<n.top?(k.current.setAttribute("data-p-overlaypanel-flipped","true"),j&&u.DomHandler.addClass(k.current,"p-overlaypanel-flipped")):(k.current.setAttribute("data-p-overlaypanel-flipped","false"),j&&u.DomHandler.removeClass(k.current,"p-overlaypanel-flipped"))}},X=function(){if(!A.current){A.current=u.DomHandler.createInlineStyle(d&&d.nonce||y.default.nonce,d&&d.styleContainer);var e="";for(var n in m.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-overlaypanel[").concat(I.current,"] {\n width: ").concat(m.breakpoints[n],";\n }\n }\n ");A.current.innerHTML=e}};o.useMountEffect((function(){I.current=u.UniqueComponentId(),m.breakpoints&&X()})),o.useUnmountEffect((function(){A.current=u.DomHandler.removeInlineStyle(A.current),H.current&&(l.OverlayService.off("overlay-click",H.current),H.current=null),u.ZIndexUtils.clear(k.current)})),f.useImperativeHandle(s,(function(){return{props:m,toggle:z,show:Y,hide:Z,align:V,getElement:function(){return k.current}}}));var $,F,Q,W,ee=function(){var e=p({className:w("closeIcon"),"aria-hidden":!0},S("closeIcon")),t=u.IconUtils.getJSXIcon(m.closeIcon||f.createElement(a.TimesIcon,e),E({},e),{props:m}),r=m.ariaCloseLabel||n.localeOption("close"),o=p({type:"button",className:w("closeButton"),onClick:function(e){return n=e,Z(),void n.preventDefault();var n},"aria-label":r},S("closeButton"));return m.showCloseIcon?f.createElement("button",o,t,f.createElement(c.Ripple,null)):null},ne=($=ee(),F=p({id:m.id,className:u.classNames(m.className,w("root",{context:d})),style:m.style,onClick:function(e){return n=e,C.current=!0,void l.OverlayService.emit("overlay-click",{originalEvent:n,target:D.current});var n}},P.getOtherProps(m),S("root")),Q=p({className:w("content"),onClick:function(e){return U()},onMouseDown:U},P.getOtherProps(m),S("content")),W=p({classNames:w("transition"),in:O,timeout:{enter:120,exit:100},options:m.transitionOptions,unmountOnExit:!0,onEnter:B,onEntered:G,onExit:K,onExited:J},S("transition")),f.createElement(r.CSSTransition,v({nodeRef:k},W),f.createElement("div",v({ref:k},F),f.createElement("div",Q,m.children),$)));return f.createElement(i.Portal,{element:ne,appendTo:m.appendTo})}));I.displayName="OverlayPanel",exports.OverlayPanel=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),n=require("primereact/api"),t=require("primereact/componentbase"),r=require("primereact/csstransition"),o=require("primereact/hooks"),a=require("primereact/icons/times"),l=require("primereact/overlayservice"),i=require("primereact/portal"),c=require("primereact/ripple"),u=require("primereact/utils");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function p(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var f=p(e),y=s(n);function v(){return v=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},v.apply(this,arguments)}function d(e){return d="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},d(e)}function m(e,n){if("object"!==d(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==d(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function b(e){var n=m(e,"string");return"symbol"===d(n)?n:String(n)}function O(e){if(Array.isArray(e))return e}function g(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a,l,i=[],c=!0,u=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=a.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}function h(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function S(e,n){if(e){if("string"==typeof e)return h(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?h(e,n):void 0}}function w(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function x(e,n){return O(e)||g(e,n)||S(e,n)||w()}var P=t.ComponentBase.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return u.classNames("p-overlaypanel p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===y.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===y.default.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function j(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function E(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){var r,o,a;r=e,a=t[n],(o=b(o=n))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var I=f.forwardRef((function(e,s){var p=o.useMergeProps(),d=f.useContext(n.PrimeReactContext),m=P.getProps(e,d),b=x(f.useState(!1),2),O=b[0],g=b[1],h=P.setMetaData({props:m,state:{visible:O}}),S=h.ptm,w=h.cx,j=h.isUnstyled;t.useHandleStyle(P.css.styles,j,{name:"overlaypanel"});var I=f.useRef(""),k=f.useRef(null),D=f.useRef(null),C=f.useRef(!1),A=f.useRef(null),H=f.useRef(null),N=x(o.useOverlayListener({target:D,overlay:k,listener:function(e,n){if(n.valid)switch(n.type){case"outside":m.dismissable&&!C.current&&Z();break;case"resize":case"scroll":case"orientationchange":J()}C.current=!1},when:O}),2),T=N[0],R=N[1],q=O&&m.closeOnEscape,_=o.useDisplayOrder("overlay-panel",q);o.useGlobalOnEscapeKey({callback:function(){Z()},when:q&&_,priority:[o.ESC_KEY_HANDLING_PRIORITIES.OVERLAY_PANEL,_]});var L=function(e){return k&&k.current&&!(k.current.isSameNode(e)||k.current.contains(e))},M=function(e,n){return null!=D.current&&D.current!==(n||e.currentTarget||e.target)},U=function(){C.current=!0},z=function(e,n){O?(Z(),M(e,n)&&(D.current=n||e.currentTarget||e.target,setTimeout((function(){Y(e,D.current)}),200))):Y(e,n)},Y=function(e,n){D.current=n||e.currentTarget||e.target,O?J():(g(!0),H.current=function(e){!L(e.target)&&(C.current=!0)},l.OverlayService.on("overlay-click",H.current))},Z=function(){g(!1),l.OverlayService.off("overlay-click",H.current),H.current=null},B=function(){k.current.setAttribute(I.current,""),u.ZIndexUtils.set("overlay",k.current,d&&d.autoZIndex||y.default.autoZIndex,d&&d.zIndex.overlay||y.default.zIndex.overlay),u.DomHandler.addStyles(k.current,{position:"absolute",top:"0",left:"0"}),J()},G=function(){T(),m.onShow&&m.onShow()},K=function(){R()},V=function(){u.ZIndexUtils.clear(k.current),m.onHide&&m.onHide()},J=function(){if(D.current&&k.current){u.DomHandler.absolutePosition(k.current,D.current);var e=u.DomHandler.getOffset(k.current),n=u.DomHandler.getOffset(D.current),t=0;e.left<n.left&&(t=n.left-e.left),k.current.style.setProperty("--overlayArrowLeft","".concat(t,"px")),e.top<n.top?(k.current.setAttribute("data-p-overlaypanel-flipped","true"),j&&u.DomHandler.addClass(k.current,"p-overlaypanel-flipped")):(k.current.setAttribute("data-p-overlaypanel-flipped","false"),j&&u.DomHandler.removeClass(k.current,"p-overlaypanel-flipped"))}},X=function(){if(!A.current){A.current=u.DomHandler.createInlineStyle(d&&d.nonce||y.default.nonce,d&&d.styleContainer);var e="";for(var n in m.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-overlaypanel[").concat(I.current,"] {\n width: ").concat(m.breakpoints[n],";\n }\n }\n ");A.current.innerHTML=e}};o.useMountEffect((function(){I.current=u.UniqueComponentId(),m.breakpoints&&X()})),o.useUnmountEffect((function(){A.current=u.DomHandler.removeInlineStyle(A.current),H.current&&(l.OverlayService.off("overlay-click",H.current),H.current=null),u.ZIndexUtils.clear(k.current)})),f.useImperativeHandle(s,(function(){return{props:m,toggle:z,show:Y,hide:Z,align:J,isVisible:function(){return O},getElement:function(){return k.current}}}));var $,F,Q,W,ee=function(){var e=p({className:w("closeIcon"),"aria-hidden":!0},S("closeIcon")),t=u.IconUtils.getJSXIcon(m.closeIcon||f.createElement(a.TimesIcon,e),E({},e),{props:m}),r=m.ariaCloseLabel||n.localeOption("close"),o=p({type:"button",className:w("closeButton"),onClick:function(e){return n=e,Z(),void n.preventDefault();var n},"aria-label":r},S("closeButton"));return m.showCloseIcon?f.createElement("button",o,t,f.createElement(c.Ripple,null)):null},ne=($=ee(),F=p({id:m.id,className:u.classNames(m.className,w("root",{context:d})),style:m.style,onClick:function(e){return n=e,C.current=!0,void l.OverlayService.emit("overlay-click",{originalEvent:n,target:D.current});var n}},P.getOtherProps(m),S("root")),Q=p({className:w("content"),onClick:function(e){return U()},onMouseDown:U},P.getOtherProps(m),S("content")),W=p({classNames:w("transition"),in:O,timeout:{enter:120,exit:100},options:m.transitionOptions,unmountOnExit:!0,onEnter:B,onEntered:G,onExit:K,onExited:V},S("transition")),f.createElement(r.CSSTransition,v({nodeRef:k},W),f.createElement("div",v({ref:k},F),f.createElement("div",Q,m.children),$)));return f.createElement(i.Portal,{element:ne,appendTo:m.appendTo})}));I.displayName="OverlayPanel",exports.OverlayPanel=I;
|
|
@@ -182,6 +182,11 @@ export declare class OverlayPanel extends React.Component<OverlayPanelProps, any
|
|
|
182
182
|
* Align the overlay panel to its surroundings.
|
|
183
183
|
*/
|
|
184
184
|
public align(): void;
|
|
185
|
+
/**
|
|
186
|
+
* Checks whether the overlay is currently visible.
|
|
187
|
+
* @returns {boolean} A boolean value indicating whether the overlay is visible.
|
|
188
|
+
*/
|
|
189
|
+
public isVisible(): boolean;
|
|
185
190
|
/**
|
|
186
191
|
* Used to get container element.
|
|
187
192
|
* @return {HTMLDivElement} Container element
|
|
@@ -344,6 +344,9 @@ var OverlayPanel = /*#__PURE__*/React.forwardRef(function (inProps, ref) {
|
|
|
344
344
|
show: show,
|
|
345
345
|
hide: hide,
|
|
346
346
|
align: align,
|
|
347
|
+
isVisible: function isVisible() {
|
|
348
|
+
return visibleState;
|
|
349
|
+
},
|
|
347
350
|
getElement: function getElement() {
|
|
348
351
|
return overlayRef.current;
|
|
349
352
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as o,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as l}from"primereact/csstransition";import{useMergeProps as i,useOverlayListener as c,useDisplayOrder as p,useGlobalOnEscapeKey as u,ESC_KEY_HANDLING_PRIORITIES as s,useMountEffect as f,useUnmountEffect as y}from"primereact/hooks";import{TimesIcon as m}from"primereact/icons/times";import{OverlayService as v}from"primereact/overlayservice";import{Portal as
|
|
1
|
+
import*as e from"react";import n,{PrimeReactContext as t,localeOption as r}from"primereact/api";import{ComponentBase as o,useHandleStyle as a}from"primereact/componentbase";import{CSSTransition as l}from"primereact/csstransition";import{useMergeProps as i,useOverlayListener as c,useDisplayOrder as p,useGlobalOnEscapeKey as u,ESC_KEY_HANDLING_PRIORITIES as s,useMountEffect as f,useUnmountEffect as y}from"primereact/hooks";import{TimesIcon as m}from"primereact/icons/times";import{OverlayService as v}from"primereact/overlayservice";import{Portal as b}from"primereact/portal";import{Ripple as d}from"primereact/ripple";import{classNames as g,DomHandler as h,UniqueComponentId as O,ZIndexUtils as w,IconUtils as x}from"primereact/utils";function S(){return S=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},S.apply(this,arguments)}function j(e){return j="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},j(e)}function E(e,n){if("object"!==j(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==j(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function P(e){var n=E(e,"string");return"symbol"===j(n)?n:String(n)}function I(e){if(Array.isArray(e))return e}function k(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a,l,i=[],c=!0,p=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=a.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){p=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(p)throw o}}return i}}function A(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function C(e,n){if(e){if("string"==typeof e)return A(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?A(e,n):void 0}}function N(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function T(e,n){return I(e)||k(e,n)||C(e,n)||N()}var R=o.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var t=e.context;return g("p-overlaypanel p-component",{"p-input-filled":t&&"filled"===t.inputStyle||"filled"===n.inputStyle,"p-ripple-disabled":t&&!1===t.ripple||!1===n.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function D(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function L(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?D(Object(t),!0).forEach((function(n){var r,o,a;r=e,a=t[n],(o=P(o=n))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):D(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var z=e.forwardRef((function(o,j){var E=i(),P=e.useContext(t),I=R.getProps(o,P),k=T(e.useState(!1),2),A=k[0],C=k[1],N=R.setMetaData({props:I,state:{visible:A}}),D=N.ptm,z=N.cx,H=N.isUnstyled;a(R.css.styles,H,{name:"overlaypanel"});var M=e.useRef(""),Y=e.useRef(null),B=e.useRef(null),_=e.useRef(!1),U=e.useRef(null),V=e.useRef(null),Z=T(c({target:B,overlay:Y,listener:function(e,n){if(n.valid)switch(n.type){case"outside":I.dismissable&&!_.current&&ee();break;case"resize":case"scroll":case"orientationchange":ae()}_.current=!1},when:A}),2),G=Z[0],J=Z[1],X=A&&I.closeOnEscape,$=p("overlay-panel",X);u({callback:function(){ee()},when:X&&$,priority:[s.OVERLAY_PANEL,$]});var q=function(e){return Y&&Y.current&&!(Y.current.isSameNode(e)||Y.current.contains(e))},F=function(e,n){return null!=B.current&&B.current!==(n||e.currentTarget||e.target)},K=function(){_.current=!0},Q=function(e,n){A?(ee(),F(e,n)&&(B.current=n||e.currentTarget||e.target,setTimeout((function(){W(e,B.current)}),200))):W(e,n)},W=function(e,n){B.current=n||e.currentTarget||e.target,A?ae():(C(!0),V.current=function(e){!q(e.target)&&(_.current=!0)},v.on("overlay-click",V.current))},ee=function(){C(!1),v.off("overlay-click",V.current),V.current=null},ne=function(){Y.current.setAttribute(M.current,""),w.set("overlay",Y.current,P&&P.autoZIndex||n.autoZIndex,P&&P.zIndex.overlay||n.zIndex.overlay),h.addStyles(Y.current,{position:"absolute",top:"0",left:"0"}),ae()},te=function(){G(),I.onShow&&I.onShow()},re=function(){J()},oe=function(){w.clear(Y.current),I.onHide&&I.onHide()},ae=function(){if(B.current&&Y.current){h.absolutePosition(Y.current,B.current);var e=h.getOffset(Y.current),n=h.getOffset(B.current),t=0;e.left<n.left&&(t=n.left-e.left),Y.current.style.setProperty("--overlayArrowLeft","".concat(t,"px")),e.top<n.top?(Y.current.setAttribute("data-p-overlaypanel-flipped","true"),H&&h.addClass(Y.current,"p-overlaypanel-flipped")):(Y.current.setAttribute("data-p-overlaypanel-flipped","false"),H&&h.removeClass(Y.current,"p-overlaypanel-flipped"))}},le=function(){if(!U.current){U.current=h.createInlineStyle(P&&P.nonce||n.nonce,P&&P.styleContainer);var e="";for(var t in I.breakpoints)e+="\n @media screen and (max-width: ".concat(t,") {\n .p-overlaypanel[").concat(M.current,"] {\n width: ").concat(I.breakpoints[t],";\n }\n }\n ");U.current.innerHTML=e}};f((function(){M.current=O(),I.breakpoints&&le()})),y((function(){U.current=h.removeInlineStyle(U.current),V.current&&(v.off("overlay-click",V.current),V.current=null),w.clear(Y.current)})),e.useImperativeHandle(j,(function(){return{props:I,toggle:Q,show:W,hide:ee,align:ae,isVisible:function(){return A},getElement:function(){return Y.current}}}));var ie,ce,pe,ue,se=function(){var n=E({className:z("closeIcon"),"aria-hidden":!0},D("closeIcon")),t=x.getJSXIcon(I.closeIcon||e.createElement(m,n),L({},n),{props:I}),o=I.ariaCloseLabel||r("close"),a=E({type:"button",className:z("closeButton"),onClick:function(e){return n=e,ee(),void n.preventDefault();var n},"aria-label":o},D("closeButton"));return I.showCloseIcon?e.createElement("button",a,t,e.createElement(d,null)):null},fe=(ie=se(),ce=E({id:I.id,className:g(I.className,z("root",{context:P})),style:I.style,onClick:function(e){return n=e,_.current=!0,void v.emit("overlay-click",{originalEvent:n,target:B.current});var n}},R.getOtherProps(I),D("root")),pe=E({className:z("content"),onClick:function(e){return K()},onMouseDown:K},R.getOtherProps(I),D("content")),ue=E({classNames:z("transition"),in:A,timeout:{enter:120,exit:100},options:I.transitionOptions,unmountOnExit:!0,onEnter:ne,onEntered:te,onExit:re,onExited:oe},D("transition")),e.createElement(l,S({nodeRef:Y},ue),e.createElement("div",S({ref:Y},ce),e.createElement("div",pe,I.children),ie)));return e.createElement(b,{element:fe,appendTo:I.appendTo})}));z.displayName="OverlayPanel";export{z as OverlayPanel};
|
|
@@ -359,6 +359,9 @@ this.primereact.overlaypanel = (function (exports, React, PrimeReact, componentb
|
|
|
359
359
|
show: show,
|
|
360
360
|
hide: hide,
|
|
361
361
|
align: align,
|
|
362
|
+
isVisible: function isVisible() {
|
|
363
|
+
return visibleState;
|
|
364
|
+
},
|
|
362
365
|
getElement: function getElement() {
|
|
363
366
|
return overlayRef.current;
|
|
364
367
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
this.primereact=this.primereact||{},this.primereact.overlaypanel=function(e,n,t,r,o,a,l,i,c,u,s){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var y=f(n),v=p(t);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d.apply(this,arguments)}function m(e){return m="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},m(e)}function b(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function O(e){var n=b(e,"string");return"symbol"===m(n)?n:String(n)}function g(e){if(Array.isArray(e))return e}function h(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a,l,i=[],c=!0,u=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=a.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}function S(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function w(e,n){if(e){if("string"==typeof e)return S(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,n):void 0}}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,n){return g(e)||h(e,n)||w(e,n)||x()}var j=r.ComponentBase.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return s.classNames("p-overlaypanel p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===v.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===v.default.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,o,a;r=e,a=t[n],(o=O(o=n))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=y.forwardRef((function(e,n){var p=a.useMergeProps(),f=y.useContext(t.PrimeReactContext),m=j.getProps(e,f),b=P(y.useState(!1),2),O=b[0],g=b[1],h=j.setMetaData({props:m,state:{visible:O}}),S=h.ptm,w=h.cx,x=h.isUnstyled;r.useHandleStyle(j.css.styles,x,{name:"overlaypanel"});var E=y.useRef(""),k=y.useRef(null),D=y.useRef(null),C=y.useRef(!1),A=y.useRef(null),H=y.useRef(null),N=P(a.useOverlayListener({target:D,overlay:k,listener:function(e,n){if(n.valid)switch(n.type){case"outside":m.dismissable&&!C.current&&B();break;case"resize":case"scroll":case"orientationchange":V()}C.current=!1},when:O}),2),R=N[0],T=N[1],_=O&&m.closeOnEscape,L=a.useDisplayOrder("overlay-panel",_);a.useGlobalOnEscapeKey({callback:function(){B()},when:_&&L,priority:[a.ESC_KEY_HANDLING_PRIORITIES.OVERLAY_PANEL,L]});var M=function(e){return k&&k.current&&!(k.current.isSameNode(e)||k.current.contains(e))},U=function(e,n){return null!=D.current&&D.current!==(n||e.currentTarget||e.target)},z=function(){C.current=!0},Y=function(e,n){O?(B(),U(e,n)&&(D.current=n||e.currentTarget||e.target,setTimeout((function(){Z(e,D.current)}),200))):Z(e,n)},Z=function(e,n){D.current=n||e.currentTarget||e.target,O?V():(g(!0),H.current=function(e){!M(e.target)&&(C.current=!0)},i.OverlayService.on("overlay-click",H.current))},B=function(){g(!1),i.OverlayService.off("overlay-click",H.current),H.current=null},G=function(){k.current.setAttribute(E.current,""),s.ZIndexUtils.set("overlay",k.current,f&&f.autoZIndex||v.default.autoZIndex,f&&f.zIndex.overlay||v.default.zIndex.overlay),s.DomHandler.addStyles(k.current,{position:"absolute",top:"0",left:"0"}),V()},K=function(){R(),m.onShow&&m.onShow()},q=function(){T()},J=function(){s.ZIndexUtils.clear(k.current),m.onHide&&m.onHide()},V=function(){if(D.current&&k.current){s.DomHandler.absolutePosition(k.current,D.current);var e=s.DomHandler.getOffset(k.current),n=s.DomHandler.getOffset(D.current),t=0;e.left<n.left&&(t=n.left-e.left),k.current.style.setProperty("--overlayArrowLeft","".concat(t,"px")),e.top<n.top?(k.current.setAttribute("data-p-overlaypanel-flipped","true"),x&&s.DomHandler.addClass(k.current,"p-overlaypanel-flipped")):(k.current.setAttribute("data-p-overlaypanel-flipped","false"),x&&s.DomHandler.removeClass(k.current,"p-overlaypanel-flipped"))}},X=function(){if(!A.current){A.current=s.DomHandler.createInlineStyle(f&&f.nonce||v.default.nonce,f&&f.styleContainer);var e="";for(var n in m.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-overlaypanel[").concat(E.current,"] {\n width: ").concat(m.breakpoints[n],";\n }\n }\n ");A.current.innerHTML=e}};a.useMountEffect((function(){E.current=s.UniqueComponentId(),m.breakpoints&&X()})),a.useUnmountEffect((function(){A.current=s.DomHandler.removeInlineStyle(A.current),H.current&&(i.OverlayService.off("overlay-click",H.current),H.current=null),s.ZIndexUtils.clear(k.current)})),y.useImperativeHandle(n,(function(){return{props:m,toggle:Y,show:Z,hide:B,align:V,getElement:function(){return k.current}}}));var $,F,Q,W,ee=function(){var e=p({className:w("closeIcon"),"aria-hidden":!0},S("closeIcon")),n=s.IconUtils.getJSXIcon(m.closeIcon||y.createElement(l.TimesIcon,e),I({},e),{props:m}),r=m.ariaCloseLabel||t.localeOption("close"),o=p({type:"button",className:w("closeButton"),onClick:function(e){return n=e,B(),void n.preventDefault();var n},"aria-label":r},S("closeButton"));return m.showCloseIcon?y.createElement("button",o,n,y.createElement(u.Ripple,null)):null},ne=($=ee(),F=p({id:m.id,className:s.classNames(m.className,w("root",{context:f})),style:m.style,onClick:function(e){return n=e,C.current=!0,void i.OverlayService.emit("overlay-click",{originalEvent:n,target:D.current});var n}},j.getOtherProps(m),S("root")),Q=p({className:w("content"),onClick:function(e){return z()},onMouseDown:z},j.getOtherProps(m),S("content")),W=p({classNames:w("transition"),in:O,timeout:{enter:120,exit:100},options:m.transitionOptions,unmountOnExit:!0,onEnter:G,onEntered:K,onExit:q,onExited:J},S("transition")),y.createElement(o.CSSTransition,d({nodeRef:k},W),y.createElement("div",d({ref:k},F),y.createElement("div",Q,m.children),$)));return y.createElement(c.Portal,{element:ne,appendTo:m.appendTo})}));return k.displayName="OverlayPanel",e.OverlayPanel=k,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.overlayservice,primereact.portal,primereact.ripple,primereact.utils);
|
|
1
|
+
this.primereact=this.primereact||{},this.primereact.overlaypanel=function(e,n,t,r,o,a,l,i,c,u,s){"use strict";function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function f(e){if(e&&e.__esModule)return e;var n=Object.create(null);return e&&Object.keys(e).forEach((function(t){if("default"!==t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}})),n.default=e,Object.freeze(n)}var y=f(n),v=p(t);function d(){return d=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},d.apply(this,arguments)}function m(e){return m="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},m(e)}function b(e,n){if("object"!==m(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!==m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}function O(e){var n=b(e,"string");return"symbol"===m(n)?n:String(n)}function g(e){if(Array.isArray(e))return e}function h(e,n){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var r,o,a,l,i=[],c=!0,u=!1;try{if(a=(t=t.call(e)).next,0===n){if(Object(t)!==t)return;c=!1}else for(;!(c=(r=a.call(t)).done)&&(i.push(r.value),i.length!==n);c=!0);}catch(e){u=!0,o=e}finally{try{if(!c&&null!=t.return&&(l=t.return(),Object(l)!==l))return}finally{if(u)throw o}}return i}}function S(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function w(e,n){if(e){if("string"==typeof e)return S(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?S(e,n):void 0}}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function P(e,n){return g(e)||h(e,n)||w(e,n)||x()}var j=r.ComponentBase.extend({defaultProps:{__TYPE:"OverlayPanel",id:null,dismissable:!0,showCloseIcon:!1,closeIcon:null,style:null,className:null,appendTo:null,breakpoints:null,ariaCloseLabel:null,transitionOptions:null,onShow:null,onHide:null,children:void 0,closeOnEscape:!0},css:{classes:{root:function(e){var n=e.context;return s.classNames("p-overlaypanel p-component",{"p-input-filled":n&&"filled"===n.inputStyle||"filled"===v.default.inputStyle,"p-ripple-disabled":n&&!1===n.ripple||!1===v.default.ripple})},closeIcon:"p-overlaypanel-close-icon",closeButton:"p-overlaypanel-close p-link",content:"p-overlaypanel-content",transition:"p-overlaypanel"},styles:'\n@layer primereact {\n .p-overlaypanel {\n position: absolute;\n margin-top: 10px;\n /* Github #3122: Prevent animation flickering */\n top: -9999px;\n left: -9999px;\n }\n \n .p-overlaypanel-flipped {\n margin-top: 0;\n margin-bottom: 10px;\n }\n \n .p-overlaypanel-close {\n display: flex;\n justify-content: center;\n align-items: center;\n overflow: hidden;\n position: relative;\n }\n \n /* Animation */\n .p-overlaypanel-enter {\n opacity: 0;\n transform: scaleY(0.8);\n }\n \n .p-overlaypanel-enter-active {\n opacity: 1;\n transform: scaleY(1);\n transition: transform .12s cubic-bezier(0, 0, 0.2, 1), opacity .12s cubic-bezier(0, 0, 0.2, 1);\n }\n \n .p-overlaypanel-enter-done {\n transform: none;\n }\n \n .p-overlaypanel-exit {\n opacity: 1;\n }\n \n .p-overlaypanel-exit-active {\n opacity: 0;\n transition: opacity .1s linear;\n }\n \n .p-overlaypanel:after, .p-overlaypanel:before {\n bottom: 100%;\n left: calc(var(--overlayArrowLeft, 0) + 1.25rem);\n content: " ";\n height: 0;\n width: 0;\n position: absolute;\n pointer-events: none;\n }\n \n .p-overlaypanel:after {\n border-width: 8px;\n margin-left: -8px;\n }\n \n .p-overlaypanel:before {\n border-width: 10px;\n margin-left: -10px;\n }\n \n .p-overlaypanel-flipped:after, .p-overlaypanel-flipped:before {\n bottom: auto;\n top: 100%;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:after {\n border-bottom-color: transparent;\n }\n \n .p-overlaypanel.p-overlaypanel-flipped:before {\n border-bottom-color: transparent\n }\n}\n'}});function E(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function I(e){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?E(Object(t),!0).forEach((function(n){var r,o,a;r=e,a=t[n],(o=O(o=n))in r?Object.defineProperty(r,o,{value:a,enumerable:!0,configurable:!0,writable:!0}):r[o]=a})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):E(Object(t)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}))}return e}var k=y.forwardRef((function(e,n){var p=a.useMergeProps(),f=y.useContext(t.PrimeReactContext),m=j.getProps(e,f),b=P(y.useState(!1),2),O=b[0],g=b[1],h=j.setMetaData({props:m,state:{visible:O}}),S=h.ptm,w=h.cx,x=h.isUnstyled;r.useHandleStyle(j.css.styles,x,{name:"overlaypanel"});var E=y.useRef(""),k=y.useRef(null),D=y.useRef(null),C=y.useRef(!1),A=y.useRef(null),H=y.useRef(null),N=P(a.useOverlayListener({target:D,overlay:k,listener:function(e,n){if(n.valid)switch(n.type){case"outside":m.dismissable&&!C.current&&B();break;case"resize":case"scroll":case"orientationchange":J()}C.current=!1},when:O}),2),R=N[0],T=N[1],_=O&&m.closeOnEscape,L=a.useDisplayOrder("overlay-panel",_);a.useGlobalOnEscapeKey({callback:function(){B()},when:_&&L,priority:[a.ESC_KEY_HANDLING_PRIORITIES.OVERLAY_PANEL,L]});var M=function(e){return k&&k.current&&!(k.current.isSameNode(e)||k.current.contains(e))},U=function(e,n){return null!=D.current&&D.current!==(n||e.currentTarget||e.target)},z=function(){C.current=!0},Y=function(e,n){O?(B(),U(e,n)&&(D.current=n||e.currentTarget||e.target,setTimeout((function(){Z(e,D.current)}),200))):Z(e,n)},Z=function(e,n){D.current=n||e.currentTarget||e.target,O?J():(g(!0),H.current=function(e){!M(e.target)&&(C.current=!0)},i.OverlayService.on("overlay-click",H.current))},B=function(){g(!1),i.OverlayService.off("overlay-click",H.current),H.current=null},G=function(){k.current.setAttribute(E.current,""),s.ZIndexUtils.set("overlay",k.current,f&&f.autoZIndex||v.default.autoZIndex,f&&f.zIndex.overlay||v.default.zIndex.overlay),s.DomHandler.addStyles(k.current,{position:"absolute",top:"0",left:"0"}),J()},K=function(){R(),m.onShow&&m.onShow()},V=function(){T()},q=function(){s.ZIndexUtils.clear(k.current),m.onHide&&m.onHide()},J=function(){if(D.current&&k.current){s.DomHandler.absolutePosition(k.current,D.current);var e=s.DomHandler.getOffset(k.current),n=s.DomHandler.getOffset(D.current),t=0;e.left<n.left&&(t=n.left-e.left),k.current.style.setProperty("--overlayArrowLeft","".concat(t,"px")),e.top<n.top?(k.current.setAttribute("data-p-overlaypanel-flipped","true"),x&&s.DomHandler.addClass(k.current,"p-overlaypanel-flipped")):(k.current.setAttribute("data-p-overlaypanel-flipped","false"),x&&s.DomHandler.removeClass(k.current,"p-overlaypanel-flipped"))}},X=function(){if(!A.current){A.current=s.DomHandler.createInlineStyle(f&&f.nonce||v.default.nonce,f&&f.styleContainer);var e="";for(var n in m.breakpoints)e+="\n @media screen and (max-width: ".concat(n,") {\n .p-overlaypanel[").concat(E.current,"] {\n width: ").concat(m.breakpoints[n],";\n }\n }\n ");A.current.innerHTML=e}};a.useMountEffect((function(){E.current=s.UniqueComponentId(),m.breakpoints&&X()})),a.useUnmountEffect((function(){A.current=s.DomHandler.removeInlineStyle(A.current),H.current&&(i.OverlayService.off("overlay-click",H.current),H.current=null),s.ZIndexUtils.clear(k.current)})),y.useImperativeHandle(n,(function(){return{props:m,toggle:Y,show:Z,hide:B,align:J,isVisible:function(){return O},getElement:function(){return k.current}}}));var $,F,Q,W,ee=function(){var e=p({className:w("closeIcon"),"aria-hidden":!0},S("closeIcon")),n=s.IconUtils.getJSXIcon(m.closeIcon||y.createElement(l.TimesIcon,e),I({},e),{props:m}),r=m.ariaCloseLabel||t.localeOption("close"),o=p({type:"button",className:w("closeButton"),onClick:function(e){return n=e,B(),void n.preventDefault();var n},"aria-label":r},S("closeButton"));return m.showCloseIcon?y.createElement("button",o,n,y.createElement(u.Ripple,null)):null},ne=($=ee(),F=p({id:m.id,className:s.classNames(m.className,w("root",{context:f})),style:m.style,onClick:function(e){return n=e,C.current=!0,void i.OverlayService.emit("overlay-click",{originalEvent:n,target:D.current});var n}},j.getOtherProps(m),S("root")),Q=p({className:w("content"),onClick:function(e){return z()},onMouseDown:z},j.getOtherProps(m),S("content")),W=p({classNames:w("transition"),in:O,timeout:{enter:120,exit:100},options:m.transitionOptions,unmountOnExit:!0,onEnter:G,onEntered:K,onExit:V,onExited:q},S("transition")),y.createElement(o.CSSTransition,d({nodeRef:k},W),y.createElement("div",d({ref:k},F),y.createElement("div",Q,m.children),$)));return y.createElement(c.Portal,{element:ne,appendTo:m.appendTo})}));return k.displayName="OverlayPanel",e.OverlayPanel=k,Object.defineProperty(e,"__esModule",{value:!0}),e}({},React,primereact.api,primereact.componentbase,primereact.csstransition,primereact.hooks,primereact.icons.times,primereact.overlayservice,primereact.portal,primereact.ripple,primereact.utils);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "primereact",
|
|
3
|
-
"version": "10.6.
|
|
3
|
+
"version": "10.6.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "PrimeTek Informatics",
|
|
6
6
|
"description": "PrimeReact is an open source UI library for React featuring a rich set of 90+ components, a theme designer, various theme alternatives such as Material, Bootstrap, Tailwind, premium templates and professional support. In addition, it integrates with PrimeBlock, which has 370+ ready to use UI blocks to build spectacular applications in no time.",
|
|
@@ -614,6 +614,9 @@ var locales = {
|
|
|
614
614
|
* @returns the ARIA label with replaced values
|
|
615
615
|
*/
|
|
616
616
|
function ariaLabel(ariaKey, options) {
|
|
617
|
+
if (ariaKey.includes('__proto__') || ariaKey.includes('prototype')) {
|
|
618
|
+
throw new Error('Unsafe ariaKey detected');
|
|
619
|
+
}
|
|
617
620
|
var _locale = PrimeReact.locale;
|
|
618
621
|
try {
|
|
619
622
|
var _ariaLabel = localeOptions(_locale).aria[ariaKey];
|
|
@@ -631,6 +634,9 @@ function ariaLabel(ariaKey, options) {
|
|
|
631
634
|
}
|
|
632
635
|
function localeOptions(locale) {
|
|
633
636
|
var _locale = locale || PrimeReact.locale;
|
|
637
|
+
if (_locale.includes('__proto__') || _locale.includes('prototype')) {
|
|
638
|
+
throw new Error('Unsafe locale detected');
|
|
639
|
+
}
|
|
634
640
|
return locales[_locale];
|
|
635
641
|
}
|
|
636
642
|
|