@saasquatch/mint-components 1.5.0-63 → 1.5.0-64

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.
Files changed (39) hide show
  1. package/dist/cjs/{AutoColor-86984176.js → AutoColor-b11cfa86.js} +12 -112
  2. package/dist/cjs/sqm-big-stat.cjs.entry.js +1 -1
  3. package/dist/cjs/sqm-brand_27.cjs.entry.js +7 -6
  4. package/dist/cjs/sqm-stencilbook.cjs.entry.js +3 -6
  5. package/dist/cjs/{useDemoBigStat-42fa7a69.js → useDemoBigStat-426e3319.js} +1 -0
  6. package/dist/collection/components/sqm-big-stat/useDemoBigStat.js +1 -0
  7. package/dist/collection/components/sqm-hero-image/HeroImage.stories.js +1 -3
  8. package/dist/collection/components/sqm-hero-image/sqm-hero-image-view.js +3 -2
  9. package/dist/collection/components/sqm-task-card/sqm-task-card-view.js +12 -4
  10. package/dist/collection/components/sqm-task-card/sqm-task-card.js +2 -2
  11. package/dist/esm/{AutoColor-8f7bfd93.js → AutoColor-237cc98b.js} +12 -112
  12. package/dist/esm/sqm-big-stat.entry.js +1 -1
  13. package/dist/esm/sqm-brand_27.entry.js +7 -6
  14. package/dist/esm/sqm-stencilbook.entry.js +3 -6
  15. package/dist/esm/{useDemoBigStat-e2295035.js → useDemoBigStat-022e116d.js} +1 -0
  16. package/dist/esm-es5/AutoColor-237cc98b.js +1 -0
  17. package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
  18. package/dist/esm-es5/sqm-brand_27.entry.js +1 -1
  19. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  20. package/dist/esm-es5/{useDemoBigStat-e2295035.js → useDemoBigStat-022e116d.js} +1 -1
  21. package/dist/mint-components/mint-components.esm.js +1 -1
  22. package/dist/mint-components/{p-7a1ebc00.js → p-0d66fc45.js} +1 -1
  23. package/dist/mint-components/p-2b76e82d.entry.js +119 -0
  24. package/dist/mint-components/p-67a980ab.system.js +1 -0
  25. package/dist/mint-components/{p-ef99c411.system.entry.js → p-7d74b018.system.entry.js} +1 -1
  26. package/dist/mint-components/{p-d10efde1.system.js → p-8a55dda8.system.js} +1 -1
  27. package/dist/mint-components/p-8d74871c.system.js +1 -1
  28. package/dist/mint-components/p-a1a29168.js +30 -0
  29. package/dist/mint-components/{p-af5673c4.entry.js → p-caad0168.entry.js} +1 -1
  30. package/dist/mint-components/{p-4ec7d05c.entry.js → p-cfc16fc9.entry.js} +2 -2
  31. package/dist/mint-components/p-daa938e2.system.entry.js +1 -0
  32. package/dist/mint-components/p-f213a257.system.entry.js +1 -0
  33. package/package.json +1 -1
  34. package/dist/esm-es5/AutoColor-8f7bfd93.js +0 -1
  35. package/dist/mint-components/p-011dfe2a.entry.js +0 -119
  36. package/dist/mint-components/p-192f8fc8.system.js +0 -1
  37. package/dist/mint-components/p-61f5f346.system.entry.js +0 -1
  38. package/dist/mint-components/p-73d800ed.js +0 -30
  39. package/dist/mint-components/p-96cd0c29.system.entry.js +0 -1
@@ -7,7 +7,6 @@ const index_module = require('./index.module-54724339.js');
7
7
  const mixins = require('./mixins-7b7c59fe.js');
8
8
  const JSS = require('./JSS-c65a40f1.js');
9
9
  const luxon = require('./luxon-59ca7d19.js');
10
- const utils = require('./utils-01dbfd4a.js');
11
10
  const sqmTextSpanView = require('./sqm-text-span-view-f101dedf.js');
12
11
  const sqmPortalContainerView = require('./sqm-portal-container-view-185b4bd0.js');
13
12
  const sqmPortalSectionView = require('./sqm-portal-section-view-7ce92f61.js');
@@ -588,17 +587,7 @@ const style$4 = {
588
587
  },
589
588
  };
590
589
  const sheet$4 = JSS.createStyleSheet(style$4);
