@saasquatch/mint-components 2.0.4 → 2.0.5-0
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/cjs/sqm-banking-info-form_10.cjs.entry.js +17 -13
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +17 -13
- package/dist/esm/sqm-banking-info-form_10.entry.js +17 -13
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-93c8ab95.entry.js → p-4c02afc8.entry.js} +7 -7
- package/dist/mint-components/p-947bacd1.system.js +1 -1
- package/dist/mint-components/{p-6c6344d9.system.entry.js → p-ab1e34f5.system.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/docs/picklesdoc--2024-01-15--11-20-00.xlsx +0 -0
- package/docs/picklesdoc--2024-01-15--11-24-04.xlsx +0 -0
- package/package.json +1 -1
- package/docs/stats.json +0 -122783
|
@@ -6196,10 +6196,14 @@ const UserInfoFormView = (props) => {
|
|
|
6196
6196
|
default:
|
|
6197
6197
|
regionLabel = text.state;
|
|
6198
6198
|
}
|
|
6199
|
-
function
|
|
6199
|
+
function isDisabledPartnerInput(field) {
|
|
6200
6200
|
var _a;
|
|
6201
6201
|
return states.isPartner && !!((_a = data$1.partnerData) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6202
6202
|
}
|
|
6203
|
+
function isDisabledUserInput(field) {
|
|
6204
|
+
var _a;
|
|
6205
|
+
return states.isUser && !!((_a = states.formState) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6206
|
+
}
|
|
6203
6207
|
return (index.h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
6204
6208
|
index.h("style", { type: "text/css" },
|
|
6205
6209
|
styleString$5,
|
|
@@ -6241,21 +6245,21 @@ const UserInfoFormView = (props) => {
|
|
|
6241
6245
|
index.h("div", null,
|
|
6242
6246
|
index.h("div", { class: classes.InputContainer },
|
|
6243
6247
|
index.h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6244
|
-
|
|
6245
|
-
|
|
6248
|
+
isDisabledUserInput("firstName") ||
|
|
6249
|
+
isDisabledPartnerInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6246
6250
|
class: classes.ErrorInput,
|
|
6247
6251
|
helpText: utils$1.formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
6248
6252
|
}
|
|
6249
6253
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
6250
6254
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6251
|
-
|
|
6252
|
-
|
|
6255
|
+
isDisabledUserInput("lastName") ||
|
|
6256
|
+
isDisabledPartnerInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6253
6257
|
class: classes.ErrorInput,
|
|
6254
6258
|
helpText: utils$1.formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
6255
6259
|
}
|
|
6256
6260
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
6257
6261
|
index.h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
6258
|
-
index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled ||
|
|
6262
|
+
index.h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledPartnerInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
6259
6263
|
class: classes.ErrorInput,
|
|
6260
6264
|
helpText: utils$1.formatErrorMessage(text.country, formState.errors.countryCode),
|
|
6261
6265
|
}
|
|
@@ -6272,7 +6276,7 @@ const UserInfoFormView = (props) => {
|
|
|
6272
6276
|
index.h("p", null, text.phoneNumber),
|
|
6273
6277
|
index.h("div", { class: classes.PhoneInputsContainer },
|
|
6274
6278
|
index.h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6275
|
-
|
|
6279
|
+
isDisabledPartnerInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6276
6280
|
class: classes.ErrorInput,
|
|
6277
6281
|
}
|
|
6278
6282
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -6298,7 +6302,7 @@ const UserInfoFormView = (props) => {
|
|
|
6298
6302
|
// Naive phone number validation
|
|
6299
6303
|
utils$1.validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6300
6304
|
utils$1.formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
6301
|
-
}, disabled: states.disabled ||
|
|
6305
|
+
}, disabled: states.disabled || isDisabledPartnerInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6302
6306
|
class: classes.ErrorInput,
|
|
6303
6307
|
helpText: utils$1.formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6304
6308
|
}
|
|
@@ -6306,7 +6310,7 @@ const UserInfoFormView = (props) => {
|
|
|
6306
6310
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6307
6311
|
// Checks for non-ASCII characters
|
|
6308
6312
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6309
|
-
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6313
|
+
utils$1.formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6310
6314
|
class: classes.ErrorInput,
|
|
6311
6315
|
helpText: utils$1.formatErrorMessage(text.address, formState.errors.address),
|
|
6312
6316
|
}
|
|
@@ -6314,22 +6318,22 @@ const UserInfoFormView = (props) => {
|
|
|
6314
6318
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
6315
6319
|
// Checks for non-ASCII characters
|
|
6316
6320
|
!utils$1.validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6317
|
-
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6321
|
+
utils$1.formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6318
6322
|
class: classes.ErrorInput,
|
|
6319
6323
|
helpText: utils$1.formatErrorMessage(text.city, formState.errors.city),
|
|
6320
6324
|
}
|
|
6321
6325
|
: {}), { required: true })),
|
|
6322
|
-
!states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled ||
|
|
6326
|
+
!states.hideState && (index.h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledPartnerInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
6323
6327
|
class: classes.ErrorInput,
|
|
6324
6328
|
helpText: utils$1.formatErrorMessage(text.state, formState.errors.state),
|
|
6325
6329
|
}
|
|
6326
6330
|
: {}), { required: true }), (_p = data$1.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (index.h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6327
|
-
index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled ||
|
|
6331
|
+
index.h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledPartnerInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
6328
6332
|
class: classes.ErrorInput,
|
|
6329
6333
|
helpText: utils$1.formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6330
6334
|
}
|
|
6331
6335
|
: {}), { required: true })),
|
|
6332
|
-
index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled ||
|
|
6336
|
+
index.h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
6333
6337
|
class: classes.ErrorInput,
|
|
6334
6338
|
helpText: utils$1.formatErrorMessage(text.currency, formState.errors.currency),
|
|
6335
6339
|
}
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -287,10 +287,14 @@ export const UserInfoFormView = (props) => {
|
|
|
287
287
|
default:
|
|
288
288
|
regionLabel = text.state;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
290
|
+
function isDisabledPartnerInput(field) {
|
|
291
291
|
var _a;
|
|
292
292
|
return states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]);
|
|
293
293
|
}
|
|
294
|
+
function isDisabledUserInput(field) {
|
|
295
|
+
var _a;
|
|
296
|
+
return states.isUser && !!((_a = states.formState) === null || _a === void 0 ? void 0 : _a[field]);
|
|
297
|
+
}
|
|
294
298
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
295
299
|
h("style", { type: "text/css" },
|
|
296
300
|
styleString,
|
|
@@ -332,21 +336,21 @@ export const UserInfoFormView = (props) => {
|
|
|
332
336
|
h("div", null,
|
|
333
337
|
h("div", { class: classes.InputContainer },
|
|
334
338
|
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
335
|
-
|
|
336
|
-
|
|
339
|
+
isDisabledUserInput("firstName") ||
|
|
340
|
+
isDisabledPartnerInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
337
341
|
class: classes.ErrorInput,
|
|
338
342
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
339
343
|
}
|
|
340
344
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
341
345
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
342
|
-
|
|
343
|
-
|
|
346
|
+
isDisabledUserInput("lastName") ||
|
|
347
|
+
isDisabledPartnerInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
344
348
|
class: classes.ErrorInput,
|
|
345
349
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
346
350
|
}
|
|
347
351
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
348
352
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
349
|
-
h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled ||
|
|
353
|
+
h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledPartnerInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
350
354
|
class: classes.ErrorInput,
|
|
351
355
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
352
356
|
}
|
|
@@ -363,7 +367,7 @@ export const UserInfoFormView = (props) => {
|
|
|
363
367
|
h("p", null, text.phoneNumber),
|
|
364
368
|
h("div", { class: classes.PhoneInputsContainer },
|
|
365
369
|
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
366
|
-
|
|
370
|
+
isDisabledPartnerInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
367
371
|
class: classes.ErrorInput,
|
|
368
372
|
}
|
|
369
373
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -389,7 +393,7 @@ export const UserInfoFormView = (props) => {
|
|
|
389
393
|
// Naive phone number validation
|
|
390
394
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
391
395
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
392
|
-
}, disabled: states.disabled ||
|
|
396
|
+
}, disabled: states.disabled || isDisabledPartnerInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
393
397
|
class: classes.ErrorInput,
|
|
394
398
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
395
399
|
}
|
|
@@ -397,7 +401,7 @@ export const UserInfoFormView = (props) => {
|
|
|
397
401
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
398
402
|
// Checks for non-ASCII characters
|
|
399
403
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
400
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
404
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
401
405
|
class: classes.ErrorInput,
|
|
402
406
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
403
407
|
}
|
|
@@ -405,22 +409,22 @@ export const UserInfoFormView = (props) => {
|
|
|
405
409
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
406
410
|
// Checks for non-ASCII characters
|
|
407
411
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
408
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
412
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
409
413
|
class: classes.ErrorInput,
|
|
410
414
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
411
415
|
}
|
|
412
416
|
: {}), { required: true })),
|
|
413
|
-
!states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled ||
|
|
417
|
+
!states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledPartnerInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
414
418
|
class: classes.ErrorInput,
|
|
415
419
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
416
420
|
}
|
|
417
421
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
418
|
-
h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled ||
|
|
422
|
+
h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledPartnerInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
419
423
|
class: classes.ErrorInput,
|
|
420
424
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
421
425
|
}
|
|
422
426
|
: {}), { required: true })),
|
|
423
|
-
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled ||
|
|
427
|
+
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
424
428
|
class: classes.ErrorInput,
|
|
425
429
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
426
430
|
}
|
|
@@ -6192,10 +6192,14 @@ const UserInfoFormView = (props) => {
|
|
|
6192
6192
|
default:
|
|
6193
6193
|
regionLabel = text.state;
|
|
6194
6194
|
}
|
|
6195
|
-
function
|
|
6195
|
+
function isDisabledPartnerInput(field) {
|
|
6196
6196
|
var _a;
|
|
6197
6197
|
return states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6198
6198
|
}
|
|
6199
|
+
function isDisabledUserInput(field) {
|
|
6200
|
+
var _a;
|
|
6201
|
+
return states.isUser && !!((_a = states.formState) === null || _a === void 0 ? void 0 : _a[field]);
|
|
6202
|
+
}
|
|
6199
6203
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
6200
6204
|
h("style", { type: "text/css" },
|
|
6201
6205
|
styleString$5,
|
|
@@ -6237,21 +6241,21 @@ const UserInfoFormView = (props) => {
|
|
|
6237
6241
|
h("div", null,
|
|
6238
6242
|
h("div", { class: classes.InputContainer },
|
|
6239
6243
|
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
6240
|
-
|
|
6241
|
-
|
|
6244
|
+
isDisabledUserInput("firstName") ||
|
|
6245
|
+
isDisabledPartnerInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
6242
6246
|
class: classes.ErrorInput,
|
|
6243
6247
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
6244
6248
|
}
|
|
6245
6249
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
6246
6250
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
6247
|
-
|
|
6248
|
-
|
|
6251
|
+
isDisabledUserInput("lastName") ||
|
|
6252
|
+
isDisabledPartnerInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
6249
6253
|
class: classes.ErrorInput,
|
|
6250
6254
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
6251
6255
|
}
|
|
6252
6256
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
6253
6257
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
6254
|
-
h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled ||
|
|
6258
|
+
h("sl-select", Object.assign({ id: "countryCode", exportparts: "label: input-label, base: input-base", name: "/countryCode", label: text.country, value: formState.countryCode, disabled: states.disabled || isDisabledPartnerInput("countryCode") }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
6255
6259
|
class: classes.ErrorInput,
|
|
6256
6260
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
6257
6261
|
}
|
|
@@ -6268,7 +6272,7 @@ const UserInfoFormView = (props) => {
|
|
|
6268
6272
|
h("p", null, text.phoneNumber),
|
|
6269
6273
|
h("div", { class: classes.PhoneInputsContainer },
|
|
6270
6274
|
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
6271
|
-
|
|
6275
|
+
isDisabledPartnerInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
6272
6276
|
class: classes.ErrorInput,
|
|
6273
6277
|
}
|
|
6274
6278
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -6294,7 +6298,7 @@ const UserInfoFormView = (props) => {
|
|
|
6294
6298
|
// Naive phone number validation
|
|
6295
6299
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
6296
6300
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
6297
|
-
}, disabled: states.disabled ||
|
|
6301
|
+
}, disabled: states.disabled || isDisabledPartnerInput("phoneNumber") }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
6298
6302
|
class: classes.ErrorInput,
|
|
6299
6303
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
6300
6304
|
}
|
|
@@ -6302,7 +6306,7 @@ const UserInfoFormView = (props) => {
|
|
|
6302
6306
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
6303
6307
|
// Checks for non-ASCII characters
|
|
6304
6308
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6305
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6309
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingAddress") }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
6306
6310
|
class: classes.ErrorInput,
|
|
6307
6311
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
6308
6312
|
}
|
|
@@ -6310,22 +6314,22 @@ const UserInfoFormView = (props) => {
|
|
|
6310
6314
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
6311
6315
|
// Checks for non-ASCII characters
|
|
6312
6316
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
6313
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
6317
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || isDisabledPartnerInput("billingCity") }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
6314
6318
|
class: classes.ErrorInput,
|
|
6315
6319
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
6316
6320
|
}
|
|
6317
6321
|
: {}), { required: true })),
|
|
6318
|
-
!states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled ||
|
|
6322
|
+
!states.hideState && (h("sl-select", Object.assign({ label: regionLabel, exportparts: "label: input-label, base: input-base", id: "state", name: "/state", value: formState.state, disabled: states.disabled || isDisabledPartnerInput("billingState") }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
6319
6323
|
class: classes.ErrorInput,
|
|
6320
6324
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
6321
6325
|
}
|
|
6322
6326
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
6323
|
-
h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled ||
|
|
6327
|
+
h("sl-input", Object.assign({ label: text.postalCode, exportparts: "label: input-label, base: input-base", id: "postalCode", name: "/postalCode", value: formState.postalCode, disabled: states.disabled || isDisabledPartnerInput("billingPostalCode") }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
6324
6328
|
class: classes.ErrorInput,
|
|
6325
6329
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
6326
6330
|
}
|
|
6327
6331
|
: {}), { required: true })),
|
|
6328
|
-
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled ||
|
|
6332
|
+
h("sl-select", Object.assign({ id: "currency", exportparts: "label: input-label, base: input-base", name: "/currency", label: text.currency, menu: true, value: formState.currency, disabled: states.disabled || isDisabledPartnerInput("currency"), helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
6329
6333
|
class: classes.ErrorInput,
|
|
6330
6334
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
6331
6335
|
}
|