@descope/web-components-ui 1.0.378 → 1.0.379
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.cjs.js +3166 -1257
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.esm.js +4738 -2826
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/1224.js +1 -1
- package/dist/umd/1438.js +3 -3
- package/dist/umd/1612.js +1 -1
- package/dist/umd/2773.js +4 -4
- package/dist/umd/3830.js +1 -1
- package/dist/umd/3951.js +1 -1
- package/dist/umd/3966.js +319 -0
- package/dist/umd/4024.js +1 -1
- package/dist/umd/4052.js +1 -1
- package/dist/umd/4392.js +1 -1
- package/dist/umd/4525.js +1 -1
- package/dist/umd/4978.js +1 -1
- package/dist/umd/5135.js +2 -2
- package/dist/umd/5517.js +1 -1
- package/dist/umd/5778.js +275 -0
- package/dist/umd/5806.js +1 -1
- package/dist/umd/5977.js +140 -0
- package/dist/umd/5977.js.LICENSE.txt +29 -0
- package/dist/umd/63.js +4 -4
- package/dist/umd/6770.js +1 -1
- package/dist/umd/7056.js +3 -3
- package/dist/umd/7284.js +1 -1
- package/dist/umd/7541.js +449 -0
- package/dist/umd/7541.js.LICENSE.txt +17 -0
- package/dist/umd/7911.js +2 -2
- package/dist/umd/{4028.js → 8060.js} +3 -3
- package/dist/umd/8137.js +1 -1
- package/dist/umd/8191.js +2 -2
- package/dist/umd/8655.js +123 -0
- package/dist/umd/9314.js +2 -2
- package/dist/umd/9423.js +6 -6
- package/dist/umd/9562.js +1 -1
- package/dist/umd/DescopeDev.js +1 -1
- package/dist/umd/descope-apps-list-index-js.js +1 -1
- package/dist/umd/descope-avatar-index-js.js +1 -1
- package/dist/umd/descope-button-index-js.js +1 -1
- package/dist/umd/descope-combo-box-index-js.js +5 -5
- package/dist/umd/descope-date-field-descope-calendar-index-js.js +1 -0
- package/dist/umd/descope-date-field-index-js.js +1 -0
- package/dist/umd/descope-email-field-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +2 -2
- package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
- package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +4 -4
- package/dist/umd/descope-new-password-index-js.js +1 -1
- package/dist/umd/descope-number-field-index-js.js +1 -1
- package/dist/umd/descope-passcode-index-js.js +1 -1
- package/dist/umd/descope-radio-group-index-js.js +1 -1
- package/dist/umd/descope-text-field-index-js.js +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +1 -1
- package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
- package/package.json +11 -5
- package/src/components/descope-combo-box/ComboBoxClass.js +7 -1
- package/src/components/descope-date-field/DateCounterClass.js +83 -0
- package/src/components/descope-date-field/DateFieldClass.js +675 -0
- package/src/components/descope-date-field/consts.js +55 -0
- package/src/components/descope-date-field/descope-calendar/CalendarClass.js +666 -0
- package/src/components/descope-date-field/descope-calendar/helpers.js +186 -0
- package/src/components/descope-date-field/descope-calendar/index.js +9 -0
- package/src/components/descope-date-field/formats.js +49 -0
- package/src/components/descope-date-field/helpers.js +72 -0
- package/src/components/descope-date-field/icons.js +14 -0
- package/src/components/descope-date-field/index.js +10 -0
- package/src/components/descope-text-field/textFieldMappings.js +2 -0
- package/src/index.cjs.js +2 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -1
- package/src/mixins/inputValidationMixin.js +8 -2
- package/src/mixins/portalMixin.js +6 -3
- package/src/theme/components/calendar.js +94 -0
- package/src/theme/components/dateField.js +63 -0
- package/src/theme/components/index.js +4 -0
- package/src/theme/components/inputWrapper.js +6 -0
- package/src/theme/components/textField.js +1 -0
- package/dist/umd/4746.js +0 -124
- package/dist/umd/7531.js +0 -319
- package/dist/umd/8866.js +0 -275
- package/dist/umd/9092.js +0 -1086
- package/dist/umd/9092.js.LICENSE.txt +0 -27
- package/dist/umd/descope-date-picker-index-js.js +0 -1
- package/src/components/descope-date-picker/index.js +0 -20
- /package/dist/umd/{7531.js.LICENSE.txt → 3966.js.LICENSE.txt} +0 -0
- /package/dist/umd/{8866.js.LICENSE.txt → 5778.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4028.js.LICENSE.txt → 8060.js.LICENSE.txt} +0 -0
- /package/dist/umd/{4746.js.LICENSE.txt → 8655.js.LICENSE.txt} +0 -0
package/dist/umd/1224.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 1224.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1224],{61224:(t,e,n)=>{n.d(e,{D:()=>c});var o=n(99109),s=n(95229),i=n(52628);const c=t=>class extends((0,s.f)((0,i.L)(t))){get _activeKeys(){return[" "]}ready(){super.ready(),(0,o.NH)(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),(0,o.NH)(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}},99109:(t,e,n)=>{n.d(e,{
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1224],{61224:(t,e,n)=>{n.d(e,{D:()=>c});var o=n(99109),s=n(95229),i=n(52628);const c=t=>class extends((0,s.f)((0,i.L)(t))){get _activeKeys(){return[" "]}ready(){super.ready(),(0,o.NH)(this,"down",(t=>{this._shouldSetActive(t)&&this._setActive(!0)})),(0,o.NH)(this,"up",(()=>{this._setActive(!1)}))}disconnectedCallback(){super.disconnectedCallback(),this._setActive(!1)}_shouldSetActive(t){return!this.disabled}_onKeyDown(t){super._onKeyDown(t),this._shouldSetActive(t)&&this._activeKeys.includes(t.key)&&(this._setActive(!0),document.addEventListener("keyup",(t=>{this._activeKeys.includes(t.key)&&this._setActive(!1)}),{once:!0}))}_setActive(t){this.toggleAttribute("active",t)}}},99109:(t,e,n)=>{n.d(e,{NH:()=>M});var o=n(87913);const s=!1,i=t=>t,c="string"==typeof document.head.style.touchAction,u="__polymerGestures",r="__polymerGesturesHandled",a="__polymerGesturesTouchAction",h=["mousedown","mousemove","mouseup","click"],d=[0,1,4,2],f=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function l(t){return h.indexOf(t)>-1}let m=!1;function p(t){if(!l(t)&&"touchend"!==t)return c&&m&&s?{passive:!0}:void 0}!function(){try{const t=Object.defineProperty({},"passive",{get(){m=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();const v=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/u),y={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function w(t){const e=t.type;if(!l(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!f&&(e=d[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}const g={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function b(t,e,n){t.movefn=e,t.upfn=n,document.addEventListener("mousemove",e),document.addEventListener("mouseup",n)}function _(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}const x=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],k={},E=[];function A(t){const e=x(t);return e.length>0?e[0]:t.target}function N(t){const e=t.type,n=t.currentTarget[u];if(!n)return;const o=n[e];if(!o)return;if(!t[r]&&(t[r]={},e.startsWith("touch"))){const n=t.changedTouches[0];if("touchstart"===e&&1===t.touches.length&&(g.touch.id=n.identifier),g.touch.id!==n.identifier)return;c||"touchstart"!==e&&"touchmove"!==e||function(t){const e=t.changedTouches[0],n=t.type;if("touchstart"===n)g.touch.x=e.clientX,g.touch.y=e.clientY,g.touch.scrollDecided=!1;else if("touchmove"===n){if(g.touch.scrollDecided)return;g.touch.scrollDecided=!0;const n=function(t){let e="auto";const n=x(t);for(let t,o=0;o<n.length;o++)if(t=n[o],t[a]){e=t[a];break}return e}(t);let o=!1;const s=Math.abs(g.touch.x-e.clientX),i=Math.abs(g.touch.y-e.clientY);t.cancelable&&("none"===n?o=!0:"pan-x"===n?o=i>s:"pan-y"===n&&(o=s>i)),o?t.preventDefault():T("track")}}(t)}const s=t[r];if(!s.skip){for(let e,n=0;n<E.length;n++)e=E[n],o[e.name]&&!s[e.name]&&e.flow&&e.flow.start.indexOf(t.type)>-1&&e.reset&&e.reset();for(let n,i=0;i<E.length;i++)n=E[i],o[n.name]&&!s[n.name]&&(s[n.name]=!0,n[e](t))}}function M(t,e,n){return!!k[e]&&(function(t,e,n){const s=k[e],i=s.deps,r=s.name;let h=t[u];h||(t[u]=h={});for(let e,n,o=0;o<i.length;o++)e=i[o],v&&l(e)&&"click"!==e||(n=h[e],n||(h[e]=n={_count:0}),0===n._count&&t.addEventListener(e,N,p(e)),n[r]=(n[r]||0)+1,n._count=(n._count||0)+1);t.addEventListener(e,n),s.touchAction&&function(t,e){c&&t instanceof HTMLElement&&o.YA.run((()=>{t.style.touchAction=e})),t[a]=e}(t,s.touchAction)}(t,e,n),!0)}function Y(t){E.push(t),t.emits.forEach((e=>{k[e]=t}))}function D(t,e,n){const o=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(o.detail=n,i(t).dispatchEvent(o),o.defaultPrevented){const t=n.preventer||n.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function T(t){const e=function(t){for(let e,n=0;n<E.length;n++){e=E[n];for(let n,o=0;o<e.emits.length;o++)if(n=e.emits[o],n===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function X(t,e,n,o){e&&D(e,t,{x:n.clientX,y:n.clientY,sourceEvent:n,preventer:o,prevent:t=>T(t)})}function L(t,e,n){if(t.prevent)return!1;if(t.started)return!0;const o=Math.abs(t.x-e),s=Math.abs(t.y-n);return o>=5||s>=5}function P(t,e,n){if(!e)return;const o=t.moves[t.moves.length-2],s=t.moves[t.moves.length-1],i=s.x-t.x,c=s.y-t.y;let u,r=0;o&&(u=s.x-o.x,r=s.y-o.y),D(e,"track",{state:t.state,x:n.clientX,y:n.clientY,dx:i,dy:c,ddx:u,ddy:r,sourceEvent:n,hover:()=>function(t,e){let n=document.elementFromPoint(t,e),o=n;for(;o&&o.shadowRoot&&!window.ShadyDOM;){const s=o;if(o=o.shadowRoot.elementFromPoint(t,e),s===o)break;o&&(n=o)}return n}(n.clientX,n.clientY)})}function O(t,e,n){const o=Math.abs(e.clientX-t.x),s=Math.abs(e.clientY-t.y),i=A(n||e);!i||y[i.localName]&&i.hasAttribute("disabled")||(isNaN(o)||isNaN(s)||o<=25&&s<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;const e=A(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;const n=e.getBoundingClientRect(),o=t.pageX,s=t.pageY;return!(o>=n.left&&o<=n.right&&s>=n.top&&s<=n.bottom)}return!1}(e))&&(t.prevent||D(i,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:n}))}Y({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset(){_(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this;b(this.info,(t=>{w(t)||(X("up",e,t),_(n.info))}),(t=>{w(t)&&X("up",e,t),_(n.info)})),X("down",e,t)},touchstart(t){X("down",A(t),t.changedTouches[0],t)},touchend(t){X("up",A(t),t.changedTouches[0],t)}}),Y({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,_(this.info)},mousedown(t){if(!w(t))return;const e=A(t),n=this,o=t=>{const o=t.clientX,s=t.clientY;L(n.info,o,s)&&(n.info.state=n.info.started?"mouseup"===t.type?"end":"track":"start","start"===n.info.state&&T("tap"),n.info.addMove({x:o,y:s}),w(t)||(n.info.state="end",_(n.info)),e&&P(n.info,e,t),n.info.started=!0)};b(this.info,o,(t=>{n.info.started&&o(t),_(n.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove(t){const e=A(t),n=t.changedTouches[0],o=n.clientX,s=n.clientY;L(this.info,o,s)&&("start"===this.info.state&&T("tap"),this.info.addMove({x:o,y:s}),P(this.info,e,n),this.info.state="track",this.info.started=!0)},touchend(t){const e=A(t),n=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:n.clientX,y:n.clientY}),P(this.info,e,n))}}),Y({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown(t){w(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click(t){w(t)&&O(this.info,t)},touchstart(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend(t){O(this.info,t.changedTouches[0],t)}})}}]);
|
package/dist/umd/1438.js
CHANGED
@@ -153,7 +153,7 @@
|
|
153
153
|
color: var(--lumo-contrast-60pct);
|
154
154
|
cursor: var(--lumo-clickable-cursor);
|
155
155
|
}
|
156
|
-
`;(0,s.hC)("vaadin-multi-select-combo-box",[d.J,m],{moduleId:"lumo-multi-select-combo-box"});var v=o(
|
156
|
+
`;(0,s.hC)("vaadin-multi-select-combo-box",[d.J,m],{moduleId:"lumo-multi-select-combo-box"});var v=o(3354),b=o(52807);class _ extends((0,s.Tb)(v.H3)){static get is(){return"vaadin-multi-select-combo-box-chip"}static get properties(){return{disabled:{type:Boolean,reflectToAttribute:!0},readonly:{type:Boolean,reflectToAttribute:!0},label:{type:String},item:{type:Object}}}static get template(){return v.dy`
|
157
157
|
<style>
|
158
158
|
:host {
|
159
159
|
display: inline-flex;
|
@@ -246,7 +246,7 @@
|
|
246
246
|
<div id="selector">
|
247
247
|
<slot></slot>
|
248
248
|
</div>
|
249
|
-
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return!(e instanceof B.h)&&!this.owner.readonly&&this.owner._findIndex(e,this.owner.selectedItems,o)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}(0,b.M)(z);var $=o(99031),P=o(
|
249
|
+
`}ready(){super.ready(),this.setAttribute("aria-multiselectable","true")}_isItemSelected(e,t,o){return!(e instanceof B.h)&&!this.owner.readonly&&this.owner._findIndex(e,this.owner.selectedItems,o)>-1}_updateElement(e,t){super._updateElement(e,t),e.toggleAttribute("readonly",this.owner.readonly)}}(0,b.M)(z);var $=o(99031),P=o(66599);class V extends((0,$.Y)((0,P.t)((0,s.Tb)(v.H3)))){static get is(){return"vaadin-multi-select-combo-box-internal"}static get template(){return v.dy`
|
250
250
|
<style>
|
251
251
|
:host([opened]) {
|
252
252
|
pointer-events: auto;
|
@@ -371,7 +371,7 @@
|
|
371
371
|
</div>
|
372
372
|
|
373
373
|
<slot name="tooltip"></slot>
|
374
|
-
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,value:"",observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},__effectiveItems:{type:Array,computed:"__computeEffectiveItems(items, selectedItems, readonly)"},__effectiveFilteredItems:{type:Array,computed:"__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)"},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return[...super.slotStyles,`\n ${e}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new G.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new W.v(this.inputElement,this._labelController)),this._tooltipController=new D.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((e=>!e.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new L.n(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",(e=>this._preventBlur(e))),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),(0,R.k)(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),(0,F.x)(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){this.stateTarget&&("required"!==e?super._delegateAttribute(e,t):this._delegateAttribute("aria-required",!!t&&"true"))}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||null==t)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder=t,this.placeholder=t}else delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder;this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map((e=>this._getItemLabel(e))).join(", ")}_findIndex(e,t,o){if(o&&e){for(let i=0;i<t.length;i++)if(t[i]&&t[i][o]===e[o])return i;return-1}return t.indexOf(e)}__clearFilter(){this.filter="",this.$.comboBox.clear()}__announceItem(e,t,o){const i=t?"selected":"deselected",s=this.i18n.total.replace("{count}",o||0);(0,F.x)(`${e} ${this.i18n[i]} ${s}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const o=this._getItemLabel(e);this.__announceItem(o,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],o=this._findIndex(e,t,this.itemIdPath),i=this._getItemLabel(e);let s=!1;if(-1!==o){const e=this._lastFilter;if(e&&e.toLowerCase()===i.toLowerCase())return void this.__clearFilter();t.splice(o,1)}else t.push(e),s=!0;this.__updateSelection(t),this.__clearFilter(),this.__announceItem(i,s,t.length)}__updateSelection(e){this.selectedItems=e,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,o){e?o||(this._topGroup=[...t]):this._topGroup=[]}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const o=this._getItemLabel(e);return t.label=o,t.setAttribute("title",o),t.addEventListener("item-removed",(e=>this._onItemRemoved(e))),t.addEventListener("mousedown",(e=>this._preventBlur(e))),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),i=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",i}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((e=>{e.remove()}));const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let i=t-o;e.length>1&&(i-=this.__getOverflowWidth());const s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const t=[];for(let o=e.length-1,i=null;o>=0;o--){const s=this.__createChip(e[o]);this.insertBefore(s,i),i=s,t.unshift(s)}const l=[],a=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&a<o){for(;t.length>1;){t.pop().remove(),l.unshift(e.pop());const i=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=i)break}1===t.length&&(t[0].style.maxWidth=`${Math.max(s,i)}px`)}this._overflowItems=l}else{for(let t=e.length-1,o=null;t>=0;t--){const l=this.__createChip(e[t]);if(this.insertBefore(l,o),!this.autoExpandVertically&&this.$.chips.clientWidth>i){if(null!==o){l.remove();break}l.style.maxWidth=`${Math.max(s,i)}px`}e.pop(),o=l}this._overflowItems=e}}__updateOverflowChip(e,t,o,i){if(e){const s=t.length;e.label=`${s}`,e.setAttribute("count",`${s}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===s),e.disabled=o,e.readonly=i}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?o===e.length-1?i=-1:o>-1&&(i=o+1):-1===o?i=e.length-1:o>0&&(i=o-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?-1===o?i=e.length-1:o>0&&(i=o-1):o===e.length-1?i=-1:o>-1&&(i=o+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;const t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const t=this._chips;if(t.forEach(((t,o)=>{t.toggleAttribute("focused",o===e)})),e>-1){const o=t[e].item,i=this._getItemLabel(o);(0,F.x)(`${i} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearFilter(),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}__computeEffectiveItems(e,t,o){return e&&o?t:e}__computeEffectiveFilteredItems(e,t,o,i){return!e&&i?o:t}}(0,b.M)(M)},13423:(e,t,o)=>{o.d(t,{a:()=>c});var i=o(74241),s=o(52807),l=o(51914),a=o(40262),r=o(46570),n=o(44457),d=o(6196);(0,r.hC)("vaadin-overlay",d.r,{moduleId:"vaadin-overlay-styles"});class c extends((0,n.F)((0,r.Tb)((0,l.U)(i.H3)))){static get template(){return i.dy`
|
374
|
+
`}static get properties(){return{autoExpandHorizontally:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandHorizontallyChanged"},autoExpandVertically:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_autoExpandVerticallyChanged"},autoOpenDisabled:Boolean,clearButtonVisible:{type:Boolean,reflectToAttribute:!0,observer:"_clearButtonVisibleChanged",value:!1},items:{type:Array},itemLabelPath:{type:String,value:"label"},itemValuePath:{type:String,value:"value"},itemIdPath:{type:String},i18n:{type:Object,value:()=>({cleared:"Selection cleared",focused:"focused. Press Backspace to remove",selected:"added to selection",deselected:"removed from selection",total:"{count} items selected"})},loading:{type:Boolean,value:!1,reflectToAttribute:!0},overlayClass:{type:String},readonly:{type:Boolean,value:!1,observer:"_readonlyChanged",reflectToAttribute:!0},selectedItems:{type:Array,value:()=>[],notify:!0},opened:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},size:{type:Number},pageSize:{type:Number,value:50,observer:"_pageSizeChanged"},dataProvider:{type:Object},allowCustomValue:{type:Boolean,value:!1},placeholder:{type:String,value:"",observer:"_placeholderChanged"},renderer:Function,filter:{type:String,value:"",notify:!0},filteredItems:Array,selectedItemsOnTop:{type:Boolean,value:!1},value:{type:String},__effectiveItems:{type:Array,computed:"__computeEffectiveItems(items, selectedItems, readonly)"},__effectiveFilteredItems:{type:Array,computed:"__computeEffectiveFilteredItems(items, filteredItems, selectedItems, readonly)"},_overflowItems:{type:Array,value:()=>[]},_focusedChipIndex:{type:Number,value:-1,observer:"_focusedChipIndexChanged"},_lastFilter:{type:String},_topGroup:{type:Array}}}static get observers(){return["_selectedItemsChanged(selectedItems, selectedItems.*)","__updateOverflowChip(_overflow, _overflowItems, disabled, readonly)","__updateTopGroup(selectedItemsOnTop, selectedItems, opened)"]}get slotStyles(){const e=this.localName;return[...super.slotStyles,`\n ${e}[has-value] input::placeholder {\n color: transparent !important;\n forced-color-adjust: none;\n }\n `]}get clearElement(){return this.$.clearButton}get _chips(){return[...this.querySelectorAll('[slot="chip"]')]}get _hasValue(){return this.selectedItems&&this.selectedItems.length>0}ready(){super.ready(),this.addController(new G.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new W.v(this.inputElement,this._labelController)),this._tooltipController=new D.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((e=>!e.opened)),this._inputField=this.shadowRoot.querySelector('[part="input-field"]'),this._overflowController=new L.n(this,"overflow","vaadin-multi-select-combo-box-chip",{initializer:e=>{e.addEventListener("mousedown",(e=>this._preventBlur(e))),this._overflow=e}}),this.addController(this._overflowController),this.__updateChips(),(0,R.k)(this)}checkValidity(){return!(this.required&&!this.readonly)||this._hasValue}clear(){this.__updateSelection([]),(0,F.x)(this.i18n.cleared)}clearCache(){this.$&&this.$.comboBox&&this.$.comboBox.clearCache()}requestContentUpdate(){this.$&&this.$.comboBox&&this.$.comboBox.requestContentUpdate()}_disabledChanged(e,t){super._disabledChanged(e,t),(e||t)&&this.__updateChips()}_inputElementChanged(e){super._inputElementChanged(e),e&&this.$.comboBox._setInputElement(e)}_setFocused(e){super._setFocused(e),!e&&document.hasFocus()&&(this._focusedChipIndex=-1,this.validate())}_onResize(){this.__updateChips()}_delegateAttribute(e,t){this.stateTarget&&("required"!==e?super._delegateAttribute(e,t):this._delegateAttribute("aria-required",!!t&&"true"))}_autoExpandHorizontallyChanged(e,t){(e||t)&&this.__updateChips()}_autoExpandVerticallyChanged(e,t){(e||t)&&this.__updateChips()}_clearButtonVisibleChanged(e,t){(e||t)&&this.__updateChips()}_onFilteredItemsChanged(e){const{value:t}=e.detail;(Array.isArray(t)||null==t)&&(this.filteredItems=t)}_readonlyChanged(e,t){(e||t)&&this.__updateChips(),this.dataProvider&&this.clearCache()}_pageSizeChanged(e,t){(Math.floor(e)!==e||e<=0)&&(this.pageSize=t,console.error('"pageSize" value must be an integer > 0')),this.$.comboBox.pageSize=this.pageSize}_placeholderChanged(e){const t=this.__tmpA11yPlaceholder;t!==e&&(this.__savedPlaceholder=e,t&&(this.placeholder=t))}_selectedItemsChanged(e){if(this._toggleHasValue(this._hasValue),this._hasValue){const t=this._mergeItemLabels(e);this.__tmpA11yPlaceholder=t,this.placeholder=t}else delete this.__tmpA11yPlaceholder,this.placeholder=this.__savedPlaceholder;this.__updateChips(),this.requestContentUpdate(),this.opened&&this.$.comboBox.$.overlay._updateOverlayWidth()}_getItemLabel(e){return this.$.comboBox._getItemLabel(e)}_mergeItemLabels(e){return e.map((e=>this._getItemLabel(e))).join(", ")}_findIndex(e,t,o){if(o&&e){for(let i=0;i<t.length;i++)if(t[i]&&t[i][o]===e[o])return i;return-1}return t.indexOf(e)}__clearFilter(){this.filter="",this.$.comboBox.clear()}__announceItem(e,t,o){const i=t?"selected":"deselected",s=this.i18n.total.replace("{count}",o||0);(0,F.x)(`${e} ${this.i18n[i]} ${s}`)}__removeItem(e){const t=[...this.selectedItems];t.splice(t.indexOf(e),1),this.__updateSelection(t);const o=this._getItemLabel(e);this.__announceItem(o,!1,t.length)}__selectItem(e){const t=[...this.selectedItems],o=this._findIndex(e,t,this.itemIdPath),i=this._getItemLabel(e);let s=!1;if(-1!==o){const e=this._lastFilter;if(e&&e.toLowerCase()===i.toLowerCase())return void this.__clearFilter();t.splice(o,1)}else t.push(e),s=!0;this.__updateSelection(t),this.__clearFilter(),this.__announceItem(i,s,t.length)}__updateSelection(e){this.selectedItems=e,this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}__updateTopGroup(e,t,o){e?o||(this._topGroup=[...t]):this._topGroup=[]}__createChip(e){const t=document.createElement("vaadin-multi-select-combo-box-chip");t.setAttribute("slot","chip"),t.item=e,t.disabled=this.disabled,t.readonly=this.readonly;const o=this._getItemLabel(e);return t.label=o,t.setAttribute("title",o),t.addEventListener("item-removed",(e=>this._onItemRemoved(e))),t.addEventListener("mousedown",(e=>this._preventBlur(e))),t}__getOverflowWidth(){const e=this._overflow;e.style.visibility="hidden",e.removeAttribute("hidden");const t=e.getAttribute("count");e.setAttribute("count","99");const o=getComputedStyle(e),i=e.clientWidth+parseInt(o.marginInlineStart);return e.setAttribute("count",t),e.setAttribute("hidden",""),e.style.visibility="",i}__updateChips(){if(!this._inputField||!this.inputElement)return;this._chips.forEach((e=>{e.remove()}));const e=[...this.selectedItems],t=this._inputField.$.wrapper.clientWidth,o=parseInt(getComputedStyle(this.inputElement).flexBasis);let i=t-o;e.length>1&&(i-=this.__getOverflowWidth());const s=parseInt(getComputedStyle(this).getPropertyValue("--_chip-min-width"));if(this.autoExpandHorizontally){const t=[];for(let o=e.length-1,i=null;o>=0;o--){const s=this.__createChip(e[o]);this.insertBefore(s,i),i=s,t.unshift(s)}const l=[],a=this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth;if(!this.autoExpandVertically&&a<o){for(;t.length>1;){t.pop().remove(),l.unshift(e.pop());const i=l.length>0?o+this.__getOverflowWidth():o;if(this._inputField.$.wrapper.clientWidth-this.$.chips.clientWidth>=i)break}1===t.length&&(t[0].style.maxWidth=`${Math.max(s,i)}px`)}this._overflowItems=l}else{for(let t=e.length-1,o=null;t>=0;t--){const l=this.__createChip(e[t]);if(this.insertBefore(l,o),!this.autoExpandVertically&&this.$.chips.clientWidth>i){if(null!==o){l.remove();break}l.style.maxWidth=`${Math.max(s,i)}px`}e.pop(),o=l}this._overflowItems=e}}__updateOverflowChip(e,t,o,i){if(e){const s=t.length;e.label=`${s}`,e.setAttribute("count",`${s}`),e.setAttribute("title",this._mergeItemLabels(t)),e.toggleAttribute("hidden",0===s),e.disabled=o,e.readonly=i}}_onClearButtonTouchend(e){e.preventDefault(),e.stopPropagation(),this.clear()}_onClearButtonClick(e){e.stopPropagation(),this.clear()}_onChange(e){e.stopPropagation()}_onEscape(e){this.clearButtonVisible&&this.selectedItems&&this.selectedItems.length&&(e.stopPropagation(),this.selectedItems=[])}_onKeyDown(e){super._onKeyDown(e);const t=this._chips;if(!this.readonly&&t.length>0)switch(e.key){case"Backspace":this._onBackSpace(t);break;case"ArrowLeft":this._onArrowLeft(t,e);break;case"ArrowRight":this._onArrowRight(t,e);break;default:this._focusedChipIndex=-1}}_onArrowLeft(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?o===e.length-1?i=-1:o>-1&&(i=o+1):-1===o?i=e.length-1:o>0&&(i=o-1),void 0!==i&&(this._focusedChipIndex=i)}_onArrowRight(e,t){if(0!==this.inputElement.selectionStart)return;const o=this._focusedChipIndex;let i;-1!==o&&t.preventDefault(),this.__isRTL?-1===o?i=e.length-1:o>0&&(i=o-1):o===e.length-1?i=-1:o>-1&&(i=o+1),void 0!==i&&(this._focusedChipIndex=i)}_onBackSpace(e){if(0!==this.inputElement.selectionStart)return;const t=this._focusedChipIndex;-1===t?this._focusedChipIndex=e.length-1:(this.__removeItem(e[t].item),this._focusedChipIndex=-1)}_focusedChipIndexChanged(e,t){if(e>-1||t>-1){const t=this._chips;if(t.forEach(((t,o)=>{t.toggleAttribute("focused",o===e)})),e>-1){const o=t[e].item,i=this._getItemLabel(o);(0,F.x)(`${i} ${this.i18n.focused}`)}}}_onComboBoxChange(){const e=this.$.comboBox.selectedItem;e&&this.__selectItem(e)}_onComboBoxItemSelected(e){this.__selectItem(e.detail.item)}_onCustomValueSet(e){e.preventDefault(),e.stopPropagation(),this.__clearFilter(),this.dispatchEvent(new CustomEvent("custom-value-set",{detail:e.detail,composed:!0,bubbles:!0}))}_onItemRemoved(e){this.__removeItem(e.detail.item)}_preventBlur(e){e.preventDefault()}__computeEffectiveItems(e,t,o){return e&&o?t:e}__computeEffectiveFilteredItems(e,t,o,i){return!e&&i?o:t}}(0,b.M)(M)},13423:(e,t,o)=>{o.d(t,{a:()=>c});var i=o(3354),s=o(52807),l=o(51914),a=o(40262),r=o(46570),n=o(14932),d=o(6196);(0,r.hC)("vaadin-overlay",d.r,{moduleId:"vaadin-overlay-styles"});class c extends((0,n.F)((0,r.Tb)((0,l.U)(i.H3)))){static get template(){return i.dy`
|
375
375
|
<div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
|
376
376
|
<div part="overlay" id="overlay" tabindex="0">
|
377
377
|
<div part="content" id="content">
|
package/dist/umd/1612.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*! For license information please see 1612.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1612,4024,9562,4052],{95229:(t,e,o)=>{o.d(e,{f:()=>r});const r=(0,o(91014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},21360:(t,e,o)=>{o.d(e,{W:()=>n});var r=o(91014),i=o(3550);const n=(0,r.o)((t=>class extends t{get _keyboardActive(){return(0,i.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>c,GO:()=>h,Gf:()=>i,LQ:()=>n,Qw:()=>u});let r=!1;function i(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function n(){return r}function a(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function s(t,e){const o=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===o||0===r?r>o:o>r}function l(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)s(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(l(t.slice(0,o)),l(t.slice(o)))}function c(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||a(t)}function u(t){return t.getRootNode().activeElement===t}function d(t,e){if(t.nodeType!==Node.ELEMENT_NODE||a(t))return!1;const o=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let i=r>0;r>=0&&e.push(o);let n=[];return n="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...n].forEach((t=>{i=d(t,e)||i})),i}function h(t){const e=[];return d(t,e)?l(e):e}window.addEventListener("keydown",(()=>{r=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{r=!1}),{capture:!0})},52628:(t,e,o)=>{o.d(e,{L:()=>r});const r=(0,o(91014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},58298:(t,e,o)=>{o.d(e,{N:()=>i});var r=o(95229);const i=t=>class extends((0,r.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},17078:(t,e,o)=>{o.d(e,{z:()=>b});var r=o(
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1612,4024,9562,4052],{95229:(t,e,o)=>{o.d(e,{f:()=>r});const r=(0,o(91014).o)((t=>class extends t{static get properties(){return{disabled:{type:Boolean,value:!1,observer:"_disabledChanged",reflectToAttribute:!0}}}_disabledChanged(t){this._setAriaDisabled(t)}_setAriaDisabled(t){t?this.setAttribute("aria-disabled","true"):this.removeAttribute("aria-disabled")}click(){this.disabled||super.click()}}))},21360:(t,e,o)=>{o.d(e,{W:()=>n});var r=o(91014),i=o(3550);const n=(0,r.o)((t=>class extends t{get _keyboardActive(){return(0,i.LQ)()}ready(){this.addEventListener("focusin",(t=>{this._shouldSetFocus(t)&&this._setFocused(!0)})),this.addEventListener("focusout",(t=>{this._shouldRemoveFocus(t)&&this._setFocused(!1)})),super.ready()}disconnectedCallback(){super.disconnectedCallback(),this.hasAttribute("focused")&&this._setFocused(!1)}_setFocused(t){this.toggleAttribute("focused",t),this.toggleAttribute("focus-ring",t&&this._keyboardActive)}_shouldSetFocus(t){return!0}_shouldRemoveFocus(t){return!0}}))},3550:(t,e,o)=>{o.d(e,{GF:()=>c,GO:()=>h,Gf:()=>i,LQ:()=>n,Qw:()=>u});let r=!1;function i(){let t=document.activeElement||document.body;for(;t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function n(){return r}function a(t){const e=t.style;if("hidden"===e.visibility||"none"===e.display)return!0;const o=window.getComputedStyle(t);return"hidden"===o.visibility||"none"===o.display}function s(t,e){const o=Math.max(t.tabIndex,0),r=Math.max(e.tabIndex,0);return 0===o||0===r?r>o:o>r}function l(t){const e=t.length;if(e<2)return t;const o=Math.ceil(e/2);return function(t,e){const o=[];for(;t.length>0&&e.length>0;)s(t[0],e[0])?o.push(e.shift()):o.push(t.shift());return o.concat(t,e)}(l(t.slice(0,o)),l(t.slice(o)))}function c(t){return null===t.offsetParent&&0===t.clientWidth&&0===t.clientHeight||a(t)}function u(t){return t.getRootNode().activeElement===t}function d(t,e){if(t.nodeType!==Node.ELEMENT_NODE||a(t))return!1;const o=t,r=function(t){if(!function(t){return!t.matches('[tabindex="-1"]')&&(t.matches("input, select, textarea, button, object")?t.matches(":not([disabled])"):t.matches("a[href], area[href], iframe, [tabindex], [contentEditable]"))}(t))return-1;const e=t.getAttribute("tabindex")||0;return Number(e)}(o);let i=r>0;r>=0&&e.push(o);let n=[];return n="slot"===o.localName?o.assignedNodes({flatten:!0}):(o.shadowRoot||o).children,[...n].forEach((t=>{i=d(t,e)||i})),i}function h(t){const e=[];return d(t,e)?l(e):e}window.addEventListener("keydown",(()=>{r=!0}),{capture:!0}),window.addEventListener("mousedown",(()=>{r=!1}),{capture:!0})},52628:(t,e,o)=>{o.d(e,{L:()=>r});const r=(0,o(91014).o)((t=>class extends t{ready(){super.ready(),this.addEventListener("keydown",(t=>{this._onKeyDown(t)})),this.addEventListener("keyup",(t=>{this._onKeyUp(t)}))}_onKeyDown(t){switch(t.key){case"Enter":this._onEnter(t);break;case"Escape":this._onEscape(t)}}_onKeyUp(t){}_onEnter(t){}_onEscape(t){}}))},58298:(t,e,o)=>{o.d(e,{N:()=>i});var r=o(95229);const i=t=>class extends((0,r.f)(t)){static get properties(){return{tabindex:{type:Number,reflectToAttribute:!0,observer:"_tabindexChanged"},_lastTabIndex:{type:Number}}}_disabledChanged(t,e){super._disabledChanged(t,e),t?(void 0!==this.tabindex&&(this._lastTabIndex=this.tabindex),this.tabindex=-1):e&&(this.tabindex=this._lastTabIndex)}_tabindexChanged(t){this.disabled&&-1!==t&&(this._lastTabIndex=t,this.tabindex=-1)}}},17078:(t,e,o)=>{o.d(e,{z:()=>b});var r=o(3354),i=o(16155),n=o(52807),a=o(12521),s=o(34463),l=o(46570);const c=o(9392).iv`
|
3
3
|
:host {
|
4
4
|
display: inline-block;
|
5
5
|
position: relative;
|
package/dist/umd/2773.js
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
[part='toggle-button']::before {
|
8
8
|
content: var(--lumo-icons-dropdown);
|
9
9
|
}
|
10
|
-
`;(0,n.hC)("vaadin-combo-box",[$.J,r],{moduleId:"lumo-combo-box"}),e(13553);var o=e(
|
10
|
+
`;(0,n.hC)("vaadin-combo-box",[$.J,r],{moduleId:"lumo-combo-box"}),e(13553);var o=e(3354),a=e(52807),i=e(51914),u=e(45115);class l extends((0,u.O)((0,n.Tb)((0,i.U)(o.H3)))){static get template(){return o.dy`
|
11
11
|
<style>
|
12
12
|
:host {
|
13
13
|
display: block;
|
@@ -21,7 +21,7 @@
|
|
21
21
|
<div part="content">
|
22
22
|
<slot></slot>
|
23
23
|
</div>
|
24
|
-
`}static get is(){return"vaadin-combo-box-item"}}(0,a.M)(l);var s=e(
|
24
|
+
`}static get is(){return"vaadin-combo-box-item"}}(0,a.M)(l);var s=e(14932),c=e(6196),f=e(43515);const h=n.iv`
|
25
25
|
#overlay {
|
26
26
|
width: var(--vaadin-combo-box-overlay-width, var(--_vaadin-combo-box-overlay-default-width, auto));
|
27
27
|
}
|
@@ -64,7 +64,7 @@
|
|
64
64
|
<div id="selector">
|
65
65
|
<slot></slot>
|
66
66
|
</div>
|
67
|
-
`}}(0,a.M)(g);var v=e(12521),m=e(34463),b=e(73406),C=e(73208),O=e(46729),P=e(39091);const w=d=>class extends((0,P.t)(d)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var N=e(62743),E=e(99031),x=e(
|
67
|
+
`}}(0,a.M)(g);var v=e(12521),m=e(34463),b=e(73406),C=e(73208),O=e(46729),P=e(39091);const w=d=>class extends((0,P.t)(d)){static get properties(){return{pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"pattern"]}static get constraints(){return[...super.constraints,"pattern"]}};var N=e(62743),E=e(99031),x=e(66599);(0,n.hC)("vaadin-combo-box",N.J,{moduleId:"vaadin-combo-box-styles"});class I extends((0,E.Y)((0,x.t)(w((0,b.L)((0,n.Tb)((0,v.S)(o.H3))))))){static get is(){return"vaadin-combo-box"}static get template(){return o.dy`
|
68
68
|
<style>
|
69
69
|
:host([opened]) {
|
70
70
|
pointer-events: auto;
|
@@ -110,7 +110,7 @@
|
|
110
110
|
></vaadin-combo-box-overlay>
|
111
111
|
|
112
112
|
<slot name="tooltip"></slot>
|
113
|
-
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new C.b(this,(d=>{this._setInputElement(d),this._setFocusElement(d),this.stateTarget=d,this.ariaTarget=d}))),this.addController(new O.v(this.inputElement,this._labelController)),this._tooltipController=new m.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((d=>!d.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(d){d.stopPropagation(),super._onClearButtonClick(d)}_onHostClick(d){const t=d.composedPath();(t.includes(this._labelNode)||t.includes(this._positionTarget))&&super._onHostClick(d)}}(0,a.M)(I)},20422:(d,t,e)=>{e.d(t,{j:()=>n});var $=e(73406);const n=d=>class extends((0,$.L)(d)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(d){this.__dataValue=d}_inputElementChanged(d){super._inputElementChanged(d),d&&(d.value&&d.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),d.value=""),this.value&&(d.value=this.value))}_setFocused(d){super._setFocused(d),!d&&document.hasFocus()&&this.validate()}_onInput(d){super._onInput(d),this.invalid&&this.validate()}_valueChanged(d,t){super._valueChanged(d,t),void 0!==t&&this.invalid&&this.validate()}}},18005:(d,t,e)=>{e.d(t,{n:()=>f}),e(13553);var $=e(
|
113
|
+
`}static get properties(){return{_positionTarget:{type:Object}}}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new C.b(this,(d=>{this._setInputElement(d),this._setFocusElement(d),this.stateTarget=d,this.ariaTarget=d}))),this.addController(new O.v(this.inputElement,this._labelController)),this._tooltipController=new m.f(this),this.addController(this._tooltipController),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this._tooltipController.setShouldShow((d=>!d.opened)),this._positionTarget=this.shadowRoot.querySelector('[part="input-field"]'),this._toggleElement=this.$.toggleButton}_onClearButtonClick(d){d.stopPropagation(),super._onClearButtonClick(d)}_onHostClick(d){const t=d.composedPath();(t.includes(this._labelNode)||t.includes(this._positionTarget))&&super._onHostClick(d)}}(0,a.M)(I)},20422:(d,t,e)=>{e.d(t,{j:()=>n});var $=e(73406);const n=d=>class extends((0,$.L)(d)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(d){this.__dataValue=d}_inputElementChanged(d){super._inputElementChanged(d),d&&(d.value&&d.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),d.value=""),this.value&&(d.value=this.value))}_setFocused(d){super._setFocused(d),!d&&document.hasFocus()&&this.validate()}_onInput(d){super._onInput(d),this.invalid&&this.validate()}_valueChanged(d,t){super._valueChanged(d,t),void 0!==t&&this.invalid&&this.validate()}}},18005:(d,t,e)=>{e.d(t,{n:()=>f}),e(13553);var $=e(3354),n=e(52807),r=e(12521),o=e(34463),a=e(62743),i=e(46570),u=e(73208),l=e(20422),s=e(46729);const c=d=>class extends((0,l.j)(d)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new u.b(this,(d=>{this._setInputElement(d),this._setFocusElement(d),this.stateTarget=d,this.ariaTarget=d}))),this.addController(new s.v(this.inputElement,this._labelController))}};(0,i.hC)("vaadin-text-field",a.J,{moduleId:"vaadin-text-field-styles"});class f extends(c((0,i.Tb)((0,r.S)($.H3)))){static get is(){return"vaadin-text-field"}static get template(){return $.dy`
|
114
114
|
<style>
|
115
115
|
[part='input-field'] {
|
116
116
|
flex-grow: 0;
|
package/dist/umd/3830.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
1
|
/*! For license information please see 3830.js.LICENSE.txt */
|
2
|
-
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3830],{14905:(t,e,i)=>{function s(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}i.d(e,{U:()=>s})},40262:(t,e,i)=>{function s(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}i.d(e,{k:()=>s})},63003:(t,e,i)=>{i.d(e,{d:()=>c});var s=i(87913),l=i(61037),h=i(36139);const r=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),o=r&&r[1]>=8,n={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const t=this._virtualCount;return Math.max(0,t-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),s.YA)}},_getReusables(t){let e,i,s;const l=[],h=this._hiddenContentSize*this._ratio,r=this._virtualStart,o=this._virtualEnd,n=this._physicalCount;let a=this._physicalTop+this._scrollOffset;const _=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-a):(e=this._physicalEnd,i=_-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(l.length>=n||i<=h);)if(t){if(o+l.length+1>=this._virtualCount)break;if(a+s>=c-this._scrollOffset)break;l.push(e),a+=s,e=(e+1)%n}else{if(r-l.length<=0)break;if(a+this._physicalSize-s<=d)break;l.push(e),a-=s,e=0===e?n-1:e-1}return{indexes:l,physicalTop:a-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),s.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),s.YA))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,s.rs))},_iterateItems(t,e){let i,s,l,h;if(2===arguments.length&&e){for(h=0;h<e.length;h++)if(i=e[h],s=this._computeVidx(i),null!=(l=t.call(this,i,s)))return l}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(l=t.call(this,i,s)))return l;for(i=0;i<this._physicalStart;i++,s++)if(null!=(l=t.call(this,i,s)))return l}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!o&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if((0,h.yl)(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const l=this._hiddenContentSize;for(;i<t&&s<=l;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),s.rs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=h.dx.debounce(this._debouncers[t],i,e.bind(this)),(0,h.Ex)(this._debouncers[t])}},a=1e3;class _{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:l,reorderElements:h}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=l||s,this.reorderElements=h,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<a?(i=t,this._vidxOffset=0):(i=a,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){const t=this._physicalCount;0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),(0,h.yl)(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush(),this._physicalCount!==t&&this.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){(0,h.yl)();let e=0,i=0;const s=this._physicalAverageCount,l=this._physicalAverage;this._iterateItems(((t,s)=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((l*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=h.dx.debounce(this.__placeholderClearDebouncer,s.rs,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){if(t===this.size)return;let e,i;if(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__preventElementUpdates=!0,t>0&&(e=this.adjustedFirstVisibleIndex,i=this.__getIndexScrollOffset(e)),this.__size=t,this._itemsChanged({path:"items"}),(0,h.yl)(),t>0){e=Math.min(e,t-1),this.scrollToIndex(e);const s=this.__getIndexScrollOffset(e);void 0!==i&&void 0!==s&&(this._scrollTop+=i-s)}this.__preventElementUpdates=!1,this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),(0,h.yl)()}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=h.dx.debounce(this.__fixInvalidItemPositioningDebouncer,s.Wc.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=h.dx.debounce(this.__scrollReorderDebouncer,s.Wc.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){const t=e,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=h.dx.debounce(this.__debouncerWheelAnimationFrame,s.rs,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=h.dx.debounce(this._debouncerIgnoreNewWheel,s.Wc.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const s=i.__virtualIndex-t,h=e.indexOf(i)-s;if(h>0)for(let t=0;t<h;t++)this.elementsContainer.appendChild(e[t]);else if(h<0)for(let t=e.length+h;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(l.G6){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),e=t*this.size;this._vidxOffset=Math.round(e-t*this._virtualCount)}else{const t=this._vidxOffset,e=a,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const s=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=s,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<s&&(this._vidxOffset+=Math.min(s-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(_.prototype,n);class c{constructor(t){this.__adapter=new _(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}},73208:(t,e,i)=>{i.d(e,{b:()=>l});var s=i(78591);class l extends s.n{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
|
2
|
+
"use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3830],{14905:(t,e,i)=>{function s(t,e){return t.split(".").reduce(((t,e)=>t?t[e]:void 0),e)}function l(t,e,i){const s=t.split("."),l=s.pop();s.reduce(((t,e)=>t[e]),i)[l]=e}i.d(e,{U:()=>s,t:()=>l})},40262:(t,e,i)=>{function s(t){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(t):t.querySelector("template")&&console.warn(`WARNING: <template> inside <${t.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}i.d(e,{k:()=>s})},63003:(t,e,i)=>{i.d(e,{d:()=>c});var s=i(87913),l=i(61037),h=i(36139);const r=navigator.userAgent.match(/iP(?:hone|ad;(?: U;)? CPU) OS (\d+)/u),o=r&&r[1]>=8,a={_ratio:.5,_scrollerPaddingTop:0,_scrollPosition:0,_physicalSize:0,_physicalAverage:0,_physicalAverageCount:0,_physicalTop:0,_virtualCount:0,_estScrollHeight:0,_scrollHeight:0,_viewportHeight:0,_viewportWidth:0,_physicalItems:null,_physicalSizes:null,_firstVisibleIndexVal:null,_lastVisibleIndexVal:null,_maxPages:2,_templateCost:0,get _physicalBottom(){return this._physicalTop+this._physicalSize},get _scrollBottom(){return this._scrollPosition+this._viewportHeight},get _virtualEnd(){return this._virtualStart+this._physicalCount-1},get _hiddenContentSize(){return this._physicalSize-this._viewportHeight},get _maxScrollTop(){return this._estScrollHeight-this._viewportHeight+this._scrollOffset},get _maxVirtualStart(){const t=this._virtualCount;return Math.max(0,t-this._physicalCount)},get _virtualStart(){return this._virtualStartVal||0},set _virtualStart(t){t=this._clamp(t,0,this._maxVirtualStart),this._virtualStartVal=t},get _physicalStart(){return this._physicalStartVal||0},set _physicalStart(t){(t%=this._physicalCount)<0&&(t=this._physicalCount+t),this._physicalStartVal=t},get _physicalEnd(){return(this._physicalStart+this._physicalCount-1)%this._physicalCount},get _physicalCount(){return this._physicalCountVal||0},set _physicalCount(t){this._physicalCountVal=t},get _optPhysicalSize(){return 0===this._viewportHeight?1/0:this._viewportHeight*this._maxPages},get _isVisible(){return Boolean(this.offsetWidth||this.offsetHeight)},get firstVisibleIndex(){let t=this._firstVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;t=this._iterateItems(((t,i)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return i}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((i,s)=>{e<this._scrollBottom&&(t=s),e+=this._getPhysicalSizeIncrement(i)})),this._lastVisibleIndexVal=t}return t},get _scrollOffset(){return this._scrollerPaddingTop+this.scrollOffset},_scrollHandler(){const t=Math.max(0,Math.min(this._maxScrollTop,this._scrollTop));let e=t-this._scrollPosition;const i=e>=0;if(this._scrollPosition=t,this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,Math.abs(e)>this._physicalSize&&this._physicalSize>0){e-=this._scrollOffset;const t=Math.round(e/this._physicalAverage);this._virtualStart+=t,this._physicalStart+=t,this._physicalTop=Math.min(Math.floor(this._virtualStart)*this._physicalAverage,this._scrollPosition),this._update()}else if(this._physicalCount>0){const t=this._getReusables(i);i?(this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length):(this._virtualStart-=t.indexes.length,this._physicalStart-=t.indexes.length),this._update(t.indexes,i?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),s.YA)}},_getReusables(t){let e,i,s;const l=[],h=this._hiddenContentSize*this._ratio,r=this._virtualStart,o=this._virtualEnd,a=this._physicalCount;let n=this._physicalTop+this._scrollOffset;const _=this._physicalBottom+this._scrollOffset,c=this._scrollPosition,d=this._scrollBottom;for(t?(e=this._physicalStart,i=c-n):(e=this._physicalEnd,i=_-d);s=this._getPhysicalSizeIncrement(e),i-=s,!(l.length>=a||i<=h);)if(t){if(o+l.length+1>=this._virtualCount)break;if(n+s>=c-this._scrollOffset)break;l.push(e),n+=s,e=(e+1)%a}else{if(r-l.length<=0)break;if(n+this._physicalSize-s<=d)break;l.push(e),n-=s,e=0===e?a-1:e-1}return{indexes:l,physicalTop:n-this._scrollOffset}},_update(t,e){if(!(t&&0===t.length||0===this._physicalCount)){if(this._assignModels(t),this._updateMetrics(t),e)for(;e.length;){const t=e.pop();this._physicalTop-=this._getPhysicalSizeIncrement(t)}this._positionItems(),this._updateScrollerSize()}},_isClientFull(){return 0!==this._scrollBottom&&this._physicalBottom-1>=this._scrollBottom&&this._physicalTop<=this._scrollPosition},_increasePoolIfNeeded(t){const e=this._clamp(this._physicalCount+t,3,this._virtualCount-this._virtualStart)-this._physicalCount;let i=Math.round(.5*this._physicalCount);if(!(e<0)){if(e>0){const t=window.performance.now();[].push.apply(this._physicalItems,this._createPool(e));for(let t=0;t<e;t++)this._physicalSizes.push(0);this._physicalCount+=e,this._physicalStart>this._physicalEnd&&this._isIndexRendered(this._focusedVirtualIndex)&&this._getPhysicalIndex(this._focusedVirtualIndex)<this._physicalEnd&&(this._physicalStart+=e),this._update(),this._templateCost=(window.performance.now()-t)/e,i=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===i||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,i)),s.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,i),s.YA))}},_render(){if(this.isAttached&&this._isVisible)if(0!==this._physicalCount){const t=this._getReusables(!0);this._physicalTop=t.physicalTop,this._virtualStart+=t.indexes.length,this._physicalStart+=t.indexes.length,this._update(t.indexes),this._update(),this._increasePoolIfNeeded(0)}else this._virtualCount>0&&(this.updateViewportBoundaries(),this._increasePoolIfNeeded(3))},_itemsChanged(t){"items"===t.path&&(this._virtualStart=0,this._physicalTop=0,this._virtualCount=this.items?this.items.length:0,this._physicalIndexForKey={},this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._physicalItems||(this._physicalItems=[]),this._physicalSizes||(this._physicalSizes=[]),this._physicalStart=0,this._scrollTop>this._scrollOffset&&this._resetScrollPosition(0),this._debounce("_render",this._render,s.rs))},_iterateItems(t,e){let i,s,l,h;if(2===arguments.length&&e){for(h=0;h<e.length;h++)if(i=e[h],s=this._computeVidx(i),null!=(l=t.call(this,i,s)))return l}else{for(i=this._physicalStart,s=this._virtualStart;i<this._physicalCount;i++,s++)if(null!=(l=t.call(this,i,s)))return l;for(i=0;i<this._physicalStart;i++,s++)if(null!=(l=t.call(this,i,s)))return l}},_computeVidx(t){return t>=this._physicalStart?this._virtualStart+(t-this._physicalStart):this._virtualStart+(this._physicalCount-this._physicalStart)+t},_positionItems(){this._adjustScrollPosition();let t=this._physicalTop;this._iterateItems((e=>{this.translate3d(0,`${t}px`,0,this._physicalItems[e]),t+=this._physicalSizes[e]}))},_getPhysicalSizeIncrement(t){return this._physicalSizes[t]},_adjustScrollPosition(){const t=0===this._virtualStart?this._physicalTop:Math.min(this._scrollPosition+this._physicalTop,0);if(0!==t){this._physicalTop-=t;const e=this._scrollPosition;!o&&e>0&&this._resetScrollPosition(e-t)}},_resetScrollPosition(t){this.scrollTarget&&t>=0&&(this._scrollTop=t,this._scrollPosition=this._scrollTop)},_updateScrollerSize(t){const e=this._physicalBottom+Math.max(this._virtualCount-this._physicalCount-this._virtualStart,0)*this._physicalAverage;this._estScrollHeight=e,(t||0===this._scrollHeight||this._scrollPosition>=e-this._physicalSize||Math.abs(e-this._scrollHeight)>=this._viewportHeight)&&(this.$.items.style.height=`${e}px`,this._scrollHeight=e)},scrollToIndex(t){if("number"!=typeof t||t<0||t>this.items.length-1)return;if((0,h.yl)(),0===this._physicalCount)return;t=this._clamp(t,0,this._virtualCount-1),(!this._isIndexRendered(t)||t>=this._maxVirtualStart)&&(this._virtualStart=t-1),this._assignModels(),this._updateMetrics(),this._physicalTop=this._virtualStart*this._physicalAverage;let e=this._physicalStart,i=this._virtualStart,s=0;const l=this._hiddenContentSize;for(;i<t&&s<=l;)s+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,i+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+s),this._increasePoolIfNeeded(0),this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null},_resetAverage(){this._physicalAverage=0,this._physicalAverageCount=0},_resizeHandler(){this._debounce("_render",(()=>{this._firstVisibleIndexVal=null,this._lastVisibleIndexVal=null,this._isVisible?(this.updateViewportBoundaries(),this.toggleScrollListener(!0),this._resetAverage(),this._render()):this.toggleScrollListener(!1)}),s.rs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,i)=>Math.min(i,Math.max(e,t)),_debounce(t,e,i){this._debouncers||(this._debouncers={}),this._debouncers[t]=h.dx.debounce(this._debouncers[t],i,e.bind(this)),(0,h.Ex)(this._debouncers[t])}},n=1e3;class _{constructor({createElements:t,updateElement:e,scrollTarget:i,scrollContainer:s,elementsContainer:l,reorderElements:h}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=i,this.scrollContainer=s,this.elementsContainer=l||s,this.reorderElements=h,this._maxPages=1.3,this.__placeholderHeight=200,this.__elementHeightQueue=Array(10),this.timeouts={SCROLL_REORDER:500,IGNORE_WHEEL:500,FIX_INVALID_ITEM_POSITIONING:100},this.__resizeObserver=new ResizeObserver((()=>this._resizeHandler())),"visible"===getComputedStyle(this.scrollTarget).overflow&&(this.scrollTarget.style.overflow="auto"),"static"===getComputedStyle(this.scrollContainer).position&&(this.scrollContainer.style.position="relative"),this.__resizeObserver.observe(this.scrollTarget),this.scrollTarget.addEventListener("scroll",(()=>this._scrollHandler())),this._scrollLineHeight=this._getScrollLineHeight(),this.scrollTarget.addEventListener("wheel",(t=>this.__onWheel(t))),this.reorderElements&&(this.scrollTarget.addEventListener("mousedown",(()=>{this.__mouseDown=!0})),this.scrollTarget.addEventListener("mouseup",(()=>{this.__mouseDown=!1,this.__pendingReorder&&this.__reorderElements()})))}get scrollOffset(){return 0}get adjustedFirstVisibleIndex(){return this.firstVisibleIndex+this._vidxOffset}get adjustedLastVisibleIndex(){return this.lastVisibleIndex+this._vidxOffset}__hasPlaceholders(){return this.__getVisibleElements().some((t=>t.__virtualizerPlaceholder))}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;delete this.__pendingScrollToIndex,this._physicalCount<=3&&this.flush(),t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let i=Math.floor(t/this.size*this._virtualCount);this._virtualCount-i<e?(i=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):i<e?t<n?(i=t,this._vidxOffset=0):(i=n,this._vidxOffset=t-i):this._vidxOffset=t-i,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(i),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler(),this.__hasPlaceholders()&&(this.__pendingScrollToIndex=t)}flush(){const t=this._physicalCount;0!==this.scrollTarget.offsetHeight&&(this._resizeHandler(),(0,h.yl)(),this._scrollHandler(),this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.flush(),this.__scrollReorderDebouncer&&this.__scrollReorderDebouncer.flush(),this.__debouncerWheelAnimationFrame&&this.__debouncerWheelAnimationFrame.flush(),this._physicalCount!==t&&this.flush())}update(t=0,e=this.size-1){const i=[];this.__getVisibleElements().forEach((s=>{s.__virtualIndex>=t&&s.__virtualIndex<=e&&(this.__updateElement(s,s.__virtualIndex,!0),i.push(s))})),this.__afterElementsUpdated(i)}_updateMetrics(t){(0,h.yl)();let e=0,i=0;const s=this._physicalAverageCount,l=this._physicalAverage;this._iterateItems(((t,s)=>{i+=this._physicalSizes[t],this._physicalSizes[t]=Math.ceil(this.__getBorderBoxHeight(this._physicalItems[t])),e+=this._physicalSizes[t],this._physicalAverageCount+=this._physicalSizes[t]?1:0}),t),this._physicalSize=this._physicalSize+e-i,this._physicalAverageCount!==s&&(this._physicalAverage=Math.round((l*s+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),i=parseFloat(e.height)||0;return"border-box"===e.boxSizing?i:i+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,i){t.__virtualizerPlaceholder&&(t.style.paddingTop="",t.__virtualizerPlaceholder=!1),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!i||(this.updateElement(t,e),t.__lastUpdatedIndex=e)}__afterElementsUpdated(t){t.forEach((t=>{const e=t.offsetHeight;if(0===e)t.style.paddingTop=`${this.__placeholderHeight}px`,t.__virtualizerPlaceholder=!0,this.__placeholderClearDebouncer=h.dx.debounce(this.__placeholderClearDebouncer,s.rs,(()=>this._resizeHandler()));else{this.__elementHeightQueue.push(e),this.__elementHeightQueue.shift();const t=this.__elementHeightQueue.filter((t=>void 0!==t));this.__placeholderHeight=Math.round(t.reduce(((t,e)=>t+e),0)/t.length)}})),void 0===this.__pendingScrollToIndex||this.__hasPlaceholders()||this.scrollToIndex(this.__pendingScrollToIndex)}__getIndexScrollOffset(t){const e=this.__getVisibleElements().find((e=>e.__virtualIndex===t));return e?this.scrollTarget.getBoundingClientRect().top-e.getBoundingClientRect().top:void 0}get size(){return this.__size}set size(t){t!==this.size&&(this.__fixInvalidItemPositioningDebouncer&&this.__fixInvalidItemPositioningDebouncer.cancel(),this._debouncers&&this._debouncers._increasePoolIfNeeded&&this._debouncers._increasePoolIfNeeded.cancel(),this.__size=t,this._physicalItems?(this._updateScrollerSize(),this._virtualCount=this.items.length,this._render()):(this._itemsChanged({path:"items"}),this.__preventElementUpdates=!0,(0,h.yl)(),this.__preventElementUpdates=!1),this._isVisible||this._assignModels(),this.elementsContainer.children.length||requestAnimationFrame((()=>this._resizeHandler())),this._resizeHandler(),(0,h.yl)())}get _scrollTop(){return this.scrollTarget.scrollTop}set _scrollTop(t){this.scrollTarget.scrollTop=t}get items(){return{length:Math.min(this.size,1e5)}}get offsetHeight(){return this.scrollTarget.offsetHeight}get $(){return{items:this.scrollContainer}}updateViewportBoundaries(){const t=window.getComputedStyle(this.scrollTarget);this._scrollerPaddingTop=this.scrollTarget===this?0:parseInt(t["padding-top"],10),this._isRTL=Boolean("rtl"===t.direction),this._viewportWidth=this.elementsContainer.offsetWidth,this._viewportHeight=this.scrollTarget.offsetHeight,this._scrollPageHeight=this._viewportHeight-this._scrollLineHeight,this.grid&&this._updateGridMetrics()}setAttribute(){}_createPool(t){const e=this.createElements(t),i=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",i.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(i),e}_assignModels(t){const e=[];this._iterateItems(((t,i)=>{const s=this._physicalItems[t];s.hidden=i>=this.size,s.hidden?delete s.__lastUpdatedIndex:(s.__virtualIndex=i+(this._vidxOffset||0),this.__updateElement(s,s.__virtualIndex),e.push(s))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,i,s){s.style.transform=`translateY(${e})`}toggleScrollListener(){}_scrollHandler(){if(0===this.scrollTarget.offsetHeight)return;this._adjustVirtualIndexOffset(this._scrollTop-(this.__previousScrollTop||0));const t=this.scrollTarget.scrollTop-this._scrollPosition;if(super._scrollHandler(),0!==this._physicalCount){const e=t>=0,i=this._getReusables(!e);i.indexes.length&&(this._physicalTop=i.physicalTop,e?(this._virtualStart-=i.indexes.length,this._physicalStart-=i.indexes.length):(this._virtualStart+=i.indexes.length,this._physicalStart+=i.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=h.dx.debounce(this.__fixInvalidItemPositioningDebouncer,s.Wc.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=h.dx.debounce(this.__scrollReorderDebouncer,s.Wc.after(this.timeouts.SCROLL_REORDER),(()=>this.__reorderElements()))),this.__previousScrollTop=this._scrollTop,0===this._scrollTop&&0!==this.firstVisibleIndex&&Math.abs(t)>0&&this.scrollToIndex(0)}__fixInvalidItemPositioning(){if(!this.scrollTarget.isConnected)return;const t=this._physicalTop>this._scrollTop,e=this._physicalBottom<this._scrollBottom,i=0===this.adjustedFirstVisibleIndex,s=this.adjustedLastVisibleIndex===this.size-1;if(t&&!i||e&&!s){const t=e,i=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=i}}__onWheel(t){if(t.ctrlKey||this._hasScrolledAncestor(t.target,t.deltaX,t.deltaY))return;let e=t.deltaY;if(t.deltaMode===WheelEvent.DOM_DELTA_LINE?e*=this._scrollLineHeight:t.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(e*=this._scrollPageHeight),this._deltaYAcc||(this._deltaYAcc=0),this._wheelAnimationFrame)return this._deltaYAcc+=e,void t.preventDefault();e+=this._deltaYAcc,this._deltaYAcc=0,this._wheelAnimationFrame=!0,this.__debouncerWheelAnimationFrame=h.dx.debounce(this.__debouncerWheelAnimationFrame,s.rs,(()=>{this._wheelAnimationFrame=!1}));const i=Math.abs(t.deltaX)+Math.abs(e);this._canScroll(this.scrollTarget,t.deltaX,e)?(t.preventDefault(),this.scrollTarget.scrollTop+=e,this.scrollTarget.scrollLeft+=t.deltaX,this._hasResidualMomentum=!0,this._ignoreNewWheel=!0,this._debouncerIgnoreNewWheel=h.dx.debounce(this._debouncerIgnoreNewWheel,s.Wc.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&i<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():i>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=i}_hasScrolledAncestor(t,e,i){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,i)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,i):void 0))}_canScroll(t,e,i){return i>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||i<0&&t.scrollTop>0||e>0&&t.scrollLeft<t.scrollWidth-t.offsetWidth||e<0&&t.scrollLeft>0}_increasePoolIfNeeded(t){if(this._physicalCount>2&&t){const e=Math.ceil(this._optPhysicalSize/this._physicalAverage)-this._physicalCount;super._increasePoolIfNeeded(Math.max(t,Math.min(100,e)))}else super._increasePoolIfNeeded(t)}_getScrollLineHeight(){const t=document.createElement("div");t.style.fontSize="initial",t.style.display="none",document.body.appendChild(t);const e=window.getComputedStyle(t).fontSize;return document.body.removeChild(t),e?window.parseInt(e):void 0}__getVisibleElements(){return Array.from(this.elementsContainer.children).filter((t=>!t.hidden))}__reorderElements(){if(this.__mouseDown)return void(this.__pendingReorder=!0);this.__pendingReorder=!1;const t=this._virtualStart+(this._vidxOffset||0),e=this.__getVisibleElements(),i=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!i)return;const s=i.__virtualIndex-t,h=e.indexOf(i)-s;if(h>0)for(let t=0;t<h;t++)this.elementsContainer.appendChild(e[t]);else if(h<0)for(let t=e.length+h;t<e.length;t++)this.elementsContainer.insertBefore(e[t],e[0]);if(l.G6){const{transform:t}=this.scrollTarget.style;this.scrollTarget.style.transform="translateZ(0)",setTimeout((()=>{this.scrollTarget.style.transform=t}))}}_adjustVirtualIndexOffset(t){if(this._virtualCount>=this.size)this._vidxOffset=0;else if(this.__skipNextVirtualIndexAdjust)this.__skipNextVirtualIndexAdjust=!1;else if(Math.abs(t)>1e4){const t=this._scrollTop/(this.scrollTarget.scrollHeight-this.scrollTarget.offsetHeight),e=t*this.size;this._vidxOffset=Math.round(e-t*this._virtualCount)}else{const t=this._vidxOffset,e=n,i=100;0===this._scrollTop?(this._vidxOffset=0,t!==this._vidxOffset&&super.scrollToIndex(0)):this.firstVisibleIndex<e&&this._vidxOffset>0&&(this._vidxOffset-=Math.min(this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const s=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=s,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<s&&(this._vidxOffset+=Math.min(s-this._vidxOffset,i),super.scrollToIndex(this.firstVisibleIndex-(this._vidxOffset-t)))}}}Object.setPrototypeOf(_.prototype,a);class c{constructor(t){this.__adapter=new _(t)}get firstVisibleIndex(){return this.__adapter.adjustedFirstVisibleIndex}get lastVisibleIndex(){return this.__adapter.adjustedLastVisibleIndex}get size(){return this.__adapter.size}set size(t){this.__adapter.size=t}scrollToIndex(t){this.__adapter.scrollToIndex(t)}update(t=0,e=this.size-1){this.__adapter.update(t,e)}flush(){this.__adapter.flush()}}},73208:(t,e,i)=>{i.d(e,{b:()=>l});var s=i(78591);class l extends s.n{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}}}]);
|
package/dist/umd/3951.js
CHANGED
@@ -189,7 +189,7 @@
|
|
189
189
|
--vaadin-button-primary-background: var(--lumo-shade-50pct);
|
190
190
|
--vaadin-button-primary-text-color: var(--lumo-primary-contrast-color);
|
191
191
|
}
|
192
|
-
`,{moduleId:"lumo-notification-card"});var n=o(
|
192
|
+
`,{moduleId:"lumo-notification-card"});var n=o(3354),a=o(9392),r=o(56977),s=o(61037),d=o(52807),l=o(12521),c=o(39320),m=o(40262),u=o(61462);class h extends((0,i.Tb)((0,l.S)(n.H3))){static get template(){return n.dy`
|
193
193
|
<style>
|
194
194
|
:host {
|
195
195
|
position: fixed;
|