@foxy.io/elements 1.31.0-beta.1 → 1.31.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/foxy-access-recovery-form.js +1 -1
- package/dist/cdn/foxy-address-card.js +1 -1
- package/dist/cdn/foxy-address-form.js +1 -1
- package/dist/cdn/foxy-admin-subscription-card.js +1 -1
- package/dist/cdn/foxy-admin-subscription-form.js +1 -1
- package/dist/cdn/foxy-api-browser.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-applied-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-applied-tax-card.js +1 -1
- package/dist/cdn/foxy-attribute-card.js +1 -1
- package/dist/cdn/foxy-attribute-form.js +1 -1
- package/dist/cdn/foxy-billing-address-card.js +1 -1
- package/dist/cdn/foxy-cancellation-form.js +1 -1
- package/dist/cdn/foxy-cart-card.js +1 -1
- package/dist/cdn/foxy-cart-form.js +2 -2
- package/dist/cdn/foxy-client-card.js +1 -1
- package/dist/cdn/foxy-client-form.js +1 -1
- package/dist/cdn/foxy-collection-page.js +1 -1
- package/dist/cdn/foxy-collection-pages.js +1 -1
- package/dist/cdn/foxy-copy-to-clipboard.js +1 -1
- package/dist/cdn/foxy-coupon-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-card.js +1 -1
- package/dist/cdn/foxy-coupon-code-form.js +1 -1
- package/dist/cdn/foxy-coupon-codes-form.js +1 -1
- package/dist/cdn/foxy-coupon-detail-card.js +1 -1
- package/dist/cdn/foxy-coupon-form.js +1 -1
- package/dist/cdn/foxy-custom-field-card.js +1 -1
- package/dist/cdn/foxy-custom-field-form.js +1 -1
- package/dist/cdn/foxy-customer-card.js +1 -1
- package/dist/cdn/foxy-customer-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings-form.js +1 -1
- package/dist/cdn/foxy-customer-portal-settings.js +1 -1
- package/dist/cdn/foxy-customer-portal.js +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 +10 -10
- 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-card.js +1 -1
- package/dist/cdn/foxy-gift-card-code-form.js +1 -1
- package/dist/cdn/foxy-gift-card-code-log-card.js +1 -1
- package/dist/cdn/foxy-gift-card-codes-form.js +1 -1
- package/dist/cdn/foxy-gift-card-form.js +1 -1
- package/dist/cdn/foxy-i18n-editor.js +1 -1
- package/dist/cdn/foxy-i18n.js +1 -1
- package/dist/cdn/foxy-integration-card.js +1 -1
- package/dist/cdn/foxy-integration-form.js +1 -1
- package/dist/cdn/foxy-item-card.js +1 -1
- package/dist/cdn/foxy-item-category-card.js +1 -1
- package/dist/cdn/foxy-item-category-form.js +1 -1
- package/dist/cdn/foxy-item-form.js +1 -1
- package/dist/cdn/foxy-item-option-card.js +1 -1
- package/dist/cdn/foxy-item-option-form.js +1 -1
- package/dist/cdn/foxy-items-form.js +1 -1
- package/dist/cdn/foxy-native-integration-card.js +1 -1
- package/dist/cdn/foxy-native-integration-form.js +1 -1
- package/dist/cdn/foxy-pagination.js +1 -1
- package/dist/cdn/foxy-passkey-card.js +1 -1
- package/dist/cdn/foxy-passkey-form.js +1 -1
- package/dist/cdn/foxy-payment-card-embed.js +1 -1
- package/dist/cdn/foxy-payment-card.js +1 -1
- package/dist/cdn/foxy-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-card.js +1 -1
- package/dist/cdn/foxy-payments-api-fraud-protection-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-method-form.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-card.js +1 -1
- package/dist/cdn/foxy-payments-api-payment-preset-form.js +1 -1
- package/dist/cdn/foxy-query-builder.js +2 -2
- package/dist/cdn/foxy-report-form.js +2 -2
- package/dist/cdn/foxy-reports-table.js +1 -1
- package/dist/cdn/foxy-shipment-card.js +1 -1
- package/dist/cdn/foxy-shipping-container-card.js +1 -1
- package/dist/cdn/foxy-shipping-drop-type-card.js +1 -1
- package/dist/cdn/foxy-shipping-method-card.js +1 -1
- package/dist/cdn/foxy-shipping-service-card.js +1 -1
- package/dist/cdn/foxy-sign-in-form.js +1 -1
- package/dist/cdn/foxy-spinner.js +2 -2
- package/dist/cdn/foxy-store-card.js +1 -1
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/foxy-store-shipping-method-form.js +1 -1
- package/dist/cdn/foxy-subscription-card.js +1 -1
- package/dist/cdn/foxy-subscription-form.js +1 -1
- package/dist/cdn/foxy-subscription-settings-form.js +1 -1
- package/dist/cdn/foxy-subscriptions-table.js +1 -1
- package/dist/cdn/foxy-table.js +1 -1
- package/dist/cdn/foxy-tax-card.js +1 -1
- package/dist/cdn/foxy-tax-form.js +1 -1
- package/dist/cdn/foxy-template-config-form.js +1 -1
- package/dist/cdn/foxy-template-form.js +1 -1
- package/dist/cdn/foxy-template-set-card.js +1 -1
- package/dist/cdn/foxy-template-set-form.js +1 -1
- package/dist/cdn/foxy-transaction-card.js +1 -1
- package/dist/cdn/foxy-transaction.js +1 -1
- package/dist/cdn/foxy-transactions-table.js +1 -1
- package/dist/cdn/foxy-update-payment-method-form.js +1 -1
- package/dist/cdn/foxy-user-card.js +1 -1
- package/dist/cdn/foxy-user-form.js +1 -1
- package/dist/cdn/foxy-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-6be24929.js → shared-029d623b.js} +1 -1
- package/dist/cdn/{shared-cb3b9d8b.js → shared-0700fd80.js} +1 -1
- package/dist/cdn/shared-08e0a194.js +1 -0
- package/dist/cdn/{shared-2bd96ec7.js → shared-09b4185a.js} +1 -1
- package/dist/cdn/{shared-8fbebf38.js → shared-0a6a28ce.js} +1 -1
- package/dist/cdn/{shared-ea5ff8bc.js → shared-0cc5420d.js} +1 -1
- package/dist/cdn/{shared-97514fcb.js → shared-0e055562.js} +1 -1
- package/dist/cdn/{shared-2d75f154.js → shared-0f67d020.js} +1 -1
- package/dist/cdn/{shared-e47bd38e.js → shared-16c17e32.js} +1 -1
- package/dist/cdn/{shared-2c1dff50.js → shared-19884cf4.js} +1 -1
- package/dist/cdn/{shared-d75f83f8.js → shared-199e3870.js} +1 -1
- package/dist/cdn/{shared-77ef56aa.js → shared-1f0b8b7e.js} +1 -1
- package/dist/cdn/{shared-c5a0cdd7.js → shared-21bc5d5e.js} +1 -1
- package/dist/cdn/{shared-deff3eda.js → shared-245f8836.js} +1 -1
- package/dist/cdn/{shared-9bf7d9a7.js → shared-280f868d.js} +1 -1
- package/dist/cdn/{shared-fae08dfb.js → shared-28f74114.js} +1 -1
- package/dist/cdn/{shared-4a652d60.js → shared-2a5c89a4.js} +1 -1
- package/dist/cdn/{shared-49ecea83.js → shared-37efab30.js} +1 -1
- package/dist/cdn/{shared-6d11abd7.js → shared-388e9240.js} +2 -2
- package/dist/cdn/{shared-1d4fdfa8.js → shared-3c3497d6.js} +1 -1
- package/dist/cdn/shared-3ee151ce.js +1 -0
- package/dist/cdn/{shared-98ddb87c.js → shared-44ce656d.js} +1 -1
- package/dist/cdn/{shared-8cb35eb4.js → shared-453d8f75.js} +1 -1
- package/dist/cdn/{shared-ff7b2af6.js → shared-4b346553.js} +1 -1
- package/dist/cdn/{shared-6f877b15.js → shared-536a2d53.js} +1 -1
- package/dist/cdn/{shared-5bc86d84.js → shared-55e95bd2.js} +1 -1
- package/dist/cdn/{shared-fb1dd186.js → shared-56a559fd.js} +1 -1
- package/dist/cdn/{shared-59b7fcc0.js → shared-56bf05ef.js} +1 -1
- package/dist/cdn/{shared-73045804.js → shared-5a2f398c.js} +1 -1
- package/dist/cdn/{shared-f6573d25.js → shared-5be5874d.js} +1 -1
- package/dist/cdn/{shared-3cf043a7.js → shared-61b6ef6e.js} +1 -1
- package/dist/cdn/{shared-a8233033.js → shared-638468a5.js} +1 -1
- package/dist/cdn/{shared-09fc6fa0.js → shared-6918312e.js} +1 -1
- package/dist/cdn/{shared-9637a2de.js → shared-6e859df6.js} +1 -1
- package/dist/cdn/{shared-226dd830.js → shared-7d38cb8a.js} +1 -1
- package/dist/cdn/shared-8cd578ee.js +1 -0
- package/dist/cdn/{shared-0f00d4d8.js → shared-8f3398dc.js} +1 -1
- package/dist/cdn/{shared-887e1795.js → shared-90a47948.js} +1 -1
- package/dist/cdn/{shared-787e8da4.js → shared-937b497c.js} +1 -1
- package/dist/cdn/{shared-1729e19a.js → shared-9b2d6d62.js} +1 -1
- package/dist/cdn/{shared-77e15843.js → shared-a207423c.js} +1 -1
- package/dist/cdn/{shared-0c7f9c0c.js → shared-a49a2300.js} +1 -1
- package/dist/cdn/{shared-6f4fa343.js → shared-ac0368ec.js} +1 -1
- package/dist/cdn/{shared-fb1602a2.js → shared-b08ca8d0.js} +1 -1
- package/dist/cdn/{shared-19f46691.js → shared-b8198665.js} +1 -1
- package/dist/cdn/{shared-9b895561.js → shared-c2776a33.js} +1 -1
- package/dist/cdn/{shared-e7bff5de.js → shared-c388e926.js} +1 -1
- package/dist/cdn/{shared-8f74f5fc.js → shared-c8a6496c.js} +1 -1
- package/dist/cdn/{shared-a0efdc94.js → shared-ce172224.js} +1 -1
- package/dist/cdn/{shared-476827c7.js → shared-ce75e928.js} +1 -1
- package/dist/cdn/{shared-ad76e640.js → shared-d132bd37.js} +1 -1
- package/dist/cdn/{shared-b38762ef.js → shared-d1c10d58.js} +1 -1
- package/dist/cdn/{shared-5c4d786c.js → shared-d8c3067b.js} +1 -1
- package/dist/cdn/{shared-5721fb53.js → shared-da9e048f.js} +1 -1
- package/dist/cdn/shared-dfc33ff6.js +1 -0
- package/dist/cdn/{shared-e7232c2b.js → shared-e24da82e.js} +2 -2
- package/dist/cdn/{shared-d5ff9121.js → shared-e778071b.js} +1 -1
- package/dist/cdn/{shared-8fce283a.js → shared-edbf7378.js} +1 -1
- package/dist/cdn/{shared-e5098b19.js → shared-ef78d7d9.js} +1 -1
- package/dist/cdn/{shared-4d172731.js → shared-f11b2116.js} +1 -1
- package/dist/cdn/{shared-ea8f9a88.js → shared-f2968508.js} +1 -1
- package/dist/cdn/shared-f34aeb6c.js +1 -0
- package/dist/cdn/{shared-df42c94f.js → shared-f3773d62.js} +1 -1
- package/dist/cdn/{shared-471e77dd.js → shared-f407c2cb.js} +1 -1
- package/dist/cdn/{shared-63192750.js → shared-fb0ca5e2.js} +1 -1
- package/dist/cdn/{shared-25502f01.js → shared-fb34e84c.js} +1 -1
- package/dist/cdn/{shared-c11df800.js → shared-fc1dfa64.js} +1 -1
- package/dist/cdn/translations/store-form/en.json +320 -279
- package/dist/cdn/translations/store-shipping-method-form/en.json +1 -2
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js +2 -2
- package/dist/elements/internal/InternalAsyncListControl/InternalAsyncListControl.js.map +1 -1
- package/dist/elements/internal/InternalPasswordControl/vaadinStyles.js +1 -1
- package/dist/elements/internal/InternalPasswordControl/vaadinStyles.js.map +1 -1
- package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js +6 -7
- package/dist/elements/internal/InternalSummaryControl/InternalSummaryControl.js.map +1 -1
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js +4 -0
- package/dist/elements/internal/InternalTextControl/InternalTextControl.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +60 -36
- package/dist/elements/public/StoreForm/StoreForm.js +584 -715
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/dist/elements/public/StoreForm/index.d.ts +2 -5
- package/dist/elements/public/StoreForm/index.js +2 -5
- package/dist/elements/public/StoreForm/index.js.map +1 -1
- package/dist/elements/public/StoreForm/types.d.ts +38 -0
- package/dist/elements/public/StoreForm/types.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.d.ts +1 -0
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js +26 -41
- package/dist/elements/public/StoreShippingMethodForm/StoreShippingMethodForm.js.map +1 -1
- package/dist/elements/public/StoreShippingMethodForm/types.d.ts +1 -3
- package/dist/elements/public/StoreShippingMethodForm/types.js.map +1 -1
- package/dist/mixins/themeable.js +0 -36
- package/dist/mixins/themeable.js.map +1 -1
- package/package.json +1 -1
- package/dist/cdn/shared-01f18104.js +0 -1
- package/dist/cdn/shared-3b975a29.js +0 -1
- package/dist/cdn/shared-41e7554e.js +0 -1
- package/dist/cdn/shared-90706e10.js +0 -1
- package/dist/cdn/shared-c4124870.js +0 -1
- package/dist/cdn/shared-cc8b47c6.js +0 -1
- package/dist/cdn/shared-fcbf196e.js +0 -1
|
@@ -2,7 +2,6 @@ import { TranslatableMixin } from "../../../mixins/translatable.js";
|
|
|
2
2
|
import { ResponsiveMixin } from "../../../mixins/responsive.js";
|
|
3
3
|
import { InternalForm } from "../../internal/InternalForm/InternalForm.js";
|
|
4
4
|
import { ifDefined } from 'lit-html/directives/if-defined';
|
|
5
|
-
import { classMap } from "../../../utils/class-map.js";
|
|
6
5
|
import { html } from 'lit-html';
|
|
7
6
|
import cloneDeep from 'lodash-es/cloneDeep';
|
|
8
7
|
const NS = 'store-form';
|
|
@@ -20,13 +19,25 @@ export class StoreForm extends Base {
|
|
|
20
19
|
this.customerPasswordHashTypes = null;
|
|
21
20
|
/** URL of the `fx:shipping_address_types` property helper resource. */
|
|
22
21
|
this.shippingAddressTypes = null;
|
|
23
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* URL of the `fx:store_versions` property helper resource.
|
|
24
|
+
* @deprecated All elements in this library are designed to work with store version 2.0.
|
|
25
|
+
*/
|
|
24
26
|
this.storeVersions = null;
|
|
25
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* URL of the `fx:checkout_types` property helper resource.
|
|
29
|
+
* @deprecated Checkout type is effectively controlled by the default template config.
|
|
30
|
+
*/
|
|
26
31
|
this.checkoutTypes = null;
|
|
27
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* URL of the `fx:locale_codes` property helper resource.
|
|
34
|
+
* @deprecated Default locale code is effectively controlled by the active template set.
|
|
35
|
+
*/
|
|
28
36
|
this.localeCodes = null;
|
|
29
|
-
/**
|
|
37
|
+
/**
|
|
38
|
+
* URL of the `fx:languages` property helper resource.
|
|
39
|
+
* @deprecated Default language is effectively controlled by the active template set.
|
|
40
|
+
*/
|
|
30
41
|
this.languages = null;
|
|
31
42
|
/** URL of the `fx:timezones` property helper resource. */
|
|
32
43
|
this.timezones = null;
|
|
@@ -34,7 +45,41 @@ export class StoreForm extends Base {
|
|
|
34
45
|
this.countries = null;
|
|
35
46
|
/** URL of the `fx:regions` property helper resource. */
|
|
36
47
|
this.regions = null;
|
|
37
|
-
this.
|
|
48
|
+
this.__currencyStyleOptions = [
|
|
49
|
+
{ rawLabel: '12.34', value: '101' },
|
|
50
|
+
{ rawLabel: 'USD 12.34', value: '001' },
|
|
51
|
+
{ rawLabel: '$12.34', value: '000' },
|
|
52
|
+
{ rawLabel: '12', value: '111' },
|
|
53
|
+
{ rawLabel: 'USD 12', value: '011' },
|
|
54
|
+
{ rawLabel: '$12', value: '010' },
|
|
55
|
+
];
|
|
56
|
+
this.__currencyStyleGetValue = () => {
|
|
57
|
+
const map = {
|
|
58
|
+
'101': '101',
|
|
59
|
+
'100': '101',
|
|
60
|
+
'001': '001',
|
|
61
|
+
'000': '000',
|
|
62
|
+
'111': '111',
|
|
63
|
+
'110': '111',
|
|
64
|
+
'011': '011',
|
|
65
|
+
'010': '010',
|
|
66
|
+
};
|
|
67
|
+
const selectionCode = [
|
|
68
|
+
this.form.hide_currency_symbol,
|
|
69
|
+
this.form.hide_decimal_characters,
|
|
70
|
+
this.form.use_international_currency_symbol,
|
|
71
|
+
]
|
|
72
|
+
.map(v => Number(Boolean(v)))
|
|
73
|
+
.join('');
|
|
74
|
+
return map[selectionCode];
|
|
75
|
+
};
|
|
76
|
+
this.__currencyStyleSetValue = (newValue) => {
|
|
77
|
+
this.edit({
|
|
78
|
+
hide_currency_symbol: Boolean(Number(newValue[0])),
|
|
79
|
+
hide_decimal_characters: Boolean(Number(newValue[1])),
|
|
80
|
+
use_international_currency_symbol: Boolean(Number(newValue[2])),
|
|
81
|
+
});
|
|
82
|
+
};
|
|
38
83
|
this.__appSessionTimeOptions = [
|
|
39
84
|
{ value: 's', label: 'second' },
|
|
40
85
|
{ value: 'm', label: 'minute' },
|
|
@@ -52,23 +97,11 @@ export class StoreForm extends Base {
|
|
|
52
97
|
this.__setStoreEmailValue = (newValue) => {
|
|
53
98
|
this.edit({ store_email: newValue.map(v => v.value).join(',') });
|
|
54
99
|
};
|
|
55
|
-
this.__getBccOnReceiptEmailValue = () => {
|
|
56
|
-
return this.form.bcc_on_receipt_email ? ['checked'] : [];
|
|
57
|
-
};
|
|
58
|
-
this.__setBccOnReceiptEmailValue = (newValue) => {
|
|
59
|
-
this.edit({ bcc_on_receipt_email: newValue.includes('checked') });
|
|
60
|
-
};
|
|
61
|
-
this.__getUseEmailDnsValue = () => {
|
|
62
|
-
return this.form.use_email_dns ? ['checked'] : [];
|
|
63
|
-
};
|
|
64
|
-
this.__setUseEmailDnsValue = (newValue) => {
|
|
65
|
-
this.edit({ use_email_dns: newValue.includes('checked') });
|
|
66
|
-
};
|
|
67
100
|
this.__getUseSmtpConfigValue = () => {
|
|
68
|
-
return this.form.smtp_config
|
|
101
|
+
return !!this.form.smtp_config;
|
|
69
102
|
};
|
|
70
103
|
this.__setUseSmtpConfigValue = (newValue) => {
|
|
71
|
-
if (newValue
|
|
104
|
+
if (newValue) {
|
|
72
105
|
this.edit({
|
|
73
106
|
smtp_config: JSON.stringify({
|
|
74
107
|
username: '',
|
|
@@ -83,18 +116,6 @@ export class StoreForm extends Base {
|
|
|
83
116
|
this.edit({ smtp_config: '' });
|
|
84
117
|
}
|
|
85
118
|
};
|
|
86
|
-
this.__getFeaturesMultishipValue = () => {
|
|
87
|
-
return this.form.features_multiship ? ['checked'] : [];
|
|
88
|
-
};
|
|
89
|
-
this.__setFeaturesMultishipValue = (newValue) => {
|
|
90
|
-
this.edit({ features_multiship: newValue.includes('checked') });
|
|
91
|
-
};
|
|
92
|
-
this.__getRequireSignedShippingRatesValue = () => {
|
|
93
|
-
return this.form.require_signed_shipping_rates ? ['checked'] : [];
|
|
94
|
-
};
|
|
95
|
-
this.__setRequireSignedShippingRatesValue = (newValue) => {
|
|
96
|
-
this.edit({ require_signed_shipping_rates: newValue.includes('checked') });
|
|
97
|
-
};
|
|
98
119
|
this.__getAppSessionTimeValue = () => {
|
|
99
120
|
const valueInSeconds = this.form.app_session_time || 43200;
|
|
100
121
|
if (valueInSeconds % 86400 === 0)
|
|
@@ -111,32 +132,6 @@ export class StoreForm extends Base {
|
|
|
111
132
|
const map = { d: 86400, h: 3600, m: 60, s: 1 };
|
|
112
133
|
this.edit({ app_session_time: map[units] * count });
|
|
113
134
|
};
|
|
114
|
-
this.__getProductsRequireExpiresPropertyValue = () => {
|
|
115
|
-
return this.form.products_require_expires_property ? ['checked'] : [];
|
|
116
|
-
};
|
|
117
|
-
this.__setProductsRequireExpiresPropertyValue = (newValue) => {
|
|
118
|
-
this.edit({ products_require_expires_property: newValue.includes('checked') });
|
|
119
|
-
};
|
|
120
|
-
this.__getUseCartValidationValue = () => {
|
|
121
|
-
return this.form.use_cart_validation ? ['checked'] : [];
|
|
122
|
-
};
|
|
123
|
-
this.__setUseCartValidationValue = (newValue) => {
|
|
124
|
-
this.edit({ use_cart_validation: newValue.includes('checked') });
|
|
125
|
-
};
|
|
126
|
-
this.__getSingleSignOnUrlValue = () => {
|
|
127
|
-
var _a;
|
|
128
|
-
return this.form.use_single_sign_on ? (_a = this.form.single_sign_on_url) !== null && _a !== void 0 ? _a : '' : '';
|
|
129
|
-
};
|
|
130
|
-
this.__setSingleSignOnUrlValue = (newValue) => {
|
|
131
|
-
this.edit({ use_single_sign_on: !!newValue, single_sign_on_url: newValue });
|
|
132
|
-
};
|
|
133
|
-
this.__getWebhookUrlValue = () => {
|
|
134
|
-
var _a;
|
|
135
|
-
return this.form.use_webhook ? (_a = this.form.webhook_url) !== null && _a !== void 0 ? _a : '' : '';
|
|
136
|
-
};
|
|
137
|
-
this.__setWebhookUrlValue = (newValue) => {
|
|
138
|
-
this.edit({ use_webhook: !!newValue, webhook_url: newValue });
|
|
139
|
-
};
|
|
140
135
|
this.__setStoreDomainValue = (newValue) => {
|
|
141
136
|
if (newValue.endsWith('.foxycart.com')) {
|
|
142
137
|
const domain = newValue.substring(0, newValue.length - 13);
|
|
@@ -146,6 +141,67 @@ export class StoreForm extends Base {
|
|
|
146
141
|
this.edit({ store_domain: newValue, use_remote_domain: newValue.includes('.') });
|
|
147
142
|
}
|
|
148
143
|
};
|
|
144
|
+
this.__smtpConfigHostGetValue = () => {
|
|
145
|
+
return this.__getSmtpConfig().host;
|
|
146
|
+
};
|
|
147
|
+
this.__smtpConfigHostSetValue = (newValue) => {
|
|
148
|
+
this.__setSmtpConfig('host', newValue);
|
|
149
|
+
};
|
|
150
|
+
this.__smtpConfigPortGetValue = () => {
|
|
151
|
+
const port = parseInt(this.__getSmtpConfig().port);
|
|
152
|
+
return isNaN(port) ? undefined : port;
|
|
153
|
+
};
|
|
154
|
+
this.__smtpConfigPortSetValue = (newValue) => {
|
|
155
|
+
this.__setSmtpConfig('port', String(newValue));
|
|
156
|
+
};
|
|
157
|
+
this.__smtpConfigUsernameGetValue = () => {
|
|
158
|
+
return this.__getSmtpConfig().username;
|
|
159
|
+
};
|
|
160
|
+
this.__smtpConfigUsernameSetValue = (newValue) => {
|
|
161
|
+
this.__setSmtpConfig('username', newValue);
|
|
162
|
+
};
|
|
163
|
+
this.__smtpConfigPasswordGetValue = () => {
|
|
164
|
+
return this.__getSmtpConfig().password;
|
|
165
|
+
};
|
|
166
|
+
this.__smtpConfigPasswordSetValue = (newValue) => {
|
|
167
|
+
this.__setSmtpConfig('password', newValue);
|
|
168
|
+
};
|
|
169
|
+
this.__smtpConfigSecurityGetValue = () => {
|
|
170
|
+
return this.__getSmtpConfig().security;
|
|
171
|
+
};
|
|
172
|
+
this.__smtpConfigSecuritySetValue = (newValue) => {
|
|
173
|
+
this.__setSmtpConfig('security', newValue);
|
|
174
|
+
};
|
|
175
|
+
this.__smtpConfigSecurityOptions = [
|
|
176
|
+
{ label: 'option_ssl', value: 'ssl' },
|
|
177
|
+
{ label: 'option_tls', value: 'tls' },
|
|
178
|
+
{ label: 'option_none', value: '' },
|
|
179
|
+
];
|
|
180
|
+
this.__webhookKeyGeneratorOptions = { length: 32, separator: '' };
|
|
181
|
+
this.__webhookKeyApiLegacyGetValue = () => {
|
|
182
|
+
return this.__getWebhookKey().api_legacy;
|
|
183
|
+
};
|
|
184
|
+
this.__webhookKeyApiLegacySetValue = (newValue) => {
|
|
185
|
+
this.__setWebhookKey('api_legacy', newValue);
|
|
186
|
+
};
|
|
187
|
+
this.__webhookKeyCartSigningGetValue = () => {
|
|
188
|
+
return this.__getWebhookKey().cart_signing;
|
|
189
|
+
};
|
|
190
|
+
this.__webhookKeyCartSigningSetValue = (newValue) => {
|
|
191
|
+
this.__setWebhookKey('cart_signing', newValue);
|
|
192
|
+
};
|
|
193
|
+
this.__webhookKeyXmlDatafeedGetValue = () => {
|
|
194
|
+
return this.__getWebhookKey().xml_datafeed;
|
|
195
|
+
};
|
|
196
|
+
this.__webhookKeyXmlDatafeedSetValue = (newValue) => {
|
|
197
|
+
this.__setWebhookKey('xml_datafeed', newValue);
|
|
198
|
+
};
|
|
199
|
+
this.__webhookKeySsoGetValue = () => {
|
|
200
|
+
return this.__getWebhookKey().sso;
|
|
201
|
+
};
|
|
202
|
+
this.__webhookKeySsoSetValue = (newValue) => {
|
|
203
|
+
this.__setWebhookKey('sso', newValue);
|
|
204
|
+
};
|
|
149
205
|
}
|
|
150
206
|
static get properties() {
|
|
151
207
|
return {
|
|
@@ -202,220 +258,233 @@ export class StoreForm extends Base {
|
|
|
202
258
|
return !v || String(v).length <= 100 || 'unified-order-entry-password:v8n_too_long';
|
|
203
259
|
},
|
|
204
260
|
({ custom_display_id_config: v }) => {
|
|
205
|
-
return !v || String(v).length <=
|
|
261
|
+
return !v || String(v).length <= 500 || 'custom-display-id-config-enabled:v8n_too_long';
|
|
206
262
|
},
|
|
207
263
|
];
|
|
208
264
|
}
|
|
265
|
+
get headerSubtitleOptions() {
|
|
266
|
+
var _a;
|
|
267
|
+
return { context: ((_a = this.data) === null || _a === void 0 ? void 0 : _a.is_active) ? 'active' : 'inactive' };
|
|
268
|
+
}
|
|
209
269
|
renderBody() {
|
|
210
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p
|
|
211
|
-
const
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
const isRequireSignedShippingRatesWarningVisible = this.form.require_signed_shipping_rates &&
|
|
215
|
-
!((_b = this.data) === null || _b === void 0 ? void 0 : _b.require_signed_shipping_rates) &&
|
|
216
|
-
!this.hiddenSelector.matches('require-signed-shipping-rates', true);
|
|
217
|
-
const isProductsRequireExpiresPropertyWarningVisible = this.form.products_require_expires_property &&
|
|
218
|
-
!((_c = this.data) === null || _c === void 0 ? void 0 : _c.products_require_expires_property) &&
|
|
219
|
-
!this.hiddenSelector.matches('products-require-expires-property', true);
|
|
220
|
-
const isUseCartValidationWarningVisible = this.form.use_cart_validation &&
|
|
221
|
-
!((_d = this.data) === null || _d === void 0 ? void 0 : _d.use_cart_validation) &&
|
|
222
|
-
!this.hiddenSelector.matches('use-cart-validation', true);
|
|
223
|
-
const storeDomainHelperText = this.t(this.form.use_remote_domain && !((_e = this.data) === null || _e === void 0 ? void 0 : _e.use_remote_domain)
|
|
224
|
-
? 'store-domain.custom_domain_note'
|
|
225
|
-
: 'store-domain.helper_text');
|
|
270
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
271
|
+
const storeDomainHelperText = this.t(this.form.use_remote_domain && !((_a = this.data) === null || _a === void 0 ? void 0 : _a.use_remote_domain)
|
|
272
|
+
? 'essentials.store-domain.custom_domain_note'
|
|
273
|
+
: 'essentials.store-domain.helper_text');
|
|
226
274
|
const storeDomainSuffix = !this.form.store_domain || this.form.store_domain.includes('.') ? '' : '.foxycart.com';
|
|
227
275
|
const customerPasswordHashTypesLoader = this.__renderLoader(1);
|
|
228
276
|
const shippingAddressTypesLoader = this.__renderLoader(2);
|
|
229
|
-
const checkoutTypesLoader = this.__renderLoader(3);
|
|
230
|
-
const storeVersionLoader = this.__renderLoader(4);
|
|
231
|
-
const localeCodesLoader = this.__renderLoader(5);
|
|
232
|
-
const languagesLoader = this.__renderLoader(6);
|
|
233
277
|
const timezonesLoader = this.__renderLoader(7);
|
|
234
278
|
const countriesLoader = this.__renderLoader(8);
|
|
235
279
|
const regionsLoader = this.__renderLoader(9);
|
|
236
|
-
const shippingAddressTypeEntries = Object.entries((
|
|
237
|
-
const
|
|
238
|
-
const
|
|
239
|
-
const
|
|
240
|
-
const
|
|
241
|
-
const countries = Object.values((_l = (_k = countriesLoader === null || countriesLoader === void 0 ? void 0 : countriesLoader.data) === null || _k === void 0 ? void 0 : _k.values) !== null && _l !== void 0 ? _l : {});
|
|
242
|
-
const regions = Object.values((_o = (_m = regionsLoader === null || regionsLoader === void 0 ? void 0 : regionsLoader.data) === null || _m === void 0 ? void 0 : _m.values) !== null && _o !== void 0 ? _o : {});
|
|
243
|
-
const customerPasswordHashTypeEntries = Object.entries((_q = (_p = customerPasswordHashTypesLoader === null || customerPasswordHashTypesLoader === void 0 ? void 0 : customerPasswordHashTypesLoader.data) === null || _p === void 0 ? void 0 : _p.values) !== null && _q !== void 0 ? _q : {});
|
|
244
|
-
const checkoutTypeEntries = Object.entries((_s = (_r = checkoutTypesLoader === null || checkoutTypesLoader === void 0 ? void 0 : checkoutTypesLoader.data) === null || _r === void 0 ? void 0 : _r.values) !== null && _s !== void 0 ? _s : {});
|
|
245
|
-
const localeCodeEntries = Object.entries((_t = localeCodes === null || localeCodes === void 0 ? void 0 : localeCodes.values) !== null && _t !== void 0 ? _t : {});
|
|
246
|
-
const languageEntries = Object.entries((_u = languages === null || languages === void 0 ? void 0 : languages.values) !== null && _u !== void 0 ? _u : {});
|
|
280
|
+
const shippingAddressTypeEntries = Object.entries((_c = (_b = shippingAddressTypesLoader === null || shippingAddressTypesLoader === void 0 ? void 0 : shippingAddressTypesLoader.data) === null || _b === void 0 ? void 0 : _b.values) !== null && _c !== void 0 ? _c : {});
|
|
281
|
+
const timezones = (_e = (_d = timezonesLoader === null || timezonesLoader === void 0 ? void 0 : timezonesLoader.data) === null || _d === void 0 ? void 0 : _d.values.timezone) !== null && _e !== void 0 ? _e : [];
|
|
282
|
+
const countries = Object.values((_g = (_f = countriesLoader === null || countriesLoader === void 0 ? void 0 : countriesLoader.data) === null || _f === void 0 ? void 0 : _f.values) !== null && _g !== void 0 ? _g : {});
|
|
283
|
+
const regions = Object.values((_j = (_h = regionsLoader === null || regionsLoader === void 0 ? void 0 : regionsLoader.data) === null || _h === void 0 ? void 0 : _h.values) !== null && _j !== void 0 ? _j : {});
|
|
284
|
+
const customerPasswordHashTypeEntries = Object.entries((_l = (_k = customerPasswordHashTypesLoader === null || customerPasswordHashTypesLoader === void 0 ? void 0 : customerPasswordHashTypesLoader.data) === null || _k === void 0 ? void 0 : _k.values) !== null && _l !== void 0 ? _l : {});
|
|
247
285
|
const customerPasswordHashTypeOptions = customerPasswordHashTypeEntries.map(v => ({
|
|
248
|
-
|
|
286
|
+
rawLabel: v[1].description,
|
|
249
287
|
value: v[0],
|
|
250
288
|
}));
|
|
251
|
-
const shippingAddressTypeOptions = shippingAddressTypeEntries.map(([value,
|
|
252
|
-
|
|
289
|
+
const shippingAddressTypeOptions = shippingAddressTypeEntries.map(([value, rawLabel]) => ({
|
|
290
|
+
rawLabel,
|
|
253
291
|
value,
|
|
254
292
|
}));
|
|
255
|
-
const
|
|
256
|
-
const
|
|
257
|
-
const
|
|
258
|
-
const timezoneOptions = timezones.map(t => ({ label: t.description, value: t.timezone }));
|
|
259
|
-
const countryOptions = countries.map(c => ({ label: c.default, value: c.cc2 }));
|
|
260
|
-
const regionOptions = regions.map(r => ({ label: r.default, value: r.code }));
|
|
293
|
+
const timezoneOptions = timezones.map(t => ({ rawLabel: t.description, value: t.timezone }));
|
|
294
|
+
const countryOptions = countries.map(c => ({ rawLabel: c.default, value: c.cc2 }));
|
|
295
|
+
const regionOptions = regions.map(r => ({ rawLabel: r.default, value: r.code }));
|
|
261
296
|
let regionsUrl;
|
|
262
297
|
try {
|
|
263
|
-
const regionsURL = new URL((
|
|
298
|
+
const regionsURL = new URL((_m = this.regions) !== null && _m !== void 0 ? _m : '');
|
|
264
299
|
const country = this.form.country;
|
|
265
300
|
if (country)
|
|
266
301
|
regionsURL.searchParams.set('country_code', country);
|
|
267
302
|
regionsUrl = regionsURL.toString();
|
|
268
303
|
}
|
|
269
|
-
catch (
|
|
304
|
+
catch (_q) {
|
|
270
305
|
regionsUrl = undefined;
|
|
271
306
|
}
|
|
307
|
+
const customDisplayIdConfig = this.__getCustomDisplayIdConfig();
|
|
308
|
+
const transactionJournalEntriesConfig = customDisplayIdConfig.transaction_journal_entries;
|
|
309
|
+
const logDetailRequestTypes = transactionJournalEntriesConfig.log_detail_request_types;
|
|
310
|
+
const displayIdExamples = this.__displayIdExamples;
|
|
311
|
+
const journalIdExamples = this.__journalIdExamples;
|
|
272
312
|
return html `
|
|
273
313
|
${this.renderHeader()}
|
|
274
314
|
|
|
275
|
-
<
|
|
276
|
-
<foxy-internal-text-control infer="store-name"
|
|
315
|
+
<foxy-internal-summary-control infer="essentials">
|
|
316
|
+
<foxy-internal-text-control layout="summary-item" infer="store-name">
|
|
317
|
+
</foxy-internal-text-control>
|
|
277
318
|
|
|
278
|
-
<foxy-internal-text-control infer="logo-url"
|
|
319
|
+
<foxy-internal-text-control layout="summary-item" infer="logo-url">
|
|
320
|
+
</foxy-internal-text-control>
|
|
279
321
|
|
|
280
322
|
<foxy-internal-text-control
|
|
281
323
|
helper-text=${storeDomainHelperText}
|
|
324
|
+
layout="summary-item"
|
|
282
325
|
suffix=${storeDomainSuffix}
|
|
283
326
|
infer="store-domain"
|
|
284
327
|
.setValue=${this.__setStoreDomainValue}
|
|
285
328
|
>
|
|
286
329
|
</foxy-internal-text-control>
|
|
287
330
|
|
|
288
|
-
<foxy-internal-text-control infer="store-url"
|
|
331
|
+
<foxy-internal-text-control layout="summary-item" infer="store-url">
|
|
332
|
+
</foxy-internal-text-control>
|
|
333
|
+
</foxy-internal-summary-control>
|
|
334
|
+
|
|
335
|
+
<foxy-internal-summary-control infer="essentials" label="" helper-text="">
|
|
336
|
+
<foxy-internal-switch-control infer="is-maintenance-mode"></foxy-internal-switch-control>
|
|
337
|
+
</foxy-internal-summary-control>
|
|
289
338
|
|
|
339
|
+
<foxy-internal-summary-control infer="essentials" label="" helper-text="">
|
|
290
340
|
<foxy-internal-editable-list-control
|
|
341
|
+
layout="summary-item"
|
|
291
342
|
infer="store-email"
|
|
292
|
-
class="sm-col-span-2"
|
|
293
343
|
.getValue=${this.__getStoreEmailValue}
|
|
294
344
|
.setValue=${this.__setStoreEmailValue}
|
|
295
345
|
>
|
|
296
346
|
</foxy-internal-editable-list-control>
|
|
347
|
+
</foxy-internal-summary-control>
|
|
297
348
|
|
|
349
|
+
<foxy-internal-summary-control infer="essentials" label="" helper-text="">
|
|
298
350
|
<foxy-internal-select-control
|
|
351
|
+
layout="summary-item"
|
|
299
352
|
infer="timezone"
|
|
300
|
-
class="sm-col-span-2"
|
|
301
353
|
.options=${timezoneOptions}
|
|
302
354
|
>
|
|
303
355
|
</foxy-internal-select-control>
|
|
304
356
|
|
|
305
|
-
<foxy-internal-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
infer="store-version-uri"
|
|
310
|
-
first=${ifDefined((_w = this.storeVersions) !== null && _w !== void 0 ? _w : undefined)}
|
|
311
|
-
.selectedItem=${storeVersion}
|
|
357
|
+
<foxy-internal-select-control
|
|
358
|
+
layout="summary-item"
|
|
359
|
+
infer="country"
|
|
360
|
+
.options=${countryOptions}
|
|
312
361
|
>
|
|
313
|
-
</foxy-internal-
|
|
362
|
+
</foxy-internal-select-control>
|
|
314
363
|
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
364
|
+
${regionOptions.length > 0
|
|
365
|
+
? html `
|
|
366
|
+
<foxy-internal-select-control
|
|
367
|
+
layout="summary-item"
|
|
368
|
+
infer="region"
|
|
369
|
+
.options=${regionOptions}
|
|
370
|
+
>
|
|
371
|
+
</foxy-internal-select-control>
|
|
372
|
+
`
|
|
373
|
+
: html `
|
|
374
|
+
<foxy-internal-text-control layout="summary-item" infer="region">
|
|
375
|
+
</foxy-internal-text-control>
|
|
376
|
+
`}
|
|
377
|
+
|
|
378
|
+
<foxy-internal-text-control layout="summary-item" infer="postal-code">
|
|
320
379
|
</foxy-internal-text-control>
|
|
321
380
|
|
|
322
|
-
<foxy-internal-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
.
|
|
326
|
-
.
|
|
327
|
-
.
|
|
381
|
+
<foxy-internal-select-control
|
|
382
|
+
layout="summary-item"
|
|
383
|
+
infer="currency-style"
|
|
384
|
+
.options=${this.__currencyStyleOptions}
|
|
385
|
+
.getValue=${this.__currencyStyleGetValue}
|
|
386
|
+
.setValue=${this.__currencyStyleSetValue}
|
|
328
387
|
>
|
|
329
|
-
</foxy-internal-
|
|
388
|
+
</foxy-internal-select-control>
|
|
389
|
+
</foxy-internal-summary-control>
|
|
330
390
|
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
.
|
|
391
|
+
<foxy-internal-summary-control infer="legacy-api">
|
|
392
|
+
<foxy-internal-password-control
|
|
393
|
+
layout="summary-item"
|
|
394
|
+
infer="webhook-key-api-legacy"
|
|
395
|
+
show-generator
|
|
396
|
+
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
397
|
+
.getValue=${this.__webhookKeyApiLegacyGetValue}
|
|
398
|
+
.setValue=${this.__webhookKeyApiLegacySetValue}
|
|
337
399
|
>
|
|
338
|
-
</foxy-internal-
|
|
400
|
+
</foxy-internal-password-control>
|
|
401
|
+
</foxy-internal-summary-control>
|
|
339
402
|
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
403
|
+
<foxy-internal-summary-control infer="emails">
|
|
404
|
+
<foxy-internal-text-control
|
|
405
|
+
layout="summary-item"
|
|
406
|
+
infer="from-email"
|
|
407
|
+
placeholder=${(_p = (_o = this.__getStoreEmailValue()[0]) === null || _o === void 0 ? void 0 : _o.value) !== null && _p !== void 0 ? _p : this.t('emails.from-email.placeholder')}
|
|
408
|
+
>
|
|
409
|
+
</foxy-internal-text-control>
|
|
346
410
|
|
|
347
|
-
<foxy-internal-
|
|
411
|
+
<foxy-internal-switch-control infer="use-email-dns" helper-text-as-tooltip>
|
|
412
|
+
</foxy-internal-switch-control>
|
|
413
|
+
|
|
414
|
+
<foxy-internal-switch-control
|
|
348
415
|
infer="use-smtp-config"
|
|
349
|
-
|
|
416
|
+
helper-text-as-tooltip
|
|
350
417
|
.getValue=${this.__getUseSmtpConfigValue}
|
|
351
418
|
.setValue=${this.__setUseSmtpConfigValue}
|
|
352
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
353
419
|
>
|
|
354
|
-
</foxy-internal-
|
|
420
|
+
</foxy-internal-switch-control>
|
|
355
421
|
|
|
356
|
-
${this.form.smtp_config
|
|
357
|
-
?
|
|
358
|
-
|
|
422
|
+
${this.form.smtp_config
|
|
423
|
+
? html `
|
|
424
|
+
<foxy-internal-text-control
|
|
425
|
+
layout="summary-item"
|
|
426
|
+
infer="smtp-config-host"
|
|
427
|
+
.getValue=${this.__smtpConfigHostGetValue}
|
|
428
|
+
.setValue=${this.__smtpConfigHostSetValue}
|
|
429
|
+
>
|
|
430
|
+
</foxy-internal-text-control>
|
|
359
431
|
|
|
360
|
-
|
|
361
|
-
|
|
432
|
+
<foxy-internal-number-control
|
|
433
|
+
layout="summary-item"
|
|
434
|
+
infer="smtp-config-port"
|
|
435
|
+
step="1"
|
|
436
|
+
min="0"
|
|
437
|
+
.getValue=${this.__smtpConfigPortGetValue}
|
|
438
|
+
.setValue=${this.__smtpConfigPortSetValue}
|
|
439
|
+
>
|
|
440
|
+
</foxy-internal-number-control>
|
|
362
441
|
|
|
363
|
-
|
|
364
|
-
|
|
442
|
+
<foxy-internal-text-control
|
|
443
|
+
layout="summary-item"
|
|
444
|
+
infer="smtp-config-username"
|
|
445
|
+
.getValue=${this.__smtpConfigUsernameGetValue}
|
|
446
|
+
.setValue=${this.__smtpConfigUsernameSetValue}
|
|
447
|
+
>
|
|
448
|
+
</foxy-internal-text-control>
|
|
365
449
|
|
|
366
|
-
|
|
450
|
+
<foxy-internal-password-control
|
|
451
|
+
layout="summary-item"
|
|
452
|
+
infer="smtp-config-password"
|
|
453
|
+
.getValue=${this.__smtpConfigPasswordGetValue}
|
|
454
|
+
.setValue=${this.__smtpConfigPasswordSetValue}
|
|
455
|
+
>
|
|
456
|
+
</foxy-internal-password-control>
|
|
367
457
|
|
|
458
|
+
<foxy-internal-select-control
|
|
459
|
+
layout="summary-item"
|
|
460
|
+
infer="smtp-config-security"
|
|
461
|
+
.getValue=${this.__smtpConfigSecurityGetValue}
|
|
462
|
+
.setValue=${this.__smtpConfigSecuritySetValue}
|
|
463
|
+
.options=${this.__smtpConfigSecurityOptions}
|
|
464
|
+
>
|
|
465
|
+
</foxy-internal-select-control>
|
|
466
|
+
`
|
|
467
|
+
: ''}
|
|
468
|
+
</foxy-internal-summary-control>
|
|
469
|
+
|
|
470
|
+
<foxy-internal-summary-control infer="shipping">
|
|
368
471
|
<foxy-internal-select-control
|
|
472
|
+
layout="summary-item"
|
|
369
473
|
infer="shipping-address-type"
|
|
370
474
|
.options=${shippingAddressTypeOptions}
|
|
371
475
|
>
|
|
372
476
|
</foxy-internal-select-control>
|
|
373
477
|
|
|
374
|
-
<foxy-internal-
|
|
375
|
-
|
|
376
|
-
class="-mt-xs -mb-m sm-col-span-2"
|
|
377
|
-
.getValue=${this.__getFeaturesMultishipValue}
|
|
378
|
-
.setValue=${this.__setFeaturesMultishipValue}
|
|
379
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
380
|
-
>
|
|
381
|
-
</foxy-internal-checkbox-group-control>
|
|
382
|
-
|
|
383
|
-
<foxy-internal-checkbox-group-control
|
|
384
|
-
infer="require-signed-shipping-rates"
|
|
385
|
-
class="-mt-xs -mb-m sm-col-span-2"
|
|
386
|
-
.getValue=${this.__getRequireSignedShippingRatesValue}
|
|
387
|
-
.setValue=${this.__setRequireSignedShippingRatesValue}
|
|
388
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
389
|
-
>
|
|
390
|
-
</foxy-internal-checkbox-group-control>
|
|
391
|
-
|
|
392
|
-
${isRequireSignedShippingRatesWarningVisible
|
|
393
|
-
? this.__renderWarning('require_signed_shipping_rates_helper_text')
|
|
394
|
-
: ''}
|
|
395
|
-
|
|
396
|
-
<foxy-internal-select-control infer="language" .options=${languageOptions}>
|
|
397
|
-
</foxy-internal-select-control>
|
|
398
|
-
|
|
399
|
-
<foxy-internal-select-control infer="locale-code" .options=${localeCodeOptions}>
|
|
400
|
-
</foxy-internal-select-control>
|
|
401
|
-
|
|
402
|
-
${!this.hiddenSelector.matches('currency-style', true)
|
|
403
|
-
? this.__renderCurrencyStyleSelector()
|
|
404
|
-
: ''}
|
|
478
|
+
<foxy-internal-switch-control infer="features-multiship" helper-text-as-tooltip>
|
|
479
|
+
</foxy-internal-switch-control>
|
|
405
480
|
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
? this.__renderCustomIDSettings()
|
|
410
|
-
: ''}
|
|
411
|
-
|
|
412
|
-
<!-- -->
|
|
413
|
-
|
|
414
|
-
<foxy-internal-text-control class="sm-col-span-2" infer="receipt-continue-url">
|
|
415
|
-
</foxy-internal-text-control>
|
|
481
|
+
<foxy-internal-switch-control infer="require-signed-shipping-rates" helper-text-as-tooltip>
|
|
482
|
+
</foxy-internal-switch-control>
|
|
483
|
+
</foxy-internal-summary-control>
|
|
416
484
|
|
|
485
|
+
<foxy-internal-summary-control infer="cart">
|
|
417
486
|
<foxy-internal-frequency-control
|
|
418
|
-
|
|
487
|
+
layout="summary-item"
|
|
419
488
|
infer="app-session-time"
|
|
420
489
|
.getValue=${this.__getAppSessionTimeValue}
|
|
421
490
|
.setValue=${this.__setAppSessionTimeValue}
|
|
@@ -423,43 +492,29 @@ export class StoreForm extends Base {
|
|
|
423
492
|
>
|
|
424
493
|
</foxy-internal-frequency-control>
|
|
425
494
|
|
|
426
|
-
<foxy-internal-
|
|
495
|
+
<foxy-internal-switch-control
|
|
427
496
|
infer="products-require-expires-property"
|
|
428
|
-
|
|
429
|
-
.getValue=${this.__getProductsRequireExpiresPropertyValue}
|
|
430
|
-
.setValue=${this.__setProductsRequireExpiresPropertyValue}
|
|
431
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
497
|
+
helper-text-as-tooltip
|
|
432
498
|
>
|
|
433
|
-
</foxy-internal-
|
|
499
|
+
</foxy-internal-switch-control>
|
|
434
500
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
: ''}
|
|
501
|
+
<foxy-internal-switch-control infer="use-cart-validation" helper-text-as-tooltip>
|
|
502
|
+
</foxy-internal-switch-control>
|
|
438
503
|
|
|
439
|
-
<foxy-internal-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
.
|
|
444
|
-
.
|
|
445
|
-
|
|
446
|
-
</foxy-internal-checkbox-group-control>
|
|
447
|
-
|
|
448
|
-
${isUseCartValidationWarningVisible
|
|
449
|
-
? this.__renderWarning('use_cart_validation_helper_text', {
|
|
450
|
-
href: 'https://wiki.foxycart.com/v/2.0/hmac_validation',
|
|
451
|
-
caption: 'HMAC Product Verification: Locking Down your Add-To-Cart Links and Forms',
|
|
452
|
-
})
|
|
453
|
-
: ''}
|
|
454
|
-
|
|
455
|
-
<foxy-internal-select-control
|
|
456
|
-
infer="checkout-type"
|
|
457
|
-
class="sm-col-span-2"
|
|
458
|
-
.options=${checkoutTypeOptions}
|
|
504
|
+
<foxy-internal-password-control
|
|
505
|
+
layout="summary-item"
|
|
506
|
+
infer="webhook-key-cart-signing"
|
|
507
|
+
show-generator
|
|
508
|
+
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
509
|
+
.getValue=${this.__webhookKeyCartSigningGetValue}
|
|
510
|
+
.setValue=${this.__webhookKeyCartSigningSetValue}
|
|
459
511
|
>
|
|
460
|
-
</foxy-internal-
|
|
512
|
+
</foxy-internal-password-control>
|
|
513
|
+
</foxy-internal-summary-control>
|
|
461
514
|
|
|
515
|
+
<foxy-internal-summary-control infer="checkout">
|
|
462
516
|
<foxy-internal-select-control
|
|
517
|
+
layout="summary-item"
|
|
463
518
|
infer="customer-password-hash-type"
|
|
464
519
|
.options=${customerPasswordHashTypeOptions}
|
|
465
520
|
.setValue=${(newValue) => {
|
|
@@ -475,52 +530,290 @@ export class StoreForm extends Base {
|
|
|
475
530
|
|
|
476
531
|
${typeof this.form.customer_password_hash_config === 'number'
|
|
477
532
|
? html `
|
|
478
|
-
<foxy-internal-number-control
|
|
533
|
+
<foxy-internal-number-control
|
|
534
|
+
layout="summary-item"
|
|
535
|
+
infer="customer-password-hash-config"
|
|
536
|
+
>
|
|
479
537
|
</foxy-internal-number-control>
|
|
480
538
|
`
|
|
481
539
|
: html `
|
|
482
|
-
<foxy-internal-text-control
|
|
540
|
+
<foxy-internal-text-control
|
|
541
|
+
layout="summary-item"
|
|
542
|
+
infer="customer-password-hash-config"
|
|
543
|
+
>
|
|
483
544
|
</foxy-internal-text-control>
|
|
484
545
|
`}
|
|
546
|
+
</foxy-internal-summary-control>
|
|
485
547
|
|
|
486
|
-
|
|
548
|
+
<foxy-internal-summary-control infer="checkout" label="" helper-text="">
|
|
549
|
+
<foxy-internal-password-control
|
|
550
|
+
layout="summary-item"
|
|
551
|
+
infer="unified-order-entry-password"
|
|
552
|
+
show-generator
|
|
553
|
+
>
|
|
487
554
|
</foxy-internal-password-control>
|
|
555
|
+
</foxy-internal-summary-control>
|
|
488
556
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
557
|
+
<foxy-internal-summary-control infer="checkout" label="" helper-text="">
|
|
558
|
+
<foxy-internal-switch-control infer="use-single-sign-on"></foxy-internal-switch-control>
|
|
559
|
+
${this.form.use_single_sign_on
|
|
560
|
+
? html `
|
|
561
|
+
<foxy-internal-text-control layout="summary-item" infer="single-sign-on-url">
|
|
562
|
+
</foxy-internal-text-control>
|
|
563
|
+
<foxy-internal-password-control
|
|
564
|
+
layout="summary-item"
|
|
565
|
+
infer="webhook-key-sso"
|
|
566
|
+
show-generator
|
|
567
|
+
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
568
|
+
.getValue=${this.__webhookKeySsoGetValue}
|
|
569
|
+
.setValue=${this.__webhookKeySsoSetValue}
|
|
570
|
+
>
|
|
571
|
+
</foxy-internal-password-control>
|
|
572
|
+
`
|
|
573
|
+
: ''}
|
|
574
|
+
</foxy-internal-summary-control>
|
|
575
|
+
|
|
576
|
+
<foxy-internal-summary-control infer="receipt">
|
|
577
|
+
<foxy-internal-text-control layout="summary-item" infer="receipt-continue-url">
|
|
494
578
|
</foxy-internal-text-control>
|
|
579
|
+
<foxy-internal-switch-control infer="bcc-on-receipt-email"></foxy-internal-switch-control>
|
|
580
|
+
</foxy-internal-summary-control>
|
|
495
581
|
|
|
496
|
-
|
|
497
|
-
|
|
582
|
+
<foxy-internal-summary-control infer="custom-display-id-config">
|
|
583
|
+
<foxy-internal-switch-control
|
|
584
|
+
infer="custom-display-id-config-enabled"
|
|
585
|
+
.getValue=${() => customDisplayIdConfig.enabled}
|
|
586
|
+
.setValue=${(newValue) => {
|
|
587
|
+
this.__setCustomDisplayIdConfig('enabled', newValue);
|
|
588
|
+
}}
|
|
589
|
+
>
|
|
590
|
+
</foxy-internal-switch-control>
|
|
591
|
+
|
|
592
|
+
${customDisplayIdConfig.enabled
|
|
593
|
+
? html `
|
|
594
|
+
<foxy-internal-number-control
|
|
595
|
+
layout="summary-item"
|
|
596
|
+
infer="custom-display-id-config-start"
|
|
597
|
+
step="1"
|
|
598
|
+
min="0"
|
|
599
|
+
.getValue=${() => parseInt(customDisplayIdConfig.start || '0')}
|
|
600
|
+
.setValue=${(newValue) => {
|
|
601
|
+
this.__setCustomDisplayIdConfig('start', String(newValue));
|
|
602
|
+
}}
|
|
603
|
+
>
|
|
604
|
+
</foxy-internal-number-control>
|
|
605
|
+
|
|
606
|
+
<foxy-internal-number-control
|
|
607
|
+
layout="summary-item"
|
|
608
|
+
infer="custom-display-id-config-length"
|
|
609
|
+
step="1"
|
|
610
|
+
min="0"
|
|
611
|
+
.getValue=${() => parseInt(customDisplayIdConfig.length || '0')}
|
|
612
|
+
.setValue=${(newValue) => {
|
|
613
|
+
this.__setCustomDisplayIdConfig('length', String(newValue));
|
|
614
|
+
}}
|
|
615
|
+
>
|
|
616
|
+
</foxy-internal-number-control>
|
|
617
|
+
|
|
618
|
+
<foxy-internal-text-control
|
|
619
|
+
layout="summary-item"
|
|
620
|
+
infer="custom-display-id-config-prefix"
|
|
621
|
+
.getValue=${() => customDisplayIdConfig.prefix}
|
|
622
|
+
.setValue=${(newValue) => {
|
|
623
|
+
this.__setCustomDisplayIdConfig('prefix', newValue);
|
|
624
|
+
}}
|
|
625
|
+
>
|
|
626
|
+
</foxy-internal-text-control>
|
|
627
|
+
|
|
628
|
+
<foxy-internal-text-control
|
|
629
|
+
layout="summary-item"
|
|
630
|
+
infer="custom-display-id-config-suffix"
|
|
631
|
+
.getValue=${() => customDisplayIdConfig.suffix}
|
|
632
|
+
.setValue=${(newValue) => {
|
|
633
|
+
this.__setCustomDisplayIdConfig('suffix', newValue);
|
|
634
|
+
}}
|
|
635
|
+
>
|
|
636
|
+
</foxy-internal-text-control>
|
|
637
|
+
|
|
638
|
+
<div class="text-right text-secondary">
|
|
639
|
+
<p class="flex justify-end">
|
|
640
|
+
<foxy-i18n infer="" key="custom-display-id-config-first-example"></foxy-i18n>
|
|
641
|
+
<span style="font-family: monospace"> ${displayIdExamples === null || displayIdExamples === void 0 ? void 0 : displayIdExamples.first}</span>
|
|
642
|
+
</p>
|
|
643
|
+
<p class="flex justify-end">
|
|
644
|
+
<foxy-i18n infer="" key="custom-display-id-config-random-example"></foxy-i18n>
|
|
645
|
+
<span style="font-family: monospace"> ${displayIdExamples === null || displayIdExamples === void 0 ? void 0 : displayIdExamples.random}</span>
|
|
646
|
+
</p>
|
|
647
|
+
</div>
|
|
648
|
+
`
|
|
649
|
+
: ''}
|
|
650
|
+
</foxy-internal-summary-control>
|
|
651
|
+
|
|
652
|
+
<foxy-internal-summary-control helper-text="" label="" infer="custom-display-id-config">
|
|
653
|
+
<foxy-internal-switch-control
|
|
654
|
+
infer="custom-display-id-config-transaction-journal-entries-enabled"
|
|
498
655
|
class="sm-col-span-2"
|
|
499
|
-
.getValue=${
|
|
500
|
-
.setValue=${
|
|
656
|
+
.getValue=${() => transactionJournalEntriesConfig.enabled}
|
|
657
|
+
.setValue=${(newValue) => {
|
|
658
|
+
this.__setTransactionJournalEntriesConfig('enabled', newValue);
|
|
659
|
+
}}
|
|
501
660
|
>
|
|
502
|
-
</foxy-internal-
|
|
661
|
+
</foxy-internal-switch-control>
|
|
503
662
|
|
|
504
|
-
${
|
|
663
|
+
${transactionJournalEntriesConfig.enabled
|
|
664
|
+
? html `
|
|
665
|
+
<foxy-internal-text-control
|
|
666
|
+
layout="summary-item"
|
|
667
|
+
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-authcapture-prefix"
|
|
668
|
+
.getValue=${() => logDetailRequestTypes.transaction_authcapture.prefix}
|
|
669
|
+
.setValue=${(newValue) => {
|
|
670
|
+
this.__setTransactionJournalEntriesPrefix('transaction_authcapture', newValue);
|
|
671
|
+
}}
|
|
672
|
+
>
|
|
673
|
+
</foxy-internal-text-control>
|
|
505
674
|
|
|
506
|
-
|
|
675
|
+
<foxy-internal-text-control
|
|
676
|
+
layout="summary-item"
|
|
677
|
+
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-capture-prefix"
|
|
678
|
+
.getValue=${() => logDetailRequestTypes.transaction_capture.prefix}
|
|
679
|
+
.setValue=${(newValue) => {
|
|
680
|
+
this.__setTransactionJournalEntriesPrefix('transaction_capture', newValue);
|
|
681
|
+
}}
|
|
682
|
+
>
|
|
683
|
+
</foxy-internal-text-control>
|
|
507
684
|
|
|
508
|
-
|
|
509
|
-
|
|
685
|
+
<foxy-internal-text-control
|
|
686
|
+
layout="summary-item"
|
|
687
|
+
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-void-prefix"
|
|
688
|
+
.getValue=${() => logDetailRequestTypes.transaction_void.prefix}
|
|
689
|
+
.setValue=${(newValue) => {
|
|
690
|
+
this.__setTransactionJournalEntriesPrefix('transaction_void', newValue);
|
|
691
|
+
}}
|
|
692
|
+
>
|
|
693
|
+
</foxy-internal-text-control>
|
|
694
|
+
|
|
695
|
+
<foxy-internal-text-control
|
|
696
|
+
layout="summary-item"
|
|
697
|
+
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-refund-prefix"
|
|
698
|
+
.getValue=${() => logDetailRequestTypes.transaction_refund.prefix}
|
|
699
|
+
.setValue=${(newValue) => {
|
|
700
|
+
this.__setTransactionJournalEntriesPrefix('transaction_refund', newValue);
|
|
701
|
+
}}
|
|
702
|
+
>
|
|
703
|
+
</foxy-internal-text-control>
|
|
704
|
+
|
|
705
|
+
<foxy-internal-text-control
|
|
706
|
+
layout="summary-item"
|
|
707
|
+
infer="custom-display-id-config-transaction-journal-entries-transaction-separator"
|
|
708
|
+
class="col-span-2"
|
|
709
|
+
.getValue=${() => transactionJournalEntriesConfig.transaction_separator}
|
|
710
|
+
.setValue=${(newValue) => {
|
|
711
|
+
this.__setTransactionJournalEntriesConfig('transaction_separator', newValue);
|
|
712
|
+
}}
|
|
713
|
+
>
|
|
714
|
+
</foxy-internal-text-control>
|
|
715
|
+
|
|
716
|
+
<div class="sm-col-span-2 leading-s text-right text-secondary">
|
|
717
|
+
<p>
|
|
718
|
+
<foxy-i18n
|
|
719
|
+
infer=""
|
|
720
|
+
key="custom-display-id-config-transaction-journal-entries-authcapture-example"
|
|
721
|
+
>
|
|
722
|
+
</foxy-i18n>
|
|
723
|
+
<span style="font-family: monospace"> ${journalIdExamples === null || journalIdExamples === void 0 ? void 0 : journalIdExamples.authcapture} </span>
|
|
724
|
+
</p>
|
|
725
|
+
<p>
|
|
726
|
+
<foxy-i18n
|
|
727
|
+
infer=""
|
|
728
|
+
key="custom-display-id-config-transaction-journal-entries-capture-example"
|
|
729
|
+
>
|
|
730
|
+
</foxy-i18n>
|
|
731
|
+
<span style="font-family: monospace">${journalIdExamples === null || journalIdExamples === void 0 ? void 0 : journalIdExamples.capture}</span>
|
|
732
|
+
</p>
|
|
733
|
+
<p>
|
|
734
|
+
<foxy-i18n
|
|
735
|
+
infer=""
|
|
736
|
+
key="custom-display-id-config-transaction-journal-entries-void-example"
|
|
737
|
+
>
|
|
738
|
+
</foxy-i18n>
|
|
739
|
+
<span style="font-family: monospace">${journalIdExamples === null || journalIdExamples === void 0 ? void 0 : journalIdExamples.void}</span>
|
|
740
|
+
</p>
|
|
741
|
+
<p>
|
|
742
|
+
<foxy-i18n
|
|
743
|
+
infer=""
|
|
744
|
+
key="custom-display-id-config-transaction-journal-entries-refund-example"
|
|
745
|
+
>
|
|
746
|
+
</foxy-i18n>
|
|
747
|
+
<span style="font-family: monospace">${journalIdExamples === null || journalIdExamples === void 0 ? void 0 : journalIdExamples.refund}</span>
|
|
748
|
+
</p>
|
|
749
|
+
</div>
|
|
750
|
+
`
|
|
510
751
|
: ''}
|
|
511
|
-
</
|
|
752
|
+
</foxy-internal-summary-control>
|
|
753
|
+
|
|
754
|
+
<foxy-internal-summary-control infer="xml-datafeed">
|
|
755
|
+
<foxy-internal-switch-control infer="use-webhook"></foxy-internal-switch-control>
|
|
756
|
+
${this.form.use_webhook
|
|
757
|
+
? html `
|
|
758
|
+
<foxy-internal-text-control layout="summary-item" infer="webhook-url">
|
|
759
|
+
</foxy-internal-text-control>
|
|
760
|
+
<foxy-internal-password-control
|
|
761
|
+
layout="summary-item"
|
|
762
|
+
infer="webhook-key-xml-datafeed"
|
|
763
|
+
show-generator
|
|
764
|
+
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
765
|
+
.getValue=${this.__webhookKeyXmlDatafeedGetValue}
|
|
766
|
+
.setValue=${this.__webhookKeyXmlDatafeedSetValue}
|
|
767
|
+
>
|
|
768
|
+
</foxy-internal-password-control>
|
|
769
|
+
`
|
|
770
|
+
: ''}
|
|
771
|
+
</foxy-internal-summary-control>
|
|
512
772
|
|
|
513
773
|
${super.renderBody()}
|
|
514
774
|
${customerPasswordHashTypesLoader.render(this.customerPasswordHashTypes)}
|
|
515
775
|
${shippingAddressTypesLoader.render(this.shippingAddressTypes)}
|
|
516
|
-
${
|
|
517
|
-
${storeVersionLoader.render(this.form.store_version_uri)}
|
|
518
|
-
${localeCodesLoader.render(this.localeCodes)} ${timezonesLoader.render(this.timezones)}
|
|
519
|
-
${countriesLoader.render(this.countries)} ${languagesLoader.render(this.languages)}
|
|
776
|
+
${timezonesLoader.render(this.timezones)} ${countriesLoader.render(this.countries)}
|
|
520
777
|
${regionsLoader.render(regionsUrl)}
|
|
521
778
|
`;
|
|
522
779
|
}
|
|
523
|
-
|
|
780
|
+
get __displayIdExamples() {
|
|
781
|
+
const config = this.__getCustomDisplayIdConfig();
|
|
782
|
+
const startAsInt = parseInt(config.start || '0');
|
|
783
|
+
const lengthAsInt = parseInt(config.length || '0');
|
|
784
|
+
const numericLength = lengthAsInt - config.prefix.length - config.suffix.length;
|
|
785
|
+
const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, numericLength)), Math.pow(10, numericLength) - 1);
|
|
786
|
+
if (config.start && config.length && startAsInt / 10 <= numericLength) {
|
|
787
|
+
return {
|
|
788
|
+
first: `${config.prefix}${startAsInt.toString().padStart(numericLength, '0')}${config.suffix}`,
|
|
789
|
+
random: `${config.prefix}${randomExampleNumericId.toString().padStart(numericLength, '0')}${config.suffix}`,
|
|
790
|
+
};
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
get __journalIdExamples() {
|
|
794
|
+
const customDisplayIdConfig = this.__getCustomDisplayIdConfig();
|
|
795
|
+
const transactionJournalEntriesConfig = customDisplayIdConfig.transaction_journal_entries;
|
|
796
|
+
const startAsInt = parseInt(customDisplayIdConfig.start || '0');
|
|
797
|
+
const lengthAsInt = parseInt(customDisplayIdConfig.length || '0');
|
|
798
|
+
const numericLength = lengthAsInt - customDisplayIdConfig.prefix.length - customDisplayIdConfig.suffix.length;
|
|
799
|
+
const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, numericLength)), Math.pow(10, numericLength) - 1);
|
|
800
|
+
const randomExampleId = `${customDisplayIdConfig.prefix}${randomExampleNumericId
|
|
801
|
+
.toString()
|
|
802
|
+
.padStart(numericLength, '0')}${customDisplayIdConfig.suffix}`;
|
|
803
|
+
const randomNumericEntryId = Math.floor(Math.random() * 1000);
|
|
804
|
+
const randomEntryId = String(randomNumericEntryId).padStart(3, '0');
|
|
805
|
+
if (customDisplayIdConfig.start &&
|
|
806
|
+
customDisplayIdConfig.length &&
|
|
807
|
+
startAsInt / 10 <= numericLength) {
|
|
808
|
+
return {
|
|
809
|
+
authcapture: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_authcapture.prefix}${randomEntryId}`,
|
|
810
|
+
capture: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_capture.prefix}${randomEntryId}`,
|
|
811
|
+
refund: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_refund.prefix}${randomEntryId}`,
|
|
812
|
+
void: `${randomExampleId}${transactionJournalEntriesConfig.transaction_separator}${transactionJournalEntriesConfig.log_detail_request_types.transaction_void.prefix}${randomEntryId}`,
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
__getWebhookKey() {
|
|
524
817
|
var _a, _b;
|
|
525
818
|
let parsedKey;
|
|
526
819
|
try {
|
|
@@ -530,128 +823,14 @@ export class StoreForm extends Base {
|
|
|
530
823
|
const v = (_b = this.form.webhook_key) !== null && _b !== void 0 ? _b : '';
|
|
531
824
|
parsedKey = { cart_signing: v, xml_datafeed: v, api_legacy: v, sso: v };
|
|
532
825
|
}
|
|
533
|
-
return
|
|
534
|
-
return html `
|
|
535
|
-
<foxy-internal-password-control
|
|
536
|
-
infer="webhook-key-${key.replace('_', '-')}"
|
|
537
|
-
.getValue=${() => parsedKey[key]}
|
|
538
|
-
.setValue=${(newValue) => {
|
|
539
|
-
parsedKey[key] = newValue;
|
|
540
|
-
this.edit({ webhook_key: JSON.stringify(parsedKey) });
|
|
541
|
-
}}
|
|
542
|
-
>
|
|
543
|
-
</foxy-internal-password-control>
|
|
544
|
-
`;
|
|
545
|
-
});
|
|
826
|
+
return parsedKey;
|
|
546
827
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
const explainerKey = `maintenance_mode_${isActive ? 'on' : 'off'}_explainer`;
|
|
552
|
-
return html `
|
|
553
|
-
<div
|
|
554
|
-
data-testid="is-maintenance-mode"
|
|
555
|
-
class=${classMap({
|
|
556
|
-
'rounded leading-s text-s sm-col-span-2': true,
|
|
557
|
-
'text-tertiary': !isActive,
|
|
558
|
-
'text-error': isActive,
|
|
559
|
-
})}
|
|
560
|
-
>
|
|
561
|
-
<foxy-i18n infer="" class="block mb-s" key=${explainerKey}></foxy-i18n>
|
|
562
|
-
|
|
563
|
-
<vaadin-button
|
|
564
|
-
theme="tertiary small ${isActive ? 'contrast' : ''}"
|
|
565
|
-
class="p-0"
|
|
566
|
-
?disabled=${this.disabledSelector.matches('is-maintenance-mode', true)}
|
|
567
|
-
@click=${() => {
|
|
568
|
-
this.edit({ is_maintenance_mode: !this.form.is_maintenance_mode });
|
|
569
|
-
this.submit();
|
|
570
|
-
}}
|
|
571
|
-
>
|
|
572
|
-
<foxy-i18n infer="" key=${buttonKey}></foxy-i18n>
|
|
573
|
-
</vaadin-button>
|
|
574
|
-
</div>
|
|
575
|
-
`;
|
|
576
|
-
}
|
|
577
|
-
__renderCurrencyStyleSelector() {
|
|
578
|
-
const map = {
|
|
579
|
-
'101': 0,
|
|
580
|
-
'100': 0,
|
|
581
|
-
'001': 1,
|
|
582
|
-
'000': 2,
|
|
583
|
-
'111': 3,
|
|
584
|
-
'110': 3,
|
|
585
|
-
'011': 4,
|
|
586
|
-
'010': 5,
|
|
587
|
-
};
|
|
588
|
-
const selectionCode = [
|
|
589
|
-
this.form.hide_currency_symbol,
|
|
590
|
-
this.form.hide_decimal_characters,
|
|
591
|
-
this.form.use_international_currency_symbol,
|
|
592
|
-
]
|
|
593
|
-
.map(v => Number(Boolean(v)))
|
|
594
|
-
.join('');
|
|
595
|
-
const selectionIndex = map[selectionCode];
|
|
596
|
-
const isDisabled = this.disabledSelector.matches('currency-style', true);
|
|
597
|
-
const isReadonly = this.readonlySelector.matches('currency-style', true);
|
|
598
|
-
return html `
|
|
599
|
-
<div data-testid="currency-style" class="sm-col-span-2">
|
|
600
|
-
${this.renderTemplateOrSlot('currency-style:before')}
|
|
601
|
-
|
|
602
|
-
<div
|
|
603
|
-
class="grid grid-cols-1 gap-xs transition-colors text-secondary hover-text-body sm-col-span-2"
|
|
604
|
-
>
|
|
605
|
-
<foxy-i18n infer="" class="font-medium text-s" key="currency_style_label"></foxy-i18n>
|
|
606
|
-
|
|
607
|
-
<div class="grid grid-cols-3 bg-contrast-10 rounded" style="gap: 1px; padding: 1px">
|
|
608
|
-
${['12.34', 'USD 12.34', '$12.34', '12', 'USD 12', '$12'].map((example, index) => {
|
|
609
|
-
return html `
|
|
610
|
-
<label
|
|
611
|
-
style="--lumo-border-radius: calc(var(--lumo-border-radius-m) - 1px)"
|
|
612
|
-
class=${classMap({
|
|
613
|
-
'relative z-0 px-s h-m flex items-center transition-colors': true,
|
|
614
|
-
'hover-cursor-pointer': true,
|
|
615
|
-
'focus-within-z-10 focus-within-ring-2 focus-within-ring-primary-50': true,
|
|
616
|
-
'bg-base text-body hover-bg-transparent': index !== selectionIndex,
|
|
617
|
-
'bg-primary text-primary-contrast': index === selectionIndex,
|
|
618
|
-
'rounded-tl': index === 0,
|
|
619
|
-
'rounded-tr': index === 2,
|
|
620
|
-
'rounded-bl': index === 3,
|
|
621
|
-
'rounded-br': index === 5,
|
|
622
|
-
})}
|
|
623
|
-
>
|
|
624
|
-
<span class="font-medium font-tnum">${example}</span>
|
|
625
|
-
<input
|
|
626
|
-
class="sr-only"
|
|
627
|
-
value=${index}
|
|
628
|
-
type="radio"
|
|
629
|
-
name="currency-style"
|
|
630
|
-
?checked=${index === selectionIndex}
|
|
631
|
-
?disabled=${isDisabled}
|
|
632
|
-
?readonly=${isReadonly}
|
|
633
|
-
@change=${() => {
|
|
634
|
-
const set = Object.entries(map).find(v => v[1] === index)[0];
|
|
635
|
-
this.edit({
|
|
636
|
-
hide_currency_symbol: Boolean(Number(set[0])),
|
|
637
|
-
hide_decimal_characters: Boolean(Number(set[1])),
|
|
638
|
-
use_international_currency_symbol: Boolean(Number(set[2])),
|
|
639
|
-
});
|
|
640
|
-
}}
|
|
641
|
-
/>
|
|
642
|
-
</label>
|
|
643
|
-
`;
|
|
644
|
-
})}
|
|
645
|
-
</div>
|
|
646
|
-
|
|
647
|
-
<foxy-i18n infer="" class="text-xs" key="currency_style_helper_text"></foxy-i18n>
|
|
648
|
-
</div>
|
|
649
|
-
|
|
650
|
-
${this.renderTemplateOrSlot('currency-style:after')}
|
|
651
|
-
</div>
|
|
652
|
-
`;
|
|
828
|
+
__setWebhookKey(key, value) {
|
|
829
|
+
const parsedKey = this.__getWebhookKey();
|
|
830
|
+
parsedKey[key] = value;
|
|
831
|
+
this.edit({ webhook_key: JSON.stringify(parsedKey) });
|
|
653
832
|
}
|
|
654
|
-
|
|
833
|
+
__getCustomDisplayIdConfig() {
|
|
655
834
|
var _a;
|
|
656
835
|
const defaultConfig = {
|
|
657
836
|
enabled: false,
|
|
@@ -677,357 +856,47 @@ export class StoreForm extends Base {
|
|
|
677
856
|
catch (_b) {
|
|
678
857
|
config = cloneDeep(defaultConfig);
|
|
679
858
|
}
|
|
680
|
-
|
|
681
|
-
const lengthAsInt = parseInt(config.length || '0');
|
|
682
|
-
const numericLength = lengthAsInt - config.prefix.length - config.suffix.length;
|
|
683
|
-
const randomExampleNumericId = Math.min(startAsInt + Math.floor(Math.random() * Math.pow(10, numericLength)), Math.pow(10, numericLength) - 1);
|
|
684
|
-
const randomExampleId = `${config.prefix}${randomExampleNumericId
|
|
685
|
-
.toString()
|
|
686
|
-
.padStart(numericLength, '0')}${config.suffix}`;
|
|
687
|
-
const randomNumericEntryId = Math.floor(Math.random() * 1000);
|
|
688
|
-
const randomEntryId = String(randomNumericEntryId).padStart(3, '0');
|
|
689
|
-
return html `
|
|
690
|
-
<foxy-internal-checkbox-group-control
|
|
691
|
-
infer="custom-display-id-config-enabled"
|
|
692
|
-
class="-mt-xs -mb-m sm-col-span-2"
|
|
693
|
-
.getValue=${() => (config.enabled ? ['checked'] : [])}
|
|
694
|
-
.setValue=${(newValue) => {
|
|
695
|
-
config.enabled = newValue.includes('checked');
|
|
696
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
697
|
-
}}
|
|
698
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
699
|
-
>
|
|
700
|
-
</foxy-internal-checkbox-group-control>
|
|
701
|
-
|
|
702
|
-
${config.enabled
|
|
703
|
-
? html `
|
|
704
|
-
<div
|
|
705
|
-
class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"
|
|
706
|
-
>
|
|
707
|
-
<foxy-internal-integer-control
|
|
708
|
-
infer="custom-display-id-config-start"
|
|
709
|
-
min="0"
|
|
710
|
-
.getValue=${() => parseInt(config.start || '0')}
|
|
711
|
-
.setValue=${(newValue) => {
|
|
712
|
-
config.start = String(newValue);
|
|
713
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
714
|
-
}}
|
|
715
|
-
>
|
|
716
|
-
</foxy-internal-integer-control>
|
|
717
|
-
|
|
718
|
-
<foxy-internal-integer-control
|
|
719
|
-
infer="custom-display-id-config-length"
|
|
720
|
-
min="0"
|
|
721
|
-
.getValue=${() => parseInt(config.length || '0')}
|
|
722
|
-
.setValue=${(newValue) => {
|
|
723
|
-
config.length = String(newValue);
|
|
724
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
725
|
-
}}
|
|
726
|
-
>
|
|
727
|
-
</foxy-internal-integer-control>
|
|
728
|
-
|
|
729
|
-
<foxy-internal-text-control
|
|
730
|
-
infer="custom-display-id-config-prefix"
|
|
731
|
-
.getValue=${() => config.prefix}
|
|
732
|
-
.setValue=${(newValue) => {
|
|
733
|
-
config.prefix = newValue;
|
|
734
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
735
|
-
}}
|
|
736
|
-
>
|
|
737
|
-
</foxy-internal-text-control>
|
|
738
|
-
|
|
739
|
-
<foxy-internal-text-control
|
|
740
|
-
infer="custom-display-id-config-suffix"
|
|
741
|
-
.getValue=${() => config.suffix}
|
|
742
|
-
.setValue=${(newValue) => {
|
|
743
|
-
config.suffix = newValue;
|
|
744
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
745
|
-
}}
|
|
746
|
-
>
|
|
747
|
-
</foxy-internal-text-control>
|
|
748
|
-
|
|
749
|
-
${config.start && config.length && startAsInt / 10 <= numericLength
|
|
750
|
-
? html `
|
|
751
|
-
<table
|
|
752
|
-
data-testid="custom-display-id-config-examples"
|
|
753
|
-
style="font-family: monospace"
|
|
754
|
-
class="col-span-2 text-xs text-secondary whitespace-nowrap"
|
|
755
|
-
>
|
|
756
|
-
<tbody>
|
|
757
|
-
<tr>
|
|
758
|
-
<td style="width: 1%">
|
|
759
|
-
<foxy-i18n infer="" key="custom-display-id-config-first-example">
|
|
760
|
-
</foxy-i18n>
|
|
761
|
-
</td>
|
|
762
|
-
<td>
|
|
763
|
-
${config.prefix}${startAsInt
|
|
764
|
-
.toString()
|
|
765
|
-
.padStart(numericLength, '0')}${config.suffix}
|
|
766
|
-
</td>
|
|
767
|
-
</tr>
|
|
768
|
-
<tr style="width: 1%">
|
|
769
|
-
<td>
|
|
770
|
-
<foxy-i18n infer="" key="custom-display-id-config-random-example">
|
|
771
|
-
</foxy-i18n>
|
|
772
|
-
</td>
|
|
773
|
-
<td>${randomExampleId}</td>
|
|
774
|
-
</tr>
|
|
775
|
-
</tbody>
|
|
776
|
-
</table>
|
|
777
|
-
`
|
|
778
|
-
: ''}
|
|
779
|
-
</div>
|
|
780
|
-
|
|
781
|
-
<foxy-internal-checkbox-group-control
|
|
782
|
-
infer="custom-display-id-config-transaction-journal-entries-enabled"
|
|
783
|
-
class="-mt-xs -mb-m sm-col-span-2"
|
|
784
|
-
.getValue=${() => (config.transaction_journal_entries.enabled ? ['checked'] : [])}
|
|
785
|
-
.setValue=${(newValue) => {
|
|
786
|
-
config.transaction_journal_entries.enabled = newValue.includes('checked');
|
|
787
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
788
|
-
}}
|
|
789
|
-
.options=${this.__singleCheckboxGroupOptions}
|
|
790
|
-
>
|
|
791
|
-
</foxy-internal-checkbox-group-control>
|
|
792
|
-
|
|
793
|
-
${config.transaction_journal_entries.enabled
|
|
794
|
-
? html `
|
|
795
|
-
<div
|
|
796
|
-
class="rounded-t-l rounded-b-l border border-contrast-10 p-m grid grid-cols-2 gap-m sm-col-span-2"
|
|
797
|
-
>
|
|
798
|
-
<foxy-internal-text-control
|
|
799
|
-
infer="custom-display-id-config-transaction-journal-entries-transaction-separator"
|
|
800
|
-
class="col-span-2"
|
|
801
|
-
.getValue=${() => config.transaction_journal_entries.transaction_separator}
|
|
802
|
-
.setValue=${(newValue) => {
|
|
803
|
-
config.transaction_journal_entries.transaction_separator = newValue;
|
|
804
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
805
|
-
}}
|
|
806
|
-
>
|
|
807
|
-
</foxy-internal-text-control>
|
|
808
|
-
|
|
809
|
-
<foxy-internal-text-control
|
|
810
|
-
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-authcapture-prefix"
|
|
811
|
-
.getValue=${() => config.transaction_journal_entries.log_detail_request_types
|
|
812
|
-
.transaction_authcapture.prefix}
|
|
813
|
-
.setValue=${(newValue) => {
|
|
814
|
-
config.transaction_journal_entries.log_detail_request_types.transaction_authcapture.prefix =
|
|
815
|
-
newValue;
|
|
816
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
817
|
-
}}
|
|
818
|
-
>
|
|
819
|
-
</foxy-internal-text-control>
|
|
820
|
-
|
|
821
|
-
<foxy-internal-text-control
|
|
822
|
-
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-capture-prefix"
|
|
823
|
-
.getValue=${() => config.transaction_journal_entries.log_detail_request_types
|
|
824
|
-
.transaction_capture.prefix}
|
|
825
|
-
.setValue=${(newValue) => {
|
|
826
|
-
config.transaction_journal_entries.log_detail_request_types.transaction_capture.prefix =
|
|
827
|
-
newValue;
|
|
828
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
829
|
-
}}
|
|
830
|
-
>
|
|
831
|
-
</foxy-internal-text-control>
|
|
832
|
-
|
|
833
|
-
<foxy-internal-text-control
|
|
834
|
-
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-void-prefix"
|
|
835
|
-
.getValue=${() => config.transaction_journal_entries.log_detail_request_types.transaction_void
|
|
836
|
-
.prefix}
|
|
837
|
-
.setValue=${(newValue) => {
|
|
838
|
-
config.transaction_journal_entries.log_detail_request_types.transaction_void.prefix =
|
|
839
|
-
newValue;
|
|
840
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
841
|
-
}}
|
|
842
|
-
>
|
|
843
|
-
</foxy-internal-text-control>
|
|
844
|
-
|
|
845
|
-
<foxy-internal-text-control
|
|
846
|
-
infer="custom-display-id-config-transaction-journal-entries-log-detail-request-types-transaction-refund-prefix"
|
|
847
|
-
.getValue=${() => config.transaction_journal_entries.log_detail_request_types
|
|
848
|
-
.transaction_refund.prefix}
|
|
849
|
-
.setValue=${(newValue) => {
|
|
850
|
-
config.transaction_journal_entries.log_detail_request_types.transaction_refund.prefix =
|
|
851
|
-
newValue;
|
|
852
|
-
this.edit({ custom_display_id_config: JSON.stringify(config) });
|
|
853
|
-
}}
|
|
854
|
-
>
|
|
855
|
-
</foxy-internal-text-control>
|
|
856
|
-
|
|
857
|
-
${config.start && config.length && startAsInt / 10 <= numericLength
|
|
858
|
-
? html `
|
|
859
|
-
<table
|
|
860
|
-
data-testid="custom-display-id-config-transaction-journal-entries-examples"
|
|
861
|
-
style="font-family: monospace"
|
|
862
|
-
class="col-span-2 text-xs text-secondary whitespace-nowrap"
|
|
863
|
-
>
|
|
864
|
-
<tbody>
|
|
865
|
-
<tr>
|
|
866
|
-
<td style="width: 1%">
|
|
867
|
-
<foxy-i18n
|
|
868
|
-
infer=""
|
|
869
|
-
key="custom-display-id-config-transaction-journal-entries-authcapture-example"
|
|
870
|
-
>
|
|
871
|
-
</foxy-i18n>
|
|
872
|
-
</td>
|
|
873
|
-
<td>
|
|
874
|
-
${randomExampleId}${config.transaction_journal_entries
|
|
875
|
-
.transaction_separator}${config.transaction_journal_entries
|
|
876
|
-
.log_detail_request_types.transaction_authcapture
|
|
877
|
-
.prefix}${randomEntryId}
|
|
878
|
-
</td>
|
|
879
|
-
</tr>
|
|
880
|
-
<tr>
|
|
881
|
-
<td style="width: 1%">
|
|
882
|
-
<foxy-i18n
|
|
883
|
-
infer=""
|
|
884
|
-
key="custom-display-id-config-transaction-journal-entries-capture-example"
|
|
885
|
-
>
|
|
886
|
-
</foxy-i18n>
|
|
887
|
-
</td>
|
|
888
|
-
<td>
|
|
889
|
-
${randomExampleId}${config.transaction_journal_entries
|
|
890
|
-
.transaction_separator}${config.transaction_journal_entries
|
|
891
|
-
.log_detail_request_types.transaction_capture
|
|
892
|
-
.prefix}${randomEntryId}
|
|
893
|
-
</td>
|
|
894
|
-
</tr>
|
|
895
|
-
<tr>
|
|
896
|
-
<td style="width: 1%">
|
|
897
|
-
<foxy-i18n
|
|
898
|
-
infer=""
|
|
899
|
-
key="custom-display-id-config-transaction-journal-entries-void-example"
|
|
900
|
-
>
|
|
901
|
-
</foxy-i18n>
|
|
902
|
-
</td>
|
|
903
|
-
<td>
|
|
904
|
-
${randomExampleId}${config.transaction_journal_entries
|
|
905
|
-
.transaction_separator}${config.transaction_journal_entries
|
|
906
|
-
.log_detail_request_types.transaction_void
|
|
907
|
-
.prefix}${randomEntryId}
|
|
908
|
-
</td>
|
|
909
|
-
</tr>
|
|
910
|
-
<tr>
|
|
911
|
-
<td style="width: 1%">
|
|
912
|
-
<foxy-i18n
|
|
913
|
-
infer=""
|
|
914
|
-
key="custom-display-id-config-transaction-journal-entries-refund-example"
|
|
915
|
-
>
|
|
916
|
-
</foxy-i18n>
|
|
917
|
-
</td>
|
|
918
|
-
<td>
|
|
919
|
-
${randomExampleId}${config.transaction_journal_entries
|
|
920
|
-
.transaction_separator}${config.transaction_journal_entries
|
|
921
|
-
.log_detail_request_types.transaction_refund
|
|
922
|
-
.prefix}${randomEntryId}
|
|
923
|
-
</td>
|
|
924
|
-
</tr>
|
|
925
|
-
</tbody>
|
|
926
|
-
</table>
|
|
927
|
-
`
|
|
928
|
-
: ''}
|
|
929
|
-
</div>
|
|
930
|
-
`
|
|
931
|
-
: ''}
|
|
932
|
-
`
|
|
933
|
-
: ''}
|
|
934
|
-
`;
|
|
859
|
+
return config;
|
|
935
860
|
}
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
861
|
+
__setCustomDisplayIdConfig(key, value) {
|
|
862
|
+
const currentConfig = this.__getCustomDisplayIdConfig();
|
|
863
|
+
currentConfig[key] = value;
|
|
864
|
+
this.edit({ custom_display_id_config: JSON.stringify(currentConfig) });
|
|
865
|
+
}
|
|
866
|
+
__getTransactionJournalEntriesConfig() {
|
|
867
|
+
return this.__getCustomDisplayIdConfig().transaction_journal_entries;
|
|
868
|
+
}
|
|
869
|
+
__setTransactionJournalEntriesConfig(key, value) {
|
|
870
|
+
const config = this.__getCustomDisplayIdConfig().transaction_journal_entries;
|
|
871
|
+
config[key] = value;
|
|
872
|
+
this.__setCustomDisplayIdConfig('transaction_journal_entries', config);
|
|
873
|
+
}
|
|
874
|
+
__setTransactionJournalEntriesPrefix(key, value) {
|
|
875
|
+
const config = this.__getTransactionJournalEntriesConfig();
|
|
876
|
+
config.log_detail_request_types[key].prefix = value;
|
|
877
|
+
this.__setTransactionJournalEntriesConfig('log_detail_request_types', config.log_detail_request_types);
|
|
878
|
+
}
|
|
879
|
+
__getSmtpConfig() {
|
|
880
|
+
var _a;
|
|
881
|
+
let config;
|
|
882
|
+
try {
|
|
883
|
+
config = JSON.parse((_a = this.form.smtp_config) !== null && _a !== void 0 ? _a : '');
|
|
884
|
+
}
|
|
885
|
+
catch (_b) {
|
|
886
|
+
config = {
|
|
887
|
+
username: '',
|
|
888
|
+
password: '',
|
|
889
|
+
security: '',
|
|
890
|
+
host: '',
|
|
891
|
+
port: '',
|
|
959
892
|
};
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
return html `
|
|
963
|
-
<foxy-internal-password-control
|
|
964
|
-
infer=${infer}
|
|
965
|
-
.getValue=${getValue}
|
|
966
|
-
.setValue=${setValue}
|
|
967
|
-
>
|
|
968
|
-
</foxy-internal-password-control>
|
|
969
|
-
`;
|
|
970
|
-
}
|
|
971
|
-
else if (prop === 'port') {
|
|
972
|
-
return html `
|
|
973
|
-
<foxy-internal-integer-control
|
|
974
|
-
infer=${infer}
|
|
975
|
-
.getValue=${getValue}
|
|
976
|
-
.setValue=${setValue}
|
|
977
|
-
>
|
|
978
|
-
</foxy-internal-integer-control>
|
|
979
|
-
`;
|
|
980
|
-
}
|
|
981
|
-
else if (prop === 'security') {
|
|
982
|
-
return html `
|
|
983
|
-
<foxy-internal-radio-group-control
|
|
984
|
-
infer=${infer}
|
|
985
|
-
class="-mt-xs -mx-xs -mb-m col-span-2"
|
|
986
|
-
.getValue=${getValue}
|
|
987
|
-
.setValue=${setValue}
|
|
988
|
-
.options=${[
|
|
989
|
-
{ label: 'option_ssl', value: 'ssl' },
|
|
990
|
-
{ label: 'option_tls', value: 'tls' },
|
|
991
|
-
{ label: 'option_none', value: '' },
|
|
992
|
-
]}
|
|
993
|
-
>
|
|
994
|
-
</foxy-internal-radio-group-control>
|
|
995
|
-
`;
|
|
996
|
-
}
|
|
997
|
-
else {
|
|
998
|
-
return html `
|
|
999
|
-
<foxy-internal-text-control
|
|
1000
|
-
infer=${infer}
|
|
1001
|
-
.getValue=${getValue}
|
|
1002
|
-
.setValue=${setValue}
|
|
1003
|
-
>
|
|
1004
|
-
</foxy-internal-text-control>
|
|
1005
|
-
`;
|
|
1006
|
-
}
|
|
1007
|
-
})}
|
|
1008
|
-
</div>
|
|
1009
|
-
`;
|
|
893
|
+
}
|
|
894
|
+
return config;
|
|
1010
895
|
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
${link
|
|
1017
|
-
? html `
|
|
1018
|
-
<a
|
|
1019
|
-
target="_blank"
|
|
1020
|
-
class="font-medium hover-underline rounded focus-outline-none focus-ring-2 focus-ring-primary"
|
|
1021
|
-
href=${link.href}
|
|
1022
|
-
lang="en"
|
|
1023
|
-
>
|
|
1024
|
-
${link.caption}
|
|
1025
|
-
<iron-icon class="icon-inline" icon="icons:open-in-new"></iron-icon>
|
|
1026
|
-
</a>
|
|
1027
|
-
`
|
|
1028
|
-
: ''}
|
|
1029
|
-
</div>
|
|
1030
|
-
`;
|
|
896
|
+
__setSmtpConfig(key, value) {
|
|
897
|
+
const config = this.__getSmtpConfig();
|
|
898
|
+
config[key] = value;
|
|
899
|
+
this.edit({ smtp_config: JSON.stringify(config) });
|
|
1031
900
|
}
|
|
1032
901
|
__renderLoader(index) {
|
|
1033
902
|
var _a;
|