@foxy.io/elements 1.18.0-beta.12 → 1.18.0-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +2 -2
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-api-browser.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-cancellation-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 +2 -2
- 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-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-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.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-nucleon-element.js +1 -1
- package/dist/cdn/foxy-pagination.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 +12 -12
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-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-form.js +1 -0
- 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 +4 -4
- 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-card.js +1 -0
- 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-form.js +1 -0
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-user-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-14afc5c6.js → shared-04046e0e.js} +1 -1
- package/dist/cdn/{shared-4a2e1638.js → shared-0bbbc87f.js} +1 -1
- package/dist/cdn/shared-0cc4beec.js +6 -0
- package/dist/cdn/{shared-3ba0d0e8.js → shared-0ecc7d2c.js} +1 -1
- package/dist/cdn/{shared-4e2e233c.js → shared-119efeaa.js} +1 -1
- package/dist/cdn/shared-11be3c89.js +1 -0
- package/dist/cdn/{shared-5a823202.js → shared-14dc506c.js} +1 -1
- package/dist/cdn/shared-15278fe0.js +1 -0
- package/dist/cdn/{shared-1c9fd2b1.js → shared-19044260.js} +1 -1
- package/dist/cdn/{shared-d187b584.js → shared-19440ca2.js} +1 -1
- package/dist/cdn/shared-1eb24528.js +1 -0
- package/dist/cdn/shared-214c34b5.js +1 -0
- package/dist/cdn/{shared-dfdf021a.js → shared-23e0d67e.js} +1 -1
- package/dist/cdn/{shared-3214ee1b.js → shared-290769ea.js} +1 -1
- package/dist/cdn/{shared-7c8b3ce0.js → shared-2af327d0.js} +1 -1
- package/dist/cdn/{shared-0ca312eb.js → shared-35a7a4d6.js} +1 -1
- package/dist/cdn/{shared-0008cf8e.js → shared-36aaf815.js} +5 -5
- package/dist/cdn/{shared-f00d31e0.js → shared-3a84611d.js} +1 -1
- package/dist/cdn/{shared-dbb66347.js → shared-3e781cc9.js} +1 -1
- package/dist/cdn/{shared-de5fc645.js → shared-418e88da.js} +1 -1
- package/dist/cdn/{shared-5f751bfc.js → shared-435ab348.js} +1 -1
- package/dist/cdn/{shared-3d245899.js → shared-4a519a4a.js} +1 -1
- package/dist/cdn/{shared-b0ba62ff.js → shared-4a796610.js} +1 -1
- package/dist/cdn/{shared-ccb96675.js → shared-4c61787a.js} +1 -1
- package/dist/cdn/{shared-74e79000.js → shared-4ebfd7ef.js} +7 -7
- package/dist/cdn/{shared-ba4053b3.js → shared-4fa44231.js} +1 -1
- package/dist/cdn/{shared-ad70817d.js → shared-553e6472.js} +1 -1
- package/dist/cdn/{shared-dc891fc4.js → shared-5cb39f03.js} +1 -1
- package/dist/cdn/{shared-54deb3dc.js → shared-67f1821b.js} +1 -1
- package/dist/cdn/shared-682dbe0a.js +1 -0
- package/dist/cdn/{shared-19bdb896.js → shared-73a8b603.js} +1 -1
- package/dist/cdn/{shared-b1304f5b.js → shared-7415fa7e.js} +1 -1
- package/dist/cdn/shared-779795c5.js +1 -0
- package/dist/cdn/{shared-a6263179.js → shared-81d3ff30.js} +1 -1
- package/dist/cdn/{shared-8dd640bf.js → shared-8d9c0007.js} +1 -1
- package/dist/cdn/{shared-61174bec.js → shared-915fb0e4.js} +12 -17
- package/dist/cdn/{shared-d8faafc7.js → shared-9195959e.js} +1 -1
- package/dist/cdn/{shared-c566fe52.js → shared-93548d58.js} +1 -1
- package/dist/cdn/{shared-0ffa1afb.js → shared-93a1be98.js} +1 -1
- package/dist/cdn/{shared-9aab51c0.js → shared-96ebc59f.js} +1 -1
- package/dist/cdn/shared-9a0f97e5.js +1 -0
- package/dist/cdn/{shared-39cb3be1.js → shared-9afb80a6.js} +1 -1
- package/dist/cdn/{shared-3fd94d2f.js → shared-a0e71609.js} +1 -1
- package/dist/cdn/shared-a420358e.js +1 -0
- package/dist/cdn/{shared-3c7489d6.js → shared-a42a63aa.js} +1 -1
- package/dist/cdn/shared-a8966936.js +1 -0
- package/dist/cdn/{shared-c99a75d8.js → shared-aa4bf9ab.js} +1 -1
- package/dist/cdn/shared-b1201c2e.js +1 -0
- package/dist/cdn/{shared-b866f3a7.js → shared-b20753b8.js} +1 -1
- package/dist/cdn/shared-b2850d64.js +1 -0
- package/dist/cdn/{shared-b7787aae.js → shared-c3a3d9f6.js} +3 -3
- package/dist/cdn/shared-c7ab6598.js +1 -0
- package/dist/cdn/{shared-6d69487b.js → shared-c7cae9e6.js} +1 -1
- package/dist/cdn/{shared-a93f4ae9.js → shared-d24c3729.js} +1 -1
- package/dist/cdn/shared-d6276c83.js +1 -0
- package/dist/cdn/shared-d75c6072.js +1 -0
- package/dist/cdn/shared-d82f3ba0.js +1 -0
- package/dist/cdn/{shared-d9c5e26e.js → shared-d8bf2eac.js} +1 -1
- package/dist/cdn/{shared-66a0263f.js → shared-d9a3104e.js} +1 -1
- package/dist/cdn/shared-da285807.js +169 -0
- package/dist/cdn/shared-e1069291.js +1 -0
- package/dist/cdn/{shared-96695c93.js → shared-e32be255.js} +4 -4
- package/dist/cdn/{shared-f0591b3e.js → shared-e4383064.js} +1 -1
- package/dist/cdn/shared-e4e93604.js +1 -0
- package/dist/cdn/shared-eab81bf4.js +1 -0
- package/dist/cdn/shared-effdf59d.js +1 -0
- package/dist/cdn/translations/email-template-card/en.json +5 -1
- package/dist/cdn/translations/store-form/en.json +311 -0
- package/dist/cdn/translations/template-config-form/en.json +4 -0
- package/dist/cdn/translations/template-set-form/en.json +384 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts +1 -0
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js +15 -15
- package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map +1 -1
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.d.ts +11 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js +143 -0
- package/dist/elements/internal/InternalEditableListControl/InternalEditableListControl.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/index.d.ts +3 -0
- package/dist/elements/internal/InternalEditableListControl/index.js +5 -0
- package/dist/elements/internal/InternalEditableListControl/index.js.map +1 -0
- package/dist/elements/internal/InternalEditableListControl/types.d.ts +9 -0
- package/dist/elements/internal/InternalEditableListControl/types.js +2 -0
- package/dist/elements/internal/InternalEditableListControl/types.js.map +1 -0
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.d.ts +6 -1
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js +25 -12
- package/dist/elements/internal/InternalFrequencyControl/InternalFrequencyControl.js.map +1 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.d.ts +4 -1
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js +15 -0
- package/dist/elements/internal/InternalIntegerControl/InternalIntegerControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.d.ts +13 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js +40 -0
- package/dist/elements/internal/InternalPasswordControl/InternalPasswordControl.js.map +1 -0
- package/dist/elements/internal/InternalPasswordControl/index.d.ts +4 -0
- package/dist/elements/internal/InternalPasswordControl/index.js +6 -0
- package/dist/elements/internal/InternalPasswordControl/index.js.map +1 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.d.ts +2 -0
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js +20 -9
- package/dist/elements/internal/InternalSelectControl/InternalSelectControl.js.map +1 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.d.ts +4 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +15 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js +11 -11
- package/dist/elements/public/EmailTemplateCard/EmailTemplateCard.js.map +1 -1
- package/dist/elements/public/NucleonElement/NucleonElement.js +13 -3
- package/dist/elements/public/NucleonElement/NucleonElement.js.map +1 -1
- package/dist/elements/public/NucleonElement/UpdateEvent.d.ts +10 -2
- package/dist/elements/public/NucleonElement/UpdateEvent.js +8 -2
- package/dist/elements/public/NucleonElement/UpdateEvent.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +55 -0
- package/dist/elements/public/StoreForm/StoreForm.js +1023 -0
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -0
- package/dist/elements/public/StoreForm/index.d.ts +15 -0
- package/dist/elements/public/StoreForm/index.js +17 -0
- package/dist/elements/public/StoreForm/index.js.map +1 -0
- package/dist/elements/public/StoreForm/types.d.ts +3 -0
- package/dist/elements/public/StoreForm/types.js +2 -0
- package/dist/elements/public/StoreForm/types.js.map +1 -0
- package/dist/elements/public/TemplateCard/TemplateCard.d.ts +10 -0
- package/dist/elements/public/TemplateCard/TemplateCard.js +18 -0
- package/dist/elements/public/TemplateCard/TemplateCard.js.map +1 -0
- package/dist/elements/public/TemplateCard/index.d.ts +4 -0
- package/dist/elements/public/TemplateCard/index.js +6 -0
- package/dist/elements/public/TemplateCard/index.js.map +1 -0
- package/dist/elements/public/TemplateCard/types.d.ts +3 -0
- package/dist/elements/public/TemplateCard/types.js +2 -0
- package/dist/elements/public/TemplateCard/types.js.map +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.d.ts +1 -0
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js +56 -7
- package/dist/elements/public/TemplateConfigForm/TemplateConfigForm.js.map +1 -1
- package/dist/elements/public/TemplateConfigForm/index.d.ts +1 -0
- package/dist/elements/public/TemplateConfigForm/index.js +1 -0
- package/dist/elements/public/TemplateConfigForm/index.js.map +1 -1
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.d.ts +44 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js +360 -0
- package/dist/elements/public/TemplateSetForm/TemplateSetForm.js.map +1 -0
- package/dist/elements/public/TemplateSetForm/index.d.ts +15 -0
- package/dist/elements/public/TemplateSetForm/index.js +17 -0
- package/dist/elements/public/TemplateSetForm/index.js.map +1 -0
- package/dist/elements/public/TemplateSetForm/types.d.ts +3 -0
- package/dist/elements/public/TemplateSetForm/types.js +2 -0
- package/dist/elements/public/TemplateSetForm/types.js.map +1 -0
- package/dist/elements/public/index.d.ts +3 -0
- package/dist/elements/public/index.defined.d.ts +3 -0
- package/dist/elements/public/index.defined.js +3 -0
- package/dist/elements/public/index.defined.js.map +1 -1
- package/dist/elements/public/index.js +3 -0
- package/dist/elements/public/index.js.map +1 -1
- package/dist/mixins/configurable.js +9 -0
- package/dist/mixins/configurable.js.map +1 -1
- package/dist/mixins/themeable.js +304 -0
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-02c6c308.js +0 -169
- package/dist/cdn/shared-164a791e.js +0 -1
- package/dist/cdn/shared-24d650cd.js +0 -1
- package/dist/cdn/shared-27089ebf.js +0 -1
- package/dist/cdn/shared-425d906a.js +0 -1
- package/dist/cdn/shared-4a4eab8b.js +0 -1
- package/dist/cdn/shared-4cd53ea2.js +0 -1
- package/dist/cdn/shared-6d175df8.js +0 -1
- package/dist/cdn/shared-73ac094b.js +0 -1
- package/dist/cdn/shared-7684cb05.js +0 -1
- package/dist/cdn/shared-a03d948d.js +0 -1
- package/dist/cdn/shared-a2efb819.js +0 -1
- package/dist/cdn/shared-d5ef2683.js +0 -1
- package/dist/cdn/shared-ea58e244.js +0 -1
- package/dist/cdn/shared-ff31023c.js +0 -1
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": {
|
|
3
|
+
"label": "Description",
|
|
4
|
+
"placeholder": "Required - e.g. My Template Set",
|
|
5
|
+
"helper_text": "",
|
|
6
|
+
"v8n_required": "Please enter a description for this set",
|
|
7
|
+
"v8n_too_long": "Please reduce this description to 100 characters or less"
|
|
8
|
+
},
|
|
9
|
+
"code": {
|
|
10
|
+
"label": "Code",
|
|
11
|
+
"placeholder": "Required - e.g. MY-TEMPLATE-SET",
|
|
12
|
+
"helper_text": "",
|
|
13
|
+
"v8n_required": "Please enter a code for this set",
|
|
14
|
+
"v8n_too_long": "Please reduce this code to 50 characters or less"
|
|
15
|
+
},
|
|
16
|
+
"cart-template-uri": {
|
|
17
|
+
"template": "Template",
|
|
18
|
+
"cache": "Cache",
|
|
19
|
+
"cancel": "Cancel",
|
|
20
|
+
"default": "Default",
|
|
21
|
+
"description": "Description",
|
|
22
|
+
"template_clipboard": "From clipboard",
|
|
23
|
+
"template_clipboard_explainer": "Paste the template here to use it",
|
|
24
|
+
"template_default": "Default",
|
|
25
|
+
"template_default_explainer": "Use the default template",
|
|
26
|
+
"template_url": "From URL",
|
|
27
|
+
"template_url_explainer": "Fetch the template from a public URL",
|
|
28
|
+
"spinner": {
|
|
29
|
+
"loading_busy": "Loading",
|
|
30
|
+
"loading_error": "Failed to load"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"cart-include-template-uri": {
|
|
34
|
+
"template": "Template",
|
|
35
|
+
"cache": "Cache",
|
|
36
|
+
"cancel": "Cancel",
|
|
37
|
+
"default": "Default",
|
|
38
|
+
"description": "Description",
|
|
39
|
+
"template_clipboard": "From clipboard",
|
|
40
|
+
"template_clipboard_explainer": "Paste the template here to use it",
|
|
41
|
+
"template_default": "Default",
|
|
42
|
+
"template_default_explainer": "Use the default template",
|
|
43
|
+
"template_url": "From URL",
|
|
44
|
+
"template_url_explainer": "Fetch the template from a public URL",
|
|
45
|
+
"spinner": {
|
|
46
|
+
"loading_busy": "Loading",
|
|
47
|
+
"loading_error": "Failed to load"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"checkout-template-uri": {
|
|
51
|
+
"template": "Template",
|
|
52
|
+
"cache": "Cache",
|
|
53
|
+
"cancel": "Cancel",
|
|
54
|
+
"default": "Default",
|
|
55
|
+
"description": "Description",
|
|
56
|
+
"template_clipboard": "From clipboard",
|
|
57
|
+
"template_clipboard_explainer": "Paste the template here to use it",
|
|
58
|
+
"template_default": "Default",
|
|
59
|
+
"template_default_explainer": "Use the default template",
|
|
60
|
+
"template_url": "From URL",
|
|
61
|
+
"template_url_explainer": "Fetch the template from a public URL",
|
|
62
|
+
"spinner": {
|
|
63
|
+
"loading_busy": "Loading",
|
|
64
|
+
"loading_error": "Failed to load"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"receipt-template-uri": {
|
|
68
|
+
"template": "Template",
|
|
69
|
+
"cache": "Cache",
|
|
70
|
+
"cancel": "Cancel",
|
|
71
|
+
"default": "Default",
|
|
72
|
+
"description": "Description",
|
|
73
|
+
"template_clipboard": "From clipboard",
|
|
74
|
+
"template_clipboard_explainer": "Paste the template here to use it",
|
|
75
|
+
"template_default": "Default",
|
|
76
|
+
"template_default_explainer": "Use the default template",
|
|
77
|
+
"template_url": "From URL",
|
|
78
|
+
"template_url_explainer": "Fetch the template from a public URL",
|
|
79
|
+
"spinner": {
|
|
80
|
+
"loading_busy": "Loading",
|
|
81
|
+
"loading_error": "Failed to load"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"email-template-uri": {
|
|
85
|
+
"cache": "Cache",
|
|
86
|
+
"cancel": "Cancel",
|
|
87
|
+
"confirm": "Confirm",
|
|
88
|
+
"default": "Default",
|
|
89
|
+
"html_template": "HTML template",
|
|
90
|
+
"template_clipboard": "From clipboard",
|
|
91
|
+
"template_clipboard_explainer": "Paste the template here to use it",
|
|
92
|
+
"template_default": "Default",
|
|
93
|
+
"template_default_explainer": "Use the default template",
|
|
94
|
+
"template_url": "From URL",
|
|
95
|
+
"template_url_explainer": "Fetch the template from a public URL",
|
|
96
|
+
"text_template": "Text template",
|
|
97
|
+
"template-language": {
|
|
98
|
+
"label": "Language",
|
|
99
|
+
"placeholder": "Default (Nunjucks)",
|
|
100
|
+
"helper_text": ""
|
|
101
|
+
},
|
|
102
|
+
"spinner": {
|
|
103
|
+
"loading_busy": "Loading",
|
|
104
|
+
"loading_error": "Failed to load"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"language": {
|
|
108
|
+
"label": "Language",
|
|
109
|
+
"placeholder": "Select language",
|
|
110
|
+
"helper_text": "",
|
|
111
|
+
"v8n_required": "Please select a language for this set"
|
|
112
|
+
},
|
|
113
|
+
"locale-code": {
|
|
114
|
+
"label": "Locale",
|
|
115
|
+
"placeholder": "Select locale",
|
|
116
|
+
"helper_text": "",
|
|
117
|
+
"v8n_required": "Please select a locale for this set"
|
|
118
|
+
},
|
|
119
|
+
"header_general": "General",
|
|
120
|
+
"config": {
|
|
121
|
+
"payment-method-set-uri": {
|
|
122
|
+
"is-live": {
|
|
123
|
+
"label": "",
|
|
124
|
+
"option_live": "Use live credentials",
|
|
125
|
+
"helper_text": ""
|
|
126
|
+
},
|
|
127
|
+
"is-purchase-order-enabled": {
|
|
128
|
+
"label": "",
|
|
129
|
+
"option_true": "Allow purchase orders",
|
|
130
|
+
"helper_text": ""
|
|
131
|
+
},
|
|
132
|
+
"payment-methods": {
|
|
133
|
+
"delete_header": "Remove payment method",
|
|
134
|
+
"delete_message": "Are you sure you'd like to remove this payment method? You'll need to configure it again if you decide to bring it back.",
|
|
135
|
+
"delete_confirm": "Remove",
|
|
136
|
+
"delete_cancel": "Cancel",
|
|
137
|
+
"title": "Payment methods",
|
|
138
|
+
"dialog": {
|
|
139
|
+
"header_update": "Payment method",
|
|
140
|
+
"header_create": "New payment method",
|
|
141
|
+
"close": "Close",
|
|
142
|
+
"cancel": "Cancel",
|
|
143
|
+
"save": "Save",
|
|
144
|
+
"undo_header": "Unsaved changes",
|
|
145
|
+
"undo_message": "Looks like you didn't save your changes! What would you like to do with them?",
|
|
146
|
+
"undo_cancel": "Review",
|
|
147
|
+
"undo_confirm": "Discard"
|
|
148
|
+
},
|
|
149
|
+
"pagination": {
|
|
150
|
+
"create_button_text": "Add payment method",
|
|
151
|
+
"card": {
|
|
152
|
+
"delete_button_text": "Remove"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
"fraud-protections": {
|
|
157
|
+
"delete_header": "Remove fraud protection",
|
|
158
|
+
"delete_message": "Are you sure you'd like to remove this fraud protection? You'll need to configure it again if you decide to bring it back.",
|
|
159
|
+
"delete_confirm": "Remove",
|
|
160
|
+
"delete_cancel": "Cancel",
|
|
161
|
+
"title": "Fraud protections",
|
|
162
|
+
"dialog": {
|
|
163
|
+
"header_update": "Fraud protection",
|
|
164
|
+
"header_create": "New fraud protection",
|
|
165
|
+
"close": "Close",
|
|
166
|
+
"cancel": "Cancel",
|
|
167
|
+
"save": "Save",
|
|
168
|
+
"undo_header": "Unsaved changes",
|
|
169
|
+
"undo_message": "Looks like you didn't save your changes! What would you like to do with them?",
|
|
170
|
+
"undo_cancel": "Review",
|
|
171
|
+
"undo_confirm": "Discard"
|
|
172
|
+
},
|
|
173
|
+
"pagination": {
|
|
174
|
+
"create_button_text": "Add fraud protection",
|
|
175
|
+
"card": {
|
|
176
|
+
"delete_button_text": "Remove"
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
},
|
|
180
|
+
"spinner": {
|
|
181
|
+
"loading_busy": "Loading",
|
|
182
|
+
"loading_error": "Failed to load"
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
"template-dialog": {
|
|
186
|
+
"cart_template_uri_header": "Cart template",
|
|
187
|
+
"cart_include_template_uri_header": "Cart include template",
|
|
188
|
+
"checkout_template_uri_header": "Checkout template",
|
|
189
|
+
"receipt_template_uri_header": "Web receipt template",
|
|
190
|
+
"email_template_uri_header": "Email receipt template",
|
|
191
|
+
"close": "Close",
|
|
192
|
+
"cancel": "Cancel",
|
|
193
|
+
"save": "Save",
|
|
194
|
+
"undo_header": "Unsaved changes",
|
|
195
|
+
"undo_message": "Looks like you didn't save your changes! What would you like to do with them?",
|
|
196
|
+
"undo_cancel": "Review",
|
|
197
|
+
"undo_confirm": "Discard"
|
|
198
|
+
},
|
|
199
|
+
"templates_title": "Templates",
|
|
200
|
+
"templates_helper_text": "Click any of the templates above to customize how those views are presented to your customers. Warning: this functionality is for advanced users only.",
|
|
201
|
+
"cart-template-uri": {
|
|
202
|
+
"title": "Cart template",
|
|
203
|
+
"type_custom_url": "Custom (URL)",
|
|
204
|
+
"type_custom_text": "Custom (Text)",
|
|
205
|
+
"type_default": "Default",
|
|
206
|
+
"spinner": {
|
|
207
|
+
"loading_busy": "Loading cart template",
|
|
208
|
+
"loading_empty": "No cart template",
|
|
209
|
+
"loading_error": "Failed to load cart template"
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
"cart-include-template-uri": {
|
|
213
|
+
"title": "Cart include template",
|
|
214
|
+
"type_custom_url": "Custom (URL)",
|
|
215
|
+
"type_custom_text": "Custom (Text)",
|
|
216
|
+
"type_default": "Default",
|
|
217
|
+
"spinner": {
|
|
218
|
+
"loading_busy": "Loading cart include template",
|
|
219
|
+
"loading_empty": "No cart include template",
|
|
220
|
+
"loading_error": "Failed to load cart include template"
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
"checkout-template-uri": {
|
|
224
|
+
"title": "Checkout template",
|
|
225
|
+
"type_custom_url": "Custom (URL)",
|
|
226
|
+
"type_custom_text": "Custom (Text)",
|
|
227
|
+
"type_default": "Default",
|
|
228
|
+
"spinner": {
|
|
229
|
+
"loading_busy": "Loading checkout template",
|
|
230
|
+
"loading_empty": "No checkout template",
|
|
231
|
+
"loading_error": "Failed to load checkout template"
|
|
232
|
+
}
|
|
233
|
+
},
|
|
234
|
+
"receipt-template-uri": {
|
|
235
|
+
"title": "Web receipt template",
|
|
236
|
+
"type_custom_url": "Custom (URL)",
|
|
237
|
+
"type_custom_text": "Custom (Text)",
|
|
238
|
+
"type_default": "Default",
|
|
239
|
+
"spinner": {
|
|
240
|
+
"loading_busy": "Loading web receipt template",
|
|
241
|
+
"loading_empty": "No web receipt template",
|
|
242
|
+
"loading_error": "Failed to load web receipt template"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
"email-template-uri": {
|
|
246
|
+
"title": "Email receipt template",
|
|
247
|
+
"type_custom_url": "Custom (URL)",
|
|
248
|
+
"type_custom_text": "Custom (Text)",
|
|
249
|
+
"type_mixed": "Mixed",
|
|
250
|
+
"type_default": "Default",
|
|
251
|
+
"spinner": {
|
|
252
|
+
"loading_busy": "Loading email receipt template",
|
|
253
|
+
"loading_empty": "No email receipt template",
|
|
254
|
+
"loading_error": "Failed to load email receipt template"
|
|
255
|
+
}
|
|
256
|
+
},
|
|
257
|
+
"add_country": "Add country",
|
|
258
|
+
"add_field": "Add field",
|
|
259
|
+
"add_region": "Add region",
|
|
260
|
+
"address1": "Address Line 1",
|
|
261
|
+
"address2": "Address Line 2",
|
|
262
|
+
"allow": "Allow",
|
|
263
|
+
"allowlist": "Allow all except",
|
|
264
|
+
"billing": "Billing",
|
|
265
|
+
"block": "Block",
|
|
266
|
+
"blocklist": "Ban all except",
|
|
267
|
+
"cart_controls": "Quantity",
|
|
268
|
+
"cart_type": "Cart display",
|
|
269
|
+
"cart_type_custom": "Custom",
|
|
270
|
+
"cart_type_custom_explainer": "Build your own JSONP cart with included config",
|
|
271
|
+
"cart_type_default": "Sidecart",
|
|
272
|
+
"cart_type_default_explainer": "Default cart appearance in version 2.0",
|
|
273
|
+
"cart_type_fullpage": "Full page",
|
|
274
|
+
"cart_type_fullpage_explainer": "Send all customers to a full page cart while still including minicart functionality",
|
|
275
|
+
"checked_by_default": "Checked by default",
|
|
276
|
+
"checkout_type": "Accounts",
|
|
277
|
+
"checkout_type_account_only": "Allow customer accounts only",
|
|
278
|
+
"checkout_type_default_account": "Allow both, default to customer",
|
|
279
|
+
"checkout_type_default_guest": "Allow both, default to guest",
|
|
280
|
+
"checkout_type_guest_only": "Allow guests only",
|
|
281
|
+
"checkout_type_helper_text": "If you select Allow guests only, your store will not be able to use subscriptions.",
|
|
282
|
+
"city": "City",
|
|
283
|
+
"close": "Close",
|
|
284
|
+
"close_icon": "Close icon",
|
|
285
|
+
"company": "Company",
|
|
286
|
+
"consent": "Consent",
|
|
287
|
+
"copy": "Copy",
|
|
288
|
+
"country": "Country",
|
|
289
|
+
"coupon_entry": "Coupon code",
|
|
290
|
+
"create": "Create",
|
|
291
|
+
"custom_config": "Custom config",
|
|
292
|
+
"custom_config_helper_text": "If you have any custom values you'd like to make available to your twig template, you can add them here as a valid JSON string.",
|
|
293
|
+
"custom_fields": "Custom fields",
|
|
294
|
+
"custom_fields_helper_text": "If you have information you'd like to collect from the customer on the checkout page, you can add custom form fields here which will be added to the checkout form. We recommend you follow the same HTML container structure used on other checkout fields for consistency. You can use Twig syntax here.",
|
|
295
|
+
"custom_footer": "Custom footer",
|
|
296
|
+
"custom_footer_helper_text": "Any JS snippets or conversion scripts you need to add to the footer can be put here and will be inserted before the </body> tag. You can use Twig syntax here. For conversion scripts you only want to display once on the receipt page, use {% if first_receipt_display %} {# conversion script content here #} {% endif %}.",
|
|
297
|
+
"custom_header": "Custom header",
|
|
298
|
+
"custom_header_helper_text": "Any CSS or JS you need to add to the header can be put here and will be inserted before the </head> tag of your templates. Keep in mind all script file references must be through https or run through the Foxy caching system. Twig syntax is not available in the header.",
|
|
299
|
+
"default": "Default",
|
|
300
|
+
"delete": "Delete",
|
|
301
|
+
"delete_prompt": "This resource will be permanently removed. Are you sure?",
|
|
302
|
+
"disabled": "Disabled",
|
|
303
|
+
"display_sdta": "Display a Secure Data Transfer agreement to EU customers",
|
|
304
|
+
"display_sdta_explainer": "If you have customers in the European Union, enable this feature so they can opt in to sending their data to our secure servers in the United States.",
|
|
305
|
+
"display_tos_link": "Display a link to Terms & Conditions",
|
|
306
|
+
"display_tos_link_explainer": "Include a checkbox to ask your customers to agree to your Terms of Service.",
|
|
307
|
+
"enable_postcode_lookup": "Offer city and state suggestions based on postcode",
|
|
308
|
+
"enabled": "Enabled",
|
|
309
|
+
"error": "Error",
|
|
310
|
+
"field_plural": "Fields",
|
|
311
|
+
"first_name": "First name",
|
|
312
|
+
"foxycomplete": "Location autocomplete",
|
|
313
|
+
"foxycomplete_combobox": "Combo Box",
|
|
314
|
+
"foxycomplete_combobox_explainer": "Expand to browse options, type to search",
|
|
315
|
+
"foxycomplete_disabled": "Disabled",
|
|
316
|
+
"foxycomplete_disabled_explainer": "Let customers pick an option from a list",
|
|
317
|
+
"foxycomplete_search": "Search",
|
|
318
|
+
"foxycomplete_search_explainer": "Display a «search as you type» field",
|
|
319
|
+
"ga_account_id": "Account ID",
|
|
320
|
+
"ga_account_id_explainer": "You can find the ID in the Admin section of your Analytics in Tracking info > Tracking code.",
|
|
321
|
+
"ga_include_on_site": "Include via loader.js",
|
|
322
|
+
"ga_include_on_site_explainer": "Enable Google Analytics on any page where the loader.js file is included.",
|
|
323
|
+
"hidden": "Hidden",
|
|
324
|
+
"hidden_fields": "Hidden fields",
|
|
325
|
+
"last_name": "Last name",
|
|
326
|
+
"location_plural": "Locations",
|
|
327
|
+
"location_url": "Location (URL)",
|
|
328
|
+
"newsletter_subscribe": "Allow users to sign up for your newsletter",
|
|
329
|
+
"newsletter_subscribe_explainer": "This includes a checkbox on your checkout to allow customers to choose to sign up to your newsletter, available in the transaction reports, the API and webhooks.",
|
|
330
|
+
"open_icon": "Open icon",
|
|
331
|
+
"optional": "Optional",
|
|
332
|
+
"phone": "Phone",
|
|
333
|
+
"postal_code": "Postal code",
|
|
334
|
+
"product_category": "Product category",
|
|
335
|
+
"product_code": "Product code",
|
|
336
|
+
"product_options": "Product options",
|
|
337
|
+
"product_weight": "Product weight",
|
|
338
|
+
"region": "Region",
|
|
339
|
+
"require_consent": "Require consent to proceed",
|
|
340
|
+
"required": "Required",
|
|
341
|
+
"same_as_shipping": "Same as shipping",
|
|
342
|
+
"shipping": "Shipping",
|
|
343
|
+
"show_country_flags": "Show country flags",
|
|
344
|
+
"sio_account_id": "Write Key",
|
|
345
|
+
"sio_account_id_explainer": "You can find the write key in your project set up guide or in the source’s settings.",
|
|
346
|
+
"skip_csc_for_saved": "Skip CSC for saved cards",
|
|
347
|
+
"skip_csc_for_sso": "Skip CSC for single sign-on",
|
|
348
|
+
"sub_enddate": "Subscription end date",
|
|
349
|
+
"sub_frequency": "Subscription frequency",
|
|
350
|
+
"sub_nextdate": "Subscription next date",
|
|
351
|
+
"sub_startdate": "Subscription start date",
|
|
352
|
+
"supported_cards": "Cards",
|
|
353
|
+
"supported_cards_disclaimer": "Applies only to payment gateways where the customer enters their payment card information directly on the Foxy checkout. Exceptions: Adyen Embedded, Amazon Pay, Apple Pay, Klarna, Square and Stripe.",
|
|
354
|
+
"tab_advanced": "Advanced",
|
|
355
|
+
"tab_analytics": "Analytics",
|
|
356
|
+
"tab_cart": "Cart",
|
|
357
|
+
"tab_checkout": "Checkout",
|
|
358
|
+
"tax_id": "Tax ID",
|
|
359
|
+
"troubleshooting": "Troubleshooting",
|
|
360
|
+
"troubleshooting_debug": "Log debug messages in the browser console",
|
|
361
|
+
"troubleshooting_debug_explainer": "Enable this option to trigger console.log() calls for our JS, which can assist with troubleshooting your store.",
|
|
362
|
+
"spinner": {
|
|
363
|
+
"loading_busy": "Loading",
|
|
364
|
+
"loading_error": "Failed to load"
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
"timestamps": {
|
|
368
|
+
"date_created": "Created on",
|
|
369
|
+
"date_modified": "Last updated",
|
|
370
|
+
"date": "{{value, date}}"
|
|
371
|
+
},
|
|
372
|
+
"delete": {
|
|
373
|
+
"delete": "Delete",
|
|
374
|
+
"cancel": "Cancel",
|
|
375
|
+
"delete_prompt": "Are you sure you'd like to remove this template set? You won't be able to bring it back."
|
|
376
|
+
},
|
|
377
|
+
"create": {
|
|
378
|
+
"create": "Create"
|
|
379
|
+
},
|
|
380
|
+
"spinner": {
|
|
381
|
+
"loading_busy": "Loading",
|
|
382
|
+
"loading_error": "Failed to load"
|
|
383
|
+
}
|
|
384
|
+
}
|
package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export declare class InternalAsyncComboBoxControl extends InternalEditableContro
|
|
|
18
18
|
selectedItem: ComboBoxItem | string | undefined;
|
|
19
19
|
/** URL of the first page of the hAPI collection serving as a source for items. */
|
|
20
20
|
first: string | null;
|
|
21
|
+
private __dataProvider;
|
|
21
22
|
renderControl(): TemplateResult;
|
|
22
23
|
updated(changes: Map<keyof this, unknown>): void;
|
|
23
24
|
protected get _value(): string;
|
|
@@ -19,19 +19,7 @@ export class InternalAsyncComboBoxControl extends InternalEditableControl {
|
|
|
19
19
|
this.selectedItem = undefined;
|
|
20
20
|
/** URL of the first page of the hAPI collection serving as a source for items. */
|
|
21
21
|
this.first = null;
|
|
22
|
-
|
|
23
|
-
static get properties() {
|
|
24
|
-
return {
|
|
25
|
-
...super.properties,
|
|
26
|
-
itemLabelPath: { type: String, attribute: 'item-label-path' },
|
|
27
|
-
itemValuePath: { type: String, attribute: 'item-value-path' },
|
|
28
|
-
selectedItem: { attribute: false },
|
|
29
|
-
first: { type: String },
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
renderControl() {
|
|
33
|
-
var _a, _b;
|
|
34
|
-
const dataProvider = async (params, callback) => {
|
|
22
|
+
this.__dataProvider = async (params, callback) => {
|
|
35
23
|
if (!this.first)
|
|
36
24
|
return callback([], 0);
|
|
37
25
|
const url = new URL(this.first);
|
|
@@ -47,6 +35,18 @@ export class InternalAsyncComboBoxControl extends InternalEditableControl {
|
|
|
47
35
|
const items = Array.from(Object.values(json._embedded))[0];
|
|
48
36
|
callback(items, json.total_items);
|
|
49
37
|
};
|
|
38
|
+
}
|
|
39
|
+
static get properties() {
|
|
40
|
+
return {
|
|
41
|
+
...super.properties,
|
|
42
|
+
itemLabelPath: { type: String, attribute: 'item-label-path' },
|
|
43
|
+
itemValuePath: { type: String, attribute: 'item-value-path' },
|
|
44
|
+
selectedItem: { attribute: false },
|
|
45
|
+
first: { type: String },
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
renderControl() {
|
|
49
|
+
var _a, _b;
|
|
50
50
|
return html `
|
|
51
51
|
<vaadin-combo-box
|
|
52
52
|
item-value-path=${ifDefined((_a = this.itemValuePath) !== null && _a !== void 0 ? _a : undefined)}
|
|
@@ -61,7 +61,7 @@ export class InternalAsyncComboBoxControl extends InternalEditableControl {
|
|
|
61
61
|
?readonly=${this.readonly}
|
|
62
62
|
clear-button-visible
|
|
63
63
|
.checkValidity=${this._checkValidity}
|
|
64
|
-
.dataProvider=${
|
|
64
|
+
.dataProvider=${this.__dataProvider}
|
|
65
65
|
.selectedItem=${this.selectedItem}
|
|
66
66
|
.value=${this._value}
|
|
67
67
|
@change=${(evt) => {
|
|
@@ -82,7 +82,7 @@ export class InternalAsyncComboBoxControl extends InternalEditableControl {
|
|
|
82
82
|
}
|
|
83
83
|
updated(changes) {
|
|
84
84
|
super.updated(changes);
|
|
85
|
-
if (changes.has('first')) {
|
|
85
|
+
if (changes.has('first') || changes.has('itemLabelPath')) {
|
|
86
86
|
const comboBox = this.renderRoot.querySelector('vaadin-combo-box');
|
|
87
87
|
// this forces reload
|
|
88
88
|
if (comboBox) {
|
package/dist/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalAsyncComboBoxControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,uBAAuB,EAAE,8DAA2D;AAC7F,OAAO,EAAE,GAAG,EAAE,2CAAwC;AAEtD;;;;;;GAMG;AACH,MAAM,OAAO,4BAA6B,SAAQ,uBAAuB;IAAzE;;QAWE,sEAAsE;QACtE,kBAAa,GAAkB,IAAI,CAAC;QAEpC,sEAAsE;QACtE,kBAAa,GAAkB,IAAI,CAAC;QAEpC,iBAAY,GAAsC,SAAS,CAAC;QAE5D,kFAAkF;QAClF,UAAK,GAAkB,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"InternalAsyncComboBoxControl.js","sourceRoot":"","sources":["../../../../src/elements/internal/InternalAsyncComboBoxControl/InternalAsyncComboBoxControl.ts"],"names":[],"mappings":"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","sourcesContent":["import type { ComboBoxDataProvider, ComboBoxElement, ComboBoxItem } from '@vaadin/vaadin-combo-box';\nimport type { TemplateResult } from 'lit-html';\n\nimport { PropertyDeclarations } from 'lit-element';\nimport { ifDefined } from 'lit-html/directives/if-defined';\nimport { html } from 'lit-html';\n\nimport { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';\nimport { API } from '../../public/NucleonElement/API';\n\n/**\n * Internal control displaying a combo box where items are loaded from\n * a hAPI collection.\n *\n * @since 1.17.0\n * @element foxy-internal-async-combo-box-control\n */\nexport class InternalAsyncComboBoxControl extends InternalEditableControl {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n itemLabelPath: { type: String, attribute: 'item-label-path' },\n itemValuePath: { type: String, attribute: 'item-value-path' },\n selectedItem: { attribute: false },\n first: { type: String },\n };\n }\n\n /** Same as `itemLabelPath` property of Vaadin's `ComboBoxElement`. */\n itemLabelPath: string | null = null;\n\n /** Same as `itemValuePath` property of Vaadin's `ComboBoxElement`. */\n itemValuePath: string | null = null;\n\n selectedItem: ComboBoxItem | string | undefined = undefined;\n\n /** URL of the first page of the hAPI collection serving as a source for items. */\n first: string | null = null;\n\n private __dataProvider: ComboBoxDataProvider = async (params, callback) => {\n if (!this.first) return callback([], 0);\n\n const url = new URL(this.first);\n url.searchParams.set('offset', String(params.page * params.pageSize));\n url.searchParams.set('limit', String(params.pageSize));\n\n if (params.filter && this.itemLabelPath) {\n url.searchParams.set(this.itemLabelPath, `*${params.filter}*`);\n }\n\n const response = await new API(this).fetch(url.toString());\n if (!response.ok) throw new Error(await response.text());\n\n const json = await response.json();\n const items = Array.from(Object.values(json._embedded))[0] as unknown[];\n\n callback(items, json.total_items);\n };\n\n renderControl(): TemplateResult {\n return html`\n <vaadin-combo-box\n item-value-path=${ifDefined(this.itemValuePath ?? undefined)}\n item-label-path=${ifDefined(this.itemLabelPath ?? undefined)}\n error-message=${ifDefined(this._errorMessage)}\n item-id-path=\"_links.self.href\"\n helper-text=${this.helperText}\n placeholder=${this.placeholder}\n label=${this.label}\n class=\"w-full\"\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n clear-button-visible\n .checkValidity=${this._checkValidity}\n .dataProvider=${this.__dataProvider}\n .selectedItem=${this.selectedItem}\n .value=${this._value}\n @change=${(evt: CustomEvent) => {\n evt.stopPropagation();\n\n const comboBox = evt.currentTarget as ComboBoxElement;\n this._value = comboBox.value;\n\n if (this._value === comboBox.value) {\n this.selectedItem = comboBox.selectedItem;\n this.dispatchEvent(new CustomEvent('selected-item-changed'));\n } else {\n comboBox.value = this._value;\n }\n }}\n >\n </vaadin-combo-box>\n `;\n }\n\n updated(changes: Map<keyof this, unknown>): void {\n super.updated(changes);\n\n if (changes.has('first') || changes.has('itemLabelPath')) {\n const comboBox = this.renderRoot.querySelector<ComboBoxElement>('vaadin-combo-box');\n\n // this forces reload\n if (comboBox) {\n comboBox.size = 0;\n comboBox.size = 1;\n }\n }\n }\n\n protected get _value(): string {\n return (super._value as string | undefined) ?? '';\n }\n\n protected set _value(newValue: string) {\n super._value = newValue as unknown | undefined;\n }\n}\n"]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { PropertyDeclarations, TemplateResult } from 'lit-element';
|
|
2
|
+
import type { Item, Option } from './types';
|
|
3
|
+
import { InternalEditableControl } from '../InternalEditableControl/InternalEditableControl';
|
|
4
|
+
export declare class InternalEditableListControl extends InternalEditableControl {
|
|
5
|
+
static get properties(): PropertyDeclarations;
|
|
6
|
+
options: Option[];
|
|
7
|
+
private __newItem;
|
|
8
|
+
render(): TemplateResult;
|
|
9
|
+
protected get _value(): Item[];
|
|
10
|
+
protected set _value(newValue: Item[]);
|
|
11
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import { InternalEditableControl } from "../InternalEditableControl/InternalEditableControl.js";
|
|
2
|
+
import { classMap } from "../../../utils/class-map.js";
|
|
3
|
+
import { repeat } from 'lit-html/directives/repeat';
|
|
4
|
+
import { live } from 'lit-html/directives/live';
|
|
5
|
+
import { html } from 'lit-element';
|
|
6
|
+
export class InternalEditableListControl extends InternalEditableControl {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.options = [];
|
|
10
|
+
this.__newItem = '';
|
|
11
|
+
}
|
|
12
|
+
static get properties() {
|
|
13
|
+
return {
|
|
14
|
+
...super.properties,
|
|
15
|
+
options: { type: Array },
|
|
16
|
+
__newItem: { attribute: false },
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
render() {
|
|
20
|
+
const deleteButtonClass = classMap({
|
|
21
|
+
'w-xs h-xs mr-xs rounded-full transition-colors flex-shrink-0': true,
|
|
22
|
+
'focus-outline-none focus-ring-2 ring-inset ring-error-50': true,
|
|
23
|
+
'text-tertiary hover-bg-error-10 hover-text-error': !this.disabled,
|
|
24
|
+
'cursor-default text-disabled': this.disabled,
|
|
25
|
+
'flex items-center justify-center': !this.readonly,
|
|
26
|
+
'hidden': this.readonly,
|
|
27
|
+
});
|
|
28
|
+
const itemClass = classMap({
|
|
29
|
+
'transition-colors h-m ml-s flex items-center': true,
|
|
30
|
+
'text-secondary': this.readonly,
|
|
31
|
+
'text-disabled': this.disabled,
|
|
32
|
+
});
|
|
33
|
+
const isAddButtonDisabled = this.disabled || !this.__newItem;
|
|
34
|
+
const addItem = () => {
|
|
35
|
+
if (!this.__newItem)
|
|
36
|
+
return;
|
|
37
|
+
this._value = [...this._value, { value: this.__newItem }];
|
|
38
|
+
this.__newItem = '';
|
|
39
|
+
};
|
|
40
|
+
return html `
|
|
41
|
+
<div class="group">
|
|
42
|
+
<div
|
|
43
|
+
class="transition-colors mb-xs font-medium text-s text-secondary group-hover-text-body"
|
|
44
|
+
>
|
|
45
|
+
${this.label}
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div
|
|
49
|
+
class="border border-contrast-10 rounded transition-colors group-hover-border-contrast-20"
|
|
50
|
+
>
|
|
51
|
+
<ol
|
|
52
|
+
class="transition-colors divide-y divide-contrast-10 font-medium group-hover-divide-contrast-20"
|
|
53
|
+
>
|
|
54
|
+
${repeat(this._value, item => item.value, (item, index) => {
|
|
55
|
+
var _a;
|
|
56
|
+
return html `
|
|
57
|
+
<li class=${itemClass}>
|
|
58
|
+
<div class="flex-1 mr-s">${(_a = item.label) !== null && _a !== void 0 ? _a : item.value}</div>
|
|
59
|
+
|
|
60
|
+
<button
|
|
61
|
+
aria-label=${this.t('delete')}
|
|
62
|
+
class=${deleteButtonClass}
|
|
63
|
+
?disabled=${this.disabled}
|
|
64
|
+
@click=${() => {
|
|
65
|
+
this._value = this._value.filter((_, i) => i !== index);
|
|
66
|
+
}}
|
|
67
|
+
>
|
|
68
|
+
<iron-icon icon="lumo:cross" class="icon-inline text-xl"></iron-icon>
|
|
69
|
+
</button>
|
|
70
|
+
</li>
|
|
71
|
+
`;
|
|
72
|
+
})}
|
|
73
|
+
</ol>
|
|
74
|
+
|
|
75
|
+
<div
|
|
76
|
+
style=${this._value.length === 0
|
|
77
|
+
? 'border-radius: calc(var(--lumo-border-radius-m) - 1px)'
|
|
78
|
+
: 'border-radius: 0 0 calc(var(--lumo-border-radius-m) - 1px) calc(var(--lumo-border-radius-m) - 1px)'}
|
|
79
|
+
class=${classMap({
|
|
80
|
+
'transition-colors bg-contrast-10 pl-s h-m flex items-center': true,
|
|
81
|
+
'focus-within-ring-2 focus-within-ring-primary-50': true,
|
|
82
|
+
'group-hover-bg-contrast-20': true,
|
|
83
|
+
'flex': !this.readonly,
|
|
84
|
+
'hidden': this.readonly,
|
|
85
|
+
})}
|
|
86
|
+
>
|
|
87
|
+
<input
|
|
88
|
+
placeholder=${this.placeholder}
|
|
89
|
+
class="w-full bg-transparent appearance-none h-m font-medium focus-outline-none"
|
|
90
|
+
list="list"
|
|
91
|
+
.value=${live(this.__newItem)}
|
|
92
|
+
?disabled=${this.disabled}
|
|
93
|
+
?readonly=${this.readonly}
|
|
94
|
+
@keydown=${(evt) => evt.key === 'Enter' && addItem()}
|
|
95
|
+
@change=${(evt) => evt.stopPropagation()}
|
|
96
|
+
@input=${(evt) => {
|
|
97
|
+
this.__newItem = evt.currentTarget.value.trim();
|
|
98
|
+
}}
|
|
99
|
+
/>
|
|
100
|
+
|
|
101
|
+
<datalist id="list">
|
|
102
|
+
${this.options.map(({ label, value }) => {
|
|
103
|
+
if (this._value.some(item => item.value === value))
|
|
104
|
+
return;
|
|
105
|
+
return html `<option value=${value}>${label !== null && label !== void 0 ? label : value}</option>`;
|
|
106
|
+
})}
|
|
107
|
+
</datalist>
|
|
108
|
+
|
|
109
|
+
<div class="transition-opacity ${this.__newItem ? 'opacity-100' : 'opacity-0'}">
|
|
110
|
+
<button
|
|
111
|
+
aria-label=${this.t('submit')}
|
|
112
|
+
class=${classMap({
|
|
113
|
+
'w-xs h-xs mr-xs flex-shrink-0 ring-inset ring-success-50 focus-outline-none': true,
|
|
114
|
+
'flex items-center justify-center rounded-full transition-colors': true,
|
|
115
|
+
'bg-contrast-5 text-disabled cursor-default': isAddButtonDisabled,
|
|
116
|
+
'bg-success-10 text-success cursor-pointer': !isAddButtonDisabled,
|
|
117
|
+
'hover-bg-success hover-text-success-contrast': !isAddButtonDisabled,
|
|
118
|
+
'focus-ring-2': !isAddButtonDisabled,
|
|
119
|
+
})}
|
|
120
|
+
?disabled=${isAddButtonDisabled}
|
|
121
|
+
@click=${addItem}
|
|
122
|
+
>
|
|
123
|
+
<iron-icon icon="lumo:plus" class="icon-inline text-l"></iron-icon>
|
|
124
|
+
</button>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</div>
|
|
128
|
+
|
|
129
|
+
<div class="transition-colors mt-xs text-xs text-secondary group-hover-text-body">
|
|
130
|
+
${this.helperText}
|
|
131
|
+
</div>
|
|
132
|
+
</div>
|
|
133
|
+
`;
|
|
134
|
+
}
|
|
135
|
+
get _value() {
|
|
136
|
+
var _a;
|
|
137
|
+
return ((_a = super._value) !== null && _a !== void 0 ? _a : []);
|
|
138
|
+
}
|
|
139
|
+
set _value(newValue) {
|
|
140
|
+
super._value = newValue;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
//# sourceMappingURL=InternalEditableListControl.js.map
|