@foxy.io/elements 1.16.0-beta.5 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-api.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +15 -15
- package/dist/cdn/foxy-customer.js +6 -6
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-form-dialog.js +1 -1
- package/dist/cdn/foxy-generate-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +4 -4
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/{shared-f3b35364.js → shared-07134f93.js} +1 -1
- package/dist/cdn/{shared-7819b0b0.js → shared-073cb8e9.js} +1 -1
- package/dist/cdn/{shared-368a2f85.js → shared-0f38a631.js} +1 -1
- package/dist/cdn/{shared-25e9c276.js → shared-1a67bc75.js} +4 -4
- package/dist/cdn/shared-1a91d467.js +1 -0
- package/dist/cdn/shared-1de261b3.js +1 -0
- package/dist/cdn/shared-21419f10.js +1 -0
- package/dist/cdn/{shared-99065f2a.js → shared-218ba06e.js} +1 -1
- package/dist/cdn/{shared-3ffd77da.js → shared-30dd6de7.js} +19 -14
- package/dist/cdn/shared-39e3ae67.js +1 -0
- package/dist/cdn/{shared-2bb49907.js → shared-448781f9.js} +1 -1
- package/dist/cdn/{shared-35de1004.js → shared-46ee137f.js} +10 -10
- package/dist/cdn/shared-4f1f4281.js +1 -0
- package/dist/cdn/{shared-b8f492a4.js → shared-4f424828.js} +2 -2
- package/dist/cdn/shared-50765afb.js +1 -0
- package/dist/cdn/{shared-e59c65e3.js → shared-548f721a.js} +1 -1
- package/dist/cdn/shared-5535f38f.js +15 -0
- package/dist/cdn/shared-55481c27.js +1 -0
- package/dist/cdn/{shared-f0ba30e8.js → shared-59e44f29.js} +1 -1
- package/dist/cdn/{shared-757bb517.js → shared-5a54a9bc.js} +1 -1
- package/dist/cdn/{shared-bc94606b.js → shared-60126eee.js} +1 -1
- package/dist/cdn/shared-63eaded9.js +159 -0
- package/dist/cdn/{shared-5097c880.js → shared-65dfd512.js} +11 -2
- package/dist/cdn/{shared-d3bf9ac0.js → shared-6d45a07b.js} +2 -2
- package/dist/cdn/{shared-38f8a319.js → shared-6f412a43.js} +7 -7
- package/dist/cdn/{shared-f3655f42.js → shared-756034e4.js} +1 -1
- package/dist/cdn/shared-7f0a9790.js +1 -0
- package/dist/cdn/shared-81cd9eac.js +1 -0
- package/dist/cdn/shared-87aa97d2.js +1 -0
- package/dist/cdn/shared-8b20bc23.js +12 -0
- package/dist/cdn/{shared-22103348.js → shared-8f2c9582.js} +1 -1
- package/dist/cdn/{shared-0479553e.js → shared-9221e6b2.js} +1 -1
- package/dist/cdn/{shared-60e98fbf.js → shared-a040d79d.js} +1 -1
- package/dist/cdn/shared-a62e1a93.js +1 -0
- package/dist/cdn/shared-ad16479c.js +1 -0
- package/dist/cdn/{shared-11c2efc8.js → shared-b0f0e8b5.js} +1 -1
- package/dist/cdn/shared-b58b8353.js +1 -0
- package/dist/cdn/{shared-d519a301.js → shared-b710881a.js} +2 -2
- package/dist/cdn/shared-c64bc1a0.js +1 -0
- package/dist/cdn/shared-ce2ac6b4.js +1 -0
- package/dist/cdn/shared-db4f299b.js +1 -0
- package/dist/cdn/shared-df730f90.js +1 -0
- package/dist/cdn/{shared-7f3ca8e7.js → shared-ea9f7255.js} +5 -5
- package/dist/cdn/{shared-9d7aaf7a.js → shared-f4ad24f4.js} +1 -1
- package/dist/cdn/shared-f6e51811.js +1 -0
- package/dist/cdn/{shared-bbfdfee2.js → shared-f7fbb249.js} +10 -10
- package/dist/cdn/{shared-f3f9f752.js → shared-fab8c705.js} +10 -10
- package/dist/cdn/shared-ff79f3f9.js +230 -0
- package/dist/cdn/translations/coupon-form/en.json +2 -21
- package/dist/cdn/translations/customer-portal/se.json +223 -0
- package/dist/cdn/translations/gift-card-form/en.json +0 -21
- package/dist/elements/private/Dialog/Dialog.d.ts +2 -4
- package/dist/elements/private/Dialog/Dialog.js +1 -3
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/private/EditableList/EditableList.d.ts +2 -4
- package/dist/elements/private/EditableList/EditableList.js +1 -3
- package/dist/elements/private/EditableList/EditableList.js.map +1 -1
- package/dist/elements/private/FrequencyInput/FrequencyInput.d.ts +1 -3
- package/dist/elements/private/FrequencyInput/FrequencyInput.js +1 -2
- package/dist/elements/private/FrequencyInput/FrequencyInput.js.map +1 -1
- package/dist/elements/public/CollectionPage/CollectionPage.d.ts +3 -4
- package/dist/elements/public/CollectionPage/CollectionPage.js +3 -5
- package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
- package/dist/elements/public/CollectionPage/types.d.ts +0 -1
- package/dist/elements/public/CollectionPage/types.js.map +1 -1
- package/dist/elements/public/CollectionPages/CollectionPages.d.ts +2 -4
- package/dist/elements/public/CollectionPages/CollectionPages.js +1 -3
- package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.js +35 -36
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CouponForm/index.d.ts +0 -1
- package/dist/elements/public/CouponForm/index.js +0 -1
- package/dist/elements/public/CouponForm/index.js.map +1 -1
- package/dist/elements/public/CustomerApi/CustomerApi.d.ts +1 -3
- package/dist/elements/public/CustomerApi/CustomerApi.js +1 -2
- package/dist/elements/public/CustomerApi/CustomerApi.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.d.ts +1 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js +1 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalChangePassword.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js +3 -12
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedInView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.d.ts +1 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js +1 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalLoggedOutView.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.d.ts +1 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js +1 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalSubscriptions.js.map +1 -1
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.d.ts +1 -3
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.js +1 -2
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalTransactions.js.map +1 -1
- package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js +1 -2
- package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js.map +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +15 -28
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/index.d.ts +0 -1
- package/dist/elements/public/GiftCardForm/index.js +0 -1
- package/dist/elements/public/GiftCardForm/index.js.map +1 -1
- package/dist/elements/public/I18n/I18n.d.ts +1 -3
- package/dist/elements/public/I18n/I18n.js +1 -2
- package/dist/elements/public/I18n/I18n.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +1 -7
- package/dist/elements/public/NucleonElement/NucleonElement.js +1 -13
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/Pagination/Pagination.d.ts +1 -3
- package/dist/elements/public/Pagination/Pagination.js +2 -3
- package/dist/elements/public/Pagination/Pagination.js.map +1 -1
- package/dist/elements/public/PaymentCard/PaymentCard.js +1 -1
- package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
- package/dist/elements/public/QueryBuilder/QueryBuilder.d.ts +1 -3
- package/dist/elements/public/QueryBuilder/QueryBuilder.js +1 -2
- package/dist/elements/public/QueryBuilder/QueryBuilder.js.map +1 -1
- package/dist/elements/public/Spinner/Spinner.d.ts +2 -4
- package/dist/elements/public/Spinner/Spinner.js +1 -3
- package/dist/elements/public/Spinner/Spinner.js.map +1 -1
- package/dist/elements/public/index.d.ts +0 -13
- package/dist/elements/public/index.defined.d.ts +0 -13
- package/dist/elements/public/index.defined.js +0 -13
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +0 -13
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/configurable.d.ts +3 -5
- package/dist/mixins/configurable.js +4 -39
- package/dist/mixins/configurable.js.map +1 -1
- package/dist/mixins/themeable.js +4 -6655
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/mixins/translatable.d.ts +1 -3
- package/dist/mixins/translatable.js +2 -14
- package/dist/mixins/translatable.js.map +1 -1
- package/package.json +3 -3
- package/dist/cdn/foxy-copy-to-clipboard.js +0 -1
- package/dist/cdn/foxy-coupon-detail-card.js +0 -1
- package/dist/cdn/foxy-discount-builder.js +0 -1
- package/dist/cdn/foxy-discount-detail-card.js +0 -1
- package/dist/cdn/foxy-item-card.js +0 -1
- package/dist/cdn/foxy-item-form.js +0 -1
- package/dist/cdn/foxy-item-option-card.js +0 -1
- package/dist/cdn/foxy-item-option-form.js +0 -1
- package/dist/cdn/foxy-report-form.js +0 -195
- package/dist/cdn/foxy-reports-table.js +0 -41
- package/dist/cdn/foxy-shipment-card.js +0 -17
- package/dist/cdn/foxy-swipe-actions.js +0 -1
- package/dist/cdn/foxy-transaction.js +0 -64
- package/dist/cdn/shared-007660a6.js +0 -12
- package/dist/cdn/shared-06014421.js +0 -1
- package/dist/cdn/shared-1b064836.js +0 -1
- package/dist/cdn/shared-1ddccf4d.js +0 -1
- package/dist/cdn/shared-2eee69db.js +0 -1
- package/dist/cdn/shared-3026cee0.js +0 -15
- package/dist/cdn/shared-34998df6.js +0 -1
- package/dist/cdn/shared-4e63d6e0.js +0 -1
- package/dist/cdn/shared-518902c8.js +0 -1
- package/dist/cdn/shared-5e75308a.js +0 -1
- package/dist/cdn/shared-64657919.js +0 -1
- package/dist/cdn/shared-7f33a83a.js +0 -159
- package/dist/cdn/shared-874bbae5.js +0 -1
- package/dist/cdn/shared-92d6f937.js +0 -1
- package/dist/cdn/shared-96df3c85.js +0 -1
- package/dist/cdn/shared-9a089d49.js +0 -1
- package/dist/cdn/shared-9d4835ed.js +0 -1
- package/dist/cdn/shared-a8e21a41.js +0 -1
- package/dist/cdn/shared-b4a4a92b.js +0 -1
- package/dist/cdn/shared-c3c424cd.js +0 -1
- package/dist/cdn/shared-c4f0a219.js +0 -1
- package/dist/cdn/shared-cad5fe82.js +0 -1
- package/dist/cdn/shared-ce2aab66.js +0 -1
- package/dist/cdn/shared-e090608c.js +0 -201
- package/dist/cdn/shared-e6f3e9f0.js +0 -6
- package/dist/cdn/shared-ea9af4b0.js +0 -29
- package/dist/cdn/shared-f7bddf72.js +0 -9
- package/dist/cdn/shared-fe8ec1f9.js +0 -1
- package/dist/cdn/translations/copy-to-clipboard/en.json +0 -6
- package/dist/cdn/translations/item-card/en.json +0 -9
- package/dist/cdn/translations/item-form/en.json +0 -387
- package/dist/cdn/translations/item-option-form/en.json +0 -43
- package/dist/cdn/translations/report-form/en.json +0 -38
- package/dist/cdn/translations/reports-table/en.json +0 -21
- package/dist/cdn/translations/shipment-card/en.json +0 -470
- package/dist/cdn/translations/transaction/en.json +0 -941
- package/dist/elements/index.d.ts +0 -1
- package/dist/elements/index.js +0 -2
- package/dist/elements/index.js.map +0 -1
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +0 -22
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +0 -79
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +0 -1
- package/dist/elements/internal/InternalAsyncComboBoxControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalAsyncComboBoxControl/index.js +0 -6
- package/dist/elements/internal/InternalAsyncComboBoxControl/index.js.map +0 -1
- package/dist/elements/internal/InternalCard/InternalCard.d.ts +0 -13
- package/dist/elements/internal/InternalCard/InternalCard.js +0 -43
- package/dist/elements/internal/InternalCard/InternalCard.js.map +0 -1
- package/dist/elements/internal/InternalCard/index.d.ts +0 -3
- package/dist/elements/internal/InternalCard/index.js +0 -5
- package/dist/elements/internal/InternalCard/index.js.map +0 -1
- package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.d.ts +0 -16
- package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.js +0 -63
- package/dist/elements/internal/InternalCollapsibleCard/InternalCollapsibleCard.js.map +0 -1
- package/dist/elements/internal/InternalCollapsibleCard/index.d.ts +0 -5
- package/dist/elements/internal/InternalCollapsibleCard/index.js +0 -7
- package/dist/elements/internal/InternalCollapsibleCard/index.js.map +0 -1
- package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.d.ts +0 -13
- package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js +0 -119
- package/dist/elements/internal/InternalCollectionCard/InternalCollectionCard.js.map +0 -1
- package/dist/elements/internal/InternalCollectionCard/index.d.ts +0 -7
- package/dist/elements/internal/InternalCollectionCard/index.js +0 -9
- package/dist/elements/internal/InternalCollectionCard/index.js.map +0 -1
- package/dist/elements/internal/InternalControl/InternalControl.d.ts +0 -21
- package/dist/elements/internal/InternalControl/InternalControl.js +0 -53
- package/dist/elements/internal/InternalControl/InternalControl.js.map +0 -1
- package/dist/elements/internal/InternalControl/index.d.ts +0 -2
- package/dist/elements/internal/InternalControl/index.js +0 -4
- package/dist/elements/internal/InternalControl/index.js.map +0 -1
- package/dist/elements/internal/InternalDateControl/InternalDateControl.d.ts +0 -14
- package/dist/elements/internal/InternalDateControl/InternalDateControl.js +0 -60
- package/dist/elements/internal/InternalDateControl/InternalDateControl.js.map +0 -1
- package/dist/elements/internal/InternalDateControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalDateControl/index.js +0 -6
- package/dist/elements/internal/InternalDateControl/index.js.map +0 -1
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.d.ts +0 -25
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js +0 -78
- package/dist/elements/internal/InternalEditableControl/InternalEditableControl.js.map +0 -1
- package/dist/elements/internal/InternalEditableControl/index.d.ts +0 -3
- package/dist/elements/internal/InternalEditableControl/index.js +0 -5
- package/dist/elements/internal/InternalEditableControl/index.js.map +0 -1
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +0 -13
- package/dist/elements/internal/InternalForm/InternalForm.js +0 -49
- package/dist/elements/internal/InternalForm/InternalForm.js.map +0 -1
- package/dist/elements/internal/InternalForm/index.d.ts +0 -6
- package/dist/elements/internal/InternalForm/index.js +0 -8
- package/dist/elements/internal/InternalForm/index.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/InternalCreateControl.d.ts +0 -13
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/InternalCreateControl.js +0 -47
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/InternalCreateControl.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/index.js +0 -6
- package/dist/elements/internal/InternalForm/internal/InternalCreateControl/index.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/InternalDeleteControl.d.ts +0 -6
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/InternalDeleteControl.js +0 -39
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/InternalDeleteControl.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/index.d.ts +0 -5
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/index.js +0 -7
- package/dist/elements/internal/InternalForm/internal/InternalDeleteControl/index.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/InternalTimestampsControl.d.ts +0 -8
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/InternalTimestampsControl.js +0 -56
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/InternalTimestampsControl.js.map +0 -1
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/index.d.ts +0 -2
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/index.js +0 -4
- package/dist/elements/internal/InternalForm/internal/InternalTimestampsControl/index.js.map +0 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +0 -9
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +0 -115
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +0 -1
- package/dist/elements/internal/InternalFrequencyControl/index.d.ts +0 -7
- package/dist/elements/internal/InternalFrequencyControl/index.js +0 -9
- package/dist/elements/internal/InternalFrequencyControl/index.js.map +0 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +0 -13
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +0 -41
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +0 -1
- package/dist/elements/internal/InternalIntegerControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalIntegerControl/index.js +0 -6
- package/dist/elements/internal/InternalIntegerControl/index.js.map +0 -1
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.d.ts +0 -13
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js +0 -41
- package/dist/elements/internal/InternalNumberControl/InternalNumberControl.js.map +0 -1
- package/dist/elements/internal/InternalNumberControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalNumberControl/index.js +0 -6
- package/dist/elements/internal/InternalNumberControl/index.js.map +0 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +0 -13
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +0 -40
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +0 -1
- package/dist/elements/internal/InternalTextControl/index.d.ts +0 -4
- package/dist/elements/internal/InternalTextControl/index.js +0 -6
- package/dist/elements/internal/InternalTextControl/index.js.map +0 -1
- package/dist/elements/public/CopyToClipboard/CopyToClipboard.d.ts +0 -14
- package/dist/elements/public/CopyToClipboard/CopyToClipboard.js +0 -112
- package/dist/elements/public/CopyToClipboard/CopyToClipboard.js.map +0 -1
- package/dist/elements/public/CopyToClipboard/index.d.ts +0 -4
- package/dist/elements/public/CopyToClipboard/index.js +0 -6
- package/dist/elements/public/CopyToClipboard/index.js.map +0 -1
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +0 -25
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +0 -58
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +0 -1
- package/dist/elements/public/CouponDetailCard/index.d.ts +0 -5
- package/dist/elements/public/CouponDetailCard/index.js +0 -7
- package/dist/elements/public/CouponDetailCard/index.js.map +0 -1
- package/dist/elements/public/CouponDetailCard/types.d.ts +0 -3
- package/dist/elements/public/CouponDetailCard/types.js +0 -2
- package/dist/elements/public/CouponDetailCard/types.js.map +0 -1
- package/dist/elements/public/DiscountBuilder/DiscountBuilder.d.ts +0 -28
- package/dist/elements/public/DiscountBuilder/DiscountBuilder.js +0 -339
- package/dist/elements/public/DiscountBuilder/DiscountBuilder.js.map +0 -1
- package/dist/elements/public/DiscountBuilder/index.d.ts +0 -2
- package/dist/elements/public/DiscountBuilder/index.js +0 -4
- package/dist/elements/public/DiscountBuilder/index.js.map +0 -1
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +0 -25
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +0 -58
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +0 -1
- package/dist/elements/public/DiscountDetailCard/index.d.ts +0 -5
- package/dist/elements/public/DiscountDetailCard/index.js +0 -7
- package/dist/elements/public/DiscountDetailCard/index.js.map +0 -1
- package/dist/elements/public/DiscountDetailCard/types.d.ts +0 -3
- package/dist/elements/public/DiscountDetailCard/types.js +0 -2
- package/dist/elements/public/DiscountDetailCard/types.js.map +0 -1
- package/dist/elements/public/ItemCard/ItemCard.d.ts +0 -16
- package/dist/elements/public/ItemCard/ItemCard.js +0 -139
- package/dist/elements/public/ItemCard/ItemCard.js.map +0 -1
- package/dist/elements/public/ItemCard/index.d.ts +0 -4
- package/dist/elements/public/ItemCard/index.js +0 -6
- package/dist/elements/public/ItemCard/index.js.map +0 -1
- package/dist/elements/public/ItemCard/types.d.ts +0 -5
- package/dist/elements/public/ItemCard/types.js +0 -2
- package/dist/elements/public/ItemCard/types.js.map +0 -1
- package/dist/elements/public/ItemForm/ItemForm.d.ts +0 -19
- package/dist/elements/public/ItemForm/ItemForm.js +0 -96
- package/dist/elements/public/ItemForm/ItemForm.js.map +0 -1
- package/dist/elements/public/ItemForm/index.d.ts +0 -19
- package/dist/elements/public/ItemForm/index.js +0 -21
- package/dist/elements/public/ItemForm/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +0 -23
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +0 -8
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +0 -31
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +0 -7
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +0 -48
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +0 -7
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +0 -9
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +0 -32
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +0 -7
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +0 -75
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +0 -8
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +0 -10
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/types.d.ts +0 -3
- package/dist/elements/public/ItemForm/types.js +0 -2
- package/dist/elements/public/ItemForm/types.js.map +0 -1
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +0 -25
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +0 -56
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +0 -1
- package/dist/elements/public/ItemOptionCard/index.d.ts +0 -6
- package/dist/elements/public/ItemOptionCard/index.js +0 -8
- package/dist/elements/public/ItemOptionCard/index.js.map +0 -1
- package/dist/elements/public/ItemOptionCard/types.d.ts +0 -11
- package/dist/elements/public/ItemOptionCard/types.js +0 -2
- package/dist/elements/public/ItemOptionCard/types.js.map +0 -1
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.d.ts +0 -12
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.js +0 -23
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.js.map +0 -1
- package/dist/elements/public/ItemOptionForm/index.d.ts +0 -5
- package/dist/elements/public/ItemOptionForm/index.js +0 -7
- package/dist/elements/public/ItemOptionForm/index.js.map +0 -1
- package/dist/elements/public/ItemOptionForm/types.d.ts +0 -3
- package/dist/elements/public/ItemOptionForm/types.js +0 -2
- package/dist/elements/public/ItemOptionForm/types.js.map +0 -1
- package/dist/elements/public/ReportForm/ReportForm.d.ts +0 -48
- package/dist/elements/public/ReportForm/ReportForm.js +0 -391
- package/dist/elements/public/ReportForm/ReportForm.js.map +0 -1
- package/dist/elements/public/ReportForm/index.d.ts +0 -11
- package/dist/elements/public/ReportForm/index.js +0 -13
- package/dist/elements/public/ReportForm/index.js.map +0 -1
- package/dist/elements/public/ReportForm/types.d.ts +0 -17
- package/dist/elements/public/ReportForm/types.js +0 -2
- package/dist/elements/public/ReportForm/types.js.map +0 -1
- package/dist/elements/public/ReportForm/utils.d.ts +0 -16
- package/dist/elements/public/ReportForm/utils.js +0 -73
- package/dist/elements/public/ReportForm/utils.js.map +0 -1
- package/dist/elements/public/ReportsTable/ReportsTable.d.ts +0 -21
- package/dist/elements/public/ReportsTable/ReportsTable.js +0 -101
- package/dist/elements/public/ReportsTable/ReportsTable.js.map +0 -1
- package/dist/elements/public/ReportsTable/index.d.ts +0 -4
- package/dist/elements/public/ReportsTable/index.js +0 -6
- package/dist/elements/public/ReportsTable/index.js.map +0 -1
- package/dist/elements/public/ReportsTable/types.d.ts +0 -3
- package/dist/elements/public/ReportsTable/types.js +0 -2
- package/dist/elements/public/ReportsTable/types.js.map +0 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +0 -22
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +0 -114
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +0 -1
- package/dist/elements/public/ShipmentCard/index.d.ts +0 -7
- package/dist/elements/public/ShipmentCard/index.js +0 -9
- package/dist/elements/public/ShipmentCard/index.js.map +0 -1
- package/dist/elements/public/ShipmentCard/types.d.ts +0 -18
- package/dist/elements/public/ShipmentCard/types.js +0 -2
- package/dist/elements/public/ShipmentCard/types.js.map +0 -1
- package/dist/elements/public/SwipeActions/SwipeActions.d.ts +0 -13
- package/dist/elements/public/SwipeActions/SwipeActions.js +0 -116
- package/dist/elements/public/SwipeActions/SwipeActions.js.map +0 -1
- package/dist/elements/public/SwipeActions/index.d.ts +0 -2
- package/dist/elements/public/SwipeActions/index.js +0 -4
- package/dist/elements/public/SwipeActions/index.js.map +0 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +0 -13
- package/dist/elements/public/Transaction/Transaction.js +0 -101
- package/dist/elements/public/Transaction/Transaction.js.map +0 -1
- package/dist/elements/public/Transaction/index.d.ts +0 -19
- package/dist/elements/public/Transaction/index.js +0 -21
- package/dist/elements/public/Transaction/index.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +0 -9
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +0 -69
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +0 -4
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +0 -6
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.d.ts +0 -5
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js +0 -36
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.d.ts +0 -7
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js +0 -9
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.d.ts +0 -11
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +0 -50
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.d.ts +0 -5
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js +0 -7
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/index.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.d.ts +0 -8
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +0 -77
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +0 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.d.ts +0 -4
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js +0 -6
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js.map +0 -1
- package/dist/elements/public/Transaction/types.d.ts +0 -3
- package/dist/elements/public/Transaction/types.js +0 -2
- package/dist/elements/public/Transaction/types.js.map +0 -1
- package/dist/mixins/inferrable.d.ts +0 -15
- package/dist/mixins/inferrable.js +0 -66
- package/dist/mixins/inferrable.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e,_ as t}from"./shared-2eee69db.js";import{h as n,L as r}from"./shared-7f33a83a.js";import{i as s,a}from"./shared-ea9af4b0.js";import{F as i}from"./shared-64657919.js";import{A as o}from"./shared-3026cee0.js";const c={type:"backend",init:()=>{},read:(e,t,n)=>{const r=async e=>{const t=e.ok?null:new Error(await e.text()),r=!!e.ok&&await e.json();n(t,r)},s=e=>{const t=e instanceof Error?e:new Error(String(e));n(t,!1)},a=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new o.WHATWGRequest(`foxy://i18n/${t}/${e}`),resolve:r,reject:s});dispatchEvent(a),a.defaultPrevented||fetch(a.request).then(r).catch(s)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function l(e,t=!1){var n;const r=e.replace(/(y|m|w|d)/,""),s=e.replace(/\.?\d+/,"");return{count:".5"===r?.5:parseInt(r),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[s])&&void 0!==n?n:s}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,c=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({adjustment:i,from:c,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=l(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,t,n)=>{let r=null;try{"number"==typeof e&&(r=e.toLocaleString(n,{style:"percent"}))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return r||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",style:"currency",currency:a})}catch(t){return e}},date:(e,t,n)=>{if(!e)return"$t(unknown)";const r=new Date(e),s=(new Date).getFullYear()===r.getFullYear()?void 0:"numeric";return r.toLocaleDateString(n,{month:"long",year:s,day:"numeric"})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(e(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(c),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,l as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-60e98fbf.js";import"./shared-757bb517.js";import"./shared-92d6f937.js";import"./foxy-spinner.js";import"./shared-4e63d6e0.js";import{C as e}from"./shared-b4a4a92b.js";import"./shared-38f8a319.js";import"./shared-1ddccf4d.js";import"./shared-bbfdfee2.js";import{s,h as t}from"./shared-7f33a83a.js";import{S as i,T as r,a}from"./shared-ea9af4b0.js";import"./shared-5097c880.js";import"./shared-f7bddf72.js";import"./shared-f3f9f752.js";import{m as n}from"./shared-3026cee0.js";import{G as l}from"./shared-5e75308a.js";import"./shared-007660a6.js";import"./shared-35de1004.js";import"./shared-7819b0b0.js";import{c as o}from"./shared-4e709717.js";import{C as d}from"./shared-06014421.js";import{N as h}from"./shared-1b064836.js";import{i as m}from"./shared-d3bf9ac0.js";import{v as c}from"./shared-b738ee96.js";let f,C,p,g,u=e=>e;const v=[{property:"is_merchant",icon:s(f||(f=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:s(C||(C=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:s(p||(p=u`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:s(g||(g=u`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let y,x,_,b=e=>e;const $=i(r(d(a(h,"user-form"))));class w extends ${constructor(){super(...arguments),this.__getValidator=n((e=>()=>!this.errors.some((s=>s.startsWith(e))))),this.__bindField=n((e=>s=>{const t=s.target;this.edit({[e]:t.value})}))}static get scopedElements(){return{"foxy-internal-confirm-dialog":customElements.get("foxy-internal-confirm-dialog"),"vaadin-text-field":customElements.get("vaadin-text-field"),"vaadin-button":customElements.get("vaadin-button"),"foxy-spinner":customElements.get("foxy-spinner"),"x-checkbox":e,"foxy-i18n":customElements.get("foxy-i18n"),"x-group":l}}static get v8n(){return[({first_name:e})=>!e||e.length<=50||"first_name_too_long",({last_name:e})=>!e||e.length<=50||"last_name_too_long",({email:e})=>e&&e.length>0||"email_required",({email:e})=>e&&e.length<=100||"email_too_long",({email:e})=>e&&c(e)||"email_invalid_email",({phone:e})=>!e||e.length<=50||"phone_too_long"]}render(){var e,s;const i=this.in({idle:{template:{dirty:"valid"}}}),r=this.in({idle:{snapshot:{dirty:"valid"}}}),a=i||r,n=this.in("busy"),l=this.in("fail"),d=n||l||this.disabled;return t(y||(y=b` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="space-y-l relative"> <div class="grid grid-cols-1 sm-grid-cols-2 gap-m"> ${0} </div> <x-group frame> ${0} </x-group> <vaadin-button data-testid="action" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> </vaadin-button> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="vertical" class="m-auto p-m bg-base shadow-xs rounded-t-l rounded-b-l" state="${0}" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> </div> `),this.lang,this.ns,this.__handleConfirmHide,this.in("busy"),["first_name","last_name","email","phone"].map((e=>t(x||(x=b` <vaadin-text-field error-message="${0}" data-testid="${0}" ?disabled="${0}" ?readonly="${0}" class="w-full" label="${0}" value="${0}" .checkValidity="${0}" @input="${0}" @keydown="${0}"> </vaadin-text-field> `),this.__getErrorMessage(e),e,d,this.readonly,this.t(e),m(this.form[e]),this.__getValidator(e),this.__bindField(e),this.__handleKeyDown))),v.map(((e,s)=>t(_||(_=b` <hr class="${0}" style="margin-left:calc((var(--lumo-space-m) * 2) + 1.125rem)"> <x-checkbox class="w-full p-m" ?readonly="${0}" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="flex items-start leading-s"> <div class="flex-1 flex flex-col"> <foxy-i18n key="${0}" lang="${0}" ns="${0}"></foxy-i18n> <foxy-i18n class="text-s text-secondary" lang="${0}" key="${0}_explainer" ns="${0}"> </foxy-i18n> </div> <div class="mt-xs" style="width:1.125rem;height:1.125rem">${0}</div> </div> </x-checkbox> `),s>0?"border-contrast-10":"hidden",this.readonly,d,this.form[e.property],(s=>{const t=s.target;this.edit({[e.property]:t.checked})}),e.key,this.lang,this.ns,this.lang,e.key,this.ns,e.icon))),this.in("idle")?"primary "+(this.href?"error":"success"):"",this.in({idle:"template"})&&!a||d,this.__handleActionClick,this.lang,this.href?"delete":"create",this.ns,o({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!n&&!l}),l?"error":n?"busy":"empty",this.lang,this.ns,null!==(s=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==s?s:"")}__getErrorMessage(e){const s=this.errors.find((s=>s.startsWith(e)));return s?this.t(s.replace(e,"v8n")):""}__handleActionClick(e){if(this.in({idle:"snapshot"})){this.renderRoot.querySelector("#confirm").show(e.currentTarget)}else this.submit()}__handleConfirmHide(e){e.detail.cancelled||this.delete()}__handleKeyDown(e){"Enter"===e.key&&this.submit()}}customElements.define("foxy-user-form",w);export{w as U,v as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-2eee69db.js";import{L as s,h as t}from"./shared-7f33a83a.js";import{w as r}from"./shared-ea9af4b0.js";let a,o=e=>e;class d extends s{constructor(){super(...arguments),this.frame=!1}static get properties(){return e(e({},super.properties),{},{frame:{type:Boolean}})}static get styles(){return r.styles}render(){return t(a||(a=o` <section class="space-y-s font-lumo antialiased"> <h3 class="${0}"> <slot name="header"></slot> </h3> <div class="rounded-t-l rounded-b-l ${0}"> <slot></slot> </div> </section> `),"text-s font-medium text-secondary leading-none "+(this.frame?"":"pl-m"),this.frame?"border border-contrast-10 overflow-hidden":"")}}export{d as G};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
class e extends Event{constructor(e,t){super(e,t),this.request=t.request,this.__reject=t.reject,this.__resolve=t.resolve}respondWith(e){this.preventDefault(),this.stopImmediatePropagation(),e.then(this.__resolve).catch(this.__reject)}}export{e as F};
|
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
4
|
-
* This code may only be used under the BSD style license found at
|
|
5
|
-
* http://polymer.github.io/LICENSE.txt
|
|
6
|
-
* The complete set of authors may be found at
|
|
7
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
8
|
-
* The complete set of contributors may be found at
|
|
9
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
10
|
-
* Code distributed by Google as part of the polymer project is also
|
|
11
|
-
* subject to an additional IP rights grant found at
|
|
12
|
-
* http://polymer.github.io/PATENTS.txt
|
|
13
|
-
*/
|
|
14
|
-
const t="undefined"!=typeof window&&null!=window.customElements&&void 0!==window.customElements.polyfillWrapFlushCallback,e=(t,e,s=null,i=null)=>{for(;e!==s;){const s=e.nextSibling;t.insertBefore(e,i),e=s}},s=(t,e,s=null)=>{for(;e!==s;){const s=e.nextSibling;t.removeChild(e),e=s}},i=`{{lit-${String(Math.random()).slice(2)}}}`,n=`\x3c!--${i}--\x3e`,r=new RegExp(`${i}|${n}`);class o{constructor(t,e){this.parts=[],this.element=e;const s=[],n=[],o=document.createTreeWalker(e.content,133,null,!1);let l=0,c=-1,p=0;const{strings:u,values:{length:m}}=t;for(;p<m;){const t=o.nextNode();if(null!==t){if(c++,1===t.nodeType){if(t.hasAttributes()){const e=t.attributes,{length:s}=e;let i=0;for(let t=0;t<s;t++)a(e[t].name,"$lit$")&&i++;for(;i-- >0;){const e=u[p],s=d.exec(e)[2],i=s.toLowerCase()+"$lit$",n=t.getAttribute(i);t.removeAttribute(i);const o=n.split(r);this.parts.push({type:"attribute",index:c,name:s,strings:o}),p+=o.length-1}}"TEMPLATE"===t.tagName&&(n.push(t),o.currentNode=t.content)}else if(3===t.nodeType){const e=t.data;if(e.indexOf(i)>=0){const i=t.parentNode,n=e.split(r),o=n.length-1;for(let e=0;e<o;e++){let s,r=n[e];if(""===r)s=h();else{const t=d.exec(r);null!==t&&a(t[2],"$lit$")&&(r=r.slice(0,t.index)+t[1]+t[2].slice(0,-"$lit$".length)+t[3]),s=document.createTextNode(r)}i.insertBefore(s,t),this.parts.push({type:"node",index:++c})}""===n[o]?(i.insertBefore(h(),t),s.push(t)):t.data=n[o],p+=o}}else if(8===t.nodeType)if(t.data===i){const e=t.parentNode;null!==t.previousSibling&&c!==l||(c++,e.insertBefore(h(),t)),l=c,this.parts.push({type:"node",index:c}),null===t.nextSibling?t.data="":(s.push(t),c--),p++}else{let e=-1;for(;-1!==(e=t.data.indexOf(i,e+1));)this.parts.push({type:"node",index:-1}),p++}}else o.currentNode=n.pop()}for(const t of s)t.parentNode.removeChild(t)}}const a=(t,e)=>{const s=t.length-e.length;return s>=0&&t.slice(s)===e},l=t=>-1!==t.index,h=()=>document.createComment(""),d=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function c(t,e){const{element:{content:s},parts:i}=t,n=document.createTreeWalker(s,133,null,!1);let r=u(i),o=i[r],a=-1,l=0;const h=[];let d=null;for(;n.nextNode();){a++;const t=n.currentNode;for(t.previousSibling===d&&(d=null),e.has(t)&&(h.push(t),null===d&&(d=t)),null!==d&&l++;void 0!==o&&o.index===a;)o.index=null!==d?-1:o.index-l,r=u(i,r),o=i[r]}h.forEach((t=>t.parentNode.removeChild(t)))}const p=t=>{let e=11===t.nodeType?0:1;const s=document.createTreeWalker(t,133,null,!1);for(;s.nextNode();)e++;return e},u=(t,e=-1)=>{for(let s=e+1;s<t.length;s++){const e=t[s];if(l(e))return s}return-1};
|
|
15
|
-
/**
|
|
16
|
-
* @license
|
|
17
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
18
|
-
* This code may only be used under the BSD style license found at
|
|
19
|
-
* http://polymer.github.io/LICENSE.txt
|
|
20
|
-
* The complete set of authors may be found at
|
|
21
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
22
|
-
* The complete set of contributors may be found at
|
|
23
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
24
|
-
* Code distributed by Google as part of the polymer project is also
|
|
25
|
-
* subject to an additional IP rights grant found at
|
|
26
|
-
* http://polymer.github.io/PATENTS.txt
|
|
27
|
-
*/
|
|
28
|
-
const m=new WeakMap,_=t=>(...e)=>{const s=t(...e);return m.set(s,!0),s},f=t=>"function"==typeof t&&m.has(t),y={},g={};
|
|
29
|
-
/**
|
|
30
|
-
* @license
|
|
31
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
32
|
-
* This code may only be used under the BSD style license found at
|
|
33
|
-
* http://polymer.github.io/LICENSE.txt
|
|
34
|
-
* The complete set of authors may be found at
|
|
35
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
36
|
-
* The complete set of contributors may be found at
|
|
37
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
38
|
-
* Code distributed by Google as part of the polymer project is also
|
|
39
|
-
* subject to an additional IP rights grant found at
|
|
40
|
-
* http://polymer.github.io/PATENTS.txt
|
|
41
|
-
*/
|
|
42
|
-
class S{constructor(t,e,s){this.__parts=[],this.template=t,this.processor=e,this.options=s}update(t){let e=0;for(const s of this.__parts)void 0!==s&&s.setValue(t[e]),e++;for(const t of this.__parts)void 0!==t&&t.commit()}_clone(){const e=t?this.template.element.content.cloneNode(!0):document.importNode(this.template.element.content,!0),s=[],i=this.template.parts,n=document.createTreeWalker(e,133,null,!1);let r,o=0,a=0,h=n.nextNode();for(;o<i.length;)if(r=i[o],l(r)){for(;a<r.index;)a++,"TEMPLATE"===h.nodeName&&(s.push(h),n.currentNode=h.content),null===(h=n.nextNode())&&(n.currentNode=s.pop(),h=n.nextNode());if("node"===r.type){const t=this.processor.handleTextExpression(this.options);t.insertAfterNode(h.previousSibling),this.__parts.push(t)}else this.__parts.push(...this.processor.handleAttributeExpressions(h,r.name,r.strings,this.options));o++}else this.__parts.push(void 0),o++;return t&&(document.adoptNode(e),customElements.upgrade(e)),e}}
|
|
43
|
-
/**
|
|
44
|
-
* @license
|
|
45
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
46
|
-
* This code may only be used under the BSD style license found at
|
|
47
|
-
* http://polymer.github.io/LICENSE.txt
|
|
48
|
-
* The complete set of authors may be found at
|
|
49
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
50
|
-
* The complete set of contributors may be found at
|
|
51
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
52
|
-
* Code distributed by Google as part of the polymer project is also
|
|
53
|
-
* subject to an additional IP rights grant found at
|
|
54
|
-
* http://polymer.github.io/PATENTS.txt
|
|
55
|
-
*/const v=window.trustedTypes&&trustedTypes.createPolicy("lit-html",{createHTML:t=>t}),w=` ${i} `;class b{constructor(t,e,s,i){this.strings=t,this.values=e,this.type=s,this.processor=i}getHTML(){const t=this.strings.length-1;let e="",s=!1;for(let r=0;r<t;r++){const t=this.strings[r],o=t.lastIndexOf("\x3c!--");s=(o>-1||s)&&-1===t.indexOf("--\x3e",o+1);const a=d.exec(t);e+=null===a?t+(s?w:n):t.substr(0,a.index)+a[1]+a[2]+"$lit$"+a[3]+i}return e+=this.strings[t],e}getTemplateElement(){const t=document.createElement("template");let e=this.getHTML();return void 0!==v&&(e=v.createHTML(e)),t.innerHTML=e,t}}class x extends b{getHTML(){return`<svg>${super.getHTML()}</svg>`}getTemplateElement(){const t=super.getTemplateElement(),s=t.content,i=s.firstChild;return s.removeChild(i),e(s,i.firstChild),t}}
|
|
56
|
-
/**
|
|
57
|
-
* @license
|
|
58
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
59
|
-
* This code may only be used under the BSD style license found at
|
|
60
|
-
* http://polymer.github.io/LICENSE.txt
|
|
61
|
-
* The complete set of authors may be found at
|
|
62
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
63
|
-
* The complete set of contributors may be found at
|
|
64
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
65
|
-
* Code distributed by Google as part of the polymer project is also
|
|
66
|
-
* subject to an additional IP rights grant found at
|
|
67
|
-
* http://polymer.github.io/PATENTS.txt
|
|
68
|
-
*/const P=t=>null===t||!("object"==typeof t||"function"==typeof t),C=t=>Array.isArray(t)||!(!t||!t[Symbol.iterator]);class N{constructor(t,e,s){this.dirty=!0,this.element=t,this.name=e,this.strings=s,this.parts=[];for(let t=0;t<s.length-1;t++)this.parts[t]=this._createPart()}_createPart(){return new T(this)}_getValue(){const t=this.strings,e=t.length-1,s=this.parts;if(1===e&&""===t[0]&&""===t[1]){const t=s[0].value;if("symbol"==typeof t)return String(t);if("string"==typeof t||!C(t))return t}let i="";for(let n=0;n<e;n++){i+=t[n];const e=s[n];if(void 0!==e){const t=e.value;if(P(t)||!C(t))i+="string"==typeof t?t:String(t);else for(const e of t)i+="string"==typeof e?e:String(e)}}return i+=t[e],i}commit(){this.dirty&&(this.dirty=!1,this.element.setAttribute(this.name,this._getValue()))}}class T{constructor(t){this.value=void 0,this.committer=t}setValue(t){t===y||P(t)&&t===this.value||(this.value=t,f(t)||(this.committer.dirty=!0))}commit(){for(;f(this.value);){const t=this.value;this.value=y,t(this)}this.value!==y&&this.committer.commit()}}class A{constructor(t){this.value=void 0,this.__pendingValue=void 0,this.options=t}appendInto(t){this.startNode=t.appendChild(h()),this.endNode=t.appendChild(h())}insertAfterNode(t){this.startNode=t,this.endNode=t.nextSibling}appendIntoPart(t){t.__insert(this.startNode=h()),t.__insert(this.endNode=h())}insertAfterPart(t){t.__insert(this.startNode=h()),this.endNode=t.endNode,t.endNode=this.startNode}setValue(t){this.__pendingValue=t}commit(){if(null===this.startNode.parentNode)return;for(;f(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=y,t(this)}const t=this.__pendingValue;t!==y&&(P(t)?t!==this.value&&this.__commitText(t):t instanceof b?this.__commitTemplateResult(t):t instanceof Node?this.__commitNode(t):C(t)?this.__commitIterable(t):t===g?(this.value=g,this.clear()):this.__commitText(t))}__insert(t){this.endNode.parentNode.insertBefore(t,this.endNode)}__commitNode(t){this.value!==t&&(this.clear(),this.__insert(t),this.value=t)}__commitText(t){const e=this.startNode.nextSibling,s="string"==typeof(t=null==t?"":t)?t:String(t);e===this.endNode.previousSibling&&3===e.nodeType?e.data=s:this.__commitNode(document.createTextNode(s)),this.value=t}__commitTemplateResult(t){const e=this.options.templateFactory(t);if(this.value instanceof S&&this.value.template===e)this.value.update(t.values);else{const s=new S(e,t.processor,this.options),i=s._clone();s.update(t.values),this.__commitNode(i),this.value=s}}__commitIterable(t){Array.isArray(this.value)||(this.value=[],this.clear());const e=this.value;let s,i=0;for(const n of t)s=e[i],void 0===s&&(s=new A(this.options),e.push(s),0===i?s.appendIntoPart(this):s.insertAfterPart(e[i-1])),s.setValue(n),s.commit(),i++;i<e.length&&(e.length=i,this.clear(s&&s.endNode))}clear(t=this.startNode){s(this.startNode.parentNode,t.nextSibling,this.endNode)}}class E{constructor(t,e,s){if(this.value=void 0,this.__pendingValue=void 0,2!==s.length||""!==s[0]||""!==s[1])throw new Error("Boolean attributes can only contain a single expression");this.element=t,this.name=e,this.strings=s}setValue(t){this.__pendingValue=t}commit(){for(;f(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=y,t(this)}if(this.__pendingValue===y)return;const t=!!this.__pendingValue;this.value!==t&&(t?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name),this.value=t),this.__pendingValue=y}}class V extends N{constructor(t,e,s){super(t,e,s),this.single=2===s.length&&""===s[0]&&""===s[1]}_createPart(){return new U(this)}_getValue(){return this.single?this.parts[0].value:super._getValue()}commit(){this.dirty&&(this.dirty=!1,this.element[this.name]=this._getValue())}}class U extends T{}let O=!1;(()=>{try{const t={get capture(){return O=!0,!1}};window.addEventListener("test",t,t),window.removeEventListener("test",t,t)}catch(t){}})();class R{constructor(t,e,s){this.value=void 0,this.__pendingValue=void 0,this.element=t,this.eventName=e,this.eventContext=s,this.__boundHandleEvent=t=>this.handleEvent(t)}setValue(t){this.__pendingValue=t}commit(){for(;f(this.__pendingValue);){const t=this.__pendingValue;this.__pendingValue=y,t(this)}if(this.__pendingValue===y)return;const t=this.__pendingValue,e=this.value,s=null==t||null!=e&&(t.capture!==e.capture||t.once!==e.once||t.passive!==e.passive),i=null!=t&&(null==e||s);s&&this.element.removeEventListener(this.eventName,this.__boundHandleEvent,this.__options),i&&(this.__options=k(t),this.element.addEventListener(this.eventName,this.__boundHandleEvent,this.__options)),this.value=t,this.__pendingValue=y}handleEvent(t){"function"==typeof this.value?this.value.call(this.eventContext||this.element,t):this.value.handleEvent(t)}}const k=t=>t&&(O?{capture:t.capture,passive:t.passive,once:t.once}:t.capture)
|
|
69
|
-
/**
|
|
70
|
-
* @license
|
|
71
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
72
|
-
* This code may only be used under the BSD style license found at
|
|
73
|
-
* http://polymer.github.io/LICENSE.txt
|
|
74
|
-
* The complete set of authors may be found at
|
|
75
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
76
|
-
* The complete set of contributors may be found at
|
|
77
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
78
|
-
* Code distributed by Google as part of the polymer project is also
|
|
79
|
-
* subject to an additional IP rights grant found at
|
|
80
|
-
* http://polymer.github.io/PATENTS.txt
|
|
81
|
-
*/;function M(t){let e=$.get(t.type);void 0===e&&(e={stringsArray:new WeakMap,keyString:new Map},$.set(t.type,e));let s=e.stringsArray.get(t.strings);if(void 0!==s)return s;const n=t.strings.join(i);return s=e.keyString.get(n),void 0===s&&(s=new o(t,t.getTemplateElement()),e.keyString.set(n,s)),e.stringsArray.set(t.strings,s),s}const $=new Map,q=new WeakMap,L=(t,e,i)=>{let n=q.get(e);void 0===n&&(s(e,e.firstChild),q.set(e,n=new A(Object.assign({templateFactory:M},i))),n.appendInto(e)),n.setValue(t),n.commit()};
|
|
82
|
-
/**
|
|
83
|
-
* @license
|
|
84
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
85
|
-
* This code may only be used under the BSD style license found at
|
|
86
|
-
* http://polymer.github.io/LICENSE.txt
|
|
87
|
-
* The complete set of authors may be found at
|
|
88
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
89
|
-
* The complete set of contributors may be found at
|
|
90
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
91
|
-
* Code distributed by Google as part of the polymer project is also
|
|
92
|
-
* subject to an additional IP rights grant found at
|
|
93
|
-
* http://polymer.github.io/PATENTS.txt
|
|
94
|
-
*/const I=new
|
|
95
|
-
/**
|
|
96
|
-
* @license
|
|
97
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
98
|
-
* This code may only be used under the BSD style license found at
|
|
99
|
-
* http://polymer.github.io/LICENSE.txt
|
|
100
|
-
* The complete set of authors may be found at
|
|
101
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
102
|
-
* The complete set of contributors may be found at
|
|
103
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
104
|
-
* Code distributed by Google as part of the polymer project is also
|
|
105
|
-
* subject to an additional IP rights grant found at
|
|
106
|
-
* http://polymer.github.io/PATENTS.txt
|
|
107
|
-
*/
|
|
108
|
-
class{handleAttributeExpressions(t,e,s,i){const n=e[0];if("."===n){return new V(t,e.slice(1),s).parts}if("@"===n)return[new R(t,e.slice(1),i.eventContext)];if("?"===n)return[new E(t,e.slice(1),s)];return new N(t,e,s).parts}handleTextExpression(t){return new A(t)}};
|
|
109
|
-
/**
|
|
110
|
-
* @license
|
|
111
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
112
|
-
* This code may only be used under the BSD style license found at
|
|
113
|
-
* http://polymer.github.io/LICENSE.txt
|
|
114
|
-
* The complete set of authors may be found at
|
|
115
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
116
|
-
* The complete set of contributors may be found at
|
|
117
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
118
|
-
* Code distributed by Google as part of the polymer project is also
|
|
119
|
-
* subject to an additional IP rights grant found at
|
|
120
|
-
* http://polymer.github.io/PATENTS.txt
|
|
121
|
-
*/"undefined"!=typeof window&&(window.litHtmlVersions||(window.litHtmlVersions=[])).push("1.4.1");const j=(t,...e)=>new b(t,e,"html",I),H=(t,...e)=>new x(t,e,"svg",I)
|
|
122
|
-
/**
|
|
123
|
-
* @license
|
|
124
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
125
|
-
* This code may only be used under the BSD style license found at
|
|
126
|
-
* http://polymer.github.io/LICENSE.txt
|
|
127
|
-
* The complete set of authors may be found at
|
|
128
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
129
|
-
* The complete set of contributors may be found at
|
|
130
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
131
|
-
* Code distributed by Google as part of the polymer project is also
|
|
132
|
-
* subject to an additional IP rights grant found at
|
|
133
|
-
* http://polymer.github.io/PATENTS.txt
|
|
134
|
-
*/,B=(t,e)=>`${t}--${e}`;let F=!0;void 0===window.ShadyCSS?F=!1:void 0===window.ShadyCSS.prepareTemplateDom&&(console.warn("Incompatible ShadyCSS version detected. Please update to at least @webcomponents/webcomponentsjs@2.0.2 and @webcomponents/shadycss@1.3.1."),F=!1);const z=t=>e=>{const s=B(e.type,t);let n=$.get(s);void 0===n&&(n={stringsArray:new WeakMap,keyString:new Map},$.set(s,n));let r=n.stringsArray.get(e.strings);if(void 0!==r)return r;const a=e.strings.join(i);if(r=n.keyString.get(a),void 0===r){const s=e.getTemplateElement();F&&window.ShadyCSS.prepareTemplateDom(s,t),r=new o(e,s),n.keyString.set(a,r)}return n.stringsArray.set(e.strings,r),r},W=["html","svg"],D=new Set,J=(t,e,s)=>{D.add(t);const i=s?s.element:document.createElement("template"),n=e.querySelectorAll("style"),{length:r}=n;if(0===r)return void window.ShadyCSS.prepareTemplateStyles(i,t);const o=document.createElement("style");for(let t=0;t<r;t++){const e=n[t];e.parentNode.removeChild(e),o.textContent+=e.textContent}(t=>{W.forEach((e=>{const s=$.get(B(e,t));void 0!==s&&s.keyString.forEach((t=>{const{element:{content:e}}=t,s=new Set;Array.from(e.querySelectorAll("style")).forEach((t=>{s.add(t)})),c(t,s)}))}))})(t);const a=i.content;s?function(t,e,s=null){const{element:{content:i},parts:n}=t;if(null==s)return void i.appendChild(e);const r=document.createTreeWalker(i,133,null,!1);let o=u(n),a=0,l=-1;for(;r.nextNode();)for(l++,r.currentNode===s&&(a=p(e),s.parentNode.insertBefore(e,s));-1!==o&&n[o].index===l;){if(a>0){for(;-1!==o;)n[o].index+=a,o=u(n,o);return}o=u(n,o)}}(s,o,a.firstChild):a.insertBefore(o,a.firstChild),window.ShadyCSS.prepareTemplateStyles(i,t);const l=a.querySelector("style");if(window.ShadyCSS.nativeShadow&&null!==l)e.insertBefore(l.cloneNode(!0),e.firstChild);else if(s){a.insertBefore(o,a.firstChild);const t=new Set;t.add(o),c(s,t)}};window.JSCompiler_renameProperty=(t,e)=>t;const G={toAttribute(t,e){switch(e){case Boolean:return t?"":null;case Object:case Array:return null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){switch(e){case Boolean:return null!==t;case Number:return null===t?null:Number(t);case Object:case Array:return JSON.parse(t)}return t}},K=(t,e)=>e!==t&&(e==e||t==t),Q={attribute:!0,type:String,converter:G,reflect:!1,hasChanged:K};class X extends HTMLElement{constructor(){super(),this.initialize()}static get observedAttributes(){this.finalize();const t=[];return this._classProperties.forEach(((e,s)=>{const i=this._attributeNameForProperty(s,e);void 0!==i&&(this._attributeToPropertyMap.set(i,s),t.push(i))})),t}static _ensureClassProperties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_classProperties",this))){this._classProperties=new Map;const t=Object.getPrototypeOf(this)._classProperties;void 0!==t&&t.forEach(((t,e)=>this._classProperties.set(e,t)))}}static createProperty(t,e=Q){if(this._ensureClassProperties(),this._classProperties.set(t,e),e.noAccessor||this.prototype.hasOwnProperty(t))return;const s="symbol"==typeof t?Symbol():`__${t}`,i=this.getPropertyDescriptor(t,s,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}static getPropertyDescriptor(t,e,s){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdateInternal(t,n,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this._classProperties&&this._classProperties.get(t)||Q}static finalize(){const t=Object.getPrototypeOf(this);if(t.hasOwnProperty("finalized")||t.finalize(),this.finalized=!0,this._ensureClassProperties(),this._attributeToPropertyMap=new Map,this.hasOwnProperty(JSCompiler_renameProperty("properties",this))){const t=this.properties,e=[...Object.getOwnPropertyNames(t),..."function"==typeof Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t):[]];for(const s of e)this.createProperty(s,t[s])}}static _attributeNameForProperty(t,e){const s=e.attribute;return!1===s?void 0:"string"==typeof s?s:"string"==typeof t?t.toLowerCase():void 0}static _valueHasChanged(t,e,s=K){return s(t,e)}static _propertyValueFromAttribute(t,e){const s=e.type,i=e.converter||G,n="function"==typeof i?i:i.fromAttribute;return n?n(t,s):t}static _propertyValueToAttribute(t,e){if(void 0===e.reflect)return;const s=e.type,i=e.converter;return(i&&i.toAttribute||G.toAttribute)(t,s)}initialize(){this._updateState=0,this._updatePromise=new Promise((t=>this._enableUpdatingResolver=t)),this._changedProperties=new Map,this._saveInstanceProperties(),this.requestUpdateInternal()}_saveInstanceProperties(){this.constructor._classProperties.forEach(((t,e)=>{if(this.hasOwnProperty(e)){const t=this[e];delete this[e],this._instanceProperties||(this._instanceProperties=new Map),this._instanceProperties.set(e,t)}}))}_applyInstanceProperties(){this._instanceProperties.forEach(((t,e)=>this[e]=t)),this._instanceProperties=void 0}connectedCallback(){this.enableUpdating()}enableUpdating(){void 0!==this._enableUpdatingResolver&&(this._enableUpdatingResolver(),this._enableUpdatingResolver=void 0)}disconnectedCallback(){}attributeChangedCallback(t,e,s){e!==s&&this._attributeToProperty(t,s)}_propertyToAttribute(t,e,s=Q){const i=this.constructor,n=i._attributeNameForProperty(t,s);if(void 0!==n){const t=i._propertyValueToAttribute(e,s);if(void 0===t)return;this._updateState=8|this._updateState,null==t?this.removeAttribute(n):this.setAttribute(n,t),this._updateState=-9&this._updateState}}_attributeToProperty(t,e){if(8&this._updateState)return;const s=this.constructor,i=s._attributeToPropertyMap.get(t);if(void 0!==i){const t=s.getPropertyOptions(i);this._updateState=16|this._updateState,this[i]=s._propertyValueFromAttribute(e,t),this._updateState=-17&this._updateState}}requestUpdateInternal(t,e,s){let i=!0;if(void 0!==t){const n=this.constructor;s=s||n.getPropertyOptions(t),n._valueHasChanged(this[t],e,s.hasChanged)?(this._changedProperties.has(t)||this._changedProperties.set(t,e),!0!==s.reflect||16&this._updateState||(void 0===this._reflectingProperties&&(this._reflectingProperties=new Map),this._reflectingProperties.set(t,s))):i=!1}!this._hasRequestedUpdate&&i&&(this._updatePromise=this._enqueueUpdate())}requestUpdate(t,e){return this.requestUpdateInternal(t,e),this.updateComplete}async _enqueueUpdate(){this._updateState=4|this._updateState;try{await this._updatePromise}catch(t){}const t=this.performUpdate();return null!=t&&await t,!this._hasRequestedUpdate}get _hasRequestedUpdate(){return 4&this._updateState}get hasUpdated(){return 1&this._updateState}performUpdate(){if(!this._hasRequestedUpdate)return;this._instanceProperties&&this._applyInstanceProperties();let t=!1;const e=this._changedProperties;try{t=this.shouldUpdate(e),t?this.update(e):this._markUpdated()}catch(e){throw t=!1,this._markUpdated(),e}t&&(1&this._updateState||(this._updateState=1|this._updateState,this.firstUpdated(e)),this.updated(e))}_markUpdated(){this._changedProperties=new Map,this._updateState=-5&this._updateState}get updateComplete(){return this._getUpdateComplete()}_getUpdateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._updatePromise}shouldUpdate(t){return!0}update(t){void 0!==this._reflectingProperties&&this._reflectingProperties.size>0&&(this._reflectingProperties.forEach(((t,e)=>this._propertyToAttribute(e,this[e],t))),this._reflectingProperties=void 0),this._markUpdated()}updated(t){}firstUpdated(t){}}X.finalized=!0;
|
|
135
|
-
/**
|
|
136
|
-
@license
|
|
137
|
-
Copyright (c) 2019 The Polymer Project Authors. All rights reserved.
|
|
138
|
-
This code may only be used under the BSD style license found at
|
|
139
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
140
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
141
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
142
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
143
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
144
|
-
*/
|
|
145
|
-
const Y=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Z=Symbol();class tt{constructor(t,e){if(e!==Z)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){return void 0===this._styleSheet&&(Y?(this._styleSheet=new CSSStyleSheet,this._styleSheet.replaceSync(this.cssText)):this._styleSheet=null),this._styleSheet}toString(){return this.cssText}}const et=t=>new tt(String(t),Z),st=(t,...e)=>{const s=e.reduce(((e,s,i)=>e+(t=>{if(t instanceof tt)return t.cssText;if("number"==typeof t)return t;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${t}. Use 'unsafeCSS' to pass non-literal values, but\n take care to ensure page security.`)})(s)+t[i+1]),t[0]);return new tt(s,Z)};
|
|
146
|
-
/**
|
|
147
|
-
* @license
|
|
148
|
-
* Copyright (c) 2017 The Polymer Project Authors. All rights reserved.
|
|
149
|
-
* This code may only be used under the BSD style license found at
|
|
150
|
-
* http://polymer.github.io/LICENSE.txt
|
|
151
|
-
* The complete set of authors may be found at
|
|
152
|
-
* http://polymer.github.io/AUTHORS.txt
|
|
153
|
-
* The complete set of contributors may be found at
|
|
154
|
-
* http://polymer.github.io/CONTRIBUTORS.txt
|
|
155
|
-
* Code distributed by Google as part of the polymer project is also
|
|
156
|
-
* subject to an additional IP rights grant found at
|
|
157
|
-
* http://polymer.github.io/PATENTS.txt
|
|
158
|
-
*/
|
|
159
|
-
(window.litElementVersions||(window.litElementVersions=[])).push("2.5.1");const it={};class nt extends X{static getStyles(){return this.styles}static _getUniqueStyles(){if(this.hasOwnProperty(JSCompiler_renameProperty("_styles",this)))return;const t=this.getStyles();if(Array.isArray(t)){const e=(t,s)=>t.reduceRight(((t,s)=>Array.isArray(s)?e(s,t):(t.add(s),t)),s),s=e(t,new Set),i=[];s.forEach((t=>i.unshift(t))),this._styles=i}else this._styles=void 0===t?[]:[t];this._styles=this._styles.map((t=>{if(t instanceof CSSStyleSheet&&!Y){const e=Array.prototype.slice.call(t.cssRules).reduce(((t,e)=>t+e.cssText),"");return et(e)}return t}))}initialize(){super.initialize(),this.constructor._getUniqueStyles(),this.renderRoot=this.createRenderRoot(),window.ShadowRoot&&this.renderRoot instanceof window.ShadowRoot&&this.adoptStyles()}createRenderRoot(){return this.attachShadow(this.constructor.shadowRootOptions)}adoptStyles(){const t=this.constructor._styles;0!==t.length&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow?Y?this.renderRoot.adoptedStyleSheets=t.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):this._needsShimAdoptedStyleSheets=!0:window.ShadyCSS.ScopingShim.prepareAdoptedCssText(t.map((t=>t.cssText)),this.localName))}connectedCallback(){super.connectedCallback(),this.hasUpdated&&void 0!==window.ShadyCSS&&window.ShadyCSS.styleElement(this)}update(t){const e=this.render();super.update(t),e!==it&&this.constructor.render(e,this.renderRoot,{scopeName:this.localName,eventContext:this}),this._needsShimAdoptedStyleSheets&&(this._needsShimAdoptedStyleSheets=!1,this.constructor._styles.forEach((t=>{const e=document.createElement("style");e.textContent=t.cssText,this.renderRoot.appendChild(e)})))}render(){return it}}nt.finalized=!0,nt.render=(t,e,i)=>{if(!i||"object"!=typeof i||!i.scopeName)throw new Error("The `scopeName` option is required.");const n=i.scopeName,r=q.has(e),o=F&&11===e.nodeType&&!!e.host,a=o&&!D.has(n),l=a?document.createDocumentFragment():e;if(L(t,l,Object.assign({templateFactory:z(n)},i)),a){const t=q.get(l);q.delete(l);const i=t.value instanceof S?t.value.template:void 0;J(n,l,i),s(e,e.firstChild),e.appendChild(l),q.set(e,t)}!r&&o&&window.ShadyCSS.styleElement(e.host)},nt.shadowRootOptions={mode:"open"};export{T as A,E as B,tt as C,R as E,nt as L,A as N,U as P,o as T,b as a,h as b,st as c,_ as d,s as e,L as f,j as h,i as m,y as n,e as r,H as s,$ as t,et as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-2eee69db.js";import{p as r}from"./shared-4e63d6e0.js";function s(s){var t;const n=r(s),o=null!==(t={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[n.units])&&void 0!==t?t:n.units;return e(e({},n),{},{units:o})}export{s as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-757bb517.js";import"./shared-4e63d6e0.js";import{_ as t}from"./shared-2eee69db.js";import{h as e}from"./shared-7f33a83a.js";import{D as s}from"./shared-1ddccf4d.js";let i,n=t=>t;customElements.define("foxy-internal-confirm-dialog",class extends s{constructor(){super(...arguments),this.closable=!1,this.editable=!1,this.alert=!0,this.confirm="confirm",this.message="message",this.cancel="cancel",this.theme="primary"}static get properties(){return t(t({},super.properties),{},{confirm:{type:String},message:{type:String},cancel:{type:String},theme:{type:String}})}render(){return super.render((()=>e(i||(i=n` <foxy-i18n class="block font-lumo text-m text-body text-center mb-m" lang="${0}" key="${0}" ns="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> <vaadin-button data-testid="cancelButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> <vaadin-button theme="${0}" data-testid="confirmButton" @click="${0}"> <foxy-i18n ns="${0}" lang="${0}" key="${0}"></foxy-i18n> </vaadin-button> </div> `),this.lang,this.message,this.ns,this.__handleCancel,this.ns,this.lang,this.cancel,this.theme,this.__handleConfirm,this.ns,this.lang,this.confirm)))}async __handleCancel(){await this.hide(!0)}async __handleConfirm(){await this.hide()}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as e,g as t,I as r,_ as n}from"./shared-2eee69db.js";import{L as s,h as o}from"./shared-7f33a83a.js";import{A as i}from"./shared-2bb49907.js";import"./shared-f0ba30e8.js";import{C as a}from"./shared-06014421.js";import{F as u}from"./shared-64657919.js";var c=e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.formatCookie=void 0;var r=function(e){var t=e.path,r=e.domain,n=e.expires,s=e.secure,o=function(e){var t=e.sameSite;return void 0===t?null:["none","lax","strict"].indexOf(t.toLowerCase())>=0?t:null}(e);return[null==t?"":";path="+t,null==r?"":";domain="+r,null==n?"":";expires="+n.toUTCString(),void 0===s||!1===s?"":";secure",null===o?"":";SameSite="+o].join("")};t.formatCookie=function(e,t,n){return[encodeURIComponent(e),"=",encodeURIComponent(t),r(n)].join("")}})),l=e((function(e,t){function r(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var r=[],n=!0,s=!1,o=void 0;try{for(var i,a=e[Symbol.iterator]();!(n=(i=a.next()).done)&&(r.push(i.value),!t||r.length!==t);n=!0);}catch(e){s=!0,o=e}finally{try{n||null==a.return||a.return()}finally{if(s)throw o}}return r}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return n(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return n(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.parseCookies=void 0;t.parseCookies=function(e){if(0===e.length)return{};var t={},n=new RegExp("\\s*;\\s*");return e.split(n).forEach((function(e){var n=r(e.split("="),2),s=n[0],o=n[1],i=decodeURIComponent(s),a=decodeURIComponent(o);t[i]=a})),t}})),p=e((function(e,t){function r(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}Object.defineProperty(t,"__esModule",{value:!0}),t.CookieStorage=void 0;var n=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._defaultOptions=Object.assign({domain:null,expires:null,path:null,secure:!1},t),"undefined"!=typeof Proxy)return new Proxy(this,s)}var t,n,o;return t=e,(n=[{key:"clear",value:function(){var e=this,t=l.parseCookies(this._getCookie());Object.keys(t).forEach((function(t){return e.removeItem(t)}))}},{key:"getItem",value:function(e){var t=l.parseCookies(this._getCookie());return Object.prototype.hasOwnProperty.call(t,e)?t[e]:null}},{key:"key",value:function(e){var t=l.parseCookies(this._getCookie()),r=Object.keys(t).sort();return e<r.length?r[e]:null}},{key:"removeItem",value:function(e,t){var r=Object.assign(Object.assign(Object.assign({},this._defaultOptions),t),{expires:new Date(0)}),n=c.formatCookie(e,"",r);this._setCookie(n)}},{key:"setItem",value:function(e,t,r){var n=Object.assign(Object.assign({},this._defaultOptions),r),s=c.formatCookie(e,t,n);this._setCookie(s)}},{key:"_getCookie",value:function(){return"undefined"==typeof document||void 0===document.cookie?"":document.cookie}},{key:"_setCookie",value:function(e){document.cookie=e}},{key:"length",get:function(){var e=l.parseCookies(this._getCookie());return Object.keys(e).length}}])&&r(t.prototype,n),o&&r(t,o),e}();t.CookieStorage=n;var s={defineProperty:function(e,t,r){return e.setItem(t.toString(),String(r.value)),!0},deleteProperty:function(e,t){return e.removeItem(t.toString()),!0},get:function(e,t,r){if("string"==typeof t&&t in e)return e[t];var n=e.getItem(t.toString());return null!==n?n:void 0},getOwnPropertyDescriptor:function(e,t){if(!(t in e))return{configurable:!0,enumerable:!0,value:e.getItem(t.toString()),writable:!0}},has:function(e,t){return"string"==typeof t&&t in e||null!==e.getItem(t.toString())},ownKeys:function(e){for(var t=[],r=0;r<e.length;r++){var n=e.key(r);null!==n&&t.push(n)}return t},preventExtensions:function(e){throw new TypeError("can't prevent extensions on this proxy object")},set:function(e,t,r,n){return e.setItem(t.toString(),String(r)),!0}}})),f=t(e((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"CookieStorage",{enumerable:!0,get:function(){return p.CookieStorage}}),Object.defineProperty(t,"formatCookie",{enumerable:!0,get:function(){return c.formatCookie}}),Object.defineProperty(t,"parseCookies",{enumerable:!0,get:function(){return l.parseCookies}})})));class h extends f.CookieStorage{constructor(){super({sameSite:"Strict",expires:new Date,secure:!0,domain:location.hostname,path:"/"})}getItem(e){if(e===i.SESSION){const e=super.getItem("fx.customer"),t=super.getItem("fx.customer.duration"),r=super.getItem("fx.customer.start"),n=super.getItem("fx.customer.jwt");if(null===e||null===t||null===r||null===n)return null;const s={session_token:e,date_created:r,expires_in:parseInt(t),jwt:n},o=super.getItem("fx.customer.sso");return null!==o&&(s.sso=o),JSON.stringify(s)}return super.getItem(e)}setItem(e,t,r){if(e!==i.SESSION)return super.setItem(e,t,r);{const e=JSON.parse(t),r=1e3*e.expires_in,n=new Date(new Date(e.date_created).getTime()+r);super.setItem("fx.customer",e.session_token,{expires:n}),super.setItem("fx.customer.jwt",e.jwt,{expires:n}),super.setItem("fx.customer.start",e.date_created,{expires:n}),super.setItem("fx.customer.duration",String(e.expires_in),{expires:n}),e.sso&&super.setItem("fx.customer.sso",e.sso,{expires:n})}}clear(){for(let e=0;e<this.length;){const t=super.key(e);t.startsWith("fx.customer")?super.removeItem(t):e++}}}const d=new h;let m,g=e=>e;class _ extends(a(r(s))){constructor(){var e;super(...arguments),e=this,this.__storage="local",this.__level=0,this.__base=location.origin,this.__api=this.__createAPIInstance(),this.__handleFetch=async function(t){if(!(t instanceof u))return;if(t.defaultPrevented)return;if(t.composedPath()[0]===e)return;t.preventDefault();const r=new u("fetch",{cancelable:!0,composed:!0,request:t.request,bubbles:!0,reject:e=>t.respondWith(Promise.reject(e)),resolve:n=>{"foxy://customer-api/session"===r.request.url&&e.requestUpdate(),401===n.status&&e.requestUpdate(),t.respondWith(Promise.resolve(n))}});e.dispatchEvent(r)&&r.respondWith(e.__handleRequest(r.request))}}static get properties(){return n(n({},super.properties),{},{storage:{type:String,noAccessor:!0},level:{type:Number,noAccessor:!0},base:{type:String,noAccessor:!0}})}get isLoggedIn(){return!!this.api.storage.getItem(i.SESSION)}get api(){return this.__api}get base(){return this.__base}set base(e){this.__base=e,this.__api=this.__createAPIInstance()}get level(){return this.__level}set level(e){this.__level=e,this.__api=this.__createAPIInstance()}get storage(){return this.__storage}set storage(e){this.__storage=e,this.__api=this.__createAPIInstance()}connectedCallback(){super.connectedCallback(),this.addEventListener("fetch",this.__handleFetch)}render(){return o(m||(m=g` ${0} <slot></slot> `),this.renderTemplateOrSlot(this.isLoggedIn?"logged-in":"logged-out"))}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("fetch",this.__handleFetch)}__createAPIInstance(){const e={session:sessionStorage,cookie:d,local:localStorage};return new i({storage:e[this.storage],level:this.level,base:new URL(this.base)})}async __handleVirtualAuthSessionDelete(){return await this.api.signOut(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate(),new Response}async __handleVirtualAuthSessionPost(e){const t=await e.clone().json();if("password"!==t.type)throw new Error(`Unknown payload type ${t.type}`);let r,s;try{await this.api.signIn(t.credential),this.dispatchEvent(new _.SignInEvent("signin")),this.requestUpdate(),r=200,s=n({_links:{self:{href:e.url}}},t)}catch(e){if(!(e instanceof i.AuthError))throw e;if("UNAUTHORIZED"!==e.code)throw e;r=401,s={total:1,_embedded:{"fx:errors":[{message:e.message,logref:"unavailable",code:"invalid_credential_error"}]}}}return new Response(JSON.stringify(s),{status:r})}async __handleVirtualAuthRecoverPost(e){const t=await e.clone().json();if("email"===t.type)return await this.api.sendPasswordResetEmail(t.detail),new Response(JSON.stringify({_links:{self:{href:e.url}},email:t.email}));throw new Error(`Unknown payload type ${t.type}`)}async __handleRequest(e){const t=e.url,r=e.method;try{if("foxy://customer-api/session"===t){if("DELETE"===r)return this.__handleVirtualAuthSessionDelete();if("POST"===r)return this.__handleVirtualAuthSessionPost(e)}if("foxy://customer-api/recover"===t&&"POST"===r)return this.__handleVirtualAuthRecoverPost(e);const n=await this.api.fetch(e);return 401===n.status&&(this.api.storage.clear(),this.dispatchEvent(new _.SignOutEvent("signout")),this.requestUpdate()),n}catch(e){return new Response(null,{status:500})}}}_.SignOutEvent=class extends CustomEvent{},_.SignInEvent=class extends CustomEvent{};export{_ as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,I as t}from"./shared-2eee69db.js";import{h as s,L as i}from"./shared-7f33a83a.js";import{C as r}from"./shared-06014421.js";import{a as n,T as o}from"./shared-ea9af4b0.js";import{c as a}from"./shared-4e709717.js";import{l}from"./shared-f3b35364.js";import{r as d}from"./shared-d519a301.js";let c,h,u,m=e=>e;const p=n(r(o(t(i))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return e(e({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const e=a({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),t=a({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return s(c||(c=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),d(this.items,(e=>e.value),((i,r)=>{var n;return s(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),t,null!==(n=i.label)&&void 0!==n?n:i.value,this.t("delete"),e,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),a({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),l(this.__newItem),this.disabled,this.readonly,(e=>"Enter"===e.key&&r()),(e=>e.stopPropagation()),(e=>{this.__newItem=e.currentTarget.value.trim()}),this.options.map((({label:e,value:t})=>{if(!this.items.some((e=>e.value===t)))return s(u||(u=m`<option value="${0}">${0}</option>`),t,null!=e?e:t)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),a({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as e}from"./shared-3026cee0.js";import{F as t}from"./shared-64657919.js";class s extends e{constructor(e){super({base:new URL(document.baseURI),fetch:(...c)=>new Promise(((n,o)=>{const r="string"==typeof c[0]?new s.WHATWGRequest(...c):c[0];r.headers.set("Content-Type","application/json"),r.headers.set("FOXY-API-VERSION","1");const a=new t("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:r,resolve:n,reject:o});e.dispatchEvent(a),a.defaultPrevented||fetch(r).then(n).catch(o)}))})}}s.FetchEvent=t;export{s as A};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./shared-2eee69db.js";import"./shared-757bb517.js";import{L as e,c as i,h as s}from"./shared-7f33a83a.js";import{p as r}from"./shared-4e63d6e0.js";import"./shared-35de1004.js";import"./shared-007660a6.js";import"./shared-7819b0b0.js";import{w as a,S as n,x as o}from"./shared-ea9af4b0.js";import"./shared-38f8a319.js";import"./shared-1ddccf4d.js";import{I as l,D as c}from"./shared-bbfdfee2.js";import{E as h}from"./shared-34998df6.js";import"./shared-5097c880.js";import"./shared-60e98fbf.js";import"./shared-f7bddf72.js";import"./shared-f3f9f752.js";import"./shared-bc94606b.js";import{s as d}from"./shared-11c2efc8.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 e{constructor(){super(...arguments),this.quantity=0,this.image=""}static get properties(){return t(t({},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"),i.addEventListener("error",(()=>i.src=f.placeholder)),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(" ")}}f.placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E';let v,b,w,x,q,I,E,$,C=t=>t;class S extends(n(e)){constructor(){super(...arguments),this.empty=!1,this.data=[]}static get properties(){return t(t({},super.properties),{},{empty:{attribute:!1},data:{attribute:!1}})}static get styles(){return[a.styles,i(v||(v=C`.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=d({exportparts:"picture",class:"w-full h-full",".empty":this.empty}),[o,l,c,h]=this.data;return s(b||(b=C` <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=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,o):"",i,r,l?s(x||(x=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,l):"",i,r,c?s(q||(q=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,c):"",i,r,e,t>102?s(I||(I=C`<iron-icon icon="icons:more-horiz" class="m-auto w-xl h-xl"></iron-icon>`)):s(E||(E=C`<div class="m-auto text-xxxl">+${0}</div>`),t-3),h?s($||($=C`<x-pic ...="${0}" .data="${0}"></x-pic>`),n,h):"",i,e,i,e)}}let D,k,L=t=>t;class A extends S{static get scopedElements(){return{"x-pic":f}}}class N extends S{static get scopedElements(){return{"x-pic":A}}}class P extends(n(e)){constructor(){super(...arguments),this.quantity=0,this.items=[]}static get scopedElements(){return{"x-picture":f,"x-bundle-grid":N}}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=d({class:"w-full h-full",exportparts:"picture"});if(0===this.items.length)return s(D||(D=L`<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(k||(k=L`<x-bundle-grid ...="${0}" .empty="${0}" .data="${0}"></x-bundle-grid>`),r,i,e)}}}class j extends o{static get properties(){return t(t({},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 F,T,O,V,M,H,B,Z=t=>t;class R extends j{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=R.__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(F||(F=Z`: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":h,"x-preview":P,"x-i18n":l}}static get properties(){return t(t({},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(T||(T=Z`<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(O||(O=Z` <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(V||(V=Z` <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(M||(M=Z` <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(H||(H=Z`<div class="font-medium price text-l">${0}</div>`),a):"",this.__handleQuantity,this.quantity,this.readonly,this.quantity>1?s(B||(B=Z` <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=R.__existingIds.reduce(((t,e)=>e>t?e:t),0)+1;return R.__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)}}R.__existingIds=[];let z,Q,W,J,U,X,G=t=>t;class K extends j{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/,"");K.__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":h,"vaadin-button":customElements.get("vaadin-button"),"x-dropdown":c,"x-item":R}}static get properties(){return t(t({},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=>K.__validDate(t)?t:(console.error("Invalid start date",t),"")},sub_enddate:{type:String,converter:t=>K.__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=>{if(!t)return[];const e=JSON.parse(t);if(!Array.isArray(e))return console.error("Invalid frequency","Frequency options must be an array."),[];for(const t of e)if(!K.__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 e.filter(K.__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(Q||(Q=G` <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(W||(W=G` ${0}`),[...this.__data.entries()].map((([t,e])=>s(J||(J=G`<input type="hidden" name="${0}" value="${0}">`),t,e)))):"",this.readonly?"":s(U||(U=G` <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(X||(X=G` <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(z||(z=G`<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=(()=>!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/)||!K.__validFrequency(t)))}static __validDateFuture(t){let e=!1;if(K.__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",K),customElements.define("foxy-item",R);export{K as I,P,R as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-2eee69db.js";import"./shared-35de1004.js";import"./shared-007660a6.js";import"./shared-7819b0b0.js";import{L as s,c as t,h as r}from"./shared-7f33a83a.js";import{T as a}from"./shared-ea9af4b0.js";import{c as i}from"./shared-4e709717.js";class o extends CustomEvent{constructor(e){super("change",{detail:e})}}let c,l,d=e=>e;class h extends(a(s)){constructor(){super(...arguments),this.readonly=!1,this.disabled=!1,this.checked=!1}static get properties(){return e(e({},super.properties),{},{readonly:{type:Boolean},disabled:{type:Boolean},checked:{type:Boolean}})}static get styles(){return[super.styles,t(c||(c=d`:host{--check-size:1.125rem}label{margin:calc(((1rem * var(--lumo-line-height-s)) - var(--check-size))/ -2) 0}label>:first-child{height:calc(1rem * var(--lumo-line-height-s))}.ml-xxl{margin-left:calc(var(--lumo-space-m) + var(--check-size))}.check{height:var(--check-size);width:var(--check-size)}`))]}render(){return r(l||(l=d` <label class="${0}"> <div class="flex items-center"> <div class="${0}"> <iron-icon icon="lumo:checkmark" class="${0}"> </iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ?disabled="${0}" data-testid="input" @change="${0}"> </div> </div> <div class="flex-1 font-lumo leading-s ml-m"> <slot></slot> </div> </label> <div class="${0}"> <slot name="content"></slot> </div> `),i({"flex items-start group transition-colors":!0,"cursor-default":this.disabled||this.readonly,"text-disabled":this.disabled,"text-secondary":this.readonly,"cursor-pointer":!this.disabled}),i({"flex-shrink-0 check transition-colors rounded-s border":!0,"focus-within-shadow-outline":!0,"bg-primary text-primary-contrast":!this.readonly&&this.checked,"border-dashed border-contrast-30":this.readonly,"border-transparent":!this.readonly,"opacity-50":this.disabled,"text-secondary bg-contrast-20":!this.readonly&&!this.checked,"group-hover-bg-contrast-30":!this.readonly&&!this.checked}),i({"block w-full h-full transition-transform transform":!0,"scale-100":this.checked,"scale-0":!this.checked}),this.checked,this.disabled,(e=>{if(this.readonly)return e.preventDefault();e.stopPropagation(),this.checked=!this.checked,this.dispatchEvent(new o(this.checked))}),i({"font-lumo ml-xxl transition-colors":!0,"text-disabled":this.disabled}))}}export{h as C,o as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e}from"./shared-2eee69db.js";import{h as t}from"./shared-7f33a83a.js";import{C as l}from"./shared-06014421.js";import"./foxy-nucleon-element.js";import{R as s,T as a,a as i}from"./shared-ea9af4b0.js";import{c as r}from"./shared-4e709717.js";import{N as d}from"./shared-1b064836.js";let n,o,h,m,c,u=e=>e;const b=l(s(a(i(d))));class p extends b{constructor(){super(...arguments),this.templates={},this.columns=[]}static get properties(){return e(e({},super.properties),{},{columns:{attribute:!1}})}render(){var e,l;const s=this.columns.some((e=>!!e.header));return t(n||(n=u` <div data-testid="wrapper" aria-busy="${0}" aria-live="polite" class="relative font-lumo text-m"> <table class="table-fixed w-full" data-testid="table"> <thead class="${0}"> <tr> ${0} </tr> </thead> <tbody class="divide-y divide-contrast-10"> ${0} </tbody> </table> ${0} </div> ${0} `),this.in("busy"),s?"border-b border-contrast-10":"sr-only",this.columns.map(((e,l)=>{var s;return t(o||(o=u` <th class="${0}"> ${0} </th> `),r({"truncate h-l text-tertiary text-m text-left font-medium":!0,"text-right":l===this.columns.length-1,"hidden sm-table-cell":"sm"===e.hideBelow,"hidden md-table-cell":"md"===e.hideBelow,"hidden lg-table-cell":"lg"===e.hideBelow,"hidden xl-table-cell":"xl"===e.hideBelow}),null===(s=e.header)||void 0===s?void 0:s.call(e,{html:t,lang:this.lang,data:this.data,ns:this.ns}))})),this.__rows.map((e=>{var l;return t(h||(h=u` <tr class="h-l"> ${0} </tr> `),null===(l=this.columns)||void 0===l?void 0:l.map(((l,s)=>{var a;return t(m||(m=u` <td class="${0}"> ${0} </td> `),r({"text-right":s===this.columns.length-1,"hidden sm-table-cell":"sm"===l.hideBelow,"hidden md-table-cell":"md"===l.hideBelow,"hidden lg-table-cell":"lg"===l.hideBelow,"hidden xl-table-cell":"xl"===l.hideBelow,"truncate h-l text-body":!0}),e?null===(a=l.cell)||void 0===a?void 0:a.call(l,{html:t,lang:this.lang,data:e,ns:this.ns}):"")})))})),this.in({idle:"snapshot"})?"":t(c||(c=u` <div class="absolute inset-0 flex items-center justify-center"> <foxy-spinner data-testid="spinner" layout="vertical" state="${0}" class="p-m bg-base shadow-xs rounded-t-l rounded-b-l" lang="${0}" ns="${0} ${0}"> </foxy-spinner> </div> `),this.in("busy")?"busy":this.in("idle")?"empty":"error",this.lang,this.ns,null!==(l=null===(e=customElements.get("foxy-spinner"))||void 0===e?void 0:e.defaultNS)&&void 0!==l?l:""),this.renderTemplateOrSlot())}get __rows(){var e,t,l;const s=Object.values(null!==(t=null===(e=this.data)||void 0===e?void 0:e._embedded)&&void 0!==t?t:{}).reduce(((e,t)=>[...e,...t]),[]);let a;if(0===s.length)try{const e=new URL(null!==(l=this.href)&&void 0!==l?l:"").searchParams.get("limit"),t=parseInt(null!=e?e:"");a=isNaN(t)?20:t}catch(e){a=20}else a=s.length;return new Array(a).fill(null).map(((e,t)=>{var l;return null!==(l=s[t])&&void 0!==l?l:e}))}}export{p as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{L as r,h as s}from"./shared-7f33a83a.js";import{w as e}from"./shared-ea9af4b0.js";let t,o=r=>r;class n extends r{static get styles(){return e.styles}render(){return s(t||(t=o` <p class="flex text-s border border-contrast-10 rounded-t-l rounded-b-l p-s text-body leading-s"> <iron-icon icon="lumo:error" class="text-error flex-shrink-0 mr-s"></iron-icon> <slot></slot> </p> `))}}function a(r){const[s,e,t]=r.split("-").map((r=>parseInt(r,10)));return[s,e,t].some((r=>"number"!=typeof r||isNaN(r)))?null:new Date(s,e-1,t)}export{n as W,a as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{C as i}from"./shared-06014421.js";import{T as e,a as t}from"./shared-ea9af4b0.js";import{N as s}from"./shared-1b064836.js";import{c as r}from"./shared-4e709717.js";import{h as a}from"./shared-7f33a83a.js";import"./shared-4e63d6e0.js";import{_ as n}from"./shared-2eee69db.js";import{i as l}from"./shared-d3bf9ac0.js";let o,d,c=i=>i;const h=i(e(t(s)));class p extends h{renderBody(){return a(o||(o=c``))}render(){return a(d||(d=c` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" lang="${0}" ns="${0} spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),r({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.in({idle:"snapshot"})}),this.renderBody(),r({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"opacity-0 pointer-events-none":this.in({idle:"snapshot"})}),this.in("busy")?"no-label":"horizontal",this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy",this.lang,this.ns)}}customElements.define("foxy-internal-card",p);let u,f,y,v,m,x,_=i=>i;class $ extends(t(p,"item-card")){constructor(){super(...arguments),this.__currencyDisplay="",this.__currency=""}static get properties(){return n(n({},super.properties),{},{__currencyDisplay:{attribute:!1},__currency:{attribute:!1}})}renderBody(){var i,e,t,s,r,n,o,d,c;const h=null!==(e=null===(i=this.data)||void 0===i?void 0:i.quantity)&&void 0!==e?e:0,p=null!==(s=null===(t=this.data)||void 0===t?void 0:t.price)&&void 0!==s?s:0,w=h*p,L=null===(n=null===(r=this.data)||void 0===r?void 0:r._embedded)||void 0===n?void 0:n["fx:item_options"];return a(u||(u=_` <div class="flex items-start space-x-m leading-m"> <div class="w-l h-l relative flex-shrink-0"> <img class="relative w-full h-full object-cover rounded" src="${0}" alt="" @error="${0}"> <div class="border border-contrast-10 absolute inset-0 rounded"></div> </div> <div class="flex-1"> <div class="flex-1 h-l flex items-center"> <div class="flex-1 leading-s"> <div class="font-semibold text-m">${0}</div> <div class="text-secondary text-m"> ${0} × <foxy-i18n options="${0}" key="price" infer> </foxy-i18n> = <foxy-i18n options="${0}" key="price" infer> </foxy-i18n> </div> </div> ${0} </div> ${0} </div> </div> `),l(null===(o=this.data)||void 0===o?void 0:o.image),(i=>{i.currentTarget.src=$.__placeholder}),null===(d=this.data)||void 0===d?void 0:d.name,h,JSON.stringify({amount:`${p} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),JSON.stringify({amount:`${w} ${this.__currency}`,currencyDisplay:this.__currencyDisplay}),(null===(c=this.data)||void 0===c?void 0:c.subscription_frequency)?a(f||(f=_` <div class="w-xs h-xs flex items-center justify-center rounded-full bg-contrast-5"> <iron-icon icon="icons:autorenew" class="icon-inline text-s"></iron-icon> </div> `)):"",L&&L.length>0?a(y||(y=_` <div class="mt-s"> ${0} </div> `),L.map((i=>a(v||(v=_` <div class="flex items-center text-m space-x-xs leading-m"> <div class="flex-1 text-tertiary">${0}: ${0}</div> ${0} ${0} </div> `),i.name,i.value,i.price_mod?a(m||(m=_` <div class="${0} rounded px-xs"> <foxy-i18n options="${0}" key="price" infer> </foxy-i18n> </div> `),i.price_mod>0?"text-success":"text-error",JSON.stringify({amount:`${i.price_mod} ${this.__currency}`,currencyDisplay:this.__currencyDisplay})):"",i.weight_mod?a(x||(x=_` <div class="${0} rounded px-xs"> ${0} <foxy-i18n key="wgt" infer></foxy-i18n> </div> `),i.price_mod>0?"text-success":"text-error",i.weight_mod):"")))):"")}async _sendGet(){const i=await super._sendGet(),[e,t]=await Promise.all([super._fetch(i._links["fx:transaction"].href),super._fetch(i._links["fx:store"].href)]);return this.__currency=e.currency_code,this.__currencyDisplay=t.use_international_currency_symbol?"code":"symbol",i}}$.__placeholder='data:image/svg+xml,%3Csvg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Crect width="40" height="40" fill="%23E8E8E8"/%3E%3Cpath d="M31.5143 0H24.5476L0 24.5476V31.5143L11.7046 19.8097L11.9841 17.0782C12.0983 15.9624 13.0131 15.1154 14.1038 15.1154H15.7373V12.1923C15.7373 10.9815 16.6915 10 17.8687 10H21.5143L31.5143 0Z" fill="white"/%3E%3Cpath d="M11.5434 21.3852L0 32.9285V39.8953L11.5822 28.3131C11.172 27.8663 10.9438 27.2444 11.012 26.5782L11.5434 21.3852Z" fill="white"/%3E%3Cpath d="M12.4305 28.879L1.30951 40H8.27631L19.2763 29H13.1316C12.8853 29 12.6495 28.9573 12.4305 28.879Z" fill="white"/%3E%3Cpath d="M28.3113 19.965L28.0159 17.0782C27.9116 16.0591 27.1395 15.2642 26.1754 15.1341L40 1.3095V8.27627L28.3113 19.965Z" fill="white"/%3E%3Cpath d="M20.6905 29L9.69049 40H16.6572L27.9755 28.6817C27.6541 28.8832 27.2756 29 26.8684 29H20.6905Z" fill="white"/%3E%3Cpath d="M28.6572 28C28.9128 27.5952 29.0415 27.1003 28.988 26.5782L28.4426 21.2479L40 9.69053V16.6572L28.6572 28Z" fill="white"/%3E%3Cpath d="M25.0381 40H18.0715L40 18.0715V25.0381L25.0381 40Z" fill="white"/%3E%3Cpath d="M26.4524 40H33.4191L40 33.4191V26.4524L26.4524 40Z" fill="white"/%3E%3Cpath d="M40 40H34.8333L40 34.8333V40Z" fill="white"/%3E%3Cpath d="M16.1666 0H23.1334L0 23.1334V16.1666L16.1666 0Z" fill="white"/%3E%3Cpath d="M14.7524 0H7.78571L0 7.78573V14.7524L14.7524 0Z" fill="white"/%3E%3Cpath d="M0 0H6.37152L0 6.37151V0Z" fill="white"/%3E%3Cpath d="M21.467 11.4615H17.8687C17.4763 11.4615 17.1582 11.7887 17.1582 12.1923V15.1154H22.8418V12.1923C22.8418 11.7887 22.5237 11.4615 22.1313 11.4615H21.467Z" fill="white"/%3E%3Cpath d="M24.7798 15.1154H24.2627V12.1923C24.2627 11.227 23.6562 10.4075 22.8138 10.1148L32.9286 0H39.89L24.7798 15.1154Z" fill="white"/%3E%3C/svg%3E',customElements.define("foxy-item-card",$);export{p as I,$ as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-5097c880.js";import"./shared-60e98fbf.js";import{I as e,_ as t}from"./shared-2eee69db.js";import{L as r,f as n,h as i,c as s}from"./shared-7f33a83a.js";import{C as l}from"./shared-06014421.js";import{a,T as o}from"./shared-ea9af4b0.js";import{N as d}from"./shared-1b064836.js";import{i as c}from"./shared-d3bf9ac0.js";import"./foxy-spinner.js";import"./shared-4e63d6e0.js";import"./shared-757bb517.js";import"./shared-92d6f937.js";import{a6 as h}from"./shared-3026cee0.js";import{c as u}from"./shared-4e709717.js";let p,f,m,y,v=e=>e;class _ extends(l(a(o(e(r))))){constructor(){super(...arguments),this.nucleon=null,this.infer=""}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return t(t({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof d?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",n(i(p||(p=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer),this)}renderControl(){return i(f||(f=v``))}render(){return this.hidden?i(m||(m=v``)):i(y||(y=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}customElements.define("foxy-internal-control",_);class x extends _{constructor(){super(...arguments),this.__placeholder=null,this.__helperText=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return t(t({},super.properties),{},{__placeholder:{attribute:!1},__helperText:{attribute:!1},__v8nPrefix:{attribute:!1},__property:{attribute:!1},__label:{attribute:!1},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){this.__placeholder=e}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){this.__helperText=e}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:`${this.infer}:`}set v8nPrefix(e){this.__v8nPrefix=e}get property(){return"string"==typeof this.__property?this.__property:this.infer.replace(/-/g,"_")}set property(e){this.__property=e}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){this.__label=e}get _value(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.form[this.property]}set _value(e){var t;const r=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(r)&&(null===(t=this.nucleon)||void 0===t||t.edit({[this.property]:e}))}get _error(){var e;return null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)))}get _errorMessage(){return this._error?this.t(this._error.substring(0,this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",x);let g,b=e=>e;customElements.define("foxy-internal-number-control",class extends x{renderControl(){return i(g||(g=b` <vaadin-number-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" has-controls @keydown="${0}" @change="${0}"> </vaadin-number-field> `),c(this._errorMessage),this.placeholder,this.helperText,this.label,this.disabled,this.readonly,this._checkValidity,String(this._value),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=parseFloat(t.value)}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:0}set _value(e){super._value=e}});let $,T=e=>e;customElements.define("foxy-internal-text-control",class extends x{renderControl(){return i($||($=T` <vaadin-text-field error-message="${0}" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" @keydown="${0}" @input="${0}"> </vaadin-text-field> `),c(this._errorMessage),this.helperText,this.placeholder,this.label,this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{const t=e.currentTarget;this._value=t.value}))}get _value(){var e;return null!==(e=super._value)&&void 0!==e?e:""}set _value(e){super._value=e}});let w,I=e=>e;customElements.define("foxy-internal-create-control",class extends _{constructor(){super(...arguments),this.infer="create"}renderControl(){return i(w||(w=I` <vaadin-button data-testid="create" class="w-full" theme="primary success" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="create" lang="${0}"></foxy-i18n> </vaadin-button> `),this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}),this.ns,this.lang)}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let k,S=e=>e;customElements.define("foxy-internal-delete-control",class extends _{constructor(){super(...arguments),this.infer="delete"}renderControl(){return i(k||(k=S` <foxy-internal-confirm-dialog data-testid="confirm" message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" lang="${0}" ns="${0}" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="primary error" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n ns="${0}" key="delete" lang="${0}"></foxy-i18n> </vaadin-button> `),this.lang,this.ns,(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}),this.ns,this.lang)}});let E,j,P=e=>e;customElements.define("foxy-internal-timestamps-control",class extends _{constructor(){super(...arguments),this.infer="timestamps"}static get styles(){return[super.styles,s(E||(E=P`.max-w-0{max-width:0}`))]}renderControl(){return i(j||(j=P` <table class="font-lumo text-m leading-m w-full"> <tbody class="divide-y divide-contrast-10"> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n lang="${0}" key="date_created" ns="${0}"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> </td> </tr> <tr> <td class="max-w-0 truncate py-s text-secondary w-1-3 pr-m"> <foxy-i18n lang="${0}" key="date_modified" ns="${0}"></foxy-i18n> </td> <td class="max-w-0 truncate py-s text-body w-2-3"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> </td> </tr> </tbody> </table> `),this.lang,this.ns,JSON.stringify({value:h(this,"nucleon.form.date_created")}),this.lang,this.ns,this.lang,this.ns,JSON.stringify({value:h(this,"nucleon.form.date_modified")}),this.lang,this.ns)}});let C,A,V,B=e=>e;const D=l(o(a(d)));class O extends D{renderBody(){return this.data?i(C||(C=B` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):i(A||(A=B`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return i(V||(V=B` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" class="m-auto" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),u({"grid grid-cols-1 gap-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.renderBody(),u({"transition-opacity absolute inset-0 flex":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy")}}customElements.define("foxy-internal-form",O);let q,F=e=>e;class M extends(a(O,"item-option-form")){static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=100||"name:v8n_too_long",({value:e})=>!!e||"value:v8n_required",({value:e})=>!!e&&e.length<=1024||"value:v8n_too_long"]}renderBody(){return i(q||(q=F` <foxy-internal-text-control infer="name"></foxy-internal-text-control> <foxy-internal-text-control infer="value"></foxy-internal-text-control> <foxy-internal-number-control infer="price-mod"></foxy-internal-number-control> <foxy-internal-number-control infer="weight-mod"></foxy-internal-number-control> ${0} `),super.renderBody())}}customElements.define("foxy-item-option-form",M);export{x as I,_ as a,O as b,M as c};
|