@foxy.io/elements 1.11.0-beta.2 → 1.11.0-beta.6

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 (170) hide show
  1. package/dist/cdn/foxy-access-recovery-form.js +1 -1
  2. package/dist/cdn/foxy-address-card.js +4 -4
  3. package/dist/cdn/foxy-address-form.js +1 -1
  4. package/dist/cdn/foxy-applied-tax-card.js +1 -0
  5. package/dist/cdn/foxy-attribute-card.js +1 -1
  6. package/dist/cdn/foxy-attribute-form.js +1 -1
  7. package/dist/cdn/foxy-cancellation-form.js +1 -1
  8. package/dist/cdn/foxy-collection-page.js +1 -1
  9. package/dist/cdn/foxy-collection-pages.js +1 -1
  10. package/dist/cdn/foxy-custom-field-card.js +1 -0
  11. package/dist/cdn/foxy-custom-field-form.js +1 -0
  12. package/dist/cdn/foxy-customer-api.js +1 -1
  13. package/dist/cdn/foxy-customer-form.js +1 -1
  14. package/dist/cdn/foxy-customer-portal-settings.js +1 -1
  15. package/dist/cdn/foxy-customer-portal.js +2 -2
  16. package/dist/cdn/foxy-customer.js +1 -1
  17. package/dist/cdn/foxy-customers-table.js +1 -1
  18. package/dist/cdn/foxy-discount-card.js +1 -0
  19. package/dist/cdn/foxy-donation.js +1 -1
  20. package/dist/cdn/foxy-error-entry-card.js +1 -1
  21. package/dist/cdn/foxy-form-dialog.js +1 -1
  22. package/dist/cdn/foxy-i18n.js +1 -1
  23. package/dist/cdn/foxy-items-form.js +1 -1
  24. package/dist/cdn/foxy-nucleon-element.js +1 -1
  25. package/dist/cdn/foxy-payment-card.js +1 -0
  26. package/dist/cdn/foxy-payment-method-card.js +1 -1
  27. package/dist/cdn/foxy-sign-in-form.js +1 -230
  28. package/dist/cdn/foxy-spinner.js +2 -2
  29. package/dist/cdn/foxy-subscription-card.js +1 -1
  30. package/dist/cdn/foxy-subscription-form.js +1 -1
  31. package/dist/cdn/foxy-subscriptions-table.js +1 -1
  32. package/dist/cdn/foxy-table.js +1 -1
  33. package/dist/cdn/foxy-transactions-table.js +1 -1
  34. package/dist/cdn/foxy-user-form.js +1 -1
  35. package/dist/cdn/foxy-users-table.js +1 -1
  36. package/dist/cdn/shared-00355097.js +1 -0
  37. package/dist/cdn/shared-050576d4.js +15 -0
  38. package/dist/cdn/{shared-96de56d4.js → shared-0f4c8011.js} +1 -1
  39. package/dist/cdn/shared-2de00e0b.js +1 -0
  40. package/dist/cdn/{shared-497fd63c.js → shared-30016bf0.js} +1 -1
  41. package/dist/cdn/{shared-851b97ef.js → shared-3b229cce.js} +1 -1
  42. package/dist/cdn/shared-3d3d419e.js +1 -0
  43. package/dist/cdn/{shared-bf28ab5e.js → shared-3f710b92.js} +1 -1
  44. package/dist/cdn/{shared-aac9fed8.js → shared-5873e293.js} +1 -1
  45. package/dist/cdn/{shared-43316b66.js → shared-6a9e83d7.js} +1 -1
  46. package/dist/cdn/{shared-bba615b8.js → shared-73252961.js} +19 -19
  47. package/dist/cdn/{shared-84203d52.js → shared-73401142.js} +1 -1
  48. package/dist/cdn/shared-75c86771.js +1 -0
  49. package/dist/cdn/{shared-a5fbfdc7.js → shared-7dbbc98e.js} +1 -1
  50. package/dist/cdn/shared-7dda002f.js +1 -0
  51. package/dist/cdn/{shared-090432b4.js → shared-7f726bf5.js} +1 -1
  52. package/dist/cdn/{shared-525dd8c8.js → shared-8953096d.js} +1 -1
  53. package/dist/cdn/{shared-1e8cda7a.js → shared-897c8104.js} +1 -1
  54. package/dist/cdn/{shared-b0c39c37.js → shared-8caad813.js} +1 -1
  55. package/dist/cdn/{shared-23966eed.js → shared-8d210ad5.js} +1 -1
  56. package/dist/cdn/{shared-5ad54678.js → shared-9248217c.js} +1 -1
  57. package/dist/cdn/{shared-f06d08d5.js → shared-997e696f.js} +1 -1
  58. package/dist/cdn/{shared-a7709d26.js → shared-9bbb65af.js} +1 -1
  59. package/dist/cdn/shared-9fd917e7.js +1 -0
  60. package/dist/cdn/{shared-69d0ca61.js → shared-aa607c54.js} +1 -1
  61. package/dist/cdn/shared-bfba2bef.js +1 -0
  62. package/dist/cdn/{shared-9f78e096.js → shared-c5659975.js} +1 -1
  63. package/dist/cdn/{shared-e058cb87.js → shared-deb50049.js} +1 -1
  64. package/dist/cdn/shared-e762082b.js +1 -0
  65. package/dist/cdn/shared-f4119f12.js +230 -0
  66. package/dist/cdn/translations/shared/de.json +2 -0
  67. package/dist/cdn/translations/shared/en.json +3 -0
  68. package/dist/cdn/translations/shared/es.json +2 -0
  69. package/dist/elements/public/AddressCard/AddressCard.js +2 -2
  70. package/dist/elements/public/AddressCard/AddressCard.js.map +1 -1
  71. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.d.ts +25 -0
  72. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js +62 -0
  73. package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js.map +1 -0
  74. package/dist/elements/public/AppliedTaxCard/index.d.ts +5 -0
  75. package/dist/elements/public/AppliedTaxCard/index.js +7 -0
  76. package/dist/elements/public/AppliedTaxCard/index.js.map +1 -0
  77. package/dist/elements/public/AppliedTaxCard/types.d.ts +3 -0
  78. package/dist/elements/public/AppliedTaxCard/types.js +2 -0
  79. package/dist/elements/public/AppliedTaxCard/types.js.map +1 -0
  80. package/dist/elements/public/AttributeCard/AttributeCard.js +4 -8
  81. package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
  82. package/dist/elements/public/CollectionPage/CollectionPage.d.ts +2 -0
  83. package/dist/elements/public/CollectionPage/CollectionPage.js +7 -0
  84. package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
  85. package/dist/elements/public/CollectionPage/types.d.ts +3 -0
  86. package/dist/elements/public/CollectionPage/types.js.map +1 -1
  87. package/dist/elements/public/CollectionPages/CollectionPages.d.ts +2 -0
  88. package/dist/elements/public/CollectionPages/CollectionPages.js +7 -0
  89. package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
  90. package/dist/elements/public/CollectionPages/types.d.ts +3 -0
  91. package/dist/elements/public/CollectionPages/types.js.map +1 -1
  92. package/dist/elements/public/CustomFieldCard/CustomFieldCard.d.ts +22 -0
  93. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js +24 -0
  94. package/dist/elements/public/CustomFieldCard/CustomFieldCard.js.map +1 -0
  95. package/dist/elements/public/CustomFieldCard/TwoLineCard.d.ts +29 -0
  96. package/dist/elements/public/CustomFieldCard/TwoLineCard.js +70 -0
  97. package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -0
  98. package/dist/elements/public/CustomFieldCard/index.d.ts +4 -0
  99. package/dist/elements/public/CustomFieldCard/index.js +6 -0
  100. package/dist/elements/public/CustomFieldCard/index.js.map +1 -0
  101. package/dist/elements/public/CustomFieldCard/types.d.ts +3 -0
  102. package/dist/elements/public/CustomFieldCard/types.js +2 -0
  103. package/dist/elements/public/CustomFieldCard/types.js.map +1 -0
  104. package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +49 -0
  105. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +235 -0
  106. package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -0
  107. package/dist/elements/public/CustomFieldForm/index.d.ts +9 -0
  108. package/dist/elements/public/CustomFieldForm/index.js +11 -0
  109. package/dist/elements/public/CustomFieldForm/index.js.map +1 -0
  110. package/dist/elements/public/CustomFieldForm/types.d.ts +22 -0
  111. package/dist/elements/public/CustomFieldForm/types.js +2 -0
  112. package/dist/elements/public/CustomFieldForm/types.js.map +1 -0
  113. package/dist/elements/public/DiscountCard/DiscountCard.d.ts +25 -0
  114. package/dist/elements/public/DiscountCard/DiscountCard.js +50 -0
  115. package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -0
  116. package/dist/elements/public/DiscountCard/index.d.ts +5 -0
  117. package/dist/elements/public/DiscountCard/index.js +7 -0
  118. package/dist/elements/public/DiscountCard/index.js.map +1 -0
  119. package/dist/elements/public/DiscountCard/types.d.ts +3 -0
  120. package/dist/elements/public/DiscountCard/types.js +2 -0
  121. package/dist/elements/public/DiscountCard/types.js.map +1 -0
  122. package/dist/elements/public/FormDialog/FormDialog.d.ts +2 -0
  123. package/dist/elements/public/FormDialog/FormDialog.js +4 -0
  124. package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
  125. package/dist/elements/public/I18n/I18n.d.ts +10 -0
  126. package/dist/elements/public/I18n/I18n.js +13 -0
  127. package/dist/elements/public/I18n/I18n.js.map +1 -1
  128. package/dist/elements/public/I18n/format/index.js +14 -14
  129. package/dist/elements/public/I18n/format/index.js.map +1 -1
  130. package/dist/elements/public/I18n/format/percent.d.ts +6 -0
  131. package/dist/elements/public/I18n/format/percent.js +16 -0
  132. package/dist/elements/public/I18n/format/percent.js.map +1 -0
  133. package/dist/elements/public/I18n/format/price.js +4 -2
  134. package/dist/elements/public/I18n/format/price.js.map +1 -1
  135. package/dist/elements/public/I18n/types.d.ts +7 -0
  136. package/dist/elements/public/I18n/types.js +2 -0
  137. package/dist/elements/public/I18n/types.js.map +1 -0
  138. package/dist/elements/public/NucleonElement/NucleonElement.d.ts +14 -1
  139. package/dist/elements/public/NucleonElement/NucleonElement.js +52 -8
  140. package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
  141. package/dist/elements/public/NucleonElement/serveFromCache.js +11 -6
  142. package/dist/elements/public/NucleonElement/serveFromCache.js.map +1 -1
  143. package/dist/elements/public/PaymentCard/PaymentCard.d.ts +46 -0
  144. package/dist/elements/public/PaymentCard/PaymentCard.js +185 -0
  145. package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -0
  146. package/dist/elements/public/PaymentCard/index.d.ts +5 -0
  147. package/dist/elements/public/PaymentCard/index.js +7 -0
  148. package/dist/elements/public/PaymentCard/index.js.map +1 -0
  149. package/dist/elements/public/PaymentCard/types.d.ts +17 -0
  150. package/dist/elements/public/PaymentCard/types.js +2 -0
  151. package/dist/elements/public/PaymentCard/types.js.map +1 -0
  152. package/dist/elements/public/SignInForm/SignInForm.d.ts +1 -1
  153. package/dist/elements/public/SignInForm/SignInForm.js.map +1 -1
  154. package/dist/elements/public/Spinner/Spinner.js +1 -1
  155. package/dist/elements/public/Spinner/Spinner.js.map +1 -1
  156. package/dist/elements/public/index.d.ts +5 -0
  157. package/dist/elements/public/index.defined.d.ts +5 -0
  158. package/dist/elements/public/index.defined.js +5 -0
  159. package/dist/elements/public/index.defined.js.map +1 -1
  160. package/dist/elements/public/index.js +5 -0
  161. package/dist/elements/public/index.js.map +1 -1
  162. package/dist/mixins/themeable.js +9 -0
  163. package/dist/mixins/themeable.js.map +1 -1
  164. package/package.json +2 -2
  165. package/dist/cdn/shared-6872bf5c.js +0 -1
  166. package/dist/cdn/shared-750035db.js +0 -15
  167. package/dist/cdn/shared-8057ee9c.js +0 -1
  168. package/dist/cdn/shared-9ba229fb.js +0 -1
  169. package/dist/cdn/shared-a110de43.js +0 -1
  170. package/dist/cdn/shared-c70d9713.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../../src/elements/public/SignInForm/SignInForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,IAAI,EAAE,MAAM,aAAa,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAEjE,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAGlE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,EAAE,GAAG,cAAc,CAAC;AAC1B,MAAM,IAAI,GAAG,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;GAsBG;A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AS,mCAAI,EAAE;;;;;KAKtE,CAAC;IACJ,CAAC;IAES,KAAK,CAAC,MAAM,CAAC,GAAG,IAAiC;QACzD,IAAI;YACF,OAAO,MAAM,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,CAAC;SACpC;QAAC,OAAO,GAAG,EAAE;YACZ,IAAI,QAAQ,GAAG,eAAe,CAAC;YAE/B,IAAI;gBACF,MAAM,IAAI,GAAG,CAAC,MAAO,GAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC7E,IAAI,OAAO,IAAI,KAAK,QAAQ;oBAAE,QAAQ,GAAG,IAAI,CAAC;aAC/C;YAAC,WAAM;gBACN,kCAAkC;aACnC;YAED,MAAM,CAAC,QAAQ,CAAC,CAAC;SAClB;IACH,CAAC;IAED,IAAY,eAAe;;QACzB,MAAM,YAAY,SAAG,IAAI,CAAC,IAAI,CAAC,UAAU,0CAAE,eAAe,CAAC;QAC3D,IAAI,YAAY;YAAE,OAAO,YAAY,CAAC;QAEtC,MAAM,MAAM,GAAG,cAAc,CAAC;QAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1E,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,GAAG;IACnD,CAAC;CACF","sourcesContent":["import { Data, Templates } from './types';\nimport { PropertyDeclarations, TemplateResult, html } from 'lit-element';\n\nimport { CheckboxElement } from '@vaadin/vaadin-checkbox';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { EmailFieldElement } from '@vaadin/vaadin-text-field/vaadin-email-field';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { NucleonV8N } from '../NucleonElement/types';\nimport { PasswordFieldElement } from '@vaadin/vaadin-text-field/vaadin-password-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { validate as isEmail } from 'email-validator';\n\nconst NS = 'sign-in-form';\nconst Base = ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)));\n\n/**\n * Form element for email/password sign in.\n *\n * @slot email:before\n * @slot email:after\n * @slot password:before\n * @slot password:after\n * @slot new-password:before\n * @slot new-password:after\n * @slot mfa-secret-code:before\n * @slot mfa-secret-code:after\n * @slot mfa-totp-code:before\n * @slot mfa-totp-code:after\n * @slot mfa-remember-device:before\n * @slot mfa-remember-device:after\n * @slot error:before\n * @slot error:after\n * @slot submit:before\n * @slot submit:after\n *\n * @element foxy-sign-in-form\n * @since 1.4.0\n */\nexport class SignInForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n issuer: { type: String },\n };\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ credential: c }) => !!c?.email || 'email_required',\n ({ credential: c }) => isEmail(c?.email ?? '') || 'email_invalid_email',\n ({ credential: c }) => !!c?.password || 'password_required',\n ({ credential: c }) => (c?.new_password?.length === 0 ? 'new_password_required' : true),\n ({ credential: c }) => (c?.mfa_totp_code?.length === 0 ? 'mfa_totp_code_required' : true),\n ];\n }\n\n templates: Templates = {};\n\n issuer = 'Unknown';\n\n private readonly __emailValidator = () => !this.errors.some(err => err.startsWith('email'));\n\n private readonly __passwordValidator = () => !this.errors.some(err => err.startsWith('password'));\n\n private readonly __newPasswordValidator = () => {\n return !this.errors.some(err => err.startsWith('new_password') && !err.endsWith('_error'));\n };\n\n private readonly __mfaTotpCodeValidator = () => {\n return !this.errors.some(err => err.startsWith('mfa_totp_code') && !err.endsWith('_error'));\n };\n\n private readonly __renderEmail = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const emailError = errors.find(err => err.startsWith('email'));\n const emailErrorKey = emailError?.replace('email', 'v8n');\n const emailErrorMessage = emailErrorKey ? this.t(emailErrorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('email:before')}\n\n <vaadin-email-field\n error-message=${emailErrorMessage}\n data-testid=\"email\"\n class=\"w-full mb-m\"\n label=${this.t('email').toString()}\n value=${ifDefined(this.form.credential?.email)}\n ?disabled=${isBusy || disabledSelector.matches('email', true)}\n ?readonly=${readonlySelector.matches('email', true)}\n .checkValidity=${this.__emailValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const email = (evt.target as EmailFieldElement).value;\n const password = this.form.credential?.password ?? '';\n this.edit({ credential: { email, password }, type: 'password' });\n }}\n >\n </vaadin-email-field>\n\n ${this.renderTemplateOrSlot('email:after')}\n </div>\n `;\n };\n\n private readonly __renderPassword = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const passwordError = errors.find(err => err.startsWith('password'));\n const passwordErrorKey = passwordError?.replace('password', 'v8n');\n const passwordErrorMessage = passwordErrorKey ? this.t(passwordErrorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('password:before')}\n\n <vaadin-password-field\n error-message=${passwordErrorMessage}\n data-testid=\"password\"\n class=\"w-full mb-m\"\n label=${this.t('password').toString()}\n value=${ifDefined(this.form.credential?.password)}\n ?disabled=${isBusy || disabledSelector.matches('password', true)}\n ?readonly=${readonlySelector.matches('password', true)}\n .checkValidity=${this.__passwordValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const email = this.form.credential?.email ?? '';\n const password = (evt.target as PasswordFieldElement).value;\n this.edit({ credential: { email, password }, type: 'password' });\n }}\n >\n </vaadin-password-field>\n\n ${this.renderTemplateOrSlot('password:after')}\n </div>\n `;\n };\n\n private readonly __renderNewPassword = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const error = errors.find(err => err.startsWith('new_password') && !err.endsWith('_error'));\n const errorKey = error?.replace('new_password', 'v8n');\n const errorMessage = errorKey ? this.t(errorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('new-password:before')}\n\n <vaadin-password-field\n error-message=${errorMessage}\n data-testid=\"new-password\"\n class=\"w-full mb-m\"\n label=${this.t('new_password').toString()}\n value=${ifDefined(this.form.credential?.new_password)}\n ?disabled=${isBusy || disabledSelector.matches('new-password', true)}\n ?readonly=${readonlySelector.matches('new-password', true)}\n .checkValidity=${this.__newPasswordValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n this.edit({\n type: 'password',\n credential: {\n email: this.form.credential?.email ?? '',\n password: this.form.credential?.password ?? '',\n new_password: (evt.target as PasswordFieldElement).value,\n },\n });\n }}\n >\n </vaadin-password-field>\n\n ${this.renderTemplateOrSlot('new-password:after')}\n </div>\n `;\n };\n\n private readonly __renderMfaTotpCode = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const mfaSecretCode = this.__mfaSecretCode;\n const prefix = 'mfa_totp_code';\n const scope = 'mfa-totp-code';\n const error = errors.find(err => err.startsWith(prefix) && !err.endsWith('_error'));\n const errorKey = error?.replace(prefix, 'v8n');\n const errorMessage = errorKey ? this.t(errorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-text-field\n error-message=${errorMessage}\n helper-text=${mfaSecretCode ? this.t('mfa_totp_code_hint') : ''}\n placeholder=\"123456\"\n data-testid=${scope}\n class=\"w-full mb-m\"\n label=${this.t(prefix).toString()}\n value=${ifDefined(this.form.credential?.mfa_totp_code)}\n ?disabled=${isBusy || disabledSelector.matches(scope, true)}\n ?readonly=${readonlySelector.matches(scope, true)}\n .checkValidity=${this.__mfaTotpCodeValidator}\n autofocus\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const mfaTotpCode = (evt.target as PasswordFieldElement).value;\n const credential = { ...this.form.credential!, mfa_totp_code: mfaTotpCode };\n if (mfaSecretCode) credential.mfa_secret_code = mfaSecretCode;\n this.edit({ type: 'password', credential });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderMfaSecretCode = () => {\n const scope = 'mfa-secret-code';\n const mfaSecretCode = this.__mfaSecretCode!;\n const issuer = encodeURIComponent(this.issuer);\n const email = encodeURIComponent(this.form.credential?.email ?? '');\n const otpauthUrl = new URL(`otpauth://totp/${issuer}:${email}`);\n\n otpauthUrl.searchParams.set('secret', mfaSecretCode);\n otpauthUrl.searchParams.set('issuer', this.issuer);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <div\n data-testid=${scope}\n class=\"flex space-x-m overflow-hidden rounded border p-m mb-m border-contrast-10\"\n style=\"background: white; color: black;\"\n >\n <qr-code\n modulesize=\"2\"\n margin=\"0\"\n format=\"svg\"\n class=\"inline-flex\"\n data=${otpauthUrl.toString()}\n >\n </qr-code>\n\n <div class=\"break-all font-semibold leading-s text-xs tracking-widest\">\n ${mfaSecretCode}\n </div>\n </div>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderMfaRememberDevice = () => {\n const { __mfaSecretCode: mfaSecretCode, form, lang, ns } = this;\n const scope = 'mfa-remember-device';\n const isBusy = this.in('busy');\n const isDisabled = isBusy || this.disabledSelector.matches(scope, true);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-checkbox\n data-testid=${scope}\n class=\"mb-m\"\n ?disabled=${isDisabled}\n ?checked=${!!form.credential?.mfa_remember_device}\n @change=${(evt: CustomEvent) => {\n const target = evt.currentTarget as CheckboxElement;\n const credential = {\n ...form.credential!,\n mfa_remember_device: target.checked,\n mfa_totp_code: form.credential?.mfa_totp_code ?? '',\n };\n\n if (mfaSecretCode) credential.mfa_secret_code = mfaSecretCode;\n this.edit({ credential });\n }}\n >\n <foxy-i18n class=\"block\" lang=${lang} key=\"mfa_remember_device\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"block text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"mfa_remember_device_hint\"\n ns=${ns}\n >\n </foxy-i18n>\n </vaadin-checkbox>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderError = () => {\n return html`\n <div>\n ${this.renderTemplateOrSlot('error:before')}\n\n <p class=\"leading-s flex items-start text-s rounded p-s bg-error-10 text-error\">\n <iron-icon class=\"flex-shrink-0 mr-s\" icon=\"lumo:error\"></iron-icon>\n <foxy-i18n data-testid=\"error\" lang=${this.lang} key=${this.errors[0]} ns=${this.ns}>\n </foxy-i18n>\n </p>\n\n ${this.renderTemplateOrSlot('error:after')}\n </div>\n `;\n };\n\n private readonly __renderSubmit = () => {\n const isValid =\n this.in({ idle: { snapshot: { dirty: 'valid' } } }) ||\n this.in({ idle: { snapshot: { clean: 'valid' } } }) ||\n this.in({ idle: { template: { dirty: 'valid' } } }) ||\n this.in({ idle: { template: { clean: 'valid' } } });\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('submit:before')}\n\n <vaadin-button\n data-testid=\"submit\"\n class=\"w-full mt-m\"\n theme=\"primary\"\n ?disabled=${!isValid || this.in('busy') || this.disabledSelector.matches('submit', true)}\n @click=${() => this.submit()}\n >\n <foxy-i18n ns=${this.ns} lang=${this.lang} key=\"sign_in\"></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot('submit:after')}\n </div>\n `;\n };\n\n render(): TemplateResult {\n const { hiddenSelector, errors, lang, form, ns } = this;\n const mfaSecretCode = this.__mfaSecretCode;\n const mfaTotpCode = form.credential?.mfa_totp_code;\n\n const isMfaRequired =\n !!mfaSecretCode || !!mfaTotpCode || errors.some(err => err.startsWith('mfa'));\n\n const isNewPasswordRequired =\n typeof this.form.credential?.new_password === 'string' ||\n errors.some(error => error.startsWith('new_password_'));\n\n const isMfaTotpCodeHidden =\n (!isMfaRequired && !mfaTotpCode) || hiddenSelector.matches('mfa-totp-code', true);\n\n const isMfaRememberDeviceHidden =\n !isMfaRequired ||\n (isMfaRequired && mfaSecretCode) ||\n hiddenSelector.matches('mfa-remember-device', true);\n\n const isMfaSecretCodeHidden = !mfaSecretCode || hiddenSelector.matches('mfa-secret-code', true);\n const isNewPasswordHidden = isMfaRequired || hiddenSelector.matches('new-password', true);\n const isFailed = errors.some(error => error.endsWith('_error'));\n const isBusy = this.in('busy');\n\n return html`\n <main aria-live=\"polite\" aria-busy=${isBusy} class=\"relative font-lumo text-m leading-m\">\n ${hiddenSelector.matches('email', true) ? '' : this.__renderEmail()}\n ${isMfaRequired || hiddenSelector.matches('password', true) ? '' : this.__renderPassword()}\n ${isNewPasswordHidden || !isNewPasswordRequired ? '' : this.__renderNewPassword()}\n ${isMfaTotpCodeHidden ? '' : this.__renderMfaTotpCode()}\n ${isMfaSecretCodeHidden ? '' : this.__renderMfaSecretCode()}\n ${isMfaRememberDeviceHidden ? '' : this.__renderMfaRememberDevice()}\n ${hiddenSelector.matches('error', true) || !isFailed ? '' : this.__renderError()}\n ${hiddenSelector.matches('submit', true) ? '' : this.__renderSubmit()}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=\"busy\"\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </main>\n `;\n }\n\n protected async _fetch(...args: Parameters<Window['fetch']>): Promise<Data> {\n try {\n return await super._fetch(...args);\n } catch (err) {\n let v8nError = 'unknown_error';\n\n try {\n const code = (await (err as Response).json())._embedded['fx:errors'][0].code;\n if (typeof code === 'string') v8nError = code;\n } catch {\n // Unknown error format, ignoring.\n }\n\n throw [v8nError];\n }\n }\n\n private get __mfaSecretCode() {\n const storedSecret = this.form.credential?.mfa_secret_code;\n if (storedSecret) return storedSecret;\n\n const prefix = 'mfa_required';\n const mfaSetupError = this.errors.find(error => error.startsWith(prefix));\n return mfaSetupError?.replace(prefix, '').trim();\n }\n}\n"]}