591
- const styleString$4 = sheet$4.toString();
592
- function Details(props) {
593
- const rid = Math.random().toString(36).slice(2);
594
- return (index.h("div", null,
595
- index.h("style", { type: "text/css" }, styleString$4),
596
- index.h("span", { class: sheet$4.classes.Description },
597
- index.h("input", { type: "checkbox", id: "details-" + rid }),
598
- index.h("label", { class: "details", htmlFor: "details-" + rid },
599
- index.h("sl-icon", { name: "chevron-down" })),
600
- index.h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
601
- }
590
+ const styleString$4 = sheet$4.toString();
602
591
 
603
592
  const Gift = () => {
604
593
  return (index.h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -1177,9 +1166,9 @@ function TaskCardView(props) {
1177
1166
  console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
1178
1167
  console.log({ props });
1179
1168
  const { callbacks, states, content } = props;
1180
- const dateStart = content.showExpiry &&
1169
+ const dateStart = content.rewardDuration &&
1181
1170
  luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
1182
- const dateEnd = content.showExpiry &&
1171
+ const dateEnd = content.rewardDuration &&
1183
1172
  luxon.luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
1184
1173
  const dateToday = luxon.luxon.DateTime.now();
1185
1174
  if (content.displayDuration) {
@@ -1194,105 +1183,16 @@ function TaskCardView(props) {
1194
1183
  const checkmark_circle$1 = checkmark_circle();
1195
1184
  const checkmark_filled$1 = checkmark_filled();
1196
1185
  const arrow_left_right$1 = arrow_left_right();
1197
- const showComplete = states.progress >= content.goal;
1198
- const repetitions = content.showProgressBar
1199
- ? Math.floor(states.progress / content.goal)
1200
- : states.progress;
1201
- const taskComplete = (showComplete && content.repeatable === false) ||
1202
- (content.finite && states.progress >= content.finite * content.goal);
1203
- const taskEnded = content.showExpiry && dateEnd <= dateToday;
1204
- const taskNotStarted = content.showExpiry && dateToday <= dateStart;
1186
+ const taskEnded = dateToday > dateEnd;
1187
+ const taskNotStarted = dateToday < dateStart;
1205
1188
  const taskUnavailable = taskEnded || taskNotStarted;
1206
- const vanillaStyle = `
1207
- :host{
1208
- display: block;
1209
- margin-bottom: var(--sl-spacing-large);
1210
- }
1211
- `;
1212
- return (index.h("div", { class: sheet$6.classes.TaskCard },
1213
- index.h("style", { type: "text/css" },
1214
- styleString$6,
1215
- vanillaStyle),
1216
- !states.loading && taskNotStarted && (index.h("div", { class: sheet$6.classes.NotStarted },
1217
- index.h("span", { class: "icon" },
1218
- index.h("sl-icon", { name: "info-circle-fill" })),
1219
- global.intl.formatMessage({
1220
- id: "startsOnMessage",
1221
- defaultMessage: content.startsOnMessage,
1222
- }, {
1223
- startDate: dateStart
1224
- .setLocale(utils.luxonLocale(states.locale))
1225
- .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1226
- }))),
1227
- !states.loading && taskEnded && (index.h("div", { class: sheet$6.classes.Ended },
1228
- index.h("span", { class: "icon" },
1229
- index.h("sl-icon", { name: "exclamation-triangle-fill" })),
1230
- global.intl.formatMessage({
1231
- id: "endedMessage",
1232
- defaultMessage: content.endedMessage,
1233
- }, {
1234
- endDate: dateEnd
1235
- .setLocale(utils.luxonLocale(states.locale))
1236
- .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1237
- }))),
1238
- index.h("div", { style: {
1239
- borderRadius: taskUnavailable &&
1240
- "0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
1241
- }, class: taskUnavailable
1242
- ? "main expired"
1243
- : taskComplete
1244
- ? "main complete"
1245
- : "main" },
1246
- index.h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
1247
- index.h("div", { class: sheet$6.classes.Header }, states.loading ? (index.h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (index.h("div", null,
1248
- showComplete && (index.h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
1249
- index.h("span", { class: "value" }, content.rewardAmount),
1250
- index.h("span", { class: "text" }, content.rewardUnit)))),
1251
- states.loading ? (index.h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (index.h("div", { class: "title", style: {
1252
- marginBottom: !content.description
1253
- ? content.steps
1254
- ? "var(--sl-spacing-x-large)"
1255
- : content.showProgressBar
1256
- ? "var(--sl-spacing-xx-large)"
1257
- : ""
1258
- : "",
1259
- } }, content.cardTitle)),
1260
- states.loading ? (index.h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && index.h(Details, Object.assign({}, props))),
1261
- 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, { complete: taskComplete, expired: taskUnavailable })))),
1262
- index.h("div", { class: sheet$6.classes.Footer }, states.loading ? (index.h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (index.h("div", { style: { display: "contents" } },
1263
- index.h("span", { class: "text" },
1264
- content.repeatable && (index.h("div", null,
1265
- index.h("span", { class: repetitions > 0
1266
- ? taskUnavailable
1267
- ? "icon neutral"
1268
- : "icon success"
1269
- : "icon" }, arrow_left_right$1),
1270
- index.h("span", { class: repetitions > 0
1271
- ? taskUnavailable
1272
- ? "neutral"
1273
- : "success"
1274
- : "" }, global.intl.formatMessage({
1275
- id: "completedMessage",
1276
- defaultMessage: content.completedText,
1277
- }, {
1278
- finite: content.finite,
1279
- count: content.finite
1280
- ? Math.min(repetitions, content.finite)
1281
- : repetitions,
1282
- })))),
1283
- content.showExpiry && !taskUnavailable && (index.h("span", { class: "datetime" }, global.intl.formatMessage({
1284
- id: "expiryMessage",
1285
- defaultMessage: content.expiryMessage,
1286
- }, {
1287
- endDate: dateEnd
1288
- .setLocale(utils.luxonLocale(states.locale))
1289
- .toLocaleString(luxon.luxon.DateTime.DATETIME_MED),
1290
- })))),
1291
- index.h("sl-button", { class: taskUnavailable
1292
- ? "action neutral"
1293
- : taskComplete
1294
- ? "action disabled"
1295
- : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
1189
+ console.log("dateToday: " + dateToday);
1190
+ console.log("dateEnd: " + dateEnd);
1191
+ console.log("dateStart: " + dateStart);
1192
+ console.log("taskEnded: " + taskEnded);
1193
+ console.log("taskNotStarted: " + taskNotStarted);
1194
+ console.log("taskUnavailable: " + taskUnavailable);
1195
+ return index.h("div", null, "hello world!");
1296
1196
  }
1297
1197
 
1298
1198
  function ReferralIframeView(props) {
@@ -10,7 +10,7 @@ require('./extends-08099afd.js');
10
10
  require('./cjs-1066ec21.js');
11
11
  require('./JSS-c65a40f1.js');
12
12
  const sqmBigStatView = require('./sqm-big-stat-view-e5dc0877.js');
13
- const useDemoBigStat = require('./useDemoBigStat-42fa7a69.js');
13
+ const useDemoBigStat = require('./useDemoBigStat-426e3319.js');
14
14
 
15
15
  const BigStat = class {
16
16
  constructor(hostRef) {
@@ -17,9 +17,9 @@ const useChildElements = require('./useChildElements-4bc9b219.js');
17
17
  require('./luxon-59ca7d19.js');
18
18
  const utils = require('./utils-01dbfd4a.js');
19
19
  require('./sqm-text-span-view-f101dedf.js');
20
- const useDemoBigStat = require('./useDemoBigStat-42fa7a69.js');
20
+ const useDemoBigStat = require('./useDemoBigStat-426e3319.js');
21
21
  require('./sqm-portal-container-view-185b4bd0.js');
22
- const AutoColor = require('./AutoColor-86984176.js');
22
+ const AutoColor = require('./AutoColor-b11cfa86.js');
23
23
  require('./sqm-portal-section-view-7ce92f61.js');
24
24
 
25
25
  /**
@@ -440,7 +440,7 @@ function HeroImageView(props, children) {
440
440
  color: props.textColor || "var(--sl-color-neutral-900)",
441
441
  "& .image-area": {
442
442
  width: props.imagePercentage ? props.imagePercentage + "%" : "50%",
443
- padding: `var(--sl-spacing-${props.paddingImage})`,
443
+ padding: "var(--sl-spacing-" + props.paddingImage + ")",
444
444
  boxSizing: "border-box",
445
445
  margin: props.maxHeight ? "auto" : "",
446
446
  "@media (max-width: 599px)": {
@@ -451,7 +451,7 @@ function HeroImageView(props, children) {
451
451
  width: props.imagePercentage
452
452
  ? 100 - props.imagePercentage + "%"
453
453
  : "50%",
454
- padding: `var(--sl-spacing-${props.paddingText})`,
454
+ padding: "var(--sl-spacing-" + props.paddingText + ")",
455
455
  alignSelf: "center",
456
456
  boxSizing: "border-box",
457
457
  "@media (max-width: 599px)": {
@@ -493,6 +493,7 @@ function HeroImageView(props, children) {
493
493
  :host{
494
494
  display: block;
495
495
  }`;
496
+ console.log(props);
496
497
  return (index.h("div", { class: sheet.classes.Container },
497
498
  index.h("style", { type: "text/css" },
498
499
  vanillaStyle,
@@ -6826,9 +6827,9 @@ const TaskCard = class {
6826
6827
  }
6827
6828
  };
6828
6829
  function useTaskCardDemo(props) {
6829
- console.log("Task Card Props", props);
6830
+ console.log("Task Card Props", props.demoData);
6830
6831
  return cjs.cjs({
6831
- states: { loadingEvent: false, progress: 0, locale: "en" },
6832
+ states: { loadingEvent: false, locale: "en" },
6832
6833
  callbacks: {
6833
6834
  sendEvent: (event) => console.log(event),
6834
6835
  onClick: () => console.log("clicked"),
@@ -14,11 +14,10 @@ require('./mixins-7b7c59fe.js');
14
14
  const JSS = require('./JSS-c65a40f1.js');
15
15
  const GenericTableView = require('./GenericTableView-c8f8f3fe.js');
16
16
  const luxon = require('./luxon-59ca7d19.js');
17
- require('./utils-01dbfd4a.js');
18
17
  require('./sqm-text-span-view-f101dedf.js');
19
18
  const sqmAssetCardView = require('./sqm-asset-card-view-d9ac6a95.js');
20
19
  const sqmBigStatView = require('./sqm-big-stat-view-e5dc0877.js');
21
- const useDemoBigStat = require('./useDemoBigStat-42fa7a69.js');
20
+ const useDemoBigStat = require('./useDemoBigStat-426e3319.js');
22
21
  const sqmHeroView = require('./sqm-hero-view-a13795c0.js');
23
22
  const useLeaderboard = require('./useLeaderboard-9e950912.js');
24
23
  const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-35015d30.js');
@@ -33,7 +32,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-04eaaac9.js');
33
32
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-1fdc957e.js');
34
33
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-4c78e231.js');
35
34
  const sqmStatContainerView = require('./sqm-stat-container-view-5b2db929.js');
36
- const AutoColor = require('./AutoColor-86984176.js');
35
+ const AutoColor = require('./AutoColor-b11cfa86.js');
37
36
  const sqmPortalSectionView = require('./sqm-portal-section-view-7ce92f61.js');
38
37
 
39
38
  /**
@@ -10860,9 +10859,7 @@ const ColumnsReverse = () => {
10860
10859
  return (index.h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", imagePos: "right", imageMobilePos: "bottom" }));
10861
10860
  };
10862
10861
  const ColumnsCustomPercentage = () => {
10863
- return (index.h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%",
10864
- // minHeight="125px"
10865
- maxHeight: "150px", maxWidth: "100%", paddingImage: "large", paddingText: "large" }));
10862
+ return (index.h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%", "max-height": "150px", "max-width": "100%", paddingImage: "large", paddingText: "large" }));
10866
10863
  };
10867
10864
  const ColumnsCustom = () => {
10868
10865
  return (index.h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", "text-color": "#fffc4b", "background-color": "#ff7f7f" }));
@@ -929,6 +929,7 @@ function useDemoBigStat(props) {
929
929
  return {
930
930
  props: cjs.cjs({
931
931
  statvalue: "12345",
932
+ value: 0,
932
933
  flexReverse: false,
933
934
  alignment: "center",
934
935
  }, props.demoData || {}, { arrayMerge: (_, a) => a }),
@@ -22,6 +22,7 @@ export function useDemoBigStat(props) {
22
22
  return {
23
23
  props: deepmerge({
24
24
  statvalue: "12345",
25
+ value: 0,
25
26
  flexReverse: false,
26
27
  alignment: "center",
27
28
  }, props.demoData || {}, { arrayMerge: (_, a) => a }),
@@ -33,9 +33,7 @@ export const ColumnsReverse = () => {
33
33
  return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", imagePos: "right", imageMobilePos: "bottom" }));
34
34
  };
35
35
  export const ColumnsCustomPercentage = () => {
36
- return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%",
37
- // minHeight="125px"
38
- maxHeight: "150px", maxWidth: "100%", paddingImage: "large", paddingText: "large" }));
36
+ return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%", "max-height": "150px", "max-width": "100%", paddingImage: "large", paddingText: "large" }));
39
37
  };
40
38
  export const ColumnsCustom = () => {
41
39
  return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", "text-color": "#fffc4b", "background-color": "#ff7f7f" }));
@@ -46,7 +46,7 @@ export function HeroImageView(props, children) {
46
46
  color: props.textColor || "var(--sl-color-neutral-900)",
47
47
  "& .image-area": {
48
48
  width: props.imagePercentage ? props.imagePercentage + "%" : "50%",
49
- padding: `var(--sl-spacing-${props.paddingImage})`,
49
+ padding: "var(--sl-spacing-" + props.paddingImage + ")",
50
50
  boxSizing: "border-box",
51
51
  margin: props.maxHeight ? "auto" : "",
52
52
  "@media (max-width: 599px)": {
@@ -57,7 +57,7 @@ export function HeroImageView(props, children) {
57
57
  width: props.imagePercentage
58
58
  ? 100 - props.imagePercentage + "%"
59
59
  : "50%",
60
- padding: `var(--sl-spacing-${props.paddingText})`,
60
+ padding: "var(--sl-spacing-" + props.paddingText + ")",
61
61
  alignSelf: "center",
62
62
  boxSizing: "border-box",
63
63
  "@media (max-width: 599px)": {
@@ -99,6 +99,7 @@ export function HeroImageView(props, children) {
99
99
  :host{
100
100
  display: block;
101
101
  }`;
102
+ console.log(props);
102
103
  return (h("div", { class: sheet.classes.Container },
103
104
  h("style", { type: "text/css" },
104
105
  vanillaStyle,
@@ -163,9 +163,9 @@ export function TaskCardView(props) {
163
163
  console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
164
164
  console.log({ props });
165
165
  const { callbacks, states, content } = props;
166
- const dateStart = content.showExpiry &&
166
+ const dateStart = content.rewardDuration &&
167
167
  DateTime.fromISO(content.rewardDuration.split("/")[0]);
168
- const dateEnd = content.showExpiry &&
168
+ const dateEnd = content.rewardDuration &&
169
169
  DateTime.fromISO(content.rewardDuration.split("/")[1]);
170
170
  const dateToday = DateTime.now();
171
171
  if (content.displayDuration) {
@@ -186,9 +186,17 @@ export function TaskCardView(props) {
186
186
  : states.progress;
187
187
  const taskComplete = (showComplete && content.repeatable === false) ||
188
188
  (content.finite && states.progress >= content.finite * content.goal);
189
- const taskEnded = content.showExpiry && dateEnd <= dateToday;
190
- const taskNotStarted = content.showExpiry && dateToday <= dateStart;
189
+ const taskEnded = dateToday > dateEnd;
190
+ const taskNotStarted = dateToday < dateStart;
191
191
  const taskUnavailable = taskEnded || taskNotStarted;
192
+ console.log("dateToday: " + dateToday);
193
+ console.log("dateEnd: " + dateEnd);
194
+ console.log("dateStart: " + dateStart);
195
+ console.log("taskEnded: " + taskEnded);
196
+ console.log("taskNotStarted: " + taskNotStarted);
197
+ console.log("taskUnavailable: " + taskUnavailable);
198
+ if (1 == 1)
199
+ return h("div", null, "hello world!");
192
200
  const vanillaStyle = `
193
201
  :host{
194
202
  display: block;
@@ -667,9 +667,9 @@ export class TaskCard {
667
667
  }; }
668
668
  }
669
669
  function useTaskCardDemo(props) {
670
- console.log("Task Card Props", props);
670
+ console.log("Task Card Props", props.demoData);
671
671
  return deepmerge({
672
- states: { loadingEvent: false, progress: 0, locale: "en" },
672
+ states: { loadingEvent: false, locale: "en" },
673
673
  callbacks: {
674
674
  sendEvent: (event) => console.log(event),
675
675
  onClick: () => console.log("clicked"),
@@ -5,7 +5,6 @@ import { d as dist, M, n as ne, x, b as mn, D as De, f as D } from './index.modu
5
5
  import { H as HostBlock, A as AuthWrapper, a as AuthColumn, b as AuthButtonsContainer, E as ErrorStyles } from './mixins-10353a39.js';
6
6
  import { c as createStyleSheet } from './JSS-96eeab98.js';
7
7
  import { l as luxon } from './luxon-5fa22651.js';
8
- import { l as luxonLocale } from './utils-1d345130.js';
9
8
  import { T as TextSpanView } from './sqm-text-span-view-7e61c95c.js';
10
9
  import { P as PortalContainerView } from './sqm-portal-container-view-cf79ed90.js';
11
10
  import { P as PortalSectionView } from './sqm-portal-section-view-6649c4c6.js';
@@ -586,17 +585,7 @@ const style$4 = {
586
585
  },
587
586
  };
588
587
  const sheet$4 = createStyleSheet(style$4);
589
- const styleString$4 = sheet$4.toString();
590
- function Details(props) {
591
- const rid = Math.random().toString(36).slice(2);
592
- return (h("div", null,
593
- h("style", { type: "text/css" }, styleString$4),
594
- h("span", { class: sheet$4.classes.Description },
595
- h("input", { type: "checkbox", id: "details-" + rid }),
596
- h("label", { class: "details", htmlFor: "details-" + rid },
597
- h("sl-icon", { name: "chevron-down" })),
598
- h("span", { class: "summary", "progress-bar": props.progressBar }, props.content.description))));
599
- }
588
+ const styleString$4 = sheet$4.toString();
600
589
 
601
590
  const Gift = () => {
602
591
  return (h("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
@@ -1175,9 +1164,9 @@ function TaskCardView(props) {
1175
1164
  console.log("TASK CARD PROPS " + ((_a = props === null || props === void 0 ? void 0 : props.content) === null || _a === void 0 ? void 0 : _a.cardTitle));
1176
1165
  console.log({ props });
1177
1166
  const { callbacks, states, content } = props;
1178
- const dateStart = content.showExpiry &&
1167
+ const dateStart = content.rewardDuration &&
1179
1168
  luxon.DateTime.fromISO(content.rewardDuration.split("/")[0]);
1180
- const dateEnd = content.showExpiry &&
1169
+ const dateEnd = content.rewardDuration &&
1181
1170
  luxon.DateTime.fromISO(content.rewardDuration.split("/")[1]);
1182
1171
  const dateToday = luxon.DateTime.now();
1183
1172
  if (content.displayDuration) {
@@ -1192,105 +1181,16 @@ function TaskCardView(props) {
1192
1181
  const checkmark_circle$1 = checkmark_circle();
1193
1182
  const checkmark_filled$1 = checkmark_filled();
1194
1183
  const arrow_left_right$1 = arrow_left_right();
1195
- const showComplete = states.progress >= content.goal;
1196
- const repetitions = content.showProgressBar
1197
- ? Math.floor(states.progress / content.goal)
1198
- : states.progress;
1199
- const taskComplete = (showComplete && content.repeatable === false) ||
1200
- (content.finite && states.progress >= content.finite * content.goal);
1201
- const taskEnded = content.showExpiry && dateEnd <= dateToday;
1202
- const taskNotStarted = content.showExpiry && dateToday <= dateStart;
1184
+ const taskEnded = dateToday > dateEnd;
1185
+ const taskNotStarted = dateToday < dateStart;
1203
1186
  const taskUnavailable = taskEnded || taskNotStarted;
1204
- const vanillaStyle = `
1205
- :host{
1206
- display: block;
1207
- margin-bottom: var(--sl-spacing-large);
1208
- }
1209
- `;
1210
- return (h("div", { class: sheet$6.classes.TaskCard },
1211
- h("style", { type: "text/css" },
1212
- styleString$6,
1213
- vanillaStyle),
1214
- !states.loading && taskNotStarted && (h("div", { class: sheet$6.classes.NotStarted },
1215
- h("span", { class: "icon" },
1216
- h("sl-icon", { name: "info-circle-fill" })),
1217
- intl.formatMessage({
1218
- id: "startsOnMessage",
1219
- defaultMessage: content.startsOnMessage,
1220
- }, {
1221
- startDate: dateStart
1222
- .setLocale(luxonLocale(states.locale))
1223
- .toLocaleString(luxon.DateTime.DATETIME_MED),
1224
- }))),
1225
- !states.loading && taskEnded && (h("div", { class: sheet$6.classes.Ended },
1226
- h("span", { class: "icon" },
1227
- h("sl-icon", { name: "exclamation-triangle-fill" })),
1228
- intl.formatMessage({
1229
- id: "endedMessage",
1230
- defaultMessage: content.endedMessage,
1231
- }, {
1232
- endDate: dateEnd
1233
- .setLocale(luxonLocale(states.locale))
1234
- .toLocaleString(luxon.DateTime.DATETIME_MED),
1235
- }))),
1236
- h("div", { style: {
1237
- borderRadius: taskUnavailable &&
1238
- "0 0 var(--sl-border-radius-medium) var(--sl-border-radius-medium)",
1239
- }, class: taskUnavailable
1240
- ? "main expired"
1241
- : taskComplete
1242
- ? "main complete"
1243
- : "main" },
1244
- h("div", { class: taskComplete || taskUnavailable ? "container subdued" : "container" },
1245
- h("div", { class: sheet$6.classes.Header }, states.loading ? (h("sl-skeleton", { style: { width: "22%", margin: "0" } })) : (h("div", null,
1246
- showComplete && (h("span", { class: taskUnavailable ? "icon neutral" : "icon" }, taskComplete ? checkmark_filled$1 : checkmark_circle$1)),
1247
- h("span", { class: "value" }, content.rewardAmount),
1248
- h("span", { class: "text" }, content.rewardUnit)))),
1249
- states.loading ? (h("sl-skeleton", { style: { width: "42%", margin: "var(--sl-spacing-medium) 0" } })) : (h("div", { class: "title", style: {
1250
- marginBottom: !content.description
1251
- ? content.steps
1252
- ? "var(--sl-spacing-x-large)"
1253
- : content.showProgressBar
1254
- ? "var(--sl-spacing-xx-large)"
1255
- : ""
1256
- : "",
1257
- } }, content.cardTitle)),
1258
- states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.description && h(Details, Object.assign({}, props))),
1259
- content.showProgressBar && states.loading ? (h("sl-skeleton", { style: { margin: "var(--sl-spacing-medium) 0" } })) : (content.showProgressBar && (h(ProgressBarView, Object.assign({}, props.content, props.states, { complete: taskComplete, expired: taskUnavailable })))),
1260
- h("div", { class: sheet$6.classes.Footer }, states.loading ? (h("sl-skeleton", { style: { width: "25%", marginLeft: "auto" } })) : (h("div", { style: { display: "contents" } },
1261
- h("span", { class: "text" },
1262
- content.repeatable && (h("div", null,
1263
- h("span", { class: repetitions > 0
1264
- ? taskUnavailable
1265
- ? "icon neutral"
1266
- : "icon success"
1267
- : "icon" }, arrow_left_right$1),
1268
- h("span", { class: repetitions > 0
1269
- ? taskUnavailable
1270
- ? "neutral"
1271
- : "success"
1272
- : "" }, intl.formatMessage({
1273
- id: "completedMessage",
1274
- defaultMessage: content.completedText,
1275
- }, {
1276
- finite: content.finite,
1277
- count: content.finite
1278
- ? Math.min(repetitions, content.finite)
1279
- : repetitions,
1280
- })))),
1281
- content.showExpiry && !taskUnavailable && (h("span", { class: "datetime" }, intl.formatMessage({
1282
- id: "expiryMessage",
1283
- defaultMessage: content.expiryMessage,
1284
- }, {
1285
- endDate: dateEnd
1286
- .setLocale(luxonLocale(states.locale))
1287
- .toLocaleString(luxon.DateTime.DATETIME_MED),
1288
- })))),
1289
- h("sl-button", { class: taskUnavailable
1290
- ? "action neutral"
1291
- : taskComplete
1292
- ? "action disabled"
1293
- : "action", type: "primary", size: "small", onClick: callbacks.onClick, loading: states.loadingEvent, disabled: taskComplete || taskUnavailable }, content.buttonText))))))));
1187
+ console.log("dateToday: " + dateToday);
1188
+ console.log("dateEnd: " + dateEnd);
1189
+ console.log("dateStart: " + dateStart);
1190
+ console.log("taskEnded: " + taskEnded);
1191
+ console.log("taskNotStarted: " + taskNotStarted);
1192
+ console.log("taskUnavailable: " + taskUnavailable);
1193
+ return h("div", null, "hello world!");
1294
1194
  }
1295
1195
 
1296
1196
  function ReferralIframeView(props) {
@@ -6,7 +6,7 @@ import './extends-c31f1eff.js';
6
6
  import './cjs-bdfb4486.js';
7
7
  import './JSS-96eeab98.js';
8
8
  import { B as BigStatView } from './sqm-big-stat-view-309f7c1f.js';
9
- import { u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-e2295035.js';
9
+ import { u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-022e116d.js';
10
10
 
11
11
  const BigStat = class {
12
12
  constructor(hostRef) {
@@ -13,9 +13,9 @@ import { a as useChildElements, b as useRequestRerender } from './useChildElemen
13
13
  import './luxon-5fa22651.js';
14
14
  import { g as getProps, a as getMissingProps } from './utils-1d345130.js';
15
15
  import './sqm-text-span-view-7e61c95c.js';
16
- import { p as pathToRegexp, u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-e2295035.js';
16
+ import { p as pathToRegexp, u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-022e116d.js';
17
17
  import './sqm-portal-container-view-cf79ed90.js';
18
- import { h as autoColorScaleCss, C as CardFeedView, E as EditProfileView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, T as TaskCardView } from './AutoColor-8f7bfd93.js';
18
+ import { h as autoColorScaleCss, C as CardFeedView, E as EditProfileView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, T as TaskCardView } from './AutoColor-237cc98b.js';
19
19
  import './sqm-portal-section-view-6649c4c6.js';
20
20
 
21
21
  /**
@@ -436,7 +436,7 @@ function HeroImageView(props, children) {
436
436
  color: props.textColor || "var(--sl-color-neutral-900)",
437
437
  "& .image-area": {
438
438
  width: props.imagePercentage ? props.imagePercentage + "%" : "50%",
439
- padding: `var(--sl-spacing-${props.paddingImage})`,
439
+ padding: "var(--sl-spacing-" + props.paddingImage + ")",
440
440
  boxSizing: "border-box",
441
441
  margin: props.maxHeight ? "auto" : "",
442
442
  "@media (max-width: 599px)": {
@@ -447,7 +447,7 @@ function HeroImageView(props, children) {
447
447
  width: props.imagePercentage
448
448
  ? 100 - props.imagePercentage + "%"
449
449
  : "50%",
450
- padding: `var(--sl-spacing-${props.paddingText})`,
450
+ padding: "var(--sl-spacing-" + props.paddingText + ")",
451
451
  alignSelf: "center",
452
452
  boxSizing: "border-box",
453
453
  "@media (max-width: 599px)": {
@@ -489,6 +489,7 @@ function HeroImageView(props, children) {
489
489
  :host{
490
490
  display: block;
491
491
  }`;
492
+ console.log(props);
492
493
  return (h$1("div", { class: sheet.classes.Container },
493
494
  h$1("style", { type: "text/css" },
494
495
  vanillaStyle,
@@ -6822,9 +6823,9 @@ const TaskCard = class {
6822
6823
  }
6823
6824
  };
6824
6825
  function useTaskCardDemo(props) {
6825
- console.log("Task Card Props", props);
6826
+ console.log("Task Card Props", props.demoData);
6826
6827
  return cjs({
6827
- states: { loadingEvent: false, progress: 0, locale: "en" },
6828
+ states: { loadingEvent: false, locale: "en" },
6828
6829
  callbacks: {
6829
6830
  sendEvent: (event) => console.log(event),
6830
6831
  onClick: () => console.log("clicked"),
@@ -10,11 +10,10 @@ import './mixins-10353a39.js';
10
10
  import { c as createStyleSheet } from './JSS-96eeab98.js';
11
11
  import { G as GenericTableView } from './GenericTableView-24f2dcb2.js';
12
12
  import { l as luxon } from './luxon-5fa22651.js';
13
- import './utils-1d345130.js';
14
13
  import './sqm-text-span-view-7e61c95c.js';
15
14
  import { A as AssetCardView } from './sqm-asset-card-view-f9ca5345.js';
16
15
  import { B as BigStatView } from './sqm-big-stat-view-309f7c1f.js';
17
- import { a as useBigStat, u as useDemoBigStat } from './useDemoBigStat-e2295035.js';
16
+ import { a as useBigStat, u as useDemoBigStat } from './useDemoBigStat-022e116d.js';
18
17
  import { H as HeroView } from './sqm-hero-view-190bc812.js';
19
18
  import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './useLeaderboard-b670847e.js';
20
19
  import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-da91f5f3.js';
@@ -29,7 +28,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-827776f5.js';
29
28
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-73e14282.js';
30
29
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-cbf1cfdc.js';
31
30
  import { S as StatContainerView } from './sqm-stat-container-view-8a565c5a.js';
32
- import { S as ShareButtonView, a as ShareLinkView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss } from './AutoColor-8f7bfd93.js';
31
+ import { S as ShareButtonView, a as ShareLinkView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as PortalChangePasswordView, d as PortalLoginView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, R as ReferralIframeView, g as RewardExchangeView, C as CardFeedView, h as autoColorScaleCss } from './AutoColor-237cc98b.js';
33
32
  import { P as PortalSectionView } from './sqm-portal-section-view-6649c4c6.js';
34
33
 
35
34
  /**
@@ -10856,9 +10855,7 @@ const ColumnsReverse = () => {
10856
10855
  return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", imagePos: "right", imageMobilePos: "bottom" }));
10857
10856
  };
10858
10857
  const ColumnsCustomPercentage = () => {
10859
- return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%",
10860
- // minHeight="125px"
10861
- maxHeight: "150px", maxWidth: "100%", paddingImage: "large", paddingText: "large" }));
10858
+ return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/2evfTx7.png", description: "Be one of the top 3 referrers at the end of the year and receive Klip free for 1 year!", layout: "columns", "image-percentage": "25%", "max-height": "150px", "max-width": "100%", paddingImage: "large", paddingText: "large" }));
10862
10859
  };
10863
10860
  const ColumnsCustom = () => {
10864
10861
  return (h("sqm-hero-image", { "image-url": "https://i.imgur.com/yr6ER3R.png", header: "Klip Rewards", description: "Refer friends or complete tasks while using Klip to earn rewards", "button-text": "Start earning", layout: "columns", "text-color": "#fffc4b", "background-color": "#ff7f7f" }));
@@ -927,6 +927,7 @@ function useDemoBigStat(props) {
927
927
  return {
928
928
  props: cjs({
929
929
  statvalue: "12345",
930
+ value: 0,
930
931
  flexReverse: false,
931
932
  alignment: "center",
932
933
  }, props.demoData || {}, { arrayMerge: (_, a) => a }),