@descope/web-components-ui 1.0.234 → 1.0.236

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. package/dist/cjs/index.cjs.js +770 -647
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.d.ts +1 -0
  4. package/dist/index.esm.js +754 -632
  5. package/dist/index.esm.js.map +1 -1
  6. package/dist/umd/{4513.js → 1721.js} +1 -1
  7. package/dist/umd/3003.js +1 -1
  8. package/dist/umd/3092.js +23 -18
  9. package/dist/umd/322.js +90 -0
  10. package/dist/umd/4226.js +1 -1
  11. package/dist/umd/4447.js +1 -2
  12. package/dist/umd/5345.js +1 -1
  13. package/dist/umd/5517.js +2 -0
  14. package/dist/umd/5806.js +3 -3
  15. package/dist/umd/5977.js +18 -13
  16. package/dist/umd/6091.js +1 -1
  17. package/dist/umd/6542.js +22 -22
  18. package/dist/umd/6770.js +2 -2
  19. package/dist/umd/7531.js +77 -6
  20. package/dist/umd/849.js +744 -0
  21. package/dist/umd/849.js.LICENSE.txt +11 -0
  22. package/dist/umd/8623.js +2 -0
  23. package/dist/umd/8725.js +2 -2
  24. package/dist/umd/{1990.js → 9092.js} +21 -17
  25. package/dist/umd/9211.js +33 -19
  26. package/dist/umd/{7514.js → 9558.js} +128 -110
  27. package/dist/umd/descope-badge-index-js.js +1 -0
  28. package/dist/umd/descope-button-index-js.js +1 -1
  29. package/dist/umd/descope-date-picker-index-js.js +1 -1
  30. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -1
  31. package/dist/umd/descope-grid-descope-grid-status-column-index-js.js +1 -1
  32. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +1 -1
  33. package/dist/umd/descope-grid-index-js.js +1 -1
  34. package/dist/umd/index.js +1 -1
  35. package/package.json +14 -13
  36. package/src/components/descope-badge/BadgeClass.js +54 -0
  37. package/src/components/descope-badge/index.js +5 -0
  38. package/src/index.cjs.js +1 -0
  39. package/src/index.d.ts +1 -0
  40. package/src/theme/components/badge.js +71 -0
  41. package/src/theme/components/index.js +2 -0
  42. package/dist/umd/2873.js +0 -738
  43. package/dist/umd/2873.js.LICENSE.txt +0 -21
  44. package/dist/umd/446.js +0 -92
  45. package/dist/umd/729.js +0 -1
  46. package/dist/umd/9629.js +0 -2
  47. package/dist/umd/9671.js +0 -1
  48. /package/dist/umd/{4447.js.LICENSE.txt → 322.js.LICENSE.txt} +0 -0
  49. /package/dist/umd/{446.js.LICENSE.txt → 5517.js.LICENSE.txt} +0 -0
  50. /package/dist/umd/{9629.js.LICENSE.txt → 8623.js.LICENSE.txt} +0 -0
  51. /package/dist/umd/{1990.js.LICENSE.txt → 9092.js.LICENSE.txt} +0 -0
  52. /package/dist/umd/{7514.js.LICENSE.txt → 9558.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4513],{4513:(e,s,c)=>{c(4750),c(7078)}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1721],{1721:(e,s,c)=>{c(4750),c(7078)}}]);
