primevue 3.48.0 → 3.48.1
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/config/PrimeVue.d.ts +1 -1
- package/core/core.js +25 -17
- package/core/core.min.js +2 -2
- package/dropdown/Dropdown.vue +1 -0
- package/dropdown/dropdown.cjs.js +10 -7
- package/dropdown/dropdown.cjs.min.js +1 -1
- package/dropdown/dropdown.esm.js +10 -7
- package/dropdown/dropdown.esm.min.js +1 -1
- package/dropdown/dropdown.js +10 -7
- package/dropdown/dropdown.min.js +1 -1
- package/floatlabel/FloatLabel.d.ts +0 -4
- package/inputswitch/InputSwitch.d.ts +0 -5
- package/multiselect/MultiSelect.vue +1 -0
- package/multiselect/multiselect.cjs.js +11 -8
- package/multiselect/multiselect.cjs.min.js +1 -1
- package/multiselect/multiselect.esm.js +11 -8
- package/multiselect/multiselect.esm.min.js +1 -1
- package/multiselect/multiselect.js +11 -8
- package/multiselect/multiselect.min.js +1 -1
- package/package.json +1 -1
- package/resources/themes/arya-blue/theme.css +11 -16
- package/resources/themes/arya-green/theme.css +11 -16
- package/resources/themes/arya-orange/theme.css +11 -16
- package/resources/themes/arya-purple/theme.css +11 -16
- package/resources/themes/aura-dark-amber/theme.css +16 -21
- package/resources/themes/aura-dark-blue/theme.css +16 -21
- package/resources/themes/aura-dark-cyan/theme.css +16 -21
- package/resources/themes/aura-dark-green/theme.css +16 -21
- package/resources/themes/aura-dark-indigo/theme.css +16 -21
- package/resources/themes/aura-dark-lime/theme.css +16 -21
- package/resources/themes/aura-dark-noir/theme.css +16 -21
- package/resources/themes/aura-dark-pink/theme.css +16 -21
- package/resources/themes/aura-dark-purple/theme.css +16 -21
- package/resources/themes/aura-dark-teal/theme.css +16 -21
- package/resources/themes/aura-light-amber/theme.css +16 -24
- package/resources/themes/aura-light-blue/theme.css +16 -24
- package/resources/themes/aura-light-cyan/theme.css +16 -24
- package/resources/themes/aura-light-green/theme.css +16 -24
- package/resources/themes/aura-light-indigo/theme.css +16 -24
- package/resources/themes/aura-light-lime/theme.css +16 -24
- package/resources/themes/aura-light-noir/theme.css +16 -24
- package/resources/themes/aura-light-pink/theme.css +16 -24
- package/resources/themes/aura-light-purple/theme.css +16 -24
- package/resources/themes/aura-light-teal/theme.css +16 -24
- package/resources/themes/bootstrap4-dark-blue/theme.css +11 -16
- package/resources/themes/bootstrap4-dark-purple/theme.css +11 -16
- package/resources/themes/bootstrap4-light-blue/theme.css +11 -16
- package/resources/themes/bootstrap4-light-purple/theme.css +11 -16
- package/resources/themes/fluent-light/theme.css +11 -16
- package/resources/themes/lara-dark-amber/theme.css +11 -16
- package/resources/themes/lara-dark-blue/theme.css +11 -16
- package/resources/themes/lara-dark-cyan/theme.css +11 -16
- package/resources/themes/lara-dark-green/theme.css +11 -16
- package/resources/themes/lara-dark-indigo/theme.css +11 -16
- package/resources/themes/lara-dark-pink/theme.css +11 -16
- package/resources/themes/lara-dark-purple/theme.css +11 -16
- package/resources/themes/lara-dark-teal/theme.css +11 -16
- package/resources/themes/lara-light-amber/theme.css +11 -16
- package/resources/themes/lara-light-blue/theme.css +11 -16
- package/resources/themes/lara-light-cyan/theme.css +11 -16
- package/resources/themes/lara-light-green/theme.css +11 -16
- package/resources/themes/lara-light-indigo/theme.css +11 -16
- package/resources/themes/lara-light-pink/theme.css +11 -16
- package/resources/themes/lara-light-purple/theme.css +11 -16
- package/resources/themes/lara-light-teal/theme.css +11 -16
- package/resources/themes/luna-amber/theme.css +11 -16
- package/resources/themes/luna-blue/theme.css +11 -16
- package/resources/themes/luna-green/theme.css +11 -16
- package/resources/themes/luna-pink/theme.css +11 -16
- package/resources/themes/md-dark-deeppurple/theme.css +11 -16
- package/resources/themes/md-dark-indigo/theme.css +11 -16
- package/resources/themes/md-light-deeppurple/theme.css +11 -16
- package/resources/themes/md-light-indigo/theme.css +11 -16
- package/resources/themes/mdc-dark-deeppurple/theme.css +11 -16
- package/resources/themes/mdc-dark-indigo/theme.css +11 -16
- package/resources/themes/mdc-light-deeppurple/theme.css +11 -16
- package/resources/themes/mdc-light-indigo/theme.css +11 -16
- package/resources/themes/mira/theme.css +11 -16
- package/resources/themes/nano/theme.css +11 -16
- package/resources/themes/nova/theme.css +11 -16
- package/resources/themes/nova-accent/theme.css +11 -16
- package/resources/themes/nova-alt/theme.css +11 -16
- package/resources/themes/nova-vue/theme.css +11 -16
- package/resources/themes/rhea/theme.css +11 -16
- package/resources/themes/saga-blue/theme.css +11 -16
- package/resources/themes/saga-green/theme.css +11 -16
- package/resources/themes/saga-orange/theme.css +11 -16
- package/resources/themes/saga-purple/theme.css +11 -16
- package/resources/themes/soho-dark/theme.css +11 -16
- package/resources/themes/soho-light/theme.css +11 -16
- package/resources/themes/tailwind-light/theme.css +11 -16
- package/resources/themes/vela-blue/theme.css +11 -16
- package/resources/themes/vela-green/theme.css +11 -16
- package/resources/themes/vela-orange/theme.css +11 -16
- package/resources/themes/vela-purple/theme.css +11 -16
- package/resources/themes/viva-dark/theme.css +11 -16
- package/resources/themes/viva-light/theme.css +11 -16
- package/splitter/Splitter.vue +7 -5
- package/splitter/splitter.cjs.js +7 -5
- package/splitter/splitter.cjs.min.js +1 -1
- package/splitter/splitter.esm.js +7 -5
- package/splitter/splitter.esm.min.js +1 -1
- package/splitter/splitter.js +7 -5
- package/splitter/splitter.min.js +1 -1
- package/virtualscroller/VirtualScroller.vue +8 -4
- package/virtualscroller/virtualscroller.cjs.js +15 -10
- package/virtualscroller/virtualscroller.cjs.min.js +1 -1
- package/virtualscroller/virtualscroller.esm.js +15 -10
- package/virtualscroller/virtualscroller.esm.min.js +1 -1
- package/virtualscroller/virtualscroller.js +15 -10
- package/virtualscroller/virtualscroller.min.js +1 -1
- package/web-types.json +1 -1
- package/step/BaseStep.vue +0 -18
- package/step/Step.vue +0 -12
- package/step/step.cjs.js +0 -37
- package/step/step.cjs.min.js +0 -1
- package/step/step.esm.js +0 -30
- package/step/step.esm.min.js +0 -1
- package/step/step.js +0 -37
- package/step/step.min.js +0 -1
- package/step/style/stepstyle.cjs.js +0 -5
- package/step/style/stepstyle.cjs.min.js +0 -1
- package/step/style/stepstyle.esm.js +0 -3
- package/step/style/stepstyle.esm.min.js +0 -1
- package/step/style/stepstyle.js +0 -10
- package/step/style/stepstyle.min.js +0 -1
- package/stepper/BaseStepper.vue +0 -25
- package/stepper/Stepper.vue +0 -234
- package/stepper/stepper.cjs.js +0 -271
- package/stepper/stepper.cjs.min.js +0 -1
- package/stepper/stepper.esm.js +0 -264
- package/stepper/stepper.esm.min.js +0 -1
- package/stepper/stepper.js +0 -270
- package/stepper/stepper.min.js +0 -1
- package/stepper/style/stepperstyle.cjs.js +0 -50
- package/stepper/style/stepperstyle.cjs.min.js +0 -1
- package/stepper/style/stepperstyle.esm.js +0 -44
- package/stepper/style/stepperstyle.esm.min.js +0 -1
- package/stepper/style/stepperstyle.js +0 -53
- package/stepper/style/stepperstyle.min.js +0 -1
package/config/PrimeVue.d.ts
CHANGED
|
@@ -222,7 +222,7 @@ export interface PrimeVuePTOptions {
|
|
|
222
222
|
animate?: AnimateOnScrollDirectivePassThroughOptions;
|
|
223
223
|
};
|
|
224
224
|
global?: {
|
|
225
|
-
css?: (options: any) => string | string | undefined;
|
|
225
|
+
css?: ((options: any) => string | undefined) | string | undefined;
|
|
226
226
|
};
|
|
227
227
|
}
|
|
228
228
|
|
package/core/core.js
CHANGED
|
@@ -9686,10 +9686,7 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
9686
9686
|
return this.orientation === 'both';
|
|
9687
9687
|
},
|
|
9688
9688
|
scrollTo: function scrollTo(options) {
|
|
9689
|
-
this.lastScrollPos = this.both ? {
|
|
9690
|
-
top: 0,
|
|
9691
|
-
left: 0
|
|
9692
|
-
} : 0;
|
|
9689
|
+
//this.lastScrollPos = this.both ? { top: 0, left: 0 } : 0;
|
|
9693
9690
|
this.element && this.element.scrollTo(options);
|
|
9694
9691
|
},
|
|
9695
9692
|
scrollToIndex: function scrollToIndex(index) {
|
|
@@ -9702,6 +9699,11 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
9702
9699
|
}) : index > -1;
|
|
9703
9700
|
if (valid) {
|
|
9704
9701
|
var first = this.first;
|
|
9702
|
+
var _this$element = this.element,
|
|
9703
|
+
_this$element$scrollT = _this$element.scrollTop,
|
|
9704
|
+
scrollTop = _this$element$scrollT === void 0 ? 0 : _this$element$scrollT,
|
|
9705
|
+
_this$element$scrollL = _this$element.scrollLeft,
|
|
9706
|
+
scrollLeft = _this$element$scrollL === void 0 ? 0 : _this$element$scrollL;
|
|
9705
9707
|
var _this$calculateNumIte = this.calculateNumItems(),
|
|
9706
9708
|
numToleratedItems = _this$calculateNumIte.numToleratedItems;
|
|
9707
9709
|
var contentPos = this.getContentPosition();
|
|
@@ -9727,21 +9729,24 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
9727
9729
|
rows: 0,
|
|
9728
9730
|
cols: 0
|
|
9729
9731
|
} : 0;
|
|
9730
|
-
var isRangeChanged = false
|
|
9732
|
+
var isRangeChanged = false,
|
|
9733
|
+
isScrollChanged = false;
|
|
9731
9734
|
if (both) {
|
|
9732
9735
|
newFirst = {
|
|
9733
9736
|
rows: calculateFirst(index[0], numToleratedItems[0]),
|
|
9734
9737
|
cols: calculateFirst(index[1], numToleratedItems[1])
|
|
9735
9738
|
};
|
|
9736
9739
|
scrollTo(calculateCoord(newFirst.cols, itemSize[1], contentPos.left), calculateCoord(newFirst.rows, itemSize[0], contentPos.top));
|
|
9740
|
+
isScrollChanged = this.lastScrollPos.top !== scrollTop || this.lastScrollPos.left !== scrollLeft;
|
|
9737
9741
|
isRangeChanged = newFirst.rows !== first.rows || newFirst.cols !== first.cols;
|
|
9738
9742
|
} else {
|
|
9739
9743
|
newFirst = calculateFirst(index, numToleratedItems);
|
|
9740
|
-
horizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPos.left),
|
|
9744
|
+
horizontal ? scrollTo(calculateCoord(newFirst, itemSize, contentPos.left), scrollTop) : scrollTo(scrollLeft, calculateCoord(newFirst, itemSize, contentPos.top));
|
|
9745
|
+
isScrollChanged = this.lastScrollPos !== (horizontal ? scrollLeft : scrollTop);
|
|
9741
9746
|
isRangeChanged = newFirst !== first;
|
|
9742
9747
|
}
|
|
9743
9748
|
this.isRangeChanged = isRangeChanged;
|
|
9744
|
-
this.first = newFirst;
|
|
9749
|
+
isScrollChanged && (this.first = newFirst);
|
|
9745
9750
|
}
|
|
9746
9751
|
},
|
|
9747
9752
|
scrollInView: function scrollInView(index, to) {
|
|
@@ -9809,9 +9814,9 @@ this.primevue.virtualscroller = (function (SpinnerIcon, utils, BaseComponent, Vi
|
|
|
9809
9814
|
if (this.element) {
|
|
9810
9815
|
var both = this.isBoth();
|
|
9811
9816
|
var horizontal = this.isHorizontal();
|
|
9812
|
-
var _this$
|
|
9813
|
-
scrollTop = _this$
|
|
9814
|
-
scrollLeft = _this$
|
|
9817
|
+
var _this$element2 = this.element,
|
|
9818
|
+
scrollTop = _this$element2.scrollTop,
|
|
9819
|
+
scrollLeft = _this$element2.scrollLeft;
|
|
9815
9820
|
if (both) {
|
|
9816
9821
|
firstInViewport = {
|
|
9817
9822
|
rows: calculateFirstInViewport(scrollTop, this.itemSize[0]),
|
|
@@ -13471,7 +13476,7 @@ this.primevue.dropdown = (function (api, BlankIcon, CheckIcon, ChevronDownIcon,
|
|
|
13471
13476
|
ref: "container",
|
|
13472
13477
|
id: $data.id,
|
|
13473
13478
|
"class": _ctx.cx('root'),
|
|
13474
|
-
onClick: _cache[
|
|
13479
|
+
onClick: _cache[16] || (_cache[16] = function () {
|
|
13475
13480
|
return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
|
|
13476
13481
|
})
|
|
13477
13482
|
}, _ctx.ptm('root')), [_ctx.editable ? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
@@ -13588,10 +13593,10 @@ this.primevue.dropdown = (function (api, BlankIcon, CheckIcon, ChevronDownIcon,
|
|
|
13588
13593
|
ref: $options.overlayRef,
|
|
13589
13594
|
"class": [_ctx.cx('panel'), _ctx.panelClass],
|
|
13590
13595
|
style: _ctx.panelStyle,
|
|
13591
|
-
onClick: _cache[
|
|
13596
|
+
onClick: _cache[14] || (_cache[14] = function () {
|
|
13592
13597
|
return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
|
|
13593
13598
|
}),
|
|
13594
|
-
onKeydown: _cache[
|
|
13599
|
+
onKeydown: _cache[15] || (_cache[15] = function () {
|
|
13595
13600
|
return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
|
|
13596
13601
|
})
|
|
13597
13602
|
}, _objectSpread(_objectSpread({}, _ctx.panelProps), _ctx.ptm('panel'))), [vue.createElementVNode("span", vue.mergeProps({
|
|
@@ -13621,19 +13626,22 @@ this.primevue.dropdown = (function (api, BlankIcon, CheckIcon, ChevronDownIcon,
|
|
|
13621
13626
|
onVnodeMounted: _cache[8] || (_cache[8] = function () {
|
|
13622
13627
|
return $options.onFilterUpdated && $options.onFilterUpdated.apply($options, arguments);
|
|
13623
13628
|
}),
|
|
13629
|
+
onVnodeUpdated: _cache[9] || (_cache[9] = function () {
|
|
13630
|
+
return $options.onFilterUpdated && $options.onFilterUpdated.apply($options, arguments);
|
|
13631
|
+
}),
|
|
13624
13632
|
"class": _ctx.cx('filterInput'),
|
|
13625
13633
|
placeholder: _ctx.filterPlaceholder,
|
|
13626
13634
|
role: "searchbox",
|
|
13627
13635
|
autocomplete: "off",
|
|
13628
13636
|
"aria-owns": $data.id + '_list',
|
|
13629
13637
|
"aria-activedescendant": $options.focusedOptionId,
|
|
13630
|
-
onKeydown: _cache[
|
|
13638
|
+
onKeydown: _cache[10] || (_cache[10] = function () {
|
|
13631
13639
|
return $options.onFilterKeyDown && $options.onFilterKeyDown.apply($options, arguments);
|
|
13632
13640
|
}),
|
|
13633
|
-
onBlur: _cache[
|
|
13641
|
+
onBlur: _cache[11] || (_cache[11] = function () {
|
|
13634
13642
|
return $options.onFilterBlur && $options.onFilterBlur.apply($options, arguments);
|
|
13635
13643
|
}),
|
|
13636
|
-
onInput: _cache[
|
|
13644
|
+
onInput: _cache[12] || (_cache[12] = function () {
|
|
13637
13645
|
return $options.onFilterChange && $options.onFilterChange.apply($options, arguments);
|
|
13638
13646
|
})
|
|
13639
13647
|
}, _objectSpread(_objectSpread({}, _ctx.filterInputProps), _ctx.ptm('filterInput'))), null, 16, _hoisted_4), vue.renderSlot(_ctx.$slots, "filtericon", {
|
|
@@ -13788,7 +13796,7 @@ this.primevue.dropdown = (function (api, BlankIcon, CheckIcon, ChevronDownIcon,
|
|
|
13788
13796
|
"aria-hidden": "true",
|
|
13789
13797
|
"class": "p-hidden-accessible p-hidden-focusable",
|
|
13790
13798
|
tabindex: 0,
|
|
13791
|
-
onFocus: _cache[
|
|
13799
|
+
onFocus: _cache[13] || (_cache[13] = function () {
|
|
13792
13800
|
return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
|
|
13793
13801
|
})
|
|
13794
13802
|
}, _ctx.ptm('hiddenLastFocusableEl'), {
|
package/core/core.min.js
CHANGED
|
@@ -318,7 +318,7 @@ this.primevue=this.primevue||{},this.primevue.tooltip=function(t,e,o){"use stric
|
|
|
318
318
|
|
|
319
319
|
this.primevue=this.primevue||{},this.primevue.focustrap=function(e,t,o){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}function r(e){return r="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},r(e)}function u(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),o.push.apply(o,n)}return o}function s(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?u(Object(o),!0).forEach((function(t){c(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):u(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function c(e,t,o){var n;return(t="symbol"==r(n=i(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function i(e,t){if("object"!=r(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,t||"default");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}return n(t).default.extend({style:n(o).default}).extend("focustrap",{mounted:function(e,t){(t.value||{}).disabled||(this.createHiddenFocusableElements(e,t),this.bind(e,t),this.autoElementFocus(e,t)),e.setAttribute("data-pd-focustrap",!0),this.$el=e},updated:function(e,t){(t.value||{}).disabled&&this.unbind(e)},unmounted:function(e){this.unbind(e)},methods:{getComputedSelector:function(e){return':not(.p-hidden-focusable):not([data-p-hidden-focusable="true"])'.concat(null!=e?e:"")},bind:function(t,o){var n=this,r=o.value||{},u=r.onFocusIn,s=r.onFocusOut;t.$_pfocustrap_mutationobserver=new MutationObserver((function(o){o.forEach((function(o){if("childList"===o.type&&!t.contains(document.activeElement)){e.DomHandler.focus(function o(r){var u=e.DomHandler.isFocusableElement(r)?e.DomHandler.isFocusableElement(r,n.getComputedSelector(t.$_pfocustrap_focusableselector))?r:e.DomHandler.getFirstFocusableElement(t,n.getComputedSelector(t.$_pfocustrap_focusableselector)):e.DomHandler.getFirstFocusableElement(r);return e.ObjectUtils.isNotEmpty(u)?u:r.nextSibling&&o(r.nextSibling)}(o.nextSibling))}}))})),t.$_pfocustrap_mutationobserver.disconnect(),t.$_pfocustrap_mutationobserver.observe(t,{childList:!0}),t.$_pfocustrap_focusinlistener=function(e){return u&&u(e)},t.$_pfocustrap_focusoutlistener=function(e){return s&&s(e)},t.addEventListener("focusin",t.$_pfocustrap_focusinlistener),t.addEventListener("focusout",t.$_pfocustrap_focusoutlistener)},unbind:function(e){e.$_pfocustrap_mutationobserver&&e.$_pfocustrap_mutationobserver.disconnect(),e.$_pfocustrap_focusinlistener&&e.removeEventListener("focusin",e.$_pfocustrap_focusinlistener)&&(e.$_pfocustrap_focusinlistener=null),e.$_pfocustrap_focusoutlistener&&e.removeEventListener("focusout",e.$_pfocustrap_focusoutlistener)&&(e.$_pfocustrap_focusoutlistener=null)},autoFocus:function(e){this.autoElementFocus(this.$el,{value:s(s({},e),{},{autoFocus:!0})})},autoElementFocus:function(t,o){var n=o.value||{},r=n.autoFocusSelector,u=n.firstFocusableSelector,s=void 0===u?"":u,c=n.autoFocus,i=void 0!==c&&c,a=e.DomHandler.getFirstFocusableElement(t,"[autofocus]".concat(this.getComputedSelector(void 0===r?"":r)));i&&!a&&(a=e.DomHandler.getFirstFocusableElement(t,this.getComputedSelector(s))),e.DomHandler.focus(a)},onFirstHiddenElementFocus:function(t){var o,n=t.currentTarget,r=t.relatedTarget,u=r!==n.$_pfocustrap_lasthiddenfocusableelement&&null!==(o=this.$el)&&void 0!==o&&o.contains(r)?n.$_pfocustrap_lasthiddenfocusableelement:e.DomHandler.getFirstFocusableElement(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector));e.DomHandler.focus(u)},onLastHiddenElementFocus:function(t){var o,n=t.currentTarget,r=t.relatedTarget,u=r!==n.$_pfocustrap_firsthiddenfocusableelement&&null!==(o=this.$el)&&void 0!==o&&o.contains(r)?n.$_pfocustrap_firsthiddenfocusableelement:e.DomHandler.getLastFocusableElement(n.parentElement,this.getComputedSelector(n.$_pfocustrap_focusableselector));e.DomHandler.focus(u)},createHiddenFocusableElements:function(t,o){var n=this,r=o.value||{},u=r.tabIndex,s=void 0===u?0:u,c=r.firstFocusableSelector,i=void 0===c?"":c,a=r.lastFocusableSelector,l=void 0===a?"":a,f=function(t){return e.DomHandler.createElement("span",{class:"p-hidden-accessible p-hidden-focusable",tabIndex:s,role:"presentation","aria-hidden":!0,"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0,onFocus:null==t?void 0:t.bind(n)})},p=f(this.onFirstHiddenElementFocus),d=f(this.onLastHiddenElementFocus);p.$_pfocustrap_lasthiddenfocusableelement=d,p.$_pfocustrap_focusableselector=i,p.setAttribute("data-pc-section","firstfocusableelement"),d.$_pfocustrap_firsthiddenfocusableelement=p,d.$_pfocustrap_focusableselector=l,d.setAttribute("data-pc-section","lastfocusableelement"),t.prepend(p),t.append(d)}}})}(primevue.utils,primevue.basedirective,primevue.focustrap.style);
|
|
320
320
|
|
|
321
|
-
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e,i,s,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){var s;return(e="symbol"==h(s=m(e,"string"))?s:String(s))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t,e){if("object"!=h(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){var t;a.default.loadStyle({nonce:null===(t=this.$config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce})}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t,e){this.lazy&&t!==e&&t!==this.d_loading&&(this.d_loading=t)},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.calculateAutoSize(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.lastScrollPos=this.both?{top:0,left:0}:0,this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal();if(s?t.every((function(t){return t>-1})):t>-1){var n=this.first,l=this.calculateNumItems().numToleratedItems,r=this.getContentPosition(),a=this.itemSize,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},c=function(t,e,i){return t*e+i},u=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},d=s?{rows:0,cols:0}:0,m=!1;s?(u(c((d={rows:h(t[0],l[0]),cols:h(t[1],l[1])}).cols,a[1],r.left),c(d.rows,a[0],r.top)),m=d.rows!==n.rows||d.cols!==n.cols):(d=h(t,l),o?u(c(d,a,r.left),0):u(0,c(d,a,r.top)),m=d!==n),this.isRangeChanged=m,this.first=d}},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal();if(o?t.every((function(t){return t>-1})):t>-1){var l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){var s;t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,(null===(s=t.items)||void 0===s?void 0:s.length)||0)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1];(i||s)&&(t.element.style.width=l<t.defaultWidth?l+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=r<t.defaultHeight?r+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){var t,e;return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(null===(t=this.columns||this.items[0])||void 0===t?void 0:t.length)||0:(null===(e=this.items)||void 0===e?void 0:e.length)||0,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var y=this.lastScrollPos.top<=u,v=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(y||v)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],y),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],v)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],y),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],v)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l,r,a={first:this.step?Math.min(this.getPageByFirst(i)*this.step,((null===(l=this.items)||void 0===l?void 0:l.length)||0)-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,(null===(r=this.items)||void 0===r?void 0:r.length)||0)};(this.lazyLoadState.first!==a.first||this.lazyLoadState.last!==a.last)&&this.$emit("lazy-load",a),this.lazyLoadState=a}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.isPageChanged()){if(!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},p=["tabindex"];return f.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root")),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,p))},f}(primevue.icons.spinner,primevue.utils,primevue.basecomponent,primevue.virtualscroller.style,Vue);
|
|
321
|
+
this.primevue=this.primevue||{},this.primevue.virtualscroller=function(t,e,i,s,o){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var l=n(t),r=n(i),a=n(s);function h(t){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},h(t)}function c(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,s)}return i}function u(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?c(Object(i),!0).forEach((function(e){d(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):c(Object(i)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function d(t,e,i){var s;return(e="symbol"==h(s=m(e,"string"))?s:String(s))in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function m(t,e){if("object"!=h(t)||!t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var s=i.call(t,e||"default");if("object"!=h(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}var f={name:"VirtualScroller",extends:{name:"BaseVirtualScroller",extends:r.default,props:{id:{type:String,default:null},style:null,class:null,items:{type:Array,default:null},itemSize:{type:[Number,Array],default:0},scrollHeight:null,scrollWidth:null,orientation:{type:String,default:"vertical"},numToleratedItems:{type:Number,default:null},delay:{type:Number,default:0},resizeDelay:{type:Number,default:10},lazy:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},loaderDisabled:{type:Boolean,default:!1},columns:{type:Array,default:null},loading:{type:Boolean,default:!1},showSpacer:{type:Boolean,default:!0},showLoader:{type:Boolean,default:!1},tabindex:{type:Number,default:0},inline:{type:Boolean,default:!1},step:{type:Number,default:0},appendOnly:{type:Boolean,default:!1},autoSize:{type:Boolean,default:!1}},style:a.default,provide:function(){return{$parentInstance:this}},beforeMount:function(){var t;a.default.loadStyle({nonce:null===(t=this.$config)||void 0===t||null===(t=t.csp)||void 0===t?void 0:t.nonce})}},emits:["update:numToleratedItems","scroll","scroll-index-change","lazy-load"],data:function(){return{first:this.isBoth()?{rows:0,cols:0}:0,last:this.isBoth()?{rows:0,cols:0}:0,page:this.isBoth()?{rows:0,cols:0}:0,numItemsInViewport:this.isBoth()?{rows:0,cols:0}:0,lastScrollPos:this.isBoth()?{top:0,left:0}:0,d_numToleratedItems:this.numToleratedItems,d_loading:this.loading,loaderArr:[],spacerStyle:{},contentStyle:{}}},element:null,content:null,lastScrollPos:null,scrollTimeout:null,resizeTimeout:null,defaultWidth:0,defaultHeight:0,defaultContentWidth:0,defaultContentHeight:0,isRangeChanged:!1,lazyLoadState:{},resizeListener:null,initialized:!1,watch:{numToleratedItems:function(t){this.d_numToleratedItems=t},loading:function(t,e){this.lazy&&t!==e&&t!==this.d_loading&&(this.d_loading=t)},items:function(t,e){e&&e.length===(t||[]).length||(this.init(),this.calculateAutoSize())},itemSize:function(){this.init(),this.calculateAutoSize()},orientation:function(){this.lastScrollPos=this.isBoth()?{top:0,left:0}:0},scrollHeight:function(){this.init(),this.calculateAutoSize()},scrollWidth:function(){this.init(),this.calculateAutoSize()}},mounted:function(){this.viewInit(),this.lastScrollPos=this.isBoth()?{top:0,left:0}:0,this.lazyLoadState=this.lazyLoadState||{}},updated:function(){!this.initialized&&this.viewInit()},unmounted:function(){this.unbindResizeListener(),this.initialized=!1},methods:{viewInit:function(){e.DomHandler.isVisible(this.element)&&(this.setContentEl(this.content),this.init(),this.calculateAutoSize(),this.bindResizeListener(),this.defaultWidth=e.DomHandler.getWidth(this.element),this.defaultHeight=e.DomHandler.getHeight(this.element),this.defaultContentWidth=e.DomHandler.getWidth(this.content),this.defaultContentHeight=e.DomHandler.getHeight(this.content),this.initialized=!0)},init:function(){this.disabled||(this.setSize(),this.calculateOptions(),this.setSpacerSize())},isVertical:function(){return"vertical"===this.orientation},isHorizontal:function(){return"horizontal"===this.orientation},isBoth:function(){return"both"===this.orientation},scrollTo:function(t){this.element&&this.element.scrollTo(t)},scrollToIndex:function(t){var e=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"auto",s=this.isBoth(),o=this.isHorizontal();if(s?t.every((function(t){return t>-1})):t>-1){var n=this.first,l=this.element,r=l.scrollTop,a=void 0===r?0:r,h=l.scrollLeft,c=void 0===h?0:h,u=this.calculateNumItems().numToleratedItems,d=this.getContentPosition(),m=this.itemSize,f=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return t<=(arguments.length>1?arguments[1]:void 0)?0:t},p=function(t,e,i){return t*e+i},g=function(){return e.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:i})},v=s?{rows:0,cols:0}:0,y=!1,S=!1;s?(g(p((v={rows:f(t[0],u[0]),cols:f(t[1],u[1])}).cols,m[1],d.left),p(v.rows,m[0],d.top)),S=this.lastScrollPos.top!==a||this.lastScrollPos.left!==c,y=v.rows!==n.rows||v.cols!==n.cols):(v=f(t,u),o?g(p(v,m,d.left),a):g(c,p(v,m,d.top)),S=this.lastScrollPos!==(o?c:a),y=v!==n),this.isRangeChanged=y,S&&(this.first=v)}},scrollInView:function(t,e){var i=this,s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"auto";if(e){var o=this.isBoth(),n=this.isHorizontal();if(o?t.every((function(t){return t>-1})):t>-1){var l=this.getRenderedRange(),r=l.first,a=l.viewport,h=function(){return i.scrollTo({left:arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,top:arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,behavior:s})},c="to-end"===e;if("to-start"===e){if(o)a.first.rows-r.rows>t[0]?h(a.first.cols*this.itemSize[1],(a.first.rows-1)*this.itemSize[0]):a.first.cols-r.cols>t[1]&&h((a.first.cols-1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.first-r>t){var u=(a.first-1)*this.itemSize;n?h(u,0):h(0,u)}}else if(c)if(o)a.last.rows-r.rows<=t[0]+1?h(a.first.cols*this.itemSize[1],(a.first.rows+1)*this.itemSize[0]):a.last.cols-r.cols<=t[1]+1&&h((a.first.cols+1)*this.itemSize[1],a.first.rows*this.itemSize[0]);else if(a.last-r<=t+1){var d=(a.first+1)*this.itemSize;n?h(d,0):h(0,d)}}}else this.scrollToIndex(t,s)},getRenderedRange:function(){var t=function(t,e){return Math.floor(t/(e||t))},e=this.first,i=0;if(this.element){var s=this.isBoth(),o=this.isHorizontal(),n=this.element,l=n.scrollTop,r=n.scrollLeft;if(s)i={rows:(e={rows:t(l,this.itemSize[0]),cols:t(r,this.itemSize[1])}).rows+this.numItemsInViewport.rows,cols:e.cols+this.numItemsInViewport.cols};else i=(e=t(o?r:l,this.itemSize))+this.numItemsInViewport}return{first:this.first,last:this.last,viewport:{first:e,last:i}}},calculateNumItems:function(){var t=this.isBoth(),e=this.isHorizontal(),i=this.itemSize,s=this.getContentPosition(),o=this.element?this.element.offsetWidth-s.left:0,n=this.element?this.element.offsetHeight-s.top:0,l=function(t,e){return Math.ceil(t/(e||t))},r=function(t){return Math.ceil(t/2)},a=t?{rows:l(n,i[0]),cols:l(o,i[1])}:l(e?o:n,i);return{numItemsInViewport:a,numToleratedItems:this.d_numToleratedItems||(t?[r(a.rows),r(a.cols)]:r(a))}},calculateOptions:function(){var t=this,e=this.isBoth(),i=this.first,s=this.calculateNumItems(),o=s.numItemsInViewport,n=s.numToleratedItems,l=function(e,i,s){return t.getLast(e+i+(e<s?2:3)*s,arguments.length>3&&void 0!==arguments[3]&&arguments[3])},r=e?{rows:l(i.rows,o.rows,n[0]),cols:l(i.cols,o.cols,n[1],!0)}:l(i,o,n);this.last=r,this.numItemsInViewport=o,this.d_numToleratedItems=n,this.$emit("update:numToleratedItems",this.d_numToleratedItems),this.showLoader&&(this.loaderArr=e?Array.from({length:o.rows}).map((function(){return Array.from({length:o.cols})})):Array.from({length:o})),this.lazy&&Promise.resolve().then((function(){var s;t.lazyLoadState={first:t.step?e?{rows:0,cols:i.cols}:0:i,last:Math.min(t.step?t.step:r,(null===(s=t.items)||void 0===s?void 0:s.length)||0)},t.$emit("lazy-load",t.lazyLoadState)}))},calculateAutoSize:function(){var t=this;this.autoSize&&!this.d_loading&&Promise.resolve().then((function(){if(t.content){var i=t.isBoth(),s=t.isHorizontal(),o=t.isVertical();t.content.style.minHeight=t.content.style.minWidth="auto",t.content.style.position="relative",t.element.style.contain="none";var n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1];(i||s)&&(t.element.style.width=l<t.defaultWidth?l+"px":t.scrollWidth||t.defaultWidth+"px"),(i||o)&&(t.element.style.height=r<t.defaultHeight?r+"px":t.scrollHeight||t.defaultHeight+"px"),t.content.style.minHeight=t.content.style.minWidth="",t.content.style.position="",t.element.style.contain=""}}))},getLast:function(){var t,e;return this.items?Math.min((arguments.length>1?arguments[1]:void 0)?(null===(t=this.columns||this.items[0])||void 0===t?void 0:t.length)||0:(null===(e=this.items)||void 0===e?void 0:e.length)||0,arguments.length>0&&void 0!==arguments[0]?arguments[0]:0):0},getContentPosition:function(){if(this.content){var t=getComputedStyle(this.content),e=parseFloat(t.paddingLeft)+Math.max(parseFloat(t.left)||0,0),i=parseFloat(t.paddingRight)+Math.max(parseFloat(t.right)||0,0),s=parseFloat(t.paddingTop)+Math.max(parseFloat(t.top)||0,0),o=parseFloat(t.paddingBottom)+Math.max(parseFloat(t.bottom)||0,0);return{left:e,right:i,top:s,bottom:o,x:e+i,y:s+o}}return{left:0,right:0,top:0,bottom:0,x:0,y:0}},setSize:function(){var t=this;if(this.element){var e=this.isBoth(),i=this.isHorizontal(),s=this.element.parentElement,o=this.scrollWidth||"".concat(this.element.offsetWidth||s.offsetWidth,"px"),n=this.scrollHeight||"".concat(this.element.offsetHeight||s.offsetHeight,"px"),l=function(e,i){return t.element.style[e]=i};e||i?(l("height",n),l("width",o)):l("height",n)}},setSpacerSize:function(){var t=this,e=this.items;if(e){var i=this.isBoth(),s=this.isHorizontal(),o=this.getContentPosition(),n=function(e,i,s){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return t.spacerStyle=u(u({},t.spacerStyle),d({},"".concat(e),(i||[]).length*s+o+"px"))};i?(n("height",e,this.itemSize[0],o.y),n("width",this.columns||e[1],this.itemSize[1],o.x)):s?n("width",this.columns||e,this.itemSize,o.x):n("height",e,this.itemSize,o.y)}},setContentPosition:function(t){var e=this;if(this.content&&!this.appendOnly){var i=this.isBoth(),s=this.isHorizontal(),o=t?t.first:this.first,n=function(t,e){return t*e},l=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return e.contentStyle=u(u({},e.contentStyle),{transform:"translate3d(".concat(t,"px, ").concat(i,"px, 0)")})};if(i)l(n(o.cols,this.itemSize[1]),n(o.rows,this.itemSize[0]));else{var r=n(o,this.itemSize);s?l(r,0):l(0,r)}}},onScrollPositionChange:function(t){var e=this,i=t.target,s=this.isBoth(),o=this.isHorizontal(),n=this.getContentPosition(),l=function(t,e){return t?t>e?t-e:t:0},r=function(t,e){return Math.floor(t/(e||t))},a=function(t,e,i,s,o,n){return t<=o?o:n?i-s-o:e+o-1},h=function(t,e,i,s,o,n,l){return t<=n?0:Math.max(0,l?t<e?i:t-n:t>e?i:t-2*n)},c=function(t,i,s,o,n,l){var r=i+o+2*n;return t>=n&&(r+=n+1),e.getLast(r,l)},u=l(i.scrollTop,n.top),d=l(i.scrollLeft,n.left),m=s?{rows:0,cols:0}:0,f=this.last,p=!1,g=this.lastScrollPos;if(s){var v=this.lastScrollPos.top<=u,y=this.lastScrollPos.left<=d;if(!this.appendOnly||this.appendOnly&&(v||y)){var S={rows:r(u,this.itemSize[0]),cols:r(d,this.itemSize[1])},w={rows:a(S.rows,this.first.rows,this.last.rows,this.numItemsInViewport.rows,this.d_numToleratedItems[0],v),cols:a(S.cols,this.first.cols,this.last.cols,this.numItemsInViewport.cols,this.d_numToleratedItems[1],y)};m={rows:h(S.rows,w.rows,this.first.rows,0,0,this.d_numToleratedItems[0],v),cols:h(S.cols,w.cols,this.first.cols,0,0,this.d_numToleratedItems[1],y)},f={rows:c(S.rows,m.rows,0,this.numItemsInViewport.rows,this.d_numToleratedItems[0]),cols:c(S.cols,m.cols,0,this.numItemsInViewport.cols,this.d_numToleratedItems[1],!0)},p=m.rows!==this.first.rows||f.rows!==this.last.rows||m.cols!==this.first.cols||f.cols!==this.last.cols||this.isRangeChanged,g={top:u,left:d}}}else{var z=o?d:u,I=this.lastScrollPos<=z;if(!this.appendOnly||this.appendOnly&&I){var b=r(z,this.itemSize);f=c(b,m=h(b,a(b,this.first,this.last,this.numItemsInViewport,this.d_numToleratedItems,I),this.first,0,0,this.d_numToleratedItems,I),0,this.numItemsInViewport,this.d_numToleratedItems),p=m!==this.first||f!==this.last||this.isRangeChanged,g=z}}return{first:m,last:f,isRangeChanged:p,scrollPos:g}},onScrollChange:function(t){var e=this.onScrollPositionChange(t),i=e.first,s=e.last,o=e.scrollPos;if(e.isRangeChanged){var n={first:i,last:s};if(this.setContentPosition(n),this.first=i,this.last=s,this.lastScrollPos=o,this.$emit("scroll-index-change",n),this.lazy&&this.isPageChanged(i)){var l,r,a={first:this.step?Math.min(this.getPageByFirst(i)*this.step,((null===(l=this.items)||void 0===l?void 0:l.length)||0)-this.step):i,last:Math.min(this.step?(this.getPageByFirst(i)+1)*this.step:s,(null===(r=this.items)||void 0===r?void 0:r.length)||0)};(this.lazyLoadState.first!==a.first||this.lazyLoadState.last!==a.last)&&this.$emit("lazy-load",a),this.lazyLoadState=a}}},onScroll:function(t){var e=this;if(this.$emit("scroll",t),this.delay){if(this.scrollTimeout&&clearTimeout(this.scrollTimeout),this.isPageChanged()){if(!this.d_loading&&this.showLoader)(this.onScrollPositionChange(t).isRangeChanged||!!this.step&&this.isPageChanged())&&(this.d_loading=!0);this.scrollTimeout=setTimeout((function(){e.onScrollChange(t),!e.d_loading||!e.showLoader||e.lazy&&void 0!==e.loading||(e.d_loading=!1,e.page=e.getPageByFirst())}),this.delay)}}else this.onScrollChange(t)},onResize:function(){var t=this;this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout((function(){if(e.DomHandler.isVisible(t.element)){var i=t.isBoth(),s=t.isVertical(),o=t.isHorizontal(),n=[e.DomHandler.getWidth(t.element),e.DomHandler.getHeight(t.element)],l=n[0],r=n[1],a=l!==t.defaultWidth,h=r!==t.defaultHeight;(i?a||h:o?a:!!s&&h)&&(t.d_numToleratedItems=t.numToleratedItems,t.defaultWidth=l,t.defaultHeight=r,t.defaultContentWidth=e.DomHandler.getWidth(t.content),t.defaultContentHeight=e.DomHandler.getHeight(t.content),t.init())}}),this.resizeDelay)},bindResizeListener:function(){this.resizeListener||(this.resizeListener=this.onResize.bind(this),window.addEventListener("resize",this.resizeListener),window.addEventListener("orientationchange",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),window.removeEventListener("orientationchange",this.resizeListener),this.resizeListener=null)},getOptions:function(t){var e=(this.items||[]).length,i=this.isBoth()?this.first.rows+t:this.first+t;return{index:i,count:e,first:0===i,last:i===e-1,even:i%2==0,odd:i%2!=0}},getLoaderOptions:function(t,e){var i=this.loaderArr.length;return u({index:t,count:i,first:0===t,last:t===i-1,even:t%2==0,odd:t%2!=0},e)},getPageByFirst:function(t){return Math.floor(((null!=t?t:this.first)+4*this.d_numToleratedItems)/(this.step||1))},isPageChanged:function(t){return!this.step||this.page!==this.getPageByFirst(null!=t?t:this.first)},setContentEl:function(t){this.content=t||this.content||e.DomHandler.findSingle(this.element,'[data-pc-section="content"]')},elementRef:function(t){this.element=t},contentRef:function(t){this.content=t}},computed:{containerClass:function(){return["p-virtualscroller",this.class,{"p-virtualscroller-inline":this.inline,"p-virtualscroller-both p-both-scroll":this.isBoth(),"p-virtualscroller-horizontal p-horizontal-scroll":this.isHorizontal()}]},contentClass:function(){return["p-virtualscroller-content",{"p-virtualscroller-loading":this.d_loading}]},loaderClass:function(){return["p-virtualscroller-loader",{"p-component-overlay":!this.$slots.loader}]},loadedItems:function(){var t=this;return this.items&&!this.d_loading?this.isBoth()?this.items.slice(this.appendOnly?0:this.first.rows,this.last.rows).map((function(e){return t.columns?e:e.slice(t.appendOnly?0:t.first.cols,t.last.cols)})):this.isHorizontal()&&this.columns?this.items:this.items.slice(this.appendOnly?0:this.first,this.last):[]},loadedRows:function(){return this.d_loading?this.loaderDisabled?this.loaderArr:[]:this.loadedItems},loadedColumns:function(){if(this.columns){var t=this.isBoth(),e=this.isHorizontal();if(t||e)return this.d_loading&&this.loaderDisabled?t?this.loaderArr[0]:this.loaderArr:this.columns.slice(t?this.first.cols:this.first,t?this.last.cols:this.last)}return this.columns}},components:{SpinnerIcon:l.default}},p=["tabindex"];return f.render=function(t,e,i,s,n,l){var r=o.resolveComponent("SpinnerIcon");return t.disabled?(o.openBlock(),o.createElementBlock(o.Fragment,{key:1},[o.renderSlot(t.$slots,"default"),o.renderSlot(t.$slots,"content",{items:t.items,rows:t.items,columns:l.loadedColumns})],64)):(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,ref:l.elementRef,class:l.containerClass,tabindex:t.tabindex,style:t.style,onScroll:e[0]||(e[0]=function(){return l.onScroll&&l.onScroll.apply(l,arguments)})},t.ptm("root")),[o.renderSlot(t.$slots,"content",{styleClass:l.contentClass,items:l.loadedItems,getItemOptions:l.getOptions,loading:n.d_loading,getLoaderOptions:l.getLoaderOptions,itemSize:t.itemSize,rows:l.loadedRows,columns:l.loadedColumns,contentRef:l.contentRef,spacerStyle:n.spacerStyle,contentStyle:n.contentStyle,vertical:l.isVertical(),horizontal:l.isHorizontal(),both:l.isBoth()},(function(){return[o.createElementVNode("div",o.mergeProps({ref:l.contentRef,class:l.contentClass,style:n.contentStyle},t.ptm("content")),[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(l.loadedItems,(function(e,i){return o.renderSlot(t.$slots,"item",{key:i,item:e,options:l.getOptions(i)})})),128))],16)]})),t.showSpacer?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:0,class:"p-virtualscroller-spacer",style:n.spacerStyle},t.ptm("spacer")),null,16)):o.createCommentVNode("",!0),!t.loaderDisabled&&t.showLoader&&n.d_loading?(o.openBlock(),o.createElementBlock("div",o.mergeProps({key:1,class:l.loaderClass},t.ptm("loader")),[t.$slots&&t.$slots.loader?(o.openBlock(!0),o.createElementBlock(o.Fragment,{key:0},o.renderList(n.loaderArr,(function(e,i){return o.renderSlot(t.$slots,"loader",{key:i,options:l.getLoaderOptions(i,l.isBoth()&&{numCols:t.d_numItemsInViewport.cols})})})),128)):o.createCommentVNode("",!0),o.renderSlot(t.$slots,"loadingicon",{},(function(){return[o.createVNode(r,o.mergeProps({spin:"",class:"p-virtualscroller-loading-icon"},t.ptm("loadingIcon")),null,16)]}))],16)):o.createCommentVNode("",!0)],16,p))},f}(primevue.icons.spinner,primevue.utils,primevue.basecomponent,primevue.virtualscroller.style,Vue);
|
|
322
322
|
|
|
323
323
|
this.primevue=this.primevue||{},this.primevue.confirmationeventbus=function(e){"use strict";return primevue.utils.EventBus()}();
|
|
324
324
|
|
|
@@ -350,7 +350,7 @@ this.primevue=this.primevue||{},this.primevue.message=function(e,t,o,n,r,i,c,l,s
|
|
|
350
350
|
|
|
351
351
|
this.primevue=this.primevue||{},this.primevue.progressbar=function(e,t,r){"use strict";function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var n={name:"ProgressBar",extends:{name:"BaseProgressBar",extends:a(e).default,props:{value:{type:Number,default:null},mode:{type:String,default:"determinate"},showValue:{type:Boolean,default:!0}},style:a(t).default,provide:function(){return{$parentInstance:this}}},computed:{progressStyle:function(){return{width:this.value+"%",display:"flex"}},indeterminate:function(){return"indeterminate"===this.mode},determinate:function(){return"determinate"===this.mode}}},o=["aria-valuenow"];return n.render=function(e,t,a,n,l,s){return r.openBlock(),r.createElementBlock("div",r.mergeProps({role:"progressbar",class:e.cx("root"),"aria-valuemin":"0","aria-valuenow":e.value,"aria-valuemax":"100"},e.ptm("root")),[s.determinate?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("value"),style:s.progressStyle},e.ptm("value")),[null!=e.value&&0!==e.value&&e.showValue?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:0,class:e.cx("label")},e.ptm("label")),[r.renderSlot(e.$slots,"default",{},(function(){return[r.createTextVNode(r.toDisplayString(e.value+"%"),1)]}))],16)):r.createCommentVNode("",!0)],16)):r.createCommentVNode("",!0),s.indeterminate?(r.openBlock(),r.createElementBlock("div",r.mergeProps({key:1,class:e.cx("container")},e.ptm("container")),[r.createElementVNode("div",r.mergeProps({class:e.cx("value")},e.ptm("value")),null,16)],16)):r.createCommentVNode("",!0)],16,o)},n}(primevue.basecomponent,primevue.progressbar.style,Vue);
|
|
352
352
|
|
|
353
|
-
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,l,s,r,a,c,d,u,p,h,f){"use strict";function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(t),m=b(i),v=b(n),O=b(o),g=b(l),I=b(s),x=b(r),S=b(a),k=b(c),w=b(u);function L(e){return L="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},L(e)}function V(){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 F(e,t){if(e){if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?E(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function P(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function B(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?P(Object(i),!0).forEach((function(t){M(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function M(e,t,i){var n;return(t="symbol"==L(n=K(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function K(e,t){if("object"!=L(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T={name:"Dropdown",extends:{name:"BaseDropdown",extends:b(p).default,props:{modelValue:null,options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:b(h).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||d.UniqueComponentId()},modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||d.UniqueComponentId(),this.autoUpdateModel(),this.bindLabelClickListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(d.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?d.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?d.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?d.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTItemOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&d.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return d.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return d.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),e&&d.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,t.searchValue="",t.resetFilterOnHide&&(t.filterValue=null),e&&d.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||d.DomHandler.isAndroid())e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&d.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}this.clicked=!1}},onEditableInput:function(e){var t=e.target.value;this.searchValue="",!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t),!this.overlayVisible&&d.ObjectUtils.isNotEmpty(t)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||"INPUT"===e.target.tagName||"clearicon"===e.target.getAttribute("data-pc-section")||e.target.closest('[data-pc-section="clearicon"]')||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?d.DomHandler.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;d.DomHandler.focus(t)},onLastHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?d.DomHandler.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;d.DomHandler.focus(t)},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){x.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onDeleteKey:function(e){this.showClear&&(this.updateModel(e,null),e.preventDefault())},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t)}else this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());e.preventDefault()},onArrowUpKey:function(e){if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(d.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){d.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),d.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&d.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){d.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?d.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=d.DomHandler.getOuterWidth(this.$el)+"px",d.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new d.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!d.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var t=document.querySelector('label[for="'.concat(this.inputId,'"]'));t&&d.DomHandler.isVisible(t)&&(this.labelClickListener=function(){d.DomHandler.focus(e.$refs.focusInput)},t.addEventListener("click",this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector('label[for="'.concat(this.inputId,'"]'));e&&d.DomHandler.isVisible(e)&&e.removeEventListener("click",this.labelClickListener)}},hasFocusableElements:function(){return d.DomHandler.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){var t;return this.isValidOption(e)&&(null===(t=this.getOptionLabel(e))||void 0===t?void 0:t.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return d.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.isValidOption(e)&&d.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return d.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?d.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return d.ObjectUtils.isNotEmpty(this.searchValue)&&(-1!==(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=d.DomHandler.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this,i=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var n=e.FilterService.filter(i,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var o=[];return(this.options||[]).forEach((function(e){var i,l=t.getOptionGroupChildren(e).filter((function(e){return n.includes(e)}));l.length>0&&o.push(B(B({},e),{},M({},"string"==typeof t.optionGroupChildren?t.optionGroupChildren:"items",D(i=l)||C(i)||F(i)||V())))})),this.flatOptions(o)}return n}return i},hasSelectedOption:function(){return d.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue:function(){var e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return d.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:k.default},components:{VirtualScroller:w.default,Portal:S.default,TimesIcon:I.default,ChevronDownIcon:v.default,SpinnerIcon:g.default,SearchIcon:O.default,CheckIcon:m.default,BlankIcon:y.default}};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 H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function $(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){A(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function A(e,t,i){var n;return(t="symbol"==j(n=N(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function N(e,t){if("object"!=j(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var U=["id"],G=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],z=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],R=["value","placeholder","aria-owns","aria-activedescendant"],_=["id"],q=["id"],W=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"];return T.render=function(e,t,i,n,o,l){var s=f.resolveComponent("SpinnerIcon"),r=f.resolveComponent("CheckIcon"),a=f.resolveComponent("BlankIcon"),c=f.resolveComponent("VirtualScroller"),d=f.resolveComponent("Portal"),u=f.resolveDirective("ripple");return f.openBlock(),f.createElementBlock("div",f.mergeProps({ref:"container",id:o.id,class:e.cx("root"),onClick:t[15]||(t[15]=function(){return l.onContainerClick&&l.onContainerClick.apply(l,arguments)})},e.ptm("root")),[e.editable?(f.openBlock(),f.createElementBlock("input",f.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:l.editableInputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[1]||(t[1]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[2]||(t[2]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[3]||(t[3]=function(){return l.onEditableInput&&l.onEditableInput.apply(l,arguments)})},$($({},e.inputProps),e.ptm("input"))),null,16,G)):(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:1,ref:"focusInput",id:e.inputId,class:[e.cx("input"),e.inputClass],style:e.inputStyle,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===l.label?void 0:l.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[4]||(t[4]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[5]||(t[5]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[6]||(t[6]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)})},$($({},e.inputProps),e.ptm("input"))),[f.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[f.createTextVNode(f.toDisplayString("p-emptylabel"===l.label?" ":l.label||"empty"),1)]}))],16,z)),e.showClear&&null!=e.modelValue?f.renderSlot(e.$slots,"clearicon",{key:2,class:f.normalizeClass(e.cx("clearIcon")),onClick:l.onClearClick,clearCallback:l.onClearClick},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.clearIcon?"i":"TimesIcon"),f.mergeProps({ref:"clearIcon",class:[e.cx("clearIcon"),e.clearIcon],onClick:l.onClearClick},$($({},e.clearIconProps),e.ptm("clearIcon")),{"data-pc-section":"clearicon"}),null,16,["class","onClick"]))]})):f.createCommentVNode("",!0),f.createElementVNode("div",f.mergeProps({class:e.cx("trigger")},e.ptm("trigger")),[e.loading?f.renderSlot(e.$slots,"loadingicon",{key:0,class:f.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(f.openBlock(),f.createBlock(s,f.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):f.renderSlot(e.$slots,"dropdownicon",{key:1,class:f.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),f.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),f.createVNode(d,{appendTo:e.appendTo},{default:f.withCtx((function(){return[f.createVNode(f.Transition,f.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:f.withCtx((function(){return[o.overlayVisible?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,ref:l.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[13]||(t[13]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)}),onKeydown:t[14]||(t[14]=function(){return l.onOverlayKeyDown&&l.onOverlayKeyDown.apply(l,arguments)})},$($({},e.panelProps),e.ptm("panel"))),[f.createElementVNode("span",f.mergeProps({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[7]||(t[7]=function(){return l.onFirstHiddenFocus&&l.onFirstHiddenFocus.apply(l,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),f.renderSlot(e.$slots,"header",{value:e.modelValue,options:l.visibleOptions}),e.filter?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[f.createElementVNode("div",f.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[f.createElementVNode("input",f.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeMounted:t[8]||(t[8]=function(){return l.onFilterUpdated&&l.onFilterUpdated.apply(l,arguments)}),class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":l.focusedOptionId,onKeydown:t[9]||(t[9]=function(){return l.onFilterKeyDown&&l.onFilterKeyDown.apply(l,arguments)}),onBlur:t[10]||(t[10]=function(){return l.onFilterBlur&&l.onFilterBlur.apply(l,arguments)}),onInput:t[11]||(t[11]=function(){return l.onFilterChange&&l.onFilterChange.apply(l,arguments)})},$($({},e.filterInputProps),e.ptm("filterInput"))),null,16,R),f.renderSlot(e.$slots,"filtericon",{class:f.normalizeClass(e.cx("filterIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),f.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f.createElementVNode("span",f.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.filterResultMessageText),17)],16)):f.createCommentVNode("",!0),f.createElementVNode("div",f.mergeProps({class:e.cx("wrapper"),style:{"max-height":l.virtualScrollerDisabled?e.scrollHeight:""}},e.ptm("wrapper")),[f.createVNode(c,f.mergeProps({ref:l.virtualScrollerRef},e.virtualScrollerOptions,{items:l.visibleOptions,style:{height:e.scrollHeight},tabindex:-1,disabled:l.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),f.createSlots({content:f.withCtx((function(t){var i=t.styleClass,n=t.contentRef,s=t.items,c=t.getItemOptions,d=t.contentStyle,p=t.itemSize;return[f.createElementVNode("ul",f.mergeProps({ref:function(e){return l.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:d,role:"listbox"},e.ptm("list")),[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(s,(function(t,i){return f.openBlock(),f.createElementBlock(f.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(i,c))},[l.isOptionGroup(t)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,id:o.id+"_"+l.getOptionIndex(i,c),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[f.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:l.getOptionIndex(i,c)},(function(){return[f.createElementVNode("span",f.mergeProps({class:e.cx("itemGroupLabel")},e.ptm("itemGroupLabel")),f.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),17)]}))],16,q)):f.withDirectives((f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,id:o.id+"_"+l.getOptionIndex(i,c),class:e.cx("item",{option:t,focusedOption:l.getOptionIndex(i,c)}),style:{height:p?p+"px":void 0},role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(i,c)),onClick:function(e){return l.onOptionSelect(e,t)},onMousemove:function(e){return l.onOptionMouseMove(e,l.getOptionIndex(i,c))},"data-p-highlight":l.isSelected(t),"data-p-focused":o.focusedOptionIndex===l.getOptionIndex(i,c),"data-p-disabled":l.isOptionDisabled(t)},l.getPTItemOptions(t,c,i,"item")),[e.checkmark?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[l.isSelected(t)?(f.openBlock(),f.createBlock(r,f.mergeProps({key:0,class:e.cx("checkIcon")},e.ptm("checkIcon")),null,16,["class"])):(f.openBlock(),f.createBlock(a,f.mergeProps({key:1,class:e.cx("blankIcon")},e.ptm("blankIcon")),null,16,["class"]))],64)):f.createCommentVNode("",!0),f.renderSlot(e.$slots,"option",{option:t,index:l.getOptionIndex(i,c)},(function(){return[f.createElementVNode("span",f.mergeProps({class:e.cx("itemLabel")},e.ptm("itemLabel")),f.toDisplayString(l.getOptionLabel(t)),17)]}))],16,W)),[[u]])],64)})),128)),o.filterValue&&(!s||s&&0===s.length)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[f.renderSlot(e.$slots,"emptyfilter",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[f.renderSlot(e.$slots,"empty",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyMessageText),1)]}))],16)):f.createCommentVNode("",!0)],16,_)]})),_:2},[e.$slots.loader?{name:"loader",fn:f.withCtx((function(t){return[f.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),f.renderSlot(e.$slots,"footer",{value:e.modelValue,options:l.visibleOptions}),!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.emptyMessageText),17)):f.createCommentVNode("",!0),f.createElementVNode("span",f.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.selectedMessageText),17),f.createElementVNode("span",f.mergeProps({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[12]||(t[12]=function(){return l.onLastHiddenFocus&&l.onLastHiddenFocus.apply(l,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):f.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16,U)},T}(primevue.api,primevue.icons.blank,primevue.icons.check,primevue.icons.chevrondown,primevue.icons.search,primevue.icons.spinner,primevue.icons.times,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.dropdown.style,Vue);
|
|
353
|
+
this.primevue=this.primevue||{},this.primevue.dropdown=function(e,t,i,n,o,l,s,r,a,c,d,u,p,h,f){"use strict";function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(t),m=b(i),v=b(n),O=b(o),g=b(l),I=b(s),x=b(r),S=b(a),k=b(c),w=b(u);function L(e){return L="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},L(e)}function V(){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 F(e,t){if(e){if("string"==typeof e)return E(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?E(e,t):void 0}}function C(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}function D(e){if(Array.isArray(e))return E(e)}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function P(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function B(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?P(Object(i),!0).forEach((function(t){M(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):P(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function M(e,t,i){var n;return(t="symbol"==L(n=K(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function K(e,t){if("object"!=L(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var T={name:"Dropdown",extends:{name:"BaseDropdown",extends:b(p).default,props:{modelValue:null,options:Array,optionLabel:[String,Function],optionValue:[String,Function],optionDisabled:[String,Function],optionGroupLabel:[String,Function],optionGroupChildren:[String,Function],scrollHeight:{type:String,default:"200px"},filter:Boolean,filterPlaceholder:String,filterLocale:String,filterMatchMode:{type:String,default:"contains"},filterFields:{type:Array,default:null},editable:Boolean,placeholder:{type:String,default:null},variant:{type:String,default:null},invalid:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},dataKey:null,showClear:{type:Boolean,default:!1},inputId:{type:String,default:null},inputClass:{type:[String,Object],default:null},inputStyle:{type:Object,default:null},inputProps:{type:null,default:null},panelClass:{type:[String,Object],default:null},panelStyle:{type:Object,default:null},panelProps:{type:null,default:null},filterInputProps:{type:null,default:null},clearIconProps:{type:null,default:null},appendTo:{type:[String,Object],default:"body"},loading:{type:Boolean,default:!1},clearIcon:{type:String,default:void 0},dropdownIcon:{type:String,default:void 0},filterIcon:{type:String,default:void 0},loadingIcon:{type:String,default:void 0},resetFilterOnHide:{type:Boolean,default:!1},resetFilterOnClear:{type:Boolean,default:!1},virtualScrollerOptions:{type:Object,default:null},autoOptionFocus:{type:Boolean,default:!1},autoFilterFocus:{type:Boolean,default:!1},selectOnFocus:{type:Boolean,default:!1},focusOnHover:{type:Boolean,default:!0},highlightOnSelect:{type:Boolean,default:!0},checkmark:{type:Boolean,default:!1},filterMessage:{type:String,default:null},selectionMessage:{type:String,default:null},emptySelectionMessage:{type:String,default:null},emptyFilterMessage:{type:String,default:null},emptyMessage:{type:String,default:null},tabindex:{type:Number,default:0},ariaLabel:{type:String,default:null},ariaLabelledby:{type:String,default:null}},style:b(h).default,provide:function(){return{$parentInstance:this}}},emits:["update:modelValue","change","focus","blur","before-show","before-hide","show","hide","filter"],outsideClickListener:null,scrollHandler:null,resizeListener:null,labelClickListener:null,overlay:null,list:null,virtualScroller:null,searchTimeout:null,searchValue:null,isModelValueChanged:!1,data:function(){return{id:this.$attrs.id,clicked:!1,focused:!1,focusedOptionIndex:-1,filterValue:null,overlayVisible:!1}},watch:{"$attrs.id":function(e){this.id=e||d.UniqueComponentId()},modelValue:function(){this.isModelValueChanged=!0},options:function(){this.autoUpdateModel()}},mounted:function(){this.id=this.id||d.UniqueComponentId(),this.autoUpdateModel(),this.bindLabelClickListener()},updated:function(){this.overlayVisible&&this.isModelValueChanged&&this.scrollInView(this.findSelectedOptionIndex()),this.isModelValueChanged=!1},beforeUnmount:function(){this.unbindOutsideClickListener(),this.unbindResizeListener(),this.unbindLabelClickListener(),this.scrollHandler&&(this.scrollHandler.destroy(),this.scrollHandler=null),this.overlay&&(d.ZIndexUtils.clear(this.overlay),this.overlay=null)},methods:{getOptionIndex:function(e,t){return this.virtualScrollerDisabled?e:t&&t(e).index},getOptionLabel:function(e){return this.optionLabel?d.ObjectUtils.resolveFieldData(e,this.optionLabel):e},getOptionValue:function(e){return this.optionValue?d.ObjectUtils.resolveFieldData(e,this.optionValue):e},getOptionRenderKey:function(e,t){return(this.dataKey?d.ObjectUtils.resolveFieldData(e,this.dataKey):this.getOptionLabel(e))+"_"+t},getPTItemOptions:function(e,t,i,n){return this.ptm(n,{context:{selected:this.isSelected(e),focused:this.focusedOptionIndex===this.getOptionIndex(i,t),disabled:this.isOptionDisabled(e)}})},isOptionDisabled:function(e){return!!this.optionDisabled&&d.ObjectUtils.resolveFieldData(e,this.optionDisabled)},isOptionGroup:function(e){return this.optionGroupLabel&&e.optionGroup&&e.group},getOptionGroupLabel:function(e){return d.ObjectUtils.resolveFieldData(e,this.optionGroupLabel)},getOptionGroupChildren:function(e){return d.ObjectUtils.resolveFieldData(e,this.optionGroupChildren)},getAriaPosInset:function(e){var t=this;return(this.optionGroupLabel?e-this.visibleOptions.slice(0,e).filter((function(e){return t.isOptionGroup(e)})).length:e)+1},show:function(e){this.$emit("before-show"),this.overlayVisible=!0,this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),e&&d.DomHandler.focus(this.$refs.focusInput)},hide:function(e){var t=this;setTimeout((function(){t.$emit("before-hide"),t.overlayVisible=!1,t.clicked=!1,t.focusedOptionIndex=-1,t.searchValue="",t.resetFilterOnHide&&(t.filterValue=null),e&&d.DomHandler.focus(t.$refs.focusInput)}),0)},onFocus:function(e){this.disabled||(this.focused=!0,this.overlayVisible&&(this.focusedOptionIndex=-1!==this.focusedOptionIndex?this.focusedOptionIndex:this.autoOptionFocus?this.findFirstFocusedOptionIndex():this.editable?-1:this.findSelectedOptionIndex(),this.scrollInView(this.focusedOptionIndex)),this.$emit("focus",e))},onBlur:function(e){this.focused=!1,this.focusedOptionIndex=-1,this.searchValue="",this.$emit("blur",e)},onKeyDown:function(e){if(this.disabled||d.DomHandler.isAndroid())e.preventDefault();else{var t=e.metaKey||e.ctrlKey;switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,this.editable);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,this.editable);break;case"Delete":this.onDeleteKey(e);case"Home":this.onHomeKey(e,this.editable);break;case"End":this.onEndKey(e,this.editable);break;case"PageDown":this.onPageDownKey(e);break;case"PageUp":this.onPageUpKey(e);break;case"Space":this.onSpaceKey(e,this.editable);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e);break;case"Backspace":this.onBackspaceKey(e,this.editable);break;case"ShiftLeft":case"ShiftRight":break;default:!t&&d.ObjectUtils.isPrintableCharacter(e.key)&&(!this.overlayVisible&&this.show(),!this.editable&&this.searchOptions(e,e.key))}this.clicked=!1}},onEditableInput:function(e){var t=e.target.value;this.searchValue="",!this.searchOptions(e,t)&&(this.focusedOptionIndex=-1),this.updateModel(e,t),!this.overlayVisible&&d.ObjectUtils.isNotEmpty(t)&&this.show()},onContainerClick:function(e){this.disabled||this.loading||"INPUT"===e.target.tagName||"clearicon"===e.target.getAttribute("data-pc-section")||e.target.closest('[data-pc-section="clearicon"]')||(this.overlay&&this.overlay.contains(e.target)||(this.overlayVisible?this.hide(!0):this.show(!0)),this.clicked=!0)},onClearClick:function(e){this.updateModel(e,null),this.resetFilterOnClear&&(this.filterValue=null)},onFirstHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?d.DomHandler.getFirstFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;d.DomHandler.focus(t)},onLastHiddenFocus:function(e){var t=e.relatedTarget===this.$refs.focusInput?d.DomHandler.getLastFocusableElement(this.overlay,':not([data-p-hidden-focusable="true"])'):this.$refs.focusInput;d.DomHandler.focus(t)},onOptionSelect:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],n=this.getOptionValue(t);this.updateModel(e,n),i&&this.hide(!0)},onOptionMouseMove:function(e,t){this.focusOnHover&&this.changeFocusedOptionIndex(e,t)},onFilterChange:function(e){var t=e.target.value;this.filterValue=t,this.focusedOptionIndex=-1,this.$emit("filter",{originalEvent:e,value:t}),!this.virtualScrollerDisabled&&this.virtualScroller.scrollToIndex(0)},onFilterKeyDown:function(e){switch(e.code){case"ArrowDown":this.onArrowDownKey(e);break;case"ArrowUp":this.onArrowUpKey(e,!0);break;case"ArrowLeft":case"ArrowRight":this.onArrowLeftKey(e,!0);break;case"Home":this.onHomeKey(e,!0);break;case"End":this.onEndKey(e,!0);break;case"Enter":case"NumpadEnter":this.onEnterKey(e);break;case"Escape":this.onEscapeKey(e);break;case"Tab":this.onTabKey(e,!0)}},onFilterBlur:function(){this.focusedOptionIndex=-1},onFilterUpdated:function(){this.overlayVisible&&this.alignOverlay()},onOverlayClick:function(e){x.default.emit("overlay-click",{originalEvent:e,target:this.$el})},onOverlayKeyDown:function(e){if("Escape"===e.code)this.onEscapeKey(e)},onDeleteKey:function(e){this.showClear&&(this.updateModel(e,null),e.preventDefault())},onArrowDownKey:function(e){if(this.overlayVisible){var t=-1!==this.focusedOptionIndex?this.findNextOptionIndex(this.focusedOptionIndex):this.clicked?this.findFirstOptionIndex():this.findFirstFocusedOptionIndex();this.changeFocusedOptionIndex(e,t)}else this.show(),this.editable&&this.changeFocusedOptionIndex(e,this.findSelectedOptionIndex());e.preventDefault()},onArrowUpKey:function(e){if(e.altKey&&!(arguments.length>1&&void 0!==arguments[1]&&arguments[1]))-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(),e.preventDefault();else{var t=-1!==this.focusedOptionIndex?this.findPrevOptionIndex(this.focusedOptionIndex):this.clicked?this.findLastOptionIndex():this.findLastFocusedOptionIndex();this.changeFocusedOptionIndex(e,t),!this.overlayVisible&&this.show(),e.preventDefault()}},onArrowLeftKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&(this.focusedOptionIndex=-1)},onHomeKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]?(e.currentTarget.setSelectionRange(0,0),this.focusedOptionIndex=-1):(this.changeFocusedOptionIndex(e,this.findFirstOptionIndex()),!this.overlayVisible&&this.show()),e.preventDefault()},onEndKey:function(e){if(arguments.length>1&&void 0!==arguments[1]&&arguments[1]){var t=e.currentTarget,i=t.value.length;t.setSelectionRange(i,i),this.focusedOptionIndex=-1}else this.changeFocusedOptionIndex(e,this.findLastOptionIndex()),!this.overlayVisible&&this.show();e.preventDefault()},onPageUpKey:function(e){this.scrollInView(0),e.preventDefault()},onPageDownKey:function(e){this.scrollInView(this.visibleOptions.length-1),e.preventDefault()},onEnterKey:function(e){this.overlayVisible?(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.hide()):(this.focusedOptionIndex=-1,this.onArrowDownKey(e)),e.preventDefault()},onSpaceKey:function(e){!(arguments.length>1&&void 0!==arguments[1]&&arguments[1])&&this.onEnterKey(e)},onEscapeKey:function(e){this.overlayVisible&&this.hide(!0),e.preventDefault()},onTabKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]||(this.overlayVisible&&this.hasFocusableElements()?(d.DomHandler.focus(this.$refs.firstHiddenFocusableElementOnOverlay),e.preventDefault()):(-1!==this.focusedOptionIndex&&this.onOptionSelect(e,this.visibleOptions[this.focusedOptionIndex]),this.overlayVisible&&this.hide(this.filter)))},onBackspaceKey:function(e){arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&!this.overlayVisible&&this.show()},onOverlayEnter:function(e){d.ZIndexUtils.set("overlay",e,this.$primevue.config.zIndex.overlay),d.DomHandler.addStyles(e,{position:"absolute",top:"0",left:"0"}),this.alignOverlay(),this.scrollInView(),this.autoFilterFocus&&d.DomHandler.focus(this.$refs.filterInput)},onOverlayAfterEnter:function(){this.bindOutsideClickListener(),this.bindScrollListener(),this.bindResizeListener(),this.$emit("show")},onOverlayLeave:function(){this.unbindOutsideClickListener(),this.unbindScrollListener(),this.unbindResizeListener(),this.$emit("hide"),this.overlay=null},onOverlayAfterLeave:function(e){d.ZIndexUtils.clear(e)},alignOverlay:function(){"self"===this.appendTo?d.DomHandler.relativePosition(this.overlay,this.$el):(this.overlay.style.minWidth=d.DomHandler.getOuterWidth(this.$el)+"px",d.DomHandler.absolutePosition(this.overlay,this.$el))},bindOutsideClickListener:function(){var e=this;this.outsideClickListener||(this.outsideClickListener=function(t){e.overlayVisible&&e.overlay&&!e.$el.contains(t.target)&&!e.overlay.contains(t.target)&&e.hide()},document.addEventListener("click",this.outsideClickListener))},unbindOutsideClickListener:function(){this.outsideClickListener&&(document.removeEventListener("click",this.outsideClickListener),this.outsideClickListener=null)},bindScrollListener:function(){var e=this;this.scrollHandler||(this.scrollHandler=new d.ConnectedOverlayScrollHandler(this.$refs.container,(function(){e.overlayVisible&&e.hide()}))),this.scrollHandler.bindScrollListener()},unbindScrollListener:function(){this.scrollHandler&&this.scrollHandler.unbindScrollListener()},bindResizeListener:function(){var e=this;this.resizeListener||(this.resizeListener=function(){e.overlayVisible&&!d.DomHandler.isTouchDevice()&&e.hide()},window.addEventListener("resize",this.resizeListener))},unbindResizeListener:function(){this.resizeListener&&(window.removeEventListener("resize",this.resizeListener),this.resizeListener=null)},bindLabelClickListener:function(){var e=this;if(!this.editable&&!this.labelClickListener){var t=document.querySelector('label[for="'.concat(this.inputId,'"]'));t&&d.DomHandler.isVisible(t)&&(this.labelClickListener=function(){d.DomHandler.focus(e.$refs.focusInput)},t.addEventListener("click",this.labelClickListener))}},unbindLabelClickListener:function(){if(this.labelClickListener){var e=document.querySelector('label[for="'.concat(this.inputId,'"]'));e&&d.DomHandler.isVisible(e)&&e.removeEventListener("click",this.labelClickListener)}},hasFocusableElements:function(){return d.DomHandler.getFocusableElements(this.overlay,':not([data-p-hidden-focusable="true"])').length>0},isOptionMatched:function(e){var t;return this.isValidOption(e)&&(null===(t=this.getOptionLabel(e))||void 0===t?void 0:t.toLocaleLowerCase(this.filterLocale).startsWith(this.searchValue.toLocaleLowerCase(this.filterLocale)))},isValidOption:function(e){return d.ObjectUtils.isNotEmpty(e)&&!(this.isOptionDisabled(e)||this.isOptionGroup(e))},isValidSelectedOption:function(e){return this.isValidOption(e)&&this.isSelected(e)},isSelected:function(e){return this.isValidOption(e)&&d.ObjectUtils.equals(this.modelValue,this.getOptionValue(e),this.equalityKey)},findFirstOptionIndex:function(){var e=this;return this.visibleOptions.findIndex((function(t){return e.isValidOption(t)}))},findLastOptionIndex:function(){var e=this;return d.ObjectUtils.findLastIndex(this.visibleOptions,(function(t){return e.isValidOption(t)}))},findNextOptionIndex:function(e){var t=this,i=e<this.visibleOptions.length-1?this.visibleOptions.slice(e+1).findIndex((function(e){return t.isValidOption(e)})):-1;return i>-1?i+e+1:e},findPrevOptionIndex:function(e){var t=this,i=e>0?d.ObjectUtils.findLastIndex(this.visibleOptions.slice(0,e),(function(e){return t.isValidOption(e)})):-1;return i>-1?i:e},findSelectedOptionIndex:function(){var e=this;return this.hasSelectedOption?this.visibleOptions.findIndex((function(t){return e.isValidSelectedOption(t)})):-1},findFirstFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findFirstOptionIndex():e},findLastFocusedOptionIndex:function(){var e=this.findSelectedOptionIndex();return e<0?this.findLastOptionIndex():e},searchOptions:function(e,t){var i=this;this.searchValue=(this.searchValue||"")+t;var n=-1,o=!1;return d.ObjectUtils.isNotEmpty(this.searchValue)&&(-1!==(n=-1!==this.focusedOptionIndex?-1===(n=this.visibleOptions.slice(this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})))?this.visibleOptions.slice(0,this.focusedOptionIndex).findIndex((function(e){return i.isOptionMatched(e)})):n+this.focusedOptionIndex:this.visibleOptions.findIndex((function(e){return i.isOptionMatched(e)})))&&(o=!0),-1===n&&-1===this.focusedOptionIndex&&(n=this.findFirstFocusedOptionIndex()),-1!==n&&this.changeFocusedOptionIndex(e,n)),this.searchTimeout&&clearTimeout(this.searchTimeout),this.searchTimeout=setTimeout((function(){i.searchValue="",i.searchTimeout=null}),500),o},changeFocusedOptionIndex:function(e,t){this.focusedOptionIndex!==t&&(this.focusedOptionIndex=t,this.scrollInView(),this.selectOnFocus&&this.onOptionSelect(e,this.visibleOptions[t],!1))},scrollInView:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:-1;this.$nextTick((function(){var i=-1!==t?"".concat(e.id,"_").concat(t):e.focusedOptionId,n=d.DomHandler.findSingle(e.list,'li[id="'.concat(i,'"]'));n?n.scrollIntoView&&n.scrollIntoView({block:"nearest",inline:"start"}):e.virtualScrollerDisabled||e.virtualScroller&&e.virtualScroller.scrollToIndex(-1!==t?t:e.focusedOptionIndex)}))},autoUpdateModel:function(){this.selectOnFocus&&this.autoOptionFocus&&!this.hasSelectedOption&&(this.focusedOptionIndex=this.findFirstFocusedOptionIndex(),this.onOptionSelect(null,this.visibleOptions[this.focusedOptionIndex],!1))},updateModel:function(e,t){this.$emit("update:modelValue",t),this.$emit("change",{originalEvent:e,value:t})},flatOptions:function(e){var t=this;return(e||[]).reduce((function(e,i,n){e.push({optionGroup:i,group:!0,index:n});var o=t.getOptionGroupChildren(i);return o&&o.forEach((function(t){return e.push(t)})),e}),[])},overlayRef:function(e){this.overlay=e},listRef:function(e,t){this.list=e,t&&t(e)},virtualScrollerRef:function(e){this.virtualScroller=e}},computed:{visibleOptions:function(){var t=this,i=this.optionGroupLabel?this.flatOptions(this.options):this.options||[];if(this.filterValue){var n=e.FilterService.filter(i,this.searchFields,this.filterValue,this.filterMatchMode,this.filterLocale);if(this.optionGroupLabel){var o=[];return(this.options||[]).forEach((function(e){var i,l=t.getOptionGroupChildren(e).filter((function(e){return n.includes(e)}));l.length>0&&o.push(B(B({},e),{},M({},"string"==typeof t.optionGroupChildren?t.optionGroupChildren:"items",D(i=l)||C(i)||F(i)||V())))})),this.flatOptions(o)}return n}return i},hasSelectedOption:function(){return d.ObjectUtils.isNotEmpty(this.modelValue)},label:function(){var e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.placeholder||"p-emptylabel"},editableInputValue:function(){var e=this.findSelectedOptionIndex();return-1!==e?this.getOptionLabel(this.visibleOptions[e]):this.modelValue||""},equalityKey:function(){return this.optionValue?null:this.dataKey},searchFields:function(){return this.filterFields||[this.optionLabel]},filterResultMessageText:function(){return d.ObjectUtils.isNotEmpty(this.visibleOptions)?this.filterMessageText.replaceAll("{0}",this.visibleOptions.length):this.emptyFilterMessageText},filterMessageText:function(){return this.filterMessage||this.$primevue.config.locale.searchMessage||""},emptyFilterMessageText:function(){return this.emptyFilterMessage||this.$primevue.config.locale.emptySearchMessage||this.$primevue.config.locale.emptyFilterMessage||""},emptyMessageText:function(){return this.emptyMessage||this.$primevue.config.locale.emptyMessage||""},selectionMessageText:function(){return this.selectionMessage||this.$primevue.config.locale.selectionMessage||""},emptySelectionMessageText:function(){return this.emptySelectionMessage||this.$primevue.config.locale.emptySelectionMessage||""},selectedMessageText:function(){return this.hasSelectedOption?this.selectionMessageText.replaceAll("{0}","1"):this.emptySelectionMessageText},focusedOptionId:function(){return-1!==this.focusedOptionIndex?"".concat(this.id,"_").concat(this.focusedOptionIndex):null},ariaSetSize:function(){var e=this;return this.visibleOptions.filter((function(t){return!e.isOptionGroup(t)})).length},virtualScrollerDisabled:function(){return!this.virtualScrollerOptions}},directives:{ripple:k.default},components:{VirtualScroller:w.default,Portal:S.default,TimesIcon:I.default,ChevronDownIcon:v.default,SpinnerIcon:g.default,SearchIcon:O.default,CheckIcon:m.default,BlankIcon:y.default}};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 H(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function $(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?H(Object(i),!0).forEach((function(t){A(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):H(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function A(e,t,i){var n;return(t="symbol"==j(n=U(t,"string"))?n:String(n))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function U(e,t){if("object"!=j(e)||!e)return e;var i=e[Symbol.toPrimitive];if(void 0!==i){var n=i.call(e,t||"default");if("object"!=j(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var N=["id"],G=["id","value","placeholder","tabindex","disabled","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant"],z=["id","tabindex","aria-label","aria-labelledby","aria-expanded","aria-controls","aria-activedescendant","aria-disabled"],R=["value","placeholder","aria-owns","aria-activedescendant"],_=["id"],q=["id"],W=["id","aria-label","aria-selected","aria-disabled","aria-setsize","aria-posinset","onClick","onMousemove","data-p-highlight","data-p-focused","data-p-disabled"];return T.render=function(e,t,i,n,o,l){var s=f.resolveComponent("SpinnerIcon"),r=f.resolveComponent("CheckIcon"),a=f.resolveComponent("BlankIcon"),c=f.resolveComponent("VirtualScroller"),d=f.resolveComponent("Portal"),u=f.resolveDirective("ripple");return f.openBlock(),f.createElementBlock("div",f.mergeProps({ref:"container",id:o.id,class:e.cx("root"),onClick:t[16]||(t[16]=function(){return l.onContainerClick&&l.onContainerClick.apply(l,arguments)})},e.ptm("root")),[e.editable?(f.openBlock(),f.createElementBlock("input",f.mergeProps({key:0,ref:"focusInput",id:e.inputId,type:"text",class:[e.cx("input"),e.inputClass],style:e.inputStyle,value:l.editableInputValue,placeholder:e.placeholder,tabindex:e.disabled?-1:e.tabindex,disabled:e.disabled,autocomplete:"off",role:"combobox","aria-label":e.ariaLabel,"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,onFocus:t[0]||(t[0]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[1]||(t[1]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[2]||(t[2]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)}),onInput:t[3]||(t[3]=function(){return l.onEditableInput&&l.onEditableInput.apply(l,arguments)})},$($({},e.inputProps),e.ptm("input"))),null,16,G)):(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:1,ref:"focusInput",id:e.inputId,class:[e.cx("input"),e.inputClass],style:e.inputStyle,tabindex:e.disabled?-1:e.tabindex,role:"combobox","aria-label":e.ariaLabel||("p-emptylabel"===l.label?void 0:l.label),"aria-labelledby":e.ariaLabelledby,"aria-haspopup":"listbox","aria-expanded":o.overlayVisible,"aria-controls":o.id+"_list","aria-activedescendant":o.focused?l.focusedOptionId:void 0,"aria-disabled":e.disabled,onFocus:t[4]||(t[4]=function(){return l.onFocus&&l.onFocus.apply(l,arguments)}),onBlur:t[5]||(t[5]=function(){return l.onBlur&&l.onBlur.apply(l,arguments)}),onKeydown:t[6]||(t[6]=function(){return l.onKeyDown&&l.onKeyDown.apply(l,arguments)})},$($({},e.inputProps),e.ptm("input"))),[f.renderSlot(e.$slots,"value",{value:e.modelValue,placeholder:e.placeholder},(function(){return[f.createTextVNode(f.toDisplayString("p-emptylabel"===l.label?" ":l.label||"empty"),1)]}))],16,z)),e.showClear&&null!=e.modelValue?f.renderSlot(e.$slots,"clearicon",{key:2,class:f.normalizeClass(e.cx("clearIcon")),onClick:l.onClearClick,clearCallback:l.onClearClick},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.clearIcon?"i":"TimesIcon"),f.mergeProps({ref:"clearIcon",class:[e.cx("clearIcon"),e.clearIcon],onClick:l.onClearClick},$($({},e.clearIconProps),e.ptm("clearIcon")),{"data-pc-section":"clearicon"}),null,16,["class","onClick"]))]})):f.createCommentVNode("",!0),f.createElementVNode("div",f.mergeProps({class:e.cx("trigger")},e.ptm("trigger")),[e.loading?f.renderSlot(e.$slots,"loadingicon",{key:0,class:f.normalizeClass(e.cx("loadingIcon"))},(function(){return[e.loadingIcon?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:0,class:[e.cx("loadingIcon"),"pi-spin",e.loadingIcon],"aria-hidden":"true"},e.ptm("loadingIcon")),null,16)):(f.openBlock(),f.createBlock(s,f.mergeProps({key:1,class:e.cx("loadingIcon"),spin:"","aria-hidden":"true"},e.ptm("loadingIcon")),null,16,["class"]))]})):f.renderSlot(e.$slots,"dropdownicon",{key:1,class:f.normalizeClass(e.cx("dropdownIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.dropdownIcon?"span":"ChevronDownIcon"),f.mergeProps({class:[e.cx("dropdownIcon"),e.dropdownIcon],"aria-hidden":"true"},e.ptm("dropdownIcon")),null,16,["class"]))]}))],16),f.createVNode(d,{appendTo:e.appendTo},{default:f.withCtx((function(){return[f.createVNode(f.Transition,f.mergeProps({name:"p-connected-overlay",onEnter:l.onOverlayEnter,onAfterEnter:l.onOverlayAfterEnter,onLeave:l.onOverlayLeave,onAfterLeave:l.onOverlayAfterLeave},e.ptm("transition")),{default:f.withCtx((function(){return[o.overlayVisible?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,ref:l.overlayRef,class:[e.cx("panel"),e.panelClass],style:e.panelStyle,onClick:t[14]||(t[14]=function(){return l.onOverlayClick&&l.onOverlayClick.apply(l,arguments)}),onKeydown:t[15]||(t[15]=function(){return l.onOverlayKeyDown&&l.onOverlayKeyDown.apply(l,arguments)})},$($({},e.panelProps),e.ptm("panel"))),[f.createElementVNode("span",f.mergeProps({ref:"firstHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[7]||(t[7]=function(){return l.onFirstHiddenFocus&&l.onFirstHiddenFocus.apply(l,arguments)})},e.ptm("hiddenFirstFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16),f.renderSlot(e.$slots,"header",{value:e.modelValue,options:l.visibleOptions}),e.filter?(f.openBlock(),f.createElementBlock("div",f.mergeProps({key:0,class:e.cx("header")},e.ptm("header")),[f.createElementVNode("div",f.mergeProps({class:e.cx("filterContainer")},e.ptm("filterContainer")),[f.createElementVNode("input",f.mergeProps({ref:"filterInput",type:"text",value:o.filterValue,onVnodeMounted:t[8]||(t[8]=function(){return l.onFilterUpdated&&l.onFilterUpdated.apply(l,arguments)}),onVnodeUpdated:t[9]||(t[9]=function(){return l.onFilterUpdated&&l.onFilterUpdated.apply(l,arguments)}),class:e.cx("filterInput"),placeholder:e.filterPlaceholder,role:"searchbox",autocomplete:"off","aria-owns":o.id+"_list","aria-activedescendant":l.focusedOptionId,onKeydown:t[10]||(t[10]=function(){return l.onFilterKeyDown&&l.onFilterKeyDown.apply(l,arguments)}),onBlur:t[11]||(t[11]=function(){return l.onFilterBlur&&l.onFilterBlur.apply(l,arguments)}),onInput:t[12]||(t[12]=function(){return l.onFilterChange&&l.onFilterChange.apply(l,arguments)})},$($({},e.filterInputProps),e.ptm("filterInput"))),null,16,R),f.renderSlot(e.$slots,"filtericon",{class:f.normalizeClass(e.cx("filterIcon"))},(function(){return[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(e.filterIcon?"span":"SearchIcon"),f.mergeProps({class:[e.cx("filterIcon"),e.filterIcon]},e.ptm("filterIcon")),null,16,["class"]))]}))],16),f.createElementVNode("span",f.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenFilterResult"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.filterResultMessageText),17)],16)):f.createCommentVNode("",!0),f.createElementVNode("div",f.mergeProps({class:e.cx("wrapper"),style:{"max-height":l.virtualScrollerDisabled?e.scrollHeight:""}},e.ptm("wrapper")),[f.createVNode(c,f.mergeProps({ref:l.virtualScrollerRef},e.virtualScrollerOptions,{items:l.visibleOptions,style:{height:e.scrollHeight},tabindex:-1,disabled:l.virtualScrollerDisabled,pt:e.ptm("virtualScroller")}),f.createSlots({content:f.withCtx((function(t){var i=t.styleClass,n=t.contentRef,s=t.items,c=t.getItemOptions,d=t.contentStyle,p=t.itemSize;return[f.createElementVNode("ul",f.mergeProps({ref:function(e){return l.listRef(e,n)},id:o.id+"_list",class:[e.cx("list"),i],style:d,role:"listbox"},e.ptm("list")),[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(s,(function(t,i){return f.openBlock(),f.createElementBlock(f.Fragment,{key:l.getOptionRenderKey(t,l.getOptionIndex(i,c))},[l.isOptionGroup(t)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,id:o.id+"_"+l.getOptionIndex(i,c),style:{height:p?p+"px":void 0},class:e.cx("itemGroup"),role:"option"},e.ptm("itemGroup")),[f.renderSlot(e.$slots,"optiongroup",{option:t.optionGroup,index:l.getOptionIndex(i,c)},(function(){return[f.createElementVNode("span",f.mergeProps({class:e.cx("itemGroupLabel")},e.ptm("itemGroupLabel")),f.toDisplayString(l.getOptionGroupLabel(t.optionGroup)),17)]}))],16,q)):f.withDirectives((f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,id:o.id+"_"+l.getOptionIndex(i,c),class:e.cx("item",{option:t,focusedOption:l.getOptionIndex(i,c)}),style:{height:p?p+"px":void 0},role:"option","aria-label":l.getOptionLabel(t),"aria-selected":l.isSelected(t),"aria-disabled":l.isOptionDisabled(t),"aria-setsize":l.ariaSetSize,"aria-posinset":l.getAriaPosInset(l.getOptionIndex(i,c)),onClick:function(e){return l.onOptionSelect(e,t)},onMousemove:function(e){return l.onOptionMouseMove(e,l.getOptionIndex(i,c))},"data-p-highlight":l.isSelected(t),"data-p-focused":o.focusedOptionIndex===l.getOptionIndex(i,c),"data-p-disabled":l.isOptionDisabled(t)},l.getPTItemOptions(t,c,i,"item")),[e.checkmark?(f.openBlock(),f.createElementBlock(f.Fragment,{key:0},[l.isSelected(t)?(f.openBlock(),f.createBlock(r,f.mergeProps({key:0,class:e.cx("checkIcon")},e.ptm("checkIcon")),null,16,["class"])):(f.openBlock(),f.createBlock(a,f.mergeProps({key:1,class:e.cx("blankIcon")},e.ptm("blankIcon")),null,16,["class"]))],64)):f.createCommentVNode("",!0),f.renderSlot(e.$slots,"option",{option:t,index:l.getOptionIndex(i,c)},(function(){return[f.createElementVNode("span",f.mergeProps({class:e.cx("itemLabel")},e.ptm("itemLabel")),f.toDisplayString(l.getOptionLabel(t)),17)]}))],16,W)),[[u]])],64)})),128)),o.filterValue&&(!s||s&&0===s.length)?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:0,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[f.renderSlot(e.$slots,"emptyfilter",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyFilterMessageText),1)]}))],16)):!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("li",f.mergeProps({key:1,class:e.cx("emptyMessage"),role:"option"},e.ptm("emptyMessage"),{"data-p-hidden-accessible":!0}),[f.renderSlot(e.$slots,"empty",{},(function(){return[f.createTextVNode(f.toDisplayString(l.emptyMessageText),1)]}))],16)):f.createCommentVNode("",!0)],16,_)]})),_:2},[e.$slots.loader?{name:"loader",fn:f.withCtx((function(t){return[f.renderSlot(e.$slots,"loader",{options:t.options})]})),key:"0"}:void 0]),1040,["items","style","disabled","pt"])],16),f.renderSlot(e.$slots,"footer",{value:e.modelValue,options:l.visibleOptions}),!e.options||e.options&&0===e.options.length?(f.openBlock(),f.createElementBlock("span",f.mergeProps({key:1,role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenEmptyMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.emptyMessageText),17)):f.createCommentVNode("",!0),f.createElementVNode("span",f.mergeProps({role:"status","aria-live":"polite",class:"p-hidden-accessible"},e.ptm("hiddenSelectedMessage"),{"data-p-hidden-accessible":!0}),f.toDisplayString(l.selectedMessageText),17),f.createElementVNode("span",f.mergeProps({ref:"lastHiddenFocusableElementOnOverlay",role:"presentation","aria-hidden":"true",class:"p-hidden-accessible p-hidden-focusable",tabindex:0,onFocus:t[13]||(t[13]=function(){return l.onLastHiddenFocus&&l.onLastHiddenFocus.apply(l,arguments)})},e.ptm("hiddenLastFocusableEl"),{"data-p-hidden-accessible":!0,"data-p-hidden-focusable":!0}),null,16)],16)):f.createCommentVNode("",!0)]})),_:3},16,["onEnter","onAfterEnter","onLeave","onAfterLeave"])]})),_:3},8,["appendTo"])],16,N)},T}(primevue.api,primevue.icons.blank,primevue.icons.check,primevue.icons.chevrondown,primevue.icons.search,primevue.icons.spinner,primevue.icons.times,primevue.overlayeventbus,primevue.portal,primevue.ripple,primevue.utils,primevue.virtualscroller,primevue.basecomponent,primevue.dropdown.style,Vue);
|
|
354
354
|
|
|
355
355
|
this.primevue=this.primevue||{},this.primevue.dialog=function(e,t,n,o,i,a,l,s,r,c){"use strict";function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var m=u(e),d=u(t),p=u(n),f=u(o),h=u(i),b=u(a),y={name:"Dialog",extends:{name:"BaseDialog",extends:u(r).default,props:{header:{type:null,default:null},footer:{type:null,default:null},visible:{type:Boolean,default:!1},modal:{type:Boolean,default:null},contentStyle:{type:null,default:null},contentClass:{type:String,default:null},contentProps:{type:null,default:null},rtl:{type:Boolean,default:null},maximizable:{type:Boolean,default:!1},dismissableMask:{type:Boolean,default:!1},closable:{type:Boolean,default:!0},closeOnEscape:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},blockScroll:{type:Boolean,default:!1},baseZIndex:{type:Number,default:0},autoZIndex:{type:Boolean,default:!0},position:{type:String,default:"center"},breakpoints:{type:Object,default:null},draggable:{type:Boolean,default:!0},keepInViewport:{type:Boolean,default:!0},minX:{type:Number,default:0},minY:{type:Number,default:0},appendTo:{type:[String,Object],default:"body"},closeIcon:{type:String,default:void 0},maximizeIcon:{type:String,default:void 0},minimizeIcon:{type:String,default:void 0},closeButtonProps:{type:null,default:null},_instance:null},style:u(c).default,provide:function(){return{$parentInstance:this}}},inheritAttrs:!1,emits:["update:visible","show","hide","after-hide","maximize","unmaximize","dragend"],provide:function(){var e=this;return{dialogRef:s.computed((function(){return e._instance}))}},data:function(){return{id:this.$attrs.id,containerVisible:this.visible,maximized:!1,focusableMax:null,focusableClose:null}},watch:{"$attrs.id":function(e){this.id=e||l.UniqueComponentId()}},documentKeydownListener:null,container:null,mask:null,content:null,headerContainer:null,footerContainer:null,maximizableButton:null,closeButton:null,styleElement:null,dragging:null,documentDragListener:null,documentDragEndListener:null,lastPageX:null,lastPageY:null,updated:function(){this.visible&&(this.containerVisible=this.visible)},beforeUnmount:function(){this.unbindDocumentState(),this.unbindGlobalListeners(),this.destroyStyle(),this.mask&&this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.container=null,this.mask=null},mounted:function(){this.id=this.id||l.UniqueComponentId(),this.breakpoints&&this.createStyle()},methods:{close:function(){this.$emit("update:visible",!1)},onBeforeEnter:function(e){e.setAttribute(this.attributeSelector,"")},onEnter:function(){this.$emit("show"),this.focus(),this.enableDocumentSettings(),this.bindGlobalListeners(),this.autoZIndex&&l.ZIndexUtils.set("modal",this.mask,this.baseZIndex+this.$primevue.config.zIndex.modal)},onBeforeLeave:function(){this.modal&&!this.isUnstyled&&l.DomHandler.addClass(this.mask,"p-component-overlay-leave")},onLeave:function(){this.$emit("hide"),this.focusableClose=null,this.focusableMax=null},onAfterLeave:function(){this.autoZIndex&&l.ZIndexUtils.clear(this.mask),this.containerVisible=!1,this.unbindDocumentState(),this.unbindGlobalListeners(),this.$emit("after-hide")},onMaskClick:function(e){this.dismissableMask&&this.modal&&this.mask===e.target&&this.close()},focus:function(){var e=function(e){return e&&e.querySelector("[autofocus]")},t=this.$slots.footer&&e(this.footerContainer);t||(t=this.$slots.header&&e(this.headerContainer))||(t=this.$slots.default&&e(this.content))||(this.maximizable?(this.focusableMax=!0,t=this.maximizableButton):(this.focusableClose=!0,t=this.closeButton)),t&&l.DomHandler.focus(t,{focusVisible:!0})},maximize:function(e){this.maximized?(this.maximized=!1,this.$emit("unmaximize",e)):(this.maximized=!0,this.$emit("maximize",e)),this.modal||(this.maximized?l.DomHandler.blockBodyScroll():l.DomHandler.unblockBodyScroll())},enableDocumentSettings:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.blockBodyScroll()},unbindDocumentState:function(){(this.modal||!this.modal&&this.blockScroll||this.maximizable&&this.maximized)&&l.DomHandler.unblockBodyScroll()},onKeyDown:function(e){"Escape"===e.code&&this.closeOnEscape&&this.close()},bindDocumentKeyDownListener:function(){this.documentKeydownListener||(this.documentKeydownListener=this.onKeyDown.bind(this),window.document.addEventListener("keydown",this.documentKeydownListener))},unbindDocumentKeyDownListener:function(){this.documentKeydownListener&&(window.document.removeEventListener("keydown",this.documentKeydownListener),this.documentKeydownListener=null)},containerRef:function(e){this.container=e},maskRef:function(e){this.mask=e},contentRef:function(e){this.content=e},headerContainerRef:function(e){this.headerContainer=e},footerContainerRef:function(e){this.footerContainer=e},maximizableRef:function(e){this.maximizableButton=e},closeButtonRef:function(e){this.closeButton=e},createStyle:function(){if(!this.styleElement&&!this.isUnstyled){var e;this.styleElement=document.createElement("style"),this.styleElement.type="text/css",l.DomHandler.setAttribute(this.styleElement,"nonce",null===(e=this.$primevue)||void 0===e||null===(e=e.config)||void 0===e||null===(e=e.csp)||void 0===e?void 0:e.nonce),document.head.appendChild(this.styleElement);var t="";for(var n in this.breakpoints)t+="\n @media screen and (max-width: ".concat(n,") {\n .p-dialog[").concat(this.attributeSelector,"] {\n width: ").concat(this.breakpoints[n]," !important;\n }\n }\n ");this.styleElement.innerHTML=t}},destroyStyle:function(){this.styleElement&&(document.head.removeChild(this.styleElement),this.styleElement=null)},initDrag:function(e){"icons"!==e.target.closest("div").getAttribute("data-pc-section")&&this.draggable&&(this.dragging=!0,this.lastPageX=e.pageX,this.lastPageY=e.pageY,this.container.style.margin="0",document.body.setAttribute("data-p-unselectable-text"),!this.isUnstyled&&l.DomHandler.addClass(document.body,"p-unselectable-text"))},bindGlobalListeners:function(){this.draggable&&(this.bindDocumentDragListener(),this.bindDocumentDragEndListener()),this.closeOnEscape&&this.closable&&this.bindDocumentKeyDownListener()},unbindGlobalListeners:function(){this.unbindDocumentDragListener(),this.unbindDocumentDragEndListener(),this.unbindDocumentKeyDownListener()},bindDocumentDragListener:function(){var e=this;this.documentDragListener=function(t){if(e.dragging){var n=l.DomHandler.getOuterWidth(e.container),o=l.DomHandler.getOuterHeight(e.container),i=t.pageX-e.lastPageX,a=t.pageY-e.lastPageY,s=e.container.getBoundingClientRect(),r=s.left+i,c=s.top+a,u=l.DomHandler.getViewport(),m=getComputedStyle(e.container),d=parseFloat(m.marginLeft),p=parseFloat(m.marginTop);e.container.style.position="fixed",e.keepInViewport?(r>=e.minX&&r+n<u.width&&(e.lastPageX=t.pageX,e.container.style.left=r-d+"px"),c>=e.minY&&c+o<u.height&&(e.lastPageY=t.pageY,e.container.style.top=c-p+"px")):(e.lastPageX=t.pageX,e.container.style.left=r-d+"px",e.lastPageY=t.pageY,e.container.style.top=c-p+"px")}},window.document.addEventListener("mousemove",this.documentDragListener)},unbindDocumentDragListener:function(){this.documentDragListener&&(window.document.removeEventListener("mousemove",this.documentDragListener),this.documentDragListener=null)},bindDocumentDragEndListener:function(){var e=this;this.documentDragEndListener=function(t){e.dragging&&(e.dragging=!1,document.body.removeAttribute("data-p-unselectable-text"),!e.isUnstyled&&l.DomHandler.removeClass(document.body,"p-unselectable-text"),e.$emit("dragend",t))},window.document.addEventListener("mouseup",this.documentDragEndListener)},unbindDocumentDragEndListener:function(){this.documentDragEndListener&&(window.document.removeEventListener("mouseup",this.documentDragEndListener),this.documentDragEndListener=null)}},computed:{maximizeIconComponent:function(){return this.maximized?this.minimizeIcon?"span":"WindowMinimizeIcon":this.maximizeIcon?"span":"WindowMaximizeIcon"},ariaLabelledById:function(){return null!=this.header||null!==this.$attrs["aria-labelledby"]?this.id+"_header":null},closeAriaLabel:function(){return this.$primevue.config.locale.aria?this.$primevue.config.locale.aria.close:void 0},attributeSelector:function(){return l.UniqueComponentId()}},directives:{ripple:b.default,focustrap:m.default},components:{Portal:h.default,WindowMinimizeIcon:f.default,WindowMaximizeIcon:p.default,TimesIcon:d.default}};function g(e){return g="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},g(e)}function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){k(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e,t,n){var o;return(t="symbol"==g(o=D(t,"string"))?o:String(o))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function D(e,t){if("object"!=g(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var o=n.call(e,t||"default");if("object"!=g(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}var B=["aria-labelledby","aria-modal"],w=["id"],L=["autofocus","tabindex"],z=["autofocus","aria-label"];return y.render=function(e,t,n,o,i,a){var l=s.resolveComponent("Portal"),r=s.resolveDirective("ripple"),c=s.resolveDirective("focustrap");return s.openBlock(),s.createBlock(l,{appendTo:e.appendTo},{default:s.withCtx((function(){return[i.containerVisible?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:a.maskRef,class:e.cx("mask"),style:e.sx("mask",!0,{position:e.position,modal:e.modal}),onClick:t[3]||(t[3]=function(){return a.onMaskClick&&a.onMaskClick.apply(a,arguments)})},e.ptm("mask")),[s.createVNode(s.Transition,s.mergeProps({name:"p-dialog",onBeforeEnter:a.onBeforeEnter,onEnter:a.onEnter,onBeforeLeave:a.onBeforeLeave,onLeave:a.onLeave,onAfterLeave:a.onAfterLeave,appear:""},e.ptm("transition")),{default:s.withCtx((function(){return[e.visible?s.withDirectives((s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:a.containerRef,class:e.cx("root"),style:e.sx("root"),role:"dialog","aria-labelledby":a.ariaLabelledById,"aria-modal":e.modal},x(x({},e.$attrs),e.ptm("root"))),[e.$slots.container?s.renderSlot(e.$slots,"container",{key:0,onClose:a.close,onMaximize:function(e){return a.maximize(e)},closeCallback:a.close,maximizeCallback:function(e){return a.maximize(e)}}):(s.openBlock(),s.createElementBlock(s.Fragment,{key:1},[e.showHeader?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:0,ref:a.headerContainerRef,class:e.cx("header"),onMousedown:t[2]||(t[2]=function(){return a.initDrag&&a.initDrag.apply(a,arguments)})},e.ptm("header")),[s.renderSlot(e.$slots,"header",{class:s.normalizeClass(e.cx("title"))},(function(){return[e.header?(s.openBlock(),s.createElementBlock("span",s.mergeProps({key:0,id:a.ariaLabelledById,class:e.cx("title")},e.ptm("title")),s.toDisplayString(e.header),17,w)):s.createCommentVNode("",!0)]})),s.createElementVNode("div",s.mergeProps({class:e.cx("icons")},e.ptm("icons")),[e.maximizable?s.withDirectives((s.openBlock(),s.createElementBlock("button",s.mergeProps({key:0,ref:a.maximizableRef,autofocus:i.focusableMax,class:e.cx("maximizableButton"),onClick:t[0]||(t[0]=function(){return a.maximize&&a.maximize.apply(a,arguments)}),type:"button",tabindex:e.maximizable?"0":"-1"},e.ptm("maximizableButton"),{"data-pc-group-section":"headericon"}),[s.renderSlot(e.$slots,"maximizeicon",{maximized:i.maximized,class:s.normalizeClass(e.cx("maximizableIcon"))},(function(){return[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(a.maximizeIconComponent),s.mergeProps({class:[e.cx("maximizableIcon"),i.maximized?e.minimizeIcon:e.maximizeIcon]},e.ptm("maximizableIcon")),null,16,["class"]))]}))],16,L)),[[r]]):s.createCommentVNode("",!0),e.closable?s.withDirectives((s.openBlock(),s.createElementBlock("button",s.mergeProps({key:1,ref:a.closeButtonRef,autofocus:i.focusableClose,class:e.cx("closeButton"),onClick:t[1]||(t[1]=function(){return a.close&&a.close.apply(a,arguments)}),"aria-label":a.closeAriaLabel,type:"button"},x(x({},e.closeButtonProps),e.ptm("closeButton")),{"data-pc-group-section":"headericon"}),[s.renderSlot(e.$slots,"closeicon",{class:s.normalizeClass(e.cx("closeButtonIcon"))},(function(){return[(s.openBlock(),s.createBlock(s.resolveDynamicComponent(e.closeIcon?"span":"TimesIcon"),s.mergeProps({class:[e.cx("closeButtonIcon"),e.closeIcon]},e.ptm("closeButtonIcon")),null,16,["class"]))]}))],16,z)),[[r]]):s.createCommentVNode("",!0)],16)],16)):s.createCommentVNode("",!0),s.createElementVNode("div",s.mergeProps({ref:a.contentRef,class:[e.cx("content"),e.contentClass],style:e.contentStyle},x(x({},e.contentProps),e.ptm("content"))),[s.renderSlot(e.$slots,"default")],16),e.footer||e.$slots.footer?(s.openBlock(),s.createElementBlock("div",s.mergeProps({key:1,ref:a.footerContainerRef,class:e.cx("footer")},e.ptm("footer")),[s.renderSlot(e.$slots,"footer",{},(function(){return[s.createTextVNode(s.toDisplayString(e.footer),1)]}))],16)):s.createCommentVNode("",!0)],64))],16,B)),[[c,{disabled:!e.modal}]]):s.createCommentVNode("",!0)]})),_:3},16,["onBeforeEnter","onEnter","onBeforeLeave","onLeave","onAfterLeave"])],16)):s.createCommentVNode("",!0)]})),_:3},8,["appendTo"])},y}(primevue.focustrap,primevue.icons.times,primevue.icons.windowmaximize,primevue.icons.windowminimize,primevue.portal,primevue.ripple,primevue.utils,Vue,primevue.basecomponent,primevue.dialog.style);
|
|
356
356
|
|
package/dropdown/Dropdown.vue
CHANGED
package/dropdown/dropdown.cjs.js
CHANGED
|
@@ -1010,7 +1010,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1010
1010
|
ref: "container",
|
|
1011
1011
|
id: $data.id,
|
|
1012
1012
|
"class": _ctx.cx('root'),
|
|
1013
|
-
onClick: _cache[
|
|
1013
|
+
onClick: _cache[16] || (_cache[16] = function () {
|
|
1014
1014
|
return $options.onContainerClick && $options.onContainerClick.apply($options, arguments);
|
|
1015
1015
|
})
|
|
1016
1016
|
}, _ctx.ptm('root')), [_ctx.editable ? (vue.openBlock(), vue.createElementBlock("input", vue.mergeProps({
|
|
@@ -1127,10 +1127,10 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1127
1127
|
ref: $options.overlayRef,
|
|
1128
1128
|
"class": [_ctx.cx('panel'), _ctx.panelClass],
|
|
1129
1129
|
style: _ctx.panelStyle,
|
|
1130
|
-
onClick: _cache[
|
|
1130
|
+
onClick: _cache[14] || (_cache[14] = function () {
|
|
1131
1131
|
return $options.onOverlayClick && $options.onOverlayClick.apply($options, arguments);
|
|
1132
1132
|
}),
|
|
1133
|
-
onKeydown: _cache[
|
|
1133
|
+
onKeydown: _cache[15] || (_cache[15] = function () {
|
|
1134
1134
|
return $options.onOverlayKeyDown && $options.onOverlayKeyDown.apply($options, arguments);
|
|
1135
1135
|
})
|
|
1136
1136
|
}, _objectSpread(_objectSpread({}, _ctx.panelProps), _ctx.ptm('panel'))), [vue.createElementVNode("span", vue.mergeProps({
|
|
@@ -1160,19 +1160,22 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1160
1160
|
onVnodeMounted: _cache[8] || (_cache[8] = function () {
|
|
1161
1161
|
return $options.onFilterUpdated && $options.onFilterUpdated.apply($options, arguments);
|
|
1162
1162
|
}),
|
|
1163
|
+
onVnodeUpdated: _cache[9] || (_cache[9] = function () {
|
|
1164
|
+
return $options.onFilterUpdated && $options.onFilterUpdated.apply($options, arguments);
|
|
1165
|
+
}),
|
|
1163
1166
|
"class": _ctx.cx('filterInput'),
|
|
1164
1167
|
placeholder: _ctx.filterPlaceholder,
|
|
1165
1168
|
role: "searchbox",
|
|
1166
1169
|
autocomplete: "off",
|
|
1167
1170
|
"aria-owns": $data.id + '_list',
|
|
1168
1171
|
"aria-activedescendant": $options.focusedOptionId,
|
|
1169
|
-
onKeydown: _cache[
|
|
1172
|
+
onKeydown: _cache[10] || (_cache[10] = function () {
|
|
1170
1173
|
return $options.onFilterKeyDown && $options.onFilterKeyDown.apply($options, arguments);
|
|
1171
1174
|
}),
|
|
1172
|
-
onBlur: _cache[
|
|
1175
|
+
onBlur: _cache[11] || (_cache[11] = function () {
|
|
1173
1176
|
return $options.onFilterBlur && $options.onFilterBlur.apply($options, arguments);
|
|
1174
1177
|
}),
|
|
1175
|
-
onInput: _cache[
|
|
1178
|
+
onInput: _cache[12] || (_cache[12] = function () {
|
|
1176
1179
|
return $options.onFilterChange && $options.onFilterChange.apply($options, arguments);
|
|
1177
1180
|
})
|
|
1178
1181
|
}, _objectSpread(_objectSpread({}, _ctx.filterInputProps), _ctx.ptm('filterInput'))), null, 16, _hoisted_4), vue.renderSlot(_ctx.$slots, "filtericon", {
|
|
@@ -1327,7 +1330,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
1327
1330
|
"aria-hidden": "true",
|
|
1328
1331
|
"class": "p-hidden-accessible p-hidden-focusable",
|
|
1329
1332
|
tabindex: 0,
|
|
1330
|
-
onFocus: _cache[
|
|
1333
|
+
onFocus: _cache[13] || (_cache[13] = function () {
|
|
1331
1334
|
return $options.onLastHiddenFocus && $options.onLastHiddenFocus.apply($options, arguments);
|
|
1332
1335
|
})
|
|
1333
1336
|
}, _ctx.ptm('hiddenLastFocusableEl'), {
|