@saasquatch/mint-components 1.15.0-5 → 1.15.0-6
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-3f11bc68.js → ShadowViewAddon-e666dc8b.js} +197 -213
- package/dist/cjs/{copy-text-view-c85acaaa.js → copy-text-view-7441206d.js} +53 -38
- package/dist/cjs/{global-261393c6.js → global-124aec2c.js} +21 -9
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/sqm-banking-info-form_17.cjs.entry.js +2 -2
- package/dist/cjs/sqm-big-stat_41.cjs.entry.js +44 -6
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-invoice-table-view-8b950046.js → sqm-invoice-table-view-f369b0a6.js} +1 -1
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +1 -1
- package/dist/cjs/sqm-pagination_3.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-email-verification-view-8d5b23f3.js → sqm-portal-email-verification-view-f5ce25cc.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-fcb3ea3f.js → sqm-portal-profile-view-07d13061.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +19 -6
- package/dist/collection/components/sqm-coupon-code/sqm-coupon-code.js +1 -1
- package/dist/collection/components/sqm-logout-current-user/sqm-logout-current-user.js +1 -1
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step-view.js +6 -2
- package/dist/collection/components/sqm-program-explainer-step/sqm-program-explainer-step.js +77 -2
- package/dist/collection/components/sqm-referral-code/sqm-referral-code.js +1 -1
- package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +1 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +12 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +54 -3
- package/dist/collection/components/sqm-task-card/DetailsView.js +1 -1
- package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +139 -155
- package/dist/collection/components/sqm-task-card/sqm-task-card.js +146 -0
- package/dist/collection/components/sqm-task-card/useTaskCard.js +10 -0
- package/dist/collection/components/views/copy-text-view.js +53 -38
- package/dist/collection/global/styles.js +21 -9
- package/dist/collection/global/styles.ts +21 -9
- package/dist/esm/{ShadowViewAddon-f5791215.js → ShadowViewAddon-7c10e0ee.js} +197 -213
- package/dist/esm/{copy-text-view-782137ba.js → copy-text-view-717050d5.js} +53 -38
- package/dist/esm/{global-7b65dcb8.js → global-6dc825bc.js} +21 -9
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/sqm-banking-info-form_17.entry.js +2 -2
- package/dist/esm/sqm-big-stat_41.entry.js +44 -6
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-invoice-table-view-0f0a7386.js → sqm-invoice-table-view-1bd8afaa.js} +1 -1
- package/dist/esm/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm/sqm-pagination_3.entry.js +2 -2
- package/dist/esm/{sqm-portal-email-verification-view-3bd4f1d9.js → sqm-portal-email-verification-view-d96d6c43.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-3a751a15.js → sqm-portal-profile-view-4ce1c7c3.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +19 -6
- package/dist/esm-es5/ShadowViewAddon-7c10e0ee.js +1 -0
- package/dist/esm-es5/copy-text-view-717050d5.js +1 -0
- package/dist/esm-es5/{global-7b65dcb8.js → global-6dc825bc.js} +1 -1
- 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 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/{sqm-invoice-table-view-0f0a7386.js → sqm-invoice-table-view-1bd8afaa.js} +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-pagination_3.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-3bd4f1d9.js → sqm-portal-email-verification-view-d96d6c43.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-3a751a15.js → sqm-portal-profile-view-4ce1c7c3.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/global/styles.ts +21 -9
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-aa3c81d3.system.js → p-11519322.system.js} +1 -1
- package/dist/mint-components/{p-c2ab40ae.system.entry.js → p-11542862.system.entry.js} +1 -1
- package/dist/mint-components/{p-8f603753.system.entry.js → p-208d8d75.system.entry.js} +1 -1
- package/dist/mint-components/{p-a4eb4b81.entry.js → p-2c07df76.entry.js} +1 -1
- package/dist/mint-components/{p-7127a230.js → p-3a49811c.js} +1 -1
- package/dist/mint-components/{p-fbfbbbd2.system.js → p-44a82cf3.system.js} +1 -1
- package/dist/mint-components/p-4874193a.system.js +1 -0
- package/dist/mint-components/{p-ebdf906a.entry.js → p-49deb225.entry.js} +1 -1
- package/dist/mint-components/{p-4b626c19.entry.js → p-4dbe2d08.entry.js} +1 -1
- package/dist/mint-components/{p-4ae5ac59.entry.js → p-51495bc3.entry.js} +1 -1
- package/dist/mint-components/{p-c07551c4.system.entry.js → p-5ca8959a.system.entry.js} +1 -1
- package/dist/mint-components/{p-c0b52238.entry.js → p-619c2aa3.entry.js} +1 -1
- package/dist/mint-components/{p-c53b8fe7.entry.js → p-6f34c2c2.entry.js} +2 -2
- package/dist/mint-components/{p-5c2d9a52.entry.js → p-734695a0.entry.js} +1 -1
- package/dist/mint-components/{p-e4fd9966.entry.js → p-7f1e10d3.entry.js} +2 -2
- package/dist/mint-components/{p-383d8c5a.system.entry.js → p-837dbf90.system.entry.js} +1 -1
- package/dist/mint-components/{p-15d20bf9.entry.js → p-8b36fe4f.entry.js} +11 -11
- package/dist/mint-components/p-8c12078e.js +394 -0
- package/dist/mint-components/{p-2e4129e0.system.entry.js → p-90421929.system.entry.js} +1 -1
- package/dist/mint-components/{p-10ed0483.system.entry.js → p-9209a016.system.entry.js} +1 -1
- package/dist/mint-components/{p-646cfbd5.system.js → p-93fed35b.system.js} +1 -1
- package/dist/mint-components/{p-05255c61.system.js → p-95ae4ab9.system.js} +1 -1
- package/dist/mint-components/{p-fa630b25.system.entry.js → p-a37541ae.system.entry.js} +1 -1
- package/dist/mint-components/{p-32d5cbc1.js → p-abefb7cc.js} +1 -1
- package/dist/mint-components/{p-7e8bf5cb.system.entry.js → p-ad985d37.system.entry.js} +1 -1
- package/dist/mint-components/p-bdbbc673.system.entry.js +1 -0
- package/dist/mint-components/p-c3680c02.js +1 -0
- package/dist/mint-components/{p-5c0576c0.system.entry.js → p-c6841ab8.system.entry.js} +1 -1
- package/dist/mint-components/{p-f25f3d2a.system.entry.js → p-cd63a965.system.entry.js} +1 -1
- package/dist/mint-components/{p-cde752fa.js → p-cf8677ea.js} +1 -1
- package/dist/mint-components/{p-22f374db.entry.js → p-d3e5704c.entry.js} +1 -1
- package/dist/mint-components/p-d8cf46ba.system.js +1 -0
- package/dist/mint-components/{p-ae473175.js → p-e01fe915.js} +12 -12
- package/dist/mint-components/{p-9dd8c93b.system.js → p-ed11966d.system.js} +1 -1
- package/dist/mint-components/{p-ec7d2a85.entry.js → p-eda5e82c.entry.js} +1 -1
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step-view.d.ts +3 -0
- package/dist/types/components/sqm-program-explainer-step/sqm-program-explainer-step.d.ts +19 -2
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +1 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +30 -1
- package/dist/types/components/sqm-task-card/sqm-task-card-view.d.ts +5 -0
- package/dist/types/components/sqm-task-card/sqm-task-card.d.ts +32 -0
- package/dist/types/components/sqm-task-card/useTaskCard.d.ts +9 -0
- package/dist/types/components/views/copy-text-view.d.ts +5 -0
- package/dist/types/components.d.ts +122 -4
- package/dist/types/global/styles.d.ts +1 -1
- 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-f5791215.js +0 -1
- package/dist/esm-es5/copy-text-view-782137ba.js +0 -1
- package/dist/mint-components/p-31015791.js +0 -1
- package/dist/mint-components/p-3708a40b.system.js +0 -1
- package/dist/mint-components/p-3b90e01b.system.js +0 -1
- package/dist/mint-components/p-97ccee03.system.entry.js +0 -1
- package/dist/mint-components/p-acf93efa.js +0 -394
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { h, c as Host, d as getAssetPath, g as getElement } from './index-91e7729f.js';
|
|
2
2
|
import { k as useState, b as browser, u as useMemo } from './stencil-hooks.module-4bc38af4.js';
|
|
3
|
-
import { i as intl } from './global-
|
|
3
|
+
import { i as intl } from './global-6dc825bc.js';
|
|
4
4
|
import { d as dist, H, J, F as Fn, w as wn, $ as $e, B, g as getEnvironmentSDK, L } from './index.module-89a79f66.js';
|
|
5
5
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
6
6
|
import { l as luxonLocale } from './utils-334c1e34.js';
|
|
7
7
|
import { c as createStyleSheet, j as jss, a as create } from './JSS-67b5cff8.js';
|
|
8
8
|
import { a as REFERRAL_CODES_NAMESPACE, S as SET_CODE_COPIED } from './useReferralCodes-8f75921a.js';
|
|
9
9
|
import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-83f90fa1.js';
|
|
10
|
-
import { C as CopyTextView } from './copy-text-view-
|
|
10
|
+
import { C as CopyTextView } from './copy-text-view-717050d5.js';
|
|
11
11
|
import { u as useChildElements } from './useChildElements-7945ae56.js';
|
|
12
12
|
import { l as luxon } from './luxon-8d51c92b.js';
|
|
13
13
|
import { T as TextSpanView } from './sqm-text-span-view-c577cc60.js';
|
|
@@ -1774,7 +1774,7 @@ const style$4 = {
|
|
|
1774
1774
|
position: "absolute",
|
|
1775
1775
|
top: "var(--sl-spacing-medium)",
|
|
1776
1776
|
right: "var(--sl-spacing-medium)",
|
|
1777
|
-
color: "var(--
|
|
1777
|
+
color: "var(--sqm-text)",
|
|
1778
1778
|
fontSize: "var(--sl-font-size-large)",
|
|
1779
1779
|
"& :hover": {
|
|
1780
1780
|
color: "var(--sl-color-primary-700)",
|
|
@@ -2239,165 +2239,151 @@ const arrow_left_right = () => {
|
|
|
2239
2239
|
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" })));
|
|
2240
2240
|
};
|
|
2241
2241
|
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
|
|
2254
|
-
|
|
2255
|
-
|
|
2256
|
-
|
|
2257
|
-
|
|
2258
|
-
|
|
2259
|
-
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
|
|
2266
|
-
|
|
2267
|
-
|
|
2268
|
-
|
|
2269
|
-
|
|
2270
|
-
|
|
2271
|
-
|
|
2272
|
-
|
|
2273
|
-
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
color: "var(--sl-color-primary-600)",
|
|
2283
|
-
border: "1px solid var(--sl-color-neutral-200)",
|
|
2284
|
-
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
2285
|
-
borderBottom: "none",
|
|
2286
|
-
background: "var(--sl-color-primary-50)",
|
|
2287
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2288
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
2289
|
-
"& .icon": {
|
|
2290
|
-
position: "relative",
|
|
2291
|
-
top: "0.1em",
|
|
2292
|
-
marginRight: "var(--sl-spacing-small)",
|
|
2293
|
-
color: "var(--sl-color-primary-500)",
|
|
2294
|
-
},
|
|
2295
|
-
},
|
|
2296
|
-
Ended: {
|
|
2297
|
-
fontSize: "var(--sl-font-size-small)",
|
|
2298
|
-
padding: "var(--sl-spacing-medium)",
|
|
2299
|
-
color: "var(--sl-color-warning-600)",
|
|
2300
|
-
border: "1px solid var(--sl-color-neutral-200)",
|
|
2301
|
-
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
2302
|
-
borderBottom: "none",
|
|
2303
|
-
background: "var(--sl-color-warning-50)",
|
|
2304
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2305
|
-
lineHeight: "var(--sl-line-height-dense)",
|
|
2306
|
-
"& .icon": {
|
|
2307
|
-
position: "relative",
|
|
2308
|
-
top: "0.1em",
|
|
2309
|
-
marginRight: "var(--sl-spacing-small)",
|
|
2310
|
-
color: "var(--sl-color-warning-500)",
|
|
2311
|
-
},
|
|
2312
|
-
},
|
|
2313
|
-
Header: {
|
|
2314
|
-
display: "flex",
|
|
2315
|
-
"& .icon": {
|
|
2316
|
-
position: "relative",
|
|
2317
|
-
top: "5%",
|
|
2318
|
-
alignSelf: "center",
|
|
2319
|
-
lineHeight: "0",
|
|
2320
|
-
color: "var(--sl-color-primary-400)",
|
|
2321
|
-
fontSize: "var(--sl-font-size-large)",
|
|
2322
|
-
marginRight: "var(--sl-spacing-x-small)",
|
|
2323
|
-
},
|
|
2324
|
-
"& .value": {
|
|
2325
|
-
alignSelf: "center",
|
|
2326
|
-
fontSize: "var(--sl-font-size-x-large)",
|
|
2327
|
-
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2328
|
-
color: "var(--sqm-text)",
|
|
2329
|
-
lineHeight: "100%",
|
|
2330
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2331
|
-
},
|
|
2332
|
-
"& .text": {
|
|
2333
|
-
alignSelf: "end",
|
|
2334
|
-
textTransform: "uppercase",
|
|
2335
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
2336
|
-
color: "var(--sqm-text)",
|
|
2337
|
-
lineHeight: "var(--sl-font-size-medium)",
|
|
2338
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2242
|
+
function TaskCardView(props) {
|
|
2243
|
+
var _a, _b;
|
|
2244
|
+
const { callbacks, states, content } = props;
|
|
2245
|
+
console.log("text color from the view ", content.textColor);
|
|
2246
|
+
const style = {
|
|
2247
|
+
TaskCard: {
|
|
2248
|
+
display: "inline-block",
|
|
2249
|
+
width: "100%",
|
|
2250
|
+
"& .main": {
|
|
2251
|
+
position: "relative",
|
|
2252
|
+
boxSizing: "border-sizing",
|
|
2253
|
+
background: content.backgroundColor || "var(--sl-color-neutral-0)",
|
|
2254
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2255
|
+
borderRadius: "var(--sl-border-radius-large)",
|
|
2256
|
+
boxShadow: "1px 2px 4px rgba(211, 211, 211, 0.2)",
|
|
2257
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2258
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
2259
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2260
|
+
},
|
|
2261
|
+
"& .main.complete": {
|
|
2262
|
+
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
2263
|
+
borderColor: content.borderColor || "var(--sl-color-primary-500)",
|
|
2264
|
+
},
|
|
2265
|
+
"& .main.expired": {
|
|
2266
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2267
|
+
background: content.backgroundColor || "var(--sl-color-neutral-50)",
|
|
2268
|
+
},
|
|
2269
|
+
"& .title": {
|
|
2270
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
2271
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2272
|
+
},
|
|
2273
|
+
"& .container": {
|
|
2274
|
+
margin: "var(--sl-spacing-medium)",
|
|
2275
|
+
},
|
|
2276
|
+
"& .container.subdued": {
|
|
2277
|
+
opacity: "0.45",
|
|
2278
|
+
},
|
|
2279
|
+
"& .container > div": {
|
|
2280
|
+
margin: "var(--sl-spacing-medium) 0",
|
|
2281
|
+
},
|
|
2339
2282
|
},
|
|
2340
|
-
|
|
2341
|
-
|
|
2283
|
+
NotStarted: {
|
|
2284
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2285
|
+
padding: "var(--sl-spacing-medium)",
|
|
2286
|
+
color: content.textColor || "var(--sl-color-primary-600)",
|
|
2287
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2288
|
+
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
2289
|
+
borderBottom: "none",
|
|
2290
|
+
background: content.backgroundColor || "var(--sl-color-primary-50)",
|
|
2342
2291
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
"&[data-subdue] .success": {
|
|
2351
|
-
color: "var(--sl-color-primary-300)",
|
|
2352
|
-
},
|
|
2353
|
-
"&[data-subdue] .neutral": {
|
|
2354
|
-
color: "var(--sqm-text)",
|
|
2355
|
-
},
|
|
2356
|
-
display: "flex",
|
|
2357
|
-
"& .icon": {
|
|
2358
|
-
fontSize: "var(--sl-font-size-xx-small)",
|
|
2359
|
-
marginRight: "var(--sl-spacing-xx-small)",
|
|
2360
|
-
verticalAlign: "middle",
|
|
2361
|
-
},
|
|
2362
|
-
"& .text": {
|
|
2363
|
-
marginTop: "auto",
|
|
2364
|
-
verticalAlign: "text-bottom",
|
|
2365
|
-
fontSize: "var(--sl-font-size-x-small)",
|
|
2366
|
-
color: "var(--sqm-text)",
|
|
2292
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
2293
|
+
"& .icon": {
|
|
2294
|
+
position: "relative",
|
|
2295
|
+
top: "0.1em",
|
|
2296
|
+
marginRight: "var(--sl-spacing-small)",
|
|
2297
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2298
|
+
},
|
|
2367
2299
|
},
|
|
2368
|
-
|
|
2369
|
-
|
|
2300
|
+
Ended: {
|
|
2301
|
+
fontSize: "var(--sl-font-size-small)",
|
|
2302
|
+
padding: "var(--sl-spacing-medium)",
|
|
2303
|
+
color: content.textColor || "var(--sl-color-warning-600)",
|
|
2304
|
+
border: `1px solid ${content.borderColor || "var(--sl-color-neutral-200)"}`,
|
|
2305
|
+
borderRadius: "var(--sl-border-radius-large) var(--sl-border-radius-large) 0 0",
|
|
2306
|
+
borderBottom: "none",
|
|
2307
|
+
background: content.backgroundColor || "var(--sl-color-warning-50)",
|
|
2370
2308
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2309
|
+
lineHeight: "var(--sl-line-height-dense)",
|
|
2310
|
+
"& .icon": {
|
|
2311
|
+
position: "relative",
|
|
2312
|
+
top: "0.1em",
|
|
2313
|
+
marginRight: "var(--sl-spacing-small)",
|
|
2314
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2315
|
+
},
|
|
2371
2316
|
},
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2317
|
+
Header: {
|
|
2318
|
+
display: "flex",
|
|
2319
|
+
"& .icon": {
|
|
2320
|
+
position: "relative",
|
|
2321
|
+
top: "5%",
|
|
2322
|
+
alignSelf: "center",
|
|
2323
|
+
lineHeight: "0",
|
|
2324
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2325
|
+
fontSize: "var(--sl-font-size-large)",
|
|
2326
|
+
marginRight: "var(--sl-spacing-x-small)",
|
|
2377
2327
|
},
|
|
2378
|
-
"
|
|
2379
|
-
|
|
2380
|
-
|
|
2328
|
+
"& .value": {
|
|
2329
|
+
alignSelf: "center",
|
|
2330
|
+
fontSize: "var(--sl-font-size-x-large)",
|
|
2331
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2332
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2333
|
+
lineHeight: "100%",
|
|
2334
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
2381
2335
|
},
|
|
2382
|
-
"
|
|
2383
|
-
|
|
2384
|
-
|
|
2336
|
+
"& .text": {
|
|
2337
|
+
alignSelf: "end",
|
|
2338
|
+
textTransform: "uppercase",
|
|
2339
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
2340
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2341
|
+
lineHeight: "var(--sl-font-size-medium)",
|
|
2342
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
2343
|
+
},
|
|
2344
|
+
"& .end": {
|
|
2345
|
+
color: content.textColor || "var(--sl-color-warning-500)",
|
|
2346
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2347
|
+
marginBottom: "var(--sl-spacing-xx-small)",
|
|
2348
|
+
},
|
|
2349
|
+
"& .neutral": {
|
|
2350
|
+
color: content.textColor || "var(--sl-color-neutral-400)",
|
|
2385
2351
|
},
|
|
2386
2352
|
},
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2353
|
+
Footer: {
|
|
2354
|
+
"&[data-subdue] .success": {
|
|
2355
|
+
color: content.textColor || "var(--sl-color-primary-300)",
|
|
2356
|
+
},
|
|
2357
|
+
"&[data-subdue] .neutral": {
|
|
2358
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2359
|
+
},
|
|
2360
|
+
display: "flex",
|
|
2361
|
+
"& .icon": {
|
|
2362
|
+
fontSize: "var(--sl-font-size-xx-small)",
|
|
2363
|
+
marginRight: "var(--sl-spacing-xx-small)",
|
|
2364
|
+
verticalAlign: "middle",
|
|
2365
|
+
},
|
|
2366
|
+
"& .text": {
|
|
2367
|
+
marginTop: "auto",
|
|
2368
|
+
verticalAlign: "text-bottom",
|
|
2369
|
+
fontSize: "var(--sl-font-size-x-small)",
|
|
2370
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2371
|
+
},
|
|
2372
|
+
"& .success": {
|
|
2373
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2374
|
+
fontWeight: "var(--sl-font-weight-semibold)",
|
|
2375
|
+
},
|
|
2376
|
+
"& .neutral": {
|
|
2377
|
+
color: content.textColor || "var(--sqm-text)",
|
|
2378
|
+
},
|
|
2379
|
+
"& .datetime": {
|
|
2380
|
+
display: "block",
|
|
2381
|
+
marginTop: "var(--sl-spacing-xx-small)",
|
|
2382
|
+
},
|
|
2393
2383
|
},
|
|
2394
|
-
}
|
|
2395
|
-
|
|
2396
|
-
const
|
|
2397
|
-
const styleString$6 = sheet$6.toString();
|
|
2398
|
-
function TaskCardView(props) {
|
|
2399
|
-
var _a, _b;
|
|
2400
|
-
const { callbacks, states, content } = props;
|
|
2384
|
+
};
|
|
2385
|
+
const sheet = createStyleSheet(style);
|
|
2386
|
+
const contenttring = sheet.toString();
|
|
2401
2387
|
const dateStart = content.rewardDuration &&
|
|
2402
2388
|
luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
|
|
2403
2389
|
const dateEnd = content.rewardDuration &&
|
|
@@ -2430,11 +2416,11 @@ function TaskCardView(props) {
|
|
|
2430
2416
|
}
|
|
2431
2417
|
|
|
2432
2418
|
`;
|
|
2433
|
-
return (h("div", { class: sheet
|
|
2419
|
+
return (h("div", { class: sheet.classes.TaskCard, part: "sqm-base" },
|
|
2434
2420
|
h("style", { type: "text/css" },
|
|
2435
|
-
|
|
2421
|
+
contenttring,
|
|
2436
2422
|
vanillaStyle),
|
|
2437
|
-
!states.loading && taskNotStarted && (h("div", { class: sheet
|
|
2423
|
+
!states.loading && taskNotStarted && (h("div", { class: sheet.classes.NotStarted },
|
|
2438
2424
|
h("span", { class: "icon" },
|
|
2439
2425
|
h("sl-icon", { name: "info-circle-fill" })),
|
|
2440
2426
|
intl.formatMessage({
|
|
@@ -2445,7 +2431,7 @@ function TaskCardView(props) {
|
|
|
2445
2431
|
.setLocale(luxonLocale(states.locale))
|
|
2446
2432
|
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
2447
2433
|
}))),
|
|
2448
|
-
!states.loading && taskEnded && (h("div", { class: sheet
|
|
2434
|
+
!states.loading && taskEnded && (h("div", { class: sheet.classes.Ended },
|
|
2449
2435
|
h("span", { class: "icon" },
|
|
2450
2436
|
h("sl-icon", { exportparts: "base: task-card-icon", name: "exclamation-triangle-fill" })),
|
|
2451
2437
|
intl.formatMessage({
|
|
@@ -2465,7 +2451,7 @@ function TaskCardView(props) {
|
|
|
2465
2451
|
? "main complete"
|
|
2466
2452
|
: "main" },
|
|
2467
2453
|
h("div", { class: "container", part: "sqm-card-container", "data-subdue": taskComplete || taskUnavailable },
|
|
2468
|
-
h("div", { class: sheet
|
|
2454
|
+
h("div", { class: sheet.classes.Header, style: { opacity: taskComplete || taskUnavailable ? "0.45" : "1" } }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
|
|
2469
2455
|
showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
|
|
2470
2456
|
h("span", { part: "sqm-value", class: "value" }, content.rewardAmount),
|
|
2471
2457
|
h("span", { part: "sqm-unit", class: "text" }, content.rewardUnit)))),
|
|
@@ -2481,7 +2467,7 @@ function TaskCardView(props) {
|
|
|
2481
2467
|
} }, content.cardTitle)),
|
|
2482
2468
|
states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && (h(Details, Object.assign({}, props, { opacity: taskComplete || taskUnavailable ? "0.45" : "1" })))),
|
|
2483
2469
|
content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { opacity: taskComplete || taskUnavailable ? "0.45" : "1", complete: taskComplete, expired: taskUnavailable })))),
|
|
2484
|
-
h("div", { class: sheet
|
|
2470
|
+
h("div", { class: sheet.classes.Footer, "data-subdue": taskComplete || taskUnavailable }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
|
|
2485
2471
|
h("span", { class: "text" },
|
|
2486
2472
|
content.repeatable && (h("div", null,
|
|
2487
2473
|
h("span", { class: repetitions > 0
|
|
@@ -2510,11 +2496,9 @@ function TaskCardView(props) {
|
|
|
2510
2496
|
.setLocale(luxonLocale(states.locale))
|
|
2511
2497
|
.toLocaleString(luxon.DateTime.DATETIME_MED),
|
|
2512
2498
|
})))),
|
|
2513
|
-
content.hideButton ? ("") : (h("sl-button", { exportparts:
|
|
2514
|
-
? "
|
|
2515
|
-
: taskComplete
|
|
2516
|
-
? "action disabled"
|
|
2517
|
-
: "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
2499
|
+
content.hideButton ? ("") : (h("sl-button", { exportparts: `base: ${content.buttonStyle === "primary"
|
|
2500
|
+
? "primary"
|
|
2501
|
+
: "secondary"}button-base`, id: "sl-button", type: content.buttonStyle === "primary" ? "primary" : "default", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable, style: {
|
|
2518
2502
|
opacity: taskComplete || taskUnavailable ? "0.45" : "1",
|
|
2519
2503
|
} }, content.buttonText)))))))));
|
|
2520
2504
|
}
|
|
@@ -2780,7 +2764,7 @@ function ReferralIframeView(props) {
|
|
|
2780
2764
|
h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
|
|
2781
2765
|
}
|
|
2782
2766
|
|
|
2783
|
-
const style$
|
|
2767
|
+
const style$6 = {
|
|
2784
2768
|
ErrorStyle: ErrorStyles,
|
|
2785
2769
|
FieldsContainer: {
|
|
2786
2770
|
"& sl-input": {
|
|
@@ -2800,21 +2784,21 @@ sl-input::part(label){
|
|
|
2800
2784
|
font-weight: var(--sl-font-weight-semibold);
|
|
2801
2785
|
}
|
|
2802
2786
|
`;
|
|
2803
|
-
const sheet$
|
|
2804
|
-
const styleString$
|
|
2787
|
+
const sheet$6 = createStyleSheet(style$6);
|
|
2788
|
+
const styleString$6 = sheet$6.toString();
|
|
2805
2789
|
function NameFieldsView(props) {
|
|
2806
2790
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
2807
2791
|
const { states } = props;
|
|
2808
2792
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2809
|
-
return (h("div", { class: sheet$
|
|
2793
|
+
return (h("div", { class: sheet$6.classes.FieldsContainer },
|
|
2810
2794
|
h("style", { type: "text/css" },
|
|
2811
2795
|
vanillaStyle$3,
|
|
2812
|
-
styleString$
|
|
2796
|
+
styleString$6),
|
|
2813
2797
|
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) ? {
|
|
2814
2798
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g.firstName,
|
|
2815
2799
|
}
|
|
2816
2800
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) ? {
|
|
2817
|
-
class: sheet$
|
|
2801
|
+
class: sheet$6.classes.ErrorStyle,
|
|
2818
2802
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.firstName) || "Cannot be empty",
|
|
2819
2803
|
}
|
|
2820
2804
|
: []))),
|
|
@@ -2822,13 +2806,13 @@ function NameFieldsView(props) {
|
|
|
2822
2806
|
value: (_o = (_m = states.registrationFormState) === null || _m === void 0 ? void 0 : _m.initialData) === null || _o === void 0 ? void 0 : _o.lastName,
|
|
2823
2807
|
}
|
|
2824
2808
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) ? {
|
|
2825
|
-
class: sheet$
|
|
2809
|
+
class: sheet$6.classes.ErrorStyle,
|
|
2826
2810
|
helpText: (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors.lastName) || "Cannot be empty",
|
|
2827
2811
|
}
|
|
2828
2812
|
: [])))));
|
|
2829
2813
|
}
|
|
2830
2814
|
|
|
2831
|
-
const style$
|
|
2815
|
+
const style$7 = {
|
|
2832
2816
|
ErrorStyle: {
|
|
2833
2817
|
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
2834
2818
|
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
@@ -2856,30 +2840,30 @@ sl-select::part(label){
|
|
|
2856
2840
|
}
|
|
2857
2841
|
`;
|
|
2858
2842
|
jss.setup(create());
|
|
2859
|
-
const sheet$
|
|
2860
|
-
const styleString$
|
|
2843
|
+
const sheet$7 = jss.createStyleSheet(style$7);
|
|
2844
|
+
const styleString$7 = sheet$7.toString();
|
|
2861
2845
|
function DropdownFieldView(props) {
|
|
2862
2846
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2863
2847
|
const { states, content } = props;
|
|
2864
2848
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2865
|
-
return (h("div", { class: sheet$
|
|
2849
|
+
return (h("div", { class: sheet$7.classes.FieldContainer, part: "sqm-base" },
|
|
2866
2850
|
h("style", { type: "text/css" },
|
|
2867
2851
|
vanillaStyle$4,
|
|
2868
|
-
styleString$
|
|
2852
|
+
styleString$7),
|
|
2869
2853
|
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]) ? {
|
|
2870
2854
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.dropdownName],
|
|
2871
2855
|
}
|
|
2872
2856
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
2873
|
-
class: sheet$
|
|
2857
|
+
class: sheet$7.classes.ErrorStyle,
|
|
2874
2858
|
}
|
|
2875
2859
|
: [])), content.selectOptions),
|
|
2876
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$
|
|
2860
|
+
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h("p", { class: sheet$7.classes.ErrorMessageStyle }, intl.formatMessage({
|
|
2877
2861
|
id: `errorMessage-${content.dropdownName}`,
|
|
2878
2862
|
defaultMessage: content.errorMessage,
|
|
2879
2863
|
})))));
|
|
2880
2864
|
}
|
|
2881
2865
|
|
|
2882
|
-
const style$
|
|
2866
|
+
const style$8 = {
|
|
2883
2867
|
ErrorStyle: ErrorStyles,
|
|
2884
2868
|
FieldContainer: {
|
|
2885
2869
|
"margin-bottom": "var(--sl-spacing-large)",
|
|
@@ -2893,21 +2877,21 @@ const vanillaStyle$5 = `
|
|
|
2893
2877
|
}
|
|
2894
2878
|
`;
|
|
2895
2879
|
jss.setup(create());
|
|
2896
|
-
const sheet$
|
|
2897
|
-
const styleString$
|
|
2880
|
+
const sheet$8 = jss.createStyleSheet(style$8);
|
|
2881
|
+
const styleString$8 = sheet$8.toString();
|
|
2898
2882
|
function InputFieldView(props) {
|
|
2899
2883
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
2900
2884
|
const { states, content } = props;
|
|
2901
2885
|
const validationErrors = (_a = states === null || states === void 0 ? void 0 : states.registrationFormState) === null || _a === void 0 ? void 0 : _a.validationErrors;
|
|
2902
|
-
return (h("div", { class: sheet$
|
|
2886
|
+
return (h("div", { class: sheet$8.classes.FieldContainer, part: "sqm-base" },
|
|
2903
2887
|
h("style", { type: "text/css" },
|
|
2904
2888
|
vanillaStyle$5,
|
|
2905
|
-
styleString$
|
|
2889
|
+
styleString$8),
|
|
2906
2890
|
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]) ? {
|
|
2907
2891
|
value: (_g = (_f = states.registrationFormState) === null || _f === void 0 ? void 0 : _f.initialData) === null || _g === void 0 ? void 0 : _g[content.fieldName],
|
|
2908
2892
|
}
|
|
2909
2893
|
: {}), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]) ? {
|
|
2910
|
-
class: sheet$
|
|
2894
|
+
class: sheet$8.classes.ErrorStyle,
|
|
2911
2895
|
helpText: intl.formatMessage({
|
|
2912
2896
|
id: `errorMessage-${content.fieldName}`,
|
|
2913
2897
|
defaultMessage: content.errorMessage || (validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.fieldName]),
|
|
@@ -3002,7 +2986,7 @@ function ProgressBar({ stageCount, currentStage, }) {
|
|
|
3002
2986
|
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 })))));
|
|
3003
2987
|
}
|
|
3004
2988
|
|
|
3005
|
-
const style$
|
|
2989
|
+
const style$9 = {
|
|
3006
2990
|
HostBlock: HostBlock,
|
|
3007
2991
|
Container: {
|
|
3008
2992
|
minWidth: "300px",
|
|
@@ -3353,8 +3337,8 @@ const style$a = {
|
|
|
3353
3337
|
},
|
|
3354
3338
|
};
|
|
3355
3339
|
// JSS config
|
|
3356
|
-
const sheet$
|
|
3357
|
-
const styleString$
|
|
3340
|
+
const sheet$9 = createStyleSheet(style$9);
|
|
3341
|
+
const styleString$9 = sheet$9.toString();
|
|
3358
3342
|
const stageList = ["chooseReward", "chooseAmount", "confirmation", "success"];
|
|
3359
3343
|
function RewardExchangeView(props) {
|
|
3360
3344
|
const { states, data, callbacks, refs } = props;
|
|
@@ -3377,7 +3361,7 @@ function RewardExchangeView(props) {
|
|
|
3377
3361
|
sourceUnit: item.sourceUnit,
|
|
3378
3362
|
})));
|
|
3379
3363
|
}
|
|
3380
|
-
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$
|
|
3364
|
+
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$9.classes.Select, value: states.selectedStep, "onSl-select": (e) => {
|
|
3381
3365
|
var _a, _b, _c, _d, _e;
|
|
3382
3366
|
return callbacks.setExchangeState({
|
|
3383
3367
|
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,
|
|
@@ -3385,7 +3369,7 @@ function RewardExchangeView(props) {
|
|
|
3385
3369
|
});
|
|
3386
3370
|
} }, (_c = item.steps) === null || _c === void 0 ? void 0 : _c.map((step) => {
|
|
3387
3371
|
var _a, _b;
|
|
3388
|
-
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$
|
|
3372
|
+
return (h("sl-menu-item", { value: step, disabled: !step.available, class: sheet$9.classes.SelectItem },
|
|
3389
3373
|
step.prettyDestinationValue,
|
|
3390
3374
|
h("br", null),
|
|
3391
3375
|
h("div", { class: "step-cost", slot: "suffix" },
|
|
@@ -3404,8 +3388,8 @@ function RewardExchangeView(props) {
|
|
|
3404
3388
|
var _a;
|
|
3405
3389
|
return [
|
|
3406
3390
|
h("div", { part: "choose-reward-container" },
|
|
3407
|
-
h("div", { class: sheet$
|
|
3408
|
-
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$
|
|
3391
|
+
h("div", { class: sheet$9.classes.Title }, states.content.text.rewardTitle),
|
|
3392
|
+
states.loading || states.queryError ? (loading()) : (h("div", { class: sheet$9.classes.Grid }, (_a = data.exchangeList) === null || _a === void 0 ? void 0 : _a.map((item) => {
|
|
3409
3393
|
var _a, _b, _c, _d, _e;
|
|
3410
3394
|
const style = {
|
|
3411
3395
|
boxShadow: item.key === (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.key)
|
|
@@ -3414,7 +3398,7 @@ function RewardExchangeView(props) {
|
|
|
3414
3398
|
borderRadius: "4px",
|
|
3415
3399
|
};
|
|
3416
3400
|
return (h("div", { key: item.key, style: style },
|
|
3417
|
-
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$
|
|
3401
|
+
h("sl-card", { exportparts: "base: exchange-card-container", class: sheet$9.classes.Card, style: {
|
|
3418
3402
|
cursor: item.unavailableReasonCode
|
|
3419
3403
|
? "not-allowed"
|
|
3420
3404
|
: "pointer",
|
|
@@ -3431,14 +3415,14 @@ function RewardExchangeView(props) {
|
|
|
3431
3415
|
? "rgba(0, 0, 0, 0.05)"
|
|
3432
3416
|
: "rgba(0, 0, 0, 0)",
|
|
3433
3417
|
} },
|
|
3434
|
-
h("div", { class: sheet$
|
|
3418
|
+
h("div", { class: sheet$9.classes.Image, style: {
|
|
3435
3419
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3436
3420
|
} },
|
|
3437
3421
|
h("img", { class: item.unavailableReasonCode
|
|
3438
3422
|
? "image subdued"
|
|
3439
3423
|
: "image", src: (item === null || item === void 0 ? void 0 : item.imageUrl) ||
|
|
3440
3424
|
getAssetPath("./assets/Reward-image.png") })),
|
|
3441
|
-
h("div", { class: sheet$
|
|
3425
|
+
h("div", { class: sheet$9.classes.TextArea, style: {
|
|
3442
3426
|
opacity: item.unavailableReasonCode ? "0.5" : "1",
|
|
3443
3427
|
} },
|
|
3444
3428
|
h("div", { class: "title", style: {
|
|
@@ -3471,7 +3455,7 @@ function RewardExchangeView(props) {
|
|
|
3471
3455
|
item.prettySourceMinValue,
|
|
3472
3456
|
}))))))));
|
|
3473
3457
|
}))),
|
|
3474
|
-
h("div", { class: sheet$
|
|
3458
|
+
h("div", { class: sheet$9.classes.Button },
|
|
3475
3459
|
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))),
|
|
3476
3460
|
];
|
|
3477
3461
|
}
|
|
@@ -3482,7 +3466,7 @@ function RewardExchangeView(props) {
|
|
|
3482
3466
|
? false
|
|
3483
3467
|
: input && !states.amount;
|
|
3484
3468
|
return (h("div", null,
|
|
3485
|
-
h("div", { class: sheet$
|
|
3469
|
+
h("div", { class: sheet$9.classes.ChooseAmount, part: "choose-amount-container" },
|
|
3486
3470
|
h("div", { class: "wrapper" },
|
|
3487
3471
|
h("img", { class: "image", src: (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.imageUrl) ||
|
|
3488
3472
|
getAssetPath("./assets/Reward-image.png") }),
|
|
@@ -3491,7 +3475,7 @@ function RewardExchangeView(props) {
|
|
|
3491
3475
|
((_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)),
|
|
3492
3476
|
((_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)),
|
|
3493
3477
|
h("div", { class: "space" }))),
|
|
3494
|
-
h("div", { class: sheet$
|
|
3478
|
+
h("div", { class: sheet$9.classes.Button },
|
|
3495
3479
|
h("sl-button", { exportparts: "base: secondarybutton-base", class: "cancel", size: "large", type: "text", onClick: () => callbacks.resetState() }, states.content.text.cancelText),
|
|
3496
3480
|
h("sl-button", { exportparts: "base: primarybutton-base", class: "continue", size: "large", onClick: () => callbacks.setStage("confirmation"), disabled: isDisabled }, states.content.text.continueToConfirmationText)))));
|
|
3497
3481
|
}
|
|
@@ -3499,8 +3483,8 @@ function RewardExchangeView(props) {
|
|
|
3499
3483
|
const cost = (selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettySourceValue) || selectedItem.prettySourceValue;
|
|
3500
3484
|
const amount = selectedStep === null || selectedStep === void 0 ? void 0 : selectedStep.prettyDestinationValue;
|
|
3501
3485
|
return (h("div", null,
|
|
3502
|
-
h("div", { class: sheet$
|
|
3503
|
-
h("div", { class: sheet$
|
|
3486
|
+
h("div", { class: sheet$9.classes.Confirmation, part: "confirmation-container" },
|
|
3487
|
+
h("div", { class: sheet$9.classes.Title }, states.content.text.redeemTitle),
|
|
3504
3488
|
h("div", { class: "wrapper" },
|
|
3505
3489
|
h("div", { class: "field" }, states.content.text.rewardNameTitle),
|
|
3506
3490
|
h("div", { class: "reward-item-container" },
|
|
@@ -3515,13 +3499,13 @@ function RewardExchangeView(props) {
|
|
|
3515
3499
|
h("div", { class: "wrapper top-border padding" },
|
|
3516
3500
|
h("div", { class: "field" }, states.content.text.costTitle),
|
|
3517
3501
|
h("div", { class: "value" }, cost)),
|
|
3518
|
-
h("div", { class: sheet$
|
|
3502
|
+
h("div", { class: sheet$9.classes.Button },
|
|
3519
3503
|
h("sl-button", { class: "cancel", type: "text", size: "large", onClick: () => callbacks.setStage("chooseAmount") }, states.content.text.backText),
|
|
3520
3504
|
h("sl-button", { class: "continue", size: "large", loading: states.loading, onClick: callbacks.exchangeReward }, states.content.text.redeemText)))));
|
|
3521
3505
|
}
|
|
3522
3506
|
function success() {
|
|
3523
3507
|
var _a, _b, _c, _d, _e, _f;
|
|
3524
|
-
return (h("div", { class: sheet$
|
|
3508
|
+
return (h("div", { class: sheet$9.classes.Success, part: "success-container" },
|
|
3525
3509
|
h(Gift$1, null),
|
|
3526
3510
|
h(Confetti, null),
|
|
3527
3511
|
h("div", { class: "title" }, (_a = states.content.text) === null || _a === void 0 ? void 0 : _a.rewardRedeemedText),
|
|
@@ -3536,7 +3520,7 @@ function RewardExchangeView(props) {
|
|
|
3536
3520
|
(data === null || data === void 0 ? void 0 : data.fuelTankCode) && (h("div", { class: "promo" },
|
|
3537
3521
|
states.content.text.promoCode,
|
|
3538
3522
|
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 }))),
|
|
3539
|
-
h("div", { class: sheet$
|
|
3523
|
+
h("div", { class: sheet$9.classes.Button },
|
|
3540
3524
|
h("sl-button", { class: "continue center", type: "primary", size: "large", onClick: () => callbacks.resetState(true) }, states.content.text.doneText))));
|
|
3541
3525
|
}
|
|
3542
3526
|
const stages = {
|
|
@@ -3548,7 +3532,7 @@ function RewardExchangeView(props) {
|
|
|
3548
3532
|
const currentStage = stages[states.redeemStage];
|
|
3549
3533
|
function stageMap() {
|
|
3550
3534
|
const stageNumber = stageList.indexOf(states.redeemStage);
|
|
3551
|
-
return (h("div", { class: sheet$
|
|
3535
|
+
return (h("div", { class: sheet$9.classes.ProgressBar },
|
|
3552
3536
|
h("div", { class: "text-area" }, Object.keys(stageProgressList).map((stage) => {
|
|
3553
3537
|
if (stageList.indexOf(stage) <= stageNumber) {
|
|
3554
3538
|
return h("span", { class: "text" }, stageProgressList[stage]);
|
|
@@ -3560,10 +3544,10 @@ function RewardExchangeView(props) {
|
|
|
3560
3544
|
h(ProgressBar, { stageCount: 3, currentStage: stageNumber })));
|
|
3561
3545
|
}
|
|
3562
3546
|
function loading() {
|
|
3563
|
-
return (h("div", { class: sheet$
|
|
3547
|
+
return (h("div", { class: sheet$9.classes.Grid, part: "loading-container" }, [...Array(states.content.text.skeletonCardNum)].map(() => {
|
|
3564
3548
|
return (h("div", null,
|
|
3565
|
-
h("sl-card", { class: sheet$
|
|
3566
|
-
h("div", { class: sheet$
|
|
3549
|
+
h("sl-card", { class: sheet$9.classes.Card },
|
|
3550
|
+
h("div", { class: sheet$9.classes.CardLayout },
|
|
3567
3551
|
h("div", null,
|
|
3568
3552
|
h("sl-skeleton", { style: {
|
|
3569
3553
|
width: "100px",
|
|
@@ -3595,12 +3579,12 @@ function RewardExchangeView(props) {
|
|
|
3595
3579
|
if (!(refs === null || refs === void 0 ? void 0 : refs.canvasRef))
|
|
3596
3580
|
return;
|
|
3597
3581
|
refs.canvasRef.current = canvas;
|
|
3598
|
-
}, id: "my-canvas", class: sheet$
|
|
3582
|
+
}, id: "my-canvas", class: sheet$9.classes.Confetti }));
|
|
3599
3583
|
}
|
|
3600
3584
|
if (states.noExchangeOptions)
|
|
3601
3585
|
return states.content.text.empty;
|
|
3602
|
-
return (h("div", { class: sheet$
|
|
3603
|
-
h("style", { type: "text/css" }, styleString$
|
|
3586
|
+
return (h("div", { class: sheet$9.classes.Container, part: "sqm-base" },
|
|
3587
|
+
h("style", { type: "text/css" }, styleString$9),
|
|
3604
3588
|
h("div", null,
|
|
3605
3589
|
stageMap(),
|
|
3606
3590
|
states.exchangeError && errorMessage(),
|
|
@@ -4016,7 +4000,7 @@ function CardFeedView(props, children) {
|
|
|
4016
4000
|
h("div", { class: sheet.classes.Container, part: "sqm-base" }, children)));
|
|
4017
4001
|
}
|
|
4018
4002
|
|
|
4019
|
-
const style$
|
|
4003
|
+
const style$a = {
|
|
4020
4004
|
HostBlock: HostBlock,
|
|
4021
4005
|
couponCodeLabel: {
|
|
4022
4006
|
margin: "var(--sl-spacing-x-small) 0",
|
|
@@ -4030,15 +4014,15 @@ const vanillaStyle$6 = `
|
|
|
4030
4014
|
width: 100%;
|
|
4031
4015
|
}
|
|
4032
4016
|
`;
|
|
4033
|
-
const sheet$
|
|
4034
|
-
const styleString$
|
|
4017
|
+
const sheet$a = createStyleSheet(style$a);
|
|
4018
|
+
const styleString$a = sheet$a.toString();
|
|
4035
4019
|
function CouponCodeView(props) {
|
|
4036
4020
|
const error = !props.loading && props.error;
|
|
4037
4021
|
return (h("div", null,
|
|
4038
4022
|
h("style", { type: "text/css" },
|
|
4039
|
-
styleString$
|
|
4023
|
+
styleString$a,
|
|
4040
4024
|
vanillaStyle$6),
|
|
4041
|
-
h("p", { class: sheet$
|
|
4025
|
+
h("p", { class: sheet$a.classes.couponCodeLabel, style: { textAlign: props.textAlign } }, props.couponCodeLabel),
|
|
4042
4026
|
error ? (h("sqm-form-message", { type: props.errorType, exportparts: "erroralert-icon" },
|
|
4043
4027
|
h("div", { part: "erroralert-text" }, props.errorText))) : (h(CopyTextView, Object.assign({}, props)))));
|
|
4044
4028
|
}
|