@descope/web-components-ui 1.0.295 → 1.0.296

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. package/dist/cjs/index.cjs.js +3 -2
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +3 -2
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1224.js +1 -1
  6. package/dist/umd/1438.js +16 -9
  7. package/dist/umd/1438.js.LICENSE.txt +12 -0
  8. package/dist/umd/1612.js +338 -0
  9. package/dist/umd/1621.js +1 -1
  10. package/dist/umd/2362.js +129 -0
  11. package/dist/umd/3830.js +2 -0
  12. package/dist/umd/{3003.js.LICENSE.txt → 3830.js.LICENSE.txt} +12 -0
  13. package/dist/umd/3951.js +116 -4
  14. package/dist/umd/3951.js.LICENSE.txt +18 -0
  15. package/dist/umd/{9211.js → 4024.js} +5 -5
  16. package/dist/umd/{2775.js → 4028.js} +10 -10
  17. package/dist/umd/4028.js.LICENSE.txt +23 -0
  18. package/dist/umd/4052.js +338 -0
  19. package/dist/umd/4392.js +1 -0
  20. package/dist/umd/4746.js +124 -0
  21. package/dist/umd/{6091.js.LICENSE.txt → 4746.js.LICENSE.txt} +6 -0
  22. package/dist/umd/4978.js +1 -0
  23. package/dist/umd/{4595.js → 5135.js} +93 -5
  24. package/dist/umd/{2775.js.LICENSE.txt → 5135.js.LICENSE.txt} +2 -2
  25. package/dist/umd/5517.js +1 -1
  26. package/dist/umd/5806.js +4 -4
  27. package/dist/umd/5910.js +1 -1
  28. package/dist/umd/63.js +147 -1
  29. package/dist/umd/63.js.LICENSE.txt +13 -1
  30. package/dist/umd/6594.js +2 -0
  31. package/dist/umd/{1940.js.LICENSE.txt → 6594.js.LICENSE.txt} +1 -1
  32. package/dist/umd/6770.js +4 -4
  33. package/dist/umd/7056.js +376 -5
  34. package/dist/umd/7056.js.LICENSE.txt +6 -0
  35. package/dist/umd/7164.js +148 -0
  36. package/dist/umd/{2106.js.LICENSE.txt → 7164.js.LICENSE.txt} +1 -7
  37. package/dist/umd/7531.js +1 -1
  38. package/dist/umd/7911.js +4 -4
  39. package/dist/umd/7911.js.LICENSE.txt +6 -0
  40. package/dist/umd/{3092.js → 8191.js} +40 -5
  41. package/dist/umd/8866.js +97 -5
  42. package/dist/umd/8866.js.LICENSE.txt +12 -0
  43. package/dist/umd/9092.js +440 -12
  44. package/dist/umd/9092.js.LICENSE.txt +6 -0
  45. package/dist/umd/{1940.js → 9314.js} +126 -7
  46. package/dist/umd/9314.js.LICENSE.txt +11 -0
  47. package/dist/umd/9423.js +608 -0
  48. package/dist/umd/9423.js.LICENSE.txt +23 -0
  49. package/dist/umd/9562.js +338 -0
  50. package/dist/umd/9562.js.LICENSE.txt +11 -0
  51. package/dist/umd/DescopeDev.js +1 -0
  52. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
  53. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
  54. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
  55. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +1 -1
  56. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +1 -1
  57. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +1 -1
  58. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +1 -1
  59. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +1 -1
  60. package/dist/umd/descope-avatar-index-js.js +1 -1
  61. package/dist/umd/descope-badge-index-js.js +1 -1
  62. package/dist/umd/descope-button-index-js.js +338 -1
  63. package/dist/umd/descope-button-index-js.js.LICENSE.txt +11 -0
  64. package/dist/umd/descope-combo-box-index-js.js +113 -1
  65. package/dist/umd/descope-container-index-js.js +1 -1
  66. package/dist/umd/descope-date-picker-index-js.js +1 -1
  67. package/dist/umd/descope-divider-index-js.js +1 -1
  68. package/dist/umd/descope-email-field-index-js.js +54 -1
  69. package/dist/umd/descope-email-field-index-js.js.LICENSE.txt +11 -0
  70. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +90 -1
  71. package/dist/umd/{1735.js.LICENSE.txt → descope-grid-descope-grid-custom-column-index-js.js.LICENSE.txt} +2 -2
  72. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
  73. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.LICENSE.txt +17 -0
  74. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +90 -1
  75. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.LICENSE.txt +17 -0
  76. package/dist/umd/descope-grid-index-js.js +1 -1
  77. package/dist/umd/descope-image-index-js.js +1 -1
  78. package/dist/umd/descope-link-index-js.js +1 -1
  79. package/dist/umd/descope-loader-linear-index-js.js +1 -1
  80. package/dist/umd/descope-loader-radial-index-js.js +1 -1
  81. package/dist/umd/descope-logo-index-js.js +1 -1
  82. package/dist/umd/descope-modal-index-js.js +1 -1
  83. package/dist/umd/descope-multi-select-combo-box-index-js.js +1 -1
  84. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +1 -1
  85. package/dist/umd/descope-new-password-index-js.js +1 -1
  86. package/dist/umd/descope-notification-descope-notification-card-index-js.js +1 -1
  87. package/dist/umd/descope-notification-index-js.js +1 -1
  88. package/dist/umd/descope-notp-image-index-js.js +1 -1
  89. package/dist/umd/descope-number-field-index-js.js +1 -1
  90. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +1 -1
  91. package/dist/umd/descope-passcode-index-js.js +37 -1
  92. package/dist/umd/descope-passcode-index-js.js.LICENSE.txt +11 -0
  93. package/dist/umd/descope-password-index-js.js +1 -1
  94. package/dist/umd/descope-policy-validation-index-js.js +1 -1
  95. package/dist/umd/descope-recaptcha-index-js.js +1 -1
  96. package/dist/umd/descope-text-area-index-js.js +1 -1
  97. package/dist/umd/descope-text-field-index-js.js +37 -1
  98. package/dist/umd/descope-text-field-index-js.js.LICENSE.txt +11 -0
  99. package/dist/umd/descope-text-index-js.js +1 -1
  100. package/dist/umd/descope-totp-image-index-js.js +1 -1
  101. package/dist/umd/descope-upload-file-index-js.js +1 -1
  102. package/dist/umd/descope-user-attribute-index-js.js +1 -1
  103. package/dist/umd/descope-user-auth-method-index-js.js +1 -1
  104. package/dist/umd/index.js +1 -1
  105. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +1 -1
  106. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +1 -1
  107. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +1 -126
  108. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +1 -1
  109. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +1 -1
  110. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +1 -1
  111. package/dist/umd/phone-fields-descope-phone-field-index-js.js +1 -1
  112. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +37 -1
  113. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt +11 -0
  114. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +1 -1
  115. package/package.json +1 -1
  116. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +2 -1
  117. package/src/dev/index.js +1 -0
  118. package/src/mixins/normalizeBooleanAttributesMixin.js +1 -1
  119. package/dist/umd/1000.js +0 -1
  120. package/dist/umd/1037.js +0 -2
  121. package/dist/umd/1721.js +0 -1
  122. package/dist/umd/1735.js +0 -73
  123. package/dist/umd/2066.js +0 -2
  124. package/dist/umd/2106.js +0 -73
  125. package/dist/umd/2269.js +0 -2
  126. package/dist/umd/2269.js.LICENSE.txt +0 -5
  127. package/dist/umd/2481.js +0 -1
  128. package/dist/umd/262.js +0 -2
  129. package/dist/umd/262.js.LICENSE.txt +0 -5
  130. package/dist/umd/3003.js +0 -2
  131. package/dist/umd/3208.js +0 -2
  132. package/dist/umd/3208.js.LICENSE.txt +0 -5
  133. package/dist/umd/322.js +0 -90
  134. package/dist/umd/322.js.LICENSE.txt +0 -5
  135. package/dist/umd/3249.js +0 -2
  136. package/dist/umd/3249.js.LICENSE.txt +0 -5
  137. package/dist/umd/3373.js +0 -2
  138. package/dist/umd/3373.js.LICENSE.txt +0 -5
  139. package/dist/umd/3585.js +0 -1
  140. package/dist/umd/3878.js +0 -1
  141. package/dist/umd/4201.js +0 -1
  142. package/dist/umd/422.js +0 -2
  143. package/dist/umd/422.js.LICENSE.txt +0 -5
  144. package/dist/umd/4226.js +0 -114
  145. package/dist/umd/4447.js +0 -1
  146. package/dist/umd/4567.js +0 -1
  147. package/dist/umd/4577.js +0 -1
  148. package/dist/umd/4595.js.LICENSE.txt +0 -11
  149. package/dist/umd/4803.js +0 -1
  150. package/dist/umd/4905.js +0 -2
  151. package/dist/umd/4905.js.LICENSE.txt +0 -5
  152. package/dist/umd/4946.js +0 -2
  153. package/dist/umd/4946.js.LICENSE.txt +0 -5
  154. package/dist/umd/6091.js +0 -124
  155. package/dist/umd/6606.js +0 -17
  156. package/dist/umd/6687.js +0 -9
  157. package/dist/umd/6687.js.LICENSE.txt +0 -5
  158. package/dist/umd/6977.js +0 -2
  159. package/dist/umd/6977.js.LICENSE.txt +0 -5
  160. package/dist/umd/7044.js +0 -1
  161. package/dist/umd/7583.js +0 -113
  162. package/dist/umd/8623.js +0 -2
  163. package/dist/umd/8623.js.LICENSE.txt +0 -5
  164. package/dist/umd/8725.js +0 -37
  165. package/dist/umd/9189.js +0 -2
  166. package/dist/umd/9189.js.LICENSE.txt +0 -5
  167. package/dist/umd/9211.js.LICENSE.txt +0 -5
  168. package/dist/umd/9214.js +0 -1
  169. package/dist/umd/9320.js +0 -2
  170. package/dist/umd/9320.js.LICENSE.txt +0 -5
  171. package/dist/umd/9383.js +0 -94
  172. package/dist/umd/9434.js +0 -1
  173. package/dist/umd/9437.js +0 -19
  174. package/dist/umd/9437.js.LICENSE.txt +0 -5
  175. package/dist/umd/9680.js +0 -2
  176. package/dist/umd/9680.js.LICENSE.txt +0 -5
  177. package/dist/umd/9789.js +0 -1
  178. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.LICENSE.txt +0 -5
  179. /package/dist/umd/{3092.js.LICENSE.txt → 1612.js.LICENSE.txt} +0 -0
  180. /package/dist/umd/{6606.js.LICENSE.txt → 2362.js.LICENSE.txt} +0 -0
  181. /package/dist/umd/{4226.js.LICENSE.txt → 4024.js.LICENSE.txt} +0 -0
  182. /package/dist/umd/{8725.js.LICENSE.txt → 4052.js.LICENSE.txt} +0 -0
  183. /package/dist/umd/{9383.js.LICENSE.txt → 8191.js.LICENSE.txt} +0 -0
  184. /package/dist/umd/{1037.js.LICENSE.txt → boolean-fields-descope-checkbox-index-js.js.LICENSE.txt} +0 -0
  185. /package/dist/umd/{2066.js.LICENSE.txt → boolean-fields-descope-switch-toggle-index-js.js.LICENSE.txt} +0 -0
  186. /package/dist/umd/{7583.js.LICENSE.txt → descope-combo-box-index-js.js.LICENSE.txt} +0 -0
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9461,769,3726,5988,7487,3705,4201,4803,7044],{818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(4567),o=n(1250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.Db)(this.inputElement,this,["checked"]),(0,r.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},6882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(4201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},1250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(3878),o=n(4567);const i=(0,o.iY)("boolean-field-internal"),s=["disabled","label","invalid","readonly"],a=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends a{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:s}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},6676:(e,t,n)=>{n.r(t);var r=n(1250);customElements.define(r.f,r.Z)},3483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(4567),o=n(2061),i=n(1e3),s=n(818),a=n(6882),l=n(4201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:m,requiredIndicator:b,helperText:g,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,m],fontFamily:[m,g,f],labelTextColor:{...m,property:"color"},labelSpacing:{...m,property:"padding-inline-start"},labelLineHeight:{...m,property:"line-height"},labelFontWeight:{...m,property:"font-weight"},labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${a.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));n(3092),n(9789),n(6676),customElements.define(d,x)},9278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>s});var r=n(4567),o=n(7044);class i extends o.C{_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(r)}));if(!o)return void this.__setTextContent(e,n.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=r||"",e.innerHTML="",e.append(i)}}const s=(0,r.iY)("grid-custom-column");customElements.define(s,i)},2238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(3483);var r=n(4567),o=n(8623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},s=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class a extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=s(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",s(t))}_defaultRenderer(e,t,n){const r=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?r.selectItem(n.item):r.deselectItem(n.item)},o.setAttribute("checked",n.selected)}}const l=(0,r.iY)("grid-selection-column");customElements.define(l,a)},7044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(322);class o extends r.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.isArray(r)?r.join(", "):r;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},2356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(4567),o=n(7044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},9950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(4595),n(2356),n(9278),n(2238);var r=n(2061),o=n(4567),i=n(1e3);const s=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},a=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:m,selectedRow:b,rowSeparator:g,resizeHandle:f}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,r.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...m,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...b,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,n)=>{const r=e.getAttribute(n);return r&&(t[n]=r),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);s(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:n,attrs:r})=>{const o=`descope-grid-${n}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(r).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(s(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:a}));customElements.define(a,x)},4201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>o,Wf:()=>p,bi:()=>r,jI:()=>a,jl:()=>i,wm:()=>h});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,h=(e,t)=>`\n ${o(e)}\n ${s(e)}\n ${a(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,p=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9461,769],{3878:(e,t,n)=>{n.d(t,{P:()=>s});var r=n(2061),o=n(4978),i=n(3346);const s=(...e)=>(0,r.qC)(o.wX,o.li,o.QT,o.mE)((0,i.s)(...e))},818:(e,t,n)=>{n.d(t,{h:()=>i});var r=n(4567),o=n(1250);const i=e=>class extends e{init(){super.init?.();const e=document.createElement("template");e.innerHTML=`\n\t\t\t\t<${o.f}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.f}>\n\t\t\t`,this.baseElement.appendChild(e.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.f),this.checkbox=this.inputElement.querySelector("vaadin-checkbox"),(0,r.oP)(this,this.inputElement,{includeAttrs:["required","full-width","size","label","invalid","disabled","readonly"]}),(0,r.Db)(this.inputElement,this,["checked"]),(0,r.tg)(this,this.inputElement,{includeAttrs:["checked"]})}}},6882:(e,t,n)=>{n.d(t,{Z:()=>r});const r=`\n:host {\n\tdisplay: inline-flex;\n}\n\n${(0,n(4201).DY)()}\n\n.wrapper {\n\tdisplay: flex;\n\tbox-sizing: border-box;\n}\nvaadin-text-field {\n\tposition: relative;\n\tpadding: 0;\n\tdisplay: inline-flex;\n\talign-items: flex-start;\n}\nvaadin-text-field::before {\n\theight: 0;\n\tmargin: 0;\n}\nvaadin-text-field::part(label) {\n position: absolute;\n top: 0;\n}\nvaadin-text-field::part(input-field) {\n\tpadding: 0;\n\tbackground: none;\n\tmin-height: 0;\n}\nvaadin-text-field::part(input-field)::after {\n background: none;\n}\nvaadin-text-field[focus-ring]::part(input-field) {\n\tbox-shadow: none;\n}\n\nvaadin-checkbox [slot="label"] {\n align-self: flex-start;\n padding: 0;\n}\n[required] vaadin-checkbox [slot="label"]:not(:empty) {\n\tpadding-inline-end: 1em;\n}\ndescope-boolean-field-internal {\n -webkit-mask-image: none;\n min-height: initial;\n}\n`},1250:(e,t,n)=>{n.d(t,{Z:()=>l,f:()=>i});var r=n(3878),o=n(4567);const i=(0,o.iY)("boolean-field-internal"),s=["disabled","label","invalid","readonly"],a=(0,r.P)({componentName:i,baseSelector:"div"}),l=class extends a{static get observedAttributes(){return["readonly"]}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper">\n\t\t\t\t<vaadin-checkbox></vaadin-checkbox>\n\t\t\t</div>\n\t\t',this.wrapperEle=this.querySelector("div"),this.checkbox=this.querySelector("vaadin-checkbox")}get value(){return this.checkbox?.checked}set value(e){this.checkbox.checked=e}get checked(){return this.value}set checked(e){this.value=e}init(){this.addEventListener("focus",(e=>{e.isTrusted&&this.checkbox.focus()})),super.init?.(),(0,o.oP)(this,this.checkbox,{includeAttrs:s}),(0,o.tg)(this,this.checkbox,{includeAttrs:["checked"]}),this.handleFocusEventsDispatching([this.checkbox])}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"readonly"===e&&this.onReadOnlyChange(null!==n)}onReadOnlyChange(e){this.baseElement.setAttribute("inert",e)}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:{}}}},6676:(e,t,n)=>{n.r(t);var r=n(1250);customElements.define(r.f,r.Z)},3483:(e,t,n)=>{n.r(t),n.d(t,{CheckboxClass:()=>x});var r=n(4567),o=n(2061),i=n(4978),s=n(818),a=n(6882),l=n(4201);const d=(0,r.iY)("checkbox"),{host:c,component:h,checkboxElement:p,checkboxSurface:u,checkboxLabel:m,requiredIndicator:b,helperText:g,errorMessage:f}={host:{selector:()=>":host"},requiredIndicator:{selector:'[required] vaadin-checkbox [slot="label"]:not(:empty)::after'},component:{selector:"vaadin-checkbox"},checkboxElement:{selector:"vaadin-checkbox::part(checkbox)"},checkboxSurface:{selector:"vaadin-checkbox::part(checkbox)::after"},checkboxLabel:{selector:'vaadin-checkbox [slot="label"]:not(:empty)'},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},x=(0,o.qC)((0,i.yk)({mappings:{hostWidth:{...c,property:"width"},hostDirection:{...c,property:"direction"},fontSize:[c,p,m],fontFamily:[m,g,f],labelTextColor:{...m,property:"color"},labelSpacing:{...m,property:"padding-inline-start"},labelLineHeight:{...m,property:"line-height"},labelFontWeight:{...m,property:"font-weight"},labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...u,property:"color"},inputBackgroundColor:{...p,property:"background-color"},inputBorderRadius:{...p,property:"border-radius"},inputBorderWidth:{...p,property:"border-width"},inputBorderOffset:{...p,property:"border-offset"},inputBorderColor:{...p,property:"border-color"},inputBorderStyle:{...p,property:"border-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputSize:[{...p,property:"width"},{...p,property:"height"},{...u,property:"font-size"},{...h,property:"font-size"}]}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,s.h)((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t${a.Z}\n ${(0,l.bi)(x.cssVarList)}\n\n :host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n }\n\n :host ::part(error-message) {\n direction: ltr;\n }\n\n vaadin-text-field {\n width: 100%;\n }\n\n descope-boolean-field-internal {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n height: 100%;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox)::after {\n top: 0;\n left: 0;\n }\n\n vaadin-text-field::part(input-field)::after {\n content: none;\n }\n `,excludeAttrsSync:["label","tabindex"],componentName:d}));n(3092),n(9789),n(6676),customElements.define(d,x)},9278:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>s});var r=n(4567),o=n(7044);class i extends o.C{_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.from(this.children).find((e=>{const t=e.getAttribute("data-pattern");return!t||new RegExp(t).test(r)}));if(!o)return void this.__setTextContent(e,n.item[this.path]||"");const i=o.cloneNode(!0);i.textContent=r||"",e.innerHTML="",e.append(i)}}const s=(0,r.iY)("grid-custom-column");customElements.define(s,i)},2238:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>l}),n(3483);var r=n(4567),o=n(8623);const i=()=>{const e=document.createElement("descope-checkbox");return e.setAttribute("bordered","true"),e.setAttribute("size","xs"),e},s=e=>!!e.items?.length&&e.selectedItems.length===e.items.length;class a extends o.w{_onHeaderRendererOrBindingChanged(){}_headerRenderer(e){const t=e.parentNode;let n=e.querySelector("descope-checkbox");n||(n=i(),n.addEventListener("input",(()=>{const e=s(t);t.selectedItems=e?[]:t.items})),e.appendChild(n)),n.setAttribute("checked",s(t))}_defaultRenderer(e,t,n){const r=e.parentNode;let o=e.querySelector("descope-checkbox");o||(o=i(),e.appendChild(o)),o.onchange=()=>{o.checked?r.selectItem(n.item):r.deselectItem(n.item)},o.setAttribute("checked",n.selected)}}const l=(0,r.iY)("grid-selection-column");customElements.define(l,a)},7044:(e,t,n)=>{n.d(t,{C:()=>o});var r=n(322);class o extends r.n{get sortable(){return"true"===this.getAttribute("sortable")}_defaultRenderer(e,t,n){const r=n.item[this.path]||"",o=Array.isArray(r)?r.join(", "):r;this.__setTextContent(e,o),e.title=o}_defaultHeaderRenderer(e,t){this.sortable?super._defaultHeaderRenderer(e,t):this.__setTextContent(e,this.__getHeader(this.header,this.path))}}},2356:(e,t,n)=>{n.r(t),n.d(t,{componentName:()=>i});var r=n(4567),o=n(7044);const i=(0,r.iY)("grid-text-column");customElements.define(i,o.C)},9950:(e,t,n)=>{n.r(t),n.d(t,{GridClass:()=>x}),n(4595),n(2356),n(9278),n(2238);var r=n(2061),o=n(4567),i=n(4978);const s=e=>{const t=Array.isArray(e);return t||console.error("data must be an array, received:",e),t},a=(0,o.iY)("grid"),{host:l,headerRow:d,headerRowCell:c,contentRow:h,firstRow:p,sortIndicators:u,activeSortIndicator:m,selectedRow:b,rowSeparator:g,resizeHandle:f}={host:{selector:()=>"vaadin-grid"},headerRow:{selector:()=>"::part(header-cell)"},headerRowCell:{selector:()=>"vaadin-grid::part(header-cell)"},contentRow:{selector:()=>"::part(cell)"},firstRow:{selector:()=>"::part(first-header-row-cell)"},selectedRow:{selector:()=>"::part(selected-row-cell)"},sortIndicators:{selector:()=>"vaadin-grid-sorter::part(indicators)"},activeSortIndicator:{selector:()=>"vaadin-grid-sorter[direction]"},rowSeparator:{selector:()=>"vaadin-grid::part(body-cell)"},resizeHandle:{selector:()=>"::part(resize-handle)"}},x=(0,r.qC)((0,i.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,i.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostHeight:{selector:()=>":host",property:"height"},hostMinHeight:{selector:()=>":host",property:"min-height"},fontFamily:[{...d},{...h}],fontSize:[{...d},{...h}],fontWeight:{...h},valueTextColor:{...h,property:"color"},backgroundColor:[{...l,property:"background-color"},{...h,property:"background-color"}],sortIndicatorsColor:{...u,property:"color"},activeSortIndicator:{...m,property:"color"},borderColor:{...l,property:"border-color"},borderWidth:{...l,property:"border-width"},borderStyle:{...l,property:"border-style"},borderRadius:{...l,property:"border-radius"},selectedBackgroundColor:{...b,property:"background-color"},headerRowTextColor:{...c,property:"color"},separatorColor:[{...p,property:"border-bottom-color"},{...g,property:"border-top-color"}],resizeHandleColor:{...f,property:"background-color"}}}),i.e4,i.Ae,(e=>class extends e{#e;init(){super.init?.(),this.handleColumns(),this.forwardSelectedItemsChange(),this.baseElement._mapSorters=()=>{}}forwardSelectedItemsChange(){this.baseElement.addEventListener("selected-items-changed",(e=>{this.dispatchEvent(new CustomEvent("selected-items-changed",{bubbles:!0,composed:!0,detail:e.detail}))}))}attributeChangedCallback(e,t,n){super.attributeChangedCallback?.(e,t,n),"columns"===e&&this.setColumnsDataFromAttr()}handleColumns(){this.columnsAttr?this.setColumnsDataFromAttr():this.children.length&&this.setColumnsFromChildren()}setColumnsFromChildren(){this.#e=Array.from(this.children).map((e=>({path:e.getAttribute("path"),header:e.getAttribute("header"),type:e.localName.match("^descope-grid-(\\w+)-column$")?.[1]||"text",attrs:["frozen","resizable","auto-width","status"].reduce(((t,n)=>{const r=e.getAttribute(n);return r&&(t[n]=r),t}),{})})))}get columnsAttr(){return this.getAttribute("columns")}setColumnsDataFromAttr(){try{const e=JSON.parse(this.columnsAttr);s(e)&&(this.columns=e)}catch(e){console.error('could not parse data string from attribute "columns" -',e.message)}}#t=({path:e,header:t,type:n,attrs:r})=>{const o=`descope-grid-${n}-column`;return`<${o} header="${t}" path="${e}" ${Object.entries(r).map((([e,t])=>`${e}="${t}"`)).join(" ")}></${o}>`};get renderColumn(){return this.#t}set renderColumn(e){this.#t=e,this.renderColumns()}getColumnsTemplate(){return this.#e?.reduce?.(((e,t)=>e+(this.renderColumn?.(t||{})||"")),"")}renderColumns(){const e=this.getColumnsTemplate();e&&(this.innerHTML=e)}get grid(){return this.shadowRoot.querySelector("vaadin-grid")}get data(){return this.grid.items}set data(e){if(s(e)&&this.grid.items!==e&&(this.grid.items=e,this.grid.selectedItems)){const e=new Set(this.grid.items.map((e=>e[this.uniqueColumnId]??e))),t=this.grid.selectedItems.filter((t=>e.has(t[this.uniqueColumnId]??t)));this.grid.selectedItems.length!==t.length&&(this.grid.selectedItems=t)}}get columns(){return this.#e}set columns(e){this.#e=e,this.renderColumns()}get paths(){return this.columns.map((e=>e.path))}get uniqueColumnId(){return this.getAttribute("unique-column-id")}}))((0,i.DM)({delegatesFocus:!1,slots:[""],wrappedEleName:"vaadin-grid",style:()=>"\n vaadin-grid {\n overflow: hidden;\n height: 100%;\n min-height: 300px;\n }\n vaadin-grid-cell-content {\n display: flex;\n }\n vaadin-grid::part(selected-row-cell) {\n background-image: none;\n box-shadow: none;\n }\n\t\t",excludeAttrsSync:["columns","tabindex"],componentName:a}));customElements.define(a,x)},4201:(e,t,n)=>{n.d(t,{B:()=>c,DY:()=>l,PH:()=>d,Pd:()=>s,TX:()=>o,Wf:()=>p,bi:()=>r,jI:()=>a,jl:()=>i,wm:()=>h});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,o=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,i=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,s=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,a=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,c=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,h=(e,t)=>`\n ${o(e)}\n ${s(e)}\n ${a(e)}\n ${i(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${c(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,p=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[6772],{8278:(t,e,s)=>{s.r(e),s.d(e,{ImageClass:()=>r});var n=s(1e3),c=s(2561),o=s(2061),i=s(4567);const a=["src","alt"],l=(0,i.iY)("image"),h=(0,c.s)({componentName:l,baseSelector:":host > img"}),r=(0,o.qC)((0,n.yk)({mappings:{height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.e4)(class extends h{static get observedAttributes(){return a.concat(h.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > img {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t</style>\n\t\t<img/>\n\t"}connectedCallback(){super.connectedCallback?.(),(0,i.oP)(this,this.baseElement,{includeAttrs:a})}});customElements.define(l,r)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6772],{8278:(t,e,s)=>{s.r(e),s.d(e,{ImageClass:()=>r});var n=s(4978),o=s(3346),c=s(2061),i=s(4567);const a=["src","alt"],l=(0,i.iY)("image"),h=(0,o.s)({componentName:l,baseSelector:":host > img"}),r=(0,c.qC)((0,n.yk)({mappings:{height:{selector:()=>":host"},width:{selector:()=>":host"}}}),n.e4)(class extends h{static get observedAttributes(){return a.concat(h.observedAttributes||[])}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t:host > img {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t</style>\n\t\t<img/>\n\t"}connectedCallback(){super.connectedCallback?.(),(0,i.oP)(this,this.baseElement,{includeAttrs:a})}});customElements.define(l,r)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[58],{5846:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>y});var s=o(1e3),n=o(2561),r=o(2138),i=o(2061),c=o(4567);const a=(0,c.iY)("link");class l extends((0,n.s)({componentName:a,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t:host a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,c.oP)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,c.oP)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const p={host:{selector:()=>":host"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>r.k.componentName}},{anchor:h,text:d,host:u,wrapper:x}=p,y=(0,i.qC)((0,s.yk)({mappings:{hostWidth:{...u,property:"width"},hostDirection:{...d,property:"direction"},textAlign:x,textColor:[{...h,property:"color"},{...d,property:r.k.cssVarList.textColor}],cursor:h}}),s.e4,s.Ae)(l);o(1876),customElements.define(a,y)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[58,2528],{5846:(t,e,o)=>{o.r(e),o.d(e,{LinkClass:()=>u});var n=o(4978),s=o(3346),r=o(2138),i=o(2061),l=o(4567);const h=(0,l.iY)("link");class p extends((0,s.s)({componentName:h,baseSelector:":host a"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t\t:host a {\n\t\t\tdisplay: inline;\n\t\t\ttext-decoration: none;\n\t\t}\n\t\t:host a:hover {\n\t\t\ttext-decoration: underline;\n\t\t}\n\t\t</style>\n\t\t<div>\n\t\t\t<descope-text>\n\t\t\t\t<a>\n\t\t\t\t\t<slot></slot>\n\t\t\t\t</a>\n\t\t\t</descope-text>\n\t\t</div>\n\t\t",(0,l.oP)(this,this.shadowRoot.querySelector("a"),{includeAttrs:["href","target","tooltip"],mapAttrs:{tooltip:"title"}}),(0,l.oP)(this,this.shadowRoot.querySelector("descope-text"),{includeAttrs:["mode","variant"]})}}const c={host:{selector:()=>":host"},anchor:{},wrapper:{selector:()=>":host > div"},text:{selector:()=>r.k.componentName}},{anchor:a,text:d,host:y,wrapper:m}=c,u=(0,i.qC)((0,n.yk)({mappings:{hostWidth:{...y,property:"width"},hostDirection:{...d,property:"direction"},textAlign:m,textColor:[{...a,property:"color"},{...d,property:r.k.cssVarList.textColor}],cursor:a}}),n.e4,n.Ae)(p);o(1876),customElements.define(h,u)},2138:(t,e,o)=>{o.d(e,{f:()=>l,k:()=>p});var n=o(4978),s=o(3346),r=o(2061),i=o(4567);const l=(0,i.iY)("text");class h extends((0,s.s)({componentName:l,baseSelector:":host > slot"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n\t\t<style>\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t\t:host > slot {\n\t\t\t\twidth: 100%;\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n\t\t</style>\n\t\t<slot part="text-wrapper"></slot>\n\t\t'}}const p=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{selector:()=>":host",property:"width"},hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},textColor:{property:"color"},textLineHeight:{property:"line-height"},textLetterSpacing:{property:"letter-spacing"},textShadow:{},textAlign:{},textTransform:{},fontFamily:{},fontStyle:{},fontWeight:{},borderWidth:{},borderStyle:{},borderColor:{}}}),n.e4,n.Ae,(t=>class extends t{get hideWhenEmpty(){return"true"===this.getAttribute("hide-when-empty")}init(){super.init(),(0,i.P$)(this,(()=>{const t=!!this.childNodes.length;this.style.display=!t&&this.hideWhenEmpty?"none":""}))}}))(h)},1876:(t,e,o)=>{o.r(e),o.d(e,{TextClass:()=>n.k});var n=o(2138);customElements.define(n.f,n.k)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[6453],{7845:(t,e,r)=>{r.r(e),r.d(e,{LoaderLinearClass:()=>l});var o=r(1e3),n=r(2561),a=r(2061);const i=(0,r(4567).iY)("loader-linear");class s extends((0,n.s)({componentName:i,baseSelector:":host > div"})){static get componentName(){return i}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const{after:p,host:d}={after:{selector:"::after"},host:{selector:()=>":host"}},l=(0,a.qC)((0,o.yk)({mappings:{hostDisplay:{},hostWidth:{...d,property:"width"},barHeight:[{property:"height"},{...p,property:"height"}],barBorderRadius:[{property:"border-radius"},{...p,property:"border-radius"}],verticalPadding:[{...d,property:"padding-top"},{...d,property:"padding-bottom"}],barBackgroundColor:{property:"background-color"},barColor:{...p,property:"background-color"},barWidth:{...p,property:"width"},animationDuration:[{},p],animationTimingFunction:[{},p],animationIterationCount:[{},p]}}),o.e4,o.Ae)(s);customElements.define(i,l)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[6453],{7845:(t,e,o)=>{o.r(e),o.d(e,{LoaderLinearClass:()=>c});var n=o(4978),r=o(3346),a=o(2061);const i=(0,o(4567).iY)("loader-linear");class s extends((0,r.s)({componentName:i,baseSelector:":host > div"})){static get componentName(){return i}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes tilt {\n\t\t\t\t0% { transform: translateX(0); }\n\t\t\t\t50% { transform: translateX(400%); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: flex;\n\t\t\t}\n\t\t\tdiv::after {\n\t\t\t\tcontent: '';\n\t\t\t\tanimation-name: tilt;\n\t\t\t\tposition: absolute;\n\t\t\t\tleft: 0;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\twidth: 100%;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const{after:p,host:d}={after:{selector:"::after"},host:{selector:()=>":host"}},c=(0,a.qC)((0,n.yk)({mappings:{hostDisplay:{},hostWidth:{...d,property:"width"},barHeight:[{property:"height"},{...p,property:"height"}],barBorderRadius:[{property:"border-radius"},{...p,property:"border-radius"}],verticalPadding:[{...d,property:"padding-top"},{...d,property:"padding-bottom"}],barBackgroundColor:{property:"background-color"},barColor:{...p,property:"background-color"},barWidth:{...p,property:"width"},animationDuration:[{},p],animationTimingFunction:[{},p],animationIterationCount:[{},p]}}),n.e4,n.Ae)(s);customElements.define(i,c)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3072],{8660:(t,r,e)=>{e.d(r,{O:()=>p,f:()=>a});var o=e(1e3),n=e(2561),i=e(2061);const a=(0,e(4567).iY)("loader-radial");class s extends((0,n.s)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const p=(0,i.qC)((0,o.yk)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),o.e4,o.Ae)(s)},5747:(t,r,e)=>{e.r(r),e.d(r,{LoaderRadialClass:()=>o.O});var o=e(8660);customElements.define(o.f,o.O)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3072],{8660:(t,r,e)=>{e.d(r,{O:()=>p,f:()=>s});var o=e(4978),n=e(3346),i=e(2061);const s=(0,e(4567).iY)("loader-radial");class a extends((0,n.s)({componentName:s,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const p=(0,i.qC)((0,o.yk)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),o.e4,o.Ae)(a)},5747:(t,r,e)=>{e.r(r),e.d(r,{LoaderRadialClass:()=>o.O});var o=e(8660);customElements.define(o.f,o.O)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1984],{1034:(e,a,s)=>{s.r(a),s.d(a,{LogoClass:()=>n});var l=s(4567),c=s(3585);const o=(0,l.iY)("logo"),n=(0,c.D)({componentName:o,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(o,n)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1984],{3585:(t,e,n)=>{n.d(e,{D:()=>c});var o=n(2061),s=n(4978),a=n(3346);const c=({componentName:t,varName:e,fallbackVarName:n})=>{let c;class i extends((0,a.s)({componentName:t,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\t\t\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t\t${c}\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div></div>\n\t\t\t`}}const r=(0,o.qC)((0,s.yk)({mappings:{height:{selector:()=>":host > div"},width:{selector:()=>":host > div"},[e]:{property:"content"},[n]:{property:"content"}}}),s.e4,s.Ae)(i);return c=`content: var(${r.cssVarList[e]}, var(${r.cssVarList[n]}));`,r}},1034:(t,e,n)=>{n.r(e),n.d(e,{LogoClass:()=>c});var o=n(4567),s=n(3585);const a=(0,o.iY)("logo"),c=(0,s.D)({componentName:a,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(a,c)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4641],{958:(e,t,o)=>{o.r(t),o.d(t,{ModalClass:()=>n}),o(1940);var r=o(2061),s=o(4567),a=o(1e3);const l=(0,s.iY)("modal"),n=(0,r.qC)((0,a.yk)({mappings:{overlayBackgroundColor:{property:()=>n.cssVarList.overlay.backgroundColor},overlayShadow:{property:()=>n.cssVarList.overlay.shadow},overlayWidth:{property:()=>n.cssVarList.overlay.width}}}),(0,a.Iw)({name:"overlay",selector:"",mappings:{hostDisplay:{selector:()=>":host(.descope-modal)",property:"display",important:!0},backgroundColor:[{selector:()=>"::part(content)",property:"background-color"},{selector:()=>"::part(overlay)",property:"background-color"}],width:{selector:()=>"::part(overlay)",property:"width"},shadow:{selector:()=>"::part(overlay)",property:"box-shadow"}},forward:{include:!1,attributes:["opened"]}}),a.e4,a.Ae,(e=>class extends e{get opened(){return"true"===this.getAttribute("opened")}handleOpened(){(0,s.oP)(this,this.baseElement,{includeAttrs:["opened"]}),this.opened?this.style.display="":this.style.display="none"}init(){super.init?.(),this.style.display="none",setTimeout((()=>{this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay").appendChild(document.createElement("slot")),this.#e(),this.handleOpened()}))}#e(){const e=this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay");e._attachOverlay=()=>{e.bringToFront(),this.baseElement.setAttribute("style","display:flex!important;")},e._detachOverlay=()=>{this.baseElement.style.display="none"},e._enterModalState=()=>{},e.close=()=>!1}}))((0,a.DM)({slots:[""],wrappedEleName:"vaadin-dialog",style:()=>"",excludeAttrsSync:["tabindex","opened"],componentName:l}));customElements.define(l,n)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4641],{958:(e,t,o)=>{o.r(t),o.d(t,{ModalClass:()=>n}),o(1940);var s=o(2061),r=o(4567),a=o(4978);const l=(0,r.iY)("modal"),n=(0,s.qC)((0,a.yk)({mappings:{overlayBackgroundColor:{property:()=>n.cssVarList.overlay.backgroundColor},overlayShadow:{property:()=>n.cssVarList.overlay.shadow},overlayWidth:{property:()=>n.cssVarList.overlay.width}}}),(0,a.Iw)({name:"overlay",selector:"",mappings:{hostDisplay:{selector:()=>":host(.descope-modal)",property:"display",important:!0},backgroundColor:[{selector:()=>"::part(content)",property:"background-color"},{selector:()=>"::part(overlay)",property:"background-color"}],width:{selector:()=>"::part(overlay)",property:"width"},shadow:{selector:()=>"::part(overlay)",property:"box-shadow"}},forward:{include:!1,attributes:["opened"]}}),a.e4,a.Ae,(e=>class extends e{get opened(){return"true"===this.getAttribute("opened")}handleOpened(){(0,r.oP)(this,this.baseElement,{includeAttrs:["opened"]}),this.opened?this.style.display="":this.style.display="none"}init(){super.init?.(),this.style.display="none",setTimeout((()=>{this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay").appendChild(document.createElement("slot")),this.#e(),this.handleOpened()}))}#e(){const e=this.baseElement.shadowRoot.querySelector("vaadin-dialog-overlay");e._attachOverlay=()=>{e.bringToFront(),this.baseElement.setAttribute("style","display:flex!important;")},e._detachOverlay=()=>{this.baseElement.style.display="none"},e._enterModalState=()=>{},e.close=()=>!1}}))((0,a.DM)({slots:[""],wrappedEleName:"vaadin-dialog",style:()=>"",excludeAttrsSync:["tabindex","opened"],componentName:l}));customElements.define(l,n)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[3840],{9393:(e,t,o)=>{o.r(t),o.d(t,{MultiSelectComboBoxClass:()=>I}),o(1438);var r=o(2061),i=o(4567),a=o(4201),l=o(1e3);const s=(0,i.iY)("multi-select-combo-box"),{host:n,inputField:d,inputElement:c,placeholder:u,toggle:p,clearButton:m,label:h,requiredIndicator:b,helperText:y,errorMessage:v,chip:g,chipLabel:f,overflowChipFirstBorder:x,overflowChipSecondBorder:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},chip:{selector:"vaadin-multi-select-combo-box-chip"},chipLabel:{selector:"vaadin-multi-select-combo-box-chip::part(label)"},overflowChipFirstBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::before"},overflowChipSecondBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::after"}},I=(0,r.qC)((0,l.yk)({mappings:{hostWidth:{...n,property:"width"},hostDirection:{...n,property:"direction"},fontSize:[{},n],chipFontSize:{...f,property:"font-size"},fontFamily:[h,u,d,y,v,f],labelTextColor:[{...h,property:"color"},{...b,property:"color"}],errorMessageTextColor:{...v,property:"color"},inputHeight:{...d,property:"min-height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...b,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},inputDropdownButtonCursor:[{...p,property:"cursor"},{...m,property:"cursor"}],inputDropdownButtonColor:[{...p,property:"color"},{...m,property:"color"}],inputDropdownButtonSize:[{...p,property:"font-size"},{...m,property:"font-size"}],inputDropdownButtonOffset:[{...p,property:"margin-right"},{...p,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"},{...d,property:"padding-inline-start"}],inputVerticalPadding:[{...d,property:"padding-top"},{...d,property:"padding-bottom"}],chipTextColor:{...f,property:"color"},chipBackgroundColor:[{...g,property:"background-color"},{...x,property:"border-color"},{...w,property:"border-color"}],overlayBackground:{property:()=>I.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>I.cssVarList.overlay.textColor},overlayBorder:{property:()=>I.cssVarList.overlay.border},overlayFontSize:{property:()=>I.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>I.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>I.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>I.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>I.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>I.cssVarList.overlay.itemPaddingInlineEnd}}}),l.e4,(0,l.Iw)({name:"overlay",selector:"vaadin-multi-select-combo-box-internal",mappings:{backgroundColor:{selector:"vaadin-multi-select-combo-box-scroller"},minHeight:{selector:"vaadin-multi-select-combo-box-overlay"},margin:{selector:"vaadin-multi-select-combo-box-overlay"},cursor:{selector:"vaadin-multi-select-combo-box-item"},fontFamily:{selector:"vaadin-multi-select-combo-box-item"},textColor:{selector:"vaadin-multi-select-combo-box-item",property:"color"},fontSize:{selector:"vaadin-multi-select-combo-box-item"},itemBoxShadow:{selector:"vaadin-multi-select-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,l.dj)({proxyProps:["selectionStart"],inputEvent:"selected-items-changed"}),l.li,l.Ae,(e=>class extends e{static get observedAttributes(){return["readonly"]}#e=({displayName:e,value:t,label:o})=>`<span data-name="${o}" data-id="${t}">${e||o}</span>`;#t;#o=[];get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}get renderItem(){return this.#e}set renderItem(e){this.#e=e,this.renderItems()}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get allowCustomValues(){return"true"===this.getAttribute("allow-custom-value")}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data and default-values must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.renderItem?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}updateSelectedItems(){const e=this.baseElement.selectedItems?.map((e=>e.getAttribute("data-id")))||[];e.length>0&&(this.value=e),0===this.value.length&&this.setDefaultValues()}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){const r=t.customValueTransformFn(o)||"";r!==this.value&&e.set.call(this,r)}}})}#r(e){return Array.from(new Map(e.map((e=>[e.getAttribute("data-id"),e]))).values())}#i(){const e=Array.from(this.children),t=this.#r(e);e.length?(this.removeAttribute("has-no-options"),t.forEach((e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})})),this.baseElement.items=t,setTimeout((()=>{this.updateSelectedItems()}),0)):(this.baseElement.items=[],this.setAttribute("has-no-options","")),this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#a(){const e=this.baseElement.shadowRoot.querySelector("vaadin-multi-select-combo-box-internal").shadowRoot.querySelector("vaadin-multi-select-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#l(){this.allowCustomValues&&this.baseElement.addEventListener("custom-value-set",(e=>{const t=this.#e({label:e.detail,displayName:e.detail,value:e.detail});this.innerHTML+=t,this.baseElement._lastFilter="",setTimeout((()=>{this.value=[...this.value,e.detail]}),0)}))}setGetValidity(){this.getValidity=function(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}};const e=this;this.baseElement.checkValidity=()=>e.validity.valid}init(){super.init?.(),this.setGetValidity(),this.setComboBoxDescriptor(),this.#a(),this.#l(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,this.#i.bind(this)),(0,i.oP)(this,this.baseElement,{includeAttrs:["placeholder"]}),this.setDefaultValues(),this.baseElement.addEventListener("selected-items-changed",(()=>{this.#s(),this.dispatchEvent(new CustomEvent("input",{bubbles:!0}))}))}setDefaultValues(){this.defaultValues.length>0&&(this.value=this.defaultValues)}#s(){this.#o=this.baseElement.selectedItems?.map((e=>e.getAttribute("data-id")))||[]}set value(e){if(e&&e.length>0){const t=this.baseElement.items?.filter((t=>e.includes(t["data-id"])));if(this.allowCustomValues){const o=t?.map((e=>e.getAttribute("data-id")))||[],r=e.filter((e=>!o.includes(e)));if(r.length){const t=r.reduce(((e,t)=>e+this.#e({label:t,displayName:t,value:t})),"");return this.innerHTML+=t,void setTimeout((()=>{this.value=e}),0)}}const o=t?.map((e=>e.getAttribute("data-id")))||[];(0,r.lo)(this.#o,o)||(this.baseElement.selectedItems=t)}else this.baseElement.selectedItems=[]}get value(){return this.#o}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o&&"true"===o)}onReadOnlyChange(e){e?this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.setAttribute("inert",e):this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.removeAttribute("inert")}}))((0,l.DM)({slots:["","prefix"],wrappedEleName:"vaadin-multi-select-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,a.bi)(I.cssVarList)}\n\t\t${(0,a.PH)("vaadin-multi-select-combo-box")}\n\t\t${(0,a.jI)("vaadin-multi-select-combo-box")}\n\t\t${(0,a.Pd)("vaadin-multi-select-combo-box")}\n\n\t\tvaadin-multi-select-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-multi-select-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-multi-select-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n align-self: center;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\tvaadin-multi-select-combo-box[readonly] [slot="input"] {\n flex-grow: 1;\n flex-basis: 4em;\n\t\t}\n\n\t\t::part(input-field) {\n padding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n ${(0,a.Wf)("vaadin-multi-select-combo-box")}\n :host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {\n display: block;\n }\n\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::before,\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -4px;\n right: -4px;\n border-left-width: 0;\n border-inline-start-style: solid;\n border-inline-start-width: 2px;\n }\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -8px;\n right: -8px;\n }\n\n :host([has-no-options][allow-custom-value='true']) ::part(toggle-button) {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex","size","data","placeholder"],componentName:s,includeForwardProps:["items","renderer","selectedItems"]}));customElements.define(s,I)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[3840],{9393:(e,t,o)=>{o.r(t),o.d(t,{MultiSelectComboBoxClass:()=>I}),o(1438);var r=o(2061),i=o(4567),n=o(4201),a=o(4978);const l=(0,i.iY)("multi-select-combo-box"),{host:s,inputField:d,inputElement:u,placeholder:p,toggle:c,clearButton:m,label:h,requiredIndicator:b,helperText:g,errorMessage:v,chip:y,chipLabel:f,overflowChipFirstBorder:x,overflowChipSecondBorder:w}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"input"},placeholder:{selector:"> input:placeholder-shown"},toggle:{selector:"::part(toggle-button)"},clearButton:{selector:"::part(clear-button)"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},chip:{selector:"vaadin-multi-select-combo-box-chip"},chipLabel:{selector:"vaadin-multi-select-combo-box-chip::part(label)"},overflowChipFirstBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::before"},overflowChipSecondBorder:{selector:"vaadin-multi-select-combo-box-chip[slot='overflow']::after"}},I=(0,r.qC)((0,a.yk)({mappings:{hostWidth:{...s,property:"width"},hostDirection:{...s,property:"direction"},fontSize:[{},s],chipFontSize:{...f,property:"font-size"},fontFamily:[h,p,d,g,v,f],labelTextColor:[{...h,property:"color"},{...b,property:"color"}],errorMessageTextColor:{...v,property:"color"},inputHeight:{...d,property:"min-height"},inputBackgroundColor:{...d,property:"background-color"},inputBorderColor:{...d,property:"border-color"},inputBorderWidth:{...d,property:"border-width"},inputBorderStyle:{...d,property:"border-style"},inputBorderRadius:{...d,property:"border-radius"},labelRequiredIndicator:{...b,property:"content"},inputValueTextColor:{...d,property:"color"},inputPlaceholderTextColor:{...p,property:"color"},inputDropdownButtonCursor:[{...c,property:"cursor"},{...m,property:"cursor"}],inputDropdownButtonColor:[{...c,property:"color"},{...m,property:"color"}],inputDropdownButtonSize:[{...c,property:"font-size"},{...m,property:"font-size"}],inputDropdownButtonOffset:[{...c,property:"margin-right"},{...c,property:"margin-left"}],inputOutlineColor:{...d,property:"outline-color"},inputOutlineWidth:{...d,property:"outline-width"},inputOutlineStyle:{...d,property:"outline-style"},inputOutlineOffset:{...d,property:"outline-offset"},inputHorizontalPadding:[{...u,property:"padding-left"},{...u,property:"padding-right"},{...d,property:"padding-inline-start"}],inputVerticalPadding:[{...d,property:"padding-top"},{...d,property:"padding-bottom"}],chipTextColor:{...f,property:"color"},chipBackgroundColor:[{...y,property:"background-color"},{...x,property:"border-color"},{...w,property:"border-color"}],overlayBackground:{property:()=>I.cssVarList.overlay.backgroundColor},overlayTextColor:{property:()=>I.cssVarList.overlay.textColor},overlayBorder:{property:()=>I.cssVarList.overlay.border},overlayFontSize:{property:()=>I.cssVarList.overlay.fontSize},overlayFontFamily:{property:()=>I.cssVarList.overlay.fontFamily},overlayCursor:{property:()=>I.cssVarList.overlay.cursor},overlayItemBoxShadow:{property:()=>I.cssVarList.overlay.itemBoxShadow},overlayItemPaddingInlineStart:{property:()=>I.cssVarList.overlay.itemPaddingInlineStart},overlayItemPaddingInlineEnd:{property:()=>I.cssVarList.overlay.itemPaddingInlineEnd}}}),a.e4,(0,a.Iw)({name:"overlay",selector:"vaadin-multi-select-combo-box-internal",mappings:{backgroundColor:{selector:"vaadin-multi-select-combo-box-scroller"},minHeight:{selector:"vaadin-multi-select-combo-box-overlay"},margin:{selector:"vaadin-multi-select-combo-box-overlay"},cursor:{selector:"vaadin-multi-select-combo-box-item"},fontFamily:{selector:"vaadin-multi-select-combo-box-item"},textColor:{selector:"vaadin-multi-select-combo-box-item",property:"color"},fontSize:{selector:"vaadin-multi-select-combo-box-item"},itemBoxShadow:{selector:"vaadin-multi-select-combo-box-item",property:"box-shadow"},itemPaddingInlineStart:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-start"},itemPaddingInlineEnd:{selector:"vaadin-multi-select-combo-box-item",property:"padding-inline-end"}},forward:{include:!1,attributes:["size"]}}),(0,a.dj)({proxyProps:["selectionStart"],inputEvent:"selected-items-changed"}),a.li,a.Ae,(e=>class extends e{static get observedAttributes(){return["readonly"]}#e=({displayName:e,value:t,label:o})=>`<span data-name="${o}" data-id="${t}">${e||o}</span>`;#t;#o=[];get defaultValues(){const e=this.getAttribute("default-values");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "default-values" -',e.message)}return[]}get renderItem(){return this.#e}set renderItem(e){this.#e=e,this.renderItems()}get data(){if(this.#t)return this.#t;const e=this.getAttribute("data");if(e)try{const t=JSON.parse(e);if(this.isValidDataType(t))return t}catch(e){console.error('could not parse data string from attribute "data" -',e.message)}return[]}set data(e){this.isValidDataType(e)&&(this.#t=e,this.renderItems())}get allowCustomValues(){return"true"===this.getAttribute("allow-custom-value")}get minItemsSelection(){return parseInt(this.getAttribute("min-items-selection"),10)||0}get maxItemsSelection(){return parseInt(this.getAttribute("max-items-selection"),10)||0}isValidDataType(e){const t=Array.isArray(e);return t||console.error("data and default-values must be an array, received:",e),t}getItemsTemplate(){return this.data?.reduce?.(((e,t)=>e+(this.renderItem?.(t||{})||"")),"")}renderItems(){const e=this.getItemsTemplate();e&&(this.innerHTML=e)}updateSelectedItems(){const e=this.baseElement.selectedItems?.map((e=>e.getAttribute("data-id")))||[];e.length>0&&(this.value=e),0===this.value.length&&this.setDefaultValues()}customValueTransformFn(e){return e}setComboBoxDescriptor(){const e=Object.getOwnPropertyDescriptor(this.inputElement.constructor.prototype,"value"),t=this;Object.defineProperties(this.inputElement,{value:{...e,set(o){const r=t.customValueTransformFn(o)||"";r!==this.value&&e.set.call(this,r)}}})}#r(e){return Array.from(new Map(e.map((e=>[e.getAttribute("data-id"),e]))).values())}#i(){const e=Array.from(this.children),t=this.#r(e);e.length?(this.removeAttribute("has-no-options"),t.forEach((e=>{Object.defineProperty(e,"data-name",{value:e.getAttribute("data-name"),configurable:!0,writable:!0}),Object.defineProperty(e,"data-id",{value:e.getAttribute("data-id"),configurable:!0,writable:!0})})),this.baseElement.items=t,setTimeout((()=>{this.updateSelectedItems()}),0)):(this.baseElement.items=[],this.setAttribute("has-no-options","")),this.baseElement.renderer=(e,t,o)=>{e.innerHTML=o.item.outerHTML}}#n(){const e=this.baseElement.shadowRoot.querySelector("vaadin-multi-select-combo-box-internal").shadowRoot.querySelector("vaadin-multi-select-combo-box-overlay");e._attachOverlay=()=>{e.bringToFront()},e._detachOverlay=()=>{},e._enterModalState=()=>{}}#a(){this.allowCustomValues&&this.baseElement.addEventListener("custom-value-set",(e=>{const t=this.#e({label:e.detail,displayName:e.detail,value:e.detail});this.innerHTML+=t,this.baseElement._lastFilter="",setTimeout((()=>{this.value=[...this.value,e.detail]}),0)}))}setGetValidity(){this.getValidity=function(){return this.isRequired&&!this.value.length?{valueMissing:!0}:this.isRequired&&this.minItemsSelection&&this.value.length<this.minItemsSelection?{rangeUnderflow:!0}:this.maxItemsSelection&&this.value.length>this.maxItemsSelection?{rangeOverflow:!0}:{}};const e=this;this.baseElement.checkValidity=()=>e.validity.valid}init(){super.init?.(),this.setGetValidity(),this.setComboBoxDescriptor(),this.#n(),this.#a(),this.renderItems(),(0,i.FX)(this,this.renderItems.bind(this),{includeAttrs:["data"]}),(0,i.P$)(this,this.#i.bind(this)),(0,i.oP)(this,this.baseElement,{includeAttrs:["placeholder"]}),this.setDefaultValues(),this.baseElement.addEventListener("selected-items-changed",(()=>{this.#l(),this.dispatchEvent(new CustomEvent("input",{bubbles:!0}))}))}setDefaultValues(){this.defaultValues.length>0&&(this.value=this.defaultValues)}#l(){this.#o=this.baseElement.selectedItems?.map((e=>e.getAttribute("data-id")))||[]}set value(e){if(e&&e.length>0){const t=this.baseElement.items?.filter((t=>e.includes(t["data-id"])));if(this.allowCustomValues){const o=t?.map((e=>e.getAttribute("data-id")))||[],r=e.filter((e=>!o.includes(e)));if(r.length){const t=r.reduce(((e,t)=>e+this.#e({label:t,displayName:t,value:t})),"");return this.innerHTML+=t,void setTimeout((()=>{this.value=e}),0)}}const o=t?.map((e=>e.getAttribute("data-id")))||[];(0,r.lo)(this.#o,o)||(this.baseElement.selectedItems=t)}else this.baseElement.selectedItems=[]}get value(){return this.#o}attributeChangedCallback(e,t,o){super.attributeChangedCallback?.(e,t,o),"readonly"===e&&this.onReadOnlyChange(null!==o&&"true"===o)}onReadOnlyChange(e){e?this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.setAttribute("inert",e):this.baseElement?.shadowRoot?.querySelector("vaadin-multi-select-combo-box-internal")?.removeAttribute("inert")}}))((0,a.DM)({slots:["","prefix"],wrappedEleName:"vaadin-multi-select-combo-box",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-flex;\n\t\t\tbox-sizing: border-box;\n\t\t\t-webkit-mask-image: none;\n\t\t}\n\t\t${(0,n.bi)(I.cssVarList)}\n\t\t${(0,n.PH)("vaadin-multi-select-combo-box")}\n\t\t${(0,n.jI)("vaadin-multi-select-combo-box")}\n\t\t${(0,n.Pd)("vaadin-multi-select-combo-box")}\n\n\t\tvaadin-multi-select-combo-box {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t}\n\t\tvaadin-multi-select-combo-box::before {\n\t\t\theight: initial;\n\t\t}\n\t\tvaadin-multi-select-combo-box [slot="input"] {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n align-self: center;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\tvaadin-multi-select-combo-box[readonly] [slot="input"] {\n flex-grow: 1;\n flex-basis: 4em;\n\t\t}\n\n\t\t::part(input-field) {\n padding: 0;\n\t\t\tbox-shadow: none;\n\t\t}\n ${(0,n.Wf)("vaadin-multi-select-combo-box")}\n :host([has-label]) vaadin-multi-select-combo-box-chip::part(label) {\n display: block;\n }\n\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::before,\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -4px;\n right: -4px;\n border-left-width: 0;\n border-inline-start-style: solid;\n border-inline-start-width: 2px;\n }\n vaadin-multi-select-combo-box vaadin-multi-select-combo-box-chip[slot='overflow']::after {\n left: -8px;\n right: -8px;\n }\n\n :host([has-no-options][allow-custom-value='true']) ::part(toggle-button) {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex","size","data","placeholder"],componentName:l,includeForwardProps:["items","renderer","selectedItems"]}));customElements.define(l,I)},4201:(e,t,o)=>{o.d(t,{B:()=>u,DY:()=>s,PH:()=>d,Pd:()=>a,TX:()=>i,Wf:()=>c,bi:()=>r,jI:()=>l,jl:()=>n,wm:()=>p});const r=e=>`\n :host {\n padding: calc(var(${e.inputOutlineWidth}) + var(${e.inputOutlineOffset}))\n }\n`,i=e=>`\n ${e} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,n=e=>`\n ${e}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=e=>`\n ${e} > label,\n ${e}::part(label),\n ${e}::part(required-indicator) {\n cursor: pointer;\n }\n`,l=(e,t="input")=>`\n ${e}[disabled] > ${t}:placeholder-shown,\n\t${e}[readonly] > ${t}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,s=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=e=>`\n ${e}::part(input-field)::after {\n opacity: 0;\n }\n`,u=e=>`\n ${e}::part(input-field)::after {\n background: none;\n }\n`,p=(e,t)=>`\n ${i(e)}\n ${a(e)}\n ${l(e)}\n ${n(e)}\n ${((e,t)=>`\n ${e} input:-webkit-autofill,\n ${e} input:-webkit-autofill::first-line,\n ${e} input:-webkit-autofill:hover,\n ${e} input:-webkit-autofill:active,\n ${e} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${t.inputValueTextColor});\n box-shadow: 0 0 0 var(${t.inputHeight}) var(${t.inputBackgroundColor}) inset;\n }\n`)(e,t)}\n ${u(e)}\n ${(e=>`\n ${e}::before {\n\t\theight: unset;\n\t}\n`)(e)}\n ${(e=>`\n ${e} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(e)}\n ${(e=>`\n ${e}::part(input-field)::after {\n border: none;\n }\n`)(e)}\n`,c=e=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${e} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1842],{395:(t,e,i)=>{i.d(e,{f:()=>p,o:()=>m});var n=i(4567),s=i(2061),a=i(1e3),r=i(5857),o=i(2481),l=i(4201),d=i(4577);const p=(0,n.iY)("new-password"),c=d.S.cssVarList,{host:h,label:u,internalInputsWrapper:v,errorMessage:w,helperText:b,passwordInput:g,policyPreview:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},m=(0,s.qC)((0,a.yk)({mappings:{fontSize:[h,{},{selector:o.v.componentName,property:o.v.cssVarList.fontSize}],fontFamily:[u,w,b],errorMessageTextColor:{...w,property:"color"},hostWidth:{...h,property:"width"},hostMinWidth:{...h,property:"min-width"},hostDirection:[{...h,property:"direction"},{...g,property:o.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...h,property:"content"},spaceBetweenInputs:{...v,property:"gap"},policyPreviewBackgroundColor:{...f,property:c.backgroundColor},policyPreviewPadding:{...f,property:c.padding}}}),a.e4,(0,a.dj)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${r.f}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${r.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength"]})}}))((0,a.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(o.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},5857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(4567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(3878),s=i(4567),a=i(395),r=i(5857);const o=/^password-/,l=/^confirm-/,d=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],c=["confirm-label","confirm-placeholder"],h=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete"],u=[].concat(h,p,c,["has-validation"]),v=(0,n.P)({componentName:r.f,baseSelector:"div"});customElements.define(r.f,class extends v{static get observedAttributes(){return["has-confirm"].concat(v.observedAttributes||[],u)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm)}renderInputs(t){let e='\n <div>\n <descope-password data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n ';t&&(e+='<descope-password data-id="confirm"></descope-password>'),this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),[...p,...c,...h].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))})),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,s.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach((t=>{const e=document.createElement("style");e.innerHTML=`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${a.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,s.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}hidePolicy(){this.policyPanel.classList.add("hidden")}showPolicy(){this.policyPanel.classList.remove("hidden")}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-confirm"===t?this.renderInputs(null!==i&&"false"!==i):h.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,o),i):c.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,l),i),"has-validation"===t&&("true"===i?this.showPolicy():this.hidePolicy()))}})}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1842],{3878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(4978),o=i(3346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},395:(t,e,i)=>{i.d(e,{f:()=>p,o:()=>g});var n=i(4567),r=i(2061),o=i(4978),a=i(5857),s=i(9876),l=i(4201),d=i(2886);const p=(0,n.iY)("new-password"),c=d.S.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:v,helperText:m,passwordInput:y,policyPreview:f}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},g=(0,r.qC)((0,o.yk)({mappings:{fontSize:[u,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,v,m],errorMessageTextColor:{...v,property:"color"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...y,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...f,property:c.backgroundColor},policyPreviewPadding:{...f,property:c.padding}}}),o.e4,(0,o.dj)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${a.f}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${a.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength"]})}}))((0,o.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},5857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(4567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(3878),r=i(4567),o=i(395),a=i(5857);const s=/^password-/,l=/^confirm-/,d=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],c=["confirm-label","confirm-placeholder"],u=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete"],h=[].concat(u,p,c,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return["has-confirm"].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm)}renderInputs(t){let e='\n <div>\n <descope-password data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n ';t&&(e+='<descope-password data-id="confirm"></descope-password>'),this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),[...p,...c,...u].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))})),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach((t=>{const e=document.createElement("style");e.innerHTML=`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}hidePolicy(){this.policyPanel.classList.add("hidden")}showPolicy(){this.policyPanel.classList.remove("hidden")}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-confirm"===t?this.renderInputs(null!==i&&"false"!==i):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,s),i):c.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,l),i),"has-validation"===t&&("true"===i?this.showPolicy():this.hidePolicy()))}})},9876:(t,e,i)=>{i.d(e,{f:()=>l,v:()=>g});var n=i(4978),r=i(2061),o=i(4567),a=i(2702),s=i(4201);const l=(0,o.iY)("password"),{host:d,inputField:p,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:v,requiredIndicator:m,errorMessage:y,helperText:f}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonContainer:{selector:()=>"::part(reveal-button)"},revealButtonIcon:{selector:()=>"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[v,p,y,f],inputHeight:{...p,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...p,property:"background-color"},inputBorderStyle:{...p,property:"border-style"},inputBorderWidth:{...p,property:"border-width"},inputBorderColor:{...p,property:"border-color"},inputBorderRadius:{...p,property:"border-radius"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineWidth:{...p,property:"outline-width"},labelTextColor:[{...v,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...y,property:"color"},inputValueTextColor:{...c,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,property:"color"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z)((0,n.DM)({slots:["","suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,s.bi)(g.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("vaadin-password-field")}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tmin-height: 0;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\t\t\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t[readonly] vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${g.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},2702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable&&this.isReadOnly){const e=this.baseElement.querySelector("input"),i=e.getAttribute("type");e.setAttribute("type","text"),setTimeout((()=>e.focus()));const n=r=>{e.setAttribute("type",i),t.target.removeEventListener("mouseup",n),t.target.removeEventListener("dragend",n)};t.target.addEventListener("mouseup",n,{once:!0}),t.target.addEventListener("dragend",n,{once:!0})}})),super.init?.()}}},2886:(t,e,i)=>{i.d(e,{S:()=>y,f:()=>l});var n=i(4978),r=i(3346),o=i(2061),a=i(4567),s=i(7487);const l=(0,a.iY)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength"],p=["label","value",...d];class c extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return p}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),d.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:u,item:h,symbolDefault:b,symbolSuccess:v,symbolError:m}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},y=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...u,property:"border-width"},borderStyle:{...u,property:"border-style"},borderColor:{...u,property:"border-color"},borderRadius:{...u,property:"border-radius"},backgroundColor:{...u,property:"background-color"},textColor:{property:"color"},labelMargin:{...u,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...v,property:"color"},itemSymbolErrorColor:{...m,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...v,property:"content"},itemSymbolError:{...m,property:"content"}}}),n.e4,n.Ae)(c)},7487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},4201:(t,e,i)=>{i.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>r,Wf:()=>u,bi:()=>n,jI:()=>s,jl:()=>o,wm:()=>c});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[7055],{8974:(e,s,c)=>{c.r(s),c.d(s,{NewPasswordClass:()=>o.o});var o=c(395);c(9357),c(9279),c(8558),c(1545),customElements.define(o.f,o.o)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7055,1842,8106,4570],{3878:(t,e,i)=>{i.d(e,{P:()=>a});var n=i(2061),r=i(4978),o=i(3346);const a=(...t)=>(0,n.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},395:(t,e,i)=>{i.d(e,{f:()=>p,o:()=>g});var n=i(4567),r=i(2061),o=i(4978),a=i(5857),s=i(9876),l=i(4201),d=i(2886);const p=(0,n.iY)("new-password"),c=d.S.cssVarList,{host:u,label:h,internalInputsWrapper:b,errorMessage:y,helperText:v,passwordInput:f,policyPreview:m}={host:{selector:()=>":host"},label:{selector:"::part(label)"},internalInputsWrapper:{selector:"descope-new-password-internal .wrapper"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"},passwordInput:{selector:"descope-password"},policyPreview:{selector:"descope-policy-validation"}},g=(0,r.qC)((0,o.yk)({mappings:{fontSize:[u,{},{selector:s.v.componentName,property:s.v.cssVarList.fontSize}],fontFamily:[h,y,v],errorMessageTextColor:{...y,property:"color"},hostWidth:{...u,property:"width"},hostMinWidth:{...u,property:"min-width"},hostDirection:[{...u,property:"direction"},{...f,property:s.v.cssVarList.hostDirection}],inputsRequiredIndicator:{...u,property:"content"},spaceBetweenInputs:{...b,property:"gap"},policyPreviewBackgroundColor:{...m,property:c.backgroundColor},policyPreviewPadding:{...m,property:c.padding}}}),o.e4,(0,o.dj)({proxyProps:["value","selectionStart"]}),(t=>class extends t{init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t<${a.f}\n\t\t\t\tname="new-password"\n\t\t\t\ttabindex="-1"\n\t\t\t\tslot="input"\n\t\t\t></${a.f}>\n\t\t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(a.f),(0,n.oP)(this,this.inputElement,{includeAttrs:["password-label","password-placeholder","confirm-label","confirm-placeholder","full-width","size","bordered","label","has-confirm","invalid","readonly","draggable","has-validation","policy-label","active-policies","available-policies","data-password-policy-value-minlength"]})}}))((0,o.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t:host {\n\t\t\tdisplay: inline-block;\n\t\t\tmax-width: 100%;\n\t\t\tbox-sizing: border-box;\n\t\t}\n :host ::part(error-message) {\n direction: ltr;\n }\n\t\t${(0,l.bi)(s.v.cssVarList)}\n\t\tvaadin-text-field {\n\t\t\tpadding: 0;\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t}\n\t\tvaadin-text-field::part(input-field) {\n\t\t\tmin-height: 0;\n\t\t\tbackground: transparent;\n\t\t\tbox-shadow: none;\n\t\t\tpadding: 0;\n\t\t}\n\t\tvaadin-text-field::part(input-field)::after {\n\t\t\tbackground: transparent;\n\t\t\topacity: 0;\n\t\t}\n\t\tdescope-new-password-internal {\n\t\t\t-webkit-mask-image: none;\n\t\t\tmin-height: 0;\n\t\t\twidth: 100%;\n\t\t\tpadding: 0;\n\t\t}\n\t\tdescope-new-password-internal > .wrapper {\n\t\t\twidth: 100%;\n\t\t\theight: 100%;\n\t\t\tdisplay: flex;\n\t\t\tflex-direction: column;\n\t\t}\n\t\tdescope-password {\n\t\t\tdisplay: block;\n\t\t\twidth: 100%;\n\t\t}\n\t\tdescope-new-password-internal vaadin-password-field::before {\n\t\t\theight: initial;\n\t\t}\n descope-policy-validation {\n margin-top: 8px;\n display: flex;\n }\n descope-policy-validation.hidden {\n display: none;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:p}))},5857:(t,e,i)=>{i.d(e,{f:()=>n});const n=(0,i(4567).iY)("new-password-internal")},1545:(t,e,i)=>{i.r(e);var n=i(3878),r=i(4567),o=i(395),a=i(5857);const s=/^password-/,l=/^confirm-/,d=(t,e)=>t.replace(e,""),p=["password-label","password-placeholder"],c=["confirm-label","confirm-placeholder"],u=["disabled","bordered","size","full-width","maxlength","invalid","readonly","draggable","autocomplete"],h=[].concat(u,p,c,["has-validation"]),b=(0,n.P)({componentName:a.f,baseSelector:"div"});customElements.define(a.f,class extends b{static get observedAttributes(){return["has-confirm"].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML='\n\t\t\t<div class="wrapper"></div>\n\t\t',this.wrapperEle=this.querySelector(".wrapper")}get value(){return this.passwordInput?.value||""}set value(t){t!==this.value&&(this.value=t)}get hasConfirm(){return"true"===this.getAttribute("has-confirm")}get hasValidation(){return"true"===this.getAttribute("has-validation")}getValidity(){if(!this.policyPanel.isValid)return{patternMismatch:!0};if(this.isRequired&&!this.value)return{valueMissing:!0};if(this.hasConfirm&&this.confirmInput&&this.value!==this.confirmInput.value)return{patternMismatch:!0};const t=this.getAttribute("minlength"),e=parseInt(t,10)||0;return this.value.length>=e?{}:{tooShort:!0}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.passwordInput.focus()})),super.init?.(),this.renderInputs(this.hasConfirm)}renderInputs(t){let e='\n <div>\n <descope-password data-id="password"></descope-password>\n <descope-policy-validation></descope-policy-validation>\n </div>\n ';t&&(e+='<descope-password data-id="confirm"></descope-password>'),this.wrapperEle.innerHTML=e,this.passwordInput=this.querySelector('[data-id="password"]'),this.confirmInput=this.querySelector('[data-id="confirm"]'),this.policyPanel=this.querySelector("descope-policy-validation"),this.inputs=[this.passwordInput,this.confirmInput],this.initInputs(),[...p,...c,...u].forEach((t=>{this.attributeChangedCallback(t,null,this.getAttribute(t))})),this.passwordInput.addEventListener("input",(t=>{this.policyPanel.setAttribute("value",t.target.value)})),(0,r.oP)(this,this.policyPanel,{includeAttrs:["policy-label","available-policies","active-policies","data-password-policy-value-minlength"],mapAttrs:{"policy-label":"label","available-policies":"data"}})}handleIndicatorStyle(){this.inputs.forEach((t=>{const e=document.createElement("style");e.innerHTML=`\n\t\t\t\t:host ::part(required-indicator)::after {\n\t\t\t\t\tcontent: var(${o.o.cssVarList.inputsRequiredIndicator});\n width: 1em;\n text-align: center;\n\t\t\t\t}\n :host ::part(required-indicator) {\n display: inline-flex;\n }\n\t\t\t\t`,t?.shadowRoot.appendChild(e)}))}get isInvalid(){return this.hasAttribute("invalid")&&"false"!==this.getAttribute("invalid")}handleInputsInvalidAttribute(){this.inputs.forEach((t=>{t&&(0,r.FX)(t,(e=>{if(e.includes("invalid")){const e=t.getAttribute("invalid"),i=this.getAttribute("invalid");this.isInvalid&&i!==e&&t.setAttribute("invalid","true")}}),{})}))}initInputs(){this.handleIndicatorStyle(),this.handleInputsInvalidAttribute(),this.handleFocusEventsDispatching(this.inputs)}toggleBooleanAttribute(t,e,i){null===i?t?.removeAttribute(e):t?.setAttribute(e,i)}hidePolicy(){this.policyPanel.classList.add("hidden")}showPolicy(){this.policyPanel.classList.remove("hidden")}attributeChangedCallback(t,e,i){super.attributeChangedCallback?.(t,e,i),e!==i&&("has-confirm"===t?this.renderInputs(null!==i&&"false"!==i):u.includes(t)?this.inputs.forEach((e=>this.toggleBooleanAttribute(e,t,i))):p.includes(t)?this.toggleBooleanAttribute(this.passwordInput,d(t,s),i):c.includes(t)&&this.toggleBooleanAttribute(this.confirmInput,d(t,l),i),"has-validation"===t&&("true"===i?this.showPolicy():this.hidePolicy()))}})},8974:(t,e,i)=>{i.r(e),i.d(e,{NewPasswordClass:()=>n.o});var n=i(395);i(9357),i(9279),i(8558),i(1545),customElements.define(n.f,n.o)},9876:(t,e,i)=>{i.d(e,{f:()=>l,v:()=>g});var n=i(4978),r=i(2061),o=i(4567),a=i(2702),s=i(4201);const l=(0,o.iY)("password"),{host:d,inputField:p,inputElement:c,inputElementPlaceholder:u,revealButtonContainer:h,revealButtonIcon:b,label:y,requiredIndicator:v,errorMessage:f,helperText:m}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonContainer:{selector:()=>"::part(reveal-button)"},revealButtonIcon:{selector:()=>"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},g=(0,r.qC)((0,n.yk)({mappings:{hostWidth:{...d,property:"width"},hostMinWidth:{...d,property:"min-width"},hostDirection:{...d,property:"direction"},fontSize:[{},d],fontFamily:[y,p,f,m],inputHeight:{...p,property:"height"},inputHorizontalPadding:[{...c,property:"padding-left"},{...c,property:"padding-right"}],inputBackgroundColor:{...p,property:"background-color"},inputBorderStyle:{...p,property:"border-style"},inputBorderWidth:{...p,property:"border-width"},inputBorderColor:{...p,property:"border-color"},inputBorderRadius:{...p,property:"border-radius"},inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineOffset:{...p,property:"outline-offset"},inputOutlineWidth:{...p,property:"outline-width"},labelTextColor:[{...y,property:"color"},{...v,property:"color"}],labelRequiredIndicator:{...v,property:"content"},errorMessageTextColor:{...f,property:"color"},inputValueTextColor:{...c,property:"color"},inputPlaceholderTextColor:{...u,property:"color"},revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,property:"color"}}}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,a.Z)((0,n.DM)({slots:["","suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,s.bi)(g.cssVarList)}\n\t\t\t${(0,s.Pd)("vaadin-password-field")}\n ${(0,s.Wf)("vaadin-password-field")}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tmin-height: 0;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\t\t\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t[readonly] vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${g.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9279:(t,e,i)=>{i.r(e),i.d(e,{PasswordClass:()=>n.v}),i(7056);var n=i(9876);customElements.define(n.f,n.v)},2702:(t,e,i)=>{i.d(e,{Z:()=>n});const n=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable&&this.isReadOnly){const e=this.baseElement.querySelector("input"),i=e.getAttribute("type");e.setAttribute("type","text"),setTimeout((()=>e.focus()));const n=r=>{e.setAttribute("type",i),t.target.removeEventListener("mouseup",n),t.target.removeEventListener("dragend",n)};t.target.addEventListener("mouseup",n,{once:!0}),t.target.addEventListener("dragend",n,{once:!0})}})),super.init?.()}}},2886:(t,e,i)=>{i.d(e,{S:()=>f,f:()=>l});var n=i(4978),r=i(3346),o=i(2061),a=i(4567),s=i(7487);const l=(0,a.iY)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength"],p=["label","value",...d];class c extends((0,r.s)({componentName:l,baseSelector:":host > div"})){#t;#e=[];#i;static get observedAttributes(){return p}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback?.(t,e,i),e!==i){if("label"===t&&this.updateLabel(i),d.includes(t)){if("data"===t)try{this.availablePolicies=JSON.parse(i)}catch{console.error("Failed to set available policies")}if("active-policies"===t&&(this.#e=(i||"").split(",")),"data-password-policy-value-minlength"===t){const t=Number(i);!Number.isNaN(t)&&t>0&&(this.#i={...this.#i,minlength:{value:`${t}`}})}}this.renderItems(this.#t,this.#e,this.#i)}}get availablePolicies(){return this.#t||[]}set availablePolicies(t){this.#t=t}get value(){return this.getAttribute("value")||""}validate(){let t=this.#t;return this.#i&&(t=this.#t.map((t=>this.#i[t.id]?{...t,data:this.#i[t.id]}:t))),this.#e.reduce(((e,i)=>{const n=t.find((t=>t.id===i));if(!n)return e;const{pattern:r,message:o,data:a}=n;if(!r||!o)return e;const l={valid:new RegExp((0,s.I)(r,a)).test(this.value),message:(0,s.I)(o,a),id:i};return e.push(l),e}),[])}get isValid(){return!this.validate().some((({valid:t})=>!1===t))}getValidationItemTemplate({valid:t,message:e}){return`\n <li class="item" data-valid="${this.value?t:"none"}">\n <span class="message">${e}</span>\n </li>\n `}renderItems(t,e){t&&e.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(t){t?(this.label.innerHTML=t,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:u,item:h,symbolDefault:b,symbolSuccess:y,symbolError:v}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},f=(0,o.qC)((0,n.yk)({componentNameOverride:(0,a.iY)("input-wrapper")}),(0,n.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...u,property:"border-width"},borderStyle:{...u,property:"border-style"},borderColor:{...u,property:"border-color"},borderRadius:{...u,property:"border-radius"},backgroundColor:{...u,property:"background-color"},textColor:{property:"color"},labelMargin:{...u,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...y,property:"color"},itemSymbolErrorColor:{...v,property:"color"},itemSymbolDefault:{...b,property:"content"},itemSymbolSuccess:{...y,property:"content"},itemSymbolError:{...v,property:"content"}}}),n.e4,n.Ae)(c)},7487:(t,e,i)=>{i.d(e,{I:()=>n});const n=(t,e)=>t.replace(/{{(\w+)+}}/g,((t,i)=>e?.[i]||t))},8558:(t,e,i)=>{i.r(e),i.d(e,{PolicyValidationClass:()=>n.S});var n=i(2886);customElements.define(n.f,n.S)},6417:(t,e,i)=>{i.d(e,{f:()=>l,z:()=>p});var n=i(4978),r=i(4447),o=i(2061),a=i(4567),s=i(4201);const l=(0,a.iY)("text-field"),d=["type"],p=(0,o.qC)((0,n.yk)({mappings:r.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i)}}))((0,n.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,s.Wf)("vaadin-text-field")}\n\t\t\t${(0,s.bi)(p.cssVarList)}\n\t\t\t${(0,s.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9357:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.z}),i(9789);var n=i(6417);customElements.define(n.f,n.z)},4447:(t,e,i)=>{i.d(e,{Z:()=>h});const{host:n,label:r,placeholder:o,requiredIndicator:a,inputField:s,input:l,helperText:d,errorMessage:p,disabledPlaceholder:c,inputDisabled:u}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},h={fontSize:[{},n],fontFamily:[r,s,d,p],hostWidth:{...n,property:"width"},hostMinWidth:{...n,property:"min-width"},hostDirection:{...n,property:"direction"},inputBackgroundColor:{...s,property:"background-color"},labelTextColor:[{...r,property:"color"},{...a,property:"color"},{...r,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],errorMessageTextColor:{...p,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...u,property:"-webkit-text-fill-color"}],inputCaretTextColor:{...l,property:"color"},labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},inputTextAlign:{...l,property:"text-align"},inputPlaceholderColor:[{...o,property:"color"},{...c,property:"-webkit-text-fill-color"}]}},4201:(t,e,i)=>{i.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>r,Wf:()=>u,bi:()=>n,jI:()=>s,jl:()=>o,wm:()=>c});const n=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,c=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,u=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`},9789:(t,e,i)=>{i(8725),i(8005)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[7401],{5400:(e,t,n)=>{n.r(t),n.d(t,{NotificationCardClass:()=>c}),n(3951);var o=n(2061),r=n(4567),i=n(1e3);const s=(0,r.iY)("notification-card"),a={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},c=(0,o.qC)((0,i.yk)({mappings:{hostMinWidth:{selector:a.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:a.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:a.content,property:"border-width"},borderColor:{selector:a.content,property:"border-color"},borderStyle:{selector:a.content,property:"border-style"},borderRadius:[{selector:a.content,property:"border-radius"},{selector:a.overlay,property:"border-radius"}],verticalPadding:[{selector:a.content,property:"padding-top"},{selector:a.content,property:"padding-bottom"}],horizontalPadding:[{selector:a.content,property:"padding-right"},{selector:a.content,property:"padding-left"}]}}),(e=>class extends e{close(){this.baseElement.addEventListener("animationend",(()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))})),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n <div part="root">\n <div part="content">\n <slot></slot>\n </div>\n <div part="close">\n <slot name="close"></slot>\n </div>\n </div>\n ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part="close"] {\n cursor: pointer;\n display: flex;\n }\n\n [part="content"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part="root"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n ',excludeAttrsSync:["tabindex"],componentName:s}));customElements.define(s,c)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[7401],{5400:(e,t,n)=>{n.r(t),n.d(t,{NotificationCardClass:()=>c}),n(3951);var o=n(2061),r=n(4567),i=n(4978);const s=(0,r.iY)("notification-card"),a={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},c=(0,o.qC)((0,i.yk)({mappings:{hostMinWidth:{selector:a.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:a.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:a.content,property:"border-width"},borderColor:{selector:a.content,property:"border-color"},borderStyle:{selector:a.content,property:"border-style"},borderRadius:[{selector:a.content,property:"border-radius"},{selector:a.overlay,property:"border-radius"}],verticalPadding:[{selector:a.content,property:"padding-top"},{selector:a.content,property:"padding-bottom"}],horizontalPadding:[{selector:a.content,property:"padding-right"},{selector:a.content,property:"padding-left"}]}}),(e=>class extends e{close(){this.baseElement.addEventListener("animationend",(()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))})),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n <div part="root">\n <div part="content">\n <slot></slot>\n </div>\n <div part="close">\n <slot name="close"></slot>\n </div>\n </div>\n ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part="close"] {\n cursor: pointer;\n display: flex;\n }\n\n [part="content"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part="root"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n ',excludeAttrsSync:["tabindex"],componentName:s}));customElements.define(s,c)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[9655],{1845:(e,t,n)=>{n.r(t),n.d(t,{NotificationClass:()=>s}),n(3951);var i=n(4567);const o=window.customElements.get("vaadin-notification-container");if(!o)throw new Error("could not get vaadin-notification-container class");customElements.define((0,i.iY)("notification-container"),class extends o{}),n(5400);var a=n(2061),c=n(1e3);const r=(0,i.iY)("notification"),s=(0,a.qC)(c.e4,c.Ae,c._A,(e=>class t extends e{#e;constructor(){super();const e=this;Object.defineProperty(this.baseElement,"_container",{get:()=>(t._container||(t._container=document.createElement("descope-notification-container"),t._container.style.position="absolute",document.body.appendChild(t._container)),t._container.isConnected||setTimeout((()=>e.parentNode.appendChild(t._container))),t._container)}),Object.defineProperty(this.baseElement,"_card",{get:()=>e.#e}),this.baseElement._removeNotificationCard=this.close.bind(this)}close(){this.#e.close()}init(){super.init?.(),this.createCard(),(0,i.oP)(this,this.#e),(0,i.tg)(this.#e,this,{includeAttrs:["opened"]}),this.baseElement.renderer=e=>{Array.from(this.childNodes).forEach((t=>e.appendChild(t)))}}get isContainerEmpty(){return!t._container.children.length}removeContainer(){t._container.remove()}removeNotification(){this.remove(),this.isContainerEmpty&&this.removeContainer()}createCard(){this.#e=document.createElement("descope-notification-card"),this.#e.addEventListener("card-closed",this.removeNotification.bind(this))}}))((0,c.DM)({wrappedEleName:"vaadin-notification",excludeAttrsSync:["tabindex"],componentName:r}));customElements.define(r,s)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[9655,7401],{5400:(e,t,n)=>{n.r(t),n.d(t,{NotificationCardClass:()=>s}),n(3951);var o=n(2061),i=n(4567),r=n(4978);const a=(0,i.iY)("notification-card"),c={content:()=>"vaadin-notification-card::part(content)",overlay:()=>"vaadin-notification-card::part(overlay)"},s=(0,o.qC)((0,r.yk)({mappings:{hostMinWidth:{selector:c.content,property:"min-width"},fontFamily:{},fontSize:{},backgroundColor:{selector:c.content},textColor:{property:"color"},boxShadow:{},borderWidth:{selector:c.content,property:"border-width"},borderColor:{selector:c.content,property:"border-color"},borderStyle:{selector:c.content,property:"border-style"},borderRadius:[{selector:c.content,property:"border-radius"},{selector:c.overlay,property:"border-radius"}],verticalPadding:[{selector:c.content,property:"padding-top"},{selector:c.content,property:"padding-bottom"}],horizontalPadding:[{selector:c.content,property:"padding-right"},{selector:c.content,property:"padding-left"}]}}),(e=>class extends e{close(){this.baseElement.addEventListener("animationend",(()=>{this.remove(),this.dispatchEvent(new Event("card-closed"))})),this.setAttribute("opened","false")}constructor(){super(),this.baseElement.innerHTML='\n <div part="root">\n <div part="content">\n <slot></slot>\n </div>\n <div part="close">\n <slot name="close"></slot>\n </div>\n </div>\n ',this.closeEle=this.shadowRoot.querySelector('[part="close"]')}init(){super.init?.(),this.closeEle.onclick=()=>{this.close()}}}))((0,r.DM)({slots:[],wrappedEleName:"vaadin-notification-card",style:()=>'\n vaadin-notification-card {\n box-shadow: none;\n }\n ::part(overlay) {\n box-shadow: none;\n background: none;\n }\n\n [part="close"] {\n cursor: pointer;\n display: flex;\n }\n\n [part="content"] {\n display: flex;\n align-items: center;\n flex-grow: 1;\n }\n\n [part="root"] {\n display: flex;\n align-items: center;\n justify-content: space-between;\n width: 100%;\n }\n ',excludeAttrsSync:["tabindex"],componentName:a}));customElements.define(a,s)},1845:(e,t,n)=>{n.r(t),n.d(t,{NotificationClass:()=>s}),n(3951);var o=n(4567);const i=window.customElements.get("vaadin-notification-container");if(!i)throw new Error("could not get vaadin-notification-container class");customElements.define((0,o.iY)("notification-container"),class extends i{}),n(5400);var r=n(2061),a=n(4978);const c=(0,o.iY)("notification"),s=(0,r.qC)(a.e4,a.Ae,a._A,(e=>class t extends e{#e;constructor(){super();const e=this;Object.defineProperty(this.baseElement,"_container",{get:()=>(t._container||(t._container=document.createElement("descope-notification-container"),t._container.style.position="absolute",document.body.appendChild(t._container)),t._container.isConnected||setTimeout((()=>e.parentNode.appendChild(t._container))),t._container)}),Object.defineProperty(this.baseElement,"_card",{get:()=>e.#e}),this.baseElement._removeNotificationCard=this.close.bind(this)}close(){this.#e.close()}init(){super.init?.(),this.createCard(),(0,o.oP)(this,this.#e),(0,o.tg)(this.#e,this,{includeAttrs:["opened"]}),this.baseElement.renderer=e=>{Array.from(this.childNodes).forEach((t=>e.appendChild(t)))}}get isContainerEmpty(){return!t._container.children.length}removeContainer(){t._container.remove()}removeNotification(){this.remove(),this.isContainerEmpty&&this.removeContainer()}createCard(){this.#e=document.createElement("descope-notification-card"),this.#e.addEventListener("card-closed",this.removeNotification.bind(this))}}))((0,a.DM)({wrappedEleName:"vaadin-notification",excludeAttrsSync:["tabindex"],componentName:c}));customElements.define(c,s)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[869],{6016:(e,a,s)=>{s.r(a),s.d(a,{NotpImageClass:()=>n});var c=s(4567),l=s(3585);const m=(0,c.iY)("notp-image"),n=(0,l.D)({componentName:m,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(m,n)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[869],{3585:(t,e,n)=>{n.d(e,{D:()=>c});var s=n(2061),a=n(4978),o=n(3346);const c=({componentName:t,varName:e,fallbackVarName:n})=>{let c;class i extends((0,o.s)({componentName:t,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML=`\n\t\t\t<style>\n\t\t\t\t:host {\n\t\t\t\t\tdisplay: inline-flex;\n\t\t\t\t}\n\t\t\t\t:host([draggable="true"]) > div {\n\t\t\t\t\tpointer-events: none\n\t\t\t\t}\t\t\n\t\t\t\t:host > div {\n\t\t\t\t\tdisplay: inline-block;\n\t\t\t\t\tmax-width: 100%;\n\t\t\t\t\tmax-height: 100%;\n\t\t\t\t\tobject-fit: contain;\n\t\t\t\t\tmargin: auto;\n\t\t\t\t\t${c}\n\t\t\t\t}\n\t\t\t</style>\n\t\t\t<div></div>\n\t\t\t`}}const r=(0,s.qC)((0,a.yk)({mappings:{height:{selector:()=>":host > div"},width:{selector:()=>":host > div"},[e]:{property:"content"},[n]:{property:"content"}}}),a.e4,a.Ae)(i);return c=`content: var(${r.cssVarList[e]}, var(${r.cssVarList[n]}));`,r}},6016:(t,e,n)=>{n.r(e),n.d(e,{NotpImageClass:()=>c});var s=n(4567),a=n(3585);const o=(0,s.iY)("notp-image"),c=(0,a.D)({componentName:o,varName:"url",fallbackVarName:"fallbackUrl"});customElements.define(o,c)}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[2142],{6916:(t,e,s)=>{s.r(e),s.d(e,{NumberFieldClass:()=>c}),s(5806);var n=s(1e3),i=s(4447),a=s(2061),l=s(4567),r=s(4201);const d=(0,l.iY)("number-field"),c=(0,a.qC)((0,n.yk)({mappings:i.Z}),n.e4,(0,n.dj)({proxyProps:["value","selectionStart"]}),n.Ae)((0,n.DM)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${(0,r.Wf)("vaadin-number-field")}\n\t\t\t${(0,r.bi)(c.cssVarList)}\n\t\t\t${(0,r.wm)("vaadin-number-field",c.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:d}));customElements.define(d,c)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2142],{6916:(t,e,n)=>{n.r(e),n.d(e,{NumberFieldClass:()=>d}),n(5806);var r=n(4978),i=n(4447),o=n(2061),l=n(4567),p=n(4201);const a=(0,l.iY)("number-field"),d=(0,o.qC)((0,r.yk)({mappings:i.Z}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae)((0,r.DM)({slots:["","prefix","suffix"],wrappedEleName:"vaadin-number-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n\t\t\t}\n ${(0,p.Wf)("vaadin-number-field")}\n\t\t\t${(0,p.bi)(d.cssVarList)}\n\t\t\t${(0,p.wm)("vaadin-number-field",d.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}));customElements.define(a,d)},4447:(t,e,n)=>{n.d(e,{Z:()=>h});const{host:r,label:i,placeholder:o,requiredIndicator:l,inputField:p,input:a,helperText:d,errorMessage:s,disabledPlaceholder:u,inputDisabled:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},h={fontSize:[{},r],fontFamily:[i,p,d,s],hostWidth:{...r,property:"width"},hostMinWidth:{...r,property:"min-width"},hostDirection:{...r,property:"direction"},inputBackgroundColor:{...p,property:"background-color"},labelTextColor:[{...i,property:"color"},{...l,property:"color"},{...i,property:"-webkit-text-fill-color"},{...l,property:"-webkit-text-fill-color"}],errorMessageTextColor:{...s,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...p,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:{...a,property:"color"},labelRequiredIndicator:{...l,property:"content"},inputBorderColor:{...p,property:"border-color"},inputBorderWidth:{...p,property:"border-width"},inputBorderStyle:{...p,property:"border-style"},inputBorderRadius:{...p,property:"border-radius"},inputHeight:{...p,property:"height"},inputHorizontalPadding:[{...a,property:"padding-left"},{...a,property:"padding-right"}],inputOutlineColor:{...p,property:"outline-color"},inputOutlineStyle:{...p,property:"outline-style"},inputOutlineWidth:{...p,property:"outline-width"},inputOutlineOffset:{...p,property:"outline-offset"},inputTextAlign:{...a,property:"text-align"},inputPlaceholderColor:[{...o,property:"color"},{...u,property:"-webkit-text-fill-color"}]}},4201:(t,e,n)=>{n.d(e,{B:()=>s,DY:()=>a,PH:()=>d,Pd:()=>l,TX:()=>i,Wf:()=>c,bi:()=>r,jI:()=>p,jl:()=>o,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,l=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,p=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,a=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,s=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${l(t)}\n ${p(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${s(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[1841],{7361:(t,e,n)=>{n.d(e,{f:()=>u,Z:()=>o});var i=n(3878),s=n(4567);const r=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},a=t=>{const e=t.replace(/\s/g,"");return e.match(/^\d+$/)?[...e]:[]},u=(0,s.iY)("passcode-internal"),l=["digits","loading"],d=["disabled","bordered","size","invalid","readonly"],p=(0,i.P)({componentName:u,baseSelector:"div"}),o=class extends p{static get observedAttributes(){return l.concat(p.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){if(t===this.value)return;const e=a(t);e.length&&this.fillDigits(e,this.inputs[0])}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}r(e)}parseInputValue(t){const e=a(t.value);e.length?this.fillDigits(e,t):t.value=""}initInputs(){let t;this.inputs.forEach((e=>{e.addEventListener("change",(n=>{t!==n.target&&(this.parseInputValue(e),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))})),e.addEventListener("input",(n=>{t=n.target,setTimeout((()=>{t=null,"deleteContentBackward"===n.inputType&&r(this.getPrevInput(e))})),this.parseInputValue(e)})),e.onkeydown=({key:t})=>{"Backspace"===t?e.value?e.setSelectionRange(1,1):setTimeout((()=>r(this.getPrevInput(e))),0):1===t.length&&(e.value="")},(0,s.oP)(this,e,{includeAttrs:d})})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&l.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},4775:(t,e,n)=>{n.r(e);var i=n(7361);customElements.define(i.f,i.Z)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[1841],{3878:(t,e,n)=>{n.d(e,{P:()=>a});var i=n(2061),s=n(4978),r=n(3346);const a=(...t)=>(0,i.qC)(s.wX,s.li,s.QT,s.mE)((0,r.s)(...t))},5512:(t,e,n)=>{n.d(e,{Z:()=>o,f:()=>a});var i=n(3878),s=n(4567),r=n(8229);const a=(0,s.iY)("passcode-internal"),u=["digits","loading"],l=["disabled","bordered","size","invalid","readonly"],d=(0,i.P)({componentName:a,baseSelector:"div"}),o=class extends d{static get observedAttributes(){return u.concat(d.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){if(t===this.value)return;const e=(0,r.i)(t);e.length&&this.fillDigits(e,this.inputs[0])}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,r.C)(e)}parseInputValue(t){const e=(0,r.i)(t.value);e.length?this.fillDigits(e,t):t.value=""}initInputs(){let t;this.inputs.forEach((e=>{e.addEventListener("change",(n=>{t!==n.target&&(this.parseInputValue(e),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))})),e.addEventListener("input",(n=>{t=n.target,setTimeout((()=>{t=null,"deleteContentBackward"===n.inputType&&(0,r.C)(this.getPrevInput(e))})),this.parseInputValue(e)})),e.onkeydown=({key:t})=>{"Backspace"===t?e.value?e.setSelectionRange(1,1):setTimeout((()=>(0,r.C)(this.getPrevInput(e))),0):1===t.length&&(e.value="")},(0,s.oP)(this,e,{includeAttrs:l})})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&u.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},8229:(t,e,n)=>{n.d(e,{C:()=>i,i:()=>s});const i=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},s=t=>{const e=t.replace(/\s/g,"");return e.match(/^\d+$/)?[...e]:[]}},4775:(t,e,n)=>{n.r(e);var i=n(5512);customElements.define(i.f,i.Z)}}]);
@@ -1 +1,37 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[939],{4919:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>w});var i=n(1e3),r=n(7361),o=n(6417),a=n(8660),d=n(2061),s=n(4567),p=n(4201);const l=(0,s.iY)("passcode"),c=["digits"],{host:u,digitField:g,label:h,requiredIndicator:m,internalWrapper:f,focusedDigitField:y,errorMessage:b}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.z.componentName}[focused="true"]`},digitField:{selector:()=>o.z.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},x=o.z.cssVarList,C=a.O.cssVarList,w=(0,d.qC)((0,i.yk)({mappings:{fontSize:[{...g,property:x.fontSize},u],hostWidth:{property:"width"},hostDirection:{...u,property:"direction"},fontFamily:[u,{...h}],labelTextColor:[{...h,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...b,property:"color"},digitValueTextColor:{selector:o.z.componentName,property:x.inputValueTextColor},digitSize:[{...g,property:"height"},{...g,property:"width"}],digitPadding:{...g,property:x.inputHorizontalPadding},digitTextAlign:{...g,property:x.inputTextAlign},digitCaretTextColor:{...g,property:x.inputCaretTextColor},digitSpacing:{...f,property:"gap"},digitOutlineColor:{...g,property:x.inputOutlineColor},digitOutlineWidth:{...g,property:x.inputOutlineWidth},focusedDigitFieldOutlineColor:{...y,property:x.inputOutlineColor},overlayOpacity:{...f,property:"opacity"},spinnerSize:{selector:a.O.componentName,property:C.spinnerSize}}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,(t=>class extends t{static get observedAttributes(){return c.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.f}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n ><slot></slot></${r.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,s.oP)(this,this.inputElement,{includeAttrs:["digits","size","loading"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,p.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${x.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,p.Wf)("vaadin-text-field")}\n\t\t\t${(0,p.Pd)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:l}));n(9357),n(5747),n(4775),customElements.define(l,w)}}]);
1
+ /*! For license information please see descope-passcode-index-js.js.LICENSE.txt */
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[939,3072,1841,2934],{3878:(t,e,n)=>{n.d(e,{P:()=>a});var i=n(2061),r=n(4978),o=n(3346);const a=(...t)=>(0,i.qC)(r.wX,r.li,r.QT,r.mE)((0,o.s)(...t))},8660:(t,e,n)=>{n.d(e,{O:()=>l,f:()=>a});var i=n(4978),r=n(3346),o=n(2061);const a=(0,n(4567).iY)("loader-radial");class s extends((0,r.s)({componentName:a,baseSelector:":host > div"})){constructor(){super(),this.attachShadow({mode:"open"}).innerHTML="\n\t\t<style>\n\t\t\t@keyframes spin {\n\t\t\t\t0% { transform: rotate(0deg); }\n\t\t\t\t100% { transform: rotate(360deg); }\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tposition: relative;\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\t:host > div {\n\t\t\t\tanimation-name: spin;\n\t\t\t}\n\t\t</style>\n\t\t<div></div>\n\t"}}const l=(0,o.qC)((0,i.yk)({mappings:{hostDisplay:{property:"display"},spinnerSize:[{property:"width"},{property:"height"}],spinnerBorderWidth:{property:"border-width"},spinnerBorderStyle:{property:"border-style"},spinnerBorderRadius:{property:"border-radius"},spinnerQuadrant1Color:{property:"border-top-color"},spinnerQuadrant2Color:{property:"border-bottom-color"},spinnerQuadrant3Color:{property:"border-right-color"},spinnerQuadrant4Color:{property:"border-left-color"},animationDuration:{},animationTimingFunction:{},animationIterationCount:{}}}),i.e4,i.Ae)(s)},5747:(t,e,n)=>{n.r(e),n.d(e,{LoaderRadialClass:()=>i.O});var i=n(8660);customElements.define(i.f,i.O)},5512:(t,e,n)=>{n.d(e,{Z:()=>p,f:()=>a});var i=n(3878),r=n(4567),o=n(8229);const a=(0,r.iY)("passcode-internal"),s=["digits","loading"],l=["disabled","bordered","size","invalid","readonly"],d=(0,i.P)({componentName:a,baseSelector:"div"}),p=class extends d{static get observedAttributes(){return s.concat(d.observedAttributes||[])}constructor(){super(),this.innerHTML='\n\t\t<div class="wrapper"></div>\n\t\t<div class="loader-container">\n <descope-loader-radial size="xs" mode="primary"></descope-loader-radial>\n </div>\n\t\t<style>\n\t\t\t.wrapper {\n\t\t\t\tdisplay: flex;\n\t\t\t\twidth: 100%;\n\t\t\t\tjustify-content: space-between;\n direction: ltr;\n position: relative;\n\t\t\t}\n\n descope-text-field {\n direction: ltr;\n }\n\n .loader-container {\n display: none;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n }\n\t\t</style>\n\t\t',this.wrapperEle=this.querySelector(".wrapper"),this.loaderContainer=this.querySelector(".loader-container")}renderInputs(){const t=[...Array(this.digits).keys()].map((t=>`\n\t\t<descope-text-field\n\t\t\tdata-id=${t}\n\t\t\ttype="tel"\n\t\t\tautocomplete="one-time-code"\n\t\t\tinputMode="numeric"\n\t\t></descope-text-field>\n\t`));this.wrapperEle.innerHTML=t.join(""),this.inputs=Array.from(this.querySelectorAll("descope-text-field")),this.initInputs()}handleLoadingState(t){t?this.setAttribute("inert","true"):this.removeAttribute("inert")}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}get value(){return this.inputs?.map((({value:t})=>t)).join("")||""}set value(t){if(t===this.value)return;const e=(0,o.i)(t);e.length&&this.fillDigits(e,this.inputs[0])}getValidity(){return this.isRequired&&!this.value?{valueMissing:!0}:this.pattern&&!new RegExp(this.pattern).test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[0].focus()})),super.init?.(),this.renderInputs()}getInputIdx(t){return Number.parseInt(t.getAttribute("data-id"),10)}getNextInput(t){const e=this.getInputIdx(t),n=Math.min(e+1,this.inputs.length-1);return this.inputs[n]}getPrevInput(t){const e=this.getInputIdx(t),n=Math.max(e-1,0);return this.inputs[n]}fillDigits(t,e){for(let n=0;n<t.length;n+=1){e.value=t[n]??"";const i=this.getNextInput(e);if(i===e)break;e=i}(0,o.C)(e)}parseInputValue(t){const e=(0,o.i)(t.value);e.length?this.fillDigits(e,t):t.value=""}initInputs(){let t;this.inputs.forEach((e=>{e.addEventListener("change",(n=>{t!==n.target&&(this.parseInputValue(e),this.dispatchEvent(new Event("input",{bubbles:!0,composed:!0})))})),e.addEventListener("input",(n=>{t=n.target,setTimeout((()=>{t=null,"deleteContentBackward"===n.inputType&&(0,o.C)(this.getPrevInput(e))})),this.parseInputValue(e)})),e.onkeydown=({key:t})=>{"Backspace"===t?e.value?e.setSelectionRange(1,1):setTimeout((()=>(0,o.C)(this.getPrevInput(e))),0):1===t.length&&(e.value="")},(0,r.oP)(this,e,{includeAttrs:l})})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),e!==n&&s.includes(t)&&("digits"===t&&this.renderInputs(),"loading"===t&&this.handleLoadingState("true"===n))}get pattern(){return`^$|^\\d{${this.digits},}$`}}},8229:(t,e,n)=>{n.d(e,{C:()=>i,i:()=>r});const i=t=>{t?.focus(),t?.setSelectionRange?.(1,1)},r=t=>{const e=t.replace(/\s/g,"");return e.match(/^\d+$/)?[...e]:[]}},4775:(t,e,n)=>{n.r(e);var i=n(5512);customElements.define(i.f,i.Z)},4919:(t,e,n)=>{n.r(e),n.d(e,{PasscodeClass:()=>w});var i=n(4978),r=n(5512),o=n(6417),a=n(8660),s=n(2061),l=n(4567),d=n(4201);const p=(0,l.iY)("passcode"),u=["digits"],{host:c,digitField:h,label:g,requiredIndicator:b,internalWrapper:f,focusedDigitField:y,errorMessage:m}={host:{selector:()=>":host"},focusedDigitField:{selector:()=>`${o.z.componentName}[focused="true"]`},digitField:{selector:()=>o.z.componentName},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},internalWrapper:{selector:"descope-passcode-internal .wrapper"},errorMessage:{selector:"::part(error-message)"}},v=o.z.cssVarList,x=a.O.cssVarList,w=(0,s.qC)((0,i.yk)({mappings:{fontSize:[{...h,property:v.fontSize},c],hostWidth:{property:"width"},hostDirection:{...c,property:"direction"},fontFamily:[c,{...g}],labelTextColor:[{...g,property:"color"},{...b,property:"color"}],labelRequiredIndicator:{...b,property:"content"},errorMessageTextColor:{...m,property:"color"},digitValueTextColor:{selector:o.z.componentName,property:v.inputValueTextColor},digitSize:[{...h,property:"height"},{...h,property:"width"}],digitPadding:{...h,property:v.inputHorizontalPadding},digitTextAlign:{...h,property:v.inputTextAlign},digitCaretTextColor:{...h,property:v.inputCaretTextColor},digitSpacing:{...f,property:"gap"},digitOutlineColor:{...h,property:v.inputOutlineColor},digitOutlineWidth:{...h,property:v.inputOutlineWidth},focusedDigitFieldOutlineColor:{...y,property:v.inputOutlineColor},overlayOpacity:{...f,property:"opacity"},spinnerSize:{selector:a.O.componentName,property:x.spinnerSize}}}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,(t=>class extends t{static get observedAttributes(){return u.concat(t.observedAttributes||[])}get digits(){return Number.parseInt(this.getAttribute("digits"),10)||6}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n <${r.f}\n bordered="true"\n name="code"\n tabindex="-1"\n slot="input"\n ><slot></slot></${r.f}>\n `,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(r.f),(0,l.oP)(this,this.inputElement,{includeAttrs:["digits","size","loading"]})}attributeChangedCallback(t,e,n){super.attributeChangedCallback?.(t,e,n),"digits"===t&&this.style.setProperty("--passcode-digits-count",n)}}))((0,i.DM)({slots:[],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: calc(var(--passcode-digits-count) * 2em);\n\t\t\t}\n\t\t\t${(0,d.DY)()}\n\t\t\t:host::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\t\t\t:host::part(input-field)::after {\n\t\t\t\tbackground-color: transparent;\n\t\t\t}\n\n :host([loading="true"]) descope-passcode-internal .loader-container {\n display: block;\n }\n\n\t\t\tdescope-passcode-internal {\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tmin-height: initial;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal .wrapper {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tmin-height: initial;\n\t\t\t\theight: 100%;\n\t\t\t\tjustify-content: space-between;\n\t\t\t}\n\n\t\t\tdescope-passcode-internal descope-text-field {\n\t\t\t\tmin-width: 2em;\n\t\t\t\tmax-width: var(${v.inputHeight});\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbackground-color: transparent;\n\t\t\t\tpadding: 0;\n\t\t\t\toverflow: hidden;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\n\t\t\tvaadin-text-field {\n\t\t\t\tmargin: 0;\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 100%\n\t\t\t}\n\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\n\t\t\tvaadin-text-field[readonly]::part(input-field)::after {\n\t\t\t\tborder: 0 solid;\n\t\t\t}\n\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\n ${(0,d.Wf)("vaadin-text-field")}\n\t\t\t${(0,d.Pd)("vaadin-text-field")}\n \t`,excludeAttrsSync:["tabindex"],componentName:p}));n(9357),n(5747),n(4775),customElements.define(p,w)},6417:(t,e,n)=>{n.d(e,{f:()=>l,z:()=>p});var i=n(4978),r=n(4447),o=n(2061),a=n(4567),s=n(4201);const l=(0,a.iY)("text-field"),d=["type"],p=(0,o.qC)((0,i.yk)({mappings:r.Z}),i.e4,(0,i.dj)({proxyProps:["value","selectionStart"]}),i.Ae,(t=>class extends t{static get observedAttributes(){return d.concat(t.observedAttributes||[])}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n)}}))((0,i.DM)({slots:["prefix","suffix"],wrappedEleName:"vaadin-text-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tpadding: calc(var(${p.cssVarList.inputOutlineWidth}) + var(${p.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n ${(0,s.Wf)("vaadin-text-field")}\n\t\t\t${(0,s.bi)(p.cssVarList)}\n\t\t\t${(0,s.wm)("vaadin-text-field",p.cssVarList)}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9357:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.z}),n(9789);var i=n(6417);customElements.define(i.f,i.z)},4447:(t,e,n)=>{n.d(e,{Z:()=>h});const{host:i,label:r,placeholder:o,requiredIndicator:a,inputField:s,input:l,helperText:d,errorMessage:p,disabledPlaceholder:u,inputDisabled:c}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},placeholder:{selector:"> input:placeholder-shown"},disabledPlaceholder:{selector:"> input:disabled::placeholder"},inputField:{selector:"::part(input-field)"},input:{selector:"input"},inputDisabled:{selector:"input:disabled"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},h={fontSize:[{},i],fontFamily:[r,s,d,p],hostWidth:{...i,property:"width"},hostMinWidth:{...i,property:"min-width"},hostDirection:{...i,property:"direction"},inputBackgroundColor:{...s,property:"background-color"},labelTextColor:[{...r,property:"color"},{...a,property:"color"},{...r,property:"-webkit-text-fill-color"},{...a,property:"-webkit-text-fill-color"}],errorMessageTextColor:{...p,property:"color"},helperTextColor:{...d,property:"-webkit-text-fill-color"},inputValueTextColor:[{...s,property:"color"},{...c,property:"-webkit-text-fill-color"}],inputCaretTextColor:{...l,property:"color"},labelRequiredIndicator:{...a,property:"content"},inputBorderColor:{...s,property:"border-color"},inputBorderWidth:{...s,property:"border-width"},inputBorderStyle:{...s,property:"border-style"},inputBorderRadius:{...s,property:"border-radius"},inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...l,property:"padding-left"},{...l,property:"padding-right"}],inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineWidth:{...s,property:"outline-width"},inputOutlineOffset:{...s,property:"outline-offset"},inputTextAlign:{...l,property:"text-align"},inputPlaceholderColor:[{...o,property:"color"},{...u,property:"-webkit-text-fill-color"}]}},4201:(t,e,n)=>{n.d(e,{B:()=>p,DY:()=>l,PH:()=>d,Pd:()=>a,TX:()=>r,Wf:()=>c,bi:()=>i,jI:()=>s,jl:()=>o,wm:()=>u});const i=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,r=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,s=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",d=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,p=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${r(t)}\n ${a(t)}\n ${s(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${p(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`},3208:(t,e,n)=>{n.d(e,{b:()=>r});var i=n(9229);class r extends i.n{constructor(t,e){super(t,"input","input",{initializer:(t,n)=>{n.value&&(t.value=n.value),n.type&&t.setAttribute("type",n.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},422:(t,e,n)=>{n.d(e,{j:()=>r});var i=n(3406);const r=t=>class extends((0,i.L)(t)){static get properties(){return{autocomplete:{type:String},autocorrect:{type:String},autocapitalize:{type:String,reflectToAttribute:!0}}}static get delegateAttrs(){return[...super.delegateAttrs,"autocapitalize","autocomplete","autocorrect"]}get __data(){return this.__dataValue||{}}set __data(t){this.__dataValue=t}_inputElementChanged(t){super._inputElementChanged(t),t&&(t.value&&t.value!==this.value&&(console.warn(`Please define value on the <${this.localName}> component!`),t.value=""),this.value&&(t.value=this.value))}_setFocused(t){super._setFocused(t),!t&&document.hasFocus()&&this.validate()}_onInput(t){super._onInput(t),this.invalid&&this.validate()}_valueChanged(t,e){super._valueChanged(t,e),void 0!==e&&this.invalid&&this.validate()}}},8005:(t,e,n)=>{n.d(e,{n:()=>h}),n(3553);var i=n(4241),r=n(2807),o=n(2521),a=n(4463),s=n(2743),l=n(6570),d=n(3208),p=n(422),u=n(6729);const c=t=>class extends((0,p.j)(t)){static get properties(){return{maxlength:{type:Number},minlength:{type:Number},pattern:{type:String}}}static get delegateAttrs(){return[...super.delegateAttrs,"maxlength","minlength","pattern"]}static get constraints(){return[...super.constraints,"maxlength","minlength","pattern"]}constructor(){super(),this._setType("text")}get clearElement(){return this.$.clearButton}ready(){super.ready(),this.addController(new d.b(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new u.v(this.inputElement,this._labelController))}};(0,l.hC)("vaadin-text-field",s.J,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,l.Tb)((0,o.S)(i.H3)))){static get is(){return"vaadin-text-field"}static get template(){return i.dy`
3
+ <style>
4
+ [part='input-field'] {
5
+ flex-grow: 0;
6
+ }
7
+ </style>
8
+
9
+ <div class="vaadin-field-container">
10
+ <div part="label">
11
+ <slot name="label"></slot>
12
+ <span part="required-indicator" aria-hidden="true" on-click="focus"></span>
13
+ </div>
14
+
15
+ <vaadin-input-container
16
+ part="input-field"
17
+ readonly="[[readonly]]"
18
+ disabled="[[disabled]]"
19
+ invalid="[[invalid]]"
20
+ theme$="[[_theme]]"
21
+ >
22
+ <slot name="prefix" slot="prefix"></slot>
23
+ <slot name="input"></slot>
24
+ <slot name="suffix" slot="suffix"></slot>
25
+ <div id="clearButton" part="clear-button" slot="suffix" aria-hidden="true"></div>
26
+ </vaadin-input-container>
27
+
28
+ <div part="helper-text">
29
+ <slot name="helper"></slot>
30
+ </div>
31
+
32
+ <div part="error-message">
33
+ <slot name="error-message"></slot>
34
+ </div>
35
+ </div>
36
+ <slot name="tooltip"></slot>
37
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new a.f(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,r.M)(h)},8725:(t,e,n)=>{n(1578);var i=n(7205);(0,n(6570).hC)("vaadin-text-field",i.J,{moduleId:"lumo-text-field-styles"}),n(8005)},9789:(t,e,n)=>{n(8725),n(8005)}}]);
@@ -0,0 +1,11 @@
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
+ */
6
+
7
+ /**
8
+ * @license
9
+ * Copyright (c) 2021 - 2023 Vaadin Ltd.
10
+ * This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
11
+ */
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[8106],{9279:(e,s,c)=>{c.r(s),c.d(s,{PasswordClass:()=>a.v}),c(7056);var a=c(2481);customElements.define(a.f,a.v)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8106],{9876:(t,e,n)=>{n.d(e,{f:()=>l,v:()=>v});var r=n(4978),i=n(2061),o=n(4567),a=n(2702),d=n(4201);const l=(0,o.iY)("password"),{host:p,inputField:s,inputElement:u,inputElementPlaceholder:c,revealButtonContainer:h,revealButtonIcon:b,label:f,requiredIndicator:g,errorMessage:w,helperText:y}={host:{selector:()=>":host"},inputField:{selector:"::part(input-field)"},inputElement:{selector:"> input"},inputElementPlaceholder:{selector:"> input:placeholder-shown"},revealButtonContainer:{selector:()=>"::part(reveal-button)"},revealButtonIcon:{selector:()=>"::part(reveal-button)::before"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},v=(0,i.qC)((0,r.yk)({mappings:{hostWidth:{...p,property:"width"},hostMinWidth:{...p,property:"min-width"},hostDirection:{...p,property:"direction"},fontSize:[{},p],fontFamily:[f,s,w,y],inputHeight:{...s,property:"height"},inputHorizontalPadding:[{...u,property:"padding-left"},{...u,property:"padding-right"}],inputBackgroundColor:{...s,property:"background-color"},inputBorderStyle:{...s,property:"border-style"},inputBorderWidth:{...s,property:"border-width"},inputBorderColor:{...s,property:"border-color"},inputBorderRadius:{...s,property:"border-radius"},inputOutlineColor:{...s,property:"outline-color"},inputOutlineStyle:{...s,property:"outline-style"},inputOutlineOffset:{...s,property:"outline-offset"},inputOutlineWidth:{...s,property:"outline-width"},labelTextColor:[{...f,property:"color"},{...g,property:"color"}],labelRequiredIndicator:{...g,property:"content"},errorMessageTextColor:{...w,property:"color"},inputValueTextColor:{...u,property:"color"},inputPlaceholderTextColor:{...c,property:"color"},revealButtonOffset:[{...h,property:"margin-right"},{...h,property:"margin-left"}],revealButtonSize:{...h,property:"font-size"},revealButtonColor:{...b,property:"color"}}}),r.e4,(0,r.dj)({proxyProps:["value","selectionStart"]}),r.Ae,a.Z)((0,r.DM)({slots:["","suffix"],wrappedEleName:"vaadin-password-field",style:()=>`\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t\tmax-width: 100%;\n\t\t\t\tmin-width: 10em;\n box-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,d.bi)(v.cssVarList)}\n\t\t\t${(0,d.Pd)("vaadin-password-field")}\n ${(0,d.Wf)("vaadin-password-field")}\n\n\t\t\tvaadin-password-field {\n\t\t\t\twidth: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field) {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-password-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-password-field > input {\n\t\t\t\tmin-height: 0;\n\t\t\t\t-webkit-mask-image: none;\n\t\t\t}\n\t\t\tvaadin-password-field[readonly] > input:placeholder-shown {\n\t\t\t\topacity: 1;\n\t\t\t}\n\t\t\tvaadin-password-field::before {\n\t\t\t\theight: initial;\n\t\t\t}\n\t\t\tvaadin-password-field::part(input-field)::after {\n\t\t\t\topacity: 0;\n\t\t\t}\n\t\t\tvaadin-password-field-button {\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\n\t\t\t[readonly] vaadin-password-field-button {\n\t\t\t\tpointer-events: none;\n\t\t\t}\n\n\t\t\tvaadin-password-field-button[focus-ring] {\n\t\t\t\tbox-shadow: 0 0 0 2px var(${v.cssVarList.inputOutlineColor});\n\t\t\t}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},9279:(t,e,n)=>{n.r(e),n.d(e,{PasswordClass:()=>r.v}),n(7056);var r=n(9876);customElements.define(r.f,r.v)},2702:(t,e,n)=>{n.d(e,{Z:()=>r});const r=t=>class extends t{get isReadOnly(){return this.hasAttribute("readonly")&&"false"!==this.getAttribute("readonly")}init(){this.addEventListener("mousedown",(t=>{if(this.isDraggable&&this.isReadOnly){const e=this.baseElement.querySelector("input"),n=e.getAttribute("type");e.setAttribute("type","text"),setTimeout((()=>e.focus()));const r=i=>{e.setAttribute("type",n),t.target.removeEventListener("mouseup",r),t.target.removeEventListener("dragend",r)};t.target.addEventListener("mouseup",r,{once:!0}),t.target.addEventListener("dragend",r,{once:!0})}})),super.init?.()}}},4201:(t,e,n)=>{n.d(e,{B:()=>s,DY:()=>l,PH:()=>p,Pd:()=>a,TX:()=>i,Wf:()=>c,bi:()=>r,jI:()=>d,jl:()=>o,wm:()=>u});const r=t=>`\n :host {\n padding: calc(var(${t.inputOutlineWidth}) + var(${t.inputOutlineOffset}))\n }\n`,i=t=>`\n ${t} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`,o=t=>`\n ${t}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`,a=t=>`\n ${t} > label,\n ${t}::part(label),\n ${t}::part(required-indicator) {\n cursor: pointer;\n }\n`,d=(t,e="input")=>`\n ${t}[disabled] > ${e}:placeholder-shown,\n\t${t}[readonly] > ${e}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`,l=()=>"\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n",p=t=>`\n ${t}::part(input-field)::after {\n opacity: 0;\n }\n`,s=t=>`\n ${t}::part(input-field)::after {\n background: none;\n }\n`,u=(t,e)=>`\n ${i(t)}\n ${a(t)}\n ${d(t)}\n ${o(t)}\n ${((t,e)=>`\n ${t} input:-webkit-autofill,\n ${t} input:-webkit-autofill::first-line,\n ${t} input:-webkit-autofill:hover,\n ${t} input:-webkit-autofill:active,\n ${t} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${e.inputValueTextColor});\n box-shadow: 0 0 0 var(${e.inputHeight}) var(${e.inputBackgroundColor}) inset;\n }\n`)(t,e)}\n ${s(t)}\n ${(t=>`\n ${t}::before {\n\t\theight: unset;\n\t}\n`)(t)}\n ${(t=>`\n ${t} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`)(t)}\n ${(t=>`\n ${t}::part(input-field)::after {\n border: none;\n }\n`)(t)}\n`,c=t=>`\n :host ::part(error-message) {\n direction: ltr;\n }\n :host([required]) ::part(required-indicator) {\n width: 1em;\n display: inline-flex;\n }\n :host([required]) ::part(required-indicator)::after {\n position: static;\n }\n :host([has-label]) ::part(label) {\n padding-right: 0;\n padding-bottom: 0;\n display: flex;\n width: 100%;\n }\n ${t} [slot="label"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`}}]);
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkDescopeUI=self.webpackChunkDescopeUI||[]).push([[4570],{8558:(e,s,c)=>{c.r(s),c.d(s,{PolicyValidationClass:()=>a.S});var a=c(4577);customElements.define(a.f,a.S)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[4570],{2886:(e,i,t)=>{t.d(i,{S:()=>y,f:()=>n});var l=t(4978),a=t(3346),s=t(2061),o=t(4567),r=t(7487);const n=(0,o.iY)("policy-validation"),d=["data","active-policies","overrides","data-password-policy-value-minlength"],c=["label","value",...d];class p extends((0,a.s)({componentName:n,baseSelector:":host > div"})){#e;#i=[];#t;static get observedAttributes(){return c}constructor(){super(),this.attachShadow({mode:"open"}).innerHTML='\n <div>\n <div class="label"></div>\n <ul></ul>\n </div>\n <style>\n :host > div {\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n }\n .label {\n max-width: 100%;\n text-wrap: wrap;\n overflow-wrap: break-word;\n }\n .hide-label .label {\n display: none;\n }\n ul {\n display: flex;\n flex-direction: column;\n padding: 0;\n margin: 0;\n }\n ul, li {\n margin: 0;\n padding: 0;\n list-style: none;\n }\n li::before {\n display: inline-block;\n width: 1em;\n text-align: center;\n }\n </style>\n\t\t',this.panel=this.shadowRoot.querySelector(":host > div"),this.label=this.shadowRoot.querySelector(".label"),this.list=this.shadowRoot.querySelector("ul")}attributeChangedCallback(e,i,t){if(super.attributeChangedCallback?.(e,i,t),i!==t){if("label"===e&&this.updateLabel(t),d.includes(e)){if("data"===e)try{this.availablePolicies=JSON.parse(t)}catch{console.error("Failed to set available policies")}if("active-policies"===e&&(this.#i=(t||"").split(",")),"data-password-policy-value-minlength"===e){const e=Number(t);!Number.isNaN(e)&&e>0&&(this.#t={...this.#t,minlength:{value:`${e}`}})}}this.renderItems(this.#e,this.#i,this.#t)}}get availablePolicies(){return this.#e||[]}set availablePolicies(e){this.#e=e}get value(){return this.getAttribute("value")||""}validate(){let e=this.#e;return this.#t&&(e=this.#e.map((e=>this.#t[e.id]?{...e,data:this.#t[e.id]}:e))),this.#i.reduce(((i,t)=>{const l=e.find((e=>e.id===t));if(!l)return i;const{pattern:a,message:s,data:o}=l;if(!a||!s)return i;const n={valid:new RegExp((0,r.I)(a,o)).test(this.value),message:(0,r.I)(s,o),id:t};return i.push(n),i}),[])}get isValid(){return!this.validate().some((({valid:e})=>!1===e))}getValidationItemTemplate({valid:e,message:i}){return`\n <li class="item" data-valid="${this.value?e:"none"}">\n <span class="message">${i}</span>\n </li>\n `}renderItems(e,i){e&&i.length&&(this.list.innerHTML=this.validate().map(this.getValidationItemTemplate.bind(this)).join(""))}updateLabel(e){e?(this.label.innerHTML=e,this.classList.remove("hide-label")):(this.classList.add("hide-label"),this.label.innerHTML="")}}const{host:b,item:h,symbolDefault:u,symbolSuccess:m,symbolError:v}={host:{selector:()=>":host > div"},item:{selector:()=>".item"},symbolDefault:{selector:()=>'.item[data-valid="none"]::before'},symbolSuccess:{selector:()=>'.item[data-valid="true"]::before'},symbolError:{selector:()=>'.item[data-valid="false"]::before'}},y=(0,s.qC)((0,l.yk)({componentNameOverride:(0,o.iY)("input-wrapper")}),(0,l.yk)({mappings:{hostDirection:{selector:()=>":host",property:"direction"},fontSize:{},fontFamily:{},padding:{},borderWidth:{...b,property:"border-width"},borderStyle:{...b,property:"border-style"},borderColor:{...b,property:"border-color"},borderRadius:{...b,property:"border-radius"},backgroundColor:{...b,property:"background-color"},textColor:{property:"color"},labelMargin:{...b,property:"gap"},itemsSpacing:{...h,property:"line-height"},itemSymbolSuccessColor:{...m,property:"color"},itemSymbolErrorColor:{...v,property:"color"},itemSymbolDefault:{...u,property:"content"},itemSymbolSuccess:{...m,property:"content"},itemSymbolError:{...v,property:"content"}}}),l.e4,l.Ae)(p)},7487:(e,i,t)=>{t.d(i,{I:()=>l});const l=(e,i)=>e.replace(/{{(\w+)+}}/g,((e,t)=>i?.[t]||e))},8558:(e,i,t)=>{t.r(i),t.d(i,{PolicyValidationClass:()=>l.S});var l=t(2886);customElements.define(l.f,l.S)}}]);