@foxy.io/elements 1.58.0 → 1.59.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-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-admin-transaction-card.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-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-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +2 -2
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-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-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-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-detail-card.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-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +11 -11
- package/dist/cdn/foxy-customer.js +7 -7
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +2 -2
- package/dist/cdn/foxy-email-template-card.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-experimental-add-to-cart-builder.js +1 -1
- package/dist/cdn/foxy-filter-attribute-card.js +1 -1
- package/dist/cdn/foxy-filter-attribute-form.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-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.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-editor.js +3 -3
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-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-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card-embed.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-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-payments-api.js +1 -1
- package/dist/cdn/foxy-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +1 -1
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-card.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-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-store-transaction-folder-card.js +1 -1
- package/dist/cdn/foxy-store-transaction-folder-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- 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-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-user-invitation-card.js +1 -1
- package/dist/cdn/foxy-user-invitation-form.js +1 -1
- package/dist/cdn/foxy-users-table.js +1 -1
- package/dist/cdn/foxy-webhook-card.js +1 -1
- package/dist/cdn/foxy-webhook-form.js +1 -1
- package/dist/cdn/foxy-webhook-log-card.js +1 -1
- package/dist/cdn/foxy-webhook-status-card.js +1 -1
- package/dist/cdn/{shared-1d5baaf5.js → shared-0811ea40.js} +1 -1
- package/dist/cdn/{shared-80950330.js → shared-142df717.js} +1 -1
- package/dist/cdn/{shared-73b1e51b.js → shared-14713ead.js} +1 -1
- package/dist/cdn/{shared-efe0bfd2.js → shared-19b475f7.js} +1 -1
- package/dist/cdn/{shared-f9e4a1cc.js → shared-19c47f53.js} +1 -1
- package/dist/cdn/{shared-9154f04d.js → shared-1a814f90.js} +1 -1
- package/dist/cdn/shared-1b414966.js +1 -0
- package/dist/cdn/{shared-9c1f1c3b.js → shared-1e9df11c.js} +1 -1
- package/dist/cdn/shared-20841d9c.js +1 -0
- package/dist/cdn/shared-2652e98e.js +1 -0
- package/dist/cdn/{shared-9a3bf65c.js → shared-28cc8aa1.js} +1 -1
- package/dist/cdn/{shared-3b5a845e.js → shared-28fa98d7.js} +1 -1
- package/dist/cdn/{shared-7892fd3f.js → shared-2fbfbe12.js} +1 -1
- package/dist/cdn/shared-336e73ce.js +1 -0
- package/dist/cdn/{shared-b4b6bd8b.js → shared-33d770fe.js} +1 -1
- package/dist/cdn/{shared-a0309d5f.js → shared-34262bb8.js} +1 -1
- package/dist/cdn/shared-36f1e29f.js +1 -0
- package/dist/cdn/{shared-e2e5d7d0.js → shared-38e0a818.js} +1 -1
- package/dist/cdn/{shared-803be1e4.js → shared-3991076b.js} +1 -1
- package/dist/cdn/{shared-5d7439e3.js → shared-3baa9cc9.js} +1 -1
- package/dist/cdn/{shared-305a1f88.js → shared-3bb289b3.js} +1 -1
- package/dist/cdn/{shared-d81149d8.js → shared-3eca56ee.js} +1 -1
- package/dist/cdn/{shared-377cce47.js → shared-3fd75ee6.js} +1 -1
- package/dist/cdn/shared-453bc087.js +1 -0
- package/dist/cdn/{shared-486d4db3.js → shared-45649d84.js} +1 -1
- package/dist/cdn/{shared-b948488a.js → shared-48910b3f.js} +1 -1
- package/dist/cdn/{shared-8ff47d1a.js → shared-4cc16cdf.js} +1 -1
- package/dist/cdn/shared-50ef1d5a.js +1 -0
- package/dist/cdn/{shared-a0baefff.js → shared-53a5212e.js} +1 -1
- package/dist/cdn/shared-559b648a.js +1 -0
- package/dist/cdn/{shared-8df8e77c.js → shared-56741bad.js} +1 -1
- package/dist/cdn/{shared-2cab5d23.js → shared-59dfee2c.js} +1 -1
- package/dist/cdn/{shared-887ac0b0.js → shared-5b8c7250.js} +1 -1
- package/dist/cdn/{shared-ce05e482.js → shared-5dbd66e3.js} +1 -1
- package/dist/cdn/{shared-b5e048f5.js → shared-6262e0d6.js} +1 -1
- package/dist/cdn/{shared-3eac4b7c.js → shared-62ee726e.js} +1 -1
- package/dist/cdn/{shared-3a91efdc.js → shared-760a2243.js} +1 -1
- package/dist/cdn/{shared-f6416c66.js → shared-7b6a899b.js} +1 -1
- package/dist/cdn/{shared-6c167083.js → shared-8ec1b077.js} +1 -1
- package/dist/cdn/{shared-65094878.js → shared-91483320.js} +1 -1
- package/dist/cdn/{shared-6a0e1b94.js → shared-98457d79.js} +3 -3
- package/dist/cdn/{shared-37a12ea3.js → shared-9f8b593b.js} +5 -5
- package/dist/cdn/{shared-faa174b6.js → shared-a08f594b.js} +1 -1
- package/dist/cdn/shared-a1bec4a0.js +1 -0
- package/dist/cdn/shared-a44fcc6a.js +1 -0
- package/dist/cdn/{shared-515003f6.js → shared-a8ae24f0.js} +1 -1
- package/dist/cdn/shared-ab1f5f1f.js +1 -0
- package/dist/cdn/{shared-9687ab7b.js → shared-affe06c0.js} +1 -1
- package/dist/cdn/{shared-afdf7b0c.js → shared-b48cd5d3.js} +1 -1
- package/dist/cdn/shared-b84996e5.js +1 -0
- package/dist/cdn/{shared-772990cd.js → shared-bc74cd11.js} +4 -4
- package/dist/cdn/{shared-2a678cc8.js → shared-be20875c.js} +1 -1
- package/dist/cdn/{shared-a95d3946.js → shared-c066b7fd.js} +1 -1
- package/dist/cdn/{shared-6cdfb858.js → shared-c3d6bcc0.js} +1 -1
- package/dist/cdn/{shared-f8e360e6.js → shared-c56c3e1e.js} +1 -1
- package/dist/cdn/{shared-db623837.js → shared-c59277a4.js} +1 -1
- package/dist/cdn/{shared-058530fc.js → shared-cb5305b9.js} +1 -1
- package/dist/cdn/{shared-19073761.js → shared-cf1965cb.js} +1 -1
- package/dist/cdn/{shared-0f92b865.js → shared-cfc6735e.js} +1 -1
- package/dist/cdn/{shared-b8f09caa.js → shared-d743ec15.js} +1 -1
- package/dist/cdn/{shared-a20ef119.js → shared-d8b880bb.js} +1 -1
- package/dist/cdn/shared-da3393a5.js +1 -0
- package/dist/cdn/{shared-adfa4b7a.js → shared-db17c9ee.js} +1 -1
- package/dist/cdn/{shared-99c53365.js → shared-dc6e5879.js} +1 -1
- package/dist/cdn/{shared-60497743.js → shared-e2a5457f.js} +1 -1
- package/dist/cdn/{shared-a5d6db21.js → shared-e9f51baa.js} +1 -1
- package/dist/cdn/{shared-0fd68dc0.js → shared-f410644a.js} +1 -1
- package/dist/cdn/{shared-8d8975d5.js → shared-f77994ad.js} +1 -1
- package/dist/cdn/{shared-0cf593c8.js → shared-fdf6df5c.js} +1 -1
- package/dist/cdn/translations/access-recovery-form/en.json +2 -1
- package/dist/cdn/translations/address-card/en.json +2 -1
- package/dist/cdn/translations/address-form/en.json +2 -1
- package/dist/cdn/translations/admin-subscription-card/en.json +3 -1
- package/dist/cdn/translations/admin-subscription-form/en.json +60 -25
- package/dist/cdn/translations/admin-transaction-card/en.json +2 -1
- package/dist/cdn/translations/applied-coupon-code-card/en.json +2 -1
- package/dist/cdn/translations/applied-coupon-code-form/en.json +2 -1
- package/dist/cdn/translations/applied-tax-card/en.json +2 -1
- package/dist/cdn/translations/attribute-card/en.json +2 -1
- package/dist/cdn/translations/attribute-form/en.json +2 -1
- package/dist/cdn/translations/billing-address-card/en.json +2 -1
- package/dist/cdn/translations/cancellation-form/en.json +2 -1
- package/dist/cdn/translations/cart-card/en.json +2 -1
- package/dist/cdn/translations/cart-form/en.json +48 -23
- package/dist/cdn/translations/client-card/en.json +2 -1
- package/dist/cdn/translations/client-form/en.json +2 -1
- package/dist/cdn/translations/coupon-card/en.json +2 -1
- package/dist/cdn/translations/coupon-code-card/en.json +2 -1
- package/dist/cdn/translations/coupon-code-form/en.json +4 -2
- package/dist/cdn/translations/coupon-codes-form/en.json +2 -1
- package/dist/cdn/translations/coupon-form/en.json +23 -10
- package/dist/cdn/translations/custom-field-card/en.json +2 -1
- package/dist/cdn/translations/custom-field-form/en.json +2 -1
- package/dist/cdn/translations/customer/en.json +35 -17
- package/dist/cdn/translations/customer-card/en.json +2 -1
- package/dist/cdn/translations/customer-form/en.json +2 -1
- package/dist/cdn/translations/customer-portal/en.json +29 -14
- package/dist/cdn/translations/customer-portal-settings-form/en.json +10 -5
- package/dist/cdn/translations/customers-table/en.json +1 -0
- package/dist/cdn/translations/discount-card/en.json +2 -1
- package/dist/cdn/translations/downloadable-card/en.json +2 -1
- package/dist/cdn/translations/downloadable-form/en.json +4 -2
- package/dist/cdn/translations/email-template-card/en.json +2 -1
- package/dist/cdn/translations/email-template-form/en.json +6 -3
- package/dist/cdn/translations/error-entry-card/en.json +2 -1
- package/dist/cdn/translations/experimental-add-to-cart-builder/en.json +18 -8
- package/dist/cdn/translations/filter-attribute-card/en.json +2 -1
- package/dist/cdn/translations/filter-attribute-form/en.json +2 -1
- package/dist/cdn/translations/generate-codes-form/en.json +2 -1
- package/dist/cdn/translations/gift-card-card/en.json +2 -1
- package/dist/cdn/translations/gift-card-code-card/en.json +2 -1
- package/dist/cdn/translations/gift-card-code-form/en.json +10 -5
- package/dist/cdn/translations/gift-card-code-log-card/en.json +2 -1
- package/dist/cdn/translations/gift-card-codes-form/en.json +2 -1
- package/dist/cdn/translations/gift-card-form/en.json +29 -13
- package/dist/cdn/translations/i18n-editor/en.json +2 -1
- package/dist/cdn/translations/integration-card/en.json +2 -1
- package/dist/cdn/translations/integration-form/en.json +2 -1
- package/dist/cdn/translations/item-card/en.json +2 -1
- package/dist/cdn/translations/item-category-card/en.json +2 -1
- package/dist/cdn/translations/item-category-form/en.json +11 -4
- package/dist/cdn/translations/item-form/en.json +19 -9
- package/dist/cdn/translations/item-option-form/en.json +2 -1
- package/dist/cdn/translations/native-integration-card/en.json +2 -1
- package/dist/cdn/translations/native-integration-form/en.json +6 -3
- package/dist/cdn/translations/passkey-card/en.json +2 -1
- package/dist/cdn/translations/passkey-form/en.json +2 -1
- package/dist/cdn/translations/payment-card/en.json +2 -1
- package/dist/cdn/translations/payment-method-card/en.json +7 -3
- package/dist/cdn/translations/payments-api-fraud-protection-card/en.json +2 -1
- package/dist/cdn/translations/payments-api-fraud-protection-form/en.json +4 -2
- package/dist/cdn/translations/payments-api-payment-method-card/en.json +2 -1
- package/dist/cdn/translations/payments-api-payment-method-form/en.json +3 -1
- package/dist/cdn/translations/payments-api-payment-preset-card/en.json +2 -1
- package/dist/cdn/translations/payments-api-payment-preset-form/en.json +10 -5
- package/dist/cdn/translations/report-form/en.json +2 -1
- package/dist/cdn/translations/reports-table/en.json +4 -2
- package/dist/cdn/translations/shipment-card/en.json +2 -1
- package/dist/cdn/translations/shipping-container-card/en.json +2 -1
- package/dist/cdn/translations/shipping-drop-type-card/en.json +2 -1
- package/dist/cdn/translations/shipping-method-card/en.json +2 -1
- package/dist/cdn/translations/shipping-service-card/en.json +2 -1
- package/dist/cdn/translations/sign-in-form/en.json +2 -1
- package/dist/cdn/translations/spinner/en.json +2 -0
- package/dist/cdn/translations/store-card/en.json +2 -1
- package/dist/cdn/translations/store-form/en.json +2 -1
- package/dist/cdn/translations/store-shipping-method-form/en.json +21 -9
- package/dist/cdn/translations/store-transaction-folder-card/en.json +2 -1
- package/dist/cdn/translations/store-transaction-folder-form/en.json +2 -1
- package/dist/cdn/translations/subscription-card/en.json +2 -1
- package/dist/cdn/translations/subscription-form/en.json +12 -6
- package/dist/cdn/translations/subscription-settings-form/en.json +2 -1
- package/dist/cdn/translations/subscriptions-table/en.json +2 -1
- package/dist/cdn/translations/tax-card/en.json +2 -1
- package/dist/cdn/translations/tax-form/en.json +10 -3
- package/dist/cdn/translations/template-config-form/en.json +2 -1
- package/dist/cdn/translations/template-form/en.json +4 -2
- package/dist/cdn/translations/template-set-card/en.json +2 -1
- package/dist/cdn/translations/template-set-form/en.json +8 -4
- package/dist/cdn/translations/transaction/en.json +51 -21
- package/dist/cdn/translations/transaction-card/en.json +2 -1
- package/dist/cdn/translations/transactions-table/en.json +2 -1
- package/dist/cdn/translations/update-payment-method-form/en.json +5 -2
- package/dist/cdn/translations/user-card/en.json +2 -1
- package/dist/cdn/translations/user-form/en.json +2 -1
- package/dist/cdn/translations/user-invitation-card/en.json +42 -12
- package/dist/cdn/translations/user-invitation-form/en.json +65 -9
- package/dist/cdn/translations/users-table/en.json +4 -2
- package/dist/cdn/translations/webhook-card/en.json +1 -0
- package/dist/cdn/translations/webhook-form/en.json +4 -1
- package/dist/cdn/translations/webhook-log-card/en.json +1 -0
- package/dist/cdn/translations/webhook-status-card/en.json +1 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +1 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +17 -10
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.d.ts +3 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js +68 -26
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js.map +1 -1
- package/dist/elements/internal/InternalCard/InternalCard.js +17 -7
- package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
- package/dist/elements/internal/InternalForm/InternalForm.js +4 -2
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +2 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
- package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js +17 -4
- package/dist/elements/internal/InternalPostActionControl/InternalPostActionControlDialog.js.map +1 -1
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +24 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/public/AddressCard/AddressCard.d.ts +2 -0
- package/dist/elements/public/AddressCard/AddressCard.js +4 -0
- package/dist/elements/public/AddressCard/AddressCard.js.map +1 -1
- package/dist/elements/public/AddressForm/AddressForm.d.ts +2 -0
- package/dist/elements/public/AddressForm/AddressForm.js +10 -0
- package/dist/elements/public/AddressForm/AddressForm.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.d.ts +2 -0
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js +39 -12
- package/dist/elements/public/AdminSubscriptionCard/AdminSubscriptionCard.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.d.ts +2 -0
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +15 -4
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.d.ts +3 -0
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js +11 -2
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js.map +1 -1
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.d.ts +3 -0
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js +11 -2
- package/dist/elements/public/AppliedCouponCodeCard/AppliedCouponCodeCard.js.map +1 -1
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.d.ts +2 -0
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js +11 -0
- package/dist/elements/public/AppliedCouponCodeForm/AppliedCouponCodeForm.js.map +1 -1
- package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.d.ts +2 -0
- package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js +10 -4
- package/dist/elements/public/AppliedTaxCard/AppliedTaxCard.js.map +1 -1
- package/dist/elements/public/AttributeCard/AttributeCard.js +1 -0
- package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
- package/dist/elements/public/CancellationForm/CancellationForm.d.ts +3 -0
- package/dist/elements/public/CancellationForm/CancellationForm.js +10 -1
- package/dist/elements/public/CancellationForm/CancellationForm.js.map +1 -1
- package/dist/elements/public/CartCard/CartCard.d.ts +4 -0
- package/dist/elements/public/CartCard/CartCard.js +28 -6
- package/dist/elements/public/CartCard/CartCard.js.map +1 -1
- package/dist/elements/public/CartForm/CartForm.d.ts +2 -0
- package/dist/elements/public/CartForm/CartForm.js +21 -0
- package/dist/elements/public/CartForm/CartForm.js.map +1 -1
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js +5 -2
- package/dist/elements/public/CartForm/internal/InternalCartFormCreateSessionAction/InternalCartFormCreateSessionAction.js.map +1 -1
- package/dist/elements/public/CollectionPage/CollectionPage.js +7 -1
- package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
- package/dist/elements/public/CollectionPages/CollectionPages.js +5 -2
- package/dist/elements/public/CollectionPages/CollectionPages.js.map +1 -1
- package/dist/elements/public/CouponCard/CouponCard.d.ts +2 -0
- package/dist/elements/public/CouponCard/CouponCard.js +4 -0
- package/dist/elements/public/CouponCard/CouponCard.js.map +1 -1
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.d.ts +3 -1
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.js +5 -1
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +3 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +7 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.d.ts +2 -0
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js +3 -0
- package/dist/elements/public/CouponCodesForm/CouponCodesForm.js.map +1 -1
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.d.ts +2 -0
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.js +10 -4
- package/dist/elements/public/CouponDetailCard/CouponDetailCard.js.map +1 -1
- package/dist/elements/public/CouponForm/CouponForm.d.ts +3 -0
- package/dist/elements/public/CouponForm/CouponForm.js +11 -0
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CustomFieldCard/CustomFieldCard.d.ts +2 -0
- package/dist/elements/public/CustomFieldCard/CustomFieldCard.js +4 -0
- package/dist/elements/public/CustomFieldCard/CustomFieldCard.js.map +1 -1
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.d.ts +2 -0
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js +4 -0
- package/dist/elements/public/CustomFieldForm/CustomFieldForm.js.map +1 -1
- package/dist/elements/public/Customer/Customer.d.ts +2 -0
- package/dist/elements/public/Customer/Customer.js +25 -2
- package/dist/elements/public/Customer/Customer.js.map +1 -1
- package/dist/elements/public/CustomerCard/CustomerCard.d.ts +2 -0
- package/dist/elements/public/CustomerCard/CustomerCard.js +4 -0
- package/dist/elements/public/CustomerCard/CustomerCard.js.map +1 -1
- package/dist/elements/public/CustomerForm/CustomerForm.d.ts +2 -0
- package/dist/elements/public/CustomerForm/CustomerForm.js +3 -0
- package/dist/elements/public/CustomerForm/CustomerForm.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.d.ts +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js +3 -0
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js.map +1 -1
- package/dist/elements/public/CustomersTable/CustomersTable.d.ts +2 -0
- package/dist/elements/public/CustomersTable/CustomersTable.js +3 -0
- package/dist/elements/public/CustomersTable/CustomersTable.js.map +1 -1
- package/dist/elements/public/DiscountCard/DiscountCard.d.ts +2 -0
- package/dist/elements/public/DiscountCard/DiscountCard.js +10 -4
- package/dist/elements/public/DiscountCard/DiscountCard.js.map +1 -1
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.d.ts +2 -0
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js +10 -4
- package/dist/elements/public/DiscountDetailCard/DiscountDetailCard.js.map +1 -1
- package/dist/elements/public/DownloadableCard/DownloadableCard.d.ts +2 -0
- package/dist/elements/public/DownloadableCard/DownloadableCard.js +3 -0
- package/dist/elements/public/DownloadableCard/DownloadableCard.js.map +1 -1
- package/dist/elements/public/DownloadableForm/DownloadableForm.d.ts +3 -0
- package/dist/elements/public/DownloadableForm/DownloadableForm.js +9 -0
- package/dist/elements/public/DownloadableForm/DownloadableForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.d.ts +2 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +3 -0
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.d.ts +3 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js +9 -0
- package/dist/elements/public/EmailTemplateForm/EmailTemplateForm.js.map +1 -1
- package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js +7 -2
- package/dist/elements/public/EmailTemplateForm/internal/InternalEmailTemplateFormAsyncAction/InternalEmailTemplateFormAsyncAction.js.map +1 -1
- package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.d.ts +5 -2
- package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js +13 -4
- package/dist/elements/public/ErrorEntryCard/ErrorEntryCard.js.map +1 -1
- package/dist/elements/public/ErrorEntryCard/ResourceViewer.js +1 -0
- package/dist/elements/public/ErrorEntryCard/ResourceViewer.js.map +1 -1
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.d.ts +3 -0
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js +34 -0
- package/dist/elements/public/ExperimentalAddToCartBuilder/ExperimentalAddToCartBuilder.js.map +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.d.ts +3 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +5 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js.map +1 -1
- package/dist/elements/public/FormDialog/FormDialog.js +1 -0
- package/dist/elements/public/FormDialog/FormDialog.js.map +1 -1
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.d.ts +2 -0
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js +9 -0
- package/dist/elements/public/GenerateCodesForm/GenerateCodesForm.js.map +1 -1
- package/dist/elements/public/GiftCardCard/GiftCardCard.d.ts +2 -0
- package/dist/elements/public/GiftCardCard/GiftCardCard.js +4 -0
- package/dist/elements/public/GiftCardCard/GiftCardCard.js.map +1 -1
- package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.d.ts +4 -1
- package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js +13 -3
- package/dist/elements/public/GiftCardCodeCard/GiftCardCodeCard.js.map +1 -1
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.d.ts +3 -0
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js +10 -0
- package/dist/elements/public/GiftCardCodeForm/GiftCardCodeForm.js.map +1 -1
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.d.ts +2 -1
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js +10 -3
- package/dist/elements/public/GiftCardCodeLogCard/GiftCardCodeLogCard.js.map +1 -1
- package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.d.ts +2 -0
- package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js +3 -0
- package/dist/elements/public/GiftCardCodesForm/GiftCardCodesForm.js.map +1 -1
- package/dist/elements/public/GiftCardForm/GiftCardForm.d.ts +3 -0
- package/dist/elements/public/GiftCardForm/GiftCardForm.js +10 -0
- package/dist/elements/public/GiftCardForm/GiftCardForm.js.map +1 -1
- package/dist/elements/public/I18nEditor/I18nEditor.js +1 -0
- package/dist/elements/public/I18nEditor/I18nEditor.js.map +1 -1
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js +1 -1
- package/dist/elements/public/I18nEditor/internal/InternalI18nEditorEntry/InternalI18nEditorEntry.js.map +1 -1
- package/dist/elements/public/IntegrationCard/IntegrationCard.d.ts +3 -1
- package/dist/elements/public/IntegrationCard/IntegrationCard.js +5 -1
- package/dist/elements/public/IntegrationCard/IntegrationCard.js.map +1 -1
- package/dist/elements/public/IntegrationForm/IntegrationForm.d.ts +2 -0
- package/dist/elements/public/IntegrationForm/IntegrationForm.js +9 -6
- package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.d.ts +4 -0
- package/dist/elements/public/ItemCard/ItemCard.js +26 -7
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.d.ts +2 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js +3 -0
- package/dist/elements/public/ItemCategoryCard/ItemCategoryCard.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.d.ts +2 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +14 -0
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
- package/dist/elements/public/ItemForm/ItemForm.d.ts +3 -0
- package/dist/elements/public/ItemForm/ItemForm.js +26 -9
- package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.d.ts +2 -0
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js +21 -7
- package/dist/elements/public/ItemOptionCard/ItemOptionCard.js.map +1 -1
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.d.ts +2 -0
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.js +4 -0
- package/dist/elements/public/ItemOptionForm/ItemOptionForm.js.map +1 -1
- package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.d.ts +3 -1
- package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js +7 -1
- package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +3 -0
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +19 -0
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +9 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js +27 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/PasskeyCard/PasskeyCard.d.ts +2 -0
- package/dist/elements/public/PasskeyCard/PasskeyCard.js +3 -0
- package/dist/elements/public/PasskeyCard/PasskeyCard.js.map +1 -1
- package/dist/elements/public/PasskeyForm/PasskeyForm.d.ts +2 -0
- package/dist/elements/public/PasskeyForm/PasskeyForm.js +3 -0
- package/dist/elements/public/PasskeyForm/PasskeyForm.js.map +1 -1
- package/dist/elements/public/PaymentCard/PaymentCard.d.ts +2 -1
- package/dist/elements/public/PaymentCard/PaymentCard.js +11 -2
- package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
- package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.d.ts +3 -0
- package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js +14 -2
- package/dist/elements/public/PaymentMethodCard/PaymentMethodCard.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/available_fraud_protections.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/available_payment_methods.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protection.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/fraud_protections.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/payment_method.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/payment_methods.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/payment_preset.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js +2 -2
- package/dist/elements/public/PaymentsApi/api/handlers/payment_presets.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/utils.d.ts +5 -0
- package/dist/elements/public/PaymentsApi/api/utils.js +8 -1
- package/dist/elements/public/PaymentsApi/api/utils.js.map +1 -1
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.d.ts +2 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js +3 -0
- package/dist/elements/public/PaymentsApiFraudProtectionCard/PaymentsApiFraudProtectionCard.js.map +1 -1
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.d.ts +2 -0
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js +8 -1
- package/dist/elements/public/PaymentsApiFraudProtectionForm/PaymentsApiFraudProtectionForm.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.d.ts +3 -1
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js +5 -1
- package/dist/elements/public/PaymentsApiPaymentMethodCard/PaymentsApiPaymentMethodCard.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.d.ts +2 -0
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +14 -3
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.d.ts +2 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js +3 -0
- package/dist/elements/public/PaymentsApiPaymentPresetCard/PaymentsApiPaymentPresetCard.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.d.ts +3 -0
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js +22 -15
- package/dist/elements/public/PaymentsApiPaymentPresetForm/PaymentsApiPaymentPresetForm.js.map +1 -1
- package/dist/elements/public/ReportForm/ReportForm.d.ts +2 -0
- package/dist/elements/public/ReportForm/ReportForm.js +3 -0
- package/dist/elements/public/ReportForm/ReportForm.js.map +1 -1
- package/dist/elements/public/ReportsTable/ReportsTable.d.ts +2 -0
- package/dist/elements/public/ReportsTable/ReportsTable.js +3 -0
- package/dist/elements/public/ReportsTable/ReportsTable.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +2 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +11 -2
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.d.ts +2 -1
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js +21 -5
- package/dist/elements/public/ShippingMethodCard/ShippingMethodCard.js.map +1 -1
- package/dist/elements/public/Spinner/Spinner.d.ts +12 -0
- package/dist/elements/public/Spinner/Spinner.js +18 -2
- package/dist/elements/public/Spinner/Spinner.js.map +1 -1
- package/dist/elements/public/StoreCard/StoreCard.d.ts +2 -0
- package/dist/elements/public/StoreCard/StoreCard.js +3 -0
- package/dist/elements/public/StoreCard/StoreCard.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +2 -0
- package/dist/elements/public/StoreForm/StoreForm.js +7 -1
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +2 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +4 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.d.ts +2 -0
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js +3 -0
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js.map +1 -1
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.d.ts +2 -0
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js +4 -0
- package/dist/elements/public/SubscriptionCard/SubscriptionCard.js.map +1 -1
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.d.ts +2 -0
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js +15 -0
- package/dist/elements/public/SubscriptionForm/SubscriptionForm.js.map +1 -1
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.d.ts +2 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js +3 -0
- package/dist/elements/public/SubscriptionSettingsForm/SubscriptionSettingsForm.js.map +1 -1
- package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.d.ts +2 -0
- package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js +12 -2
- package/dist/elements/public/SubscriptionsTable/SubscriptionsTable.js.map +1 -1
- package/dist/elements/public/Table/Table.js +1 -0
- package/dist/elements/public/Table/Table.js.map +1 -1
- package/dist/elements/public/TaxCard/TaxCard.d.ts +3 -1
- package/dist/elements/public/TaxCard/TaxCard.js +5 -1
- package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.d.ts +3 -0
- package/dist/elements/public/TaxForm/TaxForm.js +7 -0
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +2 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +7 -1
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/TemplateForm.d.ts +3 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js +6 -0
- package/dist/elements/public/TemplateForm/TemplateForm.js.map +1 -1
- package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js +7 -2
- package/dist/elements/public/TemplateForm/internal/InternalTemplateFormAsyncAction/InternalTemplateFormAsyncAction.js.map +1 -1
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.d.ts +2 -0
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.js +3 -0
- package/dist/elements/public/TemplateSetCard/TemplateSetCard.js.map +1 -1
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +3 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +6 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +8 -0
- package/dist/elements/public/Transaction/Transaction.js +87 -40
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +8 -3
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.d.ts +2 -0
- package/dist/elements/public/TransactionCard/TransactionCard.js +7 -2
- package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
- package/dist/elements/public/TransactionsTable/TransactionsTable.d.ts +2 -0
- package/dist/elements/public/TransactionsTable/TransactionsTable.js +3 -0
- package/dist/elements/public/TransactionsTable/TransactionsTable.js.map +1 -1
- package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.d.ts +3 -0
- package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js +12 -0
- package/dist/elements/public/UpdatePaymentMethodForm/UpdatePaymentMethodForm.js.map +1 -1
- package/dist/elements/public/UserCard/UserCard.d.ts +2 -0
- package/dist/elements/public/UserCard/UserCard.js +3 -0
- package/dist/elements/public/UserCard/UserCard.js.map +1 -1
- package/dist/elements/public/UserForm/UserForm.d.ts +2 -0
- package/dist/elements/public/UserForm/UserForm.js +3 -0
- package/dist/elements/public/UserForm/UserForm.js.map +1 -1
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.d.ts +8 -0
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.js +63 -1
- package/dist/elements/public/UserInvitationCard/UserInvitationCard.js.map +1 -1
- package/dist/elements/public/UserInvitationCard/types.d.ts +3 -1
- package/dist/elements/public/UserInvitationCard/types.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.d.ts +36 -1
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js +149 -25
- package/dist/elements/public/UserInvitationForm/UserInvitationForm.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/index.d.ts +1 -0
- package/dist/elements/public/UserInvitationForm/index.js +1 -0
- package/dist/elements/public/UserInvitationForm/index.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js +3 -2
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormAsyncAction/InternalUserInvitationFormAsyncAction.js.map +1 -1
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.d.ts +101 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.js +373 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/InternalUserInvitationFormScopeControl.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.d.ts +6 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.js +8 -0
- package/dist/elements/public/UserInvitationForm/internal/InternalUserInvitationFormScopeControl/index.js.map +1 -0
- package/dist/elements/public/UserInvitationForm/types.d.ts +3 -1
- package/dist/elements/public/UserInvitationForm/types.js.map +1 -1
- package/dist/elements/public/UsersTable/UsersTable.js +1 -0
- package/dist/elements/public/UsersTable/UsersTable.js.map +1 -1
- package/dist/elements/public/WebhookCard/WebhookCard.d.ts +4 -1
- package/dist/elements/public/WebhookCard/WebhookCard.js +27 -11
- package/dist/elements/public/WebhookCard/WebhookCard.js.map +1 -1
- package/dist/elements/public/WebhookForm/WebhookForm.d.ts +2 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js +4 -0
- package/dist/elements/public/WebhookForm/WebhookForm.js.map +1 -1
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.d.ts +3 -1
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js +5 -1
- package/dist/elements/public/WebhookLogCard/WebhookLogCard.js.map +1 -1
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.d.ts +3 -1
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js +5 -1
- package/dist/elements/public/WebhookStatusCard/WebhookStatusCard.js.map +1 -1
- package/dist/mixins/configurable.d.ts +14 -0
- package/dist/mixins/configurable.js +72 -2
- package/dist/mixins/configurable.js.map +1 -1
- package/dist/mixins/themeable.js +6 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/dist/utils/group-invitation-scopes.d.ts +38 -0
- package/dist/utils/group-invitation-scopes.js +70 -0
- package/dist/utils/group-invitation-scopes.js.map +1 -0
- package/dist/utils/ignore-access-denied.d.ts +8 -0
- package/dist/utils/ignore-access-denied.js +19 -0
- package/dist/utils/ignore-access-denied.js.map +1 -0
- package/dist/utils/invitation-scope.d.ts +46 -0
- package/dist/utils/invitation-scope.js +119 -0
- package/dist/utils/invitation-scope.js.map +1 -0
- package/dist/utils/is-access-denied.d.ts +12 -0
- package/dist/utils/is-access-denied.js +37 -0
- package/dist/utils/is-access-denied.js.map +1 -0
- package/dist/utils/item-scope-collection.d.ts +22 -0
- package/dist/utils/item-scope-collection.js +38 -0
- package/dist/utils/item-scope-collection.js.map +1 -0
- package/dist/utils/native-integration-scope-collection.d.ts +6 -0
- package/dist/utils/native-integration-scope-collection.js +20 -0
- package/dist/utils/native-integration-scope-collection.js.map +1 -0
- package/dist/utils/user-scope.d.ts +40 -0
- package/dist/utils/user-scope.js +112 -0
- package/dist/utils/user-scope.js.map +1 -0
- package/package.json +1 -1
- package/dist/cdn/shared-23baaa34.js +0 -1
- package/dist/cdn/shared-276618b9.js +0 -1
- package/dist/cdn/shared-2e56ae76.js +0 -1
- package/dist/cdn/shared-37fe7ec4.js +0 -1
- package/dist/cdn/shared-41c9c53f.js +0 -1
- package/dist/cdn/shared-49e95410.js +0 -1
- package/dist/cdn/shared-4b3bdf49.js +0 -1
- package/dist/cdn/shared-b4816a44.js +0 -1
- package/dist/cdn/shared-c6c81c1b.js +0 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { canReadCollection, parseUserScope } from "./user-scope.js";
|
|
2
|
+
/**
|
|
3
|
+
* Items and their children (options, attributes, discounts, applied taxes, custom fields) follow
|
|
4
|
+
* `carts` while they belong to a cart and `transactions` once they belong to a transaction.
|
|
5
|
+
* Returns `null` when the data says neither, so nothing gets locked by a guess.
|
|
6
|
+
*/
|
|
7
|
+
export function getItemScopeCollection(data) {
|
|
8
|
+
if (data === null || data === void 0 ? void 0 : data._links['fx:cart'])
|
|
9
|
+
return 'carts';
|
|
10
|
+
if (data === null || data === void 0 ? void 0 : data._links['fx:transaction'])
|
|
11
|
+
return 'transactions';
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Item cards find their currency code on the transaction, on the cart or subscription transaction
|
|
16
|
+
* template, or on its template set. Returns `false` when the scope can read none of the sources
|
|
17
|
+
* that could still give a code, so the card renders amounts without a currency instead of loading
|
|
18
|
+
* forever. Always `true` when the scope does not restrict store collections.
|
|
19
|
+
*/
|
|
20
|
+
export function canReadItemCurrency(scope, data, cart) {
|
|
21
|
+
var _a;
|
|
22
|
+
if (!parseUserScope(scope))
|
|
23
|
+
return true;
|
|
24
|
+
const can = (collection) => canReadCollection(scope, collection);
|
|
25
|
+
const links = (_a = data === null || data === void 0 ? void 0 : data._links) !== null && _a !== void 0 ? _a : {};
|
|
26
|
+
if (links['fx:transaction'] && can('transactions'))
|
|
27
|
+
return true;
|
|
28
|
+
const isCartReadable = can('carts') && (!!links['fx:cart'] || (!!links['fx:subscription'] && can('subscriptions')));
|
|
29
|
+
if (!isCartReadable)
|
|
30
|
+
return false;
|
|
31
|
+
if (!cart || cart.currency_code)
|
|
32
|
+
return true;
|
|
33
|
+
if (!can('templates'))
|
|
34
|
+
return false;
|
|
35
|
+
// An empty template set URI means the store's default set, found through the store.
|
|
36
|
+
return cart.template_set_uri !== '' || can('stores');
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=item-scope-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"item-scope-collection.js","sourceRoot":"","sources":["../../src/utils/item-scope-collection.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,wBAAqB;AAIjE;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAU;IAC/C,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAC,SAAS;QAAG,OAAO,OAAO,CAAC;IAC5C,IAAI,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,CAAC,gBAAgB;QAAG,OAAO,cAAc,CAAC;IAC1D,OAAO,IAAI,CAAC;AACd,CAAC;AAID;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CACjC,KAAgC,EAChC,IAAU,EACV,IAAU;;IAEV,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAExC,MAAM,GAAG,GAAG,CAAC,UAA2B,EAAE,EAAE,CAAC,iBAAiB,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAClF,MAAM,KAAK,SAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,MAAM,mCAAI,EAAE,CAAC;IACjC,IAAI,KAAK,CAAC,gBAAgB,CAAC,IAAI,GAAG,CAAC,cAAc,CAAC;QAAE,OAAO,IAAI,CAAC;IAEhE,MAAM,cAAc,GAClB,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,iBAAiB,CAAC,IAAI,GAAG,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;IAE/F,IAAI,CAAC,cAAc;QAAE,OAAO,KAAK,CAAC;IAClC,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAC7C,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC;QAAE,OAAO,KAAK,CAAC;IAEpC,oFAAoF;IACpF,OAAO,IAAI,CAAC,gBAAgB,KAAK,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC;AACvD,CAAC","sourcesContent":["import type { ScopeCollection } from './user-scope';\n\nimport { canReadCollection, parseUserScope } from './user-scope';\n\ntype Data = { _links: Record<string, unknown> } | null | undefined;\n\n/**\n * Items and their children (options, attributes, discounts, applied taxes, custom fields) follow\n * `carts` while they belong to a cart and `transactions` once they belong to a transaction.\n * Returns `null` when the data says neither, so nothing gets locked by a guess.\n */\nexport function getItemScopeCollection(data: Data): ScopeCollection | null {\n if (data?._links['fx:cart']) return 'carts';\n if (data?._links['fx:transaction']) return 'transactions';\n return null;\n}\n\ntype Cart = { currency_code?: string; template_set_uri?: string } | null | undefined;\n\n/**\n * Item cards find their currency code on the transaction, on the cart or subscription transaction\n * template, or on its template set. Returns `false` when the scope can read none of the sources\n * that could still give a code, so the card renders amounts without a currency instead of loading\n * forever. Always `true` when the scope does not restrict store collections.\n */\nexport function canReadItemCurrency(\n scope: string | null | undefined,\n data: Data,\n cart: Cart\n): boolean {\n if (!parseUserScope(scope)) return true;\n\n const can = (collection: ScopeCollection) => canReadCollection(scope, collection);\n const links = data?._links ?? {};\n if (links['fx:transaction'] && can('transactions')) return true;\n\n const isCartReadable =\n can('carts') && (!!links['fx:cart'] || (!!links['fx:subscription'] && can('subscriptions')));\n\n if (!isCartReadable) return false;\n if (!cart || cart.currency_code) return true;\n if (!can('templates')) return false;\n\n // An empty template set URI means the store's default set, found through the store.\n return cart.template_set_uri !== '' || can('stores');\n}\n"]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ScopeCollection } from './user-scope';
|
|
2
|
+
/**
|
|
3
|
+
* Native integrations are gated by the collection of their provider. Returns `null` for other
|
|
4
|
+
* providers, so nothing gets locked by a guess.
|
|
5
|
+
*/
|
|
6
|
+
export declare function getNativeIntegrationScopeCollection(provider: string | null | undefined): ScopeCollection | null;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
const PROVIDER_COLLECTIONS = new Map([
|
|
2
|
+
['webflow', 'webhooks'],
|
|
3
|
+
['zapier', 'webhooks'],
|
|
4
|
+
['webhook', 'webhooks'],
|
|
5
|
+
['avalara', 'taxes'],
|
|
6
|
+
['taxjar', 'taxes'],
|
|
7
|
+
['onesource', 'taxes'],
|
|
8
|
+
['apple_pay', 'payment_settings'],
|
|
9
|
+
['google_pay', 'payment_settings'],
|
|
10
|
+
['fedex', 'shipping_integrations'],
|
|
11
|
+
]);
|
|
12
|
+
/**
|
|
13
|
+
* Native integrations are gated by the collection of their provider. Returns `null` for other
|
|
14
|
+
* providers, so nothing gets locked by a guess.
|
|
15
|
+
*/
|
|
16
|
+
export function getNativeIntegrationScopeCollection(provider) {
|
|
17
|
+
var _a;
|
|
18
|
+
return (_a = PROVIDER_COLLECTIONS.get(provider !== null && provider !== void 0 ? provider : '')) !== null && _a !== void 0 ? _a : null;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=native-integration-scope-collection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"native-integration-scope-collection.js","sourceRoot":"","sources":["../../src/utils/native-integration-scope-collection.ts"],"names":[],"mappings":"AAEA,MAAM,oBAAoB,GAAG,IAAI,GAAG,CAA0B;IAC5D,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,QAAQ,EAAE,UAAU,CAAC;IACtB,CAAC,SAAS,EAAE,UAAU,CAAC;IACvB,CAAC,SAAS,EAAE,OAAO,CAAC;IACpB,CAAC,QAAQ,EAAE,OAAO,CAAC;IACnB,CAAC,WAAW,EAAE,OAAO,CAAC;IACtB,CAAC,WAAW,EAAE,kBAAkB,CAAC;IACjC,CAAC,YAAY,EAAE,kBAAkB,CAAC;IAClC,CAAC,OAAO,EAAE,uBAAuB,CAAC;CACnC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,UAAU,mCAAmC,CACjD,QAAmC;;IAEnC,aAAO,oBAAoB,CAAC,GAAG,CAAC,QAAQ,aAAR,QAAQ,cAAR,QAAQ,GAAI,EAAE,CAAC,mCAAI,IAAI,CAAC;AAC1D,CAAC","sourcesContent":["import type { ScopeCollection } from './user-scope';\n\nconst PROVIDER_COLLECTIONS = new Map<string, ScopeCollection>([\n ['webflow', 'webhooks'],\n ['zapier', 'webhooks'],\n ['webhook', 'webhooks'],\n ['avalara', 'taxes'],\n ['taxjar', 'taxes'],\n ['onesource', 'taxes'],\n ['apple_pay', 'payment_settings'],\n ['google_pay', 'payment_settings'],\n ['fedex', 'shipping_integrations'],\n]);\n\n/**\n * Native integrations are gated by the collection of their provider. Returns `null` for other\n * providers, so nothing gets locked by a guess.\n */\nexport function getNativeIntegrationScopeCollection(\n provider: string | null | undefined\n): ScopeCollection | null {\n return PROVIDER_COLLECTIONS.get(provider ?? '') ?? null;\n}\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { COLLECTIONS } from './group-invitation-scopes';
|
|
2
|
+
/** `users` is not an invitation collection, but `user_full_access` grants it. */
|
|
3
|
+
export declare type ScopeCollection = (typeof COLLECTIONS)[number] | 'users';
|
|
4
|
+
export declare type UserScope = {
|
|
5
|
+
canRead(collection: ScopeCollection): boolean;
|
|
6
|
+
canWrite(collection: ScopeCollection): boolean;
|
|
7
|
+
canResend(collection: ScopeCollection): boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare type ScopeRule = {
|
|
10
|
+
/** Control path (as used by `hiddencontrols` / `readonlycontrols`) this rule applies to. */
|
|
11
|
+
path: string;
|
|
12
|
+
collection: ScopeCollection;
|
|
13
|
+
/** Permission required to show the control. Defaults to `read`. */
|
|
14
|
+
need?: 'read' | 'write' | 'resend';
|
|
15
|
+
/** Show the control, but make it readonly when the user cannot write the collection. */
|
|
16
|
+
readonlyIfNoWrite?: boolean;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Parses a space-separated API token scope. Returns `null` when the scope does not restrict
|
|
20
|
+
* store collections (no scope, `store_full_access`, or no collection tokens), meaning the UI
|
|
21
|
+
* must stay unchanged.
|
|
22
|
+
*/
|
|
23
|
+
export declare function parseUserScope(scope: string | null | undefined): UserScope | null;
|
|
24
|
+
/**
|
|
25
|
+
* Returns `true` when the scope can read the collection, or when the scope does not restrict
|
|
26
|
+
* store collections at all (unset, `store_full_access`, no collection tokens).
|
|
27
|
+
*/
|
|
28
|
+
export declare function canReadCollection(scope: string | null | undefined, collection: ScopeCollection): boolean;
|
|
29
|
+
/** Turns scope rules into control selectors to hide or make readonly. */
|
|
30
|
+
export declare function getScopeSelectors(scope: UserScope | null, rules: ScopeRule[], own: ScopeCollection | null): {
|
|
31
|
+
hidden: string[];
|
|
32
|
+
readonly: string[];
|
|
33
|
+
readonlyAll: boolean;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Removes the zoom paths the scope can't read from a URL. The API denies the whole request
|
|
37
|
+
* when one zoomed resource can't be read. Returns the URL unchanged when the scope does not
|
|
38
|
+
* restrict store collections.
|
|
39
|
+
*/
|
|
40
|
+
export declare function filterZoom(url: string, scope: string | null | undefined): string;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { COLLECTIONS } from "./group-invitation-scopes.js";
|
|
2
|
+
/**
|
|
3
|
+
* Parses a space-separated API token scope. Returns `null` when the scope does not restrict
|
|
4
|
+
* store collections (no scope, `store_full_access`, or no collection tokens), meaning the UI
|
|
5
|
+
* must stay unchanged.
|
|
6
|
+
*/
|
|
7
|
+
export function parseUserScope(scope) {
|
|
8
|
+
const tokens = new Set((scope !== null && scope !== void 0 ? scope : '').split(/\s+/).filter(token => token.length > 0));
|
|
9
|
+
if (tokens.has('store_full_access'))
|
|
10
|
+
return null;
|
|
11
|
+
const isStoreScoped = COLLECTIONS.some(c => tokens.has(`${c}_read`) || tokens.has(`${c}_write`) || tokens.has(`${c}_resend`));
|
|
12
|
+
if (!isStoreScoped)
|
|
13
|
+
return null;
|
|
14
|
+
const canWrite = (c) => tokens.has(`${c}_write`) || (c === 'users' && tokens.has('user_full_access'));
|
|
15
|
+
return {
|
|
16
|
+
canWrite,
|
|
17
|
+
// A write scope satisfies a read check in the API.
|
|
18
|
+
canRead: c => canWrite(c) || tokens.has(`${c}_read`),
|
|
19
|
+
canResend: c => tokens.has(`${c}_resend`),
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns `true` when the scope can read the collection, or when the scope does not restrict
|
|
24
|
+
* store collections at all (unset, `store_full_access`, no collection tokens).
|
|
25
|
+
*/
|
|
26
|
+
export function canReadCollection(scope, collection) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
return (_b = (_a = parseUserScope(scope)) === null || _a === void 0 ? void 0 : _a.canRead(collection)) !== null && _b !== void 0 ? _b : true;
|
|
29
|
+
}
|
|
30
|
+
/** Turns scope rules into control selectors to hide or make readonly. */
|
|
31
|
+
export function getScopeSelectors(scope, rules, own) {
|
|
32
|
+
const result = { hidden: [], readonly: [], readonlyAll: false };
|
|
33
|
+
if (!scope)
|
|
34
|
+
return result;
|
|
35
|
+
const check = { read: scope.canRead, write: scope.canWrite, resend: scope.canResend };
|
|
36
|
+
for (const { path, collection, need = 'read', readonlyIfNoWrite } of rules) {
|
|
37
|
+
if (!check[need](collection))
|
|
38
|
+
result.hidden.push(path);
|
|
39
|
+
else if (readonlyIfNoWrite && !scope.canWrite(collection))
|
|
40
|
+
result.readonly.push(path);
|
|
41
|
+
}
|
|
42
|
+
// Own collection with no read access is left alone: the API's "Access denied" covers it.
|
|
43
|
+
if (own && scope.canRead(own) && !scope.canWrite(own)) {
|
|
44
|
+
result.readonlyAll = true;
|
|
45
|
+
result.hidden.push('delete', 'create');
|
|
46
|
+
}
|
|
47
|
+
return result;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Collection that gates a zoomed rel. A rel that is not listed (items, discounts, applied
|
|
51
|
+
* taxes, attributes...) belongs to its parent, which is already readable, so it is kept.
|
|
52
|
+
*/
|
|
53
|
+
const ZOOM_COLLECTIONS = {
|
|
54
|
+
applied_gift_card_codes: 'gift_cards',
|
|
55
|
+
billing_addresses: 'transactions',
|
|
56
|
+
cart: 'carts',
|
|
57
|
+
coupon: 'coupons',
|
|
58
|
+
coupon_code: 'coupons',
|
|
59
|
+
customer: 'customers',
|
|
60
|
+
default_billing_address: 'customers',
|
|
61
|
+
default_payment_method: 'customers',
|
|
62
|
+
default_shipping_address: 'customers',
|
|
63
|
+
downloadable: 'downloadables',
|
|
64
|
+
email_template: 'templates',
|
|
65
|
+
folder: 'transactions',
|
|
66
|
+
gift_card: 'gift_cards',
|
|
67
|
+
gift_card_code: 'gift_cards',
|
|
68
|
+
gift_card_code_logs: 'gift_cards',
|
|
69
|
+
item_category: 'item_categories',
|
|
70
|
+
last_transaction: 'transactions',
|
|
71
|
+
original_transaction: 'transactions',
|
|
72
|
+
payments: 'transactions',
|
|
73
|
+
shipments: 'transactions',
|
|
74
|
+
store: 'stores',
|
|
75
|
+
subscription: 'subscriptions',
|
|
76
|
+
tax: 'taxes',
|
|
77
|
+
template_set: 'templates',
|
|
78
|
+
transaction: 'transactions',
|
|
79
|
+
transaction_template: 'carts',
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Removes the zoom paths the scope can't read from a URL. The API denies the whole request
|
|
83
|
+
* when one zoomed resource can't be read. Returns the URL unchanged when the scope does not
|
|
84
|
+
* restrict store collections.
|
|
85
|
+
*/
|
|
86
|
+
export function filterZoom(url, scope) {
|
|
87
|
+
var _a;
|
|
88
|
+
const userScope = parseUserScope(scope);
|
|
89
|
+
if (!userScope || !url.includes('zoom='))
|
|
90
|
+
return url;
|
|
91
|
+
const parsedURL = new URL(url);
|
|
92
|
+
const paths = ((_a = parsedURL.searchParams.get('zoom')) !== null && _a !== void 0 ? _a : '').split(',').filter(Boolean);
|
|
93
|
+
const isReadable = (rel) => {
|
|
94
|
+
const collection = ZOOM_COLLECTIONS[rel];
|
|
95
|
+
return !collection || userScope.canRead(collection);
|
|
96
|
+
};
|
|
97
|
+
// Keep the readable start of each path: `items:item_category` becomes `items`.
|
|
98
|
+
const trimmed = paths.map(path => {
|
|
99
|
+
const rels = path.split(':');
|
|
100
|
+
const end = rels.findIndex(rel => !isReadable(rel));
|
|
101
|
+
return end === -1 ? path : rels.slice(0, end).join(':');
|
|
102
|
+
});
|
|
103
|
+
const kept = Array.from(new Set(trimmed.filter(Boolean)));
|
|
104
|
+
if (kept.join(',') === paths.join(','))
|
|
105
|
+
return url;
|
|
106
|
+
if (kept.length)
|
|
107
|
+
parsedURL.searchParams.set('zoom', kept.join(','));
|
|
108
|
+
else
|
|
109
|
+
parsedURL.searchParams.delete('zoom');
|
|
110
|
+
return parsedURL.toString();
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=user-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-scope.js","sourceRoot":"","sources":["../../src/utils/user-scope.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,qCAAkC;AAqBxD;;;;GAIG;AACH,MAAM,UAAU,cAAc,CAAC,KAAgC;IAC7D,MAAM,MAAM,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,EAAE,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC;IACrF,IAAI,MAAM,CAAC,GAAG,CAAC,mBAAmB,CAAC;QAAE,OAAO,IAAI,CAAC;IAEjD,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CACpC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC,CACtF,CAAC;IACF,IAAI,CAAC,aAAa;QAAE,OAAO,IAAI,CAAC;IAEhC,MAAM,QAAQ,GAAG,CAAC,CAAkB,EAAE,EAAE,CACtC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,KAAK,OAAO,IAAI,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,CAAC;IAEhF,OAAO;QACL,QAAQ;QACR,mDAAmD;QACnD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;QACpD,SAAS,EAAE,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,SAAS,CAAC;KAC1C,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,KAAgC,EAChC,UAA2B;;IAE3B,mBAAO,cAAc,CAAC,KAAK,CAAC,0CAAE,OAAO,CAAC,UAAU,oCAAK,IAAI,CAAC;AAC5D,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,iBAAiB,CAC/B,KAAuB,EACvB,KAAkB,EAClB,GAA2B;IAE3B,MAAM,MAAM,GAAG,EAAE,MAAM,EAAE,EAAc,EAAE,QAAQ,EAAE,EAAc,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC;IACxF,IAAI,CAAC,KAAK;QAAE,OAAO,MAAM,CAAC;IAE1B,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC;IAEtF,KAAK,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,GAAG,MAAM,EAAE,iBAAiB,EAAE,IAAI,KAAK,EAAE;QAC1E,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC;YAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;aAClD,IAAI,iBAAiB,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,UAAU,CAAC;YAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACvF;IAED,yFAAyF;IACzF,IAAI,GAAG,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE;QACrD,MAAM,CAAC,WAAW,GAAG,IAAI,CAAC;QAC1B,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;KACxC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED;;;GAGG;AACH,MAAM,gBAAgB,GAAoC;IACxD,uBAAuB,EAAE,YAAY;IACrC,iBAAiB,EAAE,cAAc;IACjC,IAAI,EAAE,OAAO;IACb,MAAM,EAAE,SAAS;IACjB,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,WAAW;IACrB,uBAAuB,EAAE,WAAW;IACpC,sBAAsB,EAAE,WAAW;IACnC,wBAAwB,EAAE,WAAW;IACrC,YAAY,EAAE,eAAe;IAC7B,cAAc,EAAE,WAAW;IAC3B,MAAM,EAAE,cAAc;IACtB,SAAS,EAAE,YAAY;IACvB,cAAc,EAAE,YAAY;IAC5B,mBAAmB,EAAE,YAAY;IACjC,aAAa,EAAE,iBAAiB;IAChC,gBAAgB,EAAE,cAAc;IAChC,oBAAoB,EAAE,cAAc;IACpC,QAAQ,EAAE,cAAc;IACxB,SAAS,EAAE,cAAc;IACzB,KAAK,EAAE,QAAQ;IACf,YAAY,EAAE,eAAe;IAC7B,GAAG,EAAE,OAAO;IACZ,YAAY,EAAE,WAAW;IACzB,WAAW,EAAE,cAAc;IAC3B,oBAAoB,EAAE,OAAO;CAC9B,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,GAAW,EAAE,KAAgC;;IACtE,MAAM,SAAS,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,CAAC,SAAS,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,OAAO,CAAC;QAAE,OAAO,GAAG,CAAC;IAErD,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/B,MAAM,KAAK,GAAG,OAAC,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IACpF,MAAM,UAAU,GAAG,CAAC,GAAW,EAAE,EAAE;QACjC,MAAM,UAAU,GAAG,gBAAgB,CAAC,GAAG,CAAC,CAAC;QACzC,OAAO,CAAC,UAAU,IAAI,SAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;IACtD,CAAC,CAAC;IAEF,+EAA+E;IAC/E,MAAM,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QAC/B,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC7B,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IAC1D,CAAC,CAAC,CAAC;IAEH,MAAM,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IAC1D,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACnD,IAAI,IAAI,CAAC,MAAM;QAAE,SAAS,CAAC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;;QAC/D,SAAS,CAAC,YAAY,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAE3C,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;AAC9B,CAAC","sourcesContent":["import { COLLECTIONS } from './group-invitation-scopes';\n\n/** `users` is not an invitation collection, but `user_full_access` grants it. */\nexport type ScopeCollection = (typeof COLLECTIONS)[number] | 'users';\n\nexport type UserScope = {\n canRead(collection: ScopeCollection): boolean;\n canWrite(collection: ScopeCollection): boolean;\n canResend(collection: ScopeCollection): boolean;\n};\n\nexport type ScopeRule = {\n /** Control path (as used by `hiddencontrols` / `readonlycontrols`) this rule applies to. */\n path: string;\n collection: ScopeCollection;\n /** Permission required to show the control. Defaults to `read`. */\n need?: 'read' | 'write' | 'resend';\n /** Show the control, but make it readonly when the user cannot write the collection. */\n readonlyIfNoWrite?: boolean;\n};\n\n/**\n * Parses a space-separated API token scope. Returns `null` when the scope does not restrict\n * store collections (no scope, `store_full_access`, or no collection tokens), meaning the UI\n * must stay unchanged.\n */\nexport function parseUserScope(scope: string | null | undefined): UserScope | null {\n const tokens = new Set((scope ?? '').split(/\\s+/).filter(token => token.length > 0));\n if (tokens.has('store_full_access')) return null;\n\n const isStoreScoped = COLLECTIONS.some(\n c => tokens.has(`${c}_read`) || tokens.has(`${c}_write`) || tokens.has(`${c}_resend`)\n );\n if (!isStoreScoped) return null;\n\n const canWrite = (c: ScopeCollection) =>\n tokens.has(`${c}_write`) || (c === 'users' && tokens.has('user_full_access'));\n\n return {\n canWrite,\n // A write scope satisfies a read check in the API.\n canRead: c => canWrite(c) || tokens.has(`${c}_read`),\n canResend: c => tokens.has(`${c}_resend`),\n };\n}\n\n/**\n * Returns `true` when the scope can read the collection, or when the scope does not restrict\n * store collections at all (unset, `store_full_access`, no collection tokens).\n */\nexport function canReadCollection(\n scope: string | null | undefined,\n collection: ScopeCollection\n): boolean {\n return parseUserScope(scope)?.canRead(collection) ?? true;\n}\n\n/** Turns scope rules into control selectors to hide or make readonly. */\nexport function getScopeSelectors(\n scope: UserScope | null,\n rules: ScopeRule[],\n own: ScopeCollection | null\n): { hidden: string[]; readonly: string[]; readonlyAll: boolean } {\n const result = { hidden: [] as string[], readonly: [] as string[], readonlyAll: false };\n if (!scope) return result;\n\n const check = { read: scope.canRead, write: scope.canWrite, resend: scope.canResend };\n\n for (const { path, collection, need = 'read', readonlyIfNoWrite } of rules) {\n if (!check[need](collection)) result.hidden.push(path);\n else if (readonlyIfNoWrite && !scope.canWrite(collection)) result.readonly.push(path);\n }\n\n // Own collection with no read access is left alone: the API's \"Access denied\" covers it.\n if (own && scope.canRead(own) && !scope.canWrite(own)) {\n result.readonlyAll = true;\n result.hidden.push('delete', 'create');\n }\n\n return result;\n}\n\n/**\n * Collection that gates a zoomed rel. A rel that is not listed (items, discounts, applied\n * taxes, attributes...) belongs to its parent, which is already readable, so it is kept.\n */\nconst ZOOM_COLLECTIONS: Record<string, ScopeCollection> = {\n applied_gift_card_codes: 'gift_cards',\n billing_addresses: 'transactions',\n cart: 'carts',\n coupon: 'coupons',\n coupon_code: 'coupons',\n customer: 'customers',\n default_billing_address: 'customers',\n default_payment_method: 'customers',\n default_shipping_address: 'customers',\n downloadable: 'downloadables',\n email_template: 'templates',\n folder: 'transactions',\n gift_card: 'gift_cards',\n gift_card_code: 'gift_cards',\n gift_card_code_logs: 'gift_cards',\n item_category: 'item_categories',\n last_transaction: 'transactions',\n original_transaction: 'transactions',\n payments: 'transactions',\n shipments: 'transactions',\n store: 'stores',\n subscription: 'subscriptions',\n tax: 'taxes',\n template_set: 'templates',\n transaction: 'transactions',\n transaction_template: 'carts',\n};\n\n/**\n * Removes the zoom paths the scope can't read from a URL. The API denies the whole request\n * when one zoomed resource can't be read. Returns the URL unchanged when the scope does not\n * restrict store collections.\n */\nexport function filterZoom(url: string, scope: string | null | undefined): string {\n const userScope = parseUserScope(scope);\n if (!userScope || !url.includes('zoom=')) return url;\n\n const parsedURL = new URL(url);\n const paths = (parsedURL.searchParams.get('zoom') ?? '').split(',').filter(Boolean);\n const isReadable = (rel: string) => {\n const collection = ZOOM_COLLECTIONS[rel];\n return !collection || userScope.canRead(collection);\n };\n\n // Keep the readable start of each path: `items:item_category` becomes `items`.\n const trimmed = paths.map(path => {\n const rels = path.split(':');\n const end = rels.findIndex(rel => !isReadable(rel));\n return end === -1 ? path : rels.slice(0, end).join(':');\n });\n\n const kept = Array.from(new Set(trimmed.filter(Boolean)));\n if (kept.join(',') === paths.join(',')) return url;\n if (kept.length) parsedURL.searchParams.set('zoom', kept.join(','));\n else parsedURL.searchParams.delete('zoom');\n\n return parsedURL.toString();\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-65094878.js";import"./foxy-collection-page.js";import"./foxy-nucleon-element.js";import"./foxy-pagination.js";import"./shared-a95d3946.js";import{I as e}from"./shared-486d4db3.js";import{m as t,_ as i}from"./shared-8f9014ff.js";import{N as r}from"./shared-276618b9.js";import{i as s}from"./shared-53e42a77.js";import{c as n}from"./shared-4e709717.js";import{h as o,c as l}from"./shared-ba5c42c7.js";import{x as a}from"./shared-887ac0b0.js";let d,h,c,u,f,m=e=>e;let p,v=e=>e;customElements.define("foxy-internal-async-resource-link-list-control",class extends e{constructor(){super(...arguments),this.foreignKeyForUri=null,this.foreignKeyForId=null,this.ownKeyForUri=null,this.optionsHref=null,this.linksHref=null,this.embedKey=null,this.ownUri=null,this.limit=20,this.item=null,this.__getItemRenderer=t(((e,t)=>new Function("ctx",`return ctx.html\`\n <${null!=e?e:"foxy-null"}\n related=\${JSON.stringify(ctx.related)}\n parent=\${ctx.parent}\n infer=""\n ${t?".data=${ctx.data}":"href=${ctx.href}"}\n ...=\${ctx.spread(ctx.props)}\n >\n </${null!=e?e:"foxy-null"}>\``)),((...e)=>e.join())),this.__renderItem=e=>{var t;const i=this.__getItemRenderer(this.item,!!e.data),r=e=>o(d||(d=m` <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)">${0}</div> `),e);if(!e.href||e.href.startsWith("foxy://"))return r(i(e));if(this.readonly)return r(i(e));const s=this.foreignKeyForUri,n=s?null===(t=this.__allLinks)||void 0===t?void 0:t.find((t=>t[s]===e.href)):void 0,l=this.disabled||!this.__allLinks||this.__isFetching;return r(o(h||(h=m` <vaadin-checkbox class="block foxy-internal-checkbox-style-0" ?disabled="${0}" ?checked="${0}" @change="${0}"> <div class="transition-opacity ${0}"> ${0} </div> </vaadin-checkbox> `),l,!!n,(t=>{var i,r,s;t.currentTarget.checked?this.__insertLink(null!==(r=null===(i=e.data)||void 0===i?void 0:i._links.self.href)&&void 0!==r?r:""):this.__deleteLink(null!==(s=null==n?void 0:n._links.self.href)&&void 0!==s?s:"")}),l?"opacity-50":"opacity-100",i(e)))},this.__isFetching=!1}static get properties(){return i(i({},super.properties),{},{foreignKeyForUri:{attribute:"foreign-key-for-uri"},foreignKeyForId:{attribute:"foreign-key-for-id"},ownKeyForUri:{attribute:"own-key-for-uri"},optionsHref:{attribute:"options-href"},linksHref:{attribute:"links-href"},embedKey:{attribute:"embed-key"},ownUri:{attribute:"own-uri"},limit:{type:Number},item:{},__isFetching:{attribute:!1}})}static get styles(){return[super.styles,l(c||(c=m`vaadin-checkbox::part(label){margin:0 0 0 calc(.625em + (var(--lumo-border-radius)/ 4) - 1px);align-self:center;flex:1}`))]}renderControl(){var e;let t;try{const i=new URL(null!==(e=this.optionsHref)&&void 0!==e?e:"");i.searchParams.set("limit",this.limit.toString()),t=i.toString()}catch(e){t=void 0}const i=this.__isFetching||!this.__allLinks;return o(u||(u=m` <div class="group"> <div class="mb-s" ?hidden="${0}"> <div class="flex justify-between font-medium text-l" ?hidden="${0}"> <span>${0}</span> <foxy-i18n class="text-m text-tertiary font-normal transition-opacity ${0}" infer="" key="${0}"> </foxy-i18n> </div> <div class="text-secondary text-s" ?hidden="${0}">${0}</div> </div> <foxy-pagination first="${0}" infer="pagination"> <foxy-collection-page infer="card" class="${0}" .item="${0}"> </foxy-collection-page> </foxy-pagination> <div class="mt-s text-s leading-xs text-error" ?hidden="${0}"> ${0} </div> ${0} </div> `),!this.label&&!this.helperText,!this.label,this.label,i?"opacity-100":"opacity-0",this.__isFetching?"status_saving":"status_loading",!this.helperText,this.helperText,s(t),n({"block transition-colors divide-y rounded overflow-hidden":!0,"bg-contrast-5 divide-base":!0}),this.__renderItem,!this._errorMessage||this.disabled||this.readonly,this._errorMessage,this.__renderLinkResourceLoaders())}updated(e){var t,i;super.updated(e),e.has("item")&&(null===(i=(t=this.__getItemRenderer.cache).clear)||void 0===i||i.call(t))}async __insertLink(e){var t,i,s,n,o,l,a;this.__isFetching=!0;const d=new r.API(this),h=await d.fetch(null!==(t=this.linksHref)&&void 0!==t?t:"",{method:"POST",body:JSON.stringify({[null!==(i=this.foreignKeyForUri)&&void 0!==i?i:""]:e,[null!==(s=this.ownKeyForUri)&&void 0!==s?s:""]:this.ownUri})});if(h.ok){const e=await h.json(),t=await d.fetch(e._links.self.href);if(t.ok){const i=r.Rumour(null!==(o=null===(n=this.nucleon)||void 0===n?void 0:n.group)&&void 0!==o?o:""),s=await t.json();console.log({related:[null!==(l=this.linksHref)&&void 0!==l?l:""],source:e._links.self.href,data:s}),i.share({related:[null!==(a=this.linksHref)&&void 0!==a?a:""],source:e._links.self.href,data:s})}}this.__isFetching=!1}async __deleteLink(e){var t,i,s;this.__isFetching=!0;const n=new r.API(this);if((await n.fetch(e,{method:"DELETE"})).ok){r.Rumour(null!==(i=null===(t=this.nucleon)||void 0===t?void 0:t.group)&&void 0!==i?i:"").share({related:[null!==(s=this.linksHref)&&void 0!==s?s:""],source:e,data:null})}this.__isFetching=!1}__renderLinkResourceLoaders(){var e,t,i;const r=200,s=this.renderRoot.querySelector("[data-link-page]"),n=Number(null!==(t=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.total_items)&&void 0!==t?t:r),l=[];try{for(let e=0;e<Math.max(1,Math.ceil(n/r));e++){const t=new URL(null!==(i=this.linksHref)&&void 0!==i?i:"");t.searchParams.set("offset",String(e*r)),t.searchParams.set("limit",String(r)),l.push(t.toString())}}catch(e){}return l.map((e=>o(f||(f=m` <foxy-nucleon class="hidden" data-link-page infer="" href="${0}" @update="${0}"> </foxy-nucleon> `),e,(()=>this.requestUpdate()))))}get __allLinks(){var e,t;const i=this.embedKey;if(!i)return null;const r=this.renderRoot.querySelectorAll("[data-link-page]"),s=[];for(const n of r){const r=null===(t=null===(e=n.data)||void 0===e?void 0:e._embedded)||void 0===t?void 0:t[i];if(!r)return null;s.push(...r)}return s}});try{a("vaadin-checkbox",l(p||(p=v`:host(.foxy-internal-checkbox-style-0) label{display:flex}`)))}catch(e){}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{e,f as t,t as r,g as s,h as i,j as n,k as o,l as a,_ as l,m as h,n as u,o as c,R as d,F as f}from"./shared-8f9014ff.js";import{h as _,L as v}from"./shared-ba5c42c7.js";import{A as m}from"./shared-69c98b7b.js";import{U as p,a as g}from"./shared-cd96ff03.js";import{I as y}from"./shared-930e68b7.js";import{i as R,c as E,a as S}from"./shared-da4f9115.js";import{d as b}from"./shared-9496e995.js";import{s as w}from"./shared-791b4510.js";import{i as P}from"./shared-0e19bda5.js";var k=Date.now;var U,x,A,T=b?function(e,t){return b(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:R,F=(U=T,x=0,A=0,function(){var e=k(),t=16-(e-A);if(A=e,t>0){if(++x>=800)return arguments[0]}else x=0;return U.apply(void 0,arguments)});function H(e){return e!=e}function L(e,t,r){return t==t?function(e,t,r){for(var s=r-1,i=e.length;++s<i;)if(e[s]===t)return s;return-1}(e,t,r):function(e,t,r,s){for(var i=e.length,n=r+(s?1:-1);s?n--:++n<i;)if(t(e[n],n,e))return n;return-1}(e,H,r)}var j=Math.max;function N(e,t){return F(function(e,t,r){return t=j(void 0===t?e.length-1:t,0),function(){for(var s=arguments,i=-1,n=j(s.length-t,0),o=Array(n);++i<n;)o[i]=s[t+i];i=-1;for(var a=Array(t+1);++i<t;)a[i]=s[i];return a[t]=r(o),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,a)}}(e,t,R),e+"")}function C(t,r){return r.length<2?t:e(t,function(e,t,r){var s=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var n=Array(i);++s<i;)n[s]=e[s+t];return n}(r,0,-1))}function D(e,t,r,s){for(var i=r-1,n=e.length;++i<n;)if(s(e[i],t))return i;return-1}var I=Array.prototype.splice;var Q=N((function(e,t){return e&&e.length&&t&&t.length?function(e,t,r,n){var o=n?D:L,a=-1,l=t.length,h=e;for(e===t&&(t=E(t)),r&&(h=s(e,i(r)));++a<l;)for(var u=0,c=t[a],d=r?r(c):c;(u=o(h,d,u,n))>-1;)h!==e&&I.call(h,u,1),I.call(e,u,1);return e}(e,t):e})),O=0;function W(e){var t=++O;return n(e)+t}function $(e,s){return null==e||function(e,s){return null==(e=C(e,s=t(s,e)))||delete e[r((i=s,n=null==i?0:i.length,n?i[n-1]:void 0))];var i,n}(e,s)}function G(e,t){let r=null;return o(t).forEach((function(){var t,s,i,n,o,a,l,h,u,c,d;if(null===(i=null===(s=null===(t=this.node)||void 0===t?void 0:t._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const t=null===(a=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===a?void 0:a.href,s=new URL(null===(u=null===(h=null===(l=this.node)||void 0===l?void 0:l._links)||void 0===h?void 0:h.self)||void 0===u?void 0:u.href);if(s.searchParams.delete("zoom"),e===t||e===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(d=null===(c=this.node)||void 0===c?void 0:c._links)&&void 0!==d?d:{}).some((([t,s])=>{var i,n;if(s.href!==e)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[t];if(!o||!Array.isArray(o))return!1;const a=o.length<20?o.length:21,l=new URL(e),h=new URL(e);return l.searchParams.set("offset",o.length.toString()),h.searchParams.set("offset",a.toString()),r=JSON.stringify({returned_items:o.length,total_items:a,offset:0,limit:20,_embedded:{[t]:o},_links:{curies:this.node._links.curies,first:{href:e},last:{href:h.toString()},prev:{href:e},next:{href:l.toString()},self:{href:e}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}async function q(e,t){var r,s;if(t.in("busy"))return Promise.resolve(new Response(null,{status:500}));const i=new URL(e.url);i.search="",i.hash="";const n=i.toString().replace(`foxy://${t.virtualHost}/form/`,"").split("/").map(decodeURIComponent),o=a(t.form,n);let h,u=405;if("GET"===e.method)if(Array.isArray(o)){const i=parseInt(null!==(r=new URL(e.url).searchParams.get("offset"))&&void 0!==r?r:""),a=parseInt(null!==(s=new URL(e.url).searchParams.get("limit"))&&void 0!==s?s:""),c=isNaN(i)||i<0?0:i,d=isNaN(a)||a<0?20:a,f=o.slice(c,c+d).map(((e,r)=>{const s=["form",...n,String(r)],i=`foxy://${t.virtualHost}/${s.map(encodeURIComponent).join("/")}`;return l({_links:{self:{href:i}}},e)})),_=new URL(e.url);_.searchParams.set("offset","0"),_.searchParams.set("limit",String(d));const v=new URL(e.url);v.searchParams.set("offset",String(Math.max(0,c-d))),v.searchParams.set("limit",String(d));const m=new URL(e.url);m.searchParams.set("offset",String(Math.min(o.length,c+d))),m.searchParams.set("limit",String(d));const p=new URL(e.url);p.searchParams.set("offset",String(Math.max(0,o.length-d))),p.searchParams.set("limit",String(d)),u=200,h={returned_items:f.length,total_items:o.length,offset:c,limit:d,_embedded:{"fx:slice":f},_links:{first:{href:_.toString()},last:{href:p.toString()},prev:{href:v.toString()},next:{href:m.toString()},self:{href:e.url}}}}else u=200,h=l({_links:{self:{href:e.url}}},o);if("POST"===e.method){const r=await e.json(),s=S(t.form),i=a(s,n).push(r)-1;t.edit(s);const o=["form",...n,String(i)].map(encodeURIComponent).join("/");u=200,h={_links:{self:{href:`foxy://${t.virtualHost}/${o}`}},message:"Resource created successfully."}}if("PATCH"===e.method){const r=S(t.form),s=l(l({},a(r,n)),await e.json());t.edit(w(r,n,s)),u=200,h=l({_links:{self:{href:e.url}}},s)}if("DELETE"===e.method){const r=S(t.form),s=a(r,n.slice(0,-1));Array.isArray(s)?Q(s,a(r,n)):$(r,n),t.edit(r),u=200,h={_links:{self:{href:e.url}},message:"Resource deleted successfully."}}return Promise.resolve(new Response(JSON.stringify(h),{status:u}))}let M,J=e=>e;class V extends(y(v)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.virtualHost=W("nucleon-"),this.__group="",this.__href=null,this.__unsubscribeFromRumour=null,this.__fetchEventQueue=[],this.__service=P(u.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:c({errors:e=>{const t=this.constructor.v8n,r=l(l({},e.data),e.edits);return t.map((e=>e(r,this))).filter((e=>"string"==typeof e)).filter(((e,t,r)=>r.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},virtualHost:{attribute:"virtual-host"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.failure)&&void 0!==t?t:null}get errors(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.errors)&&void 0!==t?t:[]}get form(){var e,t;const{data:r,edits:s}=null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context)&&void 0!==t?t:{};return l(l({},r),s)}get data(){var e,t;return null!==(t=null===(e=this.__service.state)||void 0===e?void 0:e.context.data)&&void 0!==t?t:null}set data(e){var t,r,s;this.__destroyRumour(),this.__href=null!==(s=null===(r=null===(t=null==e?void 0:e._links)||void 0===t?void 0:t.self)||void 0===r?void 0:r.href)&&void 0!==s?s:null,this.__service.send({type:"SET_DATA",data:e}),e&&this.__createRumour()}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e;return null!==(e=this.__href)&&void 0!==e?e:""}set href(e){this.__href=e,e?this.__service.send({type:"FETCH"}):this.data=null}in(e){var t;return!!(null===(t=this.__service.state)||void 0===t?void 0:t.matches(e))}undo(){this.__service.send({type:"UNDO"})}edit(e){this.__service.send({type:"EDIT",data:e})}submit(e=!0){e&&this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),r=this.in({idle:{template:{clean:"valid"}}}),s=this.in({idle:{snapshot:{clean:"valid"}}});return r||e||(s||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,r=["reportValidity","validate"];for(const e of r)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return _(M||(M=J`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&!this.data&&this.__service.send({type:"FETCH"}),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new p)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new p)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(r=e.get("lang"))&&void 0!==r?r:"")}async _fetch(...e){const t=await new m(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e,t){let r;this.__destroyRumour();try{const s=JSON.stringify(e),i=V.Rumour(this.group),n=await this._fetch(this.parent,{body:s,method:"POST"});if("action"===(null==t?void 0:t.mode))r=n,i.share({related:this.related,source:"https://nucleon.element/void",data:null});else{const e=new URL(n._links.self.href),t=new URL(this.parent).searchParams.get("zoom");t&&e.searchParams.set("zoom",t);const s=e.toString();r=await this._fetch(s),this.__href=s,i.share({related:[...this.related,this.parent],source:r._links.self.href,data:r})}}finally{this.__createRumour()}return r}async _sendGet(){let e;this.__destroyRumour();try{const t="REFRESH"===this.__service.state.event.type?{"cache-control":"no-cache"}:void 0;e=await this._fetch(this.href,{headers:t})}finally{this.__createRumour()}return e}async _sendPatch(e){let t;this.__destroyRumour();try{const r=JSON.stringify(e);t=await this._fetch(this.href,{body:r,method:"PATCH"});V.Rumour(this.group).share({data:t,source:this.href,related:this.related})}finally{this.__createRumour()}return t}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=V.Rumour(this.group),t=[...this.related,this.parent];e.share({data:null,source:this.href,related:t})}finally{this.__createRumour()}return null}get __state(){const e=this.__service.state,t=null==e?void 0:e.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(null!=t?t:[])].join(" ")}__createService(){this.__service.onTransition((e=>{var t,r,s,i;if(!e.changed)return;let n;(null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?e.matches({idle:"template"})&&(n=g.ResourceDeleted):(null===(r=e.history)||void 0===r?void 0:r.matches({busy:"creating"}))?e.matches({idle:"snapshot"})&&(n=g.ResourceCreated):(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"updating"}))?e.matches({idle:{snapshot:"clean"}})&&(n=g.ResourceUpdated):(null===(i=e.history)||void 0===i?void 0:i.matches({busy:"fetching"}))&&e.matches({idle:{snapshot:"clean"}})&&(n=g.ResourceFetched),this.requestUpdate(),this.dispatchEvent(new p("update",{detail:{result:n}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new p)})),this.__service.start()}__createRumour(){this.__destroyRumour();const e=V.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this),this.__unsubscribeFromRumour=null}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const r=null===(t=this.__service.state)||void 0===t?void 0:t.context.data,s=r?e(r):r;if(s!==r&&(this.data=s,!s)){const e=g.ResourceDeleted,t=new p("update",{detail:{result:e}});this.dispatchEvent(t)}}catch(e){if(!(e instanceof d.UpdateError))throw e;this.refresh()}}__processFetchEventQueue(){const e=new V.API(this);this.__fetchEventQueue.forEach((t=>{const r=t.request;if(this.virtualHost&&r.url.startsWith(`foxy://${this.virtualHost}/form/`))return t.respondWith(q(r,this));let s=null;if("no-cache"!==t.request.headers.get("cache-control")){const e=G(r.url,this.data);e.ok&&(s=Promise.resolve(e),console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${r.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;",""))}t.respondWith(Promise.resolve(null!=s?s:e.fetch(r)))})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){var t;if(!(e instanceof f))return;if(e.defaultPrevented)return;if(e.composedPath()[0]===this)return;const{url:r,method:s}=e.request;if(r.startsWith("foxy://")){if(!this.virtualHost||!r.startsWith(`foxy://${this.virtualHost}/form/`))return;if("GET"!==s)return e.respondWith(q(e.request,this))}"GET"===s&&(e.preventDefault(),this.__fetchEventQueue.push(e),(null===(t=this.__service.state)||void 0===t?void 0:t.matches("busy"))||this.__processFetchEventQueue())}}V.UpdateEvent=p,V.Rumour=h((()=>new d)),V.API=m;export{V as N,$ as a,N as b,G as s,W as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{T as e}from"./shared-887ac0b0.js";import{N as t}from"./shared-276618b9.js";import{c as s}from"./shared-4e709717.js";import{h as i}from"./shared-ba5c42c7.js";let r,a,n=e=>e;class o extends(e(t)){renderBody(){return i(r||(r=n``))}render(){const e=this.in("fail")?"error":this.in({idle:"template"})?"empty":"busy";return i(a||(a=n` <div aria-busy="${0}" aria-live="polite" class="relative leading-s text-body text-m font-lumo"> <div class="${0}"> ${0} </div> <div class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> </div> </div> `),this.in("busy"),s({"transition duration-500 ease-in-out":!0,"opacity-0 pointer-events-none":!this.isBodyReady}),this.renderBody(),s({"transition duration-500 ease-in-out absolute inset-0 flex":!0,"items-center justify-center":!0,"opacity-0 pointer-events-none":this.isBodyReady}),"busy"===e?"no-label":"horizontal",e)}get isBodyReady(){return!!this.data}}export{o as I};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{I as e}from"./shared-2e56ae76.js";customElements.define("foxy-internal-card",e);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{B as e,_ as t}from"./shared-8f9014ff.js";import{h as r}from"./shared-ba5c42c7.js";import{i as s}from"./shared-53e42a77.js";let o,i,n=e=>e;const l=l=>class extends l{constructor(){super(...arguments),this.templates={},this.mode="production",this.readonly=!1,this.readonlyControls=e.False,this.disabled=!1,this.disabledControls=e.False,this.hidden=!1,this.hiddenControls=e.False,this.__observer=new MutationObserver((()=>this.__onMutation()))}static get inferredProperties(){return[...super.inferredProperties,"disabledSelector","readonlySelector","hiddenSelector","templates","disabled","readonly","hidden","mode"]}static get properties(){return t(t({},super.properties),{},{templates:{attribute:!1},mode:{type:String},readonly:{type:Boolean,reflect:!0},readonlyControls:{attribute:"readonlycontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},disabled:{type:Boolean,reflect:!0},disabledControls:{attribute:"disabledcontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())},hidden:{type:Boolean,reflect:!0},hiddenControls:{attribute:"hiddencontrols",converter:{fromAttribute:t=>new e(null!=t?t:"")},hasChanged:(e,t)=>e.toString()!==(null==t?void 0:t.toString())}})}get readonlySelector(){return this.readonly?e.True:this.readonlyControls}get disabledSelector(){return this.disabled?e.True:this.disabledControls}get hiddenSelector(){return this.hidden?e.True:this.hiddenControls}connectedCallback(){super.connectedCallback(),"development"===this.mode&&this.__observe()}disconnectedCallback(){super.disconnectedCallback(),this.__observer.disconnect()}firstUpdated(...e){super.firstUpdated(...e),"production"===this.mode&&this.compileTemplates()}updated(e){super.updated(e),this.style.display=this.hidden?"none":"",e.has("mode")&&(this.__observer.disconnect(),"development"===this.mode&&this.__observe())}compileTemplates(e=!1){const r=e?{}:t({},this.templates);Array.from(this.children).forEach((e=>{var t;if("template"!==e.localName)return;const s=null!==(t=e.getAttribute("slot"))&&void 0!==t?t:"default";try{const t=`return html\`${e.innerHTML}\``;r[s]=new Function("html","host",t)}catch(e){console.error(e)}})),this.templates=r}renderTemplateOrSlot(e,t){const l=null!=e?e:"default",d=this.templates[l];if(!d)return r(o||(o=n`<slot name="${0}"></slot>`),s(e));return r(i||(i=n` <foxy-internal-sandbox data-testid="${0}" .render="${0}"> </foxy-internal-sandbox> `),l,(()=>{try{const e=null!=t?t:this,s=new Proxy({},{get:(t,r)=>e[r]});return null==d?void 0:d(r,s)}catch(e){console.error(e)}}))}getNestedTemplates(e){const t={};return Object.entries(this.templates).forEach((([r,s])=>{if(r.startsWith(`${e}:`)){const o=r.replace(`${e}:`,"");t[o]=s}})),t}applyInferredProperties(t){if(super.applyInferredProperties(t),null===this.infer)return;const r=t.get("disabledSelector"),s=t.get("disabled"),o=t.get("readonlySelector"),i=t.get("readonly"),n=t.get("hiddenSelector"),l=t.get("hidden"),d=t.get("templates"),a=t.get("mode"),h=e.True.toString(),c=(e,t)=>e.toString()===h||null!=t&&t,u=t=>{var r;return null!==(r=this.infer?null==t?void 0:t.zoom(this.infer):t)&&void 0!==r?r:e.False};this.disabledControls=u(r),this.disabled=c(this.disabledControls,s),this.readonlyControls=u(o),this.readonly=c(this.readonlyControls,i),this.hiddenControls=u(n),this.hidden=c(this.hiddenControls,l),this.templates=null!=d?d:{},this.infer&&(this.templates=this.getNestedTemplates(this.infer)),this.mode=null!=a?a:"production"}__observe(){this.__observer.observe(this,{characterData:!0,attributes:!0,childList:!0,subtree:!0}),this.__onMutation()}__onMutation(){const e={characterData:!0,attributes:!0,childList:!0,subtree:!0};this.__observer.disconnect(),this.__observer.observe(this,e),Array.from(this.children).forEach((t=>{"template"===t.localName&&t.hasAttribute("slot")&&this.__observer.observe(t.content,e)})),this.compileTemplates(!0)}};export{l as C};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"./shared-8f9014ff.js";import{p as s}from"./shared-a95d3946.js";function t(t){var a;const n=s(t),o=null!==(a={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[n.units])&&void 0!==a?a:n.units;return r(r({},n),{},{units:o})}export{t as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-a20ef119.js";import{I as e}from"./shared-486d4db3.js";import"./shared-a95d3946.js";import{_ as t}from"./shared-8f9014ff.js";import{i as s}from"./shared-53e42a77.js";import{h as i,s as a}from"./shared-ba5c42c7.js";import{c as l}from"./shared-4e709717.js";let r,o,d,h,n=e=>e;customElements.define("foxy-internal-select-control",class extends e{constructor(){super(...arguments),this.options=[],this.layout=null,this.theme=null,this.__isErrorVisible=!1}static get properties(){return t(t({},super.properties),{},{options:{type:Array},layout:{},theme:{type:String},__isErrorVisible:{attribute:!1}})}renderControl(){var e;return"summary-item"===this.layout?this.__renderSummaryItemLayout():i(r||(r=n` <vaadin-combo-box item-value-path="value" item-label-path="label" error-message="${0}" item-id-path="value" helper-text="${0}" placeholder="${0}" label="${0}" class="w-full" theme="${0}" ?disabled="${0}" ?readonly="${0}" clear-button-visible .checkValidity="${0}" .items="${0}" .value="${0}" @change="${0}"> </vaadin-combo-box> `),s(this._errorMessage),this.helperText,this.placeholder,this.label,s(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled,this.readonly,this._checkValidity,this.options.map((e=>({label:"label"in e?this.t(e.label):e.rawLabel,value:e.value}))),this._value,(e=>{e.stopPropagation();const t=e.currentTarget;this._value=t.value,t.validate()}))}reportValidity(){this.__isErrorVisible=!0,super.reportValidity()}updated(e){super.updated(e);const t=this.renderRoot.querySelector("vaadin-combo-box");t&&t.value!==this._value&&(t.value=this._value)}__renderSummaryItemLayout(){const e=this.options.find((e=>e.value===this._value));return i(o||(o=n` <div class="leading-xs"> <div class="flex items-center gap-s"> <label class="text-m text-body flex-1 whitespace-nowrap" for="select"> ${0} </label> <div class="${0}"> <div class="flex items-center gap-xs min-w-0"> <div class="truncate min-w-0"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @blur="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} </select> </div> </div> <div style="max-width:32rem"> <p class="text-xs text-secondary">${0}</p> <p class="text-xs text-error" ?hidden="${0}"> ${0} </p> </div> </div> `),this.label,l({"relative rounded-s transition-colors transition-opacity min-w-0":!0,"focus-within-ring-2 focus-within-ring-primary-50":!this.disabled&&!this.readonly,"text-body hover-opacity-80 cursor-pointer":!this.disabled&&!this.readonly,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),e?"label"in e?this.t(e.label):e.rawLabel:this.placeholder,this.readonly?"":a(d||(d=n`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="flex-shrink-0" style="width: 1em; height: 1em; transform: scale(1.25)"><path fill-rule="evenodd" d="M10.53 3.47a.75.75 0 0 0-1.06 0L6.22 6.72a.75.75 0 0 0 1.06 1.06L10 5.06l2.72 2.72a.75.75 0 1 0 1.06-1.06l-3.25-3.25Zm-4.31 9.81 3.25 3.25a.75.75 0 0 0 1.06 0l3.25-3.25a.75.75 0 1 0-1.06-1.06L10 14.94l-2.72-2.72a.75.75 0 0 0-1.06 1.06Z" clip-rule="evenodd" /></svg>`)),l({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(()=>this.__isErrorVisible=!0),(e=>{e.stopPropagation(),this._value=e.target.value}),!e,this.placeholder,this.options.map((t=>i(h||(h=n` <option value="${0}" ?selected="${0}"> ${0} </option> `),t.value,e&&t.value===this._value,"label"in t?this.t(t.label):t.rawLabel))),this.helperText,!this.__isErrorVisible||this.disabled||this.readonly,this._errorMessage)}_handleHostClick(e){var t;if("summary-item"!==this.layout)return;const s=e.composedPath(),i=new Set(["SELECT","LABEL","BUTTON"]);s.some((e=>i.has(e.tagName)))||(null===(t=this.renderRoot.querySelector("select"))||void 0===t||t.focus(),super._handleHostClick(e))}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-a6b2bd14.js";import"./shared-e2e5d7d0.js";import"./shared-6c167083.js";import"./shared-f6416c66.js";import{I as e}from"./shared-2a678cc8.js";import{a as t}from"./shared-486d4db3.js";import"./shared-a95d3946.js";import{i as s}from"./shared-53e42a77.js";import{h as o}from"./shared-ba5c42c7.js";import{c as r,_ as n,B as i}from"./shared-8f9014ff.js";import{S as a,a as l}from"./shared-887ac0b0.js";import{v as d}from"./shared-b738ee96.js";import{c}from"./shared-4e709717.js";let h,p=e=>e;customElements.define("foxy-internal-customer-form-legal-notice-control",class extends t{renderControl(){var e,t;const r=this.nucleon;return o(h||(h=p` <p class="leading-s text-xs text-secondary"> <foxy-i18n infer="" key="text"></foxy-i18n> <a class="font-medium text-body rounded hover-underline focus-outline-none focus-ring-2 focus-ring-primary-50" target="_blank" href="${0}" rel="noopener noreferrer"> <foxy-i18n infer="" key="link"></foxy-i18n> </a> </p> `),s(null===(t=null===(e=null==r?void 0:r.settings)||void 0===e?void 0:e.tos_checkbox_settings)||void 0===t?void 0:t.url))}});var u=r((function(e){!function(){const t=[{id:0,value:"Too weak",minDiversity:0,minLength:0},{id:1,value:"Weak",minDiversity:2,minLength:6},{id:2,value:"Medium",minDiversity:4,minLength:8},{id:3,value:"Strong",minDiversity:4,minLength:10}],s=(e,s=t,o="!\"#$%&'()*+,-./:;<=>?@[\\\\\\]^_`{|}~")=>{let r=e||"";s[0].minDiversity=0,s[0].minLength=0;const n=[{regex:"[a-z]",message:"lowercase"},{regex:"[A-Z]",message:"uppercase"},{regex:"[0-9]",message:"number"}];o&&n.push({regex:`[${o}]`,message:"symbol"});let i={};i.contains=n.filter((e=>new RegExp(`${e.regex}`).test(r))).map((e=>e.message)),i.length=r.length;let a=s.filter((e=>i.contains.length>=e.minDiversity)).filter((e=>i.length>=e.minLength)).sort(((e,t)=>t.id-e.id)).map((e=>({id:e.id,value:e.value})));return Object.assign(i,a[0]),i};e.exports={passwordStrength:s,defaultOptions:t}}()}));let m,f,_=e=>e;const g=a(l(e,"customer-form")),x=u.passwordStrength;class v extends g{constructor(){super(...arguments),this.passwordless=!1,this.settings=null,this.__passwordGeneratorOptions={checkStrength:e=>x(e).id>=2},this.__isAnonymousGetValue=()=>{var e;return!1===(null===(e=this.form)||void 0===e?void 0:e.is_anonymous)?"false":"true"},this.__isAnonymousSetValue=e=>{const t="true"===e;this.edit({is_anonymous:t}),t&&this.form.password&&this.edit({password:""}),t&&this.form.password_old&&this.edit({password_old:""}),t&&this.form.forgot_password&&this.edit({forgot_password:""})},this.__isAnonymousOptions=[{value:"true",label:"option_true"},{value:"false",label:"option_false"}],this.__refreshInterval=null}static get scopedElements(){return{"foxy-internal-customer-form-legal-notice-control":customElements.get("foxy-internal-customer-form-legal-notice-control"),"foxy-internal-radio-group-control":customElements.get("foxy-internal-radio-group-control"),"foxy-internal-timestamps-control":customElements.get("foxy-internal-timestamps-control"),"foxy-internal-password-control":customElements.get("foxy-internal-password-control"),"foxy-internal-submit-control":customElements.get("foxy-internal-submit-control"),"foxy-internal-delete-control":customElements.get("foxy-internal-delete-control"),"foxy-internal-text-control":customElements.get("foxy-internal-text-control"),"foxy-internal-undo-control":customElements.get("foxy-internal-undo-control"),"foxy-copy-to-clipboard":customElements.get("foxy-copy-to-clipboard"),"foxy-spinner":customElements.get("foxy-spinner"),"vcf-tooltip":customElements.get("vcf-tooltip"),"foxy-i18n":customElements.get("foxy-i18n"),"h-captcha":customElements.get("h-captcha"),"vaadin-button":customElements.get("vaadin-button")}}static get properties(){return n(n({},super.properties),{},{passwordless:{type:Boolean},settings:{type:Object}})}static get v8n(){return[({password:e,_links:t,is_anonymous:s=!0},o)=>!!o.passwordless||(!!(t||s||e)||"password:v8n_required"),({password_old:e,password:t,_links:s},o)=>{var r;return!s||(void 0===(null===(r=o.settings)||void 0===r?void 0:r.sign_up)||(!(t&&!e)||"password-old:v8n_required"))},({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>!e||e.length<=50||"last-name:v8n_too_long",({password:e})=>!e||x(e).id>=2||"password:v8n_too_weak",({password:e})=>!e||e.length<=50||"password:v8n_too_long",({tax_id:e})=>!e||e.length<=50||"tax-id:v8n_too_long",({email:e})=>e&&e.length>0||"email:v8n_required",({email:e})=>!e||e.length<=100||"email:v8n_too_long",({email:e})=>!e||d(e)||"email:v8n_invalid_email"]}get hiddenSelector(){const e=new Set(super.hiddenSelector.toString().split(" "));return this.settings?(e.add("forgot-password"),e.add("is-anonymous"),this.form.password||e.add("password-old"),"none"===this.settings.tos_checkbox_settings.usage&&e.add("legal-notice")):(!1!==this.form.is_anonymous&&(e.add("forgot-password"),e.add("password")),e.add("password-old"),e.add("legal-notice")),this.href&&(e.add("is-anonymous"),e.add("legal-notice")),new i(Array.from(e).join(" ").trim())}get headerTitleOptions(){var e,t;const s=this.data;return!s||(null===(e=s.first_name)||void 0===e?void 0:e.trim())||(null===(t=s.last_name)||void 0===t?void 0:t.trim())?super.headerTitleOptions:n(n({},super.headerTitleOptions),{},{context:"no_name"})}get headerSubtitleKey(){var e;return(null===(e=this.data)||void 0===e?void 0:e.is_anonymous)?"subtitle_anonymous":"subtitle_registered"}get headerSubtitleOptions(){return n(n({},super.headerSubtitleOptions),{},{id:this.headerCopyIdValue})}disconnectedCallback(){super.disconnectedCallback();const e=this.__refreshInterval;e&&clearInterval(e)}connectedCallback(){super.connectedCallback();const e=setInterval((()=>this.requestUpdate()),6e4);this.__refreshInterval=e}renderBody(){var e,t,s,r;const n=this.hiddenSelector.matches("first-name",!0),i=this.hiddenSelector.matches("last-name",!0);return o(m||(m=_` ${0} <div class="${0}"> <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> </div> <foxy-internal-text-control helper-text="${0}" infer="email"> </foxy-internal-text-control> <foxy-internal-radio-group-control infer="is-anonymous" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-radio-group-control> <foxy-internal-password-control placeholder="${0}" helper-text="${0}" infer="password" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> <foxy-internal-password-control infer="password-old"></foxy-internal-password-control> <foxy-internal-password-control helper-text="${0}" infer="forgot-password" show-generator> </foxy-internal-password-control> <foxy-internal-text-control infer="tax-id"></foxy-internal-text-control> <foxy-internal-customer-form-legal-notice-control infer="legal-notice"> </foxy-internal-customer-form-legal-notice-control> ${0} ${0} `),this.renderHeader(),c({"grid-cols-2":!n&&!i,hidden:n&&i,"gap-m":!0,grid:!n||!i}),this.__emailHelperText,this.__isAnonymousGetValue,this.__isAnonymousSetValue,this.__isAnonymousOptions,this.__passwordPlaceholder,this.__passwordHelperText,this.__passwordGeneratorOptions,this.__forgotPasswordHelperText,!this.data&&(null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.enabled)&&"hcaptcha"===(null===(r=null===(s=this.settings)||void 0===s?void 0:s.sign_up)||void 0===r?void 0:r.verification.type)?o(f||(f=_` <h-captcha site-key="${0}" class="hidden" size="invisible" hl="${0}" @verified="${0}"> </h-captcha> `),this.settings.sign_up.verification.site_key,this.lang,(({token:e})=>{this.edit({verification:{type:"hcaptcha",token:e}}),super.submit()})):"",super.renderBody())}submit(){var e,t,s,o,r;"hcaptcha"!==(null===(s=null===(t=null===(e=this.settings)||void 0===e?void 0:e.sign_up)||void 0===t?void 0:t.verification)||void 0===s?void 0:s.type)||this.data?super.submit():(null===(o=this.__hcaptcha)||void 0===o||o.reset(),null===(r=this.__hcaptcha)||void 0===r||r.execute())}async _sendPatch(e){const t=await super._sendPatch(e);if(e.password){const e={key:"password_change_success",options:{email:t.email}};this.status=e}return t}async _sendGet(){return this.status=null,await super._sendGet()}async _fetch(...e){try{return await super._fetch(...e)}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw"Conflict"===t||t.startsWith("This email address is already in use")?["error:email_already_used"]:t.startsWith("Customer registration is disabled")?["error:registration_disabled"]:t.startsWith("Client verification failed")?["error:verification_failed"]:t.startsWith("Provided password is incorrect")?["error:old_password_incorrect"]:e}}get __forgotPasswordHelperText(){var e,t;const s=null===(e=this.data)||void 0===e?void 0:e.forgot_password_timestamp,o="forgot-password.helper_text";if((null===(t=this.data)||void 0===t?void 0:t.forgot_password)&&s){const e=new Date(new Date(s).getTime()+18e5),t=Math.floor((e.getTime()-Date.now())/1e3/60);return t<=0?this.t(`${o}_expired_on`,{expiresOn:e}):this.t(`${o}_expires_in`,{expiresInMin:`${t}minutes`})}return this.t(o)}get __passwordPlaceholder(){return this.data?this.t("password.placeholder_new"):this.t("password.placeholder")}get __passwordHelperText(){return this.data?this.t("password.helper_text_new"):this.t("password.helper_text")}get __emailHelperText(){var e;return(null===(e=this.data)||void 0===e?void 0:e.last_login_date)?this.t("email.helper_text_last_login_date",{date:this.data.last_login_date}):this.t("email.helper_text")}get __hcaptcha(){return this.renderRoot.querySelector("h-captcha")}}customElements.define("foxy-customer-form",v);export{v as C,u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-515003f6.js";import{a as t}from"./shared-486d4db3.js";import"./foxy-spinner.js";import"./shared-a95d3946.js";import{_ as e,B as s}from"./shared-8f9014ff.js";import{h as i,s as o}from"./shared-ba5c42c7.js";import{D as r}from"./shared-058530fc.js";import{A as n}from"./shared-69c98b7b.js";import{i as a}from"./shared-53e42a77.js";let l,d,h,c,f,u,m,p=t=>t;let v,y=t=>t;customElements.define("foxy-internal-post-action-control",class extends t{constructor(){super(...arguments),this.messageOptions={},this.theme=null,this.href=null}static get properties(){return e(e({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},theme:{},href:{}})}renderControl(){var t,e;return i(v||(v=y` <foxy-internal-post-action-control-dialog message-options="${0}" infer="" href="${0}" @hide="${0}"> </foxy-internal-post-action-control-dialog> <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button"></foxy-i18n> </vaadin-button> `),JSON.stringify(this.messageOptions),a(null!==(t=this.href)&&void 0!==t?t:void 0),(t=>{t.detail.cancelled||this.dispatchEvent(new CustomEvent("success"))}),a(null!==(e=this.theme)&&void 0!==e?e:void 0),this.disabled||this.readonly,(t=>{const e=t.currentTarget,s=this.renderRoot.querySelector("foxy-internal-post-action-control-dialog");null==s||s.show(e)}))}}),customElements.define("foxy-internal-post-action-control-dialog",class extends r{constructor(){super(...arguments),this.messageOptions={},this.closable=!0,this.header="header",this.alert=!0,this.href=null,this.__api=new n(this),this.__state="idle"}static get properties(){return e(e({},super.properties),{},{messageOptions:{type:Object,attribute:"message-options"},href:{},__state:{attribute:!1}})}get hiddenSelector(){const t=["close-button",super.hiddenSelector.toString()];return new s(t.join(" ").trim())}render(){var t=this;return super.render((()=>i(l||(l=p` <div class="relative"> <div class="mb-m mt-xs flex justify-center"> ${0} </div> <foxy-i18n class="block font-lumo text-m text-body text-center mb-l" infer="" key="message_${0}" .options="${0}"> </foxy-i18n> <div class="grid grid-cols-2 gap-m"> ${0} </div> ${0} </div> `),"done"===this.__state?o(d||(d=p`<svg class="text-success" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12.75 11.25 15 15 9.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z" /></svg>`)):"fail"===this.__state?o(h||(h=p`<svg class="text-error" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M12 9v3.75m9-.75a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 3.75h.008v.008H12v-.008Z" /></svg>`)):o(c||(c=p`<svg class="text-primary" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" style="width: 2rem; height: 2rem;"><path stroke-linecap="round" stroke-linejoin="round" d="M9.879 7.519c1.171-1.025 3.071-1.025 4.242 0 1.172 1.025 1.172 2.687 0 3.712-.203.179-.43.326-.67.442-.745.361-1.45.999-1.45 1.827v.75M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9 5.25h.008v.008H12v-.008Z" /></svg>`)),"busy"===this.__state?"idle":this.__state,this.messageOptions,"done"===this.__state||"fail"===this.__state?i(f||(f=p` <vaadin-button class="col-span-2" theme="contrast" @click="${0}"> <foxy-i18n infer="" key="button_close"></foxy-i18n> </vaadin-button> `),(()=>this.hide())):i(u||(u=p` <vaadin-button ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_cancel"></foxy-i18n> </vaadin-button> <vaadin-button theme="primary" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="button_confirm"></foxy-i18n> </vaadin-button> `),this.disabled||this.readonly,(()=>this.hide()),this.disabled||this.readonly,(async function(){if(t.href&&"idle"===t.__state){t.__state="busy",t.closable=!1;const e=await t.__api.fetch(t.href,{method:"POST"});t.__state=e.ok?"done":"fail",t.closable=!0}})),"busy"===this.__state?i(m||(m=p` <div class="bg-base absolute inset-0 flex items-center justify-center"> <foxy-spinner layout="vertical" infer=""></foxy-spinner> </div> `)):"")))}async hide(){await super.hide("done"!==this.__state),this.__state="idle"}});
|