@saasquatch/mint-components 2.1.9-12 → 2.1.9-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-big-stat_46.cjs.entry.js +26 -16
- package/dist/cjs/sqm-email-verification_2.cjs.entry.js +3 -5
- package/dist/cjs/{sqm-partner-info-modal-view-7bcb2262.js → sqm-partner-info-modal-view-2d6e89a4.js} +21 -18
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +21 -18
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +1 -4
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +1 -0
- package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +11 -11
- package/dist/esm/sqm-big-stat_46.entry.js +22 -12
- package/dist/esm/sqm-email-verification_2.entry.js +3 -5
- package/dist/esm/{sqm-partner-info-modal-view-dd777f00.js → sqm-partner-info-modal-view-f85b5a08.js} +21 -18
- package/dist/esm/sqm-stencilbook.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-f85b5a08.js +1 -0
- 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-1c413a06.system.js +1 -1
- package/dist/mint-components/{p-aabc6b28.entry.js → p-44071410.entry.js} +9 -8
- package/dist/mint-components/{p-e7c3d207.entry.js → p-4a02d507.entry.js} +15 -15
- package/dist/mint-components/p-5a71d63c.js +1 -0
- package/dist/mint-components/{p-50cdc2d0.system.entry.js → p-65e4ba6f.system.entry.js} +1 -1
- package/dist/mint-components/p-67792584.system.js +1 -0
- package/dist/mint-components/p-9c8abce9.system.entry.js +1 -0
- package/dist/mint-components/p-bb86bb46.system.entry.js +1 -0
- package/dist/mint-components/{p-52e702ad.entry.js → p-d111584d.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/cjs/parseStates-d1effc19.js +0 -16
- package/dist/esm/parseStates-ed75e224.js +0 -14
- package/dist/esm-es5/parseStates-ed75e224.js +0 -1
- package/dist/esm-es5/sqm-partner-info-modal-view-dd777f00.js +0 -1
- package/dist/mint-components/p-0581c425.system.entry.js +0 -1
- package/dist/mint-components/p-0a769ba3.system.entry.js +0 -1
- package/dist/mint-components/p-115dfc03.system.js +0 -1
- package/dist/mint-components/p-13f3a647.js +0 -1
- package/dist/mint-components/p-71d00dcf.js +0 -1
- package/dist/mint-components/p-f10e42e8.system.js +0 -1
|
@@ -33,7 +33,6 @@ const data = require('./data-e83f8a41.js');
|
|
|
33
33
|
const keys = require('./keys-cff24974.js');
|
|
34
34
|
require('./eventKeys-7af4df4d.js');
|
|
35
35
|
const usePayoutStatus = require('./usePayoutStatus-cf050a03.js');
|
|
36
|
-
const parseStates = require('./parseStates-d1effc19.js');
|
|
37
36
|
|
|
38
37
|
/**
|
|
39
38
|
*
|
|
@@ -3215,6 +3214,19 @@ function PayoutStatusAlertView(props) {
|
|
|
3215
3214
|
getButton(states.status))));
|
|
3216
3215
|
}
|
|
3217
3216
|
|
|
3217
|
+
function parseStates(states) {
|
|
3218
|
+
if (typeof states === "string") {
|
|
3219
|
+
try {
|
|
3220
|
+
return JSON.parse(states);
|
|
3221
|
+
}
|
|
3222
|
+
catch (e) {
|
|
3223
|
+
return undefined;
|
|
3224
|
+
}
|
|
3225
|
+
}
|
|
3226
|
+
if (typeof states === "object")
|
|
3227
|
+
return states;
|
|
3228
|
+
}
|
|
3229
|
+
|
|
3218
3230
|
const PayoutStatusAlert = class {
|
|
3219
3231
|
constructor(hostRef) {
|
|
3220
3232
|
index.registerInstance(this, hostRef);
|
|
@@ -3393,7 +3405,7 @@ const PayoutStatusAlert = class {
|
|
|
3393
3405
|
}
|
|
3394
3406
|
};
|
|
3395
3407
|
function useDemoPayoutStatusAlert(props) {
|
|
3396
|
-
const states = parseStates
|
|
3408
|
+
const states = parseStates(props.stateController);
|
|
3397
3409
|
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-payout-status-alert"
|
|
3398
3410
|
? { ...prev, ...states[key] }
|
|
3399
3411
|
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
@@ -5772,7 +5784,7 @@ function EmptySlot$1() {
|
|
|
5772
5784
|
return (index.h("slot", { name: "empty" }, index.h("sqm-empty", { emptyStateImage: "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_exchange2.png", emptyStateHeader: "Redeem rewards", emptyStateText: "Use your points to redeem rewards once they become available" })));
|
|
5773
5785
|
}
|
|
5774
5786
|
function useRewardExchangeListDemo(props) {
|
|
5775
|
-
const states = parseStates
|
|
5787
|
+
const states = parseStates(props.stateController);
|
|
5776
5788
|
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-reward-exchange-list"
|
|
5777
5789
|
? { ...prev, ...states[key] }
|
|
5778
5790
|
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
@@ -7754,7 +7766,7 @@ function useDemoTaxAndCash(props) {
|
|
|
7754
7766
|
namespace: data.TAX_CONTEXT_NAMESPACE,
|
|
7755
7767
|
initialValue: "/1",
|
|
7756
7768
|
});
|
|
7757
|
-
const states = parseStates
|
|
7769
|
+
const states = parseStates(props.stateController);
|
|
7758
7770
|
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-tax-and-cash"
|
|
7759
7771
|
? { ...prev, ...states[key] }
|
|
7760
7772
|
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
@@ -8233,11 +8245,6 @@ const WidgetVerification = class {
|
|
|
8233
8245
|
"&::part(panel)": {
|
|
8234
8246
|
maxWidth: "480px",
|
|
8235
8247
|
},
|
|
8236
|
-
"&::part(title)": {
|
|
8237
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
8238
|
-
fontWeight: "600",
|
|
8239
|
-
padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
8240
|
-
},
|
|
8241
8248
|
"&::part(body)": {
|
|
8242
8249
|
padding: "0 var(--sl-spacing-x-large)",
|
|
8243
8250
|
fontSize: "var(--sl-font-size-small)",
|
|
@@ -8251,9 +8258,12 @@ const WidgetVerification = class {
|
|
|
8251
8258
|
"&::part(overlay)": {
|
|
8252
8259
|
background: "rgba(0, 0, 0, 0.5)",
|
|
8253
8260
|
},
|
|
8254
|
-
|
|
8255
|
-
|
|
8256
|
-
|
|
8261
|
+
},
|
|
8262
|
+
DialogTitle: {
|
|
8263
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
8264
|
+
fontWeight: "600",
|
|
8265
|
+
padding: "var(--sl-spacing-x-large) 0 0 0",
|
|
8266
|
+
margin: "0",
|
|
8257
8267
|
},
|
|
8258
8268
|
};
|
|
8259
8269
|
const sheet = JSS.createStyleSheet(style);
|
|
@@ -8263,21 +8273,21 @@ const WidgetVerification = class {
|
|
|
8263
8273
|
const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
|
|
8264
8274
|
const renderStepContent = () => {
|
|
8265
8275
|
if (props.showPartnerModal) {
|
|
8266
|
-
return (index.h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText)));
|
|
8276
|
+
return (index.h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText, { stateController: props["sqm-partner-info-modal_stateController"] || "{}" })));
|
|
8267
8277
|
}
|
|
8268
8278
|
if (props.showCode) {
|
|
8269
8279
|
return (index.h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))));
|
|
8270
8280
|
}
|
|
8271
8281
|
return (index.h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
|
|
8272
8282
|
};
|
|
8273
|
-
return (index.h("div", null, index.h("style", { type: "text/css" }, styleString), index.h("sl-dialog", { class: sheet.classes.Dialog, noHeader:
|
|
8283
|
+
return (index.h("div", null, index.h("style", { type: "text/css" }, styleString), index.h("sl-dialog", { class: sheet.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
|
|
8274
8284
|
e.preventDefault();
|
|
8275
8285
|
}, "onSl-hide": (e) => {
|
|
8276
8286
|
var _a;
|
|
8277
8287
|
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
|
|
8278
8288
|
e.preventDefault();
|
|
8279
8289
|
}
|
|
8280
|
-
} }, renderStepContent())));
|
|
8290
|
+
} }, index.h("h2", { class: sheet.classes.DialogTitle }, dialogLabel), renderStepContent())));
|
|
8281
8291
|
}
|
|
8282
8292
|
};
|
|
8283
8293
|
function useDemoWidgetVerificationInternal(props) {
|
|
@@ -8290,7 +8300,7 @@ function useDemoWidgetVerificationInternal(props) {
|
|
|
8290
8300
|
initialValue: undefined,
|
|
8291
8301
|
});
|
|
8292
8302
|
const setContext = index_module.En(keys.VERIFICATION_PARENT_NAMESPACE);
|
|
8293
|
-
const states = parseStates
|
|
8303
|
+
const states = parseStates(props.stateController);
|
|
8294
8304
|
const formatted = Object.keys(states).reduce((prev, key) => key === "sqm-widget-verification"
|
|
8295
8305
|
? { ...prev, ...states[key] }
|
|
8296
8306
|
: { ...prev, [`${key}_stateController`]: states[key] }, {});
|
|
@@ -10,10 +10,9 @@ 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 sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
13
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-2d6e89a4.js');
|
|
14
14
|
const keys = require('./keys-cff24974.js');
|
|
15
15
|
const eventKeys = require('./eventKeys-7af4df4d.js');
|
|
16
|
-
const parseStates = require('./parseStates-d1effc19.js');
|
|
17
16
|
const useVerificationEmail = require('./useVerificationEmail-994bc32f.js');
|
|
18
17
|
|
|
19
18
|
const UpsertUserEmailMutation = index_module.dist.gql `
|
|
@@ -431,6 +430,7 @@ const GET_USER_PARTNER_INFO = index_module.dist.gql `
|
|
|
431
430
|
impactConnection {
|
|
432
431
|
connected
|
|
433
432
|
publisher {
|
|
433
|
+
id
|
|
434
434
|
phoneNumber
|
|
435
435
|
phoneNumberCountryCode
|
|
436
436
|
countryCode
|
|
@@ -754,8 +754,6 @@ function useDemoPartnerInfoModal(props) {
|
|
|
754
754
|
const [countryCode, setCountryCode] = domContextHooks_module.useState("US");
|
|
755
755
|
const [currency, setCurrency] = domContextHooks_module.useState("");
|
|
756
756
|
const [error, setError] = domContextHooks_module.useState("");
|
|
757
|
-
const parsed = parseStates.parseStates(props.stateController);
|
|
758
|
-
const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
|
|
759
757
|
// @ts-ignore
|
|
760
758
|
return cjs.cjs({
|
|
761
759
|
states: {
|
|
@@ -810,7 +808,7 @@ function useDemoPartnerInfoModal(props) {
|
|
|
810
808
|
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
811
809
|
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
812
810
|
},
|
|
813
|
-
}, props.demoData ||
|
|
811
|
+
}, props.demoData || props.stateController || {}, { arrayMerge: (_, a) => a });
|
|
814
812
|
}
|
|
815
813
|
|
|
816
814
|
exports.sqm_email_verification = WidgetEmailVerification;
|
package/dist/cjs/{sqm-partner-info-modal-view-7bcb2262.js → sqm-partner-info-modal-view-2d6e89a4.js}
RENAMED
|
@@ -8,11 +8,6 @@ const style = {
|
|
|
8
8
|
"&::part(panel)": {
|
|
9
9
|
maxWidth: "480px",
|
|
10
10
|
},
|
|
11
|
-
"&::part(title)": {
|
|
12
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
13
|
-
fontWeight: "600",
|
|
14
|
-
padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
15
|
-
},
|
|
16
11
|
"&::part(body)": {
|
|
17
12
|
padding: "0 var(--sl-spacing-x-large)",
|
|
18
13
|
fontSize: "var(--sl-font-size-small)",
|
|
@@ -21,14 +16,17 @@ const style = {
|
|
|
21
16
|
"&::part(footer)": {
|
|
22
17
|
display: "flex",
|
|
23
18
|
flexDirection: "column",
|
|
24
|
-
|
|
19
|
+
padding: "0 var(--sl-spacing-large) var(--sl-spacing-large) var(--sl-spacing-large)",
|
|
25
20
|
},
|
|
26
21
|
"&::part(overlay)": {
|
|
27
22
|
background: "rgba(0, 0, 0, 0.5)",
|
|
28
23
|
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
},
|
|
25
|
+
DialogTitle: {
|
|
26
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
27
|
+
fontWeight: "600",
|
|
28
|
+
padding: "var(--sl-spacing-x-large) 0 0 0",
|
|
29
|
+
margin: "0",
|
|
32
30
|
},
|
|
33
31
|
FormFields: {
|
|
34
32
|
display: "flex",
|
|
@@ -55,22 +53,24 @@ const style = {
|
|
|
55
53
|
display: "flex",
|
|
56
54
|
flexDirection: "column",
|
|
57
55
|
gap: "var(--sl-spacing-medium)",
|
|
58
|
-
|
|
56
|
+
margin: "0",
|
|
59
57
|
"& > p": {
|
|
60
58
|
margin: "0",
|
|
61
59
|
},
|
|
62
60
|
},
|
|
61
|
+
SubmitButton: {
|
|
62
|
+
width: "100%",
|
|
63
|
+
marginTop: "var(--sl-spacing-small)",
|
|
64
|
+
},
|
|
63
65
|
};
|
|
64
66
|
function PartnerInfoModalContentView(props) {
|
|
65
67
|
var _a, _b;
|
|
66
68
|
const { states, callbacks, text } = props;
|
|
67
69
|
const sheet = JSS.createStyleSheet(style);
|
|
68
70
|
const styleString = sheet.toString();
|
|
69
|
-
const description = states.isExistingPartner ? (index.h("
|
|
71
|
+
const description = states.isExistingPartner ? (index.h("span", { class: sheet.classes.DescriptionContainer },
|
|
70
72
|
index.h("p", null, text.descriptionExistingPartner),
|
|
71
|
-
index.h("p", null, text.supportDescriptionExistingPartner))) : (index.h("p",
|
|
72
|
-
" ",
|
|
73
|
-
text.descriptionNewPartner));
|
|
73
|
+
index.h("p", null, text.supportDescriptionExistingPartner))) : (index.h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
|
|
74
74
|
const buttonLabel = states.isExistingPartner
|
|
75
75
|
? text.confirmButtonLabel
|
|
76
76
|
: text.submitButtonLabel;
|
|
@@ -78,17 +78,17 @@ function PartnerInfoModalContentView(props) {
|
|
|
78
78
|
index.h("style", { type: "text/css" }, styleString),
|
|
79
79
|
description,
|
|
80
80
|
index.h("div", { class: sheet.classes.FormFields },
|
|
81
|
-
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, "onSl-select": callbacks.onCountryChange },
|
|
81
|
+
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
82
|
index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
83
83
|
var _a;
|
|
84
84
|
callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
85
85
|
} }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
|
|
86
86
|
_a.map((c) => (index.h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
|
|
87
|
-
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, "onSl-select": callbacks.onCurrencyChange },
|
|
87
|
+
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
88
|
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
89
|
_b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode }, c.currencyCode))))),
|
|
90
90
|
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,
|
|
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
92
|
];
|
|
93
93
|
}
|
|
94
94
|
function PartnerInfoModalView(props) {
|
|
@@ -97,7 +97,7 @@ function PartnerInfoModalView(props) {
|
|
|
97
97
|
console.log(states, "partner info modal states"); // TEMP
|
|
98
98
|
if (!states.open)
|
|
99
99
|
return index.h("div", null);
|
|
100
|
-
return (index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader:
|
|
100
|
+
return (index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
|
|
101
101
|
? text.modalHeaderExistingPartner
|
|
102
102
|
: text.modalHeader, "onSl-request-close": (e) => {
|
|
103
103
|
e.preventDefault();
|
|
@@ -107,6 +107,9 @@ function PartnerInfoModalView(props) {
|
|
|
107
107
|
e.preventDefault();
|
|
108
108
|
}
|
|
109
109
|
} },
|
|
110
|
+
index.h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
|
|
111
|
+
? text.modalHeaderExistingPartner
|
|
112
|
+
: text.modalHeader),
|
|
110
113
|
index.h(PartnerInfoModalContentView, Object.assign({}, props))));
|
|
111
114
|
}
|
|
112
115
|
|
|
@@ -38,7 +38,7 @@ const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js'
|
|
|
38
38
|
const sqmUserInfoFormView = require('./sqm-user-info-form-view-923ff8d9.js');
|
|
39
39
|
const data = require('./data-e83f8a41.js');
|
|
40
40
|
const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-818d9e9a.js');
|
|
41
|
-
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-
|
|
41
|
+
const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-2d6e89a4.js');
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* lodash (Custom Build) <https://lodash.com/>
|
|
@@ -5,11 +5,6 @@ const style = {
|
|
|
5
5
|
"&::part(panel)": {
|
|
6
6
|
maxWidth: "480px",
|
|
7
7
|
},
|
|
8
|
-
"&::part(title)": {
|
|
9
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
10
|
-
fontWeight: "600",
|
|
11
|
-
padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
12
|
-
},
|
|
13
8
|
"&::part(body)": {
|
|
14
9
|
padding: "0 var(--sl-spacing-x-large)",
|
|
15
10
|
fontSize: "var(--sl-font-size-small)",
|
|
@@ -18,14 +13,17 @@ const style = {
|
|
|
18
13
|
"&::part(footer)": {
|
|
19
14
|
display: "flex",
|
|
20
15
|
flexDirection: "column",
|
|
21
|
-
|
|
16
|
+
padding: "0 var(--sl-spacing-large) var(--sl-spacing-large) var(--sl-spacing-large)",
|
|
22
17
|
},
|
|
23
18
|
"&::part(overlay)": {
|
|
24
19
|
background: "rgba(0, 0, 0, 0.5)",
|
|
25
20
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
21
|
+
},
|
|
22
|
+
DialogTitle: {
|
|
23
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
24
|
+
fontWeight: "600",
|
|
25
|
+
padding: "var(--sl-spacing-x-large) 0 0 0",
|
|
26
|
+
margin: "0",
|
|
29
27
|
},
|
|
30
28
|
FormFields: {
|
|
31
29
|
display: "flex",
|
|
@@ -52,22 +50,24 @@ const style = {
|
|
|
52
50
|
display: "flex",
|
|
53
51
|
flexDirection: "column",
|
|
54
52
|
gap: "var(--sl-spacing-medium)",
|
|
55
|
-
|
|
53
|
+
margin: "0",
|
|
56
54
|
"& > p": {
|
|
57
55
|
margin: "0",
|
|
58
56
|
},
|
|
59
57
|
},
|
|
58
|
+
SubmitButton: {
|
|
59
|
+
width: "100%",
|
|
60
|
+
marginTop: "var(--sl-spacing-small)",
|
|
61
|
+
},
|
|
60
62
|
};
|
|
61
63
|
export function PartnerInfoModalContentView(props) {
|
|
62
64
|
var _a, _b;
|
|
63
65
|
const { states, callbacks, text } = props;
|
|
64
66
|
const sheet = createStyleSheet(style);
|
|
65
67
|
const styleString = sheet.toString();
|
|
66
|
-
const description = states.isExistingPartner ? (h("
|
|
68
|
+
const description = states.isExistingPartner ? (h("span", { class: sheet.classes.DescriptionContainer },
|
|
67
69
|
h("p", null, text.descriptionExistingPartner),
|
|
68
|
-
h("p", null, text.supportDescriptionExistingPartner))) : (h("p",
|
|
69
|
-
" ",
|
|
70
|
-
text.descriptionNewPartner));
|
|
70
|
+
h("p", null, text.supportDescriptionExistingPartner))) : (h("p", { class: sheet.classes.DescriptionContainer }, text.descriptionNewPartner));
|
|
71
71
|
const buttonLabel = states.isExistingPartner
|
|
72
72
|
? text.confirmButtonLabel
|
|
73
73
|
: text.submitButtonLabel;
|
|
@@ -75,17 +75,17 @@ export function PartnerInfoModalContentView(props) {
|
|
|
75
75
|
h("style", { type: "text/css" }, styleString),
|
|
76
76
|
description,
|
|
77
77
|
h("div", { class: sheet.classes.FormFields },
|
|
78
|
-
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, "onSl-select": callbacks.onCountryChange },
|
|
78
|
+
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 },
|
|
79
79
|
h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCountryPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => {
|
|
80
80
|
var _a;
|
|
81
81
|
callbacks.setCountrySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value);
|
|
82
82
|
} }), (_a = states.filteredCountries) === null || _a === void 0 ? void 0 :
|
|
83
83
|
_a.map((c) => (h("sl-menu-item", { value: c.countryCode }, c.displayName)))),
|
|
84
|
-
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, "onSl-select": callbacks.onCurrencyChange },
|
|
84
|
+
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 },
|
|
85
85
|
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 :
|
|
86
86
|
_b.map((c) => (h("sl-menu-item", { value: c.currencyCode }, c.currencyCode))))),
|
|
87
87
|
states.error && h("p", { class: sheet.classes.ErrorMessage }, states.error),
|
|
88
|
-
h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit,
|
|
88
|
+
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),
|
|
89
89
|
];
|
|
90
90
|
}
|
|
91
91
|
export function PartnerInfoModalView(props) {
|
|
@@ -94,7 +94,7 @@ export function PartnerInfoModalView(props) {
|
|
|
94
94
|
console.log(states, "partner info modal states"); // TEMP
|
|
95
95
|
if (!states.open)
|
|
96
96
|
return h("div", null);
|
|
97
|
-
return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader:
|
|
97
|
+
return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: true, label: states.isExistingPartner
|
|
98
98
|
? text.modalHeaderExistingPartner
|
|
99
99
|
: text.modalHeader, "onSl-request-close": (e) => {
|
|
100
100
|
e.preventDefault();
|
|
@@ -104,5 +104,8 @@ export function PartnerInfoModalView(props) {
|
|
|
104
104
|
e.preventDefault();
|
|
105
105
|
}
|
|
106
106
|
} },
|
|
107
|
+
h("h2", { class: sheet.classes.DialogTitle }, states.isExistingPartner
|
|
108
|
+
? text.modalHeaderExistingPartner
|
|
109
|
+
: text.modalHeader),
|
|
107
110
|
h(PartnerInfoModalContentView, Object.assign({}, props))));
|
|
108
111
|
}
|
|
@@ -2,7 +2,6 @@ import { isDemo } from "@saasquatch/component-boilerplate";
|
|
|
2
2
|
import { useState, withHooks } from "@saasquatch/stencil-hooks";
|
|
3
3
|
import { Component, Prop, h } from "@stencil/core";
|
|
4
4
|
import deepmerge from "deepmerge";
|
|
5
|
-
import { parseStates } from "../../utils/parseStates";
|
|
6
5
|
import { getProps } from "../../utils/utils";
|
|
7
6
|
import { PartnerInfoModalContentView, PartnerInfoModalView, } from "./sqm-partner-info-modal-view";
|
|
8
7
|
import { usePartnerInfoModal, } from "./usePartnerInfoModal";
|
|
@@ -521,8 +520,6 @@ function useDemoPartnerInfoModal(props) {
|
|
|
521
520
|
const [countryCode, setCountryCode] = useState("US");
|
|
522
521
|
const [currency, setCurrency] = useState("");
|
|
523
522
|
const [error, setError] = useState("");
|
|
524
|
-
const parsed = parseStates(props.stateController);
|
|
525
|
-
const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
|
|
526
523
|
// @ts-ignore
|
|
527
524
|
return deepmerge({
|
|
528
525
|
states: {
|
|
@@ -577,5 +574,5 @@ function useDemoPartnerInfoModal(props) {
|
|
|
577
574
|
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
578
575
|
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
579
576
|
},
|
|
580
|
-
}, props.demoData ||
|
|
577
|
+
}, props.demoData || props.stateController || {}, { arrayMerge: (_, a) => a });
|
|
581
578
|
}
|
|
@@ -215,11 +215,6 @@ export class WidgetVerification {
|
|
|
215
215
|
"&::part(panel)": {
|
|
216
216
|
maxWidth: "480px",
|
|
217
217
|
},
|
|
218
|
-
"&::part(title)": {
|
|
219
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
220
|
-
fontWeight: "600",
|
|
221
|
-
padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
222
|
-
},
|
|
223
218
|
"&::part(body)": {
|
|
224
219
|
padding: "0 var(--sl-spacing-x-large)",
|
|
225
220
|
fontSize: "var(--sl-font-size-small)",
|
|
@@ -233,9 +228,12 @@ export class WidgetVerification {
|
|
|
233
228
|
"&::part(overlay)": {
|
|
234
229
|
background: "rgba(0, 0, 0, 0.5)",
|
|
235
230
|
},
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
231
|
+
},
|
|
232
|
+
DialogTitle: {
|
|
233
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
234
|
+
fontWeight: "600",
|
|
235
|
+
padding: "var(--sl-spacing-x-large) 0 0 0",
|
|
236
|
+
margin: "0",
|
|
239
237
|
},
|
|
240
238
|
};
|
|
241
239
|
const sheet = createStyleSheet(style);
|
|
@@ -245,7 +243,7 @@ export class WidgetVerification {
|
|
|
245
243
|
const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
|
|
246
244
|
const renderStepContent = () => {
|
|
247
245
|
if (props.showPartnerModal) {
|
|
248
|
-
return (h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText)));
|
|
246
|
+
return (h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText, { stateController: props["sqm-partner-info-modal_stateController"] || "{}" })));
|
|
249
247
|
}
|
|
250
248
|
if (props.showCode) {
|
|
251
249
|
return (h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))));
|
|
@@ -254,14 +252,16 @@ export class WidgetVerification {
|
|
|
254
252
|
};
|
|
255
253
|
return (h("div", null,
|
|
256
254
|
h("style", { type: "text/css" }, styleString),
|
|
257
|
-
h("sl-dialog", { class: sheet.classes.Dialog, noHeader:
|
|
255
|
+
h("sl-dialog", { class: sheet.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
|
|
258
256
|
e.preventDefault();
|
|
259
257
|
}, "onSl-hide": (e) => {
|
|
260
258
|
var _a;
|
|
261
259
|
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
|
|
262
260
|
e.preventDefault();
|
|
263
261
|
}
|
|
264
|
-
} },
|
|
262
|
+
} },
|
|
263
|
+
h("h2", { class: sheet.classes.DialogTitle }, dialogLabel),
|
|
264
|
+
renderStepContent())));
|
|
265
265
|
}
|
|
266
266
|
static get is() { return "sqm-widget-verification"; }
|
|
267
267
|
static get encapsulation() { return "shadow"; }
|
|
@@ -29,7 +29,6 @@ import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_
|
|
|
29
29
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
|
|
30
30
|
import './eventKeys-f76b6a03.js';
|
|
31
31
|
import { u as usePayoutStatus } from './usePayoutStatus-fa504d49.js';
|
|
32
|
-
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
33
32
|
|
|
34
33
|
/**
|
|
35
34
|
*
|
|
@@ -3211,6 +3210,19 @@ function PayoutStatusAlertView(props) {
|
|
|
3211
3210
|
getButton(states.status))));
|
|
3212
3211
|
}
|
|
3213
3212
|
|
|
3213
|
+
function parseStates(states) {
|
|
3214
|
+
if (typeof states === "string") {
|
|
3215
|
+
try {
|
|
3216
|
+
return JSON.parse(states);
|
|
3217
|
+
}
|
|
3218
|
+
catch (e) {
|
|
3219
|
+
return undefined;
|
|
3220
|
+
}
|
|
3221
|
+
}
|
|
3222
|
+
if (typeof states === "object")
|
|
3223
|
+
return states;
|
|
3224
|
+
}
|
|
3225
|
+
|
|
3214
3226
|
const PayoutStatusAlert = class {
|
|
3215
3227
|
constructor(hostRef) {
|
|
3216
3228
|
registerInstance(this, hostRef);
|
|
@@ -8229,11 +8241,6 @@ const WidgetVerification = class {
|
|
|
8229
8241
|
"&::part(panel)": {
|
|
8230
8242
|
maxWidth: "480px",
|
|
8231
8243
|
},
|
|
8232
|
-
"&::part(title)": {
|
|
8233
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
8234
|
-
fontWeight: "600",
|
|
8235
|
-
padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
|
|
8236
|
-
},
|
|
8237
8244
|
"&::part(body)": {
|
|
8238
8245
|
padding: "0 var(--sl-spacing-x-large)",
|
|
8239
8246
|
fontSize: "var(--sl-font-size-small)",
|
|
@@ -8247,9 +8254,12 @@ const WidgetVerification = class {
|
|
|
8247
8254
|
"&::part(overlay)": {
|
|
8248
8255
|
background: "rgba(0, 0, 0, 0.5)",
|
|
8249
8256
|
},
|
|
8250
|
-
|
|
8251
|
-
|
|
8252
|
-
|
|
8257
|
+
},
|
|
8258
|
+
DialogTitle: {
|
|
8259
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
8260
|
+
fontWeight: "600",
|
|
8261
|
+
padding: "var(--sl-spacing-x-large) 0 0 0",
|
|
8262
|
+
margin: "0",
|
|
8253
8263
|
},
|
|
8254
8264
|
};
|
|
8255
8265
|
const sheet = createStyleSheet(style);
|
|
@@ -8259,21 +8269,21 @@ const WidgetVerification = class {
|
|
|
8259
8269
|
const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
|
|
8260
8270
|
const renderStepContent = () => {
|
|
8261
8271
|
if (props.showPartnerModal) {
|
|
8262
|
-
return (h$1("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText)));
|
|
8272
|
+
return (h$1("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText, { stateController: props["sqm-partner-info-modal_stateController"] || "{}" })));
|
|
8263
8273
|
}
|
|
8264
8274
|
if (props.showCode) {
|
|
8265
8275
|
return (h$1("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))));
|
|
8266
8276
|
}
|
|
8267
8277
|
return (h$1("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
|
|
8268
8278
|
};
|
|
8269
|
-
return (h$1("div", null, h$1("style", { type: "text/css" }, styleString), h$1("sl-dialog", { class: sheet.classes.Dialog, noHeader:
|
|
8279
|
+
return (h$1("div", null, h$1("style", { type: "text/css" }, styleString), h$1("sl-dialog", { class: sheet.classes.Dialog, noHeader: true, open: true, label: dialogLabel, "onSl-request-close": (e) => {
|
|
8270
8280
|
e.preventDefault();
|
|
8271
8281
|
}, "onSl-hide": (e) => {
|
|
8272
8282
|
var _a;
|
|
8273
8283
|
if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
|
|
8274
8284
|
e.preventDefault();
|
|
8275
8285
|
}
|
|
8276
|
-
} }, renderStepContent())));
|
|
8286
|
+
} }, h$1("h2", { class: sheet.classes.DialogTitle }, dialogLabel), renderStepContent())));
|
|
8277
8287
|
}
|
|
8278
8288
|
};
|
|
8279
8289
|
function useDemoWidgetVerificationInternal(props) {
|
|
@@ -6,10 +6,9 @@ import { c as cjs } from './cjs-bdfb4486.js';
|
|
|
6
6
|
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-738acfb3.js';
|
|
9
|
-
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-
|
|
9
|
+
import { a as PartnerInfoModalContentView, P as PartnerInfoModalView } from './sqm-partner-info-modal-view-f85b5a08.js';
|
|
10
10
|
import { S as SHOW_CODE_NAMESPACE, a as VERIFICATION_EMAIL_NAMESPACE, V as VERIFICATION_PARENT_NAMESPACE } from './keys-db1897ae.js';
|
|
11
11
|
import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
|
|
12
|
-
import { p as parseStates } from './parseStates-ed75e224.js';
|
|
13
12
|
import { u as useVerificationEmail } from './useVerificationEmail-cb3d51e3.js';
|
|
14
13
|
|
|
15
14
|
const UpsertUserEmailMutation = dist.gql `
|
|
@@ -427,6 +426,7 @@ const GET_USER_PARTNER_INFO = dist.gql `
|
|
|
427
426
|
impactConnection {
|
|
428
427
|
connected
|
|
429
428
|
publisher {
|
|
429
|
+
id
|
|
430
430
|
phoneNumber
|
|
431
431
|
phoneNumberCountryCode
|
|
432
432
|
countryCode
|
|
@@ -750,8 +750,6 @@ function useDemoPartnerInfoModal(props) {
|
|
|
750
750
|
const [countryCode, setCountryCode] = useState("US");
|
|
751
751
|
const [currency, setCurrency] = useState("");
|
|
752
752
|
const [error, setError] = useState("");
|
|
753
|
-
const parsed = parseStates(props.stateController);
|
|
754
|
-
const stateOverride = (parsed === null || parsed === void 0 ? void 0 : parsed["sqm-partner-info-modal"]) || parsed || {};
|
|
755
753
|
// @ts-ignore
|
|
756
754
|
return cjs({
|
|
757
755
|
states: {
|
|
@@ -806,7 +804,7 @@ function useDemoPartnerInfoModal(props) {
|
|
|
806
804
|
supportDescriptionExistingPartner: props.supportDescriptionExistingPartner,
|
|
807
805
|
modalHeaderExistingPartner: props.modalHeaderExistingPartner,
|
|
808
806
|
},
|
|
809
|
-
}, props.demoData ||
|
|
807
|
+
}, props.demoData || props.stateController || {}, { arrayMerge: (_, a) => a });
|
|
810
808
|
}
|
|
811
809
|
|
|
812
810
|
export { WidgetEmailVerification as sqm_email_verification, PartnerInfoModal as sqm_partner_info_modal };
|