@descope/web-components-ui 1.0.222 → 1.0.224

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. package/dist/cjs/index.cjs.js +1145 -739
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +1264 -752
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1000.js +1 -1
  6. package/dist/umd/1037.js +2 -0
  7. package/dist/umd/1037.js.LICENSE.txt +5 -0
  8. package/dist/umd/1419.js +360 -0
  9. package/dist/umd/1419.js.LICENSE.txt +23 -0
  10. package/dist/umd/1932.js +310 -0
  11. package/dist/umd/1932.js.LICENSE.txt +5 -0
  12. package/dist/umd/1990.js +3 -3
  13. package/dist/umd/2066.js +2 -0
  14. package/dist/umd/2066.js.LICENSE.txt +5 -0
  15. package/dist/umd/262.js +2 -0
  16. package/dist/umd/262.js.LICENSE.txt +5 -0
  17. package/dist/umd/2873.js +738 -0
  18. package/dist/umd/2873.js.LICENSE.txt +21 -0
  19. package/dist/umd/3003.js +2 -0
  20. package/dist/umd/3003.js.LICENSE.txt +9 -0
  21. package/dist/umd/{9515.js → 3092.js} +88 -88
  22. package/dist/umd/3660.js +17 -0
  23. package/dist/umd/{1883.js.LICENSE.txt → 3660.js.LICENSE.txt} +1 -11
  24. package/dist/umd/422.js +1 -1
  25. package/dist/umd/4222.js +2 -0
  26. package/dist/umd/{1852.js.LICENSE.txt → 4222.js.LICENSE.txt} +0 -30
  27. package/dist/umd/4447.js +2 -1
  28. package/dist/umd/4447.js.LICENSE.txt +5 -0
  29. package/dist/umd/4567.js +1 -0
  30. package/dist/umd/4746.js +123 -0
  31. package/dist/umd/4905.js +2 -0
  32. package/dist/umd/4905.js.LICENSE.txt +5 -0
  33. package/dist/umd/5345.js +94 -0
  34. package/dist/umd/5806.js +1 -1
  35. package/dist/umd/5977.js +289 -0
  36. package/dist/umd/5977.js.LICENSE.txt +17 -0
  37. package/dist/umd/6551.js +1 -0
  38. package/dist/umd/{7101.js → 6770.js} +5 -5
  39. package/dist/umd/6770.js.LICENSE.txt +11 -0
  40. package/dist/umd/7056.js +1 -1
  41. package/dist/umd/{6116.js → 7514.js} +9 -9
  42. package/dist/umd/8725.js +2 -2
  43. package/dist/umd/9189.js +2 -0
  44. package/dist/umd/9189.js.LICENSE.txt +5 -0
  45. package/dist/umd/9211.js +2 -2
  46. package/dist/umd/9437.js +1 -1
  47. package/dist/umd/9629.js +2 -0
  48. package/dist/umd/9629.js.LICENSE.txt +5 -0
  49. package/dist/umd/9671.js +1 -0
  50. package/dist/umd/9680.js +2 -0
  51. package/dist/umd/9680.js.LICENSE.txt +5 -0
  52. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
  53. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
  54. package/dist/umd/descope-combo-box-index-js.js +1 -1
  55. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +1 -0
  56. package/dist/umd/descope-grid-descope-grid-status-column-index-js.js +1 -0
  57. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +1 -0
  58. package/dist/umd/descope-grid-index-js.js +1 -0
  59. package/dist/umd/descope-modal-index-js.js +1 -0
  60. package/dist/umd/descope-text-area-index-js.js +1 -1
  61. package/dist/umd/index.js +1 -1
  62. package/package.json +4 -2
  63. package/src/components/descope-grid/GridClass.js +226 -0
  64. package/src/components/descope-grid/descope-grid-selection-column/index.js +68 -0
  65. package/src/components/descope-grid/descope-grid-status-column/index.js +34 -0
  66. package/src/components/descope-grid/descope-grid-text-column/index.js +11 -0
  67. package/src/components/descope-grid/helpers.js +9 -0
  68. package/src/components/descope-grid/index.js +10 -0
  69. package/src/components/descope-modal/ModalClass.js +109 -0
  70. package/src/components/descope-modal/index.js +6 -0
  71. package/src/index.cjs.js +1 -0
  72. package/src/index.js +1 -0
  73. package/src/mixins/createStyleMixin/helpers.js +2 -2
  74. package/src/mixins/createStyleMixin/index.js +2 -2
  75. package/src/mixins/portalMixin.js +24 -4
  76. package/src/theme/components/grid.js +38 -0
  77. package/src/theme/components/index.js +4 -0
  78. package/src/theme/components/modal.js +16 -0
  79. package/dist/umd/1852.js +0 -375
  80. package/dist/umd/1883.js +0 -289
  81. package/dist/umd/4767.js +0 -215
  82. /package/dist/umd/{7101.js.LICENSE.txt → 3092.js.LICENSE.txt} +0 -0
  83. /package/dist/umd/{4767.js.LICENSE.txt → 4746.js.LICENSE.txt} +0 -0
  84. /package/dist/umd/{9515.js.LICENSE.txt → 5345.js.LICENSE.txt} +0 -0
  85. /package/dist/umd/{6116.js.LICENSE.txt → 7514.js.LICENSE.txt} +0 -0
