@foxy.io/elements 1.47.0 → 1.48.0-beta.1

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 (210) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +1 -1
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-admin-subscription-card.js +1 -1
  5. package/dist/cdn/foxy-admin-subscription-form.js +1 -1
  6. package/dist/cdn/foxy-admin-transaction-card.js +1 -1
  7. package/dist/cdn/foxy-api-browser.js +1 -1
  8. package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
  9. package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
  10. package/dist/cdn/foxy-applied-tax-card.js +1 -1
  11. package/dist/cdn/foxy-attribute-card.js +1 -1
  12. package/dist/cdn/foxy-attribute-form.js +1 -1
  13. package/dist/cdn/foxy-billing-address-card.js +1 -1
  14. package/dist/cdn/foxy-cancellation-form.js +1 -1
  15. package/dist/cdn/foxy-cart-card.js +1 -1
  16. package/dist/cdn/foxy-cart-form.js +2 -2
  17. package/dist/cdn/foxy-client-card.js +1 -1
  18. package/dist/cdn/foxy-client-form.js +1 -1
  19. package/dist/cdn/foxy-collection-page.js +1 -1
  20. package/dist/cdn/foxy-collection-pages.js +1 -1
  21. package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
  22. package/dist/cdn/foxy-coupon-card.js +1 -1
  23. package/dist/cdn/foxy-coupon-code-card.js +1 -1
  24. package/dist/cdn/foxy-coupon-code-form.js +1 -1
  25. package/dist/cdn/foxy-coupon-codes-form.js +1 -1
  26. package/dist/cdn/foxy-coupon-detail-card.js +1 -1
  27. package/dist/cdn/foxy-coupon-form.js +1 -1
  28. package/dist/cdn/foxy-custom-field-card.js +1 -1
  29. package/dist/cdn/foxy-custom-field-form.js +1 -1
  30. package/dist/cdn/foxy-customer-card.js +1 -1
  31. package/dist/cdn/foxy-customer-form.js +1 -1
  32. package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
  33. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  34. package/dist/cdn/foxy-customer-portal.js +11 -11
  35. package/dist/cdn/foxy-customer.js +1 -1
  36. package/dist/cdn/foxy-customers-table.js +1 -1
  37. package/dist/cdn/foxy-discount-builder.js +1 -1
  38. package/dist/cdn/foxy-discount-card.js +1 -1
  39. package/dist/cdn/foxy-discount-detail-card.js +1 -1
  40. package/dist/cdn/foxy-donation.js +1 -1
  41. package/dist/cdn/foxy-downloadable-card.js +1 -1
  42. package/dist/cdn/foxy-downloadable-form.js +1 -1
  43. package/dist/cdn/foxy-email-template-card.js +1 -1
  44. package/dist/cdn/foxy-email-template-form.js +1 -1
  45. package/dist/cdn/foxy-error-entry-card.js +1 -1
  46. package/dist/cdn/foxy-experimental-add-to-cart-builder.js +1 -1
  47. package/dist/cdn/foxy-filter-attribute-card.js +1 -1
  48. package/dist/cdn/foxy-filter-attribute-form.js +1 -1
  49. package/dist/cdn/foxy-form-dialog.js +1 -1
  50. package/dist/cdn/foxy-generate-codes-form.js +1 -1
  51. package/dist/cdn/foxy-gift-card-card.js +1 -1
  52. package/dist/cdn/foxy-gift-card-code-card.js +1 -1
  53. package/dist/cdn/foxy-gift-card-code-form.js +1 -1
  54. package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
  55. package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
  56. package/dist/cdn/foxy-gift-card-form.js +1 -1
  57. package/dist/cdn/foxy-i18n-editor.js +3 -3
  58. package/dist/cdn/foxy-i18n.js +1 -1
  59. package/dist/cdn/foxy-integration-card.js +1 -1
  60. package/dist/cdn/foxy-integration-form.js +1 -1
  61. package/dist/cdn/foxy-item-card.js +1 -1
  62. package/dist/cdn/foxy-item-category-card.js +1 -1
  63. package/dist/cdn/foxy-item-category-form.js +1 -1
  64. package/dist/cdn/foxy-item-form.js +1 -1
  65. package/dist/cdn/foxy-item-option-card.js +1 -1
  66. package/dist/cdn/foxy-item-option-form.js +1 -1
  67. package/dist/cdn/foxy-items-form.js +1 -1
  68. package/dist/cdn/foxy-native-integration-card.js +1 -1
  69. package/dist/cdn/foxy-native-integration-form.js +1 -1
  70. package/dist/cdn/foxy-pagination.js +1 -1
  71. package/dist/cdn/foxy-passkey-card.js +1 -1
  72. package/dist/cdn/foxy-passkey-form.js +1 -1
  73. package/dist/cdn/foxy-payment-card-embed.js +1 -1
  74. package/dist/cdn/foxy-payment-card.js +1 -1
  75. package/dist/cdn/foxy-payment-method-card.js +1 -1
  76. package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
  77. package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
  78. package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
  79. package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
  80. package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
  81. package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
  82. package/dist/cdn/foxy-query-builder.js +1 -1
  83. package/dist/cdn/foxy-report-form.js +1 -1
  84. package/dist/cdn/foxy-reports-table.js +1 -1
  85. package/dist/cdn/foxy-shipment-card.js +1 -1
  86. package/dist/cdn/foxy-shipping-container-card.js +1 -1
  87. package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
  88. package/dist/cdn/foxy-shipping-method-card.js +1 -1
  89. package/dist/cdn/foxy-shipping-service-card.js +1 -1
  90. package/dist/cdn/foxy-sign-in-form.js +1 -1
  91. package/dist/cdn/foxy-spinner.js +1 -1
  92. package/dist/cdn/foxy-store-card.js +1 -1
  93. package/dist/cdn/foxy-store-form.js +1 -1
  94. package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
  95. package/dist/cdn/foxy-store-transaction-folder-card.js +1 -1
  96. package/dist/cdn/foxy-store-transaction-folder-form.js +1 -1
  97. package/dist/cdn/foxy-subscription-card.js +1 -1
  98. package/dist/cdn/foxy-subscription-form.js +1 -1
  99. package/dist/cdn/foxy-subscription-settings-form.js +1 -1
  100. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  101. package/dist/cdn/foxy-table.js +1 -1
  102. package/dist/cdn/foxy-tax-card.js +1 -1
  103. package/dist/cdn/foxy-tax-form.js +1 -1
  104. package/dist/cdn/foxy-template-config-form.js +1 -1
  105. package/dist/cdn/foxy-template-form.js +1 -1
  106. package/dist/cdn/foxy-template-set-card.js +1 -1
  107. package/dist/cdn/foxy-template-set-form.js +1 -1
  108. package/dist/cdn/foxy-transaction-card.js +1 -1
  109. package/dist/cdn/foxy-transaction.js +1 -1
  110. package/dist/cdn/foxy-transactions-table.js +1 -1
  111. package/dist/cdn/foxy-update-payment-method-form.js +1 -1
  112. package/dist/cdn/foxy-user-card.js +1 -1
  113. package/dist/cdn/foxy-user-form.js +1 -1
  114. package/dist/cdn/foxy-user-invitation-card.js +1 -1
  115. package/dist/cdn/foxy-user-invitation-form.js +1 -1
  116. package/dist/cdn/foxy-users-table.js +1 -1
  117. package/dist/cdn/foxy-webhook-card.js +1 -1
  118. package/dist/cdn/foxy-webhook-form.js +1 -1
  119. package/dist/cdn/foxy-webhook-log-card.js +1 -1
  120. package/dist/cdn/foxy-webhook-status-card.js +1 -1
  121. package/dist/cdn/{shared-66278c21.js → shared-0237985c.js} +1 -1
  122. package/dist/cdn/{shared-18dc7a8a.js → shared-09fb9d35.js} +1 -1
  123. package/dist/cdn/{shared-0557539b.js → shared-0b4648f1.js} +1 -1
  124. package/dist/cdn/{shared-845f968f.js → shared-0b4fad42.js} +1 -1
  125. package/dist/cdn/{shared-56226850.js → shared-0cbd8bf4.js} +1 -1
  126. package/dist/cdn/shared-14350c09.js +1 -0
  127. package/dist/cdn/{shared-58add5b4.js → shared-1cbf191b.js} +1 -1
  128. package/dist/cdn/{shared-b2cbe727.js → shared-202cd296.js} +1 -1
  129. package/dist/cdn/{shared-d4b77609.js → shared-22168ef7.js} +1 -1
  130. package/dist/cdn/{shared-9e0b104a.js → shared-259870ee.js} +1 -1
  131. package/dist/cdn/{shared-4194ffe7.js → shared-2a151df4.js} +1 -1
  132. package/dist/cdn/{shared-29a04835.js → shared-2efca095.js} +1 -1
  133. package/dist/cdn/{shared-8498f274.js → shared-30530592.js} +1 -1
  134. package/dist/cdn/{shared-b01c3b62.js → shared-37b0c0af.js} +1 -1
  135. package/dist/cdn/{shared-6bf89411.js → shared-3b627ac8.js} +1 -1
  136. package/dist/cdn/{shared-2111aa44.js → shared-3d4b91bb.js} +1 -1
  137. package/dist/cdn/{shared-69d417c2.js → shared-40f265c5.js} +1 -1
  138. package/dist/cdn/{shared-5a469962.js → shared-45ae3485.js} +1 -1
  139. package/dist/cdn/{shared-dedec962.js → shared-4bd2abe4.js} +1 -1
  140. package/dist/cdn/{shared-bf8d95b9.js → shared-50b66625.js} +1 -1
  141. package/dist/cdn/{shared-a7150987.js → shared-590923e1.js} +1 -1
  142. package/dist/cdn/{shared-eba46861.js → shared-5dcddb01.js} +1 -1
  143. package/dist/cdn/{shared-eb49be2e.js → shared-641c8ca6.js} +1 -1
  144. package/dist/cdn/{shared-c9061102.js → shared-6eb8aa92.js} +1 -1
  145. package/dist/cdn/{shared-d9378323.js → shared-790ab66f.js} +1 -1
  146. package/dist/cdn/{shared-5b0c7c73.js → shared-7cb579ca.js} +1 -1
  147. package/dist/cdn/{shared-be2ce0e6.js → shared-82e82763.js} +1 -1
  148. package/dist/cdn/shared-8368423a.js +29 -0
  149. package/dist/cdn/{shared-01ce5dcd.js → shared-83e3626b.js} +1 -1
  150. package/dist/cdn/{shared-27c16d99.js → shared-84e81c06.js} +1 -1
  151. package/dist/cdn/{shared-adbdfff2.js → shared-89ad4177.js} +1 -1
  152. package/dist/cdn/{shared-ecbd0750.js → shared-94de5e51.js} +1 -1
  153. package/dist/cdn/{shared-14cc889b.js → shared-9ac59ac9.js} +1 -1
  154. package/dist/cdn/{shared-0db4e843.js → shared-9b72bd4c.js} +1 -1
  155. package/dist/cdn/{shared-fb859ece.js → shared-9c36e563.js} +1 -1
  156. package/dist/cdn/{shared-b06c67fa.js → shared-aae01ac0.js} +1 -1
  157. package/dist/cdn/{shared-2f8d04dc.js → shared-ac3113ee.js} +1 -1
  158. package/dist/cdn/{shared-6f071960.js → shared-ae5aa93b.js} +1 -1
  159. package/dist/cdn/{shared-1bbac55e.js → shared-af78c7f0.js} +1 -1
  160. package/dist/cdn/{shared-360196ad.js → shared-b02a95f7.js} +1 -1
  161. package/dist/cdn/{shared-f2a7eb85.js → shared-b0e06a4b.js} +1 -1
  162. package/dist/cdn/{shared-e039657e.js → shared-b9d9e306.js} +1 -1
  163. package/dist/cdn/{shared-1c985317.js → shared-c8af1e27.js} +1 -1
  164. package/dist/cdn/{shared-19dbc85c.js → shared-cd9560d6.js} +1 -1
  165. package/dist/cdn/{shared-a6ddec3d.js → shared-d395d92e.js} +1 -1
  166. package/dist/cdn/{shared-52367e6b.js → shared-d5de9c0a.js} +1 -1
  167. package/dist/cdn/{shared-b3fe8c63.js → shared-d8ec7f12.js} +1 -1
  168. package/dist/cdn/{shared-407080a4.js → shared-dc704329.js} +1 -1
  169. package/dist/cdn/{shared-c5a44ef2.js → shared-def797b5.js} +1 -1
  170. package/dist/cdn/{shared-e55c8dc4.js → shared-e0cbe22a.js} +1 -1
  171. package/dist/cdn/{shared-af6e4823.js → shared-e0e91ce2.js} +1 -1
  172. package/dist/cdn/{shared-32b2d003.js → shared-e560a534.js} +3 -3
  173. package/dist/cdn/{shared-7329b19c.js → shared-e5840ce4.js} +1 -1
  174. package/dist/cdn/{shared-34a87829.js → shared-e7764ffb.js} +1 -1
  175. package/dist/cdn/{shared-d640517d.js → shared-e85918c4.js} +1 -1
  176. package/dist/cdn/{shared-0e25ac65.js → shared-eb7895bd.js} +1 -1
  177. package/dist/cdn/{shared-5b8b7c5f.js → shared-ecc3441b.js} +1 -1
  178. package/dist/cdn/shared-f03cfb48.js +1 -0
  179. package/dist/cdn/{shared-65112811.js → shared-f19f1940.js} +1 -1
  180. package/dist/cdn/{shared-6e92b5fc.js → shared-f3a9ae84.js} +1 -1
  181. package/dist/cdn/{shared-783f37d3.js → shared-fcadaa8c.js} +1 -1
  182. package/dist/cdn/{shared-bdc981e3.js → shared-fd0825a2.js} +1 -1
  183. package/dist/cdn/{shared-542c8ef1.js → shared-ffd0589e.js} +1 -1
  184. package/dist/cdn/translations/customer-portal/de.json +4 -2
  185. package/dist/cdn/translations/customer-portal/en.json +4 -2
  186. package/dist/cdn/translations/customer-portal/es.json +4 -2
  187. package/dist/cdn/translations/customer-portal/fr.json +4 -2
  188. package/dist/cdn/translations/customer-portal/nl.json +4 -2
  189. package/dist/cdn/translations/customer-portal/pl.json +4 -2
  190. package/dist/cdn/translations/customer-portal/sv.json +4 -2
  191. package/dist/cdn/translations/customer-portal/zh-HK.json +4 -2
  192. package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +7 -0
  193. package/dist/cdn/translations/subscription-card/en.json +4 -2
  194. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +1 -1
  195. package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +1 -1
  196. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +13 -7
  197. package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
  198. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderCustomOptionForm/InternalExperimentalAddToCartBuilderCustomOptionForm.d.ts +2 -1
  199. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderCustomOptionForm/InternalExperimentalAddToCartBuilderCustomOptionForm.js +49 -11
  200. package/dist/elements/public/ExperimentalAddToCartBuilder/internal/InternalExperimentalAddToCartBuilderCustomOptionForm/InternalExperimentalAddToCartBuilderCustomOptionForm.js.map +1 -1
  201. package/dist/elements/public/ExperimentalAddToCartBuilder/types.d.ts +1 -0
  202. package/dist/elements/public/ExperimentalAddToCartBuilder/types.js.map +1 -1
  203. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +24 -29
  204. package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
  205. package/dist/mixins/themeable.js +8 -40
  206. package/dist/mixins/themeable.js.map +1 -1
  207. package/package.json +1 -1
  208. package/dist/cdn/shared-3d353eb8.js +0 -1
  209. package/dist/cdn/shared-47f3f5f5.js +0 -29
  210. package/dist/cdn/shared-8464351f.js +0 -1
