@foxy.io/elements 1.39.0-beta.4 → 1.39.0-beta.5
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-customer-portal.js +5 -5
- package/dist/cdn/foxy-store-form.js +1 -1
- package/dist/cdn/translations/store-form/en.json +44 -22
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.d.ts +1 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js +10 -0
- package/dist/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.js.map +1 -1
- package/dist/elements/public/StoreForm/StoreForm.d.ts +5 -12
- package/dist/elements/public/StoreForm/StoreForm.js +119 -82
- package/dist/elements/public/StoreForm/StoreForm.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InternalCustomerPortalPasswordResetView.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,gBAAgB,CAAC;AAYhE,MAAM,OAAO,uCAAwC,SAAQ,iBAAiB,CAAC,YAAY,CAAO;IAAlG;;QA2BE,gBAAW,GAAkB,IAAI,CAAC;QAEjB,uBAAkB,GAAqB;YACtD,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;SACxD,CAAC;
|
|
1
|
+
{"version":3,"file":"InternalCustomerPortalPasswordResetView.js","sourceRoot":"","sources":["../../../../src/elements/public/CustomerPortal/InternalCustomerPortalPasswordResetView.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,iBAAiB,EAAE,wCAAqC;AACjE,OAAO,EAAE,YAAY,EAAE,oDAAiD;AACxE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,qBAAqB,MAAM,yBAAyB,CAAC;AAC5D,MAAM,gBAAgB,GAAG,qBAAqB,CAAC,gBAAgB,CAAC;AAYhE,MAAM,OAAO,uCAAwC,SAAQ,iBAAiB,CAAC,YAAY,CAAO;IAAlG;;QA2BE,gBAAW,GAAkB,IAAI,CAAC;QAEjB,uBAAkB,GAAqB;YACtD,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC;SACxD,CAAC;IAkDJ,CAAC;IAhFC,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,GAAG,KAAK,CAAC,UAAU;YACnB,WAAW,EAAE,EAAE,SAAS,EAAE,cAAc,EAAE;SAC3C,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,KAAK,CAAC,MAAM;YACZ,GAAG;;;OAIF;SACF,CAAC;IACJ,CAAC;IAED,MAAM,KAAK,GAAG;QACZ,OAAO;YACL,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,uBAAuB;YACnD,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,IAAI,EAAE,IAAI,uBAAuB;YACpE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,IAAI,uBAAuB;SAClF,CAAC;IACJ,CAAC;IAQD,UAAU;QACR,OAAO,IAAI,CAAA;;yCAE0B,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,WAAW;;;;2BAI7D,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,gBAAgB;;;;;;;;8BAQjD,IAAI,CAAC,kBAAkB;;;;;;;sBAO/B,IAAI,CAAC,QAAQ,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC;mBACpC,GAAG,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE;;;;;KAKjC,CAAC;IACJ,CAAC;IAED,MAAM;;QACJ,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,QAAE,IAAI,CAAC,WAAW,mCAAI,EAAE,EAAE,CAAC,CAAC;QACpD,KAAK,CAAC,MAAM,EAAE,CAAC;IACjB,CAAC;IAES,KAAK,CAAC,MAAM,CAAiB,GAAG,IAAiC;QACzE,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,IAAI,CAAC,CAAC;QACrC,IAAI,OAAO,CAAC,MAAM,KAAK,OAAO;YAAE,OAAO,KAAK,CAAC,MAAM,CAAU,GAAG,IAAI,CAAC,CAAC;QAEtE,MAAM,IAAI,GAAG,MAAM,OAAO,CAAC,IAAI,EAAE,CAAC;QAClC,MAAM,IAAI,GAAG,MAAM,KAAK,CAAC,MAAM,CAAO,GAAG,IAAI,CAAC,CAAC;QAE/C,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,YAAY,CAAC;QACtC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC;QAE9B,OAAO,IAA0B,CAAC;IACpC,CAAC;CACF","sourcesContent":["import type { CSSResultArray, PropertyDeclarations, TemplateResult } from 'lit-element';\nimport type { GeneratorOptions } from '../../internal/InternalPasswordControl/generateRandomPassword';\nimport type { NucleonV8N } from '../NucleonElement/types';\nimport type { Resource } from '@foxy.io/sdk/core';\nimport type { Graph } from '@foxy.io/sdk/customer';\n\nimport { TranslatableMixin } from '../../../mixins/translatable';\nimport { InternalForm } from '../../internal/InternalForm/InternalForm';\nimport { html, css } from 'lit-element';\n\nimport checkPasswordStrength from 'check-password-strength';\nconst passwordStrength = checkPasswordStrength.passwordStrength;\n\ntype Data = Resource<\n Graph & {\n props: {\n /** When updating the password using Customer API, these values are required to complete the request. */\n password_old?: string;\n password?: string;\n };\n }\n>;\n\nexport class InternalCustomerPortalPasswordResetView extends TranslatableMixin(InternalForm)<Data> {\n static get properties(): PropertyDeclarations {\n return {\n ...super.properties,\n passwordOld: { attribute: 'password-old' },\n };\n }\n\n static get styles(): CSSResultArray {\n return [\n super.styles,\n css`\n .max-w-25rem {\n max-width: 25rem;\n }\n `,\n ];\n }\n\n static get v8n(): NucleonV8N<Data> {\n return [\n ({ password: v }) => !!v || 'password:v8n_required',\n ({ password: v }) => !v || v.length <= 50 || 'password:v8n_too_long',\n ({ password: v }) => !v || passwordStrength(v).id >= 2 || 'password:v8n_too_weak',\n ];\n }\n\n passwordOld: string | null = null;\n\n private readonly __generatorOptions: GeneratorOptions = {\n checkStrength: value => passwordStrength(value).id >= 2,\n };\n\n renderBody(): TemplateResult {\n return html`\n <div class=\"m-auto max-w-25rem leading-s\">\n <p class=\"text-xxl font-medium ${this.in('busy') ? 'text-disabled' : 'text-body'}\">\n <foxy-i18n infer=\"\" key=\"title\"></foxy-i18n>\n </p>\n\n <p class=\"text-l ${this.in('busy') ? 'text-disabled' : 'text-secondary'}\">\n <foxy-i18n infer=\"\" key=\"subtitle\"></foxy-i18n>\n </p>\n\n <foxy-internal-password-control\n infer=\"password\"\n class=\"mt-m\"\n show-generator\n .generatorOptions=${this.__generatorOptions}\n >\n </foxy-internal-password-control>\n\n <vaadin-button\n class=\"w-full mt-l\"\n theme=\"primary\"\n ?disabled=${this.disabled || !this.in('idle')}\n @click=${() => this.submit()}\n >\n <foxy-i18n infer=\"\" key=\"submit\"></foxy-i18n>\n </vaadin-button>\n </div>\n `;\n }\n\n submit(): void {\n this.edit({ password_old: this.passwordOld ?? '' });\n super.submit();\n }\n\n protected async _fetch<TResult = Data>(...args: Parameters<Window['fetch']>): Promise<TResult> {\n const request = new Request(...args);\n if (request.method !== 'PATCH') return super._fetch<TResult>(...args);\n\n const body = await request.json();\n const data = await super._fetch<Data>(...args);\n\n data.password_old = body.password_old;\n data.password = body.password;\n\n return data as unknown as TResult;\n }\n}\n"]}
|
|
@@ -14,7 +14,7 @@ declare const Base: typeof InternalForm & import("lit-element").Constructor<impo
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class StoreForm extends Base<Data> {
|
|
16
16
|
static get properties(): PropertyDeclarations;
|
|
17
|
-
static get v8n(): NucleonV8N<Data>;
|
|
17
|
+
static get v8n(): NucleonV8N<Data, StoreForm>;
|
|
18
18
|
/** URL of the `fx:reporting_store_domain_exists` endpoint. */
|
|
19
19
|
reportingStoreDomainExists: string | null;
|
|
20
20
|
/** URL of the `fx:customer_password_hash_types` property helper resource. */
|
|
@@ -73,15 +73,10 @@ export declare class StoreForm extends Base<Data> {
|
|
|
73
73
|
private readonly __smtpConfigSecurityGetValue;
|
|
74
74
|
private readonly __smtpConfigSecuritySetValue;
|
|
75
75
|
private readonly __smtpConfigSecurityOptions;
|
|
76
|
-
private readonly
|
|
77
|
-
private readonly
|
|
78
|
-
private readonly
|
|
79
|
-
private readonly
|
|
80
|
-
private readonly __webhookKeyCartSigningSetValue;
|
|
81
|
-
private readonly __webhookKeyXmlDatafeedGetValue;
|
|
82
|
-
private readonly __webhookKeyXmlDatafeedSetValue;
|
|
83
|
-
private readonly __webhookKeySsoGetValue;
|
|
84
|
-
private readonly __webhookKeySsoSetValue;
|
|
76
|
+
private readonly __singleWebhookKeyGeneratorOptions;
|
|
77
|
+
private readonly __jsonWebhookKeyGeneratorOptions;
|
|
78
|
+
private readonly __useSingleWebhookKeyGetValue;
|
|
79
|
+
private readonly __useSingleWebhookKeySetValue;
|
|
85
80
|
private __hCaptchaToken;
|
|
86
81
|
get headerSubtitleOptions(): Record<string, unknown>;
|
|
87
82
|
renderBody(): TemplateResult;
|
|
@@ -90,8 +85,6 @@ export declare class StoreForm extends Base<Data> {
|
|
|
90
85
|
private get __displayIdExamples();
|
|
91
86
|
private get __journalIdExamples();
|
|
92
87
|
private get __hCaptcha();
|
|
93
|
-
private __getWebhookKey;
|
|
94
|
-
private __setWebhookKey;
|
|
95
88
|
private __getCustomDisplayIdConfig;
|
|
96
89
|
private __setCustomDisplayIdConfig;
|
|
97
90
|
private __getTransactionJournalEntriesConfig;
|
|
@@ -7,6 +7,14 @@ import slugify from '@sindresorhus/slugify';
|
|
|
7
7
|
import merge from 'lodash-es/merge';
|
|
8
8
|
const NS = 'store-form';
|
|
9
9
|
const Base = ResponsiveMixin(TranslatableMixin(InternalForm, NS));
|
|
10
|
+
function parseWebhookKey(webhookKey) {
|
|
11
|
+
try {
|
|
12
|
+
return JSON.parse(webhookKey);
|
|
13
|
+
}
|
|
14
|
+
catch (_a) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
10
18
|
/**
|
|
11
19
|
* Form element for store settings (`fx:store`).
|
|
12
20
|
*
|
|
@@ -212,30 +220,31 @@ export class StoreForm extends Base {
|
|
|
212
220
|
{ label: 'option_tls', value: 'tls' },
|
|
213
221
|
{ label: 'option_none', value: '' },
|
|
214
222
|
];
|
|
215
|
-
this.
|
|
216
|
-
this.
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
this.__setWebhookKey('cart_signing', newValue);
|
|
227
|
-
};
|
|
228
|
-
this.__webhookKeyXmlDatafeedGetValue = () => {
|
|
229
|
-
return this.__getWebhookKey().xml_datafeed;
|
|
230
|
-
};
|
|
231
|
-
this.__webhookKeyXmlDatafeedSetValue = (newValue) => {
|
|
232
|
-
this.__setWebhookKey('xml_datafeed', newValue);
|
|
233
|
-
};
|
|
234
|
-
this.__webhookKeySsoGetValue = () => {
|
|
235
|
-
return this.__getWebhookKey().sso;
|
|
223
|
+
this.__singleWebhookKeyGeneratorOptions = { length: 128, separator: '' };
|
|
224
|
+
this.__jsonWebhookKeyGeneratorOptions = { length: 64, separator: '' };
|
|
225
|
+
this.__useSingleWebhookKeyGetValue = () => {
|
|
226
|
+
var _a;
|
|
227
|
+
try {
|
|
228
|
+
JSON.parse((_a = this.form.webhook_key) !== null && _a !== void 0 ? _a : '');
|
|
229
|
+
return false;
|
|
230
|
+
}
|
|
231
|
+
catch (_b) {
|
|
232
|
+
return true;
|
|
233
|
+
}
|
|
236
234
|
};
|
|
237
|
-
this.
|
|
238
|
-
|
|
235
|
+
this.__useSingleWebhookKeySetValue = (newValue) => {
|
|
236
|
+
if (newValue) {
|
|
237
|
+
this.edit({ webhook_key: '' });
|
|
238
|
+
}
|
|
239
|
+
else {
|
|
240
|
+
const parsedKey = {
|
|
241
|
+
cart_signing: '',
|
|
242
|
+
xml_datafeed: '',
|
|
243
|
+
api_legacy: '',
|
|
244
|
+
sso: '',
|
|
245
|
+
};
|
|
246
|
+
this.edit({ webhook_key: JSON.stringify(parsedKey) });
|
|
247
|
+
}
|
|
239
248
|
};
|
|
240
249
|
this.__hCaptchaToken = null;
|
|
241
250
|
}
|
|
@@ -291,15 +300,39 @@ export class StoreForm extends Base {
|
|
|
291
300
|
({ region: v }) => (v && v.length <= 100) || 'region:v8n_too_long',
|
|
292
301
|
({ country: v }) => !!v || 'country:v8n_required',
|
|
293
302
|
({ logo_url: v }) => !v || v.length <= 200 || 'logo-url:v8n_too_long',
|
|
303
|
+
({ webhook_url: v, use_webhook }) => !use_webhook || !!v || 'webhook-url:v8n_required',
|
|
294
304
|
({ webhook_url: v, use_webhook }) => {
|
|
295
305
|
return !use_webhook || !v || v.length <= 300 || 'webhook-url:v8n_too_long';
|
|
296
306
|
},
|
|
297
|
-
({ webhook_key: v
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
307
|
+
({ webhook_key: v }) => v === void 0 || v.length > 0 || 'webhook-key:v8n_required',
|
|
308
|
+
({ webhook_key: v }, host) => {
|
|
309
|
+
var _a;
|
|
310
|
+
// TODO remove the line below when API limit is corrected to match the legacy admin
|
|
311
|
+
if (((_a = host.data) === null || _a === void 0 ? void 0 : _a.webhook_key) === v)
|
|
312
|
+
return true;
|
|
313
|
+
return !v || v.length <= 500 || 'webhook-key:v8n_too_long';
|
|
302
314
|
},
|
|
315
|
+
...[
|
|
316
|
+
'use-webhook:v8n_webhook_key_required',
|
|
317
|
+
'webhook-key-xml-datafeed:v8n_required',
|
|
318
|
+
'webhook-key:v8n_required',
|
|
319
|
+
].map(code => ({ webhook_key: v, use_webhook: on }) => {
|
|
320
|
+
const parsedV = parseWebhookKey(v !== null && v !== void 0 ? v : '');
|
|
321
|
+
return !on || !!(parsedV ? parsedV.xml_datafeed : v) || code;
|
|
322
|
+
}),
|
|
323
|
+
...[
|
|
324
|
+
'use-cart-validation:v8n_webhook_key_required',
|
|
325
|
+
'webhook-key-cart-signing:v8n_required',
|
|
326
|
+
'webhook-key:v8n_required',
|
|
327
|
+
].map(code => ({ webhook_key: v, use_cart_validation: on }) => {
|
|
328
|
+
const parsedV = parseWebhookKey(v !== null && v !== void 0 ? v : '');
|
|
329
|
+
return !on || !!(parsedV ? parsedV.cart_signing : v) || code;
|
|
330
|
+
}),
|
|
331
|
+
...['xml_datafeed', 'cart_signing', 'api_legacy', 'sso'].map(prop => ({ webhook_key: v }) => {
|
|
332
|
+
const parsedV = parseWebhookKey(v !== null && v !== void 0 ? v : '');
|
|
333
|
+
const code = `webhook-key-${prop.replace(/_/g, '-')}:v8n_too_long`;
|
|
334
|
+
return !parsedV || parsedV[prop].length <= 100 || code;
|
|
335
|
+
}),
|
|
303
336
|
({ single_sign_on_url: v, use_single_sign_on: on }) => {
|
|
304
337
|
return !on || !!v || 'single-sign-on-url:v8n_required';
|
|
305
338
|
},
|
|
@@ -447,16 +480,65 @@ export class StoreForm extends Base {
|
|
|
447
480
|
</foxy-internal-select-control>
|
|
448
481
|
</foxy-internal-summary-control>
|
|
449
482
|
|
|
450
|
-
<foxy-internal-summary-control infer="
|
|
451
|
-
<foxy-internal-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
456
|
-
.getValue=${this.__webhookKeyApiLegacyGetValue}
|
|
457
|
-
.setValue=${this.__webhookKeyApiLegacySetValue}
|
|
483
|
+
<foxy-internal-summary-control infer="store-secrets">
|
|
484
|
+
<foxy-internal-switch-control
|
|
485
|
+
infer="use-single-secret"
|
|
486
|
+
.getValue=${this.__useSingleWebhookKeyGetValue}
|
|
487
|
+
.setValue=${this.__useSingleWebhookKeySetValue}
|
|
458
488
|
>
|
|
459
|
-
</foxy-internal-
|
|
489
|
+
</foxy-internal-switch-control>
|
|
490
|
+
|
|
491
|
+
${this.__useSingleWebhookKeyGetValue()
|
|
492
|
+
? html `
|
|
493
|
+
<foxy-internal-password-control
|
|
494
|
+
layout="summary-item"
|
|
495
|
+
infer="webhook-key"
|
|
496
|
+
show-generator
|
|
497
|
+
.generatorOptions=${this.__singleWebhookKeyGeneratorOptions}
|
|
498
|
+
>
|
|
499
|
+
</foxy-internal-password-control>
|
|
500
|
+
`
|
|
501
|
+
: html `
|
|
502
|
+
<foxy-internal-password-control
|
|
503
|
+
json-path="api_legacy"
|
|
504
|
+
property="webhook_key"
|
|
505
|
+
layout="summary-item"
|
|
506
|
+
infer="webhook-key-api-legacy"
|
|
507
|
+
show-generator
|
|
508
|
+
.generatorOptions=${this.__jsonWebhookKeyGeneratorOptions}
|
|
509
|
+
>
|
|
510
|
+
</foxy-internal-password-control>
|
|
511
|
+
|
|
512
|
+
<foxy-internal-password-control
|
|
513
|
+
json-path="cart_signing"
|
|
514
|
+
property="webhook_key"
|
|
515
|
+
layout="summary-item"
|
|
516
|
+
infer="webhook-key-cart-signing"
|
|
517
|
+
show-generator
|
|
518
|
+
.generatorOptions=${this.__jsonWebhookKeyGeneratorOptions}
|
|
519
|
+
>
|
|
520
|
+
</foxy-internal-password-control>
|
|
521
|
+
|
|
522
|
+
<foxy-internal-password-control
|
|
523
|
+
json-path="sso"
|
|
524
|
+
property="webhook_key"
|
|
525
|
+
layout="summary-item"
|
|
526
|
+
infer="webhook-key-sso"
|
|
527
|
+
show-generator
|
|
528
|
+
.generatorOptions=${this.__jsonWebhookKeyGeneratorOptions}
|
|
529
|
+
>
|
|
530
|
+
</foxy-internal-password-control>
|
|
531
|
+
|
|
532
|
+
<foxy-internal-password-control
|
|
533
|
+
json-path="xml_datafeed"
|
|
534
|
+
property="webhook_key"
|
|
535
|
+
layout="summary-item"
|
|
536
|
+
infer="webhook-key-xml-datafeed"
|
|
537
|
+
show-generator
|
|
538
|
+
.generatorOptions=${this.__jsonWebhookKeyGeneratorOptions}
|
|
539
|
+
>
|
|
540
|
+
</foxy-internal-password-control>
|
|
541
|
+
`}
|
|
460
542
|
</foxy-internal-summary-control>
|
|
461
543
|
|
|
462
544
|
<foxy-internal-summary-control infer="emails">
|
|
@@ -559,16 +641,6 @@ export class StoreForm extends Base {
|
|
|
559
641
|
|
|
560
642
|
<foxy-internal-switch-control infer="use-cart-validation" helper-text-as-tooltip>
|
|
561
643
|
</foxy-internal-switch-control>
|
|
562
|
-
|
|
563
|
-
<foxy-internal-password-control
|
|
564
|
-
layout="summary-item"
|
|
565
|
-
infer="webhook-key-cart-signing"
|
|
566
|
-
show-generator
|
|
567
|
-
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
568
|
-
.getValue=${this.__webhookKeyCartSigningGetValue}
|
|
569
|
-
.setValue=${this.__webhookKeyCartSigningSetValue}
|
|
570
|
-
>
|
|
571
|
-
</foxy-internal-password-control>
|
|
572
644
|
</foxy-internal-summary-control>
|
|
573
645
|
|
|
574
646
|
<foxy-internal-summary-control infer="checkout">
|
|
@@ -619,15 +691,6 @@ export class StoreForm extends Base {
|
|
|
619
691
|
? html `
|
|
620
692
|
<foxy-internal-text-control layout="summary-item" infer="single-sign-on-url">
|
|
621
693
|
</foxy-internal-text-control>
|
|
622
|
-
<foxy-internal-password-control
|
|
623
|
-
layout="summary-item"
|
|
624
|
-
infer="webhook-key-sso"
|
|
625
|
-
show-generator
|
|
626
|
-
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
627
|
-
.getValue=${this.__webhookKeySsoGetValue}
|
|
628
|
-
.setValue=${this.__webhookKeySsoSetValue}
|
|
629
|
-
>
|
|
630
|
-
</foxy-internal-password-control>
|
|
631
694
|
`
|
|
632
695
|
: ''}
|
|
633
696
|
</foxy-internal-summary-control>
|
|
@@ -816,15 +879,6 @@ export class StoreForm extends Base {
|
|
|
816
879
|
? html `
|
|
817
880
|
<foxy-internal-text-control layout="summary-item" infer="webhook-url">
|
|
818
881
|
</foxy-internal-text-control>
|
|
819
|
-
<foxy-internal-password-control
|
|
820
|
-
layout="summary-item"
|
|
821
|
-
infer="webhook-key-xml-datafeed"
|
|
822
|
-
show-generator
|
|
823
|
-
.generatorOptions=${this.__webhookKeyGeneratorOptions}
|
|
824
|
-
.getValue=${this.__webhookKeyXmlDatafeedGetValue}
|
|
825
|
-
.setValue=${this.__webhookKeyXmlDatafeedSetValue}
|
|
826
|
-
>
|
|
827
|
-
</foxy-internal-password-control>
|
|
828
882
|
`
|
|
829
883
|
: ''}
|
|
830
884
|
</foxy-internal-summary-control>
|
|
@@ -945,23 +999,6 @@ export class StoreForm extends Base {
|
|
|
945
999
|
get __hCaptcha() {
|
|
946
1000
|
return this.renderRoot.querySelector('h-captcha');
|
|
947
1001
|
}
|
|
948
|
-
__getWebhookKey() {
|
|
949
|
-
var _a, _b;
|
|
950
|
-
let parsedKey;
|
|
951
|
-
try {
|
|
952
|
-
parsedKey = JSON.parse((_a = this.form.webhook_key) !== null && _a !== void 0 ? _a : '');
|
|
953
|
-
}
|
|
954
|
-
catch (_c) {
|
|
955
|
-
const v = (_b = this.form.webhook_key) !== null && _b !== void 0 ? _b : '';
|
|
956
|
-
parsedKey = { cart_signing: v, xml_datafeed: v, api_legacy: v, sso: v };
|
|
957
|
-
}
|
|
958
|
-
return parsedKey;
|
|
959
|
-
}
|
|
960
|
-
__setWebhookKey(key, value) {
|
|
961
|
-
const parsedKey = this.__getWebhookKey();
|
|
962
|
-
parsedKey[key] = value;
|
|
963
|
-
this.edit({ webhook_key: JSON.stringify(parsedKey) });
|
|
964
|
-
}
|
|
965
1002
|
__getCustomDisplayIdConfig() {
|
|
966
1003
|
const defaultConfig = {
|
|
967
1004
|
enabled: false,
|