1
+ {"version":3,"file":"SignInForm.js","sourceRoot":"","sources":["../../../../src/elements/public/SignInForm/SignInForm.ts"],"names":[],"mappings":"AACA,OAAO,EAAwC,IAAI,EAAE,MAAM,aAAa,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAEjE,OAAO,EAAE,cAAc,EAAE,4CAAyC;AAGlE,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,IAAI,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,EAAE,GAAG,cAAc,CAAC;AAC1B,MAAM,IAAI,GAAG,cAAc,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,cAAc,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC;AAEtF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,UAAW,SAAQ,IAAU;IAA1C;;QAkBE,cAAS,GAAc,EAAE,CAAC;QAE1B,WAAM,GAAG,SAAS,CAAC;QAEF,qBAAgB,GAAG,GAAG,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAA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;YACZ,IAAI,QAAQ,GAAG,eAAe,CAAC;YAE/B,IAAI;gBACF,MAAM,IAAI,GAAG,CAAC,MAAO,GAAgB,CAAC,IAAI,EAAE,CAAC,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;gBAC7E,IAAI,OAAO,IAAI,KAAK,QAAQ;oBAAE,QAAQ,GAAG,IAAI,CAAC;aAC/C;YAAC,WAAM;gBACN,kCAAkC;aACnC;YAED,MAAM,CAAC,QAAQ,CAAC,CAAC;SAClB;IACH,CAAC;IAED,IAAY,eAAe;;QACzB,MAAM,YAAY,SAAG,IAAI,CAAC,IAAI,CAAC,UAAU,0CAAE,eAAe,CAAC;QAC3D,IAAI,YAAY;YAAE,OAAO,YAAY,CAAC;QAEtC,MAAM,MAAM,GAAG,cAAc,CAAC;QAC9B,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC;QAC1E,OAAO,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,OAAO,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,GAAG;IACnD,CAAC;CACF","sourcesContent":["import { Data, Templates } from './types';\nimport { PropertyDeclarations, TemplateResult, html } from 'lit-element';\n\nimport { CheckboxElement } from '@vaadin/vaadin-checkbox';\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { EmailFieldElement } from '@vaadin/vaadin-text-field/vaadin-email-field';\nimport { NucleonElement } from '../NucleonElement/NucleonElement';\nimport { NucleonV8N } from '../NucleonElement/types';\nimport { PasswordFieldElement } from '@vaadin/vaadin-text-field/vaadin-password-field';\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { classMap } from '../../../utils/class-map';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { validate as isEmail } from 'email-validator';\n\nconst NS = 'sign-in-form';\nconst Base = ThemeableMixin(ConfigurableMixin(TranslatableMixin(NucleonElement, NS)));\n\n/**\n * Form element for email/password sign in.\n *\n * @slot email:before\n * @slot email:after\n * @slot password:before\n * @slot password:after\n * @slot new-password:before\n * @slot new-password:after\n * @slot mfa-secret-code:before\n * @slot mfa-secret-code:after\n * @slot mfa-totp-code:before\n * @slot mfa-totp-code:after\n * @slot mfa-remember-device:before\n * @slot mfa-remember-device:after\n * @slot error:before\n * @slot error:after\n * @slot submit:before\n * @slot submit:after\n *\n * @element foxy-sign-in-form\n * @since 1.4.0\n */\nexport class SignInForm extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n issuer: { type: String },\n };\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ credential: c }) => !!c?.email || 'email_required',\n ({ credential: c }) => isEmail(c?.email ?? '') || 'email_invalid_email',\n ({ credential: c }) => !!c?.password || 'password_required',\n ({ credential: c }) => (c?.new_password?.length === 0 ? 'new_password_required' : true),\n ({ credential: c }) => (c?.mfa_totp_code?.length === 0 ? 'mfa_totp_code_required' : true),\n ];\n }\n\n templates: Templates = {};\n\n issuer = 'Unknown';\n\n private readonly __emailValidator = () => !this.errors.some(err => err.startsWith('email'));\n\n private readonly __passwordValidator = () => !this.errors.some(err => err.startsWith('password'));\n\n private readonly __newPasswordValidator = () => {\n return !this.errors.some(err => err.startsWith('new_password') && !err.endsWith('_error'));\n };\n\n private readonly __mfaTotpCodeValidator = () => {\n return !this.errors.some(err => err.startsWith('mfa_totp_code') && !err.endsWith('_error'));\n };\n\n private readonly __renderEmail = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const emailError = errors.find(err => err.startsWith('email'));\n const emailErrorKey = emailError?.replace('email', 'v8n');\n const emailErrorMessage = emailErrorKey ? this.t(emailErrorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('email:before')}\n\n <vaadin-email-field\n error-message=${emailErrorMessage}\n data-testid=\"email\"\n class=\"w-full mb-m\"\n label=${this.t('email').toString()}\n value=${ifDefined(this.form.credential?.email)}\n ?disabled=${isBusy || disabledSelector.matches('email', true)}\n ?readonly=${readonlySelector.matches('email', true)}\n .checkValidity=${this.__emailValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const email = (evt.target as EmailFieldElement).value;\n const password = this.form.credential?.password ?? '';\n this.edit({ credential: { email, password }, type: 'password' });\n }}\n >\n </vaadin-email-field>\n\n ${this.renderTemplateOrSlot('email:after')}\n </div>\n `;\n };\n\n private readonly __renderPassword = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const passwordError = errors.find(err => err.startsWith('password'));\n const passwordErrorKey = passwordError?.replace('password', 'v8n');\n const passwordErrorMessage = passwordErrorKey ? this.t(passwordErrorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('password:before')}\n\n <vaadin-password-field\n error-message=${passwordErrorMessage}\n data-testid=\"password\"\n class=\"w-full mb-m\"\n label=${this.t('password').toString()}\n value=${ifDefined(this.form.credential?.password)}\n ?disabled=${isBusy || disabledSelector.matches('password', true)}\n ?readonly=${readonlySelector.matches('password', true)}\n .checkValidity=${this.__passwordValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const email = this.form.credential?.email ?? '';\n const password = (evt.target as PasswordFieldElement).value;\n this.edit({ credential: { email, password }, type: 'password' });\n }}\n >\n </vaadin-password-field>\n\n ${this.renderTemplateOrSlot('password:after')}\n </div>\n `;\n };\n\n private readonly __renderNewPassword = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const error = errors.find(err => err.startsWith('new_password') && !err.endsWith('_error'));\n const errorKey = error?.replace('new_password', 'v8n');\n const errorMessage = errorKey ? this.t(errorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('new-password:before')}\n\n <vaadin-password-field\n error-message=${errorMessage}\n data-testid=\"new-password\"\n class=\"w-full mb-m\"\n label=${this.t('new_password').toString()}\n value=${ifDefined(this.form.credential?.new_password)}\n ?disabled=${isBusy || disabledSelector.matches('new-password', true)}\n ?readonly=${readonlySelector.matches('new-password', true)}\n .checkValidity=${this.__newPasswordValidator}\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n this.edit({\n type: 'password',\n credential: {\n email: this.form.credential?.email ?? '',\n password: this.form.credential?.password ?? '',\n new_password: (evt.target as PasswordFieldElement).value,\n },\n });\n }}\n >\n </vaadin-password-field>\n\n ${this.renderTemplateOrSlot('new-password:after')}\n </div>\n `;\n };\n\n private readonly __renderMfaTotpCode = () => {\n const { disabledSelector, readonlySelector, errors } = this;\n\n const mfaSecretCode = this.__mfaSecretCode;\n const prefix = 'mfa_totp_code';\n const scope = 'mfa-totp-code';\n const error = errors.find(err => err.startsWith(prefix) && !err.endsWith('_error'));\n const errorKey = error?.replace(prefix, 'v8n');\n const errorMessage = errorKey ? this.t(errorKey).toString() : '';\n\n const isBusy = this.in('busy');\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-text-field\n error-message=${errorMessage}\n helper-text=${mfaSecretCode ? this.t('mfa_totp_code_hint') : ''}\n placeholder=\"123456\"\n data-testid=${scope}\n class=\"w-full mb-m\"\n label=${this.t(prefix).toString()}\n value=${ifDefined(this.form.credential?.mfa_totp_code)}\n ?disabled=${isBusy || disabledSelector.matches(scope, true)}\n ?readonly=${readonlySelector.matches(scope, true)}\n .checkValidity=${this.__mfaTotpCodeValidator}\n autofocus\n @keydown=${(evt: KeyboardEvent) => evt.key === 'Enter' && this.submit()}\n @input=${(evt: InputEvent) => {\n const mfaTotpCode = (evt.target as PasswordFieldElement).value;\n const credential = { ...this.form.credential!, mfa_totp_code: mfaTotpCode };\n if (mfaSecretCode) credential.mfa_secret_code = mfaSecretCode;\n this.edit({ type: 'password', credential });\n }}\n >\n </vaadin-text-field>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderMfaSecretCode = () => {\n const scope = 'mfa-secret-code';\n const mfaSecretCode = this.__mfaSecretCode!;\n const issuer = encodeURIComponent(this.issuer);\n const email = encodeURIComponent(this.form.credential?.email ?? '');\n const otpauthUrl = new URL(`otpauth://totp/${issuer}:${email}`);\n\n otpauthUrl.searchParams.set('secret', mfaSecretCode);\n otpauthUrl.searchParams.set('issuer', this.issuer);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <div\n data-testid=${scope}\n class=\"flex space-x-m overflow-hidden rounded border p-m mb-m border-contrast-10\"\n style=\"background: white; color: black;\"\n >\n <qr-code\n modulesize=\"2\"\n margin=\"0\"\n format=\"svg\"\n class=\"inline-flex\"\n data=${otpauthUrl.toString()}\n >\n </qr-code>\n\n <div class=\"break-all font-semibold leading-s text-xs tracking-widest\">\n ${mfaSecretCode}\n </div>\n </div>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderMfaRememberDevice = () => {\n const { __mfaSecretCode: mfaSecretCode, form, lang, ns } = this;\n const scope = 'mfa-remember-device';\n const isBusy = this.in('busy');\n const isDisabled = isBusy || this.disabledSelector.matches(scope, true);\n\n return html`\n <div>\n ${this.renderTemplateOrSlot(`${scope}:before`)}\n\n <vaadin-checkbox\n data-testid=${scope}\n class=\"mb-m\"\n ?disabled=${isDisabled}\n ?checked=${!!form.credential?.mfa_remember_device}\n @change=${(evt: CustomEvent) => {\n const target = evt.currentTarget as CheckboxElement;\n const credential = {\n ...form.credential!,\n mfa_remember_device: target.checked,\n mfa_totp_code: form.credential?.mfa_totp_code ?? '',\n };\n\n if (mfaSecretCode) credential.mfa_secret_code = mfaSecretCode;\n this.edit({ credential });\n }}\n >\n <foxy-i18n class=\"block\" lang=${lang} key=\"mfa_remember_device\" ns=${ns}></foxy-i18n>\n <foxy-i18n\n class=\"block text-xs ${isDisabled ? 'text-disabled' : 'text-secondary'}\"\n lang=${lang}\n key=\"mfa_remember_device_hint\"\n ns=${ns}\n >\n </foxy-i18n>\n </vaadin-checkbox>\n\n ${this.renderTemplateOrSlot(`${scope}:after`)}\n </div>\n `;\n };\n\n private readonly __renderError = () => {\n return html`\n <div>\n ${this.renderTemplateOrSlot('error:before')}\n\n <p class=\"leading-s flex items-start text-s rounded p-s bg-error-10 text-error\">\n <iron-icon class=\"flex-shrink-0 mr-s\" icon=\"lumo:error\"></iron-icon>\n <foxy-i18n data-testid=\"error\" lang=${this.lang} key=${this.errors[0]} ns=${this.ns}>\n </foxy-i18n>\n </p>\n\n ${this.renderTemplateOrSlot('error:after')}\n </div>\n `;\n };\n\n private readonly __renderSubmit = () => {\n const isValid =\n this.in({ idle: { snapshot: { dirty: 'valid' } } }) ||\n this.in({ idle: { snapshot: { clean: 'valid' } } }) ||\n this.in({ idle: { template: { dirty: 'valid' } } }) ||\n this.in({ idle: { template: { clean: 'valid' } } });\n\n return html`\n <div>\n ${this.renderTemplateOrSlot('submit:before')}\n\n <vaadin-button\n data-testid=\"submit\"\n class=\"w-full mt-m\"\n theme=\"primary\"\n ?disabled=${!isValid || this.in('busy') || this.disabledSelector.matches('submit', true)}\n @click=${() => this.submit()}\n >\n <foxy-i18n ns=${this.ns} lang=${this.lang} key=\"sign_in\"></foxy-i18n>\n </vaadin-button>\n\n ${this.renderTemplateOrSlot('submit:after')}\n </div>\n `;\n };\n\n render(): TemplateResult {\n const { hiddenSelector, errors, lang, form, ns } = this;\n const mfaSecretCode = this.__mfaSecretCode;\n const mfaTotpCode = form.credential?.mfa_totp_code;\n\n const isMfaRequired =\n !!mfaSecretCode || !!mfaTotpCode || errors.some(err => err.startsWith('mfa'));\n\n const isNewPasswordRequired =\n typeof this.form.credential?.new_password === 'string' ||\n errors.some(error => error.startsWith('new_password_'));\n\n const isMfaTotpCodeHidden =\n (!isMfaRequired && !mfaTotpCode) || hiddenSelector.matches('mfa-totp-code', true);\n\n const isMfaRememberDeviceHidden =\n !isMfaRequired ||\n (isMfaRequired && mfaSecretCode) ||\n hiddenSelector.matches('mfa-remember-device', true);\n\n const isMfaSecretCodeHidden = !mfaSecretCode || hiddenSelector.matches('mfa-secret-code', true);\n const isNewPasswordHidden = isMfaRequired || hiddenSelector.matches('new-password', true);\n const isFailed = errors.some(error => error.endsWith('_error'));\n const isBusy = this.in('busy');\n\n return html`\n <main aria-live=\"polite\" aria-busy=${isBusy} class=\"relative font-lumo text-m leading-m\">\n ${hiddenSelector.matches('email', true) ? '' : this.__renderEmail()}\n ${isMfaRequired || hiddenSelector.matches('password', true) ? '' : this.__renderPassword()}\n ${isNewPasswordHidden || !isNewPasswordRequired ? '' : this.__renderNewPassword()}\n ${isMfaTotpCodeHidden ? '' : this.__renderMfaTotpCode()}\n ${isMfaSecretCodeHidden ? '' : this.__renderMfaSecretCode()}\n ${isMfaRememberDeviceHidden ? '' : this.__renderMfaRememberDevice()}\n ${hiddenSelector.matches('error', true) || !isFailed ? '' : this.__renderError()}\n ${hiddenSelector.matches('submit', true) ? '' : this.__renderSubmit()}\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'transition duration-500 ease-in-out absolute inset-0 flex': true,\n 'opacity-0 pointer-events-none': !isBusy,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n class=\"m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l\"\n state=\"busy\"\n lang=${lang}\n ns=\"${ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </main>\n `;\n }\n\n protected async _fetch<TResult = Data>(...args: Parameters<Window['fetch']>): Promise<TResult> {\n try {\n return await super._fetch(...args);\n } catch (err) {\n let v8nError = 'unknown_error';\n\n try {\n const code = (await (err as Response).json())._embedded['fx:errors'][0].code;\n if (typeof code === 'string') v8nError = code;\n } catch {\n // Unknown error format, ignoring.\n }\n\n throw [v8nError];\n }\n }\n\n private get __mfaSecretCode() {\n const storedSecret = this.form.credential?.mfa_secret_code;\n if (storedSecret) return storedSecret;\n\n const prefix = 'mfa_required';\n const mfaSetupError = this.errors.find(error => error.startsWith(prefix));\n return mfaSetupError?.replace(prefix, '').trim();\n }\n}\n"]}
@@ -71,7 +71,7 @@ export class Spinner extends TranslatableMixin(ThemeableMixin(LitElement), 'spin
71
71
  else {
72
72
  icon = html `<paper-spinner-lite data-testid="icon" active></paper-spinner-lite>`;
73
73
  text = 'loading_busy';
74
- tint = 'text-primary';
74
+ tint = 'text-tertiary';
75
75
  }
76
76
  if (this.layout === 'horizontal') {
77
77
  layout = 'flex items-center space-x-s h-xxs';
@@ -1 +1 @@
1
- {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/elements/public/Spinner/Spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAGV,GAAG,EACH,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAKjE,MAAM,OAAO,OAAQ,SAAQ,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAArF;;QA0BE;;;WAGG;QACH,WAAM,GAAkB,YAAY,CAAC;QAErC;;;;;;;;WAQG;QACH,UAAK,GAAiB,MAAM,CAAC;IAmD/B,CAAC;IA3FC,gBAAgB;IAChB,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC;IACJ,CAAC;IAED,gBAAgB;IAChB,MAAM,KAAK,MAAM;QACf,OAAO;YACL,KAAK,CAAC,MAAM;YACZ,GAAG;;;;;;;OAQF;SACF,CAAC;IACJ,CAAC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B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import {\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n css,\n html,\n} from 'lit-element';\n\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\n\nexport type SpinnerLayout = 'vertical' | 'horizontal' | 'no-label';\nexport type SpinnerState = 'end' | 'busy' | 'error' | 'empty' | 'paused';\n\nexport class Spinner extends TranslatableMixin(ThemeableMixin(LitElement), 'spinner') {\n /** @readonly */\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: { type: String },\n state: { type: String },\n };\n }\n\n /** @readonly */\n static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n paper-spinner-lite {\n --paper-spinner-stroke-width: 2px;\n --paper-spinner-color: currentColor;\n height: 19px;\n width: 19px;\n margin: 2.5px;\n }\n `,\n ];\n }\n\n /**\n * Optional spinner layout: horizonal (default) or vertical. First puts icon next\n * to the label, second puts it above the text.\n */\n layout: SpinnerLayout = 'horizontal';\n\n /**\n * Optional spinner state:\n *\n * - `busy` (default) for loading data;\n * - `error` for failures;\n * - `empty` for when there's no data;\n * - `paused` for a pause or a timeout before fetching the next chunk of data;\n * - `end` for when there's no more data;\n */\n state: SpinnerState = 'busy';\n\n /** @readonly */\n render(): TemplateResult {\n let layout: string;\n let icon: TemplateResult;\n let text: string;\n let tint: string;\n\n if (this.state === 'end') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:done-all\"></iron-icon>`;\n text = 'loading_end';\n tint = 'text-tertiary';\n } else if (this.state === 'error') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:error-outline\"></iron-icon>`;\n text = 'loading_error';\n tint = 'text-error';\n } else if (this.state === 'paused') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:more-horiz\"></iron-icon>`;\n text = 'loading_paused';\n tint = 'text-tertiary';\n } else if (this.state === 'empty') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:info-outline\"></iron-icon>`;\n text = 'loading_empty';\n tint = 'text-tertiary';\n } else {\n icon = html`<paper-spinner-lite data-testid=\"icon\" active></paper-spinner-lite>`;\n text = 'loading_busy';\n tint = 'text-primary';\n }\n\n if (this.layout === 'horizontal') {\n layout = 'flex items-center space-x-s h-xxs';\n } else {\n layout = 'flex flex-col items-center space-y-s';\n }\n\n return html`\n <div class=\"font-lumo leading-none text-s ${layout} ${tint}\">\n <div class=\"w-xxs h-xss flex items-center justify-center\">${icon}</div>\n <foxy-i18n\n data-testid=\"text\"\n class=${this.layout === 'no-label' ? 'sr-only' : ''}\n lang=${this.lang}\n key=${text}\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n }\n}\n"]}
1
+ {"version":3,"file":"Spinner.js","sourceRoot":"","sources":["../../../../src/elements/public/Spinner/Spinner.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,UAAU,EAGV,GAAG,EACH,IAAI,GACL,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,qCAAkC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AAKjE,MAAM,OAAO,OAAQ,SAAQ,iBAAiB,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,SAAS,CAAC;IAArF;;QA0BE;;;WAGG;QACH,WAAM,GAAkB,YAAY,CAAC;QAErC;;;;;;;;WAQG;QACH,UAAK,GAAiB,MAAM,CAAC;IAmD/B,CAAC;IA3FC,gBAAgB;IAChB,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;YACxB,KAAK,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACxB,CAAC;IACJ,CAAC;IAED,gBAAgB;IAChB,MAAM,KAAK,MAAM;QACf,OAAO;YACL,KAAK,CAAC,MAAM;YACZ,GAAG;;;;;;;OAQF;SACF,CAAC;IACJ,CAAC;IAmBD,gBAAg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CAAC;CACF","sourcesContent":["import {\n CSSResultArray,\n LitElement,\n PropertyDeclarations,\n TemplateResult,\n css,\n html,\n} from 'lit-element';\n\nimport { ThemeableMixin } from '../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\n\nexport type SpinnerLayout = 'vertical' | 'horizontal' | 'no-label';\nexport type SpinnerState = 'end' | 'busy' | 'error' | 'empty' | 'paused';\n\nexport class Spinner extends TranslatableMixin(ThemeableMixin(LitElement), 'spinner') {\n /** @readonly */\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: { type: String },\n state: { type: String },\n };\n }\n\n /** @readonly */\n static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n paper-spinner-lite {\n --paper-spinner-stroke-width: 2px;\n --paper-spinner-color: currentColor;\n height: 19px;\n width: 19px;\n margin: 2.5px;\n }\n `,\n ];\n }\n\n /**\n * Optional spinner layout: horizonal (default) or vertical. First puts icon next\n * to the label, second puts it above the text.\n */\n layout: SpinnerLayout = 'horizontal';\n\n /**\n * Optional spinner state:\n *\n * - `busy` (default) for loading data;\n * - `error` for failures;\n * - `empty` for when there's no data;\n * - `paused` for a pause or a timeout before fetching the next chunk of data;\n * - `end` for when there's no more data;\n */\n state: SpinnerState = 'busy';\n\n /** @readonly */\n render(): TemplateResult {\n let layout: string;\n let icon: TemplateResult;\n let text: string;\n let tint: string;\n\n if (this.state === 'end') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:done-all\"></iron-icon>`;\n text = 'loading_end';\n tint = 'text-tertiary';\n } else if (this.state === 'error') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:error-outline\"></iron-icon>`;\n text = 'loading_error';\n tint = 'text-error';\n } else if (this.state === 'paused') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:more-horiz\"></iron-icon>`;\n text = 'loading_paused';\n tint = 'text-tertiary';\n } else if (this.state === 'empty') {\n icon = html`<iron-icon data-testid=\"icon\" icon=\"icons:info-outline\"></iron-icon>`;\n text = 'loading_empty';\n tint = 'text-tertiary';\n } else {\n icon = html`<paper-spinner-lite data-testid=\"icon\" active></paper-spinner-lite>`;\n text = 'loading_busy';\n tint = 'text-tertiary';\n }\n\n if (this.layout === 'horizontal') {\n layout = 'flex items-center space-x-s h-xxs';\n } else {\n layout = 'flex flex-col items-center space-y-s';\n }\n\n return html`\n <div class=\"font-lumo leading-none text-s ${layout} ${tint}\">\n <div class=\"w-xxs h-xss flex items-center justify-center\">${icon}</div>\n <foxy-i18n\n data-testid=\"text\"\n class=${this.layout === 'no-label' ? 'sr-only' : ''}\n lang=${this.lang}\n key=${text}\n ns=${this.ns}\n >\n </foxy-i18n>\n </div>\n `;\n }\n}\n"]}
@@ -1,6 +1,7 @@
1
1
  export { AccessRecoveryForm } from './AccessRecoveryForm/AccessRecoveryForm';
2
2
  export { AddressCard } from './AddressCard/AddressCard';
3
3
  export { AddressForm } from './AddressForm/AddressForm';
4
+ export { AppliedTaxCard } from './AppliedTaxCard/AppliedTaxCard';
4
5
  export { AttributeCard } from './AttributeCard/AttributeCard';
5
6
  export { AttributeForm } from './AttributeForm/AttributeForm';
6
7
  export { CancellationForm } from './CancellationForm/CancellationForm';
@@ -12,12 +13,16 @@ export { CustomerForm } from './CustomerForm/CustomerForm';
12
13
  export { CustomerPortal } from './CustomerPortal/CustomerPortal';
13
14
  export { CustomerPortalSettings } from './CustomerPortalSettings/CustomerPortalSettings';
14
15
  export { CustomersTable } from './CustomersTable/CustomersTable';
16
+ export { CustomFieldCard } from './CustomFieldCard/CustomFieldCard';
17
+ export { CustomFieldForm } from './CustomFieldForm/CustomFieldForm';
18
+ export { DiscountCard } from './DiscountCard/DiscountCard';
15
19
  export { Donation } from './Donation/Donation';
16
20
  export { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';
17
21
  export { FormDialog } from './FormDialog/FormDialog';
18
22
  export { I18n } from './I18n/I18n';
19
23
  export { ItemsForm, Item } from './ItemsForm/ItemsForm';
20
24
  export { NucleonElement } from './NucleonElement/NucleonElement';
25
+ export { PaymentCard } from './PaymentCard/PaymentCard';
21
26
  export { PaymentMethodCard } from './PaymentMethodCard/PaymentMethodCard';
22
27
  export { SignInForm } from './SignInForm/SignInForm';
23
28
  export { Spinner } from './Spinner/Spinner';
@@ -1,6 +1,7 @@
1
1
  export { AccessRecoveryForm } from './AccessRecoveryForm/index';
2
2
  export { AddressCard } from './AddressCard/index';
3
3
  export { AddressForm } from './AddressForm/index';
4
+ export { AppliedTaxCard } from './AppliedTaxCard/index';
4
5
  export { AttributeCard } from './AttributeCard/index';
5
6
  export { AttributeForm } from './AttributeForm/index';
6
7
  export { CancellationForm } from './CancellationForm/index';
@@ -12,12 +13,16 @@ export { CustomerForm } from './CustomerForm/index';
12
13
  export { CustomerPortal } from './CustomerPortal/index';
13
14
  export { CustomerPortalSettings } from './CustomerPortalSettings/index';
14
15
  export { CustomersTable } from './CustomersTable/index';
16
+ export { CustomFieldCard } from './CustomFieldCard/index';
17
+ export { CustomFieldForm } from './CustomFieldForm/index';
18
+ export { DiscountCard } from './DiscountCard/index';
15
19
  export { Donation } from './Donation/index';
16
20
  export { ErrorEntryCard } from './ErrorEntryCard/index';
17
21
  export { FormDialog } from './FormDialog/index';
18
22
  export { I18n } from './I18n/index';
19
23
  export { ItemsForm, Item } from './ItemsForm/index';
20
24
  export { NucleonElement } from './NucleonElement/index';
25
+ export { PaymentCard } from './PaymentCard/index';
21
26
  export { PaymentMethodCard } from './PaymentMethodCard/index';
22
27
  export { SignInForm } from './SignInForm/index';
23
28
  export { Spinner } from './Spinner/index';
@@ -1,6 +1,7 @@
1
1
  export { AccessRecoveryForm } from "./AccessRecoveryForm/index.js";
2
2
  export { AddressCard } from "./AddressCard/index.js";
3
3
  export { AddressForm } from "./AddressForm/index.js";
4
+ export { AppliedTaxCard } from "./AppliedTaxCard/index.js";
4
5
  export { AttributeCard } from "./AttributeCard/index.js";
5
6
  export { AttributeForm } from "./AttributeForm/index.js";
6
7
  export { CancellationForm } from "./CancellationForm/index.js";
@@ -12,12 +13,16 @@ export { CustomerForm } from "./CustomerForm/index.js";
12
13
  export { CustomerPortal } from "./CustomerPortal/index.js";
13
14
  export { CustomerPortalSettings } from "./CustomerPortalSettings/index.js";
14
15
  export { CustomersTable } from "./CustomersTable/index.js";
16
+ export { CustomFieldCard } from "./CustomFieldCard/index.js";
17
+ export { CustomFieldForm } from "./CustomFieldForm/index.js";
18
+ export { DiscountCard } from "./DiscountCard/index.js";
15
19
  export { Donation } from "./Donation/index.js";
16
20
  export { ErrorEntryCard } from "./ErrorEntryCard/index.js";
17
21
  export { FormDialog } from "./FormDialog/index.js";
18
22
  export { I18n } from "./I18n/index.js";
19
23
  export { ItemsForm, Item } from "./ItemsForm/index.js";
20
24
  export { NucleonElement } from "./NucleonElement/index.js";
25
+ export { PaymentCard } from "./PaymentCard/index.js";
21
26
  export { PaymentMethodCard } from "./PaymentMethodCard/index.js";
22
27
  export { SignInForm } from "./SignInForm/index.js";
23
28
  export { Spinner } from "./Spinner/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.defined.js","sourceRoot":"","sources":["../../../src/elements/public/index.defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,sBAAsB,EAAE,0CAAuC;AACxE,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,IAAI,EAAE,wBAAqB;AACpC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,6BAA0B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,UAAU,EAAE,8BAA2B","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/index';\nexport { AddressCard } from './AddressCard/index';\nexport { AddressForm } from './AddressForm/index';\nexport { AttributeCard } from './AttributeCard/index';\nexport { AttributeForm } from './AttributeForm/index';\nexport { CancellationForm } from './CancellationForm/index';\nexport { CollectionPage } from './CollectionPage/index';\nexport { CollectionPages } from './CollectionPages/index';\nexport { Customer } from './Customer/index';\nexport { CustomerApi } from './CustomerApi/index';\nexport { CustomerForm } from './CustomerForm/index';\nexport { CustomerPortal } from './CustomerPortal/index';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/index';\nexport { CustomersTable } from './CustomersTable/index';\nexport { Donation } from './Donation/index';\nexport { ErrorEntryCard } from './ErrorEntryCard/index';\nexport { FormDialog } from './FormDialog/index';\nexport { I18n } from './I18n/index';\nexport { ItemsForm, Item } from './ItemsForm/index';\nexport { NucleonElement } from './NucleonElement/index';\nexport { PaymentMethodCard } from './PaymentMethodCard/index';\nexport { SignInForm } from './SignInForm/index';\nexport { Spinner } from './Spinner/index';\nexport { SubscriptionCard } from './SubscriptionCard/index';\nexport { SubscriptionForm } from './SubscriptionForm/index';\nexport { SubscriptionsTable } from './SubscriptionsTable/index';\nexport { Table } from './Table/index';\nexport { TransactionsTable } from './TransactionsTable/index';\nexport { UserForm } from './UserForm/index';\nexport { UsersTable } from './UsersTable/index';\n"]}
1
+ {"version":3,"file":"index.defined.js","sourceRoot":"","sources":["../../../src/elements/public/index.defined.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,aAAa,EAAE,iCAA8B;AACtD,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,sBAAsB,EAAE,0CAAuC;AACxE,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,eAAe,EAAE,mCAAgC;AAC1D,OAAO,EAAE,YAAY,EAAE,gCAA6B;AACpD,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,IAAI,EAAE,wBAAqB;AACpC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,6BAA0B;AACpD,OAAO,EAAE,cAAc,EAAE,kCAA+B;AACxD,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,UAAU,EAAE,8BAA2B;AAChD,OAAO,EAAE,OAAO,EAAE,2BAAwB;AAC1C,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,oCAAiC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,sCAAmC;AAChE,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,iBAAiB,EAAE,qCAAkC;AAC9D,OAAO,EAAE,QAAQ,EAAE,4BAAyB;AAC5C,OAAO,EAAE,UAAU,EAAE,8BAA2B","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/index';\nexport { AddressCard } from './AddressCard/index';\nexport { AddressForm } from './AddressForm/index';\nexport { AppliedTaxCard } from './AppliedTaxCard/index';\nexport { AttributeCard } from './AttributeCard/index';\nexport { AttributeForm } from './AttributeForm/index';\nexport { CancellationForm } from './CancellationForm/index';\nexport { CollectionPage } from './CollectionPage/index';\nexport { CollectionPages } from './CollectionPages/index';\nexport { Customer } from './Customer/index';\nexport { CustomerApi } from './CustomerApi/index';\nexport { CustomerForm } from './CustomerForm/index';\nexport { CustomerPortal } from './CustomerPortal/index';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/index';\nexport { CustomersTable } from './CustomersTable/index';\nexport { CustomFieldCard } from './CustomFieldCard/index';\nexport { CustomFieldForm } from './CustomFieldForm/index';\nexport { DiscountCard } from './DiscountCard/index';\nexport { Donation } from './Donation/index';\nexport { ErrorEntryCard } from './ErrorEntryCard/index';\nexport { FormDialog } from './FormDialog/index';\nexport { I18n } from './I18n/index';\nexport { ItemsForm, Item } from './ItemsForm/index';\nexport { NucleonElement } from './NucleonElement/index';\nexport { PaymentCard } from './PaymentCard/index';\nexport { PaymentMethodCard } from './PaymentMethodCard/index';\nexport { SignInForm } from './SignInForm/index';\nexport { Spinner } from './Spinner/index';\nexport { SubscriptionCard } from './SubscriptionCard/index';\nexport { SubscriptionForm } from './SubscriptionForm/index';\nexport { SubscriptionsTable } from './SubscriptionsTable/index';\nexport { Table } from './Table/index';\nexport { TransactionsTable } from './TransactionsTable/index';\nexport { UserForm } from './UserForm/index';\nexport { UsersTable } from './UsersTable/index';\n"]}
@@ -1,6 +1,7 @@
1
1
  export { AccessRecoveryForm } from "./AccessRecoveryForm/AccessRecoveryForm.js";
2
2
  export { AddressCard } from "./AddressCard/AddressCard.js";
3
3
  export { AddressForm } from "./AddressForm/AddressForm.js";
4
+ export { AppliedTaxCard } from "./AppliedTaxCard/AppliedTaxCard.js";
4
5
  export { AttributeCard } from "./AttributeCard/AttributeCard.js";
5
6
  export { AttributeForm } from "./AttributeForm/AttributeForm.js";
6
7
  export { CancellationForm } from "./CancellationForm/CancellationForm.js";
@@ -12,12 +13,16 @@ export { CustomerForm } from "./CustomerForm/CustomerForm.js";
12
13
  export { CustomerPortal } from "./CustomerPortal/CustomerPortal.js";
13
14
  export { CustomerPortalSettings } from "./CustomerPortalSettings/CustomerPortalSettings.js";
14
15
  export { CustomersTable } from "./CustomersTable/CustomersTable.js";
16
+ export { CustomFieldCard } from "./CustomFieldCard/CustomFieldCard.js";
17
+ export { CustomFieldForm } from "./CustomFieldForm/CustomFieldForm.js";
18
+ export { DiscountCard } from "./DiscountCard/DiscountCard.js";
15
19
  export { Donation } from "./Donation/Donation.js";
16
20
  export { ErrorEntryCard } from "./ErrorEntryCard/ErrorEntryCard.js";
17
21
  export { FormDialog } from "./FormDialog/FormDialog.js";
18
22
  export { I18n } from "./I18n/I18n.js";
19
23
  export { ItemsForm, Item } from "./ItemsForm/ItemsForm.js";
20
24
  export { NucleonElement } from "./NucleonElement/NucleonElement.js";
25
+ export { PaymentCard } from "./PaymentCard/PaymentCard.js";
21
26
  export { PaymentMethodCard } from "./PaymentMethodCard/PaymentMethodCard.js";
22
27
  export { SignInForm } from "./SignInForm/SignInForm.js";
23
28
  export { Spinner } from "./Spinner/Spinner.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/elements/public/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,aAAa,EAAE,yCAAsC;AAC9D,OAAO,EAAE,aAAa,EAAE,yCAAsC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,eAAe,EAAE,6CAA0C;AACpE,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,WAAW,EAAE,qCAAkC;AACxD,OAAO,EAAE,YAAY,EAAE,uCAAoC;AAC3D,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,sBAAsB,EAAE,2DAAwD;AACzF,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,UAAU,EAAE,mCAAgC;AACrD,OAAO,EAAE,IAAI,EAAE,uBAAoB;AACnC,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,iCAA8B;AACxD,OAAO,EAAE,cAAc,EAAE,2CAAwC;AACjE,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,UAAU,EAAE,mCAAgC;AACrD,OAAO,EAAE,OAAO,EAAE,6BAA0B;AAC5C,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,UAAU,EAAE,mCAAgC","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/AccessRecoveryForm';\nexport { AddressCard } from './AddressCard/AddressCard';\nexport { AddressForm } from './AddressForm/AddressForm';\nexport { AttributeCard } from './AttributeCard/AttributeCard';\nexport { AttributeForm } from './AttributeForm/AttributeForm';\nexport { CancellationForm } from './CancellationForm/CancellationForm';\nexport { CollectionPage } from './CollectionPage/CollectionPage';\nexport { CollectionPages } from './CollectionPages/CollectionPages';\nexport { Customer } from './Customer/Customer';\nexport { CustomerApi } from './CustomerApi/CustomerApi';\nexport { CustomerForm } from './CustomerForm/CustomerForm';\nexport { CustomerPortal } from './CustomerPortal/CustomerPortal';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/CustomerPortalSettings';\nexport { CustomersTable } from './CustomersTable/CustomersTable';\nexport { Donation } from './Donation/Donation';\nexport { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';\nexport { FormDialog } from './FormDialog/FormDialog';\nexport { I18n } from './I18n/I18n';\nexport { ItemsForm, Item } from './ItemsForm/ItemsForm';\nexport { NucleonElement } from './NucleonElement/NucleonElement';\nexport { PaymentMethodCard } from './PaymentMethodCard/PaymentMethodCard';\nexport { SignInForm } from './SignInForm/SignInForm';\nexport { Spinner } from './Spinner/Spinner';\nexport { SubscriptionCard } from './SubscriptionCard/SubscriptionCard';\nexport { SubscriptionForm } from './SubscriptionForm/SubscriptionForm';\nexport { SubscriptionsTable } from './SubscriptionsTable/SubscriptionsTable';\nexport { Table } from './Table/Table';\nexport { TransactionsTable } from './TransactionsTable/TransactionsTable';\nexport { UserForm } from './UserForm/UserForm';\nexport { UsersTable } from './UsersTable/UsersTable';\n"]}
