@foxy.io/elements 1.58.1 → 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 +51 -6
- 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
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PropertyDeclarations } from 'lit-element';
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { Data } from './types';
|
|
4
|
+
import type { ScopeCollection } from '../../../utils/user-scope';
|
|
4
5
|
import { InternalCard } from '../../internal/InternalCard/InternalCard';
|
|
5
6
|
declare const WebhookCard_base: typeof InternalCard & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
6
7
|
defaultNS: string;
|
|
7
|
-
}
|
|
8
|
+
} & import("lit-element").Constructor<import("../../../mixins/configurable").ConfigurableMixinHost>;
|
|
8
9
|
/**
|
|
9
10
|
* Basic card displaying webhook (`fx:webhook`) info.
|
|
10
11
|
*
|
|
@@ -18,8 +19,10 @@ export declare class WebhookCard extends WebhookCard_base<Data> {
|
|
|
18
19
|
* the form will display logs and statuses for that particular resource only.
|
|
19
20
|
*/
|
|
20
21
|
resourceUri: string | null;
|
|
22
|
+
get scopeCollection(): ScopeCollection | null;
|
|
21
23
|
get isBodyReady(): boolean;
|
|
22
24
|
renderBody(): TemplateResult;
|
|
25
|
+
private get __canReadStatuses();
|
|
23
26
|
private get __statusesLoader();
|
|
24
27
|
}
|
|
25
28
|
export {};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { ConfigurableMixin } from "../../../mixins/configurable.js";
|
|
1
2
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
3
|
import { getResourceId } from '@foxy.io/sdk/core';
|
|
4
|
+
import { canReadCollection } from "../../../utils/user-scope.js";
|
|
3
5
|
import { InternalCard } from "../../internal/InternalCard/InternalCard.js";
|
|
4
6
|
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
5
7
|
import { classMap } from "../../../utils/class-map.js";
|
|
@@ -10,7 +12,7 @@ import { html } from 'lit-html';
|
|
|
10
12
|
* @element foxy-webhook-card
|
|
11
13
|
* @since 1.17.0
|
|
12
14
|
*/
|
|
13
|
-
export class WebhookCard extends TranslatableMixin(InternalCard, 'webhook-card') {
|
|
15
|
+
export class WebhookCard extends ConfigurableMixin(TranslatableMixin(InternalCard, 'webhook-card')) {
|
|
14
16
|
constructor() {
|
|
15
17
|
super(...arguments);
|
|
16
18
|
/**
|
|
@@ -25,12 +27,16 @@ export class WebhookCard extends TranslatableMixin(InternalCard, 'webhook-card')
|
|
|
25
27
|
resourceUri: { attribute: 'resource-uri' },
|
|
26
28
|
};
|
|
27
29
|
}
|
|
30
|
+
get scopeCollection() {
|
|
31
|
+
return 'webhooks';
|
|
32
|
+
}
|
|
28
33
|
get isBodyReady() {
|
|
29
34
|
var _a;
|
|
30
|
-
return !!((_a = this.__statusesLoader) === null || _a === void 0 ? void 0 : _a.data) && super.isBodyReady;
|
|
35
|
+
return (!!((_a = this.__statusesLoader) === null || _a === void 0 ? void 0 : _a.data) || !this.__canReadStatuses) && super.isBodyReady;
|
|
31
36
|
}
|
|
32
37
|
renderBody() {
|
|
33
38
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
39
|
+
const canReadStatuses = this.__canReadStatuses;
|
|
34
40
|
let statusesLink;
|
|
35
41
|
try {
|
|
36
42
|
const url = new URL((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:statuses'].href) !== null && _b !== void 0 ? _b : '');
|
|
@@ -72,27 +78,37 @@ export class WebhookCard extends TranslatableMixin(InternalCard, 'webhook-card')
|
|
|
72
78
|
<p class="text-s truncate text-tertiary">
|
|
73
79
|
${this.resourceUri
|
|
74
80
|
? ''
|
|
75
|
-
:
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
: canReadStatuses
|
|
82
|
+
? html `<span class="capitalize">${eventResource.replace(/_/g, ' ')}</span> •`
|
|
83
|
+
: html `<span class="capitalize">${eventResource.replace(/_/g, ' ')}</span>`}
|
|
84
|
+
${canReadStatuses
|
|
85
|
+
? html `
|
|
86
|
+
<foxy-i18n
|
|
87
|
+
class=${classMap({ 'text-error': isActive && cardStatus === 'failed' })}
|
|
88
|
+
infer=""
|
|
89
|
+
key="status_${cardStatus}"
|
|
90
|
+
.options=${lastStatus}
|
|
91
|
+
>
|
|
92
|
+
</foxy-i18n>
|
|
93
|
+
`
|
|
94
|
+
: ''}
|
|
83
95
|
</p>
|
|
84
96
|
</div>
|
|
85
97
|
|
|
86
98
|
<foxy-nucleon
|
|
87
99
|
class="hidden"
|
|
88
100
|
infer=""
|
|
89
|
-
href=${ifDefined(statusesLink)}
|
|
101
|
+
href=${ifDefined(canReadStatuses ? statusesLink : undefined)}
|
|
90
102
|
id="statusesLoader"
|
|
91
103
|
@update=${() => this.requestUpdate()}
|
|
92
104
|
>
|
|
93
105
|
</foxy-nucleon>
|
|
94
106
|
`;
|
|
95
107
|
}
|
|
108
|
+
// Without access to statuses the card renders without the last status.
|
|
109
|
+
get __canReadStatuses() {
|
|
110
|
+
return canReadCollection(this.currentUserScope, 'webhooks');
|
|
111
|
+
}
|
|
96
112
|
get __statusesLoader() {
|
|
97
113
|
return this.renderRoot.querySelector('#statusesLoader');
|
|
98
114
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookCard/WebhookCard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebhookCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookCard/WebhookCard.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB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AAa,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,SAAS;YAC3E,eAAe;YACf,CAAC,CAAC,IAAI,CAAA;;0BAEQ,QAAQ,CAAC,EAAE,YAAY,EAAE,QAAQ,IAAI,UAAU,KAAK,QAAQ,EAAE,CAAC;;gCAEzD,UAAU;6BACb,UAAU;;;eAGxB;YACH,CAAC,CAAC,EAAE;;;;;;;eAOD,SAAS,CAAC,eAAe,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC;;kBAElD,GAAG,EAAE,CAAC,IAAI,CAAC,aAAa,EAAE;;;KAGvC,CAAC;IACJ,CAAC;IAED,uEAAuE;IACvE,IAAY,iBAAiB;QAC3B,OAAO,iBAAiB,CAAC,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,CAAC;IAC9D,CAAC;IAED,IAAY,gBAAgB;QAE1B,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAS,iBAAiB,CAAC,CAAC;IAClE,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonElement } from '../NucleonElement/NucleonElement';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Rels } from '@foxy.io/sdk/backend';\nimport type { Data } from './types';\nimport type { ScopeCollection } from '../../../utils/user-scope';\n\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { getResourceId } from '@foxy.io/sdk/core';\nimport { canReadCollection } from '../../../utils/user-scope';\nimport { InternalCard } from '../../internal/InternalCard/InternalCard';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-html';\n\n/**\n * Basic card displaying webhook (`fx:webhook`) info.\n *\n * @element foxy-webhook-card\n * @since 1.17.0\n */\nexport class WebhookCard extends ConfigurableMixin(\n TranslatableMixin(InternalCard, 'webhook-card')\n)<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n resourceUri: { attribute: 'resource-uri' },\n };\n }\n\n /**\n * Optional URI of a transaction, customer or subscription. When provided,\n * the form will display logs and statuses for that particular resource only.\n */\n resourceUri: string | null = null;\n\n get scopeCollection(): ScopeCollection | null {\n return 'webhooks';\n }\n\n get isBodyReady(): boolean {\n return (!!this.__statusesLoader?.data || !this.__canReadStatuses) && super.isBodyReady;\n }\n\n renderBody(): TemplateResult {\n const canReadStatuses = this.__canReadStatuses;\n let statusesLink: string | undefined;\n\n try {\n const url = new URL(this.data?._links['fx:statuses'].href ?? '');\n url.searchParams.set('order', 'date_created desc');\n url.searchParams.set('limit', '1');\n\n const resourceId = getResourceId(this.resourceUri ?? '');\n if (resourceId !== null) url.searchParams.set('resource_id', String(resourceId));\n\n statusesLink = url.toString();\n } catch {\n statusesLink = undefined;\n }\n\n const recentStatuses = this.__statusesLoader?.data?._embedded['fx:webhook_statuses'];\n const lastStatus = recentStatuses?.[0];\n const cardStatus = recentStatuses ? lastStatus?.status ?? 'none' : 'loading';\n const isActive = !!this.data?.is_active;\n\n // SDK types are incorrect – this is a string, not an array.\n // TODO remove this cast when SDK is fixed.\n const eventResource = (this.data?.event_resource ?? '') as unknown as string;\n\n return html`\n <div class=\"grid grid-cols-1 leading-s -my-xs\">\n <p class=\"flex items-center gap-s justify-between\">\n <span class=\"text-m truncate text-body font-medium\">\n ${this.data?.name}​\n </span>\n <span class=\"text-s text-tertiary\">\n <foxy-i18n\n class=${classMap({ 'text-success': isActive })}\n infer=\"\"\n key=\"is_active_${isActive}\"\n >\n </foxy-i18n>\n </span>\n </p>\n\n <p class=\"text-s truncate text-secondary\">${this.data?.url}​</p>\n\n <p class=\"text-s truncate text-tertiary\">\n ${this.resourceUri\n ? ''\n : canReadStatuses\n ? html`<span class=\"capitalize\">${eventResource.replace(/_/g, ' ')}</span> •`\n : html`<span class=\"capitalize\">${eventResource.replace(/_/g, ' ')}</span>`}\n ${canReadStatuses\n ? html`\n <foxy-i18n\n class=${classMap({ 'text-error': isActive && cardStatus === 'failed' })}\n infer=\"\"\n key=\"status_${cardStatus}\"\n .options=${lastStatus}\n >\n </foxy-i18n>\n `\n : ''}\n </p>\n </div>\n\n <foxy-nucleon\n class=\"hidden\"\n infer=\"\"\n href=${ifDefined(canReadStatuses ? statusesLink : undefined)}\n id=\"statusesLoader\"\n @update=${() => this.requestUpdate()}\n >\n </foxy-nucleon>\n `;\n }\n\n // Without access to statuses the card renders without the last status.\n private get __canReadStatuses() {\n return canReadCollection(this.currentUserScope, 'webhooks');\n }\n\n private get __statusesLoader() {\n type Loader = NucleonElement<Resource<Rels.WebhookStatuses>>;\n return this.renderRoot.querySelector<Loader>('#statusesLoader');\n }\n}\n"]}
|
|
@@ -2,6 +2,7 @@ import type { PropertyDeclarations } from 'lit-element';
|
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { NucleonV8N } from '../NucleonElement/types';
|
|
4
4
|
import type { Data, WebhookLog } from './types';
|
|
5
|
+
import type { ScopeCollection } from '../../../utils/user-scope';
|
|
5
6
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
6
7
|
import { InternalForm } from '../../internal/InternalForm/InternalForm';
|
|
7
8
|
declare const WebhookForm_base: typeof InternalForm & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
@@ -27,6 +28,7 @@ export declare class WebhookForm extends WebhookForm_base<Data> {
|
|
|
27
28
|
resourceUri: string | null;
|
|
28
29
|
private __encryptionKeyGeneratorOptions;
|
|
29
30
|
private __eventResources;
|
|
31
|
+
get scopeCollection(): ScopeCollection | null;
|
|
30
32
|
get hiddenSelector(): BooleanSelector;
|
|
31
33
|
get headerSubtitleOptions(): Record<string, unknown>;
|
|
32
34
|
edit(data: Partial<Data>): void;
|
|
@@ -48,6 +48,10 @@ export class WebhookForm extends TranslatableMixin(InternalForm, 'webhook-form')
|
|
|
48
48
|
({ encryption_key: v }) => !v || v.length <= 1000 || 'encryption-key:v8n_too_long',
|
|
49
49
|
];
|
|
50
50
|
}
|
|
51
|
+
// Statuses and logs share the webhooks collection, so they follow the form.
|
|
52
|
+
get scopeCollection() {
|
|
53
|
+
return 'webhooks';
|
|
54
|
+
}
|
|
51
55
|
get hiddenSelector() {
|
|
52
56
|
const alwaysMatch = [super.hiddenSelector.toString()];
|
|
53
57
|
if (this.data) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookForm.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookForm/WebhookForm.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAO;IAAtF;;QAqBE,uDAAuD;QACvD,sBAAiB,GAAuE,IAAI,CAAC;QAE7F,mDAAmD;QACnD,mBAAc,GAAiE,IAAI,CAAC;QAEpF;;;WAGG;QACH,gBAAW,GAAkB,IAAI,CAAC;QAE1B,oCAA+B,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAEjE,qBAAgB,GAAG;YACzB,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,6BAA6B,EAAE;YAC/D,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,4BAA4B,EAAE;YAC7D,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,gCAAgC,EAAE;YACrE,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,yBAAyB,EAAE;YACvD,EAAE,KAAK,EAAE,WAAW,EAAE,KA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AAE,mBAAmB,CAAC,CAAC;YACnD,YAAY,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;SAC/B;QAAC,WAAM;YACN,YAAY,GAAG,SAAS,CAAC;SAC1B;QAED,IAAI;YACF,MAAM,GAAG,GAAG,IAAI,GAAG,aAAC,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,SAAS,EAAE,IAAI,mCAAI,EAAE,CAAC,CAAC;YAC7D,IAAI,UAAU,KAAK,IAAI;gBAAE,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;YACjF,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;YACnD,QAAQ,GAAG,GAAG,CAAC,QAAQ,EAAE,CAAC;SAC3B;QAAC,WAAM;YACN,QAAQ,GAAG,SAAS,CAAC;SACtB;QAED,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,YAAY,EAAE;;;;;;;;;;qBAUN,IAAI,CAAC,gBAAgB;;;;;;;;;;;;;8BAaZ,IAAI,CAAC,+BAA+B;;;;;;;;;;gBAUlD,SAAS,CAAC,YAAY,CAAC;;;;;uBAKhB,IAAI,CAAC,iBAAiB;qBACxB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE;;;;;gBAKnD,SAAS,CAAC,QAAQ,CAAC;;;;;uBAKZ,IAAI,CAAC,cAAc;qBACrB,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE;;;;QAI3D,KAAK,CAAC,UAAU,EAAE;KACrB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonV8N } from '../NucleonElement/types';\nimport type { Data, WebhookLog } from './types';\n\nimport { BooleanSelector, getResourceId } from '@foxy.io/sdk/core';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html } from 'lit-html';\n\n/**\n * Form element for creating or editing webhooks (`fx:webhook`).\n *\n * @element foxy-webhook-form\n * @since 1.17.0\n */\nexport class WebhookForm extends TranslatableMixin(InternalForm, 'webhook-form')<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n getStatusPageHref: { attribute: false },\n getLogPageHref: { attribute: false },\n resourceUri: { attribute: 'resource-uri' },\n };\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ name: v }) => !!v || 'name:v8n_required',\n ({ name: v }) => (!!v && v.length <= 255) || 'name:v8n_too_long',\n ({ url: v }) => !v || v.length <= 1000 || 'url:v8n_too_long',\n ({ query: v }) => !v || v.length <= 1000 || 'query:v8n_too_long',\n ({ encryption_key: v }) => !!v || 'encryption-key:v8n_required',\n ({ encryption_key: v }) => !v || v.length <= 1000 || 'encryption-key:v8n_too_long',\n ];\n }\n\n /** If set, renders Statuses list items as <a> tags. */\n getStatusPageHref: ((statusHref: string, status: WebhookLog) => string | null) | null = null;\n\n /** If set, renders Logs list items as <a> tags. */\n getLogPageHref: ((logHref: string, log: WebhookLog) => string | null) | null = null;\n\n /**\n * Optional URI of a transaction, customer or subscription. When provided,\n * the form will display logs and statuses for that particular resource only.\n */\n resourceUri: string | null = null;\n\n private __encryptionKeyGeneratorOptions = { separator: '', length: 512 };\n\n private __eventResources = [\n { value: 'subscription', label: 'event_resource_subscription' },\n { value: 'transaction', label: 'event_resource_transaction' },\n { value: 'transaction_log', label: 'event_resource_transaction_log' },\n { value: 'customer', label: 'event_resource_customer' },\n { value: 'changelog', label: 'event_resource_changelog' },\n ];\n\n get hiddenSelector(): BooleanSelector {\n const alwaysMatch: string[] = [super.hiddenSelector.toString()];\n\n if (this.data) {\n alwaysMatch.unshift('group-two:event-resource');\n } else {\n alwaysMatch.unshift('logs', 'statuses');\n }\n\n return new BooleanSelector(alwaysMatch.join(' ').trim());\n }\n\n get headerSubtitleOptions(): Record<string, unknown> {\n const format = this.data?.format;\n return { context: format === 'json' ? this.data?.event_resource : format };\n }\n\n edit(data: Partial<Data>): void {\n super.edit(data);\n if (!this.form.format) super.edit({ format: 'json' });\n if (!this.form.version) super.edit({ version: 2 });\n }\n\n renderBody(): TemplateResult {\n const resourceId = this.resourceUri ? getResourceId(this.resourceUri) : null;\n\n let statusesLink: string | undefined;\n let logsLink: string | undefined;\n\n try {\n const url = new URL(this.data?._links['fx:statuses'].href ?? '');\n if (resourceId !== null) url.searchParams.set('resource_id', String(resourceId));\n url.searchParams.set('order', 'date_created desc');\n statusesLink = url.toString();\n } catch {\n statusesLink = undefined;\n }\n\n try {\n const url = new URL(this.data?._links['fx:logs'].href ?? '');\n if (resourceId !== null) url.searchParams.set('resource_id', String(resourceId));\n url.searchParams.set('order', 'date_created desc');\n logsLink = url.toString();\n } catch {\n logsLink = undefined;\n }\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"group-one\">\n <foxy-internal-text-control layout=\"summary-item\" infer=\"name\"></foxy-internal-text-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"group-two\">\n <foxy-internal-select-control\n layout=\"summary-item\"\n infer=\"event-resource\"\n .options=${this.__eventResources}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control layout=\"summary-item\" infer=\"query\">\n </foxy-internal-text-control>\n\n <foxy-internal-text-control layout=\"summary-item\" infer=\"url\"></foxy-internal-text-control>\n\n <foxy-internal-password-control\n layout=\"summary-item\"\n infer=\"encryption-key\"\n show-generator\n .generatorOptions=${this.__encryptionKeyGeneratorOptions}\n >\n </foxy-internal-password-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"group-three\">\n <foxy-internal-switch-control infer=\"is-active\"></foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(statusesLink)}\n infer=\"statuses\"\n limit=\"10\"\n item=\"foxy-webhook-status-card\"\n hide-delete-button\n .getPageHref=${this.getStatusPageHref}\n .itemProps=${this.resourceUri ? { layout: 'resource' } : {}}\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(logsLink)}\n infer=\"logs\"\n limit=\"10\"\n item=\"foxy-webhook-log-card\"\n hide-delete-button\n .getPageHref=${this.getLogPageHref}\n .itemProps=${this.resourceUri ? { layout: 'resource' } : {}}\n >\n </foxy-internal-async-list-control>\n\n ${super.renderBody()}\n `;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"WebhookForm.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookForm/WebhookForm.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,iBAAiB,CAAC,YAAY,EAAE,cAAc,CAAO;IAAtF;;QAqBE,uDAAuD;QACvD,sBAAiB,GAAuE,IAAI,CAAC;QAE7F,mDAAmD;QACnD,mBAAc,GAAiE,IAAI,CAAC;QAEpF;;;WAGG;QACH,gBAAW,GAAkB,IAAI,CAAC;QAE1B,oCAA+B,GAAG,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,CAAC;QAEjE,qBAAgB,GAAG;YACzB,EAAE,KAAK,EAAE,cAAc,EAAE,KAAK,EAAE,6BAA6B,EAAE;YAC/D,EAAE,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,4BAA4B,EAAE;YAC7D,EAAE,KA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AAE,CAAC,CAAC,CAAC,EAAE;;;;QAI3D,KAAK,CAAC,UAAU,EAAE;KACrB,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { NucleonV8N } from '../NucleonElement/types';\nimport type { Data, WebhookLog } from './types';\nimport type { ScopeCollection } from '../../../utils/user-scope';\n\nimport { BooleanSelector, getResourceId } from '@foxy.io/sdk/core';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html } from 'lit-html';\n\n/**\n * Form element for creating or editing webhooks (`fx:webhook`).\n *\n * @element foxy-webhook-form\n * @since 1.17.0\n */\nexport class WebhookForm extends TranslatableMixin(InternalForm, 'webhook-form')<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n getStatusPageHref: { attribute: false },\n getLogPageHref: { attribute: false },\n resourceUri: { attribute: 'resource-uri' },\n };\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ name: v }) => !!v || 'name:v8n_required',\n ({ name: v }) => (!!v && v.length <= 255) || 'name:v8n_too_long',\n ({ url: v }) => !v || v.length <= 1000 || 'url:v8n_too_long',\n ({ query: v }) => !v || v.length <= 1000 || 'query:v8n_too_long',\n ({ encryption_key: v }) => !!v || 'encryption-key:v8n_required',\n ({ encryption_key: v }) => !v || v.length <= 1000 || 'encryption-key:v8n_too_long',\n ];\n }\n\n /** If set, renders Statuses list items as <a> tags. */\n getStatusPageHref: ((statusHref: string, status: WebhookLog) => string | null) | null = null;\n\n /** If set, renders Logs list items as <a> tags. */\n getLogPageHref: ((logHref: string, log: WebhookLog) => string | null) | null = null;\n\n /**\n * Optional URI of a transaction, customer or subscription. When provided,\n * the form will display logs and statuses for that particular resource only.\n */\n resourceUri: string | null = null;\n\n private __encryptionKeyGeneratorOptions = { separator: '', length: 512 };\n\n private __eventResources = [\n { value: 'subscription', label: 'event_resource_subscription' },\n { value: 'transaction', label: 'event_resource_transaction' },\n { value: 'transaction_log', label: 'event_resource_transaction_log' },\n { value: 'customer', label: 'event_resource_customer' },\n { value: 'changelog', label: 'event_resource_changelog' },\n ];\n\n // Statuses and logs share the webhooks collection, so they follow the form.\n get scopeCollection(): ScopeCollection | null {\n return 'webhooks';\n }\n\n get hiddenSelector(): BooleanSelector {\n const alwaysMatch: string[] = [super.hiddenSelector.toString()];\n\n if (this.data) {\n alwaysMatch.unshift('group-two:event-resource');\n } else {\n alwaysMatch.unshift('logs', 'statuses');\n }\n\n return new BooleanSelector(alwaysMatch.join(' ').trim());\n }\n\n get headerSubtitleOptions(): Record<string, unknown> {\n const format = this.data?.format;\n return { context: format === 'json' ? this.data?.event_resource : format };\n }\n\n edit(data: Partial<Data>): void {\n super.edit(data);\n if (!this.form.format) super.edit({ format: 'json' });\n if (!this.form.version) super.edit({ version: 2 });\n }\n\n renderBody(): TemplateResult {\n const resourceId = this.resourceUri ? getResourceId(this.resourceUri) : null;\n\n let statusesLink: string | undefined;\n let logsLink: string | undefined;\n\n try {\n const url = new URL(this.data?._links['fx:statuses'].href ?? '');\n if (resourceId !== null) url.searchParams.set('resource_id', String(resourceId));\n url.searchParams.set('order', 'date_created desc');\n statusesLink = url.toString();\n } catch {\n statusesLink = undefined;\n }\n\n try {\n const url = new URL(this.data?._links['fx:logs'].href ?? '');\n if (resourceId !== null) url.searchParams.set('resource_id', String(resourceId));\n url.searchParams.set('order', 'date_created desc');\n logsLink = url.toString();\n } catch {\n logsLink = undefined;\n }\n\n return html`\n ${this.renderHeader()}\n\n <foxy-internal-summary-control infer=\"group-one\">\n <foxy-internal-text-control layout=\"summary-item\" infer=\"name\"></foxy-internal-text-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"group-two\">\n <foxy-internal-select-control\n layout=\"summary-item\"\n infer=\"event-resource\"\n .options=${this.__eventResources}\n >\n </foxy-internal-select-control>\n\n <foxy-internal-text-control layout=\"summary-item\" infer=\"query\">\n </foxy-internal-text-control>\n\n <foxy-internal-text-control layout=\"summary-item\" infer=\"url\"></foxy-internal-text-control>\n\n <foxy-internal-password-control\n layout=\"summary-item\"\n infer=\"encryption-key\"\n show-generator\n .generatorOptions=${this.__encryptionKeyGeneratorOptions}\n >\n </foxy-internal-password-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-summary-control infer=\"group-three\">\n <foxy-internal-switch-control infer=\"is-active\"></foxy-internal-switch-control>\n </foxy-internal-summary-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(statusesLink)}\n infer=\"statuses\"\n limit=\"10\"\n item=\"foxy-webhook-status-card\"\n hide-delete-button\n .getPageHref=${this.getStatusPageHref}\n .itemProps=${this.resourceUri ? { layout: 'resource' } : {}}\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n first=${ifDefined(logsLink)}\n infer=\"logs\"\n limit=\"10\"\n item=\"foxy-webhook-log-card\"\n hide-delete-button\n .getPageHref=${this.getLogPageHref}\n .itemProps=${this.resourceUri ? { layout: 'resource' } : {}}\n >\n </foxy-internal-async-list-control>\n\n ${super.renderBody()}\n `;\n }\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PropertyDeclarations } from 'lit-element';
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { Data } from './types';
|
|
4
|
+
import type { ScopeCollection } from '../../../utils/user-scope';
|
|
4
5
|
import { InternalCard } from '../../internal/InternalCard/InternalCard';
|
|
5
6
|
declare const WebhookLogCard_base: typeof InternalCard & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
6
7
|
defaultNS: string;
|
|
7
|
-
}
|
|
8
|
+
} & import("lit-element").Constructor<import("../../../mixins/configurable").ConfigurableMixinHost>;
|
|
8
9
|
/**
|
|
9
10
|
* Basic card displaying webhook log (`fx:webhook_log`) info.
|
|
10
11
|
*
|
|
@@ -15,6 +16,7 @@ export declare class WebhookLogCard extends WebhookLogCard_base<Data> {
|
|
|
15
16
|
static get properties(): PropertyDeclarations;
|
|
16
17
|
/** When set to "resource", doesn't render resource type and ID. */
|
|
17
18
|
layout: null | 'resource';
|
|
19
|
+
get scopeCollection(): ScopeCollection | null;
|
|
18
20
|
renderBody(): TemplateResult;
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ConfigurableMixin } from "../../../mixins/configurable.js";
|
|
1
2
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
3
|
import { InternalCard } from "../../internal/InternalCard/InternalCard.js";
|
|
3
4
|
import { html } from 'lit-html';
|
|
@@ -7,7 +8,7 @@ import { html } from 'lit-html';
|
|
|
7
8
|
* @element foxy-webhook-log-card
|
|
8
9
|
* @since 1.17.0
|
|
9
10
|
*/
|
|
10
|
-
export class WebhookLogCard extends TranslatableMixin(InternalCard, 'webhook-log-card') {
|
|
11
|
+
export class WebhookLogCard extends ConfigurableMixin(TranslatableMixin(InternalCard, 'webhook-log-card')) {
|
|
11
12
|
constructor() {
|
|
12
13
|
super(...arguments);
|
|
13
14
|
/** When set to "resource", doesn't render resource type and ID. */
|
|
@@ -19,6 +20,9 @@ export class WebhookLogCard extends TranslatableMixin(InternalCard, 'webhook-log
|
|
|
19
20
|
layout: {},
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
get scopeCollection() {
|
|
24
|
+
return 'webhooks';
|
|
25
|
+
}
|
|
22
26
|
renderBody() {
|
|
23
27
|
var _a;
|
|
24
28
|
const { response_body: body, response_code: code, resource_type: type, date_created: date, resource_id: id, } = (_a = this.data) !== null && _a !== void 0 ? _a : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookLogCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookLogCard/WebhookLogCard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebhookLogCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookLogCard/WebhookLogCard.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,OAAO,cAAe,SAAQ,iBAAiB,CACnD,iBAAiB,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAC9C;IAFP;;QAUE,mEAAmE;QACnE,WAAM,GAAsB,IAAI,CAAC;IA4BnC,CAAC;IApCC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE;SACX,CAAC;IACJ,CAAC;IAKD,IAAI,eAAe;QACjB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,UAAU;;QACR,MAAM,EACJ,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,IAAI,EACnB,aAAa,EAAE,IAAI,EACnB,YAAY,EAAE,IAAI,EAClB,WAAW,EAAE,EAAE,GAChB,SAAG,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;QAEpB,OAAO,IAAI,CAAA;;;gCAGiB,EAAE,KAAK,EAAE,IAAI,EAAE;;YAEnC,IAAI,CAAC,MAAM,KAAK,UAAU;YAC1B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAA,kDAAkD,IAAI,KAAK,EAAE,SAAS;;gDAExC,IAAI,WAAW,IAAI;;KAE9D,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { Data } from './types';\nimport type { ScopeCollection } from '../../../utils/user-scope';\n\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalCard } from '../../internal/InternalCard/InternalCard';\nimport { html } from 'lit-html';\n\n/**\n * Basic card displaying webhook log (`fx:webhook_log`) info.\n *\n * @element foxy-webhook-log-card\n * @since 1.17.0\n */\nexport class WebhookLogCard extends ConfigurableMixin(\n TranslatableMixin(InternalCard, 'webhook-log-card')\n)<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n };\n }\n\n /** When set to \"resource\", doesn't render resource type and ID. */\n layout: null | 'resource' = null;\n\n get scopeCollection(): ScopeCollection | null {\n return 'webhooks';\n }\n\n renderBody(): TemplateResult {\n const {\n response_body: body,\n response_code: code,\n resource_type: type,\n date_created: date,\n resource_id: id,\n } = this.data ?? {};\n\n return html`\n <div class=\"leading-none space-y-xs\">\n <p class=\"flex justify-between items-center\">\n <foxy-i18n .options=${{ value: date }} class=\"font-medium\" infer=\"\" key=\"date\">\n </foxy-i18n>\n ${this.layout === 'resource'\n ? ''\n : html`<span class=\"text-xs text-tertiary capitalize\">${type} #${id}</span>`}\n </p>\n <p class=\"text-secondary text-s\">HTTP ${code} • ${body}</p>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { PropertyDeclarations } from 'lit-element';
|
|
2
2
|
import type { TemplateResult } from 'lit-html';
|
|
3
3
|
import type { Data } from './types';
|
|
4
|
+
import type { ScopeCollection } from '../../../utils/user-scope';
|
|
4
5
|
import { InternalCard } from '../../internal/InternalCard/InternalCard';
|
|
5
6
|
declare const Base: typeof InternalCard & import("lit-element").Constructor<import("../../../mixins/translatable").TranslatableMixinHost> & {
|
|
6
7
|
defaultNS: string;
|
|
7
|
-
}
|
|
8
|
+
} & import("lit-element").Constructor<import("../../../mixins/configurable").ConfigurableMixinHost>;
|
|
8
9
|
/**
|
|
9
10
|
* Basic card displaying webhook status (`fx:webhook_status`) info.
|
|
10
11
|
*
|
|
@@ -15,6 +16,7 @@ export declare class WebhookStatusCard extends Base<Data> {
|
|
|
15
16
|
static get properties(): PropertyDeclarations;
|
|
16
17
|
/** When set to "resource", doesn't render resource type and ID. */
|
|
17
18
|
layout: null | 'resource';
|
|
19
|
+
get scopeCollection(): ScopeCollection | null;
|
|
18
20
|
renderBody(): TemplateResult;
|
|
19
21
|
}
|
|
20
22
|
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { ConfigurableMixin } from "../../../mixins/configurable.js";
|
|
1
2
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
3
|
import { InternalCard } from "../../internal/InternalCard/InternalCard.js";
|
|
3
4
|
import { html } from 'lit-html';
|
|
4
5
|
import { classMap } from "../../../utils/class-map.js";
|
|
5
6
|
const NS = 'webhook-status-card';
|
|
6
|
-
const Base = TranslatableMixin(InternalCard, NS);
|
|
7
|
+
const Base = ConfigurableMixin(TranslatableMixin(InternalCard, NS));
|
|
7
8
|
/**
|
|
8
9
|
* Basic card displaying webhook status (`fx:webhook_status`) info.
|
|
9
10
|
*
|
|
@@ -22,6 +23,9 @@ export class WebhookStatusCard extends Base {
|
|
|
22
23
|
layout: {},
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
get scopeCollection() {
|
|
27
|
+
return 'webhooks';
|
|
28
|
+
}
|
|
25
29
|
renderBody() {
|
|
26
30
|
var _a;
|
|
27
31
|
const { resource_type: type, date_created: date, resource_id: id, status } = (_a = this.data) !== null && _a !== void 0 ? _a : {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebhookStatusCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookStatusCard/WebhookStatusCard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"WebhookStatusCard.js","sourceRoot":"","sources":["../../../../src/elements/public/WebhookStatusCard/WebhookStatusCard.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AAEpD,MAAM,EAAE,GAAG,qBAAqB,CAAC;AACjC,MAAM,IAAI,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AAEpE;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,IAAU;IAAjD;;QAQE,mEAAmE;QACnE,WAAM,GAAsB,IAAI,CAAC;IA+BnC,CAAC;IAvCC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,MAAM,EAAE,EAAE;SACX,CAAC;IACJ,CAAC;IAKD,IAAI,eAAe;QACjB,OAAO,UAAU,CAAC;IACpB,CAAC;IAED,UAAU;;QACR,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE,EAAE,EAAE,MAAM,EAAE,SAAG,IAAI,CAAC,IAAI,mCAAI,EAAE,CAAC;QAE7F,OAAO,IAAI,CAAA;;;gCAGiB,EAAE,KAAK,EAAE,IAAI,EAAE;;YAEnC,IAAI,CAAC,MAAM,KAAK,UAAU;YAC1B,CAAC,CAAC,EAAE;YACJ,CAAC,CAAC,IAAI,CAAA,kDAAkD,IAAI,KAAK,EAAE,SAAS;;;kBAGtE,QAAQ,CAAC;YACf,gBAAgB,EAAE,MAAM,KAAK,SAAS;YACtC,cAAc,EAAE,MAAM,KAAK,YAAY;YACvC,YAAY,EAAE,MAAM,KAAK,QAAQ;YACjC,QAAQ,EAAE,IAAI;SACf,CAAC;;4CAEgC,MAAM;;;KAG7C,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations } from 'lit-element';\nimport type { TemplateResult } from 'lit-html';\nimport type { Data } from './types';\nimport type { ScopeCollection } from '../../../utils/user-scope';\n\nimport { ConfigurableMixin } from '../../../mixins/configurable';\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalCard } from '../../internal/InternalCard/InternalCard';\nimport { html } from 'lit-html';\nimport { classMap } from '../../../utils/class-map';\n\nconst NS = 'webhook-status-card';\nconst Base = ConfigurableMixin(TranslatableMixin(InternalCard, NS));\n\n/**\n * Basic card displaying webhook status (`fx:webhook_status`) info.\n *\n * @element foxy-webhook-status-card\n * @since 1.17.0\n */\nexport class WebhookStatusCard extends Base<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n layout: {},\n };\n }\n\n /** When set to \"resource\", doesn't render resource type and ID. */\n layout: null | 'resource' = null;\n\n get scopeCollection(): ScopeCollection | null {\n return 'webhooks';\n }\n\n renderBody(): TemplateResult {\n const { resource_type: type, date_created: date, resource_id: id, status } = this.data ?? {};\n\n return html`\n <div class=\"leading-none space-y-xs\">\n <p class=\"flex justify-between items-center\">\n <foxy-i18n .options=${{ value: date }} class=\"font-medium\" infer=\"\" key=\"date\">\n </foxy-i18n>\n ${this.layout === 'resource'\n ? ''\n : html`<span class=\"text-xs text-tertiary capitalize\">${type} #${id}</span>`}\n </p>\n <p\n class=${classMap({\n 'text-secondary': status === 'pending',\n 'text-success': status === 'successful',\n 'text-error': status === 'failed',\n 'text-s': true,\n })}\n >\n <foxy-i18n infer=\"\" key=\"status_${status}\"></foxy-i18n>\n </p>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Constructor, LitElement, PropertyDeclarations, TemplateResult, html } from 'lit-element';
|
|
2
2
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
3
3
|
import { InferrableMixinHost } from './inferrable';
|
|
4
|
+
import { ScopeCollection, ScopeRule } from '../utils/user-scope';
|
|
4
5
|
export declare class ConfigurableMixinHost {
|
|
5
6
|
/** Template render functions mapped to their name. */
|
|
6
7
|
templates: Partial<Record<string, Renderer<any>>>;
|
|
@@ -59,6 +60,12 @@ export declare class ConfigurableMixinHost {
|
|
|
59
60
|
* @default BooleanSelector.False
|
|
60
61
|
*/
|
|
61
62
|
hiddenControls: BooleanSelector;
|
|
63
|
+
/**
|
|
64
|
+
* Space-separated API token scope of the current user, e.g. `transactions_read`. When set,
|
|
65
|
+
* controls the user cannot access are hidden or made read-only. Inferred from parent elements;
|
|
66
|
+
* an unset value never overrides one set on an ancestor. Empty or unset means no restrictions.
|
|
67
|
+
*/
|
|
68
|
+
currentUserScope: string | null;
|
|
62
69
|
/**
|
|
63
70
|
* Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `readonlyControls`
|
|
64
71
|
* and `readonly` properties. If `readonly` is true, this selector will match any control,
|
|
@@ -83,6 +90,13 @@ export declare class ConfigurableMixinHost {
|
|
|
83
90
|
* @since 1.4.0
|
|
84
91
|
*/
|
|
85
92
|
get hiddenSelector(): BooleanSelector;
|
|
93
|
+
/**
|
|
94
|
+
* Collection this element edits. Elements override this to lock themselves when the user
|
|
95
|
+
* can only read it. `null` by default.
|
|
96
|
+
*/
|
|
97
|
+
get scopeCollection(): ScopeCollection | null;
|
|
98
|
+
/** Per-control scope rules. Elements override this to hide or lock controls. Empty by default. */
|
|
99
|
+
get scopeRules(): ScopeRule[];
|
|
86
100
|
/**
|
|
87
101
|
* Looks for templates in element's children and compiles them to render functions.
|
|
88
102
|
*
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { html } from 'lit-element';
|
|
3
3
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
4
4
|
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
5
|
+
import { getScopeSelectors, parseUserScope } from "../utils/user-scope.js";
|
|
5
6
|
export const ConfigurableMixin = (BaseElement) => {
|
|
6
7
|
return class ConfigurableElement extends BaseElement {
|
|
7
8
|
constructor() {
|
|
@@ -14,6 +15,9 @@ export const ConfigurableMixin = (BaseElement) => {
|
|
|
14
15
|
this.disabledControls = BooleanSelector.False;
|
|
15
16
|
this.hidden = false;
|
|
16
17
|
this.hiddenControls = BooleanSelector.False;
|
|
18
|
+
this.currentUserScope = null;
|
|
19
|
+
/** Last scope inherited from an ancestor. Lets an ancestor that clears its scope reset ours. */
|
|
20
|
+
this.__inheritedScope = null;
|
|
17
21
|
this.__observer = new MutationObserver(() => this.__onMutation());
|
|
18
22
|
}
|
|
19
23
|
static get inferredProperties() {
|
|
@@ -27,11 +31,13 @@ export const ConfigurableMixin = (BaseElement) => {
|
|
|
27
31
|
'readonly',
|
|
28
32
|
'hidden',
|
|
29
33
|
'mode',
|
|
34
|
+
'currentUserScope',
|
|
30
35
|
];
|
|
31
36
|
}
|
|
32
37
|
static get properties() {
|
|
33
38
|
return {
|
|
34
39
|
...super.properties,
|
|
40
|
+
currentUserScope: { attribute: 'current-user-scope' },
|
|
35
41
|
templates: { attribute: false },
|
|
36
42
|
mode: { type: String },
|
|
37
43
|
readonly: { type: Boolean, reflect: true },
|
|
@@ -60,19 +66,60 @@ export const ConfigurableMixin = (BaseElement) => {
|
|
|
60
66
|
},
|
|
61
67
|
};
|
|
62
68
|
}
|
|
69
|
+
get scopeCollection() {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
get scopeRules() {
|
|
73
|
+
return [];
|
|
74
|
+
}
|
|
63
75
|
get readonlySelector() {
|
|
64
|
-
|
|
76
|
+
const scope = this.__getScopeSelectors();
|
|
77
|
+
if (this.readonly || scope.readonlyAll)
|
|
78
|
+
return BooleanSelector.True;
|
|
79
|
+
return this.__addPaths(this.readonlyControls, scope.readonly);
|
|
65
80
|
}
|
|
66
81
|
get disabledSelector() {
|
|
67
82
|
return this.disabled ? BooleanSelector.True : this.disabledControls;
|
|
68
83
|
}
|
|
69
84
|
get hiddenSelector() {
|
|
70
|
-
|
|
85
|
+
if (this.hidden)
|
|
86
|
+
return BooleanSelector.True;
|
|
87
|
+
return this.__addPaths(this.hiddenControls, this.__getScopeSelectors().hidden);
|
|
88
|
+
}
|
|
89
|
+
inferFromElement(key, element) {
|
|
90
|
+
const value = super.inferFromElement(key, element);
|
|
91
|
+
// An unset (null or empty) scope must not stop the walk: an ancestor further up may have one.
|
|
92
|
+
return key === 'currentUserScope' && !value ? undefined : value;
|
|
71
93
|
}
|
|
72
94
|
connectedCallback() {
|
|
73
95
|
super.connectedCallback();
|
|
74
96
|
if (this.mode === 'development')
|
|
75
97
|
this.__observe();
|
|
98
|
+
// Without `infer` no parent passes properties down, so a top-level element looks up the
|
|
99
|
+
// scope itself (e.g. `currentUserScope` set once on <html>). Only the scope: inferring
|
|
100
|
+
// everything would also change `ns`, `lang` and the selectors.
|
|
101
|
+
if (this.infer === null && this.currentUserScope === null)
|
|
102
|
+
this.__inferScope();
|
|
103
|
+
}
|
|
104
|
+
__inferScope() {
|
|
105
|
+
let node = this.parentNode;
|
|
106
|
+
while (node) {
|
|
107
|
+
if (node instanceof ShadowRoot) {
|
|
108
|
+
node = node.host;
|
|
109
|
+
}
|
|
110
|
+
else if (node instanceof HTMLElement) {
|
|
111
|
+
const value = this.inferFromElement('currentUserScope', node);
|
|
112
|
+
if (value !== undefined) {
|
|
113
|
+
this.currentUserScope = value;
|
|
114
|
+
this.__inheritedScope = value;
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
node = node.parentNode;
|
|
118
|
+
}
|
|
119
|
+
else {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
76
123
|
}
|
|
77
124
|
disconnectedCallback() {
|
|
78
125
|
super.disconnectedCallback();
|
|
@@ -170,6 +217,29 @@ export const ConfigurableMixin = (BaseElement) => {
|
|
|
170
217
|
if (this.infer)
|
|
171
218
|
this.templates = this.getNestedTemplates(this.infer);
|
|
172
219
|
this.mode = mode !== null && mode !== void 0 ? mode : 'production';
|
|
220
|
+
const currentUserScope = context.get('currentUserScope');
|
|
221
|
+
if (currentUserScope !== undefined) {
|
|
222
|
+
this.currentUserScope = currentUserScope;
|
|
223
|
+
this.__inheritedScope = currentUserScope;
|
|
224
|
+
}
|
|
225
|
+
else if (this.__inheritedScope !== null) {
|
|
226
|
+
// An ancestor cleared its scope. Drop the stale inherited value, keep an explicit one.
|
|
227
|
+
if (this.currentUserScope === this.__inheritedScope)
|
|
228
|
+
this.currentUserScope = null;
|
|
229
|
+
this.__inheritedScope = null;
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
__getScopeSelectors() {
|
|
233
|
+
const scope = parseUserScope(this.currentUserScope);
|
|
234
|
+
// Subclass getters may need data that is not there yet, so don't read them without a scope.
|
|
235
|
+
if (!scope)
|
|
236
|
+
return getScopeSelectors(null, [], null);
|
|
237
|
+
return getScopeSelectors(scope, this.scopeRules, this.scopeCollection);
|
|
238
|
+
}
|
|
239
|
+
__addPaths(base, paths) {
|
|
240
|
+
if (paths.length === 0 || base.toString() === BooleanSelector.True.toString())
|
|
241
|
+
return base;
|
|
242
|
+
return new BooleanSelector([base.toString(), ...paths].join(' ').trim());
|
|
173
243
|
}
|
|
174
244
|
__observe() {
|
|
175
245
|
this.__observer.observe(this, {
|