@descope/web-components-ui 1.32.0 → 1.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (321) hide show
  1. package/dist/cjs/index.cjs.js +481 -364
  2. package/dist/cjs/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js +524 -438
  4. package/dist/index.esm.js.map +1 -1
  5. package/dist/umd/1408.js +382 -0
  6. package/dist/umd/1408.js.LICENSE.txt +17 -0
  7. package/dist/umd/1408.js.map +1 -0
  8. package/dist/umd/{9243.js → 1519.js} +7 -6
  9. package/dist/umd/1519.js.map +1 -0
  10. package/dist/umd/189.js +109 -276
  11. package/dist/umd/189.js.LICENSE.txt +12 -0
  12. package/dist/umd/189.js.map +1 -0
  13. package/dist/umd/{7979.js → 1899.js} +11 -10
  14. package/dist/umd/1899.js.map +1 -0
  15. package/dist/umd/{1172.js → 1995.js} +10 -9
  16. package/dist/umd/1995.js.map +1 -0
  17. package/dist/umd/2540.js +2 -1
  18. package/dist/umd/2540.js.map +1 -0
  19. package/dist/umd/2672.js +2 -0
  20. package/dist/umd/2672.js.map +1 -0
  21. package/dist/umd/2739.js +2 -0
  22. package/dist/umd/2739.js.map +1 -0
  23. package/dist/umd/{2570.js → 2894.js} +6 -5
  24. package/dist/umd/2894.js.map +1 -0
  25. package/dist/umd/{404.js → 3620.js} +9 -8
  26. package/dist/umd/3620.js.map +1 -0
  27. package/dist/umd/{4455.js → 384.js} +8 -7
  28. package/dist/umd/384.js.map +1 -0
  29. package/dist/umd/4467.js +3 -0
  30. package/dist/umd/4467.js.map +1 -0
  31. package/dist/umd/{4127.js → 4518.js} +11 -10
  32. package/dist/umd/4518.js.map +1 -0
  33. package/dist/umd/{1902.js → 4550.js} +7 -6
  34. package/dist/umd/4550.js.map +1 -0
  35. package/dist/umd/{4554.js → 4623.js} +7 -6
  36. package/dist/umd/4623.js.map +1 -0
  37. package/dist/umd/{742.js → 4914.js} +3 -2
  38. package/dist/umd/4914.js.map +1 -0
  39. package/dist/umd/{9478.js → 513.js} +6 -5
  40. package/dist/umd/513.js.map +1 -0
  41. package/dist/umd/{201.js → 5260.js} +6 -5
  42. package/dist/umd/5260.js.map +1 -0
  43. package/dist/umd/5414.js +2 -1
  44. package/dist/umd/5414.js.map +1 -0
  45. package/dist/umd/5648.js +110 -0
  46. package/dist/umd/5648.js.map +1 -0
  47. package/dist/umd/5780.js +2 -0
  48. package/dist/umd/5780.js.map +1 -0
  49. package/dist/umd/{5563.js → 6227.js} +6 -5
  50. package/dist/umd/6227.js.map +1 -0
  51. package/dist/umd/6424.js +149 -0
  52. package/dist/umd/6424.js.map +1 -0
  53. package/dist/umd/{7097.js → 6649.js} +6 -5
  54. package/dist/umd/6649.js.map +1 -0
  55. package/dist/umd/676.js +3 -0
  56. package/dist/umd/676.js.map +1 -0
  57. package/dist/umd/{1738.js → 7092.js} +2 -1
  58. package/dist/umd/7092.js.map +1 -0
  59. package/dist/umd/{3638.js → 7182.js} +3 -2
  60. package/dist/umd/7182.js.map +1 -0
  61. package/dist/umd/{507.js → 7291.js} +6 -5
  62. package/dist/umd/7291.js.map +1 -0
  63. package/dist/umd/{4187.js → 7565.js} +3 -2
  64. package/dist/umd/7565.js.map +1 -0
  65. package/dist/umd/{3191.js → 7620.js} +11 -7
  66. package/dist/umd/7620.js.map +1 -0
  67. package/dist/umd/{6050.js → 7774.js} +10 -9
  68. package/dist/umd/7774.js.map +1 -0
  69. package/dist/umd/{2666.js → 7939.js} +5 -4
  70. package/dist/umd/7939.js.map +1 -0
  71. package/dist/umd/{4114.js → 8618.js} +5 -4
  72. package/dist/umd/8618.js.map +1 -0
  73. package/dist/umd/8961.js +2 -0
  74. package/dist/umd/8961.js.map +1 -0
  75. package/dist/umd/{4574.js → 8983.js} +6 -5
  76. package/dist/umd/8983.js.map +1 -0
  77. package/dist/umd/9030.js +265 -307
  78. package/dist/umd/9030.js.LICENSE.txt +0 -6
  79. package/dist/umd/9030.js.map +1 -0
  80. package/dist/umd/9365.js +2 -0
  81. package/dist/umd/9365.js.map +1 -0
  82. package/dist/umd/{4218.js → 9380.js} +5 -4
  83. package/dist/umd/9380.js.map +1 -0
  84. package/dist/umd/9871.js +276 -0
  85. package/dist/umd/9871.js.map +1 -0
  86. package/dist/umd/9970.js +833 -0
  87. package/dist/umd/9970.js.map +1 -0
  88. package/dist/umd/DescopeDev.js +2 -1
  89. package/dist/umd/DescopeDev.js.map +1 -0
  90. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +2 -1
  91. package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js.map +1 -0
  92. package/dist/umd/boolean-fields-descope-checkbox-index-js.js +2 -1
  93. package/dist/umd/boolean-fields-descope-checkbox-index-js.js.map +1 -0
  94. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +2 -1
  95. package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js.map +1 -0
  96. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js +2 -1
  97. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-index-js.js.map +1 -0
  98. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js +2 -1
  99. package/dist/umd/button-selection-group-fields-descope-button-multi-selection-group-internal-index-js.js.map +1 -0
  100. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js +2 -1
  101. package/dist/umd/button-selection-group-fields-descope-button-selection-group-index-js.js.map +1 -0
  102. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js +2 -1
  103. package/dist/umd/button-selection-group-fields-descope-button-selection-group-internal-index-js.js.map +1 -0
  104. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js +2 -1
  105. package/dist/umd/button-selection-group-fields-descope-button-selection-group-item-index-js.js.map +1 -0
  106. package/dist/umd/descope-address-field.js +2 -1
  107. package/dist/umd/descope-address-field.js.map +1 -0
  108. package/dist/umd/descope-alert-index-js.js +2 -1
  109. package/dist/umd/descope-alert-index-js.js.map +1 -0
  110. package/dist/umd/descope-apps-list-index-js.js +2 -1
  111. package/dist/umd/descope-apps-list-index-js.js.map +1 -0
  112. package/dist/umd/descope-autocomplete-field.js +2 -1
  113. package/dist/umd/descope-autocomplete-field.js.map +1 -0
  114. package/dist/umd/descope-avatar.js +2 -1
  115. package/dist/umd/descope-avatar.js.map +1 -0
  116. package/dist/umd/descope-badge-index-js.js +2 -1
  117. package/dist/umd/descope-badge-index-js.js.map +1 -0
  118. package/dist/umd/descope-button-index-js.js +5 -4
  119. package/dist/umd/descope-button-index-js.js.map +1 -0
  120. package/dist/umd/descope-code-snippet-index-js.js +2 -1
  121. package/dist/umd/descope-code-snippet-index-js.js.map +1 -0
  122. package/dist/umd/descope-combo-box.js +7 -6
  123. package/dist/umd/descope-combo-box.js.map +1 -0
  124. package/dist/umd/descope-container-index-js.js +2 -1
  125. package/dist/umd/descope-container-index-js.js.map +1 -0
  126. package/dist/umd/descope-date-field-descope-calendar-index-js.js +2 -1
  127. package/dist/umd/descope-date-field-descope-calendar-index-js.js.map +1 -0
  128. package/dist/umd/descope-date-field-index-js.js +2 -1
  129. package/dist/umd/descope-date-field-index-js.js.map +1 -0
  130. package/dist/umd/descope-divider-index-js.js +2 -1
  131. package/dist/umd/descope-divider-index-js.js.map +1 -0
  132. package/dist/umd/descope-email-field-index-js.js +5 -4
  133. package/dist/umd/descope-email-field-index-js.js.map +1 -0
  134. package/dist/umd/descope-enriched-text-index-js.js +2 -1
  135. package/dist/umd/descope-enriched-text-index-js.js.map +1 -0
  136. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js +5 -4
  137. package/dist/umd/descope-grid-descope-grid-custom-column-index-js.js.map +1 -0
  138. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js +6 -5
  139. package/dist/umd/descope-grid-descope-grid-item-details-column-index-js.js.map +1 -0
  140. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js +2 -1
  141. package/dist/umd/descope-grid-descope-grid-selection-column-index-js.js.map +1 -0
  142. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js +5 -4
  143. package/dist/umd/descope-grid-descope-grid-text-column-index-js.js.map +1 -0
  144. package/dist/umd/descope-grid-index-js.js +2 -1
  145. package/dist/umd/descope-grid-index-js.js.map +1 -0
  146. package/dist/umd/descope-hybrid-field-index-js.js +4 -3
  147. package/dist/umd/descope-hybrid-field-index-js.js.map +1 -0
  148. package/dist/umd/descope-icon-index-js.js +2 -1
  149. package/dist/umd/descope-icon-index-js.js.map +1 -0
  150. package/dist/umd/descope-image-index-js.js +2 -1
  151. package/dist/umd/descope-image-index-js.js.map +1 -0
  152. package/dist/umd/descope-link-index-js.js +2 -1
  153. package/dist/umd/descope-link-index-js.js.map +1 -0
  154. package/dist/umd/descope-list-index-js.js +2 -1
  155. package/dist/umd/descope-list-index-js.js.map +1 -0
  156. package/dist/umd/descope-loader-linear-index-js.js +2 -1
  157. package/dist/umd/descope-loader-linear-index-js.js.map +1 -0
  158. package/dist/umd/descope-loader-radial-index-js.js +2 -1
  159. package/dist/umd/descope-loader-radial-index-js.js.map +1 -0
  160. package/dist/umd/descope-logo-index-js.js +2 -1
  161. package/dist/umd/descope-logo-index-js.js.map +1 -0
  162. package/dist/umd/descope-modal-index-js.js +2 -1
  163. package/dist/umd/descope-modal-index-js.js.map +1 -0
  164. package/dist/umd/descope-multi-select-combo-box-index-js.js +2 -1
  165. package/dist/umd/descope-multi-select-combo-box-index-js.js.map +1 -0
  166. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js +2 -1
  167. package/dist/umd/descope-new-password-descope-new-password-internal-index-js.js.map +1 -0
  168. package/dist/umd/descope-new-password-index-js.js +2 -1
  169. package/dist/umd/descope-new-password-index-js.js.map +1 -0
  170. package/dist/umd/descope-notification-descope-notification-card-index-js.js +2 -1
  171. package/dist/umd/descope-notification-descope-notification-card-index-js.js.map +1 -0
  172. package/dist/umd/descope-notification-index-js.js +2 -1
  173. package/dist/umd/descope-notification-index-js.js.map +1 -0
  174. package/dist/umd/descope-notp-image-index-js.js +2 -1
  175. package/dist/umd/descope-notp-image-index-js.js.map +1 -0
  176. package/dist/umd/descope-number-field-index-js.js +2 -1
  177. package/dist/umd/descope-number-field-index-js.js.map +1 -0
  178. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js +2 -1
  179. package/dist/umd/descope-passcode-descope-passcode-internal-index-js.js.map +1 -0
  180. package/dist/umd/descope-passcode-index-js.js +3 -2
  181. package/dist/umd/descope-passcode-index-js.js.map +1 -0
  182. package/dist/umd/descope-password-index-js.js +2 -1
  183. package/dist/umd/descope-password-index-js.js.map +1 -0
  184. package/dist/umd/descope-policy-validation-index-js.js +2 -1
  185. package/dist/umd/descope-policy-validation-index-js.js.map +1 -0
  186. package/dist/umd/descope-radio-group-index-js.js +2 -1
  187. package/dist/umd/descope-radio-group-index-js.js.map +1 -0
  188. package/dist/umd/descope-recaptcha-index-js.js +2 -1
  189. package/dist/umd/descope-recaptcha-index-js.js.map +1 -0
  190. package/dist/umd/descope-scopes-list-index-js.js +2 -1
  191. package/dist/umd/descope-scopes-list-index-js.js.map +1 -0
  192. package/dist/umd/descope-security-questions-setup-index-js.js +2 -1
  193. package/dist/umd/descope-security-questions-setup-index-js.js.map +1 -0
  194. package/dist/umd/descope-security-questions-verify-index-js.js +3 -2
  195. package/dist/umd/descope-security-questions-verify-index-js.js.map +1 -0
  196. package/dist/umd/descope-text-area-index-js.js +2 -1
  197. package/dist/umd/descope-text-area-index-js.js.map +1 -0
  198. package/dist/umd/descope-text-field-index-js.js +3 -2
  199. package/dist/umd/descope-text-field-index-js.js.map +1 -0
  200. package/dist/umd/descope-text.js +2 -1
  201. package/dist/umd/descope-text.js.map +1 -0
  202. package/dist/umd/descope-third-party-app-logo-index-js.js +2 -1
  203. package/dist/umd/descope-third-party-app-logo-index-js.js.map +1 -0
  204. package/dist/umd/descope-totp-image-index-js.js +2 -1
  205. package/dist/umd/descope-totp-image-index-js.js.map +1 -0
  206. package/dist/umd/descope-upload-file-index-js.js +2 -1
  207. package/dist/umd/descope-upload-file-index-js.js.map +1 -0
  208. package/dist/umd/descope-user-attribute-index-js.js +2 -1
  209. package/dist/umd/descope-user-attribute-index-js.js.map +1 -0
  210. package/dist/umd/descope-user-auth-method-index-js.js +2 -1
  211. package/dist/umd/descope-user-auth-method-index-js.js.map +1 -0
  212. package/dist/umd/fonts/font-1364590020.woff +0 -0
  213. package/dist/umd/fonts/font-1949233557.woff +0 -0
  214. package/dist/umd/index.js +2 -1
  215. package/dist/umd/index.js.map +1 -0
  216. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js +2 -1
  217. package/dist/umd/mapping-fields-descope-mappings-field-descope-mapping-item-index-js.js.map +1 -0
  218. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js +2 -1
  219. package/dist/umd/mapping-fields-descope-mappings-field-descope-mappings-field-internal-index-js.js.map +1 -0
  220. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js +2 -1
  221. package/dist/umd/mapping-fields-descope-mappings-field-index-js.js.map +1 -0
  222. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js +2 -1
  223. package/dist/umd/mapping-fields-descope-saml-group-mappings-descope-saml-group-mappings-internal-index-js.js.map +1 -0
  224. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js +2 -1
  225. package/dist/umd/mapping-fields-descope-saml-group-mappings-index-js.js.map +1 -0
  226. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js +2 -1
  227. package/dist/umd/phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map +1 -0
  228. package/dist/umd/phone-fields-descope-phone-field-index-js.js +2 -1
  229. package/dist/umd/phone-fields-descope-phone-field-index-js.js.map +1 -0
  230. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js +3 -2
  231. package/dist/umd/phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map +1 -0
  232. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js +8 -7
  233. package/dist/umd/phone-fields-descope-phone-input-box-field-index-js.js.map +1 -0
  234. package/package.json +10 -8
  235. package/src/baseClasses/createCssVarImageClass.js +10 -5
  236. package/src/components/button-selection-group-fields/baseButtonSelectionGroup.js +7 -0
  237. package/src/components/button-selection-group-fields/createBaseButtonSelectionGroupInternalClass.js +1 -8
  238. package/src/components/button-selection-group-fields/descope-button-selection-group-item/ButtonSelectionGroupItemClass.js +11 -6
  239. package/src/components/descope-alert/AlertClass.js +16 -12
  240. package/src/components/descope-badge/BadgeClass.js +11 -6
  241. package/src/components/descope-code-snippet/CodeSnippetClass.js +9 -4
  242. package/src/components/descope-container/ContainerClass.js +9 -4
  243. package/src/components/descope-date-field/DateFieldClass.js +22 -17
  244. package/src/components/descope-date-field/descope-calendar/CalendarClass.js +28 -18
  245. package/src/components/descope-date-field/descope-calendar/helpers.js +1 -2
  246. package/src/components/descope-divider/DividerClass.js +14 -9
  247. package/src/components/descope-enriched-text/EnrichedTextClass.js +9 -4
  248. package/src/components/descope-grid/GridClass.js +1 -1
  249. package/src/components/descope-hybrid-field/HybridFieldClass.js +15 -10
  250. package/src/components/descope-icon/IconClass.js +9 -4
  251. package/src/components/descope-image/ImageClass.js +10 -5
  252. package/src/components/descope-link/LinkClass.js +14 -9
  253. package/src/components/descope-list/ListClass.js +15 -13
  254. package/src/components/descope-list/ListItemClass.js +16 -14
  255. package/src/components/descope-loader-linear/LoaderLinearClass.js +10 -5
  256. package/src/components/descope-loader-radial/LoaderRadialClass.js +10 -5
  257. package/src/components/descope-modal/ModalClass.js +16 -4
  258. package/src/components/descope-new-password/NewPasswordClass.js +1 -1
  259. package/src/components/descope-new-password/descope-new-password-internal/NewPasswordInternal.js +8 -6
  260. package/src/components/descope-passcode/PasscodeClass.js +28 -1
  261. package/src/components/descope-passcode/descope-passcode-internal/PasscodeInternal.js +26 -23
  262. package/src/components/descope-passcode/descope-passcode-internal/helpers.js +3 -22
  263. package/src/components/descope-policy-validation/PolicyValidationClass.js +8 -3
  264. package/src/components/descope-recaptcha/RecaptchaClass.js +13 -8
  265. package/src/components/descope-scopes-list/ScopesListClass.js +9 -5
  266. package/src/components/descope-security-questions-setup/SecurityQuestionsSetupClass.js +9 -5
  267. package/src/components/descope-security-questions-verify/SecurityQuestionsVerifyClass.js +9 -5
  268. package/src/components/descope-text-field/TextFieldClass.js +1 -1
  269. package/src/components/descope-third-party-app-logo/ThirdPartyAppLogoClass.js +20 -16
  270. package/src/components/descope-upload-file/UploadFileClass.js +20 -15
  271. package/src/components/descope-user-attribute/UserAttributeClass.js +25 -22
  272. package/src/components/descope-user-auth-method/UserAuthMethodClass.js +25 -22
  273. package/src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js +15 -9
  274. package/src/components/phone-fields/descope-phone-field/PhoneFieldClass.js +1 -0
  275. package/src/components/phone-fields/descope-phone-field/helpers.js +0 -1
  276. package/src/mixins/createProxy.js +3 -1
  277. package/src/mixins/createStyleMixin/index.js +9 -22
  278. package/src/mixins/draggableMixin.js +3 -2
  279. package/dist/umd/1402.js +0 -1
  280. package/dist/umd/1484.js +0 -148
  281. package/dist/umd/3110.js +0 -275
  282. package/dist/umd/3437.js +0 -2
  283. package/dist/umd/4619.js +0 -1
  284. package/dist/umd/4902.js +0 -170
  285. package/dist/umd/4902.js.LICENSE.txt +0 -23
  286. package/dist/umd/5096.js +0 -109
  287. package/dist/umd/5318.js +0 -1
  288. package/dist/umd/5459.js +0 -1
  289. package/dist/umd/7150.js +0 -2
  290. package/dist/umd/731.js +0 -832
  291. package/dist/umd/8823.js +0 -1
  292. /package/dist/umd/{9243.js.LICENSE.txt → 1519.js.LICENSE.txt} +0 -0
  293. /package/dist/umd/{1902.js.LICENSE.txt → 1899.js.LICENSE.txt} +0 -0
  294. /package/dist/umd/{1172.js.LICENSE.txt → 1995.js.LICENSE.txt} +0 -0
  295. /package/dist/umd/{2570.js.LICENSE.txt → 2894.js.LICENSE.txt} +0 -0
  296. /package/dist/umd/{1484.js.LICENSE.txt → 3620.js.LICENSE.txt} +0 -0
  297. /package/dist/umd/{2666.js.LICENSE.txt → 384.js.LICENSE.txt} +0 -0
  298. /package/dist/umd/{3437.js.LICENSE.txt → 4467.js.LICENSE.txt} +0 -0
  299. /package/dist/umd/{404.js.LICENSE.txt → 4518.js.LICENSE.txt} +0 -0
  300. /package/dist/umd/{4455.js.LICENSE.txt → 4550.js.LICENSE.txt} +0 -0
  301. /package/dist/umd/{4554.js.LICENSE.txt → 4623.js.LICENSE.txt} +0 -0
  302. /package/dist/umd/{742.js.LICENSE.txt → 4914.js.LICENSE.txt} +0 -0
  303. /package/dist/umd/{507.js.LICENSE.txt → 513.js.LICENSE.txt} +0 -0
  304. /package/dist/umd/{201.js.LICENSE.txt → 5260.js.LICENSE.txt} +0 -0
  305. /package/dist/umd/{5096.js.LICENSE.txt → 5648.js.LICENSE.txt} +0 -0
  306. /package/dist/umd/{5563.js.LICENSE.txt → 6227.js.LICENSE.txt} +0 -0
  307. /package/dist/umd/{4127.js.LICENSE.txt → 6424.js.LICENSE.txt} +0 -0
  308. /package/dist/umd/{7097.js.LICENSE.txt → 6649.js.LICENSE.txt} +0 -0
  309. /package/dist/umd/{7150.js.LICENSE.txt → 676.js.LICENSE.txt} +0 -0
  310. /package/dist/umd/{3638.js.LICENSE.txt → 7182.js.LICENSE.txt} +0 -0
  311. /package/dist/umd/{7979.js.LICENSE.txt → 7291.js.LICENSE.txt} +0 -0
  312. /package/dist/umd/{4187.js.LICENSE.txt → 7565.js.LICENSE.txt} +0 -0
  313. /package/dist/umd/{3191.js.LICENSE.txt → 7620.js.LICENSE.txt} +0 -0
  314. /package/dist/umd/{6050.js.LICENSE.txt → 7774.js.LICENSE.txt} +0 -0
  315. /package/dist/umd/{9478.js.LICENSE.txt → 7939.js.LICENSE.txt} +0 -0
  316. /package/dist/umd/{4114.js.LICENSE.txt → 8618.js.LICENSE.txt} +0 -0
  317. /package/dist/umd/{4574.js.LICENSE.txt → 8983.js.LICENSE.txt} +0 -0
  318. /package/dist/umd/{4218.js.LICENSE.txt → 9380.js.LICENSE.txt} +0 -0
  319. /package/dist/umd/{3110.js.LICENSE.txt → 9871.js.LICENSE.txt} +0 -0
  320. /package/dist/umd/{731.js.LICENSE.txt → 9970.js.LICENSE.txt} +0 -0
  321. /package/dist/umd/{bcdfe87ae253c2cf789c9a737f8d8c22.woff → fonts/font-38673212.woff} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapping-fields-descope-saml-group-mappings-index-js.js","mappings":"2OAaO,MAAMA,GAAgB,QAAiB,QAE9C,MAAMC,WAAgB,QAAgB,CACpCD,gBACAE,aAAc,kBAEd,WAAAC,GACEC,QAEAC,KAAKC,aAAa,CAAEC,KAAM,SAAUC,UAAY,iDAIhD,QAAY,iLASTH,KACL,CAEA,iBAAII,GACF,MAAgD,SAAzCJ,KAAKK,aAAa,kBAC3B,CAEA,IAAAC,GACEP,MAAMO,QAEN,QAAgBN,MAAM,KACpB,MAAMO,IAAgBP,KAAKQ,WAAWC,OACtCT,KAAKU,MAAMC,SAAWJ,GAAeP,KAAKI,cAAgB,OAAS,EAAE,GAEzE,EAGK,MAAMQ,GAAY,SACvB,QAAiB,CACfC,SAAU,CACRC,UAAW,CAAEC,SAAU,IAAM,QAASC,SAAU,SAChDC,cAAe,CAAEF,SAAU,IAAM,QAASC,SAAU,aACpDE,SAAU,CAAC,EACXC,UAAW,CAAEH,SAAU,SACvBI,eAAgB,CAAEJ,SAAU,eAC5BK,kBAAmB,CAAEL,SAAU,kBAC/BM,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,cAAe,CAAC,EAChBC,WAAY,CAAC,EACbC,UAAW,CAAC,EACZC,WAAY,CAAC,EACbC,YAAa,CAAC,EACdC,YAAa,CAAC,EACdC,YAAa,CAAC,KAGlB,KACA,KArBuB,CAsBvBlC,E,yFCxEFmC,eAAeC,OAAO,IAAe,I,sECO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,SACxDiP,iBAAoBjP,2BACvBiP,iBAAoBjP,gDAgBVqP,EAA8B,IAAM,uGAOpCC,EAA2BL,GAAS,SAC3CA,8DAKOM,EAAyCN,GAAS,SACzDA,oEAKOO,EAAsB,CAACP,EAAMvQ,IAAe,SACnDsQ,EAAoBC,WACpBE,EAAiBF,WACjBG,EAAsBH,WACtBC,EAAgBD,WAlCY,EAACA,EAAMvQ,IAAe,SAClDuQ,kCACAA,8CACAA,wCACAA,yCACAA,0EACiCvQ,EAAWsH,wDAClBtH,EAAW6H,oBAAoB7H,EAAW8G,wCA4BpEiK,CAAmBR,EAAMvQ,WACzB6Q,EAAsCN,WAnFV,CAACA,GAAS,SACtCA,yCAmFAS,CAAmBT,WA9EQ,CAACA,GAAS,SACrCA,mHA8EAU,CAAkBV,WA3FwB,CAACA,GAAS,SACpDA,gEA2FAW,CAAiCX,OAM1BY,EAA2BZ,GAAS,4ZAiB3CA,yJAQOa,EAA0B,IAC9B,oR","sources":["webpack://@descope/web-components-ui/../components/descope-text/src/component/TextClass.js","webpack://@descope/web-components-ui/../components/descope-text/src/component/index.js","webpack://@descope/web-components-ui/./src/baseClasses/createBaseInputClass.js","webpack://@descope/web-components-ui/./src/components/descope-button/ButtonClass.js","webpack://@descope/web-components-ui/./src/components/descope-button/clickableMixin.js","webpack://@descope/web-components-ui/./src/components/descope-button/index.js","webpack://@descope/web-components-ui/./src/components/descope-icon/IconClass.js","webpack://@descope/web-components-ui/./src/components/descope-icon/helpers.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/textFieldMappings.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/MappingItem.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mapping-item/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/MappingsFieldInternal.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/descope-mappings-field-internal/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/MappingsFieldClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-mappings-field/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/SamlGroupMappingsInternal.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/descope-saml-group-mappings-internal/index.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/SamlGroupMappingsClass.js","webpack://@descope/web-components-ui/./src/components/mapping-fields/descope-saml-group-mappings/index.js","webpack://@descope/web-components-ui/./src/helpers/themeHelpers/resetHelpers.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n componentNameValidationMixin,\n} from '@descope-ui/common/components-mixins';\nimport { compose } from '@descope-ui/common/utils';\nimport {\n getComponentName,\n injectStyle,\n observeChildren,\n} from '@descope-ui/common/components-helpers';\nimport { createBaseClass } from '@descope-ui/common/base-classes';\n\nexport const componentName = getComponentName('text');\n\nclass RawText extends createBaseClass({\n componentName,\n baseSelector: ':host > slot',\n}) {\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <slot part=\"text-wrapper\"></slot>\n `;\n\n injectStyle(`\n :host {\n display: inline-block;\n line-height: 1em;\n }\n :host > slot {\n width: 100%;\n display: inline-block;\n }\n `, this);\n }\n\n get hideWhenEmpty() {\n return this.getAttribute('hide-when-empty') === 'true';\n }\n\n init() {\n super.init();\n\n observeChildren(this, () => {\n const hasChildren = !!this.childNodes.length;\n this.style.display = !hasChildren && this.hideWhenEmpty ? 'none' : '';\n });\n }\n}\n\nexport const TextClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { selector: () => ':host', property: 'width' },\n hostDirection: { selector: () => ':host', property: 'direction' },\n fontSize: {},\n textColor: { property: 'color' },\n textLineHeight: { property: 'line-height' },\n textLetterSpacing: { property: 'letter-spacing' },\n textShadow: {},\n textAlign: {},\n textTransform: {},\n fontFamily: {},\n fontStyle: {},\n fontWeight: {},\n borderWidth: {},\n borderStyle: {},\n borderColor: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin,\n)(RawText);\n","import { componentName, TextClass } from './TextClass';\n\ncustomElements.define(componentName, TextClass);\n\nexport { TextClass, componentName };\n","import { compose } from '../helpers';\nimport {\n changeMixin,\n inputEventsDispatchingMixin,\n inputValidationMixin,\n normalizeBooleanAttributesMixin,\n} from '../mixins';\nimport { createBaseClass } from './createBaseClass';\n\nexport const createBaseInputClass = (...args) =>\n compose(\n inputValidationMixin,\n changeMixin,\n normalizeBooleanAttributesMixin,\n inputEventsDispatchingMixin\n )(createBaseClass(...args));\n","import { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n createStyleMixin,\n draggableMixin,\n createProxy,\n componentNameValidationMixin,\n} from '../../mixins';\nimport { IconClass } from '../descope-icon/IconClass';\nimport { clickableMixin } from './clickableMixin';\n\nexport const componentName = getComponentName('button');\n\nconst resetStyles = `\n\t:host {\n\t\tdisplay: inline-block;\n\t\tbox-sizing: border-box;\n\t}\n\tvaadin-button::before,\n\tvaadin-button::after {\n\t\topacity: 0;\n\t}\n\tvaadin-button {\n\t\tmargin: 0;\n\t\tmin-width: 0;\n\t\twidth: 100%;\n\t\theight: auto;\n\t\tbox-shadow: none;\n\t}\n\tvaadin-button::part(label) {\n\t\tpadding: 0;\n width: 100%;\n\t}\n\tvaadin-button::part(prefix) {\n\t\tmargin-left: 0;\n\t\tmargin-right: 0;\n\t}\n`;\n\nconst iconStyles = `\n\tvaadin-button::part(prefix),\n\tvaadin-button::part(label) {\n\t\tdisplay: flex;\n\t\talign-items: center;\n\t}\n`;\n\nconst editorOverrides = `vaadin-button::part(label) { pointer-events: none; }`;\n\nconst { host, label, slottedIcon } = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n slottedIcon: { selector: () => '::slotted(descope-icon)' },\n};\n\nlet loadingIndicatorStyles;\n\nexport const ButtonClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { property: 'width' },\n hostHeight: { property: 'height' },\n hostDirection: { ...host, property: 'direction' },\n fontSize: {},\n fontFamily: {},\n\n cursor: {},\n backgroundColor: {},\n\n outlineOffset: {},\n outlineColor: {},\n outlineStyle: {},\n outlineWidth: {},\n\n borderRadius: {},\n borderColor: {},\n borderStyle: {},\n borderWidth: {},\n\n verticalPadding: [{ property: 'padding-top' }, { property: 'padding-bottom' }],\n horizontalPadding: [\n { property: 'padding-right', fallback: '0.875em' },\n { property: 'padding-left', fallback: '0.875em' },\n ],\n\n labelTextColor: { property: 'color' },\n iconColor: {\n selector: () => `::slotted(*)`,\n property: IconClass.cssVarList.fill,\n },\n labelTextDecoration: { ...label, property: 'text-decoration' },\n labelSpacing: { ...label, property: 'gap' },\n textAlign: { ...label, property: 'justify-content', fallback: 'center' },\n\n iconSize: [\n { ...slottedIcon, property: 'width' },\n { ...slottedIcon, property: 'height' },\n ],\n },\n }),\n clickableMixin,\n draggableMixin,\n componentNameValidationMixin\n)(\n createProxy({\n slots: ['', 'prefix', 'label', 'suffix'],\n wrappedEleName: 'vaadin-button',\n style: () => `\n\t\t\t${resetStyles}\n\t\t\t${iconStyles}\n\t\t\t${loadingIndicatorStyles}\n\t\t\t${editorOverrides}\n\t\t\t:host {\n\t\t\t\tpadding: calc(var(${ButtonClass.cssVarList.outlineWidth}) + var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n :host([full-width=\"true\"]) {\n width: var(${ButtonClass.cssVarList.hostWidth});\n }\n\t\t\tvaadin-button {\n\t\t\t\theight: calc(var(${ButtonClass.cssVarList.hostHeight}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n\t\t\t}\n\t\t\t[square=\"true\"]:not([full-width=\"true\"]) {\n\t\t\t\twidth: calc(var(${ButtonClass.cssVarList.hostWidth}) - var(${ButtonClass.cssVarList.outlineWidth}) - var(${ButtonClass.cssVarList.outlineOffset}));\n padding: 0;\n\t\t\t}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nconst { color, fontSize } = ButtonClass.cssVarList;\nloadingIndicatorStyles = `\n\t@keyframes spin {\n\t\t0% { -webkit-transform: rotate(0deg); }\n\t\t100% { -webkit-transform: rotate(360deg); }\n\t}\n\t:host([loading=\"true\"]) ::before {\n\t\tanimation: spin 2s linear infinite;\n\t\tposition: absolute;\n\t\tcontent: '';\n\t\tz-index: 1;\n\t\tbox-sizing: border-box;\n\t\tborder-radius: 50%;\n\t\tborder-bottom-color: transparent;\n\t\tborder-left-color: transparent;\n\t\tborder-style: solid;\n\t\tcolor: var(${color});\n\t\ttop: calc(50% - (var(${fontSize}) / 2));\n\t\tleft: calc(50% - (var(${fontSize}) / 2));\n\t\tborder-width: calc(var(${fontSize}) / 10);\n\t\twidth: var(${fontSize});\n\t\theight: var(${fontSize});\n\t}\n\t:host([disabled=\"true\"]),\n\t:host([loading=\"true\"]) {\n\t\tpointer-events: none;\n\t}\n\t:host([loading=\"true\"])::part(prefix),\n\t:host([loading=\"true\"])::part(label) {\n\t\tvisibility: hidden;\n\t}\n`;\n","export const clickableMixin = (superclass) =>\n class ClickableMixinClass extends superclass {\n get isLoading() {\n return this.getAttribute('loading') === 'true';\n }\n\n click() {\n this.isLoading || super.click();\n }\n };\n","import '@vaadin/button';\nimport { componentName, ButtonClass } from './ButtonClass';\n\ncustomElements.define(componentName, ButtonClass);\n\nexport { ButtonClass, componentName };\n","/* eslint-disable no-use-before-define */\nimport { createStyleMixin, draggableMixin, componentNameValidationMixin } from '../../mixins';\nimport { createBaseClass } from '../../baseClasses/createBaseClass';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport { createIcon } from './helpers';\nimport { injectStyle } from '@descope-ui/common/components-helpers';\n\nexport const componentName = getComponentName('icon');\n\nclass RawIcon extends createBaseClass({ componentName, baseSelector: 'slot' }) {\n static get observedAttributes() {\n return ['src'];\n }\n\n #icon;\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n\t\t<slot></slot>\n\t`;\n\n injectStyle(\n `\n\t\t\t:host > slot {\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tdisplay: flex;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\t:host {\n\t\t\t\tdisplay: inline-block;\n\t\t\t}\n `,\n this\n );\n }\n\n init() {\n super.init?.();\n this.toggleVisibility(this.src);\n }\n\n toggleVisibility(isVisible) {\n this.style.display = isVisible ? '' : 'none';\n }\n\n get src() {\n return this.getAttribute('src');\n }\n\n // in order to fill an SVG with `currentColor` override all of its `fill` and `path` nodes\n // with the value from the `st-fill` attribute\n // eslint-disable-next-line class-methods-use-this\n updateFillColor(node) {\n // set fill to root node and all its relevant selectors\n const elementsToReplace = [node, ...node.querySelectorAll('*[fill]')];\n\n elementsToReplace.forEach((ele) => {\n ele.setAttribute(\n 'fill',\n `var(${IconClass.cssVarList.fill}, ${ele.getAttribute('fill') || \"''\"})`\n );\n });\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (oldValue === newValue) return;\n\n if (attrName === 'src') {\n this.toggleVisibility(newValue);\n\n createIcon(this.src).then((res) => {\n this.innerHTML = '';\n if (res) {\n const clonedNode = res.cloneNode(true);\n this.updateFillColor(clonedNode);\n this.appendChild(clonedNode);\n }\n });\n }\n }\n}\n\nexport const IconClass = compose(\n createStyleMixin({\n mappings: {\n fill: {},\n },\n }),\n draggableMixin,\n componentNameValidationMixin\n)(RawIcon);\n","import DOMPurify from 'dompurify';\n\nconst getFileExtension = (path) => {\n const match = path.match(/\\.([0-9a-z]+)(?:[\\\\?#]|$)/i);\n return match ? match[1] : null;\n};\n\nconst base64Prefix = 'data:image/svg+xml;base64,';\n\nconst isBase64Svg = (src) => src.startsWith(base64Prefix);\n\nconst createImgEle = (src) => {\n const ele = document.createElement('img');\n ele.setAttribute('src', src);\n return ele;\n};\n\nconst createSvgEle = (text) => {\n // we want to purify the SVG to avoid XSS attacks\n const clean = DOMPurify.sanitize(text, { USE_PROFILES: { svg: true, svgFilters: true } });\n\n const parser = new DOMParser();\n const ele = parser.parseFromString(clean, 'image/svg+xml').querySelector('svg');\n return ele;\n};\n\nexport const createIcon = async (src) => {\n try {\n let ele;\n if (isBase64Svg(src)) {\n // handle base64 source\n const svgXml = atob(src.slice(base64Prefix.length));\n ele = createSvgEle(svgXml);\n } else if (getFileExtension(src) === 'svg') {\n // handle urls\n const fetchedSrc = await fetch(src);\n const text = await fetchedSrc.text();\n ele = createSvgEle(text);\n } else {\n // handle binary\n ele = createImgEle(src);\n }\n\n ele.style.setProperty('max-width', '100%');\n ele.style.setProperty('max-height', '100%');\n\n return ele;\n } catch {\n return null;\n }\n};\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n 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(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","const {\n host,\n label,\n placeholder,\n requiredIndicator,\n inputField,\n input,\n inputMask,\n helperText,\n errorMessage,\n disabledPlaceholder,\n inputDisabled,\n inputIcon,\n externalInput,\n externalInputDisabled,\n externalPlaceholder,\n externalDisabledPlaceholder,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n placeholder: [\n { selector: '> input:placeholder-shown' },\n { selector: () => ':host::slotted(input:placeholder-shown)' },\n ],\n disabledPlaceholder: { selector: '> input:disabled::placeholder' },\n inputField: { selector: '::part(input-field)' },\n input: { selector: 'input' },\n inputMask: { selector: '::part(input-field)::before' },\n inputDisabled: { selector: 'input:disabled' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n inputIcon: { selector: 'vaadin-icon' },\n externalInput: { selector: () => '::slotted(input)' },\n externalInputDisabled: { selector: () => '::slotted(input:disabled)' },\n externalPlaceholder: { selector: () => '::slotted(input:placeholder-shown)' },\n externalDisabledPlaceholder: { selector: () => '::slotted(input:disabled::placeholder)' },\n};\n\nexport default {\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host],\n fontFamily: [label, inputField, helperText, errorMessage],\n\n labelFontSize: { ...label, property: 'font-size' },\n labelFontWeight: { ...label, property: 'font-weight' },\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n { ...label, property: '-webkit-text-fill-color' },\n { ...requiredIndicator, property: '-webkit-text-fill-color' },\n ],\n\n hostWidth: { ...host, property: 'width' },\n hostMinWidth: { ...host, property: 'min-width' },\n hostDirection: { ...host, property: 'direction' },\n inputDirection: { ...input, property: 'direction' },\n\n inputBackgroundColor: [\n { ...inputField, property: 'background-color' },\n { ...inputMask, property: 'background-color' },\n ],\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n\n helperTextColor: { ...helperText, property: '-webkit-text-fill-color' },\n\n inputValueTextColor: [\n { ...inputField, property: 'color' },\n { ...inputDisabled, property: '-webkit-text-fill-color' },\n { ...externalInputDisabled, property: '-webkit-text-fill-color' },\n ],\n inputCaretTextColor: [\n { ...input, property: 'caret-color' },\n { ...externalInput, property: 'caret-color' },\n ],\n\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n inputBorderColor: { ...inputField, property: 'border-color' },\n inputBorderWidth: { ...inputField, property: 'border-width' },\n inputBorderStyle: { ...inputField, property: 'border-style' },\n inputBorderRadius: { ...inputField, property: 'border-radius' },\n\n inputHeight: { ...inputField, property: 'height' },\n inputHorizontalPadding: [\n { ...input, property: 'padding-left' },\n { ...input, property: 'padding-right' },\n { ...externalInput, property: 'padding-left' },\n { ...externalInput, property: 'padding-right' },\n ],\n\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n textAlign: {},\n\n inputTextAlign: [\n { ...input, property: 'text-align' },\n { ...externalInput, property: 'text-align' },\n ],\n\n inputPlaceholderColor: [\n { selector: () => ':host input:placeholder-shown', property: 'color' },\n { ...externalPlaceholder, property: 'color' },\n { ...placeholder, property: 'color' },\n { ...disabledPlaceholder, property: '-webkit-text-fill-color' },\n { ...externalDisabledPlaceholder, property: '-webkit-text-fill-color' },\n ],\n\n labelPosition: { ...label, property: 'position' },\n labelTopPosition: { ...label, property: 'top' },\n labelHorizontalPosition: [\n { ...label, property: 'left' },\n { ...label, property: 'right' },\n ],\n inputTransformY: { ...label, property: 'transform' },\n inputTransition: { ...label, property: 'transition' },\n marginInlineStart: { ...label, property: 'margin-inline-start' },\n placeholderOpacity: [\n { selector: '> input:placeholder-shown', property: 'opacity' },\n { ...externalPlaceholder, property: 'opacity' },\n ],\n inputVerticalAlignment: [\n { ...inputField, property: 'align-items' },\n { ...externalInput, property: 'align-items' },\n ],\n valueInputHeight: [\n { ...input, property: 'height' },\n { ...externalInput, property: 'height' },\n ],\n valueInputMarginBottom: [\n { ...input, property: 'margin-bottom' },\n { ...externalInput, property: 'margin-bottom' },\n ],\n\n inputIconOffset: [\n { ...inputIcon, property: 'margin-right' },\n { ...inputIcon, property: 'margin-left' },\n ],\n inputIconSize: { ...inputIcon, property: 'font-size' },\n inputIconColor: { ...inputIcon, property: 'color' },\n};\n","import { injectStyle } from '@descope-ui/common/components-helpers';\nimport { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mapping-item');\n\nconst inputAttrs = [\n 'size',\n 'bordered',\n 'readonly',\n 'full-width',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n];\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingItem extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputAttrs, [\n 'separator',\n 'options',\n 'invalid',\n 'disabled',\n ]);\n }\n\n get separator() {\n return this.getAttribute('separator') || 'map to';\n }\n\n get value() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (attributeValue && inputValue) {\n return { [attributeValue]: inputValue };\n }\n return null;\n }\n\n set value(mapping) {\n if (Object.entries(mapping).length !== 1) {\n // eslint-disable-next-line no-console\n console.error(\n 'descope-mapping item expected expects only one key-value pair in the value but received: ',\n mapping\n );\n return;\n }\n const [attribute, value] = Object.entries(mapping)[0];\n this.valueInput.value = value;\n this.attributeInput.value = attribute;\n // The event needs to be dispatched to trigger the validation if setting the value externally\n this.dispatchEvent(new InputEvent('input', { bubbles: true, composed: true }));\n }\n\n constructor() {\n super();\n\n this.attachShadow({ mode: 'open' }).innerHTML = `\n <div class=\"wrapper\" part=\"wrapper\">\n <descope-text-field required=\"true\"></descope-text-field>\n <div class=\"separator\" part=\"separator\">${this.separator}</div>\n <descope-combo-box\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n required=\"true\"\n >\n </descope-combo-box>\n <descope-button variant=\"link\" mode=\"primary\">\n <vaadin-icon icon=\"vaadin:minus\"></vaadin-icon>\n </descope-button>\n </div>\n\t`;\n\n injectStyle(\n `\n .wrapper {\n display: flex;\n }\n .separator {\n text-align: center;\n flex-shrink: 0;\n }\n `,\n this\n );\n\n this.valueInput = this.shadowRoot.querySelector('descope-text-field');\n this.attributeInput = this.shadowRoot.querySelector('descope-combo-box');\n this.inputs = [this.valueInput, this.attributeInput];\n this.removeButton = this.shadowRoot.querySelector('descope-button');\n\n forwardAttrs(this, this.valueInput, {\n includeAttrs: inputAttrs,\n });\n forwardAttrs(this, this.attributeInput, {\n includeAttrs: [...inputAttrs, 'options'],\n mapAttrs: { options: 'data' },\n });\n forwardAttrs(this, this.removeButton, {\n includeAttrs: ['disabled'],\n });\n }\n\n initRemoveButton() {\n this.removeButton.addEventListener('click', () =>\n this.dispatchEvent(new CustomEvent('mapping-item-removed', { bubbles: true, composed: true }))\n );\n }\n\n init() {\n super.init?.();\n this.initRemoveButton();\n }\n\n getValidity() {\n const attributeValue = this.attributeInput.value;\n const inputValue = this.valueInput.value;\n if (!attributeValue || !inputValue) {\n return { badInput: true };\n }\n return {};\n }\n\n reportValidity() {\n this.inputs.forEach((input) => input.reportValidity());\n }\n\n focus() {\n const focusedElement =\n this.checkValidity() || !this.valueInput.checkValidity()\n ? this.valueInput\n : this.attributeInput;\n focusedElement.focus();\n }\n\n handleSeparatorChange() {\n this.shadowRoot.querySelector('.separator').textContent = this.separator;\n }\n\n #handleInvalidMapping(invalid) {\n if (invalid === 'true') {\n const inputValue = this.valueInput.value;\n if (!inputValue) {\n this.valueInput.setAttribute('invalid', 'true');\n this.valueInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n\n const attributeValue = this.attributeInput.value;\n if (!attributeValue) {\n this.attributeInput.setAttribute('invalid', 'true');\n this.attributeInput.setAttribute('error-message', this.defaultErrorMsgValueMissing);\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n\n if (attrName === 'separator') {\n this.handleSeparatorChange();\n }\n\n if (attrName === 'invalid') {\n this.#handleInvalidMapping(newValue);\n }\n }\n}\n\nexport default MappingItem;\n","import MappingItem, { componentName } from './MappingItem';\n\ncustomElements.define(componentName, MappingItem);\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeChildren,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('mappings-field-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass MappingsFieldInternal extends BaseInputClass {\n #errorItem;\n\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], [\n 'label-value',\n 'label-attr',\n 'button-label',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ]);\n }\n\n // eslint-disable-next-line class-methods-use-this\n isValidDataType(data) {\n try {\n return data.every(\n (obj) =>\n typeof obj === 'object' &&\n !Array.isArray(obj) &&\n Object.getOwnPropertyNames(obj).length === 1 &&\n typeof obj[Object.keys(obj)[0]] === 'string' &&\n obj[Object.keys(obj)[0]].trim() !== ''\n );\n } catch (e) {\n return false;\n }\n }\n\n get labelValue() {\n return this.getAttribute('label-value') || 'Value';\n }\n\n get labelAttr() {\n return this.getAttribute('label-attr') || 'Attribute';\n }\n\n get buttonLabel() {\n return this.getAttribute('button-label') || 'Add mapping';\n }\n\n get options() {\n return this.getAttribute('options') || [];\n }\n\n addNewMappingItem(focusNewItem) {\n const newMappingItem = document.createElement('descope-mapping-item');\n newMappingItem.setAttribute('bordered', 'true');\n this.mappingsContainerEle.appendChild(newMappingItem);\n forwardAttrs(this, newMappingItem, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'separator',\n 'options',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n // This needs to be done with the timeout, otherwise the validation is performed\n // before the new item is added and thus returns a wrong result\n setTimeout(() => {\n this.setCustomValidity('');\n newMappingItem.addEventListener('mapping-item-removed', () => {\n // If the removed item was the one that was invalid, we need to reset the invalid indication for the internal\n if (newMappingItem === this.#errorItem) {\n this.resetInvalidIndication();\n this.#errorItem = undefined;\n }\n newMappingItem.remove();\n this.setCustomValidity('');\n });\n this.dispatchEvent(new CustomEvent('mapping-item-added', { bubbles: true, composed: true }));\n if (focusNewItem) {\n newMappingItem.focus();\n }\n }, 0);\n return newMappingItem;\n }\n\n get items() {\n return Array.from(this.mappingsContainerEle.querySelectorAll('descope-mapping-item'));\n }\n\n get value() {\n return this.items.reduce((acc, item) => {\n if (!item.value) {\n return acc;\n }\n\n return [...acc, item.value];\n }, []);\n }\n\n set value(mappings) {\n if (!this.isValidDataType(mappings)) {\n // eslint-disable-next-line no-console\n console.error(\n 'received invalid value to set - should be an array of objects with one key-value pair'\n );\n return;\n }\n\n const currentItems = this.items;\n\n // Remove extra mapping items we don't need\n if (currentItems.length > mappings.length) {\n for (let i = mappings.length; i < currentItems.length; i++) {\n this.mappingsContainerEle.removeChild(currentItems[i]);\n }\n }\n\n // Add or update items\n mappings.forEach((mapping, index) => {\n const mappingItem = currentItems[index];\n if (mappingItem) {\n // Set existing item value\n mappingItem.value = mapping;\n } else {\n // Add new item\n const newMappingItem = this.addNewMappingItem(false);\n // Setting the new item value needs to be done with the timeout,\n // otherwise the value is not set correctly\n setTimeout(() => {\n newMappingItem.value = mapping;\n }, 0);\n }\n });\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div class=\"labels-container\" part=\"labels\"></div>\n <div class=\"mappings-container\"></div>\n <div class=\"button-container\"></div>\n `;\n\n this.labelsEle = this.querySelector('.labels-container');\n this.mappingsContainerEle = this.querySelector('.mappings-container');\n this.buttonContainer = this.querySelector('.button-container');\n }\n\n initLabels() {\n this.labelsEle.innerHTML = `\n <descope-text variant=\"body2\" part=\"value-label\">${this.labelValue}</descope-text>\n <descope-text variant=\"body2\" part=\"attr-label\">${this.labelAttr}</descope-text>\n `;\n }\n\n initAddButton() {\n this.buttonContainer.innerHTML = `\n <descope-button variant=\"link\" mode=\"primary\" disabled=\"${this.isDisabled}\">\n <vaadin-icon icon=\"vaadin:plus\"></vaadin-icon>\n ${this.buttonLabel}\n </descope-button>\n `;\n const button = this.querySelector('descope-button');\n button.onclick = () => {\n this.addNewMappingItem(true);\n };\n forwardAttrs(this, button, {\n includeAttrs: ['disabled'],\n });\n }\n\n #onMappingsContainerChildrenChange() {\n this.labelsEle.style.display = this.items.length ? 'grid' : 'none';\n }\n\n init() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement =\n this.#errorItem || this.items[0] || this.querySelector('descope-button');\n focusedElement.focus();\n }\n });\n\n super.init?.();\n this.initLabels();\n this.initAddButton();\n\n // This event listener is responsible for removing the invalid attribute\n // from the internal once the invalid item turns valid\n this.addEventListener('input', () => {\n const isErrorItemMounted = this.mappingsContainerEle.contains(this.#errorItem);\n if (isErrorItemMounted && this.#errorItem?.checkValidity()) {\n // Item has changed, it was invalid before and now it's valid\n this.resetInvalidIndication();\n this.#errorItem.removeAttribute('invalid');\n this.#errorItem = undefined;\n }\n });\n\n observeChildren(this.mappingsContainerEle, this.#onMappingsContainerChildrenChange.bind(this));\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n getValidity() {\n const errorItem = this.items.find((item) => !item.checkValidity());\n if (errorItem) {\n return errorItem.validity;\n }\n\n return {};\n }\n\n #handleInvalidMappings(isInvalid) {\n if (isInvalid) {\n this.#errorItem = this.items.find((item) => !item.checkValidity());\n this.#errorItem?.reportValidity();\n this.#errorItem?.setAttribute('invalid', 'true');\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'label-value' || attrName === 'label-attr') {\n this.initLabels();\n }\n if (attrName === 'button-label') {\n this.initAddButton();\n }\n if (attrName === 'invalid') {\n this.#handleInvalidMappings(newValue === 'true');\n }\n if (attrName === 'readonly') {\n this.toggleAttribute('inert', newValue === 'true');\n }\n }\n}\n\nexport default MappingsFieldInternal;\n","import MappingsFieldInternal, { componentName } from './MappingsFieldInternal';\n\ncustomElements.define(componentName, MappingsFieldInternal);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { TextClass } from '@descope-ui/descope-text/class';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-mappings-field-internal/MappingsFieldInternal';\n\nexport const componentName = getComponentName('mappings-field');\n\nconst customMixin = (superclass) =>\n class MappingsFieldMixinClass extends superclass {\n get defaultValues() {\n const defaultValuesAttr = this.getAttribute('default-values');\n if (defaultValuesAttr) {\n try {\n return JSON.parse(defaultValuesAttr);\n } catch (e) {\n // eslint-disable-next-line no-console\n console.error('could not parse data string from attribute \"default-values\" -', e.message);\n }\n }\n return [];\n }\n\n setDefaultValues() {\n const initialDefaultValues = this.defaultValues;\n if (Object.keys(initialDefaultValues).length > 0) {\n this.inputElement.value = initialDefaultValues;\n }\n }\n\n init() {\n super.init?.();\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'default-values',\n 'invalid',\n 'readonly',\n 'disabled',\n 'st-error-message-icon',\n 'st-error-message-icon-size',\n 'st-error-message-icon-padding',\n ],\n });\n\n // This is required since when we remove the invalid attribute from the internal mappings field,\n // we want to reflect the change in the parent component\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n\n this.setDefaultValues();\n }\n };\n\nconst {\n host,\n helperText,\n errorMessage,\n mappingItem,\n labels,\n labelsText,\n valueLabel,\n attrLabel,\n separator,\n labelsContainer,\n} = {\n host: { selector: () => ':host' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n mappingItem: { selector: 'descope-mapping-item::part(wrapper)' },\n labels: { selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text' },\n labelsText: {\n selector: 'descope-mappings-field-internal [part=\"labels\"] descope-text::part(text-wrapper)',\n },\n valueLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"]' },\n attrLabel: { selector: 'descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"]' },\n separator: { selector: 'descope-mapping-item::part(separator)' },\n labelsContainer: { selector: 'descope-mappings-field-internal [part=\"labels\"]' },\n};\n\nexport const MappingsFieldClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n // we apply font-size also on the host so we can set its width with em\n fontSize: [{}, host, { ...separator, property: 'margin-top' }],\n fontFamily: [helperText, errorMessage, labels],\n separatorFontSize: { ...separator, property: 'font-size' },\n labelsFontSize: { ...labelsText, property: 'font-size' },\n labelsLineHeight: [\n { ...labelsText, property: 'line-height' },\n { ...labels, property: 'line-height' },\n ],\n labelTextColor: [\n { ...labels, property: TextClass.cssVarList.textColor },\n { ...separator, property: 'color' },\n ],\n itemMarginBottom: { ...mappingItem, property: 'margin-bottom' },\n valueLabelMinWidth: { ...valueLabel, property: 'min-width' },\n attrLabelMinWidth: { ...attrLabel, property: 'min-width' },\n labelsMarginBottom: { ...labelsContainer, property: 'margin-bottom' },\n separatorWidth: {},\n removeButtonWidth: {},\n },\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-mappings-field-internal [part=\"labels\"] {\n display: none;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"],\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n ${TextClass.cssVarList.fontWeight}: 500;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"value-label\"] {\n grid-column: 1 / span 1;\n }\n\n descope-mappings-field-internal [part=\"labels\"] [part=\"attr-label\"] {\n grid-column: 3 / span 1;\n }\n\n descope-mapping-item::part(wrapper) {\n display: grid;\n grid-template-columns: 1fr var(${MappingsFieldClass.cssVarList.separatorWidth}) 1fr var(${MappingsFieldClass.cssVarList.removeButtonWidth});\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'options',\n 'error-message',\n ],\n componentName,\n })\n);\n\nexport default MappingsFieldClass;\n","import '@vaadin/custom-field';\nimport '@vaadin/icon';\nimport '@vaadin/icons';\nimport { componentName, MappingsFieldClass } from './MappingsFieldClass';\nimport '@descope-ui/descope-text';\nimport '../../descope-button';\nimport '../../descope-text-field';\nimport '@descope-ui/descope-combo-box';\nimport './descope-mappings-field-internal';\nimport './descope-mapping-item';\n\ncustomElements.define(componentName, MappingsFieldClass);\n\nexport { MappingsFieldClass, componentName };\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport {\n getComponentName,\n forwardAttrs,\n observeAttributes,\n} from '../../../../helpers/componentHelpers';\n\nexport const componentName = getComponentName('saml-group-mappings-internal');\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: '' });\n\nclass SamlGroupMappingsInternal extends BaseInputClass {\n static get observedAttributes() {\n return ['invalid'].concat(BaseInputClass.observedAttributes || []);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <descope-text-field variant=\"body2\" bordered=\"true\"></descope-text-field>\n <descope-mappings-field></descope-mappings-field>\n `;\n\n this.groupInputElement = this.querySelector('descope-text-field');\n this.mappingsElement = this.querySelector('descope-mappings-field');\n }\n\n resetInvalidIndication() {\n this.removeAttribute('invalid');\n }\n\n handleMappingsInvalidChange(changedAttributes) {\n if (changedAttributes.includes('invalid')) {\n if (!this.mappingsElement.hasAttribute('invalid')) {\n this.resetInvalidIndication();\n }\n }\n }\n\n initFocusHandler() {\n // This event listener needs to be placed before the super.init() call\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) {\n const focusedElement = this.mappingsElement.checkValidity()\n ? this.groupInputElement\n : this.mappingsElement;\n focusedElement.focus();\n }\n });\n }\n\n init() {\n // This needs to be placed before the super.init() call to work\n this.initFocusHandler();\n\n super.init?.();\n\n forwardAttrs(this, this.groupInputElement, {\n mapAttrs: { 'label-group': 'label' },\n includeAttrs: ['size', 'label-group', 'readonly', 'disabled'],\n });\n\n forwardAttrs(this, this.mappingsElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n 'data-errormessage-pattern-mismatch',\n ],\n });\n\n // Observing the invalid attribute of the mappings field to reset the invalid state for this component.\n // When an invalid item turns valid, the mappings field will remove the invalid attribute, and at this component\n // level, we need to remove the invalid attribute as well to be able to mark the component as invalid the next time\n observeAttributes(this.mappingsElement, this.handleMappingsInvalidChange.bind(this), {\n includeAttrs: ['invalid'],\n });\n }\n\n get value() {\n return {\n group: this.groupInputElement.value,\n mappings: this.mappingsElement.value,\n };\n }\n\n set value(value) {\n if (value?.group && typeof value.group === 'string') {\n this.groupInputElement.value = value.group;\n }\n if (Array.isArray(value?.mappings)) {\n this.mappingsElement.value = value.mappings;\n }\n }\n\n getValidity() {\n if (!this.groupInputElement.checkValidity()) {\n return this.groupInputElement.validity;\n }\n if (!this.mappingsElement.checkValidity()) {\n return this.mappingsElement.validity;\n }\n\n return {};\n }\n\n #handleInvalidState(isInvalid) {\n if (isInvalid) {\n if (!this.groupInputElement.checkValidity()) {\n this.groupInputElement.setAttribute('invalid', 'true');\n return;\n }\n\n if (!this.mappingsElement.checkValidity()) {\n this.mappingsElement.setAttribute('invalid', 'true');\n }\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback?.(attrName, oldValue, newValue);\n if (attrName === 'invalid') {\n this.#handleInvalidState(newValue === 'true');\n }\n }\n}\n\nexport default SamlGroupMappingsInternal;\n","import SamlGroupMappingsInternal, { componentName } from './SamlGroupMappingsInternal';\n\ncustomElements.define(componentName, SamlGroupMappingsInternal);\n","import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../../mixins';\nimport { compose } from '../../../helpers';\nimport { forwardAttrs, getComponentName, syncAttrs } from '../../../helpers/componentHelpers';\nimport { componentName as descopeInternalComponentName } from './descope-saml-group-mappings-internal/SamlGroupMappingsInternal';\n\nexport const componentName = getComponentName('saml-group-mappings');\n\nconst customMixin = (superclass) =>\n class SamlGroupMappingsMixinClass extends superclass {\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n <${descopeInternalComponentName}\n tabindex=\"-1\"\n ></${descopeInternalComponentName}>\n `;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this, this.inputElement, {\n includeAttrs: [\n 'size',\n 'full-width',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'readonly',\n 'disabled',\n ],\n });\n\n syncAttrs(this, this.inputElement, { includeAttrs: ['invalid'] });\n }\n };\n\nconst { host, groupInput, errorMessage } = {\n host: { selector: () => ':host' },\n groupInput: { selector: 'descope-text-field' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const SamlGroupMappingsClass = compose(\n createStyleMixin({\n mappings: {\n hostWidth: { ...host, property: 'width' },\n hostDirection: { ...host, property: 'direction' },\n groupNameInputMarginBottom: { ...groupInput, property: 'margin-bottom' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n },\n }),\n draggableMixin,\n proxyInputMixin({\n proxyProps: ['value', 'selectionStart'],\n inputEvent: 'input',\n triggerValidationEvents: ['mapping-item-added', 'mapping-item-removed'],\n proxyParentValidation: true,\n }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-custom-field',\n style: () => `\n :host {\n display: inline-flex;\n max-width: 100%;\n direction: ltr;\n }\n\n vaadin-custom-field {\n line-height: unset;\n width: 100%;\n }\n\n descope-text-field {\n width: auto;\n }\n\n descope-mappings-field {\n display: block;\n }\n `,\n excludeAttrsSync: [\n 'tabindex',\n 'label-group',\n 'label-value',\n 'label-attr',\n 'button-label',\n 'separator',\n 'options',\n 'error-message',\n ],\n componentName,\n })\n);\n\nexport default SamlGroupMappingsClass;\n","import '@vaadin/custom-field';\n\nimport { componentName, SamlGroupMappingsClass } from './SamlGroupMappingsClass';\nimport '../../descope-text-field';\nimport '../descope-mappings-field';\nimport './descope-saml-group-mappings-internal';\n\ncustomElements.define(componentName, SamlGroupMappingsClass);\n\nexport { SamlGroupMappingsClass, componentName };\n","export const useHostExternalPadding = (cssVarList) => `\n :host {\n padding: calc(var(${cssVarList.inputOutlineWidth}) + var(${cssVarList.inputOutlineOffset}))\n }\n`;\n\nexport const resetInputFieldUnderlayingBorder = (name) => `\n ${name}::part(input-field)::after {\n border: none;\n }\n`;\n\nexport const resetInitialHeight = (name) => `\n ${name}::before {\n\t\theight: unset;\n\t}\n`;\n\nexport const resetInputElement = (name) => `\n ${name} > input {\n -webkit-mask-image: none;\n min-height: 0;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputContainer = (name) => `\n ${name} {\n margin: 0;\n padding: 0;\n width: 100%;\n height: 100%;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputField = (name) => `\n ${name}::part(input-field) {\n overflow: hidden;\n padding: 0;\n box-shadow: none;\n }\n`;\n\nexport const resetInputCursor = (name) => `\n ${name} > label,\n ${name}::part(label),\n ${name}::part(required-indicator) {\n cursor: pointer;\n }\n`;\n\nexport const resetInputPlaceholder = (name, ele = 'input') => `\n ${name}[disabled] > ${ele}:placeholder-shown,\n\t${name}[readonly] > ${ele}:placeholder-shown {\n\t\topacity: 1;\n\t}\n`;\n\nexport const resetInputAutoFill = (name, cssVarList) => `\n ${name} input:-webkit-autofill,\n ${name} input:-webkit-autofill::first-line,\n ${name} input:-webkit-autofill:hover,\n ${name} input:-webkit-autofill:active,\n ${name} input:-webkit-autofill:focus {\n -webkit-text-fill-color: var(${cssVarList.inputValueTextColor});\n box-shadow: 0 0 0 var(${cssVarList.inputHeight}) var(${cssVarList.inputBackgroundColor}) inset;\n }\n`;\n\nexport const resetInputFieldDefaultWidth = () => `\n :host {\n --vaadin-field-default-width: auto;\n box-sizing: border-box;\n }\n`;\n\nexport const resetInputReadonlyStyle = (name) => `\n ${name}::part(input-field)::after {\n opacity: 0;\n }\n`;\n\nexport const resetInputFieldInvalidBackgroundColor = (name) => `\n ${name}::part(input-field)::after {\n background: none;\n }\n`;\n\nexport const resetInputOverrides = (name, cssVarList) => `\n ${resetInputContainer(name)}\n ${resetInputCursor(name)}\n ${resetInputPlaceholder(name)}\n ${resetInputField(name)}\n ${resetInputAutoFill(name, cssVarList)}\n ${resetInputFieldInvalidBackgroundColor(name)}\n ${resetInitialHeight(name)}\n ${resetInputElement(name)}\n ${resetInputFieldUnderlayingBorder(name)}\n`;\n\n// This function is used to support RTL correctly for input components.\n// It also fixes the error message to be displayed LTR since we currently\n// don't support RTL for error messages.\nexport const resetInputLabelPosition = (name) => `\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 ${name} [slot=\"label\"] {\n max-width: calc(100% - 1em);\n overflow: hidden;\n text-overflow: ellipsis;\n padding-bottom: 0.5em;\n }\n`;\n\nexport const inputFloatingLabelStyle = () => {\n return `\n :host([label-type=\"floating\"]) {\n position: relative;\n }\n :host([label-type=\"floating\"][has-label]) [slot=\"label\"] {\n padding: 0;\n }\n :host([label-type=\"floating\"][has-label]) > ::part(label) {\n z-index: 1;\n padding: 0;\n width: auto;\n }\n `;\n};\n"],"names":["componentName","RawText","baseSelector","constructor","super","this","attachShadow","mode","innerHTML","hideWhenEmpty","getAttribute","init","hasChildren","childNodes","length","style","display","TextClass","mappings","hostWidth","selector","property","hostDirection","fontSize","textColor","textLineHeight","textLetterSpacing","textShadow","textAlign","textTransform","fontFamily","fontStyle","fontWeight","borderWidth","borderStyle","borderColor","customElements","define","createBaseInputClass","args","host","label","slottedIcon","loadingIndicatorStyles","ButtonClass","hostHeight","cursor","backgroundColor","outlineOffset","outlineColor","outlineStyle","outlineWidth","borderRadius","verticalPadding","horizontalPadding","fallback","labelTextColor","iconColor","cssVarList","fill","labelTextDecoration","labelSpacing","iconSize","slots","wrappedEleName","excludeAttrsSync","color","clickableMixin","superclass","isLoading","click","RawIcon","observedAttributes","toggleVisibility","src","isVisible","updateFillColor","node","querySelectorAll","forEach","ele","setAttribute","IconClass","attributeChangedCallback","attrName","oldValue","newValue","then","res","clonedNode","cloneNode","appendChild","createSvgEle","text","clean","sanitize","USE_PROFILES","svg","svgFilters","DOMParser","parseFromString","querySelector","createIcon","async","startsWith","isBase64Svg","svgXml","atob","slice","base64Prefix","path","match","getFileExtension","fetchedSrc","fetch","document","createElement","createImgEle","setProperty","observedAttrs","TextFieldClass","proxyProps","useProxyTargets","concat","icon","renderCopyToClipboard","shouldRender","remove","iconInitConfig","title","iconCopiedConfig","Object","assign","slot","baseElement","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","inputOutlineWidth","inputOutlineOffset","placeholder","requiredIndicator","inputField","input","inputMask","helperText","errorMessage","disabledPlaceholder","inputDisabled","inputIcon","externalInput","externalInputDisabled","externalPlaceholder","externalDisabledPlaceholder","labelFontSize","labelFontWeight","hostMinWidth","inputDirection","inputBackgroundColor","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","helperTextColor","inputValueTextColor","inputCaretTextColor","labelRequiredIndicator","inputBorderColor","inputBorderWidth","inputBorderStyle","inputBorderRadius","inputHeight","inputHorizontalPadding","inputOutlineColor","inputOutlineStyle","inputTextAlign","inputPlaceholderColor","labelPosition","labelTopPosition","labelHorizontalPosition","inputTransformY","inputTransition","marginInlineStart","placeholderOpacity","inputVerticalAlignment","valueInputHeight","valueInputMarginBottom","inputIconOffset","inputIconSize","inputIconColor","inputAttrs","BaseInputClass","separator","attributeValue","attributeInput","inputValue","valueInput","mapping","entries","console","error","attribute","dispatchEvent","InputEvent","bubbles","composed","shadowRoot","inputs","removeButton","includeAttrs","mapAttrs","options","initRemoveButton","CustomEvent","getValidity","badInput","reportValidity","checkValidity","handleSeparatorChange","textContent","invalid","defaultErrorMsgValueMissing","isValidDataType","data","every","obj","Array","isArray","getOwnPropertyNames","keys","trim","e","labelValue","labelAttr","buttonLabel","addNewMappingItem","focusNewItem","newMappingItem","mappingsContainerEle","setCustomValidity","resetInvalidIndication","undefined","items","from","reduce","acc","item","currentItems","i","removeChild","index","mappingItem","labelsEle","buttonContainer","initLabels","initAddButton","isDisabled","button","onclick","isTrusted","contains","removeAttribute","bind","errorItem","find","validity","isInvalid","toggleAttribute","labels","labelsText","valueLabel","attrLabel","labelsContainer","MappingsFieldClass","separatorFontSize","labelsFontSize","labelsLineHeight","itemMarginBottom","valueLabelMinWidth","attrLabelMinWidth","labelsMarginBottom","separatorWidth","removeButtonWidth","inputEvent","proxyParentValidation","defaultValues","defaultValuesAttr","JSON","parse","message","setDefaultValues","initialDefaultValues","inputElement","template","content","groupInputElement","mappingsElement","handleMappingsInvalidChange","changedAttributes","includes","hasAttribute","initFocusHandler","group","groupInput","SamlGroupMappingsClass","groupNameInputMarginBottom","triggerValidationEvents","useHostExternalPadding","resetInputContainer","name","resetInputField","resetInputCursor","resetInputPlaceholder","resetInputFieldDefaultWidth","resetInputReadonlyStyle","resetInputFieldInvalidBackgroundColor","resetInputOverrides","resetInputAutoFill","resetInitialHeight","resetInputElement","resetInputFieldUnderlayingBorder","resetInputLabelPosition","inputFloatingLabelStyle"],"sourceRoot":""}
