@foxy.io/elements 1.25.0-beta.3 → 1.25.0-beta.4
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-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-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 +1 -1
- package/dist/cdn/foxy-customers-table.js +1 -1
- package/dist/cdn/foxy-discount-builder.js +1 -1
- package/dist/cdn/foxy-discount-card.js +1 -1
- package/dist/cdn/foxy-discount-detail-card.js +1 -1
- package/dist/cdn/foxy-donation.js +1 -1
- package/dist/cdn/foxy-downloadable-card.js +1 -1
- package/dist/cdn/foxy-downloadable-form.js +1 -1
- package/dist/cdn/foxy-email-template-card.js +1 -1
- package/dist/cdn/foxy-email-template-form.js +1 -1
- package/dist/cdn/foxy-error-entry-card.js +1 -1
- package/dist/cdn/foxy-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 +4 -4
- 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-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-query-builder.js +1 -1
- package/dist/cdn/foxy-report-form.js +5 -5
- 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 +2 -96
- 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 +95 -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-b113467e.js → shared-00c2793e.js} +1 -1
- package/dist/cdn/{shared-15dfa16d.js → shared-029816d7.js} +1 -1
- package/dist/cdn/{shared-61b1fd60.js → shared-02bc0368.js} +1 -1
- package/dist/cdn/{shared-87f55237.js → shared-174f37e9.js} +1 -1
- package/dist/cdn/{shared-3f3903d4.js → shared-20ba4cdc.js} +1 -1
- package/dist/cdn/{shared-06916671.js → shared-268571df.js} +1 -1
- package/dist/cdn/{shared-8d99b885.js → shared-2b27e2e7.js} +1 -1
- package/dist/cdn/{shared-979e24ec.js → shared-2bdc99f4.js} +1 -1
- package/dist/cdn/{shared-3d95605f.js → shared-2c8c4b43.js} +3 -3
- package/dist/cdn/shared-2cf08dd4.js +1 -0
- package/dist/cdn/{shared-f8d1abc9.js → shared-2f09d4df.js} +4 -4
- package/dist/cdn/{shared-54cbd346.js → shared-30d00b64.js} +1 -1
- package/dist/cdn/{shared-d9f4138b.js → shared-32e736eb.js} +1 -1
- package/dist/cdn/{shared-a1d39ddd.js → shared-43f449bb.js} +1 -1
- package/dist/cdn/{shared-87824001.js → shared-4462dc70.js} +2 -2
- package/dist/cdn/{shared-02f8245a.js → shared-4aa4d980.js} +1 -1
- package/dist/cdn/{shared-63d11888.js → shared-4c124efc.js} +7 -7
- package/dist/cdn/shared-4c650e5c.js +1 -0
- package/dist/cdn/{shared-b984ab7c.js → shared-4e59fd48.js} +16 -16
- package/dist/cdn/{shared-69c3549d.js → shared-54b0e48f.js} +1 -1
- package/dist/cdn/{shared-ecd5eb1b.js → shared-5fa697c4.js} +1 -1
- package/dist/cdn/shared-61ade33e.js +6 -0
- package/dist/cdn/{shared-3bd99d11.js → shared-6a9ae42e.js} +1 -1
- package/dist/cdn/{shared-a95067d6.js → shared-76400719.js} +1 -1
- package/dist/cdn/{shared-ceec93fa.js → shared-7dd17943.js} +1 -1
- package/dist/cdn/{shared-ea1ab750.js → shared-7deff07c.js} +1 -1
- package/dist/cdn/{shared-fad099e6.js → shared-7e1953f5.js} +1 -1
- package/dist/cdn/shared-8201d0b5.js +1 -0
- package/dist/cdn/{shared-29e74661.js → shared-8952aeac.js} +1 -1
- package/dist/cdn/{shared-320fadbf.js → shared-896982f9.js} +1 -1
- package/dist/cdn/{shared-a5a03f4f.js → shared-8d8bed82.js} +1 -1
- package/dist/cdn/{shared-92dd9964.js → shared-99c0ae04.js} +1 -1
- package/dist/cdn/{shared-6ffa9f84.js → shared-9c08cfab.js} +1 -1
- package/dist/cdn/{shared-0ffe26d8.js → shared-9df8f842.js} +2 -2
- package/dist/cdn/{shared-0961f769.js → shared-a8dc23f1.js} +1 -1
- package/dist/cdn/{shared-3fee360a.js → shared-ac7c5a5e.js} +14 -14
- package/dist/cdn/{shared-5db2fec0.js → shared-ad34b6db.js} +1 -1
- package/dist/cdn/{shared-a1be9c27.js → shared-b1b8ea67.js} +1 -1
- package/dist/cdn/{shared-85712eed.js → shared-b509bc2c.js} +1 -1
- package/dist/cdn/{shared-de8bf756.js → shared-bc0d8d01.js} +2 -2
- package/dist/cdn/{shared-4105aacf.js → shared-be7bfbb0.js} +1 -1
- package/dist/cdn/{shared-745a575c.js → shared-bed7aae1.js} +1 -1
- package/dist/cdn/{shared-5291bdca.js → shared-c7b3d22b.js} +3 -3
- package/dist/cdn/{shared-264c82b8.js → shared-c9ba1b64.js} +3 -3
- package/dist/cdn/{shared-c43cd1fa.js → shared-ca4c5f0f.js} +1 -1
- package/dist/cdn/{shared-efbd62cb.js → shared-cdd2358f.js} +4 -4
- package/dist/cdn/{shared-d8ca5c87.js → shared-d21fa1a6.js} +1 -1
- package/dist/cdn/{shared-835cf735.js → shared-d57fac94.js} +1 -1
- package/dist/cdn/{shared-d600815d.js → shared-dbadd9cf.js} +1 -1
- package/dist/cdn/{shared-452e38da.js → shared-e39807f8.js} +1 -1
- package/dist/cdn/{shared-25edf241.js → shared-e83f2983.js} +1 -1
- package/dist/cdn/{shared-d1265ca0.js → shared-e91453df.js} +1 -1
- package/dist/cdn/{shared-5f1f0d8f.js → shared-ea527e98.js} +1 -1
- package/dist/cdn/shared-f9a3d1ff.js +6 -0
- package/dist/cdn/{shared-324665fd.js → shared-fa4f6cd3.js} +1 -1
- package/dist/cdn/shared-fc15a882.js +1 -0
- package/dist/cdn/{shared-2c92c192.js → shared-ff8ca16b.js} +1 -1
- package/dist/cdn/{shared-6d0be1e4.js → shared-ff9791cf.js} +1 -1
- package/dist/cdn/translations/cart-form/en.json +7 -6
- package/dist/cdn/translations/customer/en.json +23 -14
- package/dist/cdn/translations/customer-portal/en.json +22 -13
- package/dist/cdn/translations/item-card/en.json +1 -0
- package/dist/cdn/translations/item-form/en.json +2 -2
- package/dist/cdn/translations/payments-api-payment-preset-form/en.json +2 -2
- package/dist/cdn/translations/shipment-card/en.json +1 -0
- package/dist/cdn/translations/subscription-form/en.json +23 -14
- package/dist/cdn/translations/transaction/en.json +27 -26
- package/dist/cdn/translations/transaction-card/en.json +22 -22
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +28 -23
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalControl/InternalControl.js +2 -1
- package/dist/elements/internal/InternalControl/InternalControl.js.map +1 -1
- package/dist/elements/private/Dialog/Dialog.js +7 -1
- package/dist/elements/private/Dialog/Dialog.js.map +1 -1
- package/dist/elements/public/ItemCard/ItemCard.js +4 -2
- package/dist/elements/public/ItemCard/ItemCard.js.map +1 -1
- package/dist/elements/public/ItemsForm/private/Item.js +1 -0
- package/dist/elements/public/ItemsForm/private/Item.js.map +1 -1
- package/dist/elements/public/ShipmentCard/ShipmentCard.js +5 -2
- package/dist/elements/public/ShipmentCard/ShipmentCard.js.map +1 -1
- package/dist/elements/public/Transaction/Transaction.d.ts +2 -3
- package/dist/elements/public/Transaction/Transaction.js +129 -127
- package/dist/elements/public/Transaction/Transaction.js.map +1 -1
- package/dist/elements/public/Transaction/types.d.ts +9 -8
- package/dist/elements/public/Transaction/types.js.map +1 -1
- package/dist/elements/public/TransactionCard/TransactionCard.d.ts +8 -10
- package/dist/elements/public/TransactionCard/TransactionCard.js +71 -51
- package/dist/elements/public/TransactionCard/TransactionCard.js.map +1 -1
- package/dist/elements/public/TransactionCard/index.d.ts +2 -1
- package/dist/elements/public/TransactionCard/index.js +2 -1
- package/dist/elements/public/TransactionCard/index.js.map +1 -1
- package/dist/elements/public/TransactionCard/types.d.ts +8 -2
- package/dist/elements/public/TransactionCard/types.js.map +1 -1
- package/dist/mixins/themeable.js +4 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-4761cbda.js +0 -1
- package/dist/cdn/shared-87142858.js +0 -1
- package/dist/cdn/shared-e9276306.js +0 -1
- package/dist/cdn/shared-eacc4539.js +0 -1
- package/dist/cdn/shared-ec59505f.js +0 -12
- package/dist/cdn/shared-f3cd4d07.js +0 -1
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"delete_message": "Are you sure you'd like to remove this item? You won't be able to bring it back.",
|
|
26
26
|
"delete_header": "Delete item?",
|
|
27
27
|
"pagination": {
|
|
28
|
-
"create_button_text": "Add item",
|
|
28
|
+
"create_button_text": "Add item +",
|
|
29
29
|
"first": "First",
|
|
30
30
|
"last": "Last",
|
|
31
31
|
"next": "Next",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"subinfo_recurring": "$t(items.pagination.card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"cart-form\" }) from {{startDate, date}}",
|
|
42
42
|
"subinfo_twice_a_month": "$t(items.pagination.card.twice_a_month, { \"ns\": \"cart-form\" }) from {{startDate, date}}",
|
|
43
43
|
"twice_a_month": "Twice a month",
|
|
44
|
+
"no_code": "No SKU",
|
|
44
45
|
"weekly": "Weekly",
|
|
45
46
|
"weekly_plural": "Every {{count}} weeks",
|
|
46
47
|
"yearly": "Yearly",
|
|
@@ -267,7 +268,7 @@
|
|
|
267
268
|
}
|
|
268
269
|
},
|
|
269
270
|
"pagination": {
|
|
270
|
-
"create_button_text": "Add attribute",
|
|
271
|
+
"create_button_text": "Add attribute +",
|
|
271
272
|
"card": {
|
|
272
273
|
"delete_button_text": "Delete",
|
|
273
274
|
"spinner": {
|
|
@@ -352,7 +353,7 @@
|
|
|
352
353
|
"loading_error": "Failed to load"
|
|
353
354
|
}
|
|
354
355
|
},
|
|
355
|
-
"create_button_text": "Add option",
|
|
356
|
+
"create_button_text": "Add option +",
|
|
356
357
|
"first": "First",
|
|
357
358
|
"last": "Last",
|
|
358
359
|
"next": "Next",
|
|
@@ -386,7 +387,7 @@
|
|
|
386
387
|
"delete_message": "Are you sure you'd like to remove this coupon code? This might affect the cart total.",
|
|
387
388
|
"delete_header": "Delete code?",
|
|
388
389
|
"pagination": {
|
|
389
|
-
"create_button_text": "Apply code",
|
|
390
|
+
"create_button_text": "Apply code +",
|
|
390
391
|
"first": "First",
|
|
391
392
|
"last": "Last",
|
|
392
393
|
"next": "Next",
|
|
@@ -572,7 +573,7 @@
|
|
|
572
573
|
"delete_message": "Are you sure you'd like to remove this custom field? This action can't be undone.",
|
|
573
574
|
"delete_header": "Delete custom field?",
|
|
574
575
|
"pagination": {
|
|
575
|
-
"create_button_text": "Add custom field",
|
|
576
|
+
"create_button_text": "Add custom field +",
|
|
576
577
|
"first": "First",
|
|
577
578
|
"last": "Last",
|
|
578
579
|
"next": "Next",
|
|
@@ -608,7 +609,7 @@
|
|
|
608
609
|
"delete_message": "Are you sure you'd like to remove this attribute? This action can't be undone.",
|
|
609
610
|
"delete_header": "Delete attribute?",
|
|
610
611
|
"pagination": {
|
|
611
|
-
"create_button_text": "Add attribute",
|
|
612
|
+
"create_button_text": "Add attribute +",
|
|
612
613
|
"first": "First",
|
|
613
614
|
"last": "Last",
|
|
614
615
|
"next": "Next",
|
|
@@ -818,7 +818,7 @@
|
|
|
818
818
|
"delete_message": "Are you sure you'd like to remove this attribute? You won't be able to bring it back.",
|
|
819
819
|
"delete_header": "Delete attribute?",
|
|
820
820
|
"pagination": {
|
|
821
|
-
"create_button_text": "Add attribute",
|
|
821
|
+
"create_button_text": "Add attribute +",
|
|
822
822
|
"first": "First",
|
|
823
823
|
"last": "Last",
|
|
824
824
|
"next": "Next",
|
|
@@ -880,6 +880,7 @@
|
|
|
880
880
|
"subinfo_recurring": "$t(subscription-form.pagination.card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer\" }) from {{startDate, date}}",
|
|
881
881
|
"subinfo_twice_a_month": "$t(subscription-form.pagination.card.twice_a_month, { \"ns\": \"customer\" }) from {{startDate, date}}",
|
|
882
882
|
"twice_a_month": "Twice a month",
|
|
883
|
+
"no_code": "No SKU",
|
|
883
884
|
"weekly": "Weekly",
|
|
884
885
|
"weekly_plural": "Every {{count}} weeks",
|
|
885
886
|
"yearly": "Yearly",
|
|
@@ -907,19 +908,27 @@
|
|
|
907
908
|
"description": "Description",
|
|
908
909
|
"price": "{{amount, price}}",
|
|
909
910
|
"time": "{{value, date}}",
|
|
910
|
-
"
|
|
911
|
-
"
|
|
912
|
-
"
|
|
913
|
-
"
|
|
914
|
-
"
|
|
915
|
-
"
|
|
916
|
-
"
|
|
917
|
-
"
|
|
918
|
-
"
|
|
919
|
-
"
|
|
920
|
-
"
|
|
921
|
-
"
|
|
922
|
-
"
|
|
911
|
+
"status_capturing": "Capturing",
|
|
912
|
+
"status_captured": "Captured",
|
|
913
|
+
"status_approved": "Approved",
|
|
914
|
+
"status_authorized": "Authorized",
|
|
915
|
+
"status_pending": "Pending",
|
|
916
|
+
"status_completed": "Completed",
|
|
917
|
+
"status_problem": "Problem",
|
|
918
|
+
"status_pending_fraud_review": "Pending_fraud_review",
|
|
919
|
+
"status_rejected": "Rejected",
|
|
920
|
+
"status_declined": "Declined",
|
|
921
|
+
"status_refunding": "Refunding",
|
|
922
|
+
"status_refunded": "Refunded",
|
|
923
|
+
"status_voided": "Voided",
|
|
924
|
+
"status_verified": "Verified",
|
|
925
|
+
"summary": "{{most_expensive_item.name}}",
|
|
926
|
+
"summary_plural": "{{most_expensive_item.name}} and {{count_minus_one}} more",
|
|
927
|
+
"summary_payment_method_change": "Payment method change",
|
|
928
|
+
"summary_subscription_modification": "Subscription modification",
|
|
929
|
+
"summary_subscription_cancellation": "Subscription cancellation",
|
|
930
|
+
"source_MIT": "This transaction was initiated by the merchant",
|
|
931
|
+
"source_CIT": "This transaction was initiated by the customer",
|
|
923
932
|
"spinner": {
|
|
924
933
|
"loading_busy": "Loading",
|
|
925
934
|
"loading_empty": "No transactions",
|
|
@@ -804,6 +804,7 @@
|
|
|
804
804
|
"subinfo_recurring": "$t(customer.subscription-form.pagination.card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"customer-portal\" }) from {{startDate, date}}",
|
|
805
805
|
"subinfo_twice_a_month": "$t(customer.subscription-form.pagination.card.twice_a_month, { \"ns\": \"customer-portal\" }) from {{startDate, date}}",
|
|
806
806
|
"twice_a_month": "Twice a month",
|
|
807
|
+
"no_code": "No SKU",
|
|
807
808
|
"weekly": "Weekly",
|
|
808
809
|
"weekly_plural": "Every {{count}} weeks",
|
|
809
810
|
"yearly": "Yearly",
|
|
@@ -831,19 +832,27 @@
|
|
|
831
832
|
"description": "Description",
|
|
832
833
|
"price": "{{amount, price}}",
|
|
833
834
|
"time": "{{value, date}}",
|
|
834
|
-
"
|
|
835
|
-
"
|
|
836
|
-
"
|
|
837
|
-
"
|
|
838
|
-
"
|
|
839
|
-
"
|
|
840
|
-
"
|
|
841
|
-
"
|
|
842
|
-
"
|
|
843
|
-
"
|
|
844
|
-
"
|
|
845
|
-
"
|
|
846
|
-
"
|
|
835
|
+
"status_capturing": "Capturing",
|
|
836
|
+
"status_captured": "Captured",
|
|
837
|
+
"status_approved": "Approved",
|
|
838
|
+
"status_authorized": "Authorized",
|
|
839
|
+
"status_pending": "Pending",
|
|
840
|
+
"status_completed": "Completed",
|
|
841
|
+
"status_problem": "Problem",
|
|
842
|
+
"status_pending_fraud_review": "Pending_fraud_review",
|
|
843
|
+
"status_rejected": "Rejected",
|
|
844
|
+
"status_declined": "Declined",
|
|
845
|
+
"status_refunding": "Refunding",
|
|
846
|
+
"status_refunded": "Refunded",
|
|
847
|
+
"status_voided": "Voided",
|
|
848
|
+
"status_verified": "Verified",
|
|
849
|
+
"summary": "{{most_expensive_item.name}}",
|
|
850
|
+
"summary_plural": "{{most_expensive_item.name}} and {{count_minus_one}} more",
|
|
851
|
+
"summary_payment_method_change": "Payment method change",
|
|
852
|
+
"summary_subscription_modification": "Subscription modification",
|
|
853
|
+
"summary_subscription_cancellation": "Subscription cancellation",
|
|
854
|
+
"source_MIT": "This transaction was initiated by the merchant",
|
|
855
|
+
"source_CIT": "This transaction was initiated by the customer",
|
|
847
856
|
"spinner": {
|
|
848
857
|
"loading_busy": "Loading",
|
|
849
858
|
"loading_empty": "No transactions",
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
"subinfo_recurring": "$t(frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"item-card\" }) from {{startDate, date}}",
|
|
8
8
|
"subinfo_twice_a_month": "$t(twice_a_month, { \"ns\": \"item-card\" }) from {{startDate, date}}",
|
|
9
9
|
"twice_a_month": "Twice a month",
|
|
10
|
+
"no_code": "No SKU",
|
|
10
11
|
"weekly": "Weekly",
|
|
11
12
|
"weekly_plural": "Every {{count}} weeks",
|
|
12
13
|
"yearly": "Yearly",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
}
|
|
204
204
|
},
|
|
205
205
|
"pagination": {
|
|
206
|
-
"create_button_text": "Add attribute",
|
|
206
|
+
"create_button_text": "Add attribute +",
|
|
207
207
|
"card": {
|
|
208
208
|
"delete_button_text": "Delete",
|
|
209
209
|
"spinner": {
|
|
@@ -288,7 +288,7 @@
|
|
|
288
288
|
"loading_error": "Failed to load"
|
|
289
289
|
}
|
|
290
290
|
},
|
|
291
|
-
"create_button_text": "Add option",
|
|
291
|
+
"create_button_text": "Add option +",
|
|
292
292
|
"first": "First",
|
|
293
293
|
"last": "Last",
|
|
294
294
|
"next": "Next",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"undo_confirm": "Discard"
|
|
35
35
|
},
|
|
36
36
|
"pagination": {
|
|
37
|
-
"create_button_text": "Add payment method",
|
|
37
|
+
"create_button_text": "Add payment method +",
|
|
38
38
|
"card": {
|
|
39
39
|
"delete_button_text": "Remove"
|
|
40
40
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"undo_confirm": "Discard"
|
|
59
59
|
},
|
|
60
60
|
"pagination": {
|
|
61
|
-
"create_button_text": "Add fraud protection",
|
|
61
|
+
"create_button_text": "Add fraud protection +",
|
|
62
62
|
"card": {
|
|
63
63
|
"delete_button_text": "Remove"
|
|
64
64
|
}
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"delete_message": "Are you sure you'd like to remove this attribute? You won't be able to bring it back.",
|
|
59
59
|
"delete_header": "Delete attribute?",
|
|
60
60
|
"pagination": {
|
|
61
|
-
"create_button_text": "Add attribute",
|
|
61
|
+
"create_button_text": "Add attribute +",
|
|
62
62
|
"first": "First",
|
|
63
63
|
"last": "Last",
|
|
64
64
|
"next": "Next",
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
"subinfo_recurring": "$t(items.pagination.card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"subscription-form\" }) from {{startDate, date}}",
|
|
121
121
|
"subinfo_twice_a_month": "$t(items.pagination.card.twice_a_month, { \"ns\": \"subscription-form\" }) from {{startDate, date}}",
|
|
122
122
|
"twice_a_month": "Twice a month",
|
|
123
|
+
"no_code": "No SKU",
|
|
123
124
|
"weekly": "Weekly",
|
|
124
125
|
"weekly_plural": "Every {{count}} weeks",
|
|
125
126
|
"yearly": "Yearly",
|
|
@@ -147,19 +148,27 @@
|
|
|
147
148
|
"description": "Description",
|
|
148
149
|
"price": "{{amount, price}}",
|
|
149
150
|
"time": "{{value, date}}",
|
|
150
|
-
"
|
|
151
|
-
"
|
|
152
|
-
"
|
|
153
|
-
"
|
|
154
|
-
"
|
|
155
|
-
"
|
|
156
|
-
"
|
|
157
|
-
"
|
|
158
|
-
"
|
|
159
|
-
"
|
|
160
|
-
"
|
|
161
|
-
"
|
|
162
|
-
"
|
|
151
|
+
"status_capturing": "Capturing",
|
|
152
|
+
"status_captured": "Captured",
|
|
153
|
+
"status_approved": "Approved",
|
|
154
|
+
"status_authorized": "Authorized",
|
|
155
|
+
"status_pending": "Pending",
|
|
156
|
+
"status_completed": "Completed",
|
|
157
|
+
"status_problem": "Problem",
|
|
158
|
+
"status_pending_fraud_review": "Pending_fraud_review",
|
|
159
|
+
"status_rejected": "Rejected",
|
|
160
|
+
"status_declined": "Declined",
|
|
161
|
+
"status_refunding": "Refunding",
|
|
162
|
+
"status_refunded": "Refunded",
|
|
163
|
+
"status_voided": "Voided",
|
|
164
|
+
"status_verified": "Verified",
|
|
165
|
+
"summary": "{{most_expensive_item.name}}",
|
|
166
|
+
"summary_plural": "{{most_expensive_item.name}} and {{count_minus_one}} more",
|
|
167
|
+
"summary_payment_method_change": "Payment method change",
|
|
168
|
+
"summary_subscription_modification": "Subscription modification",
|
|
169
|
+
"summary_subscription_cancellation": "Subscription cancellation",
|
|
170
|
+
"source_MIT": "This transaction was initiated by the merchant",
|
|
171
|
+
"source_CIT": "This transaction was initiated by the customer",
|
|
163
172
|
"spinner": {
|
|
164
173
|
"loading_busy": "Loading",
|
|
165
174
|
"loading_empty": "No transactions",
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"header": {
|
|
3
3
|
"title": "ID {{ display_id }}",
|
|
4
|
-
"subtitle": "{{ transaction_date, date }}
|
|
5
|
-
"subtitle_customer_changed_payment_method": "{{ transaction_date, date }}
|
|
6
|
-
"subtitle_admin_changed_payment_method_with_uoe": "{{ transaction_date, date }} • Store admin used UOE password to change payment method",
|
|
7
|
-
"subtitle_integration_changed_payment_method": "{{ transaction_date, date }} • Integration changed payment method",
|
|
8
|
-
"subtitle_admin_changed_payment_method": "{{ transaction_date, date }} • Store admin changed payment method",
|
|
9
|
-
"subtitle_customer_changed_subscription": "{{ transaction_date, date }}
|
|
10
|
-
"subtitle_admin_changed_subscription_with_uoe": "{{ transaction_date, date }} • Store admin used UOE password to make changes to subscription",
|
|
11
|
-
"subtitle_integration_changed_subscription": "{{ transaction_date, date }} • Integration made changes to subscription",
|
|
12
|
-
"subtitle_admin_changed_subscription": "{{ transaction_date, date }} • Store admin made changes to subscription",
|
|
13
|
-
"subtitle_subscription_renewal_attempt": "{{ transaction_date, date }} • Subscription renewal attempt",
|
|
14
|
-
"subtitle_subscription_renewal_automated_reattempt": "{{ transaction_date, date }} • Automated subscription renewal reattempt",
|
|
15
|
-
"subtitle_subscription_renewal_manual_reattempt": "{{ transaction_date, date }} • Store admin attempted to renew subscription",
|
|
16
|
-
"subtitle_customer_canceled_subscription": "{{ transaction_date, date }}
|
|
17
|
-
"subtitle_admin_canceled_subscription": "{{ transaction_date, date }} • Store admin cancelled subscription",
|
|
18
|
-
"subtitle_customer_subscribed": "{{ transaction_date, date }}
|
|
19
|
-
"subtitle_admin_subscribed_with_uoe": "{{ transaction_date, date }} • Store admin used UOE password to buy a subscription",
|
|
20
|
-
"subtitle_integration_subscribed": "{{ transaction_date, date }} • Integration placed an order for customer",
|
|
21
|
-
"subtitle_customer_placed_order": "{{ transaction_date, date }}
|
|
22
|
-
"subtitle_admin_placed_order_with_uoe": "{{ transaction_date, date }} • Store admin used UOE password to place an order",
|
|
23
|
-
"subtitle_integration_placed_order": "{{ transaction_date, date }} • Integration bought a subscription",
|
|
4
|
+
"subtitle": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }}",
|
|
5
|
+
"subtitle_customer_changed_payment_method": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }} • Customer changed payment method",
|
|
6
|
+
"subtitle_admin_changed_payment_method_with_uoe": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin used UOE password to change payment method",
|
|
7
|
+
"subtitle_integration_changed_payment_method": "{{ transaction_date, date }} at {{ transaction_date, time }} • Integration changed payment method",
|
|
8
|
+
"subtitle_admin_changed_payment_method": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin changed payment method",
|
|
9
|
+
"subtitle_customer_changed_subscription": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }} • Customer made changes to subscription",
|
|
10
|
+
"subtitle_admin_changed_subscription_with_uoe": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin used UOE password to make changes to subscription",
|
|
11
|
+
"subtitle_integration_changed_subscription": "{{ transaction_date, date }} at {{ transaction_date, time }} • Integration made changes to subscription",
|
|
12
|
+
"subtitle_admin_changed_subscription": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin made changes to subscription",
|
|
13
|
+
"subtitle_subscription_renewal_attempt": "{{ transaction_date, date }} at {{ transaction_date, time }} • Subscription renewal attempt",
|
|
14
|
+
"subtitle_subscription_renewal_automated_reattempt": "{{ transaction_date, date }} at {{ transaction_date, time }} • Automated subscription renewal reattempt",
|
|
15
|
+
"subtitle_subscription_renewal_manual_reattempt": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin attempted to renew subscription",
|
|
16
|
+
"subtitle_customer_canceled_subscription": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }} • Customer cancelled subscription",
|
|
17
|
+
"subtitle_admin_canceled_subscription": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin cancelled subscription",
|
|
18
|
+
"subtitle_customer_subscribed": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }} • Customer bought a subscription",
|
|
19
|
+
"subtitle_admin_subscribed_with_uoe": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin used UOE password to buy a subscription",
|
|
20
|
+
"subtitle_integration_subscribed": "{{ transaction_date, date }} at {{ transaction_date, time }} • Integration placed an order for customer",
|
|
21
|
+
"subtitle_customer_placed_order": "{{ transaction_date, date }} at {{ transaction_date, time }} • {{ ip_country }} • Customer placed an order",
|
|
22
|
+
"subtitle_admin_placed_order_with_uoe": "{{ transaction_date, date }} at {{ transaction_date, time }} • Store admin used UOE password to place an order",
|
|
23
|
+
"subtitle_integration_placed_order": "{{ transaction_date, date }} at {{ transaction_date, time }} • Integration bought a subscription",
|
|
24
24
|
"alert_status_problem": "We were unable to complete this transaction because the amount that was sent to the payment gateway did not match the final total amount.",
|
|
25
25
|
"alert_status_pending_fraud_review": "The payment gateway flagged this transaction as potentially fraudulent. Please log in to your gateway’s dashboard and look for this transaction to review.",
|
|
26
26
|
"alert_status_rejected": "The payment gateway refused to process this transaction based on its internal policy. You may be able to get more information about this error by logging in to your gateway’s dashboard and looking for this transaction.",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"delete_confirm": "Remove",
|
|
44
44
|
"delete_cancel": "Cancel",
|
|
45
45
|
"pagination": {
|
|
46
|
-
"create_button_text": "Add item",
|
|
46
|
+
"create_button_text": "Add item +",
|
|
47
47
|
"first": "First",
|
|
48
48
|
"last": "Last",
|
|
49
49
|
"next": "Next",
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
"subinfo_recurring": "$t(items.pagination.card.frequency, { \"count\": \"{{count}}\", \"units\": \"{{units}}\", \"ns\": \"transaction\" }) from {{startDate, date}}",
|
|
60
60
|
"subinfo_twice_a_month": "$t(items.pagination.card.twice_a_month, { \"ns\": \"transaction\" }) from {{startDate, date}}",
|
|
61
61
|
"twice_a_month": "Twice a month",
|
|
62
|
+
"no_code": "No SKU",
|
|
62
63
|
"weekly": "Weekly",
|
|
63
64
|
"weekly_plural": "Every {{count}} weeks",
|
|
64
65
|
"yearly": "Yearly",
|
|
@@ -107,7 +108,6 @@
|
|
|
107
108
|
},
|
|
108
109
|
"subscription-frequency": {
|
|
109
110
|
"label": "Subscription frequency",
|
|
110
|
-
"helper_text": "",
|
|
111
111
|
"day": "Day",
|
|
112
112
|
"day_plural": "Days",
|
|
113
113
|
"week": "Week",
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
}
|
|
287
287
|
},
|
|
288
288
|
"pagination": {
|
|
289
|
-
"create_button_text": "Add attribute",
|
|
289
|
+
"create_button_text": "Add attribute +",
|
|
290
290
|
"card": {
|
|
291
291
|
"delete_button_text": "Delete",
|
|
292
292
|
"spinner": {
|
|
@@ -371,7 +371,7 @@
|
|
|
371
371
|
"loading_error": "Failed to load"
|
|
372
372
|
}
|
|
373
373
|
},
|
|
374
|
-
"create_button_text": "Add option",
|
|
374
|
+
"create_button_text": "Add option +",
|
|
375
375
|
"first": "First",
|
|
376
376
|
"last": "Last",
|
|
377
377
|
"next": "Next",
|
|
@@ -436,7 +436,7 @@
|
|
|
436
436
|
}
|
|
437
437
|
},
|
|
438
438
|
"pagination": {
|
|
439
|
-
"create_button_text": "Add custom field",
|
|
439
|
+
"create_button_text": "Add custom field +",
|
|
440
440
|
"first": "First",
|
|
441
441
|
"last": "Last",
|
|
442
442
|
"next": "Next",
|
|
@@ -492,7 +492,7 @@
|
|
|
492
492
|
}
|
|
493
493
|
},
|
|
494
494
|
"pagination": {
|
|
495
|
-
"create_button_text": "Add attribute",
|
|
495
|
+
"create_button_text": "Add attribute +",
|
|
496
496
|
"first": "First",
|
|
497
497
|
"last": "Last",
|
|
498
498
|
"next": "Next",
|
|
@@ -1194,6 +1194,7 @@
|
|
|
1194
1194
|
"card": {
|
|
1195
1195
|
"full_address": "{{ address1 }} {{ address2 }} {{ city }} {{ region }} {{ postal_code }}",
|
|
1196
1196
|
"quantity": "Qty: {{ count }}",
|
|
1197
|
+
"no_code": "No SKU",
|
|
1197
1198
|
"price": "{{ amount, price }}",
|
|
1198
1199
|
"item": "{{ count }} item",
|
|
1199
1200
|
"item_plural": "{{ count }} items",
|
|
@@ -3,28 +3,28 @@
|
|
|
3
3
|
"customer": "Customer",
|
|
4
4
|
"description": "Description",
|
|
5
5
|
"price": "{{amount, price}}",
|
|
6
|
-
"time": "{{value, time}}",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"source_MIT": "This transaction was initiated by merchant",
|
|
27
|
-
"source_CIT": "This transaction was initiated by customer",
|
|
6
|
+
"time": "{{value, date}} at {{value, time}}",
|
|
7
|
+
"status_capturing": "Capturing",
|
|
8
|
+
"status_captured": "Captured",
|
|
9
|
+
"status_approved": "Approved",
|
|
10
|
+
"status_authorized": "Authorized",
|
|
11
|
+
"status_pending": "Pending",
|
|
12
|
+
"status_completed": "Completed",
|
|
13
|
+
"status_problem": "Problem",
|
|
14
|
+
"status_pending_fraud_review": "Pending_fraud_review",
|
|
15
|
+
"status_rejected": "Rejected",
|
|
16
|
+
"status_declined": "Declined",
|
|
17
|
+
"status_refunding": "Refunding",
|
|
18
|
+
"status_refunded": "Refunded",
|
|
19
|
+
"status_voided": "Voided",
|
|
20
|
+
"status_verified": "Verified",
|
|
21
|
+
"summary": "{{most_expensive_item.name}}",
|
|
22
|
+
"summary_plural": "{{most_expensive_item.name}} and {{count_minus_one}} more",
|
|
23
|
+
"summary_payment_method_change": "Payment method change",
|
|
24
|
+
"summary_subscription_modification": "Subscription modification",
|
|
25
|
+
"summary_subscription_cancellation": "Subscription cancellation",
|
|
26
|
+
"source_MIT": "This transaction was initiated by the merchant",
|
|
27
|
+
"source_CIT": "This transaction was initiated by the customer",
|
|
28
28
|
"spinner": {
|
|
29
29
|
"loading_busy": "Loading",
|
|
30
30
|
"loading_empty": "No data",
|
|
@@ -167,39 +167,29 @@ export class InternalAsyncListControl extends InternalEditableControl {
|
|
|
167
167
|
>
|
|
168
168
|
</foxy-internal-confirm-dialog>
|
|
169
169
|
`}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
<foxy-pagination first=${ifDefined(first)} infer="pagination">
|
|
175
|
-
<foxy-collection-page
|
|
176
|
-
class=${classMap({
|
|
177
|
-
'block divide-y divide-contrast-5 rounded overflow-hidden': true,
|
|
178
|
-
'ring-1 ring-inset ring-contrast-10': !this.form && !this.getPageHref,
|
|
179
|
-
'bg-contrast-5': !!this.form || !!this.getPageHref,
|
|
180
|
-
})}
|
|
181
|
-
infer="card"
|
|
182
|
-
.related=${this.related}
|
|
183
|
-
.props=${this.itemProps}
|
|
184
|
-
.item=${this.__itemRenderer}
|
|
185
|
-
>
|
|
186
|
-
</foxy-collection-page>
|
|
187
|
-
|
|
170
|
+
<div class="flex items-center justify-between mb-xs text-s font-medium">
|
|
171
|
+
<span class="text-secondary">
|
|
172
|
+
${this.label && this.label !== 'label' ? this.label : ''}
|
|
173
|
+
</span>
|
|
188
174
|
${(!this.form && !this.createPageHref) || this.readonly || this.hideCreateButton
|
|
189
175
|
? ''
|
|
190
176
|
: this.createPageHref && !this.disabled
|
|
191
177
|
? html `
|
|
192
178
|
<a
|
|
193
|
-
class="
|
|
179
|
+
class="rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50"
|
|
194
180
|
href=${this.createPageHref}
|
|
195
181
|
>
|
|
196
|
-
<foxy-i18n
|
|
182
|
+
<foxy-i18n
|
|
183
|
+
class="transition-opacity group-hover-opacity-80"
|
|
184
|
+
infer=""
|
|
185
|
+
key="create_button_text"
|
|
186
|
+
>
|
|
187
|
+
</foxy-i18n>
|
|
197
188
|
</a>
|
|
198
189
|
`
|
|
199
190
|
: html `
|
|
200
191
|
<vaadin-button
|
|
201
|
-
|
|
202
|
-
theme="success"
|
|
192
|
+
theme="tertiary-inline"
|
|
203
193
|
?disabled=${this.disabled}
|
|
204
194
|
@click=${(evt) => {
|
|
205
195
|
evt.preventDefault();
|
|
@@ -211,9 +201,24 @@ export class InternalAsyncListControl extends InternalEditableControl {
|
|
|
211
201
|
dialog.show(button);
|
|
212
202
|
}}
|
|
213
203
|
>
|
|
214
|
-
<foxy-i18n infer="" key="create_button_text"></foxy-i18n>
|
|
204
|
+
<foxy-i18n infer="pagination" key="create_button_text"></foxy-i18n>
|
|
215
205
|
</vaadin-button>
|
|
216
206
|
`}
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<foxy-pagination first=${ifDefined(first)} infer="pagination">
|
|
210
|
+
<foxy-collection-page
|
|
211
|
+
class=${classMap({
|
|
212
|
+
'block divide-y divide-contrast-5 rounded overflow-hidden': true,
|
|
213
|
+
'ring-1 ring-inset ring-contrast-10': !this.form && !this.getPageHref,
|
|
214
|
+
'bg-contrast-5': !!this.form || !!this.getPageHref,
|
|
215
|
+
})}
|
|
216
|
+
infer="card"
|
|
217
|
+
.related=${this.related}
|
|
218
|
+
.props=${this.itemProps}
|
|
219
|
+
.item=${this.__itemRenderer}
|
|
220
|
+
>
|
|
221
|
+
</foxy-collection-page>
|
|
217
222
|
</foxy-pagination>
|
|
218
223
|
`;
|
|
219
224
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalAsyncListControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalAsyncListControl/InternalAsyncListControl.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,8DAA2D;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,OAAO,wBAAyB,SAAQ,uBAAuB;IAArE;;QAqBE,oGAAoG;QACpG,2BAAsB,GAAG,KAAK,CAAC;QAE/B,kGAAkG;QAClG,yBAAoB,GAAG,KAAK,CAAC;QAE7B,iEAAiE;QACjE,mBAAc,GAAkB,IAAI,CAAC;QAErC,0DAA0D;QAC1D,YAAO,GAAG,EAAc,CAAC;QAEzB,yDAAyD;QACzD,UAAK,G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QH,IAAI,KAAK,CACC;oBACpB,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;;oBAEL,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,GAAG,CAAC;;eAEhB;aACR,CAAC;SACH;QAED,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;IAC1C,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { CollectionPage, NucleonElement } from '../../public/index';\nimport type { InternalConfirmDialog } from '../InternalConfirmDialog';\nimport type { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport type { ItemRenderer } from '../../public/CollectionPage/types';\nimport type { FormDialog } from '../../index';\n\nimport { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-element';\n\nexport class InternalAsyncListControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n keepDialogOpenOnDelete: { type: Boolean, attribute: 'keep-dialog-open-on-delete' },\n keepDialogOpenOnPost: { type: Boolean, attribute: 'keep-dialog-open-on-post' },\n hideDeleteButton: { type: Boolean, attribute: 'hide-delete-button' },\n hideCreateButton: { type: Boolean, attribute: 'hide-create-button' },\n createPageHref: { attribute: 'create-page-href' },\n getPageHref: { attribute: false },\n related: { type: Array },\n first: {},\n limit: { type: Number },\n form: {},\n item: {},\n itemProps: { type: Object, attribute: 'item-props' },\n wide: { type: Boolean },\n alert: { type: Boolean },\n };\n }\n\n /** If true, FormDialog won't automatically close after the associated form deletes the resource. */\n keepDialogOpenOnDelete = false;\n\n /** If true, FormDialog won't automatically close after the associated form creates a resource. */\n keepDialogOpenOnPost = false;\n\n /** If provided, renders Create button as a link to this page. */\n createPageHref: string | null = null;\n\n /** Same as the `related` property of `NucleonElement`. */\n related = [] as string[];\n\n /** Limit query parameter to apply to the `first` URL. */\n limit = 20;\n\n /** URI of the first page of the hAPI collection to display. */\n first: string | null = null;\n\n /** Same as the `form` property of `FormDialog`. If set, will open a dialog on item click. */\n form: FormDialog['form'] = null;\n\n /** Same as the `item` property of `CollectionPage`. */\n item: CollectionPage<any>['item'] = null;\n\n /** Props to pass through to the `CollectionPage` rendering items. */\n itemProps: Record<string, unknown> = {};\n\n /** Same as the `wide` property of `FormDialog`. */\n wide = false;\n\n /** Same as the `alert` property of `FormDialog`. */\n alert = false;\n\n /** Hides Delete Swipe Action if true. */\n hideDeleteButton = false;\n\n /** Hides Create button if true. */\n hideCreateButton = false;\n\n /** If set, renders list items as <a> tags. */\n getPageHref: ((itemHref: string, item: unknown) => string | null) | null = null;\n\n private __deletionConfimationCallback: (() => void) | null = null;\n\n private __cachedCardRenderer: {\n item: InternalAsyncListControl['item'];\n render: ItemRenderer;\n } | null = null;\n\n private __itemRenderer: ItemRenderer = ctx => {\n if (!ctx.data) return this.__cardRenderer(ctx);\n\n const href = this.getPageHref?.(ctx.href, ctx.data);\n if (typeof href !== 'string' && !this.form) return this.__cardRenderer(ctx);\n\n const isDisabled = this.disabledSelector.matches('card', true);\n const card = this.__cardRenderer(ctx);\n let clickableItem: TemplateResult;\n\n const wrapperClass = classMap({\n 'rounded-t': !ctx.previous,\n 'rounded-b': !ctx.next,\n 'focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50': true,\n 'text-left w-full block transition-colors': true,\n 'hover-bg-contrast-5': !isDisabled,\n });\n\n if (this.getPageHref) {\n if (isDisabled) {\n clickableItem = html`<div class=${wrapperClass}>${card}</div>`;\n } else {\n const href = this.getPageHref(ctx.href, ctx.data);\n clickableItem = html`<a class=${wrapperClass} href=${href}>${card}</a>`;\n }\n } else {\n const handleClick = (evt: Event) => {\n const button = evt.currentTarget as HTMLButtonElement;\n const dialog = this.__dialog;\n\n dialog.header = 'header_update';\n dialog.href = ctx.href;\n dialog.show(button);\n };\n\n clickableItem = html`\n <button ?disabled=${isDisabled} class=${wrapperClass} @click=${handleClick}>${card}</button>\n `;\n }\n\n if (this.hideDeleteButton || this.readonly) return clickableItem;\n\n return html`\n <foxy-swipe-actions class=\"block\">\n ${clickableItem}\n\n <vaadin-button\n theme=\"primary error\"\n class=\"h-full\"\n slot=\"action\"\n @click=${(evt: CustomEvent) => {\n const button = evt.currentTarget as HTMLElement;\n const confirm = this.renderRoot.querySelector('#confirm') as InternalConfirmDialog;\n\n confirm.show(button);\n\n this.__deletionConfimationCallback = () => {\n const cardButton = button.previousElementSibling!;\n const card = cardButton.querySelector<NucleonElement<any>>('[href]');\n\n card?.delete();\n this.__deletionConfimationCallback = null;\n };\n }}\n >\n <foxy-i18n infer=\"\" key=\"delete_button_text\"></foxy-i18n>\n </vaadin-button>\n </foxy-swipe-actions>\n `;\n };\n\n renderControl(): TemplateResult {\n let first: string | undefined;\n\n try {\n const url = new URL(this.first ?? '');\n url.searchParams.set('limit', String(this.limit));\n first = url.toString();\n } catch {\n first = undefined;\n }\n\n return html`\n ${this.form\n ? html`\n <foxy-form-dialog\n parent=${ifDefined(this.first ?? void 0)}\n infer=\"dialog\"\n id=\"form\"\n ?wide=${this.wide}\n ?alert=${this.alert}\n ?keep-open-on-post=${this.keepDialogOpenOnPost}\n ?keep-open-on-delete=${this.keepDialogOpenOnDelete}\n .related=${this.related}\n .form=${this.form as any}\n >\n </foxy-form-dialog>\n `\n : ''}\n ${this.hideDeleteButton || this.readonly\n ? ''\n : html`\n <foxy-internal-confirm-dialog\n message=\"delete_message\"\n confirm=\"delete_confirm\"\n cancel=\"delete_cancel\"\n header=\"delete_header\"\n theme=\"error\"\n infer=\"\"\n id=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.__deletionConfimationCallback?.();\n }}\n >\n </foxy-internal-confirm-dialog>\n `}\n ${this.label && this.label !== 'label'\n ? html`<div class=\"font-medium text-secondary text-s mb-xs\">${this.label}</div>`\n : ''}\n\n <foxy-pagination first=${ifDefined(first)} infer=\"pagination\">\n <foxy-collection-page\n class=${classMap({\n 'block divide-y divide-contrast-5 rounded overflow-hidden': true,\n 'ring-1 ring-inset ring-contrast-10': !this.form && !this.getPageHref,\n 'bg-contrast-5': !!this.form || !!this.getPageHref,\n })}\n infer=\"card\"\n .related=${this.related}\n .props=${this.itemProps}\n .item=${this.__itemRenderer as any}\n >\n </foxy-collection-page>\n\n ${(!this.form && !this.createPageHref) || this.readonly || this.hideCreateButton\n ? ''\n : this.createPageHref && !this.disabled\n ? html`\n <a\n class=\"mt-s w-full flex items-center justify-center h-m px-m rounded text-m font-medium transition-colors bg-contrast-5 text-success hover-bg-contrast-10 focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=${this.createPageHref}\n >\n <foxy-i18n infer=\"\" key=\"create_button_text\"></foxy-i18n>\n </a>\n `\n : html`\n <vaadin-button\n class=\"mt-s w-full\"\n theme=\"success\"\n ?disabled=${this.disabled}\n @click=${(evt: Event) => {\n evt.preventDefault();\n evt.stopPropagation();\n\n const dialog = this.__dialog;\n const button = evt.currentTarget as HTMLButtonElement;\n\n dialog.header = 'header_create';\n dialog.href = '';\n dialog.show(button);\n }}\n >\n <foxy-i18n infer=\"\" key=\"create_button_text\"></foxy-i18n>\n </vaadin-button>\n `}\n </foxy-pagination>\n `;\n }\n\n private get __dialog() {\n return this.renderRoot.querySelector('#form') as FormDialog;\n }\n\n private get __cardRenderer() {\n const item = this.item;\n\n if (this.__cachedCardRenderer?.item !== item) {\n this.__cachedCardRenderer = {\n item: item,\n render:\n typeof item === 'string'\n ? (new Function(\n 'ctx',\n `return ctx.html\\`\n <${item}\n related=\\${JSON.stringify(ctx.related)}\n parent=\\${ctx.parent}\n style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n infer=\"\"\n href=\\${ctx.href}\n ...=\\${ctx.spread(ctx.props)}\n >\n </${item}>\\``\n ) as ItemRenderer)\n : ctx => html`\n <div style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\">\n ${item?.(ctx)}\n </div>\n `,\n };\n }\n\n return this.__cachedCardRenderer.render;\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"InternalAsyncListControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalAsyncListControl/InternalAsyncListControl.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,uBAAuB,EAAE,8DAA2D;AAC7F,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,QAAQ,EAAE,oCAAiC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AAEnC,MAAM,OAAO,wBAAyB,SAAQ,uBAAuB;IAArE;;QAqBE,oGAAoG;QACpG,2BAAsB,GAAG,KAAK,CAAC;QAE/B,kGAAkG;QAClG,yBAAoB,GAAG,KAAK,CAAC;QAE7B,iEAAiE;QACjE,mBAAc,GAAkB,IAAI,CAAC;QAErC,0DAA0D;QAC1D,YAAO,GAAG,EAAc,CAAC;QAEzB,yDAAyD;QACzD,UAAK,GAAG,EAAE,CAAC;QAEX,+DAA+D;QAC/D,UAAK,GAAkB,IAAI,CAAC;QAE5B,6FAA6F;QAC7F,SAAI,GAAuB,IAAI,CAAC;QAEhC,uDAAuD;QACvD,SAAI,GAAgC,IAAI,CAAC;QAEzC,qEAAqE;QACrE,cAAS,GAA4B,EAAE,CAAC;QAExC,mDAAmD;QACnD,SAAI,GAAG,KAAK,CAAC;QAEb,oDAAoD;QACpD,UAAK,GAAG,KAAK,CAAC;QAEd,yCAAyC;QACzC,qBAAgB,GAAG,KAAK,CAAC;QAEzB,mCAAmC;QACnC,qBAAgB,GAAG,KAAK,CAAC;QAEzB,8CAA8C;QAC9C,gBAAW,GAAgE,IAAI,CAAC;QAExE,kCAA6B,GAAwB,IAAI,CAAC;QAE1D,yBAAoB,GAGjB,IAAI,CAAC;QAER,mBAAc,GAAiB,GAAG,CAAC,EAAE;;YAC3C,IAAI,CAAC,GAAG,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC,cAAc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Ae,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW;SACnD,CAAC;;qBAES,IAAI,CAAC,OAAO;mBACd,IAAI,CAAC,SAAS;kBACf,IAAI,CAAC,cAAqB;;;;KAIvC,CAAC;IACJ,CAAC;IAED,IAAY,QAAQ;QAClB,OAAO,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC,OAAO,CAAe,CAAC;IAC9D,CAAC;IAED,IAAY,cAAc;;QACxB,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAC;QAEvB,IAAI,OAAA,IAAI,CAAC,oBAAoB,0CAAE,IAAI,MAAK,IAAI,EAAE;YAC5C,IAAI,CAAC,oBAAoB,GAAG;gBAC1B,IAAI,EAAE,IAAI;gBACV,MAAM,EACJ,OAAO,IAAI,KAAK,QAAQ;oBACtB,CAAC,CAAE,IAAI,QAAQ,CACX,KAAK,EACL;qBACK,IAAI;;;;;;;;sBAQH,IAAI,KAAK,CACC;oBACpB,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAA;;oBAEL,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAG,GAAG,CAAC;;eAEhB;aACR,CAAC;SACH;QAED,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC;IAC1C,CAAC;CACF","sourcesContent":["import type { PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { CollectionPage, NucleonElement } from '../../public/index';\nimport type { InternalConfirmDialog } from '../InternalConfirmDialog';\nimport type { DialogHideEvent } from '../../private/Dialog/DialogHideEvent';\nimport type { ItemRenderer } from '../../public/CollectionPage/types';\nimport type { FormDialog } from '../../index';\n\nimport { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { classMap } from '../../../utils/class-map';\nimport { html } from 'lit-element';\n\nexport class InternalAsyncListControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n keepDialogOpenOnDelete: { type: Boolean, attribute: 'keep-dialog-open-on-delete' },\n keepDialogOpenOnPost: { type: Boolean, attribute: 'keep-dialog-open-on-post' },\n hideDeleteButton: { type: Boolean, attribute: 'hide-delete-button' },\n hideCreateButton: { type: Boolean, attribute: 'hide-create-button' },\n createPageHref: { attribute: 'create-page-href' },\n getPageHref: { attribute: false },\n related: { type: Array },\n first: {},\n limit: { type: Number },\n form: {},\n item: {},\n itemProps: { type: Object, attribute: 'item-props' },\n wide: { type: Boolean },\n alert: { type: Boolean },\n };\n }\n\n /** If true, FormDialog won't automatically close after the associated form deletes the resource. */\n keepDialogOpenOnDelete = false;\n\n /** If true, FormDialog won't automatically close after the associated form creates a resource. */\n keepDialogOpenOnPost = false;\n\n /** If provided, renders Create button as a link to this page. */\n createPageHref: string | null = null;\n\n /** Same as the `related` property of `NucleonElement`. */\n related = [] as string[];\n\n /** Limit query parameter to apply to the `first` URL. */\n limit = 20;\n\n /** URI of the first page of the hAPI collection to display. */\n first: string | null = null;\n\n /** Same as the `form` property of `FormDialog`. If set, will open a dialog on item click. */\n form: FormDialog['form'] = null;\n\n /** Same as the `item` property of `CollectionPage`. */\n item: CollectionPage<any>['item'] = null;\n\n /** Props to pass through to the `CollectionPage` rendering items. */\n itemProps: Record<string, unknown> = {};\n\n /** Same as the `wide` property of `FormDialog`. */\n wide = false;\n\n /** Same as the `alert` property of `FormDialog`. */\n alert = false;\n\n /** Hides Delete Swipe Action if true. */\n hideDeleteButton = false;\n\n /** Hides Create button if true. */\n hideCreateButton = false;\n\n /** If set, renders list items as <a> tags. */\n getPageHref: ((itemHref: string, item: unknown) => string | null) | null = null;\n\n private __deletionConfimationCallback: (() => void) | null = null;\n\n private __cachedCardRenderer: {\n item: InternalAsyncListControl['item'];\n render: ItemRenderer;\n } | null = null;\n\n private __itemRenderer: ItemRenderer = ctx => {\n if (!ctx.data) return this.__cardRenderer(ctx);\n\n const href = this.getPageHref?.(ctx.href, ctx.data);\n if (typeof href !== 'string' && !this.form) return this.__cardRenderer(ctx);\n\n const isDisabled = this.disabledSelector.matches('card', true);\n const card = this.__cardRenderer(ctx);\n let clickableItem: TemplateResult;\n\n const wrapperClass = classMap({\n 'rounded-t': !ctx.previous,\n 'rounded-b': !ctx.next,\n 'focus-outline-none focus-ring-2 focus-ring-inset focus-ring-primary-50': true,\n 'text-left w-full block transition-colors': true,\n 'hover-bg-contrast-5': !isDisabled,\n });\n\n if (this.getPageHref) {\n if (isDisabled) {\n clickableItem = html`<div class=${wrapperClass}>${card}</div>`;\n } else {\n const href = this.getPageHref(ctx.href, ctx.data);\n clickableItem = html`<a class=${wrapperClass} href=${href}>${card}</a>`;\n }\n } else {\n const handleClick = (evt: Event) => {\n const button = evt.currentTarget as HTMLButtonElement;\n const dialog = this.__dialog;\n\n dialog.header = 'header_update';\n dialog.href = ctx.href;\n dialog.show(button);\n };\n\n clickableItem = html`\n <button ?disabled=${isDisabled} class=${wrapperClass} @click=${handleClick}>${card}</button>\n `;\n }\n\n if (this.hideDeleteButton || this.readonly) return clickableItem;\n\n return html`\n <foxy-swipe-actions class=\"block\">\n ${clickableItem}\n\n <vaadin-button\n theme=\"primary error\"\n class=\"h-full\"\n slot=\"action\"\n @click=${(evt: CustomEvent) => {\n const button = evt.currentTarget as HTMLElement;\n const confirm = this.renderRoot.querySelector('#confirm') as InternalConfirmDialog;\n\n confirm.show(button);\n\n this.__deletionConfimationCallback = () => {\n const cardButton = button.previousElementSibling!;\n const card = cardButton.querySelector<NucleonElement<any>>('[href]');\n\n card?.delete();\n this.__deletionConfimationCallback = null;\n };\n }}\n >\n <foxy-i18n infer=\"\" key=\"delete_button_text\"></foxy-i18n>\n </vaadin-button>\n </foxy-swipe-actions>\n `;\n };\n\n renderControl(): TemplateResult {\n let first: string | undefined;\n\n try {\n const url = new URL(this.first ?? '');\n url.searchParams.set('limit', String(this.limit));\n first = url.toString();\n } catch {\n first = undefined;\n }\n\n return html`\n ${this.form\n ? html`\n <foxy-form-dialog\n parent=${ifDefined(this.first ?? void 0)}\n infer=\"dialog\"\n id=\"form\"\n ?wide=${this.wide}\n ?alert=${this.alert}\n ?keep-open-on-post=${this.keepDialogOpenOnPost}\n ?keep-open-on-delete=${this.keepDialogOpenOnDelete}\n .related=${this.related}\n .form=${this.form as any}\n >\n </foxy-form-dialog>\n `\n : ''}\n ${this.hideDeleteButton || this.readonly\n ? ''\n : html`\n <foxy-internal-confirm-dialog\n message=\"delete_message\"\n confirm=\"delete_confirm\"\n cancel=\"delete_cancel\"\n header=\"delete_header\"\n theme=\"error\"\n infer=\"\"\n id=\"confirm\"\n @hide=${(evt: DialogHideEvent) => {\n if (!evt.detail.cancelled) this.__deletionConfimationCallback?.();\n }}\n >\n </foxy-internal-confirm-dialog>\n `}\n <div class=\"flex items-center justify-between mb-xs text-s font-medium\">\n <span class=\"text-secondary\">\n ${this.label && this.label !== 'label' ? this.label : ''}\n </span>\n ${(!this.form && !this.createPageHref) || this.readonly || this.hideCreateButton\n ? ''\n : this.createPageHref && !this.disabled\n ? html`\n <a\n class=\"rounded-s text-primary group focus-outline-none focus-ring-2 focus-ring-primary-50\"\n href=${this.createPageHref}\n >\n <foxy-i18n\n class=\"transition-opacity group-hover-opacity-80\"\n infer=\"\"\n key=\"create_button_text\"\n >\n </foxy-i18n>\n </a>\n `\n : html`\n <vaadin-button\n theme=\"tertiary-inline\"\n ?disabled=${this.disabled}\n @click=${(evt: Event) => {\n evt.preventDefault();\n evt.stopPropagation();\n\n const dialog = this.__dialog;\n const button = evt.currentTarget as HTMLButtonElement;\n\n dialog.header = 'header_create';\n dialog.href = '';\n dialog.show(button);\n }}\n >\n <foxy-i18n infer=\"pagination\" key=\"create_button_text\"></foxy-i18n>\n </vaadin-button>\n `}\n </div>\n\n <foxy-pagination first=${ifDefined(first)} infer=\"pagination\">\n <foxy-collection-page\n class=${classMap({\n 'block divide-y divide-contrast-5 rounded overflow-hidden': true,\n 'ring-1 ring-inset ring-contrast-10': !this.form && !this.getPageHref,\n 'bg-contrast-5': !!this.form || !!this.getPageHref,\n })}\n infer=\"card\"\n .related=${this.related}\n .props=${this.itemProps}\n .item=${this.__itemRenderer as any}\n >\n </foxy-collection-page>\n </foxy-pagination>\n `;\n }\n\n private get __dialog() {\n return this.renderRoot.querySelector('#form') as FormDialog;\n }\n\n private get __cardRenderer() {\n const item = this.item;\n\n if (this.__cachedCardRenderer?.item !== item) {\n this.__cachedCardRenderer = {\n item: item,\n render:\n typeof item === 'string'\n ? (new Function(\n 'ctx',\n `return ctx.html\\`\n <${item}\n related=\\${JSON.stringify(ctx.related)}\n parent=\\${ctx.parent}\n style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\"\n infer=\"\"\n href=\\${ctx.href}\n ...=\\${ctx.spread(ctx.props)}\n >\n </${item}>\\``\n ) as ItemRenderer)\n : ctx => html`\n <div style=\"padding: calc(0.625em + (var(--lumo-border-radius) / 4) - 1px)\">\n ${item?.(ctx)}\n </div>\n `,\n };\n }\n\n return this.__cachedCardRenderer.render;\n }\n}\n"]}
|