@foxy.io/elements 1.27.0-beta.4 → 1.27.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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-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 +1 -1
- 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 -0
- 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 -0
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +3 -3
- package/dist/cdn/foxy-customer.js +4 -4
- 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 +7 -7
- 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-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-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 +2 -2
- 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 +3 -3
- 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.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-method-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-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-fd0a4026.js → shared-039de1fd.js} +1 -1
- package/dist/cdn/{shared-f1e743df.js → shared-03ccfd62.js} +1 -1
- package/dist/cdn/{shared-f0269599.js → shared-065dbdf6.js} +1 -1
- package/dist/cdn/shared-07d5e225.js +1 -0
- package/dist/cdn/{shared-5ba87b6d.js → shared-0e5ea9cf.js} +1 -1
- package/dist/cdn/{shared-97d63da6.js → shared-0e8dceb8.js} +1 -1
- package/dist/cdn/shared-11014aad.js +15 -0
- package/dist/cdn/{shared-9de9f905.js → shared-1a9e80fa.js} +1 -1
- package/dist/cdn/{shared-8b80db13.js → shared-1d257548.js} +1 -1
- package/dist/cdn/{shared-7ea4cb27.js → shared-1d6beb48.js} +1 -1
- package/dist/cdn/{shared-655e7c5f.js → shared-205721a3.js} +1 -1
- package/dist/cdn/shared-208e37af.js +88 -0
- package/dist/cdn/shared-250e652f.js +1 -0
- package/dist/cdn/shared-29f2468c.js +6 -0
- package/dist/cdn/{shared-f94fa366.js → shared-2c70f0b6.js} +1 -1
- package/dist/cdn/shared-400240f8.js +1 -0
- package/dist/cdn/{shared-f588b5c2.js → shared-4329ffa1.js} +1 -1
- package/dist/cdn/{shared-cfed658c.js → shared-4877ed05.js} +2 -2
- package/dist/cdn/{shared-bf695fe7.js → shared-48b76c74.js} +1 -1
- package/dist/cdn/{shared-331a223c.js → shared-56addb06.js} +2 -2
- package/dist/cdn/{shared-2376abfc.js → shared-589e5d06.js} +15 -15
- package/dist/cdn/{shared-a3c5a30c.js → shared-5c542149.js} +1 -1
- package/dist/cdn/{shared-5df32007.js → shared-5dbb9630.js} +1 -1
- package/dist/cdn/{shared-44d207fb.js → shared-5e35c5a5.js} +1 -1
- package/dist/cdn/{shared-405a290e.js → shared-5f09205d.js} +1 -1
- package/dist/cdn/{shared-2920b595.js → shared-61f67b16.js} +1 -1
- package/dist/cdn/shared-683145e5.js +1 -0
- package/dist/cdn/{shared-9f570db0.js → shared-6af480b8.js} +1 -1
- package/dist/cdn/shared-6c4affb9.js +1 -0
- package/dist/cdn/{shared-4482e7b9.js → shared-6e977271.js} +1 -1
- package/dist/cdn/{shared-6ed07856.js → shared-724e9a20.js} +1 -1
- package/dist/cdn/shared-77fd8dae.js +1 -0
- package/dist/cdn/{shared-e40937c5.js → shared-7e201abd.js} +1 -1
- package/dist/cdn/{shared-030f561a.js → shared-80eb1fee.js} +1 -1
- package/dist/cdn/{shared-db98729a.js → shared-845f8bf1.js} +1 -1
- package/dist/cdn/shared-850e2ae1.js +10 -0
- package/dist/cdn/{shared-0cbb19f4.js → shared-85979316.js} +1 -1
- package/dist/cdn/shared-8a04bea3.js +1 -0
- package/dist/cdn/{shared-597737ce.js → shared-8cd0f36d.js} +1 -1
- package/dist/cdn/{shared-30cbf0a6.js → shared-8def6325.js} +1 -1
- package/dist/cdn/{shared-37e1a834.js → shared-931db653.js} +1 -1
- package/dist/cdn/shared-93812e51.js +1 -0
- package/dist/cdn/{shared-8ab2ba91.js → shared-9a5da74d.js} +21 -27
- package/dist/cdn/{shared-44bb85d8.js → shared-a0cbfb2f.js} +1 -1
- package/dist/cdn/{shared-65283d36.js → shared-a73e7be4.js} +1 -1
- package/dist/cdn/{shared-12390d6f.js → shared-abf72e2f.js} +1 -1
- package/dist/cdn/{shared-a9f76cae.js → shared-b30f9b10.js} +1 -1
- package/dist/cdn/{shared-293771ba.js → shared-b81aa01c.js} +1 -1
- package/dist/cdn/shared-bb08b5ce.js +32 -0
- package/dist/cdn/{shared-83fc5dca.js → shared-bba8ae80.js} +1 -1
- package/dist/cdn/{shared-cd8c3429.js → shared-bc95d87e.js} +1 -1
- package/dist/cdn/{shared-2062c274.js → shared-befe135a.js} +1 -1
- package/dist/cdn/shared-bfa30d93.js +1 -0
- package/dist/cdn/shared-bfeff3bb.js +1 -0
- package/dist/cdn/shared-c5f57aa8.js +1 -0
- package/dist/cdn/{shared-150f5214.js → shared-ca15d510.js} +1 -1
- package/dist/cdn/{shared-ae459232.js → shared-cab2aa63.js} +4 -4
- package/dist/cdn/shared-cc723108.js +12 -0
- package/dist/cdn/{shared-882e7191.js → shared-d04c2e0c.js} +1 -1
- package/dist/cdn/{shared-99f0fee6.js → shared-d4322854.js} +1 -1
- package/dist/cdn/{shared-e4543605.js → shared-da7a0bfb.js} +9 -9
- package/dist/cdn/{shared-250a399a.js → shared-dccfe5e7.js} +1 -1
- package/dist/cdn/shared-e07b24ca.js +1 -0
- package/dist/cdn/shared-e35297c9.js +1 -0
- package/dist/cdn/{shared-d244dd07.js → shared-e48fbf50.js} +1 -1
- package/dist/cdn/shared-e84be1c2.js +64 -0
- package/dist/cdn/{shared-a19e1dff.js → shared-e966f1ef.js} +1 -1
- package/dist/cdn/{shared-26f4b6bf.js → shared-f03dacf5.js} +1 -1
- package/dist/cdn/{shared-7039733e.js → shared-f2a8fb36.js} +1 -1
- package/dist/cdn/{shared-a5ecd56e.js → shared-f7a5b12a.js} +1 -1
- package/dist/cdn/{shared-febda61c.js → shared-fb8c09b8.js} +1 -1
- package/dist/cdn/shared-fd041b18.js +1 -0
- package/dist/cdn/{shared-d9f65ee0.js → shared-fda63db8.js} +1 -1
- package/dist/cdn/{shared-d7892f27.js → shared-fe7b3ed2.js} +1 -1
- package/dist/cdn/translations/coupon-code-card/en.json +11 -0
- package/dist/cdn/translations/coupon-form/en.json +522 -297
- package/dist/cdn/translations/customer-portal-settings-form/en.json +300 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +10 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +99 -2
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControlFilterOverlay.d.ts +11 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControlFilterOverlay.js +57 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControlFilterOverlay.js.map +1 -0
- package/dist/elements/internal/InternalAsyncListControl/index.d.ts +1 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js +3 -0
- package/dist/elements/internal/InternalAsyncListControl/index.js.map +1 -1
- package/dist/elements/internal/InternalAsyncListControl/types.d.ts +8 -0
- package/dist/elements/internal/InternalAsyncListControl/types.js +2 -0
- package/dist/elements/internal/InternalAsyncListControl/types.js.map +1 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.d.ts +23 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js +224 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/InternalAsyncResourceLinkListControl.js.map +1 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/index.d.ts +8 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/index.js +10 -0
- package/dist/elements/internal/InternalAsyncResourceLinkListControl/index.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +6 -2
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +165 -27
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/types.d.ts +5 -0
- package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -1
- package/dist/elements/internal/InternalForm/InternalForm.d.ts +10 -0
- package/dist/elements/internal/InternalForm/InternalForm.js +44 -0
- package/dist/elements/internal/InternalForm/InternalForm.js.map +1 -1
- package/dist/elements/internal/InternalForm/index.d.ts +2 -0
- package/dist/elements/internal/InternalForm/index.js +2 -0
- package/dist/elements/internal/InternalForm/index.js.map +1 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +1 -0
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +4 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +1 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +3 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +4 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +4 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.d.ts +4 -1
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js +5 -3
- package/dist/elements/internal/InternalPasswordControl/generateRandomPassword.js.map +1 -1
- package/dist/elements/internal/InternalQueryBuilderControl/InternalQueryBuilderControl.d.ts +10 -0
- package/dist/elements/internal/InternalQueryBuilderControl/InternalQueryBuilderControl.js +51 -0
- package/dist/elements/internal/InternalQueryBuilderControl/InternalQueryBuilderControl.js.map +1 -0
- package/dist/elements/internal/InternalQueryBuilderControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalQueryBuilderControl/index.js +6 -0
- package/dist/elements/internal/InternalQueryBuilderControl/index.js.map +1 -0
- package/dist/elements/public/CartForm/CartForm.js +81 -81
- package/dist/elements/public/CartForm/CartForm.js.map +1 -1
- package/dist/elements/public/CollectionPage/CollectionPage.js +2 -0
- package/dist/elements/public/CollectionPage/CollectionPage.js.map +1 -1
- package/dist/elements/public/CollectionPage/types.d.ts +1 -0
- package/dist/elements/public/CollectionPage/types.js.map +1 -1
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.d.ts +16 -0
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.js +41 -0
- package/dist/elements/public/CouponCodeCard/CouponCodeCard.js.map +1 -0
- package/dist/elements/public/CouponCodeCard/index.d.ts +4 -0
- package/dist/elements/public/CouponCodeCard/index.js +6 -0
- package/dist/elements/public/CouponCodeCard/index.js.map +1 -0
- package/dist/elements/public/CouponCodeCard/types.d.ts +3 -0
- package/dist/elements/public/CouponCodeCard/types.js +2 -0
- package/dist/elements/public/CouponCodeCard/types.js.map +1 -0
- package/dist/elements/public/CouponForm/CouponForm.d.ts +65 -41
- package/dist/elements/public/CouponForm/CouponForm.js +320 -1035
- package/dist/elements/public/CouponForm/CouponForm.js.map +1 -1
- package/dist/elements/public/CouponForm/index.d.ts +15 -16
- package/dist/elements/public/CouponForm/index.js +15 -16
- package/dist/elements/public/CouponForm/index.js.map +1 -1
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.d.ts +9 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.js +49 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/InternalCouponFormBulkAddControl.js.map +1 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.d.ts +6 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.js +8 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormBulkAddControl/index.js.map +1 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/InternalCouponFormRulesControl.d.ts +7 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/InternalCouponFormRulesControl.js +141 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/InternalCouponFormRulesControl.js.map +1 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/index.d.ts +6 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/index.js +8 -0
- package/dist/elements/public/CouponForm/internal/InternalCouponFormRulesControl/index.js.map +1 -0
- package/dist/elements/public/CouponForm/types.d.ts +10 -1
- package/dist/elements/public/CouponForm/types.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.d.ts +1 -0
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js +1 -0
- package/dist/elements/public/CustomerPortalSettings/CustomerPortalSettings.js.map +1 -1
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.d.ts +36 -0
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js +291 -0
- package/dist/elements/public/CustomerPortalSettingsForm/CustomerPortalSettingsForm.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/index.d.ts +12 -0
- package/dist/elements/public/CustomerPortalSettingsForm/index.js +14 -0
- package/dist/elements/public/CustomerPortalSettingsForm/index.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard.d.ts +10 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard.js +40 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/index.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/index.js +6 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/index.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/types.d.ts +10 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/types.js +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleCard/types.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm.d.ts +17 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm.js +62 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/index.d.ts +5 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/index.js +7 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/index.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/types.d.ts +10 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/types.js +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowFrequencyModificationRuleForm/types.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard.d.ts +10 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard.js +49 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/index.d.ts +4 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/index.js +6 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/index.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/types.d.ts +12 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/types.js +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleCard/types.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm.d.ts +29 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm.js +165 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/index.d.ts +8 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/index.js +10 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/index.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/types.d.ts +13 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/types.js +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/internal/InternalCustomerPortalSettingsFormSubscriptionsAllowNextDateModificationRuleForm/types.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/isOrigin.d.ts +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/isOrigin.js +9 -0
- package/dist/elements/public/CustomerPortalSettingsForm/isOrigin.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/toOrigin.d.ts +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/toOrigin.js +9 -0
- package/dist/elements/public/CustomerPortalSettingsForm/toOrigin.js.map +1 -0
- package/dist/elements/public/CustomerPortalSettingsForm/types.d.ts +3 -0
- package/dist/elements/public/CustomerPortalSettingsForm/types.js +2 -0
- package/dist/elements/public/CustomerPortalSettingsForm/types.js.map +1 -0
- package/dist/elements/public/DownloadableForm/DownloadableForm.js +9 -9
- package/dist/elements/public/DownloadableForm/DownloadableForm.js.map +1 -1
- package/dist/elements/public/I18n/format/discount.js +9 -2
- package/dist/elements/public/I18n/format/discount.js.map +1 -1
- package/dist/elements/public/I18n/format/ordinal.js +6 -2
- package/dist/elements/public/I18n/format/ordinal.js.map +1 -1
- package/dist/elements/public/IntegrationForm/IntegrationForm.js +8 -6
- package/dist/elements/public/IntegrationForm/IntegrationForm.js.map +1 -1
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js +27 -27
- package/dist/elements/public/ItemCategoryForm/ItemCategoryForm.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.d.ts +10 -0
- package/dist/elements/public/NucleonElement/NucleonElement.js +33 -9
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/NucleonElement/internalServer.d.ts +2 -0
- package/dist/elements/public/NucleonElement/internalServer.js +95 -0
- package/dist/elements/public/NucleonElement/internalServer.js.map +1 -0
- package/dist/elements/public/QueryBuilder/QueryBuilder.d.ts +4 -0
- package/dist/elements/public/QueryBuilder/QueryBuilder.js +10 -2
- package/dist/elements/public/QueryBuilder/QueryBuilder.js.map +1 -1
- package/dist/elements/public/QueryBuilder/components/Group.d.ts +3 -1
- package/dist/elements/public/QueryBuilder/components/Group.js +8 -1
- package/dist/elements/public/QueryBuilder/components/Group.js.map +1 -1
- package/dist/elements/public/QueryBuilder/components/OperatorToggle.d.ts +2 -1
- package/dist/elements/public/QueryBuilder/components/OperatorToggle.js +5 -4
- package/dist/elements/public/QueryBuilder/components/OperatorToggle.js.map +1 -1
- package/dist/elements/public/QueryBuilder/components/Rule.d.ts +3 -1
- package/dist/elements/public/QueryBuilder/components/Rule.js +2 -1
- package/dist/elements/public/QueryBuilder/components/Rule.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +7 -8
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +28 -28
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -1
- package/dist/elements/public/index.d.ts +2 -0
- package/dist/elements/public/index.defined.d.ts +2 -0
- package/dist/elements/public/index.defined.js +2 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +2 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/events/request.d.ts +1 -0
- package/dist/events/request.js +1 -0
- package/dist/events/request.js.map +1 -1
- package/dist/mixins/inferrable.js +8 -3
- package/dist/mixins/inferrable.js.map +1 -1
- package/dist/mixins/themeable.js +16 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-0037b9e6.js +0 -1
- package/dist/cdn/shared-07e9d1fb.js +0 -1
- package/dist/cdn/shared-1024766f.js +0 -1
- package/dist/cdn/shared-12ad8924.js +0 -64
- package/dist/cdn/shared-1522d76f.js +0 -15
- package/dist/cdn/shared-33d8cbfb.js +0 -1
- package/dist/cdn/shared-3d251e6f.js +0 -1
- package/dist/cdn/shared-3f19b914.js +0 -20
- package/dist/cdn/shared-510a9e1b.js +0 -1
- package/dist/cdn/shared-5c0e3fee.js +0 -1
- package/dist/cdn/shared-6d41c9a9.js +0 -1
- package/dist/cdn/shared-6e9adc43.js +0 -1
- package/dist/cdn/shared-966feb65.js +0 -1
- package/dist/cdn/shared-9adc47da.js +0 -113
- package/dist/cdn/shared-a0435ec6.js +0 -1
- package/dist/cdn/shared-c0c7225c.js +0 -1
- package/dist/cdn/shared-c6707264.js +0 -1
- package/dist/cdn/shared-d0374d0c.js +0 -1
- package/dist/cdn/shared-db306674.js +0 -1
- package/dist/cdn/shared-eb116b3e.js +0 -1
- package/dist/cdn/shared-f5d4dda0.js +0 -1
- package/dist/cdn/shared-ff18b2d1.js +0 -1
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.d.ts +0 -20
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js +0 -99
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPage.js.map +0 -1
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.d.ts +0 -18
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js +0 -50
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItem.js.map +0 -1
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.d.ts +0 -18
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js +0 -53
- package/dist/elements/public/CouponForm/private/CategoryRestrictionsPageItemContent.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"./shared-1522d76f.js";import{p as s}from"./shared-f5d4dda0.js";function t(t){var a;const d=s(t),n=null!==(a={y:"yearly",m:"monthly",w:"weekly",d:"daily"}[d.units])&&void 0!==a?a:d.units;return r(r({},d),{},{units:n})}export{t as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-db98729a.js";import"./shared-4482e7b9.js";import"./shared-44bb85d8.js";import{I as e}from"./shared-2062c274.js";import{_ as i}from"./shared-1522d76f.js";import{i as s}from"./shared-9803aa7c.js";import{h as r}from"./shared-dc73b9a5.js";let t,l,a,d=e=>e;customElements.define("foxy-internal-integer-control",class extends e{constructor(){super(...arguments),this.prefix=null,this.suffix=null,this.min=null,this.max=null}static get properties(){return i(i({},super.properties),{},{prefix:{},suffix:{},min:{type:Number},max:{type:Number}})}renderControl(){var e,i;return r(t||(t=d` <vaadin-integer-field error-message="${0}" placeholder="${0}" helper-text="${0}" label="${0}" class="w-full" min="${0}" max="${0}" ?disabled="${0}" ?readonly="${0}" .checkValidity="${0}" .value="${0}" clear-button-visible @keydown="${0}" @change="${0}"> ${0} ${0} </vaadin-integer-field> `),s(this._errorMessage),this.placeholder,this.helperText,this.label,s(null!==(e=this.min)&&void 0!==e?e:void 0),s(null!==(i=this.max)&&void 0!==i?i:void 0),this.disabled,this.readonly,this._checkValidity,this._value,(e=>{var i;return"Enter"===e.key&&(null===(i=this.nucleon)||void 0===i?void 0:i.submit())}),(e=>{const i=e.currentTarget;this._value=parseInt(i.value)}),this.prefix?r(l||(l=d`<div slot="prefix">${0}</div>`),this.prefix):"",this.suffix?r(a||(a=d`<div class="pr-s font-medium" slot="suffix">${0}</div>`),this.suffix):"")}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./shared-37e1a834.js";import"./shared-f5d4dda0.js";import{a as e}from"./shared-2062c274.js";import{h as t}from"./shared-dc73b9a5.js";import{Y as r,_ as i}from"./shared-1522d76f.js";import"./shared-030f561a.js";import"./foxy-spinner.js";import{C as n}from"./shared-9f570db0.js";import{T as s}from"./shared-331a223c.js";import{N as a}from"./shared-a0435ec6.js";import{c as o}from"./shared-4e709717.js";let l,d=e=>e;customElements.define("foxy-internal-timestamps-control",class extends e{renderControl(){return t(l||(l=d` <p class="font-lumo text-xs leading-s text-secondary"> <foxy-i18n infer="" key="date_created"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> <span>•<span> <foxy-i18n infer="" key="date_modified"></foxy-i18n> <foxy-i18n .options="${0}" infer="" key="date"> </foxy-i18n> </span></span></p> `),{value:r(this,"nucleon.data.date_created")},{value:r(this,"nucleon.data.date_modified")})}});let c,f=e=>e;customElements.define("foxy-internal-create-control",class extends e{constructor(){super(...arguments),this.theme="primary success"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(c||(c=f` <vaadin-button class="w-full" theme="${0}" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="create"></foxy-i18n> </vaadin-button> `),this.theme,this.disabled||this.__isInvalid,(()=>{var e;return null===(e=this.nucleon)||void 0===e?void 0:e.submit()}))}get __isCleanTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{clean:"invalid"}}}))}get __isDirtyTemplateInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{template:{dirty:"invalid"}}}))}get __isCleanSnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{clean:"invalid"}}}))}get __isDirtySnapshotInvalid(){var e;return!!(null===(e=this.nucleon)||void 0===e?void 0:e.in({idle:{snapshot:{dirty:"invalid"}}}))}get __isTemplateInvalid(){return this.__isCleanTemplateInvalid||this.__isDirtyTemplateInvalid}get __isSnapshotInvalid(){return this.__isCleanSnapshotInvalid||this.__isDirtySnapshotInvalid}get __isInvalid(){return this.__isSnapshotInvalid||this.__isTemplateInvalid}});let u,p=e=>e;customElements.define("foxy-internal-delete-control",class extends e{constructor(){super(...arguments),this.theme="error"}static get properties(){return i(i({},super.properties),{},{theme:{type:String}})}renderControl(){return t(u||(u=p` <foxy-internal-confirm-dialog message="delete_prompt" confirm="delete" cancel="cancel" header="delete" theme="primary error" infer="" id="confirm" @hide="${0}"> </foxy-internal-confirm-dialog> <vaadin-button data-testid="delete" theme="${0}" class="w-full" ?disabled="${0}" @click="${0}"> <foxy-i18n infer="" key="delete"></foxy-i18n> </vaadin-button> `),(e=>{var t;return!e.detail.cancelled&&(null===(t=this.nucleon)||void 0===t?void 0:t.delete())}),this.theme,this.disabled||this.readonly,(e=>{this.renderRoot.querySelector("#confirm").show(e.currentTarget)}))}});let h,m,y,v,x,_,g=e=>e;const b=n(s(a));class $ extends b{constructor(){super(...arguments),this.status=null}static get properties(){return i(i({},super.properties),{},{status:{type:Object}})}renderBody(){return this.data?t(h||(h=g` <foxy-internal-timestamps-control infer="timestamps"></foxy-internal-timestamps-control> <foxy-internal-delete-control infer="delete"></foxy-internal-delete-control> `)):t(m||(m=g`<foxy-internal-create-control infer="create"></foxy-internal-create-control>`))}render(){const e=!(this.in("idle")||this.in({busy:"fetching"})&&this.data);return t(y||(y=g` <div aria-busy="${0}" aria-live="polite" class="relative"> <div class="${0}"> ${0} ${0} ${0} </div> <div data-testid="spinner" class="${0}"> <foxy-spinner layout="${0}" state="${0}" infer="spinner"> </foxy-spinner> ${0} </div> </div> `),this.in("busy"),o({"space-y-m":!0,"transition-opacity":!0,"opacity-0 pointer-events-none":e}),this.__generalErrors.map((e=>this.__renderGeneralError(e))),this.status?this.__renderStatus(this.status):"",this.renderBody(),o({"flex flex-col items-center justify-center gap-m":!0,"transition-opacity absolute inset-0":!0,"opacity-0 pointer-events-none":!e}),this.in("fail")?"vertical":"no-label",this.in("fail")?"error":"busy",this.href&&this.in("fail")?t(v||(v=g` <vaadin-button theme="small contrast" @click="${0}"> <foxy-i18n infer="spinner" key="refresh"></foxy-i18n> </vaadin-button> `),(()=>this.refresh())):"")}get __generalErrors(){const e=this.constructor.generalErrorPrefix;return this.errors.filter((t=>t.startsWith(e)))}__renderGeneralError(e){return t(x||(x=g` <foxy-i18n class="leading-xs text-body rounded bg-error-10 block" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)" infer="error" key="${0}"> </foxy-i18n> `),e.replace("error:",""))}__renderStatus({key:e,options:r}){return t(_||(_=g` <p data-testid="status" class="leading-xs text-body rounded bg-success-10 flex items-start gap-m" style="padding:calc(.625em + (var(--lumo-border-radius)/ 4) - 1px)"> <foxy-i18n class="flex-1" infer="status" key="${0}" .options="${0}"></foxy-i18n> <vaadin-button class="flex-shrink-0" theme="success tertiary-inline" @click="${0}"> <foxy-i18n class="flex-1" infer="status" key="close"></foxy-i18n> </vaadin-button> </p> `),e,r,(()=>this.status=null))}}$.generalErrorPrefix="error:",customElements.define("foxy-internal-form",$);export{$ as I};
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import{h as e,P as t}from"./shared-bf695fe7.js";import{F as n,t as o,P as i}from"./shared-e40937c5.js";import{a as s}from"./shared-3f19b914.js";import{T as a,D as r}from"./shared-cfed658c.js";const d=document.createElement("template");d.innerHTML='<dom-module id="lumo-overlay">\n <template>\n <style>\n :host {\n top: var(--lumo-space-m);\n right: var(--lumo-space-m);\n bottom: var(--lumo-space-m);\n left: var(--lumo-space-m);\n /* Workaround for Edge issue (only on Surface), where an overflowing vaadin-list-box inside vaadin-select-overlay makes the overlay transparent */\n /* stylelint-disable-next-line */\n outline: 0px solid transparent;\n }\n\n [part="overlay"] {\n background-color: var(--lumo-base-color);\n background-image: linear-gradient(var(--lumo-tint-5pct), var(--lumo-tint-5pct));\n border-radius: var(--lumo-border-radius-m);\n box-shadow: 0 0 0 1px var(--lumo-shade-5pct), var(--lumo-box-shadow-m);\n color: var(--lumo-body-text-color);\n font-family: var(--lumo-font-family);\n font-size: var(--lumo-font-size-m);\n font-weight: 400;\n line-height: var(--lumo-line-height-m);\n letter-spacing: 0;\n text-transform: none;\n -webkit-text-size-adjust: 100%;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n }\n\n [part="content"] {\n padding: var(--lumo-space-xs);\n }\n\n [part="backdrop"] {\n background-color: var(--lumo-shade-20pct);\n animation: 0.2s lumo-overlay-backdrop-enter both;\n will-change: opacity;\n }\n\n @keyframes lumo-overlay-backdrop-enter {\n 0% {\n opacity: 0;\n }\n }\n\n :host([closing]) [part="backdrop"] {\n animation: 0.2s lumo-overlay-backdrop-exit both;\n }\n\n @keyframes lumo-overlay-backdrop-exit {\n 100% {\n opacity: 0;\n }\n }\n\n @keyframes lumo-overlay-dummy-animation {\n 0% { opacity: 1; }\n 100% { opacity: 1; }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(d.content);const l=Element.prototype,c=l.matches||l.matchesSelector||l.mozMatchesSelector||l.msMatchesSelector||l.oMatchesSelector||l.webkitMatchesSelector;class h{static getTabbableNodes(e){const t=[];return this._collectTabbableNodes(e,t)?this._sortByTabIndex(t):t}static isFocusable(e){return c.call(e,"input, select, textarea, button, object")?c.call(e,":not([disabled])"):c.call(e,"a[href], area[href], iframe, [tabindex], [contentEditable]")}static isTabbable(e){return this.isFocusable(e)&&c.call(e,':not([tabindex="-1"])')&&this._isVisible(e)}static _normalizedTabIndex(e){if(this.isFocusable(e)){const t=e.getAttribute("tabindex")||0;return Number(t)}return-1}static _collectTabbableNodes(e,t){if(e.nodeType!==Node.ELEMENT_NODE||!this._isVisible(e))return!1;const n=e,o=this._normalizedTabIndex(n);let i,s=o>0;if(o>=0&&t.push(n),i="slot"===n.localName?n.assignedNodes({flatten:!0}):(n.shadowRoot||n).children,i)for(let e=0;e<i.length;e++)s=this._collectTabbableNodes(i[e],t)||s;return s}static _isVisible(e){let t=e.style;return"hidden"!==t.visibility&&"none"!==t.display&&(t=window.getComputedStyle(e),"hidden"!==t.visibility&&"none"!==t.display)}static _sortByTabIndex(e){const t=e.length;if(t<2)return e;const n=Math.ceil(t/2),o=this._sortByTabIndex(e.slice(0,n)),i=this._sortByTabIndex(e.slice(n));return this._mergeSortByTabIndex(o,i)}static _mergeSortByTabIndex(e,t){const n=[];for(;e.length>0&&t.length>0;)this._hasLowerTabOrder(e[0],t[0])?n.push(t.shift()):n.push(e.shift());return n.concat(e,t)}static _hasLowerTabOrder(e,t){const n=Math.max(e.tabIndex,0),o=Math.max(t.tabIndex,0);return 0===n||0===o?o>n:n>o}}
|
|
2
|
-
/**
|
|
3
|
-
@license
|
|
4
|
-
Copyright (c) 2017 Vaadin Ltd.
|
|
5
|
-
This program is available under Apache License Version 2.0, available at https://vaadin.com/license/
|
|
6
|
-
*/let u=0;const m={},p=e=>{u++;const t=`vaadin-overlay-content-${u}`,n=document.createElement("template"),o=document.createElement("style");o.textContent=":host { display: block; }"+e,n.content.appendChild(o),window.ShadyCSS&&window.ShadyCSS.prepareTemplate(n,t);const i=class extends HTMLElement{static get is(){return t}constructor(){super(),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(n.content,!0)))}connectedCallback(){window.ShadyCSS&&window.ShadyCSS.styleElement(this)}};return customElements.define(i.is,i),m[e]=t,t};class v extends(a(r(t))){static get template(){return e`
|
|
7
|
-
<style>
|
|
8
|
-
:host {
|
|
9
|
-
z-index: 200;
|
|
10
|
-
position: fixed;
|
|
11
|
-
|
|
12
|
-
/*
|
|
13
|
-
Despite of what the names say, <vaadin-overlay> is just a container
|
|
14
|
-
for position/sizing/alignment. The actual overlay is the overlay part.
|
|
15
|
-
*/
|
|
16
|
-
|
|
17
|
-
/*
|
|
18
|
-
Default position constraints: the entire viewport. Note: themes can
|
|
19
|
-
override this to introduce gaps between the overlay and the viewport.
|
|
20
|
-
*/
|
|
21
|
-
top: 0;
|
|
22
|
-
right: 0;
|
|
23
|
-
bottom: var(--vaadin-overlay-viewport-bottom);
|
|
24
|
-
left: 0;
|
|
25
|
-
|
|
26
|
-
/* Use flexbox alignment for the overlay part. */
|
|
27
|
-
display: flex;
|
|
28
|
-
flex-direction: column; /* makes dropdowns sizing easier */
|
|
29
|
-
/* Align to center by default. */
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: center;
|
|
32
|
-
|
|
33
|
-
/* Allow centering when max-width/max-height applies. */
|
|
34
|
-
margin: auto;
|
|
35
|
-
|
|
36
|
-
/* The host is not clickable, only the overlay part is. */
|
|
37
|
-
pointer-events: none;
|
|
38
|
-
|
|
39
|
-
/* Remove tap highlight on touch devices. */
|
|
40
|
-
-webkit-tap-highlight-color: transparent;
|
|
41
|
-
|
|
42
|
-
/* CSS API for host */
|
|
43
|
-
--vaadin-overlay-viewport-bottom: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host([hidden]),
|
|
47
|
-
:host(:not([opened]):not([closing])) {
|
|
48
|
-
display: none !important;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
[part="overlay"] {
|
|
52
|
-
-webkit-overflow-scrolling: touch;
|
|
53
|
-
overflow: auto;
|
|
54
|
-
pointer-events: auto;
|
|
55
|
-
|
|
56
|
-
/* Prevent overflowing the host in MSIE 11 */
|
|
57
|
-
max-width: 100%;
|
|
58
|
-
box-sizing: border-box;
|
|
59
|
-
|
|
60
|
-
-webkit-tap-highlight-color: initial; /* reenable tap highlight inside */
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
[part="backdrop"] {
|
|
64
|
-
z-index: -1;
|
|
65
|
-
content: "";
|
|
66
|
-
background: rgba(0, 0, 0, 0.5);
|
|
67
|
-
position: fixed;
|
|
68
|
-
top: 0;
|
|
69
|
-
left: 0;
|
|
70
|
-
bottom: 0;
|
|
71
|
-
right: 0;
|
|
72
|
-
pointer-events: auto;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
75
|
-
|
|
76
|
-
<div id="backdrop" part="backdrop" hidden\$="{{!withBackdrop}}"></div>
|
|
77
|
-
<div part="overlay" id="overlay" tabindex="0">
|
|
78
|
-
<div part="content" id="content">
|
|
79
|
-
<slot></slot>
|
|
80
|
-
</div>
|
|
81
|
-
</div>
|
|
82
|
-
`}static get is(){return"vaadin-overlay"}static get properties(){return{opened:{type:Boolean,notify:!0,observer:"_openedChanged",reflectToAttribute:!0},owner:Element,renderer:Function,template:{type:Object,notify:!0},instanceProps:{type:Object},content:{type:Object,notify:!0},withBackdrop:{type:Boolean,value:!1,reflectToAttribute:!0},model:Object,modeless:{type:Boolean,value:!1,reflectToAttribute:!0,observer:"_modelessChanged"},hidden:{type:Boolean,reflectToAttribute:!0,observer:"_hiddenChanged"},focusTrap:{type:Boolean,value:!1},restoreFocusOnClose:{type:Boolean,value:!1},_mouseDownInside:{type:Boolean},_mouseUpInside:{type:Boolean},_instance:{type:Object},_originalContentPart:Object,_contentNodes:Array,_oldOwner:Element,_oldModel:Object,_oldTemplate:Object,_oldInstanceProps:Object,_oldRenderer:Object,_oldOpened:Boolean}}static get observers(){return["_templateOrRendererChanged(template, renderer, owner, model, instanceProps, opened)"]}constructor(){super(),this._boundMouseDownListener=this._mouseDownListener.bind(this),this._boundMouseUpListener=this._mouseUpListener.bind(this),this._boundOutsideClickListener=this._outsideClickListener.bind(this),this._boundKeydownListener=this._keydownListener.bind(this),this._observer=new n(this,(e=>{this._setTemplateFromNodes(e.addedNodes)})),this._boundIronOverlayCanceledListener=this._ironOverlayCanceled.bind(this),/iPad|iPhone|iPod/.test(navigator.userAgent)&&(this._boundIosResizeListener=()=>this._detectIosNavbar())}ready(){super.ready(),this._observer.flush(),this.addEventListener("click",(()=>{})),this.$.backdrop.addEventListener("click",(()=>{}))}_detectIosNavbar(){if(!this.opened)return;const e=window.innerHeight,t=window.innerWidth>e,n=document.documentElement.clientHeight;t&&n>e?this.style.setProperty("--vaadin-overlay-viewport-bottom",n-e+"px"):this.style.setProperty("--vaadin-overlay-viewport-bottom","0")}_setTemplateFromNodes(e){this.template=e.filter((e=>e.localName&&"template"===e.localName))[0]||this.template}close(e){var t=new CustomEvent("vaadin-overlay-close",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),t.defaultPrevented||(this.opened=!1)}connectedCallback(){super.connectedCallback(),this._boundIosResizeListener&&(this._detectIosNavbar(),window.addEventListener("resize",this._boundIosResizeListener))}disconnectedCallback(){super.disconnectedCallback(),this._boundIosResizeListener&&window.removeEventListener("resize",this._boundIosResizeListener)}_ironOverlayCanceled(e){e.preventDefault()}_mouseDownListener(e){this._mouseDownInside=e.composedPath().indexOf(this.$.overlay)>=0}_mouseUpListener(e){this._mouseUpInside=e.composedPath().indexOf(this.$.overlay)>=0}_outsideClickListener(e){if(-1!==e.composedPath().indexOf(this.$.overlay)||this._mouseDownInside||this._mouseUpInside)return this._mouseDownInside=!1,void(this._mouseUpInside=!1);if(!this._last)return;const t=new CustomEvent("vaadin-overlay-outside-click",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}_keydownListener(e){if(this._last)if("Tab"===e.key&&this.focusTrap&&!e.defaultPrevented)this._cycleTab(e.shiftKey?-1:1),e.preventDefault();else if("Escape"===e.key||"Esc"===e.key){const t=new CustomEvent("vaadin-overlay-escape-press",{bubbles:!0,cancelable:!0,detail:{sourceEvent:e}});this.dispatchEvent(t),this.opened&&!t.defaultPrevented&&this.close(e)}}_ensureTemplatized(){this._setTemplateFromNodes(Array.from(this.children))}_openedChanged(e,t){this._instance||this._ensureTemplatized(),e?(this.__restoreFocusNode=this._getActiveElement(),this._animatedOpening(),s(this,(()=>{this.focusTrap&&!this.contains(document._activeElement||document.activeElement)&&this._cycleTab(0,0);const e=new CustomEvent("vaadin-overlay-open",{bubbles:!0});this.dispatchEvent(e)})),this.modeless||this._addGlobalListeners()):t&&(this._animatedClosing(),this.modeless||this._removeGlobalListeners())}_hiddenChanged(e){e&&this.hasAttribute("closing")&&this._flushAnimation("closing")}_shouldAnimate(){const e=getComputedStyle(this).getPropertyValue("animation-name");return!("none"===getComputedStyle(this).getPropertyValue("display"))&&e&&"none"!=e}_enqueueAnimation(e,t){const n=`__${e}Handler`,o=e=>{e&&e.target!==this||(t(),this.removeEventListener("animationend",o),delete this[n])};this[n]=o,this.addEventListener("animationend",o)}_flushAnimation(e){const t=`__${e}Handler`;"function"==typeof this[t]&&this[t]()}_animatedOpening(){this.parentNode===document.body&&this.hasAttribute("closing")&&this._flushAnimation("closing"),this._attachOverlay(),this.modeless||this._enterModalState(),this.setAttribute("opening","");const e=()=>{document.addEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this.removeAttribute("opening")};this._shouldAnimate()?this._enqueueAnimation("opening",e):e()}_attachOverlay(){this._placeholder=document.createComment("vaadin-overlay-placeholder"),this.parentNode.insertBefore(this._placeholder,this),document.body.appendChild(this),this.bringToFront()}_animatedClosing(){if(this.hasAttribute("opening")&&this._flushAnimation("opening"),this._placeholder){if(this._exitModalState(),this.restoreFocusOnClose&&this.__restoreFocusNode){const e=this._getActiveElement();(e===document.body||this._deepContains(e))&&this.__restoreFocusNode.focus(),this.__restoreFocusNode=null}this.setAttribute("closing","");const e=()=>{document.removeEventListener("iron-overlay-canceled",this._boundIronOverlayCanceledListener),this._detachOverlay(),this.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),this.removeAttribute("closing")};this._shouldAnimate()?this._enqueueAnimation("closing",e):e()}}_detachOverlay(){this._placeholder.parentNode.insertBefore(this,this._placeholder),this._placeholder.parentNode.removeChild(this._placeholder)}static get __attachedInstances(){return Array.from(document.body.children).filter((e=>e instanceof v&&!e.hasAttribute("closing"))).sort(((e,t)=>e.__zIndex-t.__zIndex||0))}get _last(){return this===v.__attachedInstances.pop()}_modelessChanged(e){e?(this._removeGlobalListeners(),this._exitModalState()):this.opened&&(this._addGlobalListeners(),this._enterModalState())}_addGlobalListeners(){document.addEventListener("mousedown",this._boundMouseDownListener),document.addEventListener("mouseup",this._boundMouseUpListener),document.documentElement.addEventListener("click",this._boundOutsideClickListener,!0),document.addEventListener("keydown",this._boundKeydownListener)}_enterModalState(){"none"!==document.body.style.pointerEvents&&(this._previousDocumentPointerEvents=document.body.style.pointerEvents,document.body.style.pointerEvents="none"),v.__attachedInstances.forEach((e=>{e!==this&&(e.shadowRoot.querySelector('[part="overlay"]').style.pointerEvents="none")}))}_removeGlobalListeners(){document.removeEventListener("mousedown",this._boundMouseDownListener),document.removeEventListener("mouseup",this._boundMouseUpListener),document.documentElement.removeEventListener("click",this._boundOutsideClickListener,!0),document.removeEventListener("keydown",this._boundKeydownListener)}_exitModalState(){void 0!==this._previousDocumentPointerEvents&&(document.body.style.pointerEvents=this._previousDocumentPointerEvents,delete this._previousDocumentPointerEvents);const e=v.__attachedInstances;let t;for(;(t=e.pop())&&(t===this||(t.shadowRoot.querySelector('[part="overlay"]').style.removeProperty("pointer-events"),t.modeless)););}_removeOldContent(){this.content&&this._contentNodes&&(this._observer.disconnect(),this._contentNodes.forEach((e=>{e.parentNode===this.content&&this.content.removeChild(e)})),this._originalContentPart&&(this.$.content.parentNode.replaceChild(this._originalContentPart,this.$.content),this.$.content=this._originalContentPart,this._originalContentPart=void 0),this._observer.connect(),this._contentNodes=void 0,this.content=void 0)}_stampOverlayTemplate(e,t){this._removeOldContent(),e._Templatizer||(e._Templatizer=o(e,this,{instanceProps:t,forwardHostProp:function(e,t){this._instance&&this._instance.forwardHostProp(e,t)}})),this._instance=new e._Templatizer({}),this._contentNodes=Array.from(this._instance.root.childNodes);const n=e._templateRoot||(e._templateRoot=e.getRootNode());if(n!==document){const e=window.ShadyCSS&&!window.ShadyCSS.nativeShadow;this.$.content.shadowRoot||this.$.content.attachShadow({mode:"open"});let t=Array.from(n.querySelectorAll("style")).reduce(((e,t)=>e+t.textContent),"");if(e){const e=window.ShadyCSS.ScopingShim._styleInfoForNode(n.host);e&&(t+=e._getStyleRules().parsedCssText,t+="}")}if(t=t.replace(/:host/g,":host-nomatch"),t)if(e){const e=(e=>{const t=m[e]||p(e);return document.createElement(t)})(t);e.id="content",e.setAttribute("part","content"),this.$.content.parentNode.replaceChild(e,this.$.content),e.className=this.$.content.className,this._originalContentPart=this.$.content,this.$.content=e}else{const e=document.createElement("style");e.textContent=t,this.$.content.shadowRoot.appendChild(e),this._contentNodes.unshift(e)}this.$.content.shadowRoot.appendChild(this._instance.root),this.content=this.$.content.shadowRoot}else this.appendChild(this._instance.root),this.content=this}_removeNewRendererOrTemplate(e,t,n,o){e!==t?this.template=void 0:n!==o&&(this.renderer=void 0)}render(){this.renderer&&this.renderer.call(this.owner,this.content,this.owner,this.model)}_templateOrRendererChanged(e,t,n,o,i,s){if(e&&t)throw this._removeNewRendererOrTemplate(e,this._oldTemplate,t,this._oldRenderer),new Error("You should only use either a renderer or a template for overlay content");const a=this._oldOwner!==n||this._oldModel!==o;this._oldModel=o,this._oldOwner=n;const r=this._oldInstanceProps!==i||this._oldTemplate!==e;this._oldInstanceProps=i,this._oldTemplate=e;const d=this._oldRenderer!==t;this._oldRenderer=t;const l=this._oldOpened!==s;if(this._oldOpened=s,e&&r)this._stampOverlayTemplate(e,i);else if(t&&(d||l||a)){if(this.content=this,d)for(;this.content.firstChild;)this.content.removeChild(this.content.firstChild);s&&this.render()}}_isFocused(e){return e&&e.getRootNode().activeElement===e}_focusedIndex(e){return(e=e||this._getFocusableElements()).indexOf(e.filter(this._isFocused).pop())}_cycleTab(e,t){const n=this._getFocusableElements();void 0===t&&(t=this._focusedIndex(n)),(t+=e)>=n.length?t=0:t<0&&(t=n.length-1),n[t].focus()}_getFocusableElements(){return h.getTabbableNodes(this.$.overlay)}_getActiveElement(){let e=document._activeElement||document.activeElement;for(e&&e!==document.documentElement&&e instanceof Element!=!1||(e=document.body);e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}_deepContains(e){if(this.contains(e))return!0;let t=e;const n=e.ownerDocument;for(;t&&t!==n&&t!==this;)t=t.parentNode||t.host;return t===this}bringToFront(){let e="";const t=v.__attachedInstances.filter((e=>e!==this)).pop();if(t){e=t.__zIndex+1}this.style.zIndex=e,this.__zIndex=e||parseFloat(getComputedStyle(this).zIndex)}}customElements.define(v.is,v);const y=document.createElement("template");y.innerHTML='<dom-module id="lumo-menu-overlay-core">\n <template>\n <style>\n :host([opening]),\n :host([closing]) {\n animation: 0.14s lumo-overlay-dummy-animation;\n }\n\n [part="overlay"] {\n will-change: opacity, transform;\n }\n\n :host([opening]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-enter ease-out both;\n }\n\n @keyframes lumo-menu-overlay-enter {\n 0% {\n opacity: 0;\n transform: translateY(-4px);\n }\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.1s lumo-menu-overlay-exit both;\n }\n\n @keyframes lumo-menu-overlay-exit {\n 100% {\n opacity: 0;\n }\n }\n </style>\n </template>\n</dom-module><dom-module id="lumo-menu-overlay">\n <template>\n <style include="lumo-overlay lumo-menu-overlay-core">\n /* Small viewport (bottom sheet) styles */\n /* Use direct media queries instead of the state attributes (`[phone]` and `[fullscreen]`) provided by the elements */\n @media (max-width: 420px), (max-height: 420px) {\n :host {\n top: 0 !important;\n right: 0 !important;\n bottom: var(--vaadin-overlay-viewport-bottom, 0) !important;\n left: 0 !important;\n align-items: stretch !important;\n justify-content: flex-end !important;\n }\n\n [part="overlay"] {\n max-height: 50vh;\n width: 100vw;\n border-radius: 0;\n box-shadow: var(--lumo-box-shadow-xl);\n }\n\n /* The content part scrolls instead of the overlay part, because of the gradient fade-out */\n [part="content"] {\n padding: 30px var(--lumo-space-m);\n max-height: inherit;\n box-sizing: border-box;\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n -webkit-mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n mask-image: linear-gradient(transparent, #000 40px, #000 calc(100% - 40px), transparent);\n }\n\n [part="backdrop"] {\n display: block;\n }\n\n /* Animations */\n\n :host([opening]) [part="overlay"] {\n animation: 0.2s lumo-mobile-menu-overlay-enter cubic-bezier(.215, .61, .355, 1) both;\n }\n\n :host([closing]),\n :host([closing]) [part="backdrop"] {\n animation-delay: 0.14s;\n }\n\n :host([closing]) [part="overlay"] {\n animation: 0.14s 0.14s lumo-mobile-menu-overlay-exit cubic-bezier(.55, .055, .675, .19) both;\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-enter {\n 0% {\n transform: translateY(150%);\n }\n }\n\n @keyframes lumo-mobile-menu-overlay-exit {\n 100% {\n transform: translateY(150%);\n }\n }\n </style>\n </template>\n</dom-module>',document.head.appendChild(y.content);
|
|
83
|
-
/**
|
|
84
|
-
@license
|
|
85
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
86
|
-
This code may only be used under the BSD style license found at
|
|
87
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
88
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
89
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
90
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
91
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
92
|
-
*/
|
|
93
|
-
const _=i({_template:e`
|
|
94
|
-
<style>
|
|
95
|
-
:host {
|
|
96
|
-
display: inline-block;
|
|
97
|
-
position: fixed;
|
|
98
|
-
clip: rect(0px,0px,0px,0px);
|
|
99
|
-
}
|
|
100
|
-
</style>
|
|
101
|
-
<div aria-live$="[[mode]]">[[_text]]</div>
|
|
102
|
-
`,is:"iron-a11y-announcer",properties:{mode:{type:String,value:"polite"},timeout:{type:Number,value:150},_text:{type:String,value:""}},created:function(){_.instance||(_.instance=this),document.addEventListener("iron-announce",this._onIronAnnounce.bind(this))},announce:function(e){this._text="",this.async((function(){this._text=e}),this.timeout)},_onIronAnnounce:function(e){e.detail&&e.detail.text&&this.announce(e.detail.text)}});_.instance=null,_.requestAvailability=function(){_.instance||(_.instance=document.createElement("iron-a11y-announcer")),document.body?document.body.appendChild(_.instance):document.addEventListener("load",(function(){document.body.appendChild(_.instance)}))};
|
|
103
|
-
/**
|
|
104
|
-
@license
|
|
105
|
-
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
|
|
106
|
-
This code may only be used under the BSD style license found at
|
|
107
|
-
http://polymer.github.io/LICENSE.txt The complete set of authors may be found at
|
|
108
|
-
http://polymer.github.io/AUTHORS.txt The complete set of contributors may be
|
|
109
|
-
found at http://polymer.github.io/CONTRIBUTORS.txt Code distributed by Google as
|
|
110
|
-
part of the polymer project is also subject to an additional IP rights grant
|
|
111
|
-
found at http://polymer.github.io/PATENTS.txt
|
|
112
|
-
*/
|
|
113
|
-
var b={"U+0008":"backspace","U+0009":"tab","U+001B":"esc","U+0020":"space","U+007F":"del"},f={8:"backspace",9:"tab",13:"enter",27:"esc",33:"pageup",34:"pagedown",35:"end",36:"home",32:"space",37:"left",38:"up",39:"right",40:"down",46:"del",106:"*"},g={shift:"shiftKey",ctrl:"ctrlKey",alt:"altKey",meta:"metaKey"},w=/[a-z0-9*]/,E=/U\+/,x=/^arrow/,k=/^space(bar)?/,C=/^escape$/;function L(e,t){var n="";if(e){var o=e.toLowerCase();" "===o||k.test(o)?n="space":C.test(o)?n="esc":1==o.length?t&&!w.test(o)||(n=o):n=x.test(o)?o.replace("arrow",""):"multiply"==o?"*":o}return n}function T(e,t){return e.key?L(e.key,t):e.detail&&e.detail.key?L(e.detail.key,t):(n=e.keyIdentifier,o="",n&&(n in b?o=b[n]:E.test(n)?(n=parseInt(n.replace("U+","0x"),16),o=String.fromCharCode(n).toLowerCase()):o=n.toLowerCase()),o||function(e){var t="";return Number(e)&&(t=e>=65&&e<=90?String.fromCharCode(32+e):e>=112&&e<=123?"f"+(e-112+1):e>=48&&e<=57?String(e-48):e>=96&&e<=105?String(e-96):f[e]),t}(e.keyCode)||"");var n,o}function S(e,t){return T(t,e.hasModifiers)===e.key&&(!e.hasModifiers||!!t.shiftKey==!!e.shiftKey&&!!t.ctrlKey==!!e.ctrlKey&&!!t.altKey==!!e.altKey&&!!t.metaKey==!!e.metaKey)}function O(e){return e.trim().split(" ").map((function(e){return function(e){return 1===e.length?{combo:e,key:e,event:"keydown"}:e.split("+").reduce((function(e,t){var n=t.split(":"),o=n[0],i=n[1];return o in g?(e[g[o]]=!0,e.hasModifiers=!0):(e.key=o,e.event=i||"keydown"),e}),{combo:e.split(":").shift()})}(e)}))}const K={properties:{keyEventTarget:{type:Object,value:function(){return this}},stopKeyboardEventPropagation:{type:Boolean,value:!1},_boundKeyHandlers:{type:Array,value:function(){return[]}},_imperativeKeyBindings:{type:Object,value:function(){return{}}}},observers:["_resetKeyEventListeners(keyEventTarget, _boundKeyHandlers)"],keyBindings:{},registered:function(){this._prepKeyBindings()},attached:function(){this._listenKeyEventListeners()},detached:function(){this._unlistenKeyEventListeners()},addOwnKeyBinding:function(e,t){this._imperativeKeyBindings[e]=t,this._prepKeyBindings(),this._resetKeyEventListeners()},removeOwnKeyBindings:function(){this._imperativeKeyBindings={},this._prepKeyBindings(),this._resetKeyEventListeners()},keyboardEventMatchesKeys:function(e,t){for(var n=O(t),o=0;o<n.length;++o)if(S(n[o],e))return!0;return!1},_collectKeyBindings:function(){var e=this.behaviors.map((function(e){return e.keyBindings}));return-1===e.indexOf(this.keyBindings)&&e.push(this.keyBindings),e},_prepKeyBindings:function(){for(var e in this._keyBindings={},this._collectKeyBindings().forEach((function(e){for(var t in e)this._addKeyBinding(t,e[t])}),this),this._imperativeKeyBindings)this._addKeyBinding(e,this._imperativeKeyBindings[e]);for(var t in this._keyBindings)this._keyBindings[t].sort((function(e,t){var n=e[0].hasModifiers;return n===t[0].hasModifiers?0:n?-1:1}))},_addKeyBinding:function(e,t){O(e).forEach((function(e){this._keyBindings[e.event]=this._keyBindings[e.event]||[],this._keyBindings[e.event].push([e,t])}),this)},_resetKeyEventListeners:function(){this._unlistenKeyEventListeners(),this.isAttached&&this._listenKeyEventListeners()},_listenKeyEventListeners:function(){this.keyEventTarget&&Object.keys(this._keyBindings).forEach((function(e){var t=this._keyBindings[e],n=this._onKeyBindingEvent.bind(this,t);this._boundKeyHandlers.push([this.keyEventTarget,e,n]),this.keyEventTarget.addEventListener(e,n)}),this)},_unlistenKeyEventListeners:function(){for(var e,t,n,o;this._boundKeyHandlers.length;)t=(e=this._boundKeyHandlers.pop())[0],n=e[1],o=e[2],t.removeEventListener(n,o)},_onKeyBindingEvent:function(e,t){if(this.stopKeyboardEventPropagation&&t.stopPropagation(),!t.defaultPrevented)for(var n=0;n<e.length;n++){var o=e[n][0],i=e[n][1];if(S(o,t)&&(this._triggerKeyHandler(o,i,t),t.defaultPrevented))return}},_triggerKeyHandler:function(e,t,n){var o=Object.create(e);o.keyboardEvent=n;var i=new CustomEvent(e.event,{detail:o,cancelable:!0});this[t].call(this,i),i.defaultPrevented&&n.preventDefault()}};export{_ as I,v as O,K as a};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e,m as t,e as s,f as r,_ as i,R as n}from"./shared-1522d76f.js";import{h as o,L as h}from"./shared-dc73b9a5.js";import{A as a}from"./shared-07e9d1fb.js";import{F as d}from"./shared-343d1fd7.js";import{U as u,a as l}from"./shared-3ab0306f.js";import{I as c}from"./shared-30cbf0a6.js";import{i as _}from"./shared-eb116b3e.js";function f(t,s){let r=null;return e(s).forEach((function(){var e,s,i,n,o,h,a,d,u,l,c;if(null===(i=null===(s=null===(e=this.node)||void 0===e?void 0:e._links)||void 0===s?void 0:s.self)||void 0===i?void 0:i.href){const e=null===(h=null===(o=null===(n=this.node)||void 0===n?void 0:n._links)||void 0===o?void 0:o.self)||void 0===h?void 0:h.href,s=new URL(null===(u=null===(d=null===(a=this.node)||void 0===a?void 0:a._links)||void 0===d?void 0:d.self)||void 0===u?void 0:u.href);if(s.searchParams.delete("zoom"),t===e||t===s.toString())return r=JSON.stringify(this.node),void this.stop()}Object.entries(null!==(c=null===(l=this.node)||void 0===l?void 0:l._links)&&void 0!==c?c:{}).some((([e,s])=>{var i,n;if(s.href!==t)return!1;const o=null===(n=null===(i=this.node)||void 0===i?void 0:i._embedded)||void 0===n?void 0:n[e];if(!o||!Array.isArray(o))return!1;const h=o.length<20?o.length:21,a=new URL(t),d=new URL(t);return a.searchParams.set("offset",o.length.toString()),d.searchParams.set("offset",h.toString()),r=JSON.stringify({returned_items:o.length,total_items:h,offset:0,limit:20,_embedded:{[e]:o},_links:{curies:this.node._links.curies,first:{href:t},last:{href:d.toString()},prev:{href:t},next:{href:a.toString()},self:{href:t}}}),this.stop(),!0}))})),new Response(r,{status:r?200:404})}let v,p=e=>e;class m extends(c(h)){constructor(){super(),this.lang="",this.parent="",this.related=[],this.__hrefToLoad=null,this.__group="",this.__unsubscribeFromRumour=null,this.__fetchEventQueue=[],this.__service=_(s.withConfig({services:{sendDelete:()=>this._sendDelete(),sendPatch:({edits:e})=>this._sendPatch(e),sendPost:({edits:e})=>this._sendPost(e),sendGet:()=>this._sendGet()},actions:{validate:r({errors:e=>{const t=this.constructor.v8n,s=i(i({},e.data),e.edits);return t.map((e=>e(s,this))).filter((e=>"string"==typeof e)).filter(((e,t,s)=>s.indexOf(e)===t))}})}})),this.__createService()}static get inferredProperties(){return[...super.inferredProperties,"group","lang"]}static get properties(){return{__state:{type:String,reflect:!0,attribute:"state"},related:{type:Array},parent:{type:String},group:{type:String,noAccessor:!0},href:{type:String,noAccessor:!0},lang:{type:String}}}static get v8n(){return[]}get failure(){return this.__service.state.context.failure}get errors(){return this.__service.state.context.errors}get form(){const{data:e,edits:t}=this.__service.state.context;return i(i({},e),t)}get data(){return this.__service.state.context.data}set data(e){this.__destroyRumour(),this.__hrefToLoad=null,this.__service.send({type:"SET_DATA",data:e}),e&&this.__createRumour()}get group(){return this.__group}set group(e){this.__group=e,this.__destroyRumour(),this.__createRumour()}get href(){var e,t,s;return null!==(s=null!==(t=null===(e=this.form._links)||void 0===e?void 0:e.self.href)&&void 0!==t?t:this.__hrefToLoad)&&void 0!==s?s:""}set href(e){this.__hrefToLoad=e,e?this.__service.send({type:"FETCH"}):this.data=null}in(e){return this.__service.state.matches(e)}undo(){this.__service.send({type:"UNDO"})}edit(e){var t;"string"==typeof(null===(t=e._links)||void 0===t?void 0:t.self.href)&&(this.__hrefToLoad=null),this.__service.send({type:"EDIT",data:e})}submit(){this.reportValidity(),this.__service.send({type:"SUBMIT"})}checkValidity(){const e=this.in({idle:{template:{dirty:"valid"}}}),t=this.in({idle:{snapshot:{dirty:"valid"}}}),s=this.in({idle:{template:{clean:"valid"}}}),r=this.in({idle:{snapshot:{clean:"valid"}}});return s||e||(r||t)}reportValidity(){const e=this.ownerDocument.createTreeWalker(this.renderRoot,NodeFilter.SHOW_ELEMENT);do{const t=e.currentNode,s=["reportValidity","validate"];for(const e of s)if(e in t)try{t[e]();break}catch(e){continue}}while(e.nextNode());return this.checkValidity()}delete(){this.__service.send({type:"DELETE"})}refresh(){this.__service.send({type:"REFRESH"})}render(){return o(v||(v=p`<slot></slot>`))}connectedCallback(){super.connectedCallback(),this.href&&!this.data&&this.__service.send({type:"FETCH"}),this.__createRumour(),this.__createServer(),this.__processFetchEventQueue(),this.dispatchEvent(new u)}disconnectedCallback(){super.disconnectedCallback(),this.__destroyRumour(),this.__destroyServer(),this.__flushFetchEventQueue("parent element was disconnected"),this.dispatchEvent(new u)}applyInferredProperties(e){var t,s;super.applyInferredProperties(e),null!==this.infer&&(this.group=null!==(t=e.get("group"))&&void 0!==t?t:"",this.lang=null!==(s=e.get("lang"))&&void 0!==s?s:"")}async _fetch(...e){const t=await new a(this).fetch(...e);if(!t.ok)throw t;return t.json()}async _sendPost(e){let t;this.__destroyRumour();try{const s=JSON.stringify(e),r=await this._fetch(this.parent,{body:s,method:"POST"});t=await this._fetch(r._links.self.href);const i=m.Rumour(this.group),n=[...this.related,this.parent];i.share({data:t,related:n,source:t._links.self.href})}finally{this.__createRumour()}return t}async _sendGet(){let e;this.__destroyRumour();try{e=await this._fetch(this.href),m.Rumour(this.group).share({data:e,source:this.href})}finally{this.__createRumour()}return e}async _sendPatch(e){let t;this.__destroyRumour();try{const s=JSON.stringify(e);t=await this._fetch(this.href,{body:s,method:"PATCH"});m.Rumour(this.group).share({data:t,source:this.href,related:this.related})}finally{this.__createRumour()}return t}async _sendDelete(){this.__destroyRumour();try{await this._fetch(this.href,{method:"DELETE"});const e=m.Rumour(this.group),t=[...this.related,this.parent];e.share({data:null,source:this.href,related:t})}finally{this.__createRumour()}return null}get __state(){const e=this.__service.state.toStrings().reduce(((e,t)=>[...e,...t.split(".")]),[]);return[...new Set(e)].join(" ")}__createService(){this.__service.onTransition((e=>{var t,s;if(!e.changed)return;let r;e.matches("idle")&&((null===(t=e.history)||void 0===t?void 0:t.matches({busy:"deleting"}))?r=l.ResourceDeleted:(null===(s=e.history)||void 0===s?void 0:s.matches({busy:"creating"}))&&(r=l.ResourceCreated)),this.requestUpdate(),this.dispatchEvent(new u("update",{detail:{result:r}})),e.matches("busy")||this.__processFetchEventQueue()})),this.__service.onChange((()=>{this.requestUpdate(),this.dispatchEvent(new u)})),this.__service.start()}__createRumour(){const e=m.Rumour(this.group);this.__unsubscribeFromRumour=e.track((e=>this.__handleRumourUpdate(e)))}__destroyRumour(){var e;null===(e=this.__unsubscribeFromRumour)||void 0===e||e.call(this),this.__unsubscribeFromRumour=null}__createServer(){this.__fetchEventHandler=this.__handleFetchEvent.bind(this),this.addEventListener("fetch",this.__fetchEventHandler)}__destroyServer(){this.removeEventListener("fetch",this.__fetchEventHandler)}__handleRumourUpdate(e){var t;try{const s=null===(t=this.__service.state)||void 0===t?void 0:t.context.data,r=s?e(s):s;if(r!==s&&(this.data=r,!r)){const e=l.ResourceDeleted,t=new u("update",{detail:{result:e}});this.dispatchEvent(t)}}catch(e){if(!(e instanceof n.UpdateError))throw e;this.__service.send({type:"REFRESH"})}}__processFetchEventQueue(){const e=new m.API(this);this.__fetchEventQueue.forEach((t=>{const s=t.request,r=f(s.url,this.data),i=r.ok?r:e.fetch(s);t.respondWith(Promise.resolve(i)),r.ok&&console.debug(`%c@foxy.io/elements::${this.localName}\n%c200%c GET ${s.url}`,"color: gray","background: gray; padding: 0 .2em; border-radius: .2em; color: white;","")})),this.__fetchEventQueue=[]}__flushFetchEventQueue(e){this.__fetchEventQueue.forEach((t=>{t.respondWith(Promise.reject(new Error(e)))})),this.__fetchEventQueue=[]}__handleFetchEvent(e){e instanceof d&&(e.defaultPrevented||"GET"===e.request.method&&(e.request.url.startsWith("foxy://")||e.composedPath()[0]!==this&&(e.preventDefault(),this.__fetchEventQueue.push(e),this.__service.state.matches("busy")||this.__processFetchEventQueue())))}}m.UpdateEvent=u,m.Rumour=t((()=>new n)),m.API=a;export{m as N,f as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Z as t,$ as e,a0 as a,a1 as s,a2 as n,a3 as i,a4 as r,a5 as o,f as l,a6 as d,a7 as u,a8 as c,a9 as m,aa as h,ab as g,ac as y,ad as p,_ as v}from"./shared-1522d76f.js";import"./shared-e40937c5.js";import"./shared-cfed658c.js";import"./shared-7039733e.js";import"./shared-db98729a.js";import"./shared-4482e7b9.js";import"./shared-44bb85d8.js";import"./shared-f588b5c2.js";import{c as x,h as b}from"./shared-dc73b9a5.js";import{F as f}from"./shared-44d207fb.js";import{x as _}from"./shared-331a223c.js";import{s as w}from"./shared-99940888.js";import{i as $}from"./shared-eb116b3e.js";var E={raise:t,send:e,sendParent:a,sendUpdate:s,log:n,cancel:i,start:r,stop:o,assign:l,after:d,done:u,respond:c,forwardTo:m,escalate:h,choose:g,pure:y};class T extends CustomEvent{constructor(t){super("change",{detail:t})}}const k=p({id:"choice",type:"parallel",context:{defaultCustomValue:"",customValue:null,custom:!1,items:[],value:null,type:"text",min:null,max:null},states:{mutability:{initial:"editable",states:{editable:{},readonly:{}},on:{SET_READONLY:[{target:".editable",cond:"isPayloadFalsey"},{target:".readonly",cond:"isPayloadTruthy"}]}},interactivity:{initial:"enabled",states:{enabled:{},disabled:{}},on:{SET_DISABLED:[{target:".enabled",cond:"isPayloadFalsey"},{target:".disabled",cond:"isPayloadTruthy"}]}},selection:{initial:"unknown",states:{unknown:{always:[{target:"multiple",cond:"isValueArray"},{target:"single"}]},none:{},single:{},multiple:{}}},extension:{initial:"unknown",states:{unknown:{always:[{target:"present",cond:"hasCustom"},{target:"absent"}]},absent:{},present:{initial:"unknown",states:{unknown:{always:[{target:"selected",cond:"hasCustomValue"},{target:"available"}]},available:{on:{SET_TYPE:{actions:"setType"}}},selected:{initial:"unknown",states:{unknown:{always:[{target:"number",cond:"showsNumberField"},{target:"integer",cond:"showsIntegerField"},{target:"textarea",cond:"showsTextarea"},{target:"frequency",cond:"showsFrequency"},{target:"text"}]},text:{},frequency:{},textarea:{},integer:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}},number:{type:"parallel",states:{min:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMinConstraint"},{target:"none"}]},none:{},custom:{}}},max:{initial:"unknown",states:{unknown:{always:[{target:"custom",cond:"hasMaxConstraint"},{target:"none"}]},none:{},custom:{}}}}}}}}}}}},on:{SET_DEFAULT_CUSTOM_VALUE:{actions:"setDefaultCustomValue"},SET_CUSTOM:{actions:"setCustom",target:[".selection.unknown",".extension.unknown"]},SET_VALUE:{actions:"setValue",target:[".selection.unknown",".extension.unknown"]},SET_ITEMS:{actions:"setItems",target:[".selection.unknown",".extension.unknown"]},SET_TYPE:{actions:"setType",target:".extension.unknown"},SET_MIN:{actions:"setMin",target:".extension.unknown"},SET_MAX:{actions:"setMax",target:".extension.unknown"}}},{guards:{isPayloadFalsey:(t,e)=>!e.data,isPayloadTruthy:(t,e)=>!!e.data,isValueArray:t=>Array.isArray(t.value),showsIntegerField:t=>"integer"===t.type,showsNumberField:t=>"number"===t.type,showsFrequency:t=>"frequency"===t.type,showsTextarea:t=>"textarea"===t.type,hasMinConstraint:t=>"number"==typeof t.min,hasMaxConstraint:t=>"number"==typeof t.max,hasCustomValue:t=>"string"==typeof t.customValue,hasCustom:t=>t.custom},actions:{setDefaultCustomValue:E.assign({defaultCustomValue:(t,e)=>e.data}),setValue:E.assign({value:(t,e)=>e.data,customValue:(t,e)=>Array.isArray(e.data)?e.data.find((e=>!t.items.includes(e))):t.items.includes(e.data)?null:e.data}),setCustom:E.assign({custom:(t,e)=>e.data}),setItems:E.assign({items:(t,e)=>e.data}),setType:E.assign({type:(t,e)=>e.data}),setMin:E.assign({min:(t,e)=>e.data}),setMax:E.assign({max:(t,e)=>e.data})}});let S,C,A,V,M,j,F,U,q,D,I,P,L,N,O=t=>t;const B=`@foxy.io/elements::other[${(Math.pow(10,10)*Math.random()).toFixed(0)}]`;class Y extends _{constructor(){super(...arguments),this.getText=t=>t,this.__service=$(k).onChange((()=>this.requestUpdate())).onTransition((({changed:t})=>t&&this.requestUpdate())).start()}static get scopedElements(){return{"vaadin-integer-field":customElements.get("vaadin-integer-field"),"vaadin-number-field":customElements.get("vaadin-number-field"),"vaadin-text-field":customElements.get("vaadin-text-field"),"x-frequency-input":f,"vaadin-text-area":customElements.get("vaadin-text-area"),"iron-icon":customElements.get("iron-icon")}}static get styles(){return[super.styles,x(A||(A=O`:host{--item-width:calc((var(--lumo-space-m) * 2) + 1.25rem)}.ml-xxl{margin-left:var(--item-width)}.item{height:var(--lumo-size-l);width:var(--item-width)}.radio{height:1.25rem;width:1.25rem}.check{height:1.125rem;width:1.125rem}.dot{height:.5rem;width:.5rem}`))]}static get properties(){return v(v({},super.properties),{},{defaultCustomValue:{type:String,attribute:"default-custom-value"},disabled:{type:Boolean},readonly:{type:Boolean},custom:{type:Boolean},type:{type:String},min:{type:Number},max:{type:Number},value:{type:Array},items:{type:Array},getText:{attribute:!1}})}get defaultCustomValue(){return this.__service.state.context.defaultCustomValue}set defaultCustomValue(t){this.__service.send("SET_DEFAULT_CUSTOM_VALUE",{data:t})}get readonly(){return this.__service.state.matches("mutability.readonly")}set readonly(t){this.__service.send("SET_READONLY",{data:t})}get disabled(){return this.__service.state.matches("interactivity.disabled")}set disabled(t){this.__service.send("SET_DISABLED",{data:t})}get custom(){return this.__service.state.matches("extension.present")}set custom(t){this.__service.send("SET_CUSTOM",{data:t})}get type(){return this.__service.state.context.type}set type(t){this.__service.send("SET_TYPE",{data:t})}get min(){return this.__service.state.context.min}set min(t){this.__service.send("SET_MIN",{data:t})}get max(){return this.__service.state.context.max}set max(t){this.__service.send("SET_MAX",{data:t})}get value(){return this.__service.state.context.value}set value(t){this.__service.send("SET_VALUE",{data:t})}get items(){return this.__service.state.context.items}set items(t){this.__service.send("SET_ITEMS",{data:t})}render(){const t=this.custom?[...this.items,B]:this.items,e=Array.isArray(this.value),a=this.__service.state.matches("extension.present.selected"),s=b(V||(V=O` ${0} `),t.map(((t,s,n)=>{var i;const r=this.custom&&s===n.length-1,o=r?a:e?!!(null===(i=this.value)||void 0===i?void 0:i.includes(t)):t===String(this.value),l=this.disabled||!this._isI18nReady,d=w({value:r?B:t,name:e?t:"choice","data-testid":`item-${t}`,"?disabled":l,"@change":e=>{if(this.readonly)return e.preventDefault();const a=e.target.checked,s=t===B?this.defaultCustomValue:t,n=this.value;Array.isArray(n)?this.value=t===B?a?[...n,s]:n.slice(0,n.length-1):a?[s,...n]:n.filter((t=>t!==s)):this.value=a?s:null,this.dispatchEvent(new T(this.value))}}),u=b(M||(M=O` <div> ${0} </div> `),t===B?this._t("choice.other").toString():b(j||(j=O`<slot name="${0}">${0}</slot>`),`${t}-label`,this.getText(t)));return b(F||(F=O` <div class="ml-xxl border-t border-contrast-10 ${0}"></div> ${0} <div class="mr-m ml-xxl"> ${0} ${0} </div> `),s?"":"hidden",e?function(t,e,a,s,n){const i="transition ease-in-out duration-200",r=`${i} transform ${a?"scale-100":"scale-0"} ${t?"text-contrast-70":"text-tint"}`;return b(C||(C=O` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0 text-primary-contrast"> <div class="check rounded-s ${0} ${0} ${0} focus-within-shadow-outline"> <iron-icon icon="lumo:checkmark" class="block w-full h-full ${0}"></iron-icon> <input type="checkbox" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),e||t?"":"cursor-pointer","border "+(t?"border-dashed border-contrast-30":"border-transparent"),i,t?"":e?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,a,s,e?"text-disabled":t?"text-secondary":"text-body",n)}(this.readonly,l,o,d,u):function(t,e,a,s,n){const i="transition ease-in-out duration-200",r=`${i} ${e||t?"":"shadow-xs"} transform ${a?"scale-100":"scale-0"} ${t?"bg-contrast-70":"bg-tint"}`;return b(S||(S=O` <label class="group flex items-center ${0}"> <div class="item flex items-center justify-center flex-shrink-0"> <div class="flex radio rounded-full ${0} ${0} ${0} focus-within-shadow-outline"> <div class="dot m-auto rounded-full ${0}"></div> <input type="radio" class="sr-only" .checked="${0}" ...="${0}"> </div> </div> <div class="font-lumo leading-m ${0}">${0}</div> </label> `),e||t?"":"cursor-pointer","border "+(t?"border-dashed border-contrast-30":"border-transparent"),i,t?"":e?a?"bg-primary-50":"bg-contrast-10":a?"bg-primary":"bg-contrast-20 group-hover-bg-contrast-30",r,a,s,e?"text-disabled":t?"text-secondary":"text-body",n)}(this.readonly,l,o,d,u),t===B&&a?this.__field:"",t!==B?b(U||(U=O`<slot name="${0}"></slot>`),t):"")})));return b(q||(q=O`<form>${0}</form> `),s)}get __field(){const t=w({placeholder:this._t("choice.other").toString(),class:"w-full mb-m",value:this.__service.state.context.customValue,max:this.max,min:this.min,ns:this.ns,"?disabled":this.disabled,"?readonly":this.readonly,"data-testid":"field","@change":t=>{t.stopPropagation();const e=t.target.value;Array.isArray(this.value)?this.value=this.value.slice(0,this.value.length-1).concat(e):this.value=e,this.dispatchEvent(new T(this.value))}});return"frequency"===this.type?b(D||(D=O`<x-frequency-input ...="${0}"></x-frequency-input>`),t):"integer"===this.type?b(I||(I=O`<vaadin-integer-field ...="${0}" has-controls></vaadin-integer-field>`),t):"number"===this.type?b(P||(P=O`<vaadin-number-field ...="${0}" has-controls></vaadin-number-field>`),t):"textarea"===this.type?b(L||(L=O`<vaadin-text-area ...="${0}"></vaadin-text-area>`),t):b(N||(N=O`<vaadin-text-field ...="${0}"></vaadin-text-field>`),t)}}export{Y as C,T as a,E as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as t}from"./shared-1522d76f.js";import{h as e,L as s}from"./shared-dc73b9a5.js";import{C as i}from"./shared-9f570db0.js";import{a as r,T as o}from"./shared-331a223c.js";import{c as n}from"./shared-4e709717.js";import{l as a}from"./shared-22ba9566.js";import{r as l}from"./shared-a0c6a159.js";import{I as c}from"./shared-30cbf0a6.js";let d,h,u,m=t=>t;const p=r(i(o(c(s))));class b extends p{constructor(){super(...arguments),this.options=[],this.items=[],this.__newItem=""}static get properties(){return t(t({},super.properties),{},{options:{type:Array},items:{type:Array},__newItem:{attribute:!1}})}render(){const t=n({"w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0":!0,"focus-outline-none focus-ring-2 ring-inset ring-error-50":!0,"text-tertiary hover-bg-error-10 hover-text-error":!this.disabled,"cursor-default text-disabled":this.disabled,"flex items-center justify-center":!this.readonly,hidden:this.readonly}),s=n({"transition-colors h-l ml-m flex items-center":!0,"text-secondary":this.readonly,"text-disabled":this.disabled}),i=this.disabled||!this.__newItem,r=()=>{this.__newItem&&(this.items.push({value:this.__newItem}),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change")),this.__newItem="")};return e(d||(d=m` <slot></slot> <ol class="divide-y divide-contrast-10"> ${0} </ol> <div class="${0}"> <input placeholder="${0}" class="w-full bg-transparent appearance-none h-m focus-outline-none" list="list" .value="${0}" ?disabled="${0}" ?readonly="${0}" @keydown="${0}" @change="${0}" @input="${0}"> <datalist id="list"> ${0} </datalist> <div class="transition-opacity ${0}"> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon> </button> </div> </div> `),l(this.items,(t=>t.value),((i,r)=>{var o;return e(h||(h=m` <li class="${0}"> <div class="flex-1 mr-s">${0}</div> <button aria-label="${0}" class="${0}" ?disabled="${0}" @click="${0}"> <iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon> </button> </li> `),s,null!==(o=i.label)&&void 0!==o?o:i.value,this.t("delete"),t,this.disabled,(()=>{this.items.splice(r,1),this.requestUpdate("items"),this.dispatchEvent(new CustomEvent("change"))}))})),n({"ml-m h-l flex items-center":!0,"border-t border-contrast-10":this.items.length>0,flex:!this.readonly,hidden:this.readonly}),this.t("type_here"),a(this.__newItem),this.disabled,this.readonly,(t=>"Enter"===t.key&&r()),(t=>t.stopPropagation()),(t=>{this.__newItem=t.currentTarget.value.trim()}),this.options.map((({label:t,value:s})=>{if(!this.items.some((t=>t.value===s)))return e(u||(u=m`<option value="${0}">${0}</option>`),s,null!=t?t:s)})),this.__newItem?"opacity-100":"opacity-0",this.t("submit"),n({"w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none":!0,"flex items-center justify-center rounded-full transition-colors":!0,"bg-contrast-5 text-disabled cursor-default":i,"bg-success-10 text-success cursor-pointer":!i,"hover-bg-success hover-text-success-contrast":!i,"focus-ring-2":!i}),i,r)}}export{b as E};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./foxy-spinner.js";import{I as e}from"./shared-d244dd07.js";customElements.define("foxy-internal-card",e);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ah as r,ai as a}from"./shared-1522d76f.js";var e=function(){try{var a=r(Object,"defineProperty");return a({},"",{}),a}catch(r){}}();function t(r,a,t){"__proto__"==a&&e?e(r,a,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[a]=t}var o=Object.prototype.hasOwnProperty;function n(r,e,n){var i=r[e];o.call(r,e)&&a(i,n)&&(void 0!==n||e in r)||t(r,e,n)}export{n as a,t as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as t,h as e,j as n,k as i,l as r,p as s,n as o,o as a,q as h,s as c,u,v as d,w as l,x as f,y as p,z as v,C as y,D as w,E as x,F as b,G as m,H as g,I as E,J as S,K as T,L,M as _,N as O,S as k,O as C,P as N,Q as M,T as z,U as D,V as P,W as I,X as R}from"./shared-1522d76f.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}(),j=new Map,F=0,U=function(){return"x:"+F++},X=function(t,e){return j.set(t,e),t},A=function(t){return j.get(t)},V=function(t){j.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=U()}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 +0,0 @@
|
|
|
1
|
-
import{A as e,_ as t}from"./shared-1522d76f.js";import{h as n,L as r}from"./shared-dc73b9a5.js";import{i as s,a}from"./shared-331a223c.js";import{F as i}from"./shared-343d1fd7.js";import{I as o}from"./shared-30cbf0a6.js";const l={type:"backend",init:()=>{},read:(t,n,r)=>{const s=async e=>{const t=e.ok?null:new Error(await e.text()),n=!!e.ok&&await e.json();r(t,n)},a=e=>{const t=e instanceof Error?e:new Error(String(e));r(t,!1)},o=new i("fetch",{cancelable:!0,composed:!0,bubbles:!0,request:new e.WHATWGRequest(`foxy://i18n/${n}/${t}`),resolve:s,reject:a});dispatchEvent(o),o.defaultPrevented||fetch(o.request).then(s).catch(a)},create:()=>{throw new Error("foxy-i18n does not support resource creation")}};function c(e,t=!1){var n;const r=e.replace(/^\.?\d+/,""),s=e.substring(0,e.length-r.length);return{count:".5"===s?.5:parseInt(s),units:t&&null!==(n={y:"year",m:"month",w:"week",d:"day"}[r])&&void 0!==n?n:r}}const u={discount:({ns:e,type:t,details:n},r,s)=>{const a=t.endsWith("_percentage")?.01:1,i=n.split("|"),o=`${["allunits","incremental","repeat","single"].includes(i[0])?i.shift():"single"}_${t}_discount_summary`;return i.map((t=>{var n,r;const s=null!==(r=null===(n=/[-+]/.exec(t))||void 0===n?void 0:n.index)&&void 0!==r?r:-1,i=parseFloat(t.substring(s))*a,l=parseFloat(t.substring(0,s));return`$t(${o}, ${JSON.stringify({maximumFractionDigits:10,adjustment:i,from:l,ns:e})})`})).join("; ")},relative:(e,t,n)=>{const r=new Intl.RelativeTimeFormat(n);let{count:s,units:a}=c(e,!0);return.5===s&&"month"===a&&(s=2,a="week"),r.format(s,a)},percent:(e,n,r,s)=>{let a=null;try{"number"==typeof e&&(a=e.toLocaleString(r,t(t({},s),{},{style:"percent"})))}catch(e){console.warn(`i18next formatter error: ${e.message}`)}return a||String(e)},ordinal:(e,t,n)=>`${e}$t(ordinal_${new Intl.PluralRules(n,{type:"ordinal"}).select(e)})`,price:(e,t,n,r)=>{var s;try{const[t,a]=e.split(" ");return parseFloat(t).toLocaleString(n,{maximumFractionDigits:2,minimumFractionDigits:2,currencyDisplay:null!==(s=null==r?void 0:r.currencyDisplay)&&void 0!==s?s:"symbol",signDisplay:null==r?void 0:r.signDisplay,style:"currency",currency:a})}catch(t){return e}},date:(e,t,n,r)=>{var s,a,i;if(!e)return"$t(unknown)";const o=new Date(e),l=null!==(s=null==r?void 0:r.month)&&void 0!==s?s:"long",c=(null!==(a=null==r?void 0:r.year)&&void 0!==a?a:(new Date).getFullYear()===o.getFullYear())?void 0:"numeric",u=null!==(i=null==r?void 0:r.day)&&void 0!==i?i:"numeric";return o.toLocaleDateString(n,{month:l,year:c,day:u})},time:(e,t,n)=>new Date(e).toLocaleTimeString(n,{hour:"numeric",minute:"numeric"})};let d,p=e=>e;class m extends(a(o(r),"")){constructor(){super(...arguments),this.options={},this.key=""}static onTranslationChange(e){const t=["initialized","loaded"],n=["removed","added"];return t.forEach((t=>m.i18next.on(t,e))),n.forEach((t=>m.i18next.store.on(t,e))),()=>{t.forEach((t=>m.i18next.off(t,e))),n.forEach((t=>m.i18next.store.off(t,e)))}}static onResourceFetch(e){const t=t=>{if(t instanceof i&&t.request.url.startsWith("foxy://i18n/")){const[n,r]=t.request.url.split("/").reverse();t.respondWith(e(r,n))}};return addEventListener("fetch",t),()=>removeEventListener("fetch",t)}static setGateways({values:e}){for(const t in e)this.i18next.addResource("en","gateways",`gateways.${t}`,e[t].name)}static get properties(){return t(t({},super.properties),{},{options:{type:Object},key:{type:String}})}connectedCallback(){super.connectedCallback(),this.__unsubscribe=m.onTranslationChange((()=>this.requestUpdate()))}render(){return n(d||(d=p`<span>${0}</span>`),this.t(this.key,t(t({},this.options),{},{lng:this.lang})))}disconnectedCallback(){var e;super.disconnectedCallback(),null===(e=this.__unsubscribe)||void 0===e||e.call(this)}}m.FetchEvent=i,m.i18next=s.createInstance().use(l),m.i18next.init({interpolation:{format:(e,t="",n="en",r={})=>t.split(" ").filter((e=>!!e.trim())).reduce(((e,t)=>{var s,a;return null!==(a=null===(s=u[t])||void 0===s?void 0:s.call(u,e,t,n,r))&&void 0!==a?a:e}),e),escapeValue:!1},fallbackLng:"en",fallbackNS:"shared",defaultNS:"shared",ns:["shared"]}),customElements.define("foxy-i18n",m);export{m as I,c as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{ae as a,af as r,aK as n,ag as t,aF as e,aL as l}from"./shared-1522d76f.js";var o=Object.prototype.hasOwnProperty;function s(a,r){return null!=a&&o.call(a,r)}function u(o,u){return null!=o&&function(o,s,u){for(var f=-1,c=(s=a(s,o)).length,h=!1;++f<c;){var i=r(s[f]);if(!(h=null!=o&&u(o,i)))break;o=o[i]}return h||++f!=c?h:!!(c=null==o?0:o.length)&&n(c)&&t(i,c)&&(e(o)||l(o))}(o,u,s)}export{u as h};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ScopedElementsMap } from '@open-wc/scoped-elements';
|
|
2
|
-
import { TemplateResult } from 'lit-html';
|
|
3
|
-
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
4
|
-
import { PropertyDeclarations } from 'lit-element';
|
|
5
|
-
import { Rels } from '@foxy.io/sdk/backend';
|
|
6
|
-
import { Resource } from '@foxy.io/sdk/core';
|
|
7
|
-
declare type Data = Resource<Rels.ItemCategories>;
|
|
8
|
-
declare const Base: typeof NucleonElement & import("lit-element").Constructor<import("../../../../mixins/translatable").TranslatableMixinHost> & {
|
|
9
|
-
defaultNS: string;
|
|
10
|
-
} & {
|
|
11
|
-
styles: import("lit-element").CSSResultArray;
|
|
12
|
-
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
13
|
-
export declare class CategoryRestrictionsPage extends Base<Data> {
|
|
14
|
-
static get scopedElements(): ScopedElementsMap;
|
|
15
|
-
static get properties(): PropertyDeclarations;
|
|
16
|
-
couponItemCategories: string;
|
|
17
|
-
coupon: string;
|
|
18
|
-
render(): TemplateResult;
|
|
19
|
-
}
|
|
20
|
-
export {};
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
2
|
-
import { html } from 'lit-html';
|
|
3
|
-
import { CategoryRestrictionsPageItem } from "./CategoryRestrictionsPageItem.js";
|
|
4
|
-
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
5
|
-
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
6
|
-
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
-
import { TranslatableMixin } from "../../../../mixins/translatable.js";
|
|
8
|
-
import { classMap } from "../../../../utils/class-map.js";
|
|
9
|
-
const Base = ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement))));
|
|
10
|
-
export class CategoryRestrictionsPage extends Base {
|
|
11
|
-
constructor() {
|
|
12
|
-
super(...arguments);
|
|
13
|
-
this.couponItemCategories = '';
|
|
14
|
-
this.coupon = '';
|
|
15
|
-
}
|
|
16
|
-
static get scopedElements() {
|
|
17
|
-
return {
|
|
18
|
-
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
19
|
-
'x-category-restrictions-page-item': CategoryRestrictionsPageItem,
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
static get properties() {
|
|
23
|
-
return {
|
|
24
|
-
...super.properties,
|
|
25
|
-
couponItemCategories: { type: String, attribute: 'coupon-item-categories' },
|
|
26
|
-
coupon: { type: String },
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
render() {
|
|
30
|
-
var _a, _b, _c, _d, _e;
|
|
31
|
-
const categories = (_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._embedded['fx:item_categories']) !== null && _b !== void 0 ? _b : [];
|
|
32
|
-
let limit = 20;
|
|
33
|
-
try {
|
|
34
|
-
const limitFromHref = parseInt((_c = new URL(this.href).searchParams.get('limit')) !== null && _c !== void 0 ? _c : '');
|
|
35
|
-
if (!isNaN(limitFromHref))
|
|
36
|
-
limit = limitFromHref;
|
|
37
|
-
}
|
|
38
|
-
catch (_f) {
|
|
39
|
-
// invalid URL, use the default
|
|
40
|
-
}
|
|
41
|
-
return html `
|
|
42
|
-
<div class="relative">
|
|
43
|
-
<div class="relative divide-y divide-contrast-10 ml-m">
|
|
44
|
-
${new Array(limit).fill(0).map((_, index) => {
|
|
45
|
-
const category = categories[index];
|
|
46
|
-
let href = undefined;
|
|
47
|
-
if (category) {
|
|
48
|
-
try {
|
|
49
|
-
const couponCategoryURL = new URL(this.couponItemCategories);
|
|
50
|
-
const categoryURL = new URL(category._links.self.href);
|
|
51
|
-
const categoryID = categoryURL.pathname.split('/').pop();
|
|
52
|
-
couponCategoryURL.searchParams.set('item_category_id', categoryID);
|
|
53
|
-
couponCategoryURL.searchParams.set('limit', '1');
|
|
54
|
-
href = couponCategoryURL.toString();
|
|
55
|
-
}
|
|
56
|
-
catch (_a) {
|
|
57
|
-
// invalid URL, ignore
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
if (!href)
|
|
61
|
-
return html `<div class="h-l"></div>`;
|
|
62
|
-
return html `
|
|
63
|
-
<x-category-restrictions-page-item
|
|
64
|
-
data-testclass="item"
|
|
65
|
-
item-category=${category._links.self.href}
|
|
66
|
-
coupon=${this.coupon}
|
|
67
|
-
class="h-l"
|
|
68
|
-
group=${this.group}
|
|
69
|
-
href=${href}
|
|
70
|
-
?disabled=${!this.in('idle') || this.disabled}
|
|
71
|
-
?readonly=${this.readonly}
|
|
72
|
-
>
|
|
73
|
-
${category === null || category === void 0 ? void 0 : category.name}
|
|
74
|
-
</x-category-restrictions-page-item>
|
|
75
|
-
`;
|
|
76
|
-
})}
|
|
77
|
-
</div>
|
|
78
|
-
|
|
79
|
-
<div
|
|
80
|
-
data-testid="spinner"
|
|
81
|
-
class=${classMap({
|
|
82
|
-
'pointer-events-none absolute inset-0 flex transition-opacity': true,
|
|
83
|
-
'opacity-0': !!this.data,
|
|
84
|
-
})}
|
|
85
|
-
>
|
|
86
|
-
<foxy-spinner
|
|
87
|
-
layout="vertical"
|
|
88
|
-
state=${this.in('fail') ? 'error' : this.in({ idle: 'template' }) ? 'empty' : 'busy'}
|
|
89
|
-
class="m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs"
|
|
90
|
-
lang=${this.lang}
|
|
91
|
-
ns="${this.ns} ${(_e = (_d = customElements.get('foxy-spinner')) === null || _d === void 0 ? void 0 : _d.defaultNS) !== null && _e !== void 0 ? _e : ''}"
|
|
92
|
-
>
|
|
93
|
-
</foxy-spinner>
|
|
94
|
-
</div>
|
|
95
|
-
</div>
|
|
96
|
-
`;
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
//# sourceMappingURL=CategoryRestrictionsPage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryRestrictionsPage.js","sourceRoot":"","sources":["../../../../../src/elements/public/CouponForm/private/CategoryRestrictionsPage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,4BAA4B,EAAE,0CAAuC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,cAAc,EAAE,+CAA4C;AAIrE,OAAO,EAAE,cAAc,EAAE,wCAAqC;AAC9D,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,QAAQ,EAAE,uCAAoC;AAGvD,MAAM,IAAI,GAAG,iBAAiB,CAC5B,mBAAmB,CAAC,cAAc,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,CAAC,CACvE,CAAC;AAEF,MAAM,OAAO,wBAAyB,SAAQ,IAAU;IAAxD;;QAgBE,yBAAoB,GAAG,EAAE,CAAC;QAE1B,WAAM,GAAG,EAAE,CAAC;IAyEd,CAAC;IA1FC,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC;YAClD,mCAAmC,EAAE,4BAA4B;SAClE,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,oBAAoB,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,wBAAwB,EAAE;YAC3E,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;IAMD,MAAM;;QACJ,MAAM,UAAU,eAAG,IAAI,CAAC,IAAI,0CAAE,SAAS,CAAC,oBAAoB,oCAAK,EAAE,CAAC;QACpE,IAAI,KAAK,GAAG,EAAE,CAAC;QAEf,IAAI;YACF,MAAM,aAAa,GAAG,QAAQ,OAAC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,CAAC,mCAAI,EAAE,CAAC,CAAC;YACnF,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC;gBAAE,KAAK,GAAG,aAAa,CAAC;SAClD;QAAC,WAAM;YACN,+BAA+B;SAChC;QAED,OAAO,IAAI,CAAA;;;YAGH,IAAI,KAAK,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;YAC1C,MAAM,QAAQ,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,IAAI,GAAuB,SAAS,CAAC;YAEzC,IAAI,QAAQ,EAAE;gBACZ,IAAI;oBACF,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC;oBAC7D,MAAM,WAAW,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;oBACvD,MAAM,UAAU,GAAG,WAAW,CAAC,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,EAAY,CAAC;oBAEnE,iBAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,kBAAkB,EAAE,UAAU,CAAC,CAAC;oBACnE,iBAAiB,CAAC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC;oBAEjD,IAAI,GAAG,iBAAiB,CAAC,QAAQ,EAAE,CAAC;iBACrC;gBAAC,WAAM;oBACN,sBAAsB;iBACvB;aACF;YAED,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAA,yBAAyB,CAAC;YAEhD,OAAO,IAAI,CAAA;;;gCAGS,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI;yBAChC,IAAI,CAAC,MAAM;;wBAEZ,IAAI,CAAC,KAAK;uBACX,IAAI;4BACC,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;4BACjC,IAAI,CAAC,QAAQ;;kBAEvB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,IAAI;;aAEnB,CAAC;QACJ,CAAC,CAAC;;;;;kBAKM,QAAQ,CAAC;YACf,8DAA8D,EAAE,IAAI;YACpE,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI;SACzB,CAAC;;;;oBAIQ,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM;;mBAE7E,IAAI,CAAC,IAAI;kBACV,IAAI,CAAC,EAAE,IAAI,YAAA,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,0CAAE,SAAS,mCAAI,EAAE;;;;;KAK3E,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { ScopedElementsMap, ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { TemplateResult, html } from 'lit-html';\n\nimport { CategoryRestrictionsPageItem } from './CategoryRestrictionsPageItem';\nimport { ConfigurableMixin } from '../../../../mixins/configurable';\nimport { NucleonElement } from '../../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ThemeableMixin } from '../../../../mixins/themeable';\nimport { TranslatableMixin } from '../../../../mixins/translatable';\nimport { classMap } from '../../../../utils/class-map';\n\ntype Data = Resource<Rels.ItemCategories>;\nconst Base = ConfigurableMixin(\n ScopedElementsMixin(ThemeableMixin(TranslatableMixin(NucleonElement)))\n);\n\nexport class CategoryRestrictionsPage extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'x-category-restrictions-page-item': CategoryRestrictionsPageItem,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n couponItemCategories: { type: String, attribute: 'coupon-item-categories' },\n coupon: { type: String },\n };\n }\n\n couponItemCategories = '';\n\n coupon = '';\n\n render(): TemplateResult {\n const categories = this.data?._embedded['fx:item_categories'] ?? [];\n let limit = 20;\n\n try {\n const limitFromHref = parseInt(new URL(this.href).searchParams.get('limit') ?? '');\n if (!isNaN(limitFromHref)) limit = limitFromHref;\n } catch {\n // invalid URL, use the default\n }\n\n return html`\n <div class=\"relative\">\n <div class=\"relative divide-y divide-contrast-10 ml-m\">\n ${new Array(limit).fill(0).map((_, index) => {\n const category = categories[index];\n let href: string | undefined = undefined;\n\n if (category) {\n try {\n const couponCategoryURL = new URL(this.couponItemCategories);\n const categoryURL = new URL(category._links.self.href);\n const categoryID = categoryURL.pathname.split('/').pop() as string;\n\n couponCategoryURL.searchParams.set('item_category_id', categoryID);\n couponCategoryURL.searchParams.set('limit', '1');\n\n href = couponCategoryURL.toString();\n } catch {\n // invalid URL, ignore\n }\n }\n\n if (!href) return html`<div class=\"h-l\"></div>`;\n\n return html`\n <x-category-restrictions-page-item\n data-testclass=\"item\"\n item-category=${category._links.self.href}\n coupon=${this.coupon}\n class=\"h-l\"\n group=${this.group}\n href=${href}\n ?disabled=${!this.in('idle') || this.disabled}\n ?readonly=${this.readonly}\n >\n ${category?.name}\n </x-category-restrictions-page-item>\n `;\n })}\n </div>\n\n <div\n data-testid=\"spinner\"\n class=${classMap({\n 'pointer-events-none absolute inset-0 flex transition-opacity': true,\n 'opacity-0': !!this.data,\n })}\n >\n <foxy-spinner\n layout=\"vertical\"\n state=${this.in('fail') ? 'error' : this.in({ idle: 'template' }) ? 'empty' : 'busy'}\n class=\"m-auto p-m bg-base rounded-t-l rounded-b-l shadow-xs\"\n lang=${this.lang}\n ns=\"${this.ns} ${customElements.get('foxy-spinner')?.defaultNS ?? ''}\"\n >\n </foxy-spinner>\n </div>\n </div>\n `;\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TemplateResult } from 'lit-html';
|
|
2
|
-
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
3
|
-
import { PropertyDeclarations } from 'lit-element';
|
|
4
|
-
import { Rels } from '@foxy.io/sdk/backend';
|
|
5
|
-
import { Resource } from '@foxy.io/sdk/core';
|
|
6
|
-
import { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';
|
|
7
|
-
declare type Data = Resource<Rels.CouponItemCategories>;
|
|
8
|
-
declare const Base: typeof NucleonElement & {
|
|
9
|
-
styles: import("lit-element").CSSResultArray;
|
|
10
|
-
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
11
|
-
export declare class CategoryRestrictionsPageItem extends Base<Data> {
|
|
12
|
-
static get scopedElements(): ScopedElementsMap;
|
|
13
|
-
static get properties(): PropertyDeclarations;
|
|
14
|
-
itemCategory: string;
|
|
15
|
-
coupon: string;
|
|
16
|
-
render(): TemplateResult;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { html } from 'lit-html';
|
|
2
|
-
import { CategoryRestrictionsPageItemContent } from "./CategoryRestrictionsPageItemContent.js";
|
|
3
|
-
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
4
|
-
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
5
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
6
|
-
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
8
|
-
const Base = ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(NucleonElement)));
|
|
9
|
-
export class CategoryRestrictionsPageItem extends Base {
|
|
10
|
-
constructor() {
|
|
11
|
-
super(...arguments);
|
|
12
|
-
this.itemCategory = '';
|
|
13
|
-
this.coupon = '';
|
|
14
|
-
}
|
|
15
|
-
static get scopedElements() {
|
|
16
|
-
return {
|
|
17
|
-
'foxy-spinner': customElements.get('foxy-spinner'),
|
|
18
|
-
'x-category-restrictions-page-item-content': CategoryRestrictionsPageItemContent,
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
static get properties() {
|
|
22
|
-
return {
|
|
23
|
-
...super.properties,
|
|
24
|
-
itemCategory: { type: String, attribute: 'item-category' },
|
|
25
|
-
coupon: { type: String },
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
render() {
|
|
29
|
-
var _a;
|
|
30
|
-
const category = (_a = this.data) === null || _a === void 0 ? void 0 : _a._embedded['fx:coupon_item_categories'][0];
|
|
31
|
-
const parent = category ? undefined : this.href;
|
|
32
|
-
const href = category ? category._links.self.href : undefined;
|
|
33
|
-
return html `
|
|
34
|
-
<x-category-restrictions-page-item-content
|
|
35
|
-
item-category=${this.itemCategory}
|
|
36
|
-
data-testid="content"
|
|
37
|
-
coupon=${this.coupon}
|
|
38
|
-
parent=${ifDefined(parent)}
|
|
39
|
-
class="h-full"
|
|
40
|
-
group=${this.group}
|
|
41
|
-
href=${ifDefined(href)}
|
|
42
|
-
?disabled=${!this.in('idle') || this.disabled}
|
|
43
|
-
?readonly=${this.readonly}
|
|
44
|
-
>
|
|
45
|
-
<slot></slot>
|
|
46
|
-
</x-category-restrictions-page-item-content>
|
|
47
|
-
`;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
//# sourceMappingURL=CategoryRestrictionsPageItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CategoryRestrictionsPageItem.js","sourceRoot":"","sources":["../../../../../src/elements/public/CouponForm/private/CategoryRestrictionsPageItem.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhD,OAAO,EAAE,mCAAmC,EAAE,iDAA8C;AAC5F,OAAO,EAAE,iBAAiB,EAAE,2CAAwC;AACpE,OAAO,EAAE,cAAc,EAAE,+CAA4C;AAKrE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,cAAc,EAAE,wCAAqC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAG3D,MAAM,IAAI,GAAG,iBAAiB,CAAC,mBAAmB,CAAC,cAAc,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAEpF,MAAM,OAAO,4BAA6B,SAAQ,IAAU;IAA5D;;QAgBE,iBAAY,GAAG,EAAE,CAAC;QAElB,WAAM,GAAG,EAAE,CAAC;IAuBd,CAAC;IAxCC,MAAM,KAAK,cAAc;QACvB,OAAO;YACL,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC;YAClD,2CAA2C,EAAE,mCAAmC;SACjF,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,YAAY,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE;YAC1D,MAAM,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;SACzB,CAAC;IACJ,CAAC;IAMD,MAAM;;QACJ,MAAM,QAAQ,SAAG,IAAI,CAAC,IAAI,0CAAE,SAAS,CAAC,2BAA2B,EAAE,CAAC,CAAC,CAAC;QACtE,MAAM,MAAM,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;QAChD,MAAM,IAAI,GAAG,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;QAE9D,OAAO,IAAI,CAAA;;wBAES,IAAI,CAAC,YAAY;;iBAExB,IAAI,CAAC,MAAM;iBACX,SAAS,CAAC,MAAM,CAAC;;gBAElB,IAAI,CAAC,KAAK;eACX,SAAS,CAAC,IAAI,CAAC;oBACV,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,QAAQ;oBACjC,IAAI,CAAC,QAAQ;;;;KAI5B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { TemplateResult, html } from 'lit-html';\n\nimport { CategoryRestrictionsPageItemContent } from './CategoryRestrictionsPageItemContent';\nimport { ConfigurableMixin } from '../../../../mixins/configurable';\nimport { NucleonElement } from '../../NucleonElement/NucleonElement';\nimport { PropertyDeclarations } from 'lit-element';\nimport { Rels } from '@foxy.io/sdk/backend';\nimport { Resource } from '@foxy.io/sdk/core';\nimport { ScopedElementsMap } from '@open-wc/scoped-elements/src/types';\nimport { ScopedElementsMixin } from '@open-wc/scoped-elements';\nimport { ThemeableMixin } from '../../../../mixins/themeable';\nimport { ifDefined } from 'lit-html/directives/if-defined';\n\ntype Data = Resource<Rels.CouponItemCategories>;\nconst Base = ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(NucleonElement)));\n\nexport class CategoryRestrictionsPageItem extends Base<Data> {\n static get scopedElements(): ScopedElementsMap {\n return {\n 'foxy-spinner': customElements.get('foxy-spinner'),\n 'x-category-restrictions-page-item-content': CategoryRestrictionsPageItemContent,\n };\n }\n\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n itemCategory: { type: String, attribute: 'item-category' },\n coupon: { type: String },\n };\n }\n\n itemCategory = '';\n\n coupon = '';\n\n render(): TemplateResult {\n const category = this.data?._embedded['fx:coupon_item_categories'][0];\n const parent = category ? undefined : this.href;\n const href = category ? category._links.self.href : undefined;\n\n return html`\n <x-category-restrictions-page-item-content\n item-category=${this.itemCategory}\n data-testid=\"content\"\n coupon=${this.coupon}\n parent=${ifDefined(parent)}\n class=\"h-full\"\n group=${this.group}\n href=${ifDefined(href)}\n ?disabled=${!this.in('idle') || this.disabled}\n ?readonly=${this.readonly}\n >\n <slot></slot>\n </x-category-restrictions-page-item-content>\n `;\n }\n}\n"]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { ScopedElementsMap } from '@open-wc/scoped-elements';
|
|
2
|
-
import { TemplateResult } from 'lit-html';
|
|
3
|
-
import { NucleonElement } from '../../NucleonElement/NucleonElement';
|
|
4
|
-
import { PropertyDeclarations } from 'lit-element';
|
|
5
|
-
import { Rels } from '@foxy.io/sdk/backend';
|
|
6
|
-
import { Resource } from '@foxy.io/sdk/core';
|
|
7
|
-
declare type Data = Resource<Rels.CouponItemCategory>;
|
|
8
|
-
declare const Base: typeof NucleonElement & {
|
|
9
|
-
styles: import("lit-element").CSSResultArray;
|
|
10
|
-
} & import("@open-wc/dedupe-mixin").Constructor<import("@open-wc/scoped-elements/src/types").ScopedElementsHost> & import("lit-element").Constructor<import("../../../../mixins/configurable").ConfigurableMixinHost>;
|
|
11
|
-
export declare class CategoryRestrictionsPageItemContent extends Base<Data> {
|
|
12
|
-
static get scopedElements(): ScopedElementsMap;
|
|
13
|
-
static get properties(): PropertyDeclarations;
|
|
14
|
-
itemCategory: string;
|
|
15
|
-
coupon: string;
|
|
16
|
-
render(): TemplateResult;
|
|
17
|
-
}
|
|
18
|
-
export {};
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { ScopedElementsMixin } from '@open-wc/scoped-elements';
|
|
2
|
-
import { html } from 'lit-html';
|
|
3
|
-
import { Checkbox } from "../../../private/Checkbox/Checkbox.js";
|
|
4
|
-
import { ConfigurableMixin } from "../../../../mixins/configurable.js";
|
|
5
|
-
import { NucleonElement } from "../../NucleonElement/NucleonElement.js";
|
|
6
|
-
import { ThemeableMixin } from "../../../../mixins/themeable.js";
|
|
7
|
-
const Base = ConfigurableMixin(ScopedElementsMixin(ThemeableMixin(NucleonElement)));
|
|
8
|
-
export class CategoryRestrictionsPageItemContent extends Base {
|
|
9
|
-
constructor() {
|
|
10
|
-
super(...arguments);
|
|
11
|
-
this.itemCategory = '';
|
|
12
|
-
this.coupon = '';
|
|
13
|
-
}
|
|
14
|
-
static get scopedElements() {
|
|
15
|
-
return {
|
|
16
|
-
'x-checkbox': Checkbox,
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
static get properties() {
|
|
20
|
-
return {
|
|
21
|
-
...super.properties,
|
|
22
|
-
itemCategory: { type: String, attribute: 'item-category' },
|
|
23
|
-
coupon: { type: String },
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
render() {
|
|
27
|
-
return html `
|
|
28
|
-
<div class="h-full flex items-center">
|
|
29
|
-
<x-checkbox
|
|
30
|
-
data-testid="checkbox"
|
|
31
|
-
?disabled=${!this.in('idle') || this.disabled}
|
|
32
|
-
?readonly=${this.readonly}
|
|
33
|
-
?checked=${!!this.data}
|
|
34
|
-
@change=${(evt) => {
|
|
35
|
-
if (evt.detail) {
|
|
36
|
-
this.edit({
|
|
37
|
-
item_category_uri: this.itemCategory,
|
|
38
|
-
coupon_uri: this.coupon,
|
|
39
|
-
});
|
|
40
|
-
this.submit();
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
this.delete();
|
|
44
|
-
}
|
|
45
|
-
}}
|
|
46
|
-
>
|
|
47
|
-
<slot></slot>
|
|
48
|
-
</x-checkbox>
|
|
49
|
-
</div>
|
|
50
|
-
`;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=CategoryRestrictionsPageItemContent.js.map
|