package/dist/umd/3003.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see 3003.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3003],{3003:(t,e,s)=>{s.d(e,{d:()=>c});var i=s(7913),l=s(1037),h=s(6139);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,s)=>{if(e+=this._getPhysicalSizeIncrement(t),e>this._scrollPosition)return s}))||0,this._firstVisibleIndexVal=t}return t},get lastVisibleIndex(){let t=this._lastVisibleIndexVal;if(null==t){let e=this._physicalTop+this._scrollOffset;this._iterateItems(((s,i)=>{e<this._scrollBottom&&(t=i),e+=this._getPhysicalSizeIncrement(s)})),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 s=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(s);s?(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,s?null:t.indexes),this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,0),i.YA)}},_getReusables(t){let e,s,i;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,s=c-n):(e=this._physicalEnd,s=_-d);i=this._getPhysicalSizeIncrement(e),s-=i,!(l.length>=a||s<=h);)if(t){if(o+l.length+1>=this._virtualCount)break;if(n+i>=c-this._scrollOffset)break;l.push(e),n+=i,e=(e+1)%a}else{if(r-l.length<=0)break;if(n+this._physicalSize-i<=d)break;l.push(e),n-=i,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 s=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,s=Math.round(.5*this._physicalCount)}this._virtualEnd>=this._virtualCount-1||0===s||(this._isClientFull()?this._physicalSize<this._optPhysicalSize&&this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,this._clamp(Math.round(50/this._templateCost),1,s)),i.t$):this._debounce("_increasePoolIfNeeded",this._increasePoolIfNeeded.bind(this,s),i.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,i.rs))},_iterateItems(t,e){let s,i,l,h;if(2===arguments.length&&e){for(h=0;h<e.length;h++)if(s=e[h],i=this._computeVidx(s),null!=(l=t.call(this,s,i)))return l}else{for(s=this._physicalStart,i=this._virtualStart;s<this._physicalCount;s++,i++)if(null!=(l=t.call(this,s,i)))return l;for(s=0;s<this._physicalStart;s++,i++)if(null!=(l=t.call(this,s,i)))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,s=this._virtualStart,i=0;const l=this._hiddenContentSize;for(;s<t&&i<=l;)i+=this._getPhysicalSizeIncrement(e),e=(e+1)%this._physicalCount,s+=1;this._updateScrollerSize(!0),this._positionItems(),this._resetScrollPosition(this._physicalTop+this._scrollOffset+i),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)}),i.rs)},_isIndexRendered(t){return t>=this._virtualStart&&t<=this._virtualEnd},_getPhysicalIndex(t){return(this._physicalStart+(t-this._virtualStart))%this._physicalCount},_clamp:(t,e,s)=>Math.min(s,Math.max(e,t)),_debounce(t,e,s){this._debouncers||(this._debouncers={}),this._debouncers[t]=h.dx.debounce(this._debouncers[t],s,e.bind(this)),(0,h.Ex)(this._debouncers[t])}},n=1e3;class _{constructor({createElements:t,updateElement:e,scrollTarget:s,scrollContainer:i,elementsContainer:l,reorderElements:h}){this.isAttached=!0,this._vidxOffset=0,this.createElements=t,this.updateElement=e,this.scrollTarget=s,this.scrollContainer=i,this.elementsContainer=l||i,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}scrollToIndex(t){if("number"!=typeof t||isNaN(t)||0===this.size||!this.scrollTarget.offsetHeight)return;t=this._clamp(t,0,this.size-1);const e=this.__getVisibleElements().length;let s=Math.floor(t/this.size*this._virtualCount);this._virtualCount-s<e?(s=this._virtualCount-(this.size-t),this._vidxOffset=this.size-this._virtualCount):s<e?t<n?(s=t,this._vidxOffset=0):(s=n,this._vidxOffset=t-s):this._vidxOffset=t-s,this.__skipNextVirtualIndexAdjust=!0,super.scrollToIndex(s),this.adjustedFirstVisibleIndex!==t&&this._scrollTop<this._maxScrollTop&&!this.grid&&(this._scrollTop-=this.__getIndexScrollOffset(t)||0),this._scrollHandler()}flush(){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())}update(t=0,e=this.size-1){const s=[];this.__getVisibleElements().forEach((i=>{i.__virtualIndex>=t&&i.__virtualIndex<=e&&(this.__updateElement(i,i.__virtualIndex,!0),s.push(i))})),this.__afterElementsUpdated(s)}_updateMetrics(t){(0,h.yl)();let e=0,s=0;const i=this._physicalAverageCount,l=this._physicalAverage;this._iterateItems(((t,i)=>{s+=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-s,this._physicalAverageCount!==i&&(this._physicalAverage=Math.round((l*i+e)/this._physicalAverageCount))}__getBorderBoxHeight(t){const e=getComputedStyle(t),s=parseFloat(e.height)||0;return"border-box"===e.boxSizing?s:s+(parseFloat(e.paddingBottom)||0)+(parseFloat(e.paddingTop)||0)+(parseFloat(e.borderBottomWidth)||0)+(parseFloat(e.borderTopWidth)||0)}__updateElement(t,e,s){t.style.paddingTop&&(t.style.paddingTop=""),this.__preventElementUpdates||t.__lastUpdatedIndex===e&&!s||(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`,this.__placeholderClearDebouncer=h.dx.debounce(this.__placeholderClearDebouncer,i.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)}}))}__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),s=document.createDocumentFragment();return e.forEach((t=>{t.style.position="absolute",s.appendChild(t),this.__resizeObserver.observe(t)})),this.elementsContainer.appendChild(s),e}_assignModels(t){const e=[];this._iterateItems(((t,s)=>{const i=this._physicalItems[t];i.hidden=s>=this.size,i.hidden?delete i.__lastUpdatedIndex:(i.__virtualIndex=s+(this._vidxOffset||0),this.__updateElement(i,i.__virtualIndex),e.push(i))}),t),this.__afterElementsUpdated(e)}_isClientFull(){return setTimeout((()=>{this.__clientFull=!0})),this.__clientFull||super._isClientFull()}translate3d(t,e,s,i){i.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,s=this._getReusables(!e);s.indexes.length&&(this._physicalTop=s.physicalTop,e?(this._virtualStart-=s.indexes.length,this._physicalStart-=s.indexes.length):(this._virtualStart+=s.indexes.length,this._physicalStart+=s.indexes.length),this._resizeHandler())}t&&(this.__fixInvalidItemPositioningDebouncer=h.dx.debounce(this.__fixInvalidItemPositioningDebouncer,i.Wc.after(this.timeouts.FIX_INVALID_ITEM_POSITIONING),(()=>this.__fixInvalidItemPositioning()))),this.reorderElements&&(this.__scrollReorderDebouncer=h.dx.debounce(this.__scrollReorderDebouncer,i.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,s=0===this.adjustedFirstVisibleIndex,i=this.adjustedLastVisibleIndex===this.size-1;if(t&&!s||e&&!i){const t=e,s=this._ratio;this._ratio=0,this._scrollPosition=this._scrollTop+(t?-1:1),this._scrollHandler(),this._ratio=s}}__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,i.rs,(()=>{this._wheelAnimationFrame=!1}));const s=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,i.Wc.after(this.timeouts.IGNORE_WHEEL),(()=>{this._ignoreNewWheel=!1}))):this._hasResidualMomentum&&s<=this._previousMomentum||this._ignoreNewWheel?t.preventDefault():s>this._previousMomentum&&(this._hasResidualMomentum=!1),this._previousMomentum=s}_hasScrolledAncestor(t,e,s){return t!==this.scrollTarget&&t!==this.scrollTarget.getRootNode().host&&(!(!this._canScroll(t,e,s)||-1===["auto","scroll"].indexOf(getComputedStyle(t).overflow))||(t!==this&&t.parentElement?this._hasScrolledAncestor(t.parentElement,e,s):void 0))}_canScroll(t,e,s){return s>0&&t.scrollTop<t.scrollHeight-t.offsetHeight||s<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(),s=e.find((t=>t.contains(this.elementsContainer.getRootNode().activeElement)||t.contains(this.scrollTarget.getRootNode().activeElement)))||e[0];if(!s)return;const i=s.__virtualIndex-t,h=e.indexOf(s)-i;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,s=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,s),super.scrollToIndex(this.firstVisibleIndex+(t-this._vidxOffset)));const i=this.size-this._virtualCount;this._scrollTop>=this._maxScrollTop&&this._maxScrollTop>0?(this._vidxOffset=i,t!==this._vidxOffset&&super.scrollToIndex(this._virtualCount-1)):this.firstVisibleIndex>this._virtualCount-e&&this._vidxOffset<i&&(this._vidxOffset+=Math.min(i-this._vidxOffset,s),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()}}}}]);
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3003],{3003:(t,e,i)=>{i.d(e,{d:()=>c});var s=i(7913),l=i(1037),h=i(6139);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()}}}}]);
package/dist/umd/3092.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 3092.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3092],{3654:(e,t,o)=>{var r=o(4241),a=o(2807),i=o(2521),c=o(4463),s=o(6570),n=o(1224),l=o(1370),d=o(1014),h=o(5229),p=(o(3550),o(6328)),u=o(6326);const b=(0,d.o)((e=>class extends((0,p.A)((0,h.f)((0,u.J)(e)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(e){const t=e.target;this._toggleChecked(t.checked)}_toggleChecked(e){this.checked=e}}));var v=o(3208),m=o(6821),k=o(6729);const x=e=>class extends((0,m.h)(b((0,l.B)((0,n.D)(e))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("checkbox"),this.value="on"}ready(){super.ready(),this.addController(new v.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new k.v(this.inputElement,this._labelController))}_shouldSetActive(e){return"a"!==e.target.localName&&super._shouldSetActive(e)}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e)}},g=s.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3092],{3654:(e,t,o)=>{var r=o(4241),a=o(2807),c=o(2521),i=o(4463),n=o(6570),s=o(1224),l=o(1370),d=o(1014),h=o(5229),p=(o(3550),o(6328)),u=o(6326);const b=(0,d.o)((e=>class extends((0,p.A)((0,h.f)((0,u.J)(e)))){static get properties(){return{checked:{type:Boolean,value:!1,notify:!0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"checked"]}_onChange(e){const t=e.target;this._toggleChecked(t.checked)}_toggleChecked(e){this.checked=e}}));var v=o(3208),k=o(6821),m=o(6729);const x=e=>class extends((0,k.h)(b((0,l.B)((0,s.D)(e))))){static get properties(){return{indeterminate:{type:Boolean,notify:!0,value:!1,reflectToAttribute:!0},name:{type:String,value:""},tabindex:{type:Number,value:0,reflectToAttribute:!0}}}static get delegateProps(){return[...super.delegateProps,"indeterminate"]}static get delegateAttrs(){return[...super.delegateAttrs,"name"]}constructor(){super(),this._setType("checkbox"),this.value="on"}ready(){super.ready(),this.addController(new v.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new m.v(this.inputElement,this._labelController))}_shouldSetActive(e){return"a"!==e.target.localName&&super._shouldSetActive(e)}_toggleChecked(e){this.indeterminate&&(this.indeterminate=!1),super._toggleChecked(e)}},g=n.iv`
3
3
  :host {
4
4
  display: inline-block;
5
5
  }
@@ -77,17 +77,17 @@
77
77
  outline-width: 2px;
78
78
  }
79
79
  }
80
- `;(0,s.hC)("vaadin-checkbox",g,{moduleId:"vaadin-checkbox-styles"});class f extends(x((0,i.S)((0,s.Tb)(r.H3)))){static get is(){return"vaadin-checkbox"}static get template(){return r.dy`
80
+ `;(0,n.hC)("vaadin-checkbox",g,{moduleId:"vaadin-checkbox-styles"});class f extends(x((0,c.S)((0,n.Tb)(r.H3)))){static get is(){return"vaadin-checkbox"}static get template(){return r.dy`
81
81
  <div class="vaadin-checkbox-container">
82
82
  <div part="checkbox" aria-hidden="true"></div>
83
83
  <slot name="input"></slot>
84
84
  <slot name="label"></slot>
85
85
  </div>
86
86
  <slot name="tooltip"></slot>
87
- `}ready(){super.ready(),this._tooltipController=new c.f(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,a.M)(f)},6545:(e,t,o)=>{o(1195),o(1735),o(9098),o(9416),o(9849),o(4173);var r=o(6570);(0,r.hC)("vaadin-checkbox",r.iv`
87
+ `}ready(){super.ready(),this._tooltipController=new i.f(this),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,a.M)(f)},8473:(e,t,o)=>{o(1195),o(1735),o(9098),o(9416),o(9849),o(4173);var r=o(6570);(0,r.hC)("vaadin-checkbox",r.iv`
88
88
  :host {
89
- color: var(--lumo-body-text-color);
90
- font-size: var(--lumo-font-size-m);
89
+ color: var(--vaadin-checkbox-label-color, var(--lumo-body-text-color));
90
+ font-size: var(--vaadin-checkbox-label-font-size, var(--lumo-font-size-m));
91
91
  font-family: var(--lumo-font-family);
92
92
  line-height: var(--lumo-line-height-s);
93
93
  -webkit-font-smoothing: antialiased;
@@ -99,11 +99,16 @@
99
99
  cursor: default;
100
100
  outline: none;
101
101
  --_checkbox-size: var(--vaadin-checkbox-size, calc(var(--lumo-size-m) / 2));
102
+ --_focus-ring-color: var(--vaadin-focus-ring-color, var(--lumo-primary-color-50pct));
103
+ --_focus-ring-width: var(--vaadin-focus-ring-width, 2px);
104
+ --_selection-color: var(--vaadin-selection-color, var(--lumo-primary-color));
102
105
  }
103
106
 
104
107
  :host([has-label]) ::slotted(label) {
105
- padding-block: var(--lumo-space-xs);
106
- padding-inline: var(--lumo-space-xs) var(--lumo-space-s);
108
+ padding: var(
109
+ --vaadin-checkbox-label-padding,
110
+ var(--lumo-space-xs) var(--lumo-space-s) var(--lumo-space-xs) var(--lumo-space-xs)
111
+ );
107
112
  }
108
113
 
109
114
  [part='checkbox'] {
@@ -111,8 +116,8 @@
111
116
  height: var(--_checkbox-size);
112
117
  margin: var(--lumo-space-xs);
113
118
  position: relative;
114
- border-radius: var(--lumo-border-radius-s);
115
- background-color: var(--lumo-contrast-20pct);
119
+ border-radius: var(--vaadin-checkbox-border-radius, var(--lumo-border-radius-s));
120
+ background: var(--vaadin-checkbox-background, var(--lumo-contrast-20pct));
116
121
  transition: transform 0.2s cubic-bezier(0.12, 0.32, 0.54, 2), background-color 0.15s;
117
122
  cursor: var(--lumo-clickable-cursor);
118
123
  /* Default field border color */
@@ -126,16 +131,16 @@
126
131
 
127
132
  :host([indeterminate]) [part='checkbox'],
128
133
  :host([checked]) [part='checkbox'] {
129
- background-color: var(--lumo-primary-color);
134
+ background-color: var(--_selection-color);
130
135
  }
131
136
 
132
137
  /* Checkmark */
133
138
  [part='checkbox']::after {
134
139
  pointer-events: none;
135
140
  font-family: 'lumo-icons';
136
- content: var(--lumo-icons-checkmark);
137
- color: var(--lumo-primary-contrast-color);
138
- font-size: calc(var(--_checkbox-size) + 2px);
141
+ content: var(--vaadin-checkbox-checkmark-char, var(--lumo-icons-checkmark));
142
+ color: var(--vaadin-checkbox-checkmark-color, var(--lumo-primary-contrast-color));
143
+ font-size: var(--vaadin-checkbox-checkmark-size, calc(var(--_checkbox-size) + 2px));
139
144
  line-height: 1;
140
145
  position: absolute;
141
146
  top: -1px;
@@ -150,7 +155,7 @@
150
155
 
151
156
  /* Indeterminate checkmark */
152
157
  :host([indeterminate]) [part='checkbox']::after {
153
- content: '';
158
+ content: var(--vaadin-checkbox-checkmark-char-indeterminate, '');
154
159
  opacity: 1;
155
160
  top: 45%;
156
161
  height: 10%;
@@ -163,7 +168,7 @@
163
168
 
164
169
  /* Focus ring */
165
170
  :host([focus-ring]) [part='checkbox'] {
166
- box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 3px var(--lumo-primary-color-50pct),
171
+ box-shadow: 0 0 0 1px var(--lumo-base-color), 0 0 0 calc(var(--_focus-ring-width) + 1px) var(--_focus-ring-color),
167
172
  inset 0 0 0 var(--_input-border-width, 0) var(--_input-border-color);
168
173
  }
169
174
 
@@ -211,13 +216,13 @@
211
216
 
212
217
  /* Hover */
213
218
  :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
214
- background-color: var(--lumo-contrast-30pct);
219
+ background: var(--vaadin-checkbox-background-hover, var(--lumo-contrast-30pct));
215
220
  }
216
221
 
217
222
  /* Disable hover for touch devices */
218
223
  @media (pointer: coarse) {
219
224
  :host(:not([checked]):not([indeterminate]):not([disabled]):hover) [part='checkbox'] {
220
- background-color: var(--lumo-contrast-20pct);
225
+ background: var(--vaadin-checkbox-background, var(--lumo-contrast-20pct));
221
226
  }
222
227
  }
223
228
 
@@ -236,4 +241,4 @@
236
241
  transform: scale(0);
237
242
  opacity: 0.4;
238
243
  }
239
- `,{moduleId:"lumo-checkbox"}),o(3654)},3092:(e,t,o)=>{o(6545),o(3654)}}]);
244
+ `,{moduleId:"lumo-checkbox"})},3556:(e,t,o)=>{o(8473),o(3654)},3092:(e,t,o)=>{o(3556),o(3654)}}]);
@@ -0,0 +1,90 @@
1
+ /*! For license information please see 322.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[322],{322:(e,t,A)=>{A.d(t,{n:()=>h}),A(1195),A(9849),A(9416);var i=A(6570);(0,i.hC)("vaadin-grid-sorter",i.iv`
3
+ :host {
4
+ justify-content: flex-start;
5
+ align-items: baseline;
6
+ -webkit-user-select: none;
7
+ -moz-user-select: none;
8
+ user-select: none;
9
+ cursor: var(--lumo-clickable-cursor);
10
+ }
11
+
12
+ [part='content'] {
13
+ display: inline-block;
14
+ overflow: hidden;
15
+ text-overflow: ellipsis;
16
+ }
17
+
18
+ [part='indicators'] {
19
+ margin-left: var(--lumo-space-s);
20
+ }
21
+
22
+ [part='indicators']::before {
23
+ transform: scale(0.8);
24
+ }
25
+
26
+ :host(:not([direction]):not(:hover)) [part='indicators'] {
27
+ color: var(--lumo-tertiary-text-color);
28
+ }
29
+
30
+ :host([direction]) {
31
+ color: var(--vaadin-selection-color-text, var(--lumo-primary-text-color));
32
+ }
33
+
34
+ [part='order'] {
35
+ font-size: var(--lumo-font-size-xxs);
36
+ line-height: 1;
37
+ }
38
+
39
+ /* RTL specific styles */
40
+
41
+ :host([dir='rtl']) [part='indicators'] {
42
+ margin-right: var(--lumo-space-s);
43
+ margin-left: 0;
44
+ }
45
+ `,{moduleId:"lumo-grid-sorter"});var r=A(4241),n=A(2807),o=A(1914);const s=document.createElement("template");s.innerHTML="\n <style>\n @font-face {\n font-family: 'vaadin-grid-sorter-icons';\n src: url(data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAQwAA0AAAAABuwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAEFAAAABkAAAAcfep+mUdERUYAAAP4AAAAHAAAAB4AJwAOT1MvMgAAAZgAAAA/AAAAYA8TBPpjbWFwAAAB7AAAAFUAAAFeF1fZ4mdhc3AAAAPwAAAACAAAAAgAAAAQZ2x5ZgAAAlgAAABcAAAAnMvguMloZWFkAAABMAAAAC8AAAA2C5Ap72hoZWEAAAFgAAAAHQAAACQGbQPHaG10eAAAAdgAAAAUAAAAHAoAAABsb2NhAAACRAAAABIAAAASAIwAYG1heHAAAAGAAAAAFgAAACAACwAKbmFtZQAAArQAAAECAAACZxWCgKhwb3N0AAADuAAAADUAAABZCrApUXicY2BkYGAA4rDECVrx/DZfGbhZGEDgyqNPOxH0/wNMq5kPALkcDEwgUQBWRA0dAHicY2BkYGA+8P8AAwMLAwgwrWZgZEAFbABY4QM8AAAAeJxjYGRgYOAAQiYGEICQSAAAAi8AFgAAeJxjYGY6yziBgZWBgWkm0xkGBoZ+CM34msGYkZMBFTAKoAkwODAwvmRiPvD/AIMDMxCD1CDJKjAwAgBktQsXAHicY2GAAMZQCM0EwqshbAALxAEKeJxjYGBgZoBgGQZGBhCIAPIYwXwWBhsgzcXAwcAEhIwMCi+Z/v/9/x+sSuElA4T9/4k4K1gHFwMMMILMY2QDYmaoABOQYGJABUA7WBiGNwAAJd4NIQAAAAAAAAAACAAIABAAGAAmAEAATgAAeJyNjLENgDAMBP9tIURJwQCMQccSZgk2i5fIYBDAidJjycXr7x5EPwE2wY8si7jmyBNXGo/bNBerxJNrpxhbO3/fEFpx8ZICpV+ghxJ74fAMe+h7Ox14AbrsHB14nK2QQWrDMBRER4mTkhQK3ZRQKOgCNk7oGQqhhEIX2WSlWEI1BAlkJ5CDdNsj5Ey9Rncdi38ES+jzNJo/HwTgATcoDEthhY3wBHc4CE+pfwsX5F/hGe7Vo/AcK/UhvMSz+mGXKhZU6pww8ISz3oWn1BvhgnwTnuEJf8Jz1OpFeIlX9YULDLdFi4ASHolkSR0iuYdjLak1vAequBhj21D61Nqyi6l3qWybGPjySbPHGScGJl6dP58MYcQRI0bts7mjebBqrFENH7t3qWtj0OuqHnXcW7b0HOTZFnKryRGW2hFX1m0O2vEM3opNMfTau+CS6Z3Vx6veNnEXY6jwDxhsc2gAAHicY2BiwA84GBgYmRiYGJkZmBlZGFkZ2djScyoLMgzZS/MyDQwMwLSrpYEBlIbxjQDrzgsuAAAAAAEAAf//AA94nGNgZGBg4AFiMSBmYmAEQnYgZgHzGAAD6wA2eJxjYGBgZACCKyoz1cD0o087YTQATOcIewAAAA==) format('woff');\n font-weight: normal;\n font-style: normal;\n }\n </style>\n",document.head.appendChild(s.content),(0,i.hC)("vaadin-grid-sorter",i.iv`
46
+ :host {
47
+ display: inline-flex;
48
+ cursor: pointer;
49
+ max-width: 100%;
50
+ }
51
+
52
+ [part='content'] {
53
+ flex: 1 1 auto;
54
+ }
55
+
56
+ [part='indicators'] {
57
+ position: relative;
58
+ align-self: center;
59
+ flex: none;
60
+ }
61
+
62
+ [part='order'] {
63
+ display: inline;
64
+ vertical-align: super;
65
+ }
66
+
67
+ [part='indicators']::before {
68
+ font-family: 'vaadin-grid-sorter-icons';
69
+ display: inline-block;
70
+ }
71
+
72
+ :host(:not([direction])) [part='indicators']::before {
73
+ content: '\\e901';
74
+ }
75
+
76
+ :host([direction='asc']) [part='indicators']::before {
77
+ content: '\\e900';
78
+ }
79
+
80
+ :host([direction='desc']) [part='indicators']::before {
81
+ content: '\\e902';
82
+ }
83
+ `,{moduleId:"vaadin-grid-sorter-styles"});const a=e=>class extends e{static get properties(){return{path:String,direction:{type:String,reflectToAttribute:!0,notify:!0,value:null,sync:!0},_order:{type:Number,value:null,sync:!0},_isConnected:{type:Boolean,observer:"__isConnectedChanged"}}}static get observers(){return["_pathOrDirectionChanged(path, direction)"]}ready(){super.ready(),this.addEventListener("click",this._onClick.bind(this))}connectedCallback(){super.connectedCallback(),this._isConnected=!0}disconnectedCallback(){super.disconnectedCallback(),this._isConnected=!1,!this.parentNode&&this._grid&&this._grid.__removeSorters([this])}_pathOrDirectionChanged(){this.__dispatchSorterChangedEvenIfPossible()}__isConnectedChanged(e,t){!1!==t&&this.__dispatchSorterChangedEvenIfPossible()}__dispatchSorterChangedEvenIfPossible(){void 0!==this.path&&void 0!==this.direction&&this._isConnected&&(this.dispatchEvent(new CustomEvent("sorter-changed",{detail:{shiftClick:Boolean(this._shiftClick),fromSorterClick:Boolean(this._fromSorterClick)},bubbles:!0,composed:!0})),this._fromSorterClick=!1,this._shiftClick=!1)}_getDisplayOrder(e){return null===e?"":e+1}_onClick(e){if(e.defaultPrevented)return;const t=this.getRootNode().activeElement;this!==t&&this.contains(t)||(e.preventDefault(),this._shiftClick=e.shiftKey,this._fromSorterClick=!0,"asc"===this.direction?this.direction="desc":"desc"===this.direction?this.direction=null:this.direction="asc")}};class c extends(a((0,i.Tb)((0,o.U)(r.H3)))){static get template(){return r.dy`
84
+ <div part="content">
85
+ <slot></slot>
86
+ </div>
87
+ <div part="indicators">
88
+ <span part="order">[[_getDisplayOrder(_order)]]</span>
89
+ </div>
90
+ `}static get is(){return"vaadin-grid-sorter"}}(0,n.M)(c);var d=A(5517);const l=e=>class extends e{static get properties(){return{path:{type:String,sync:!0},direction:{type:String,notify:!0,sync:!0}}}static get observers(){return["_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header, direction)"]}constructor(){super(),this.__boundOnDirectionChanged=this.__onDirectionChanged.bind(this)}_defaultHeaderRenderer(e,t){let A=e.firstElementChild;A||(A=document.createElement("vaadin-grid-sorter"),A.addEventListener("direction-changed",this.__boundOnDirectionChanged),e.appendChild(A)),A.path=this.path,A.__rendererDirection=this.direction,A.direction=this.direction,A.textContent=this.__getHeader(this.header,this.path)}_computeHeaderRenderer(){return this._defaultHeaderRenderer}__onDirectionChanged(e){e.detail.value!==e.target.__rendererDirection&&(this.direction=e.detail.value)}__getHeader(e,t){return e||(t?this._generateHeader(t):void 0)}};class h extends(l(d.C)){static get is(){return"vaadin-grid-sort-column"}}(0,n.M)(h)}}]);
package/dist/umd/4226.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 4226.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4226],{2521:(e,o,t)=>{t.d(o,{S:()=>m});var i=t(9387),n=t(7913),s=t(6139),a=t(1914);let l;(0,i.xj)(!1),window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){};const r=new Set,m=e=>class extends((0,a.U)(e)){static get version(){return"24.2.5"}static finalize(){super.finalize();const{is:e}=this;e&&!r.has(e)&&(window.Vaadin.registrations.push(this),r.add(e),window.Vaadin.developmentModeCallback&&(l=s.dx.debounce(l,n.t$,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),(0,s.Ex)(l)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}},4173:(e,o,t)=>{t(4407);var i=t(6570),n=t(2463);const s=i.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4226],{2521:(e,o,t)=>{t.d(o,{S:()=>m});var i=t(9387),n=t(7913),s=t(6139),a=t(1914);let l;(0,i.xj)(!1),window.Vaadin||(window.Vaadin={}),window.Vaadin.registrations||(window.Vaadin.registrations=[]),window.Vaadin.developmentModeCallback||(window.Vaadin.developmentModeCallback={}),window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]=function(){};const r=new Set,m=e=>class extends((0,a.U)(e)){static finalize(){super.finalize();const{is:e}=this;e&&!r.has(e)&&(window.Vaadin.registrations.push(this),r.add(e),window.Vaadin.developmentModeCallback&&(l=s.dx.debounce(l,n.t$,(()=>{window.Vaadin.developmentModeCallback["vaadin-usage-statistics"]()})),(0,s.Ex)(l)))}constructor(){super(),null===document.doctype&&console.warn('Vaadin components require the "standards mode" declaration. Please add <!DOCTYPE html> to the HTML document.')}}},4173:(e,o,t)=>{t(4407);var i=t(6570),n=t(2463);const s=i.iv`
3
3
  :host {
4
4
  /* prettier-ignore */
5
5
  --lumo-font-family: -apple-system, BlinkMacSystemFont, 'Roboto', 'Segoe UI', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
package/dist/umd/4447.js CHANGED
@@ -1,2 +1 @@
1
- /*! For license information please see 4447.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4447],{4089:(e,t,r)=>{r.d(t,{C:()=>c});var n=r(4241),l=r(7913),o=r(6139),d=r(2807),i=r(1914),a=r(4905),s=r(262),_=r(4346);const h=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value(){if("vaadin-grid-column-group"===this.localName)return;const e=this.parentNode;return e&&"vaadin-grid-column-group"===e.localName&&e.resizable||!1}},frozen:{type:Boolean,value:!1},frozenToEnd:{type:Boolean,value:!1},rowHeader:{type:Boolean,value:!1},hidden:{type:Boolean,value:!1},header:{type:String},textAlign:{type:String},_lastFrozen:{type:Boolean,value:!1},_bodyContentHidden:{type:Boolean,value:!1},_firstFrozenToEnd:{type:Boolean,value:!1},_order:Number,_reorderStatus:Boolean,_emptyCells:Array,_headerCell:Object,_footerCell:Object,_grid:Object,__initialized:{type:Boolean,value:!0},headerRenderer:Function,_headerRenderer:{type:Function,computed:"_computeHeaderRenderer(headerRenderer, header, __initialized)"},footerRenderer:Function,_footerRenderer:{type:Function,computed:"_computeFooterRenderer(footerRenderer, __initialized)"},__gridColumnElement:{type:Boolean,value:!0}}}static get observers(){return["_widthChanged(width, _headerCell, _footerCell, _cells.*)","_frozenChanged(frozen, _headerCell, _footerCell, _cells.*)","_frozenToEndChanged(frozenToEnd, _headerCell, _footerCell, _cells.*)","_flexGrowChanged(flexGrow, _headerCell, _footerCell, _cells.*)","_textAlignChanged(textAlign, _cells.*, _headerCell, _footerCell)","_orderChanged(_order, _headerCell, _footerCell, _cells.*)","_lastFrozenChanged(_lastFrozen)","_firstFrozenToEndChanged(_firstFrozenToEnd)","_onRendererOrBindingChanged(_renderer, _cells, _bodyContentHidden, _cells.*, path)","_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header)","_onFooterRendererOrBindingChanged(_footerRenderer, _footerCell)","_resizableChanged(resizable, _headerCell)","_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells.*)","_hiddenChanged(hidden, _headerCell, _footerCell, _cells.*)","_rowHeaderChanged(rowHeader, _cells.*)"]}get _grid(){return this._gridValue||(this._gridValue=this._findHostGrid()),this._gridValue}get _allCells(){return[].concat(this._cells||[]).concat(this._emptyCells||[]).concat(this._headerCell).concat(this._footerCell).filter((e=>e))}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this._grid&&this._allCells.forEach((e=>{e._content.parentNode||this._grid.appendChild(e._content)}))}))}disconnectedCallback(){super.disconnectedCallback(),requestAnimationFrame((()=>{this._grid||this._allCells.forEach((e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)}))})),this._gridValue=void 0}ready(){super.ready(),(0,s.k)(this)}_findHostGrid(){let e=this;for(;e&&!/^vaadin.*grid(-pro)?$/u.test(e.localName);)e=e.assignedSlot?e.assignedSlot.parentNode:e.parentNode;return e||void 0}_renderHeaderAndFooter(){this._renderHeaderCellContent(this._headerRenderer,this._headerCell),this._renderFooterCellContent(this._footerRenderer,this._footerCell)}_flexGrowChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("flexGrow"),this._allCells.forEach((t=>{t.style.flexGrow=e}))}_orderChanged(e){this._allCells.forEach((t=>{t.style.order=e}))}_widthChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("width"),this._allCells.forEach((t=>{t.style.width=e}))}_frozenChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozen",e),this._allCells.forEach((t=>{(0,_.FQ)(t,"frozen",e)})),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_frozenToEndChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozenToEnd",e),this._allCells.forEach((t=>{this._grid&&t.parentElement===this._grid.$.sizer||(0,_.FQ)(t,"frozen-to-end",e)})),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_lastFrozenChanged(e){this._allCells.forEach((t=>{(0,_.FQ)(t,"last-frozen",e)})),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._lastFrozen=e)}_firstFrozenToEndChanged(e){this._allCells.forEach((t=>{this._grid&&t.parentElement===this._grid.$.sizer||(0,_.FQ)(t,"first-frozen-to-end",e)})),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._firstFrozenToEnd=e)}_rowHeaderChanged(e,t){t.value&&t.value.forEach((t=>{t.setAttribute("role",e?"rowheader":"gridcell")}))}_generateHeader(e){return e.substr(e.lastIndexOf(".")+1).replace(/([A-Z])/gu,"-$1").toLowerCase().replace(/-/gu," ").replace(/^./u,(e=>e.toUpperCase()))}_reorderStatusChanged(e){const t=this.__previousReorderStatus,r=t?`reorder-${t}-cell`:"",n=`reorder-${e}-cell`;this._allCells.forEach((t=>{(0,_.FQ)(t,"reorder-status",e,n,r)})),this.__previousReorderStatus=e}_resizableChanged(e,t){void 0!==e&&void 0!==t&&t&&[t].concat(this._emptyCells).forEach((t=>{if(t){const r=t.querySelector('[part~="resize-handle"]');if(r&&t.removeChild(r),e){const e=document.createElement("div");e.setAttribute("part","resize-handle"),t.appendChild(e)}}}))}_textAlignChanged(e){if(void 0===e||void 0===this._grid)return;if(-1===["start","end","center"].indexOf(e))return void console.warn('textAlign can only be set as "start", "end" or "center"');let t;"ltr"===getComputedStyle(this._grid).direction?"start"===e?t="left":"end"===e&&(t="right"):"start"===e?t="right":"end"===e&&(t="left"),this._allCells.forEach((r=>{r._content.style.textAlign=e,getComputedStyle(r._content).textAlign!==e&&(r._content.style.textAlign=t)}))}_hiddenChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("hidden",e),!!e!=!!this._previousHidden&&this._grid&&(!0===e&&this._allCells.forEach((e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)})),this._grid._debouncerHiddenChanged=o.dx.debounce(this._grid._debouncerHiddenChanged,l.rs,(()=>{this._grid&&this._grid._renderColumnTree&&this._grid._renderColumnTree(this._grid._columnTree)})),this._grid._debounceUpdateFrozenColumn&&this._grid._debounceUpdateFrozenColumn(),this._grid._resetKeyboardNavigation&&this._grid._resetKeyboardNavigation()),this._previousHidden=e}_runRenderer(e,t,r){const n=[t._content,this];r&&r.item&&n.push(r),e.apply(this,n)}__renderCellsContent(e,t){!this.hidden&&this._grid&&t.forEach((t=>{if(!t.parentElement)return;const r=this._grid.__getRowModel(t.parentElement);e&&(t._renderer!==e&&this._clearCellContent(t),t._renderer=e,(r.item||e===this._headerRenderer||e===this._footerRenderer)&&this._runRenderer(e,t,r))}))}_clearCellContent(e){e._content.innerHTML="",delete e._content._$litPart$}_renderHeaderCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement))}_onHeaderRendererOrBindingChanged(e,t,...r){this._renderHeaderCellContent(e,t)}_renderBodyCellsContent(e,t){t&&e&&this.__renderCellsContent(e,t)}_onRendererOrBindingChanged(e,t,...r){this._renderBodyCellsContent(e,t)}_renderFooterCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement))}_onFooterRendererOrBindingChanged(e,t){this._renderFooterCellContent(e,t)}__setTextContent(e,t){e.textContent!==t&&(e.textContent=t)}__textHeaderRenderer(){this.__setTextContent(this._headerCell._content,this.header)}_defaultHeaderRenderer(){this.path&&this.__setTextContent(this._headerCell._content,this._generateHeader(this.path))}_defaultRenderer(e,t,{item:r}){this.path&&this.__setTextContent(e,(0,a.U)(this.path,r))}_defaultFooterRenderer(){}_computeHeaderRenderer(e,t){return e||(null!=t?this.__textHeaderRenderer:this._defaultHeaderRenderer)}_computeRenderer(e){return e||this._defaultRenderer}_computeFooterRenderer(e){return e||this._defaultFooterRenderer}};class c extends(h((0,i.U)(n.H3))){static get is(){return"vaadin-grid-column"}static get properties(){return{width:{type:String,value:"100px"},flexGrow:{type:Number,value:1},renderer:Function,_renderer:{type:Function,computed:"_computeRenderer(renderer, __initialized)"},path:{type:String},autoWidth:{type:Boolean,value:!1},_focusButtonMode:{type:Boolean,value:!1},_cells:Array}}}(0,d.M)(c)},4346:(e,t,r)=>{r.d(t,{CL:()=>d,FQ:()=>C,Fy:()=>l,UN:()=>h,c0:()=>_,cO:()=>c,kp:()=>i,lJ:()=>s,pj:()=>o,xq:()=>a});var n=r(3726);function l(e){return e.__cells||Array.from(e.querySelectorAll('[part~="cell"]:not([part~="details-cell"])'))}function o(e,t){[...e.children].forEach(t)}function d(e,t){l(e).forEach(t),e.__detailsCell&&t(e.__detailsCell)}function i(e,t,r){let n=1;e.forEach((e=>{n%10==0&&(n+=1),e._order=r+n*t,n+=1}))}function a(e,t,r){switch(typeof r){case"boolean":e.toggleAttribute(t,r);break;case"string":e.setAttribute(t,r);break;default:e.removeAttribute(t)}}function s(e,t,r){t||""===t?(0,n.$2)(e,"part",r):(0,n.x_)(e,"part",r)}function _(e,t,r){e.forEach((e=>{s(e,r,t)}))}function h(e,t){const r=l(e);Object.entries(t).forEach((([t,n])=>{a(e,t,n);const l=`${t}-row`;s(e,n,l),_(r,`${l}-cell`,n)}))}function c(e,t){const r=l(e);Object.entries(t).forEach((([t,n])=>{const l=e.getAttribute(t);if(a(e,t,n),l){const n=`${t}-${l}-row`;s(e,!1,n),_(r,`${n}-cell`,!1)}if(n){const l=`${t}-${n}-row`;s(e,n,l),_(r,`${l}-cell`,n)}}))}function C(e,t,r,n,l){a(e,t,r),l&&s(e,!1,l),s(e,r,n||`${t}-cell`)}}}]);
1
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4447],{4447:(r,e,t)=>{t.d(e,{Z:()=>s});const{host:o,label:p,placeholder:i,requiredIndicator:l,inputField:n,input:d,helperText:u,errorMessage:a}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},s={fontSize:[{},o],fontFamily:[p,n,u,a],hostWidth:{...o,property:"width"},hostMinWidth:{...o,property:"min-width"},hostDirection:{...o,property:"direction"},inputBackgroundColor:{...n,property:"background-color"},labelTextColor:[{...p,property:"color"},{...l,property:"color"}],errorMessageTextColor:{...a,property:"color"},inputValueTextColor:{...n,property:"color"},inputCaretTextColor:{...d,property:"color"},labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...n,property:"border-color"},inputBorderWidth:{...n,property:"border-width"},inputBorderStyle:{...n,property:"border-style"},inputBorderRadius:{...n,property:"border-radius"},inputHeight:{...n,property:"height"},inputHorizontalPadding:[{...d,property:"padding-left"},{...d,property:"padding-right"}],inputOutlineColor:{...n,property:"outline-color"},inputOutlineStyle:{...n,property:"outline-style"},inputOutlineWidth:{...n,property:"outline-width"},inputOutlineOffset:{...n,property:"outline-offset"},inputTextAlign:{...d,property:"text-align"},inputPlaceholderColor:{...i,property:"color"}}}}]);
package/dist/umd/5345.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 5345.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5345],{9580:(t,e,i)=>{i.d(e,{B:()=>o});class o{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}},3373:(t,e,i)=>{i.d(e,{y:()=>r});var o=i(3726);const n={start:"top",end:"bottom"},s={start:"left",end:"right"},a=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),r=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null},horizontalAlign:{type:String,value:"start"},verticalAlign:{type:String,value:"top"},noHorizontalOverlap:{type:Boolean,value:!1},noVerticalOverlap:{type:Boolean,value:!1},requiredVerticalSpace:{type:Number,value:0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=(0,o.AD)(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,a.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,a.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,o=this.__shouldAlignStartHorizontally(t,i),a=!i&&o||i&&!o;this.style.alignItems=a?"flex-start":"flex-end";const r=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,n,this,e),h=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,s,this,o);Object.assign(this.style,l,h),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!a),this.toggleAttribute("start-aligned",a)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const o=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign;return this.__shouldAlignStart(t,i,o,this.__margins,n,this.noHorizontalOverlap,s)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),o="top"===this.verticalAlign;return this.__shouldAlignStart(t,e,i,this.__margins,o,this.noVerticalOverlap,n)}__shouldAlignStart(t,e,i,o,n,s,a){const r=i-t[s?a.end:a.start]-o[a.end],l=t[s?a.start:a.end]-o[a.start],h=n?r:l;return n===(h>(n?l:r)||h>e)}__adjustBottomProperty(t,e,i){let o;if(t===e.end){if(e.end===n.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(o=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===s.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(o=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return o}__calculatePositionInOneDimension(t,e,i,o,n,s){const a=s?o.start:o.end,r=s?o.end:o.start,l=parseFloat(n.style[a]||getComputedStyle(n)[a]),h=this.__adjustBottomProperty(a,o,l),d=e[s?o.start:o.end]-t[i===s?o.end:o.start];return{[a]:h?`${h}px`:`${l+d*(s?-1:1)}px`,[r]:""}}}},6754:(t,e,i)=>{i.d(e,{L:()=>r,e:()=>s}),i(9416),i(9849);var o=i(6570),n=i(510);const s=o.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5345],{9580:(t,e,i)=>{i.d(e,{B:()=>o});class o{constructor(t){this.host=t,t.addEventListener("opened-changed",(()=>{t.opened||this.__setVirtualKeyboardEnabled(!1)})),t.addEventListener("blur",(()=>this.__setVirtualKeyboardEnabled(!0))),t.addEventListener("touchstart",(()=>this.__setVirtualKeyboardEnabled(!0)))}__setVirtualKeyboardEnabled(t){this.host.inputElement&&(this.host.inputElement.inputMode=t?"":"none")}}},3373:(t,e,i)=>{i.d(e,{y:()=>r});var o=i(3726);const n={start:"top",end:"bottom"},s={start:"left",end:"right"},a=new ResizeObserver((t=>{setTimeout((()=>{t.forEach((t=>{t.target.__overlay&&t.target.__overlay._updatePosition()}))}))})),r=t=>class extends t{static get properties(){return{positionTarget:{type:Object,value:null,sync:!0},horizontalAlign:{type:String,value:"start",sync:!0},verticalAlign:{type:String,value:"top",sync:!0},noHorizontalOverlap:{type:Boolean,value:!1,sync:!0},noVerticalOverlap:{type:Boolean,value:!1,sync:!0},requiredVerticalSpace:{type:Number,value:0,sync:!0}}}static get observers(){return["__positionSettingsChanged(horizontalAlign, verticalAlign, noHorizontalOverlap, noVerticalOverlap, requiredVerticalSpace)","__overlayOpenedChanged(opened, positionTarget)"]}constructor(){super(),this.__onScroll=this.__onScroll.bind(this),this._updatePosition=this._updatePosition.bind(this)}connectedCallback(){super.connectedCallback(),this.opened&&this.__addUpdatePositionEventListeners()}disconnectedCallback(){super.disconnectedCallback(),this.__removeUpdatePositionEventListeners()}__addUpdatePositionEventListeners(){window.addEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes=(0,o.AD)(this.positionTarget),this.__positionTargetAncestorRootNodes.forEach((t=>{t.addEventListener("scroll",this.__onScroll,!0)}))}__removeUpdatePositionEventListeners(){window.removeEventListener("resize",this._updatePosition),this.__positionTargetAncestorRootNodes&&(this.__positionTargetAncestorRootNodes.forEach((t=>{t.removeEventListener("scroll",this.__onScroll,!0)})),this.__positionTargetAncestorRootNodes=null)}__overlayOpenedChanged(t,e){if(this.__removeUpdatePositionEventListeners(),e&&(e.__overlay=null,a.unobserve(e),t&&(this.__addUpdatePositionEventListeners(),e.__overlay=this,a.observe(e))),t){const t=getComputedStyle(this);this.__margins||(this.__margins={},["top","bottom","left","right"].forEach((e=>{this.__margins[e]=parseInt(t[e],10)}))),this.setAttribute("dir",t.direction),this._updatePosition(),requestAnimationFrame((()=>this._updatePosition()))}}__positionSettingsChanged(){this._updatePosition()}__onScroll(t){this.contains(t.target)||this._updatePosition()}_updatePosition(){if(!this.positionTarget||!this.opened)return;const t=this.positionTarget.getBoundingClientRect(),e=this.__shouldAlignStartVertically(t);this.style.justifyContent=e?"flex-start":"flex-end";const i=this.__isRTL,o=this.__shouldAlignStartHorizontally(t,i),a=!i&&o||i&&!o;this.style.alignItems=a?"flex-start":"flex-end";const r=this.getBoundingClientRect(),l=this.__calculatePositionInOneDimension(t,r,this.noVerticalOverlap,n,this,e),h=this.__calculatePositionInOneDimension(t,r,this.noHorizontalOverlap,s,this,o);Object.assign(this.style,l,h),this.toggleAttribute("bottom-aligned",!e),this.toggleAttribute("top-aligned",e),this.toggleAttribute("end-aligned",!a),this.toggleAttribute("start-aligned",a)}__shouldAlignStartHorizontally(t,e){const i=Math.max(this.__oldContentWidth||0,this.$.overlay.offsetWidth);this.__oldContentWidth=this.$.overlay.offsetWidth;const o=Math.min(window.innerWidth,document.documentElement.clientWidth),n=!e&&"start"===this.horizontalAlign||e&&"end"===this.horizontalAlign;return this.__shouldAlignStart(t,i,o,this.__margins,n,this.noHorizontalOverlap,s)}__shouldAlignStartVertically(t){const e=this.requiredVerticalSpace||Math.max(this.__oldContentHeight||0,this.$.overlay.offsetHeight);this.__oldContentHeight=this.$.overlay.offsetHeight;const i=Math.min(window.innerHeight,document.documentElement.clientHeight),o="top"===this.verticalAlign;return this.__shouldAlignStart(t,e,i,this.__margins,o,this.noVerticalOverlap,n)}__shouldAlignStart(t,e,i,o,n,s,a){const r=i-t[s?a.end:a.start]-o[a.end],l=t[s?a.start:a.end]-o[a.start],h=n?r:l;return n===(h>(n?l:r)||h>e)}__adjustBottomProperty(t,e,i){let o;if(t===e.end){if(e.end===n.end){const t=Math.min(window.innerHeight,document.documentElement.clientHeight);i>t&&this.__oldViewportHeight&&(o=i-(this.__oldViewportHeight-t)),this.__oldViewportHeight=t}if(e.end===s.end){const t=Math.min(window.innerWidth,document.documentElement.clientWidth);i>t&&this.__oldViewportWidth&&(o=i-(this.__oldViewportWidth-t)),this.__oldViewportWidth=t}}return o}__calculatePositionInOneDimension(t,e,i,o,n,s){const a=s?o.start:o.end,r=s?o.end:o.start,l=parseFloat(n.style[a]||getComputedStyle(n)[a]),h=this.__adjustBottomProperty(a,o,l),d=e[s?o.start:o.end]-t[i===s?o.end:o.start];return{[a]:h?`${h}px`:`${l+d*(s?-1:1)}px`,[r]:""}}}},6754:(t,e,i)=>{i.d(e,{L:()=>r,e:()=>s}),i(9416),i(9849);var o=i(6570),n=i(510);const s=o.iv`
3
3
  :host([opening]),
4
4
  :host([closing]) {
5
5
  animation: 0.14s lumo-overlay-dummy-animation;
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 5517.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5517],{5517:(e,t,r)=>{r.d(t,{C:()=>c});var n=r(4241),o=r(2807),l=r(7913),i=r(6139),s=r(1914),a=r(4905),d=r(262),_=r(4346);const h=e=>class extends e{static get properties(){return{resizable:{type:Boolean,sync:!0,value(){if("vaadin-grid-column-group"===this.localName)return;const e=this.parentNode;return e&&"vaadin-grid-column-group"===e.localName&&e.resizable||!1}},frozen:{type:Boolean,value:!1,sync:!0},frozenToEnd:{type:Boolean,value:!1,sync:!0},rowHeader:{type:Boolean,value:!1,sync:!0},hidden:{type:Boolean,value:!1,sync:!0},header:{type:String,sync:!0},textAlign:{type:String,sync:!0},headerPartName:{type:String,sync:!0},footerPartName:{type:String,sync:!0},_lastFrozen:{type:Boolean,value:!1,sync:!0},_bodyContentHidden:{type:Boolean,value:!1,sync:!0},_firstFrozenToEnd:{type:Boolean,value:!1,sync:!0},_order:{type:Number,sync:!0},_reorderStatus:{type:Boolean,sync:!0},_emptyCells:Array,_headerCell:Object,_footerCell:Object,_grid:Object,__initialized:{type:Boolean,value:!0},headerRenderer:{type:Function,sync:!0},_headerRenderer:{type:Function,computed:"_computeHeaderRenderer(headerRenderer, header, __initialized)",sync:!0},footerRenderer:{type:Function,sync:!0},_footerRenderer:{type:Function,computed:"_computeFooterRenderer(footerRenderer, __initialized)",sync:!0},__gridColumnElement:{type:Boolean,value:!0}}}static get observers(){return["_widthChanged(width, _headerCell, _footerCell, _cells)","_frozenChanged(frozen, _headerCell, _footerCell, _cells)","_frozenToEndChanged(frozenToEnd, _headerCell, _footerCell, _cells)","_flexGrowChanged(flexGrow, _headerCell, _footerCell, _cells)","_textAlignChanged(textAlign, _cells, _headerCell, _footerCell)","_orderChanged(_order, _headerCell, _footerCell, _cells)","_lastFrozenChanged(_lastFrozen)","_firstFrozenToEndChanged(_firstFrozenToEnd)","_onRendererOrBindingChanged(_renderer, _cells, _bodyContentHidden, path)","_onHeaderRendererOrBindingChanged(_headerRenderer, _headerCell, path, header)","_onFooterRendererOrBindingChanged(_footerRenderer, _footerCell)","_resizableChanged(resizable, _headerCell)","_reorderStatusChanged(_reorderStatus, _headerCell, _footerCell, _cells)","_hiddenChanged(hidden, _headerCell, _footerCell, _cells)","_rowHeaderChanged(rowHeader, _cells)","__headerFooterPartNameChanged(_headerCell, _footerCell, headerPartName, footerPartName)"]}get _grid(){return this._gridValue||(this._gridValue=this._findHostGrid()),this._gridValue}get _allCells(){return[].concat(this._cells||[]).concat(this._emptyCells||[]).concat(this._headerCell).concat(this._footerCell).filter((e=>e))}connectedCallback(){super.connectedCallback(),requestAnimationFrame((()=>{this._grid&&this._allCells.forEach((e=>{e._content.parentNode||this._grid.appendChild(e._content)}))}))}disconnectedCallback(){super.disconnectedCallback(),requestAnimationFrame((()=>{this._grid||this._allCells.forEach((e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)}))})),this._gridValue=void 0}ready(){super.ready(),(0,d.k)(this)}_findHostGrid(){let e=this;for(;e&&!/^vaadin.*grid(-pro)?$/u.test(e.localName);)e=e.assignedSlot?e.assignedSlot.parentNode:e.parentNode;return e||void 0}_renderHeaderAndFooter(){this._renderHeaderCellContent(this._headerRenderer,this._headerCell),this._renderFooterCellContent(this._footerRenderer,this._footerCell)}_flexGrowChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("flexGrow"),this._allCells.forEach((t=>{t.style.flexGrow=e}))}_orderChanged(e){this._allCells.forEach((t=>{t.style.order=e}))}_widthChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("width"),this._allCells.forEach((t=>{t.style.width=e}))}_frozenChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozen",e),this._allCells.forEach((t=>{(0,_.FQ)(t,"frozen",e)})),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_frozenToEndChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("frozenToEnd",e),this._allCells.forEach((t=>{this._grid&&t.parentElement===this._grid.$.sizer||(0,_.FQ)(t,"frozen-to-end",e)})),this._grid&&this._grid._frozenCellsChanged&&this._grid._frozenCellsChanged()}_lastFrozenChanged(e){this._allCells.forEach((t=>{(0,_.FQ)(t,"last-frozen",e)})),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._lastFrozen=e)}_firstFrozenToEndChanged(e){this._allCells.forEach((t=>{this._grid&&t.parentElement===this._grid.$.sizer||(0,_.FQ)(t,"first-frozen-to-end",e)})),this.parentElement&&this.parentElement._columnPropChanged&&(this.parentElement._firstFrozenToEnd=e)}_rowHeaderChanged(e,t){t&&t.forEach((t=>{t.setAttribute("role",e?"rowheader":"gridcell")}))}_generateHeader(e){return e.substr(e.lastIndexOf(".")+1).replace(/([A-Z])/gu,"-$1").toLowerCase().replace(/-/gu," ").replace(/^./u,(e=>e.toUpperCase()))}_reorderStatusChanged(e){const t=this.__previousReorderStatus,r=t?`reorder-${t}-cell`:"",n=`reorder-${e}-cell`;this._allCells.forEach((t=>{(0,_.FQ)(t,"reorder-status",e,n,r)})),this.__previousReorderStatus=e}_resizableChanged(e,t){void 0!==e&&void 0!==t&&t&&[t].concat(this._emptyCells).forEach((t=>{if(t){const r=t.querySelector('[part~="resize-handle"]');if(r&&t.removeChild(r),e){const e=document.createElement("div");e.setAttribute("part","resize-handle"),t.appendChild(e)}}}))}_textAlignChanged(e){if(void 0===e||void 0===this._grid)return;if(-1===["start","end","center"].indexOf(e))return void console.warn('textAlign can only be set as "start", "end" or "center"');let t;"ltr"===getComputedStyle(this._grid).direction?"start"===e?t="left":"end"===e&&(t="right"):"start"===e?t="right":"end"===e&&(t="left"),this._allCells.forEach((r=>{r._content.style.textAlign=e,getComputedStyle(r._content).textAlign!==e&&(r._content.style.textAlign=t)}))}_hiddenChanged(e){this.parentElement&&this.parentElement._columnPropChanged&&this.parentElement._columnPropChanged("hidden",e),!!e!=!!this._previousHidden&&this._grid&&(!0===e&&this._allCells.forEach((e=>{e._content.parentNode&&e._content.parentNode.removeChild(e._content)})),this._grid._debouncerHiddenChanged=i.dx.debounce(this._grid._debouncerHiddenChanged,l.rs,(()=>{this._grid&&this._grid._renderColumnTree&&this._grid._renderColumnTree(this._grid._columnTree)})),this._grid._debounceUpdateFrozenColumn&&this._grid._debounceUpdateFrozenColumn(),this._grid._resetKeyboardNavigation&&this._grid._resetKeyboardNavigation()),this._previousHidden=e}_runRenderer(e,t,r){const n=r&&r.item&&!t.parentElement.hidden;if(!n&&e!==this._headerRenderer&&e!==this._footerRenderer)return;const o=[t._content,this];n&&o.push(r),e.apply(this,o)}__renderCellsContent(e,t){!this.hidden&&this._grid&&t.forEach((t=>{if(!t.parentElement)return;const r=this._grid.__getRowModel(t.parentElement);e&&(t._renderer!==e&&this._clearCellContent(t),t._renderer=e,this._runRenderer(e,t,r))}))}_clearCellContent(e){e._content.innerHTML="",delete e._content._$litPart$}_renderHeaderCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement))}_onHeaderRendererOrBindingChanged(e,t,...r){this._renderHeaderCellContent(e,t)}__headerFooterPartNameChanged(e,t,r,n){[{cell:e,partName:r},{cell:t,partName:n}].forEach((({cell:e,partName:t})=>{if(e){const r=e.__customParts||[];e.part.remove(...r),e.__customParts=t?t.trim().split(" "):[],e.part.add(...e.__customParts)}}))}_renderBodyCellsContent(e,t){t&&e&&this.__renderCellsContent(e,t)}_onRendererOrBindingChanged(e,t,...r){this._renderBodyCellsContent(e,t)}_renderFooterCellContent(e,t){t&&e&&(this.__renderCellsContent(e,[t]),this._grid&&t.parentElement&&this._grid.__debounceUpdateHeaderFooterRowVisibility(t.parentElement))}_onFooterRendererOrBindingChanged(e,t){this._renderFooterCellContent(e,t)}__setTextContent(e,t){e.textContent!==t&&(e.textContent=t)}__textHeaderRenderer(){this.__setTextContent(this._headerCell._content,this.header)}_defaultHeaderRenderer(){this.path&&this.__setTextContent(this._headerCell._content,this._generateHeader(this.path))}_defaultRenderer(e,t,{item:r}){this.path&&this.__setTextContent(e,(0,a.U)(this.path,r))}_defaultFooterRenderer(){}_computeHeaderRenderer(e,t){return e||(null!=t?this.__textHeaderRenderer:this._defaultHeaderRenderer)}_computeRenderer(e){return e||this._defaultRenderer}_computeFooterRenderer(e){return e||this._defaultFooterRenderer}};class c extends((e=>class extends(h((0,s.U)(e))){static get properties(){return{width:{type:String,value:"100px",sync:!0},flexGrow:{type:Number,value:1,sync:!0},renderer:{type:Function,sync:!0},_renderer:{type:Function,computed:"_computeRenderer(renderer, __initialized)",sync:!0},path:{type:String,sync:!0},autoWidth:{type:Boolean,value:!1},_focusButtonMode:{type:Boolean,value:!1},_cells:{type:Array,sync:!0}}}})(n.H3)){static get is(){return"vaadin-grid-column"}}(0,o.M)(c)},4346:(e,t,r)=>{r.d(t,{CL:()=>a,FQ:()=>g,Fy:()=>i,UN:()=>u,c0:()=>c,cO:()=>C,cs:()=>p,kp:()=>d,lJ:()=>h,pj:()=>s,xq:()=>_});var n=r(7913),o=r(6139),l=r(3726);function i(e){return e.__cells||Array.from(e.querySelectorAll('[part~="cell"]:not([part~="details-cell"])'))}function s(e,t){[...e.children].forEach(t)}function a(e,t){i(e).forEach(t),e.__detailsCell&&t(e.__detailsCell)}function d(e,t,r){let n=1;e.forEach((e=>{n%10==0&&(n+=1),e._order=r+n*t,n+=1}))}function _(e,t,r){switch(typeof r){case"boolean":e.toggleAttribute(t,r);break;case"string":e.setAttribute(t,r);break;default:e.removeAttribute(t)}}function h(e,t,r){t||""===t?(0,l.$2)(e,"part",r):(0,l.x_)(e,"part",r)}function c(e,t,r){e.forEach((e=>{h(e,r,t)}))}function u(e,t){const r=i(e);Object.entries(t).forEach((([t,n])=>{_(e,t,n);const o=`${t}-row`;h(e,n,o),c(r,`${o}-cell`,n)}))}function C(e,t){const r=i(e);Object.entries(t).forEach((([t,n])=>{const o=e.getAttribute(t);if(_(e,t,n),o){const n=`${t}-${o}-row`;h(e,!1,n),c(r,`${n}-cell`,!1)}if(n){const o=`${t}-${n}-row`;h(e,n,o),c(r,`${o}-cell`,n)}}))}function g(e,t,r,n,o){_(e,t,r),o&&h(e,!1,o),h(e,r,n||`${t}-cell`)}class p{constructor(e,t){this.__host=e,this.__callback=t,this.__currentSlots=[],this.__onMutation=this.__onMutation.bind(this),this.__observer=new MutationObserver(this.__onMutation),this.__observer.observe(e,{childList:!0}),this.__initialCallDebouncer=o.dx.debounce(this.__initialCallDebouncer,n.YA,(()=>this.__onMutation()))}disconnect(){this.__observer.disconnect(),this.__initialCallDebouncer.cancel(),this.__toggleSlotChangeListeners(!1)}flush(){this.__onMutation()}__toggleSlotChangeListeners(e){this.__currentSlots.forEach((t=>{e?t.addEventListener("slotchange",this.__onMutation):t.removeEventListener("slotchange",this.__onMutation)}))}__onMutation(){const e=!this.__currentColumns;this.__currentColumns||=[];const t=p.getColumns(this.__host),r=t.filter((e=>!this.__currentColumns.includes(e))),n=this.__currentColumns.filter((e=>!t.includes(e))),o=this.__currentColumns.some(((e,r)=>e!==t[r]));this.__currentColumns=t,this.__toggleSlotChangeListeners(!1),this.__currentSlots=[...this.__host.children].filter((e=>e instanceof HTMLSlotElement)),this.__toggleSlotChangeListeners(!0),(e||r.length||n.length||o)&&this.__callback(r,n)}static __isColumnElement(e){return e.nodeType===Node.ELEMENT_NODE&&/\bcolumn\b/u.test(e.localName)}static getColumns(e){const t=[],r=e._isColumnElement||p.__isColumnElement;return[...e.children].forEach((e=>{r(e)?t.push(e):e instanceof HTMLSlotElement&&[...e.assignedElements({flatten:!0})].filter((e=>r(e))).forEach((e=>t.push(e)))})),t}}}}]);
package/dist/umd/5806.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 5806.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5806],{5806:(e,t,n)=>{n(3787),n(9098);var i=n(4398),s=n(2279),a=n(6570);const r=a.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[5806],{5806:(e,t,n)=>{n(1578),n(9098);var i=n(4398),s=n(2279),a=n(6570);const r=a.iv`
3
3
  :host([step-buttons-visible]:not([theme~='align-right'])) ::slotted(input) {
4
4
  text-align: center;
5
5
  }
@@ -35,7 +35,7 @@
35
35
  :host([dir='rtl']:not([theme~='align-right'])) ::slotted(input) {
36
36
  --_lumo-text-field-overflow-mask-image: linear-gradient(to left, transparent, #000 1.25em);
37
37
  }
38
- `;(0,a.hC)("vaadin-number-field",[s.J,i.q,r],{moduleId:"lumo-number-field"}),n(3130);var l=n(4241),o=n(2807),u=n(2521),h=n(4463),d=n(2743),p=n(3208),c=n(422),m=n(6729);const b=e=>class extends((0,c.j)(e)){static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},stepButtonsVisible:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_stepChanged(step, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"min","max"]}static get constraints(){return[...super.constraints,"min","max","step"]}constructor(){super(),this._setType("number"),this.__onWheel=this.__onWheel.bind(this)}get slotStyles(){const e=this.localName;return[`\n ${e} input[type="number"]::-webkit-outer-spin-button,\n ${e} input[type="number"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n ${e} input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ${e}[dir='rtl'] input[type="number"]::placeholder {\n direction: rtl;\n }\n\n ${e}[dir='rtl']:not([step-buttons-visible]) input[type="number"]::placeholder {\n text-align: left;\n }\n `]}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new p.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new m.v(this.inputElement,this._labelController))}checkValidity(){return this.inputElement?this.inputElement.checkValidity():!this.invalid}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("wheel",this.__onWheel)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("wheel",this.__onWheel)}__onWheel(e){this.hasAttribute("focused")&&e.preventDefault()}_onDecreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this._decreaseValue())}_onIncreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this._increaseValue())}_onDecreaseButtonClick(){this._decreaseValue()}_onIncreaseButtonClick(){this._increaseValue()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;const t=this.step||1;let n=parseFloat(this.value);this.value?n<this.min?(e=0,n=this.min):n>this.max&&(e=0,n=this.max):0===this.min&&e<0||0===this.max&&e>0||0===this.max&&0===this.min?(e=0,n=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?n=0:this.min>0?(n=this.min,this.max<0&&e<0&&(n=this.max),e=0):this.max<0&&(n=this.max,e<0?e=0:this._getIncrement(1,n-t)>this.max?n-=2*t:n-=t);const i=this._getIncrement(e,n);this.value&&0!==e&&!this._incrementIsInsideTheLimits(e,n)||this._setValue(i)}_setValue(e){this.value=this.inputElement.value=String(parseFloat(e)),this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_getIncrement(e,t){let n=this.step||1,i=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(n),this._getMultiplier(i));n*=s,i*=s;const a=((t=Math.round(t*s))-i)%n;return e>0?(t-a+n)/s:e<0?(t-(a||n))/s:t/s}_getDecimalCount(e){const t=String(e),n=t.indexOf(".");return-1===n?1:t.length-n-1}_getMultiplier(e){if(!isNaN(e))return 10**this._getDecimalCount(e)}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_isButtonEnabled(e){const t=e*(this.step||1),n=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,n)}_stepChanged(e,t){t&&(t.step=e||"any")}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t)}_onKeyDown(e){"ArrowUp"===e.key?(e.preventDefault(),this._increaseValue()):"ArrowDown"===e.key&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0||t.validity.badInput}},_=n(9392).iv`
38
+ `;(0,a.hC)("vaadin-number-field",[s.J,i.q,r],{moduleId:"lumo-number-field"}),n(3553);var l=n(4241),o=n(2807),u=n(2521),h=n(4463),p=n(2743),d=n(3208),m=n(422),c=n(6729);const _=e=>class extends((0,m.j)(e)){static get properties(){return{min:{type:Number},max:{type:Number},step:{type:Number},stepButtonsVisible:{type:Boolean,value:!1,reflectToAttribute:!0}}}static get observers(){return["_stepChanged(step, inputElement)"]}static get delegateProps(){return[...super.delegateProps,"min","max"]}static get constraints(){return[...super.constraints,"min","max","step"]}constructor(){super(),this._setType("number"),this.__onWheel=this.__onWheel.bind(this)}get slotStyles(){const e=this.localName;return[`\n ${e} input[type="number"]::-webkit-outer-spin-button,\n ${e} input[type="number"]::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n ${e} input[type="number"] {\n -moz-appearance: textfield;\n }\n\n ${e}[dir='rtl'] input[type="number"]::placeholder {\n direction: rtl;\n }\n\n ${e}[dir='rtl']:not([step-buttons-visible]) input[type="number"]::placeholder {\n text-align: left;\n }\n `]}get clearElement(){return this.$.clearButton}get __hasUnparsableValue(){return this.inputElement.validity.badInput}ready(){super.ready(),this.addController(new d.b(this,(e=>{this._setInputElement(e),this._setFocusElement(e),this.stateTarget=e,this.ariaTarget=e}))),this.addController(new c.v(this.inputElement,this._labelController))}checkValidity(){return this.inputElement?this.inputElement.checkValidity():!this.invalid}_addInputListeners(e){super._addInputListeners(e),e.addEventListener("wheel",this.__onWheel)}_removeInputListeners(e){super._removeInputListeners(e),e.removeEventListener("wheel",this.__onWheel)}__onWheel(e){this.hasAttribute("focused")&&e.preventDefault()}_onDecreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this._decreaseValue())}_onIncreaseButtonTouchend(e){e.cancelable&&(e.preventDefault(),this._increaseValue())}_onDecreaseButtonClick(){this._decreaseValue()}_onIncreaseButtonClick(){this._increaseValue()}_decreaseValue(){this._incrementValue(-1)}_increaseValue(){this._incrementValue(1)}_incrementValue(e){if(this.disabled||this.readonly)return;const t=this.step||1;let n=parseFloat(this.value);this.value?n<this.min?(e=0,n=this.min):n>this.max&&(e=0,n=this.max):0===this.min&&e<0||0===this.max&&e>0||0===this.max&&0===this.min?(e=0,n=0):(null==this.max||this.max>=0)&&(null==this.min||this.min<=0)?n=0:this.min>0?(n=this.min,this.max<0&&e<0&&(n=this.max),e=0):this.max<0&&(n=this.max,e<0?e=0:this._getIncrement(1,n-t)>this.max?n-=2*t:n-=t);const i=this._getIncrement(e,n);this.value&&0!==e&&!this._incrementIsInsideTheLimits(e,n)||(this.inputElement.value=String(parseFloat(i)),this.inputElement.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})),this.__commitValueChange())}_getIncrement(e,t){let n=this.step||1,i=this.min||0;const s=Math.max(this._getMultiplier(t),this._getMultiplier(n),this._getMultiplier(i));n*=s,i*=s;const a=((t=Math.round(t*s))-i)%n;return e>0?(t-a+n)/s:e<0?(t-(a||n))/s:t/s}_getDecimalCount(e){const t=String(e),n=t.indexOf(".");return-1===n?1:t.length-n-1}_getMultiplier(e){if(!isNaN(e))return 10**this._getDecimalCount(e)}_incrementIsInsideTheLimits(e,t){return e<0?null==this.min||this._getIncrement(e,t)>=this.min:e>0?null==this.max||this._getIncrement(e,t)<=this.max:this._getIncrement(e,t)<=this.max&&this._getIncrement(e,t)>=this.min}_isButtonEnabled(e){const t=e*(this.step||1),n=parseFloat(this.value);return!this.value||!this.disabled&&this._incrementIsInsideTheLimits(t,n)}_stepChanged(e,t){t&&(t.step=e||"any")}_valueChanged(e,t){e&&isNaN(parseFloat(e))?this.value="":"string"!=typeof this.value&&(this.value=String(this.value)),super._valueChanged(this.value,t),this.__keepCommittedValue||(this.__committedValue=this.value,this.__committedUnparsableValueStatus=!1)}_onKeyDown(e){"ArrowUp"===e.key?(e.preventDefault(),this._increaseValue()):"ArrowDown"===e.key&&(e.preventDefault(),this._decreaseValue()),super._onKeyDown(e)}_setHasInputValue(e){const t=e.composedPath()[0];this._hasInputValue=t.value.length>0||this.__hasUnparsableValue}_onInput(e){this.__keepCommittedValue=!0,super._onInput(e),this.__keepCommittedValue=!1}_onChange(e){e.stopPropagation()}_onClearAction(e){super._onClearAction(e),this.__commitValueChange()}_setFocused(e){super._setFocused(e),e||this.__commitValueChange()}_onEnter(e){super._onEnter(e),this.__commitValueChange()}__commitValueChange(){this.__committedValue!==this.value?(this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))):this.__committedUnparsableValueStatus!==this.__hasUnparsableValue&&(this.validate(),this.dispatchEvent(new CustomEvent("unparsable-change"))),this.__committedValue=this.value,this.__committedUnparsableValueStatus=this.__hasUnparsableValue}},b=n(9392).iv`
39
39
  :host([readonly]) [part$='button'] {
40
40
  pointer-events: none;
41
41
  }
@@ -58,7 +58,7 @@
58
58
  :host([dir='rtl']) [part='input-field'] {
59
59
  direction: ltr;
60
60
  }
61
- `;(0,a.hC)("vaadin-number-field",[d.J,_],{moduleId:"vaadin-number-field-styles"});class v extends(b((0,a.Tb)((0,u.S)(l.H3)))){static get is(){return"vaadin-number-field"}static get template(){return l.dy`
61
+ `;(0,a.hC)("vaadin-number-field",[p.J,b],{moduleId:"vaadin-number-field-styles"});class v extends(_((0,a.Tb)((0,u.S)(l.H3)))){static get is(){return"vaadin-number-field"}static get template(){return l.dy`
62
62
  <div class="vaadin-field-container">
63
63
  <div part="label">
64
64
  <slot name="label"></slot>