@saasquatch/mint-components 2.1.9-16 → 2.1.9-18
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/{data-e83f8a41.js → data-34bc7549.js} +0 -90
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +85 -33
- package/dist/cjs/sqm-big-stat_46.cjs.entry.js +5 -4
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +28 -10
- package/dist/cjs/{sqm-partner-info-modal-view-2d6e89a4.js → sqm-partner-info-modal-view-0821eea3.js} +33 -32
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +38 -37
- package/dist/cjs/{sqm-user-info-form-view-923ff8d9.js → sqm-user-info-form-view-d89bdc04.js} +24 -23
- package/dist/cjs/utils-a8e0bd9b.js +93 -0
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +33 -32
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +28 -10
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.js +49 -11
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/useUserInfoForm.js +27 -14
- package/dist/{mint-components/p-a5912b2f.js → esm/data-2380309a.js} +23 -5
- package/dist/esm/sqm-banking-info-form_10.entry.js +78 -26
- package/dist/esm/sqm-big-stat_46.entry.js +3 -2
- package/dist/esm/sqm-email-verification_2.entry.js +29 -11
- package/dist/esm/{sqm-partner-info-modal-view-f85b5a08.js → sqm-partner-info-modal-view-78d2bc6e.js} +33 -32
- package/dist/esm/sqm-stencilbook.entry.js +4 -3
- package/dist/esm/{sqm-user-info-form-view-f9026468.js → sqm-user-info-form-view-ff8e47ad.js} +2 -1
- package/dist/esm/utils-8267d3d8.js +85 -0
- package/dist/esm-es5/data-2380309a.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_46.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-78d2bc6e.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-user-info-form-view-ff8e47ad.js +1 -0
- package/dist/esm-es5/utils-8267d3d8.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0152122e.js +115 -0
- package/dist/mint-components/{p-1b2fcd7f.entry.js → p-0305331c.entry.js} +32 -7
- package/dist/mint-components/p-0e05ab3b.system.js +1 -0
- package/dist/mint-components/{p-3b2b83d9.entry.js → p-134df0e0.entry.js} +8 -8
- package/dist/mint-components/p-1c413a06.system.js +1 -1
- package/dist/mint-components/p-37541f60.js +1 -0
- package/dist/mint-components/p-527cb9c6.entry.js +9 -0
- package/dist/mint-components/p-5d40ccd0.system.entry.js +1 -0
- package/dist/mint-components/p-80c3ec2a.system.js +1 -0
- package/dist/mint-components/{p-e5c554da.entry.js → p-8ccc3449.entry.js} +2 -2
- package/dist/mint-components/p-8ebd2081.system.js +1 -0
- package/dist/mint-components/p-9d89bd75.system.entry.js +1 -0
- package/dist/mint-components/p-a8891ebd.js +1 -0
- package/dist/mint-components/p-a9ff6601.system.entry.js +1 -0
- package/dist/mint-components/p-af5cd4cf.js +1 -0
- package/dist/mint-components/p-d4446e58.system.entry.js +1 -0
- package/dist/mint-components/p-ee0f1cf1.system.js +1 -0
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +1 -1
- package/dist/types/components/tax-and-cash/sqm-indirect-tax-form/useIndirectTaxForm.d.ts +4 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm/data-2b0feb3f.js +0 -216
- package/dist/esm-es5/data-2b0feb3f.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-f85b5a08.js +0 -1
- package/dist/esm-es5/sqm-user-info-form-view-f9026468.js +0 -1
- package/dist/mint-components/p-014977d7.js +0 -1
- package/dist/mint-components/p-54bf015a.system.js +0 -1
- package/dist/mint-components/p-5a71d63c.js +0 -1
- package/dist/mint-components/p-64b56141.system.entry.js +0 -1
- package/dist/mint-components/p-65e4ba6f.system.entry.js +0 -1
- package/dist/mint-components/p-67792584.system.js +0 -1
- package/dist/mint-components/p-a06ee2a3.system.entry.js +0 -1
- package/dist/mint-components/p-ae0a0031.system.entry.js +0 -1
- package/dist/mint-components/p-d111584d.entry.js +0 -9
- package/dist/mint-components/p-eaf5d0af.system.js +0 -1
|
@@ -1,89 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const index = require('./index-8277cbb3.js');
|
|
4
|
-
const global = require('./global-0f8b1267.js');
|
|
5
3
|
const index_module = require('./index.module-42d413d9.js');
|
|
6
|
-
const JSS = require('./JSS-8503a151.js');
|
|
7
|
-
|
|
8
|
-
const style = {
|
|
9
|
-
Container: {
|
|
10
|
-
display: "flex",
|
|
11
|
-
flexDirection: "column",
|
|
12
|
-
gap: "35px",
|
|
13
|
-
},
|
|
14
|
-
HeaderContainer: {
|
|
15
|
-
display: "flex",
|
|
16
|
-
flexDirection: "column",
|
|
17
|
-
gap: "10px",
|
|
18
|
-
},
|
|
19
|
-
};
|
|
20
|
-
const sheet = JSS.createStyleSheet(style);
|
|
21
|
-
const styleString = sheet.toString();
|
|
22
|
-
const LoadingView = () => {
|
|
23
|
-
return (index.h("div", { class: sheet.classes.Container },
|
|
24
|
-
index.h("style", { type: "text/css" }, styleString),
|
|
25
|
-
index.h("sqm-skeleton", { width: "45%", height: "40px !important" }),
|
|
26
|
-
index.h("div", { class: sheet.classes.HeaderContainer },
|
|
27
|
-
index.h("sqm-skeleton", { width: "15%" }),
|
|
28
|
-
index.h("sqm-skeleton", { width: "25%", height: "30px !important" })),
|
|
29
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
30
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
31
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
32
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
33
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
34
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
35
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
36
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
37
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
38
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
39
|
-
index.h("sqm-skeleton", { width: "75%", height: "35px" }),
|
|
40
|
-
index.h("sqm-skeleton", { width: "15%" }),
|
|
41
|
-
index.h("sqm-skeleton", { width: "80px", height: "30px !important" })));
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
function validTaxDocument(requiredType) {
|
|
45
|
-
const validTypes = ["W9", "W8BENE", "W8BEN"];
|
|
46
|
-
if (validTypes.includes(requiredType))
|
|
47
|
-
return true;
|
|
48
|
-
return false;
|
|
49
|
-
}
|
|
50
|
-
const objectIsFull = (obj) => {
|
|
51
|
-
return !Object.keys(obj).find((k) => obj[k] == undefined);
|
|
52
|
-
};
|
|
53
|
-
const taxTypeToName = (taxType) => {
|
|
54
|
-
switch (taxType) {
|
|
55
|
-
case "W9":
|
|
56
|
-
return "W-9";
|
|
57
|
-
case "W8BEN":
|
|
58
|
-
case "W8BENE":
|
|
59
|
-
return "W-8";
|
|
60
|
-
default:
|
|
61
|
-
return "";
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
function validateBillingField(regex, value) {
|
|
65
|
-
const trimmed = value.trim();
|
|
66
|
-
const idx = trimmed.search(regex);
|
|
67
|
-
return idx > -1;
|
|
68
|
-
}
|
|
69
|
-
const formatErrorMessage = (fieldName, errorMessage) => {
|
|
70
|
-
return global.intl.formatMessage({
|
|
71
|
-
id: fieldName,
|
|
72
|
-
defaultMessage: errorMessage,
|
|
73
|
-
}, {
|
|
74
|
-
fieldName,
|
|
75
|
-
});
|
|
76
|
-
};
|
|
77
|
-
function getCountryObj({ countryCode, locale, }) {
|
|
78
|
-
// @ts-ignore DisplayNames not in Intl type
|
|
79
|
-
const displayName = new Intl.DisplayNames([locale], {
|
|
80
|
-
type: "region",
|
|
81
|
-
}).of(countryCode);
|
|
82
|
-
return {
|
|
83
|
-
countryCode,
|
|
84
|
-
displayName,
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
4
|
|
|
88
5
|
const TAX_CONTEXT_NAMESPACE = "sq:tax-and-cash";
|
|
89
6
|
const TAX_FORM_CONTEXT_NAMESPACE = "sq:tax-form-context";
|
|
@@ -225,15 +142,8 @@ exports.GET_COUNTRIES = GET_COUNTRIES;
|
|
|
225
142
|
exports.GET_CURRENCIES = GET_CURRENCIES;
|
|
226
143
|
exports.GET_FINANCE_NETWORK_SETTINGS = GET_FINANCE_NETWORK_SETTINGS;
|
|
227
144
|
exports.GET_USER = GET_USER;
|
|
228
|
-
exports.LoadingView = LoadingView;
|
|
229
145
|
exports.SORTED_COUNTRIES_NAMESPACE = SORTED_COUNTRIES_NAMESPACE;
|
|
230
146
|
exports.TAX_CONTEXT_NAMESPACE = TAX_CONTEXT_NAMESPACE;
|
|
231
147
|
exports.TAX_FORM_CONTEXT_NAMESPACE = TAX_FORM_CONTEXT_NAMESPACE;
|
|
232
148
|
exports.USER_FORM_CONTEXT_NAMESPACE = USER_FORM_CONTEXT_NAMESPACE;
|
|
233
149
|
exports.USER_QUERY_NAMESPACE = USER_QUERY_NAMESPACE;
|
|
234
|
-
exports.formatErrorMessage = formatErrorMessage;
|
|
235
|
-
exports.getCountryObj = getCountryObj;
|
|
236
|
-
exports.objectIsFull = objectIsFull;
|
|
237
|
-
exports.taxTypeToName = taxTypeToName;
|
|
238
|
-
exports.validTaxDocument = validTaxDocument;
|
|
239
|
-
exports.validateBillingField = validateBillingField;
|
|
@@ -16,8 +16,9 @@ const reRender = require('./re-render-69bde9ee.js');
|
|
|
16
16
|
const useChildElements = require('./useChildElements-89bc50a9.js');
|
|
17
17
|
const luxon = require('./luxon-c1ad356a.js');
|
|
18
18
|
const useReferralTable = require('./useReferralTable-d3ddfd05.js');
|
|
19
|
-
const sqmUserInfoFormView = require('./sqm-user-info-form-view-
|
|
20
|
-
const
|
|
19
|
+
const sqmUserInfoFormView = require('./sqm-user-info-form-view-d89bdc04.js');
|
|
20
|
+
const utils$1 = require('./utils-a8e0bd9b.js');
|
|
21
|
+
const data = require('./data-34bc7549.js');
|
|
21
22
|
const keys = require('./keys-cff24974.js');
|
|
22
23
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
23
24
|
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
@@ -2044,7 +2045,7 @@ function useDocusignForm(props) {
|
|
|
2044
2045
|
const [showExitButton, setShowExitButton] = domContextHooks_module.useState(false);
|
|
2045
2046
|
const [showModal, setShowModal] = domContextHooks_module.useState(true);
|
|
2046
2047
|
// Only look at current document if it's valid (same as required type)
|
|
2047
|
-
const existingDocumentType =
|
|
2048
|
+
const existingDocumentType = utils$1.validTaxDocument(publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType) && (publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument)
|
|
2048
2049
|
? publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType : undefined;
|
|
2049
2050
|
const actualDocumentType = existingDocumentType ||
|
|
2050
2051
|
getDocumentType(participantType) || (publisher === null || publisher === void 0 ? void 0 : publisher.requiredTaxDocumentType);
|
|
@@ -2142,7 +2143,7 @@ function useDocusignForm(props) {
|
|
|
2142
2143
|
},
|
|
2143
2144
|
docusignStatus,
|
|
2144
2145
|
documentType: actualDocumentType,
|
|
2145
|
-
documentTypeString:
|
|
2146
|
+
documentTypeString: utils$1.taxTypeToName(actualDocumentType),
|
|
2146
2147
|
showExitButton,
|
|
2147
2148
|
showModal,
|
|
2148
2149
|
},
|
|
@@ -2871,6 +2872,32 @@ const CONNECT_PARTNER = index_module.dist.gql `
|
|
|
2871
2872
|
}
|
|
2872
2873
|
}
|
|
2873
2874
|
`;
|
|
2875
|
+
const COMPLETE_PARTNER = index_module.dist.gql `
|
|
2876
|
+
mutation completeImpactConnection($vars: ImpactConnectionInput!) {
|
|
2877
|
+
completeImpactConnection(impactConnectionInput: $vars) {
|
|
2878
|
+
success
|
|
2879
|
+
validationErrors {
|
|
2880
|
+
field
|
|
2881
|
+
message
|
|
2882
|
+
}
|
|
2883
|
+
user {
|
|
2884
|
+
id
|
|
2885
|
+
accountId
|
|
2886
|
+
impactConnection {
|
|
2887
|
+
connected
|
|
2888
|
+
publisher {
|
|
2889
|
+
brandedSignup
|
|
2890
|
+
requiredTaxDocumentType
|
|
2891
|
+
currentTaxDocument {
|
|
2892
|
+
type
|
|
2893
|
+
status
|
|
2894
|
+
}
|
|
2895
|
+
}
|
|
2896
|
+
}
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
}
|
|
2900
|
+
`;
|
|
2874
2901
|
function getOption(countries, countryCode) {
|
|
2875
2902
|
if (!countries)
|
|
2876
2903
|
return;
|
|
@@ -2889,11 +2916,12 @@ function useIndirectTaxForm(props) {
|
|
|
2889
2916
|
const context = index_module.Fn(data.TAX_FORM_CONTEXT_NAMESPACE);
|
|
2890
2917
|
const [step, setStep] = index_module.Pn(data.TAX_CONTEXT_NAMESPACE);
|
|
2891
2918
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
2919
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = index_module.$e(COMPLETE_PARTNER);
|
|
2892
2920
|
const userForm = index_module.Fn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
2893
2921
|
const { data: userData, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
2894
2922
|
const { data: _countriesRes, loading: countriesLoading } = index_module.$n(data.COUNTRIES_QUERY_NAMESPACE);
|
|
2895
2923
|
const intlLocale = (locale === null || locale === void 0 ? void 0 : locale.replace("_", "-")) || "en";
|
|
2896
|
-
const _countries = domContextHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) =>
|
|
2924
|
+
const _countries = domContextHooks_module.useMemo(() => { var _a, _b; return (_b = (_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.map((country) => utils$1.getCountryObj({ countryCode: country.countryCode, locale: intlLocale })); }, [(_a = _countriesRes === null || _countriesRes === void 0 ? void 0 : _countriesRes.impactPayoutCountries) === null || _a === void 0 ? void 0 : _a.data]);
|
|
2897
2925
|
const [loading, setLoading] = domContextHooks_module.useState(false);
|
|
2898
2926
|
const [formState, setFormState] = domContextHooks_module.useState({});
|
|
2899
2927
|
const [errors, setErrors] = domContextHooks_module.useState({});
|
|
@@ -2951,7 +2979,7 @@ function useIndirectTaxForm(props) {
|
|
|
2951
2979
|
setFormState((p) => ({ ...p, [field]: value }));
|
|
2952
2980
|
};
|
|
2953
2981
|
async function connectPartner(formData) {
|
|
2954
|
-
var _a, _b, _c, _d, _e;
|
|
2982
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
2955
2983
|
const vars = {
|
|
2956
2984
|
user: {
|
|
2957
2985
|
id: user.id,
|
|
@@ -2973,20 +3001,31 @@ function useIndirectTaxForm(props) {
|
|
|
2973
3001
|
additionalTaxId: formData.qstNumber,
|
|
2974
3002
|
withholdingTaxId: formData.subRegionTaxNumber,
|
|
2975
3003
|
};
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
if (
|
|
3004
|
+
//AL: TODO completePartnerMutation might change
|
|
3005
|
+
let result = null;
|
|
3006
|
+
let connectionResult;
|
|
3007
|
+
if ((_b = (_a = userData === null || userData === void 0 ? void 0 : userData.user) === null || _a === void 0 ? void 0 : _a.impactConnection) === null || _b === void 0 ? void 0 : _b.connected) {
|
|
3008
|
+
result = await completeImpactPartner({
|
|
3009
|
+
vars,
|
|
3010
|
+
});
|
|
3011
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.completeImpactConnection;
|
|
3012
|
+
}
|
|
3013
|
+
else {
|
|
3014
|
+
result = await connectImpactPartner({
|
|
3015
|
+
vars,
|
|
3016
|
+
});
|
|
3017
|
+
connectionResult = (_d = result) === null || _d === void 0 ? void 0 : _d.createImpactConnection;
|
|
3018
|
+
}
|
|
3019
|
+
if (!result || ((_e = result) === null || _e === void 0 ? void 0 : _e.message))
|
|
2980
3020
|
throw new Error();
|
|
2981
|
-
if (!(
|
|
3021
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
2982
3022
|
// Output backend errors to console for now
|
|
2983
|
-
console.error("Failed to create Impact connection: ",
|
|
3023
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
2984
3024
|
throw new Error();
|
|
2985
3025
|
}
|
|
2986
3026
|
await refetch();
|
|
2987
|
-
const resultPublisher = (
|
|
2988
|
-
|
|
2989
|
-
const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
3027
|
+
const resultPublisher = (_g = (_f = connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher;
|
|
3028
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
2990
3029
|
// Fire form change event
|
|
2991
3030
|
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
2992
3031
|
return {
|
|
@@ -3051,8 +3090,8 @@ function useIndirectTaxForm(props) {
|
|
|
3051
3090
|
states: {
|
|
3052
3091
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
3053
3092
|
hideSteps: context.hideSteps,
|
|
3054
|
-
disabled: loading || countriesLoading || connectLoading,
|
|
3055
|
-
loading: loading || connectLoading || countriesLoading,
|
|
3093
|
+
disabled: loading || countriesLoading || connectLoading || completeLoading,
|
|
3094
|
+
loading: loading || connectLoading || countriesLoading || completeLoading,
|
|
3056
3095
|
isPartner: !!((_e = (_d = userData === null || userData === void 0 ? void 0 : userData.user) === null || _d === void 0 ? void 0 : _d.impactConnection) === null || _e === void 0 ? void 0 : _e.publisher),
|
|
3057
3096
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
3058
3097
|
formState: {
|
|
@@ -4855,7 +4894,7 @@ const useTaxAndCashDashboard = (props) => {
|
|
|
4855
4894
|
dateSubmitted,
|
|
4856
4895
|
documentType,
|
|
4857
4896
|
canEditPayoutInfo: publisher === null || publisher === void 0 ? void 0 : publisher.brandedSignup,
|
|
4858
|
-
documentTypeString:
|
|
4897
|
+
documentTypeString: utils$1.taxTypeToName(documentType),
|
|
4859
4898
|
status: (_f = publisher === null || publisher === void 0 ? void 0 : publisher.currentTaxDocument) === null || _f === void 0 ? void 0 : _f.status,
|
|
4860
4899
|
subRegion: getSubRegionName((_g = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _g === void 0 ? void 0 : _g.indirectTaxRegion),
|
|
4861
4900
|
subRegionTaxNumber: (_h = publisher === null || publisher === void 0 ? void 0 : publisher.taxInformation) === null || _h === void 0 ? void 0 : _h.withholdingTaxId,
|
|
@@ -5365,6 +5404,7 @@ function useUserInfoForm(props) {
|
|
|
5365
5404
|
const [userFormContext, setUserFormContext] = index_module.Pn(data.USER_FORM_CONTEXT_NAMESPACE);
|
|
5366
5405
|
const user = index_module.J();
|
|
5367
5406
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
5407
|
+
const [completeImpactPartner, { loading: completeLoading, errors: completeErrors },] = index_module.$e(COMPLETE_PARTNER);
|
|
5368
5408
|
const { data: tenantData } = index_module.wn(GET_INDIRECT_TAX_COUNTRY_CODE, {});
|
|
5369
5409
|
const { data: data$1, loading, refetch, errors: userError, } = index_module.$n(data.USER_QUERY_NAMESPACE);
|
|
5370
5410
|
const _currencies = index_module.Fn(data.CURRENCIES_NAMESPACE);
|
|
@@ -5386,7 +5426,7 @@ function useUserInfoForm(props) {
|
|
|
5386
5426
|
if (!user || step !== "/1")
|
|
5387
5427
|
return;
|
|
5388
5428
|
// If form already filled out, skip initialising it
|
|
5389
|
-
if (
|
|
5429
|
+
if (utils$1.objectIsFull(userFormContext))
|
|
5390
5430
|
return;
|
|
5391
5431
|
// Prefer MI email if it was verified before this
|
|
5392
5432
|
const email = ((_a = user.managedIdentity) === null || _a === void 0 ? void 0 : _a.emailVerified) ? user.managedIdentity.email
|
|
@@ -5476,7 +5516,7 @@ function useUserInfoForm(props) {
|
|
|
5476
5516
|
}
|
|
5477
5517
|
}, [currencySearch, currencies]);
|
|
5478
5518
|
async function connectPartner(formData) {
|
|
5479
|
-
var _a, _b, _c, _d, _e;
|
|
5519
|
+
var _a, _b, _c, _d, _e, _f;
|
|
5480
5520
|
const vars = {
|
|
5481
5521
|
user: {
|
|
5482
5522
|
id: user.id,
|
|
@@ -5493,21 +5533,33 @@ function useUserInfoForm(props) {
|
|
|
5493
5533
|
phoneNumber: formData.phoneNumber,
|
|
5494
5534
|
phoneNumberCountryCode: formData.phoneNumberCountryCode,
|
|
5495
5535
|
};
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5536
|
+
//AL: TODO completePartnerMutation might change
|
|
5537
|
+
// if user already has an impact connection, call completeImpactPartner to update their information instead of connectPartner
|
|
5538
|
+
const userData = data$1 === null || data$1 === void 0 ? void 0 : data$1.user;
|
|
5539
|
+
let result = null;
|
|
5540
|
+
let connectionResult;
|
|
5541
|
+
if ((_a = userData === null || userData === void 0 ? void 0 : userData.impactConnection) === null || _a === void 0 ? void 0 : _a.connected) {
|
|
5542
|
+
console.log(vars, "values for completeImpactPartner");
|
|
5543
|
+
result = await completeImpactPartner({
|
|
5544
|
+
vars,
|
|
5545
|
+
});
|
|
5546
|
+
connectionResult = (_b = result) === null || _b === void 0 ? void 0 : _b.completeImpactConnection;
|
|
5547
|
+
}
|
|
5548
|
+
else {
|
|
5549
|
+
result = await connectImpactPartner({
|
|
5550
|
+
vars,
|
|
5551
|
+
});
|
|
5552
|
+
connectionResult = (_c = result) === null || _c === void 0 ? void 0 : _c.createImpactConnection;
|
|
5553
|
+
}
|
|
5554
|
+
if (!result || ((_d = result) === null || _d === void 0 ? void 0 : _d.message))
|
|
5500
5555
|
throw new Error();
|
|
5501
|
-
if (!(
|
|
5502
|
-
|
|
5503
|
-
console.error("Failed to create Impact connection: ", result.createImpactConnection
|
|
5504
|
-
.validationErrors);
|
|
5556
|
+
if (!(connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.success)) {
|
|
5557
|
+
console.error("Failed to create Impact connection: ", connectionResult === null || connectionResult === void 0 ? void 0 : connectionResult.validationErrors);
|
|
5505
5558
|
throw new Error();
|
|
5506
5559
|
}
|
|
5507
5560
|
await refetch();
|
|
5508
|
-
const resultPublisher = (
|
|
5509
|
-
|
|
5510
|
-
const hasValidCurrentDocument = data.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
5561
|
+
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;
|
|
5562
|
+
const hasValidCurrentDocument = utils$1.validTaxDocument(resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.requiredTaxDocumentType) && (resultPublisher === null || resultPublisher === void 0 ? void 0 : resultPublisher.currentTaxDocument);
|
|
5511
5563
|
// Fire form change event
|
|
5512
5564
|
window.dispatchEvent(new Event(eventKeys.TAX_FORM_UPDATED_EVENT_KEY));
|
|
5513
5565
|
return {
|
|
@@ -5631,9 +5683,9 @@ function useUserInfoForm(props) {
|
|
|
5631
5683
|
step: step === null || step === void 0 ? void 0 : step.replace("/", ""),
|
|
5632
5684
|
hideState: !hasStates,
|
|
5633
5685
|
hideSteps: !!context.hideSteps,
|
|
5634
|
-
disabled: loading || connectLoading,
|
|
5686
|
+
disabled: loading || connectLoading || completeLoading,
|
|
5635
5687
|
loadingError: !!(userError === null || userError === void 0 ? void 0 : userError.message),
|
|
5636
|
-
loading: loading || connectLoading,
|
|
5688
|
+
loading: loading || connectLoading || completeLoading,
|
|
5637
5689
|
isPartner: !!((_g = (_f = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _f === void 0 ? void 0 : _f.impactConnection) === null || _g === void 0 ? void 0 : _g.publisher),
|
|
5638
5690
|
isUser: !!((_j = (_h = data$1 === null || data$1 === void 0 ? void 0 : data$1.user) === null || _h === void 0 ? void 0 : _h.impactConnection) === null || _j === void 0 ? void 0 : _j.user),
|
|
5639
5691
|
formState: {
|
|
@@ -29,7 +29,8 @@ const utilities = require('./utilities-096934ea.js');
|
|
|
29
29
|
const ErrorView = require('./ErrorView-ee7b0f36.js');
|
|
30
30
|
const ShadowViewAddon = require('./ShadowViewAddon-d679ec76.js');
|
|
31
31
|
require('./sqm-portal-container-view-70a47420.js');
|
|
32
|
-
const
|
|
32
|
+
const utils$1 = require('./utils-a8e0bd9b.js');
|
|
33
|
+
const data = require('./data-34bc7549.js');
|
|
33
34
|
const keys = require('./keys-cff24974.js');
|
|
34
35
|
require('./eventKeys-7af4df4d.js');
|
|
35
36
|
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
@@ -6535,7 +6536,7 @@ function useTaxAndCash() {
|
|
|
6535
6536
|
const availableCountries = domContextHooks_module.useMemo(() => new Set(paymentOptions === null || paymentOptions === void 0 ? void 0 : paymentOptions.map((option) => option.countryCode).filter((value) => value)), [paymentOptions]);
|
|
6536
6537
|
const _topCountries = ["CA", "GB", "US"];
|
|
6537
6538
|
const sortedCountries = domContextHooks_module.useMemo(() => Array.from(availableCountries)
|
|
6538
|
-
.map((countryCode) =>
|
|
6539
|
+
.map((countryCode) => utils$1.getCountryObj({ countryCode, locale: intlLocale }))
|
|
6539
6540
|
.sort(sortByName)
|
|
6540
6541
|
.reduce((prev, countryObj) => {
|
|
6541
6542
|
if (_topCountries.includes(countryObj.countryCode))
|
|
@@ -7746,7 +7747,7 @@ const TaxAndCashMonolith = class {
|
|
|
7746
7747
|
supportLink: (index.h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, this.supportLink)),
|
|
7747
7748
|
}) }));
|
|
7748
7749
|
}
|
|
7749
|
-
return index.h(
|
|
7750
|
+
return index.h(utils$1.LoadingView, null);
|
|
7750
7751
|
}
|
|
7751
7752
|
};
|
|
7752
7753
|
function useDemoTaxAndCash(props) {
|
|
@@ -8229,7 +8230,7 @@ const WidgetVerification = class {
|
|
|
8229
8230
|
: useWidgetVerification();
|
|
8230
8231
|
if (props.loading)
|
|
8231
8232
|
return index.h("sl-spinner", null);
|
|
8232
|
-
//
|
|
8233
|
+
// for handling state previews in content editor
|
|
8233
8234
|
const partnerState = typeof props["sqm-partner-info-modal_stateController"] === "string"
|
|
8234
8235
|
? parseStates.parseStates(props["sqm-partner-info-modal_stateController"])
|
|
8235
8236
|
: props["sqm-partner-info-modal_stateController"];
|
|
@@ -10,7 +10,8 @@ const cjs = require('./cjs-1066ec21.js');
|
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
12
|
const sqmTextSpanView = require('./sqm-text-span-view-f274fdf2.js');
|
|
13
|
-
const
|
|
13
|
+
const data = require('./data-34bc7549.js');
|
|
14
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-0821eea3.js');
|
|
14
15
|
const keys = require('./keys-cff24974.js');
|
|
15
16
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
16
17
|
const parseStates = require('./parseStates-d1effc19.js');
|
|
@@ -504,7 +505,7 @@ const GET_BRAND_NAME = index_module.dist.gql `
|
|
|
504
505
|
}
|
|
505
506
|
`;
|
|
506
507
|
function usePartnerInfoModal(props) {
|
|
507
|
-
var _a, _b, _c, _d, _e, _f, _g
|
|
508
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
508
509
|
const locale = index_module.L();
|
|
509
510
|
const setVerificationContext = index_module.En(keys.VERIFICATION_PARENT_NAMESPACE);
|
|
510
511
|
const { data: userData, loading: userLoading, refetch, } = index_module.wn(GET_USER_PARTNER_INFO, {});
|
|
@@ -512,19 +513,36 @@ function usePartnerInfoModal(props) {
|
|
|
512
513
|
const { data: currenciesData, loading: currenciesLoading } = index_module.wn(GET_CURRENCIES, { variables: { locale } });
|
|
513
514
|
const { data: countriesData, loading: countriesLoading } = index_module.wn(GET_COUNTRIES, {});
|
|
514
515
|
const { data: tenantSettingsData } = index_module.wn(GET_BRAND_NAME, {});
|
|
516
|
+
const { data: financeNetworkData } = index_module.wn(data.GET_FINANCE_NETWORK_SETTINGS, {
|
|
517
|
+
variables: { filter: {} },
|
|
518
|
+
});
|
|
515
519
|
const [connectImpactPartner, { loading: connectLoading, errors: connectErrors },] = index_module.$e(CONNECT_PARTNER);
|
|
516
|
-
const [countryCode, setCountryCode] = domContextHooks_module.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) || "");
|
|
520
|
+
const [countryCode, setCountryCode] = domContextHooks_module.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) || "US");
|
|
517
521
|
const [currency, setCurrency] = domContextHooks_module.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) || "");
|
|
522
|
+
const countries = ((_e = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _e === void 0 ? void 0 : _e.data) || [];
|
|
523
|
+
// copied from useTaxAndCash for displaying currencies based on country - could be in helper?
|
|
524
|
+
const currencies = domContextHooks_module.useMemo(() => {
|
|
525
|
+
var _a, _b;
|
|
526
|
+
const allValidCurrencies = (_b = (_a = financeNetworkData === null || financeNetworkData === void 0 ? void 0 : financeNetworkData.impactFinanceNetworkSettings) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.reduce((agg, settings) => {
|
|
527
|
+
var _a, _b;
|
|
528
|
+
const currency = (_b = (_a = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _a === void 0 ? void 0 : _a.data) === null || _b === void 0 ? void 0 : _b.find((c) => c.currencyCode === settings.currency);
|
|
529
|
+
if (!currency)
|
|
530
|
+
return agg;
|
|
531
|
+
if (agg.find((c) => c.currencyCode === settings.currency))
|
|
532
|
+
return agg;
|
|
533
|
+
if (countryCode && settings.countryCode !== countryCode)
|
|
534
|
+
return agg;
|
|
535
|
+
return [...agg, currency];
|
|
536
|
+
}, []);
|
|
537
|
+
return (allValidCurrencies || []).sort((a, b) => a.displayName.localeCompare(b.displayName));
|
|
538
|
+
}, [financeNetworkData, currenciesData, countryCode]);
|
|
518
539
|
console.log(countryCode, currency, "initial country and currency state"); // TEMP
|
|
519
540
|
const [countrySearch, setCountrySearch] = domContextHooks_module.useState("");
|
|
520
541
|
const [currencySearch, setCurrencySearch] = domContextHooks_module.useState("");
|
|
521
|
-
const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((
|
|
522
|
-
const [filteredCurrencies, setFilteredCurrencies] = domContextHooks_module.useState(
|
|
542
|
+
const [filteredCountries, setFilteredCountries] = domContextHooks_module.useState(((_f = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _f === void 0 ? void 0 : _f.data) || []);
|
|
543
|
+
const [filteredCurrencies, setFilteredCurrencies] = domContextHooks_module.useState(currencies || []);
|
|
523
544
|
const [error, setError] = domContextHooks_module.useState("");
|
|
524
545
|
const [success, setSuccess] = domContextHooks_module.useState(false);
|
|
525
|
-
const countries = ((_g = countriesData === null || countriesData === void 0 ? void 0 : countriesData.impactPayoutCountries) === null || _g === void 0 ? void 0 : _g.data) || [];
|
|
526
|
-
const currencies = ((_h = currenciesData === null || currenciesData === void 0 ? void 0 : currenciesData.currencies) === null || _h === void 0 ? void 0 : _h.data) || [];
|
|
527
|
-
console.log(user, "user data from partner info query"); // TEMP
|
|
528
546
|
domContextHooks_module.useEffect(() => {
|
|
529
547
|
var _a;
|
|
530
548
|
if (userData && ((_a = user.impactConnection) === null || _a === void 0 ? void 0 : _a.publisher)) {
|
|
@@ -614,11 +632,11 @@ function usePartnerInfoModal(props) {
|
|
|
614
632
|
setError(props.networkErrorText);
|
|
615
633
|
}
|
|
616
634
|
}
|
|
617
|
-
console.log(success, "success state in partner info modal");
|
|
618
635
|
const showModal = !success &&
|
|
619
636
|
!userLoading &&
|
|
620
637
|
(!(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.connected) || !(impactConnection === null || impactConnection === void 0 ? void 0 : impactConnection.publisher));
|
|
621
638
|
console.log(showModal, "showModal condition in partner info modal"); // TEMP
|
|
639
|
+
console.log(filteredCurrencies, "filtered curricneis");
|
|
622
640
|
return {
|
|
623
641
|
states: {
|
|
624
642
|
open: showModal,
|
|
@@ -629,7 +647,7 @@ function usePartnerInfoModal(props) {
|
|
|
629
647
|
currency,
|
|
630
648
|
error,
|
|
631
649
|
success,
|
|
632
|
-
brandName: ((
|
|
650
|
+
brandName: ((_g = tenantSettingsData === null || tenantSettingsData === void 0 ? void 0 : tenantSettingsData.tenantSettings) === null || _g === void 0 ? void 0 : _g.companyName) || "",
|
|
633
651
|
filteredCountries: filteredCountries || [],
|
|
634
652
|
filteredCurrencies: filteredCurrencies || [],
|
|
635
653
|
},
|
package/dist/cjs/{sqm-partner-info-modal-view-2d6e89a4.js → sqm-partner-info-modal-view-0821eea3.js}
RENAMED
|
@@ -13,29 +13,21 @@ const style = {
|
|
|
13
13
|
fontSize: "var(--sl-font-size-small)",
|
|
14
14
|
overflow: "visible",
|
|
15
15
|
},
|
|
16
|
-
"&::part(footer)": {
|
|
17
|
-
display: "flex",
|
|
18
|
-
flexDirection: "column",
|
|
19
|
-
padding: "0 var(--sl-spacing-large) var(--sl-spacing-large) var(--sl-spacing-large)",
|
|
20
|
-
},
|
|
21
16
|
"&::part(overlay)": {
|
|
22
|
-
background: "
|
|
17
|
+
background: "var(--sl-overlay-background-color)",
|
|
23
18
|
},
|
|
24
19
|
},
|
|
25
20
|
DialogTitle: {
|
|
26
21
|
fontSize: "var(--sl-font-size-x-large)",
|
|
27
22
|
fontWeight: "600",
|
|
28
|
-
padding: "var(--sl-spacing-
|
|
23
|
+
padding: "var(--sl-spacing-large) 0 0 0",
|
|
29
24
|
margin: "0",
|
|
30
25
|
},
|
|
31
26
|
FormFields: {
|
|
32
27
|
display: "flex",
|
|
33
28
|
flexDirection: "column",
|
|
34
29
|
gap: "var(--sl-spacing-medium)",
|
|
35
|
-
marginTop: "var(--sl-spacing-
|
|
36
|
-
"& > *": {
|
|
37
|
-
flex: 1,
|
|
38
|
-
},
|
|
30
|
+
marginTop: "var(--sl-spacing-large)",
|
|
39
31
|
},
|
|
40
32
|
ErrorMessage: {
|
|
41
33
|
color: "var(--sqm-danger-color-text, #d32f2f)",
|
|
@@ -60,7 +52,7 @@ const style = {
|
|
|
60
52
|
},
|
|
61
53
|
SubmitButton: {
|
|
62
54
|
width: "100%",
|
|
63
|
-
marginTop: "var(--sl-spacing-
|
|
55
|
+
marginTop: "var(--sl-spacing-large)",
|
|
64
56
|
},
|
|
65
57
|
};
|
|
66
58
|
function PartnerInfoModalContentView(props) {
|
|
@@ -74,10 +66,12 @@ function PartnerInfoModalContentView(props) {
|
|
|
74
66
|
const buttonLabel = states.isExistingPartner
|
|
75
67
|
? text.confirmButtonLabel
|
|
76
68
|
: text.submitButtonLabel;
|
|
77
|
-
return
|
|
78
|
-
index.h("style", { type: "text/css" },
|
|
79
|
-
|
|
69
|
+
return (index.h("div", null,
|
|
70
|
+
index.h("style", { type: "text/css" },
|
|
71
|
+
" ",
|
|
72
|
+
styleString),
|
|
80
73
|
index.h("div", { class: sheet.classes.FormFields },
|
|
74
|
+
description,
|
|
81
75
|
index.h("sl-select", { key: `country-${states.countryCode}`, exportparts: "label: input-label, base: input-base", label: text.countryLabel, value: states.countryCode, disabled: states.submitting || !!states.isExistingPartner, required: true, hoist: true, "onSl-select": callbacks.onCountryChange },
|
|
82
76
|
index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
83
77
|
var _a;
|
|
@@ -86,31 +80,38 @@ function PartnerInfoModalContentView(props) {
|
|
|
86
80
|
_a.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
|
|
87
81
|
index.h("sl-select", { key: `currency-${states.currency}`, exportparts: "label: input-label, base: input-base", label: text.currencyLabel, value: states.currency, disabled: states.submitting || !!states.isExistingPartner, required: true, hoist: true, "onSl-select": callbacks.onCurrencyChange },
|
|
88
82
|
index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }), (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 :
|
|
89
|
-
_b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
|
|
83
|
+
_b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode },
|
|
84
|
+
c.currencyCode,
|
|
85
|
+
" - ",
|
|
86
|
+
c.displayName))))),
|
|
90
87
|
states.error && index.h("p", { class: sheet.classes.ErrorMessage }, states.error),
|
|
91
|
-
index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, class: sheet.classes.SubmitButton, exportparts: "base: primarybutton-base" }, buttonLabel)
|
|
92
|
-
];
|
|
88
|
+
index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, class: sheet.classes.SubmitButton, exportparts: "base: primarybutton-base" }, buttonLabel)));
|
|
93
89
|
}
|
|
94
90
|
function PartnerInfoModalView(props) {
|
|
95
|
-
const { states, text } = props;
|
|
91
|
+
const { states, text, callbacks } = props;
|
|
96
92
|
const sheet = JSS.createStyleSheet(style);
|
|
93
|
+
const styleString = sheet.toString();
|
|
97
94
|
console.log(states, "partner info modal states"); // TEMP
|
|
98
95
|
if (!states.open)
|
|
99
96
|
return index.h("div", null);
|
|
100
|
-
return (index.h("
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
97
|
+
return (index.h("div", null,
|
|
98
|
+
index.h("style", { type: "text/css" },
|
|
99
|
+
" ",
|
|
100
|
+
styleString),
|
|
101
|
+
index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
|
|
102
|
+
? text.modalHeaderExistingPartner
|
|
103
|
+
: text.modalHeader, "onSl-request-close": (e) => {
|
|
107
104
|
e.preventDefault();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
105
|
+
}, "onSl-hide": (e) => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
}
|
|
110
|
+
} },
|
|
111
|
+
index.h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
|
|
112
|
+
? text.modalHeaderExistingPartner
|
|
113
|
+
: text.modalHeader),
|
|
114
|
+
index.h(PartnerInfoModalContentView, Object.assign({}, props)))));
|
|
114
115
|
}
|
|
115
116
|
|
|
116
117
|
exports.PartnerInfoModalContentView = PartnerInfoModalContentView;
|