@saasquatch/mint-components 2.3.0-12 → 2.3.0-14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +43 -30
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +15 -8
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +4 -7
- package/dist/cjs/{sqm-partner-info-modal-view-2b6fee0f.js → sqm-partner-info-modal-view-b0e8044f.js} +5 -6
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +57 -3
- package/dist/cjs/{sqm-user-info-form-view-c2cad72c.js → sqm-user-info-form-view-60e09262.js} +11 -1
- package/dist/cjs/{useIndirectTaxForm-64c0231c.js → useIndirectTaxForm-c439eb81.js} +3 -1
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +5 -6
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +3 -6
- package/dist/collection/components/sqm-widget-verification/useWidgetVerification.js +2 -0
- package/dist/collection/components/tax-and-cash/TaxForm.stories.js +3 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +3 -3
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.js +8 -0
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +3 -1
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/useTaxAndCash.js +12 -7
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js +51 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +11 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form.js +3 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +27 -25
- package/dist/esm/sqm-banking-info-form_10.entry.js +43 -30
- package/dist/esm/sqm-big-stat_47.entry.js +15 -8
- package/dist/esm/sqm-email-verification_2.entry.js +4 -7
- package/dist/esm/{sqm-partner-info-modal-view-bc843d7d.js → sqm-partner-info-modal-view-6b9c512f.js} +5 -6
- package/dist/esm/sqm-stencilbook.entry.js +57 -3
- package/dist/esm/{sqm-user-info-form-view-5051c1d0.js → sqm-user-info-form-view-647a2bd5.js} +11 -1
- package/dist/esm/{useIndirectTaxForm-d7d6be39.js → useIndirectTaxForm-38cd984e.js} +3 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
- package/dist/esm-es5/{sqm-partner-info-modal-view-bc843d7d.js → sqm-partner-info-modal-view-6b9c512f.js} +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-user-info-form-view-5051c1d0.js → sqm-user-info-form-view-647a2bd5.js} +1 -1
- package/dist/esm-es5/{useIndirectTaxForm-d7d6be39.js → useIndirectTaxForm-38cd984e.js} +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-0c6bd136.system.entry.js → p-1e6b92d0.system.entry.js} +1 -1
- package/dist/mint-components/p-1f387c7b.system.js +1 -1
- package/dist/mint-components/{p-5959ebdb.system.js → p-34179541.system.js} +1 -1
- package/dist/mint-components/{p-d0ed1c1b.entry.js → p-3970cbf5.entry.js} +6 -6
- package/dist/mint-components/{p-24a867ab.system.js → p-3caa6a0e.system.js} +1 -1
- package/dist/mint-components/{p-aed3c69d.entry.js → p-4b449def.entry.js} +2 -2
- package/dist/mint-components/{p-1e699fb8.entry.js → p-6afa9d3a.entry.js} +2 -2
- package/dist/mint-components/p-6b1c9506.system.entry.js +1 -0
- package/dist/mint-components/{p-13e439bc.js → p-8ab30adc.js} +1 -1
- package/dist/mint-components/{p-5f8fa87c.js → p-8d30945a.js} +1 -1
- package/dist/mint-components/p-9c4a5b43.system.entry.js +1 -0
- package/dist/mint-components/{p-1e1b03fa.js → p-aa2c6585.js} +4 -4
- package/dist/mint-components/{p-d67f8e0f.system.js → p-aab8a207.system.js} +2 -2
- package/dist/mint-components/{p-29b267a9.system.entry.js → p-b617ffe0.system.entry.js} +1 -1
- package/dist/mint-components/{p-b3e1f2fa.entry.js → p-ff476ab5.entry.js} +2 -2
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form-view.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.d.ts +1 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.d.ts +2 -0
- package/dist/types/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.d.ts +2 -0
- package/docs/docs.docx +0 -0
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +3 -1
- package/dist/mint-components/p-6c9f7515.system.entry.js +0 -1
- package/dist/mint-components/p-b7188d47.system.entry.js +0 -1
package/dist/collection/components/tax-and-cash/sqm-user-info-form/UserInfoFormView.stories.js
CHANGED
|
@@ -12,7 +12,10 @@ const mockCountries = [
|
|
|
12
12
|
{ countryCode: "FR", displayName: "France" },
|
|
13
13
|
{ countryCode: "ES", displayName: "Spain" },
|
|
14
14
|
// Show handling of long country names
|
|
15
|
-
{
|
|
15
|
+
{
|
|
16
|
+
countryCode: "CD",
|
|
17
|
+
displayName: "Congo, The Democratic Republic of the Congo",
|
|
18
|
+
},
|
|
16
19
|
];
|
|
17
20
|
const mockCurrencies = [
|
|
18
21
|
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
@@ -103,6 +106,8 @@ const baseProps = {
|
|
|
103
106
|
loading: false,
|
|
104
107
|
isPartner: false,
|
|
105
108
|
isUser: false,
|
|
109
|
+
isPartnerLegacy: false,
|
|
110
|
+
isUserLegacy: false,
|
|
106
111
|
formState: {
|
|
107
112
|
firstName: "",
|
|
108
113
|
lastName: "",
|
|
@@ -215,6 +220,7 @@ export const PartnerAccount = () => {
|
|
|
215
220
|
return (h(UserInfoFormView, Object.assign({}, baseProps, { states: {
|
|
216
221
|
...baseProps.states,
|
|
217
222
|
isPartner: true,
|
|
223
|
+
isPartnerLegacy: true,
|
|
218
224
|
formState: {
|
|
219
225
|
...baseProps.states.formState,
|
|
220
226
|
firstName: "Jane",
|
|
@@ -234,10 +240,53 @@ export const PartnerAccount = () => {
|
|
|
234
240
|
partnerData: mockPartnerData,
|
|
235
241
|
} })));
|
|
236
242
|
};
|
|
243
|
+
// Early partner created via <sqm-partner-info-modal>: connectionStatus is "STARTED",
|
|
244
|
+
// publisher has only countryCode + currency populated. Banner must NOT show; only
|
|
245
|
+
// country + currency disabled; firstName/lastName disabled via userData; everything
|
|
246
|
+
// else (phone, address, city, state, postalCode) stays editable.
|
|
247
|
+
export const EarlyPartnerFromModal = () => {
|
|
248
|
+
return (h(UserInfoFormView, Object.assign({}, baseProps, { states: {
|
|
249
|
+
...baseProps.states,
|
|
250
|
+
isPartner: true,
|
|
251
|
+
isUser: true,
|
|
252
|
+
isPartnerLegacy: false,
|
|
253
|
+
isUserLegacy: false,
|
|
254
|
+
formState: {
|
|
255
|
+
...baseProps.states.formState,
|
|
256
|
+
firstName: "Jane",
|
|
257
|
+
lastName: "Smith",
|
|
258
|
+
email: "jane.smith@example.com",
|
|
259
|
+
countryCode: "US",
|
|
260
|
+
currency: "USD",
|
|
261
|
+
phoneNumberCountryCode: undefined,
|
|
262
|
+
phoneNumber: undefined,
|
|
263
|
+
address: undefined,
|
|
264
|
+
city: undefined,
|
|
265
|
+
state: undefined,
|
|
266
|
+
postalCode: undefined,
|
|
267
|
+
},
|
|
268
|
+
}, data: {
|
|
269
|
+
...baseProps.data,
|
|
270
|
+
partnerData: {
|
|
271
|
+
...mockPartnerData,
|
|
272
|
+
billingAddress: undefined,
|
|
273
|
+
billingCity: undefined,
|
|
274
|
+
billingState: undefined,
|
|
275
|
+
billingPostalCode: undefined,
|
|
276
|
+
phoneNumber: undefined,
|
|
277
|
+
phoneNumberCountryCode: undefined,
|
|
278
|
+
},
|
|
279
|
+
userData: {
|
|
280
|
+
firstName: "Jane",
|
|
281
|
+
lastName: "Smith",
|
|
282
|
+
},
|
|
283
|
+
} })));
|
|
284
|
+
};
|
|
237
285
|
export const UserAccount = () => {
|
|
238
286
|
return (h(UserInfoFormView, Object.assign({}, baseProps, { states: {
|
|
239
287
|
...baseProps.states,
|
|
240
288
|
isUser: true,
|
|
289
|
+
isUserLegacy: true,
|
|
241
290
|
formState: {
|
|
242
291
|
...baseProps.states.formState,
|
|
243
292
|
firstName: "Bob",
|
|
@@ -256,6 +305,7 @@ export const UserAccountMissingLastName = () => {
|
|
|
256
305
|
return (h(UserInfoFormView, Object.assign({}, baseProps, { states: {
|
|
257
306
|
...baseProps.states,
|
|
258
307
|
isUser: true,
|
|
308
|
+
isUserLegacy: true,
|
|
259
309
|
formState: {
|
|
260
310
|
...baseProps.states.formState,
|
|
261
311
|
firstName: "Bob",
|
package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js
CHANGED
|
@@ -334,6 +334,14 @@ export const UserInfoFormView = (props) => {
|
|
|
334
334
|
}, {
|
|
335
335
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
336
336
|
})))),
|
|
337
|
+
(states.isPartnerLegacy || states.isUserLegacy) && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
338
|
+
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
339
|
+
h("p", { part: "alert-description" }, intl.formatMessage({
|
|
340
|
+
id: "isPartnerAlertDescription",
|
|
341
|
+
defaultMessage: text.isPartnerAlertDescription,
|
|
342
|
+
}, {
|
|
343
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
344
|
+
})))),
|
|
337
345
|
h("div", null,
|
|
338
346
|
h("div", { class: classes.InputContainer },
|
|
339
347
|
h("sl-input", Object.assign({ class: "ErrorInput", exportparts: "label: input-label, base: input-base", value: formState.firstName, label: text.firstName, disabled: states.disabled || isDisabledUserInput("firstName") }, (((_b = formState.errors) === null || _b === void 0 ? void 0 : _b.firstName) ? {
|
|
@@ -386,7 +394,9 @@ export const UserInfoFormView = (props) => {
|
|
|
386
394
|
h("div", { slot: "prefix" }, `${(_a = PHONE_EXTENSIONS[c.countryCode]) === null || _a === void 0 ? void 0 : _a.name} `), (_b = PHONE_EXTENSIONS[c.countryCode]) === null || _b === void 0 ? void 0 :
|
|
387
395
|
_b.dial_code));
|
|
388
396
|
})),
|
|
389
|
-
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber
|
|
397
|
+
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", id: "phoneNumber", name: "/phoneNumber", value: formState.phoneNumber !== null
|
|
398
|
+
? formState.phoneNumber
|
|
399
|
+
: "", "onSl-input": (e) => {
|
|
390
400
|
var _a;
|
|
391
401
|
const target = e.target;
|
|
392
402
|
const country = (((_a = refs.phoneCountryRef.current) === null || _a === void 0 ? void 0 : _a.value) || "US");
|
|
@@ -864,7 +864,7 @@ export class TaxForm {
|
|
|
864
864
|
"mutable": false,
|
|
865
865
|
"complexType": {
|
|
866
866
|
"original": "DemoData<UseUserInfoFormResult>",
|
|
867
|
-
"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; }[]; partnerData: ImpactPublisher; userData: ImpactUser; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
|
|
867
|
+
"resolved": "{ states?: { step: string; hideState: boolean; hideSteps: boolean; disabled: boolean; loadingError: boolean; loading: boolean; isPartner: boolean; isUser: boolean; isUserLegacy: boolean; isPartnerLegacy: 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; }[]; partnerData: ImpactPublisher; userData: ImpactUser; }; setStep?: (value: string) => void; onSubmit?: (event: any) => Promise<void>; }",
|
|
868
868
|
"references": {
|
|
869
869
|
"DemoData": {
|
|
870
870
|
"location": "import",
|
|
@@ -927,6 +927,8 @@ function useDemoUserInfoForm(props) {
|
|
|
927
927
|
loading: false,
|
|
928
928
|
isPartner: false,
|
|
929
929
|
isUser: false,
|
|
930
|
+
isPartnerLegacy: false,
|
|
931
|
+
isUserLegacy: false,
|
|
930
932
|
loadingError: false,
|
|
931
933
|
formState: {
|
|
932
934
|
errors: {
|
|
@@ -16,7 +16,7 @@ const GET_INDIRECT_TAX_COUNTRY_CODE = gql `
|
|
|
16
16
|
}
|
|
17
17
|
`;
|
|
18
18
|
export function useUserInfoForm(props) {
|
|
19
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
19
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
20
20
|
const currencyRef = useRef(undefined);
|
|
21
21
|
const phoneCountryRef = useRef(undefined);
|
|
22
22
|
const formRef = useRef(null);
|
|
@@ -122,7 +122,9 @@ export function useUserInfoForm(props) {
|
|
|
122
122
|
setFilteredPhoneCountries(countries || []);
|
|
123
123
|
}
|
|
124
124
|
else {
|
|
125
|
-
setFilteredPhoneCountries(countries.filter((c) => c.displayName
|
|
125
|
+
setFilteredPhoneCountries(countries.filter((c) => c.displayName
|
|
126
|
+
.toLowerCase()
|
|
127
|
+
.includes(phoneCountrySearch.toLowerCase())) || []);
|
|
126
128
|
}
|
|
127
129
|
}, [phoneCountrySearch, countries]);
|
|
128
130
|
useEffect(() => {
|
|
@@ -136,7 +138,7 @@ export function useUserInfoForm(props) {
|
|
|
136
138
|
}
|
|
137
139
|
}, [currencySearch, currencies]);
|
|
138
140
|
async function connectPartner(formData) {
|
|
139
|
-
var _a, _b, _c, _d;
|
|
141
|
+
var _a, _b, _c, _d, _e, _f;
|
|
140
142
|
const vars = {
|
|
141
143
|
user: {
|
|
142
144
|
id: user.id,
|
|
@@ -153,36 +155,31 @@ export function useUserInfoForm(props) {
|
|
|
153
155
|
phoneNumber: toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
|
|
154
156
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
155
157
|
};
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
|
|
158
|
+
// if user went through early partner creation, connectionStatus === "STARTED"
|
|
159
|
+
// otherwise trigger legacy partner creation
|
|
160
|
+
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
159
161
|
let result = null;
|
|
160
162
|
let connectionResult;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
// });
|
|
175
|
-
// connectionResult = (result as ConnectPartnerResult)
|
|
176
|
-
// ?.createImpactConnection;
|
|
177
|
-
// }
|
|
178
|
-
if (!result || ((_b = result) === null || _b === void 0 ? void 0 : _b.message))
|
|
163
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
164
|
+
result = await completeImpactPartner({
|
|
165
|
+
vars,
|
|
166
|
+
});
|
|
167
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
168
|
+
}
|
|
169
|
+
else {
|
|
170
|
+
result = await connectImpactPartner({
|
|
171
|
+
vars,
|
|
172
|
+
});
|
|
173
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
174
|
+
}
|
|
175
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
179
176
|
throw new Error();
|
|
180
177
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
181
178
|
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
182
179
|
throw new Error();
|
|
183
180
|
}
|
|
184
181
|
await refetch();
|
|
185
|
-
const resultPublisher = (
|
|
182
|
+
const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
|
|
186
183
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
187
184
|
// Fire form change event
|
|
188
185
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -316,6 +313,11 @@ export function useUserInfoForm(props) {
|
|
|
316
313
|
loading: loading || connectLoading || completeLoading,
|
|
317
314
|
isPartner: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
318
315
|
isUser: !!((_j = (_h = data === null || data === void 0 ? void 0 : data.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
316
|
+
// Show banner when pre-existing partner is created with legacy mutation createImpactConnection
|
|
317
|
+
isUserLegacy: !!((_l = (_k = data === null || data === void 0 ? void 0 : data.user) === null || _k === void 0 ? void 0 : _k.impactConnection) === null || _l === void 0 ? void 0 : _l.user) &&
|
|
318
|
+
((_o = (_m = data === null || data === void 0 ? void 0 : data.user) === null || _m === void 0 ? void 0 : _m.impactConnection) === null || _o === void 0 ? void 0 : _o.connectionStatus) !== "STARTED",
|
|
319
|
+
isPartnerLegacy: !!((_q = (_p = data === null || data === void 0 ? void 0 : data.user) === null || _p === void 0 ? void 0 : _p.impactConnection) === null || _q === void 0 ? void 0 : _q.publisher) &&
|
|
320
|
+
((_s = (_r = data === null || data === void 0 ? void 0 : data.user) === null || _r === void 0 ? void 0 : _r.impactConnection) === null || _s === void 0 ? void 0 : _s.connectionStatus) !== "STARTED",
|
|
319
321
|
formState: {
|
|
320
322
|
...userFormContext,
|
|
321
323
|
errors: formErrors,
|
|
@@ -14,11 +14,11 @@ import { u as useRerenderListener, a as useRequestRerender } from './re-render-b
|
|
|
14
14
|
import { u as useChildElements } from './useChildElements-06937df7.js';
|
|
15
15
|
import { l as luxon } from './luxon-1be92a8e.js';
|
|
16
16
|
import { g as generateUserError } from './useReferralTable-03d32c6f.js';
|
|
17
|
-
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-
|
|
17
|
+
import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-647a2bd5.js';
|
|
18
18
|
import { F as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE } from './data-8698cbc6.js';
|
|
19
19
|
import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
|
|
20
20
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
21
|
-
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
21
|
+
import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-38cd984e.js';
|
|
22
22
|
|
|
23
23
|
function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
24
24
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
|
|
@@ -866,10 +866,10 @@ const API_FIELD_TO_FORM_FIELD = {
|
|
|
866
866
|
bankProvinceState: "bankState",
|
|
867
867
|
};
|
|
868
868
|
/**
|
|
869
|
-
* Maps Impact API error
|
|
869
|
+
* Maps Impact API error codes (from validationErrors[].code) to short,
|
|
870
870
|
* readable frontend error codes used in the ICU select props.
|
|
871
871
|
*/
|
|
872
|
-
const
|
|
872
|
+
const API_ERROR_CODE_TO_FRONTEND = {
|
|
873
873
|
// Beneficiary account name
|
|
874
874
|
"withdrawal.settings.error.empty_beneficiaryname": "empty",
|
|
875
875
|
"withdrawal.settings.error.invalid_character_beneficiaryname": "invalidCharacters",
|
|
@@ -1160,7 +1160,7 @@ function useBankingInfoForm(props) {
|
|
|
1160
1160
|
console.error("Validation failed: ", validationErrors);
|
|
1161
1161
|
const mappedValidationErrors = validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.reduce((agg, error) => {
|
|
1162
1162
|
const formField = API_FIELD_TO_FORM_FIELD[error.field] || error.field;
|
|
1163
|
-
const errorCode =
|
|
1163
|
+
const errorCode = API_ERROR_CODE_TO_FRONTEND[error.code] || error.code;
|
|
1164
1164
|
return {
|
|
1165
1165
|
...agg,
|
|
1166
1166
|
[formField]: {
|
|
@@ -2836,6 +2836,14 @@ const IndirectTaxFormView = (props) => {
|
|
|
2836
2836
|
}, {
|
|
2837
2837
|
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2838
2838
|
}))),
|
|
2839
|
+
states.isPartnerLegacy && (h("sqm-form-message", { loading: states.loading, type: "info" },
|
|
2840
|
+
h("p", { part: "alert-title" }, text.isPartnerAlertHeader),
|
|
2841
|
+
intl.formatMessage({
|
|
2842
|
+
id: "isPartnerAlertDescription",
|
|
2843
|
+
defaultMessage: text.isPartnerAlertDescription,
|
|
2844
|
+
}, {
|
|
2845
|
+
supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
|
|
2846
|
+
}))),
|
|
2839
2847
|
h("div", null,
|
|
2840
2848
|
h("h4", null, text.indirectTaxDetails))),
|
|
2841
2849
|
states.loading ? (h("sl-spinner", { style: { fontSize: "50px", margin: "40px" } })) : (h("div", null,
|
|
@@ -3075,6 +3083,7 @@ function useDemoIndirectTaxForm(props) {
|
|
|
3075
3083
|
disabled: false,
|
|
3076
3084
|
loading: false,
|
|
3077
3085
|
isPartner: false,
|
|
3086
|
+
isPartnerLegacy: false,
|
|
3078
3087
|
loadingError: false,
|
|
3079
3088
|
errors: {},
|
|
3080
3089
|
formState: {
|
|
@@ -4432,7 +4441,7 @@ const GET_INDIRECT_TAX_COUNTRY_CODE = dist.gql `
|
|
|
4432
4441
|
}
|
|
4433
4442
|
`;
|
|
4434
4443
|
function useUserInfoForm(props) {
|
|
4435
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
4444
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
4436
4445
|
const currencyRef = useRef(undefined);
|
|
4437
4446
|
const phoneCountryRef = useRef(undefined);
|
|
4438
4447
|
const formRef = useRef(null);
|
|
@@ -4538,7 +4547,9 @@ function useUserInfoForm(props) {
|
|
|
4538
4547
|
setFilteredPhoneCountries(countries || []);
|
|
4539
4548
|
}
|
|
4540
4549
|
else {
|
|
4541
|
-
setFilteredPhoneCountries(countries.filter((c) => c.displayName
|
|
4550
|
+
setFilteredPhoneCountries(countries.filter((c) => c.displayName
|
|
4551
|
+
.toLowerCase()
|
|
4552
|
+
.includes(phoneCountrySearch.toLowerCase())) || []);
|
|
4542
4553
|
}
|
|
4543
4554
|
}, [phoneCountrySearch, countries]);
|
|
4544
4555
|
useEffect(() => {
|
|
@@ -4552,7 +4563,7 @@ function useUserInfoForm(props) {
|
|
|
4552
4563
|
}
|
|
4553
4564
|
}, [currencySearch, currencies]);
|
|
4554
4565
|
async function connectPartner(formData) {
|
|
4555
|
-
var _a, _b, _c, _d;
|
|
4566
|
+
var _a, _b, _c, _d, _e, _f;
|
|
4556
4567
|
const vars = {
|
|
4557
4568
|
user: {
|
|
4558
4569
|
id: user.id,
|
|
@@ -4569,36 +4580,31 @@ function useUserInfoForm(props) {
|
|
|
4569
4580
|
phoneNumber: toDomesticNumber(formData.phoneNumberCountryCode, formData.phoneNumber),
|
|
4570
4581
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
4571
4582
|
};
|
|
4572
|
-
//
|
|
4573
|
-
//
|
|
4574
|
-
|
|
4583
|
+
// if user went through early partner creation, connectionStatus === "STARTED"
|
|
4584
|
+
// otherwise trigger legacy partner creation
|
|
4585
|
+
const userData = data === null || data === void 0 ? void 0 : data.user;
|
|
4575
4586
|
let result = null;
|
|
4576
4587
|
let connectionResult;
|
|
4577
|
-
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4588
|
-
|
|
4589
|
-
|
|
4590
|
-
// });
|
|
4591
|
-
// connectionResult = (result as ConnectPartnerResult)
|
|
4592
|
-
// ?.createImpactConnection;
|
|
4593
|
-
// }
|
|
4594
|
-
if (!result || ((_b = result) === null || _b === void 0 ? void 0 : _b.message))
|
|
4588
|
+
if (((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connectionStatus) === "STARTED") {
|
|
4589
|
+
result = await completeImpactPartner({
|
|
4590
|
+
vars,
|
|
4591
|
+
});
|
|
4592
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
4593
|
+
}
|
|
4594
|
+
else {
|
|
4595
|
+
result = await connectImpactPartner({
|
|
4596
|
+
vars,
|
|
4597
|
+
});
|
|
4598
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
4599
|
+
}
|
|
4600
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
4595
4601
|
throw new Error();
|
|
4596
4602
|
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
4597
4603
|
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
4598
4604
|
throw new Error();
|
|
4599
4605
|
}
|
|
4600
4606
|
await refetch();
|
|
4601
|
-
const resultPublisher = (
|
|
4607
|
+
const resultPublisher = (_f = (_e = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _e === void 0 ? void 0 : _e.impactConnection) === null || _f === void 0 ? void 0 : _f.publisher;
|
|
4602
4608
|
const hasValidCurrentDocument = validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
4603
4609
|
// Fire form change event
|
|
4604
4610
|
window.dispatchEvent(new Event(TAX_FORM_UPDATED_EVENT_KEY));
|
|
@@ -4732,6 +4738,11 @@ function useUserInfoForm(props) {
|
|
|
4732
4738
|
loading: loading || connectLoading || completeLoading,
|
|
4733
4739
|
isPartner: !!((_g = (_f = data === null || data === void 0 ? void 0 : data.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
4734
4740
|
isUser: !!((_j = (_h = data === null || data === void 0 ? void 0 : data.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
4741
|
+
// Show banner when pre-existing partner is created with legacy mutation createImpactConnection
|
|
4742
|
+
isUserLegacy: !!((_l = (_k = data === null || data === void 0 ? void 0 : data.user) === null || _k === void 0 ? void 0 : _k.impactConnection) === null || _l === void 0 ? void 0 : _l.user) &&
|
|
4743
|
+
((_o = (_m = data === null || data === void 0 ? void 0 : data.user) === null || _m === void 0 ? void 0 : _m.impactConnection) === null || _o === void 0 ? void 0 : _o.connectionStatus) !== "STARTED",
|
|
4744
|
+
isPartnerLegacy: !!((_q = (_p = data === null || data === void 0 ? void 0 : data.user) === null || _p === void 0 ? void 0 : _p.impactConnection) === null || _q === void 0 ? void 0 : _q.publisher) &&
|
|
4745
|
+
((_s = (_r = data === null || data === void 0 ? void 0 : data.user) === null || _r === void 0 ? void 0 : _r.impactConnection) === null || _s === void 0 ? void 0 : _s.connectionStatus) !== "STARTED",
|
|
4735
4746
|
formState: {
|
|
4736
4747
|
...userFormContext,
|
|
4737
4748
|
errors: formErrors,
|
|
@@ -4949,6 +4960,8 @@ function useDemoUserInfoForm(props) {
|
|
|
4949
4960
|
loading: false,
|
|
4950
4961
|
isPartner: false,
|
|
4951
4962
|
isUser: false,
|
|
4963
|
+
isPartnerLegacy: false,
|
|
4964
|
+
isUserLegacy: false,
|
|
4952
4965
|
loadingError: false,
|
|
4953
4966
|
formState: {
|
|
4954
4967
|
errors: {
|
|
@@ -30,7 +30,7 @@ import './sqm-portal-container-view-200c9df8.js';
|
|
|
30
30
|
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, g as GET_FINANCE_NETWORK_SETTINGS, h as CURRENCIES_QUERY_NAMESPACE, i as GET_CURRENCIES } from './data-8698cbc6.js';
|
|
31
31
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, b as SHOW_PARTNER_MODAL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-1054056a.js';
|
|
32
32
|
import './eventKeys-f76b6a03.js';
|
|
33
|
-
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-
|
|
33
|
+
import { u as usePayoutStatus, C as COMPLETE_PARTNER } from './useIndirectTaxForm-38cd984e.js';
|
|
34
34
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -6797,7 +6797,6 @@ function useTaxAndCash() {
|
|
|
6797
6797
|
setCurrenciesContext(supportedCurrencies);
|
|
6798
6798
|
}, [supportedCurrencies]);
|
|
6799
6799
|
useEffect(() => {
|
|
6800
|
-
var _a;
|
|
6801
6800
|
if (errors) {
|
|
6802
6801
|
setStep("/error");
|
|
6803
6802
|
return;
|
|
@@ -6841,13 +6840,19 @@ function useTaxAndCash() {
|
|
|
6841
6840
|
const user = data === null || data === void 0 ? void 0 : data.user;
|
|
6842
6841
|
if (!user || step !== "/loading")
|
|
6843
6842
|
return;
|
|
6844
|
-
|
|
6845
|
-
|
|
6846
|
-
|
|
6847
|
-
|
|
6843
|
+
async function routeAfterMaybeCompleting() {
|
|
6844
|
+
var _a;
|
|
6845
|
+
if (((_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) &&
|
|
6846
|
+
(user === null || user === void 0 ? void 0 : user.impactConnection.connectionStatus) === "STARTED") {
|
|
6847
|
+
// Finish the early-created connection before routing so the next
|
|
6848
|
+
// step sees the completed status
|
|
6849
|
+
await completeConnection(user);
|
|
6850
|
+
await refetch();
|
|
6851
|
+
}
|
|
6852
|
+
const currentStep = getCurrentStep(user);
|
|
6853
|
+
setStep(currentStep);
|
|
6848
6854
|
}
|
|
6849
|
-
|
|
6850
|
-
setStep(currentStep);
|
|
6855
|
+
routeAfterMaybeCompleting();
|
|
6851
6856
|
}
|
|
6852
6857
|
}, [host, user, (_e = data === null || data === void 0 ? void 0 : data.user) === null || _e === void 0 ? void 0 : _e.email, errors]);
|
|
6853
6858
|
function getFinanceNetworkFilter() {
|
|
@@ -8392,9 +8397,11 @@ function useWidgetVerification() {
|
|
|
8392
8397
|
};
|
|
8393
8398
|
const onPartnerModalComplete = () => {
|
|
8394
8399
|
setShowPartnerModal(false);
|
|
8400
|
+
// Reset the latch so a later partner creation can re-trigger this effect
|
|
8395
8401
|
setPartnerCreated(false);
|
|
8396
8402
|
setContext(true);
|
|
8397
8403
|
};
|
|
8404
|
+
// The modal signals completion by flipping partnerCreated; advance the flow here
|
|
8398
8405
|
useEffect(() => {
|
|
8399
8406
|
if (partnerCreated)
|
|
8400
8407
|
onPartnerModalComplete();
|
|
@@ -7,7 +7,7 @@ import { g as getProps } from './utils-334c1e34.js';
|
|
|
7
7
|
import { c as createStyleSheet } from './JSS-67b5cff8.js';
|
|
8
8
|
import { T as TextSpanView } from './sqm-text-span-view-72f43dff.js';
|
|
9
9
|
import { g as GET_FINANCE_NETWORK_SETTINGS } from './data-8698cbc6.js';
|
|
10
|
-
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
10
|
+
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-6b9c512f.js';
|
|
11
11
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, P as PARTNER_CREATED_NAMESPACE } from './keys-1054056a.js';
|
|
12
12
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
13
13
|
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
@@ -502,7 +502,8 @@ function usePartnerInfoModal(props) {
|
|
|
502
502
|
const { data: currenciesData, loading: currenciesLoading } = wn(GET_CURRENCIES, { variables: { locale } });
|
|
503
503
|
const { data: countriesData, loading: countriesLoading } = wn(GET_COUNTRIES, {});
|
|
504
504
|
// No pre-filled country, use locale to determine countryCode instead
|
|
505
|
-
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
505
|
+
const [countryCode, setCountryCode] = useState(((_b = (_a = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher) === null || _b === void 0 ? void 0 : _b.countryCode) ||
|
|
506
|
+
locale.replace(/^.*_/, ""));
|
|
506
507
|
const [currency, setCurrency] = useState(((_d = (_c = user === null || user === void 0 ? void 0 : user.impactConnection) === null || _c === void 0 ? void 0 : _c.publisher) === null || _d === void 0 ? void 0 : _d.currency) || "");
|
|
507
508
|
const { data: financeNetworkData } = wn(GET_FINANCE_NETWORK_SETTINGS, {
|
|
508
509
|
variables: { filter: countryCode ? { countryCode_eq: countryCode } : {} },
|
|
@@ -601,11 +602,7 @@ function usePartnerInfoModal(props) {
|
|
|
601
602
|
}
|
|
602
603
|
async function onSubmit() {
|
|
603
604
|
var _a, _b;
|
|
604
|
-
if (!allowBankingCollection) {
|
|
605
|
-
setError(props.missingFieldsErrorText);
|
|
606
|
-
return;
|
|
607
|
-
}
|
|
608
|
-
if (!countryCode || !currency) {
|
|
605
|
+
if (!allowBankingCollection || !countryCode || !currency) {
|
|
609
606
|
setError(props.missingFieldsErrorText);
|
|
610
607
|
return;
|
|
611
608
|
}
|
package/dist/esm/{sqm-partner-info-modal-view-bc843d7d.js → sqm-partner-info-modal-view-6b9c512f.js}
RENAMED
|
@@ -129,13 +129,14 @@ function PartnerInfoModalView(props) {
|
|
|
129
129
|
const styleString = sheet.toString();
|
|
130
130
|
if (!states.open)
|
|
131
131
|
return h("div", null);
|
|
132
|
+
const modalHeader = states.isExistingPartner
|
|
133
|
+
? text.modalHeaderExistingPartner
|
|
134
|
+
: text.modalHeader;
|
|
132
135
|
return (h("div", null,
|
|
133
136
|
h("style", { type: "text/css" },
|
|
134
137
|
" ",
|
|
135
138
|
styleString),
|
|
136
|
-
h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label:
|
|
137
|
-
? text.modalHeaderExistingPartner
|
|
138
|
-
: text.modalHeader, "onSl-request-close": (e) => {
|
|
139
|
+
h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: modalHeader, "onSl-request-close": (e) => {
|
|
139
140
|
e.preventDefault();
|
|
140
141
|
}, "onSl-hide": (e) => {
|
|
141
142
|
var _a;
|
|
@@ -143,9 +144,7 @@ function PartnerInfoModalView(props) {
|
|
|
143
144
|
e.preventDefault();
|
|
144
145
|
}
|
|
145
146
|
}, "onSl-initial-focus": callbacks.onInitialFocus },
|
|
146
|
-
h("h2", { class: sheet.classes.DialogTitle },
|
|
147
|
-
? text.modalHeaderExistingPartner
|
|
148
|
-
: text.modalHeader),
|
|
147
|
+
h("h2", { class: sheet.classes.DialogTitle }, modalHeader),
|
|
149
148
|
h(PartnerInfoModalContentView, Object.assign({}, props)))));
|
|
150
149
|
}
|
|
151
150
|
|
|
@@ -33,10 +33,10 @@ import './ErrorView-74cb3af8.js';
|
|
|
33
33
|
import { Q as QrCodeView } from './sqm-qr-code-view-ce476721.js';
|
|
34
34
|
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, f as ChangeMarktingView, g as PortalFooterView, h as PortalFrameView, R as ReferralIframeView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as useShareButton, J as ShareLinkView, K as useShareLink, M as ProgressBarView, O as ProgressBar$2, Q as LeadFormView, U as LeadDropdownFieldView, V as ShadowViewAddon } from './ShadowViewAddon-e115fa1c.js';
|
|
35
35
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-200c9df8.js';
|
|
36
|
-
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-
|
|
36
|
+
import { I as InvoiceTableView, T as TaxAndCashDashboardView$1, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-647a2bd5.js';
|
|
37
37
|
import { L as LeadInputFieldView } from './sqm-lead-input-field-view-b945edf4.js';
|
|
38
38
|
import './data-8698cbc6.js';
|
|
39
|
-
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
39
|
+
import { P as PartnerInfoModalView } from './sqm-partner-info-modal-view-6b9c512f.js';
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -16699,6 +16699,8 @@ const stepOneProps = {
|
|
|
16699
16699
|
disabled: false,
|
|
16700
16700
|
isPartner: false,
|
|
16701
16701
|
isUser: false,
|
|
16702
|
+
isPartnerLegacy: false,
|
|
16703
|
+
isUserLegacy: false,
|
|
16702
16704
|
loadingError: false,
|
|
16703
16705
|
formState: {
|
|
16704
16706
|
firstName: "Bob",
|
|
@@ -16819,6 +16821,7 @@ const stepTwoProps = {
|
|
|
16819
16821
|
disabled: false,
|
|
16820
16822
|
loading: false,
|
|
16821
16823
|
isPartner: false,
|
|
16824
|
+
isPartnerLegacy: false,
|
|
16822
16825
|
loadingError: false,
|
|
16823
16826
|
formState: {
|
|
16824
16827
|
checked: undefined,
|
|
@@ -18881,7 +18884,10 @@ const mockCountries = [
|
|
|
18881
18884
|
{ countryCode: "FR", displayName: "France" },
|
|
18882
18885
|
{ countryCode: "ES", displayName: "Spain" },
|
|
18883
18886
|
// Show handling of long country names
|
|
18884
|
-
{
|
|
18887
|
+
{
|
|
18888
|
+
countryCode: "CD",
|
|
18889
|
+
displayName: "Congo, The Democratic Republic of the Congo",
|
|
18890
|
+
},
|
|
18885
18891
|
];
|
|
18886
18892
|
const mockCurrencies = [
|
|
18887
18893
|
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
@@ -18972,6 +18978,8 @@ const baseProps = {
|
|
|
18972
18978
|
loading: false,
|
|
18973
18979
|
isPartner: false,
|
|
18974
18980
|
isUser: false,
|
|
18981
|
+
isPartnerLegacy: false,
|
|
18982
|
+
isUserLegacy: false,
|
|
18975
18983
|
formState: {
|
|
18976
18984
|
firstName: "",
|
|
18977
18985
|
lastName: "",
|
|
@@ -19084,6 +19092,7 @@ const PartnerAccount = () => {
|
|
|
19084
19092
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19085
19093
|
...baseProps.states,
|
|
19086
19094
|
isPartner: true,
|
|
19095
|
+
isPartnerLegacy: true,
|
|
19087
19096
|
formState: {
|
|
19088
19097
|
...baseProps.states.formState,
|
|
19089
19098
|
firstName: "Jane",
|
|
@@ -19103,10 +19112,53 @@ const PartnerAccount = () => {
|
|
|
19103
19112
|
partnerData: mockPartnerData,
|
|
19104
19113
|
} })));
|
|
19105
19114
|
};
|
|
19115
|
+
// Early partner created via <sqm-partner-info-modal>: connectionStatus is "STARTED",
|
|
19116
|
+
// publisher has only countryCode + currency populated. Banner must NOT show; only
|
|
19117
|
+
// country + currency disabled; firstName/lastName disabled via userData; everything
|
|
19118
|
+
// else (phone, address, city, state, postalCode) stays editable.
|
|
19119
|
+
const EarlyPartnerFromModal = () => {
|
|
19120
|
+
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19121
|
+
...baseProps.states,
|
|
19122
|
+
isPartner: true,
|
|
19123
|
+
isUser: true,
|
|
19124
|
+
isPartnerLegacy: false,
|
|
19125
|
+
isUserLegacy: false,
|
|
19126
|
+
formState: {
|
|
19127
|
+
...baseProps.states.formState,
|
|
19128
|
+
firstName: "Jane",
|
|
19129
|
+
lastName: "Smith",
|
|
19130
|
+
email: "jane.smith@example.com",
|
|
19131
|
+
countryCode: "US",
|
|
19132
|
+
currency: "USD",
|
|
19133
|
+
phoneNumberCountryCode: undefined,
|
|
19134
|
+
phoneNumber: undefined,
|
|
19135
|
+
address: undefined,
|
|
19136
|
+
city: undefined,
|
|
19137
|
+
state: undefined,
|
|
19138
|
+
postalCode: undefined,
|
|
19139
|
+
},
|
|
19140
|
+
}, data: {
|
|
19141
|
+
...baseProps.data,
|
|
19142
|
+
partnerData: {
|
|
19143
|
+
...mockPartnerData,
|
|
19144
|
+
billingAddress: undefined,
|
|
19145
|
+
billingCity: undefined,
|
|
19146
|
+
billingState: undefined,
|
|
19147
|
+
billingPostalCode: undefined,
|
|
19148
|
+
phoneNumber: undefined,
|
|
19149
|
+
phoneNumberCountryCode: undefined,
|
|
19150
|
+
},
|
|
19151
|
+
userData: {
|
|
19152
|
+
firstName: "Jane",
|
|
19153
|
+
lastName: "Smith",
|
|
19154
|
+
},
|
|
19155
|
+
} })));
|
|
19156
|
+
};
|
|
19106
19157
|
const UserAccount = () => {
|
|
19107
19158
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19108
19159
|
...baseProps.states,
|
|
19109
19160
|
isUser: true,
|
|
19161
|
+
isUserLegacy: true,
|
|
19110
19162
|
formState: {
|
|
19111
19163
|
...baseProps.states.formState,
|
|
19112
19164
|
firstName: "Bob",
|
|
@@ -19125,6 +19177,7 @@ const UserAccountMissingLastName = () => {
|
|
|
19125
19177
|
return (h(UserInfoFormView$1, Object.assign({}, baseProps, { states: {
|
|
19126
19178
|
...baseProps.states,
|
|
19127
19179
|
isUser: true,
|
|
19180
|
+
isUserLegacy: true,
|
|
19128
19181
|
formState: {
|
|
19129
19182
|
...baseProps.states.formState,
|
|
19130
19183
|
firstName: "Bob",
|
|
@@ -19204,6 +19257,7 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
|
|
|
19204
19257
|
WithValidationErrors: WithValidationErrors,
|
|
19205
19258
|
WithGeneralError: WithGeneralError,
|
|
19206
19259
|
PartnerAccount: PartnerAccount,
|
|
19260
|
+
EarlyPartnerFromModal: EarlyPartnerFromModal,
|
|
19207
19261
|
UserAccount: UserAccount,
|
|
19208
19262
|
UserAccountMissingLastName: UserAccountMissingLastName,
|
|
19209
19263
|
CanadianAddress: CanadianAddress,
|