@@ -1 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878],{69473:(t,e,n)=>{n.d(e,{T:()=>a,w:()=>c});var i=n(94619),s=n(93826),o=n(7138),r=n(14944),u=n(33177);const a=(0,r.xE)("text-field"),l=["type","label-type","copy-to-clipboard"],c=(0,o.Zz)((0,i.RF)({mappings:s.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return l.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,u.$J)("vaadin-text-field")}\n\t\t\t${(0,u.cy)(c.cssVarList)}\n\t\t\t${(0,u.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,u.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:a}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w,componentName:()=>i.T}),n(63970),n(23638),n(80201);var i=n(69473);customElements.define(i.T,i.w)},32413:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>u});var i=n(25827),s=n(14944),o=n(44066),r=n(41611);const u=(0,s.xE)("phone-field-internal"),a=["disabled","size","bordered","readonly","allow-alphanumeric-input"],l=["country-input-placeholder","default-code","restrict-countries"],c=["phone-input-placeholder","maxlength","autocomplete","name"],p=["label-type","country-input-label","label"],d={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(a,l,c,p),b=(0,i.y)({componentName:u,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${o.A.map((t=>(0,r.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,s.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,s.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,r.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,i=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:i?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?o.A.filter((e=>t.includes(e.code))):o.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,r.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=d[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=d[t]||t;a.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):l.includes(t)?this.countryCodeInput.setAttribute(e,n):c.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}p.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},54930:(t,e,n)=>{n.r(e),n(11738),n(89348);var i=n(32413);customElements.define(i.T,i.A)},41611:(t,e,n)=>{n.d(e,{$B:()=>s,lq:()=>o});var i=n(94327);const s=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,o=t=>{const e=t||"";let n="",s="";const o=(0,i.l)(e);if(o)o.countryCallingCode&&(n=`+${o.countryCallingCode}`),o.nationalNumber&&(s=o.nationalNumber);else{const[t,i]=e.split("-");n=t||"",s=i||""}return[n,s]}}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878],{79275:(t,e,n)=>{n.d(e,{T:()=>a,w:()=>c});var i=n(79365),s=n(6424),o=n(9696),r=n(97810),u=n(73551);const a=(0,r.xE)("text-field"),l=["type","label-type","copy-to-clipboard"],c=(0,o.Zz)((0,i.RF)({mappings:s.A}),i.VO,(0,i.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),i.tQ,(t=>class extends t{static get observedAttributes(){return l.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,i.tz)({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(${c.cssVarList.inputOutlineWidth}) + var(${c.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,u.$J)("vaadin-text-field")}\n\t\t\t${(0,u.cy)(c.cssVarList)}\n\t\t\t${(0,u.LJ)("vaadin-text-field",c.cssVarList)}\n ${(0,u.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:a}))},21374:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>i.w,componentName:()=>i.T}),n(11284),n(37182),n(95260);var i=n(79275);customElements.define(i.T,i.w)},84015:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>u});var i=n(3393),s=n(97810),o=n(51680),r=n(49157);const u=(0,s.xE)("phone-field-internal"),a=["disabled","size","bordered","readonly","allow-alphanumeric-input"],l=["country-input-placeholder","default-code","restrict-countries"],c=["phone-input-placeholder","maxlength","autocomplete","name"],p=["label-type","country-input-label","label"],d={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(a,l,c,p),b=(0,i.y)({componentName:u,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${o.A.map((t=>(0,r.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,s.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,s.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,r.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,i=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:i?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?o.A.filter((e=>t.includes(e.code))):o.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,r.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=d[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=d[t]||t;a.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):l.includes(t)?this.countryCodeInput.setAttribute(e,n):c.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}p.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},92132:(t,e,n)=>{n.r(e),n(27092),n(21374);var i=n(84015);customElements.define(i.T,i.A)},49157:(t,e,n)=>{n.d(e,{$B:()=>s,lq:()=>o});var i=n(10473);const s=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,o=t=>{const e=t||"";let n="",s="";const o=(0,i.l)(e);if(o)o.countryCallingCode&&(n=`+${o.countryCallingCode}`),o.nationalNumber&&(s=o.nationalNumber);else{const[t,i]=e.split("-");n=t||"",s=i||""}return[n,s]}}}]);
2
+ //# sourceMappingURL=phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-fields-descope-phone-field-descope-phone-field-internal-index-js.js","mappings":"2NAiBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBA+EhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CAAEC,WAAY,CAAC,QAAS,kBAAmBC,iBAAiB,IAC5E,MAnFmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAC,GACEC,MAAMD,QACR,CAEA,qBAAAE,CAAsBC,GACpB,IAAKA,EAEH,YADAC,KAAKL,MAAMM,SAIb,MAAMC,EAAiB,CACrBP,KAAM,gBACNQ,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBV,KAAM,wBACNQ,MAAO,SACPC,MAAO,mBAGTJ,KAAKL,KAAOW,OAAOC,OAAOC,SAASC,cAAc,eAAgB,CAC/DC,KAAM,YACHR,IAGLF,KAAKW,YAAYC,YAAYZ,KAAKL,MAClCK,KAAKL,KAAKkB,iBAAiB,SAAS,KAClCC,UAAUC,UAAUC,UAAUhB,KAAKiB,OACnCX,OAAOC,OAAOP,KAAKL,KAAMU,GAGzBa,YAAW,KACTZ,OAAOC,OAAOP,KAAKL,KAAMO,EAAe,GACvC,IAAK,GAEZ,CAEA,YAAAiB,GACEnB,K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B,EAAMoB,KAC/CzE,EAAa6D,SAAS5E,GAC/BtB,KAAKiD,iBAAiB+D,aAAatB,EAAMoB,GAChCxE,EAAW4D,SAAS5E,IAC7BtB,KAAKmD,iBAAiB6D,aAAatB,EAAMoB,EAE7C,CAEIvE,EAAe2D,SAAS5E,IAC1BtB,KAAK6G,qBAAqBvF,EAAUwF,GAGrB,uBAAbxF,GACFtB,KAAK+F,uBAAuB/F,KAAKyF,yBAErC,CACF,E,0DC1QFvD,eAAeC,OAAO,IAAe,I,4DCD9B,MAGMkF,EAAe,EAAGlB,OAAM3C,WAAU8D,KAAMC,KAAc,0BAEtD/D,sBACE2C,KAAQ3C,KAAY+D,8BACZpB,uDAPO,CAACA,GAC7B,+DAA+DA,EAAKqB,oBAUtDC,CAAetB,gDAEpBoB,gDAGApB,yBACA3C,mCAKEkE,EAAoBnE,IAC/B,MAAMtC,EAAQsC,GAAO,GACrB,IAAIQ,EAAc,GACdC,EAAc,GAGlB,MAAM2D,GAAS,OAA2B1G,GAE1C,GAAI0G,EACEA,EAAOC,qBACT7D,EAAc,IAAI4D,EAAOC,sBAGvBD,EAAOE,iBACT7D,EAAc2D,EAAOE,oBAElB,CAEL,MAAON,EAASO,GAAS7G,EAAMwC,MAAM,KACrCM,EAAcwD,GAAW,GACzBvD,EAAc8D,GAAS,EACzB,CAEA,MAAO,CAAC/D,EAAaC,EAAY,C","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/helpers.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n 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(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../../helpers/componentHelpers';\nimport CountryCodes from '../../CountryCodes';\nimport { comboBoxItem, parsePhoneNumber } from '../helpers';\n\nexport const componentName = getComponentName('phone-field-internal');\n\nconst commonAttrs = ['disabled', 'size', 'bordered', 'readonly', 'allow-alphanumeric-input'];\nconst countryAttrs = ['country-input-placeholder', 'default-code', 'restrict-countries'];\nconst phoneAttrs = ['phone-input-placeholder', 'maxlength', 'autocomplete', 'name'];\nconst labelTypeAttrs = ['label-type', 'country-input-label', 'label'];\nconst mapAttrs = {\n 'country-input-label': 'label',\n 'country-input-placeholder': 'placeholder',\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst inputRelatedAttrs = [].concat(commonAttrs, countryAttrs, phoneAttrs, labelTypeAttrs);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div class=\"wrapper\">\n <descope-combo-box\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n >\n ${CountryCodes.map((item) => comboBoxItem(item)).join('')}\n </descope-combo-box>\n <div class=\"separator\"></div>\n <descope-text-field type=\"tel\"></descope-text-field>\n </div>\n `;\n\n this.countryCodeInput = this.querySelector('descope-combo-box');\n this.phoneNumberInput = this.querySelector('descope-text-field');\n this.inputs = [this.countryCodeInput, this.phoneNumberInput];\n\n forwardAttrs(this, this.countryCodeInput, { includeAttrs: ['label-type'] });\n forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type', 'required'] });\n\n // override combo box setter to display dialCode value in input\n this.countryCodeInput.customValueTransformFn = (val) => {\n const [, dialCode] = val?.split?.(' ') || [];\n return dialCode;\n };\n }\n\n get countryCodeInputData() {\n return this.countryCodeInput.items;\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get value() {\n if (!this.phoneNumberValue) {\n return '';\n }\n return `${this.countryCodeInput.value}-${this.phoneNumberInput.value}`;\n }\n\n set value(val) {\n const [countryCode, phoneNumber] = parsePhoneNumber(val);\n\n this.#setCountryCode(countryCode);\n this.#setPhoneNumber(phoneNumber);\n }\n\n setSelectionRange(...args) {\n this.phoneNumberInput.setSelectionRange(...args);\n }\n\n get selectionStart() {\n return this.phoneNumberInput.selectionStart;\n }\n\n #setCountryCode(val) {\n if (val) {\n const countryCodeItem = this.getCountryByDialCode(val);\n if (countryCodeItem) {\n this.countryCodeInput.selectedItem = countryCodeItem;\n }\n } else {\n this.countryCodeInput.selectedItem = undefined;\n }\n }\n\n #setPhoneNumber(val) {\n if (this.phoneNumberInput.value === val) {\n return;\n }\n\n this.phoneNumberInput.value = val;\n }\n\n get phoneNumberValue() {\n return this.phoneNumberInput.value;\n }\n\n get countryCodeValue() {\n return this.countryCodeInput.shadowRoot.querySelector('input').value;\n }\n\n get phoneNumberInputEle() {\n return this.phoneNumberInput.shadowRoot.querySelector('input');\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n getValidity() {\n const hasCode = this.countryCodeInput.value;\n const hasPhone = this.phoneNumberInput.value;\n const emptyValue = !hasCode || !hasPhone;\n const hasMinPhoneLength =\n this.phoneNumberInput.value?.length && this.phoneNumberInput.value.length < this.minLength;\n\n if (this.isRequired && emptyValue) {\n return { valueMissing: true };\n }\n if (hasMinPhoneLength) {\n return { tooShort: true };\n }\n if (hasPhone && !hasCode) {\n return { valueMissing: true };\n }\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) this.inputs[1].focus();\n });\n\n super.init?.();\n this.initInputs();\n }\n\n getRestrictedCountries() {\n const attr = this.getAttribute('restrict-countries');\n return attr ? attr.split(',') : [];\n }\n\n getCountryByDialCode(countryDialCode) {\n return this.countryCodeInput.items?.find((c) => c.getAttribute('data-id') === countryDialCode);\n }\n\n getCountryByCodeId(countryCode) {\n return this.countryCodeInput.items?.find(\n (c) => c.getAttribute('data-country-code') === countryCode\n );\n }\n\n updateCountryCodeItems(restrictCountries) {\n const items = restrictCountries.length\n ? CountryCodes.filter((c) => restrictCountries.includes(c.code))\n : CountryCodes;\n this.querySelector('descope-combo-box').innerHTML = items\n .map((item) => comboBoxItem(item))\n .join('');\n }\n\n handleDefaultCountryCode(countryCode) {\n if (!this.countryCodeInput.value) {\n const countryCodeItem = this.getCountryByCodeId(countryCode);\n // When replacing the input component (inserting internal component into text-field) -\n // Vaadin resets the input's value. We use setTimeout in order to make sure this happens\n // after the reset.\n if (countryCodeItem) {\n setTimeout(() => {\n this.countryCodeInput.selectedItem = countryCodeItem;\n });\n }\n }\n }\n\n initInputs() {\n // Sanitize phone input value to filter everything but digits\n this.phoneNumberInput.addEventListener('input', (e) => {\n // we want to update only phoneNumberInput, and avoid triggering `set value`\n e.stopPropagation();\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^\\d$/;\n const sanitizedInput = e.target.value\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n e.target.value = sanitizedInput;\n }\n });\n\n this.handleFocusEventsDispatching(this.inputs);\n this.handleInputEventDispatching();\n }\n\n handleLabelTypeAttrs(attrName, newValue) {\n // set or remove label attributes from inner text/combo components on `label-type` change\n const attr = mapAttrs[attrName] || attrName;\n\n if (attrName === 'label-type') {\n this.onLabelTypeChange(newValue);\n }\n // on inner components label attr change - set label attributes for text/combo components\n // only if label-type is `floating`\n else if (this.getAttribute('label-type') === 'floating') {\n if (attrName === 'country-input-label') {\n this.countryCodeInput.setAttribute(attr, newValue);\n } else if (attrName === 'label') {\n this.phoneNumberInput.setAttribute(attr, newValue);\n }\n }\n }\n\n onLabelTypeChange(newValue) {\n if (newValue === 'floating') {\n // on change to `floating` label - set inner components `label` and `placeholder`\n this.countryCodeInput.setAttribute('label', this.getAttribute('country-input-label') || '');\n this.countryCodeInput.setAttribute(\n 'placeholder',\n this.getAttribute('country-input-placeholder') || ''\n );\n this.phoneNumberInput.setAttribute('label', this.getAttribute('label') || '');\n this.phoneNumberInput.setAttribute(\n 'placeholder',\n this.getAttribute('phone-input-placeholder') || ''\n );\n } else {\n // for other cases - reset inner components label-type and labels\n this.inputs.forEach((input) => input.removeAttribute('label'));\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'default-code' && newValue) {\n this.handleDefaultCountryCode(newValue);\n } else if (inputRelatedAttrs.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n\n if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => input.setAttribute(attr, newValue));\n } else if (countryAttrs.includes(attrName)) {\n this.countryCodeInput.setAttribute(attr, newValue);\n } else if (phoneAttrs.includes(attrName)) {\n this.phoneNumberInput.setAttribute(attr, newValue);\n }\n }\n\n if (labelTypeAttrs.includes(attrName)) {\n this.handleLabelTypeAttrs(attrName, newValue);\n }\n\n if (attrName === 'restrict-countries') {\n this.updateCountryCodeItems(this.getRestrictedCountries());\n }\n }\n }\n}\n\nexport default PhoneFieldInternal;\n","import '@descope-ui/descope-combo-box';\nimport '../../../descope-text-field';\n\nimport PhoneFieldInternal, { componentName } from './PhoneFieldInternal';\n\ncustomElements.define(componentName, PhoneFieldInternal);\n","import { parsePhoneNumberFromString } from 'libphonenumber-js/min';\n\n// We use JSDelivr (proxy by static.descope.com) in order to fetch the images as image file from this library (svg-country-flags)\n// This reduces our bundle size, and we use it as a static remote resource.\nexport const getCountryFlag = (code) =>\n `https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${code.toLowerCase()}.svg`;\n\nexport const comboBoxItem = ({ code, dialCode, name: country }) => `\n\t<div\n\t\tdata-id=\"${dialCode}\"\n\t\tdata-name=\"${code} ${dialCode} ${country}\"\n\t\tdata-country-code=\"${code}\"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src=\"${getCountryFlag(code)}\" width=\"20\"/>\n\t\t\t</span>\n\t\t\t<span>${country}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${code}</span>\n\t\t\t<span>${dialCode}</span>\n\t\t</div>\n\t</div>\n`;\n\nexport const parsePhoneNumber = (val) => {\n const value = val || '';\n let countryCode = '';\n let phoneNumber = '';\n\n // Attempt to parse the value using libphonenumber-js\n const parsed = parsePhoneNumberFromString(value);\n\n if (parsed) {\n if (parsed.countryCallingCode) {\n countryCode = `+${parsed.countryCallingCode}`;\n }\n\n if (parsed.nationalNumber) {\n phoneNumber = parsed.nationalNumber;\n }\n } else {\n // Fallback: assume a dash separates country code and phone number\n const [country, phone] = value.split('-');\n countryCode = country || '';\n phoneNumber = phone || '';\n }\n\n return [countryCode, phoneNumber];\n};\n"],"names":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","renderCopyToClipboard","shouldRender","this","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","baseElement","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","commonAttrs","countryAttrs","phoneAttrs","labelTypeAttrs","mapAttrs","inputRelatedAttrs","BaseInputClass","baseSelector","constructor","innerHTML","map","item","join","countryCodeInput","querySelector","phoneNumberInput","inputs","includeAttrs","customValueTransformFn","val","dialCode","split","countryCodeInputData","items","allowAlphanumericInput","getAttribute","phoneNumberValue","countryCode","phoneNumber","setSelectionRange","args","selectionStart","countryCodeItem","getCountryByDialCode","selectedItem","undefined","countryCodeValue","shadowRoot","phoneNumberInputEle","minLength","parseInt","getValidity","hasCode","hasPhone","emptyValue","hasMinPhoneLength","length","isRequired","valueMissing","tooShort","e","isTrusted","initInputs","getRestrictedCountries","attr","countryDialCode","find","c","getCountryByCodeId","updateCountryCodeItems","restrictCountries","filter","includes","code","handleDefaultCountryCode","stopPropagation","telDigitsRegExp","sanitizedInput","target","char","test","handleFocusEventsDispatching","handleInputEventDispatching","handleLabelTypeAttrs","newValue","onLabelTypeChange","setAttribute","forEach","input","removeAttribute","oldValue","comboBoxItem","name","country","toLowerCase","getCountryFlag","parsePhoneNumber","parsed","countryCallingCode","nationalNumber","phone"],"sourceRoot":""}
@@ -1 +1,2 @@
1
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{69473:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>d});var o=n(94619),i=n(93826),r=n(7138),a=n(14944),s=n(33177);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,r.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,o.tz)({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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(d.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:l}))},89348:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>o.w,componentName:()=>o.T}),n(63970),n(23638),n(80201);var o=n(69473);customElements.define(o.T,o.w)},23758:(t,e,n)=>{n.d(e,{NF:()=>A,TQ:()=>h});var o=n(32413),i=n(14944),r=n(7138),a=n(94619),s=n(69473),l=n(44976),p=n(44066),d=n(33177);const u=s.w.cssVarList,c=l.C.cssVarList,h=(0,i.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:v,phoneInput:C,separator:x,errorMessage:I,helperText:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,r.Zz)((0,a.RF)({mappings:{fontSize:[b,g,{selector:s.w.componentName,property:s.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,I,w,{...v,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...v,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"border-style"},{...x,property:"border-left-style"}],inputBorderWidth:[{...f,property:"border-width"},{...x,property:"border-left-width"}],inputBorderColor:[{...f,property:"border-color"},{...x,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...v,property:c.hostWidth},countryCodeDropdownWidth:{...v,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...v,property:"padding-left"},{...v,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...I,property:"color"},errorMessageIcon:{...I,property:"background-image"},errorMessageIconSize:{...I,property:"background-size"},errorMessageIconPadding:{...I,property:"padding-inline-start"},errorMessageIconRepeat:{...I,property:"background-repeat"},errorMessageIconPosition:{...I,property:"background-position"},inputValueTextColor:[{...C,property:u.inputValueTextColor},{...v,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...v,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:u.valueInputMarginBottom}],marginInlineStart:[{...C,property:u.marginInlineStart},{...v,property:c.marginInlineStart}]}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return p.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),(0,i.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map((t=>t.getAttribute("data-country-code")))}}))((0,a.tz)({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: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,d.cy)(A.cssVarList)}\n\t\t\t${(0,d.I4)("vaadin-text-field")}\n\t\t\t${(0,d.kG)("vaadin-text-field")}\n\t\t\t${(0,d.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-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 direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${A.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,d.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},32413:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>s});var o=n(25827),i=n(14944),r=n(44066),a=n(41611);const s=(0,i.xE)("phone-field-internal"),l=["disabled","size","bordered","readonly","allow-alphanumeric-input"],p=["country-input-placeholder","default-code","restrict-countries"],d=["phone-input-placeholder","maxlength","autocomplete","name"],u=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,p,d,u),b=(0,o.y)({componentName:s,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map((t=>(0,a.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,i.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,i.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,a.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,o=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:o?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?r.A.filter((e=>t.includes(e.code))):r.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):p.includes(t)?this.countryCodeInput.setAttribute(e,n):d.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}u.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},54930:(t,e,n)=>{n.r(e),n(11738),n(89348);var o=n(32413);customElements.define(o.T,o.A)},41611:(t,e,n)=>{n.d(e,{$B:()=>i,lq:()=>r});var o=n(94327);const i=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tstyle="display:flex; flex-direction: column;"\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",i="";const r=(0,o.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(i=r.nationalNumber);else{const[t,o]=e.split("-");n=t||"",i=o||""}return[n,i]}},96442:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>o.NF,componentName:()=>o.TQ}),n(54930),n(11738),n(89348);var o=n(23758);customElements.define(o.TQ,o.NF)}}]);
1
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[2878,9894],{79275:(t,e,n)=>{n.d(e,{T:()=>l,w:()=>d});var o=n(79365),i=n(6424),r=n(9696),a=n(97810),s=n(73551);const l=(0,a.xE)("text-field"),p=["type","label-type","copy-to-clipboard"],d=(0,r.Zz)((0,o.RF)({mappings:i.A}),o.VO,(0,o.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),o.tQ,(t=>class extends t{static get observedAttributes(){return p.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},n={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,n),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,n){super.attributeChangeCallback?.(t,e,n),"type"===t&&this.baseElement._setType(n),e!==n&&("label-type"===t?"floating"===n?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===n))}}))((0,o.tz)({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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,s.$J)("vaadin-text-field")}\n\t\t\t${(0,s.cy)(d.cssVarList)}\n\t\t\t${(0,s.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,s.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:l}))},21374:(t,e,n)=>{n.r(e),n.d(e,{TextFieldClass:()=>o.w,componentName:()=>o.T}),n(11284),n(37182),n(95260);var o=n(79275);customElements.define(o.T,o.w)},81808:(t,e,n)=>{n.d(e,{NF:()=>A,TQ:()=>h});var o=n(84015),i=n(97810),r=n(9696),a=n(79365),s=n(79275),l=n(86365),p=n(51680),d=n(73551);const u=s.w.cssVarList,c=l.C.cssVarList,h=(0,i.xE)("phone-field"),{host:b,label:y,requiredIndicator:m,inputField:g,internalAfter:f,countryCodeInput:v,phoneInput:C,separator:x,errorMessage:I,helperText:w}={host:{selector:()=>":host"},label:{selector:"::part(label)"},requiredIndicator:{selector:"[required]::part(required-indicator)::after"},inputField:{selector:"::part(input-field)"},internalAfter:{selector:"descope-phone-field-internal::after"},phoneInput:{selector:()=>"descope-text-field"},countryCodeInput:{selector:()=>"descope-combo-box"},separator:{selector:"descope-phone-field-internal .separator"},helperText:{selector:"::part(helper-text)"},errorMessage:{selector:"::part(error-message)"}},A=(0,r.Zz)((0,a.RF)({mappings:{fontSize:[b,g,{selector:s.w.componentName,property:s.w.cssVarList.fontSize},{selector:l.C.componentName,property:l.C.cssVarList.fontSize}],fontFamily:[y,I,w,{...v,property:l.C.cssVarList.overlay.fontFamily}],hostWidth:[{...b,property:"width"},{...C,property:"width"},{...v,property:"--vaadin-combo-box-overlay-width"}],hostDirection:{...b,property:"direction"},inputBorderStyle:[{...f,property:"border-style"},{...x,property:"border-left-style"}],inputBorderWidth:[{...f,property:"border-width"},{...x,property:"border-left-width"}],inputBorderColor:[{...f,property:"border-color"},{...x,property:"border-left-color"}],inputBorderRadius:[{...g,property:"border-radius"},{...f,property:"border-radius"}],countryCodeInputWidth:{...v,property:c.hostWidth},countryCodeDropdownWidth:{...v,property:"--vaadin-combo-box-overlay-width"},phoneInputWidth:{...C,property:"width"},horizontalPadding:[{...C,property:"padding-left"},{...C,property:"padding-right"},{...v,property:"padding-left"},{...v,property:"padding-right"}],labelTextColor:[{...y,property:"color"},{...m,property:"color"}],labelRequiredIndicator:{...m,property:"content"},errorMessageTextColor:{...I,property:"color"},errorMessageIcon:{...I,property:"background-image"},errorMessageIconSize:{...I,property:"background-size"},errorMessageIconPadding:{...I,property:"padding-inline-start"},errorMessageIconRepeat:{...I,property:"background-repeat"},errorMessageIconPosition:{...I,property:"background-position"},inputValueTextColor:[{...C,property:u.inputValueTextColor},{...v,property:c.inputValueTextColor}],inputPlaceholderTextColor:{...C,property:u.inputPlaceholderColor},overlayItemBackgroundColor:{selector:"descope-combo-box",property:c.overlayItemBackgroundColor},inputOutlineStyle:{...g,property:"outline-style"},inputOutlineColor:{...g,property:"outline-color"},inputOutlineWidth:{...g,property:"outline-width"},inputOutlineOffset:{...g,property:"outline-offset"},valueInputHeight:[{...v,property:c.valueInputHeight}],valueInputMarginBottom:[{...C,property:u.valueInputMarginBottom}],marginInlineStart:[{...C,property:u.marginInlineStart},{...v,property:c.marginInlineStart}]}}),a.VO,(0,a.OZ)({proxyProps:["value","selectionStart"]}),(t=>class extends t{static get CountryCodes(){return p.A}init(){super.init?.();const t=document.createElement("template");t.innerHTML=`\n\t\t\t\t<${o.T}\n\t\t\t\t\ttabindex="-1"\n\t\t\t\t\tslot="input"\n\t\t\t\t></${o.T}>\n \t\t`,this.baseElement.appendChild(t.content.cloneNode(!0)),this.inputElement=this.shadowRoot.querySelector(o.T),(0,i.EA)(this.shadowRoot.host,this.inputElement,{includeAttrs:["size","bordered","invalid","minlength","maxlength","default-code","country-input-placeholder","phone-input-placeholder","disabled","restrict-countries","country-input-label","readonly","label","label-type","allow-alphanumeric-input"]})}get countryCodeItems(){return this.inputElement?.countryCodeValue}get phoneNumberInputEle(){return this.inputElement?.phoneNumberInputEle}get countryCodeInputData(){return this.inputElement?.countryCodeInputData}get countryCodes(){return Array.from(this.inputElement.countryCodeInputData).map((t=>t.getAttribute("data-country-code")))}}))((0,a.tz)({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: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${(0,d.cy)(A.cssVarList)}\n\t\t\t${(0,d.I4)("vaadin-text-field")}\n\t\t\t${(0,d.kG)("vaadin-text-field")}\n\t\t\t${(0,d.X6)()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-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 direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${A.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n \n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${c.inputOutlineWidth}: 0;\n\t\t\t\t${c.inputOutlineOffset}: 0;\n\t\t\t\t${c.inputBorderWidth}: 0;\n\t\t\t\t${c.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${u.inputOutlineWidth}: 0;\n\t\t\t\t${u.inputOutlineOffset}: 0;\n\t\t\t\t${u.inputBorderWidth}: 0;\n\t\t\t\t${u.inputBorderRadius}: 0;\n }\n\n :host([label-type="floating"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${(0,d.$J)("vaadin-text-field")}\n\t\t`,excludeAttrsSync:["tabindex"],componentName:h}))},84015:(t,e,n)=>{n.d(e,{A:()=>y,T:()=>s});var o=n(3393),i=n(97810),r=n(51680),a=n(49157);const s=(0,i.xE)("phone-field-internal"),l=["disabled","size","bordered","readonly","allow-alphanumeric-input"],p=["country-input-placeholder","default-code","restrict-countries"],d=["phone-input-placeholder","maxlength","autocomplete","name"],u=["label-type","country-input-label","label"],c={"country-input-label":"label","country-input-placeholder":"placeholder","phone-input-placeholder":"placeholder"},h=[].concat(l,p,d,u),b=(0,o.y)({componentName:s,baseSelector:"div"}),y=class extends b{static get observedAttributes(){return[].concat(b.observedAttributes||[],h)}constructor(){super(),this.innerHTML=`\n <div class="wrapper">\n <descope-combo-box\n item-label-path="data-name"\n item-value-path="data-id"\n >\n ${r.A.map((t=>(0,a.$B)(t))).join("")}\n </descope-combo-box>\n <div class="separator"></div>\n <descope-text-field type="tel"></descope-text-field>\n </div>\n `,this.countryCodeInput=this.querySelector("descope-combo-box"),this.phoneNumberInput=this.querySelector("descope-text-field"),this.inputs=[this.countryCodeInput,this.phoneNumberInput],(0,i.EA)(this,this.countryCodeInput,{includeAttrs:["label-type"]}),(0,i.EA)(this,this.phoneNumberInput,{includeAttrs:["label-type","required"]}),this.countryCodeInput.customValueTransformFn=t=>{const[,e]=t?.split?.(" ")||[];return e}}get countryCodeInputData(){return this.countryCodeInput.items}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){return this.phoneNumberValue?`${this.countryCodeInput.value}-${this.phoneNumberInput.value}`:""}set value(t){const[e,n]=(0,a.lq)(t);this.#t(e),this.#e(n)}setSelectionRange(...t){this.phoneNumberInput.setSelectionRange(...t)}get selectionStart(){return this.phoneNumberInput.selectionStart}#t(t){if(t){const e=this.getCountryByDialCode(t);e&&(this.countryCodeInput.selectedItem=e)}else this.countryCodeInput.selectedItem=void 0}#e(t){this.phoneNumberInput.value!==t&&(this.phoneNumberInput.value=t)}get phoneNumberValue(){return this.phoneNumberInput.value}get countryCodeValue(){return this.countryCodeInput.shadowRoot.querySelector("input").value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}getValidity(){const t=this.countryCodeInput.value,e=this.phoneNumberInput.value,n=!t||!e,o=this.phoneNumberInput.value?.length&&this.phoneNumberInput.value.length<this.minLength;return this.isRequired&&n?{valueMissing:!0}:o?{tooShort:!0}:e&&!t?{valueMissing:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.inputs[1].focus()})),super.init?.(),this.initInputs()}getRestrictedCountries(){const t=this.getAttribute("restrict-countries");return t?t.split(","):[]}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-id")===t))}getCountryByCodeId(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}updateCountryCodeItems(t){const e=t.length?r.A.filter((e=>t.includes(e.code))):r.A;this.querySelector("descope-combo-box").innerHTML=e.map((t=>(0,a.$B)(t))).join("")}handleDefaultCountryCode(t){if(!this.countryCodeInput.value){const e=this.getCountryByCodeId(t);e&&setTimeout((()=>{this.countryCodeInput.selectedItem=e}))}}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{if(t.stopPropagation(),!this.allowAlphanumericInput){const e=/^\d$/,n=t.target.value.split("").filter((t=>e.test(t))).join("");t.target.value=n}})),this.handleFocusEventsDispatching(this.inputs),this.handleInputEventDispatching()}handleLabelTypeAttrs(t,e){const n=c[t]||t;"label-type"===t?this.onLabelTypeChange(e):"floating"===this.getAttribute("label-type")&&("country-input-label"===t?this.countryCodeInput.setAttribute(n,e):"label"===t&&this.phoneNumberInput.setAttribute(n,e))}onLabelTypeChange(t){"floating"===t?(this.countryCodeInput.setAttribute("label",this.getAttribute("country-input-label")||""),this.countryCodeInput.setAttribute("placeholder",this.getAttribute("country-input-placeholder")||""),this.phoneNumberInput.setAttribute("label",this.getAttribute("label")||""),this.phoneNumberInput.setAttribute("placeholder",this.getAttribute("phone-input-placeholder")||"")):this.inputs.forEach((t=>t.removeAttribute("label")))}attributeChangedCallback(t,e,n){if(super.attributeChangedCallback(t,e,n),e!==n){if("default-code"===t&&n)this.handleDefaultCountryCode(n);else if(h.includes(t)){const e=c[t]||t;l.includes(t)?this.inputs.forEach((t=>t.setAttribute(e,n))):p.includes(t)?this.countryCodeInput.setAttribute(e,n):d.includes(t)&&this.phoneNumberInput.setAttribute(e,n)}u.includes(t)&&this.handleLabelTypeAttrs(t,n),"restrict-countries"===t&&this.updateCountryCodeItems(this.getRestrictedCountries())}}}},92132:(t,e,n)=>{n.r(e),n(27092),n(21374);var o=n(84015);customElements.define(o.T,o.A)},49157:(t,e,n)=>{n.d(e,{$B:()=>i,lq:()=>r});var o=n(10473);const i=({code:t,dialCode:e,name:n})=>`\n\t<div\n\t\tdata-id="${e}"\n\t\tdata-name="${t} ${e} ${n}"\n\t\tdata-country-code="${t}"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src="${(t=>`https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${t.toLowerCase()}.svg`)(t)}" width="20"/>\n\t\t\t</span>\n\t\t\t<span>${n}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${t}</span>\n\t\t\t<span>${e}</span>\n\t\t</div>\n\t</div>\n`,r=t=>{const e=t||"";let n="",i="";const r=(0,o.l)(e);if(r)r.countryCallingCode&&(n=`+${r.countryCallingCode}`),r.nationalNumber&&(i=r.nationalNumber);else{const[t,o]=e.split("-");n=t||"",i=o||""}return[n,i]}},98136:(t,e,n)=>{n.r(e),n.d(e,{PhoneFieldClass:()=>o.NF,componentName:()=>o.TQ}),n(92132),n(27092),n(21374);var o=n(81808);customElements.define(o.TQ,o.NF)}}]);
2
+ //# sourceMappingURL=phone-fields-descope-phone-field-index-js.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"phone-fields-descope-phone-field-index-js.js","mappings":"gOAiBO,MAAMA,GAAgB,QAAiB,cAExCC,EAAgB,CAAC,OAAQ,aAAc,qBA+EhCC,GAAiB,SAC5B,QAAiB,CACfC,SAAU,MAEZ,MACA,QAAgB,CAAEC,WAAY,CAAC,QAAS,kBAAmBC,iBAAiB,IAC5E,MAnFmBC,GACnB,cAA6BA,EAC3B,6BAAWC,GACT,OAAON,EAAcO,OAAOF,EAAWC,oBAAsB,GAC/D,CAEAE,KAEA,IAAAC,GACEC,MAAMD,QACR,CAEA,qBAAAE,CAAsBC,GACpB,IAAKA,EAEH,YADAC,KAAKL,MAAMM,SAIb,MAAMC,EAAiB,CACrBP,KAAM,gBACNQ,MAAO,OACPC,MAAO,mBAGHC,EAAmB,CACvBV,KAAM,wBACNQ,MAAO,SACPC,MAAO,mBAGTJ,KAAKL,KAAOW,OAAOC,OAAOC,SAASC,cAAc,eAAgB,CAC/DC,KAAM,YACHR,IAGLF,KAAKW,YAAYC,YAAYZ,KAAKL,MAClCK,KAAKL,KAAKkB,iBAAiB,SAAS,KAClCC,UAAUC,UAAUC,UAAUhB,KAAKiB,OACnCX,OAAOC,OAAOP,KAAKL,KAAMU,GAGzBa,YAAW,KACTZ,OAAOC,OAAOP,KAAKL,KAAMO,EAAe,GACvC,IAAK,GAEZ,CAEA,YAAAiB,GACEnB,KAAKoB,OACP,CAEA,wBAAAC,CAAyBC,EAAUC,EAAQC,GACzC3B,MAAM4B,0BAA0BH,EAAUC,EAAQC,GAOjC,SAAbF,GACFtB,KAAKW,YAAYe,SAASF,GAGxBD,IAAWC,IACI,eAAbF,EACa,aAAXE,EACFxB,KAAKa,iBAAiB,QAASb,KAAKmB,cAEpCnB,KAAK2B,oBAAoB,QAAS3B,KAAKmB,cAEnB,sBAAbG,GACTtB,KAAKF,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ACAtC,mCAKE6D,EAAoB9D,IAC/B,MAAMlG,EAAQkG,GAAO,GACrB,IAAIM,EAAc,GACdC,EAAc,GAGlB,MAAMwD,GAAS,OAA2BjK,GAE1C,GAAIiK,EACEA,EAAOC,qBACT1D,EAAc,IAAIyD,EAAOC,sBAGvBD,EAAOE,iBACT1D,EAAcwD,EAAOE,oBAElB,CAEL,MAAON,EAASO,GAASpK,EAAMoG,MAAM,KACrCI,EAAcqD,GAAW,GACzBpD,EAAc2D,GAAS,EACzB,CAEA,MAAO,CAAC5D,EAAaC,EAAY,C,4HC3CnCxF,eAAeC,OAAO,KAAe,K","sources":["webpack://@descope/web-components-ui/./src/components/descope-text-field/TextFieldClass.js","webpack://@descope/web-components-ui/./src/components/descope-text-field/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/PhoneFieldClass.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/descope-phone-field-internal/PhoneFieldInternal.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/descope-phone-field-internal/index.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/helpers.js","webpack://@descope/web-components-ui/./src/components/phone-fields/descope-phone-field/index.js"],"sourcesContent":["import {\n createStyleMixin,\n draggableMixin,\n createProxy,\n proxyInputMixin,\n componentNameValidationMixin,\n} from '../../mixins';\nimport textFieldMappings from './textFieldMappings';\nimport { compose } from '../../helpers';\nimport { getComponentName } from '../../helpers/componentHelpers';\nimport {\n inputFloatingLabelStyle,\n resetInputLabelPosition,\n resetInputOverrides,\n useHostExternalPadding,\n} from '../../helpers/themeHelpers/resetHelpers';\n\nexport const componentName = getComponentName('text-field');\n\nconst observedAttrs = ['type', 'label-type', 'copy-to-clipboard'];\n\nconst customMixin = (superclass) =>\n class TextFieldClass extends superclass {\n static get observedAttributes() {\n return observedAttrs.concat(superclass.observedAttributes || []);\n }\n\n icon;\n\n init() {\n super.init?.();\n }\n\n renderCopyToClipboard(shouldRender) {\n if (!shouldRender) {\n this.icon?.remove();\n return;\n }\n\n const iconInitConfig = {\n icon: 'vaadin:copy-o',\n title: 'Copy',\n style: 'cursor: pointer',\n };\n\n const iconCopiedConfig = {\n icon: 'vaadin:check-circle-o',\n title: 'Copied',\n style: 'cursor: initial',\n };\n\n this.icon = Object.assign(document.createElement('vaadin-icon'), {\n slot: 'suffix',\n ...iconInitConfig,\n });\n\n this.baseElement.appendChild(this.icon);\n this.icon.addEventListener('click', () => {\n navigator.clipboard.writeText(this.value);\n Object.assign(this.icon, iconCopiedConfig);\n\n // we want the icon to go back to the initial state after 5 seconds\n setTimeout(() => {\n Object.assign(this.icon, iconInitConfig);\n }, 5000);\n });\n }\n\n onLabelClick() {\n this.focus();\n }\n\n attributeChangedCallback(attrName, oldVal, newVal) {\n super.attributeChangeCallback?.(attrName, oldVal, newVal);\n\n // Vaadin doesn't allow to change the input type attribute.\n // We need the ability to do that, so we're overriding their\n // behavior with their private API.\n // When receiving a `type` attribute, we use their private API\n // to set it on the input.\n if (attrName === 'type') {\n this.baseElement._setType(newVal);\n }\n\n if (oldVal !== newVal) {\n if (attrName === 'label-type') {\n if (newVal === 'floating') {\n this.addEventListener('click', this.onLabelClick);\n } else {\n this.removeEventListener('click', this.onLabelClick);\n }\n } else if (attrName === 'copy-to-clipboard') {\n this.renderCopyToClipboard(newVal === 'true');\n }\n }\n }\n };\n\nexport const TextFieldClass = compose(\n createStyleMixin({\n mappings: textFieldMappings,\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'], useProxyTargets: true }),\n componentNameValidationMixin,\n customMixin\n)(\n createProxy({\n slots: ['prefix', 'suffix'],\n wrappedEleName: 'vaadin-text-field',\n 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(${TextFieldClass.cssVarList.inputOutlineWidth}) + var(${\n TextFieldClass.cssVarList.inputOutlineOffset\n }));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t\t${useHostExternalPadding(TextFieldClass.cssVarList)}\n\t\t\t${resetInputOverrides('vaadin-text-field', TextFieldClass.cssVarList)}\n ${inputFloatingLabelStyle()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,\n excludeAttrsSync: ['tabindex', 'style'],\n componentName,\n })\n);\n","import '@vaadin/text-field';\nimport '@vaadin/icons';\nimport '@vaadin/icon';\n\nimport { componentName, TextFieldClass } from './TextFieldClass';\n\ncustomElements.define(componentName, TextFieldClass);\n\nexport { TextFieldClass, componentName };\n","import { componentName as descopeInternalComponentName } from './descope-phone-field-internal/PhoneFieldInternal';\nimport { forwardAttrs, getComponentName } from '../../../helpers/componentHelpers';\nimport { compose } from '../../../helpers';\nimport { createProxy, createStyleMixin, draggableMixin, proxyInputMixin } from '../../../mixins';\nimport { TextFieldClass } from '../../descope-text-field/TextFieldClass';\nimport { ComboBoxClass } from '@descope-ui/descope-combo-box/class';\nimport CountryCodes from '../CountryCodes';\nimport {\n resetInputCursor,\n resetInputLabelPosition,\n resetInputFieldDefaultWidth,\n resetInputFieldInvalidBackgroundColor,\n useHostExternalPadding,\n} from '../../../helpers/themeHelpers/resetHelpers';\n\nconst textVars = TextFieldClass.cssVarList;\nconst comboVars = ComboBoxClass.cssVarList;\n\nexport const componentName = getComponentName('phone-field');\n\nconst customMixin = (superclass) =>\n class PhoneFieldMixinClass extends superclass {\n static get CountryCodes() {\n return CountryCodes;\n }\n\n init() {\n super.init?.();\n\n const template = document.createElement('template');\n\n template.innerHTML = `\n\t\t\t\t<${descopeInternalComponentName}\n\t\t\t\t\ttabindex=\"-1\"\n\t\t\t\t\tslot=\"input\"\n\t\t\t\t></${descopeInternalComponentName}>\n \t\t`;\n\n this.baseElement.appendChild(template.content.cloneNode(true));\n\n this.inputElement = this.shadowRoot.querySelector(descopeInternalComponentName);\n\n forwardAttrs(this.shadowRoot.host, this.inputElement, {\n includeAttrs: [\n 'size',\n 'bordered',\n 'invalid',\n 'minlength',\n 'maxlength',\n 'default-code',\n 'country-input-placeholder',\n 'phone-input-placeholder',\n 'disabled',\n 'restrict-countries',\n 'country-input-label',\n 'readonly',\n 'label',\n 'label-type',\n 'allow-alphanumeric-input',\n ],\n });\n }\n\n get countryCodeItems() {\n return this.inputElement?.countryCodeValue;\n }\n\n get phoneNumberInputEle() {\n return this.inputElement?.phoneNumberInputEle;\n }\n\n get countryCodeInputData() {\n return this.inputElement?.countryCodeInputData;\n }\n\n get countryCodes() {\n return Array.from(this.inputElement.countryCodeInputData).map((ele) =>\n ele.getAttribute('data-country-code')\n );\n }\n };\n\nconst {\n host,\n label,\n requiredIndicator,\n inputField,\n internalAfter,\n countryCodeInput,\n phoneInput,\n separator,\n errorMessage,\n helperText,\n} = {\n host: { selector: () => ':host' },\n label: { selector: '::part(label)' },\n requiredIndicator: { selector: '[required]::part(required-indicator)::after' },\n inputField: { selector: '::part(input-field)' },\n internalAfter: { selector: 'descope-phone-field-internal::after' },\n phoneInput: { selector: () => 'descope-text-field' },\n countryCodeInput: { selector: () => 'descope-combo-box' },\n separator: { selector: 'descope-phone-field-internal .separator' },\n helperText: { selector: '::part(helper-text)' },\n errorMessage: { selector: '::part(error-message)' },\n};\n\nexport const PhoneFieldClass = compose(\n createStyleMixin({\n mappings: {\n fontSize: [\n host,\n inputField,\n {\n selector: TextFieldClass.componentName,\n property: TextFieldClass.cssVarList.fontSize,\n },\n {\n selector: ComboBoxClass.componentName,\n property: ComboBoxClass.cssVarList.fontSize,\n },\n ],\n fontFamily: [\n label,\n errorMessage,\n helperText,\n {\n ...countryCodeInput,\n property: ComboBoxClass.cssVarList.overlay.fontFamily,\n },\n ],\n hostWidth: [\n { ...host, property: 'width' },\n { ...phoneInput, property: 'width' },\n { ...countryCodeInput, property: '--vaadin-combo-box-overlay-width' },\n ],\n hostDirection: { ...host, property: 'direction' },\n\n inputBorderStyle: [\n { ...internalAfter, property: 'border-style' },\n { ...separator, property: 'border-left-style' },\n ],\n inputBorderWidth: [\n { ...internalAfter, property: 'border-width' },\n { ...separator, property: 'border-left-width' },\n ],\n inputBorderColor: [\n { ...internalAfter, property: 'border-color' },\n { ...separator, property: 'border-left-color' },\n ],\n inputBorderRadius: [\n { ...inputField, property: 'border-radius' },\n { ...internalAfter, property: 'border-radius' },\n ],\n\n countryCodeInputWidth: { ...countryCodeInput, property: comboVars.hostWidth },\n countryCodeDropdownWidth: {\n ...countryCodeInput,\n property: '--vaadin-combo-box-overlay-width',\n },\n phoneInputWidth: { ...phoneInput, property: 'width' },\n\n horizontalPadding: [\n { ...phoneInput, property: 'padding-left' },\n { ...phoneInput, property: 'padding-right' },\n { ...countryCodeInput, property: 'padding-left' },\n { ...countryCodeInput, property: 'padding-right' },\n ],\n\n labelTextColor: [\n { ...label, property: 'color' },\n { ...requiredIndicator, property: 'color' },\n ],\n labelRequiredIndicator: { ...requiredIndicator, property: 'content' },\n\n errorMessageTextColor: { ...errorMessage, property: 'color' },\n errorMessageIcon: { ...errorMessage, property: 'background-image' },\n errorMessageIconSize: { ...errorMessage, property: 'background-size' },\n errorMessageIconPadding: { ...errorMessage, property: 'padding-inline-start' },\n errorMessageIconRepeat: { ...errorMessage, property: 'background-repeat' },\n errorMessageIconPosition: { ...errorMessage, property: 'background-position' },\n\n inputValueTextColor: [\n { ...phoneInput, property: textVars.inputValueTextColor },\n { ...countryCodeInput, property: comboVars.inputValueTextColor },\n ],\n\n inputPlaceholderTextColor: { ...phoneInput, property: textVars.inputPlaceholderColor },\n\n overlayItemBackgroundColor: {\n selector: 'descope-combo-box',\n property: comboVars.overlayItemBackgroundColor,\n },\n\n inputOutlineStyle: { ...inputField, property: 'outline-style' },\n inputOutlineColor: { ...inputField, property: 'outline-color' },\n inputOutlineWidth: { ...inputField, property: 'outline-width' },\n inputOutlineOffset: { ...inputField, property: 'outline-offset' },\n\n valueInputHeight: [{ ...countryCodeInput, property: comboVars.valueInputHeight }],\n valueInputMarginBottom: [{ ...phoneInput, property: textVars.valueInputMarginBottom }],\n marginInlineStart: [\n { ...phoneInput, property: textVars.marginInlineStart },\n { ...countryCodeInput, property: comboVars.marginInlineStart },\n ],\n },\n }),\n draggableMixin,\n proxyInputMixin({ proxyProps: ['value', 'selectionStart'] }),\n customMixin\n)(\n createProxy({\n slots: [],\n wrappedEleName: 'vaadin-text-field',\n 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: 15em;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t}\n\t\t\t${useHostExternalPadding(PhoneFieldClass.cssVarList)}\n\t\t\t${resetInputCursor('vaadin-text-field')}\n\t\t\t${resetInputFieldInvalidBackgroundColor('vaadin-text-field')}\n\t\t\t${resetInputFieldDefaultWidth()}\n\n\t\t\tdiv {\n\t\t\t\tdisplay: inline-flex;\n\t\t\t}\n\t\t\tvaadin-text-field {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t\tvaadin-text-field[focus-ring]::part(input-field) {\n\t\t\t\tbox-shadow: none;\n\t\t\t}\n\t\t\tvaadin-text-field::before {\n\t\t\t\theight: 0;\n\t\t\t}\n\t\t\tvaadin-text-field::part(label) {\n margin-left: 0;\n margin-right: 0;\n }\n\t\t\tvaadin-text-field::part(input-field) {\n\t\t\t\tpadding: 0;\n\t\t\t\tbackground: transparent;\n\t\t\t\toverflow: hidden;\n\t\t\t}\n\t\t\tdescope-phone-field-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 direction: ltr;\n position: relative;\n\t\t\t}\n descope-phone-field-internal::after {\n content: '';\n position: absolute;\n width: 100%;\n height: 100%;\n top: 0;\n left: 0;\n box-sizing: border-box;\n outline-offset: calc(var(${PhoneFieldClass.cssVarList.inputBorderWidth}) * -1);\n pointer-events: none;\n }\n\t\t\tdescope-phone-field-internal > div {\n\t\t\t\twidth: 100%;\n\t\t\t\theight: 100%;\n\t\t\t}\n\t\t\tdescope-phone-field-internal .separator {\n\t\t\t\tflex: 0;\n\t\t\t\tborder: none;\n\t\t\t}\n \n\t\t\tdescope-combo-box {\n\t\t\t\tflex-shrink: 0;\n min-width: 5.75em;\n\t\t\t\t${comboVars.inputOutlineWidth}: 0;\n\t\t\t\t${comboVars.inputOutlineOffset}: 0;\n\t\t\t\t${comboVars.inputBorderWidth}: 0;\n\t\t\t\t${comboVars.inputBorderRadius}: 0;\n\t\t\t}\n\t\t\tdescope-text-field {\n\t\t\t\tflex-grow: 1;\n\t\t\t\t${textVars.inputOutlineWidth}: 0;\n\t\t\t\t${textVars.inputOutlineOffset}: 0;\n\t\t\t\t${textVars.inputBorderWidth}: 0;\n\t\t\t\t${textVars.inputBorderRadius}: 0;\n }\n\n :host([label-type=\"floating\"]) vaadin-text-field::part(label) {\n display: none;\n }\n descope-text-field[label-type=\"floating\"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n descope-text-field[label-type=\"floating\"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n\n\t\t\tvaadin-text-field::part(input-field)::after {\n\t\t\t\tborder: none;\n\t\t\t}\n ${resetInputLabelPosition('vaadin-text-field')}\n\t\t`,\n excludeAttrsSync: ['tabindex'],\n componentName,\n })\n);\n\nexport default PhoneFieldClass;\n","import { createBaseInputClass } from '../../../../baseClasses/createBaseInputClass';\nimport { forwardAttrs, getComponentName } from '../../../../helpers/componentHelpers';\nimport CountryCodes from '../../CountryCodes';\nimport { comboBoxItem, parsePhoneNumber } from '../helpers';\n\nexport const componentName = getComponentName('phone-field-internal');\n\nconst commonAttrs = ['disabled', 'size', 'bordered', 'readonly', 'allow-alphanumeric-input'];\nconst countryAttrs = ['country-input-placeholder', 'default-code', 'restrict-countries'];\nconst phoneAttrs = ['phone-input-placeholder', 'maxlength', 'autocomplete', 'name'];\nconst labelTypeAttrs = ['label-type', 'country-input-label', 'label'];\nconst mapAttrs = {\n 'country-input-label': 'label',\n 'country-input-placeholder': 'placeholder',\n 'phone-input-placeholder': 'placeholder',\n};\n\nconst inputRelatedAttrs = [].concat(commonAttrs, countryAttrs, phoneAttrs, labelTypeAttrs);\n\nconst BaseInputClass = createBaseInputClass({ componentName, baseSelector: 'div' });\n\nclass PhoneFieldInternal extends BaseInputClass {\n static get observedAttributes() {\n return [].concat(BaseInputClass.observedAttributes || [], inputRelatedAttrs);\n }\n\n constructor() {\n super();\n\n this.innerHTML = `\n <div class=\"wrapper\">\n <descope-combo-box\n item-label-path=\"data-name\"\n item-value-path=\"data-id\"\n >\n ${CountryCodes.map((item) => comboBoxItem(item)).join('')}\n </descope-combo-box>\n <div class=\"separator\"></div>\n <descope-text-field type=\"tel\"></descope-text-field>\n </div>\n `;\n\n this.countryCodeInput = this.querySelector('descope-combo-box');\n this.phoneNumberInput = this.querySelector('descope-text-field');\n this.inputs = [this.countryCodeInput, this.phoneNumberInput];\n\n forwardAttrs(this, this.countryCodeInput, { includeAttrs: ['label-type'] });\n forwardAttrs(this, this.phoneNumberInput, { includeAttrs: ['label-type', 'required'] });\n\n // override combo box setter to display dialCode value in input\n this.countryCodeInput.customValueTransformFn = (val) => {\n const [, dialCode] = val?.split?.(' ') || [];\n return dialCode;\n };\n }\n\n get countryCodeInputData() {\n return this.countryCodeInput.items;\n }\n\n get allowAlphanumericInput() {\n return this.getAttribute('allow-alphanumeric-input') === 'true';\n }\n\n get value() {\n if (!this.phoneNumberValue) {\n return '';\n }\n return `${this.countryCodeInput.value}-${this.phoneNumberInput.value}`;\n }\n\n set value(val) {\n const [countryCode, phoneNumber] = parsePhoneNumber(val);\n\n this.#setCountryCode(countryCode);\n this.#setPhoneNumber(phoneNumber);\n }\n\n setSelectionRange(...args) {\n this.phoneNumberInput.setSelectionRange(...args);\n }\n\n get selectionStart() {\n return this.phoneNumberInput.selectionStart;\n }\n\n #setCountryCode(val) {\n if (val) {\n const countryCodeItem = this.getCountryByDialCode(val);\n if (countryCodeItem) {\n this.countryCodeInput.selectedItem = countryCodeItem;\n }\n } else {\n this.countryCodeInput.selectedItem = undefined;\n }\n }\n\n #setPhoneNumber(val) {\n if (this.phoneNumberInput.value === val) {\n return;\n }\n\n this.phoneNumberInput.value = val;\n }\n\n get phoneNumberValue() {\n return this.phoneNumberInput.value;\n }\n\n get countryCodeValue() {\n return this.countryCodeInput.shadowRoot.querySelector('input').value;\n }\n\n get phoneNumberInputEle() {\n return this.phoneNumberInput.shadowRoot.querySelector('input');\n }\n\n get minLength() {\n return parseInt(this.getAttribute('minlength'), 10) || 0;\n }\n\n getValidity() {\n const hasCode = this.countryCodeInput.value;\n const hasPhone = this.phoneNumberInput.value;\n const emptyValue = !hasCode || !hasPhone;\n const hasMinPhoneLength =\n this.phoneNumberInput.value?.length && this.phoneNumberInput.value.length < this.minLength;\n\n if (this.isRequired && emptyValue) {\n return { valueMissing: true };\n }\n if (hasMinPhoneLength) {\n return { tooShort: true };\n }\n if (hasPhone && !hasCode) {\n return { valueMissing: true };\n }\n return {};\n }\n\n init() {\n this.addEventListener('focus', (e) => {\n // we want to ignore focus events we are dispatching\n if (e.isTrusted) this.inputs[1].focus();\n });\n\n super.init?.();\n this.initInputs();\n }\n\n getRestrictedCountries() {\n const attr = this.getAttribute('restrict-countries');\n return attr ? attr.split(',') : [];\n }\n\n getCountryByDialCode(countryDialCode) {\n return this.countryCodeInput.items?.find((c) => c.getAttribute('data-id') === countryDialCode);\n }\n\n getCountryByCodeId(countryCode) {\n return this.countryCodeInput.items?.find(\n (c) => c.getAttribute('data-country-code') === countryCode\n );\n }\n\n updateCountryCodeItems(restrictCountries) {\n const items = restrictCountries.length\n ? CountryCodes.filter((c) => restrictCountries.includes(c.code))\n : CountryCodes;\n this.querySelector('descope-combo-box').innerHTML = items\n .map((item) => comboBoxItem(item))\n .join('');\n }\n\n handleDefaultCountryCode(countryCode) {\n if (!this.countryCodeInput.value) {\n const countryCodeItem = this.getCountryByCodeId(countryCode);\n // When replacing the input component (inserting internal component into text-field) -\n // Vaadin resets the input's value. We use setTimeout in order to make sure this happens\n // after the reset.\n if (countryCodeItem) {\n setTimeout(() => {\n this.countryCodeInput.selectedItem = countryCodeItem;\n });\n }\n }\n }\n\n initInputs() {\n // Sanitize phone input value to filter everything but digits\n this.phoneNumberInput.addEventListener('input', (e) => {\n // we want to update only phoneNumberInput, and avoid triggering `set value`\n e.stopPropagation();\n\n if (!this.allowAlphanumericInput) {\n const telDigitsRegExp = /^\\d$/;\n const sanitizedInput = e.target.value\n .split('')\n .filter((char) => telDigitsRegExp.test(char))\n .join('');\n e.target.value = sanitizedInput;\n }\n });\n\n this.handleFocusEventsDispatching(this.inputs);\n this.handleInputEventDispatching();\n }\n\n handleLabelTypeAttrs(attrName, newValue) {\n // set or remove label attributes from inner text/combo components on `label-type` change\n const attr = mapAttrs[attrName] || attrName;\n\n if (attrName === 'label-type') {\n this.onLabelTypeChange(newValue);\n }\n // on inner components label attr change - set label attributes for text/combo components\n // only if label-type is `floating`\n else if (this.getAttribute('label-type') === 'floating') {\n if (attrName === 'country-input-label') {\n this.countryCodeInput.setAttribute(attr, newValue);\n } else if (attrName === 'label') {\n this.phoneNumberInput.setAttribute(attr, newValue);\n }\n }\n }\n\n onLabelTypeChange(newValue) {\n if (newValue === 'floating') {\n // on change to `floating` label - set inner components `label` and `placeholder`\n this.countryCodeInput.setAttribute('label', this.getAttribute('country-input-label') || '');\n this.countryCodeInput.setAttribute(\n 'placeholder',\n this.getAttribute('country-input-placeholder') || ''\n );\n this.phoneNumberInput.setAttribute('label', this.getAttribute('label') || '');\n this.phoneNumberInput.setAttribute(\n 'placeholder',\n this.getAttribute('phone-input-placeholder') || ''\n );\n } else {\n // for other cases - reset inner components label-type and labels\n this.inputs.forEach((input) => input.removeAttribute('label'));\n }\n }\n\n attributeChangedCallback(attrName, oldValue, newValue) {\n super.attributeChangedCallback(attrName, oldValue, newValue);\n\n if (oldValue !== newValue) {\n if (attrName === 'default-code' && newValue) {\n this.handleDefaultCountryCode(newValue);\n } else if (inputRelatedAttrs.includes(attrName)) {\n const attr = mapAttrs[attrName] || attrName;\n\n if (commonAttrs.includes(attrName)) {\n this.inputs.forEach((input) => input.setAttribute(attr, newValue));\n } else if (countryAttrs.includes(attrName)) {\n this.countryCodeInput.setAttribute(attr, newValue);\n } else if (phoneAttrs.includes(attrName)) {\n this.phoneNumberInput.setAttribute(attr, newValue);\n }\n }\n\n if (labelTypeAttrs.includes(attrName)) {\n this.handleLabelTypeAttrs(attrName, newValue);\n }\n\n if (attrName === 'restrict-countries') {\n this.updateCountryCodeItems(this.getRestrictedCountries());\n }\n }\n }\n}\n\nexport default PhoneFieldInternal;\n","import '@descope-ui/descope-combo-box';\nimport '../../../descope-text-field';\n\nimport PhoneFieldInternal, { componentName } from './PhoneFieldInternal';\n\ncustomElements.define(componentName, PhoneFieldInternal);\n","import { parsePhoneNumberFromString } from 'libphonenumber-js/min';\n\n// We use JSDelivr (proxy by static.descope.com) in order to fetch the images as image file from this library (svg-country-flags)\n// This reduces our bundle size, and we use it as a static remote resource.\nexport const getCountryFlag = (code) =>\n `https://static.descope.com/npm/svg-country-flags@1.2.10/svg/${code.toLowerCase()}.svg`;\n\nexport const comboBoxItem = ({ code, dialCode, name: country }) => `\n\t<div\n\t\tdata-id=\"${dialCode}\"\n\t\tdata-name=\"${code} ${dialCode} ${country}\"\n\t\tdata-country-code=\"${code}\"\n\t>\n\t\t<div>\n\t\t\t<span>\n\t\t\t\t<img src=\"${getCountryFlag(code)}\" width=\"20\"/>\n\t\t\t</span>\n\t\t\t<span>${country}</span>\n\t\t</div>\n\t\t<div>\n\t\t\t<span>${code}</span>\n\t\t\t<span>${dialCode}</span>\n\t\t</div>\n\t</div>\n`;\n\nexport const parsePhoneNumber = (val) => {\n const value = val || '';\n let countryCode = '';\n let phoneNumber = '';\n\n // Attempt to parse the value using libphonenumber-js\n const parsed = parsePhoneNumberFromString(value);\n\n if (parsed) {\n if (parsed.countryCallingCode) {\n countryCode = `+${parsed.countryCallingCode}`;\n }\n\n if (parsed.nationalNumber) {\n phoneNumber = parsed.nationalNumber;\n }\n } else {\n // Fallback: assume a dash separates country code and phone number\n const [country, phone] = value.split('-');\n countryCode = country || '';\n phoneNumber = phone || '';\n }\n\n return [countryCode, phoneNumber];\n};\n","import './descope-phone-field-internal';\nimport '@descope-ui/descope-combo-box';\nimport '../../descope-text-field';\n\nimport { componentName, PhoneFieldClass } from './PhoneFieldClass';\n\ncustomElements.define(componentName, PhoneFieldClass);\n\nexport { PhoneFieldClass, componentName };\n"],"names":["componentName","observedAttrs","TextFieldClass","mappings","proxyProps","useProxyTargets","superclass","observedAttributes","concat","icon","init","super","renderCopyToClipboard","shouldRender","this","remove","iconInitConfig","title","style","iconCopiedConfig","Object","assign","document","createElement","slot","baseElement","appendChild","addEventListener","navigator","clipboard","writeText","value","setTimeout","onLabelClick","focus","attributeChangedCallback","attrName","oldVal","newVal","attributeChangeCallback","_setType","removeEventListener","slots","wrappedEleName","cssVarList","inputOutlineWidth","inputOutlineOffset","excludeAttrsSync","customElements","define","textVars","comboVars","C","host","label","requiredIndicator","inputField","internalAfter","countryCodeInput","phoneInput","separator","errorMessage","helperText","selector","PhoneFieldClass","fontSize","property","fontFamily","overlay","hostWidth","hostDirection","inputBorderStyle","inputBorderWidth","inputBorderColor","inputBorderRadius","countryCodeInputWidth","countryCodeDropdownWidth","phoneInputWidth","horizontalPadding","labelTextColor","labelRequiredIndicator","errorMessageTextColor","errorMessageIcon","errorMessageIconSize","errorMessageIconPadding","errorMessageIconRepeat","errorMessageIconPosition","inputValueTextColor","inputPlaceholderTextColor","inputPlaceholderColor","overlayItemBackgroundColor","inputOutlineStyle","inputOutlineColor","valueInputHeight","valueInputMarginBottom","marginInlineStart","CountryCodes","template","innerHTML","content","cloneNode","inputElement","shadowRoot","querySelector","includeAttrs","countryCodeItems","countryCodeValue","phoneNumberInputEle","countryCodeInputData","countryCodes","Array","from","map","ele","getAttribute","commonAttrs","countryAttrs","phoneAttrs","labelTypeAttrs","mapAttrs","inputRelatedAttrs","BaseInputClass","baseSelector","constructor","item","join","phoneNumberInput","inputs","customValueTransformFn","val","dialCode","split","items","allowAlphanumericInput","phoneNumberValue","countryCode","phoneNumber","setSelectionRange","args","selectionStart","countryCodeItem","getCountryByDialCode","selectedItem","undefined","minLength","parseInt","getValidity","hasCode","hasPhone","emptyValue","hasMinPhoneLength","length","isRequired","valueMissing","tooShort","e","isTrusted","initInputs","getRestrictedCountries","attr","countryDialCode","find","c","getCountryByCodeId","updateCountryCodeItems","restrictCountries","filter","includes","code","handleDefaultCountryCode","stopPropagation","telDigitsRegExp","sanitizedInput","target","char","test","handleFocusEventsDispatching","handleInputEventDispatching","handleLabelTypeAttrs","newValue","onLabelTypeChange","setAttribute","forEach","input","removeAttribute","oldValue","comboBoxItem","name","country","toLowerCase","getCountryFlag","parsePhoneNumber","parsed","countryCallingCode","nationalNumber","phone"],"sourceRoot":""}
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.LICENSE.txt */
2
- "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8657],{69473:(t,e,i)=>{i.d(e,{T:()=>o,w:()=>d});var n=i(94619),a=i(93826),s=i(7138),r=i(14944),l=i(33177);const o=(0,r.xE)("text-field"),u=["type","label-type","copy-to-clipboard"],d=(0,s.Zz)((0,n.RF)({mappings:a.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,(t=>class extends t{static get observedAttributes(){return u.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&("label-type"===t?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,n.tz)({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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex"],componentName:o}))},89348:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.w,componentName:()=>n.T}),i(63970),i(23638),i(80201);var n=i(69473);customElements.define(n.T,n.w)},43945:(t,e,i)=>{i.d(e,{A:()=>d,T:()=>r});var n=i(25827),a=i(14944),s=i(63789);const r=(0,a.xE)("phone-field-internal-input-box"),l=["disabled","size","bordered","invalid","readonly","phone-input-placeholder","name","autocomplete","label-type","allow-alphanumeric-input"],o={"phone-input-placeholder":"placeholder"},u=(0,n.y)({componentName:r,baseSelector:"div"}),d=class extends u{static get observedAttributes(){return[].concat(u.observedAttributes||[],l)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return(0,s.Q)(this.getAttribute("default-code"))}get hasDefaultCode(){return!!this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const t=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(t,"")}`}return this.phoneNumberInput.value}set value(t){this.phoneNumberInput.value=t}get phoneNumberValue(){return this.phoneNumberInput.value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const t=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:t.length<this.minLength?{tooShort:!0}:t.length>this.maxLength?{tooLong:!0}:this.value&&!/^\+?\d{1,4}-?(?:\d-?){1,15}$/.test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{1===t.target.value.length&&"-"===t.target.value&&(t.target.value=""),t.target.value=t.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");let e=t.target.value;if(!this.allowAlphanumericInput){const i=/^[+\d-]+$/;e=t.target.value.split("").filter((t=>i.test(t))).join("")}t.target.value=e})),this.handleFocusEventsDispatching([this.phoneNumberInput])}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),e!==i&&l.includes(t)){const e=o[t]||t;this.phoneNumberInput.setAttribute(e,i)}}}},46633:(t,e,i)=>{i.r(e),i(89348);var n=i(43945);customElements.define(n.T,n.A)},63789:(t,e,i)=>{i.d(e,{Q:()=>a});var n=i(44066);const a=t=>n.A.find((e=>e.code===t))?.dialCode},21860:(t,e,i)=>{i.d(e,{f:()=>a});var n=i(95925);class a extends n.r{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},60978:(t,e,i)=>{i.d(e,{a:()=>a});var n=i(60354);const a=t=>class extends((0,n.R)(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()}}},10056:(t,e,i)=>{i.d(e,{A:()=>h}),i(94009);var n=i(98633),a=i(65211),s=i(27150),r=i(83798),l=i(9685),o=i(57224),u=i(21860),d=i(60978),p=i(19074);const c=t=>class extends((0,d.a)(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 u.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new p.q(this.inputElement,this._labelController))}};(0,o.SF)("vaadin-text-field",l.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,o.cp)((0,s.q)(n.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return n.qy`
2
+ "use strict";(self.webpackChunk_descope_web_components_ui=self.webpackChunk_descope_web_components_ui||[]).push([[8657],{79275:(t,e,i)=>{i.d(e,{T:()=>o,w:()=>d});var n=i(79365),a=i(6424),s=i(9696),r=i(97810),l=i(73551);const o=(0,r.xE)("text-field"),u=["type","label-type","copy-to-clipboard"],d=(0,s.Zz)((0,n.RF)({mappings:a.A}),n.VO,(0,n.OZ)({proxyProps:["value","selectionStart"],useProxyTargets:!0}),n.tQ,(t=>class extends t{static get observedAttributes(){return u.concat(t.observedAttributes||[])}icon;init(){super.init?.()}renderCopyToClipboard(t){if(!t)return void this.icon?.remove();const e={icon:"vaadin:copy-o",title:"Copy",style:"cursor: pointer"},i={icon:"vaadin:check-circle-o",title:"Copied",style:"cursor: initial"};this.icon=Object.assign(document.createElement("vaadin-icon"),{slot:"suffix",...e}),this.baseElement.appendChild(this.icon),this.icon.addEventListener("click",(()=>{navigator.clipboard.writeText(this.value),Object.assign(this.icon,i),setTimeout((()=>{Object.assign(this.icon,e)}),5e3)}))}onLabelClick(){this.focus()}attributeChangedCallback(t,e,i){super.attributeChangeCallback?.(t,e,i),"type"===t&&this.baseElement._setType(i),e!==i&&("label-type"===t?"floating"===i?this.addEventListener("click",this.onLabelClick):this.removeEventListener("click",this.onLabelClick):"copy-to-clipboard"===t&&this.renderCopyToClipboard("true"===i))}}))((0,n.tz)({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(${d.cssVarList.inputOutlineWidth}) + var(${d.cssVarList.inputOutlineOffset}));\n box-sizing: border-box;\n\t\t\t}\n :host(:is([readonly], [disabled])) ::slotted(:is(input, textarea):placeholder-shown) {\n opacity: 1;\n }\n\n vaadin-text-field[label-type="floating"]:not([focused])[readonly] > input:placeholder-shown {\n opacity: 0;\n }\n vaadin-text-field[label-type="floating"]:not([focused])[disabled] > input:placeholder-shown {\n opacity: 0;\n }\n ${(0,l.$J)("vaadin-text-field")}\n\t\t\t${(0,l.cy)(d.cssVarList)}\n\t\t\t${(0,l.LJ)("vaadin-text-field",d.cssVarList)}\n ${(0,l.Kl)()}\n\n vaadin-text-field vaadin-icon {\n align-self: center;\n }\n\t\t`,excludeAttrsSync:["tabindex","style"],componentName:o}))},21374:(t,e,i)=>{i.r(e),i.d(e,{TextFieldClass:()=>n.w,componentName:()=>n.T}),i(11284),i(37182),i(95260);var n=i(79275);customElements.define(n.T,n.w)},9035:(t,e,i)=>{i.d(e,{A:()=>d,T:()=>r});var n=i(3393),a=i(97810),s=i(92259);const r=(0,a.xE)("phone-field-internal-input-box"),l=["disabled","size","bordered","invalid","readonly","phone-input-placeholder","name","autocomplete","label-type","allow-alphanumeric-input"],o={"phone-input-placeholder":"placeholder"},u=(0,n.y)({componentName:r,baseSelector:"div"}),d=class extends u{static get observedAttributes(){return[].concat(u.observedAttributes||[],l)}constructor(){super(),this.innerHTML='\n <div>\n <descope-text-field tabindex="1"></descope-text-field>\n </div>\n ',this.phoneNumberInput=this.querySelector("descope-text-field")}get defaultCountryCode(){return(0,s.Q)(this.getAttribute("default-code"))}get hasDefaultCode(){return!!this.getAttribute("default-code")}get allowAlphanumericInput(){return"true"===this.getAttribute("allow-alphanumeric-input")}get value(){if(!this.phoneNumberValue)return"";if(this.hasDefaultCode){const t=new RegExp(`\\+?${parseInt(this.defaultCountryCode,10)}--?`);return`${this.defaultCountryCode}-${this.phoneNumberInput.value.replace(t,"")}`}return this.phoneNumberInput.value}set value(t){this.phoneNumberInput.value=t}get phoneNumberValue(){return this.phoneNumberInput.value}get phoneNumberInputEle(){return this.phoneNumberInput.shadowRoot.querySelector("input")}get minLength(){return parseInt(this.getAttribute("minlength"),10)||0}get maxLength(){return parseInt(this.getAttribute("maxlength"),10)||50}getValidity(){const t=this.value.replace(/\D/g,"");return this.isRequired&&!this.value?{valueMissing:!0}:t.length<this.minLength?{tooShort:!0}:t.length>this.maxLength?{tooLong:!0}:this.value&&!/^\+?\d{1,4}-?(?:\d-?){1,15}$/.test(this.value)?{patternMismatch:!0}:{}}init(){this.addEventListener("focus",(t=>{t.isTrusted&&this.phoneNumberInput.focus()})),super.init?.(),this.initInputs()}getCountryByDialCode(t){return this.countryCodeInput.items?.find((e=>e.getAttribute("data-country-code")===t))}initInputs(){this.phoneNumberInput.addEventListener("input",(t=>{1===t.target.value.length&&"-"===t.target.value&&(t.target.value=""),t.target.value=t.target.value.replace(/(?!^)\+/g,"").replace("--","-").replace("+-","+");let e=t.target.value;if(!this.allowAlphanumericInput){const i=/^[+\d-]+$/;e=t.target.value.split("").filter((t=>i.test(t))).join("")}t.target.value=e})),this.handleFocusEventsDispatching([this.phoneNumberInput])}attributeChangedCallback(t,e,i){if(super.attributeChangedCallback(t,e,i),e!==i&&l.includes(t)){const e=o[t]||t;this.phoneNumberInput.setAttribute(e,i)}}}},78343:(t,e,i)=>{i.r(e),i(21374);var n=i(9035);customElements.define(n.T,n.A)},92259:(t,e,i)=>{i.d(e,{Q:()=>a});var n=i(51680);const a=t=>n.A.find((e=>e.code===t))?.dialCode},18330:(t,e,i)=>{i.d(e,{f:()=>a});var n=i(44099);class a extends n.r{constructor(t,e){super(t,"input","input",{initializer:(t,i)=>{i.value&&(t.value=i.value),i.type&&t.setAttribute("type",i.type),t.id=this.defaultId,"function"==typeof e&&e(t)},useUniqueId:!0})}}},37436:(t,e,i)=>{i.d(e,{a:()=>a});var n=i(44218);const a=t=>class extends((0,n.R)(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()}}},27136:(t,e,i)=>{i.d(e,{A:()=>h}),i(86689);var n=i(13256),a=i(82901),s=i(90676),r=i(81488),l=i(86314),o=i(87550),u=i(18330),d=i(37436),p=i(37720);const c=t=>class extends((0,d.a)(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 u.f(this,(t=>{this._setInputElement(t),this._setFocusElement(t),this.stateTarget=t,this.ariaTarget=t}))),this.addController(new p.q(this.inputElement,this._labelController))}};(0,o.SF)("vaadin-text-field",l.k,{moduleId:"vaadin-text-field-styles"});class h extends(c((0,o.cp)((0,s.q)(n.Pu)))){static get is(){return"vaadin-text-field"}static get template(){return n.qy`
3
3
  <style>
4
4
  [part='input-field'] {
5
5
  flex-grow: 0;
@@ -34,4 +34,5 @@
34
34
  </div>
35
35
  </div>
36
36
  <slot name="tooltip"></slot>
37
- `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new r.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,a.X)(h)},44085:(t,e,i)=>{i(67239);var n=i(80704);(0,i(57224).SF)("vaadin-text-field",n.k,{moduleId:"lumo-text-field-styles"}),i(10056)},63970:(t,e,i)=>{i(44085),i(10056)}}]);
37
+ `}static get properties(){return{maxlength:{type:Number},minlength:{type:Number}}}ready(){super.ready(),this._tooltipController=new r.I(this),this._tooltipController.setPosition("top"),this._tooltipController.setAriaTarget(this.inputElement),this.addController(this._tooltipController)}}(0,a.X)(h)},52733:(t,e,i)=>{i(27397);var n=i(47642);(0,i(87550).SF)("vaadin-text-field",n.k,{moduleId:"lumo-text-field-styles"}),i(27136)},11284:(t,e,i)=>{i(52733),i(27136)}}]);
38
+ //# sourceMappingURL=phone-fields-descope-phone-input-box-field-descope-phone-input-box-internal-index-js.js.map