@foxy.io/elements 1.45.0-beta.5 → 1.46.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- 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 -0
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 +1 -1
- 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 -0
- package/dist/cdn/foxy-store-transaction-folder-form.js +1 -0
- 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-swipe-actions.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 +1 -1
- 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-6c25eb72.js → shared-0557539b.js} +1 -1
- package/dist/cdn/{shared-1e14a3fe.js → shared-0b8768db.js} +1 -1
- package/dist/cdn/{shared-cc0d9412.js → shared-0db4e843.js} +3 -3
- package/dist/cdn/{shared-e1e4d8f5.js → shared-0e19bda5.js} +1 -1
- package/dist/cdn/{shared-85ed835a.js → shared-0e25ac65.js} +1 -1
- package/dist/cdn/{shared-4e1bff30.js → shared-0e5484c2.js} +1 -1
- package/dist/cdn/{shared-7dc40542.js → shared-11de7969.js} +1 -1
- package/dist/cdn/{shared-fd5ff448.js → shared-14cc889b.js} +1 -1
- package/dist/cdn/{shared-f9d1baff.js → shared-15a75e70.js} +1 -1
- package/dist/cdn/{shared-946a7af6.js → shared-16776ac6.js} +1 -1
- package/dist/cdn/{shared-c6b1b119.js → shared-18dc7a8a.js} +1 -1
- package/dist/cdn/{shared-c929504f.js → shared-1c985317.js} +1 -1
- package/dist/cdn/{shared-f1e48b0e.js → shared-2111aa44.js} +1 -1
- package/dist/cdn/shared-257dd725.js +1 -0
- package/dist/cdn/{shared-a268320e.js → shared-27c16d99.js} +1 -1
- package/dist/cdn/{shared-4cc42648.js → shared-28ceb7f7.js} +1 -1
- package/dist/cdn/{shared-a1297ca4.js → shared-2df3c589.js} +1 -1
- package/dist/cdn/{shared-85668fe8.js → shared-2f8d04dc.js} +1 -1
- package/dist/cdn/{shared-e54135f0.js → shared-32b2d003.js} +1 -1
- package/dist/cdn/{shared-005168e0.js → shared-34a87829.js} +1 -1
- package/dist/cdn/{shared-5963a49e.js → shared-360196ad.js} +1 -1
- package/dist/cdn/shared-3d353eb8.js +1 -0
- package/dist/cdn/{shared-3c94ab84.js → shared-4158f91e.js} +1 -1
- package/dist/cdn/{shared-809d503c.js → shared-4194ffe7.js} +1 -1
- package/dist/cdn/{shared-c782b9fa.js → shared-41c9c53f.js} +1 -1
- package/dist/cdn/{shared-8340f3ab.js → shared-4498a367.js} +1 -1
- package/dist/cdn/shared-47f3f5f5.js +29 -0
- package/dist/cdn/{shared-788173f2.js → shared-4eb52fc7.js} +1 -1
- package/dist/cdn/{shared-f8519b17.js → shared-57e94234.js} +1 -1
- package/dist/cdn/{shared-a704aaa4.js → shared-58add5b4.js} +1 -1
- package/dist/cdn/{shared-e502a7be.js → shared-59128d82.js} +1 -1
- package/dist/cdn/{shared-433eea12.js → shared-5a469962.js} +1 -1
- package/dist/cdn/shared-5c8931a0.js +1 -0
- package/dist/cdn/{shared-d3414cf0.js → shared-64231b81.js} +1 -1
- package/dist/cdn/{shared-64e243c4.js → shared-66278c21.js} +1 -1
- package/dist/cdn/shared-6740e365.js +1 -0
- package/dist/cdn/{shared-65b2760f.js → shared-69c98b7b.js} +1 -1
- package/dist/cdn/{shared-b5a0d106.js → shared-6bf89411.js} +1 -1
- package/dist/cdn/{shared-50f8f2bd.js → shared-6f071960.js} +1 -1
- package/dist/cdn/{shared-138959d7.js → shared-6f90d987.js} +1 -1
- package/dist/cdn/{shared-e4792d4a.js → shared-730acf1d.js} +1 -1
- package/dist/cdn/{shared-1ae16c80.js → shared-742640c2.js} +1 -1
- package/dist/cdn/shared-791b4510.js +1 -0
- package/dist/cdn/{shared-3b4148ad.js → shared-7f7d6ceb.js} +1 -1
- package/dist/cdn/{shared-be30b940.js → shared-803be1e4.js} +1 -1
- package/dist/cdn/{shared-2d1b1ab2.js → shared-845f968f.js} +1 -1
- package/dist/cdn/shared-8498f274.js +1 -0
- package/dist/cdn/{shared-bea6e6a7.js → shared-84e97597.js} +1 -1
- package/dist/cdn/{shared-597193f7.js → shared-8df4ab18.js} +1 -1
- package/dist/cdn/{shared-7fec42f2.js → shared-8f9014ff.js} +1 -1
- package/dist/cdn/{shared-0ea750af.js → shared-930e68b7.js} +1 -1
- package/dist/cdn/{shared-d6a0954b.js → shared-9496e995.js} +1 -1
- package/dist/cdn/{shared-0fb0732a.js → shared-97fac71c.js} +1 -1
- package/dist/cdn/shared-9b138652.js +1 -0
- package/dist/cdn/{shared-c5c123c5.js → shared-9e0b104a.js} +1 -1
- package/dist/cdn/{shared-21a945fd.js → shared-a08e5a5f.js} +5 -5
- package/dist/cdn/shared-a449033a.js +1 -0
- package/dist/cdn/{shared-3615b419.js → shared-a6ddec3d.js} +1 -1
- package/dist/cdn/{shared-e7a2b31d.js → shared-b01c3b62.js} +1 -1
- package/dist/cdn/{shared-5b0c206b.js → shared-b2cbe727.js} +1 -1
- package/dist/cdn/{shared-529a82a3.js → shared-b3fe8c63.js} +1 -1
- package/dist/cdn/{shared-51376cac.js → shared-bdc981e3.js} +1 -1
- package/dist/cdn/{shared-1091aa45.js → shared-be2ce0e6.js} +1 -1
- package/dist/cdn/{shared-937e58bf.js → shared-bf8d95b9.js} +1 -1
- package/dist/cdn/{shared-85feff39.js → shared-c5a44ef2.js} +1 -1
- package/dist/cdn/shared-c7796413.js +1 -0
- package/dist/cdn/{shared-12973e93.js → shared-c84333db.js} +1 -1
- package/dist/cdn/{shared-5380e27d.js → shared-d46230dc.js} +1 -1
- package/dist/cdn/{shared-9e8344bf.js → shared-d4b77609.js} +1 -1
- package/dist/cdn/{shared-7d15992f.js → shared-d9378323.js} +1 -1
- package/dist/cdn/{shared-37869bac.js → shared-da4f9115.js} +1 -1
- package/dist/cdn/shared-e2d5673b.js +1 -0
- package/dist/cdn/{shared-636d6e33.js → shared-e41960a0.js} +1 -1
- package/dist/cdn/{shared-278b8790.js → shared-e55c8dc4.js} +1 -1
- package/dist/cdn/{shared-5bcf861e.js → shared-eb49be2e.js} +1 -1
- package/dist/cdn/{shared-95d34ae8.js → shared-f2a7eb85.js} +5 -5
- package/dist/cdn/{shared-df7d368c.js → shared-fb859ece.js} +1 -1
- package/dist/cdn/shared-fc155659.js +1 -0
- package/dist/cdn/translations/admin-subscription-form/en.json +6 -6
- package/dist/cdn/translations/admin-transaction-card/en.json +35 -0
- package/dist/cdn/translations/coupon-code-form/en.json +6 -6
- package/dist/cdn/translations/store-transaction-folder-card/en.json +8 -0
- package/dist/cdn/translations/store-transaction-folder-form/en.json +61 -0
- package/dist/cdn/translations/transaction/en.json +4 -0
- package/dist/elements/internal/InternalCard/InternalCard.js +1 -1
- package/dist/elements/internal/InternalCard/InternalCard.js.map +1 -1
- package/dist/elements/internal/InternalDateControl/getMonthNames.js +2 -2
- package/dist/elements/internal/InternalDateControl/getMonthNames.js.map +1 -1
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +2 -4
- package/dist/elements/internal/InternalForm/InternalForm.js +17 -9
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalForm/types.d.ts +9 -0
- package/dist/elements/internal/InternalForm/types.js.map +1 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +2 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +39 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js +1 -2
- package/dist/elements/public/AdminSubscriptionForm/AdminSubscriptionForm.js.map +1 -1
- package/dist/elements/public/AdminSubscriptionForm/index.d.ts +1 -1
- package/dist/elements/public/AdminSubscriptionForm/index.js +1 -1
- package/dist/elements/public/AdminSubscriptionForm/index.js.map +1 -1
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.d.ts +21 -0
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js +166 -0
- package/dist/elements/public/AdminTransactionCard/AdminTransactionCard.js.map +1 -0
- package/dist/elements/public/AdminTransactionCard/index.d.ts +6 -0
- package/dist/elements/public/AdminTransactionCard/index.js +8 -0
- package/dist/elements/public/AdminTransactionCard/index.js.map +1 -0
- package/dist/elements/public/AdminTransactionCard/types.d.ts +5 -0
- package/dist/elements/public/AdminTransactionCard/types.js +2 -0
- package/dist/elements/public/AdminTransactionCard/types.js.map +1 -0
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js +6 -6
- package/dist/elements/public/CartForm/internal/InternalCartFormTotalsControl/InternalCartFormTotalsControl.js.map +1 -1
- package/dist/elements/public/CartForm/types.d.ts +1 -1
- package/dist/elements/public/CartForm/types.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.d.ts +1 -0
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js +13 -1
- package/dist/elements/public/CouponCodeForm/CouponCodeForm.js.map +1 -1
- package/dist/elements/public/CouponCodeForm/index.d.ts +1 -1
- package/dist/elements/public/CouponCodeForm/index.js +1 -1
- package/dist/elements/public/CouponCodeForm/index.js.map +1 -1
- package/dist/elements/public/FilterAttributeCard/FilterAttributeCard.js +7 -3
- 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/NucleonElement/NucleonElement.d.ts +2 -2
- package/dist/elements/public/NucleonElement/NucleonElement.js +19 -13
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/PaymentsApi/api/types.d.ts +6 -0
- package/dist/elements/public/PaymentsApi/api/types.js.map +1 -1
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js +31 -42
- package/dist/elements/public/PaymentsApiPaymentMethodForm/PaymentsApiPaymentMethodForm.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +0 -2
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.d.ts +27 -0
- package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js +134 -0
- package/dist/elements/public/StoreTransactionFolderCard/StoreTransactionFolderCard.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderCard/index.d.ts +5 -0
- package/dist/elements/public/StoreTransactionFolderCard/index.js +7 -0
- package/dist/elements/public/StoreTransactionFolderCard/index.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderCard/types.d.ts +3 -0
- package/dist/elements/public/StoreTransactionFolderCard/types.js +2 -0
- package/dist/elements/public/StoreTransactionFolderCard/types.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.d.ts +18 -0
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js +76 -0
- package/dist/elements/public/StoreTransactionFolderForm/StoreTransactionFolderForm.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderForm/index.d.ts +7 -0
- package/dist/elements/public/StoreTransactionFolderForm/index.js +9 -0
- package/dist/elements/public/StoreTransactionFolderForm/index.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.d.ts +8 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js +68 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/InternalStoreTransactionFolderFormColorControl.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.d.ts +3 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js +5 -0
- package/dist/elements/public/StoreTransactionFolderForm/internal/InternalStoreTransactionFolderFormColorControl/index.js.map +1 -0
- package/dist/elements/public/StoreTransactionFolderForm/types.d.ts +3 -0
- package/dist/elements/public/StoreTransactionFolderForm/types.js +2 -0
- package/dist/elements/public/StoreTransactionFolderForm/types.js.map +1 -0
- package/dist/elements/public/SwipeActions/SwipeActions.d.ts +0 -1
- package/dist/elements/public/SwipeActions/SwipeActions.js +6 -7
- package/dist/elements/public/SwipeActions/SwipeActions.js.map +1 -1
- package/dist/elements/public/TaxCard/TaxCard.js +2 -2
- package/dist/elements/public/TaxCard/TaxCard.js.map +1 -1
- package/dist/elements/public/TaxForm/TaxForm.js +0 -2
- package/dist/elements/public/TaxForm/TaxForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js +1 -3
- package/dist/elements/public/TemplateConfigForm/internal/InternalTemplateConfigFormFilterValuesControl/InternalTemplateConfigFormFilterValuesControl.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +2 -3
- package/dist/elements/public/Transaction/Transaction.js +30 -6
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +5 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +87 -18
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.d.ts +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +6 -6
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
- package/dist/elements/public/Transaction/types.d.ts +1 -3
- package/dist/elements/public/Transaction/types.js.map +1 -1
- package/dist/elements/public/WebhookCard/types.d.ts +1 -3
- package/dist/elements/public/WebhookCard/types.js.map +1 -1
- package/dist/elements/public/index.d.ts +3 -0
- package/dist/elements/public/index.defined.d.ts +3 -0
- package/dist/elements/public/index.defined.js +3 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +3 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/themeable.js +106 -4
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +2 -2
- package/dist/cdn/shared-10da9bf0.js +0 -1
- package/dist/cdn/shared-1da47f50.js +0 -1
- package/dist/cdn/shared-4b24accb.js +0 -1
- package/dist/cdn/shared-5905fca4.js +0 -1
- package/dist/cdn/shared-69074dae.js +0 -1
- package/dist/cdn/shared-77829fbb.js +0 -1
- package/dist/cdn/shared-7a87cd33.js +0 -29
- package/dist/cdn/shared-a6e889a8.js +0 -1
- package/dist/cdn/shared-c66ca1f5.js +0 -1
- package/dist/cdn/shared-cb4ac1d2.js +0 -1
- package/dist/cdn/shared-f8e1143e.js +0 -1
- package/dist/cdn/shared-fc784ca0.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-6f90d987.js";import{I as e}from"./shared-fc155659.js";import"./foxy-template-set-card.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import{a as t}from"./shared-0b8768db.js";import"./foxy-payment-card-embed.js";import"./shared-3d353eb8.js";import"./shared-360196ad.js";import{_ as r,B as s}from"./shared-8f9014ff.js";import{i as o}from"./shared-53e42a77.js";import{h as i}from"./shared-ba5c42c7.js";import{g as a}from"./shared-bab2ea2c.js";import{a as d}from"./shared-47f3f5f5.js";import"./shared-4eb52fc7.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-eb49be2e.js";import"./shared-66278c21.js";import"./shared-9e0b104a.js";import"./shared-fb859ece.js";import"./shared-4194ffe7.js";import"./shared-27c16d99.js";import"./shared-32b2d003.js";import"./shared-0e25ac65.js";import"./shared-b3fe8c63.js";import"./shared-e55c8dc4.js";import"./shared-28ceb7f7.js";import"./foxy-collection-page.js";import"./shared-41c9c53f.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-930e68b7.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./shared-d4b77609.js";import"./shared-b2cbe727.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-742640c2.js";import"./shared-be2ce0e6.js";import"./shared-59128d82.js";import"./shared-5212ef4f.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-bf8d95b9.js";import"./shared-730acf1d.js";import"./shared-6740e365.js";import"./shared-18dc7a8a.js";import"./shared-7f7d6ceb.js";import"./shared-11de7969.js";let n,m=e=>e;customElements.define("foxy-internal-update-payment-method-form-cc-token-control",class extends t{constructor(){super(...arguments),this.embedUrl=null}static get properties(){return r(r({},super.properties),{},{embedUrl:{attribute:"embed-url"}})}renderControl(){return i(n||(n=m` <foxy-payment-card-embed infer="payment-card-embed" url="${0}" @submit="${0}"> </foxy-payment-card-embed> <vaadin-button theme="primary" class="w-full mt-l" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="tokenize"></foxy-i18n> </vaadin-button> `),o(this.embedUrl),this.__tokenize,this.disabled,(()=>this.__tokenize()))}async __tokenize(){var e,t,r;const s=this.renderRoot.querySelector("[infer=payment-card-embed]");try{null===(e=this.nucleon)||void 0===e||e.edit({cc_token:await s.tokenize()}),null===(t=this.nucleon)||void 0===t||t.submit()}catch(e){null===(r=this.nucleon)||void 0===r||r.undo()}}});let p,l,c=e=>e;const h=d(e,"update-payment-method-form");class f extends h{constructor(){super(...arguments),this.embedUrl=null,this.__templateSetGetValue=()=>this.__templateSetOverride,this.__templateSetSetValue=e=>this.__templateSetOverride=e,this.__templateSetOverride=null}static get properties(){return r(r({},super.properties),{},{__templateSetOverride:{attribute:!1},embedUrl:{attribute:"embed-url"}})}get hiddenSelector(){var e;const t=null===(e=this.__formEmbedUrl)||void 0===e?void 0:e.searchParams,r=["header:copy-id","header:copy-json",super.hiddenSelector.toString()],o=null==t?void 0:t.has("demo");return(this.__isPreConfigured||o)&&r.unshift("template-set"),(null==t?void 0:t.has("template_set_id"))||o||r.unshift("cc-token"),new s(r.join(" ").trim())}renderBody(){var e;if(!this.href)return i(p||(p=c` <div class="flex items-center justify-center p-xl"> <foxy-spinner layout="vertical" infer="spinner" state="empty"></foxy-spinner> </div> `));const t=this.__formEmbedUrl,r=this.renderRoot.querySelector("#store-loader");return i(l||(l=c` ${0} <foxy-internal-resource-picker-control first="${0}" infer="template-set" item="foxy-template-set-card" .getValue="${0}" .setValue="${0}"> </foxy-internal-resource-picker-control> <foxy-internal-update-payment-method-form-cc-token-control embed-url="${0}" infer="cc-token"> </foxy-internal-update-payment-method-form-cc-token-control> <foxy-nucleon infer="" class="hidden" href="${0}" id="store-loader" @update="${0}"> </foxy-nucleon> `),this.renderHeader(),o(null===(e=null==r?void 0:r.data)||void 0===e?void 0:e._links["fx:template_sets"].href),this.__templateSetGetValue,this.__templateSetSetValue,o(null==t?void 0:t.toString()),o(this.__storeLoaderHref),(()=>this.requestUpdate()))}updated(e){super.updated(e),(e.has("embedUrl")||e.has("href"))&&(this.__templateSetOverride=null)}async _fetch(...e){try{const t=await super._fetch(...e);return"PATCH"===new f.API.WHATWGRequest(...e).method&&(this.status={key:"cc_token_success"}),t}catch(e){let t;try{t=(await e.json())._embedded["fx:errors"][0].message}catch(t){throw e}throw t.includes("cc_token you provided is invalid")?["error:cc_token_invalid"]:e}}get __storeLoaderHref(){const e=this.data;return e&&"fx:store"in e._links?e._links["fx:store"].href:void 0}get __isPreConfigured(){var e;try{return new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"").searchParams.has("template_set_id")}catch(e){return!1}}get __formEmbedUrl(){var e;try{const t=new URL(null!==(e=this.embedUrl)&&void 0!==e?e:"");if(this.__templateSetOverride){const e=a(this.__templateSetOverride);null!==e&&t.searchParams.set("template_set_id",String(e))}return t}catch(e){}}}customElements.define("foxy-update-payment-method-form",f);export{f as UpdatePaymentMethodForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./foxy-nucleon-element.js";import"./foxy-spinner.js";import"./shared-3d353eb8.js";import{_ as s,aT as t,aU as e}from"./shared-8f9014ff.js";import{a as r}from"./shared-47f3f5f5.js";import{a as i,g as a}from"./shared-37bdd118.js";import{T as o}from"./shared-730acf1d.js";import{i as n}from"./shared-53e42a77.js";import{c as d}from"./shared-4e709717.js";import{h as m}from"./shared-ba5c42c7.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-930e68b7.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-41c9c53f.js";import"./shared-6740e365.js";let l,h,c,f,p,u=s=>s;const v=r(o,"user-card");class j extends v{constructor(){super(...arguments),this.showInvitations=!1}static get properties(){return s(s({},super.properties),{},{showInvitations:{type:Boolean,attribute:"show-invitations"}})}renderBody(){var s,t,e,r;const a=null!==(e=null===(t=null===(s=this.__invitationsLoader)||void 0===s?void 0:s.data)||void 0===t?void 0:t.total_items)&&void 0!==e?e:0;return m(l||(l=u` <div class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <div class="relative flex-shrink-0"> ${0} <span data-testid="invitations-count" style="min-height:1.5em;min-width:1.5em;border-radius:1.5em;left:calc(100% - 1em);top:-.5em" class="${0}"> ${0} </span> </div> <div class="min-w-0 flex-1"> ${0} </div> </div> <foxy-nucleon infer="" href="${0}" id="invitationsLoader" @update="${0}"> </foxy-nucleon> `),i(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),d({"flex items-center justify-center bg-error text-error-contrast":!0,"font-medium px-xs leading-none text-xs absolute transform":!0,"scale-0":!this.showInvitations||0===a}),a,super.renderBody({title:s=>{const t=[s.first_name.trim(),s.last_name.trim()];return m(h||(h=u`${0}`),t.filter((s=>!!s)).join(" ")||this.t("no_name"))},subtitle:s=>m(c||(c=u`${0}`),s.email)}),n(this.__invitationsHref),this.requestUpdate)}get __invitationsLoader(){return this.renderRoot.querySelector("#invitationsLoader")}get __invitationsHref(){var s,t;try{if(!this.showInvitations)return;const e=new URL(null!==(t=null===(s=this.data)||void 0===s?void 0:s._links["fx:user_invitations"].href)&&void 0!==t?t:"");return e.searchParams.set("status","sent"),e.searchParams.set("limit","1"),e.toString()}catch(s){return}}__getGravatar(s){return t((function*(){yield m(f||(f=u`<div class="rounded-full w-s h-s bg-contrast-5"></div>`)),s&&(yield m(p||(p=u` <img class="rounded-full w-s h-s bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield e(a(s))))}))()}}customElements.define("foxy-user-card",j);export{j as UserCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-d46230dc.js";import"./shared-5c8931a0.js";import{I as e}from"./shared-fc155659.js";import{_ as r}from"./shared-8f9014ff.js";import{v as t}from"./shared-b738ee96.js";import{a as o}from"./shared-47f3f5f5.js";import{h as s}from"./shared-ba5c42c7.js";import"./shared-9e0b104a.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-360196ad.js";import"./shared-e55c8dc4.js";import"./shared-eb49be2e.js";import"./shared-0b8768db.js";import"./shared-5212ef4f.js";import"./shared-3d353eb8.js";import"./shared-930e68b7.js";import"./shared-41c9c53f.js";import"./shared-53e42a77.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-b3fe8c63.js";import"./shared-27c16d99.js";import"./shared-0e25ac65.js";import"./shared-4e709717.js";import"./shared-d0aed1c1.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-d4b77609.js";import"./shared-bf8d95b9.js";import"./shared-b2cbe727.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";let a,i=e=>e;const n=o(e,"user-form");class d extends n{constructor(){super(...arguments),this.__roleGetValue=()=>{const e=[];return this.form.is_merchant&&e.push("merchant"),this.form.is_programmer&&e.push("backend_developer"),this.form.is_front_end_developer&&e.push("frontend_developer"),this.form.is_designer&&e.push("designer"),e},this.__roleSetValue=e=>{this.edit({is_merchant:e.includes("merchant"),is_programmer:e.includes("backend_developer"),is_front_end_developer:e.includes("frontend_developer"),is_designer:e.includes("designer")})},this.__roleOptions=[{label:"option_merchant",value:"merchant"},{label:"option_backend_developer",value:"backend_developer"},{label:"option_frontend_developer",value:"frontend_developer"},{label:"option_designer",value:"designer"}]}static get v8n(){return[({first_name:e})=>e&&e.length>0||"first-name:v8n_required",({first_name:e})=>!e||e.length<=50||"first-name:v8n_too_long",({last_name:e})=>e&&e.length>0||"last-name:v8n_required",({last_name:e})=>!e||e.length<=50||"last-name: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||t(e)||"email:v8n_invalid_email",({phone:e})=>!e||e.length<=50||"phone:v8n_too_long"]}get headerSubtitleOptions(){var e;return r(r({},super.headerSubtitleOptions),{},{context:(null===(e=this.data)||void 0===e?void 0:e.affiliate_id)?"affiliate":""})}renderBody(){return s(a||(a=i` ${0} <foxy-internal-text-control infer="first-name"></foxy-internal-text-control> <foxy-internal-text-control infer="last-name"></foxy-internal-text-control> <foxy-internal-text-control infer="email"></foxy-internal-text-control> <foxy-internal-text-control infer="phone"></foxy-internal-text-control> <foxy-internal-checkbox-group-control infer="role" .getValue="${0}" .setValue="${0}" .options="${0}"> </foxy-internal-checkbox-group-control> ${0} `),this.renderHeader(),this.__roleGetValue,this.__roleSetValue,this.__roleOptions,super.renderBody())}}customElements.define("foxy-user-form",d);export{d as UserForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-e2d5673b.js";import"./shared-3d353eb8.js";import{_ as s,aT as t,aU as e}from"./shared-8f9014ff.js";import{a}from"./shared-47f3f5f5.js";import{a as i,g as r}from"./shared-37bdd118.js";import{g as o}from"./shared-bab2ea2c.js";import{I as d}from"./shared-6740e365.js";import{h as n}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-930e68b7.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-4e709717.js";let l,m,u,c,f,p,h=s=>s;const v=a(d,"user-invitation-card");class x extends v{constructor(){super(...arguments),this.defaultDomain=null,this.layout=null}static get properties(){return s(s({},super.properties),{},{defaultDomain:{attribute:"default-domain"},layout:{}})}renderBody(){var s,t,e,a,r,d,f,p,v;if("admin"===(null!==(s=this.layout)&&void 0!==s?s:"user")){const{first_name:s,last_name:d,status:u,email:c}=null!==(t=this.data)&&void 0!==t?t:{},f=(null==s?void 0:s.trim())||(null==d?void 0:d.trim()),p={first_name:s,last_name:d,context:f?"":"empty"},v={context:`admin_${u}`,email:c},x=null===(a=null===(e=this.data)||void 0===e?void 0:e._links["fx:user"])||void 0===a?void 0:a.href;return n(l||(l=h` <div class="flex items-center" style="gap:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> ${0} <div class="min-w-0 flex-1 leading-xs"> <div class="flex items-center"> <foxy-i18n class="font-medium truncate mr-auto" infer="" key="full_name" .options="${0}"> </foxy-i18n> ${0} </div> <foxy-i18n .options="${0}" class="block truncate text-s text-secondary" infer="" key="status"> </foxy-i18n> </div> </div> `),i(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),p,x?n(m||(m=h` <span class="text-tertiary uppercase text-s flex-shrink-0"> ID ${0} </span> `),o(x)):"",v)}const x=null===(d=this.data)||void 0===d?void 0:d._links["fx:store"].href,y=this.defaultDomain,b=null===(f=this.data)||void 0===f?void 0:f.store_domain,j=(null==b?void 0:b.includes("."))||!y?b:`${b}.${y}`,_={context:`user_${null===(p=this.data)||void 0===p?void 0:p.status}`,domain:j};return n(u||(u=h` <div class="min-w-0 flex-1 leading-xs"> <div class="flex items-center"> <span class="font-medium truncate mr-auto"> ${0}​ </span> ${0} </div> <foxy-i18n .options="${0}" class="block truncate text-s text-secondary" infer="" key="status"> </foxy-i18n> </div> `),null===(v=this.data)||void 0===v?void 0:v.store_name,x?n(c||(c=h` <span class="text-tertiary uppercase text-s flex-shrink-0"> ID ${0} </span> `),o(x)):"",_)}__getGravatar(s){return t((function*(){yield n(f||(f=h`<div class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5"></div>`)),s&&(yield n(p||(p=h` <img class="flex-shrink-0 rounded-full w-s h-s bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield e(r(s))))}))()}}customElements.define("foxy-user-invitation-card",x);export{x as UserInvitationCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-4cc42648.js";import{I as e}from"./shared-77829fbb.js";import"./shared-fc784ca0.js";import"./shared-5963a49e.js";import{a as t}from"./shared-1e14a3fe.js";import"./shared-10da9bf0.js";import{_ as a,B as r,aT as i,aU as s}from"./shared-7fec42f2.js";import{N as l}from"./shared-69074dae.js";import{i as o}from"./shared-53e42a77.js";import{h as n,c as d,s as c}from"./shared-ba5c42c7.js";import{a as m}from"./shared-7a87cd33.js";import{a as h,g as f}from"./shared-37bdd118.js";import{c as v}from"./shared-4e709717.js";import"./shared-c929504f.js";import"./shared-a704aaa4.js";import"./shared-65b2760f.js";import"./shared-c782b9fa.js";import"./shared-0ea750af.js";import"./foxy-copy-to-clipboard.js";import"./shared-005168e0.js";import"./shared-433eea12.js";import"./shared-64e243c4.js";import"./shared-b5a0d106.js";import"./shared-9e8344bf.js";import"./shared-5bcf861e.js";import"./shared-937e58bf.js";import"./shared-5b0c206b.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-529a82a3.js";import"./shared-278b8790.js";import"./shared-a268320e.js";import"./shared-85ed835a.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-1da47f50.js";import"./shared-d6a0954b.js";import"./shared-cd96ff03.js";import"./shared-37869bac.js";import"./shared-e1e4d8f5.js";let u,p=e=>e;customElements.define("foxy-internal-user-invitation-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return a(a({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"idle"===e?this.theme:"";return n(u||(u=p` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),o(null!=t?t:void 0),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const a=new l.API(this);(await a.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"})).ok?(null===(t=this.nucleon)||void 0===t||t.refresh(),this.__state="idle"):this.__state="fail"}catch(e){this.__state="fail"}}});let y,x,g,_,b,Z,j,w,S,$,k,M,C,L,B=e=>e;const H=m(e,"user-invitation-form");class P extends H{constructor(){super(...arguments),this.getStorePageHref=null,this.defaultDomain=null,this.layout=null,this.__storeDomainGetValue=()=>{var e;const t=this.defaultDomain,a=null===(e=this.data)||void 0===e?void 0:e.store_domain;return(null==a?void 0:a.includes("."))||!t?a:`${a}.${t}`}}static get properties(){return a(a({},super.properties),{},{getStorePageHref:{attribute:!1},defaultDomain:{attribute:"default-domain"},layout:{}})}static get styles(){return[...super.styles,d(y||(y=B`.inner-curve{--r:var(--lumo-border-radius-l);--s:3rem;--a:12deg;--m:0/calc(2 * var(--r)) var(--r) no-repeat radial-gradient(50% 100% at bottom, #000 calc(100% - 1px), #0000);--d:(var(--s) + var(--r)) * cos(var(--a));border-radius:var(--r);width:100%;mask:calc(50% + var(--d)) var(--m),calc(50% - var(--d)) var(--m),radial-gradient(var(--s) at 50% calc(-1 * sin(var(--a)) * var(--s)),#0000 100%,#000 calc(100% + 1px)) 0 calc(var(--r) * (1 - sin(var(--a)))) no-repeat,linear-gradient(90deg,#000 calc(50% - var(--d)),#0000 0 calc(50% + var(--d)),#000 0)}`))]}static get v8n(){return[({email:e})=>!!e||"email:v8n_required"]}get readonlySelector(){const e=["store",super.readonlySelector.toString()];return new r(e.join(" ").trim())}get hiddenSelector(){var e,t;const a=["timestamps","submit","undo",super.hiddenSelector.toString()],i=null===(e=this.data)||void 0===e?void 0:e.status,s=null!==(t=this.layout)&&void 0!==t?t:"user";return"accepted"!==i&&"sent"!==i&&a.unshift("revoke"),"accepted"!==i&&a.unshift("leave"),"sent"!==i&&a.unshift("accept","reject"),"rejected"===i&&"user"===s||"expired"===i&&"admin"===s||"revoked"===i&&"admin"===s||a.unshift("delete"),"sent"===i&&"admin"===s||a.unshift("resend"),new r(a.join(" ").trim())}renderBody(){const{layout:e,data:t}=this;return"admin"===e?t?this.__renderAdminSnapshotState(t):this.__renderAdminTemplateState():t?this.__renderUserSnapshotState(t):this.__renderUserTemplateState()}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 t.includes("already been created for this email and store")?["error:invitation_exists"]:t.includes("already has access to this store")?["error:already_has_access"]:e}}__getGravatar(e){return i((function*(){yield n(x||(x=B` <div style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5"></div> `)),e&&(yield n(g||(g=B` <img data-testid="gravatar" style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield s(f(e))))}))()}__renderAdminTemplateState(){return n(_||(_=B` ${0} <foxy-internal-text-control infer="email"></foxy-internal-text-control> ${0} `),this.renderHeader(),super.renderBody())}__renderUserTemplateState(){return n(b||(b=B` <div class="p-xl flex items-center justify-center"> <foxy-spinner layout="vertical" infer="unavailable" state="empty"></foxy-spinner> </div> `))}__renderAdminSnapshotState({first_name:e,last_name:t}){var a,r,i,s,l,d,m;const f=(null==e?void 0:e.trim())||(null==t?void 0:t.trim()),u={first_name:e,last_name:t,context:f?"":"empty"},p=null===(a=this.data)||void 0===a?void 0:a.status,y=this.hiddenSelector;return n(Z||(Z=B` <div style="padding-top:3.5rem"> <div class="relative"> <div class="inner-curve bg-contrast-5 absolute inset-0"></div> ${0} <div class="relative pb-m px-m leading-xs grid gap-m" style="padding-top:calc(2.5rem + var(--lumo-space-m))"> <div> <foxy-i18n class="block text-xl font-medium text-center" infer="" key="full_name" .options="${0}"> </foxy-i18n> <div class="text-m text-center text-secondary">${0}</div> </div> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" class="${0}"> <p class="font-medium flex items-center gap-s"> ${0} <foxy-i18n infer="" key="admin_status_title" .options="${0}"> </foxy-i18n> </p> <p class="text-body" style="padding-left:calc((1.25 * var(--lumo-font-size-m)) + var(--lumo-space-s))"> <foxy-i18n infer="" key="admin_status_text" .options="${0}"> </foxy-i18n> </p> </div> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action infer="revoke" class="flex-1" theme="error" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action infer="resend" class="flex-1" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-delete-control infer="delete" class="flex-1"> </foxy-internal-delete-control> </div> </div> </div> </div> `),h(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),u,null===(i=this.data)||void 0===i?void 0:i.email,v({"border rounded":!0,"border-contrast text-contrast":"revoked"===p||"expired"===p,"border-success text-success":"accepted"===p,"border-primary text-primary":"sent"===p,"border-error text-error":"rejected"===p}),"revoked"===p?c(j||(j=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z" clip-rule="evenodd" /></svg>`)):"sent"===p?c(w||(w=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z" clip-rule="evenodd" /></svg>`)):"rejected"===p?c(S||(S=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z" clip-rule="evenodd" /></svg>`)):"accepted"===p?c($||($=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>`)):"expired"===p?c(k||(k=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" /><path fill-rule="evenodd" d="m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087Zm6.133 2.845a.75.75 0 0 1 1.06 0l1.72 1.72 1.72-1.72a.75.75 0 1 1 1.06 1.06l-1.72 1.72 1.72 1.72a.75.75 0 1 1-1.06 1.06L12 15.685l-1.72 1.72a.75.75 0 1 1-1.06-1.06l1.72-1.72-1.72-1.72a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)):"",{context:p},{context:p},y.matches("revoke",!0)&&y.matches("resend",!0)&&y.matches("delete",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:revoke"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:resend"])||void 0===m?void 0:m.href))}__renderUserSnapshotState({status:e,store_name:t}){var r,i,s,l,d,m;const h=this.hiddenSelector,f={"text-primary":"sent"===e,"text-success":"accepted"===e,"text-error":"rejected"===e};return n(M||(M=B` <div class="${0}"> <div class="border-t flex-1"></div> ${0} <div class="border-t flex-1"></div> </div> <foxy-i18n infer="" class="${0}" key="user_status_title" .options="${0}"> </foxy-i18n> <foxy-internal-summary-control infer="store"> <foxy-internal-text-control layout="summary-item" infer="store-domain" .getValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-url"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-email"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-i18n class="block text-secondary text-center" infer="" key="user_status_text" .options="${0}"> </foxy-i18n> <foxy-internal-user-invitation-form-async-action theme="error" class="flex-1" infer="leave" href="${0}"> </foxy-internal-user-invitation-form-async-action> <div class="grid grid-cols-2 gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action theme="error primary" infer="reject" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action theme="success primary" infer="accept" href="${0}"> </foxy-internal-user-invitation-form-async-action> </div> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),v(a({"flex items-center gap-m":!0},f)),c(C||(C=B`<svg style="height: 5rem; width: 5rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="currentColor" fill-rule="evenodd" d="M128 250c67.38 0 122-54.62 122-122S195.38 6 128 6 6 60.62 6 128s54.62 122 122 122Zm0 6c70.7 0 128-57.3 128-128S198.7 0 128 0 0 57.3 0 128s57.3 128 128 128Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M128.5 218a89.5 89.5 0 1 0 0-179 89.5 89.5 0 0 0 0 179Zm23.8-46.25-5.13-3.08-54.48-32.91a3.6 3.6 0 0 1-1.69-3.12V78l5.07 3.02c1.06.6 1.78 1.8 1.78 3.15v46.4l52.75 31.87a3.63 3.63 0 0 1 1.72 3.17l-.01 6.14ZM166 180l-5.17-3.11a3.62 3.62 0 0 1-1.7-3.1v-46.47l-47.64-28.8v25.92l-.02 6.14-5.09-3.09a3.5 3.5 0 0 1-1.71-3.05V92.38a3.6 3.6 0 0 1 1.71-3.09 3.3 3.3 0 0 1 3.44.01l54.47 32.9a3.62 3.62 0 0 1 1.7 3.11v48.47L166 180Zm-46.1-44.34c.53.34 5.2 3.17 5.2 3.17s.04-4.24.04-6.22v-15.57c0-1.32-.68-2.48-1.7-3.1-.5-.31-5.14-3.06-5.14-3.06v21.73c0 1.29.64 2.41 1.6 3.05Zm18.86 11.42-5.17-3.14a3.62 3.62 0 0 1-1.66-3.08v-21.77l5.1 3.07a3.62 3.62 0 0 1 1.75 3.13v15.57l-.02 6.22Zm8.46 5.1 5.15 3.12v-21.78a3.6 3.6 0 0 0-1.8-3.16c-.48-.28-5.06-3.08-5.06-3.08v21.8c0 1.33.7 2.48 1.71 3.1Z" clip-rule="evenodd"/><path fill="currentColor" d="M132.57 222a2.96 2.96 0 0 1 2.96 2.96v15.86a3 3 0 0 1-3 3h-9.95a2.39 2.39 0 1 1 0-4.78h5.15a1.88 1.88 0 0 0 0-3.75h-4.22a2.39 2.39 0 1 1 0-4.77h3.1a3 3 0 0 0 3-3v-2.56a2.96 2.96 0 0 1 2.96-2.96Zm-37.07 6.3c.5-2.37 1.39-4.28 2.66-5.71a9.51 9.51 0 0 1 4.52-2.9c1.75-.5 3.59-.55 5.52-.14a11.1 11.1 0 0 1 5 2.38 9.6 9.6 0 0 1 2.95 4.5c.57 1.83.6 3.93.1 6.29a12.33 12.33 0 0 1-2.65 5.7 9.44 9.44 0 0 1-4.52 2.91c-1.75.51-3.6.56-5.54.14a11.2 11.2 0 0 1-4.98-2.37 9.42 9.42 0 0 1-2.96-4.5 12.25 12.25 0 0 1-.1-6.3Zm5.95 1.27a9.13 9.13 0 0 0-.17 3.34c.14.95.5 1.73 1.06 2.32.56.6 1.31 1 2.27 1.2.96.2 1.82.15 2.58-.17a4.27 4.27 0 0 0 1.91-1.69 9.2 9.2 0 0 0 1.19-3.12c.27-1.28.33-2.4.19-3.35a4.33 4.33 0 0 0-1.07-2.31 4.28 4.28 0 0 0-2.28-1.2 4.24 4.24 0 0 0-2.56.17c-.76.31-1.4.88-1.92 1.68a9.23 9.23 0 0 0-1.2 3.13Zm-15.5 6.41a2.84 2.84 0 0 1-1.67-2.33l-.52-5.52c0-.05-.04-.1-.09-.12a.14.14 0 0 0-.15.02l-4.5 3.3a2.82 2.82 0 1 1-3.29-4.57l4.84-3.4a3 3 0 0 0 1.24-2.87l-.8-5.83a2.85 2.85 0 1 1 5.65-.68l.58 5.7c0 .05.04.1.09.12.05.02.1.01.14-.02l4.63-3.38a2.85 2.85 0 1 1 3.29 4.64l-4.87 3.34a3 3 0 0 0-1.28 2.83l.69 5.84a2.84 2.84 0 0 1-3.98 2.93Zm-16.33-12.59a2.87 2.87 0 1 1-5.67-.91l1.42-7.81a.14.14 0 0 0-.2-.15l-6.99 3.77a2.87 2.87 0 1 1-2.61-5.11l10.27-4.98a3 3 0 0 0 1.12-.94l1.86-2.56a2.94 2.94 0 1 1 4.76 3.46l-1.86 2.56a3 3 0 0 0-.55 1.36l-1.55 11.3Zm-11.39-33.1a2.93 2.93 0 0 1-.22 4.21c-.6.55-1.3.8-2.12.75a2.93 2.93 0 0 1-2.06-1 2.89 2.89 0 0 1-.74-2.11 2.8 2.8 0 0 1 2.35-2.76 3.2 3.2 0 0 1 1.52.09c.5.16.92.43 1.27.82ZM34.2 187.3a2.39 2.39 0 1 1-4.14 2.39l-4.37-7.57a2.39 2.39 0 1 1 4.13-2.38l4.37 7.56Zm14.75-8.52a2.39 2.39 0 0 1-4.13 2.38l-4.37-7.56a2.39 2.39 0 1 1 4.13-2.39l4.37 7.57Zm-21.08 7.13a2.96 2.96 0 0 1 1.09-4.05l13.76-7.95a2.96 2.96 0 0 1 2.96 5.13L31.92 187a2.96 2.96 0 0 1-4.05-1.09Zm-2.9-36.06c2.3-.75 4.4-.94 6.28-.56a9.51 9.51 0 0 1 4.78 2.47 11.27 11.27 0 0 1 2.88 4.71c.61 1.9.76 3.74.44 5.53a9.6 9.6 0 0 1-2.43 4.8c-1.3 1.4-3.1 2.48-5.4 3.23-2.3.75-4.4.94-6.26.56a9.44 9.44 0 0 1-4.78-2.46 11.24 11.24 0 0 1-2.9-4.73 11.2 11.2 0 0 1-.43-5.5 9.42 9.42 0 0 1 2.42-4.81 12.26 12.26 0 0 1 5.4-3.24Zm1.88 5.8c-1.24.4-2.23.9-2.98 1.5a4.2 4.2 0 0 0-1.47 2.09 4.2 4.2 0 0 0 .1 2.57c.3.93.77 1.64 1.43 2.14.64.5 1.45.77 2.41.82.96.05 2.06-.13 3.3-.54 1.25-.4 2.24-.9 3-1.5a4.34 4.34 0 0 0 1.47-2.09 4.3 4.3 0 0 0-.1-2.57 4.24 4.24 0 0 0-1.43-2.14 4.24 4.24 0 0 0-2.42-.82 9.24 9.24 0 0 0-3.3.53Zm3.91-38.41a4.55 4.55 0 0 1-.87 2.28 4.9 4.9 0 0 1-1.87 1.52c-.75.34-1.55.46-2.4.37a4.52 4.52 0 0 1-2.28-.87 4.81 4.81 0 0 1-1.9-4.28 4.72 4.72 0 0 1 5.15-4.17 4.8 4.8 0 0 1 3.8 2.74c.34.75.46 1.55.37 2.41ZM44.58 84.8a2.96 2.96 0 0 1-4.05 1.09L26.8 77.96a3 3 0 0 1-1.1-4.1l4.98-8.62a2.39 2.39 0 1 1 4.13 2.39l-2.58 4.46a1.88 1.88 0 0 0 3.25 1.88l2.1-3.66a2.39 2.39 0 1 1 4.14 2.39l-1.54 2.68a3 3 0 0 0 1.1 4.1l2.21 1.28a2.96 2.96 0 0 1 1.09 4.04Zm13.07-35.26a12.31 12.31 0 0 1 3.62 5.17c.6 1.81.69 3.6.25 5.37a11.27 11.27 0 0 1-2.64 4.85 11.24 11.24 0 0 1-4.56 3.14c-1.72.6-3.5.7-5.37.3a12.34 12.34 0 0 1-5.5-3.06 12.33 12.33 0 0 1-3.62-5.15 9.46 9.46 0 0 1-.25-5.36c.43-1.77 1.31-3.4 2.64-4.87a11.2 11.2 0 0 1 4.56-3.13 9.4 9.4 0 0 1 5.37-.31c1.86.4 3.7 1.43 5.5 3.05Zm-4.07 4.53a9.15 9.15 0 0 0-2.8-1.82 4.18 4.18 0 0 0-2.55-.24 4.2 4.2 0 0 0-2.17 1.37 4.24 4.24 0 0 0-1.14 2.31c-.1.8.06 1.64.5 2.5a9.33 9.33 0 0 0 2.11 2.6c.97.87 1.9 1.48 2.8 1.83.9.34 1.75.42 2.54.24a4.3 4.3 0 0 0 2.18-1.38 4.24 4.24 0 0 0 1.14-2.3c.1-.82-.06-1.65-.5-2.5a9.24 9.24 0 0 0-2.11-2.61Zm2.2-16.63c.83-.6 1.92-.7 2.85-.28l5.04 2.3a.15.15 0 0 0 .2-.15l-.6-5.55a2.82 2.82 0 1 1 5.6-.56l.53 5.89a3 3 0 0 0 1.86 2.5l5.45 2.23a2.85 2.85 0 1 1-2.24 5.24l-5.22-2.35a.15.15 0 0 0-.2.15l.61 5.7a2.85 2.85 0 1 1-5.66.52l-.46-5.88a3 3 0 0 0-1.8-2.52l-5.42-2.33a2.84 2.84 0 0 1-.54-4.9Zm19.07-7.84a2.87 2.87 0 1 1 3.62-4.47l6.06 5.14a.14.14 0 0 0 .22-.1l.23-7.93a2.87 2.87 0 1 1 5.74.29l-.83 11.38a3 3 0 0 0 .25 1.44l1.29 2.9a2.94 2.94 0 1 1-5.37 2.39l-1.3-2.9a3 3 0 0 0-.9-1.14l-9.01-7Zm34.35 6.68a2.93 2.93 0 0 1-3.53-2.3 2.78 2.78 0 0 1 .41-2.2 2.93 2.93 0 0 1 1.9-1.3 2.9 2.9 0 0 1 2.2.42 2.8 2.8 0 0 1 1.21 3.41c-.18.5-.46.93-.84 1.28-.38.35-.83.58-1.34.7Zm14.61-19.33a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm0 17.05a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm4.37-21.82a2.96 2.96 0 0 1 2.97 2.96v15.9a2.96 2.96 0 0 1-5.93 0v-15.9a2.96 2.96 0 0 1 2.96-2.96Zm32.68 15.52a12.24 12.24 0 0 1-2.66 5.71 9.5 9.5 0 0 1-4.53 2.9c-1.74.5-3.58.55-5.52.14a11.24 11.24 0 0 1-5-2.38 9.6 9.6 0 0 1-2.94-4.5 12.4 12.4 0 0 1-.1-6.29c.5-2.37 1.38-4.28 2.65-5.7a9.44 9.44 0 0 1 4.51-2.91c1.75-.51 3.6-.56 5.54-.14 1.94.4 3.6 1.2 4.99 2.37a9.42 9.42 0 0 1 2.95 4.5c.58 1.82.62 3.92.11 6.3Zm-5.96-1.27c.27-1.28.33-2.4.18-3.34a4.18 4.18 0 0 0-1.07-2.32 4.2 4.2 0 0 0-2.27-1.2 4.24 4.24 0 0 0-2.57.17c-.75.31-1.39.88-1.92 1.69a9.2 9.2 0 0 0-1.18 3.12 9.4 9.4 0 0 0-.2 3.35 4.4 4.4 0 0 0 1.07 2.31c.57.6 1.33 1 2.29 1.2.96.2 1.8.15 2.56-.17.75-.31 1.4-.88 1.91-1.68.53-.81.93-1.85 1.2-3.13Zm31.3 22.59a4.54 4.54 0 0 1-1.53-1.9 4.9 4.9 0 0 1-.38-2.38 4.5 4.5 0 0 1 .88-2.27c.5-.7 1.14-1.21 1.89-1.54a4.81 4.81 0 0 1 4.65.5 4.72 4.72 0 0 1 1.04 6.55 4.8 4.8 0 0 1-4.27 1.91 4.51 4.51 0 0 1-2.28-.87Zm21.19 28.18a2.96 2.96 0 0 1 1.08-4.05l13.73-7.93a3 3 0 0 1 4.1 1.1l4.98 8.62a2.39 2.39 0 0 1-4.13 2.39l-2.58-4.47a1.87 1.87 0 1 0-3.25 1.88l2.11 3.65a2.39 2.39 0 1 1-4.13 2.39l-1.55-2.68a3 3 0 0 0-4.1-1.1l-2.22 1.28a2.96 2.96 0 0 1-4.04-1.08Zm24 28.95c-2.31.75-4.4.94-6.29.56a9.5 9.5 0 0 1-4.78-2.47 11.26 11.26 0 0 1-2.87-4.71c-.61-1.9-.76-3.74-.44-5.53a9.6 9.6 0 0 1 2.43-4.8 12.5 12.5 0 0 1 5.39-3.23c2.31-.75 4.4-.94 6.27-.56a9.44 9.44 0 0 1 4.78 2.46 11.23 11.23 0 0 1 2.89 4.73c.6 1.88.75 3.71.43 5.5a9.43 9.43 0 0 1-2.41 4.81 12.26 12.26 0 0 1-5.4 3.24Zm-1.89-5.8c1.25-.4 2.24-.9 2.98-1.5a4.17 4.17 0 0 0 1.48-2.09 4.2 4.2 0 0 0-.1-2.57 4.25 4.25 0 0 0-1.43-2.14 4.27 4.27 0 0 0-2.42-.82 9.32 9.32 0 0 0-3.3.54c-1.24.4-2.24.9-2.99 1.5a4.34 4.34 0 0 0-1.47 2.09 4.3 4.3 0 0 0 .1 2.57c.3.93.78 1.65 1.43 2.14.65.5 1.46.77 2.41.82.97.05 2.07-.13 3.31-.53Zm13.3 10.23a2.84 2.84 0 0 1-1.18 2.61l-4.52 3.21a.15.15 0 0 0-.06.14c.01.05.04.1.1.12l5.1 2.24a2.82 2.82 0 1 1-2.31 5.14l-5.37-2.48a3 3 0 0 0-3.1.35l-4.65 3.61a2.85 2.85 0 1 1-3.41-4.56l4.64-3.35a.15.15 0 0 0 .06-.13c0-.06-.04-.1-.08-.12l-5.25-2.31a2.84 2.84 0 1 1 2.38-5.17l5.32 2.54a3 3 0 0 0 3.1-.3l4.71-3.52a2.84 2.84 0 0 1 4.52 1.98Zm-2.74 20.44a2.87 2.87 0 1 1 2.06 5.36l-7.48 2.68a.13.13 0 0 0-.1.11c0 .06.03.1.07.13l6.76 4.17a2.87 2.87 0 1 1-3.12 4.83l-9.45-6.42a3 3 0 0 0-1.37-.5l-3.15-.33a2.94 2.94 0 0 1 .62-5.85l3.14.33a3 3 0 0 0 1.45-.2l10.57-4.31Zm-22.96 26.41a2.93 2.93 0 0 1 3.75-1.92 2.8 2.8 0 0 1 1.71 1.47c.37.74.42 1.5.17 2.28-.24.74-.73 1.3-1.46 1.7a2.8 2.8 0 0 1-3.56-.66c-.34-.4-.57-.85-.7-1.36-.1-.5-.08-1.01.09-1.51Zm9.43 22.32a2.39 2.39 0 1 1 4.13 2.38l-4.37 7.57a2.39 2.39 0 1 1-4.13-2.39l4.37-7.56Zm-14.77-8.53a2.39 2.39 0 1 1 4.14 2.39l-4.37 7.56a2.39 2.39 0 0 1-4.13-2.38l4.36-7.57Zm16.72 14.7a2.96 2.96 0 0 1-4.05 1.08l-13.76-7.95a2.96 2.96 0 1 1 2.96-5.13l13.76 7.95a2.96 2.96 0 0 1 1.09 4.04Zm-29.78 20.54a12.3 12.3 0 0 1-3.62-5.17 9.5 9.5 0 0 1-.25-5.37 11.27 11.27 0 0 1 2.64-4.85 11.25 11.25 0 0 1 4.57-3.14 9.6 9.6 0 0 1 5.37-.3c1.87.43 3.7 1.44 5.5 3.06a12.33 12.33 0 0 1 3.61 5.15c.61 1.82.7 3.6.26 5.36a11.24 11.24 0 0 1-2.65 4.87 11.2 11.2 0 0 1-4.55 3.13 9.4 9.4 0 0 1-5.37.31 12.26 12.26 0 0 1-5.5-3.05Zm4.08-4.53c.97.88 1.9 1.48 2.8 1.82.9.35 1.75.43 2.54.24a4.2 4.2 0 0 0 2.18-1.37 4.24 4.24 0 0 0 1.14-2.31c.1-.8-.07-1.64-.5-2.5a9.33 9.33 0 0 0-2.12-2.6 9.4 9.4 0 0 0-2.8-1.83 4.34 4.34 0 0 0-2.54-.24c-.8.2-1.52.66-2.17 1.39a4.24 4.24 0 0 0-1.14 2.3c-.1.81.06 1.64.5 2.5a9.21 9.21 0 0 0 2.11 2.6Zm-35.21 15.81a4.54 4.54 0 0 1 2.4-.38c.83.1 1.58.39 2.25.86a4.55 4.55 0 0 1 1.54 1.9c.35.79.48 1.6.38 2.4a4.81 4.81 0 0 1-2.76 3.79 4.73 4.73 0 0 1-6.19-2.38 4.81 4.81 0 0 1 .48-4.66 4.51 4.51 0 0 1 1.9-1.53Z"/></svg>`)),v(a({"block text-center text-xl font-medium":!0},f)),{context:e,store_name:t},this.__storeDomainGetValue,"accepted"===e&&this.getStorePageHref&&this.data?n(L||(L=B` <div ?hidden="${0}"> <a class="text-primary font-medium cursor-pointer rounded transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="store_link"></foxy-i18n> </a> </div> `),"accepted"!==e||!this.getStorePageHref,this.getStorePageHref(this.data._links["fx:store"].href)):"",{context:e,store_name:t},o(null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:revoke"])||void 0===i?void 0:i.href),h.matches("reject",!0)&&h.matches("accept",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:reject"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:accept"])||void 0===m?void 0:m.href))}}customElements.define("foxy-user-invitation-form",P);export{P as UserInvitationForm};
|
|
1
|
+
import"./shared-28ceb7f7.js";import{I as e}from"./shared-fc155659.js";import"./shared-5c8931a0.js";import"./shared-360196ad.js";import{a as t}from"./shared-0b8768db.js";import"./shared-3d353eb8.js";import{_ as a,B as r,aT as i,aU as s}from"./shared-8f9014ff.js";import{N as l}from"./shared-9b138652.js";import{i as o}from"./shared-53e42a77.js";import{h as n,c as d,s as c}from"./shared-ba5c42c7.js";import{a as m}from"./shared-47f3f5f5.js";import{a as h,g as f}from"./shared-37bdd118.js";import{c as v}from"./shared-4e709717.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-69c98b7b.js";import"./shared-41c9c53f.js";import"./shared-930e68b7.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-6bf89411.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-bf8d95b9.js";import"./shared-b2cbe727.js";import"./foxy-spinner.js";import"./shared-bab2ea2c.js";import"./shared-b3fe8c63.js";import"./shared-e55c8dc4.js";import"./shared-27c16d99.js";import"./shared-0e25ac65.js";import"./shared-d0aed1c1.js";import"./shared-5212ef4f.js";import"./shared-791b4510.js";import"./shared-9496e995.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-0e19bda5.js";let u,p=e=>e;customElements.define("foxy-internal-user-invitation-form-async-action",class extends t{constructor(){super(...arguments),this.theme=null,this.href=null,this.__state="idle"}static get properties(){return a(a({},super.properties),{},{__state:{type:String},theme:{type:String},href:{type:String}})}renderControl(){const e=this.__state,t="fail"===e?"error":"idle"===e?this.theme:"";return n(u||(u=p` <vaadin-button theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n key="${0}" infer=""></foxy-i18n> </vaadin-button> `),o(null!=t?t:void 0),"busy"===e||this.disabled,this.__submit,e)}async __submit(){var e,t;if("busy"!==this.__state)try{this.__state="busy";const a=new l.API(this);(await a.fetch(null!==(e=this.href)&&void 0!==e?e:"",{method:"POST"})).ok?(null===(t=this.nucleon)||void 0===t||t.refresh(),this.__state="idle"):this.__state="fail"}catch(e){this.__state="fail"}}});let y,x,g,_,b,Z,j,w,S,$,k,M,C,L,B=e=>e;const H=m(e,"user-invitation-form");class P extends H{constructor(){super(...arguments),this.getStorePageHref=null,this.defaultDomain=null,this.layout=null,this.__storeDomainGetValue=()=>{var e;const t=this.defaultDomain,a=null===(e=this.data)||void 0===e?void 0:e.store_domain;return(null==a?void 0:a.includes("."))||!t?a:`${a}.${t}`}}static get properties(){return a(a({},super.properties),{},{getStorePageHref:{attribute:!1},defaultDomain:{attribute:"default-domain"},layout:{}})}static get styles(){return[...super.styles,d(y||(y=B`.inner-curve{--r:var(--lumo-border-radius-l);--s:3rem;--a:12deg;--m:0/calc(2 * var(--r)) var(--r) no-repeat radial-gradient(50% 100% at bottom, #000 calc(100% - 1px), #0000);--d:(var(--s) + var(--r)) * cos(var(--a));border-radius:var(--r);width:100%;mask:calc(50% + var(--d)) var(--m),calc(50% - var(--d)) var(--m),radial-gradient(var(--s) at 50% calc(-1 * sin(var(--a)) * var(--s)),#0000 100%,#000 calc(100% + 1px)) 0 calc(var(--r) * (1 - sin(var(--a)))) no-repeat,linear-gradient(90deg,#000 calc(50% - var(--d)),#0000 0 calc(50% + var(--d)),#000 0)}`))]}static get v8n(){return[({email:e})=>!!e||"email:v8n_required"]}get readonlySelector(){const e=["store",super.readonlySelector.toString()];return new r(e.join(" ").trim())}get hiddenSelector(){var e,t;const a=["timestamps","submit","undo",super.hiddenSelector.toString()],i=null===(e=this.data)||void 0===e?void 0:e.status,s=null!==(t=this.layout)&&void 0!==t?t:"user";return"accepted"!==i&&"sent"!==i&&a.unshift("revoke"),"accepted"!==i&&a.unshift("leave"),"sent"!==i&&a.unshift("accept","reject"),"rejected"===i&&"user"===s||"expired"===i&&"admin"===s||"revoked"===i&&"admin"===s||a.unshift("delete"),"sent"===i&&"admin"===s||a.unshift("resend"),new r(a.join(" ").trim())}renderBody(){const{layout:e,data:t}=this;return"admin"===e?t?this.__renderAdminSnapshotState(t):this.__renderAdminTemplateState():t?this.__renderUserSnapshotState(t):this.__renderUserTemplateState()}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 t.includes("already been created for this email and store")?["error:invitation_exists"]:t.includes("already has access to this store")?["error:already_has_access"]:e}}__getGravatar(e){return i((function*(){yield n(x||(x=B` <div style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5"></div> `)),e&&(yield n(g||(g=B` <img data-testid="gravatar" style="height:5rem;width:5rem;left:calc(50% - 2.5rem);top:-2.8rem" class="rounded-full absolute top-0 bg-contrast-5 shadow-xs" src="${0}" alt=""> `),yield s(f(e))))}))()}__renderAdminTemplateState(){return n(_||(_=B` ${0} <foxy-internal-text-control infer="email"></foxy-internal-text-control> ${0} `),this.renderHeader(),super.renderBody())}__renderUserTemplateState(){return n(b||(b=B` <div class="p-xl flex items-center justify-center"> <foxy-spinner layout="vertical" infer="unavailable" state="empty"></foxy-spinner> </div> `))}__renderAdminSnapshotState({first_name:e,last_name:t}){var a,r,i,s,l,d,m;const f=(null==e?void 0:e.trim())||(null==t?void 0:t.trim()),u={first_name:e,last_name:t,context:f?"":"empty"},p=null===(a=this.data)||void 0===a?void 0:a.status,y=this.hiddenSelector;return n(Z||(Z=B` <div style="padding-top:3.5rem"> <div class="relative"> <div class="inner-curve bg-contrast-5 absolute inset-0"></div> ${0} <div class="relative pb-m px-m leading-xs grid gap-m" style="padding-top:calc(2.5rem + var(--lumo-space-m))"> <div> <foxy-i18n class="block text-xl font-medium text-center" infer="" key="full_name" .options="${0}"> </foxy-i18n> <div class="text-m text-center text-secondary">${0}</div> </div> <div style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" class="${0}"> <p class="font-medium flex items-center gap-s"> ${0} <foxy-i18n infer="" key="admin_status_title" .options="${0}"> </foxy-i18n> </p> <p class="text-body" style="padding-left:calc((1.25 * var(--lumo-font-size-m)) + var(--lumo-space-s))"> <foxy-i18n infer="" key="admin_status_text" .options="${0}"> </foxy-i18n> </p> </div> <div class="flex gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action infer="revoke" class="flex-1" theme="error" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action infer="resend" class="flex-1" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-delete-control infer="delete" class="flex-1"> </foxy-internal-delete-control> </div> </div> </div> </div> `),h(this.__getGravatar(null===(r=this.data)||void 0===r?void 0:r.email)),u,null===(i=this.data)||void 0===i?void 0:i.email,v({"border rounded":!0,"border-contrast text-contrast":"revoked"===p||"expired"===p,"border-success text-success":"accepted"===p,"border-primary text-primary":"sent"===p,"border-error text-error":"rejected"===p}),"revoked"===p?c(j||(j=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm3 10.5a.75.75 0 0 0 0-1.5H9a.75.75 0 0 0 0 1.5h6Z" clip-rule="evenodd" /></svg>`)):"sent"===p?c(w||(w=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25ZM12.75 6a.75.75 0 0 0-1.5 0v6c0 .414.336.75.75.75h4.5a.75.75 0 0 0 0-1.5h-3.75V6Z" clip-rule="evenodd" /></svg>`)):"rejected"===p?c(S||(S=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z" clip-rule="evenodd" /></svg>`)):"accepted"===p?c($||($=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z" clip-rule="evenodd" /></svg>`)):"expired"===p?c(k||(k=B`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" style="width: 1.25em; height: 1.25em"><path d="M3.375 3C2.339 3 1.5 3.84 1.5 4.875v.75c0 1.036.84 1.875 1.875 1.875h17.25c1.035 0 1.875-.84 1.875-1.875v-.75C22.5 3.839 21.66 3 20.625 3H3.375Z" /><path fill-rule="evenodd" d="m3.087 9 .54 9.176A3 3 0 0 0 6.62 21h10.757a3 3 0 0 0 2.995-2.824L20.913 9H3.087Zm6.133 2.845a.75.75 0 0 1 1.06 0l1.72 1.72 1.72-1.72a.75.75 0 1 1 1.06 1.06l-1.72 1.72 1.72 1.72a.75.75 0 1 1-1.06 1.06L12 15.685l-1.72 1.72a.75.75 0 1 1-1.06-1.06l1.72-1.72-1.72-1.72a.75.75 0 0 1 0-1.06Z" clip-rule="evenodd" /></svg>`)):"",{context:p},{context:p},y.matches("revoke",!0)&&y.matches("resend",!0)&&y.matches("delete",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:revoke"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:resend"])||void 0===m?void 0:m.href))}__renderUserSnapshotState({status:e,store_name:t}){var r,i,s,l,d,m;const h=this.hiddenSelector,f={"text-primary":"sent"===e,"text-success":"accepted"===e,"text-error":"rejected"===e};return n(M||(M=B` <div class="${0}"> <div class="border-t flex-1"></div> ${0} <div class="border-t flex-1"></div> </div> <foxy-i18n infer="" class="${0}" key="user_status_title" .options="${0}"> </foxy-i18n> <foxy-internal-summary-control infer="store"> <foxy-internal-text-control layout="summary-item" infer="store-domain" .getValue="${0}"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-url"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="store-email"> </foxy-internal-text-control> ${0} </foxy-internal-summary-control> <foxy-i18n class="block text-secondary text-center" infer="" key="user_status_text" .options="${0}"> </foxy-i18n> <foxy-internal-user-invitation-form-async-action theme="error" class="flex-1" infer="leave" href="${0}"> </foxy-internal-user-invitation-form-async-action> <div class="grid grid-cols-2 gap-m" ?hidden="${0}"> <foxy-internal-user-invitation-form-async-action theme="error primary" infer="reject" href="${0}"> </foxy-internal-user-invitation-form-async-action> <foxy-internal-user-invitation-form-async-action theme="success primary" infer="accept" href="${0}"> </foxy-internal-user-invitation-form-async-action> </div> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `),v(a({"flex items-center gap-m":!0},f)),c(C||(C=B`<svg style="height: 5rem; width: 5rem" xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 256 256"><path fill="currentColor" fill-rule="evenodd" d="M128 250c67.38 0 122-54.62 122-122S195.38 6 128 6 6 60.62 6 128s54.62 122 122 122Zm0 6c70.7 0 128-57.3 128-128S198.7 0 128 0 0 57.3 0 128s57.3 128 128 128Z" clip-rule="evenodd"/><path fill="currentColor" fill-rule="evenodd" d="M128.5 218a89.5 89.5 0 1 0 0-179 89.5 89.5 0 0 0 0 179Zm23.8-46.25-5.13-3.08-54.48-32.91a3.6 3.6 0 0 1-1.69-3.12V78l5.07 3.02c1.06.6 1.78 1.8 1.78 3.15v46.4l52.75 31.87a3.63 3.63 0 0 1 1.72 3.17l-.01 6.14ZM166 180l-5.17-3.11a3.62 3.62 0 0 1-1.7-3.1v-46.47l-47.64-28.8v25.92l-.02 6.14-5.09-3.09a3.5 3.5 0 0 1-1.71-3.05V92.38a3.6 3.6 0 0 1 1.71-3.09 3.3 3.3 0 0 1 3.44.01l54.47 32.9a3.62 3.62 0 0 1 1.7 3.11v48.47L166 180Zm-46.1-44.34c.53.34 5.2 3.17 5.2 3.17s.04-4.24.04-6.22v-15.57c0-1.32-.68-2.48-1.7-3.1-.5-.31-5.14-3.06-5.14-3.06v21.73c0 1.29.64 2.41 1.6 3.05Zm18.86 11.42-5.17-3.14a3.62 3.62 0 0 1-1.66-3.08v-21.77l5.1 3.07a3.62 3.62 0 0 1 1.75 3.13v15.57l-.02 6.22Zm8.46 5.1 5.15 3.12v-21.78a3.6 3.6 0 0 0-1.8-3.16c-.48-.28-5.06-3.08-5.06-3.08v21.8c0 1.33.7 2.48 1.71 3.1Z" clip-rule="evenodd"/><path fill="currentColor" d="M132.57 222a2.96 2.96 0 0 1 2.96 2.96v15.86a3 3 0 0 1-3 3h-9.95a2.39 2.39 0 1 1 0-4.78h5.15a1.88 1.88 0 0 0 0-3.75h-4.22a2.39 2.39 0 1 1 0-4.77h3.1a3 3 0 0 0 3-3v-2.56a2.96 2.96 0 0 1 2.96-2.96Zm-37.07 6.3c.5-2.37 1.39-4.28 2.66-5.71a9.51 9.51 0 0 1 4.52-2.9c1.75-.5 3.59-.55 5.52-.14a11.1 11.1 0 0 1 5 2.38 9.6 9.6 0 0 1 2.95 4.5c.57 1.83.6 3.93.1 6.29a12.33 12.33 0 0 1-2.65 5.7 9.44 9.44 0 0 1-4.52 2.91c-1.75.51-3.6.56-5.54.14a11.2 11.2 0 0 1-4.98-2.37 9.42 9.42 0 0 1-2.96-4.5 12.25 12.25 0 0 1-.1-6.3Zm5.95 1.27a9.13 9.13 0 0 0-.17 3.34c.14.95.5 1.73 1.06 2.32.56.6 1.31 1 2.27 1.2.96.2 1.82.15 2.58-.17a4.27 4.27 0 0 0 1.91-1.69 9.2 9.2 0 0 0 1.19-3.12c.27-1.28.33-2.4.19-3.35a4.33 4.33 0 0 0-1.07-2.31 4.28 4.28 0 0 0-2.28-1.2 4.24 4.24 0 0 0-2.56.17c-.76.31-1.4.88-1.92 1.68a9.23 9.23 0 0 0-1.2 3.13Zm-15.5 6.41a2.84 2.84 0 0 1-1.67-2.33l-.52-5.52c0-.05-.04-.1-.09-.12a.14.14 0 0 0-.15.02l-4.5 3.3a2.82 2.82 0 1 1-3.29-4.57l4.84-3.4a3 3 0 0 0 1.24-2.87l-.8-5.83a2.85 2.85 0 1 1 5.65-.68l.58 5.7c0 .05.04.1.09.12.05.02.1.01.14-.02l4.63-3.38a2.85 2.85 0 1 1 3.29 4.64l-4.87 3.34a3 3 0 0 0-1.28 2.83l.69 5.84a2.84 2.84 0 0 1-3.98 2.93Zm-16.33-12.59a2.87 2.87 0 1 1-5.67-.91l1.42-7.81a.14.14 0 0 0-.2-.15l-6.99 3.77a2.87 2.87 0 1 1-2.61-5.11l10.27-4.98a3 3 0 0 0 1.12-.94l1.86-2.56a2.94 2.94 0 1 1 4.76 3.46l-1.86 2.56a3 3 0 0 0-.55 1.36l-1.55 11.3Zm-11.39-33.1a2.93 2.93 0 0 1-.22 4.21c-.6.55-1.3.8-2.12.75a2.93 2.93 0 0 1-2.06-1 2.89 2.89 0 0 1-.74-2.11 2.8 2.8 0 0 1 2.35-2.76 3.2 3.2 0 0 1 1.52.09c.5.16.92.43 1.27.82ZM34.2 187.3a2.39 2.39 0 1 1-4.14 2.39l-4.37-7.57a2.39 2.39 0 1 1 4.13-2.38l4.37 7.56Zm14.75-8.52a2.39 2.39 0 0 1-4.13 2.38l-4.37-7.56a2.39 2.39 0 1 1 4.13-2.39l4.37 7.57Zm-21.08 7.13a2.96 2.96 0 0 1 1.09-4.05l13.76-7.95a2.96 2.96 0 0 1 2.96 5.13L31.92 187a2.96 2.96 0 0 1-4.05-1.09Zm-2.9-36.06c2.3-.75 4.4-.94 6.28-.56a9.51 9.51 0 0 1 4.78 2.47 11.27 11.27 0 0 1 2.88 4.71c.61 1.9.76 3.74.44 5.53a9.6 9.6 0 0 1-2.43 4.8c-1.3 1.4-3.1 2.48-5.4 3.23-2.3.75-4.4.94-6.26.56a9.44 9.44 0 0 1-4.78-2.46 11.24 11.24 0 0 1-2.9-4.73 11.2 11.2 0 0 1-.43-5.5 9.42 9.42 0 0 1 2.42-4.81 12.26 12.26 0 0 1 5.4-3.24Zm1.88 5.8c-1.24.4-2.23.9-2.98 1.5a4.2 4.2 0 0 0-1.47 2.09 4.2 4.2 0 0 0 .1 2.57c.3.93.77 1.64 1.43 2.14.64.5 1.45.77 2.41.82.96.05 2.06-.13 3.3-.54 1.25-.4 2.24-.9 3-1.5a4.34 4.34 0 0 0 1.47-2.09 4.3 4.3 0 0 0-.1-2.57 4.24 4.24 0 0 0-1.43-2.14 4.24 4.24 0 0 0-2.42-.82 9.24 9.24 0 0 0-3.3.53Zm3.91-38.41a4.55 4.55 0 0 1-.87 2.28 4.9 4.9 0 0 1-1.87 1.52c-.75.34-1.55.46-2.4.37a4.52 4.52 0 0 1-2.28-.87 4.81 4.81 0 0 1-1.9-4.28 4.72 4.72 0 0 1 5.15-4.17 4.8 4.8 0 0 1 3.8 2.74c.34.75.46 1.55.37 2.41ZM44.58 84.8a2.96 2.96 0 0 1-4.05 1.09L26.8 77.96a3 3 0 0 1-1.1-4.1l4.98-8.62a2.39 2.39 0 1 1 4.13 2.39l-2.58 4.46a1.88 1.88 0 0 0 3.25 1.88l2.1-3.66a2.39 2.39 0 1 1 4.14 2.39l-1.54 2.68a3 3 0 0 0 1.1 4.1l2.21 1.28a2.96 2.96 0 0 1 1.09 4.04Zm13.07-35.26a12.31 12.31 0 0 1 3.62 5.17c.6 1.81.69 3.6.25 5.37a11.27 11.27 0 0 1-2.64 4.85 11.24 11.24 0 0 1-4.56 3.14c-1.72.6-3.5.7-5.37.3a12.34 12.34 0 0 1-5.5-3.06 12.33 12.33 0 0 1-3.62-5.15 9.46 9.46 0 0 1-.25-5.36c.43-1.77 1.31-3.4 2.64-4.87a11.2 11.2 0 0 1 4.56-3.13 9.4 9.4 0 0 1 5.37-.31c1.86.4 3.7 1.43 5.5 3.05Zm-4.07 4.53a9.15 9.15 0 0 0-2.8-1.82 4.18 4.18 0 0 0-2.55-.24 4.2 4.2 0 0 0-2.17 1.37 4.24 4.24 0 0 0-1.14 2.31c-.1.8.06 1.64.5 2.5a9.33 9.33 0 0 0 2.11 2.6c.97.87 1.9 1.48 2.8 1.83.9.34 1.75.42 2.54.24a4.3 4.3 0 0 0 2.18-1.38 4.24 4.24 0 0 0 1.14-2.3c.1-.82-.06-1.65-.5-2.5a9.24 9.24 0 0 0-2.11-2.61Zm2.2-16.63c.83-.6 1.92-.7 2.85-.28l5.04 2.3a.15.15 0 0 0 .2-.15l-.6-5.55a2.82 2.82 0 1 1 5.6-.56l.53 5.89a3 3 0 0 0 1.86 2.5l5.45 2.23a2.85 2.85 0 1 1-2.24 5.24l-5.22-2.35a.15.15 0 0 0-.2.15l.61 5.7a2.85 2.85 0 1 1-5.66.52l-.46-5.88a3 3 0 0 0-1.8-2.52l-5.42-2.33a2.84 2.84 0 0 1-.54-4.9Zm19.07-7.84a2.87 2.87 0 1 1 3.62-4.47l6.06 5.14a.14.14 0 0 0 .22-.1l.23-7.93a2.87 2.87 0 1 1 5.74.29l-.83 11.38a3 3 0 0 0 .25 1.44l1.29 2.9a2.94 2.94 0 1 1-5.37 2.39l-1.3-2.9a3 3 0 0 0-.9-1.14l-9.01-7Zm34.35 6.68a2.93 2.93 0 0 1-3.53-2.3 2.78 2.78 0 0 1 .41-2.2 2.93 2.93 0 0 1 1.9-1.3 2.9 2.9 0 0 1 2.2.42 2.8 2.8 0 0 1 1.21 3.41c-.18.5-.46.93-.84 1.28-.38.35-.83.58-1.34.7Zm14.61-19.33a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm0 17.05a2.39 2.39 0 0 1 0-4.77h8.74a2.39 2.39 0 0 1 0 4.77h-8.74Zm4.37-21.82a2.96 2.96 0 0 1 2.97 2.96v15.9a2.96 2.96 0 0 1-5.93 0v-15.9a2.96 2.96 0 0 1 2.96-2.96Zm32.68 15.52a12.24 12.24 0 0 1-2.66 5.71 9.5 9.5 0 0 1-4.53 2.9c-1.74.5-3.58.55-5.52.14a11.24 11.24 0 0 1-5-2.38 9.6 9.6 0 0 1-2.94-4.5 12.4 12.4 0 0 1-.1-6.29c.5-2.37 1.38-4.28 2.65-5.7a9.44 9.44 0 0 1 4.51-2.91c1.75-.51 3.6-.56 5.54-.14 1.94.4 3.6 1.2 4.99 2.37a9.42 9.42 0 0 1 2.95 4.5c.58 1.82.62 3.92.11 6.3Zm-5.96-1.27c.27-1.28.33-2.4.18-3.34a4.18 4.18 0 0 0-1.07-2.32 4.2 4.2 0 0 0-2.27-1.2 4.24 4.24 0 0 0-2.57.17c-.75.31-1.39.88-1.92 1.69a9.2 9.2 0 0 0-1.18 3.12 9.4 9.4 0 0 0-.2 3.35 4.4 4.4 0 0 0 1.07 2.31c.57.6 1.33 1 2.29 1.2.96.2 1.8.15 2.56-.17.75-.31 1.4-.88 1.91-1.68.53-.81.93-1.85 1.2-3.13Zm31.3 22.59a4.54 4.54 0 0 1-1.53-1.9 4.9 4.9 0 0 1-.38-2.38 4.5 4.5 0 0 1 .88-2.27c.5-.7 1.14-1.21 1.89-1.54a4.81 4.81 0 0 1 4.65.5 4.72 4.72 0 0 1 1.04 6.55 4.8 4.8 0 0 1-4.27 1.91 4.51 4.51 0 0 1-2.28-.87Zm21.19 28.18a2.96 2.96 0 0 1 1.08-4.05l13.73-7.93a3 3 0 0 1 4.1 1.1l4.98 8.62a2.39 2.39 0 0 1-4.13 2.39l-2.58-4.47a1.87 1.87 0 1 0-3.25 1.88l2.11 3.65a2.39 2.39 0 1 1-4.13 2.39l-1.55-2.68a3 3 0 0 0-4.1-1.1l-2.22 1.28a2.96 2.96 0 0 1-4.04-1.08Zm24 28.95c-2.31.75-4.4.94-6.29.56a9.5 9.5 0 0 1-4.78-2.47 11.26 11.26 0 0 1-2.87-4.71c-.61-1.9-.76-3.74-.44-5.53a9.6 9.6 0 0 1 2.43-4.8 12.5 12.5 0 0 1 5.39-3.23c2.31-.75 4.4-.94 6.27-.56a9.44 9.44 0 0 1 4.78 2.46 11.23 11.23 0 0 1 2.89 4.73c.6 1.88.75 3.71.43 5.5a9.43 9.43 0 0 1-2.41 4.81 12.26 12.26 0 0 1-5.4 3.24Zm-1.89-5.8c1.25-.4 2.24-.9 2.98-1.5a4.17 4.17 0 0 0 1.48-2.09 4.2 4.2 0 0 0-.1-2.57 4.25 4.25 0 0 0-1.43-2.14 4.27 4.27 0 0 0-2.42-.82 9.32 9.32 0 0 0-3.3.54c-1.24.4-2.24.9-2.99 1.5a4.34 4.34 0 0 0-1.47 2.09 4.3 4.3 0 0 0 .1 2.57c.3.93.78 1.65 1.43 2.14.65.5 1.46.77 2.41.82.97.05 2.07-.13 3.31-.53Zm13.3 10.23a2.84 2.84 0 0 1-1.18 2.61l-4.52 3.21a.15.15 0 0 0-.06.14c.01.05.04.1.1.12l5.1 2.24a2.82 2.82 0 1 1-2.31 5.14l-5.37-2.48a3 3 0 0 0-3.1.35l-4.65 3.61a2.85 2.85 0 1 1-3.41-4.56l4.64-3.35a.15.15 0 0 0 .06-.13c0-.06-.04-.1-.08-.12l-5.25-2.31a2.84 2.84 0 1 1 2.38-5.17l5.32 2.54a3 3 0 0 0 3.1-.3l4.71-3.52a2.84 2.84 0 0 1 4.52 1.98Zm-2.74 20.44a2.87 2.87 0 1 1 2.06 5.36l-7.48 2.68a.13.13 0 0 0-.1.11c0 .06.03.1.07.13l6.76 4.17a2.87 2.87 0 1 1-3.12 4.83l-9.45-6.42a3 3 0 0 0-1.37-.5l-3.15-.33a2.94 2.94 0 0 1 .62-5.85l3.14.33a3 3 0 0 0 1.45-.2l10.57-4.31Zm-22.96 26.41a2.93 2.93 0 0 1 3.75-1.92 2.8 2.8 0 0 1 1.71 1.47c.37.74.42 1.5.17 2.28-.24.74-.73 1.3-1.46 1.7a2.8 2.8 0 0 1-3.56-.66c-.34-.4-.57-.85-.7-1.36-.1-.5-.08-1.01.09-1.51Zm9.43 22.32a2.39 2.39 0 1 1 4.13 2.38l-4.37 7.57a2.39 2.39 0 1 1-4.13-2.39l4.37-7.56Zm-14.77-8.53a2.39 2.39 0 1 1 4.14 2.39l-4.37 7.56a2.39 2.39 0 0 1-4.13-2.38l4.36-7.57Zm16.72 14.7a2.96 2.96 0 0 1-4.05 1.08l-13.76-7.95a2.96 2.96 0 1 1 2.96-5.13l13.76 7.95a2.96 2.96 0 0 1 1.09 4.04Zm-29.78 20.54a12.3 12.3 0 0 1-3.62-5.17 9.5 9.5 0 0 1-.25-5.37 11.27 11.27 0 0 1 2.64-4.85 11.25 11.25 0 0 1 4.57-3.14 9.6 9.6 0 0 1 5.37-.3c1.87.43 3.7 1.44 5.5 3.06a12.33 12.33 0 0 1 3.61 5.15c.61 1.82.7 3.6.26 5.36a11.24 11.24 0 0 1-2.65 4.87 11.2 11.2 0 0 1-4.55 3.13 9.4 9.4 0 0 1-5.37.31 12.26 12.26 0 0 1-5.5-3.05Zm4.08-4.53c.97.88 1.9 1.48 2.8 1.82.9.35 1.75.43 2.54.24a4.2 4.2 0 0 0 2.18-1.37 4.24 4.24 0 0 0 1.14-2.31c.1-.8-.07-1.64-.5-2.5a9.33 9.33 0 0 0-2.12-2.6 9.4 9.4 0 0 0-2.8-1.83 4.34 4.34 0 0 0-2.54-.24c-.8.2-1.52.66-2.17 1.39a4.24 4.24 0 0 0-1.14 2.3c-.1.81.06 1.64.5 2.5a9.21 9.21 0 0 0 2.11 2.6Zm-35.21 15.81a4.54 4.54 0 0 1 2.4-.38c.83.1 1.58.39 2.25.86a4.55 4.55 0 0 1 1.54 1.9c.35.79.48 1.6.38 2.4a4.81 4.81 0 0 1-2.76 3.79 4.73 4.73 0 0 1-6.19-2.38 4.81 4.81 0 0 1 .48-4.66 4.51 4.51 0 0 1 1.9-1.53Z"/></svg>`)),v(a({"block text-center text-xl font-medium":!0},f)),{context:e,store_name:t},this.__storeDomainGetValue,"accepted"===e&&this.getStorePageHref&&this.data?n(L||(L=B` <div ?hidden="${0}"> <a class="text-primary font-medium cursor-pointer rounded transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50" href="${0}"> <foxy-i18n infer="" key="store_link"></foxy-i18n> </a> </div> `),"accepted"!==e||!this.getStorePageHref,this.getStorePageHref(this.data._links["fx:store"].href)):"",{context:e,store_name:t},o(null===(i=null===(r=this.data)||void 0===r?void 0:r._links["fx:revoke"])||void 0===i?void 0:i.href),h.matches("reject",!0)&&h.matches("accept",!0),o(null===(l=null===(s=this.data)||void 0===s?void 0:s._links["fx:reject"])||void 0===l?void 0:l.href),o(null===(m=null===(d=this.data)||void 0===d?void 0:d._links["fx:accept"])||void 0===m?void 0:m.href))}}customElements.define("foxy-user-invitation-form",P);export{P as UserInvitationForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-360196ad.js";import"./foxy-form-dialog.js";import"./foxy-user-form.js";import"./foxy-spinner.js";import"./shared-3d353eb8.js";import{s as e,h as s}from"./shared-ba5c42c7.js";import{T as r}from"./shared-4498a367.js";import{a}from"./shared-47f3f5f5.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-66278c21.js";import"./shared-1c985317.js";import"./shared-8f9014ff.js";import"./shared-58add5b4.js";import"./shared-69c98b7b.js";import"./shared-41c9c53f.js";import"./shared-53e42a77.js";import"./shared-930e68b7.js";import"./shared-4e709717.js";import"./shared-cd96ff03.js";import"./shared-53e476fd.js";import"./shared-d46230dc.js";import"./shared-9e0b104a.js";import"./shared-e55c8dc4.js";import"./shared-eb49be2e.js";import"./shared-0b8768db.js";import"./shared-5212ef4f.js";import"./shared-9b138652.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-5c8931a0.js";import"./shared-b3fe8c63.js";import"./shared-27c16d99.js";import"./shared-0e25ac65.js";import"./shared-d0aed1c1.js";import"./shared-fc155659.js";import"./foxy-copy-to-clipboard.js";import"./shared-34a87829.js";import"./shared-d4b77609.js";import"./shared-bf8d95b9.js";import"./shared-b2cbe727.js";import"./shared-bab2ea2c.js";import"./shared-b738ee96.js";import"./foxy-nucleon-element.js";let t,o,d,i,l=e=>e;const n=[{property:"is_merchant",icon:e(t||(t=l`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M22.8961 8.89L21.7932 4.52C21.5622 3.62 20.7429 3 19.7871 3H5.1979C4.25259 3 3.42283 3.63 3.20225 4.52L2.0994 8.89C1.84732 9.91 2.07839 10.95 2.75061 11.77C2.83464 11.88 2.95017 11.96 3.0447 12.06V19C3.0447 20.1 3.99001 21 5.14538 21H19.8501C21.0055 21 21.9508 20.1 21.9508 19V12.06C22.0453 11.97 22.1609 11.88 22.2449 11.78C22.9171 10.96 23.1587 9.91 22.8961 8.89ZM19.7556 4.99L20.8584 9.36C20.9635 9.78 20.8689 10.2 20.5958 10.53C20.4488 10.71 20.1337 11 19.6085 11C18.9678 11 18.4111 10.51 18.3376 9.86L17.7284 5L19.7556 4.99ZM13.5481 5H15.6067L16.1739 9.52C16.2264 9.91 16.1004 10.3 15.8273 10.59C15.5962 10.85 15.2601 11 14.8295 11C14.1258 11 13.5481 10.41 13.5481 9.69V5ZM8.81106 9.52L9.38874 5H11.4474V9.69C11.4474 10.41 10.8697 11 10.0925 11C9.73536 11 9.40975 10.85 9.15767 10.59C8.89509 10.3 8.76905 9.91 8.81106 9.52ZM4.13705 9.36L5.1979 5H7.26706L6.65787 9.86C6.57384 10.51 6.02766 11 5.38696 11C4.87229 11 4.54669 10.71 4.41014 10.53C4.12655 10.21 4.03202 9.78 4.13705 9.36ZM5.14538 19V12.97C5.22941 12.98 5.30293 13 5.38696 13C6.30075 13 7.13052 12.64 7.73971 12.05C8.36992 12.65 9.21019 13 10.166 13C11.0798 13 11.8991 12.64 12.5082 12.07C13.1279 12.64 13.9682 13 14.9135 13C15.7958 13 16.6361 12.65 17.2663 12.05C17.8755 12.64 18.7052 13 19.619 13C19.7031 13 19.7766 12.98 19.8606 12.97V19H5.14538Z" /></svg>`)),key:"merchant"},{property:"is_programmer",icon:e(o||(o=l`<svg class="fill-current h-full w-full" viewBox="0 0 20 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M0 3C0 1.34315 1.34315 0 3 0H17C18.6569 0 20 1.34315 20 3V15C20 16.6569 18.6569 18 17 18H3C1.34315 18 0 16.6569 0 15V3ZM3 2C2.44772 2 2 2.44772 2 3V15C2 15.5523 2.44772 16 3 16H17C17.5523 16 18 15.5523 18 15V3C18 2.44772 17.5523 2 17 2H3ZM4.29289 4.29289C4.68342 3.90237 5.31658 3.90237 5.70711 4.29289L9.70711 8.29289C9.89464 8.48043 10 8.73478 10 9C10 9.26522 9.89464 9.51957 9.70711 9.70711L5.70711 13.7071C5.31658 14.0976 4.68342 14.0976 4.29289 13.7071C3.90237 13.3166 3.90237 12.6834 4.29289 12.2929L7.58579 9L4.29289 5.70711C3.90237 5.31658 3.90237 4.68342 4.29289 4.29289ZM9 13C9 12.4477 9.44771 12 10 12H15C15.5523 12 16 12.4477 16 13C16 13.5523 15.5523 14 15 14H10C9.44771 14 9 13.5523 9 13Z"/></svg>`)),key:"backend_developer"},{property:"is_front_end_developer",icon:e(d||(d=l`<svg class="fill-current h-full w-full" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M14.2747 4.03847C14.8058 4.1902 15.1132 4.74368 14.9615 5.27472L10.9615 19.2747C10.8098 19.8058 10.2563 20.1132 9.72528 19.9615C9.19424 19.8098 8.88675 19.2563 9.03848 18.7253L13.0385 4.72528C13.1902 4.19424 13.7437 3.88675 14.2747 4.03847ZM6.70711 7.29289C7.09763 7.68342 7.09763 8.31658 6.70711 8.7071L3.41421 12L6.70711 15.2929C7.09763 15.6834 7.09763 16.3166 6.70711 16.7071C6.31658 17.0976 5.68342 17.0976 5.29289 16.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L5.29289 7.29289C5.68342 6.90237 6.31658 6.90237 6.70711 7.29289ZM17.2929 7.29289C17.6834 6.90237 18.3166 6.90237 18.7071 7.29289L22.7071 11.2929C22.8946 11.4804 23 11.7348 23 12C23 12.2652 22.8946 12.5196 22.7071 12.7071L18.7071 16.7071C18.3166 17.0976 17.6834 17.0976 17.2929 16.7071C16.9024 16.3166 16.9024 15.6834 17.2929 15.2929L20.5858 12L17.2929 8.70711C16.9024 8.31658 16.9024 7.68342 17.2929 7.29289Z" /></svg>`)),key:"frontend_developer"},{property:"is_designer",icon:e(i||(i=l`<svg class="fill-current h-full w-full" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M10 20C4.49 20 0 15.51 0 10C0 4.49 4.49 0 10 0C15.51 0 20 4.04 20 9C20 12.31 17.31 15 14 15H12.23C11.95 15 11.73 15.22 11.73 15.5C11.73 15.62 11.78 15.73 11.86 15.83C12.27 16.3 12.5 16.89 12.5 17.5C12.5 18.88 11.38 20 10 20ZM10 2C5.59 2 2 5.59 2 10C2 14.41 5.59 18 10 18C10.28 18 10.5 17.78 10.5 17.5C10.5 17.34 10.42 17.22 10.36 17.15C9.95 16.69 9.73 16.1 9.73 15.5C9.73 14.12 10.85 13 12.23 13H14C16.21 13 18 11.21 18 9C18 5.14 14.41 2 10 2Z" /><path d="M4.5 11C5.32843 11 6 10.3284 6 9.5C6 8.67157 5.32843 8 4.5 8C3.67157 8 3 8.67157 3 9.5C3 10.3284 3.67157 11 4.5 11Z" /><path d="M7.5 7C8.32843 7 9 6.32843 9 5.5C9 4.67157 8.32843 4 7.5 4C6.67157 4 6 4.67157 6 5.5C6 6.32843 6.67157 7 7.5 7Z" /><path d="M12.5 7C13.3284 7 14 6.32843 14 5.5C14 4.67157 13.3284 4 12.5 4C11.6716 4 11 4.67157 11 5.5C11 6.32843 11.6716 7 12.5 7Z" /><path d="M15.5 11C16.3284 11 17 10.3284 17 9.5C17 8.67157 16.3284 8 15.5 8C14.6716 8 14 8.67157 14 9.5C14 10.3284 14.6716 11 15.5 11Z" /></svg>`)),key:"designer"}];let m,C,p,f,h,c,j,u=e=>e;class g extends(a(r,"users-table")){constructor(){super(...arguments),this.columns=[g.nameColumn,g.emailColumn,g.rolesColumn,g.lastUpdatedColumn,g.actionsColumn]}render(){return s(m||(m=u` <foxy-form-dialog parent="${0}" form="foxy-user-form" lang="${0}" ns="${0}" id="form"> </foxy-form-dialog> ${0} `),this.href,this.lang,this.ns,super.render())}}g.nameColumn={cell:e=>s(C||(C=u` <span data-testclass="name" class="text-m font-medium"> ${0} ${0} </span> `),e.data.first_name,e.data.last_name)},g.emailColumn={hideBelow:"md",cell:e=>s(p||(p=u` <span data-testclass="email" class="text-m text-secondary">${0}</span> `),e.data.email)},g.rolesColumn={cell:e=>s(f||(f=u` <div data-testclass="roles" class="flex space-x-s"> ${0} </div> `),["is_merchant","is_programmer","is_front_end_developer","is_designer"].map((r=>s(h||(h=u` <div class="${0}" style="width:1rem;height:1rem"> ${0} </div> `),e.data[r]?"":"text-disabled",n.find((e=>e.property===r)).icon))))},g.lastUpdatedColumn={hideBelow:"lg",cell:e=>s(c||(c=u` <span data-testclass="lastUpdated" class="text-m text-secondary font-tnum"> <foxy-i18n options="${0}" lang="${0}" key="date" ns="${0}"> </foxy-i18n> <foxy-i18n options="${0}" lang="${0}" key="time" ns="${0}"> </foxy-i18n> </span> `),JSON.stringify({value:e.data.date_modified}),e.lang,e.ns,JSON.stringify({value:e.data.date_modified}),e.lang,e.ns)},g.actionsColumn={cell:e=>s(j||(j=u` <vaadin-button data-testclass="actions" theme="tertiary small" @click="${0}"> <foxy-i18n lang="${0}" key="update" ns="${0}"></foxy-i18n> </vaadin-button> `),(s=>{const r=s.target,a=r.getRootNode().querySelector("#form");a.href=e.data._links.self.href,a.show(r)}),e.lang,e.ns)},customElements.define("foxy-users-table",g);export{g as UsersTable};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-e2d5673b.js";import"./foxy-nucleon-element.js";import"./shared-3d353eb8.js";import{_ as e}from"./shared-8f9014ff.js";import{a as s}from"./shared-47f3f5f5.js";import{g as t}from"./shared-bab2ea2c.js";import{I as r}from"./shared-6740e365.js";import{i as a}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";import{h as i}from"./shared-ba5c42c7.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-930e68b7.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";let d,n,l=e=>e;class c extends(s(r,"webhook-card")){constructor(){super(...arguments),this.resourceUri=null}static get properties(){return e(e({},super.properties),{},{resourceUri:{attribute:"resource-uri"}})}get isBodyReady(){var e;return!!(null===(e=this.__statusesLoader)||void 0===e?void 0:e.data)&&super.isBodyReady}renderBody(){var e,s,r,c,u,p,h,m,f,v;let x;try{const a=new URL(null!==(s=null===(e=this.data)||void 0===e?void 0:e._links["fx:statuses"].href)&&void 0!==s?s:"");a.searchParams.set("order","date_created desc"),a.searchParams.set("limit","1");const o=t(null!==(r=this.resourceUri)&&void 0!==r?r:"");null!==o&&a.searchParams.set("resource_id",String(o)),x=a.toString()}catch(e){x=void 0}const b=null===(u=null===(c=this.__statusesLoader)||void 0===c?void 0:c.data)||void 0===u?void 0:u._embedded["fx:webhook_statuses"],j=null==b?void 0:b[0],y=b?null!==(p=null==j?void 0:j.status)&&void 0!==p?p:"none":"loading",_=!!(null===(h=this.data)||void 0===h?void 0:h.is_active);return i(d||(d=l` <div class="grid grid-cols-1 leading-s -my-xs"> <p class="flex items-center gap-s justify-between"> <span class="text-m truncate text-body font-medium"> ${0}​ </span> <span class="text-s text-tertiary"> <foxy-i18n class="${0}" infer="" key="is_active_${0}"> </foxy-i18n> </span> </p> <p class="text-s truncate text-secondary">${0}​</p> <p class="text-s truncate text-tertiary"> ${0} <foxy-i18n class="${0}" infer="" key="status_${0}" .options="${0}"> </foxy-i18n> </p> </div> <foxy-nucleon class="hidden" infer="" href="${0}" id="statusesLoader" @update="${0}"> </foxy-nucleon> `),null===(m=this.data)||void 0===m?void 0:m.name,o({"text-success":_}),_,null===(f=this.data)||void 0===f?void 0:f.url,this.resourceUri?"":i(n||(n=l`<span class="capitalize">${0}</span> •`),null===(v=this.data)||void 0===v?void 0:v.event_resource),o({"text-error":_&&"failed"===y}),y,j,a(x),(()=>this.requestUpdate()))}get __statusesLoader(){return this.renderRoot.querySelector("#statusesLoader")}}customElements.define("foxy-webhook-card",c);export{c as WebhookCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-4eb52fc7.js";import"./shared-4158f91e.js";import"./shared-28ceb7f7.js";import"./shared-59128d82.js";import"./shared-64231b81.js";import"./shared-5c8931a0.js";import{I as e}from"./shared-fc155659.js";import"./foxy-webhook-status-card.js";import"./foxy-webhook-log-card.js";import{_ as r,B as t}from"./shared-8f9014ff.js";import{g as o}from"./shared-bab2ea2c.js";import{a as s}from"./shared-47f3f5f5.js";import{i}from"./shared-53e42a77.js";import{h as a}from"./shared-ba5c42c7.js";import"./shared-6bf89411.js";import"./shared-5a469962.js";import"./shared-eb49be2e.js";import"./shared-66278c21.js";import"./shared-9e0b104a.js";import"./shared-360196ad.js";import"./shared-fb859ece.js";import"./shared-4194ffe7.js";import"./shared-27c16d99.js";import"./shared-32b2d003.js";import"./shared-0e25ac65.js";import"./shared-b3fe8c63.js";import"./shared-e55c8dc4.js";import"./foxy-collection-page.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-b2cbe727.js";import"./shared-3d353eb8.js";import"./shared-930e68b7.js";import"./shared-41c9c53f.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-5fd5805c.js";import"./shared-53e476fd.js";import"./foxy-swipe-actions.js";import"./foxy-form-dialog.js";import"./shared-1c985317.js";import"./shared-58add5b4.js";import"./shared-4e709717.js";import"./foxy-pagination.js";import"./shared-742640c2.js";import"./shared-be2ce0e6.js";import"./shared-0b8768db.js";import"./shared-5212ef4f.js";import"./shared-6f071960.js";import"./shared-34a87829.js";import"./shared-bf8d95b9.js";import"./shared-d0aed1c1.js";import"./foxy-copy-to-clipboard.js";import"./shared-e2d5673b.js";import"./shared-6740e365.js";let n,d=e=>e;class l extends(s(e,"webhook-form")){constructor(){super(...arguments),this.getStatusPageHref=null,this.getLogPageHref=null,this.resourceUri=null,this.__encryptionKeyGeneratorOptions={separator:"",length:512},this.__eventResources=[{value:"subscription",label:"event_resource_subscription"},{value:"transaction",label:"event_resource_transaction"},{value:"customer",label:"event_resource_customer"}]}static get properties(){return r(r({},super.properties),{},{getStatusPageHref:{attribute:!1},getLogPageHref:{attribute:!1},resourceUri:{attribute:"resource-uri"}})}static get v8n(){return[({name:e})=>!!e||"name:v8n_required",({name:e})=>!!e&&e.length<=255||"name:v8n_too_long",({url:e})=>!e||e.length<=1e3||"url:v8n_too_long",({query:e})=>!e||e.length<=1e3||"query:v8n_too_long",({encryption_key:e})=>!!e||"encryption-key:v8n_required",({encryption_key:e})=>!e||e.length<=1e3||"encryption-key:v8n_too_long"]}get hiddenSelector(){const e=[super.hiddenSelector.toString()];return this.data?e.unshift("group-two:event-resource"):e.unshift("logs","statuses"),new t(e.join(" ").trim())}get headerSubtitleOptions(){var e,r;const t=null===(e=this.data)||void 0===e?void 0:e.format;return{context:"json"===t?null===(r=this.data)||void 0===r?void 0:r.event_resource:t}}edit(e){super.edit(e),this.form.format||super.edit({format:"json"}),this.form.version||super.edit({version:2})}renderBody(){var e,r,t,s;const l=this.resourceUri?o(this.resourceUri):null;let c,m;try{const t=new URL(null!==(r=null===(e=this.data)||void 0===e?void 0:e._links["fx:statuses"].href)&&void 0!==r?r:"");null!==l&&t.searchParams.set("resource_id",String(l)),t.searchParams.set("order","date_created desc"),c=t.toString()}catch(e){c=void 0}try{const e=new URL(null!==(s=null===(t=this.data)||void 0===t?void 0:t._links["fx:logs"].href)&&void 0!==s?s:"");null!==l&&e.searchParams.set("resource_id",String(l)),e.searchParams.set("order","date_created desc"),m=e.toString()}catch(e){m=void 0}return a(n||(n=d` ${0} <foxy-internal-summary-control infer="group-one"> <foxy-internal-text-control layout="summary-item" infer="name"></foxy-internal-text-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-two"> <foxy-internal-select-control layout="summary-item" infer="event-resource" .options="${0}"> </foxy-internal-select-control> <foxy-internal-text-control layout="summary-item" infer="query"> </foxy-internal-text-control> <foxy-internal-text-control layout="summary-item" infer="url"></foxy-internal-text-control> <foxy-internal-password-control layout="summary-item" infer="encryption-key" show-generator .generatorOptions="${0}"> </foxy-internal-password-control> </foxy-internal-summary-control> <foxy-internal-summary-control infer="group-three"> <foxy-internal-switch-control infer="is-active"></foxy-internal-switch-control> </foxy-internal-summary-control> <foxy-internal-async-list-control first="${0}" infer="statuses" limit="10" item="foxy-webhook-status-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> <foxy-internal-async-list-control first="${0}" infer="logs" limit="10" item="foxy-webhook-log-card" hide-delete-button .getPageHref="${0}" .itemProps="${0}"> </foxy-internal-async-list-control> ${0} `),this.renderHeader(),this.__eventResources,this.__encryptionKeyGeneratorOptions,i(c),this.getStatusPageHref,this.resourceUri?{layout:"resource"}:{},i(m),this.getLogPageHref,this.resourceUri?{layout:"resource"}:{},super.renderBody())}}customElements.define("foxy-webhook-form",l);export{l as WebhookForm};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3d353eb8.js";import"./shared-e2d5673b.js";import{_ as e}from"./shared-8f9014ff.js";import{a as s}from"./shared-47f3f5f5.js";import{I as r}from"./shared-6740e365.js";import{h as t}from"./shared-ba5c42c7.js";import"./shared-930e68b7.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";import"./shared-4e709717.js";let o,a,d=e=>e;class i extends(s(r,"webhook-log-card")){constructor(){super(...arguments),this.layout=null}static get properties(){return e(e({},super.properties),{},{layout:{}})}renderBody(){var e;const{response_body:s,response_code:r,resource_type:i,date_created:p,resource_id:m}=null!==(e=this.data)&&void 0!==e?e:{};return t(o||(o=d` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> ${0} </p> <p class="text-secondary text-s">HTTP ${0} • ${0}</p> </div> `),{value:p},"resource"===this.layout?"":t(a||(a=d`<span class="text-xs text-tertiary capitalize">${0} #${0}</span>`),i,m),r,s)}}customElements.define("foxy-webhook-log-card",i);export{i as WebhookLogCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-3d353eb8.js";import"./shared-e2d5673b.js";import{_ as s}from"./shared-8f9014ff.js";import{a as e}from"./shared-47f3f5f5.js";import{I as r}from"./shared-6740e365.js";import{h as t}from"./shared-ba5c42c7.js";import{c as a}from"./shared-4e709717.js";import"./shared-930e68b7.js";import"./foxy-spinner.js";import"./shared-d4b77609.js";import"./shared-eb49be2e.js";import"./shared-5a469962.js";import"./shared-b2cbe727.js";import"./shared-9b138652.js";import"./shared-69c98b7b.js";import"./shared-cd96ff03.js";import"./shared-da4f9115.js";import"./shared-9496e995.js";import"./shared-791b4510.js";import"./shared-0e19bda5.js";let o,i,d=s=>s;const p=e(r,"webhook-status-card");class c extends p{constructor(){super(...arguments),this.layout=null}static get properties(){return s(s({},super.properties),{},{layout:{}})}renderBody(){var s;const{resource_type:e,date_created:r,resource_id:p,status:c}=null!==(s=this.data)&&void 0!==s?s:{};return t(o||(o=d` <div class="leading-none space-y-xs"> <p class="flex justify-between items-center"> <foxy-i18n .options="${0}" class="font-medium" infer="" key="date"> </foxy-i18n> ${0} </p> <p class="${0}"> <foxy-i18n infer="" key="status_${0}"></foxy-i18n> </p> </div> `),{value:r},"resource"===this.layout?"":t(i||(i=d`<span class="text-xs text-tertiary capitalize">${0} #${0}</span>`),e,p),a({"text-secondary":"pending"===c,"text-success":"successful"===c,"text-error":"failed"===c,"text-s":!0}),c)}}customElements.define("foxy-webhook-status-card",c);export{c as WebhookStatusCard};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-6bf89411.js";import{h as e,P as t}from"./shared-5a469962.js";import{a}from"./shared-b3fe8c63.js";import{C as i}from"./shared-360196ad.js";import{E as r,T as l}from"./shared-66278c21.js";const o=e`<dom-module id="lumo-text-area" theme-for="vaadin-text-area">
|
|
2
2
|
<template>
|
|
3
3
|
<style include="lumo-text-field">
|
|
4
4
|
[part="input-field"],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-5212ef4f.js";import"./shared-
|
|
1
|
+
import"./shared-5212ef4f.js";import"./shared-3d353eb8.js";import{_ as e,l as t}from"./shared-8f9014ff.js";import{C as r}from"./shared-41c9c53f.js";import{a as s,T as i,w as n}from"./shared-47f3f5f5.js";import{h as l,r as o,L as h}from"./shared-ba5c42c7.js";import{I as a}from"./shared-930e68b7.js";import{N as p}from"./shared-9b138652.js";import{s as u}from"./shared-791b4510.js";let c,d,_,f,v=e=>e;class y extends(r(s(i(a(h))))){constructor(){super(...arguments),this.nucleon=null}static get inferredProperties(){return[...super.inferredProperties,"nucleon"]}static get properties(){return e(e({},super.properties),{},{nucleon:{attribute:!1}})}inferFromElement(e,t){return"nucleon"===e&&t instanceof p?t:super.inferFromElement(e,t)}applyInferredProperties(e){var t,r;super.applyInferredProperties(e),this.nucleon=null!==(t=e.get("nucleon"))&&void 0!==t?t:null,!1===(null===(r=this.nucleon)||void 0===r?void 0:r.in("idle"))&&(this.disabled=!0)}renderLightDom(){if("string"!=typeof this.infer)return;const e=l(c||(c=v` <slot name="${0}:before" slot="before"></slot> <slot name="${0}:after" slot="after"></slot> `),this.infer,this.infer);o(e,this)}updated(e){super.updated(e),this.renderLightDom()}renderControl(){return l(d||(d=v``))}render(){return this.hidden?l(_||(_=v``)):l(f||(f=v` ${0} ${0} ${0} `),this.renderTemplateOrSlot("before",this.nucleon),this.renderControl(),this.renderTemplateOrSlot("after",this.nucleon))}}function m(e){try{return JSON.parse(e)}catch(e){return null}}customElements.define("foxy-internal-control",y);class g extends y{constructor(){var e;super(...arguments),e=this,this.checkValidityAsync=null,this.jsonTemplate=null,this.jsonPath=null,this.getValue=()=>{var e;const r=t(null===(e=this.nucleon)||void 0===e?void 0:e.form,this.property);if(this.jsonPath){const e=m(r),s=m(this.jsonTemplate);return t(e,this.jsonPath,t(s,this.jsonPath))}return r},this.setValue=e=>{var t,r,s,i,n,l,o,h,a;const[p,...c]=this.property.split(".");if(c.length){const l=null!==(r=null===(t=this.nucleon)||void 0===t?void 0:t.form[p])&&void 0!==r?r:{};if(this.jsonPath){const t=null!==(i=m(null===(s=this.nucleon)||void 0===s?void 0:s.form[p]))&&void 0!==i?i:m(this.jsonTemplate);u(t,this.jsonPath,e),u(l,c,JSON.stringify(t))}else u(l,c,e);null===(n=this.nucleon)||void 0===n||n.edit({[p]:l})}else if(this.jsonPath){const t=null!==(o=m(null===(l=this.nucleon)||void 0===l?void 0:l.form[p]))&&void 0!==o?o:m(this.jsonTemplate);u(t,this.jsonPath,e),null===(h=this.nucleon)||void 0===h||h.edit({[p]:JSON.stringify(t)})}else null===(a=this.nucleon)||void 0===a||a.edit({[p]:e})},this.__debouncedCheckValidityAsync=n((async function(t){var r;const s=await(null===(r=e.checkValidityAsync)||void 0===r?void 0:r.call(e,t));e._value===t&&(e.__asyncError=!0===s?null:null!=s?s:null)}),300),this.__previousValue=null,this.__placeholder=null,this.__helperText=null,this.__asyncError=null,this.__v8nPrefix=null,this.__property=null,this.__label=null}static get properties(){return e(e({},super.properties),{},{checkValidityAsync:{attribute:!1},jsonTemplate:{attribute:"json-template"},placeholder:{type:String,noAccessor:!0},helperText:{type:String,attribute:"helper-text",noAccessor:!0},v8nPrefix:{type:String,attribute:"v8n-prefix",noAccessor:!0},jsonPath:{attribute:"json-path"},getValue:{attribute:!1},setValue:{attribute:!1},property:{type:String,noAccessor:!0},label:{type:String,noAccessor:!0},__asyncError:{attribute:!1}})}get placeholder(){return"string"==typeof this.__placeholder?this.__placeholder:this.t("placeholder")}set placeholder(e){const t=this.__placeholder;this.__placeholder=e,this.requestUpdate("placeholder",t)}get helperText(){return"string"==typeof this.__helperText?this.__helperText:this.t("helper_text")}set helperText(e){const t=this.__helperText;this.__helperText=e,this.requestUpdate("helperText",t)}get v8nPrefix(){return"string"==typeof this.__v8nPrefix?this.__v8nPrefix:"string"==typeof this.infer?`${this.infer}:`:""}set v8nPrefix(e){const t=this.__v8nPrefix;this.__v8nPrefix=e,this.requestUpdate("v8nPrefix",t)}get property(){return"string"==typeof this.__property?this.__property:"string"==typeof this.infer?this.infer.replace(/-/g,"_"):""}set property(e){const t=this.__property;this.__property=e,this.requestUpdate("property",t)}get label(){return"string"==typeof this.__label?this.__label:this.t("label")}set label(e){const t=this.__label;this.__label=e,this.requestUpdate("label",t)}resetPlaceholder(){const e=this.__placeholder;this.__placeholder=null,this.requestUpdate("placeholder",e)}resetHelperText(){const e=this.__helperText;this.__helperText=null,this.requestUpdate("helperText",e)}resetV8nPrefix(){const e=this.__v8nPrefix;this.__v8nPrefix=null,this.requestUpdate("v8nPrefix",e)}resetProperty(){const e=this.__property;this.__property=null,this.requestUpdate("property",e)}resetLabel(){const e=this.__label;this.__label=null,this.requestUpdate("label",e)}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())}get _value(){return this.getValue()}set _value(e){this.__previousValue=this._value,this.__asyncError=null,this._error||this.__previousValue===e||this.__debouncedCheckValidityAsync(e);const t=new CustomEvent("change",{cancelable:!0,detail:e});this.dispatchEvent(t)&&this.setValue(e)}get _error(){var e,t;const r=null===(e=this.nucleon)||void 0===e?void 0:e.errors.find((e=>e.startsWith(this.v8nPrefix)));return null!==(t=null!=r?r:this.__asyncError)&&void 0!==t?t:void 0}get _errorMessage(){return this._error?this.t(this._error.substring(this.v8nPrefix.length)):void 0}get _checkValidity(){return()=>!this._error}}customElements.define("foxy-internal-editable-control",g);export{g as I,y as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as t}from"./shared-
|
|
1
|
+
import{h as t}from"./shared-5a469962.js";import{T as e}from"./shared-b3fe8c63.js";import{D as l}from"./shared-47f3f5f5.js";const r=t`<dom-module id="lumo-email-field" theme-for="vaadin-email-field">
|
|
2
2
|
<template>
|
|
3
3
|
<style>
|
|
4
4
|
:not(*):placeholder-shown, /* to prevent broken styles on IE */
|
|
@@ -19,7 +19,7 @@ import{h as t}from"./shared-433eea12.js";import{T as e}from"./shared-529a82a3.js
|
|
|
19
19
|
Copyright (c) 2018 Vaadin Ltd.
|
|
20
20
|
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
21
21
|
*/
|
|
22
|
-
const
|
|
22
|
+
const i=t`<dom-module id="vaadin-email-field-template">
|
|
23
23
|
<template>
|
|
24
24
|
<style>
|
|
25
25
|
:host([dir="rtl"]) [part="input-field"] {
|
|
@@ -44,4 +44,4 @@ const a=t`<dom-module id="vaadin-email-field-template">
|
|
|
44
44
|
</style>
|
|
45
45
|
</template>
|
|
46
46
|
|
|
47
|
-
</dom-module>`;let
|
|
47
|
+
</dom-module>`;let a;document.head.appendChild(i.content);class o extends e{static get is(){return"vaadin-email-field"}static get version(){return"2.10.0"}static get template(){if(!a){a=super.template.cloneNode(!0);const t=l.import(this.is+"-template","template").content.querySelector("style");a.content.appendChild(t)}return a}ready(){super.ready(),this.inputElement.type="email",this.inputElement.autocapitalize="off"}_createConstraintsObserver(){this.pattern=this.pattern||"^([a-zA-Z0-9_\\.\\-+])+@[a-zA-Z0-9-.]+\\.[a-zA-Z0-9-]{2,}$",super._createConstraintsObserver()}}customElements.define(o.is,o);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as u,E as d,G as l,H as f,I as p,J as v,K as y,L as w,M as x,N as b,O as m,P as g,Q as E,S,T,U as L,V as _,W as O,X as k,Y as C,Z as N,$ as M,a0 as z,a1 as D,a2 as P,a3 as I,a4 as R}from"./shared-7fec42f2.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),U=new Map,j=0,F=function(){return"x:"+j++},X=function(t,e){return U.set(t,e),t},A=function(t){return U.get(t)},V=function(t){U.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=F()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,l,f,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){l={error:t}}finally{try{L&&!L.done&&(f=T.return)&&f.call(T)}finally{if(l)throw l.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,l,f=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;f.exec(o,f.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(l=S.return)&&l.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),l=d.next();!l.done;l=d.next()){u(l.value)}}catch(t){i={error:t}}finally{try{l&&!l.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case f:this.stopChild(t.activity.id);break;case l:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
|
|
1
|
+
import{p as t,q as e,s as n,u as i,v as r,w as s,x as o,y as a,z as h,C as c,D as u,E as d,G as f,H as l,I as p,J as v,K as y,L as w,M as x,N as b,O as m,P as g,Q as E,S,T,U as L,V as _,W as O,X as k,Y as C,Z as N,$ as M,a0 as z,a1 as D,a2 as P,a3 as I,a4 as R}from"./shared-8f9014ff.js";var q={deferEvents:!1},J=function(){function e(e){this.processingEvent=!1,this.queue=[],this.initialized=!1,this.options=t(t({},q),e)}return e.prototype.initialize=function(t){if(this.initialized=!0,t){if(!this.options.deferEvents)return void this.schedule(t);this.process(t)}this.flushEvents()},e.prototype.schedule=function(t){if(this.initialized&&!this.processingEvent){if(0!==this.queue.length)throw new Error("Event queue should be empty when it is not processing events");this.process(t),this.flushEvents()}else this.queue.push(t)},e.prototype.clear=function(){this.queue=[]},e.prototype.flushEvents=function(){for(var t=this.queue.shift();t;)this.process(t),t=this.queue.shift()},e.prototype.process=function(t){this.processingEvent=!0;try{t()}catch(t){throw this.clear(),t}finally{this.processingEvent=!1}},e}(),U=new Map,j=0,F=function(){return"x:"+j++},X=function(t,e){return U.set(t,e),t},A=function(t){return U.get(t)},V=function(t){U.delete(t)};function G(){return"undefined"!=typeof self?self:"undefined"!=typeof window?window:"undefined"!=typeof global?global:void 0}var H,K={sync:!1,autoForward:!1};!function(t){t[t.NotStarted=0]="NotStarted",t[t.Running=1]="Running",t[t.Stopped=2]="Stopped"}(H||(H={}));var Q=function(){function q(e,n){var i=this;void 0===n&&(n=q.defaultOptions),this.machine=e,this.scheduler=new J,this.delayedEventsMap={},this.listeners=new Set,this.contextListeners=new Set,this.stopListeners=new Set,this.doneListeners=new Set,this.eventListeners=new Set,this.sendListeners=new Set,this.initialized=!1,this.status=H.NotStarted,this.children=new Map,this.forwardTo=new Set,this.init=this.start,this.send=function(t,e){if(_(t))return i.batch(t),i.state;var n=c(O(t,e));if(i.status===H.Stopped)return i.state;if(i.status!==H.Running&&!i.options.deferEvents)throw new Error('Event "'+n.name+'" was sent to uninitialized service "'+i.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.\nEvent: '+JSON.stringify(n.data));return i.scheduler.schedule((function(){i.forward(n);var t=i.nextState(n);i.update(t,n)})),i._state},this.sendTo=function(e,n){var r=i.parent&&(n===k.Parent||i.parent.id===n),s=r?i.parent:C(n)?i.children.get(n)||A(n):N(n)?n:void 0;if(s)"machine"in s?s.send(t(t({},e),{name:e.name===M?""+T(i.id):e.name,origin:i.sessionId})):s.send(e.data);else if(!r)throw new Error("Unable to send event to child '"+n+"' from service '"+i.id+"'.")};var r=t(t({},q.defaultOptions),n),s=r.clock,o=r.logger,a=r.parent,h=r.id,u=void 0!==h?h:e.id;this.id=u,this.logger=o,this.clock=s,this.parent=a,this.options=r,this.scheduler=new J({deferEvents:this.options.deferEvents}),this.sessionId=F()}return Object.defineProperty(q.prototype,"initialState",{get:function(){var t=this;return this._initialState?this._initialState:s(this,(function(){return t._initialState=t.machine.initialState,t._initialState}))},enumerable:!1,configurable:!0}),Object.defineProperty(q.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),q.prototype.execute=function(t,n){var i,r;try{for(var s=e(t.actions),o=s.next();!o.done;o=s.next()){var a=o.value;this.exec(a,t,n)}}catch(t){i={error:t}}finally{try{o&&!o.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}},q.prototype.update=function(t,s){var o,a,h,c,u,d,f,l,p=this;if(t._sessionid=this.sessionId,this._state=t,this.options.execute&&this.execute(this.state),this.children.forEach((function(t){p.state.children[t.id]=t})),this.devTools&&this.devTools.send(s.data,t),t.event)try{for(var v=e(this.eventListeners),y=v.next();!y.done;y=v.next()){(0,y.value)(t.event)}}catch(t){o={error:t}}finally{try{y&&!y.done&&(a=v.return)&&a.call(v)}finally{if(o)throw o.error}}try{for(var w=e(this.listeners),x=w.next();!x.done;x=w.next()){(0,x.value)(t,t.event)}}catch(t){h={error:t}}finally{try{x&&!x.done&&(c=w.return)&&c.call(w)}finally{if(h)throw h.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){(0,m.value)(this.state.context,this.state.history?this.state.history.context:void 0)}}catch(t){u={error:t}}finally{try{m&&!m.done&&(d=b.return)&&d.call(b)}finally{if(u)throw u.error}}var g=n(t.configuration||[],this.machine);if(this.state.configuration&&g){var E=t.configuration.find((function(t){return"final"===t.type&&t.parent===p.machine})),S=E&&E.doneData?i(E.doneData,t.context,s):void 0;try{for(var T=e(this.doneListeners),L=T.next();!L.done;L=T.next()){(0,L.value)(r(this.id,S))}}catch(t){f={error:t}}finally{try{L&&!L.done&&(l=T.return)&&l.call(T)}finally{if(f)throw f.error}}this.stop()}},q.prototype.onTransition=function(t){return this.listeners.add(t),this.status===H.Running&&t(this.state,this.state.event),this},q.prototype.subscribe=function(t,e,n){var i,r=this;if(!t)return{unsubscribe:function(){}};var s=n;return"function"==typeof t?i=t:(i=t.next.bind(t),s=t.complete.bind(t)),this.listeners.add(i),this.status===H.Running&&i(this.state),s&&this.onDone(s),{unsubscribe:function(){i&&r.listeners.delete(i),s&&r.doneListeners.delete(s)}}},q.prototype.onEvent=function(t){return this.eventListeners.add(t),this},q.prototype.onSend=function(t){return this.sendListeners.add(t),this},q.prototype.onChange=function(t){return this.contextListeners.add(t),this},q.prototype.onStop=function(t){return this.stopListeners.add(t),this},q.prototype.onDone=function(t){return this.doneListeners.add(t),this},q.prototype.off=function(t){return this.listeners.delete(t),this.eventListeners.delete(t),this.sendListeners.delete(t),this.stopListeners.delete(t),this.doneListeners.delete(t),this.contextListeners.delete(t),this},q.prototype.start=function(t){var e=this;if(this.status===H.Running)return this;X(this.sessionId,this),this.initialized=!0,this.status=H.Running;var n=void 0===t?this.initialState:s(this,(function(){return z(t)?e.machine.resolveState(t):e.machine.resolveState(D.from(t,e.machine.context))}));return this.options.devTools&&this.attachDev(),this.scheduler.initialize((function(){e.update(n,o)})),this},q.prototype.stop=function(){var t,n,i,r,s,o,c,u,d,f,l=this;try{for(var p=e(this.listeners),v=p.next();!v.done;v=p.next()){var y=v.value;this.listeners.delete(y)}}catch(e){t={error:e}}finally{try{v&&!v.done&&(n=p.return)&&n.call(p)}finally{if(t)throw t.error}}try{for(var w=e(this.stopListeners),x=w.next();!x.done;x=w.next()){(y=x.value)(),this.stopListeners.delete(y)}}catch(t){i={error:t}}finally{try{x&&!x.done&&(r=w.return)&&r.call(w)}finally{if(i)throw i.error}}try{for(var b=e(this.contextListeners),m=b.next();!m.done;m=b.next()){y=m.value;this.contextListeners.delete(y)}}catch(t){s={error:t}}finally{try{m&&!m.done&&(o=b.return)&&o.call(b)}finally{if(s)throw s.error}}try{for(var g=e(this.doneListeners),E=g.next();!E.done;E=g.next()){y=E.value;this.doneListeners.delete(y)}}catch(t){c={error:t}}finally{try{E&&!E.done&&(u=g.return)&&u.call(g)}finally{if(c)throw c.error}}this.state.configuration.forEach((function(t){var n,i;try{for(var r=e(t.definition.exit),s=r.next();!s.done;s=r.next()){var o=s.value;l.exec(o,l.state)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}})),this.children.forEach((function(t){a(t.stop)&&t.stop()}));try{for(var S=e(h(this.delayedEventsMap)),T=S.next();!T.done;T=S.next()){var L=T.value;this.clock.clearTimeout(this.delayedEventsMap[L])}}catch(t){d={error:t}}finally{try{T&&!T.done&&(f=S.return)&&f.call(S)}finally{if(d)throw d.error}}return this.scheduler.clear(),this.initialized=!1,this.status=H.Stopped,V(this.sessionId),this},q.prototype.batch=function(t){var n=this;if(this.status===H.NotStarted&&this.options.deferEvents);else if(this.status!==H.Running)throw new Error(t.length+' event(s) were sent to uninitialized service "'+this.machine.id+'". Make sure .start() is called for this service, or set { deferEvents: true } in the service options.');this.scheduler.schedule((function(){var i,r,o=n.state,a=!1,h=[],u=function(t){var e=c(t);n.forward(e),o=s(n,(function(){return n.machine.transition(o,e)})),h.push.apply(h,P(o.actions.map((function(t){return I(t,o)})))),a=a||!!o.changed};try{for(var d=e(t),f=d.next();!f.done;f=d.next()){u(f.value)}}catch(t){i={error:t}}finally{try{f&&!f.done&&(r=d.return)&&r.call(d)}finally{if(i)throw i.error}}o.changed=a,o.actions=h,n.update(o,c(t[t.length-1]))}))},q.prototype.sender=function(t){return this.send.bind(this,t)},q.prototype.nextState=function(t){var e=this,n=c(t);if(0===n.name.indexOf(u)&&!this.state.nextEvents.some((function(t){return 0===t.indexOf(u)})))throw n.data.data;return s(this,(function(){return e.machine.transition(e.state,n)}))},q.prototype.forward=function(t){var n,i;try{for(var r=e(this.forwardTo),s=r.next();!s.done;s=r.next()){var o=s.value,a=this.children.get(o);if(!a)throw new Error("Unable to forward event '"+t+"' from interpreter '"+this.id+"' to nonexistant child '"+o+"'.");a.send(t)}}catch(t){n={error:t}}finally{try{s&&!s.done&&(i=r.return)&&i.call(r)}finally{if(n)throw n.error}}},q.prototype.defer=function(t){var e=this;this.delayedEventsMap[t.id]=this.clock.setTimeout((function(){t.to?e.sendTo(t._event,t.to):e.send(t._event)}),t.delay)},q.prototype.cancel=function(t){this.clock.clearTimeout(this.delayedEventsMap[t]),delete this.delayedEventsMap[t]},q.prototype.exec=function(t,e,n){void 0===n&&(n=this.machine.options.actions);var r=e.context,s=e._event,o=t.exec||d(t.type,n),h=a(o)?o:o?o.exec:t.exec;if(h)try{return h(r,s.data,{action:t,state:this.state,_event:s})}catch(t){throw this.parent&&this.parent.send({type:"xstate.error",data:t}),t}switch(t.type){case g:var c=t;if("number"==typeof c.delay)return void this.defer(c);c.to?this.sendTo(c._event,c.to):this.send(c._event);break;case m:this.cancel(t.sendId);break;case p:var u=t.activity;if(!this.state.activities[u.id||u.type])break;if(u.type===v.Invoke){var E=y(u.src),S=this.machine.options.services?this.machine.options.services[E.type]:void 0,T=u.id,L=u.data,_="autoForward"in u?u.autoForward:!!u.forward;if(!S)return;var O=L?i(L,r,s):void 0,k=a(S)?S(r,s.data,{data:O,src:E}):S;w(k)?this.spawnPromise(Promise.resolve(k),T):a(k)?this.spawnCallback(k,T):x(k)?this.spawnObservable(k,T):b(k)&&this.spawnMachine(O?k.withContext(O):k,{id:T,autoForward:_})}else this.spawnActivity(u);break;case l:this.stopChild(t.activity.id);break;case f:var C=t.label,N=t.value;C?this.logger(C,N):this.logger(N)}},q.prototype.removeChild=function(t){this.children.delete(t),this.forwardTo.delete(t),delete this.state.children[t]},q.prototype.stopChild=function(t){var e=this.children.get(t);e&&(this.removeChild(t),a(e.stop)&&e.stop())},q.prototype.spawn=function(e,n,i){if(w(e))return this.spawnPromise(Promise.resolve(e),n);if(a(e))return this.spawnCallback(e,n);if(E(e))return this.spawnActor(e);if(x(e))return this.spawnObservable(e,n);if(b(e))return this.spawnMachine(e,t(t({},i),{id:n}));throw new Error('Unable to spawn entity "'+n+'" of type "'+typeof e+'".')},q.prototype.spawnMachine=function(e,n){var i=this;void 0===n&&(n={});var r=new q(e,t(t({},this.options),{parent:this,id:n.id||e.id})),s=t(t({},K),n);s.sync&&r.onTransition((function(t){i.send(S,{state:t,id:r.id})}));var o=r;return this.children.set(r.id,o),s.autoForward&&this.forwardTo.add(r.id),r.onDone((function(t){i.removeChild(r.id),i.send(c(t,{origin:r.id}))})).start(),o},q.prototype.spawnPromise=function(t,e){var n=this,i=!1;t.then((function(t){i||(n.removeChild(e),n.send(c(r(e,t),{origin:e})))}),(function(t){if(!i){n.removeChild(e);var r=T(e,t);try{n.send(c(r,{origin:e}))}catch(t){n.devTools&&n.devTools.send(r,n.state),n.machine.strict&&n.stop()}}}));var s={id:e,send:function(){},subscribe:function(e,n,i){var r=R(e,n,i),s=!1;return t.then((function(t){s||(r.next(t),s||r.complete())}),(function(t){s||r.error(t)})),{unsubscribe:function(){return s=!0}}},stop:function(){i=!0},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnCallback=function(t,e){var n,i=this,r=!1,s=new Set,o=new Set;try{n=t((function(t){o.forEach((function(e){return e(t)})),r||i.send(c(t,{origin:e}))}),(function(t){s.add(t)}))}catch(t){this.send(T(e,t))}if(w(n))return this.spawnPromise(n,e);var h={id:e,send:function(t){return s.forEach((function(e){return e(t)}))},subscribe:function(t){return o.add(t),{unsubscribe:function(){o.delete(t)}}},stop:function(){r=!0,a(n)&&n()},toJSON:function(){return{id:e}}};return this.children.set(e,h),h},q.prototype.spawnObservable=function(t,e){var n=this,i=t.subscribe((function(t){n.send(c(t,{origin:e}))}),(function(t){n.removeChild(e),n.send(c(T(e,t),{origin:e}))}),(function(){n.removeChild(e),n.send(c(r(e),{origin:e}))})),s={id:e,send:function(){},subscribe:function(e,n,i){return t.subscribe(e,n,i)},stop:function(){return i.unsubscribe()},toJSON:function(){return{id:e}}};return this.children.set(e,s),s},q.prototype.spawnActor=function(t){return this.children.set(t.id,t),t},q.prototype.spawnActivity=function(t){var e=this.machine.options&&this.machine.options.activities?this.machine.options.activities[t.type]:void 0;if(e){var n=e(this.state.context,t);this.spawnEffect(t.id,n)}},q.prototype.spawnEffect=function(t,e){this.children.set(t,{id:t,send:function(){},subscribe:function(){return{unsubscribe:function(){}}},stop:e||void 0,toJSON:function(){return{id:t}}})},q.prototype.attachDev=function(){var e=G();if(this.options.devTools&&e&&e.__REDUX_DEVTOOLS_EXTENSION__){var n="object"==typeof this.options.devTools?this.options.devTools:void 0;this.devTools=e.__REDUX_DEVTOOLS_EXTENSION__.connect(t(t({name:this.id,autoPause:!0,stateSanitizer:function(t){return{value:t.value,context:t.context,actions:t.actions}}},n),{features:t({jump:!1,skip:!1},n?n.features:void 0)}),this.machine),this.devTools.init(this.state)}},q.prototype.toJSON=function(){return{id:this.id}},q.prototype[L]=function(){return this},q.defaultOptions=function(t){return{execute:!0,deferEvents:!0,clock:{setTimeout:function(t,e){return setTimeout(t,e)},clearTimeout:function(t){return clearTimeout(t)}},logger:t.console.log.bind(console),devTools:!1}}("undefined"!=typeof self?self:global),q.interpret=W,q}();function W(t,e){return new Q(t,e)}export{W as i};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-6bf89411.js";import"./shared-27c16d99.js";const n=document.createElement("template");n.innerHTML='<dom-module id="lumo-field-button">\n <template>\n <style>\n [part$="button"] {\n flex: none;\n width: 1em;\n height: 1em;\n line-height: 1;\n font-size: var(--lumo-icon-size-m);\n text-align: center;\n color: var(--lumo-contrast-60pct);\n transition: 0.2s color;\n cursor: var(--lumo-clickable-cursor);\n }\n\n :host(:not([readonly])) [part$="button"]:hover {\n color: var(--lumo-contrast-90pct);\n }\n\n :host([disabled]) [part$="button"],\n :host([readonly]) [part$="button"] {\n color: var(--lumo-contrast-20pct);\n }\n\n [part$="button"]::before {\n font-family: "lumo-icons";\n display: block;\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(n.content);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./shared-
|
|
1
|
+
import"./shared-be2ce0e6.js";import"./shared-b3fe8c63.js";import"./shared-d9378323.js";import"./shared-c5a44ef2.js";import"./shared-fb859ece.js";import{I as e}from"./shared-0b8768db.js";import{_ as t}from"./shared-8f9014ff.js";import{c as i,h as a,s}from"./shared-ba5c42c7.js";import{i as l}from"./shared-53e42a77.js";import{c as o}from"./shared-4e709717.js";let n,r,d,h,u,c,p=e=>e;customElements.define("foxy-internal-frequency-control",class extends e{constructor(){super(...arguments),this.allowTwiceAMonth=!1,this.options=[{value:"d",label:"day"},{value:"w",label:"week"},{value:"m",label:"month"},{value:"y",label:"year"}],this.layout=null,this.max=999,this.__i18n={formatValue:e=>e.join(""),parseValue:e=>{var t;const i=e.startsWith(".")?`0${e}`:e,a=parseFloat(e.substring(0,Math.max(i.length-1,0))),s=null!==(t=i[i.length-1])&&void 0!==t?t:"";return isNaN(a)?["0",""]:[a.toString(),s]}}}static get properties(){return t(t({},super.properties),{},{allowTwiceAMonth:{type:Boolean,attribute:"allow-twice-a-month"},options:{attribute:!1},layout:{},max:{type:Number}})}static get styles(){return[super.styles,i(n||(n=p`:host{display:block}vaadin-custom-field{width:100%;font-size:0;line-height:0;padding-top:0!important}vaadin-custom-field::part(label){padding-bottom:var(--lumo-space-s)}vaadin-custom-field::part(error-message)[aria-hidden=false]{padding-top:var(--lumo-space-xs)}vaadin-combo-box,vaadin-integer-field{width:calc(50% - (var(--lumo-space-s)/ 2))}vaadin-integer-field{margin-right:var(--lumo-space-s);padding:0}vaadin-combo-box::part(text-field){padding:0}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input{-moz-appearance:textfield}`))]}renderControl(){var e,t;if("summary-item"===this.layout)return this.__renderSummaryItemLayout();const i=null!==(e=this._value)&&void 0!==e?e:"",s=parseFloat(this.__i18n.parseValue(i)[0]),o=this.options.map((({value:e,label:t})=>({label:this.t(t,{count:s}),value:e})));return a(r||(r=p` <vaadin-custom-field ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .errorMessage="${0}" .helperText="${0}" .label="${0}" .value="${0}" .i18n="${0}" @change="${0}"> <vaadin-integer-field max="${0}" min="1" prevent-invalid-input has-controls ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" @keydown="${0}"> </vaadin-integer-field> <vaadin-combo-box item-value-path="value" item-label-path="label" ?disabled="${0}" ?readonly="${0}" ?invalid="${0}" .items="${0}" @keydown="${0}"> </vaadin-combo-box> </vaadin-custom-field> `),this.disabled,this.readonly,this._checkValidity,null!==(t=this._errorMessage)&&void 0!==t?t:"",this.helperText,this.label,i,this.__i18n,(e=>{const t=e.currentTarget;this._value=t.value}),l(this.max||void 0),this.disabled,this.readonly,!this._checkValidity(),(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),this.disabled,this.readonly,!this._checkValidity(),o,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}))}updated(e){var t;super.updated(e);const i=this.renderRoot.querySelector("vaadin-custom-field");i&&i.value!==this._value&&(i.value=null!==(t=this._value)&&void 0!==t?t:"")}__renderSummaryItemLayout(){var e,t;const i=null!==(e=this._value)&&void 0!==e?e:"",[n,r]=this.__i18n.parseValue(i),m=parseFloat(n),v=".5m"!==this._value||this.allowTwiceAMonth?this.options.find((e=>e.value===r)):void 0;return a(d||(d=p` <div class="leading-xs"> <div class="flex items-center gap-xs"> <label class="text-m text-body flex-1 whitespace-nowrap" for="input">${0}</label> <input placeholder="${0}" inputmode="numeric" style="min-width:10ch" class="${0}" type="number" step="1" min="1" max="${0}" id="input" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @input="${0}"> <div class="${0}"> <div class="flex items-center gap-xs"> <div class="whitespace-nowrap"> ${0} </div> ${0} </div> <select class="${0}" id="select" ?disabled="${0}" ?hidden="${0}" @change="${0}"> <option value="" ?selected="${0}" disabled="disabled" hidden>${0}</option> ${0} ${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,this.placeholder,o({"w-full appearance-none text-right bg-transparent transition-colors":!0,"text-m rounded-s focus-outline-none":!0,"text-secondary":this.readonly,"text-disabled":this.disabled,"font-medium":!this.readonly}),l(null!==(t=this.max)&&void 0!==t?t:void 0),".5m"===i?this.allowTwiceAMonth?2:"":m,this.disabled,this.readonly,(e=>{var t;return"Enter"===e.key&&(null===(t=this.nucleon)||void 0===t?void 0:t.submit())}),(e=>{e.stopPropagation();const t=e.currentTarget,i=r||this.options[0].value;this._value=this.__i18n.formatValue([t.value,i])}),o({"relative rounded-s transition-colors transition-opacity":!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}),".5m"===i?this.t("times_a_month"):v?this.t(v.label,{count:m}):this.t("select"),this.readonly?"":s(h||(h=p`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" 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>`)),o({"absolute inset-0 opacity-0":!0,"cursor-pointer":!this.disabled&&!this.readonly}),this.disabled,this.readonly,(e=>{e.stopPropagation();const t=e.currentTarget.value;this._value="times_a_month"===t?".5m":this.__i18n.formatValue([m||1,t])}),!v,this.t("select"),!this.allowTwiceAMonth||2!==m&&".5m"!==i?"":a(u||(u=p` <option value="times_a_month" ?selected="${0}"> ${0} </option> `),".5m"===i,this.t("times_a_month")),this.options.map((e=>a(c||(c=p` <option value="${0}" ?selected="${0}"> ${0} </option> `),e.value,".5m"!==i&&e.value===(null==v?void 0:v.value),this.t(e.label,{count:m})))),this.helperText,this.disabled||this.readonly,this._errorMessage)}});
|