@@ -1,4 +1,4 @@
1
- import"./shared-6bf89411.js";import"./shared-e55c8dc4.js";import"./shared-27c16d99.js";import"./shared-0e25ac65.js";import{h as e,D as t,t as i,a,P as r}from"./shared-5a469962.js";import{C as o}from"./shared-360196ad.js";import{E as n,T as s}from"./shared-66278c21.js";const l=e`<dom-module id="lumo-text-field" theme-for="vaadin-text-field">
1
+ import"./shared-3b627ac8.js";import"./shared-e0cbe22a.js";import"./shared-84e81c06.js";import"./shared-eb7895bd.js";import{h as e,D as t,t as i,a,P as r}from"./shared-45ae3485.js";import{C as o}from"./shared-b02a95f7.js";import{E as n,T as s}from"./shared-0237985c.js";const l=e`<dom-module id="lumo-text-field" theme-for="vaadin-text-field">
2
2
  <template>
3
3
  <style include="lumo-required-field lumo-field-button">
4
4
  :host {
@@ -1,2 +1,2 @@
1
- import{I as e}from"./shared-ecbd0750.js";import{_ as r}from"./shared-8f9014ff.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
1
+ import{I as e}from"./shared-94de5e51.js";import{_ as r}from"./shared-8f9014ff.js";import{c as t,h as s}from"./shared-ba5c42c7.js";import{r as a}from"./shared-5fd5805c.js";let o,i,d,l,n,c=e=>e;customElements.define("foxy-internal-source-control",class extends e{constructor(){super(...arguments),this.__isErrorVisible=!1,this.__hovered=!1,this.__focused=!1}static get properties(){return r(r({},super.properties),{},{__isErrorVisible:{attribute:!1},__hovered:{attribute:!1},__focused:{attribute:!1}})}static get styles(){return[...super.styles,t(o||(o=c`.monospace{font-family:monospace}.resize-none{resize:none}.max-h-16em{max-height:16em}textarea::selection{background:var(--lumo-contrast-10pct)}`))]}renderControl(){var e;let r,t,o;return this.disabled?(r="bg-contrast-5 text-disabled",o="text-disabled",this.readonly?(r+=" border-dashed border-contrast-20",t="border-dashed border-contrast-30"):(r+=" border-transparent",t="border-contrast-10")):this.readonly?(r="border-dashed border-contrast-30 bg-transparent text-secondary",t="border-dashed border-contrast-30",o="text-secondary",this.__focused&&(t+=" ring-2 ring-primary-50")):this.__focused?(r="border-transparent bg-contrast-10 text-tertiary",t="border-primary-50 ring-1 ring-primary-50",o="text-body"):this.__hovered?(r="border-transparent bg-contrast-20 text-tertiary",t="border-contrast-20",o="text-body"):(r="border-transparent bg-contrast-10 text-tertiary",t="border-contrast-10",o="text-body"),s(i||(i=c` <label class="block h-full" @mouseenter="${0}" @mouseleave="${0}"> <div class="mb-s leading-s" ?hidden="${0}"> <div class="transition-colors text-l font-medium" part="label">${0}</div> <div class="transition-colors text-s text-secondary" part="helper-text"> ${0} </div> </div> <div class="max-h-16em h-full transition-colors flex-1 flex bg-base rounded overflow-auto border ${0}" part="editor"> <div class="h-full transition-colors monospace leading-s text-s text-right border-r ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} </div> <textarea placeholder="${0}" class="bg-base whitespace-pre leading-s text-s focus-outline-none monospace resize-none block w-full select-text transition-colors ${0}" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" rows="1" .value="${0}" ?disabled="${0}" ?readonly="${0}" @focus="${0}" @blur="${0}" @input="${0}">
2
2
  </textarea> </div> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> </label> `),(()=>this.__hovered=!0),(()=>this.__hovered=!1),!this.label&&!this.helperText,this.label,this.helperText,t,r,a(null!==(e=this._value.split("\n"))&&void 0!==e?e:[],((e,r)=>String(r)),((e,r)=>s(d||(d=c`<div>${0}${0}<span>${0}<span></span></span></div>`),r<9?s(l||(l=c`<span class="opacity-0">0</span>`)):"",r<99?s(n||(n=c`<span class="opacity-0">0</span>`)):"",r+1))),this.placeholder,o,this._value,this.disabled,this.readonly,(()=>this.__focused=!0),(()=>{this.__focused=!1,this.__isErrorVisible=!0}),(e=>{const r=e.currentTarget;this._value=r.value}),!this.__isErrorVisible||!this._errorMessage||this.disabled||this.readonly,this._errorMessage)}updated(e){super.updated(e),this.renderRoot.querySelectorAll("textarea").forEach((e=>{e.style.height="auto",e.style.height=`${e.scrollHeight}px`,e.style.overflowY="hidden"}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});
@@ -1,4 +1,4 @@
1
- import"./shared-6bf89411.js";import"./shared-e55c8dc4.js";import{h as e,P as t}from"./shared-5a469962.js";import{E as s,T as r}from"./shared-66278c21.js";import{F as l}from"./shared-eb49be2e.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
1
+ import"./shared-3b627ac8.js";import"./shared-e0cbe22a.js";import{h as e,P as t}from"./shared-45ae3485.js";import{E as s,T as r}from"./shared-0237985c.js";import{F as l}from"./shared-641c8ca6.js";const i=e`<dom-module id="lumo-custom-field" theme-for="vaadin-custom-field">
2
2
  <template>
3
3
  <style include="lumo-required-field">
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-6bf89411.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-required-field">\n <template>\n <style>\n [part="label"] {\n align-self: flex-start;\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n font-size: var(--lumo-font-size-s);\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n transition: color 0.2s;\n line-height: 1;\n padding-bottom: 0.5em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n position: relative;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n :host([has-label])::before {\n margin-top: calc(var(--lumo-font-size-s) * 1.5);\n }\n\n :host([has-label]) {\n padding-top: var(--lumo-space-m);\n }\n\n :host([required]) [part="label"] {\n padding-right: 1em;\n }\n\n [part="label"]::after {\n content: var(--lumo-required-field-indicator, "•");\n transition: opacity 0.2s;\n opacity: 0;\n color: var(--lumo-primary-text-color);\n position: absolute;\n right: 0;\n width: 1em;\n text-align: center;\n }\n\n :host([required]:not([has-value])) [part="label"]::after {\n opacity: 1;\n }\n\n :host([invalid]) [part="label"]::after {\n color: var(--lumo-error-text-color);\n }\n\n [part="error-message"] {\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n color: var(--lumo-error-text-color);\n will-change: max-height;\n transition: 0.4s max-height;\n max-height: 5em;\n }\n\n /* Margin that doesn’t reserve space when there’s no error message */\n [part="error-message"]:not(:empty)::before,\n [part="error-message"]:not(:empty)::after {\n content: "";\n display: block;\n height: 0.4em;\n }\n\n :host(:not([invalid])) [part="error-message"] {\n max-height: 0;\n overflow: hidden;\n }\n\n /* RTL specific styles */\n\n :host([dir="rtl"]) [part="label"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n :host([required][dir="rtl"]) [part="label"] {\n padding-left: 1em;\n padding-right: 0;\n }\n\n :host([dir="rtl"]) [part="label"]::after {\n right: auto;\n left: 0;\n }\n\n :host([dir="rtl"]) [part="error-message"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-3b627ac8.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-required-field">\n <template>\n <style>\n [part="label"] {\n align-self: flex-start;\n color: var(--lumo-secondary-text-color);\n font-weight: 500;\n font-size: var(--lumo-font-size-s);\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n transition: color 0.2s;\n line-height: 1;\n padding-bottom: 0.5em;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n position: relative;\n max-width: 100%;\n box-sizing: border-box;\n }\n\n :host([has-label])::before {\n margin-top: calc(var(--lumo-font-size-s) * 1.5);\n }\n\n :host([has-label]) {\n padding-top: var(--lumo-space-m);\n }\n\n :host([required]) [part="label"] {\n padding-right: 1em;\n }\n\n [part="label"]::after {\n content: var(--lumo-required-field-indicator, "•");\n transition: opacity 0.2s;\n opacity: 0;\n color: var(--lumo-primary-text-color);\n position: absolute;\n right: 0;\n width: 1em;\n text-align: center;\n }\n\n :host([required]:not([has-value])) [part="label"]::after {\n opacity: 1;\n }\n\n :host([invalid]) [part="label"]::after {\n color: var(--lumo-error-text-color);\n }\n\n [part="error-message"] {\n margin-left: calc(var(--lumo-border-radius-m) / 4);\n font-size: var(--lumo-font-size-xs);\n line-height: var(--lumo-line-height-xs);\n color: var(--lumo-error-text-color);\n will-change: max-height;\n transition: 0.4s max-height;\n max-height: 5em;\n }\n\n /* Margin that doesn’t reserve space when there’s no error message */\n [part="error-message"]:not(:empty)::before,\n [part="error-message"]:not(:empty)::after {\n content: "";\n display: block;\n height: 0.4em;\n }\n\n :host(:not([invalid])) [part="error-message"] {\n max-height: 0;\n overflow: hidden;\n }\n\n /* RTL specific styles */\n\n :host([dir="rtl"]) [part="label"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n :host([required][dir="rtl"]) [part="label"] {\n padding-left: 1em;\n padding-right: 0;\n }\n\n :host([dir="rtl"]) [part="label"]::after {\n right: auto;\n left: 0;\n }\n\n :host([dir="rtl"]) [part="error-message"] {\n margin-left: 0;\n margin-right: calc(var(--lumo-border-radius-m) / 4);\n }\n\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1,4 +1,4 @@
1
- import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-01ce5dcd.js";import{a as e}from"./shared-47f3f5f5.js";import{p as n}from"./shared-8498f274.js";import{g as a}from"./shared-96e4f603.js";import{c as o}from"./shared-4e709717.js";let r,l,m,i,u=t=>t;class c extends(e(s,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:s=>{const e=s.data._embedded["fx:transaction_template"],a=`${e.total_order} ${e.currency_code}`;return s.html(r||(r=u`
1
+ import{_ as t}from"./shared-8f9014ff.js";import{T as s}from"./shared-83e3626b.js";import{a as e}from"./shared-8368423a.js";import{p as n}from"./shared-30530592.js";import{g as a}from"./shared-96e4f603.js";import{c as o}from"./shared-4e709717.js";let r,l,m,i,u=t=>t;class c extends(e(s,"subscriptions-table")){constructor(){super(...arguments),this.columns=[c.priceColumn,c.summaryColumn,c.statusColumn,c.subTokenURLColumn]}}c.priceColumn={cell:s=>{const e=s.data._embedded["fx:transaction_template"],a=`${e.total_order} ${e.currency_code}`;return s.html(r||(r=u`
2
2
  <foxy-i18n
3
3
  data-testclass="i18n frequencies"
4
4
  class="font-medium text-m font-tnum"
@@ -1,4 +1,4 @@
1
- import{t as e}from"./shared-47f3f5f5.js";import{d as t}from"./shared-eb49be2e.js";
1
+ import{t as e}from"./shared-8368423a.js";import{d as t}from"./shared-641c8ca6.js";
2
2
  /**
3
3
  @license
4
4
  Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
@@ -7,7 +7,7 @@ The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
7
7
  The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
8
8
  Code distributed by Google as part of the polymer project is also
9
9
  subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
10
- */let i=!1,s=[],n=[];function o(){i=!0,requestAnimationFrame((function(){i=!1,function(e){for(;e.length;)r(e.shift())}(s),setTimeout((function(){!function(e){for(let t=0,i=e.length;t<i;t++)r(e.shift())}(n)}))}))}function r(e){const t=e[0],i=e[1],s=e[2];try{i.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function a(e,t,s){i||o(),n.push([e,t,s])}
10
+ */let i=!1,s=[],n=[];function o(){i=!0,requestAnimationFrame((function(){i=!1,function(e){for(;e.length;)a(e.shift())}(s),setTimeout((function(){!function(e){for(let t=0,i=e.length;t<i;t++)a(e.shift())}(n)}))}))}function a(e){const t=e[0],i=e[1],s=e[2];try{i.apply(t,s)}catch(e){setTimeout((()=>{throw e}))}}function r(e,t,s){i||o(),n.push([e,t,s])}
11
11
  /**
12
12
  @license
13
13
  Copyright (c) 2017 Vaadin Ltd.
@@ -22,4 +22,4 @@ http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
22
22
  found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
23
23
  part of the polymer project is also subject to an additional IP rights grant
24
24
  found at http://polymer.github.io/PATENTS.txt
25
- */;var d=new Set;const u={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(d.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():e||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=t(e).rootTarget;i!==this&&(i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(d.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?d.delete(this):d.add(this)}};export{h as I,a,u as b};
25
+ */;var d=new Set;const u={properties:{_parentResizable:{type:Object,observer:"_parentResizableChanged"},_notifyingDescendant:{type:Boolean,value:!1}},listeners:{"iron-request-resize-notifications":"_onIronRequestResizeNotifications"},created:function(){this._interestedResizables=[],this._boundNotifyResize=this.notifyResize.bind(this),this._boundOnDescendantIronResize=this._onDescendantIronResize.bind(this)},attached:function(){this._requestResizeNotifications()},detached:function(){this._parentResizable?this._parentResizable.stopResizeNotificationsFor(this):(d.delete(this),window.removeEventListener("resize",this._boundNotifyResize)),this._parentResizable=null},notifyResize:function(){this.isAttached&&(this._interestedResizables.forEach((function(e){this.resizerShouldNotify(e)&&this._notifyDescendant(e)}),this),this._fireResize())},assignParentResizable:function(e){this._parentResizable&&this._parentResizable.stopResizeNotificationsFor(this),this._parentResizable=e,e&&-1===e._interestedResizables.indexOf(this)&&(e._interestedResizables.push(this),e._subscribeIronResize(this))},stopResizeNotificationsFor:function(e){var t=this._interestedResizables.indexOf(e);t>-1&&(this._interestedResizables.splice(t,1),this._unsubscribeIronResize(e))},_subscribeIronResize:function(e){e.addEventListener("iron-resize",this._boundOnDescendantIronResize)},_unsubscribeIronResize:function(e){e.removeEventListener("iron-resize",this._boundOnDescendantIronResize)},resizerShouldNotify:function(e){return!0},_onDescendantIronResize:function(t){this._notifyingDescendant?t.stopPropagation():e||this._fireResize()},_fireResize:function(){this.fire("iron-resize",null,{node:this,bubbles:!1})},_onIronRequestResizeNotifications:function(e){var i=t(e).rootTarget;i!==this&&(i.assignParentResizable(this),this._notifyDescendant(i),e.stopPropagation())},_parentResizableChanged:function(e){e&&window.removeEventListener("resize",this._boundNotifyResize)},_notifyDescendant:function(e){this.isAttached&&(this._notifyingDescendant=!0,e.notifyResize(),this._notifyingDescendant=!1)},_requestResizeNotifications:function(){if(this.isAttached)if("loading"===document.readyState){var e=this._requestResizeNotifications.bind(this);document.addEventListener("readystatechange",(function t(){document.removeEventListener("readystatechange",t),e()}))}else this._findParent(),this._parentResizable?this._parentResizable._interestedResizables.forEach((function(e){e!==this&&e._findParent()}),this):(d.forEach((function(e){e!==this&&e._findParent()}),this),window.addEventListener("resize",this._boundNotifyResize),this.notifyResize())},_findParent:function(){this.assignParentResizable(null),this.fire("iron-request-resize-notifications",null,{node:this,bubbles:!0,cancelable:!0}),this._parentResizable?d.delete(this):d.add(this)}};export{h as I,r as a,u as b};
@@ -1 +1 @@
1
- import"./shared-a6b2bd14.js";import"./shared-69d417c2.js";import"./shared-5b8b7c5f.js";import"./shared-56226850.js";import{I as e}from"./shared-c9061102.js";import{a as t}from"./shared-ecbd0750.js";import"./shared-3d353eb8.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-8f9014ff.js";import{S as a,a as l}from"./shared-47f3f5f5.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends t{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(e,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
1
+ import"./shared-a6b2bd14.js";import"./shared-40f265c5.js";import"./shared-ecc3441b.js";import"./shared-0cbd8bf4.js";import{I as e}from"./shared-6eb8aa92.js";import{a as t}from"./shared-94de5e51.js";import"./shared-f03cfb48.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-8f9014ff.js";import{S as a,a as l}from"./shared-8368423a.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends t{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(e,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
@@ -1,4 +1,4 @@
1
- import{h as t,P as e}from"./shared-5a469962.js";import{E as i,T as o}from"./shared-66278c21.js";import"./shared-6bf89411.js";import"./shared-d4b77609.js";import"./shared-bf8d95b9.js";import{x as s}from"./shared-47f3f5f5.js";import{c as n}from"./shared-ba5c42c7.js";s("vcf-tooltip",n`
1
+ import{h as t,P as e}from"./shared-45ae3485.js";import{E as i,T as o}from"./shared-0237985c.js";import"./shared-3b627ac8.js";import"./shared-22168ef7.js";import"./shared-50b66625.js";import{x as s}from"./shared-8368423a.js";import{c as n}from"./shared-ba5c42c7.js";s("vcf-tooltip",n`
2
2
  :host {
3
3
  /* Sizing */
4
4
  --lumo-tooltip-size: var(--lumo-size-m);
@@ -1 +1 @@
1
- import"./shared-fb859ece.js";import{I as e}from"./shared-ecbd0750.js";import"./shared-3d353eb8.js";import{_ as t}from"./shared-8f9014ff.js";import{i as s}from"./shared-53e42a77.js";import{h as i,s as a}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="leading-xs"> <div class="flex items-center gap-s"> <label class="text-m text-body flex-1 whitespace-nowrap" for="select"> ${0} </label> <div class="${0}"> <div class="flex items-center gap-xs min-w-0"> <div class="truncate min-w-0"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,l({"relative rounded-s transition-colors transition-opacity min-w-0":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
1
+ import"./shared-9c36e563.js";import{I as e}from"./shared-94de5e51.js";import"./shared-f03cfb48.js";import{_ as t}from"./shared-8f9014ff.js";import{i as s}from"./shared-53e42a77.js";import{h as i,s as a}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="leading-xs"> <div class="flex items-center gap-s"> <label class="text-m text-body flex-1 whitespace-nowrap" for="select"> ${0} </label> <div class="${0}"> <div class="flex items-center gap-xs min-w-0"> <div class="truncate min-w-0"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,l({"relative rounded-s transition-colors transition-opacity min-w-0":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
@@ -1 +1 @@
1
- import"./shared-6bf89411.js";import"./shared-27c16d99.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
1
+ import"./shared-3b627ac8.js";import"./shared-84e81c06.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
@@ -1 +1 @@
1
- import"./shared-6f071960.js";import"./shared-b3fe8c63.js";import{I as e}from"./shared-ecbd0750.js";import{x as t}from"./shared-47f3f5f5.js";import{c as r,h as a,s as o}from"./shared-ba5c42c7.js";import{_ as l}from"./shared-8f9014ff.js";import{i as s}from"./shared-53e42a77.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let h,d,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(h||(h=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(d||(d=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
1
+ import"./shared-ae5aa93b.js";import"./shared-d8ec7f12.js";import{I as e}from"./shared-94de5e51.js";import{x as t}from"./shared-8368423a.js";import{c as r,h as a,s as o}from"./shared-ba5c42c7.js";import{_ as l}from"./shared-8f9014ff.js";import{i as s}from"./shared-53e42a77.js";import{c as i}from"./shared-4e709717.js";let n;function m(e){var t,r,a;const o=null!==(t=null==e?void 0:e.separator)&&void 0!==t?t:"-",l=null!==(r=null==e?void 0:e.charset)&&void 0!==r?r:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",s=null!==(a=null==e?void 0:e.length)&&void 0!==a?a:18;let i="";for(let e=0;e<s;e++)o&&e>0&&e%6==0&&(i+=o),i+=l[Math.floor(Math.random()*l.length)];return i}t("vaadin-password-field",r(n||(n=(e=>e)`:host([theme~=summary-item])::before{display:none}:host([theme~=summary-item]) .vaadin-text-field-container{display:grid;grid-template-columns:auto auto;grid-template-rows:repeat(3,min-content);gap:0 var(--lumo-space-m)}:host([theme~=summary-item]) [part=label]{font:normal var(--lumo-font-size-m) var(--lumo-font-family);color:var(--lumo-body-text-color)!important;grid-row:1;-webkit-text-fill-color:var(--lumo-body-text-color)!important}:host([theme~=summary-item]) [part=helper-text]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-secondary-text-color)!important;grid-row:2}:host([theme~=summary-item]) [part=helper-text]::before{display:none}:host([theme~=summary-item]) [part=error-message]{font:normal var(--lumo-font-size-s) var(--lumo-font-family);color:var(--lumo-error-text-color);grid-row:3}:host([theme~=summary-item]) [part=error-message],:host([theme~=summary-item]) [part=helper-text],:host([theme~=summary-item]) [part=label]{line-height:var(--lumo-line-height-xs);grid-column:1;padding:0}:host([theme~=summary-item]) [part=input-field]{grid-column:2;grid-row:1;padding:0;background:0 0;align-self:start;height:1em;--lumo-icon-size-m:1rem}:host([theme~=summary-item]) [part=input-field]::after,:host([theme~=summary-item][readonly]) [part=input-field] slot[name=suffix]{display:none}:host([theme~=summary-item]) [part=value]{line-height:var(--lumo-line-height-xs);text-align:right;min-height:auto;padding:0;margin-right:var(--lumo-space-xs);-webkit-mask-image:none}:host([theme~=summary-item][readonly]) [part=value]{margin-right:0}`)));let d,h,u,p=e=>e;customElements.define("foxy-internal-password-control",class extends e{constructor(){super(...arguments),this.generatorOptions=null,this.showGenerator=!1,this.layout=null}static get properties(){return l(l({},super.properties),{},{generatorOptions:{type:Object,attribute:"generator-options"},showGenerator:{type:Boolean,attribute:"show-generator"},layout:{}})}renderControl(){var e;return a(d||(d=p` <vaadin-password-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" theme="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> ${0} </vaadin-password-field> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.layout)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}),this.showGenerator?this.__renderGenerator():"")}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}__renderGenerator(){return a(h||(h=p` <div data-testid="generator" class="${0}" slot="suffix" @click="${0}"> ${0} </div> `),i({"w-s h-s flex items-center justify-center cursor-default transition-colors":!0,"text-contrast-60 hover-text-contrast-80":!this.disabled&&!this.readonly,"text-contrast-20":this.disabled||this.readonly}),(()=>{var e,t,r,a;let o,l=!1,s=0;do{o=m(null!==(e=this.generatorOptions)&&void 0!==e?e:void 0),l=null===(a=null===(r=null===(t=this.generatorOptions)||void 0===t?void 0:t.checkStrength)||void 0===r?void 0:r.call(t,o))||void 0===a||a,s++}while(!l&&s<100);if(!l)throw new Error("Failed to generate a strong password.");this._value=o;const i=this.renderRoot.querySelector("vaadin-password-field");null==i||i._setPasswordVisible(!0)}),o(u||(u=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" style="width: 1.15em; height: 1.15em"><path d="M15.98 1.804a1 1 0 00-1.96 0l-.24 1.192a1 1 0 01-.784.785l-1.192.238a1 1 0 000 1.962l1.192.238a1 1 0 01.785.785l.238 1.192a1 1 0 001.962 0l.238-1.192a1 1 0 01.785-.785l1.192-.238a1 1 0 000-1.962l-1.192-.238a1 1 0 01-.785-.785l-.238-1.192zM6.949 5.684a1 1 0 00-1.898 0l-.683 2.051a1 1 0 01-.633.633l-2.051.683a1 1 0 000 1.898l2.051.684a1 1 0 01.633.632l.683 2.051a1 1 0 001.898 0l.683-2.051a1 1 0 01.633-.633l2.051-.683a1 1 0 000-1.898l-2.051-.683a1 1 0 01-.633-.633L6.95 5.684zM13.949 13.684a1 1 0 00-1.898 0l-.184.551a1 1 0 01-.632.633l-.551.183a1 1 0 000 1.898l.551.183a1 1 0 01.633.633l.183.551a1 1 0 001.898 0l.184-.551a1 1 0 01.632-.633l.551-.183a1 1 0 000-1.898l-.551-.184a1 1 0 01-.633-.632l-.183-.551z" /></svg>`)))}});
@@ -0,0 +1 @@
1
+ import{F as e,A as t,_ as n}from"./shared-8f9014ff.js";import{h as r,L as s}from"./shared-ba5c42c7.js";import{i,a}from"./shared-8368423a.js";import{I as o}from"./shared-930e68b7.js";const l={type:"backend",init:()=>{},read:(n,r,s)=>{const i=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();s(t,n)},a=e=>{const t=e instanceof Error?e:new Error(String(e));s(t,!1)},o=new e("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new t.WHATWGRequest(`foxy://i18n/${r}/${n}`),resolve:i,reject:a});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(i).catch(a)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const i=t.endsWith("_percentage")?.01:1,a=n.split("|"),o=["allunits","incremental","repeat","single"].includes(a[0])?a.shift():"single",l=e.split(" "),c=l.shift(),u=[...l,`${o}_${t}_discount_summary`].join(".");return a.map((e=>{var t,n;const r=null!==(n=null===(t=/[-+]/.exec(e))||void 0===t?void 0:t.index)&&void 0!==n?n:-1,s=parseFloat(e.substring(r))*i,a=parseFloat(e.substring(0,r));return`$t(${u}, ${JSON.stringify({maximumFractionDigits:10,adjustment:s,from:a,ns:c})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:i}=c(e,!0);return.5===s&&"month"===i&&(s=2,i="week"),r.format(s,i)},percent:(e,t,r,s)=>{let i=null;try{"number"==typeof e&&(i=e.toLocaleString(r,n(n({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return i||String(e)},ordinal:(e,t,n,r)=>{var s,i;const a=new Intl.PluralRules(n,{type:"ordinal"}),o=null!==(i=null===(s=null==r?void 0:r.ns)||void 0===s?void 0:s.split(" "))&&void 0!==i?i:[];null==o||o.shift();return`${e}$t(${[...o,`ordinal_${a.select(e)}`].join(".")})`},price:(e,t,n,r)=>{var s;try{const[t,i]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:i})}catch(t){return e}},date:(e,t,n,r)=>{var s,i,a;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=null!==(i=null==r?void 0:r.year)&&void 0!==i?i:"numeric",u=null!==(a=null==r?void 0:r.day)&&void 0!==a?a:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class h extends(a(o(s),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>h.i18next.on(t,e))),n.forEach((t=>h.i18next.store.on(t,e))),()=>{t.forEach((t=>h.i18next.off(t,e))),n.forEach((t=>h.i18next.store.off(t,e)))}}static onResourceFetch(t){const n=n=>{if(n instanceof e&&n.request.url.startsWith("foxy://i18n/")){const[e,r]=n.request.url.split("/").reverse();n.respondWith(t(r,e))}};return addEventListener("fetch",n),()=>removeEventListener("fetch",n)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return n(n({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=h.onTranslationChange((()=>this.requestUpdate()))}render(){return r(d||(d=p`<span>${0}</span>`),this.t(this.key,n(n({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}h.FetchEvent=e,h.i18next=i.createInstance().use(l),h.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,i;return null!==(i=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==i?i:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",h);export{h as I,c as p};
@@ -1,4 +1,4 @@
1
- import"./shared-6bf89411.js";import{h as t,P as e}from"./shared-5a469962.js";import{F as i,t as o}from"./shared-eb49be2e.js";import{T as n,a,E as s}from"./shared-66278c21.js";import"./shared-9e0b104a.js";import{O as r}from"./shared-fb859ece.js";import"./shared-360196ad.js";import"./shared-adbdfff2.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-3d353eb8.js";import{I as l}from"./shared-ecbd0750.js";import"./shared-1c985317.js";import{x as d}from"./shared-47f3f5f5.js";import{c,h,r as m}from"./shared-ba5c42c7.js";import{_ as u}from"./shared-8f9014ff.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
1
+ import"./shared-3b627ac8.js";import{h as t,P as e}from"./shared-45ae3485.js";import{F as i,t as o}from"./shared-641c8ca6.js";import{T as n,a,E as s}from"./shared-0237985c.js";import"./shared-259870ee.js";import{O as r}from"./shared-9c36e563.js";import"./shared-b02a95f7.js";import"./shared-89ad4177.js";import"./foxy-collection-page.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./foxy-pagination.js";import"./shared-f03cfb48.js";import{I as l}from"./shared-94de5e51.js";import"./shared-c8af1e27.js";import{x as d}from"./shared-8368423a.js";import{c,h,r as m}from"./shared-ba5c42c7.js";import{_ as u}from"./shared-8f9014ff.js";import{i as p}from"./shared-53e42a77.js";import{c as _}from"./shared-4e709717.js";const f=t`<dom-module id="lumo-notification-card" theme-for="vaadin-notification-card">
2
2
  <template>
3
3
  <style>
4
4
  :host {
@@ -1 +1 @@
1
- import"./shared-be2ce0e6.js";import"./shared-b3fe8c63.js";import{I as e}from"./shared-ecbd0750.js";import{_ as t}from"./shared-8f9014ff.js";import{c as i,h as s}from"./shared-ba5c42c7.js";import{i as r}from"./shared-53e42a77.js";import{c as l}from"./shared-4e709717.js";let a,n,o,d,u,h,p,m=e=>e;customElements.define("foxy-internal-number-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(a||(a=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var e,t,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(n||(n=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),r(this._errorMessage),this.placeholder,this.helperText,this.label,r(null!==(e=this.step)&&void 0!==e?e:void 0),r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=parseFloat(t.value)}),this.prefix?s(o||(o=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(d||(d=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var e,t,i;return s(u||(u=m` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> ${0} <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.prefix?s(h||(h=m`<div>${0}</div>`),this.prefix):"",this.placeholder,l({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),r(null!==(e=this.step)&&void 0!==e?e:void 0),r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i:void 0),this._value,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)||(this._value=t)}),this.suffix?s(p||(p=m`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
1
+ import"./shared-82e82763.js";import"./shared-d8ec7f12.js";import{I as e}from"./shared-94de5e51.js";import{_ as t}from"./shared-8f9014ff.js";import{c as i,h as s}from"./shared-ba5c42c7.js";import{i as r}from"./shared-53e42a77.js";import{c as l}from"./shared-4e709717.js";let a,n,o,d,u,h,p,m=e=>e;customElements.define("foxy-internal-number-control",class extends e{constructor(){super(...arguments),this.layout=null,this.prefix=null,this.suffix=null,this.step=null,this.min=null,this.max=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{layout:{},prefix:{},suffix:{},step:{type:Number},min:{type:Number},max:{type:Number},__isErrorVisible:{attribute:!1}})}static get styles(){return[...super.styles,i(a||(a=m`input::-webkit-contacts-auto-fill-button{visibility:hidden;display:none!important;pointer-events:none;position:absolute;right:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}renderControl(){var e,t,i;return"summary-item"===this.layout?this.__renderSummaryItemLayout():s(n||(n=m` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" step="${0}" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-number-field> `),r(this._errorMessage),this.placeholder,this.helperText,this.label,r(null!==(e=this.step)&&void 0!==e?e:void 0),r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=parseFloat(t.value)}),this.prefix?s(o||(o=m`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?s(d||(d=m`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}__renderSummaryItemLayout(){var e,t,i;return s(u||(u=m` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> ${0} <input placeholder="${0}" style="min-width:10ch" class="${0}" type="number" step="${0}" min="${0}" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @blur="${0}" @input="${0}"> ${0} </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,this.prefix?s(h||(h=m`<div>${0}</div>`),this.prefix):"",this.placeholder,l({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),null!==(e=this.step)&&void 0!==e?e:"any",r(null!==(t=this.min)&&void 0!==t?t:void 0),r(null!==(i=this.max)&&void 0!==i?i:void 0),this._value,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation();const t=parseFloat(e.target.value);isNaN(t)||(this._value=t)}),this.suffix?s(p||(p=m`<div class="font-medium text-secondary">${0}</div>`),this.suffix):"",this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}});
@@ -1 +1 @@
1
- import"./shared-360196ad.js";import{a as r}from"./shared-ecbd0750.js";import"./foxy-form-dialog.js";import"./shared-3d353eb8.js";import{_ as e}from"./shared-8f9014ff.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
1
+ import"./shared-b02a95f7.js";import{a as r}from"./shared-94de5e51.js";import"./foxy-form-dialog.js";import"./shared-f03cfb48.js";import{_ as e}from"./shared-8f9014ff.js";import{i as t}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";let a,i=r=>r;customElements.define("foxy-internal-bulk-add-action-control",class extends r{constructor(){super(...arguments),this.related=[],this.parent=null,this.form=null}static get properties(){return e(e({},super.properties),{},{related:{type:Array},parent:{},form:{}})}renderControl(){var r,e;return o(a||(a=i` <foxy-form-dialog header="header" parent="${0}" infer="dialog" form="${0}" alert .related="${0}"> </foxy-form-dialog> <vaadin-button theme="tertiary-inline" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_text"></foxy-i18n> </vaadin-button> `),t(null!==(r=this.parent)&&void 0!==r?r:void 0),t(null!==(e=this.form)&&void 0!==e?e:void 0),this.related,this.disabled,(r=>{const e=this.renderRoot.querySelector("foxy-form-dialog"),t=r.target;e&&(e.href="",e.show(t))}))}});
@@ -1 +1 @@
1
- import{L as r,h as s}from"./shared-ba5c42c7.js";import{z as e}from"./shared-47f3f5f5.js";let t,o=r=>r;class a extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}export{a as W};
1
+ import{L as r,h as s}from"./shared-ba5c42c7.js";import{z as e}from"./shared-8368423a.js";let t,o=r=>r;class a extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}export{a as W};
@@ -1 +1 @@
1
- import{T as e}from"./shared-47f3f5f5.js";import{N as t}from"./shared-fd8b44e3.js";import{c as s}from"./shared-4e709717.js";import{h as i}from"./shared-ba5c42c7.js";let r,n,a=e=>e;class o extends(e(t)){renderBody(){return i(r||(r=a``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return i(n||(n=a` <div aria-busy="${0}" aria-live="polite" class="relative leading-s text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
1
+ import{T as e}from"./shared-8368423a.js";import{N as t}from"./shared-fd8b44e3.js";import{c as s}from"./shared-4e709717.js";import{h as i}from"./shared-ba5c42c7.js";let r,a,n=e=>e;class o extends(e(t)){renderBody(){return i(r||(r=n``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return i(a||(a=n` <div aria-busy="${0}" aria-live="polite" class="relative leading-s text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Nächste Zahlung am {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Aktiv",
940
940
  "status_inactive": "Inaktiv",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} Und {{count_minus_one}} mehr",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} und {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} und {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} und {{ count_minus_three }} mehr",
943
945
  "fees_hint": "inc. ",
944
946
  "fees_explainer": "Steuern, Versand und Rabatte können den berechneten Betrag ändern.",
945
947
  "twice_a_month": "zweimal im Monat",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Next payment on {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Active",
940
940
  "status_inactive": "Inactive",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} and {{count_minus_one}} more",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} and {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} and {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} and {{ count_minus_three }} more",
943
945
  "fees_hint": "inc. shipping, taxes, etc.",
944
946
  "fees_explainer": "Taxes, shipping, and discounts may change the amount charged.",
945
947
  "twice_a_month": "twice a month",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Próximo pago el {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Activo",
940
940
  "status_inactive": "Inactivo",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} y {{count_minus_one}} más",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} y {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} y {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} y {{ count_minus_three }} más",
943
945
  "fees_hint": "incluye envío, impuestos, etc.",
944
946
  "fees_explainer": "Los impuestos, el envío y los descuentos pueden cambiar el monto cobrado.",
945
947
  "twice_a_month": "dos veces al mes",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Prochain paiement le {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Actif",
940
940
  "status_inactive": "Inactif",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} et {{count_minus_one}} plus",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} et {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} et {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} et {{ count_minus_three }} de plus",
943
945
  "fees_hint": "inc. ",
944
946
  "fees_explainer": "Les taxes, les frais d'expédition et les réductions peuvent modifier le montant facturé.",
945
947
  "twice_a_month": "deux fois par mois",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Volgende betaling op {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Actief",
940
940
  "status_inactive": "Inactief",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} En {{count_minus_one}} meer",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} en {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} en {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} en {{ count_minus_three }} meer",
943
945
  "fees_hint": "incl. ",
944
946
  "fees_explainer": "Belastingen, verzendkosten en kortingen kunnen het in rekening gebrachte bedrag wijzigen.",
945
947
  "twice_a_month": "twee keer per maand",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Następna płatność dnia {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Aktywne",
940
940
  "status_inactive": "Nieaktywny",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} I {{count_minus_one}} więcej",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} i {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} i {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} i {{ count_minus_three }} więcej",
943
945
  "fees_hint": "Inc. ",
944
946
  "fees_explainer": "Podatki, koszty wysyłki i rabaty mogą zmienić pobraną kwotę.",
945
947
  "twice_a_month": "dwa razy w miesiącu",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "Nästa betalning den {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "Aktiv",
940
940
  "status_inactive": "Inaktiv",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} och {{count_minus_one}} Mer",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} och {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} och {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} och {{ count_minus_three }} fler",
943
945
  "fees_hint": "inkl. ",
944
946
  "fees_explainer": "Skatter, frakt och rabatter kan ändra beloppet som debiteras.",
945
947
  "twice_a_month": "två gånger i månaden",
@@ -938,8 +938,10 @@
938
938
  "status_next_payment": "下次付款日期为 {{ next_transaction_date, date }}",
939
939
  "status_next_payment_no_nextdate": "活跃",
940
940
  "status_inactive": "不活跃",
941
- "transaction_summary": "{{first_item.name}}",
942
- "transaction_summary_plural": "{{first_item.name}} 和 {{count_minus_one}} 更多的",
941
+ "summary_one_item": "{{ items.0.name }}",
942
+ "summary_two_items": "{{ items.0.name }} 和 {{ items.1.name }}",
943
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} 和 {{ items.2.name }}",
944
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} 和 {{ count_minus_three }} 更多",
943
945
  "fees_hint": "公司",
944
946
  "fees_explainer": "税费、运费和折扣可能会改变收费金额。",
945
947
  "twice_a_month": "每月两次",
@@ -326,6 +326,12 @@
326
326
  },
327
327
  "value-configurable": {
328
328
  "label": "Let users enter a custom value",
329
+ "helper_text": "Not available for options with alternative values.",
330
+ "checked": "Yes",
331
+ "unchecked": "No"
332
+ },
333
+ "required": {
334
+ "label": "Mark this field as required",
329
335
  "helper_text": "",
330
336
  "checked": "Yes",
331
337
  "unchecked": "No"
@@ -567,6 +573,7 @@
567
573
  "price_label": "Price:",
568
574
  "quantity_label": "Quantity:",
569
575
  "shipto_label": "Ship to:",
576
+ "required": "Required",
570
577
  "submit_caption_cart": "Add to cart",
571
578
  "submit_caption_checkout": "Purchase",
572
579
  "unavailable": {
@@ -22,8 +22,10 @@
22
22
  "status_next_payment": "Next payment on {{ next_transaction_date, date }}",
23
23
  "status_next_payment_no_nextdate": "Active",
24
24
  "status_inactive": "Inactive",
25
- "transaction_summary": "{{first_item.name}}",
26
- "transaction_summary_plural": "{{first_item.name}} and {{ count_minus_one }} more",
25
+ "summary_one_item": "{{ items.0.name }}",
26
+ "summary_two_items": "{{ items.0.name }} and {{ items.1.name }}",
27
+ "summary_three_items": "{{ items.0.name }}, {{ items.1.name }} and {{ items.2.name }}",
28
+ "summary_four_plus_items": "{{ items.0.name }}, {{ items.1.name }}, {{ items.2.name }} and {{ count_minus_three }} more",
27
29
  "fees_hint": "inc. shipping, taxes, etc.",
28
30
  "fees_explainer": "Taxes, shipping, and discounts may change the amount charged.",
29
31
  "twice_a_month": "Twice a month",
@@ -108,7 +108,7 @@ input{
108
108
  'font-medium': !this.readonly,
109
109
  })}
110
110
  type="number"
111
- step=${ifDefined((_a = this.step) !== null && _a !== void 0 ? _a : void 0)}
111
+ step=${(_a = this.step) !== null && _a !== void 0 ? _a : 'any'}
112
112
  min=${ifDefined((_b = this.min) !== null && _b !== void 0 ? _b : void 0)}
113
113
  max=${ifDefined((_c = this.max) !== null && _c !== void 0 ? _c : void 0)}
114
114
  id="input"
@@ -1 +1 @@
1
- {"version":3,"file":"InternalNumberControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalNumberControl/InternalNumberControl.ts"],"names":[],"mappings":"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","sourcesContent":["import type { CSSResultArray, PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { NumberFieldElement } from '@vaadin/vaadin-text-field/vaadin-number-field';\n\nimport { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';\nimport { html, css } from 'lit-element';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\n\n/**\n * Internal control displaying a basic number box.\n *\n * @since 1.17.0\n * @element foxy-internal-number-control\n */\nexport class InternalNumberControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n prefix: {},\n suffix: {},\n step: { type: Number },\n min: { type: Number },\n max: { type: Number },\n __isErrorVisible: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n display: none !important;\n pointer-events: none;\n position: absolute;\n right: 0;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input {\n -moz-appearance: textfield;\n }\n `,\n ];\n }\n\n layout: 'summary-item' | 'standalone' | null = null;\n\n prefix: string | null = null;\n\n suffix: string | null = null;\n\n step: number | null = null;\n\n min: number | null = null;\n\n max: number | null = null;\n\n private __isErrorVisible = false;\n\n reportValidity(): void {\n this.__isErrorVisible = true;\n super.reportValidity();\n }\n\n renderControl(): TemplateResult {\n if (this.layout === 'summary-item') return this.__renderSummaryItemLayout();\n\n return html`\n <vaadin-number-field\n error-message=${ifDefined(this._errorMessage)}\n placeholder=${this.placeholder}\n helper-text=${this.helperText}\n label=${this.label}\n class=\"w-full\"\n step=${ifDefined(this.step ?? undefined)}\n min=${ifDefined(this.min ?? undefined)}\n max=${ifDefined(this.max ?? undefined)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n .checkValidity=${this._checkValidity}\n .value=${this._value}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.nucleon?.submit()}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as NumberFieldElement;\n this._value = parseFloat(field.value);\n }}\n >\n ${this.prefix ? html`<div slot=\"prefix\">${this.prefix}</div>` : ''}\n ${this.suffix ? html`<div class=\"pr-s font-medium\" slot=\"suffix\">${this.suffix}</div>` : ''}\n </vaadin-number-field>\n `;\n }\n\n private __renderSummaryItemLayout() {\n return html`\n <div class=\"leading-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"text-m text-body flex-1 whitespace-nowrap\" for=\"input\">${this.label}</label>\n\n ${this.prefix ? html`<div>${this.prefix}</div>` : ''}\n\n <input\n placeholder=${this.placeholder}\n style=\"min-width: 10ch\"\n class=${classMap({\n 'w-full appearance-none text-right bg-transparent transition-colors': true,\n 'text-m rounded-s focus-outline-none': true,\n 'text-secondary': this.readonly,\n 'text-disabled': this.disabled,\n 'font-medium': !this.readonly,\n })}\n type=\"number\"\n step=${ifDefined(this.step ?? void 0)}\n min=${ifDefined(this.min ?? void 0)}\n max=${ifDefined(this.max ?? void 0)}\n id=\"input\"\n .value=${this._value}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.nucleon?.submit()}\n @blur=${() => (this.__isErrorVisible = true)}\n @input=${(evt: Event) => {\n evt.stopPropagation();\n const newValue = parseFloat((evt.target as HTMLInputElement).value);\n if (!isNaN(newValue)) this._value = newValue;\n }}\n />\n\n ${this.suffix ? html`<div class=\"font-medium text-secondary\">${this.suffix}</div>` : ''}\n </div>\n <div style=\"max-width: 32rem\">\n <p class=\"text-xs text-secondary\">${this.helperText}</p>\n <p\n class=\"text-xs text-error\"\n ?hidden=${!this.__isErrorVisible || this.disabled || this.readonly}\n >\n ${this._errorMessage}\n </p>\n </div>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"InternalNumberControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalNumberControl/InternalNumberControl.ts"],"names":[],"mappings":"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","sourcesContent":["import type { CSSResultArray, PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { NumberFieldElement } from '@vaadin/vaadin-text-field/vaadin-number-field';\n\nimport { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';\nimport { html, css } from 'lit-element';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\n\n/**\n * Internal control displaying a basic number box.\n *\n * @since 1.17.0\n * @element foxy-internal-number-control\n */\nexport class InternalNumberControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n prefix: {},\n suffix: {},\n step: { type: Number },\n min: { type: Number },\n max: { type: Number },\n __isErrorVisible: { attribute: false },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n input::-webkit-contacts-auto-fill-button {\n visibility: hidden;\n display: none !important;\n pointer-events: none;\n position: absolute;\n right: 0;\n }\n\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n input {\n -moz-appearance: textfield;\n }\n `,\n ];\n }\n\n layout: 'summary-item' | 'standalone' | null = null;\n\n prefix: string | null = null;\n\n suffix: string | null = null;\n\n step: number | null = null;\n\n min: number | null = null;\n\n max: number | null = null;\n\n private __isErrorVisible = false;\n\n reportValidity(): void {\n this.__isErrorVisible = true;\n super.reportValidity();\n }\n\n renderControl(): TemplateResult {\n if (this.layout === 'summary-item') return this.__renderSummaryItemLayout();\n\n return html`\n <vaadin-number-field\n error-message=${ifDefined(this._errorMessage)}\n placeholder=${this.placeholder}\n helper-text=${this.helperText}\n label=${this.label}\n class=\"w-full\"\n step=${ifDefined(this.step ?? undefined)}\n min=${ifDefined(this.min ?? undefined)}\n max=${ifDefined(this.max ?? undefined)}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n .checkValidity=${this._checkValidity}\n .value=${this._value}\n clear-button-visible\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.nucleon?.submit()}\n @change=${(evt: CustomEvent) => {\n const field = evt.currentTarget as NumberFieldElement;\n this._value = parseFloat(field.value);\n }}\n >\n ${this.prefix ? html`<div slot=\"prefix\">${this.prefix}</div>` : ''}\n ${this.suffix ? html`<div class=\"pr-s font-medium\" slot=\"suffix\">${this.suffix}</div>` : ''}\n </vaadin-number-field>\n `;\n }\n\n private __renderSummaryItemLayout() {\n return html`\n <div class=\"leading-xs\">\n <div class=\"flex items-center gap-xs\">\n <label class=\"text-m text-body flex-1 whitespace-nowrap\" for=\"input\">${this.label}</label>\n\n ${this.prefix ? html`<div>${this.prefix}</div>` : ''}\n\n <input\n placeholder=${this.placeholder}\n style=\"min-width: 10ch\"\n class=${classMap({\n 'w-full appearance-none text-right bg-transparent transition-colors': true,\n 'text-m rounded-s focus-outline-none': true,\n 'text-secondary': this.readonly,\n 'text-disabled': this.disabled,\n 'font-medium': !this.readonly,\n })}\n type=\"number\"\n step=${this.step ?? 'any'}\n min=${ifDefined(this.min ?? void 0)}\n max=${ifDefined(this.max ?? void 0)}\n id=\"input\"\n .value=${this._value}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.nucleon?.submit()}\n @blur=${() => (this.__isErrorVisible = true)}\n @input=${(evt: Event) => {\n evt.stopPropagation();\n const newValue = parseFloat((evt.target as HTMLInputElement).value);\n if (!isNaN(newValue)) this._value = newValue;\n }}\n />\n\n ${this.suffix ? html`<div class=\"font-medium text-secondary\">${this.suffix}</div>` : ''}\n </div>\n <div style=\"max-width: 32rem\">\n <p class=\"text-xs text-secondary\">${this.helperText}</p>\n <p\n class=\"text-xs text-error\"\n ?hidden=${!this.__isErrorVisible || this.disabled || this.readonly}\n >\n ${this._errorMessage}\n </p>\n </div>\n </div>\n `;\n }\n}\n"]}
@@ -511,7 +511,7 @@ export class ExperimentalAddToCartBuilder extends Base {
511
511
  return this.renderRoot.querySelector(selector);
512
512
  }
513
513
  __getAddToCartFormHTML() {
514
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
514
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
515
515
  const currencyCode = this.__resolvedCurrencyCode;
516
516
  const templateSet = this.__resolvedTemplateSet;
517
517
  const cartUrl = this.__resolvedCartUrl;
@@ -702,7 +702,7 @@ export class ExperimentalAddToCartBuilder extends Base {
702
702
  const optionIndex = product.custom_options.indexOf(group[0]);
703
703
  const itemCategory = (_j = this.__getItemCategoryLoader(productIndex, optionIndex)) === null || _j === void 0 ? void 0 : _j.data;
704
704
  const modifiers = this.__getOptionModifiers(group[0], itemCategory !== null && itemCategory !== void 0 ? itemCategory : null, currencyCode);
705
- const value = `${group[0].value}${modifiers}`;
705
+ const value = `${(_k = group[0].value) !== null && _k !== void 0 ? _k : ''}${modifiers}`;
706
706
  const name = `${prefix}${optionName}`;
707
707
  if (group[0].value_configurable) {
708
708
  output += `${newline()}<label>`;
@@ -710,10 +710,16 @@ export class ExperimentalAddToCartBuilder extends Base {
710
710
  output += `${newline()}<span>${encode(optionName)}:</span>`;
711
711
  output += `${newline()}<input name="${encodeAttributeValue(name, isHmacOn)}" `;
712
712
  if (store.use_cart_validation) {
713
- output += `value="--OPEN--" data-replace="${encodeAttributeValue(value, isHmacOn)}">`;
713
+ output += `value="--OPEN--" data-replace="${encodeAttributeValue(value, isHmacOn)}"`;
714
714
  }
715
715
  else {
716
- output += `value="${encodeAttributeValue(value, isHmacOn)}">`;
716
+ output += `value="${encodeAttributeValue(value, isHmacOn)}"`;
717
+ }
718
+ if (group[0].required) {
719
+ output += ` placeholder="${encode(this.t('preview.required'))}" required>`;
720
+ }
721
+ else {
722
+ output += '>';
717
723
  }
718
724
  level--;
719
725
  output += `${newline()}</label>`;
@@ -729,12 +735,12 @@ export class ExperimentalAddToCartBuilder extends Base {
729
735
  output += `${newline()}<select name="${prefix}${optionName}">`;
730
736
  level++;
731
737
  group.forEach(option => {
732
- var _a, _b;
738
+ var _a, _b, _c;
733
739
  const optionIndex = product.custom_options.indexOf(option);
734
740
  const itemCategory = (_a = this.__getItemCategoryLoader(productIndex, optionIndex)) === null || _a === void 0 ? void 0 : _a.data;
735
741
  const modifiers = this.__getOptionModifiers(option, itemCategory !== null && itemCategory !== void 0 ? itemCategory : null, currencyCode);
736
- const encodedValue = encodeAttributeValue(`${option.value}${modifiers}`, isHmacOn);
737
- const encodedCaption = encode((_b = option.value) !== null && _b !== void 0 ? _b : '');
742
+ const encodedValue = encodeAttributeValue(`${(_b = option.value) !== null && _b !== void 0 ? _b : ''}${modifiers}`, isHmacOn);
743
+ const encodedCaption = encode((_c = option.value) !== null && _c !== void 0 ? _c : '');
738
744
  output += `${newline()}<option value="${encodedValue}">${encodedCaption}</option>`;
739
745
  });
740
746
  level--;