@saasquatch/mint-components 1.15.4-0 → 1.15.4-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/cjs/{ShadowViewAddon-28865623.js → ShadowViewAddon-e9dc77e3.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +17 -35
- package/dist/cjs/{sqm-base-registration-form-view-8029d30e.js → sqm-base-registration-form-view-66f99821.js} +9 -4
- package/dist/cjs/sqm-big-stat_43.cjs.entry.js +8 -1
- package/dist/cjs/{sqm-invoice-table-view-3f60fba9.js → sqm-invoice-table-view-5c74607f.js} +0 -1
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +29 -19
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +8 -5
- package/dist/collection/components/sqm-base-registration/BaseRegistrationForm.stories.js +2 -2
- package/dist/collection/components/sqm-base-registration/sqm-base-registration-form-view.js +9 -4
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +1 -1
- package/dist/collection/components/sqm-input-field/sqm-input-field.js +1 -1
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +1 -1
- package/dist/collection/components/sqm-name-fields/NameFields.stories.js +2 -0
- package/dist/collection/components/sqm-name-fields/sqm-name-fields-view.js +3 -3
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +31 -1
- package/dist/collection/components/sqm-name-fields/useNameFields.js +1 -0
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +2 -2
- package/dist/collection/components/sqm-portal-google-registration-form/PortalGoogleRegistrationForm.stories.js +1 -0
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +7 -5
- package/dist/collection/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.js +23 -15
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +0 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +12 -23
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +4 -18
- package/dist/esm/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +17 -35
- package/dist/esm/{sqm-base-registration-form-view-dafba287.js → sqm-base-registration-form-view-d81e316a.js} +9 -4
- package/dist/esm/sqm-big-stat_43.entry.js +8 -1
- package/dist/esm/{sqm-invoice-table-view-01453fa3.js → sqm-invoice-table-view-3491dd80.js} +0 -1
- package/dist/esm/sqm-portal-google-registration-form.entry.js +29 -19
- package/dist/esm/sqm-stencilbook.entry.js +8 -5
- package/dist/esm-es5/{ShadowViewAddon-f2176779.js → ShadowViewAddon-e0d5f1c9.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-base-registration-form-view-d81e316a.js +1 -0
- package/dist/esm-es5/sqm-big-stat_43.entry.js +1 -1
- package/dist/esm-es5/sqm-invoice-table-view-3491dd80.js +1 -0
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-4a731079.entry.js → p-1edebab1.entry.js} +2 -2
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/{p-02832118.system.entry.js → p-3ac8613d.system.entry.js} +1 -1
- package/dist/mint-components/{p-c1b074b6.js → p-3b6dccec.js} +1 -1
- package/dist/mint-components/{p-6f6cd994.entry.js → p-3d73cd84.entry.js} +2 -2
- package/dist/mint-components/p-49932f12.system.js +1 -0
- package/dist/mint-components/p-7176a952.entry.js +1 -0
- package/dist/mint-components/p-8d0393d9.system.entry.js +1 -0
- package/dist/mint-components/p-9308221f.js +1 -0
- package/dist/mint-components/p-959c42b2.system.entry.js +1 -0
- package/dist/mint-components/p-bc021969.system.js +1 -0
- package/dist/mint-components/{p-945a5883.entry.js → p-c78e6066.entry.js} +2 -2
- package/dist/mint-components/{p-0d939b73.system.js → p-d15b642f.system.js} +1 -1
- package/dist/mint-components/{p-2ba713d6.system.entry.js → p-e64e8354.system.entry.js} +1 -1
- package/dist/mint-components/p-e8e48982.js +1 -0
- package/dist/types/components/sqm-base-registration/sqm-base-registration-form-view.d.ts +2 -1
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +1 -1
- package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field.d.ts +1 -1
- package/dist/types/components/sqm-input-field/sqm-input-field.d.ts +1 -1
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +1 -1
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +1 -0
- package/dist/types/components/sqm-name-fields/sqm-name-fields.d.ts +5 -0
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -0
- package/dist/types/components/sqm-password-field/sqm-password-field.d.ts +1 -1
- package/dist/types/components/sqm-portal-google-registration-form/usePortalGoogleRegistrationForm.d.ts +2 -1
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +0 -1
- package/dist/types/components.d.ts +10 -13
- package/dist/types/global/android.d.ts +7 -0
- package/dist/types/global/demo.d.ts +2 -0
- package/dist/types/stories/features.d.ts +4 -0
- package/dist/types/stories/templates.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/sqm-base-registration-form-view-dafba287.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-01453fa3.js +0 -1
- package/dist/mint-components/p-2651ef99.system.js +0 -1
- package/dist/mint-components/p-35701119.js +0 -1
- package/dist/mint-components/p-59fe6066.js +0 -1
- package/dist/mint-components/p-86a5db85.system.js +0 -1
- package/dist/mint-components/p-9c4f4cd6.entry.js +0 -1
- package/dist/mint-components/p-a3647f70.system.entry.js +0 -1
- package/dist/mint-components/p-c1fc4838.system.entry.js +0 -1
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -154,12 +154,6 @@ export const UserInfoFormView = (props) => {
|
|
|
154
154
|
default:
|
|
155
155
|
regionLabel = text.state;
|
|
156
156
|
}
|
|
157
|
-
function isDisabledInput(field) {
|
|
158
|
-
var _a;
|
|
159
|
-
if (states.isPartner && !!((_a = data.partnerData) === null || _a === void 0 ? void 0 : _a[field]))
|
|
160
|
-
return true;
|
|
161
|
-
return false;
|
|
162
|
-
}
|
|
163
157
|
return (h("sl-form", { class: classes.FormWrapper, "onSl-submit": callbacks.onSubmit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
164
158
|
h("style", { type: "text/css" },
|
|
165
159
|
styleString,
|
|
@@ -207,22 +201,18 @@ export const UserInfoFormView = (props) => {
|
|
|
207
201
|
}))),
|
|
208
202
|
h("div", null,
|
|
209
203
|
h("div", { class: classes.InputContainer },
|
|
210
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled ||
|
|
211
|
-
states.isUser ||
|
|
212
|
-
isDisabledInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
204
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || states.isUser || states.isPartner }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
213
205
|
class: classes.ErrorInput,
|
|
214
206
|
helpText: formatErrorMessage(text.firstName, formState.errors.firstName),
|
|
215
207
|
}
|
|
216
208
|
: {}), { id: "firstName", name: "/firstName", required: true })),
|
|
217
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled ||
|
|
218
|
-
states.isUser ||
|
|
219
|
-
isDisabledInput("lastName") }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
209
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", value: formState.lastName, label: text.lastName, disabled: states.disabled || states.isUser || states.isPartner }, (((_c = formState.errors) === null || _c === void 0 ? void 0 : _c.lastName) ? {
|
|
220
210
|
class: classes.ErrorInput,
|
|
221
211
|
helpText: formatErrorMessage(text.lastName, formState.errors.lastName),
|
|
222
212
|
}
|
|
223
213
|
: {}), { id: "lastName", name: "/lastName", required: true })),
|
|
224
214
|
h("sl-input", { exportparts: "label: input-label, base: input-base", value: formState.email, label: text.email, disabled: true, id: "email", name: "/email", required: true }),
|
|
225
|
-
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 ||
|
|
215
|
+
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 || states.isPartner }, (((_d = formState.errors) === null || _d === void 0 ? void 0 : _d.countryCode) ? {
|
|
226
216
|
class: classes.ErrorInput,
|
|
227
217
|
helpText: formatErrorMessage(text.country, formState.errors.countryCode),
|
|
228
218
|
}
|
|
@@ -238,8 +228,7 @@ export const UserInfoFormView = (props) => {
|
|
|
238
228
|
h("div", { class: classes.PhoneInputsSection },
|
|
239
229
|
h("p", null, text.phoneNumber),
|
|
240
230
|
h("div", { class: classes.PhoneInputsContainer },
|
|
241
|
-
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled ||
|
|
242
|
-
isDisabledInput("phoneNumberCountryCode"), ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
231
|
+
h("sl-select", Object.assign({ id: "phoneNumberCountryCode", exportparts: "label: input-label, base: input-base", name: "/phoneNumberCountryCode", value: formState.phoneNumberCountryCode, disabled: states.disabled || states.isPartner, ref: (el) => (refs.phoneCountryRef.current = el) }, (((_g = formState.errors) === null || _g === void 0 ? void 0 : _g.phoneNumberCountryCode) ? {
|
|
243
232
|
class: classes.ErrorInput,
|
|
244
233
|
}
|
|
245
234
|
: {}), { required: true, "onSl-select": (e) => callbacks.onFormChange("phoneCountry", e) }),
|
|
@@ -265,7 +254,7 @@ export const UserInfoFormView = (props) => {
|
|
|
265
254
|
// Naive phone number validation
|
|
266
255
|
validateBillingField(/[a-zA-Z]+/, value) &&
|
|
267
256
|
formatErrorMessage(text.phoneNumber, text.error.fieldInvalidError);
|
|
268
|
-
}, disabled: states.disabled ||
|
|
257
|
+
}, disabled: states.disabled || states.isPartner }, (((_k = formState.errors) === null || _k === void 0 ? void 0 : _k.phoneNumber) ? {
|
|
269
258
|
class: classes.ErrorInput,
|
|
270
259
|
helpText: formatErrorMessage(text.phoneNumber, formState.errors.phoneNumber),
|
|
271
260
|
}
|
|
@@ -273,7 +262,7 @@ export const UserInfoFormView = (props) => {
|
|
|
273
262
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.address, id: "address", name: "/address", value: formState.address, validationError: ({ value }) =>
|
|
274
263
|
// Checks for non-ASCII characters
|
|
275
264
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
276
|
-
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
265
|
+
formatErrorMessage(text.address, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_l = formState.errors) === null || _l === void 0 ? void 0 : _l.address) ? {
|
|
277
266
|
class: classes.ErrorInput,
|
|
278
267
|
helpText: formatErrorMessage(text.address, formState.errors.address),
|
|
279
268
|
}
|
|
@@ -281,22 +270,22 @@ export const UserInfoFormView = (props) => {
|
|
|
281
270
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", label: text.city, id: "city", name: "/city", value: formState.city, validationError: ({ value }) =>
|
|
282
271
|
// Checks for non-ASCII characters
|
|
283
272
|
!validateBillingField(/^[\x20-\xFF]+$/, value) &&
|
|
284
|
-
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled ||
|
|
273
|
+
formatErrorMessage(text.city, text.error.invalidCharacterError), disabled: states.disabled || states.isPartner }, (((_m = formState.errors) === null || _m === void 0 ? void 0 : _m.city) ? {
|
|
285
274
|
class: classes.ErrorInput,
|
|
286
275
|
helpText: formatErrorMessage(text.city, formState.errors.city),
|
|
287
276
|
}
|
|
288
277
|
: {}), { required: true })),
|
|
289
|
-
!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 ||
|
|
278
|
+
!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 || states.isPartner }, (((_o = formState.errors) === null || _o === void 0 ? void 0 : _o.state) ? {
|
|
290
279
|
class: classes.ErrorInput,
|
|
291
280
|
helpText: formatErrorMessage(text.state, formState.errors.state),
|
|
292
281
|
}
|
|
293
282
|
: {}), { required: true }), (_p = data.regions) === null || _p === void 0 ? void 0 : _p.map((r) => (h("sl-menu-item", { value: r.value }, r.label))))),
|
|
294
|
-
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 ||
|
|
283
|
+
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 || states.isPartner }, (((_q = formState.errors) === null || _q === void 0 ? void 0 : _q.postalCode) ? {
|
|
295
284
|
class: classes.ErrorInput,
|
|
296
285
|
helpText: formatErrorMessage(text.postalCode, formState.errors.postalCode),
|
|
297
286
|
}
|
|
298
287
|
: {}), { required: true })),
|
|
299
|
-
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 ||
|
|
288
|
+
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 || states.isPartner, helpText: text.currencyHelpText }, (((_r = formState.errors) === null || _r === void 0 ? void 0 : _r.currency) ? {
|
|
300
289
|
class: classes.ErrorInput,
|
|
301
290
|
helpText: formatErrorMessage(text.currency, formState.errors.currency),
|
|
302
291
|
}
|
|
@@ -318,7 +307,7 @@ export const UserInfoFormView = (props) => {
|
|
|
318
307
|
h("div", { class: classes.CheckboxWrapper },
|
|
319
308
|
h("sl-checkbox", { exportparts: "label: input-label, base: input-base", checked: formState.allowBankingCollection === true, "onSl-change": (e) => {
|
|
320
309
|
e.target.value = e.target.checked;
|
|
321
|
-
}, disabled: states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
310
|
+
}, disabled: states.isPartner ? false : states.disabled, required: true, value: formState.allowBankingCollection, id: "allowBankingCollection", name: "/allowBankingCollection" }, bankingCollectionText),
|
|
322
311
|
((_u = formState.errors) === null || _u === void 0 ? void 0 : _u.allowBankingCollection) && (h("p", { class: classes.ErrorText }, formatErrorMessage(text.termsAndConditionsLabel, formState.errors.allowBankingCollection))))),
|
|
323
|
-
h("sl-button", { type: "primary", disabled: states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
312
|
+
h("sl-button", { type: "primary", disabled: states.isPartner ? false : states.disabled, submit: true, exportparts: "base: primarybutton-base" }, text.continueButton))))));
|
|
324
313
|
};
|
|
@@ -892,7 +892,7 @@ export class TaxForm {
|
|
|
892
892
|
"mutable": false,
|
|
893
893
|
"complexType": {
|
|
894
894
|
"original": "DemoData<UseUserInfoFormResult>",
|
|
895
|
-
"resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[];
|
|
895
|
+
"resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; formState: { errors: {}; firstName: string; lastName: string; email: string; phoneNumberCountryCode: string; phoneNumber: string; countryCode: string; currency: string; address: string; city: string; state: string; postalCode: string; }; }; refs?: { formRef: Ref<HTMLFormElement>; currencyRef: Ref<HTMLSelectElement>; phoneCountryRef: Ref<HTMLSelectElement>; }; data?: { currencies: { displayName: string; currencyCode: string; }[]; countries: TaxCountry[]; phoneCountries: TaxCountry[]; allCurrencies: { displayName: string; currencyCode: string; }[]; allCountries: TaxCountry[]; regionLabelEnum: \"STATE\" | \"PROVINCE\" | \"REGION\"; regions: { label: string; value: string; }[]; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
|
|
896
896
|
"references": {
|
|
897
897
|
"DemoData": {
|
|
898
898
|
"location": "import",
|
|
@@ -5,7 +5,7 @@ import { objectIsFull } from "../utils";
|
|
|
5
5
|
import { useParent, useParentQueryValue, useParentValue, } from "@saasquatch/component-boilerplate";
|
|
6
6
|
import { ADDRESS_REGIONS } from "../subregions";
|
|
7
7
|
export function useUserInfoForm(props) {
|
|
8
|
-
var _a, _b, _c, _d
|
|
8
|
+
var _a, _b, _c, _d;
|
|
9
9
|
const currencyRef = useRef(undefined);
|
|
10
10
|
const phoneCountryRef = useRef(undefined);
|
|
11
11
|
const formRef = useRef(null);
|
|
@@ -157,22 +157,9 @@ export function useUserInfoForm(props) {
|
|
|
157
157
|
postalCode: userData.postalCode,
|
|
158
158
|
currency: userData.currency,
|
|
159
159
|
});
|
|
160
|
-
const
|
|
161
|
-
const nextStep = context.overrideNextStep || skipNextStep ? "/3" : "/2";
|
|
160
|
+
const nextStep = context.overrideNextStep || "/2";
|
|
162
161
|
setStep(nextStep);
|
|
163
162
|
}
|
|
164
|
-
// TODO: get from backend
|
|
165
|
-
const hasIndirectTax = false;
|
|
166
|
-
const brandCountry = "";
|
|
167
|
-
function getSkipNextStep(userData) {
|
|
168
|
-
if (userData.countryCode === "US")
|
|
169
|
-
return true;
|
|
170
|
-
if (!hasIndirectTax)
|
|
171
|
-
return true;
|
|
172
|
-
if (hasIndirectTax && userData.countryCode !== brandCountry)
|
|
173
|
-
return true;
|
|
174
|
-
return false;
|
|
175
|
-
}
|
|
176
163
|
const hasStates = ["ES", "AU", "US", "CA"].includes(userFormContext.countryCode);
|
|
177
164
|
const regionObj = hasStates
|
|
178
165
|
? ADDRESS_REGIONS[userFormContext === null || userFormContext === void 0 ? void 0 : userFormContext.countryCode]
|
|
@@ -200,7 +187,6 @@ export function useUserInfoForm(props) {
|
|
|
200
187
|
allCountries: countries,
|
|
201
188
|
regionLabelEnum: regionObj === null || regionObj === void 0 ? void 0 : regionObj.labelEnum,
|
|
202
189
|
regions: (regionObj === null || regionObj === void 0 ? void 0 : regionObj.regions) || [],
|
|
203
|
-
partnerData: (_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher,
|
|
204
190
|
},
|
|
205
191
|
states: {
|
|
206
192
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
@@ -209,8 +195,8 @@ export function useUserInfoForm(props) {
|
|
|
209
195
|
disabled: loading,
|
|
210
196
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
211
197
|
loading: loading,
|
|
212
|
-
isPartner: !!((
|
|
213
|
-
isUser: !!((
|
|
198
|
+
isPartner: !!((_b = (_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.publisher),
|
|
199
|
+
isUser: !!((_d = (_c = data === null || data === void 0 ? void 0 : data.user) === null || _c === void 0 ? void 0 : _c.impactConnection) === null || _d === void 0 ? void 0 : _d.user),
|
|
214
200
|
formState: {
|
|
215
201
|
...userFormContext,
|
|
216
202
|
errors: formErrors,
|
|
@@ -2819,7 +2819,7 @@ function NameFieldsView(props) {
|
|
|
2819
2819
|
h("style", { type: "text/css" },
|
|
2820
2820
|
vanillaStyle$4,
|
|
2821
2821
|
styleString$8),
|
|
2822
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required:
|
|
2822
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: !states.optional, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
|
|
2823
2823
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2824
2824
|
}
|
|
2825
2825
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
@@ -2827,7 +2827,7 @@ function NameFieldsView(props) {
|
|
|
2827
2827
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2828
2828
|
}
|
|
2829
2829
|
: []))),
|
|
2830
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required:
|
|
2830
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/lastName", type: "text", label: states.content.lastNameLabel, required: !states.optional, disabled: ((_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.loading) || ((_j = states.registrationFormState) === null || _j === void 0 ? void 0 : _j.disabled) }, (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.initialData) === null || _l === void 0 ? void 0 : _l.lastName) ? {
|
|
2831
2831
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2832
2832
|
}
|
|
2833
2833
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|