@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
|
@@ -7,9 +7,8 @@ const index_module = require('./index.module-ee84433d.js');
|
|
|
7
7
|
const cjs = require('./cjs-1066ec21.js');
|
|
8
8
|
const utils = require('./utils-6847bc06.js');
|
|
9
9
|
const JSS = require('./JSS-8503a151.js');
|
|
10
|
-
const
|
|
10
|
+
const copyTextView = require('./copy-text-view-a5524c20.js');
|
|
11
11
|
const mixins = require('./mixins-f7e0377a.js');
|
|
12
|
-
const copyTextView = require('./copy-text-view-c85acaaa.js');
|
|
13
12
|
const useChildElements = require('./useChildElements-1b35d945.js');
|
|
14
13
|
const luxon = require('./luxon-2926d85f.js');
|
|
15
14
|
const sqmTextSpanView = require('./sqm-text-span-view-0aa82125.js');
|
|
@@ -379,10 +378,10 @@ function useShareLink(props) {
|
|
|
379
378
|
const { programId = index_module.H() } = props;
|
|
380
379
|
const user = index_module.J();
|
|
381
380
|
const engagementMedium = index_module.B();
|
|
382
|
-
const contextData = index_module.Fn(
|
|
381
|
+
const contextData = index_module.Fn(copyTextView.REFERRAL_CODES_NAMESPACE);
|
|
383
382
|
const { data } = index_module.wn(MessageLinkQuery, { programId, engagementMedium }, !(user === null || user === void 0 ? void 0 : user.jwt) || !!props.linkOverride || (contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) !== undefined);
|
|
384
383
|
const [sendLoadEvent] = index_module.$e(WIDGET_ENGAGEMENT_EVENT);
|
|
385
|
-
const [setCopied, copiedRes] = index_module.$e(
|
|
384
|
+
const [setCopied, copiedRes] = index_module.$e(copyTextView.SET_CODE_COPIED);
|
|
386
385
|
const copyString = (_b = ((contextData === null || contextData === void 0 ? void 0 : contextData.shareLink) || ((_a = data === null || data === void 0 ? void 0 : data.user) === null || _a === void 0 ? void 0 : _a.shareLink))) !== null && _b !== void 0 ? _b :
|
|
387
386
|
// Shown during loading
|
|
388
387
|
"...";
|
|
@@ -475,11 +474,11 @@ function useShareButton(props) {
|
|
|
475
474
|
programId: programId,
|
|
476
475
|
shareMedium: medium.toUpperCase(),
|
|
477
476
|
};
|
|
478
|
-
const contextData = index_module.Fn(
|
|
477
|
+
const contextData = index_module.Fn(copyTextView.REFERRAL_CODES_NAMESPACE);
|
|
479
478
|
const overrideData = contextData === null || contextData === void 0 ? void 0 : contextData[medium];
|
|
480
479
|
// only queries if a programId is available
|
|
481
480
|
const res = index_module.wn(MessageLinkQuery$1, variables, !(user === null || user === void 0 ? void 0 : user.jwt) || !programId || overrideData !== undefined);
|
|
482
|
-
const [setCopied, copiedRes] = index_module.$e(
|
|
481
|
+
const [setCopied, copiedRes] = index_module.$e(copyTextView.SET_CODE_COPIED);
|
|
483
482
|
const directLink = (overrideData === null || overrideData === void 0 ? void 0 : overrideData.shareLink) || ((_b = (_a = res === null || res === void 0 ? void 0 : res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.shareLink);
|
|
484
483
|
const environment = index_module.getEnvironmentSDK();
|
|
485
484
|
const hide = (medium.toLocaleUpperCase() === "SMS" &&
|
|
@@ -1663,6 +1662,109 @@ function PortalRegisterView(props) {
|
|
|
1663
1662
|
}
|
|
1664
1663
|
|
|
1665
1664
|
const style$4 = {
|
|
1665
|
+
ErrorStyle: {
|
|
1666
|
+
"&::part(control)": {
|
|
1667
|
+
background: "var(--sl-color-danger-10)",
|
|
1668
|
+
borderColor: "var(--sl-color-danger-500)",
|
|
1669
|
+
outline: "var(--sl-color-danger-500)",
|
|
1670
|
+
},
|
|
1671
|
+
"&:host": {
|
|
1672
|
+
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
1673
|
+
},
|
|
1674
|
+
},
|
|
1675
|
+
ErrorMessageStyle: {
|
|
1676
|
+
margin: 0,
|
|
1677
|
+
marginTop: "5px",
|
|
1678
|
+
color: "var(--sl-color-danger-500)",
|
|
1679
|
+
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
1680
|
+
fontFamily: "var(--sl-font-sans)",
|
|
1681
|
+
fontWeight: "var(--sl-font-weight-normal)",
|
|
1682
|
+
},
|
|
1683
|
+
FieldContainer: {
|
|
1684
|
+
"margin-bottom": "var(--sl-spacing-large)",
|
|
1685
|
+
},
|
|
1686
|
+
};
|
|
1687
|
+
const vanillaStyle$2 = `
|
|
1688
|
+
:host {
|
|
1689
|
+
margin: 0 auto;
|
|
1690
|
+
width: 100%;
|
|
1691
|
+
display: block;
|
|
1692
|
+
}
|
|
1693
|
+
sl-checkbox::part(label){
|
|
1694
|
+
font-size: var(--sl-input-label-font-size-small);
|
|
1695
|
+
font-weight: var(--sl-font-weight-normal);
|
|
1696
|
+
line-height: 20px;
|
|
1697
|
+
}
|
|
1698
|
+
sl-checkbox::part(base){
|
|
1699
|
+
align-items: start;
|
|
1700
|
+
}
|
|
1701
|
+
`;
|
|
1702
|
+
JSS.jss.setup(JSS.create());
|
|
1703
|
+
const sheet$4 = JSS.jss.createStyleSheet(style$4);
|
|
1704
|
+
const styleString$4 = sheet$4.toString();
|
|
1705
|
+
function CheckboxFieldView(props) {
|
|
1706
|
+
var _b, _c;
|
|
1707
|
+
const { states, content, callbacks } = props;
|
|
1708
|
+
return (index.h("div", { class: sheet$4.classes.FieldContainer, part: "sqm-base" },
|
|
1709
|
+
index.h("style", { type: "text/css" },
|
|
1710
|
+
vanillaStyle$2,
|
|
1711
|
+
styleString$4),
|
|
1712
|
+
index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
1713
|
+
e.target.value = e.target.checked;
|
|
1714
|
+
callbacks.setChecked(e.target.value);
|
|
1715
|
+
} }, (!content.checkboxOptional ? { required: false } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled), required: false }), global.intl.formatMessage({
|
|
1716
|
+
id: content.checkboxName + "-message",
|
|
1717
|
+
defaultMessage: content.checkboxLabel,
|
|
1718
|
+
}, {
|
|
1719
|
+
labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
1720
|
+
}))));
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
function ChangeMarktingView(props) {
|
|
1724
|
+
const { states, callbacks } = props;
|
|
1725
|
+
const { text, formState } = states;
|
|
1726
|
+
const { error } = formState;
|
|
1727
|
+
const style = {
|
|
1728
|
+
Container: {
|
|
1729
|
+
display: "flex",
|
|
1730
|
+
flexDirection: "column",
|
|
1731
|
+
gap: "var(--sl-spacing-x-small)",
|
|
1732
|
+
padding: "0 var(--sl-spacing-xxx-large) var(--sl-spacing-xxx-large)",
|
|
1733
|
+
},
|
|
1734
|
+
SubmitButton: { marginBottom: "var(--sl-spacing-medium)" },
|
|
1735
|
+
Error: {
|
|
1736
|
+
"&::part(erroralert-base)": {
|
|
1737
|
+
"margin-bottom": "15px",
|
|
1738
|
+
},
|
|
1739
|
+
},
|
|
1740
|
+
Success: {
|
|
1741
|
+
"&::part(successalert-base)": {
|
|
1742
|
+
"margin-bottom": "15px",
|
|
1743
|
+
},
|
|
1744
|
+
},
|
|
1745
|
+
};
|
|
1746
|
+
const sheet = JSS.createStyleSheet(style);
|
|
1747
|
+
const styleString = sheet.toString();
|
|
1748
|
+
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
1749
|
+
index.h("style", { type: "text/css" }, styleString),
|
|
1750
|
+
index.h(sqmTextSpanView.TextSpanView, Object.assign({}, { type: "h2" }), text.emailPreferencesHeader),
|
|
1751
|
+
index.h("sl-form", { "onSl-submit": callbacks.onSubmit },
|
|
1752
|
+
index.h(CheckboxFieldView, { states: {
|
|
1753
|
+
checked: states.formState.marketingEmailOptIn,
|
|
1754
|
+
}, content: {
|
|
1755
|
+
checkboxLabel: text.marketingCheckboxLabel,
|
|
1756
|
+
checkboxName: "marketingEmailOptIn",
|
|
1757
|
+
}, callbacks: {
|
|
1758
|
+
setChecked: callbacks.setChecked,
|
|
1759
|
+
} }),
|
|
1760
|
+
index.h("sl-button", { class: sheet.classes.SubmitButton, type: "primary", submit: true, loading: states.loading, disabled: states.submitDisabled }, text.submitChangeButtonText),
|
|
1761
|
+
error && (index.h("sqm-form-message", { class: sheet.classes.Error, type: "error", exportparts: "erroralert-icon" },
|
|
1762
|
+
index.h("div", { part: "erroralert-text" }, error))),
|
|
1763
|
+
states.success && (index.h("sqm-form-message", { class: sheet.classes.Success, type: "success", exportparts: "successalert-icon" },
|
|
1764
|
+
index.h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
1765
|
+
}
|
|
1766
|
+
|
|
1767
|
+
const style$5 = {
|
|
1666
1768
|
Description: {
|
|
1667
1769
|
"& input[type=checkbox]": {
|
|
1668
1770
|
display: "none",
|
|
@@ -1701,13 +1803,13 @@ const style$4 = {
|
|
|
1701
1803
|
},
|
|
1702
1804
|
},
|
|
1703
1805
|
};
|
|
1704
|
-
const sheet$
|
|
1705
|
-
const styleString$
|
|
1806
|
+
const sheet$5 = JSS.createStyleSheet(style$5);
|
|
1807
|
+
const styleString$5 = sheet$5.toString();
|
|
1706
1808
|
function Details(props) {
|
|
1707
1809
|
const rid = Math.random().toString(36).slice(2);
|
|
1708
1810
|
return (index.h("div", { style: { opacity: props.opacity } },
|
|
1709
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
1710
|
-
index.h("span", { class: sheet$
|
|
1811
|
+
index.h("style", { type: "text/css" }, styleString$5),
|
|
1812
|
+
index.h("span", { class: sheet$5.classes.Description },
|
|
1711
1813
|
index.h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1712
1814
|
index.h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1713
1815
|
index.h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
@@ -1729,7 +1831,7 @@ const GreyGift = () => {
|
|
|
1729
1831
|
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M14 2.70949C14 3.59565 12.6694 4.93746 12 5H9V16H7.00179V5H4.58792C3.21247 4.70182 2 3.64537 2 2.52072C2 1.42474 2.47603 0.556701 3.34184 0.182041C4.16921 -0.175986 5.12452 0.0203328 5.87976 0.544666C6.80676 1.18825 7.32679 2.3963 7.79856 3.49226C7.83996 3.58845 7.88099 3.68378 7.9219 3.77778C7.96173 3.68865 8.00186 3.59793 8.0425 3.50608C8.50995 2.44948 9.04359 1.24325 9.9404 0.59563C10.7332 0.0231438 11.741 -0.193157 12.6121 0.198945C13.5129 0.604397 14 1.53453 14 2.70949ZM10.6123 1.5C11.0928 1.15305 11.668 1.09012 12.1597 1.5C12.5879 1.85694 12.6108 2.02497 12.6658 2.42926L12.6755 2.5C12.6755 3.09851 12.1597 4 11.6439 4C11.2785 4 10.9914 3.99691 10.7224 3.99402C10.2319 3.98875 9.80131 3.98412 9.06496 4C9.20533 3.72786 9.31743 3.46669 9.42434 3.21761C9.71026 2.55143 9.95907 1.97176 10.6123 1.5ZM4.93861 1.5C4.70607 1.33855 4.17281 1.4106 3.95166 1.5063C3.76894 1.58537 3.49602 1.82658 3.49602 2.52072C3.49602 3.19524 4.58792 3.77778 4.58792 3.77778C4.58792 3.77778 5.45441 4 7.00179 4C6.47506 2.69451 5.7289 2.04867 4.93861 1.5Z", fill: "#828282" })));
|
|
1730
1832
|
};
|
|
1731
1833
|
|
|
1732
|
-
const style$
|
|
1834
|
+
const style$6 = {
|
|
1733
1835
|
ProgressBar: {
|
|
1734
1836
|
"& .progress-bar": {
|
|
1735
1837
|
height: "0",
|
|
@@ -1841,14 +1943,14 @@ const style$5 = {
|
|
|
1841
1943
|
},
|
|
1842
1944
|
},
|
|
1843
1945
|
};
|
|
1844
|
-
const sheet$
|
|
1845
|
-
const styleString$
|
|
1946
|
+
const sheet$6 = JSS.createStyleSheet(style$6, { classNamePrefix: "sqm-prog-bar" });
|
|
1947
|
+
const styleString$6 = sheet$6.toString();
|
|
1846
1948
|
function ProgressBarView(props) {
|
|
1847
1949
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
|
|
1848
1950
|
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
1849
1951
|
const { columns, items } = aggregate;
|
|
1850
|
-
return (index.h("div", { class: sheet$
|
|
1851
|
-
index.h("style", { type: "text/css" }, styleString$
|
|
1952
|
+
return (index.h("div", { class: sheet$6.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
|
|
1953
|
+
index.h("style", { type: "text/css" }, styleString$6),
|
|
1852
1954
|
index.h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
1853
1955
|
(Boolean(finite) && progress > 2 * goal)
|
|
1854
1956
|
? "progress-bar repeatable-steps"
|
|
@@ -2139,7 +2241,7 @@ const arrow_left_right = () => {
|
|
|
2139
2241
|
index.h("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M10.265 2.789a.346.346 0 000-.489L8.066.101a.346.346 0 10-.489.489l1.61 1.609H2.073a.691.691 0 00-.69.691v1.728a.346.346 0 00.69 0V2.89h7.114L7.577 4.5a.346.346 0 10.49.488l2.198-2.2zM.101 9.21a.346.346 0 000 .489l2.2 2.199a.346.346 0 00.488-.489l-1.61-1.609h7.114c.382 0 .691-.31.691-.691V7.382a.346.346 0 00-.691 0V9.11H1.18L2.789 7.5a.346.346 0 10-.489-.488l-2.199 2.2z", fill: "currentColor" })));
|
|
2140
2242
|
};
|
|
2141
2243
|
|
|
2142
|
-
const style$
|
|
2244
|
+
const style$7 = {
|
|
2143
2245
|
TaskCard: {
|
|
2144
2246
|
display: "inline-block",
|
|
2145
2247
|
width: "100%",
|
|
@@ -2293,8 +2395,8 @@ const style$6 = {
|
|
|
2293
2395
|
},
|
|
2294
2396
|
},
|
|
2295
2397
|
};
|
|
2296
|
-
const sheet$
|
|
2297
|
-
const styleString$
|
|
2398
|
+
const sheet$7 = JSS.createStyleSheet(style$7);
|
|
2399
|
+
const styleString$7 = sheet$7.toString();
|
|
2298
2400
|
function TaskCardView(props) {
|
|
2299
2401
|
var _a, _b;
|
|
2300
2402
|
const { callbacks, states, content } = props;
|
|
@@ -2330,11 +2432,11 @@ function TaskCardView(props) {
|
|
|
2330
2432
|
}
|
|
2331
2433
|
|
|
2332
2434
|
`;
|
|
2333
|
-
return (index.h("div", { class: sheet$
|
|
2435
|
+
return (index.h("div", { class: sheet$7.classes.TaskCard, part: "sqm-base" },
|
|
2334
2436
|
index.h("style", { type: "text/css" },
|
|
2335
|
-
styleString$
|
|
2437
|
+
styleString$7,
|
|
2336
2438
|
vanillaStyle),
|
|
2337
|
-
!states.loading && taskNotStarted && (index.h("div", { class: sheet$
|
|
2439
|
+
!states.loading && taskNotStarted && (index.h("div", { class: sheet$7.classes.NotStarted },
|
|
2338
2440
|
index.h("span", { class: "icon" },
|
|
2339
2441
|
index.h("sl-icon", { name: "info-circle-fill" })),
|
|
2340
2442
|
global.intl.formatMessage({
|
|
@@ -2345,7 +2447,7 @@ function TaskCardView(props) {
|
|
|
2345
2447
|
.setLocale(utils.luxonLocale(states.locale))
|
|
2346
2448
|
.toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
|
|
2347
2449
|
}))),
|
|
2348
|
-
!states.loading && taskEnded && (index.h("div", { class: sheet$
|
|
2450
|
+
!states.loading && taskEnded && (index.h("div", { class: sheet$7.classes.Ended },
|
|
2349
2451
|
index.h("span", { class: "icon" },
|
|
2350
2452
|
index.h("sl-icon", { exportparts: "base: task-card-icon", name: "exclamation-triangle-fill" })),
|
|
2351
2453
|
global.intl.formatMessage({
|
|
@@ -2365,7 +2467,7 @@ function TaskCardView(props) {
|
|
|
2365
2467
|
? "main complete"
|
|
2366
2468
|
: "main" },
|
|
2367
2469
|
index.h("div", { class: "container", part: "sqm-card-container", "data-subdue": taskComplete || taskUnavailable },
|
|
2368
|
-
index.h("div", { class: sheet$
|
|
2470
|
+
index.h("div", { class: sheet$7.classes.Header, style: { opacity: taskComplete || taskUnavailable ? "0.45" : "1" } }, states.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (index.h("div", null,
|
|
2369
2471
|
showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
2370
2472
|
index.h("span", { part: "sqm-value", class: "value" }, content.rewardAmount),
|
|
2371
2473
|
index.h("span", { part: "sqm-unit", class: "text" }, content.rewardUnit)))),
|
|
@@ -2381,7 +2483,7 @@ function TaskCardView(props) {
|
|
|
2381
2483
|
} }, content.cardTitle)),
|
|
2382
2484
|
states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && (index.h(Details, Object.assign({}, props, { opacity: taskComplete || taskUnavailable ? "0.45" : "1" })))),
|
|
2383
2485
|
content.showProgressBar && states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (index.h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.45" : "1", complete: taskComplete, expired: taskUnavailable })))),
|
|
2384
|
-
index.h("div", { class: sheet$
|
|
2486
|
+
index.h("div", { class: sheet$7.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
|
|
2385
2487
|
index.h("span", { class: "text" },
|
|
2386
2488
|
content.repeatable && (index.h("div", null,
|
|
2387
2489
|
index.h("span", { class: repetitions > 0
|
|
@@ -2452,7 +2554,7 @@ function PoweredByImg({ color = "#A6A6A6", width = 120, height = 16, }) {
|
|
|
2452
2554
|
index.h("path", { d: "M1661.53 157.54H1589.77C1590.42 169.37 1593.54 178.535 1599.13 185.035C1604.85 191.535 1612.65 194.785 1622.53 194.785C1628.51 194.785 1633.97 193.485 1638.91 190.885C1643.98 188.285 1647.95 184.645 1650.81 179.965L1657.24 186.4C1653.34 192.12 1648.4 196.475 1642.42 199.465C1636.57 202.455 1629.94 203.95 1622.53 203.95C1609.01 203.95 1598.35 199.465 1590.55 190.495C1582.88 181.525 1579.05 169.175 1579.05 153.445C1579.05 137.585 1582.82 125.17 1590.36 116.2C1597.9 107.1 1608.23 102.55 1621.36 102.55C1633.84 102.55 1643.66 106.84 1650.81 115.42C1657.96 124 1661.53 135.895 1661.53 151.105V157.54ZM1651.39 147.4C1651.39 136.48 1648.66 127.77 1643.2 121.27C1637.74 114.77 1630.46 111.52 1621.36 111.52C1611.74 111.52 1604.2 114.77 1598.74 121.27C1593.28 127.77 1590.29 137.065 1589.77 149.155H1651.39V147.4Z", fill: color })));
|
|
2453
2555
|
}
|
|
2454
2556
|
|
|
2455
|
-
const vanillaStyle$
|
|
2557
|
+
const vanillaStyle$3 = `
|
|
2456
2558
|
:host{
|
|
2457
2559
|
margin: 0 auto;
|
|
2458
2560
|
width: 100%;
|
|
@@ -2508,7 +2610,7 @@ function PortalFooterView(props) {
|
|
|
2508
2610
|
const styleString = sheet.toString();
|
|
2509
2611
|
return (index.h("div", { class: sheet.classes.Container, part: "sqm-base" },
|
|
2510
2612
|
index.h("style", { type: "text/css" },
|
|
2511
|
-
vanillaStyle$
|
|
2613
|
+
vanillaStyle$3,
|
|
2512
2614
|
styleString),
|
|
2513
2615
|
index.h("div", { class: sheet.classes.RowContainer },
|
|
2514
2616
|
props.faqLink && (index.h("a", { target: "_blank", href: props.faqLink }, props.faqText)),
|
|
@@ -2680,7 +2782,7 @@ function ReferralIframeView(props) {
|
|
|
2680
2782
|
index.h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2681
2783
|
}
|
|
2682
2784
|
|
|
2683
|
-
const style$
|
|
2785
|
+
const style$8 = {
|
|
2684
2786
|
ErrorStyle: mixins.ErrorStyles,
|
|
2685
2787
|
FieldsContainer: {
|
|
2686
2788
|
"& sl-input": {
|
|
@@ -2688,7 +2790,7 @@ const style$7 = {
|
|
|
2688
2790
|
},
|
|
2689
2791
|
},
|
|
2690
2792
|
};
|
|
2691
|
-
const vanillaStyle$
|
|
2793
|
+
const vanillaStyle$4 = `
|
|
2692
2794
|
:host {
|
|
2693
2795
|
margin: 0 auto;
|
|
2694
2796
|
width: 100%;
|
|
@@ -2700,21 +2802,21 @@ sl-input::part(label){
|
|
|
2700
2802
|
font-weight: var(--sl-font-weight-semibold);
|
|
2701
2803
|
}
|
|
2702
2804
|
`;
|
|
2703
|
-
const sheet$
|
|
2704
|
-
const styleString$
|
|
2805
|
+
const sheet$8 = JSS.createStyleSheet(style$8);
|
|
2806
|
+
const styleString$8 = sheet$8.toString();
|
|
2705
2807
|
function NameFieldsView(props) {
|
|
2706
2808
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2707
2809
|
const { states } = props;
|
|
2708
2810
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2709
|
-
return (index.h("div", { class: sheet$
|
|
2811
|
+
return (index.h("div", { class: sheet$8.classes.FieldsContainer },
|
|
2710
2812
|
index.h("style", { type: "text/css" },
|
|
2711
|
-
vanillaStyle$
|
|
2712
|
-
styleString$
|
|
2813
|
+
vanillaStyle$4,
|
|
2814
|
+
styleString$8),
|
|
2713
2815
|
index.h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: "/firstName", type: "text", label: states.content.firstNameLabel, required: true, disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (((_e = (_d = states.registrationFormState) === null || _d === void 0 ? void 0 : _d.initialData) === null || _e === void 0 ? void 0 : _e.firstName) ? {
|
|
2714
2816
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2715
2817
|
}
|
|
2716
2818
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2717
|
-
class: sheet$
|
|
2819
|
+
class: sheet$8.classes.ErrorStyle,
|
|
2718
2820
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2719
2821
|
}
|
|
2720
2822
|
: []))),
|
|
@@ -2722,81 +2824,12 @@ function NameFieldsView(props) {
|
|
|
2722
2824
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2723
2825
|
}
|
|
2724
2826
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2725
|
-
class: sheet$
|
|
2827
|
+
class: sheet$8.classes.ErrorStyle,
|
|
2726
2828
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2727
2829
|
}
|
|
2728
2830
|
: [])))));
|
|
2729
2831
|
}
|
|
2730
2832
|
|
|
2731
|
-
const style$8 = {
|
|
2732
|
-
ErrorStyle: {
|
|
2733
|
-
"&::part(control)": {
|
|
2734
|
-
background: "var(--sl-color-danger-10)",
|
|
2735
|
-
borderColor: "var(--sl-color-danger-500)",
|
|
2736
|
-
outline: "var(--sl-color-danger-500)",
|
|
2737
|
-
},
|
|
2738
|
-
"&:host": {
|
|
2739
|
-
"--focus-ring": "0 0 0 var(--sl-focus-ring-width) red !important",
|
|
2740
|
-
},
|
|
2741
|
-
},
|
|
2742
|
-
ErrorMessageStyle: {
|
|
2743
|
-
margin: 0,
|
|
2744
|
-
marginTop: "5px",
|
|
2745
|
-
color: "var(--sl-color-danger-500)",
|
|
2746
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
2747
|
-
fontFamily: "var(--sl-font-sans)",
|
|
2748
|
-
fontWeight: "var(--sl-font-weight-normal)",
|
|
2749
|
-
},
|
|
2750
|
-
FieldContainer: {
|
|
2751
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
2752
|
-
},
|
|
2753
|
-
};
|
|
2754
|
-
const vanillaStyle$4 = `
|
|
2755
|
-
:host {
|
|
2756
|
-
margin: 0 auto;
|
|
2757
|
-
width: 100%;
|
|
2758
|
-
display: block;
|
|
2759
|
-
}
|
|
2760
|
-
sl-checkbox::part(label){
|
|
2761
|
-
font-size: var(--sl-input-label-font-size-small);
|
|
2762
|
-
font-weight: var(--sl-font-weight-normal);
|
|
2763
|
-
line-height: 20px;
|
|
2764
|
-
}
|
|
2765
|
-
sl-checkbox::part(base){
|
|
2766
|
-
align-items: start;
|
|
2767
|
-
}
|
|
2768
|
-
`;
|
|
2769
|
-
JSS.jss.setup(JSS.create());
|
|
2770
|
-
const sheet$8 = JSS.jss.createStyleSheet(style$8);
|
|
2771
|
-
const styleString$8 = sheet$8.toString();
|
|
2772
|
-
function CheckboxFieldView(props) {
|
|
2773
|
-
var _a, _b, _c;
|
|
2774
|
-
const { states, content, callbacks } = props;
|
|
2775
|
-
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2776
|
-
return (index.h("div", { class: sheet$8.classes.FieldContainer, part: "sqm-base" },
|
|
2777
|
-
index.h("style", { type: "text/css" },
|
|
2778
|
-
vanillaStyle$4,
|
|
2779
|
-
styleString$8),
|
|
2780
|
-
index.h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
2781
|
-
e.target.value = e.target.checked;
|
|
2782
|
-
callbacks.setChecked(e.target.value);
|
|
2783
|
-
} }, (!content.checkboxOptional ? { required: true } : []), { disabled: ((_b = states.registrationFormState) === null || _b === void 0 ? void 0 : _b.loading) || ((_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.disabled) }, (!states.checked && (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName])
|
|
2784
|
-
? {
|
|
2785
|
-
class: sheet$8.classes.ErrorStyle,
|
|
2786
|
-
}
|
|
2787
|
-
: [])),
|
|
2788
|
-
global.intl.formatMessage({
|
|
2789
|
-
id: content.checkboxName + "-message",
|
|
2790
|
-
defaultMessage: content.checkboxLabel,
|
|
2791
|
-
}, {
|
|
2792
|
-
labelLink: (index.h("a", { href: content.checkboxLabelLink, target: "_blank" }, content.checkboxLabelLinkText || content.checkboxLabelLink)),
|
|
2793
|
-
}),
|
|
2794
|
-
!states.checked && (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.checkboxName]) && (index.h("p", { class: sheet$8.classes.ErrorMessageStyle }, global.intl.formatMessage({
|
|
2795
|
-
id: `errorMessage-${content.checkboxName}`,
|
|
2796
|
-
defaultMessage: content.errorMessage,
|
|
2797
|
-
}))))));
|
|
2798
|
-
}
|
|
2799
|
-
|
|
2800
2833
|
const style$9 = {
|
|
2801
2834
|
ErrorStyle: {
|
|
2802
2835
|
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
@@ -4099,6 +4132,7 @@ const ShadowViewAddon = ({ story }, children) => {
|
|
|
4099
4132
|
|
|
4100
4133
|
exports.BigStatView = BigStatView;
|
|
4101
4134
|
exports.CardFeedView = CardFeedView;
|
|
4135
|
+
exports.ChangeMarktingView = ChangeMarktingView;
|
|
4102
4136
|
exports.CheckboxFieldView = CheckboxFieldView;
|
|
4103
4137
|
exports.CouponCodeView = CouponCodeView;
|
|
4104
4138
|
exports.DropdownFieldView = DropdownFieldView;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
const index = require('./index-a29c60ef.js');
|
|
3
4
|
const stencilHooks_module = require('./stencil-hooks.module-3a336b0f.js');
|
|
4
5
|
const index_module = require('./index.module-ee84433d.js');
|
|
6
|
+
const JSS = require('./JSS-8503a151.js');
|
|
7
|
+
const mixins = require('./mixins-f7e0377a.js');
|
|
5
8
|
|
|
6
9
|
const GET_REFERRAL_CODES = index_module.dist.gql `
|
|
7
10
|
query getCodes(
|
|
@@ -132,6 +135,96 @@ function useReferralCodes(props) {
|
|
|
132
135
|
};
|
|
133
136
|
}
|
|
134
137
|
|
|
138
|
+
const style = {
|
|
139
|
+
HostBlock: mixins.HostBlock,
|
|
140
|
+
inputStyle: {
|
|
141
|
+
"&::part(input)": { textOverflow: "ellipsis", width: "100%" },
|
|
142
|
+
"&::part(base)": { cursor: "pointer", overflow: "visible" },
|
|
143
|
+
width: "100%",
|
|
144
|
+
},
|
|
145
|
+
inputErrorStyle: {
|
|
146
|
+
"&::part(base)": {
|
|
147
|
+
border: "2px solid red",
|
|
148
|
+
},
|
|
149
|
+
},
|
|
150
|
+
ContainerDiv: {
|
|
151
|
+
display: "flex",
|
|
152
|
+
alignItems: "flex-start",
|
|
153
|
+
flexDirection: "column",
|
|
154
|
+
justifyContent: "center",
|
|
155
|
+
gap: "var(--sl-spacing-x-small)",
|
|
156
|
+
width: "100%",
|
|
157
|
+
},
|
|
158
|
+
containerStyle: {
|
|
159
|
+
display: "flex",
|
|
160
|
+
alignItems: "center",
|
|
161
|
+
gap: "var(--sl-spacing-x-small)",
|
|
162
|
+
width: "100%",
|
|
163
|
+
},
|
|
164
|
+
errorTextStyle: {
|
|
165
|
+
margin: "0",
|
|
166
|
+
color: "var(--sl-color-danger-500)",
|
|
167
|
+
},
|
|
168
|
+
notificationTextStyle: {
|
|
169
|
+
margin: "0",
|
|
170
|
+
color: "var(--sl-color-neutral-500)",
|
|
171
|
+
},
|
|
172
|
+
};
|
|
173
|
+
const vanillaStyle = `
|
|
174
|
+
:host{
|
|
175
|
+
display: block;
|
|
176
|
+
width: 100%;
|
|
177
|
+
}
|
|
178
|
+
`;
|
|
179
|
+
const textAlignStyle = {
|
|
180
|
+
right: `
|
|
181
|
+
sl-input::part(input){
|
|
182
|
+
text-align: right;
|
|
183
|
+
}`,
|
|
184
|
+
center: `
|
|
185
|
+
sl-input::part(input){
|
|
186
|
+
text-align: center;
|
|
187
|
+
}`,
|
|
188
|
+
left: ``,
|
|
189
|
+
};
|
|
190
|
+
const disabledStyles = `
|
|
191
|
+
sl-input::part(input){
|
|
192
|
+
cursor: default;
|
|
193
|
+
}
|
|
194
|
+
`;
|
|
195
|
+
const sheet = JSS.createStyleSheet(style);
|
|
196
|
+
const styleString = sheet.toString();
|
|
197
|
+
function CopyTextView(props) {
|
|
198
|
+
const { buttonStyle = "icon" } = props;
|
|
199
|
+
const error = !props.loading && props.error;
|
|
200
|
+
const inputText = error ? props.inputPlaceholderText : props.copyString;
|
|
201
|
+
const disabled = error || props.loading || props.disabled;
|
|
202
|
+
const tooltipPlacement = props.buttonStyle === "button-below"
|
|
203
|
+
? "bottom"
|
|
204
|
+
: props.buttonStyle === "button-outside"
|
|
205
|
+
? "top"
|
|
206
|
+
: "top-end";
|
|
207
|
+
const copyButton = (index.h("sl-tooltip", { trigger: "manual", content: props.tooltiptext, placement: tooltipPlacement, disabled: props.disabled, open: props.open, skidding: props.buttonStyle === "icon" ? -5 : 0, slot: "suffix" }, buttonStyle === "icon" ? (index.h("sl-icon-button", { exportparts: "base: icon-button-base", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, name: "files", disabled: disabled })) : (index.h("sl-button", { exportparts: "base: copy-button-base", onClick: () => { var _a; return (_a = props.onClick) === null || _a === void 0 ? void 0 : _a.call(props); }, size: "medium", style: { width: `${buttonStyle === "button-below" && "100%"}` }, disabled: disabled, type: "primary" }, props.copyButtonLabel || "Copy"))));
|
|
208
|
+
return (index.h("div", { class: sheet.classes.ContainerDiv },
|
|
209
|
+
index.h("style", { type: "text/css" },
|
|
210
|
+
styleString,
|
|
211
|
+
vanillaStyle,
|
|
212
|
+
textAlignStyle[props.textAlign],
|
|
213
|
+
disabled && disabledStyles),
|
|
214
|
+
index.h("div", { class: sheet.classes.containerStyle, style: {
|
|
215
|
+
flexDirection: `${buttonStyle === "button-below" ? "column" : "row"}`,
|
|
216
|
+
} },
|
|
217
|
+
index.h("sl-input", { class: `${sheet.classes.inputStyle} ${error ? sheet.classes.inputErrorStyle : ""}`, exportparts: "base: input-base, input: input-label", value: props.loading ? "Loading..." : inputText, readonly: true, disabled: disabled },
|
|
218
|
+
buttonStyle === "icon" && copyButton,
|
|
219
|
+
error && (index.h("p", { slot: "help-text", class: sheet.classes.errorTextStyle }, props.errorText))),
|
|
220
|
+
(buttonStyle === "button-outside" || buttonStyle === "button-below") &&
|
|
221
|
+
copyButton),
|
|
222
|
+
props.isCopied &&
|
|
223
|
+
props.showNotificationText &&
|
|
224
|
+
props.notificationText && (index.h("p", { part: "sqm-notification-text", class: sheet.classes.notificationTextStyle }, props.notificationText))));
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
exports.CopyTextView = CopyTextView;
|
|
135
228
|
exports.REFERRAL_CODES_NAMESPACE = REFERRAL_CODES_NAMESPACE;
|
|
136
229
|
exports.REFERRAL_CODES_PAGINATION_CONTEXT = REFERRAL_CODES_PAGINATION_CONTEXT;
|
|
137
230
|
exports.SET_CODE_COPIED = SET_CODE_COPIED;
|