@@ -0,0 +1,310 @@
1
+ /*! For license information please see 1932.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1932],{1932:(e,t,r)=>{var o=r(510),s=r(6570);(0,s.hC)("vaadin-overlay",o.I,{moduleId:"lumo-vaadin-overlay"});var i=r(4241),a=r(2807),n=r(1914),d=r(262),l=r(4457),h=r(6196);(0,s.hC)("vaadin-overlay",h.r,{moduleId:"vaadin-overlay-styles"});class p extends((0,l.F)((0,s.Tb)((0,n.U)(i.H3)))){static get template(){return i.dy`
3
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
4
+ <div part="overlay" id="overlay" tabindex="0">
5
+ <div part="content" id="content">
6
+ <slot></slot>
7
+ </div>
8
+ </div>
9
+ `}static get is(){return"vaadin-overlay"}ready(){super.ready(),(0,d.k)(this)}}(0,a.M)(p),r(9416);const c=s.iv`
10
+ /* Optical centering */
11
+ :host::before,
12
+ :host::after {
13
+ content: '';
14
+ flex-basis: 0;
15
+ flex-grow: 1;
16
+ }
17
+
18
+ :host::after {
19
+ flex-grow: 1.1;
20
+ }
21
+
22
+ [part='overlay'] {
23
+ border-radius: var(--lumo-border-radius-l);
24
+ box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-xl);
25
+ background-image: none;
26
+ outline: none;
27
+ -webkit-tap-highlight-color: transparent;
28
+ }
29
+
30
+ [part='content'] {
31
+ padding: var(--lumo-space-l);
32
+ }
33
+
34
+ :host(:is([has-header], [has-title])) [part='header'] + [part='content'] {
35
+ padding-top: 0;
36
+ }
37
+
38
+ [part='header'],
39
+ [part='header-content'],
40
+ [part='footer'] {
41
+ gap: var(--lumo-space-xs) var(--lumo-space-s);
42
+ line-height: var(--lumo-line-height-s);
43
+ }
44
+
45
+ [part='header'] {
46
+ padding: var(--lumo-space-m);
47
+ background-color: var(--lumo-base-color);
48
+ border-radius: var(--lumo-border-radius-l) var(--lumo-border-radius-l) 0 0; /* Needed for Safari */
49
+ }
50
+
51
+ [part='footer'] {
52
+ padding: var(--lumo-space-s) var(--lumo-space-m);
53
+ background-color: var(--lumo-contrast-5pct);
54
+ border-radius: 0 0 var(--lumo-border-radius-l) var(--lumo-border-radius-l); /* Needed for Safari */
55
+ }
56
+
57
+ [part='title'] {
58
+ font-size: var(--lumo-font-size-xl);
59
+ font-weight: 600;
60
+ color: var(--lumo-header-text-color);
61
+ margin-inline-start: calc(var(--lumo-space-l) - var(--lumo-space-m));
62
+ }
63
+
64
+ /* No padding */
65
+ :host([theme~='no-padding']) [part='content'] {
66
+ padding: 0 !important;
67
+ }
68
+
69
+ @media (min-height: 320px) {
70
+ :host([overflow~='top']) [part='header'] {
71
+ box-shadow: 0 1px 0 0 var(--lumo-contrast-10pct);
72
+ }
73
+ }
74
+
75
+ /* Animations */
76
+
77
+ :host([opening]),
78
+ :host([closing]) {
79
+ animation: 0.25s lumo-overlay-dummy-animation;
80
+ }
81
+
82
+ :host([opening]) [part='overlay'] {
83
+ animation: 0.12s 0.05s vaadin-dialog-enter cubic-bezier(0.215, 0.61, 0.355, 1) both;
84
+ }
85
+
86
+ @keyframes vaadin-dialog-enter {
87
+ 0% {
88
+ opacity: 0;
89
+ transform: scale(0.95);
90
+ }
91
+ }
92
+
93
+ :host([closing]) [part='overlay'] {
94
+ animation: 0.1s 0.03s vaadin-dialog-exit cubic-bezier(0.55, 0.055, 0.675, 0.19) both;
95
+ }
96
+
97
+ :host([closing]) [part='backdrop'] {
98
+ animation-delay: 0.05s;
99
+ }
100
+
101
+ @keyframes vaadin-dialog-exit {
102
+ 100% {
103
+ opacity: 0;
104
+ transform: scale(1.02);
105
+ }
106
+ }
107
+ `;(0,s.hC)("vaadin-dialog-overlay",[o.I,c],{moduleId:"lumo-dialog"});const u=e=>class extends((0,l.F)(e)){static get properties(){return{headerTitle:{type:String},headerRenderer:{type:Object},footerRenderer:{type:Object}}}static get observers(){return["_headerFooterRendererChange(headerRenderer, footerRenderer, opened)","_headerTitleChanged(headerTitle, opened)"]}ready(){super.ready(),this.__resizeObserver=new ResizeObserver((()=>{this.__updateOverflow()})),this.__resizeObserver.observe(this.$.resizerContainer),this.$.content.addEventListener("scroll",(()=>{this.__updateOverflow()}))}__createContainer(e){const t=document.createElement("div");return t.setAttribute("slot",e),t}__clearContainer(e){e.innerHTML="",delete e._$litPart$}__initContainer(e,t){return e?this.__clearContainer(e):e=this.__createContainer(t),e}_headerFooterRendererChange(e,t,r){const o=this.__oldHeaderRenderer!==e;this.__oldHeaderRenderer=e;const s=this.__oldFooterRenderer!==t;this.__oldFooterRenderer=t;const i=this._oldOpenedFooterHeader!==r;this._oldOpenedFooterHeader=r,this.toggleAttribute("has-header",!!e),this.toggleAttribute("has-footer",!!t),o&&(e?this.headerContainer=this.__initContainer(this.headerContainer,"header-content"):this.headerContainer&&(this.headerContainer.remove(),this.headerContainer=null,this.__updateOverflow())),s&&(t?this.footerContainer=this.__initContainer(this.footerContainer,"footer"):this.footerContainer&&(this.footerContainer.remove(),this.footerContainer=null,this.__updateOverflow())),(e&&(o||i)||t&&(s||i))&&r&&this.requestContentUpdate()}_headerTitleChanged(e,t){this.toggleAttribute("has-title",!!e),t&&(e||this._oldHeaderTitle)&&this.requestContentUpdate(),this._oldHeaderTitle=e}_headerTitleRenderer(){this.headerTitle?(this.headerTitleElement||(this.headerTitleElement=document.createElement("h2"),this.headerTitleElement.setAttribute("slot","title"),this.headerTitleElement.classList.add("draggable")),this.appendChild(this.headerTitleElement),this.headerTitleElement.textContent=this.headerTitle):this.headerTitleElement&&(this.headerTitleElement.remove(),this.headerTitleElement=null)}requestContentUpdate(){super.requestContentUpdate(),this.headerContainer&&(this.headerContainer.parentElement||this.appendChild(this.headerContainer),this.headerRenderer&&this.headerRenderer.call(this.owner,this.headerContainer,this.owner)),this.footerContainer&&(this.footerContainer.parentElement||this.appendChild(this.footerContainer),this.footerRenderer&&this.footerRenderer.call(this.owner,this.footerContainer,this.owner)),this._headerTitleRenderer(),this.__updateOverflow()}setBounds(e){const t=this.$.overlay,r={...e};"absolute"!==t.style.position&&(t.style.position="absolute",this.setAttribute("has-bounds-set","")),Object.keys(r).forEach((e=>{"number"==typeof r[e]&&(r[e]=`${r[e]}px`)})),Object.assign(t.style,r)}getBounds(){const e=this.$.overlay.getBoundingClientRect(),t=this.getBoundingClientRect();return{top:e.top-t.top,left:e.left-t.left,width:e.width,height:e.height}}__updateOverflow(){let e="";if(this.hasAttribute("has-header")||this.hasAttribute("has-footer")||this.headerTitle){const t=this.$.content;t.scrollTop>0&&(e+=" top"),t.scrollTop<t.scrollHeight-t.clientHeight&&(e+=" bottom")}const t=e.trim();t.length>0&&this.getAttribute("overflow")!==t?this.setAttribute("overflow",t):0===t.length&&this.hasAttribute("overflow")&&this.removeAttribute("overflow")}};var v=r(9897);const g=v.iv`
108
+ [part='header'],
109
+ [part='header-content'],
110
+ [part='footer'] {
111
+ display: flex;
112
+ align-items: center;
113
+ flex-wrap: wrap;
114
+ flex: none;
115
+ pointer-events: none;
116
+ z-index: 1;
117
+ }
118
+
119
+ [part='header'] {
120
+ flex-wrap: nowrap;
121
+ }
122
+
123
+ ::slotted([slot='header-content']),
124
+ ::slotted([slot='title']),
125
+ ::slotted([slot='footer']) {
126
+ display: contents;
127
+ pointer-events: auto;
128
+ }
129
+
130
+ ::slotted([slot='title']) {
131
+ font: inherit !important;
132
+ overflow-wrap: anywhere;
133
+ }
134
+
135
+ [part='header-content'] {
136
+ flex: 1;
137
+ }
138
+
139
+ :host([has-title]) [part='header-content'],
140
+ [part='footer'] {
141
+ justify-content: flex-end;
142
+ }
143
+
144
+ :host(:not([has-title]):not([has-header])) [part='header'],
145
+ :host(:not([has-header])) [part='header-content'],
146
+ :host(:not([has-title])) [part='title'],
147
+ :host(:not([has-footer])) [part='footer'] {
148
+ display: none !important;
149
+ }
150
+
151
+ :host(:is([has-title], [has-header], [has-footer])) [part='content'] {
152
+ height: auto;
153
+ }
154
+
155
+ @media (min-height: 320px) {
156
+ :host(:is([has-title], [has-header], [has-footer])) .resizer-container {
157
+ overflow: hidden;
158
+ display: flex;
159
+ flex-direction: column;
160
+ }
161
+
162
+ :host(:is([has-title], [has-header], [has-footer])) [part='content'] {
163
+ flex: 1;
164
+ overflow: auto;
165
+ }
166
+ }
167
+
168
+ /*
169
+ NOTE(platosha): Make some min-width to prevent collapsing of the content
170
+ taking the parent width, e. g., <vaadin-grid> and such.
171
+ */
172
+ [part='content'] {
173
+ min-width: 12em; /* matches the default <vaadin-text-field> width */
174
+ }
175
+
176
+ :host([has-bounds-set]) [part='overlay'] {
177
+ max-width: none;
178
+ }
179
+
180
+ @media (forced-colors: active) {
181
+ [part='overlay'] {
182
+ outline: 3px solid !important;
183
+ }
184
+ }
185
+ `,m=v.iv`
186
+ [part='overlay'] {
187
+ position: relative;
188
+ overflow: visible;
189
+ max-height: 100%;
190
+ display: flex;
191
+ }
192
+
193
+ [part='content'] {
194
+ box-sizing: border-box;
195
+ height: 100%;
196
+ }
197
+
198
+ .resizer-container {
199
+ overflow: auto;
200
+ flex-grow: 1;
201
+ border-radius: inherit; /* prevent child elements being drawn outside part=overlay */
202
+ }
203
+
204
+ [part='overlay'][style] .resizer-container {
205
+ min-height: 100%;
206
+ width: 100%;
207
+ }
208
+
209
+ :host(:not([resizable])) .resizer {
210
+ display: none;
211
+ }
212
+
213
+ :host([resizable]) [part='title'] {
214
+ cursor: move;
215
+ -webkit-user-select: none;
216
+ user-select: none;
217
+ }
218
+
219
+ .resizer {
220
+ position: absolute;
221
+ height: 16px;
222
+ width: 16px;
223
+ }
224
+
225
+ .resizer.edge {
226
+ height: 8px;
227
+ width: 8px;
228
+ inset: -4px;
229
+ }
230
+
231
+ .resizer.edge.n {
232
+ width: auto;
233
+ bottom: auto;
234
+ cursor: ns-resize;
235
+ }
236
+
237
+ .resizer.ne {
238
+ top: -4px;
239
+ right: -4px;
240
+ cursor: nesw-resize;
241
+ }
242
+
243
+ .resizer.edge.e {
244
+ height: auto;
245
+ left: auto;
246
+ cursor: ew-resize;
247
+ }
248
+
249
+ .resizer.se {
250
+ bottom: -4px;
251
+ right: -4px;
252
+ cursor: nwse-resize;
253
+ }
254
+
255
+ .resizer.edge.s {
256
+ width: auto;
257
+ top: auto;
258
+ cursor: ns-resize;
259
+ }
260
+
261
+ .resizer.sw {
262
+ bottom: -4px;
263
+ left: -4px;
264
+ cursor: nesw-resize;
265
+ }
266
+
267
+ .resizer.edge.w {
268
+ height: auto;
269
+ right: auto;
270
+ cursor: ew-resize;
271
+ }
272
+
273
+ .resizer.nw {
274
+ top: -4px;
275
+ left: -4px;
276
+ cursor: nwse-resize;
277
+ }
278
+ `;(0,s.hC)("vaadin-dialog-overlay",[h.r,g,m],{moduleId:"vaadin-dialog-overlay-styles"});class _ extends(u((0,n.U)((0,s.Tb)(i.H3)))){static get is(){return"vaadin-dialog-overlay"}static get template(){return i.dy`
279
+ <div id="backdrop" part="backdrop" hidden$="[[!withBackdrop]]"></div>
280
+ <div part="overlay" id="overlay" tabindex="0">
281
+ <section id="resizerContainer" class="resizer-container">
282
+ <header part="header">
283
+ <div part="title"><slot name="title"></slot></div>
284
+ <div part="header-content"><slot name="header-content"></slot></div>
285
+ </header>
286
+ <div part="content" id="content"><slot></slot></div>
287
+ <footer part="footer"><slot name="footer"></slot></footer>
288
+ </section>
289
+ </div>
290
+ `}}(0,a.M)(_);var y=r(2521),f=r(9320),b=r(1462);const w=e=>class extends e{static get properties(){return{opened:{type:Boolean,value:!1,notify:!0},noCloseOnOutsideClick:{type:Boolean,value:!1},noCloseOnEsc:{type:Boolean,value:!1},modeless:{type:Boolean,value:!1}}}ready(){super.ready();const e=this.$.overlay;e.addEventListener("vaadin-overlay-outside-click",this._handleOutsideClick.bind(this)),e.addEventListener("vaadin-overlay-escape-press",this._handleEscPress.bind(this)),this._overlayElement=e}connectedCallback(){super.connectedCallback(),this.__restoreOpened&&(this.opened=!0)}disconnectedCallback(){super.disconnectedCallback(),setTimeout((()=>{this.isConnected||(this.__restoreOpened=this.opened,this.opened=!1)}))}_onOverlayOpened(e){!1===e.detail.value&&(this.opened=!1)}_handleOutsideClick(e){this.noCloseOnOutsideClick&&e.preventDefault()}_handleEscPress(e){this.noCloseOnEsc&&e.preventDefault()}_bringOverlayToFront(){this.modeless&&this._overlayElement.bringToFront()}};var C=r(1037);function z(e){return e.touches?e.touches[0]:e}function x(e){return e.clientX>=0&&e.clientX<=window.innerWidth&&e.clientY>=0&&e.clientY<=window.innerHeight}const E=e=>class extends e{static get properties(){return{draggable:{type:Boolean,value:!1,reflectToAttribute:!0},_touchDevice:{type:Boolean,value:C.T},__dragHandleClassName:{type:String}}}async ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._startDrag=this._startDrag.bind(this),this._drag=this._drag.bind(this),this._stopDrag=this._stopDrag.bind(this),await new Promise(requestAnimationFrame),this.$.overlay.$.overlay.addEventListener("mousedown",this._startDrag),this.$.overlay.$.overlay.addEventListener("touchstart",this._startDrag)}_startDrag(e){if(!("touchstart"===e.type&&e.touches.length>1)&&this.draggable&&(0===e.button||e.touches)){const t=this.$.overlay.$.resizerContainer,r=e.target===t,o=e.offsetX>t.clientWidth||e.offsetY>t.clientHeight,s=e.target===this.$.overlay.$.content,i=e.composedPath().some(((e,t)=>{if(!e.classList)return!1;const r=e.classList.contains(this.__dragHandleClassName||"draggable"),o=e.classList.contains("draggable-leaf-only"),s=0===t;return o&&s||r&&(!o||s)}));if(r&&!o||s||i){i||e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const t=z(e);this._originalMouseCoords={top:t.pageY,left:t.pageX},window.addEventListener("mouseup",this._stopDrag),window.addEventListener("touchend",this._stopDrag),window.addEventListener("mousemove",this._drag),window.addEventListener("touchmove",this._drag),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}}_drag(e){const t=z(e);if(x(t)){const e=this._originalBounds.top+(t.pageY-this._originalMouseCoords.top),r=this._originalBounds.left+(t.pageX-this._originalMouseCoords.left);this.$.overlay.setBounds({top:e,left:r})}}_stopDrag(){window.removeEventListener("mouseup",this._stopDrag),window.removeEventListener("touchend",this._stopDrag),window.removeEventListener("mousemove",this._drag),window.removeEventListener("touchmove",this._drag)}},L=e=>class extends e{static get properties(){return{renderer:{type:Object},headerTitle:String,headerRenderer:{type:Object},footerRenderer:{type:Object}}}requestContentUpdate(){this._overlayElement&&this._overlayElement.requestContentUpdate()}},$=e=>class extends e{static get properties(){return{resizable:{type:Boolean,value:!1,reflectToAttribute:!0}}}async ready(){super.ready(),this._originalBounds={},this._originalMouseCoords={},this._resizeListeners={start:{},resize:{},stop:{}},await new Promise(requestAnimationFrame),this._addResizeListeners()}_addResizeListeners(){["n","e","s","w","nw","ne","se","sw"].forEach((e=>{const t=document.createElement("div");this._resizeListeners.start[e]=t=>this._startResize(t,e),this._resizeListeners.resize[e]=t=>this._resize(t,e),this._resizeListeners.stop[e]=()=>this._stopResize(e),1===e.length&&t.classList.add("edge"),t.classList.add("resizer"),t.classList.add(e),t.addEventListener("mousedown",this._resizeListeners.start[e]),t.addEventListener("touchstart",this._resizeListeners.start[e]),this.$.overlay.$.resizerContainer.appendChild(t)}))}_startResize(e,t){if(!("touchstart"===e.type&&e.touches.length>1)&&(0===e.button||e.touches)){e.preventDefault(),this._originalBounds=this.$.overlay.getBounds();const r=z(e);this._originalMouseCoords={top:r.pageY,left:r.pageX},window.addEventListener("mousemove",this._resizeListeners.resize[t]),window.addEventListener("touchmove",this._resizeListeners.resize[t]),window.addEventListener("mouseup",this._resizeListeners.stop[t]),window.addEventListener("touchend",this._resizeListeners.stop[t]),"absolute"!==this.$.overlay.$.overlay.style.position&&this.$.overlay.setBounds(this._originalBounds)}}_resize(e,t){const r=z(e);if(x(r)){const e=40;t.split("").forEach((t=>{switch(t){case"n":{const t=this._originalBounds.height-(r.pageY-this._originalMouseCoords.top),o=this._originalBounds.top+(r.pageY-this._originalMouseCoords.top);t>e&&this.$.overlay.setBounds({top:o,height:t});break}case"e":{const t=this._originalBounds.width+(r.pageX-this._originalMouseCoords.left);t>e&&this.$.overlay.setBounds({width:t});break}case"s":{const t=this._originalBounds.height+(r.pageY-this._originalMouseCoords.top);t>e&&this.$.overlay.setBounds({height:t});break}case"w":{const t=this._originalBounds.width-(r.pageX-this._originalMouseCoords.left),o=this._originalBounds.left+(r.pageX-this._originalMouseCoords.left);t>e&&this.$.overlay.setBounds({left:o,width:t});break}}}))}}_stopResize(e){window.removeEventListener("mousemove",this._resizeListeners.resize[e]),window.removeEventListener("touchmove",this._resizeListeners.resize[e]),window.removeEventListener("mouseup",this._resizeListeners.stop[e]),window.removeEventListener("touchend",this._resizeListeners.stop[e]),this.dispatchEvent(new CustomEvent("resize",{detail:this._getResizeDimensions()}))}_getResizeDimensions(){const e=this.$.overlay.$.resizerContainer.scrollTop,{width:t,height:r}=getComputedStyle(this.$.overlay.$.overlay),o=this.$.overlay.$.content;o.setAttribute("style","position: absolute; top: 0; right: 0; bottom: 0; left: 0; box-sizing: content-box; height: auto;");const{width:s,height:i}=getComputedStyle(o);return o.removeAttribute("style"),this.$.overlay.$.resizerContainer.scrollTop=e,{width:t,height:r,contentWidth:s,contentHeight:i}}};class T extends(E($(L(w((0,f.u)((0,b.I)((0,y.S)(i.H3)))))))){static get template(){return i.dy`
291
+ <style>
292
+ :host {
293
+ display: none !important;
294
+ }
295
+ </style>
296
+
297
+ <vaadin-dialog-overlay
298
+ id="overlay"
299
+ header-title="[[headerTitle]]"
300
+ on-opened-changed="_onOverlayOpened"
301
+ on-mousedown="_bringOverlayToFront"
302
+ on-touchstart="_bringOverlayToFront"
303
+ theme$="[[_theme]]"
304
+ modeless="[[modeless]]"
305
+ with-backdrop="[[!modeless]]"
306
+ resizable$="[[resizable]]"
307
+ restore-focus-on-close
308
+ focus-trap
309
+ ></vaadin-dialog-overlay>
310
+ `}static get is(){return"vaadin-dialog"}static get properties(){return{ariaLabel:{type:String,value:""}}}static get observers(){return["_openedChanged(opened)","_ariaLabelChanged(ariaLabel, headerTitle)","_rendererChanged(renderer, headerRenderer, footerRenderer)"]}ready(){super.ready(),this._overlayElement.setAttribute("role","dialog"),(0,d.k)(this)}_rendererChanged(e,t,r){this.$.overlay.setProperties({owner:this,renderer:e,headerRenderer:t,footerRenderer:r})}_openedChanged(e){this.$.overlay.opened=e}_ariaLabelChanged(e,t){e||t?this.$.overlay.setAttribute("aria-label",e||t):this.$.overlay.removeAttribute("aria-label")}}(0,a.M)(T)}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2017 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
package/dist/umd/1990.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see 1990.js.LICENSE.txt */
2
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1990],{1990:(e,t,s)=>{s(3787),s(9098),s(9416);var i=s(6754),a=s(5128);const n=a.iv`
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1990],{1990:(e,t,s)=>{s(3787),s(9098),s(9416);var i=s(6754),a=s(6570);const n=a.iv`
3
3
  [part='overlay'] {
4
4
  /*
5
5
  Width:
@@ -387,7 +387,7 @@
387
387
  :host([dir='rtl']) [part='input-field'] ::slotted(input:placeholder-shown) {
388
388
  --_lumo-text-field-overflow-mask-image: none;
389
389
  }
390
- `;(0,a.hC)("vaadin-date-picker",[r.J,l],{moduleId:"lumo-date-picker"}),s(3130);var h=s(4241),d=s(2807),c=s(1914),u=s(7673),_=s(3373),p=s(6196),m=s(9897);const f=m.iv`
390
+ `;(0,a.hC)("vaadin-date-picker",[r.J,l],{moduleId:"lumo-date-picker"}),s(3130);var h=s(4241),d=s(2807),c=s(1914),u=s(4457),_=s(3373),p=s(6196),m=s(9897);const f=m.iv`
391
391
  [part='overlay'] {
392
392
  display: flex;
393
393
  flex: auto;
@@ -596,7 +596,7 @@
596
596
  <slot name="today-button"></slot>
597
597
  <slot name="cancel-button"></slot>
598
598
  </div>
599
- `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}(0,d.M)(ye);var ge=s(2521),be=s(4463),ve=s(3398),De=s(3208),we=s(6729),ke=s(2743),Ce=s(962),xe=s(1370),Se=s(2628),Te=s(9320),Ee=s(9091),Me=s(9580);const Pe=e=>class extends((0,Te.u)((0,ce.k)((0,xe.B)((0,Ee.t)((0,Se.L)(e)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const t=String(e.year).replace(/\d+/u,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),s=new Date;let i,a=s.getMonth(),n=s.getFullYear();if(3===t.length?(a=parseInt(t[0])-1,i=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0&&(n=function(e,t,s=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let a=t+100*Math.floor(e.getFullYear()/100);return e<new Date(a-50,s,i)?a-=100:e>new Date(a+50,s,i)&&(a+=100),a}(this.referenceDate?k(this.referenceDate):new Date,n,a,i))):2===t.length?(a=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0])),void 0!==i)return{day:i,month:a,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:x.gn},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(e){super._onFocus(e),this._noInput&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new _e(this._fullscreenMediaQuery,(e=>{this._fullscreen=e}))),this.addController(new Me.B(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",(()=>{this._close()})),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",(e=>{this.__userConfirmedDate=!0,this._selectDate(e.detail.date),this._close()})),t.addEventListener("date-selected",(e=>{this.__userConfirmedDate=!!e.detail.date,this._selectDate(e.detail.date)})),t.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),t.addEventListener("focused-date-changed",(e=>{this._focusedDate=e.detail.value}))}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);return t&&(t=k(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime())?t:void 0}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(D(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),s=!this._selectedDate||b(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),t&&s&&i}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){return!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(e){const t=this.value;this._selectedDate=e,t!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(e,t,s,i,a,n){return!e||t&&(!n||a)||s&&a||!i.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let s="",i="0000",a=e.getFullYear();return a<0?(a=-a,s="-",i="000000"):e.getFullYear()>=1e4&&(s="+",i="000000"),[s+t(a,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_valueChanged(e,t){const s=k(e);!e||s?(e?g(this._selectedDate,s)||(this._selectedDate=s,void 0!==t&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=t}__updateOverlayContent(e,t,s,i,a,n,o,r){e&&(e.i18n=t,e.label=s,e.minDate=i,e.maxDate=a,e.focusedDate=n,e.selectedDate=o,e.showWeekNumbers=r)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const s=e.focusedDate||t;e.scrollToDate(s),this._ignoreFocusedDateChange=!0,e.focusedDate=s,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const i=this._nativeInput;this._noInput&&i&&(i.blur(),this._overlayContent.focusDateElement());const a=this._noInput?e:[i,e];this.__showOthers=(0,Ce.Ry)(a)}_getInitialPosition(){const e=k(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||b(t,this._minDate,this._maxDate)?t:v(t,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){this.autoOpenDisabled&&!this._noInput||(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&-1===[9].indexOf(e.keyCode)&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(e){const t=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),t===this.value&&this.validate()}_onEscape(e){if(!this.opened)return this.clearButtonVisible&&this.value?(e.stopPropagation(),void this._onClearButtonClick(e)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,g(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return k(e)}},Ie=m.iv`
599
+ `}static get is(){return"vaadin-date-picker-overlay-content"}ready(){super.ready(),this.setAttribute("role","dialog"),this._addListeners(),this._initControllers()}}(0,d.M)(ye);var ge=s(2521),be=s(4463),ve=s(1174),De=s(3208),we=s(6729),ke=s(2743),Ce=s(962),xe=s(1370),Se=s(2628),Te=s(9320),Ee=s(9091),Me=s(9580);const Pe=e=>class extends((0,Te.u)((0,ce.k)((0,xe.B)((0,Ee.t)((0,Se.L)(e)))))){static get properties(){return{_selectedDate:{type:Object,sync:!0},_focusedDate:{type:Object,sync:!0},value:{type:String,notify:!0,value:"",sync:!0},initialPosition:String,opened:{type:Boolean,reflectToAttribute:!0,notify:!0,observer:"_openedChanged",sync:!0},autoOpenDisabled:Boolean,showWeekNumbers:{type:Boolean,value:!1,sync:!0},_fullscreen:{type:Boolean,value:!1,sync:!0},_fullscreenMediaQuery:{value:"(max-width: 420px), (max-height: 420px)"},i18n:{type:Object,sync:!0,value:()=>({monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],weekdaysShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],firstDayOfWeek:0,today:"Today",cancel:"Cancel",referenceDate:"",formatDate(e){const t=String(e.year).replace(/\d+/u,(e=>"0000".substr(e.length)+e));return[e.month+1,e.day,t].join("/")},parseDate(e){const t=e.split("/"),s=new Date;let i,a=s.getMonth(),n=s.getFullYear();if(3===t.length?(a=parseInt(t[0])-1,i=parseInt(t[1]),n=parseInt(t[2]),t[2].length<3&&n>=0&&(n=function(e,t,s=0,i=1){if(t>99)throw new Error("The provided year cannot have more than 2 digits.");if(t<0)throw new Error("The provided year cannot be negative.");let a=t+100*Math.floor(e.getFullYear()/100);return e<new Date(a-50,s,i)?a-=100:e>new Date(a+50,s,i)&&(a+=100),a}(this.referenceDate?k(this.referenceDate):new Date,n,a,i))):2===t.length?(a=parseInt(t[0])-1,i=parseInt(t[1])):1===t.length&&(i=parseInt(t[0])),void 0!==i)return{day:i,month:a,year:n}},formatTitle:(e,t)=>`${e} ${t}`})},min:{type:String,sync:!0},max:{type:String,sync:!0},_minDate:{type:Date,computed:"__computeMinOrMaxDate(min)",sync:!0},_maxDate:{type:Date,computed:"__computeMinOrMaxDate(max)",sync:!0},_noInput:{type:Boolean,computed:"_isNoInput(inputElement, _fullscreen, _ios, i18n, opened, autoOpenDisabled)"},_ios:{type:Boolean,value:x.gn},_focusOverlayOnOpen:Boolean,_overlayContent:{type:Object,sync:!0},_hasInputValue:{type:Boolean}}}static get observers(){return["_selectedDateChanged(_selectedDate, i18n)","_focusedDateChanged(_focusedDate, i18n)","__updateOverlayContent(_overlayContent, i18n, label, _minDate, _maxDate, _focusedDate, _selectedDate, showWeekNumbers)","__updateOverlayContentTheme(_overlayContent, _theme)","__updateOverlayContentFullScreen(_overlayContent, _fullscreen)"]}static get constraints(){return[...super.constraints,"min","max"]}constructor(){super(),this._boundOnClick=this._onClick.bind(this),this._boundOnScroll=this._onScroll.bind(this),this._boundOverlayRenderer=this._overlayRenderer.bind(this)}get _inputElementValue(){return super._inputElementValue}set _inputElementValue(e){super._inputElementValue=e,this._hasInputValue=!1}get clearElement(){return null}get _nativeInput(){return this.inputElement?this.inputElement.focusElement||this.inputElement:null}_onFocus(e){super._onFocus(e),this._noInput&&e.target.blur()}_onBlur(e){super._onBlur(e),this.opened||(this._selectParsedOrFocusedDate(),document.hasFocus()&&this.validate())}ready(){super.ready(),this.addEventListener("click",this._boundOnClick),this.addController(new _e(this._fullscreenMediaQuery,(e=>{this._fullscreen=e}))),this.addController(new Me.B(this));const e=this.$.overlay;this._overlayElement=e,e.renderer=this._boundOverlayRenderer,this.addEventListener("mousedown",(()=>this.__bringToFront())),this.addEventListener("touchstart",(()=>this.__bringToFront()))}disconnectedCallback(){super.disconnectedCallback(),this.opened=!1}open(){this.disabled||this.readonly||(this.opened=!0)}close(){this.$.overlay.close()}_overlayRenderer(e){if(e.firstChild)return;const t=document.createElement("vaadin-date-picker-overlay-content");e.appendChild(t),this._overlayContent=t,t.addEventListener("close",(()=>{this._close()})),t.addEventListener("focus-input",this._focusAndSelect.bind(this)),t.addEventListener("date-tap",(e=>{this.__userConfirmedDate=!0,this._selectDate(e.detail.date),this._close()})),t.addEventListener("date-selected",(e=>{this.__userConfirmedDate=!!e.detail.date,this._selectDate(e.detail.date)})),t.addEventListener("focusin",(()=>{this._keyboardActive&&this._setFocused(!0)})),t.addEventListener("focused-date-changed",(e=>{this._focusedDate=e.detail.value}))}__parseDate(e){if(!this.i18n.parseDate)return;let t=this.i18n.parseDate(e);return t&&(t=k(`${t.year}-${t.month+1}-${t.day}`)),t&&!isNaN(t.getTime())?t:void 0}__formatDate(e){if(this.i18n.formatDate)return this.i18n.formatDate(D(e))}checkValidity(){const e=this._inputElementValue,t=!e||!!this._selectedDate&&e===this.__formatDate(this._selectedDate),s=!this._selectedDate||b(this._selectedDate,this._minDate,this._maxDate);let i=!0;return this.inputElement&&(this.inputElement.checkValidity?i=this.inputElement.checkValidity():this.inputElement.validate&&(i=this.inputElement.validate())),t&&s&&i}_shouldSetFocus(e){return!this._shouldKeepFocusRing}_shouldRemoveFocus(e){return!this.opened}_setFocused(e){super._setFocused(e),this._shouldKeepFocusRing=e&&this._keyboardActive}__dispatchChange(){this.validate(),this.dispatchEvent(new CustomEvent("change",{bubbles:!0}))}_selectDate(e){const t=this.value;this._selectedDate=e,t!==this.value&&this.__dispatchChange()}_close(){this._focus(),this.close()}__bringToFront(){requestAnimationFrame((()=>{this.$.overlay.bringToFront()}))}_isNoInput(e,t,s,i,a,n){return!e||t&&(!n||a)||s&&a||!i.parseDate}_formatISO(e){if(!(e instanceof Date))return"";const t=(e,t="00")=>(t+e).substr((t+e).length-t.length);let s="",i="0000",a=e.getFullYear();return a<0?(a=-a,s="-",i="000000"):e.getFullYear()>=1e4&&(s="+",i="000000"),[s+t(a,i),t(e.getMonth()+1),t(e.getDate())].join("-")}_inputElementChanged(e){super._inputElementChanged(e),e&&(e.autocomplete="off",e.setAttribute("role","combobox"),e.setAttribute("aria-haspopup","dialog"),e.setAttribute("aria-expanded",!!this.opened),this._applyInputValue(this._selectedDate))}_openedChanged(e){this.inputElement&&this.inputElement.setAttribute("aria-expanded",e)}_selectedDateChanged(e,t){void 0!==e&&void 0!==t&&(this.__keepInputValue||this._applyInputValue(e),this.value=this._formatISO(e),this._ignoreFocusedDateChange=!0,this._focusedDate=e,this._ignoreFocusedDateChange=!1)}_focusedDateChanged(e,t){void 0!==e&&void 0!==t&&(this._ignoreFocusedDateChange||this._noInput||this._applyInputValue(e))}_valueChanged(e,t){const s=k(e);!e||s?(e?g(this._selectedDate,s)||(this._selectedDate=s,void 0!==t&&this.validate()):this._selectedDate=null,this._toggleHasValue(this._hasValue)):this.value=t}__updateOverlayContent(e,t,s,i,a,n,o,r){e&&(e.i18n=t,e.label=s,e.minDate=i,e.maxDate=a,e.focusedDate=n,e.selectedDate=o,e.showWeekNumbers=r)}__updateOverlayContentTheme(e,t){e&&(t?e.setAttribute("theme",t):e.removeAttribute("theme"))}__updateOverlayContentFullScreen(e,t){e&&e.toggleAttribute("fullscreen",t)}_onOverlayEscapePress(){this._focusedDate=this._selectedDate,this._close()}_onOverlayOpened(){const e=this._overlayContent;e.reset();const t=this._getInitialPosition();e.initialPosition=t;const s=e.focusedDate||t;e.scrollToDate(s),this._ignoreFocusedDateChange=!0,e.focusedDate=s,this._ignoreFocusedDateChange=!1,window.addEventListener("scroll",this._boundOnScroll,!0),this._focusOverlayOnOpen?(e.focusDateElement(),this._focusOverlayOnOpen=!1):this._focus();const i=this._nativeInput;this._noInput&&i&&(i.blur(),this._overlayContent.focusDateElement());const a=this._noInput?e:[i,e];this.__showOthers=(0,Ce.Ry)(a)}_getInitialPosition(){const e=k(this.initialPosition),t=this._selectedDate||this._overlayContent.initialPosition||e||new Date;return e||b(t,this._minDate,this._maxDate)?t:v(t,[this._minDate,this._maxDate])}_selectParsedOrFocusedDate(){if(this._ignoreFocusedDateChange=!0,this.i18n.parseDate){const e=this._inputElementValue||"",t=this.__parseDate(e);t?this._selectDate(t):(this.__keepInputValue=!0,this._selectDate(null),this._selectedDate=null,this.__keepInputValue=!1)}else this._focusedDate&&this._selectDate(this._focusedDate);this._ignoreFocusedDateChange=!1}_onOverlayClosed(){this.__showOthers&&(this.__showOthers(),this.__showOthers=null),window.removeEventListener("scroll",this._boundOnScroll,!0),this.__userConfirmedDate?this.__userConfirmedDate=!1:this._selectParsedOrFocusedDate(),this._nativeInput&&this._nativeInput.selectionStart&&(this._nativeInput.selectionStart=this._nativeInput.selectionEnd),this.value||this._keyboardActive||this.validate()}_onScroll(e){e.target!==window&&this._overlayContent.contains(e.target)||this._overlayContent._repositionYearScroller()}_focus(){this._noInput||this.inputElement.focus()}_focusAndSelect(){this._focus(),this._setSelectionRange(0,this._inputElementValue.length)}_applyInputValue(e){this._inputElementValue=e?this.__formatDate(e):""}_setSelectionRange(e,t){this._nativeInput&&this._nativeInput.setSelectionRange&&this._nativeInput.setSelectionRange(e,t)}_onChange(e){e.stopPropagation()}_onClick(e){this._isClearButton(e)||this._onHostClick(e)}_onHostClick(e){this.autoOpenDisabled&&!this._noInput||(e.preventDefault(),this.open())}_onClearButtonClick(e){e.preventDefault(),this._inputElementValue="",this.value="",this.__dispatchChange()}_onKeyDown(e){switch(super._onKeyDown(e),this._noInput&&-1===[9].indexOf(e.keyCode)&&e.preventDefault(),e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.opened?this._overlayContent.focusDateElement():(this._focusOverlayOnOpen=!0,this.open());break;case"Tab":this.opened&&(e.preventDefault(),e.stopPropagation(),this._setSelectionRange(0,0),e.shiftKey?this._overlayContent.focusCancel():this._overlayContent.focusDateElement())}}_onEnter(e){const t=this.value;this.opened?this.close():this._selectParsedOrFocusedDate(),t===this.value&&this.validate()}_onEscape(e){if(!this.opened)return this.clearButtonVisible&&this.value?(e.stopPropagation(),void this._onClearButtonClick(e)):void(this.autoOpenDisabled?(""===this.inputElement.value&&this._selectDate(null),this._applyInputValue(this._selectedDate)):(this._focusedDate=this._selectedDate,this._selectParsedOrFocusedDate()))}_isClearButton(e){return e.composedPath()[0]===this.clearElement}_onInput(){if(this.opened||!this._inputElementValue||this.autoOpenDisabled||this.open(),this._inputElementValue){const e=this.__parseDate(this._inputElementValue);e&&(this._ignoreFocusedDateChange=!0,g(e,this._focusedDate)||(this._focusedDate=e),this._ignoreFocusedDateChange=!1)}}__computeMinOrMaxDate(e){return k(e)}},Ie=m.iv`
600
600
  :host([opened]) {
601
601
  pointer-events: auto;
602
602
  }
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 2066.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2066],{3726:(e,t,n)=>{function o(e){const t=[];for(;e;){if(e.nodeType===Node.DOCUMENT_NODE){t.push(e);break}e.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?e=e.assignedSlot?e.assignedSlot:e.parentNode:(t.push(e),e=e.host)}return t}function s(e,t){return t?t.closest(e)||s(e,t.getRootNode().host):null}function u(e){return e?new Set(e.split(" ")):new Set}function r(e){return e?[...e].join(" "):""}function i(e,t,n){const o=u(e.getAttribute(t));o.add(n),e.setAttribute(t,r(o))}function c(e,t,n){const o=u(e.getAttribute(t));o.delete(n),0!==o.size?e.setAttribute(t,r(o)):e.removeAttribute(t)}function d(e){return e.nodeType===Node.TEXT_NODE&&""===e.textContent.trim()}n.d(t,{$2:()=>i,AD:()=>o,Q4:()=>s,dV:()=>r,eC:()=>d,hK:()=>u,x_:()=>c})}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see 262.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[262],{262:(e,a,l)=>{function n(e){window.Vaadin&&window.Vaadin.templateRendererCallback?window.Vaadin.templateRendererCallback(e):e.querySelector("template")&&console.warn(`WARNING: <template> inside <${e.localName}> is no longer supported. Import @vaadin/polymer-legacy-adapter/template-renderer.js to enable compatibility.`)}l.d(a,{k:()=>n})}}]);
@@ -0,0 +1,5 @@
1
+ /**
2
+ * @license
3
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
4
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
5
+ */