@foxy.io/elements 1.25.0-beta.2 → 1.25.0-beta.3
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 +85 -3
- 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 -0
- 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-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.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +1 -1
- package/dist/cdn/foxy-customer.js +3 -3
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-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 +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +179 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card.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 -14
- 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 +1 -1
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +3 -3
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +7 -7
- package/dist/cdn/foxy-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-0037b9e6.js +1 -0
- package/dist/cdn/{shared-a52c3d8c.js → shared-02f8245a.js} +1 -1
- package/dist/cdn/{shared-8c681381.js → shared-06916671.js} +1 -1
- package/dist/cdn/{shared-35728235.js → shared-07e9d1fb.js} +1 -1
- package/dist/cdn/{shared-1313f293.js → shared-0961f769.js} +1 -1
- package/dist/cdn/{shared-53d66db2.js → shared-0ffe26d8.js} +3 -3
- package/dist/cdn/{shared-4c2e9064.js → shared-1522d76f.js} +1 -1
- package/dist/cdn/{shared-51a5af7e.js → shared-15dfa16d.js} +1 -1
- package/dist/cdn/{shared-800ee6c0.js → shared-250a399a.js} +1 -1
- package/dist/cdn/shared-25edf241.js +1 -0
- package/dist/cdn/{shared-7d933f9d.js → shared-264c82b8.js} +1 -1
- package/dist/cdn/{shared-4b20fc75.js → shared-293771ba.js} +1 -1
- package/dist/cdn/{shared-5d718eaf.js → shared-29e74661.js} +1 -1
- package/dist/cdn/{shared-870074ff.js → shared-2c92c192.js} +1 -1
- package/dist/cdn/{shared-fd96bcd1.js → shared-30cbf0a6.js} +1 -1
- package/dist/cdn/{shared-92de4f37.js → shared-320fadbf.js} +1 -1
- package/dist/cdn/{shared-d123bea6.js → shared-324665fd.js} +1 -1
- package/dist/cdn/{shared-8771fb61.js → shared-3bd99d11.js} +1 -1
- package/dist/cdn/{shared-e8a85228.js → shared-3d251e6f.js} +1 -1
- package/dist/cdn/{shared-71b3559f.js → shared-3d95605f.js} +3 -3
- package/dist/cdn/{shared-f1b36324.js → shared-3f3903d4.js} +1 -1
- package/dist/cdn/{shared-d01f42d0.js → shared-3fee360a.js} +1 -1
- package/dist/cdn/shared-4105aacf.js +1 -0
- package/dist/cdn/shared-43e2c3f6.js +1 -0
- package/dist/cdn/{shared-5742a841.js → shared-452e38da.js} +1 -1
- package/dist/cdn/shared-4761cbda.js +1 -0
- package/dist/cdn/{shared-732bee4b.js → shared-5291bdca.js} +1 -1
- package/dist/cdn/{shared-417ab233.js → shared-54cbd346.js} +1 -1
- package/dist/cdn/{shared-1dbad347.js → shared-5db2fec0.js} +1 -1
- package/dist/cdn/{shared-c00049b2.js → shared-5f1f0d8f.js} +1 -1
- package/dist/cdn/{shared-c320cfef.js → shared-61b1fd60.js} +1 -1
- package/dist/cdn/{shared-e2db3ab5.js → shared-63d11888.js} +1 -1
- package/dist/cdn/{shared-ca428891.js → shared-69c3549d.js} +1 -1
- package/dist/cdn/{shared-9b12aeac.js → shared-6a7f96c4.js} +1 -1
- package/dist/cdn/{shared-fe927c53.js → shared-6d0be1e4.js} +1 -1
- package/dist/cdn/{shared-6e704d83.js → shared-6ffa9f84.js} +1 -1
- package/dist/cdn/{shared-21293163.js → shared-745a575c.js} +1 -1
- package/dist/cdn/{shared-4c3cb511.js → shared-835cf735.js} +1 -1
- package/dist/cdn/{shared-e60dc924.js → shared-85712eed.js} +1 -1
- package/dist/cdn/shared-87142858.js +1 -0
- package/dist/cdn/{shared-9771ef0f.js → shared-87824001.js} +1 -1
- package/dist/cdn/{shared-4d555419.js → shared-87f55237.js} +1 -1
- package/dist/cdn/{shared-7b771301.js → shared-8d99b885.js} +1 -1
- package/dist/cdn/{shared-fc99076a.js → shared-92dd9964.js} +1 -1
- package/dist/cdn/{shared-fed6cd4d.js → shared-979e24ec.js} +1 -1
- package/dist/cdn/{shared-5d795aaf.js → shared-a1be9c27.js} +1 -1
- package/dist/cdn/{shared-f3b8de28.js → shared-a1d39ddd.js} +1 -1
- package/dist/cdn/{shared-b8963ec6.js → shared-a5a03f4f.js} +1 -1
- package/dist/cdn/{shared-1105e4b9.js → shared-a95067d6.js} +1 -1
- package/dist/cdn/{shared-131988fc.js → shared-b113467e.js} +1 -1
- package/dist/cdn/{shared-5cf7b194.js → shared-b23c903e.js} +1 -1
- package/dist/cdn/{shared-96215749.js → shared-b984ab7c.js} +1 -1
- package/dist/cdn/shared-bab2ea2c.js +1 -0
- package/dist/cdn/{shared-783f5705.js → shared-c43cd1fa.js} +1 -1
- package/dist/cdn/{shared-da5e32c1.js → shared-ceec93fa.js} +1 -1
- package/dist/cdn/{shared-112dbca7.js → shared-d1265ca0.js} +1 -1
- package/dist/cdn/{shared-2f082f50.js → shared-d600815d.js} +1 -1
- package/dist/cdn/{shared-4e05dfb4.js → shared-d8ca5c87.js} +1 -1
- package/dist/cdn/{shared-1a65fd20.js → shared-d9f4138b.js} +1 -1
- package/dist/cdn/{shared-3bcc07cd.js → shared-db306674.js} +1 -1
- package/dist/cdn/{shared-18672d26.js → shared-de8bf756.js} +2 -2
- package/dist/cdn/{shared-f241722a.js → shared-e8621807.js} +1 -1
- package/dist/cdn/shared-e9276306.js +1 -0
- package/dist/cdn/{shared-76e71481.js → shared-ea1ab750.js} +1 -1
- package/dist/cdn/{shared-702eae16.js → shared-eacc4539.js} +1 -1
- package/dist/cdn/{shared-e8a51c60.js → shared-eb116b3e.js} +1 -1
- package/dist/cdn/{shared-e3096241.js → shared-ec59505f.js} +1 -1
- package/dist/cdn/{shared-662c576b.js → shared-ecd5eb1b.js} +2 -2
- package/dist/cdn/{shared-093b64b4.js → shared-efbd62cb.js} +4 -4
- package/dist/cdn/{shared-e006e82c.js → shared-f1e743df.js} +1 -1
- package/dist/cdn/shared-f3cd4d07.js +1 -0
- package/dist/cdn/{shared-cb9cdc88.js → shared-f8d1abc9.js} +1 -1
- package/dist/cdn/{shared-fff7db77.js → shared-fad099e6.js} +1 -1
- package/dist/cdn/{shared-b7556b77.js → shared-ff18b2d1.js} +1 -1
- package/dist/cdn/translations/billing-address-card/en.json +9 -0
- package/dist/cdn/translations/cart-form/en.json +211 -293
- package/dist/cdn/translations/customer/en.json +142 -29
- package/dist/cdn/translations/customer-portal/en.json +13 -33
- package/dist/cdn/translations/item-card/en.json +12 -1
- package/dist/cdn/translations/item-form/en.json +199 -292
- package/dist/cdn/translations/native-integration-card/en.json +6 -2
- package/dist/cdn/translations/native-integration-form/en.json +17 -1
- package/dist/cdn/translations/payment-card/en.json +4 -0
- package/dist/cdn/translations/shipment-card/en.json +5 -446
- package/dist/cdn/translations/store-form/en.json +1 -1
- package/dist/cdn/translations/subscription-form/en.json +12 -1
- package/dist/cdn/translations/template-config-form/en.json +2 -2
- package/dist/cdn/translations/transaction/en.json +1103 -857
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.d.ts +2 -0
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +23 -6
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/public/AttributeCard/AttributeCard.js +1 -1
- package/dist/elements/public/AttributeCard/AttributeCard.js.map +1 -1
- package/dist/elements/public/BillingAddressCard/BillingAddressCard.d.ts +15 -0
- package/dist/elements/public/BillingAddressCard/BillingAddressCard.js +28 -0
- package/dist/elements/public/BillingAddressCard/BillingAddressCard.js.map +1 -0
- package/dist/elements/public/BillingAddressCard/index.d.ts +4 -0
- package/dist/elements/public/BillingAddressCard/index.js +6 -0
- package/dist/elements/public/BillingAddressCard/index.js.map +1 -0
- package/dist/elements/public/BillingAddressCard/types.d.ts +3 -0
- package/dist/elements/public/BillingAddressCard/types.js +2 -0
- package/dist/elements/public/BillingAddressCard/types.js.map +1 -0
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js +1 -1
- package/dist/elements/public/CustomFieldCard/TwoLineCard.js.map +1 -1
- package/dist/elements/public/I18n/I18n.d.ts +1 -0
- package/dist/elements/public/I18n/I18n.js +1 -0
- package/dist/elements/public/I18n/I18n.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.d.ts +2 -0
- package/dist/elements/public/ItemCard/ItemCard.js +68 -62
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemForm/ItemForm.d.ts +64 -12
- package/dist/elements/public/ItemForm/ItemForm.js +146 -28
- package/dist/elements/public/ItemForm/ItemForm.js.map +1 -1
- package/dist/elements/public/ItemForm/index.d.ts +7 -7
- package/dist/elements/public/ItemForm/index.js +7 -7
- package/dist/elements/public/ItemForm/index.js.map +1 -1
- package/dist/elements/public/ItemForm/types.d.ts +62 -2
- package/dist/elements/public/ItemForm/types.js.map +1 -1
- package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js +12 -10
- package/dist/elements/public/NativeIntegrationCard/NativeIntegrationCard.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.d.ts +2 -0
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js +41 -8
- package/dist/elements/public/NativeIntegrationForm/NativeIntegrationForm.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/defaults.d.ts +7 -1
- package/dist/elements/public/NativeIntegrationForm/defaults.js +7 -1
- package/dist/elements/public/NativeIntegrationForm/defaults.js.map +1 -1
- package/dist/elements/public/NativeIntegrationForm/types.d.ts +6 -2
- package/dist/elements/public/NativeIntegrationForm/types.js.map +1 -1
- package/dist/elements/public/Pagination/Pagination.js +65 -60
- package/dist/elements/public/Pagination/Pagination.js.map +1 -1
- package/dist/elements/public/PaymentCard/PaymentCard.d.ts +24 -36
- package/dist/elements/public/PaymentCard/PaymentCard.js +139 -158
- package/dist/elements/public/PaymentCard/PaymentCard.js.map +1 -1
- package/dist/elements/public/PaymentCard/index.d.ts +2 -2
- package/dist/elements/public/PaymentCard/index.js +2 -2
- package/dist/elements/public/PaymentCard/index.js.map +1 -1
- package/dist/elements/public/PaymentCard/types.d.ts +2 -16
- package/dist/elements/public/PaymentCard/types.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.d.ts +9 -13
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +90 -91
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/ShipmentCard/index.d.ts +2 -6
- package/dist/elements/public/ShipmentCard/index.js +2 -6
- package/dist/elements/public/ShipmentCard/index.js.map +1 -1
- package/dist/elements/public/ShipmentCard/types.d.ts +7 -2
- package/dist/elements/public/ShipmentCard/types.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js +1 -1
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +11 -3
- package/dist/elements/public/Transaction/Transaction.js +238 -78
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/index.d.ts +4 -3
- package/dist/elements/public/Transaction/index.js +4 -3
- package/dist/elements/public/Transaction/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.d.ts +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js +17 -4
- package/dist/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.d.ts +7 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js +81 -24
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/InternalTransactionCustomerControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.d.ts +3 -3
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js +3 -3
- package/dist/elements/public/Transaction/internal/InternalTransactionCustomerControl/index.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionPostActionControl/InternalTransactionPostActionControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.d.ts +5 -3
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js +110 -61
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/InternalTransactionSummaryControl.js.map +1 -1
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.d.ts +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js +1 -0
- package/dist/elements/public/Transaction/internal/InternalTransactionSummaryControl/index.js.map +1 -1
- package/dist/elements/public/Transaction/types.d.ts +14 -1
- package/dist/elements/public/Transaction/types.js.map +1 -1
- package/dist/elements/public/index.d.ts +1 -0
- package/dist/elements/public/index.defined.d.ts +1 -0
- package/dist/elements/public/index.defined.js +1 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +1 -0
- package/dist/elements/public/index.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-074a74c3.js +0 -82
- package/dist/cdn/shared-26dea180.js +0 -1
- package/dist/cdn/shared-468de081.js +0 -1
- package/dist/cdn/shared-5e932eb5.js +0 -1
- package/dist/cdn/shared-8a9c64b2.js +0 -1
- package/dist/cdn/shared-e312da08.js +0 -1
- package/dist/cdn/shared-e79b5765.js +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js +0 -17
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/InternalItemFormCartControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js +0 -8
- package/dist/elements/public/ItemForm/internal/InternalItemFormCartControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js +0 -25
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/InternalItemFormInventoryControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js +0 -7
- package/dist/elements/public/ItemForm/internal/InternalItemFormInventoryControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js +0 -52
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/InternalItemFormLineItemDiscountControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.d.ts +0 -6
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js +0 -8
- package/dist/elements/public/ItemForm/internal/InternalItemFormLineItemDiscountControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js +0 -26
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/InternalItemFormShippingControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js +0 -7
- package/dist/elements/public/ItemForm/internal/InternalItemFormShippingControl/index.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.d.ts +0 -5
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js +0 -72
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/InternalItemFormSubscriptionControl.js.map +0 -1
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.d.ts +0 -8
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js +0 -10
- package/dist/elements/public/ItemForm/internal/InternalItemFormSubscriptionControl/index.js.map +0 -1
|
@@ -1,106 +1,266 @@
|
|
|
1
1
|
import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
2
|
-
import { css, html } from 'lit-element';
|
|
3
|
-
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
4
|
-
import { InternalForm } from "../../internal/InternalForm/InternalForm.js";
|
|
5
2
|
import { BooleanSelector } from '@foxy.io/sdk/core';
|
|
3
|
+
import { ResponsiveMixin } from "../../../mixins/responsive.js";
|
|
4
|
+
import { InternalForm } from "../../internal/InternalForm/InternalForm.js";
|
|
5
|
+
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
6
|
+
import { html } from 'lit-element';
|
|
7
|
+
import uainfer from 'uainfer/src/uainfer.js';
|
|
6
8
|
/**
|
|
7
9
|
* Transaction summary page (`fx:transaction`).
|
|
8
10
|
*
|
|
9
11
|
* @element foxy-transaction
|
|
10
12
|
* @since 1.17.0
|
|
11
13
|
*/
|
|
12
|
-
export class Transaction extends TranslatableMixin(InternalForm, 'transaction') {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
export class Transaction extends ResponsiveMixin(TranslatableMixin(InternalForm, 'transaction')) {
|
|
15
|
+
constructor() {
|
|
16
|
+
super(...arguments);
|
|
17
|
+
/** URL of the `fx:hosted_payment_gateways` property helper resource. */
|
|
18
|
+
this.hostedPaymentGatewaysHelper = null;
|
|
19
|
+
/** URL of the `fx:payment_gateways` property helper resource. */
|
|
20
|
+
this.paymentGatewaysHelper = null;
|
|
21
|
+
this.getSubscriptionPageHref = null;
|
|
22
|
+
this.getCustomerPageHref = null;
|
|
23
|
+
this.__renderHeader = () => {
|
|
24
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
25
|
+
const source = (_a = this.data) === null || _a === void 0 ? void 0 : _a.source;
|
|
26
|
+
const type = (_b = this.data) === null || _b === void 0 ? void 0 : _b.type;
|
|
27
|
+
let subtitleKey = 'subtitle';
|
|
28
|
+
if (type === 'updateinfo') {
|
|
29
|
+
if (source === '' || (source === null || source === void 0 ? void 0 : source.startsWith('cit_'))) {
|
|
30
|
+
subtitleKey = 'subtitle_customer_changed_payment_method';
|
|
31
|
+
}
|
|
32
|
+
else if (source === 'mit_uoe') {
|
|
33
|
+
subtitleKey = 'subtitle_admin_changed_payment_method_with_uoe';
|
|
34
|
+
}
|
|
35
|
+
else if (source === 'mit_api') {
|
|
36
|
+
subtitleKey = 'subtitle_integration_changed_payment_method';
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
subtitleKey = 'subtitle_admin_changed_payment_method';
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (type === 'subscription_modification') {
|
|
43
|
+
if (source === '' || (source === null || source === void 0 ? void 0 : source.startsWith('cit_'))) {
|
|
44
|
+
subtitleKey = 'subtitle_customer_changed_subscription';
|
|
45
|
+
}
|
|
46
|
+
else if (source === 'mit_uoe') {
|
|
47
|
+
subtitleKey = 'subtitle_admin_changed_subscription_with_uoe';
|
|
48
|
+
}
|
|
49
|
+
else if (source === 'mit_api') {
|
|
50
|
+
subtitleKey = 'subtitle_integration_changed_subscription';
|
|
51
|
+
}
|
|
52
|
+
else {
|
|
53
|
+
subtitleKey = 'subtitle_admin_changed_subscription';
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
else if (type === 'subscription_renewal') {
|
|
57
|
+
if (source === 'mit_recurring') {
|
|
58
|
+
subtitleKey = 'subtitle_subscription_renewal_attempt';
|
|
59
|
+
}
|
|
60
|
+
else if (source === 'mit_recurring_reattempt_automated') {
|
|
61
|
+
subtitleKey = 'subtitle_subscription_renewal_automated_reattempt';
|
|
62
|
+
}
|
|
63
|
+
else if (source === 'mit_recurring_reattempt_manual') {
|
|
64
|
+
subtitleKey = 'subtitle_subscription_renewal_manual_reattempt';
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
else if (type === 'subscription_cancellation') {
|
|
68
|
+
if (source === 'cit_recurring_cancellation') {
|
|
69
|
+
subtitleKey = 'subtitle_customer_canceled_subscription';
|
|
70
|
+
}
|
|
71
|
+
else if (source === 'mit_recurring_cancellation') {
|
|
72
|
+
subtitleKey = 'subtitle_admin_canceled_subscription';
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
if ((_c = this.data) === null || _c === void 0 ? void 0 : _c._links['fx:subscription']) {
|
|
77
|
+
if (source === null || source === void 0 ? void 0 : source.startsWith('cit_')) {
|
|
78
|
+
subtitleKey = 'subtitle_customer_subscribed';
|
|
79
|
+
}
|
|
80
|
+
else if (source === 'mit_uoe') {
|
|
81
|
+
subtitleKey = 'subtitle_admin_subscribed_with_uoe';
|
|
82
|
+
}
|
|
83
|
+
else if (source === 'mit_api') {
|
|
84
|
+
subtitleKey = 'subtitle_integration_subscribed';
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
else {
|
|
88
|
+
if (source === null || source === void 0 ? void 0 : source.startsWith('cit_')) {
|
|
89
|
+
subtitleKey = 'subtitle_customer_placed_order';
|
|
90
|
+
}
|
|
91
|
+
else if (source === 'mit_uoe') {
|
|
92
|
+
subtitleKey = 'subtitle_admin_placed_order_with_uoe';
|
|
93
|
+
}
|
|
94
|
+
else if (source === 'mit_api') {
|
|
95
|
+
subtitleKey = 'subtitle_integration_placed_order';
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
return html `
|
|
100
|
+
<h1>
|
|
101
|
+
<div class="flex items-center gap-s leading-xs text-xxl font-medium break-all">
|
|
102
|
+
<foxy-i18n infer="header" key="title" .options=${this.data}></foxy-i18n>
|
|
103
|
+
<foxy-copy-to-clipboard
|
|
104
|
+
infer="header"
|
|
105
|
+
class="inline-block text-m"
|
|
106
|
+
text=${(_d = this.data) === null || _d === void 0 ? void 0 : _d.display_id}
|
|
107
|
+
>
|
|
108
|
+
</foxy-copy-to-clipboard>
|
|
109
|
+
</div>
|
|
20
110
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
111
|
+
<foxy-i18n
|
|
112
|
+
class="block leading-xs text-l text-secondary"
|
|
113
|
+
infer="header"
|
|
114
|
+
key=${subtitleKey}
|
|
115
|
+
.options=${{
|
|
116
|
+
transaction_date: (_e = this.data) === null || _e === void 0 ? void 0 : _e.transaction_date,
|
|
117
|
+
user_agent: uainfer.analyze((_g = (_f = this.data) === null || _f === void 0 ? void 0 : _f.user_agent) !== null && _g !== void 0 ? _g : '').toString(),
|
|
118
|
+
ip_country: (_h = this.data) === null || _h === void 0 ? void 0 : _h.ip_country,
|
|
119
|
+
}}
|
|
120
|
+
>
|
|
121
|
+
</foxy-i18n>
|
|
122
|
+
|
|
123
|
+
<foxy-internal-transaction-actions-control class="mt-xs" infer="actions">
|
|
124
|
+
</foxy-internal-transaction-actions-control>
|
|
125
|
+
</h1>
|
|
126
|
+
|
|
127
|
+
${['problem', 'pending_fraud_review', 'rejected', 'declined'].includes((_k = (_j = this.data) === null || _j === void 0 ? void 0 : _j.status) !== null && _k !== void 0 ? _k : '')
|
|
128
|
+
? html `
|
|
129
|
+
<p
|
|
130
|
+
class="leading-xs text-body rounded bg-error-10 block"
|
|
131
|
+
style="padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)"
|
|
132
|
+
>
|
|
133
|
+
<foxy-i18n infer="header" key="alert_status_${(_l = this.data) === null || _l === void 0 ? void 0 : _l.status}"></foxy-i18n>
|
|
134
|
+
</p>
|
|
135
|
+
`
|
|
136
|
+
: ''}
|
|
137
|
+
`;
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
static get properties() {
|
|
141
|
+
return {
|
|
142
|
+
...super.properties,
|
|
143
|
+
hostedPaymentGatewaysHelper: { attribute: 'hosted-payment-gateways-helper' },
|
|
144
|
+
paymentGatewaysHelper: { attribute: 'payment-gateways-helper' },
|
|
145
|
+
getSubscriptionPageHref: { attribute: false },
|
|
146
|
+
getCustomerPageHref: { attribute: false },
|
|
147
|
+
};
|
|
27
148
|
}
|
|
28
149
|
get readonlySelector() {
|
|
29
150
|
var _a, _b, _c;
|
|
30
151
|
const isEditable = Boolean((_b = (_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:void']) !== null && _b !== void 0 ? _b : (_c = this.data) === null || _c === void 0 ? void 0 : _c._links['fx:refund']);
|
|
31
152
|
return isEditable
|
|
32
|
-
? super.readonlySelector
|
|
33
|
-
: new BooleanSelector(`${super.readonlySelector} attributes custom-fields`);
|
|
153
|
+
? new BooleanSelector(`${super.readonlySelector} billing-addresses`)
|
|
154
|
+
: new BooleanSelector(`${super.readonlySelector} billing-addresses items attributes custom-fields`);
|
|
155
|
+
}
|
|
156
|
+
get hiddenSelector() {
|
|
157
|
+
var _a, _b;
|
|
158
|
+
const hidden = ['billing-addresses:dialog:delete billing-addresses:dialog:timestamps'];
|
|
159
|
+
const type = (_a = this.data) === null || _a === void 0 ? void 0 : _a.type;
|
|
160
|
+
if (!((_b = this.data) === null || _b === void 0 ? void 0 : _b._links['fx:subscription']))
|
|
161
|
+
hidden.push('subscription');
|
|
162
|
+
if (type === 'subscription_modification')
|
|
163
|
+
hidden.push('actions');
|
|
164
|
+
if (type === 'updateinfo') {
|
|
165
|
+
hidden.push('not=customer,subscription,payments,custom-fields,attributes');
|
|
166
|
+
}
|
|
167
|
+
if (type === 'subscription_cancellation') {
|
|
168
|
+
hidden.push('not=customer,subscription,custom-fields,attributes');
|
|
169
|
+
}
|
|
170
|
+
return new BooleanSelector(`${super.hiddenSelector} ${hidden.join(' ')}`.trim());
|
|
34
171
|
}
|
|
35
172
|
renderBody() {
|
|
36
|
-
var _a, _b, _c, _d
|
|
173
|
+
var _a, _b, _c, _d;
|
|
174
|
+
let shipmentsLink = undefined;
|
|
175
|
+
let itemsLink = undefined;
|
|
176
|
+
if (this.data) {
|
|
177
|
+
try {
|
|
178
|
+
const shipmentsUrl = new URL(this.data._links['fx:shipments'].href);
|
|
179
|
+
const itemsUrl = new URL(this.data._links['fx:items'].href);
|
|
180
|
+
shipmentsUrl.searchParams.set('zoom', 'items:item_category');
|
|
181
|
+
itemsUrl.searchParams.set('zoom', 'item_options');
|
|
182
|
+
shipmentsLink = shipmentsUrl.toString();
|
|
183
|
+
itemsLink = itemsUrl.toString();
|
|
184
|
+
}
|
|
185
|
+
catch (_e) {
|
|
186
|
+
//
|
|
187
|
+
}
|
|
188
|
+
}
|
|
37
189
|
return html `
|
|
38
|
-
|
|
39
|
-
<foxy-internal-async-details-control
|
|
40
|
-
infer="shipments"
|
|
41
|
-
first=${ifDefined((_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:shipments'].href)}
|
|
42
|
-
item="foxy-shipment-card"
|
|
43
|
-
open
|
|
44
|
-
>
|
|
45
|
-
</foxy-internal-async-details-control>
|
|
190
|
+
${this.__renderHeader()}
|
|
46
191
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
</foxy-internal-transaction-summary-control>
|
|
192
|
+
<foxy-internal-transaction-customer-control infer="customer">
|
|
193
|
+
</foxy-internal-transaction-customer-control>
|
|
50
194
|
|
|
51
|
-
|
|
52
|
-
|
|
195
|
+
<div class="grid gap-s">
|
|
196
|
+
<foxy-internal-async-list-control
|
|
197
|
+
infer="items"
|
|
198
|
+
class="min-w-0"
|
|
199
|
+
first=${ifDefined(itemsLink)}
|
|
200
|
+
limit="10"
|
|
201
|
+
item="foxy-item-card"
|
|
202
|
+
form="foxy-item-form"
|
|
203
|
+
alert
|
|
204
|
+
.related=${[this.href]}
|
|
205
|
+
>
|
|
206
|
+
</foxy-internal-async-list-control>
|
|
53
207
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
first=${ifDefined((_b = this.data) === null || _b === void 0 ? void 0 : _b._links['fx:payments'].href)}
|
|
58
|
-
limit="1"
|
|
59
|
-
item="foxy-payment-card"
|
|
60
|
-
open
|
|
61
|
-
>
|
|
62
|
-
</foxy-internal-async-details-control>
|
|
208
|
+
<foxy-internal-transaction-summary-control infer="summary" class="min-w-0">
|
|
209
|
+
</foxy-internal-transaction-summary-control>
|
|
210
|
+
</div>
|
|
63
211
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
212
|
+
<foxy-internal-async-list-control
|
|
213
|
+
infer="billing-addresses"
|
|
214
|
+
first=${ifDefined((_a = this.data) === null || _a === void 0 ? void 0 : _a._links['fx:billing_addresses'].href)}
|
|
215
|
+
item="foxy-billing-address-card"
|
|
216
|
+
form="foxy-address-form"
|
|
217
|
+
hide-create-button
|
|
218
|
+
hide-delete-button
|
|
219
|
+
alert
|
|
220
|
+
>
|
|
221
|
+
</foxy-internal-async-list-control>
|
|
71
222
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
223
|
+
<foxy-internal-async-list-control
|
|
224
|
+
infer="payments"
|
|
225
|
+
first=${ifDefined((_b = this.data) === null || _b === void 0 ? void 0 : _b._links['fx:payments'].href)}
|
|
226
|
+
item="foxy-payment-card"
|
|
227
|
+
.itemProps=${{
|
|
228
|
+
'hosted-payment-gateways-helper': this.hostedPaymentGatewaysHelper,
|
|
229
|
+
'payment-gateways-helper': this.paymentGatewaysHelper,
|
|
230
|
+
}}
|
|
231
|
+
>
|
|
232
|
+
</foxy-internal-async-list-control>
|
|
79
233
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
infer="attributes"
|
|
92
|
-
first=${ifDefined((_f = this.data) === null || _f === void 0 ? void 0 : _f._links['fx:attributes'].href)}
|
|
93
|
-
limit="5"
|
|
94
|
-
form="foxy-attribute-form"
|
|
95
|
-
item="foxy-attribute-card"
|
|
96
|
-
.related=${[this.href]}
|
|
97
|
-
>
|
|
98
|
-
</foxy-internal-async-details-control>
|
|
234
|
+
<div class="grid gap-m sm-grid-cols-2">
|
|
235
|
+
<foxy-internal-async-list-control
|
|
236
|
+
infer="custom-fields"
|
|
237
|
+
class="min-w-0"
|
|
238
|
+
first=${ifDefined((_c = this.data) === null || _c === void 0 ? void 0 : _c._links['fx:custom_fields'].href)}
|
|
239
|
+
limit="5"
|
|
240
|
+
form="foxy-custom-field-form"
|
|
241
|
+
item="foxy-custom-field-card"
|
|
242
|
+
alert
|
|
243
|
+
>
|
|
244
|
+
</foxy-internal-async-list-control>
|
|
99
245
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
246
|
+
<foxy-internal-async-list-control
|
|
247
|
+
infer="attributes"
|
|
248
|
+
class="min-w-0"
|
|
249
|
+
first=${ifDefined((_d = this.data) === null || _d === void 0 ? void 0 : _d._links['fx:attributes'].href)}
|
|
250
|
+
limit="5"
|
|
251
|
+
form="foxy-attribute-form"
|
|
252
|
+
item="foxy-attribute-card"
|
|
253
|
+
alert
|
|
254
|
+
>
|
|
255
|
+
</foxy-internal-async-list-control>
|
|
103
256
|
</div>
|
|
257
|
+
|
|
258
|
+
<foxy-internal-async-list-control
|
|
259
|
+
infer="shipments"
|
|
260
|
+
first=${ifDefined(shipmentsLink)}
|
|
261
|
+
item="foxy-shipment-card"
|
|
262
|
+
>
|
|
263
|
+
</foxy-internal-async-list-control>
|
|
104
264
|
`;
|
|
105
265
|
}
|
|
106
266
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../src/elements/public/Transaction/Transaction.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO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C,IAAI,CAAC,IAAI,CAAC;;;;;;;;KAQ7B,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { CSSResultArray, TemplateResult } from 'lit-element';\nimport type { Data } from './types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { css, html } from 'lit-element';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\n\n/**\n * Transaction summary page (`fx:transaction`).\n *\n * @element foxy-transaction\n * @since 1.17.0\n */\nexport class Transaction extends TranslatableMixin(InternalForm, 'transaction')<Data> {\n static get styles(): CSSResultArray {\n return [\n ...super.styles,\n css`\n #body {\n display: grid;\n grid-template-columns: repeat(auto-fill, minmax(calc(18.75 * var(--lumo-space-m)), 1fr));\n }\n\n #body > :first-child {\n grid-column-start: 1;\n grid-column-end: -2;\n }\n `,\n ];\n }\n\n get readonlySelector(): BooleanSelector {\n const isEditable = Boolean(this.data?._links['fx:void'] ?? this.data?._links['fx:refund']);\n return isEditable\n ? super.readonlySelector\n : new BooleanSelector(`${super.readonlySelector} attributes custom-fields`);\n }\n\n renderBody(): TemplateResult {\n return html`\n <div id=\"body\" class=\"gap-m\">\n <foxy-internal-async-details-control\n infer=\"shipments\"\n first=${ifDefined(this.data?._links['fx:shipments'].href)}\n item=\"foxy-shipment-card\"\n open\n >\n </foxy-internal-async-details-control>\n\n <div class=\"grid gap-m self-start\">\n <foxy-internal-transaction-summary-control infer=\"summary\">\n </foxy-internal-transaction-summary-control>\n\n <foxy-internal-transaction-customer-control infer=\"customer\">\n </foxy-internal-transaction-customer-control>\n\n <foxy-internal-async-details-control\n infer=\"payments\"\n class=\"max-w-full overflow-hidden\"\n first=${ifDefined(this.data?._links['fx:payments'].href)}\n limit=\"1\"\n item=\"foxy-payment-card\"\n open\n >\n </foxy-internal-async-details-control>\n\n <foxy-internal-async-details-control\n infer=\"discounts\"\n first=${ifDefined(this.data?._links['fx:discounts'].href)}\n limit=\"5\"\n item=\"foxy-discount-card\"\n >\n </foxy-internal-async-details-control>\n\n <foxy-internal-async-details-control\n infer=\"applied-taxes\"\n first=${ifDefined(this.data?._links['fx:applied_taxes'].href)}\n limit=\"5\"\n item=\"foxy-applied-tax-card\"\n >\n </foxy-internal-async-details-control>\n\n <foxy-internal-async-details-control\n infer=\"custom-fields\"\n first=${ifDefined(this.data?._links['fx:custom_fields'].href)}\n limit=\"5\"\n form=\"foxy-custom-field-form\"\n item=\"foxy-custom-field-card\"\n .related=${[this.href]}\n >\n </foxy-internal-async-details-control>\n\n <foxy-internal-async-details-control\n infer=\"attributes\"\n first=${ifDefined(this.data?._links['fx:attributes'].href)}\n limit=\"5\"\n form=\"foxy-attribute-form\"\n item=\"foxy-attribute-card\"\n .related=${[this.href]}\n >\n </foxy-internal-async-details-control>\n\n <foxy-internal-transaction-actions-control infer=\"actions\">\n </foxy-internal-transaction-actions-control>\n </div>\n </div>\n `;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"Transaction.js","sourceRoot":"","sources":["../../../../src/elements/public/Transaction/Transaction.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,sCAAmC;AAC7D,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,OAAO,OAAO,MAAM,wBAAwB,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,OAAO,WAAY,SAAQ,eAAe,CAC9C,iBAAiB,CAAC,YAAY,EAAE,aAAa,CAAC,CACzC;IAFP;;QAaE,wEAAwE;QACxE,gCAA2B,GAAkB,IAAI,CAAC;QAElD,iEAAiE;QACjE,0BAAqB,GAAkB,IAAI,CAAC;QAE5C,4BAAuB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I,CAAC,IAAI,CAAC;;;;;;;;;;gBAUhB,SAAS,OAAC,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,sBAAsB,EAAE,IAAI,CAAC;;;;;;;;;;;gBAWzD,SAAS,OAAC,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,aAAa,EAAE,IAAI,CAAC;;qBAE3C;YACX,gCAAgC,EAAE,IAAI,CAAC,2BAA2B;YAClE,yBAAyB,EAAE,IAAI,CAAC,qBAAqB;SACtD;;;;;;;;kBAQS,SAAS,OAAC,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC;;;;;;;;;;;kBAWrD,SAAS,OAAC,IAAI,CAAC,IAAI,0CAAE,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC;;;;;;;;;;;gBAWpD,SAAS,CAAC,aAAa,CAAC;;;;KAInC,CAAC;IACJ,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { Data } from './types';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { BooleanSelector } from '@foxy.io/sdk/core';\nimport { ResponsiveMixin } from '../../../mixins/responsive';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html } from 'lit-element';\n\nimport uainfer from 'uainfer/src/uainfer.js';\n\n/**\n * Transaction summary page (`fx:transaction`).\n *\n * @element foxy-transaction\n * @since 1.17.0\n */\nexport class Transaction extends ResponsiveMixin(\n TranslatableMixin(InternalForm, 'transaction')\n)<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n hostedPaymentGatewaysHelper: { attribute: 'hosted-payment-gateways-helper' },\n paymentGatewaysHelper: { attribute: 'payment-gateways-helper' },\n getSubscriptionPageHref: { attribute: false },\n getCustomerPageHref: { attribute: false },\n };\n }\n\n /** URL of the `fx:hosted_payment_gateways` property helper resource. */\n hostedPaymentGatewaysHelper: string | null = null;\n\n /** URL of the `fx:payment_gateways` property helper resource. */\n paymentGatewaysHelper: string | null = null;\n\n getSubscriptionPageHref: ((href: string) => string) | null = null;\n\n getCustomerPageHref: ((href: string) => string) | null = null;\n\n private readonly __renderHeader = () => {\n const source = this.data?.source;\n const type = this.data?.type;\n\n let subtitleKey = 'subtitle';\n\n if (type === 'updateinfo') {\n if (source === '' || source?.startsWith('cit_')) {\n subtitleKey = 'subtitle_customer_changed_payment_method';\n } else if (source === 'mit_uoe') {\n subtitleKey = 'subtitle_admin_changed_payment_method_with_uoe';\n } else if (source === 'mit_api') {\n subtitleKey = 'subtitle_integration_changed_payment_method';\n } else {\n subtitleKey = 'subtitle_admin_changed_payment_method';\n }\n } else if (type === 'subscription_modification') {\n if (source === '' || source?.startsWith('cit_')) {\n subtitleKey = 'subtitle_customer_changed_subscription';\n } else if (source === 'mit_uoe') {\n subtitleKey = 'subtitle_admin_changed_subscription_with_uoe';\n } else if (source === 'mit_api') {\n subtitleKey = 'subtitle_integration_changed_subscription';\n } else {\n subtitleKey = 'subtitle_admin_changed_subscription';\n }\n } else if (type === 'subscription_renewal') {\n if (source === 'mit_recurring') {\n subtitleKey = 'subtitle_subscription_renewal_attempt';\n } else if (source === 'mit_recurring_reattempt_automated') {\n subtitleKey = 'subtitle_subscription_renewal_automated_reattempt';\n } else if (source === 'mit_recurring_reattempt_manual') {\n subtitleKey = 'subtitle_subscription_renewal_manual_reattempt';\n }\n } else if (type === 'subscription_cancellation') {\n if (source === 'cit_recurring_cancellation') {\n subtitleKey = 'subtitle_customer_canceled_subscription';\n } else if (source === 'mit_recurring_cancellation') {\n subtitleKey = 'subtitle_admin_canceled_subscription';\n }\n } else {\n if (this.data?._links['fx:subscription']) {\n if (source?.startsWith('cit_')) {\n subtitleKey = 'subtitle_customer_subscribed';\n } else if (source === 'mit_uoe') {\n subtitleKey = 'subtitle_admin_subscribed_with_uoe';\n } else if (source === 'mit_api') {\n subtitleKey = 'subtitle_integration_subscribed';\n }\n } else {\n if (source?.startsWith('cit_')) {\n subtitleKey = 'subtitle_customer_placed_order';\n } else if (source === 'mit_uoe') {\n subtitleKey = 'subtitle_admin_placed_order_with_uoe';\n } else if (source === 'mit_api') {\n subtitleKey = 'subtitle_integration_placed_order';\n }\n }\n }\n\n return html`\n <h1>\n <div class=\"flex items-center gap-s leading-xs text-xxl font-medium break-all\">\n <foxy-i18n infer=\"header\" key=\"title\" .options=${this.data}></foxy-i18n>\n <foxy-copy-to-clipboard\n infer=\"header\"\n class=\"inline-block text-m\"\n text=${this.data?.display_id}\n >\n </foxy-copy-to-clipboard>\n </div>\n\n <foxy-i18n\n class=\"block leading-xs text-l text-secondary\"\n infer=\"header\"\n key=${subtitleKey}\n .options=${{\n transaction_date: this.data?.transaction_date,\n user_agent: uainfer.analyze(this.data?.user_agent ?? '').toString(),\n ip_country: this.data?.ip_country,\n }}\n >\n </foxy-i18n>\n\n <foxy-internal-transaction-actions-control class=\"mt-xs\" infer=\"actions\">\n </foxy-internal-transaction-actions-control>\n </h1>\n\n ${['problem', 'pending_fraud_review', 'rejected', 'declined'].includes(\n this.data?.status ?? ''\n )\n ? html`\n <p\n class=\"leading-xs text-body rounded bg-error-10 block\"\n style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n >\n <foxy-i18n infer=\"header\" key=\"alert_status_${this.data?.status}\"></foxy-i18n>\n </p>\n `\n : ''}\n `;\n };\n\n get readonlySelector(): BooleanSelector {\n const isEditable = Boolean(this.data?._links['fx:void'] ?? this.data?._links['fx:refund']);\n return isEditable\n ? new BooleanSelector(`${super.readonlySelector} billing-addresses`)\n : new BooleanSelector(\n `${super.readonlySelector} billing-addresses items attributes custom-fields`\n );\n }\n\n get hiddenSelector(): BooleanSelector {\n const hidden = ['billing-addresses:dialog:delete billing-addresses:dialog:timestamps'];\n const type = this.data?.type;\n\n if (!this.data?._links['fx:subscription']) hidden.push('subscription');\n if (type === 'subscription_modification') hidden.push('actions');\n\n if (type === 'updateinfo') {\n hidden.push('not=customer,subscription,payments,custom-fields,attributes');\n }\n\n if (type === 'subscription_cancellation') {\n hidden.push('not=customer,subscription,custom-fields,attributes');\n }\n\n return new BooleanSelector(`${super.hiddenSelector} ${hidden.join(' ')}`.trim());\n }\n\n renderBody(): TemplateResult {\n let shipmentsLink: string | undefined = undefined;\n let itemsLink: string | undefined = undefined;\n\n if (this.data) {\n try {\n const shipmentsUrl = new URL(this.data._links['fx:shipments'].href);\n const itemsUrl = new URL(this.data._links['fx:items'].href);\n shipmentsUrl.searchParams.set('zoom', 'items:item_category');\n itemsUrl.searchParams.set('zoom', 'item_options');\n shipmentsLink = shipmentsUrl.toString();\n itemsLink = itemsUrl.toString();\n } catch {\n //\n }\n }\n\n return html`\n ${this.__renderHeader()}\n\n <foxy-internal-transaction-customer-control infer=\"customer\">\n </foxy-internal-transaction-customer-control>\n\n <div class=\"grid gap-s\">\n <foxy-internal-async-list-control\n infer=\"items\"\n class=\"min-w-0\"\n first=${ifDefined(itemsLink)}\n limit=\"10\"\n item=\"foxy-item-card\"\n form=\"foxy-item-form\"\n alert\n .related=${[this.href]}\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-transaction-summary-control infer=\"summary\" class=\"min-w-0\">\n </foxy-internal-transaction-summary-control>\n </div>\n\n <foxy-internal-async-list-control\n infer=\"billing-addresses\"\n first=${ifDefined(this.data?._links['fx:billing_addresses'].href)}\n item=\"foxy-billing-address-card\"\n form=\"foxy-address-form\"\n hide-create-button\n hide-delete-button\n alert\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n infer=\"payments\"\n first=${ifDefined(this.data?._links['fx:payments'].href)}\n item=\"foxy-payment-card\"\n .itemProps=${{\n 'hosted-payment-gateways-helper': this.hostedPaymentGatewaysHelper,\n 'payment-gateways-helper': this.paymentGatewaysHelper,\n }}\n >\n </foxy-internal-async-list-control>\n\n <div class=\"grid gap-m sm-grid-cols-2\">\n <foxy-internal-async-list-control\n infer=\"custom-fields\"\n class=\"min-w-0\"\n first=${ifDefined(this.data?._links['fx:custom_fields'].href)}\n limit=\"5\"\n form=\"foxy-custom-field-form\"\n item=\"foxy-custom-field-card\"\n alert\n >\n </foxy-internal-async-list-control>\n\n <foxy-internal-async-list-control\n infer=\"attributes\"\n class=\"min-w-0\"\n first=${ifDefined(this.data?._links['fx:attributes'].href)}\n limit=\"5\"\n form=\"foxy-attribute-form\"\n item=\"foxy-attribute-card\"\n alert\n >\n </foxy-internal-async-list-control>\n </div>\n\n <foxy-internal-async-list-control\n infer=\"shipments\"\n first=${ifDefined(shipmentsLink)}\n item=\"foxy-shipment-card\"\n >\n </foxy-internal-async-list-control>\n `;\n }\n}\n"]}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import '../BillingAddressCard/index';
|
|
1
2
|
import '../AttributeCard/index';
|
|
2
3
|
import '../AttributeForm/index';
|
|
3
4
|
import '../CustomFieldForm/index';
|
|
4
5
|
import '../CustomFieldCard/index';
|
|
5
|
-
import '../
|
|
6
|
-
import '../DiscountCard/index';
|
|
6
|
+
import '../CopyToClipboard/index';
|
|
7
7
|
import '../ShipmentCard/index';
|
|
8
8
|
import '../PaymentCard/index';
|
|
9
|
+
import '../ItemCard/index';
|
|
9
10
|
import '../ItemForm/index';
|
|
10
11
|
import '../I18n/index';
|
|
11
|
-
import '../../internal/
|
|
12
|
+
import '../../internal/InternalAsyncListControl/index';
|
|
12
13
|
import '../../internal/InternalForm/index';
|
|
13
14
|
import './internal/InternalTransactionCustomerControl/index';
|
|
14
15
|
import './internal/InternalTransactionActionsControl/index';
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
+
import "../BillingAddressCard/index.js";
|
|
1
2
|
import "../AttributeCard/index.js";
|
|
2
3
|
import "../AttributeForm/index.js";
|
|
3
4
|
import "../CustomFieldForm/index.js";
|
|
4
5
|
import "../CustomFieldCard/index.js";
|
|
5
|
-
import "../
|
|
6
|
-
import "../DiscountCard/index.js";
|
|
6
|
+
import "../CopyToClipboard/index.js";
|
|
7
7
|
import "../ShipmentCard/index.js";
|
|
8
8
|
import "../PaymentCard/index.js";
|
|
9
|
+
import "../ItemCard/index.js";
|
|
9
10
|
import "../ItemForm/index.js";
|
|
10
11
|
import "../I18n/index.js";
|
|
11
|
-
import "../../internal/
|
|
12
|
+
import "../../internal/InternalAsyncListControl/index.js";
|
|
12
13
|
import "../../internal/InternalForm/index.js";
|
|
13
14
|
import "./internal/InternalTransactionCustomerControl/index.js";
|
|
14
15
|
import "./internal/InternalTransactionActionsControl/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/Transaction/index.ts"],"names":[],"mappings":"AAAA,mCAAgC;AAChC,mCAAgC;AAChC,qCAAkC;AAClC,qCAAkC;AAClC,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/elements/public/Transaction/index.ts"],"names":[],"mappings":"AAAA,wCAAqC;AACrC,mCAAgC;AAChC,mCAAgC;AAChC,qCAAkC;AAClC,qCAAkC;AAClC,qCAAkC;AAClC,kCAA+B;AAC/B,iCAA8B;AAC9B,8BAA2B;AAC3B,8BAA2B;AAC3B,0BAAuB;AAEvB,0DAAuD;AACvD,8CAA2C;AAE3C,gEAA6D;AAC7D,+DAA4D;AAC5D,+DAA4D;AAE5D,OAAO,EAAE,WAAW,EAAE,yBAAsB;AAE5C,cAAc,CAAC,MAAM,CAAC,kBAAkB,EAAE,WAAW,CAAC,CAAC;AAEvD,OAAO,EAAE,WAAW,EAAE,CAAC","sourcesContent":["import '../BillingAddressCard/index';\nimport '../AttributeCard/index';\nimport '../AttributeForm/index';\nimport '../CustomFieldForm/index';\nimport '../CustomFieldCard/index';\nimport '../CopyToClipboard/index';\nimport '../ShipmentCard/index';\nimport '../PaymentCard/index';\nimport '../ItemCard/index';\nimport '../ItemForm/index';\nimport '../I18n/index';\n\nimport '../../internal/InternalAsyncListControl/index';\nimport '../../internal/InternalForm/index';\n\nimport './internal/InternalTransactionCustomerControl/index';\nimport './internal/InternalTransactionActionsControl/index';\nimport './internal/InternalTransactionSummaryControl/index';\n\nimport { Transaction } from './Transaction';\n\ncustomElements.define('foxy-transaction', Transaction);\n\nexport { Transaction };\n"]}
|
|
@@ -3,13 +3,14 @@ import { ifDefined } from 'lit-html/directives/if-defined';
|
|
|
3
3
|
import { InternalControl } from "../../../../internal/InternalControl/InternalControl.js";
|
|
4
4
|
export class InternalTransactionActionsControl extends InternalControl {
|
|
5
5
|
renderControl() {
|
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
7
7
|
return html `
|
|
8
|
-
<div class="
|
|
8
|
+
<div class="flex flex-wrap gap-x-m gap-y-xs">
|
|
9
9
|
${((_b = (_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b._links['fx:capture']) ? this.__renderCaptureAction() : ''}
|
|
10
10
|
${((_d = (_c = this.nucleon) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d._links['fx:void']) ? this.__renderVoidAction() : ''}
|
|
11
11
|
${((_f = (_e = this.nucleon) === null || _e === void 0 ? void 0 : _e.data) === null || _f === void 0 ? void 0 : _f._links['fx:refund']) ? this.__renderRefundAction() : ''}
|
|
12
12
|
${((_h = (_g = this.nucleon) === null || _g === void 0 ? void 0 : _g.data) === null || _h === void 0 ? void 0 : _h._links['fx:send_emails']) ? this.__renderSendEmailsAction() : ''}
|
|
13
|
+
${((_k = (_j = this.nucleon) === null || _j === void 0 ? void 0 : _j.data) === null || _k === void 0 ? void 0 : _k._links['fx:subscription']) ? this.__renderSubscriptionAction() : ''}
|
|
13
14
|
</div>
|
|
14
15
|
`;
|
|
15
16
|
}
|
|
@@ -18,7 +19,6 @@ export class InternalTransactionActionsControl extends InternalControl {
|
|
|
18
19
|
return html `
|
|
19
20
|
<foxy-internal-transaction-post-action-control
|
|
20
21
|
infer="send-emails"
|
|
21
|
-
theme="contrast"
|
|
22
22
|
href=${ifDefined((_b = (_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b._links['fx:send_emails'].href)}
|
|
23
23
|
@done=${() => { var _a; return (_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.refresh(); }}
|
|
24
24
|
>
|
|
@@ -53,7 +53,6 @@ export class InternalTransactionActionsControl extends InternalControl {
|
|
|
53
53
|
var _a, _b, _c;
|
|
54
54
|
return html `
|
|
55
55
|
<foxy-internal-transaction-post-action-control
|
|
56
|
-
theme="contrast"
|
|
57
56
|
infer="refund"
|
|
58
57
|
href=${ifDefined((_c = (_b = (_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b._links['fx:refund']) === null || _c === void 0 ? void 0 : _c.href)}
|
|
59
58
|
@done=${() => { var _a; return (_a = this.nucleon) === null || _a === void 0 ? void 0 : _a.refresh(); }}
|
|
@@ -61,5 +60,19 @@ export class InternalTransactionActionsControl extends InternalControl {
|
|
|
61
60
|
</foxy-internal-transaction-post-action-control>
|
|
62
61
|
`;
|
|
63
62
|
}
|
|
63
|
+
__renderSubscriptionAction() {
|
|
64
|
+
var _a, _b, _c;
|
|
65
|
+
const host = this.nucleon;
|
|
66
|
+
const subHref = (_b = (_a = host === null || host === void 0 ? void 0 : host.data) === null || _a === void 0 ? void 0 : _a._links['fx:subscription']) === null || _b === void 0 ? void 0 : _b.href;
|
|
67
|
+
const subPageHref = subHref ? (_c = host === null || host === void 0 ? void 0 : host.getSubscriptionPageHref) === null || _c === void 0 ? void 0 : _c.call(host, subHref) : void 0;
|
|
68
|
+
return html `
|
|
69
|
+
<a
|
|
70
|
+
class="rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50"
|
|
71
|
+
href=${ifDefined(subPageHref)}
|
|
72
|
+
>
|
|
73
|
+
<foxy-i18n infer="subscription" key="caption"></foxy-i18n>
|
|
74
|
+
</a>
|
|
75
|
+
`;
|
|
76
|
+
}
|
|
64
77
|
}
|
|
65
78
|
//# sourceMappingURL=InternalTransactionActionsControl.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalTransactionActionsControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,gEAA6D;
|
|
1
|
+
{"version":3,"file":"InternalTransactionActionsControl.js","sourceRoot":"","sources":["../../../../../../src/elements/public/Transaction/internal/InternalTransactionActionsControl/InternalTransactionActionsControl.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAkB,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,gEAA6D;AAGvF,MAAM,OAAO,iCAAkC,SAAQ,eAAe;IACpE,aAAa;;QACX,OAAO,IAAI,CAAA;;UAEL,aAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,0CAAE,MAAM,CAAC,YAAY,GAAE,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE;UAC5E,aAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,0CAAE,MAAM,CAAC,SAAS,GAAE,CAAC,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE;UACtE,aAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,0CAAE,MAAM,CAAC,WAAW,GAAE,CAAC,CAAC,IAAI,CAAC,oBAAoB,EAAE,CAAC,CAAC,CAAC,EAAE;UAC1E,aAAA,IAAI,CAAC,OAAO,0CAAE,IAAI,0CAAE,MAAM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C;QAChD,MAAM,OAAO,eAAG,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,IAAI,0CAAE,MAAM,CAAC,iBAAiB,2CAAG,IAAI,CAAC;QAC5D,MAAM,WAAW,GAAG,OAAO,CAAC,CAAC,OAAC,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,uBAAuB,+CAA7B,IAAI,EAA4B,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;QAEhF,OAAO,IAAI,CAAA;;;eAGA,SAAS,CAAC,WAAW,CAAC;;;;KAIhC,CAAC;IACJ,CAAC;CACF","sourcesContent":["import { html, TemplateResult } from 'lit-html';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { InternalControl } from '../../../../internal/InternalControl/InternalControl';\nimport { Transaction } from '../../Transaction';\n\nexport class InternalTransactionActionsControl extends InternalControl {\n renderControl(): TemplateResult {\n return html`\n <div class=\"flex flex-wrap gap-x-m gap-y-xs\">\n ${this.nucleon?.data?._links['fx:capture'] ? this.__renderCaptureAction() : ''}\n ${this.nucleon?.data?._links['fx:void'] ? this.__renderVoidAction() : ''}\n ${this.nucleon?.data?._links['fx:refund'] ? this.__renderRefundAction() : ''}\n ${this.nucleon?.data?._links['fx:send_emails'] ? this.__renderSendEmailsAction() : ''}\n ${this.nucleon?.data?._links['fx:subscription'] ? this.__renderSubscriptionAction() : ''}\n </div>\n `;\n }\n\n private __renderSendEmailsAction() {\n return html`\n <foxy-internal-transaction-post-action-control\n infer=\"send-emails\"\n href=${ifDefined(this.nucleon?.data?._links['fx:send_emails'].href)}\n @done=${() => this.nucleon?.refresh()}\n >\n </foxy-internal-transaction-post-action-control>\n `;\n }\n\n private __renderCaptureAction() {\n return html`\n <foxy-internal-transaction-post-action-control\n theme=\"success\"\n infer=\"capture\"\n href=${ifDefined(this.nucleon?.data?._links['fx:capture'].href)}\n @done=${() => this.nucleon?.refresh()}\n >\n </foxy-internal-transaction-post-action-control>\n `;\n }\n\n private __renderVoidAction() {\n return html`\n <foxy-internal-transaction-post-action-control\n theme=\"error\"\n infer=\"void\"\n href=${ifDefined(this.nucleon?.data?._links['fx:void']?.href)}\n @done=${() => this.nucleon?.refresh()}\n >\n </foxy-internal-transaction-post-action-control>\n `;\n }\n\n private __renderRefundAction() {\n return html`\n <foxy-internal-transaction-post-action-control\n infer=\"refund\"\n href=${ifDefined(this.nucleon?.data?._links['fx:refund']?.href)}\n @done=${() => this.nucleon?.refresh()}\n >\n </foxy-internal-transaction-post-action-control>\n `;\n }\n\n private __renderSubscriptionAction() {\n const host = this.nucleon as Transaction | null;\n const subHref = host?.data?._links['fx:subscription']?.href;\n const subPageHref = subHref ? host?.getSubscriptionPageHref?.(subHref) : void 0;\n\n return html`\n <a\n class=\"rounded text-m font-medium text-primary cursor-pointer transition-opacity hover-opacity-80 focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=${ifDefined(subPageHref)}\n >\n <foxy-i18n infer=\"subscription\" key=\"caption\"></foxy-i18n>\n </a>\n `;\n }\n}\n"]}
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { PropertyDeclarations } from 'lit-element';
|
|
2
|
+
import type { TemplateResult } from 'lit-html';
|
|
2
3
|
import { InternalControl } from '../../../../internal/InternalControl/InternalControl';
|
|
3
4
|
export declare class InternalTransactionCustomerControl extends InternalControl {
|
|
5
|
+
static get properties(): PropertyDeclarations;
|
|
6
|
+
private __copyEmailState;
|
|
7
|
+
private __copyIdState;
|
|
4
8
|
renderControl(): TemplateResult;
|
|
9
|
+
private __renderCopyAction;
|
|
10
|
+
private __copy;
|
|
5
11
|
}
|