@saasquatch/mint-components 1.13.3-9 → 1.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-3ddee92b.js → ShadowViewAddon-14a02da4.js} +138 -104
- package/dist/cjs/{useReferralCodes-82e8797b.js → copy-text-view-a5524c20.js} +93 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +2 -3
- package/dist/cjs/{sqm-big-stat_39.cjs.entry.js → sqm-big-stat_41.cjs.entry.js} +221 -4
- package/dist/cjs/{sqm-invoice-table-view-16ac73d0.js → sqm-invoice-table-view-baded4af.js} +31 -2
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +5 -6
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-google-registration-form.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-registration-form-view-ebf355a6.js → sqm-portal-registration-form-view-637a4bf4.js} +1 -0
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +2 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +1 -1
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +470 -431
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +1 -1
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +6 -15
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +5 -5
- package/dist/collection/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.js +11 -0
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +129 -0
- package/dist/collection/components/sqm-portal-change-marketing/ChangeMarketing.stories.js +54 -0
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.js +47 -0
- package/dist/collection/components/sqm-portal-change-marketing/sqm-portal-change-marketing.js +217 -0
- package/dist/collection/components/sqm-portal-change-marketing/usePortalChangeMarketing.js +115 -0
- package/dist/collection/components/sqm-portal-email-verification/sqm-portal-email-verification.js +3 -3
- package/dist/collection/components/sqm-portal-forgot-password/sqm-portal-forgot-password.js +3 -3
- package/dist/collection/components/sqm-portal-google-registration-form/sqm-portal-google-registration-form.js +2 -2
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +3 -3
- package/dist/collection/components/sqm-portal-registration-form/PortalRegistrationForm.stories.js +4 -0
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form-view.js +1 -0
- package/dist/collection/components/sqm-portal-registration-form/sqm-portal-registration-form.js +3 -2
- package/dist/collection/components/sqm-portal-reset-password/sqm-portal-reset-password.js +3 -3
- package/dist/collection/components/sqm-portal-verify-email/sqm-portal-verify-email.js +3 -3
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +6 -2
- package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +3 -0
- package/dist/esm/{ShadowViewAddon-499b1f86.js → ShadowViewAddon-23a6afab.js} +134 -101
- package/dist/esm/{useReferralCodes-8f75921a.js → copy-text-view-459a2e35.js} +93 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_17.entry.js +1 -2
- package/dist/esm/{sqm-big-stat_39.entry.js → sqm-big-stat_41.entry.js} +220 -5
- package/dist/esm/{sqm-invoice-table-view-2c726568.js → sqm-invoice-table-view-af69cd33.js} +30 -2
- package/dist/esm/sqm-pagination_3.entry.js +1 -2
- package/dist/esm/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm/{sqm-portal-registration-form-view-32c4b488.js → sqm-portal-registration-form-view-3c1f6000.js} +1 -0
- package/dist/esm/sqm-portal-registration-form.entry.js +2 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +470 -431
- package/dist/esm-es5/ShadowViewAddon-23a6afab.js +1 -0
- package/dist/esm-es5/copy-text-view-459a2e35.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_17.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_41.entry.js +1 -0
- package/dist/esm-es5/sqm-invoice-table-view-af69cd33.js +1 -0
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-google-registration-form.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-registration-form-view-32c4b488.js → sqm-portal-registration-form-view-3c1f6000.js} +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-01010af0.entry.js +258 -0
- package/dist/mint-components/{p-079405ff.entry.js → p-0d2d0b6d.entry.js} +1 -1
- package/dist/mint-components/p-33ed6f1c.system.entry.js +1 -0
- package/dist/mint-components/p-37996351.system.js +1 -1
- package/dist/mint-components/p-38b5f028.system.entry.js +1 -0
- package/dist/mint-components/p-717cc8ac.system.js +1 -0
- package/dist/mint-components/p-71bc04d2.system.entry.js +1 -0
- package/dist/mint-components/p-7e7cbccf.system.js +1 -0
- package/dist/mint-components/p-7f2d4212.js +52 -0
- package/dist/mint-components/{p-e6045498.entry.js → p-7f80a9d7.entry.js} +1 -1
- package/dist/mint-components/{p-793d2130.js → p-91ab3da1.js} +1 -1
- package/dist/mint-components/p-9320582e.system.js +1 -0
- package/dist/mint-components/{p-51d3cde7.system.entry.js → p-9386ad84.system.entry.js} +1 -1
- package/dist/mint-components/p-962f3200.js +1 -0
- package/dist/mint-components/{p-54adee71.system.entry.js → p-9bfd9bed.system.entry.js} +1 -1
- package/dist/mint-components/{p-7846937e.entry.js → p-b51e79b3.entry.js} +2 -2
- package/dist/mint-components/p-b93fd99c.system.entry.js +1 -0
- package/dist/mint-components/p-d3d74266.js +394 -0
- package/dist/mint-components/{p-bb0f585c.system.js → p-e5d0375e.system.js} +1 -1
- package/dist/mint-components/{p-012af236.entry.js → p-f29eda2f.entry.js} +4 -4
- package/dist/mint-components/p-f2cc6a6f.entry.js +9 -0
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +1 -1
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field.d.ts +4 -4
- package/dist/types/components/sqm-marketing-emails-checkbox/MarketingEmailsCheckbox.stories.d.ts +8 -0
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +27 -0
- package/dist/types/components/{sqm-qr-code/QRCode.stories.d.ts → sqm-portal-change-marketing/ChangeMarketing.stories.d.ts} +2 -2
- package/dist/types/components/sqm-portal-change-marketing/sqm-portal-change-marketing-view.d.ts +28 -0
- package/dist/types/components/sqm-portal-change-marketing/sqm-portal-change-marketing.d.ts +39 -0
- package/dist/types/components/sqm-portal-change-marketing/usePortalChangeMarketing.d.ts +3 -0
- package/dist/types/components/sqm-portal-email-verification/sqm-portal-email-verification.d.ts +1 -1
- package/dist/types/components/sqm-portal-forgot-password/sqm-portal-forgot-password.d.ts +1 -1
- package/dist/types/components/sqm-portal-login/sqm-portal-login.d.ts +1 -1
- package/dist/types/components/sqm-portal-registration-form/PortalRegistrationForm.stories.d.ts +1 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-registration-form/sqm-portal-registration-form.d.ts +1 -1
- package/dist/types/components/sqm-portal-reset-password/sqm-portal-reset-password.d.ts +1 -1
- package/dist/types/components/sqm-portal-verify-email/sqm-portal-verify-email.d.ts +1 -1
- package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +1 -0
- package/dist/types/components.d.ts +132 -85
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/ErrorView-b2fcf954.js +0 -35
- package/dist/cjs/copy-text-view-c85acaaa.js +0 -96
- package/dist/cjs/sqm-qr-code-view-82b14685.js +0 -89
- package/dist/cjs/sqm-qr-code.cjs.entry.js +0 -199
- package/dist/collection/components/sqm-qr-code/QRCode.stories.js +0 -37
- package/dist/collection/components/sqm-qr-code/sqm-qr-code-view.js +0 -84
- package/dist/collection/components/sqm-qr-code/sqm-qr-code.js +0 -229
- package/dist/collection/components/sqm-qr-code/useQRCode.js +0 -129
- package/dist/esm/ErrorView-48e2b969.js +0 -33
- package/dist/esm/copy-text-view-782137ba.js +0 -94
- package/dist/esm/sqm-qr-code-view-2dff1823.js +0 -87
- package/dist/esm/sqm-qr-code.entry.js +0 -195
- package/dist/esm-es5/ErrorView-48e2b969.js +0 -1
- package/dist/esm-es5/ShadowViewAddon-499b1f86.js +0 -1
- package/dist/esm-es5/copy-text-view-782137ba.js +0 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +0 -1
- package/dist/esm-es5/sqm-invoice-table-view-2c726568.js +0 -1
- package/dist/esm-es5/sqm-qr-code-view-2dff1823.js +0 -1
- package/dist/esm-es5/sqm-qr-code.entry.js +0 -1
- package/dist/esm-es5/useReferralCodes-8f75921a.js +0 -1
- package/dist/mint-components/p-31015791.js +0 -1
- package/dist/mint-components/p-31c73e3a.system.entry.js +0 -1
- package/dist/mint-components/p-3a62a7e2.system.js +0 -1
- package/dist/mint-components/p-3b90e01b.system.js +0 -1
- package/dist/mint-components/p-3edc9c8a.entry.js +0 -9
- package/dist/mint-components/p-3f067fd5.js +0 -1
- package/dist/mint-components/p-3f7b81b8.js +0 -52
- package/dist/mint-components/p-4f6bb357.system.js +0 -1
- package/dist/mint-components/p-5afd7e38.system.entry.js +0 -1
- package/dist/mint-components/p-5cb7f9fc.system.entry.js +0 -1
- package/dist/mint-components/p-7c434c65.js +0 -1
- package/dist/mint-components/p-97038074.system.entry.js +0 -1
- package/dist/mint-components/p-9acb5038.js +0 -1
- package/dist/mint-components/p-a7746488.system.js +0 -1
- package/dist/mint-components/p-d78298a5.entry.js +0 -17
- package/dist/mint-components/p-da4ff3b4.system.js +0 -1
- package/dist/mint-components/p-dbc0e4f8.system.js +0 -1
- package/dist/mint-components/p-e2d5cd22.js +0 -394
- package/dist/mint-components/p-f15c1a53.entry.js +0 -241
- package/dist/mint-components/p-f4ba6e2b.system.entry.js +0 -1
- package/dist/types/components/sqm-qr-code/sqm-qr-code-view.d.ts +0 -17
- package/dist/types/components/sqm-qr-code/sqm-qr-code.d.ts +0 -41
- package/dist/types/components/sqm-qr-code/useQRCode.d.ts +0 -3
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -10,9 +10,8 @@ const jsonpointer = require('./jsonpointer-11327262.js');
|
|
|
10
10
|
const cjs = require('./cjs-1066ec21.js');
|
|
11
11
|
const utils = require('./utils-6847bc06.js');
|
|
12
12
|
const JSS = require('./JSS-8503a151.js');
|
|
13
|
-
require('./
|
|
13
|
+
const copyTextView = require('./copy-text-view-a5524c20.js');
|
|
14
14
|
require('./mixins-f7e0377a.js');
|
|
15
|
-
const copyTextView = require('./copy-text-view-c85acaaa.js');
|
|
16
15
|
const reRender = require('./re-render-b324deab.js');
|
|
17
16
|
const useChildElements = require('./useChildElements-1b35d945.js');
|
|
18
17
|
require('./luxon-2926d85f.js');
|
|
@@ -23,7 +22,7 @@ const sqmPortalLoginView = require('./sqm-portal-login-view-761a4d8e.js');
|
|
|
23
22
|
const usePortalLogin = require('./usePortalLogin-63d896d1.js');
|
|
24
23
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
25
24
|
const utilities = require('./utilities-78f5e169.js');
|
|
26
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
25
|
+
const ShadowViewAddon = require('./ShadowViewAddon-14a02da4.js');
|
|
27
26
|
require('./sqm-portal-container-view-4f15143a.js');
|
|
28
27
|
const usePayoutStatus = require('./usePayoutStatus-4b5894ef.js');
|
|
29
28
|
|
|
@@ -1608,6 +1607,44 @@ const LinkButton = class {
|
|
|
1608
1607
|
}
|
|
1609
1608
|
};
|
|
1610
1609
|
|
|
1610
|
+
const MarketingEmailsCheckbox = class {
|
|
1611
|
+
constructor(hostRef) {
|
|
1612
|
+
index.registerInstance(this, hostRef);
|
|
1613
|
+
this.ignored = true;
|
|
1614
|
+
/**
|
|
1615
|
+
* @uiName Checkbox label
|
|
1616
|
+
* @uiWidget textArea
|
|
1617
|
+
*/
|
|
1618
|
+
this.checkboxLabel = "I would like to receive marketing and promotional emails for this referral program";
|
|
1619
|
+
/**
|
|
1620
|
+
* @undocumented
|
|
1621
|
+
*/
|
|
1622
|
+
this.checkboxName = "marketingEmailOptIn";
|
|
1623
|
+
stencilHooks_module.h$1(this);
|
|
1624
|
+
}
|
|
1625
|
+
disconnectedCallback() { }
|
|
1626
|
+
render() {
|
|
1627
|
+
const content = {
|
|
1628
|
+
...utils.getProps(this),
|
|
1629
|
+
};
|
|
1630
|
+
const { states, callbacks } = index_module.isDemo()
|
|
1631
|
+
? useCheckboxFieldDemo$1(this)
|
|
1632
|
+
: useCheckboxField(this);
|
|
1633
|
+
return (index.h(ShadowViewAddon.CheckboxFieldView, { states: states, content: content, callbacks: callbacks }));
|
|
1634
|
+
}
|
|
1635
|
+
};
|
|
1636
|
+
function useCheckboxFieldDemo$1(props) {
|
|
1637
|
+
return cjs.cjs({
|
|
1638
|
+
states: {
|
|
1639
|
+
registrationFormState: {},
|
|
1640
|
+
checked: false,
|
|
1641
|
+
},
|
|
1642
|
+
callbacks: {
|
|
1643
|
+
setChecked: () => { },
|
|
1644
|
+
},
|
|
1645
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1646
|
+
}
|
|
1647
|
+
|
|
1611
1648
|
function useNameFields(props) {
|
|
1612
1649
|
const registrationFormState = stencilHooks_module.d(useRegistrationFormState.REGISTRATION_FORM_STATE_CONTEXT);
|
|
1613
1650
|
return {
|
|
@@ -2097,6 +2134,184 @@ function useDemoPayoutStatusAlert(props) {
|
|
|
2097
2134
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
2098
2135
|
}
|
|
2099
2136
|
|
|
2137
|
+
const GET_USER$1 = index_module.dist.gql `
|
|
2138
|
+
query {
|
|
2139
|
+
viewer {
|
|
2140
|
+
... on User {
|
|
2141
|
+
id
|
|
2142
|
+
accountId
|
|
2143
|
+
marketingEmailOptIn
|
|
2144
|
+
}
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
`;
|
|
2148
|
+
const UPSERT_USER$1 = index_module.dist.gql `
|
|
2149
|
+
mutation ($userInput: UserInput!) {
|
|
2150
|
+
upsertUser(userInput: $userInput) {
|
|
2151
|
+
id
|
|
2152
|
+
marketingEmailOptIn
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
`;
|
|
2156
|
+
// view doesn't tolerate undefined, even when we're loading
|
|
2157
|
+
const defaultFormState$1 = {
|
|
2158
|
+
marketingEmailOptIn: false,
|
|
2159
|
+
errors: {},
|
|
2160
|
+
error: "",
|
|
2161
|
+
};
|
|
2162
|
+
function usePortalProfile(props) {
|
|
2163
|
+
const userIdent = index_module.J();
|
|
2164
|
+
const [success, setSuccess] = stencilHooks_module.useState(false);
|
|
2165
|
+
const [userData, setUserData] = stencilHooks_module.useState(undefined);
|
|
2166
|
+
const [formState, setFormState] = stencilHooks_module.useState(defaultFormState$1);
|
|
2167
|
+
const userDataResponse = index_module.wn(GET_USER$1, {}, !(userIdent === null || userIdent === void 0 ? void 0 : userIdent.jwt));
|
|
2168
|
+
const [upsertUser, upsertUserResponse] = index_module.$e(UPSERT_USER$1);
|
|
2169
|
+
stencilHooks_module.useEffect(() => {
|
|
2170
|
+
if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading)
|
|
2171
|
+
return;
|
|
2172
|
+
if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.errors) {
|
|
2173
|
+
setFormState((state) => {
|
|
2174
|
+
var _a, _b, _c;
|
|
2175
|
+
return ({
|
|
2176
|
+
...state,
|
|
2177
|
+
error: (_c = (_b = (_a = upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.errors) === null || _a === void 0 ? void 0 : _a.response) === null || _b === void 0 ? void 0 : _b.errors) === null || _c === void 0 ? void 0 : _c[0].message,
|
|
2178
|
+
});
|
|
2179
|
+
});
|
|
2180
|
+
}
|
|
2181
|
+
else {
|
|
2182
|
+
setUserData((state) => {
|
|
2183
|
+
var _a;
|
|
2184
|
+
return ({
|
|
2185
|
+
...state,
|
|
2186
|
+
...(_a = upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.data) === null || _a === void 0 ? void 0 : _a.upsertUser,
|
|
2187
|
+
});
|
|
2188
|
+
});
|
|
2189
|
+
if (upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.data)
|
|
2190
|
+
setSuccess(true);
|
|
2191
|
+
}
|
|
2192
|
+
}, [upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.loading]);
|
|
2193
|
+
stencilHooks_module.useEffect(() => {
|
|
2194
|
+
var _a, _b;
|
|
2195
|
+
setUserData((data) => { var _a; return ({ ...data, ...(_a = userDataResponse === null || userDataResponse === void 0 ? void 0 : userDataResponse.data) === null || _a === void 0 ? void 0 : _a.viewer }); });
|
|
2196
|
+
setFormState({
|
|
2197
|
+
...defaultFormState$1,
|
|
2198
|
+
...(_a = userDataResponse.data) === null || _a === void 0 ? void 0 : _a.viewer,
|
|
2199
|
+
...(_b = upsertUserResponse.data) === null || _b === void 0 ? void 0 : _b.upsertUser,
|
|
2200
|
+
});
|
|
2201
|
+
}, [userDataResponse === null || userDataResponse === void 0 ? void 0 : userDataResponse.data]);
|
|
2202
|
+
stencilHooks_module.useEffect(() => {
|
|
2203
|
+
var _a, _b;
|
|
2204
|
+
if ((_a = upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.errors) === null || _a === void 0 ? void 0 : _a.message) {
|
|
2205
|
+
setFormState({
|
|
2206
|
+
...(_b = userDataResponse.data) === null || _b === void 0 ? void 0 : _b.viewer,
|
|
2207
|
+
error: props.networkRequestMessage,
|
|
2208
|
+
});
|
|
2209
|
+
}
|
|
2210
|
+
}, [upsertUserResponse === null || upsertUserResponse === void 0 ? void 0 : upsertUserResponse.errors]);
|
|
2211
|
+
const onSubmit = (event) => {
|
|
2212
|
+
var _a;
|
|
2213
|
+
setSuccess(false);
|
|
2214
|
+
const formData = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.formData;
|
|
2215
|
+
formData === null || formData === void 0 ? void 0 : formData.forEach((value, key) => {
|
|
2216
|
+
jsonpointer.jsonpointer.set(formData, key, value);
|
|
2217
|
+
});
|
|
2218
|
+
upsertUser({
|
|
2219
|
+
userInput: {
|
|
2220
|
+
id: userIdent === null || userIdent === void 0 ? void 0 : userIdent.id,
|
|
2221
|
+
accountId: userIdent === null || userIdent === void 0 ? void 0 : userIdent.accountId,
|
|
2222
|
+
marketingEmailOptIn: Boolean(formData.marketingEmailOptIn),
|
|
2223
|
+
},
|
|
2224
|
+
});
|
|
2225
|
+
setFormState((s) => ({ ...s, errors: {}, error: "" }));
|
|
2226
|
+
return;
|
|
2227
|
+
};
|
|
2228
|
+
return {
|
|
2229
|
+
states: {
|
|
2230
|
+
success,
|
|
2231
|
+
loading: (userDataResponse === null || userDataResponse === void 0 ? void 0 : userDataResponse.loading) || upsertUserResponse.loading,
|
|
2232
|
+
submitDisabled: false,
|
|
2233
|
+
formState,
|
|
2234
|
+
user: userData,
|
|
2235
|
+
text: {
|
|
2236
|
+
emailPreferencesHeader: props.emailPreferencesHeader,
|
|
2237
|
+
marketingCheckboxLabel: props.marketingCheckboxLabel,
|
|
2238
|
+
submitChangeButtonText: props.submitChangeButtonText,
|
|
2239
|
+
successMessage: props.successMessage,
|
|
2240
|
+
},
|
|
2241
|
+
},
|
|
2242
|
+
callbacks: {
|
|
2243
|
+
onSubmit,
|
|
2244
|
+
setChecked: (value) => setFormState({ ...formState, marketingEmailOptIn: value }),
|
|
2245
|
+
},
|
|
2246
|
+
};
|
|
2247
|
+
}
|
|
2248
|
+
|
|
2249
|
+
const PortalChangeMarketing = class {
|
|
2250
|
+
constructor(hostRef) {
|
|
2251
|
+
index.registerInstance(this, hostRef);
|
|
2252
|
+
this.ignored = true;
|
|
2253
|
+
/**
|
|
2254
|
+
* @uiName Email preferences header
|
|
2255
|
+
*/
|
|
2256
|
+
this.emailPreferencesHeader = "Email preferences";
|
|
2257
|
+
/**
|
|
2258
|
+
* @uiName Marketing checkbox label
|
|
2259
|
+
*/
|
|
2260
|
+
this.marketingCheckboxLabel = "I want to receive marketing emails and promotions for this referral program from impact.com";
|
|
2261
|
+
/**
|
|
2262
|
+
* @uiName Submit changes button text
|
|
2263
|
+
*/
|
|
2264
|
+
this.submitChangeButtonText = "Save";
|
|
2265
|
+
/**
|
|
2266
|
+
* Displayed when the page fails to load due to a network error. The participant can try refreshing the page.
|
|
2267
|
+
*
|
|
2268
|
+
* @uiName Network request error message
|
|
2269
|
+
*/
|
|
2270
|
+
this.networkRequestMessage = "An error occurred while loading this page. Please refresh the page.";
|
|
2271
|
+
/**
|
|
2272
|
+
* @uiName Successful update message
|
|
2273
|
+
*/
|
|
2274
|
+
this.successMessage = "Opt-in preference has been changed.";
|
|
2275
|
+
stencilHooks_module.h$1(this);
|
|
2276
|
+
}
|
|
2277
|
+
disconnectedCallback() { }
|
|
2278
|
+
render() {
|
|
2279
|
+
const props = index_module.isDemo()
|
|
2280
|
+
? usePortalProfileDemo(utils.getProps(this))
|
|
2281
|
+
: usePortalProfile(utils.getProps(this));
|
|
2282
|
+
return index.h(ShadowViewAddon.ChangeMarktingView, Object.assign({}, props));
|
|
2283
|
+
}
|
|
2284
|
+
};
|
|
2285
|
+
function usePortalProfileDemo(props) {
|
|
2286
|
+
return cjs.cjs({
|
|
2287
|
+
states: {
|
|
2288
|
+
success: false,
|
|
2289
|
+
loading: false,
|
|
2290
|
+
submitDisabled: false,
|
|
2291
|
+
user: {
|
|
2292
|
+
id: "01",
|
|
2293
|
+
accountId: "111100000",
|
|
2294
|
+
marketingEmailOptIn: false,
|
|
2295
|
+
},
|
|
2296
|
+
text: {
|
|
2297
|
+
emailPreferencesHeader: props.emailPreferencesHeader,
|
|
2298
|
+
marketingCheckboxLabel: props.marketingCheckboxLabel,
|
|
2299
|
+
submitChangeButtonText: props.submitChangeButtonText,
|
|
2300
|
+
successMessage: props.successMessage,
|
|
2301
|
+
},
|
|
2302
|
+
formState: {
|
|
2303
|
+
marketingEmailOptIn: false,
|
|
2304
|
+
errors: null,
|
|
2305
|
+
error: "",
|
|
2306
|
+
},
|
|
2307
|
+
},
|
|
2308
|
+
callbacks: {
|
|
2309
|
+
onSubmit: (e) => console.log(e),
|
|
2310
|
+
setChecked: () => { },
|
|
2311
|
+
},
|
|
2312
|
+
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
2313
|
+
}
|
|
2314
|
+
|
|
2100
2315
|
function usePortalChangePassword(props) {
|
|
2101
2316
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2102
2317
|
const [request, { loading, errors, data }] = index_module.Ue();
|
|
@@ -2442,8 +2657,8 @@ const PortalLogin = class {
|
|
|
2442
2657
|
*/
|
|
2443
2658
|
this.pageLabel = "Sign in to your account";
|
|
2444
2659
|
/**
|
|
2445
|
-
* @uiName Network error message
|
|
2446
2660
|
* Displayed when the login fails due to a network error. The participant can try refreshing the page.
|
|
2661
|
+
* @uiName Network error message
|
|
2447
2662
|
*/
|
|
2448
2663
|
this.networkErrorMessage = "An error occurred while logging you in. Please refresh the page and try again.";
|
|
2449
2664
|
/**
|
|
@@ -4907,10 +5122,12 @@ exports.sqm_image = Image;
|
|
|
4907
5122
|
exports.sqm_input_field = InputField;
|
|
4908
5123
|
exports.sqm_leaderboard = Leaderboard;
|
|
4909
5124
|
exports.sqm_link_button = LinkButton;
|
|
5125
|
+
exports.sqm_marketing_emails_checkbox = MarketingEmailsCheckbox;
|
|
4910
5126
|
exports.sqm_name_fields = NameFields;
|
|
4911
5127
|
exports.sqm_navigation_menu = NavigationMenu;
|
|
4912
5128
|
exports.sqm_payout_button_scroll = PayoutButtonScroll;
|
|
4913
5129
|
exports.sqm_payout_status_alert = PayoutStatusAlert;
|
|
5130
|
+
exports.sqm_portal_change_marketing = PortalChangeMarketing;
|
|
4914
5131
|
exports.sqm_portal_change_password = PortalChangePassword;
|
|
4915
5132
|
exports.sqm_portal_footer = PortalFooter;
|
|
4916
5133
|
exports.sqm_portal_frame = PortalFrame;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const index = require('./index-a29c60ef.js');
|
|
4
4
|
const global = require('./global-e31dc4f5.js');
|
|
5
5
|
const JSS = require('./JSS-8503a151.js');
|
|
6
|
-
const ErrorView = require('./ErrorView-b2fcf954.js');
|
|
7
6
|
|
|
8
7
|
const INDIRECT_TAX_PROVINCES = [
|
|
9
8
|
{ regionCode: "ALBERTA", taxType: "GST", displayName: "Alberta" },
|
|
@@ -479,6 +478,35 @@ function getCountryObj({ countryCode, locale, }) {
|
|
|
479
478
|
};
|
|
480
479
|
}
|
|
481
480
|
|
|
481
|
+
const styles = {
|
|
482
|
+
Alert: {
|
|
483
|
+
"&::part(base)": {
|
|
484
|
+
backgroundColor: "var(--sl-color-danger-100)",
|
|
485
|
+
border: "1px solid var(--sl-color-danger-200)",
|
|
486
|
+
padding: "0 16px",
|
|
487
|
+
},
|
|
488
|
+
"& sl-icon": {
|
|
489
|
+
margin: 0,
|
|
490
|
+
},
|
|
491
|
+
"& sl-icon::part(base)": {
|
|
492
|
+
color: "var(--sl-color-danger-500)",
|
|
493
|
+
margin: 0,
|
|
494
|
+
},
|
|
495
|
+
},
|
|
496
|
+
};
|
|
497
|
+
const ErrorView = (props) => {
|
|
498
|
+
const sheet = JSS.createStyleSheet(styles);
|
|
499
|
+
const styleString = sheet.toString();
|
|
500
|
+
const { classes } = sheet;
|
|
501
|
+
return (index.h("div", null,
|
|
502
|
+
index.h("style", null, styleString),
|
|
503
|
+
index.h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: classes.Alert },
|
|
504
|
+
index.h("sl-icon", { slot: "icon", name: "exclamation-octagon", class: "Error" }),
|
|
505
|
+
index.h("strong", null, props.loadingErrorAlertHeader),
|
|
506
|
+
index.h("br", null),
|
|
507
|
+
props.loadingErrorAlertDescription)));
|
|
508
|
+
};
|
|
509
|
+
|
|
482
510
|
const TaxForm_stories = {
|
|
483
511
|
title: "Components/Tax Form",
|
|
484
512
|
};
|
|
@@ -752,7 +780,7 @@ const GeneralLoadingView = () => {
|
|
|
752
780
|
return index.h(LoadingView, null);
|
|
753
781
|
};
|
|
754
782
|
const GeneralErrorView = () => {
|
|
755
|
-
return (index.h(ErrorView
|
|
783
|
+
return (index.h(ErrorView, { loadingErrorAlertHeader: "There was a problem loading your form", loadingErrorAlertDescription: "Please refresh the page and try again. If this problem continues, contact our support team." }));
|
|
756
784
|
};
|
|
757
785
|
// STEP ONE
|
|
758
786
|
const StepOne = () => {
|
|
@@ -2022,6 +2050,7 @@ function InvoiceTableView(props, children) {
|
|
|
2022
2050
|
}
|
|
2023
2051
|
|
|
2024
2052
|
exports.ADDRESS_REGIONS = ADDRESS_REGIONS;
|
|
2053
|
+
exports.ErrorView = ErrorView;
|
|
2025
2054
|
exports.GeneralLoadingView = GeneralLoadingView;
|
|
2026
2055
|
exports.INDIRECT_TAX_PROVINCES = INDIRECT_TAX_PROVINCES;
|
|
2027
2056
|
exports.INDIRECT_TAX_SPAIN_REGIONS = INDIRECT_TAX_SPAIN_REGIONS;
|
|
@@ -9,9 +9,8 @@ const index_module = require('./index.module-ee84433d.js');
|
|
|
9
9
|
const cjs = require('./cjs-1066ec21.js');
|
|
10
10
|
const utils = require('./utils-6847bc06.js');
|
|
11
11
|
const JSS = require('./JSS-8503a151.js');
|
|
12
|
-
const
|
|
12
|
+
const copyTextView = require('./copy-text-view-a5524c20.js');
|
|
13
13
|
require('./mixins-f7e0377a.js');
|
|
14
|
-
const copyTextView = require('./copy-text-view-c85acaaa.js');
|
|
15
14
|
|
|
16
15
|
const style = {
|
|
17
16
|
Container: {
|
|
@@ -46,7 +45,7 @@ function PaginationView(props) {
|
|
|
46
45
|
|
|
47
46
|
function usePagination(props) {
|
|
48
47
|
var _a;
|
|
49
|
-
const context = index_module.Fn(
|
|
48
|
+
const context = index_module.Fn(copyTextView.REFERRAL_CODES_PAGINATION_CONTEXT);
|
|
50
49
|
const currentPage = context.states.currentPage + 1;
|
|
51
50
|
const totalPages = (_a = context.states) === null || _a === void 0 ? void 0 : _a.pageCount;
|
|
52
51
|
return {
|
|
@@ -132,10 +131,10 @@ function useReferralCode(props) {
|
|
|
132
131
|
const { programId = index_module.H() } = props;
|
|
133
132
|
const user = index_module.J();
|
|
134
133
|
const engagementMedium = index_module.B();
|
|
135
|
-
const contextData = index_module.Fn(
|
|
134
|
+
const contextData = index_module.Fn(copyTextView.REFERRAL_CODES_NAMESPACE);
|
|
136
135
|
const { data } = index_module.wn(MessageLinkQuery, { programId }, !(user === null || user === void 0 ? void 0 : user.jwt) || (contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) !== undefined);
|
|
137
136
|
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
138
|
-
const [setCopied] = index_module.$e(
|
|
137
|
+
const [setCopied] = index_module.$e(copyTextView.SET_CODE_COPIED);
|
|
139
138
|
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.referralCode) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.referralCode))) !== null && _b !== void 0 ? _b :
|
|
140
139
|
// Shown during loading
|
|
141
140
|
"...";
|
|
@@ -352,7 +351,7 @@ const ReferralCodes = class {
|
|
|
352
351
|
const thisProps = utils.getProps(this);
|
|
353
352
|
const props = index_module.isDemo()
|
|
354
353
|
? useDemoReferralCodes(thisProps)
|
|
355
|
-
:
|
|
354
|
+
: copyTextView.useReferralCodes(thisProps);
|
|
356
355
|
const slots = {
|
|
357
356
|
shareButtons: index.h("slot", { name: "shareButtons" }),
|
|
358
357
|
shareCodes: index.h("slot", { name: "shareCodes" }),
|
|
@@ -163,8 +163,8 @@ const PortalEmailVerification = class {
|
|
|
163
163
|
*/
|
|
164
164
|
this.verificationResentMessage = "Your verification email has been resent successfully";
|
|
165
165
|
/**
|
|
166
|
-
* @uiName Network error message
|
|
167
166
|
* Displayed when your verification email fails to send due to a network error. The participant can try refreshing the page.
|
|
167
|
+
* @uiName Network error message
|
|
168
168
|
*/
|
|
169
169
|
this.networkErrorMessage = "An error occurred while verifying your password. Please refresh the page.";
|
|
170
170
|
stencilHooks_module.h$1(this);
|
|
@@ -90,8 +90,8 @@ const PortalForgotPassword = class {
|
|
|
90
90
|
*/
|
|
91
91
|
this.loginText = "Sign In";
|
|
92
92
|
/**
|
|
93
|
-
* @uiName Network error message
|
|
94
93
|
* Displayed when the forgot password action fails due to a network error. The participant can try refreshing the page.
|
|
94
|
+
* @uiName Network error message
|
|
95
95
|
*/
|
|
96
96
|
this.networkErrorMessage = "An error occurred while loading this page. Please refresh the page.";
|
|
97
97
|
/**
|
|
@@ -12,7 +12,7 @@ require('./mixins-f7e0377a.js');
|
|
|
12
12
|
require('./sqm-text-span-view-0aa82125.js');
|
|
13
13
|
const useRegistrationFormState = require('./useRegistrationFormState-7b820f0c.js');
|
|
14
14
|
const sqmBaseRegistrationFormView = require('./sqm-base-registration-form-view-8a2c8763.js');
|
|
15
|
-
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-
|
|
15
|
+
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-637a4bf4.js');
|
|
16
16
|
require('./AsYouType-6788393a.js');
|
|
17
17
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-f25d89e7.js');
|
|
18
18
|
|
|
@@ -78,6 +78,7 @@ function PortalRegistrationFormView(props) {
|
|
|
78
78
|
helpText: ((_u = (_t = states.registrationFormState) === null || _t === void 0 ? void 0 : _t.validationErrors) === null || _u === void 0 ? void 0 : _u.confirmPassword) || content.requiredFieldErrorMessage,
|
|
79
79
|
}
|
|
80
80
|
: [])))),
|
|
81
|
+
content.emailOptIn,
|
|
81
82
|
content.terms,
|
|
82
83
|
index.h("div", { class: sheet.classes.ButtonsContainer },
|
|
83
84
|
index.h("sl-button", { submit: true, loading: states.loading, disabled: (_v = states.registrationFormState) === null || _v === void 0 ? void 0 : _v.disabled, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
@@ -11,7 +11,7 @@ require('./JSS-8503a151.js');
|
|
|
11
11
|
require('./mixins-f7e0377a.js');
|
|
12
12
|
require('./sqm-text-span-view-0aa82125.js');
|
|
13
13
|
require('./useRegistrationFormState-7b820f0c.js');
|
|
14
|
-
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-
|
|
14
|
+
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-637a4bf4.js');
|
|
15
15
|
require('./AsYouType-6788393a.js');
|
|
16
16
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-f25d89e7.js');
|
|
17
17
|
|
|
@@ -148,6 +148,7 @@ const PortalRegistrationForm = class {
|
|
|
148
148
|
formData: index.h("slot", { name: "formData" }),
|
|
149
149
|
secondaryButton: (index.h("slot", { name: "secondaryButton" }, index.h("sl-button", { type: "text", disabled: states.loading, onClick: () => index_module.jn.push(states.loginPath) }, this.loginLabel))),
|
|
150
150
|
terms: index.h("slot", { name: "terms" }),
|
|
151
|
+
emailOptIn: index.h("slot", { name: "emailOptIn" }),
|
|
151
152
|
emailLabel: this.emailLabel,
|
|
152
153
|
passwordLabel: this.passwordLabel,
|
|
153
154
|
submitLabel: this.submitLabel,
|
|
@@ -185,8 +185,8 @@ const PortalResetPassword = class {
|
|
|
185
185
|
*/
|
|
186
186
|
this.resetSuccessText = "Your password has been reset and you are being redirected. If you are not redirected, please click Continue.";
|
|
187
187
|
/**
|
|
188
|
-
* @uiName Network error message
|
|
189
188
|
* Displayed when the password reset fails due to a network error. The participant can try refreshing the page.
|
|
189
|
+
* @uiName Network error message
|
|
190
190
|
*/
|
|
191
191
|
this.networkErrorMessage = "An error occurred while resetting your password. Please refresh the page and try again.";
|
|
192
192
|
stencilHooks_module.h$1(this);
|
|
@@ -133,8 +133,8 @@ const PortalVerifyEmail = class {
|
|
|
133
133
|
*/
|
|
134
134
|
this.continueText = "Continue";
|
|
135
135
|
/**
|
|
136
|
-
* @uiName Network error message
|
|
137
136
|
* Displayed when the email verification fails due to a network error. The participant can try refreshing the page.
|
|
137
|
+
* @uiName Network error message
|
|
138
138
|
*/
|
|
139
139
|
this.networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
|
|
140
140
|
stencilHooks_module.h$1(this);
|