1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O,EAAE,gBAAgB,EAAE,+CAA4C;AACvE,OAAO,EAAE,kBAAkB,EAAE,mDAAgD;AAC7E,OAAO,EAAE,KAAK,EAAE,yBAAsB;AACtC,OAAO,EAAE,iBAAiB,EAAE,iDAA8C;AAC1E,OAAO,EAAE,QAAQ,EAAE,+BAA4B;AAC/C,OAAO,EAAE,UAAU,EAAE,mCAAgC","sourcesContent":["export { AccessRecoveryForm } from './AccessRecoveryForm/AccessRecoveryForm';\nexport { AddressCard } from './AddressCard/AddressCard';\nexport { AddressForm } from './AddressForm/AddressForm';\nexport { AppliedTaxCard } from './AppliedTaxCard/AppliedTaxCard';\nexport { AttributeCard } from './AttributeCard/AttributeCard';\nexport { AttributeForm } from './AttributeForm/AttributeForm';\nexport { CancellationForm } from './CancellationForm/CancellationForm';\nexport { CollectionPage } from './CollectionPage/CollectionPage';\nexport { CollectionPages } from './CollectionPages/CollectionPages';\nexport { Customer } from './Customer/Customer';\nexport { CustomerApi } from './CustomerApi/CustomerApi';\nexport { CustomerForm } from './CustomerForm/CustomerForm';\nexport { CustomerPortal } from './CustomerPortal/CustomerPortal';\nexport { CustomerPortalSettings } from './CustomerPortalSettings/CustomerPortalSettings';\nexport { CustomersTable } from './CustomersTable/CustomersTable';\nexport { CustomFieldCard } from './CustomFieldCard/CustomFieldCard';\nexport { CustomFieldForm } from './CustomFieldForm/CustomFieldForm';\nexport { DiscountCard } from './DiscountCard/DiscountCard';\nexport { Donation } from './Donation/Donation';\nexport { ErrorEntryCard } from './ErrorEntryCard/ErrorEntryCard';\nexport { FormDialog } from './FormDialog/FormDialog';\nexport { I18n } from './I18n/I18n';\nexport { ItemsForm, Item } from './ItemsForm/ItemsForm';\nexport { NucleonElement } from './NucleonElement/NucleonElement';\nexport { PaymentCard } from './PaymentCard/PaymentCard';\nexport { PaymentMethodCard } from './PaymentMethodCard/PaymentMethodCard';\nexport { SignInForm } from './SignInForm/SignInForm';\nexport { Spinner } from './Spinner/Spinner';\nexport { SubscriptionCard } from './SubscriptionCard/SubscriptionCard';\nexport { SubscriptionForm } from './SubscriptionForm/SubscriptionForm';\nexport { SubscriptionsTable } from './SubscriptionsTable/SubscriptionsTable';\nexport { Table } from './Table/Table';\nexport { TransactionsTable } from './TransactionsTable/TransactionsTable';\nexport { UserForm } from './UserForm/UserForm';\nexport { UsersTable } from './UsersTable/UsersTable';\n"]}
@@ -470,6 +470,11 @@ vaadin-checkbox::part(label){
470
470
  margin-bottom: var(--lumo-space-xs, 0.25rem);
471
471
  }
