@saasquatch/mint-components 1.15.0-19 → 1.15.0-20
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-d958d324.js → ShadowViewAddon-f641a7de.js} +109 -109
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +11 -3
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame-view.js +36 -36
- package/dist/collection/components/sqm-portal-frame/sqm-portal-frame.js +36 -2
- package/dist/collection/components/sqm-portal-frame/usePortalFrame.js +2 -1
- package/dist/esm/{ShadowViewAddon-28c8307e.js → ShadowViewAddon-908b4435.js} +109 -109
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_41.entry.js +11 -3
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/ShadowViewAddon-908b4435.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-big-stat_41.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-2271dff7.system.js +1 -0
- package/dist/mint-components/p-5e617dd6.system.js +1 -1
- package/dist/mint-components/{p-1a6725c1.system.entry.js → p-87c18a1c.system.entry.js} +1 -1
- package/dist/mint-components/{p-fb85fbb0.system.entry.js → p-9980c750.system.entry.js} +1 -1
- package/dist/mint-components/{p-a041f0dc.entry.js → p-a558f6db.entry.js} +2 -2
- package/dist/mint-components/{p-62a04a06.js → p-d2beb502.js} +24 -24
- package/dist/mint-components/{p-be3ffc17.entry.js → p-fbdbcb13.entry.js} +1 -1
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-frame/sqm-portal-frame.d.ts +6 -0
- package/dist/types/components/sqm-portal-frame/usePortalFrame.d.ts +2 -1
- package/dist/types/components.d.ts +12 -0
- 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/esm-es5/ShadowViewAddon-28c8307e.js +0 -1
- package/dist/mint-components/p-437c4eac.system.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useTick } from "@saasquatch/component-boilerplate";
|
|
2
|
-
export function usePortalFrame(footerContent, headerContent) {
|
|
2
|
+
export function usePortalFrame(footerContent, headerContent, props) {
|
|
3
3
|
const [, rerender] = useTick();
|
|
4
4
|
return {
|
|
5
5
|
data: {
|
|
@@ -9,5 +9,6 @@ export function usePortalFrame(footerContent, headerContent) {
|
|
|
9
9
|
callbacks: {
|
|
10
10
|
rerender,
|
|
11
11
|
},
|
|
12
|
+
backgroundColor: props.backgroundColor,
|
|
12
13
|
};
|
|
13
14
|
}
|
|
@@ -266,51 +266,51 @@ function BigStatView(props) {
|
|
|
266
266
|
h("div", { part: "stat-description", class: sheet.classes.Description }, props.labelSlot)));
|
|
267
267
|
}
|
|
268
268
|
|
|
269
|
-
const style$1 = {
|
|
270
|
-
HostBlock: HostBlock,
|
|
271
|
-
Frame: {
|
|
272
|
-
display: "flex",
|
|
273
|
-
"flex-direction": "column",
|
|
274
|
-
"box-sizing": "border-box",
|
|
275
|
-
},
|
|
276
|
-
FooterWrapper: {
|
|
277
|
-
width: "100%",
|
|
278
|
-
"max-width": "100%",
|
|
279
|
-
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
280
|
-
background: "var(--sqm-footer-background)",
|
|
281
|
-
display: "flex",
|
|
282
|
-
"justify-content": "flex-end",
|
|
283
|
-
"align-items": "center",
|
|
284
|
-
"box-sizing": "border-box",
|
|
285
|
-
"margin-top": "auto",
|
|
286
|
-
},
|
|
287
|
-
HeaderWrapper: {
|
|
288
|
-
width: "100%",
|
|
289
|
-
"max-width": "100%",
|
|
290
|
-
"box-sizing": "border-box",
|
|
291
|
-
display: "flex",
|
|
292
|
-
"justify-content": "space-between",
|
|
293
|
-
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
294
|
-
"align-items": "center",
|
|
295
|
-
"background-color": "var(--sqm-header-background)",
|
|
296
|
-
"@media screen and (max-width: 499px)": {
|
|
297
|
-
"flex-direction": "row-reverse",
|
|
298
|
-
"justify-content": "flex-end",
|
|
299
|
-
padding: "0",
|
|
300
|
-
},
|
|
301
|
-
},
|
|
302
|
-
};
|
|
303
|
-
const sheet$1 = createStyleSheet(style$1);
|
|
304
|
-
const styleString$1 = sheet$1.toString();
|
|
305
269
|
function PortalFrameView(props, children) {
|
|
306
270
|
const { data, notFullScreen } = props;
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
271
|
+
const style = {
|
|
272
|
+
HostBlock: HostBlock,
|
|
273
|
+
Frame: {
|
|
274
|
+
display: "flex",
|
|
275
|
+
"flex-direction": "column",
|
|
276
|
+
"box-sizing": "border-box",
|
|
277
|
+
},
|
|
278
|
+
FooterWrapper: {
|
|
279
|
+
width: "100%",
|
|
280
|
+
"max-width": "100%",
|
|
281
|
+
padding: "var(--sl-spacing-medium) var(--sl-spacing-x-large)",
|
|
282
|
+
background: props.backgroundColor,
|
|
283
|
+
display: "flex",
|
|
284
|
+
"justify-content": "flex-end",
|
|
285
|
+
"align-items": "center",
|
|
286
|
+
"box-sizing": "border-box",
|
|
287
|
+
"margin-top": "auto",
|
|
288
|
+
},
|
|
289
|
+
HeaderWrapper: {
|
|
290
|
+
width: "100%",
|
|
291
|
+
"max-width": "100%",
|
|
292
|
+
"box-sizing": "border-box",
|
|
293
|
+
display: "flex",
|
|
294
|
+
"justify-content": "space-between",
|
|
295
|
+
padding: "var(--sl-spacing-small) var(--sl-spacing-large)",
|
|
296
|
+
"align-items": "center",
|
|
297
|
+
background: props.backgroundColor,
|
|
298
|
+
"@media screen and (max-width: 499px)": {
|
|
299
|
+
"flex-direction": "row-reverse",
|
|
300
|
+
"justify-content": "flex-end",
|
|
301
|
+
padding: "0",
|
|
302
|
+
},
|
|
303
|
+
},
|
|
304
|
+
};
|
|
305
|
+
const sheet = createStyleSheet(style);
|
|
306
|
+
const styleString = sheet.toString();
|
|
307
|
+
return (h("div", { style: { minHeight: notFullScreen ? "100%" : "100vh" }, class: sheet.classes.Frame, part: "sqm-base" },
|
|
308
|
+
h("style", { type: "text/css" }, styleString),
|
|
309
|
+
h("div", { class: sheet.classes.HeaderWrapper, part: "sqm-header" },
|
|
310
310
|
data.header,
|
|
311
311
|
h("slot", { name: "sqm-navigation-menu" })),
|
|
312
312
|
children,
|
|
313
|
-
h("div", { class: sheet
|
|
313
|
+
h("div", { class: sheet.classes.FooterWrapper, part: "sqm-footer" }, data.footer)));
|
|
314
314
|
}
|
|
315
315
|
|
|
316
316
|
const EditProfileView = (props) => {
|
|
@@ -1631,7 +1631,7 @@ function PortalChangePasswordView(props) {
|
|
|
1631
1631
|
h("style", { type: "text/css" }, styleString))));
|
|
1632
1632
|
}
|
|
1633
1633
|
|
|
1634
|
-
const style$
|
|
1634
|
+
const style$1 = {
|
|
1635
1635
|
Wrapper: { ...AuthWrapper, "max-width": "600px" },
|
|
1636
1636
|
Column: AuthColumn,
|
|
1637
1637
|
HostBlock: HostBlock,
|
|
@@ -1657,20 +1657,20 @@ sqm-portal-register {
|
|
|
1657
1657
|
display: none;
|
|
1658
1658
|
}
|
|
1659
1659
|
`;
|
|
1660
|
-
const sheet$
|
|
1661
|
-
const styleString$
|
|
1660
|
+
const sheet$1 = createStyleSheet(style$1);
|
|
1661
|
+
const styleString$1 = sheet$1.toString();
|
|
1662
1662
|
function PortalRegisterView(props) {
|
|
1663
1663
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
1664
1664
|
const { states, refs, callbacks, content } = props;
|
|
1665
1665
|
if (states.error) {
|
|
1666
1666
|
window.scrollTo({ top: 0, left: 0, behavior: "smooth" });
|
|
1667
1667
|
}
|
|
1668
|
-
return (h("div", { class: sheet$
|
|
1668
|
+
return (h("div", { class: sheet$1.classes.Wrapper, part: "sqm-base" },
|
|
1669
1669
|
h("style", { type: "text/css" },
|
|
1670
1670
|
vanillaStyle,
|
|
1671
|
-
styleString$
|
|
1671
|
+
styleString$1),
|
|
1672
1672
|
h(TextSpanView, { type: "h3" }, content.pageLabel),
|
|
1673
|
-
h("sl-form", { class: sheet$
|
|
1673
|
+
h("sl-form", { class: sheet$1.classes.Column, "onSl-submit": callbacks.submit, ref: (el) => (refs.formRef.current = el), novalidate: true },
|
|
1674
1674
|
states.error && (h("sqm-form-message", { type: "error", exportparts: "erroralert-icon" },
|
|
1675
1675
|
h("div", { part: "erroralert-text" }, props.states.error))),
|
|
1676
1676
|
content.formData,
|
|
@@ -1683,7 +1683,7 @@ function PortalRegisterView(props) {
|
|
|
1683
1683
|
return content.invalidEmailErrorMessage;
|
|
1684
1684
|
}
|
|
1685
1685
|
} }, (((_b = (_a = states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors) === null || _b === void 0 ? void 0 : _b.email) ? {
|
|
1686
|
-
class: sheet$
|
|
1686
|
+
class: sheet$1.classes.ErrorStyle,
|
|
1687
1687
|
helpText: ((_d = (_c = states.registrationFormState) === null || _c === void 0 ? void 0 : _c.validationErrors) === null || _d === void 0 ? void 0 : _d.email) ||
|
|
1688
1688
|
content.requiredFieldErrorMessage,
|
|
1689
1689
|
}
|
|
@@ -1694,17 +1694,17 @@ function PortalRegisterView(props) {
|
|
|
1694
1694
|
value: (_j = (_h = states.registrationFormState) === null || _h === void 0 ? void 0 : _h.initialData) === null || _j === void 0 ? void 0 : _j.confirmPassword,
|
|
1695
1695
|
}
|
|
1696
1696
|
: {}), (((_l = (_k = states.registrationFormState) === null || _k === void 0 ? void 0 : _k.validationErrors) === null || _l === void 0 ? void 0 : _l.confirmPassword) ? {
|
|
1697
|
-
class: sheet$
|
|
1697
|
+
class: sheet$1.classes.ErrorStyle,
|
|
1698
1698
|
helpText: ((_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.validationErrors) === null || _o === void 0 ? void 0 : _o.confirmPassword) || content.requiredFieldErrorMessage,
|
|
1699
1699
|
}
|
|
1700
1700
|
: [])))),
|
|
1701
1701
|
content.terms,
|
|
1702
|
-
h("div", { class: sheet$
|
|
1702
|
+
h("div", { class: sheet$1.classes.ButtonsContainer },
|
|
1703
1703
|
h("sl-button", { submit: true, loading: states.loading, exportparts: "base: primarybutton-base", type: "primary" }, content.submitLabel || "Register"),
|
|
1704
1704
|
content.secondaryButton))));
|
|
1705
1705
|
}
|
|
1706
1706
|
|
|
1707
|
-
const style$
|
|
1707
|
+
const style$2 = {
|
|
1708
1708
|
ErrorStyle: {
|
|
1709
1709
|
"&::part(control)": {
|
|
1710
1710
|
background: "var(--sl-color-danger-10)",
|
|
@@ -1743,15 +1743,15 @@ sl-checkbox::part(base){
|
|
|
1743
1743
|
}
|
|
1744
1744
|
`;
|
|
1745
1745
|
jss.setup(create());
|
|
1746
|
-
const sheet$
|
|
1747
|
-
const styleString$
|
|
1746
|
+
const sheet$2 = jss.createStyleSheet(style$2);
|
|
1747
|
+
const styleString$2 = sheet$2.toString();
|
|
1748
1748
|
function CheckboxFieldView(props) {
|
|
1749
1749
|
var _b, _c;
|
|
1750
1750
|
const { states, content, callbacks } = props;
|
|
1751
|
-
return (h("div", { class: sheet$
|
|
1751
|
+
return (h("div", { class: sheet$2.classes.FieldContainer, part: "sqm-base" },
|
|
1752
1752
|
h("style", { type: "text/css" },
|
|
1753
1753
|
vanillaStyle$1,
|
|
1754
|
-
styleString$
|
|
1754
|
+
styleString$2),
|
|
1755
1755
|
h("sl-checkbox", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.checkboxName}`, checked: states.checked, "onSl-change": (e) => {
|
|
1756
1756
|
e.target.value = e.target.checked;
|
|
1757
1757
|
callbacks.setChecked(e.target.value);
|
|
@@ -1807,7 +1807,7 @@ function ChangeMarktingView(props) {
|
|
|
1807
1807
|
h("div", { part: "successalert-text" }, states.text.successMessage))))));
|
|
1808
1808
|
}
|
|
1809
1809
|
|
|
1810
|
-
const style$
|
|
1810
|
+
const style$3 = {
|
|
1811
1811
|
Description: {
|
|
1812
1812
|
"& input[type=checkbox]": {
|
|
1813
1813
|
display: "none",
|
|
@@ -1846,13 +1846,13 @@ const style$4 = {
|
|
|
1846
1846
|
},
|
|
1847
1847
|
},
|
|
1848
1848
|
};
|
|
1849
|
-
const sheet$
|
|
1850
|
-
const styleString$
|
|
1849
|
+
const sheet$3 = createStyleSheet(style$3);
|
|
1850
|
+
const styleString$3 = sheet$3.toString();
|
|
1851
1851
|
function Details(props) {
|
|
1852
1852
|
const rid = Math.random().toString(36).slice(2);
|
|
1853
1853
|
return (h("div", { style: { opacity: props.opacity } },
|
|
1854
|
-
h("style", { type: "text/css" }, styleString$
|
|
1855
|
-
h("span", { class: sheet$
|
|
1854
|
+
h("style", { type: "text/css" }, styleString$3),
|
|
1855
|
+
h("span", { class: sheet$3.classes.Description },
|
|
1856
1856
|
h("input", { type: "checkbox", id: "details-" + rid }),
|
|
1857
1857
|
h("label", { class: "details", htmlFor: "details-" + rid },
|
|
1858
1858
|
h("sl-icon", { exportparts: "base: chevron-icon", name: "chevron-down" })),
|
|
@@ -1874,7 +1874,7 @@ const GreyGift = () => {
|
|
|
1874
1874
|
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" })));
|
|
1875
1875
|
};
|
|
1876
1876
|
|
|
1877
|
-
const style$
|
|
1877
|
+
const style$4 = {
|
|
1878
1878
|
ProgressBar: {
|
|
1879
1879
|
"& .progress-bar": {
|
|
1880
1880
|
height: "0",
|
|
@@ -1986,14 +1986,14 @@ const style$5 = {
|
|
|
1986
1986
|
},
|
|
1987
1987
|
},
|
|
1988
1988
|
};
|
|
1989
|
-
const sheet$
|
|
1990
|
-
const styleString$
|
|
1989
|
+
const sheet$4 = createStyleSheet(style$4, { classNamePrefix: "sqm-prog-bar" });
|
|
1990
|
+
const styleString$4 = sheet$4.toString();
|
|
1991
1991
|
function ProgressBarView(props) {
|
|
1992
1992
|
const { progress = 0, goal = 1, steps = false, progressBarUnit = "", repeatable = false, complete = false, expired = false, finite = 0, opacity = "1", } = props;
|
|
1993
1993
|
let aggregate = buildProgressBar(repeatable, steps, props);
|
|
1994
1994
|
const { columns, items } = aggregate;
|
|
1995
|
-
return (h("div", { class: sheet$
|
|
1996
|
-
h("style", { type: "text/css" }, styleString$
|
|
1995
|
+
return (h("div", { class: sheet$4.classes.ProgressBar, "data-expired": expired, "data-complete": complete, "data-steps": steps, "data-done": goal <= progress, style: { opacity: opacity } },
|
|
1996
|
+
h("style", { type: "text/css" }, styleString$4),
|
|
1997
1997
|
h("div", { class: (!Boolean(finite) && progress >= 2 * goal) ||
|
|
1998
1998
|
(Boolean(finite) && progress > 2 * goal)
|
|
1999
1999
|
? "progress-bar repeatable-steps"
|
|
@@ -2809,7 +2809,7 @@ function ReferralIframeView(props) {
|
|
|
2809
2809
|
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2810
2810
|
}
|
|
2811
2811
|
|
|
2812
|
-
const style$
|
|
2812
|
+
const style$5 = {
|
|
2813
2813
|
ErrorStyle: ErrorStyles,
|
|
2814
2814
|
FieldsContainer: {
|
|
2815
2815
|
"& sl-input": {
|
|
@@ -2829,21 +2829,21 @@ sl-input::part(label){
|
|
|
2829
2829
|
font-weight: var(--sl-font-weight-semibold);
|
|
2830
2830
|
}
|
|
2831
2831
|
`;
|
|
2832
|
-
const sheet$
|
|
2833
|
-
const styleString$
|
|
2832
|
+
const sheet$5 = createStyleSheet(style$5);
|
|
2833
|
+
const styleString$5 = sheet$5.toString();
|
|
2834
2834
|
function NameFieldsView(props) {
|
|
2835
2835
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2836
2836
|
const { states } = props;
|
|
2837
2837
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2838
|
-
return (h("div", { class: sheet$
|
|
2838
|
+
return (h("div", { class: sheet$5.classes.FieldsContainer },
|
|
2839
2839
|
h("style", { type: "text/css" },
|
|
2840
2840
|
vanillaStyle$3,
|
|
2841
|
-
styleString$
|
|
2841
|
+
styleString$5),
|
|
2842
2842
|
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) ? {
|
|
2843
2843
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2844
2844
|
}
|
|
2845
2845
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2846
|
-
class: sheet$
|
|
2846
|
+
class: sheet$5.classes.ErrorStyle,
|
|
2847
2847
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2848
2848
|
}
|
|
2849
2849
|
: []))),
|
|
@@ -2851,13 +2851,13 @@ function NameFieldsView(props) {
|
|
|
2851
2851
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2852
2852
|
}
|
|
2853
2853
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2854
|
-
class: sheet$
|
|
2854
|
+
class: sheet$5.classes.ErrorStyle,
|
|
2855
2855
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2856
2856
|
}
|
|
2857
2857
|
: [])))));
|
|
2858
2858
|
}
|
|
2859
2859
|
|
|
2860
|
-
const style$
|
|
2860
|
+
const style$6 = {
|
|
2861
2861
|
ErrorStyle: {
|
|
2862
2862
|
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
2863
2863
|
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
@@ -2885,30 +2885,30 @@ sl-select::part(label){
|
|
|
2885
2885
|
}
|
|
2886
2886
|
`;
|
|
2887
2887
|
jss.setup(create());
|
|
2888
|
-
const sheet$
|
|
2889
|
-
const styleString$
|
|
2888
|
+
const sheet$6 = jss.createStyleSheet(style$6);
|
|
2889
|
+
const styleString$6 = sheet$6.toString();
|
|
2890
2890
|
function DropdownFieldView(props) {
|
|
2891
2891
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2892
2892
|
const { states, content } = props;
|
|
2893
2893
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2894
|
-
return (h("div", { class: sheet$
|
|
2894
|
+
return (h("div", { class: sheet$6.classes.FieldContainer, part: "sqm-base" },
|
|
2895
2895
|
h("style", { type: "text/css" },
|
|
2896
2896
|
vanillaStyle$4,
|
|
2897
|
-
styleString$
|
|
2897
|
+
styleString$6),
|
|
2898
2898
|
h("sl-select", Object.assign({ exportparts: "label: input-label, base: input-base", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (!content.dropdownOptional ? { 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[content.dropdownName]) ? {
|
|
2899
2899
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
2900
2900
|
}
|
|
2901
2901
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
2902
|
-
class: sheet$
|
|
2902
|
+
class: sheet$6.classes.ErrorStyle,
|
|
2903
2903
|
}
|
|
2904
2904
|
: [])), content.selectOptions),
|
|
2905
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$
|
|
2905
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$6.classes.ErrorMessageStyle }, intl.formatMessage({
|
|
2906
2906
|
id: `errorMessage-${content.dropdownName}`,
|
|
2907
2907
|
defaultMessage: content.errorMessage,
|
|
2908
2908
|
})))));
|
|
2909
2909
|
}
|
|
2910
2910
|
|
|
2911
|
-
const style$
|
|
2911
|
+
const style$7 = {
|
|
2912
2912
|
ErrorStyle: ErrorStyles,
|
|
2913
2913
|
FieldContainer: {
|
|
2914
2914
|
"margin-bottom": "var(--sl-spacing-large)",
|
|
@@ -2922,21 +2922,21 @@ const vanillaStyle$5 = `
|
|
|
2922
2922
|
}
|
|
2923
2923
|
`;
|
|
2924
2924
|
jss.setup(create());
|
|
2925
|
-
const sheet$
|
|
2926
|
-
const styleString$
|
|
2925
|
+
const sheet$7 = jss.createStyleSheet(style$7);
|
|
2926
|
+
const styleString$7 = sheet$7.toString();
|
|
2927
2927
|
function InputFieldView(props) {
|
|
2928
2928
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2929
2929
|
const { states, content } = props;
|
|
2930
2930
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2931
|
-
return (h("div", { class: sheet$
|
|
2931
|
+
return (h("div", { class: sheet$7.classes.FieldContainer, part: "sqm-base" },
|
|
2932
2932
|
h("style", { type: "text/css" },
|
|
2933
2933
|
vanillaStyle$5,
|
|
2934
|
-
styleString$
|
|
2934
|
+
styleString$7),
|
|
2935
2935
|
h("sl-input", Object.assign({ exportparts: "label: input-label, base: input-base", name: `/${content.fieldName}`, type: content.fieldType, label: content.fieldLabel }, (!content.fieldOptional ? { 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[content.fieldName]) ? {
|
|
2936
2936
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
2937
2937
|
}
|
|
2938
2938
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
2939
|
-
class: sheet$
|
|
2939
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2940
2940
|
helpText: intl.formatMessage({
|
|
2941
2941
|
id: `errorMessage-${content.fieldName}`,
|
|
2942
2942
|
defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
|
|
@@ -3031,7 +3031,7 @@ function ProgressBar({ stageCount, currentStage, }) {
|
|
|
3031
3031
|
return (h("div", { style: { display: "flex", columnGap: "-2px" } }, Array.from(Array(stageCount).keys()).map((stage) => (h(Progress, { active: currentStage === stage, completed: currentStage > stage, incomplete: currentStage < stage, stage: stage })))));
|
|
3032
3032
|
}
|
|
3033
3033
|
|
|
3034
|
-
const style$
|
|
3034
|
+
const style$8 = {
|
|
3035
3035
|
HostBlock: HostBlock,
|
|
3036
3036
|
Container: {
|
|
3037
3037
|
minWidth: "300px",
|
|
@@ -3382,8 +3382,8 @@ const style$9 = {
|
|
|
3382
3382
|
},
|
|
3383
3383
|
};
|
|
3384
3384
|
// JSS config
|
|
3385
|
-
const sheet$
|
|
3386
|
-
const styleString$
|
|
3385
|
+
const sheet$8 = createStyleSheet(style$8);
|
|
3386
|
+
const styleString$8 = sheet$8.toString();
|
|
3387
3387
|
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
3388
3388
|
function RewardExchangeView(props) {
|
|
3389
3389
|
const { states, data, callbacks, refs } = props;
|
|
@@ -3406,7 +3406,7 @@ function RewardExchangeView(props) {
|
|
|
3406
3406
|
sourceUnit: item.sourceUnit,
|
|
3407
3407
|
})));
|
|
3408
3408
|
}
|
|
3409
|
-
return (h("sl-select", { style: { width: "auto" }, label: (_b = states === null || states === void 0 ? void 0 : states.content) === null || _b === void 0 ? void 0 : _b.text.selectText, class: sheet$
|
|
3409
|
+
return (h("sl-select", { style: { width: "auto" }, label: (_b = states === null || states === void 0 ? void 0 : states.content) === null || _b === void 0 ? void 0 : _b.text.selectText, class: sheet$8.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
3410
3410
|
var _a, _b, _c, _d, _e;
|
|
3411
3411
|
return callbacks.setExchangeState({
|
|
3412
3412
|
amount: (_c = (_b = (_a = e.detail) === null || _a === void 0 ? void 0 : _a.item) === null || _b === void 0 ? void 0 : _b.value) === null || _c === void 0 ? void 0 : _c.sourceValue,
|
|
@@ -3414,7 +3414,7 @@ function RewardExchangeView(props) {
|
|
|
3414
3414
|
});
|
|
3415
3415
|
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
3416
3416
|
var _a, _b;
|
|
3417
|
-
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$
|
|
3417
|
+
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$8.classes.SelectItem },
|
|
3418
3418
|
step.prettyDestinationValue,
|
|
3419
3419
|
h("br", null),
|
|
3420
3420
|
h("div", { class: "step-cost", slot: "suffix" },
|
|
@@ -3433,8 +3433,8 @@ function RewardExchangeView(props) {
|
|
|
3433
3433
|
var _a;
|
|
3434
3434
|
return [
|
|
3435
3435
|
h("div", { part: "choose-reward-container" },
|
|
3436
|
-
h("div", { class: sheet$
|
|
3437
|
-
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$
|
|
3436
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.rewardTitle),
|
|
3437
|
+
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$8.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
3438
3438
|
var _a, _b, _c, _d, _e;
|
|
3439
3439
|
const style = {
|
|
3440
3440
|
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
@@ -3443,7 +3443,7 @@ function RewardExchangeView(props) {
|
|
|
3443
3443
|
borderRadius: "4px",
|
|
3444
3444
|
};
|
|
3445
3445
|
return (h("div", { key: item.key, style: style },
|
|
3446
|
-
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$
|
|
3446
|
+
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$8.classes.Card, style: {
|
|
3447
3447
|
cursor: item.unavailableReasonCode
|
|
3448
3448
|
? "not-allowed"
|
|
3449
3449
|
: "pointer",
|
|
@@ -3460,14 +3460,14 @@ function RewardExchangeView(props) {
|
|
|
3460
3460
|
? "rgba(0, 0, 0, 0.05)"
|
|
3461
3461
|
: "rgba(0, 0, 0, 0)",
|
|
3462
3462
|
} },
|
|
3463
|
-
h("div", { class: sheet$
|
|
3463
|
+
h("div", { class: sheet$8.classes.Image, style: {
|
|
3464
3464
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3465
3465
|
} },
|
|
3466
3466
|
h("img", { class: item.unavailableReasonCode
|
|
3467
3467
|
? "image subdued"
|
|
3468
3468
|
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
3469
3469
|
getAssetPath("./assets/Reward-image.png") })),
|
|
3470
|
-
h("div", { class: sheet$
|
|
3470
|
+
h("div", { class: sheet$8.classes.TextArea, style: {
|
|
3471
3471
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3472
3472
|
} },
|
|
3473
3473
|
h("div", { class: "title", style: {
|
|
@@ -3500,7 +3500,7 @@ function RewardExchangeView(props) {
|
|
|
3500
3500
|
item.prettySourceMinValue,
|
|
3501
3501
|
}))))))));
|
|
3502
3502
|
}))),
|
|
3503
|
-
h("div", { class: sheet$
|
|
3503
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3504
3504
|
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue right", size: "large", onClick: () => callbacks.setStage("chooseAmount"), loading: states.loading, disabled: !states.selectedItem }, states.content.text.continueText))),
|
|
3505
3505
|
];
|
|
3506
3506
|
}
|
|
@@ -3511,7 +3511,7 @@ function RewardExchangeView(props) {
|
|
|
3511
3511
|
? false
|
|
3512
3512
|
: input && !states.amount;
|
|
3513
3513
|
return (h("div", null,
|
|
3514
|
-
h("div", { class: sheet$
|
|
3514
|
+
h("div", { class: sheet$8.classes.ChooseAmount, part: "choose-amount-container" },
|
|
3515
3515
|
h("div", { class: "wrapper" },
|
|
3516
3516
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3517
3517
|
getAssetPath("./assets/Reward-image.png") }),
|
|
@@ -3520,7 +3520,7 @@ function RewardExchangeView(props) {
|
|
|
3520
3520
|
((_c = states.selectedItem) === null || _c === void 0 ? void 0 : _c.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "points" }, input)) : (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)),
|
|
3521
3521
|
((_d = states.selectedItem) === null || _d === void 0 ? void 0 : _d.ruleType) === "FIXED_GLOBAL_REWARD" ? (h("div", { class: "description" }, selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.description)) : (h("div", null, input)),
|
|
3522
3522
|
h("div", { class: "space" }))),
|
|
3523
|
-
h("div", { class: sheet$
|
|
3523
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3524
3524
|
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
3525
3525
|
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3526
3526
|
}
|
|
@@ -3528,8 +3528,8 @@ function RewardExchangeView(props) {
|
|
|
3528
3528
|
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
3529
3529
|
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
3530
3530
|
return (h("div", null,
|
|
3531
|
-
h("div", { class: sheet$
|
|
3532
|
-
h("div", { class: sheet$
|
|
3531
|
+
h("div", { class: sheet$8.classes.Confirmation, part: "confirmation-container" },
|
|
3532
|
+
h("div", { class: sheet$8.classes.Title }, states.content.text.redeemTitle),
|
|
3533
3533
|
h("div", { class: "wrapper" },
|
|
3534
3534
|
h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
3535
3535
|
h("div", { class: "reward-item-container" },
|
|
@@ -3544,13 +3544,13 @@ function RewardExchangeView(props) {
|
|
|
3544
3544
|
h("div", { class: "wrapper top-border padding" },
|
|
3545
3545
|
h("div", { class: "field" }, states.content.text.costTitle),
|
|
3546
3546
|
h("div", { class: "value" }, cost)),
|
|
3547
|
-
h("div", { class: sheet$
|
|
3547
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3548
3548
|
h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
3549
3549
|
h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3550
3550
|
}
|
|
3551
3551
|
function success() {
|
|
3552
3552
|
var _a, _b, _c, _d, _e, _f;
|
|
3553
|
-
return (h("div", { class: sheet$
|
|
3553
|
+
return (h("div", { class: sheet$8.classes.Success, part: "success-container" },
|
|
3554
3554
|
h(Gift$1, null),
|
|
3555
3555
|
h(Confetti, null),
|
|
3556
3556
|
h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
|
|
@@ -3565,7 +3565,7 @@ function RewardExchangeView(props) {
|
|
|
3565
3565
|
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
|
|
3566
3566
|
states.content.text.promoCode,
|
|
3567
3567
|
h(CopyTextView, { copyString: data.fuelTankCode, tooltiptext: (_f = states === null || states === void 0 ? void 0 : states.content) === null || _f === void 0 ? void 0 : _f.text.tooltipText, open: states.open, onClick: callbacks.copyFuelTankCode }))),
|
|
3568
|
-
h("div", { class: sheet$
|
|
3568
|
+
h("div", { class: sheet$8.classes.Button },
|
|
3569
3569
|
h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
3570
3570
|
}
|
|
3571
3571
|
const stages = {
|
|
@@ -3577,7 +3577,7 @@ function RewardExchangeView(props) {
|
|
|
3577
3577
|
const currentStage = stages[states.redeemStage];
|
|
3578
3578
|
function stageMap() {
|
|
3579
3579
|
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
3580
|
-
return (h("div", { class: sheet$
|
|
3580
|
+
return (h("div", { class: sheet$8.classes.ProgressBar },
|
|
3581
3581
|
h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
3582
3582
|
if (stageList.indexOf(stage) <= stageNumber) {
|
|
3583
3583
|
return h("span", { class: "text" }, stageProgressList[stage]);
|
|
@@ -3589,10 +3589,10 @@ function RewardExchangeView(props) {
|
|
|
3589
3589
|
h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
3590
3590
|
}
|
|
3591
3591
|
function loading() {
|
|
3592
|
-
return (h("div", { class: sheet$
|
|
3592
|
+
return (h("div", { class: sheet$8.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
3593
3593
|
return (h("div", null,
|
|
3594
|
-
h("sl-card", { class: sheet$
|
|
3595
|
-
h("div", { class: sheet$
|
|
3594
|
+
h("sl-card", { class: sheet$8.classes.Card },
|
|
3595
|
+
h("div", { class: sheet$8.classes.CardLayout },
|
|
3596
3596
|
h("div", null,
|
|
3597
3597
|
h("sl-skeleton", { style: {
|
|
3598
3598
|
width: "100px",
|
|
@@ -3624,12 +3624,12 @@ function RewardExchangeView(props) {
|
|
|
3624
3624
|
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
3625
3625
|
return;
|
|
3626
3626
|
refs.canvasRef.current = canvas;
|
|
3627
|
-
}, id: "my-canvas", class: sheet$
|
|
3627
|
+
}, id: "my-canvas", class: sheet$8.classes.Confetti }));
|
|
3628
3628
|
}
|
|
3629
3629
|
if (states.noExchangeOptions)
|
|
3630
3630
|
return states.content.text.empty;
|
|
3631
|
-
return (h("div", { class: sheet$
|
|
3632
|
-
h("style", { type: "text/css" }, styleString$
|
|
3631
|
+
return (h("div", { class: sheet$8.classes.Container, part: "sqm-base" },
|
|
3632
|
+
h("style", { type: "text/css" }, styleString$8),
|
|
3633
3633
|
h("div", null,
|
|
3634
3634
|
stageMap(),
|
|
3635
3635
|
states.exchangeError && errorMessage(),
|