472
472
 
473
+ .my-s {
474
+ margin-top: var(--lumo-space-s, 0.5rem);
475
+ margin-bottom: var(--lumo-space-s, 0.5rem);
476
+ }
477
+
473
478
  .my-m {
474
479
  margin-top: var(--lumo-space-m, 1rem);
475
480
  margin-bottom: var(--lumo-space-m, 1rem);
@@ -661,6 +666,10 @@ vaadin-checkbox::part(label){
661
666
  height: var(--lumo-size-xs, 1.625rem);
662
667
  }
663
668
 
669
+ .h-s {
670
+ height: var(--lumo-size-s, 1.875rem);
671
+ }
672
+
664
673
  .h-m {
665
674
  height: var(--lumo-size-m, 2.25rem);
666
675
  }
@@ -1 +1 @@
1
- {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,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ray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
1
+ {"version":3,"file":"themeable.js","sourceRoot":"","sources":["../../src/mixins/themeable.ts"],"names":[],"mappings":"AAAA,sEAAsE;AAEtE,OAAO,EAA0C,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAEtF,OAAO,EAAE,eAAe,EAAE,wBAAqB;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI/D,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,WAAkB,EACkB,EAAE;IACtC,OAAO,MAAM,gBAAiB,SAAQ,WAAW;QAC/C,MAAM,KAAK,MAAM;YACf,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC;YAEjC,OAAO;gBACL,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;gBAClF,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAiGF;aACF,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,OAAgB,SAAU,SAAQ,mBAAmB,CACzD,eAAe,CAAC,cAAc,CAAC,UAAU,CAAC,CAAC,CAC5C;CAAG","sourcesContent":["/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\n\nimport { CSSResult, CSSResultArray, Constructor, LitElement, css } from 'lit-element';\n\nimport { ResponsiveMixin } from './responsive';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\n\ntype Base = Constructor<LitElement> & { styles?: CSSResult | CSSResultArray | CSSStyleSheet };\n\nexport const ThemeableMixin = <TBase extends Base>(\n BaseElement: TBase\n): TBase & { styles: CSSResultArray } => {\n return class ThemeableElement extends BaseElement {\n static get styles(): CSSResultArray {\n const originalCSS = super.styles;\n\n return [\n ...(originalCSS ? (Array.isArray(originalCSS) ? originalCSS : [originalCSS]) : []),\n css`\n @tailwind base;\n\n * {\n -webkit-tap-highlight-color: transparent;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n :host {\n display: block;\n }\n\n details > summary::-webkit-details-marker {\n display: none;\n }\n\n details > summary {\n list-style: none;\n }\n\n vaadin-select {\n margin-top: -4px;\n margin-bottom: -4px;\n }\n\n vaadin-text-area,\n vaadin-text-field,\n vaadin-date-picker,\n vaadin-email-field,\n vaadin-number-field,\n vaadin-custom-field,\n vaadin-integer-field,\n vaadin-password-field,\n vaadin-combo-box::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-date-picker::part(text-field) {\n padding-top: 0;\n padding-bottom: 0;\n }\n\n vaadin-button {\n margin: 0;\n }\n\n vaadin-checkbox::part(checkbox) {\n margin: 0;\n }\n\n vaadin-checkbox::part(label) {\n margin: 0.1875em var(--lumo-space-m);\n }\n\n @tailwind components;\n\n @tailwind utilities;\n\n @layer utilities {\n .border-radius-overflow-fix {\n -webkit-mask-image: -webkit-radial-gradient(white, black);\n }\n\n @variants sm, md, lg, xl {\n .grid-rows-auto {\n grid-auto-rows: 1fr;\n }\n\n .icon-inline {\n --iron-icon-height: 1em;\n --iron-icon-width: 1em;\n }\n\n .bg-blurred {\n backdrop-filter: blur(25px);\n background: var(--lumo-tint-80pct);\n }\n\n .max-w-modal {\n max-width: 28rem;\n }\n\n .w-narrow-modal {\n width: 18rem;\n }\n\n .snap-x-mandatory {\n scroll-snap-type: x mandatory;\n }\n\n .snap-start {\n scroll-snap-align: start;\n }\n }\n }\n `,\n ];\n }\n };\n};\n\n/**\n * One of the base classes for each rel-specific element in the collection\n * providing shared TailwindCSS styles for Shadow DOM content.\n * This class MUST NOT be used on its own (hence the `abstract` keyword) or\n * referenced externally (outside of the package).\n *\n * @deprecated\n */\nexport abstract class Themeable extends ScopedElementsMixin(\n ResponsiveMixin(ThemeableMixin(LitElement))\n) {}\n"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/elements",
3
3
  "type": "module",
4
- "version": "1.11.0-beta.2",
4
+ "version": "1.11.0-beta.6",
5
5
  "description": "E-commerce web components by Foxy.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "prepack": "npm run lint && rimraf dist && node ./.build/compile-for-npm.js && rollup -c"
28
28
  },
29
29
  "dependencies": {
30
- "@foxy.io/sdk": "^1.5.2",
30
+ "@foxy.io/sdk": "^1.6.0",
31
31
  "@open-wc/lit-helpers": "^0.3.11",
32
32
  "@open-wc/scoped-elements": "1.2.1",
33
33
  "@polymer/iron-icons": "^3.0.1",
@@ -1 +0,0 @@
1
- import{L as t,_ as e,c as i,h as s}from"./shared-84203d52.js";import"./shared-b98f88c9.js";import{p as r}from"./shared-87ca7818.js";import"./shared-45d647e4.js";import"./shared-e0248713.js";import{b as a,S as n,c as o}from"./shared-8057ee9c.js";import{s as c,I as l,D as h}from"./shared-bba615b8.js";import"./shared-851b97ef.js";import{E as d}from"./shared-e058cb87.js";import"./shared-54c485d2.js";import"./shared-3ae39e52.js";import"./foxy-i18n.js";import"./shared-cd700eac.js";class u extends CustomEvent{constructor(t){super("change",{detail:t})}}class m extends CustomEvent{constructor(t){super("submit",{detail:t,cancelable:!0})}}let _,p,g=t=>t;var y;!function(t){t[t.Excluded=0]="Excluded",t[t.BeforeEnter=1]="BeforeEnter",t[t.Default=2]="Default",t[t.Previous=3]="Previous",t[t.BeforeExit=4]="BeforeExit"}(y||(y={}));class f extends t{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return e(e({},super.properties),{},{quantity:{attribute:!1},image:{attribute:!1}})}static get styles(){return[a.styles,i(_||(_=g`.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.blur-1{filter:blur(1px)}.blur-2{filter:blur(2px)}.grayscale{filter:grayscale()}.rotate-12{--tw-rotate:12deg}.-rotate-12{--tw-rotate:-12deg}.-rotate-24{--tw-rotate:-24deg}.translate-y-half{--tw-translate-y:50%}`))]}set empty(t){this.updateComplete.then((()=>{if(t){const[,...t]=this.__stack;t.forEach((t=>t.remove()))}else this.quantity>1&&this.__stack.length<2&&this.__insertImage(y.Previous,this.__stack[0])}))}set data({quantity:t,image:e}){this.quantity=t,this.image=e}render(){return s(p||(p=g`<div id="image" class="w-full h-full relative"></div>`))}firstUpdated(){const t=this.__insertImage(y.Default);this.quantity>1&&this.__insertImage(y.Previous,t)}updated(t){if(t.has("quantity")){const e=t.get("quantity");void 0!==e&&(this.quantity>e?this.__add():this.__remove())}t.has("image")&&this.__stack.forEach((t=>t.src=this.image))}get __container(){return this.shadowRoot.getElementById("image")}get __stack(){var t,e;return[...null!==(e=null===(t=this.__container)||void 0===t?void 0:t.querySelectorAll(":not(.opacity-0)"))&&void 0!==e?e:[]].reverse()}__add(){const[t,e]=this.__stack;this.quantity>1?(t&&this.__setImageState(t,y.Previous),e&&(this.__setImageState(e,y.BeforeExit),e.ontransitionend=()=>e.remove()),this.__setImageState(this.__insertImage(y.BeforeEnter),y.Default)):t&&this.__setImageState(t,y.Default)}__remove(){const[t,e]=this.__stack;let i;if(this.quantity>0?(e&&this.__setImageState(e,y.Default),i=t):(t&&this.__setImageState(t,y.Excluded),i=e),i&&(this.__setImageState(i,y.BeforeEnter),i.ontransitionend=()=>i.remove()),this.quantity>1){const t=this.__insertImage(y.BeforeExit,this.__container.firstElementChild);this.__setImageState(t,y.Previous)}}__insertImage(t,e=null){const i=new Image;return i.src=this.image,i.setAttribute("part","picture"),this.__setImageState(i,t),this.__container.insertBefore(i,e),i}__setImageState(t,e){t.offsetHeight,t.className=["absolute inset-0 w-full h-full object-cover rounded transform transition duration-700 ease-out-back",["grayscale","shadow-m translate-y-half scale-110 rotate-12 opacity-0","shadow-m","blur-1 -rotate-12 opacity-25","blur-2 -rotate-24 opacity-0"][e]].join(" ")}}let v,b,w,x,q,I,$,E,S=t=>t;class D extends(n(t)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return e(e({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=S`.w-preview{width:5.5rem}.h-preview{height:5.5rem}.ease-out-back{transition-timing-function:cubic-bezier(.34,1.56,.64,1)}.grayscale{filter:grayscale()}.grid-2>:nth-child(1),.grid-3>:nth-child(1),.grid-4-plus>:nth-child(1),.grid-4>:nth-child(1){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(2){opacity:0;--tw-translate-x:100%;--tw-translate-y:var(--tw-translate-x)}.grid-2>:nth-child(2),.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(2),.grid-4-plus>:nth-child(2),.grid-4>:nth-child(2){transform-origin:top right}.grid-1>:nth-child(3),.grid-2>:nth-child(3),.grid-3>:nth-child(3),.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(3),.grid-2>:nth-child(3){opacity:0;--tw-translate-y:100%}.grid-3>:nth-child(3){transform-origin:bottom right}.grid-4-plus>:nth-child(3),.grid-4>:nth-child(3){transform-origin:bottom left}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4),.grid-4-plus>:nth-child(4),.grid-4>:nth-child(4){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-1>:nth-child(4),.grid-2>:nth-child(4),.grid-3>:nth-child(4){opacity:0;transform-origin:bottom left;--tw-translate-x:100%}.grid-1>:nth-child(4)>:first-child,.grid-2>:nth-child(4)>:first-child,.grid-3>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:first-child{transform:perspective(250px) rotateX(-90deg)}.grid-4-plus>:nth-child(4)>:first-child,.grid-4>:nth-child(4)>:last-child{transition-delay:.15s;transition-timing-function:ease-out}.grid-4-plus>:nth-child(4)>:last-child,.grid-4>:nth-child(4)>:first-child{transition-timing-function:ease-in}.grid-4-plus>:nth-child(4)>:last-child{transform:perspective(250px) rotateX(90deg)}.grid-1>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){opacity:0}.grid-1>:nth-child(5){--tw-translate-x:100%}.grid-2>:nth-child(5),.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-3>:nth-child(5),.grid-4-plus>:nth-child(5),.grid-4>:nth-child(5){--tw-translate-y:-100%}.grid-1>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){opacity:0}.grid-1>:nth-child(6){--tw-translate-y:100%}.grid-2>:nth-child(6),.grid-3>:nth-child(6),.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-scale-x:calc(2.5 / 5.5);--tw-scale-y:var(--tw-scale-x)}.grid-4-plus>:nth-child(6),.grid-4>:nth-child(6){--tw-translate-x:-100%}`))]}render(){const t=this.data.length,e="rounded bg-contrast-10",i="transition-all duration-700 ease-out-back transform absolute inset-0",r=this.empty?"grayscale":"",a=t>4?"grid-4-plus":`grid-${Math.max(1,t)}`,n=c({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,h,d]=this.data;return s(b||(b=S` <div class="${0} w-preview h-preview relative font-lumo"> <div class="${0} ${0} origin-top-left"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> ${0} </div> <div class="${0} ${0} origin-top-right"> ${0} </div> <div class="${0} ${0} origin-bottom-right"> <div class="${0} flex text-body transition duration-150 absolute inset-0"> ${0} </div> <div class="transition duration-150 absolute inset-0"> ${0} </div> </div> <div class="${0} ${0} origin-top-right"></div> <div class="${0} ${0} origin-bottom-left"></div> </div> `),a,i,r,o?s(w||(w=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,h?s(q||(q=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,r,e,t>102?s(I||(I=S`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s($||($=S`<div class="m-auto text-xxxl">+${0}</div>`),t-3),d?s(E||(E=S`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,d):"",i,e,i,e)}}let k,C,A=t=>t;class N extends D{static get scopedElements(){return{"x-pic":f}}}class P extends D{static get scopedElements(){return{"x-pic":N}}}class F extends(n(t)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":P}}static get properties(){return{quantity:{attribute:!1},image:{attribute:!1},items:{attribute:!1}}}static get styles(){return a.styles}render(){const{quantity:t,image:e=""}=this,i=0===t,r=c({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(k||(k=A`<x-picture ...="${0}" .data="${0}"></x-picture>`),r,{quantity:t,image:e});{const e=new Array(Math.max(1,t)).fill(this.items);return s(C||(C=A`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class T extends o{static get properties(){return e(e({},super.properties),{},{open:{type:Object},signatures:{type:Object,converter:t=>{const e=JSON.parse(t);for(const t of Object.keys(e))64!=e[t].length&&console.error("There is something wrong with the signature. It should have 64 characters.");return e}}})}signedName(t){return this.signatures&&this.signatures[t]?`${t}||${this.signatures[t]}${this.isOpen(t)?"||open":""}`:t}isOpen(t){return!(!this.open||!this.open[t])}}let j,O,B,L,R,z,V,M=t=>t;class Q extends T{constructor(){super("items-form"),this.rel="product_item",this.readonly=!1,this.quantity=0,this.total=this.__computeTotalPrice(),this.currency="",this.isItem=!0,this.isChildItem=!1,this.pid=Q.__newId(),this.__modified=!1,this.__childPrices=[],this.__images=[],this.__childrenCount=0,this.__itemDescription="",this.__handleQuantity={handleEvent:t=>{const e=Number(t.target.value);this.quantity=e,this.__modified=!0,this.__images=[this.getImageDescription()].concat(this.__images.slice(1,this.__images.length))}},this.__childItemsObserver=new MutationObserver(this.__observeItems.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__setCode(),this.__acknowledgeChildItems(),this.__changedChildItem(),this.__isValid()||console.error("Invalid item",this.value)}))}static get styles(){return[super.styles,i(j||(j=M`:host{--quantity-width:6.5rem;--preview-size:5.5rem;--threshold:20rem}.min-w-description::before{content:'';width:var(--threshold);display:block;overflow:hidden}.ml-description{--min-width:calc(var(--threshold) + var(--preview-size) + var(--lumo-space-l));--free-space:calc(100% - var(--min-width));--max-margin-left:calc(var(--preview-size) + var(--lumo-space-l));--final-margin-left:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-left));margin-left:var(--final-margin-left)}.mr-quantity{--min-width:var(--threshold);--free-space:calc(100% - var(--min-width));--max-margin-right:calc(var(--quantity-width) + var(--lumo-space-l));--final-margin-right:clamp(0rem, var(--free-space) * 999999999, var(--max-margin-right));margin-right:var(--final-margin-right)}:host([data-bundled]:not(:last-of-type)) .separator::after{content:' ';display:block;position:absolute;width:100vw;border-bottom:solid thin var(--lumo-shade-10pct);left:0;bottom:0}.w-quantity{width:var(--quantity-width)}.w-preview{width:var(--preview-size)}.h-preview{height:var(--preview-size)}`))]}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"x-error-screen":d,"x-preview":F,"x-i18n":l}}static get properties(){return e(e({},super.properties),{},{__modified:{},readonly:{type:Boolean,reflect:!0},currency:{type:String},category:{type:String},code:{type:String,reflect:!0},expires:{type:String},height:{type:Number},image:{type:String},length:{type:Number},name:{type:String},parent_code:{type:String},price:{type:Number},quantity:{type:Number,reflect:!0},quantity_max:{type:Number},quantity_min:{type:String},shipto:{type:String},total:{type:Number,reflect:!0,attribute:"total"},url:{type:String},value:{type:Object},weight:{type:Number},width:{type:Number},__childPrices:{},__childrenCount:{},__images:{},alt:{type:String},isChildItem:{type:Boolean,reflect:!0,attribute:"data-bundled"},isItem:{type:Boolean,reflect:!0,attribute:"data-item"},open:{type:Object},pid:{type:Number,reflect:!0},items:{type:Array}})}get items(){const t=[];return this.__onEachChildItem([e=>t.push(e.value)]),t}set items(t){this.__createItems(t)}get value(){const t={};for(let e=0;e<this.attributes.length;e++)t[this.attributes[e].name]=this.attributes[e].value;return t.items=this.items,t}set value(t){this.__itemDescription="";for(const e in t){let i="";if("description"!=e){if("object"==typeof t[e])i=JSON.stringify(t[e]);else{const s=e;(t[s]&&"undefined"!==t[s]||0===t[s])&&(i=t[e].toString())}this.setAttribute(e,t[e]?i:"")}else this.__itemDescription=t[e]}}updated(t){t.forEach(((t,e)=>{"__itemDescription"!=e&&"isChildItem"!=e||this.__updateDescriptionEl()})),this.__setTotalPrice(),this.dispatchEvent(new Event("change"))}render(){var t;if(!this.__isValid())return s(O||(O=M`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`));const e=`font-lumo text-body text-s leading-m transition duration-100 ${this.quantity?"":"removed opacity-50"}`;if(this.isChildItem)return s(B||(B=M` <article part="item" class="py-s w-full relative separator item-summary flex justify-between ${0}"> <div class="description flex-1"> <h1 class="text-header font-medium">${0}</h1> <section class="description text-secondary"> <slot></slot> </section> </div> ${0} </article> `),e,this.name,this.quantity<2?"":s(L||(L=M` <section class="quantity font-medium text-tertiary whitespace-nowrap"> ${0} </section> `),this._t("item.items",{quantity:this.quantity})));{const i=(null!==(t=this.price)&&void 0!==t?t:0)+this.__childPrices.reduce(((t,e)=>t+e),0),r=this.__translateAmount(i*this.quantity),a=this.__translateAmount(i);return s(R||(R=M` <article part="item" class="p-l relative item ${0} ${0}"> <x-preview class="preview float-left w-preview h-preview mr-l mb-l" exportparts="picture" .image="${0}" .quantity="${0}" .items="${0}"> </x-preview> <section class="description min-w-description ml-description"> <h1 class="text-header font-medium text-l leading-none mr-quantity mb-s"> ${0} </h1> <div class="item-description text-secondary mr-quantity mb-s"> <slot></slot> </div> <div class="child-items mb-s"> <slot name="items"></slot> </div> ${0} </section> <section class="quantity w-quantity absolute top-0 right-0 m-l"> <vaadin-integer-field class="w-full p-0" name="quantity" @change="${0}" value="${0}" min="0" has-controls ?readonly="${0}"> </vaadin-integer-field> ${0} </section> </article> `),e,this.__modified?"modified":"",this.image,this.quantity,[...this.querySelectorAll("[data-bundled]")].map((t=>{var e;return{quantity:t.quantity,image:null!==(e=t.image)&&void 0!==e?e:""}})),this.name,a?s(z||(z=M`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(V||(V=M` <x-i18n .ns="${0}" .lang="${0}" .opts="${0}" class="price-total text-secondary text-xs text-center block mt-xs" key="price.total"> </x-i18n> `),this.ns,this.lang,{amount:r}):"")}}getImageDescription(){return{src:this.image,alt:this.alt,quantity:this.quantity}}signedName(t){const e=super.signedName(t);return`${this.pid.toString()}:${e}`}static __newId(){const t=Q.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return Q.__existingIds.push(t),t}__updateDescriptionEl(){if(this.__itemDescription){let t=this.shadowRoot.querySelector("data-item-description");t||(t=document.createElement("p"),t.dataset.itemDescription="true",this.__addSlottedEl(t)),t.innerText=this.__itemDescription}else{const t=this.shadowRoot.querySelector("data-item-description");t&&t.remove()}}__addSlottedEl(t){const e=this.shadowRoot.querySelector("article");e&&e.appendChild(t)}__setCode(){this.code||(this.code=`RAND${Math.random()}`)}__createItems(t){t.forEach((t=>{const e=document.createElement(this.tagName);e.value=t,e.currency=this.currency,e.__computeTotalPrice(),this.__acknowledgeItem(e),this.appendChild(e)}))}__setTotalPrice(){this.total=this.__computeTotalPrice()}__computeTotalPrice(){if(!this.__childPrices)return this.price?this.price*this.quantity:0;let t=0;return this.__childPrices.forEach((e=>{t+=e})),t+=this.price,t*=this.quantity,t}__isValid(){const t=[];return this.name&&this.name.length||t.push("The name attribute of an item is required."),this.price||0===this.price||t.push("The price attribute of an item is required."),this.price&&this.price<0&&t.push("Item added with negative price."),this.quantity_min&&this.quantity&&this.quantity<this.quantity_min&&t.push("Quantity amount is less than minimum quantity."),this.quantity_max&&this.quantity&&this.quantity>this.quantity_max&&t.push("Quantity amount is more than maximum quantity."),console.error(...t),!t.length}__translateAmount(t){return this.currency?t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"}):""}__observeItems(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.nodeType===Node.DOCUMENT_NODE&&this.__acknowledgeItem(t)}))})),this.__setTotalPrice()}__acknowledgeChildItems(){var t;null===(t=this.shadowRoot)||void 0===t||t.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t))),this.querySelectorAll("[data-item]").forEach((t=>this.__acknowledgeItem(t)))}__acknowledgeItem(t){t.addEventListener("change",this.__changedChildItem.bind(this)),t.currency=this.currency,t.isItem=!1,t.isChildItem=!0,this.code&&(t.parent_code=this.code)}__changedChildItem(){const t=[],e=[];let i=0;this.__onEachChildItem([e=>{void 0!==e.total&&t.push(e.total)},t=>{e.push(t.getImageDescription())},()=>i+=1]),this.image&&0===e.length&&e.push(this.getImageDescription()),this.__childPrices=t,this.__images=e,this.__childrenCount=i,this.__setTotalPrice()}__onEachChildItem(t){const e=this.querySelectorAll("[data-bundled]");for(const i of e)for(const e of t)e(i)}}Q.__existingIds=[];let W,J,U,X,H,G,K=t=>t;class Y extends T{constructor(){super("items-form"),this.readonly=!1,this.target="_top",this.cart="checkout",this.sub_modify="replace",this.sub_restart="auto",this.frequencies=[],this.handleSubmit={handleEvent:()=>{null!==this.__data&&this.dispatchEvent(new m(this.__data))&&this.shadowRoot.querySelector("form").submit()}},this.__hasValidItems=!1,this.__total=0,this.__handleFrequency={handleEvent:t=>{const e=t.detail.replace(/([wydm])\w*/,"$1").replace(/ /g,"").replace(/^0/,"");Y.__validFrequency(e)?this.sub_frequency=e:this.sub_frequency="",this.__updateData()}},this.__data=new FormData,this.__childItemsObserver=new MutationObserver(this.__observeChildren.bind(this)),this.__childItemsObserver.observe(this,{childList:!0,attributes:!1,subtree:!0}),this.updateComplete.then((()=>{this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}))}static get scopedElements(){return{"x-error-screen":d,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":h,"x-item":Q}}static get properties(){return e(e({},super.properties),{},{currency:{type:String},readonly:{type:Boolean},cart:{type:String,converter:t=>t&&!["checkout","add"].includes(t)?null:t},target:{type:String},store:{type:String,attribute:"store"},sub_frequency:{type:String},sub_startdate:{type:String,converter:t=>Y.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>Y.__validDateFuture(t)?t:(console.error("Invalid end date",t),"")},sub_token:{type:String},sub_modify:{type:String,converter:t=>""===t||"append"===t?"":"replace"},sub_restart:{type:String,converter:t=>"true"===t?t:"auto"},frequencies:{converter:(t,e)=>{if(!t)return[];const i=JSON.parse(t);if(!Array.isArray(i))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of i)if(!Y.__validFrequency(t))return console.error("Invalid frequency","Invalid frequency option.\n Please, check https://wiki.foxycart.com/v/2.0/products#subscription_product_options for possible values.\n Each frequency must be a in the format:\n - 1d (a number followed by d, for day)\n - 1w (a number followed by w, for week)\n - 1m (a number followed by m, for month)\n - 1y (a number followed by y, for year)\n or .5m (no other decimals are allowed, and this is only for months)\n ",t),[];return i.filter(Y.__validFrequency)}},items:{type:Array},__hasValidItems:{attribute:!1},__total:{attribute:!1},__data:{attribute:!1}})}get items(){const t=[];return this.__itemElements.forEach((e=>{const i=new Proxy(e,{set:function(t,e,i){const s=Object.keys(t.value);return!("string"!=typeof e||!s.includes(e))&&(t[e]=i,!0)},get:function(t,e){return t.value[e]}});t.push(i)})),t}set items(t){this.__removeItems(),this.__createItemsFromItemArray(t)}get total(){return this.__total}render(){var t;return this.store&&this.currency?s(J||(J=K` <div> <form class="overflow-hidden" method="POST" target="${0}" action="https://${0}/cart" data-testid="form" class="hidden" hidden> ${0} </form> <section class="items"> <slot></slot> </section> ${0} </div> `),this.target,this.store,this.__data?s(U||(U=K` ${0}`),[...this.__data.entries()].map((([t,e])=>s(X||(X=K`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(H||(H=K` <section class="actions flex flex-wrap justify-end m-m"> ${0} <vaadin-button class="m-s w-full sm-w-auto" theme="primary" data-testid="submit" ?disabled="${0}" @click="${0}"> <span class="total"> ${0} </span> </vaadin-button> </section> `),this.frequencies&&this.frequencies.length?s(G||(G=K` <x-dropdown type="text" name="frequency" class="subscription m-s w-full sm-w-auto" lang="${0}" .value="${0}" .items="${0}" .getText="${0}" @change="${0}"> </x-dropdown> `),this.lang,null!==(t=this.sub_frequency)&&void 0!==t?t:"0",this.frequencies.concat(["0"]),this.__translateFrequency.bind(this),this.__handleFrequency):"",!this.__hasValidItems,this.handleSubmit,this.__submitBtnText(this.__translateAmount(this.total)))):s(W||(W=K`<x-error-screen type="setup_needed" class="relative"></x-error-screen>`))}addItems(t){for(const e of t){const t=this.createItem(e);this.appendChild(t),this.__acknowledgeItemElement(t)}}removeItems(t){this.__removeItems((e=>t.includes(e.pid)))}updated(){this.dispatchEvent(new u(this.__data))}createItem(t){const e=this.constructor.getScopedTagName("x-item"),i=document.createElement(e);return i.value=t,i.currency=this.currency,i.readonly=this.readonly,i}__submitBtnText(t){if(this.sub_frequency&&"0"!=this.sub_frequency){const e=r(this.sub_frequency);return 1===e.count?this._t("checkout.subscribe_single_unit",{value:t,period:this._t(e.units).toLowerCase()}):this._t("checkout.subscribe_muiltiple_units",{value:t,period:this.__translateFrequency(this.sub_frequency).toLowerCase()})}return this._t("checkout.buy",{value:t})}get __itemElements(){return this.querySelectorAll("[data-item]")}__createItemsFromItemArray(t){this.addItems(t)}__removeItems(t=(t=>!0)){this.__itemElements.forEach((e=>{t(e)&&e.remove()}))}__addSignature(t,e,i){return`${t}||${e}${i?"||open":""}`}__formDataFill(t){let e=0;return this.__itemElements.forEach((i=>{e+=this.__formDataAddItem(t,i)})),this.__formDataAddCartWideSubscriptionFields(t),e}__formDataCustomInputs(t){this.querySelectorAll("[name]").forEach((e=>{const i=e;"INPUT"==i.tagName&&["checkbox","radio"].includes(i.type)&&!i.checked||"OPTION"!=i.tagName&&i.value&&["number","string"].includes(typeof i.value)&&t.set(i.name,i.value)}))}__isAttributeReserved(t){return["alt","currency","description","isChildren","isItem","items","open","pid","signatures","slot","total"].includes(t)}__formDataAddItem(t,e,i=null){let s=0;if(this.__validItem(e)){if(!e.value.pid)throw new Error("Attempt to convert a item without a propper ID");i&&i.getAttribute("code")&&e.setAttribute("parent_code",i.getAttribute("code"));for(let s=0;s<e.attributes.length;s++){const r=e.attributes[s];if(!this.__isAttributeReserved(r.name)&&!r.name.startsWith("data-")){let s=e[r.name];e.code&&["string","number"].includes(typeof s)&&(i&&"quantity"==r.name&&(s=Number(r.value)*i.quantity),t.set(e.signedName(r.name),s.toString()))}}s+=1,this.__formDataAddSubscriptionFields(t,e)}const r=e.querySelectorAll("[data-bundled]");if(r&&e.quantity>0)for(const i of r)s+=this.__formDataAddItem(t,i,e);return s}__formDataAddSubscriptionFields(t,e){if(this.sub_frequency)for(const i of["sub_frequency","sub_startdate","sub_enddate"])this[i]&&t.set(e.signedName(i),this[i])}__formDataAddCartWideSubscriptionFields(t){this.sub_frequency&&(this.sub_token&&t.set(this.signedName("sub_token"),this.sub_token),t.set(this.signedName("sub_modify"),this.sub_modify),t.set(this.signedName("sub_restart"),this.sub_restart))}__formDataAddCartFields(t){this.cart?t.set("cart",this.cart):t.delete("cart")}static __validDate(t){return null!=t&&(t.match(/^(\d{1,2}|\d{8})$/)?!(t.match(/^\d{2}$/)&&Number(t)>31):!(t.match(/^\.5m/)||!Y.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(Y.__validDate(t))if(t.match(/^\d{8}/)){e=(new Date).toISOString().replace(/(-|T.*)/g,"")<=t}else e=!0;return e}static __validFrequency(t){return!!t&&!!t.match(/^(\.5m|\d+[dwmy])$/)}__observeChildren(t){t.forEach((t=>{"childList"==t.type&&t.addedNodes.forEach((t=>{t.addEventListener("change",this.__itemChange.bind(this))}))})),this.__acknowledgeItemElements(),this.__computeTotalPrice(),this.__updateData()}__itemChange(){this.__computeTotalPrice(),this.__updateData()}__computeTotalPrice(){let t=0;this.__itemElements.forEach((e=>{const i=e;i.total&&(t+=Number(i.total))})),this.__total=Number(t.toFixed(2))}__acknowledgeItemElements(){this.__itemElements.forEach((t=>{const e=t;this.__acknowledgeItemElement(e)}))}__acknowledgeItemElement(t){t.addEventListener("change",this.__itemChange.bind(this)),t.currency=this.currency}__validItem(t){const e=t.getAttribute("pid"),i=Number(t.getAttribute("quantity")),s=Number(t.getAttribute("price"));return!!(e&&i>0&&s>=0)}__translateFrequency(t){if(t.startsWith("0"))return this._t("frequency_once");if(".5m"===t)return this._t("frequency_0_5m");const{count:e,units:i}=r(t);return this._t("frequency",{units:this._t(i,{count:e}),count:e})}__translateAmount(t){return t.toLocaleString(this.lang,{minimumFractionDigits:2,currency:this.currency,style:"currency"})}__updateData(){this.__data=null;if(!this.shadowRoot.querySelector("form"))return;const t=new FormData,e=this.__formDataFill(t);this.__hasValidItems=!!e,this.__formDataAddCartFields(t),this.__formDataCustomInputs(t),this.__data=t}}customElements.define("foxy-items-form",Y),customElements.define("foxy-item",Q);export{Y as I,F as P,Q as a};
@@ -1,15 +0,0 @@
1
- import"./foxy-spinner.js";import{d as e,as as t,at as s,au as n,av as o,_ as r,h as i,F as l}from"./shared-84203d52.js";import{C as a}from"./shared-23966eed.js";import{N as d}from"./shared-a110de43.js";
2
- /**
3
- * @license
4
- * Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
5
- * This code may only be used under the BSD style license found at
6
- * http://polymer.github.io/LICENSE.txt
7
- * The complete set of authors may be found at
8
- * http://polymer.github.io/AUTHORS.txt
9
- * The complete set of contributors may be found at
10
- * http://polymer.github.io/CONTRIBUTORS.txt
11
- * Code distributed by Google as part of the polymer project is also
12
- * subject to an additional IP rights grant found at
13
- * http://polymer.github.io/PATENTS.txt
14
- */
15
- const h=(e,n)=>{const o=e.startNode.parentNode,r=void 0===n?e.endNode:n.startNode,i=o.insertBefore(s(),r);o.insertBefore(s(),r);const l=new t(e.options);return l.insertAfterNode(i),l},c=(e,t)=>(e.setValue(t),e.commit(),e),f=(e,t,s)=>{const o=e.startNode.parentNode,r=s?s.startNode:e.endNode,i=t.endNode.nextSibling;i!==r&&n(o,t.startNode,i,r)},p=e=>{o(e.startNode.parentNode,e.startNode,e.endNode.nextSibling)},u=(e,t,s)=>{const n=new Map;for(let o=t;o<=s;o++)n.set(e[o],o);return n},m=new WeakMap,g=new WeakMap,_=e(((e,s,n)=>{let o;return void 0===n?n=s:void 0!==s&&(o=s),s=>{if(!(s instanceof t))throw new Error("repeat can only be used in text bindings");const r=m.get(s)||[],i=g.get(s)||[],l=[],a=[],d=[];let _,y,x=0;for(const t of e)d[x]=o?o(t,x):x,a[x]=n(t,x),x++;let v=0,b=r.length-1,N=0,$=a.length-1;for(;v<=b&&N<=$;)if(null===r[v])v++;else if(null===r[b])b--;else if(i[v]===d[N])l[N]=c(r[v],a[N]),v++,N++;else if(i[b]===d[$])l[$]=c(r[b],a[$]),b--,$--;else if(i[v]===d[$])l[$]=c(r[v],a[$]),f(s,r[v],l[$+1]),v++,$--;else if(i[b]===d[N])l[N]=c(r[b],a[N]),f(s,r[b],r[v]),b--,N++;else if(void 0===_&&(_=u(d,N,$),y=u(i,v,b)),_.has(i[v]))if(_.has(i[b])){const e=y.get(d[N]),t=void 0!==e?r[e]:null;if(null===t){const e=h(s,r[v]);c(e,a[N]),l[N]=e}else l[N]=c(t,a[N]),f(s,t,r[v]),r[e]=null;N++}else p(r[b]),b--;else p(r[v]),v++;for(;N<=$;){const e=h(s,l[$+1]);c(e,a[N]),l[N++]=e}for(;v<=b;){const e=r[v++];null!==e&&p(e)}m.set(s,l),g.set(s,d)}}));let y,x=e=>e;class v extends(a(d)){constructor(){super(),this.ns="",this.__pageFetchEventHandler=e=>this.__handlePageFetchEvent(e),this.item="foxy-null"}static get properties(){return r(r({},super.properties),{},{item:{type:String},ns:{type:String}})}get item(){return this.__item}set item(e){this.__renderItem="string"==typeof e?new Function("ctx",`return ctx.html\`\n <${e}\n disabledcontrols=\${ctx.disabledControls.toString()}\n readonlycontrols=\${ctx.readonlyControls.toString()}\n hiddencontrols=\${ctx.hiddenControls.toString()}\n data-testclass="items"\n parent=\${ctx.parent}\n group=\${ctx.group}\n href=\${ctx.href}\n lang=\${ctx.lang}\n ns="\${ctx.ns} \${customElements.get('${e}')?.defaultNS ?? ''}"\n ?disabled=\${ctx.disabled}\n ?readonly=\${ctx.readonly}\n ?hidden=\${ctx.hidden}\n .templates=\${ctx.templates}\n >\n </${e}>\``):e,this.__item=e,this.requestUpdate()}createRenderRoot(){return this}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__pageFetchEventHandler)}render(){const e=this.__items.map((e=>({key:e._links.self.href,href:e._links.self.href,data:e})));return this.in("busy")?e.push({key:"stalled",href:"foxy://collection-page/stall",data:null}):this.in("fail")?e.push({key:"failed",href:"foxy://collection-page/fail",data:null}):(this.in({idle:"template"})||0===this.__items.length)&&e.push({key:"empty",href:"",data:null}),i(y||(y=x`${0}`),_(e,(e=>e.key),(e=>{var t;return null===(t=this.__renderItem)||void 0===t?void 0:t.call(this,{disabledControls:this.disabledControls,readonlyControls:this.readonlyControls,hiddenControls:this.hiddenControls,templates:this.templates,disabled:this.disabled,readonly:this.readonly,hidden:this.hidden,parent:this.href,group:this.group,lang:this.lang,data:e.data,href:e.href,ns:this.ns,html:i})})))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__pageFetchEventHandler)}get __items(){var e,t;return Array.from(Object.values(null!==(t=null===(e=this.form)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{})).reduce(((e,t)=>[...e,...t]),[])}__handlePageFetchEvent(e){if(!(e instanceof l)||e.target===this)return;const{method:t,url:s}=e.request;return"GET"===t?"foxy://collection-page/stall"===s?this.__stallRequest(e):"foxy://collection-page/fail"===s?this.__failRequest(e):void 0:void 0}__stallRequest(e){e.stopImmediatePropagation(),e.respondWith(new Promise((()=>{})))}__failRequest(e){e.stopImmediatePropagation(),e.respondWith(Promise.resolve(new Response(null,{status:500})))}}customElements.define("foxy-collection-page",v);export{v as C,_ as r};