@saasquatch/mint-components 1.5.0-79 → 1.5.0-82
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/{GenericTableView-bdb16907.js → GenericTableView-9e45c15f.js} +9 -3
- package/dist/cjs/{ShadowViewAddon-5fef14ad.js → ShadowViewAddon-25ad8736.js} +31 -0
- package/dist/cjs/sqm-brand_29.cjs.entry.js +2 -2
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +3 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +3 -2
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +2 -2
- package/dist/collection/components/sqm-referral-table/sqm-referral-table.js +3 -2
- package/dist/collection/components/sqm-reward-exchange-list/RewardExchangeListData.js +30 -0
- package/dist/collection/components/sqm-reward-exchange-list/sqm-reward-exchange-list.js +2 -2
- package/dist/collection/components/sqm-rewards-table/sqm-rewards-table.js +3 -2
- package/dist/collection/tables/GenericTableView.js +9 -3
- package/dist/esm/{GenericTableView-ea3fc435.js → GenericTableView-54db7aa8.js} +9 -3
- package/dist/esm/{ShadowViewAddon-93efc48c.js → ShadowViewAddon-94819113.js} +31 -1
- package/dist/esm/sqm-brand_29.entry.js +2 -2
- package/dist/esm/sqm-referral-table_11.entry.js +3 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +3 -2
- package/dist/esm/sqm-stencilbook.entry.js +2 -2
- package/dist/esm-es5/{GenericTableView-ea3fc435.js → GenericTableView-54db7aa8.js} +1 -1
- package/dist/esm-es5/{ShadowViewAddon-93efc48c.js → ShadowViewAddon-94819113.js} +1 -1
- package/dist/esm-es5/sqm-brand_29.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/mint-components.esm.js +1 -1
- package/dist/mint-components/p-233dfb7d.system.js +1 -1
- package/dist/mint-components/{p-49cb162a.system.js → p-321c9147.system.js} +1 -1
- package/dist/mint-components/{p-d61b4cae.entry.js → p-376d9934.entry.js} +1 -1
- package/dist/mint-components/{p-dbb2ce34.system.entry.js → p-3e4e21df.system.entry.js} +1 -1
- package/dist/mint-components/{p-30ae1c61.entry.js → p-50b8a650.entry.js} +1 -1
- package/dist/mint-components/{p-d68b054c.js → p-60b42e77.js} +4 -4
- package/dist/mint-components/p-6f9e26fc.entry.js +90 -0
- package/dist/mint-components/p-72736402.system.entry.js +1 -0
- package/dist/mint-components/p-7ac02c73.entry.js +1 -0
- package/dist/mint-components/p-9035a109.system.entry.js +1 -0
- package/dist/mint-components/{p-36c62c0e.system.js → p-b8842fa1.system.js} +1 -1
- package/dist/mint-components/{p-9bf208d8.js → p-d2133cfe.js} +1 -1
- package/dist/mint-components/{p-5ac95896.system.entry.js → p-f0e1d325.system.entry.js} +1 -1
- package/dist/types/components/sqm-reward-exchange-list/RewardExchangeListData.d.ts +52 -0
- package/package.json +1 -1
- package/dist/mint-components/p-589898ee.entry.js +0 -1
- package/dist/mint-components/p-8445cc79.entry.js +0 -90
- package/dist/mint-components/p-d2d4a54f.system.entry.js +0 -1
- package/dist/mint-components/p-e32e55a8.system.entry.js +0 -1
|
@@ -97,9 +97,15 @@ function GenericTableView(props) {
|
|
|
97
97
|
index.h("tbody", null,
|
|
98
98
|
show === "loading" && elements.loadingElement,
|
|
99
99
|
show === "empty" && elements.emptyElement,
|
|
100
|
-
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) =>
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => {
|
|
101
|
+
console.log("ROW", row);
|
|
102
|
+
return (index.h("tr", { style: {
|
|
103
|
+
borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
|
|
104
|
+
}, part: "table-row" }, row.map((cell, j) => {
|
|
105
|
+
console.log("CELL", cell);
|
|
106
|
+
return (index.h("td", { class: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "hidden" : "", "data-label": columns[j] + ":" }, cell));
|
|
107
|
+
})));
|
|
108
|
+
})))),
|
|
103
109
|
index.h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|
|
104
110
|
index.h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base", class: !states.hasPrev ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.prevLabel),
|
|
105
111
|
index.h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base", class: !states.hasNext ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.moreLabel))));
|
|
@@ -2204,6 +2204,33 @@ const variableValue = (min, max, unit) => ({
|
|
|
2204
2204
|
sourceMaxValue: max,
|
|
2205
2205
|
prettySourceMaxValue: max + " " + unit,
|
|
2206
2206
|
});
|
|
2207
|
+
const demoData = [
|
|
2208
|
+
{
|
|
2209
|
+
...baseReward,
|
|
2210
|
+
...name("Free swag with a promo code"),
|
|
2211
|
+
...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
|
|
2212
|
+
...fixedValue("40 Points"),
|
|
2213
|
+
},
|
|
2214
|
+
{
|
|
2215
|
+
...baseReward,
|
|
2216
|
+
...selected,
|
|
2217
|
+
...name("Visa® Prepaid Card USD"),
|
|
2218
|
+
...imageUrl("https://i.imgur.com/veHErQX.png"),
|
|
2219
|
+
...variableValue(20, 80, "Points"),
|
|
2220
|
+
},
|
|
2221
|
+
{
|
|
2222
|
+
...baseReward,
|
|
2223
|
+
...name("$50 Store credit"),
|
|
2224
|
+
...imageUrl("https://i.imgur.com/WkCMVSE.png"),
|
|
2225
|
+
...fixedValue("100 Points"),
|
|
2226
|
+
},
|
|
2227
|
+
{
|
|
2228
|
+
...baseReward,
|
|
2229
|
+
...name("Variable amount of store credit"),
|
|
2230
|
+
...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
|
|
2231
|
+
...variableValue(20, 100, "Points"),
|
|
2232
|
+
}
|
|
2233
|
+
];
|
|
2207
2234
|
const data = [
|
|
2208
2235
|
{
|
|
2209
2236
|
...baseReward,
|
|
@@ -2261,6 +2288,9 @@ const data = [
|
|
|
2261
2288
|
const rewardExchange = {
|
|
2262
2289
|
...baseResponse(data),
|
|
2263
2290
|
};
|
|
2291
|
+
const demoRewardExchange = {
|
|
2292
|
+
...baseResponse(demoData)
|
|
2293
|
+
};
|
|
2264
2294
|
const rewardExchangeLongText = {
|
|
2265
2295
|
...baseResponse([
|
|
2266
2296
|
{
|
|
@@ -2543,6 +2573,7 @@ exports.chooseAmountVariableDisabled = chooseAmountVariableDisabled;
|
|
|
2543
2573
|
exports.chooseAmountVariableUnavailable = chooseAmountVariableUnavailable;
|
|
2544
2574
|
exports.confirmFixed = confirmFixed;
|
|
2545
2575
|
exports.confirmVariable = confirmVariable;
|
|
2576
|
+
exports.demoRewardExchange = demoRewardExchange;
|
|
2546
2577
|
exports.error = error;
|
|
2547
2578
|
exports.loading = loading;
|
|
2548
2579
|
exports.rewardExchange = rewardExchange;
|
|
@@ -19,7 +19,7 @@ const utils = require('./utils-01dbfd4a.js');
|
|
|
19
19
|
require('./sqm-text-span-view-f101dedf.js');
|
|
20
20
|
const useDemoBigStat = require('./useDemoBigStat-426e3319.js');
|
|
21
21
|
require('./sqm-portal-container-view-fdfb3656.js');
|
|
22
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
22
|
+
const ShadowViewAddon = require('./ShadowViewAddon-25ad8736.js');
|
|
23
23
|
require('./sqm-portal-section-view-186a5f7e.js');
|
|
24
24
|
|
|
25
25
|
/**
|
|
@@ -6569,7 +6569,7 @@ function useRewardExchangeListDemo(props) {
|
|
|
6569
6569
|
},
|
|
6570
6570
|
data: {
|
|
6571
6571
|
shareCode: "SHARECODE123",
|
|
6572
|
-
exchangeList: ShadowViewAddon.
|
|
6572
|
+
exchangeList: ShadowViewAddon.demoRewardExchange.data.exchangeList,
|
|
6573
6573
|
},
|
|
6574
6574
|
callbacks: {
|
|
6575
6575
|
exchangeReward: () => { },
|
|
@@ -11,7 +11,7 @@ require('./extends-08099afd.js');
|
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-7b7c59fe.js');
|
|
13
13
|
const JSS = require('./JSS-c65a40f1.js');
|
|
14
|
-
const GenericTableView = require('./GenericTableView-
|
|
14
|
+
const GenericTableView = require('./GenericTableView-9e45c15f.js');
|
|
15
15
|
const reRender = require('./re-render-2f8d0f37.js');
|
|
16
16
|
require('./useChildElements-a68699b4.js');
|
|
17
17
|
const useReferralTable = require('./useReferralTable-45f295ba.js');
|
|
@@ -24,7 +24,7 @@ const ReferralTable = class {
|
|
|
24
24
|
constructor(hostRef) {
|
|
25
25
|
index.registerInstance(this, hostRef);
|
|
26
26
|
/** @uiName Number of referrals per page */
|
|
27
|
-
this.perPage =
|
|
27
|
+
this.perPage = 4;
|
|
28
28
|
/** @uiName Show column labels */
|
|
29
29
|
this.showLabels = true;
|
|
30
30
|
/** @uiName Previous button text */
|
|
@@ -70,6 +70,7 @@ function useReferraltableDemo(props) {
|
|
|
70
70
|
hasPrev: false,
|
|
71
71
|
hasNext: false,
|
|
72
72
|
loading: false,
|
|
73
|
+
show: "rows",
|
|
73
74
|
},
|
|
74
75
|
callbacks: {
|
|
75
76
|
prevPage: () => console.log("Prev"),
|
|
@@ -11,7 +11,7 @@ require('./extends-08099afd.js');
|
|
|
11
11
|
const cjs = require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-7b7c59fe.js');
|
|
13
13
|
const JSS = require('./JSS-c65a40f1.js');
|
|
14
|
-
const GenericTableView = require('./GenericTableView-
|
|
14
|
+
const GenericTableView = require('./GenericTableView-9e45c15f.js');
|
|
15
15
|
const RewardsTableCell_stories = require('./RewardsTableCell.stories-41292336.js');
|
|
16
16
|
const reRender = require('./re-render-2f8d0f37.js');
|
|
17
17
|
const useChildElements = require('./useChildElements-a68699b4.js');
|
|
@@ -242,7 +242,7 @@ const RewardsTable = class {
|
|
|
242
242
|
constructor(hostRef) {
|
|
243
243
|
index.registerInstance(this, hostRef);
|
|
244
244
|
/** @uiName Number of rewards per page */
|
|
245
|
-
this.perPage =
|
|
245
|
+
this.perPage = 4;
|
|
246
246
|
/** @uiName Show column labels */
|
|
247
247
|
this.showLabels = true;
|
|
248
248
|
/** @uiName Previous button text */
|
|
@@ -285,6 +285,7 @@ function useRewardsTableDemo(props) {
|
|
|
285
285
|
hasPrev: false,
|
|
286
286
|
hasNext: false,
|
|
287
287
|
loading: false,
|
|
288
|
+
show: "rows",
|
|
288
289
|
namespace: CSS_NAMESPACE,
|
|
289
290
|
},
|
|
290
291
|
callbacks: {
|
|
@@ -11,7 +11,7 @@ require('./extends-08099afd.js');
|
|
|
11
11
|
require('./cjs-1066ec21.js');
|
|
12
12
|
require('./mixins-7b7c59fe.js');
|
|
13
13
|
const JSS = require('./JSS-c65a40f1.js');
|
|
14
|
-
const GenericTableView = require('./GenericTableView-
|
|
14
|
+
const GenericTableView = require('./GenericTableView-9e45c15f.js');
|
|
15
15
|
const RewardsTableCell_stories = require('./RewardsTableCell.stories-41292336.js');
|
|
16
16
|
const luxon = require('./luxon-59ca7d19.js');
|
|
17
17
|
const utils = require('./utils-01dbfd4a.js');
|
|
@@ -33,7 +33,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-659635e9.js');
|
|
|
33
33
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-1fdc957e.js');
|
|
34
34
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-4c78e231.js');
|
|
35
35
|
const sqmStatContainerView = require('./sqm-stat-container-view-5b2db929.js');
|
|
36
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
36
|
+
const ShadowViewAddon = require('./ShadowViewAddon-25ad8736.js');
|
|
37
37
|
const sqmPortalSectionView = require('./sqm-portal-section-view-186a5f7e.js');
|
|
38
38
|
|
|
39
39
|
/**
|
|
@@ -11,7 +11,7 @@ import { useReferralTable } from "./useReferralTable";
|
|
|
11
11
|
export class ReferralTable {
|
|
12
12
|
constructor() {
|
|
13
13
|
/** @uiName Number of referrals per page */
|
|
14
|
-
this.perPage =
|
|
14
|
+
this.perPage = 4;
|
|
15
15
|
/** @uiName Show column labels */
|
|
16
16
|
this.showLabels = true;
|
|
17
17
|
/** @uiName Previous button text */
|
|
@@ -86,7 +86,7 @@ export class ReferralTable {
|
|
|
86
86
|
},
|
|
87
87
|
"attribute": "per-page",
|
|
88
88
|
"reflect": false,
|
|
89
|
-
"defaultValue": "
|
|
89
|
+
"defaultValue": "4"
|
|
90
90
|
},
|
|
91
91
|
"showLabels": {
|
|
92
92
|
"type": "boolean",
|
|
@@ -348,6 +348,7 @@ function useReferraltableDemo(props) {
|
|
|
348
348
|
hasPrev: false,
|
|
349
349
|
hasNext: false,
|
|
350
350
|
loading: false,
|
|
351
|
+
show: "rows",
|
|
351
352
|
},
|
|
352
353
|
callbacks: {
|
|
353
354
|
prevPage: () => console.log("Prev"),
|
|
@@ -107,6 +107,33 @@ const variableValue = (min, max, unit) => ({
|
|
|
107
107
|
sourceMaxValue: max,
|
|
108
108
|
prettySourceMaxValue: max + " " + unit,
|
|
109
109
|
});
|
|
110
|
+
const demoData = [
|
|
111
|
+
{
|
|
112
|
+
...baseReward,
|
|
113
|
+
...name("Free swag with a promo code"),
|
|
114
|
+
...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
|
|
115
|
+
...fixedValue("40 Points"),
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
...baseReward,
|
|
119
|
+
...selected,
|
|
120
|
+
...name("Visa® Prepaid Card USD"),
|
|
121
|
+
...imageUrl("https://i.imgur.com/veHErQX.png"),
|
|
122
|
+
...variableValue(20, 80, "Points"),
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
...baseReward,
|
|
126
|
+
...name("$50 Store credit"),
|
|
127
|
+
...imageUrl("https://i.imgur.com/WkCMVSE.png"),
|
|
128
|
+
...fixedValue("100 Points"),
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
...baseReward,
|
|
132
|
+
...name("Variable amount of store credit"),
|
|
133
|
+
...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
|
|
134
|
+
...variableValue(20, 100, "Points"),
|
|
135
|
+
}
|
|
136
|
+
];
|
|
110
137
|
const data = [
|
|
111
138
|
{
|
|
112
139
|
...baseReward,
|
|
@@ -164,6 +191,9 @@ const data = [
|
|
|
164
191
|
export const rewardExchange = {
|
|
165
192
|
...baseResponse(data),
|
|
166
193
|
};
|
|
194
|
+
export const demoRewardExchange = {
|
|
195
|
+
...baseResponse(demoData)
|
|
196
|
+
};
|
|
167
197
|
export const rewardExchangeLongText = {
|
|
168
198
|
...baseResponse([
|
|
169
199
|
{
|
|
@@ -5,7 +5,7 @@ import { RewardExchangeView, } from "./sqm-reward-exchange-list-view";
|
|
|
5
5
|
import { isDemo } from "@saasquatch/component-boilerplate";
|
|
6
6
|
import deepmerge from "deepmerge";
|
|
7
7
|
import { getProps } from "../../utils/utils";
|
|
8
|
-
import {
|
|
8
|
+
import { demoRewardExchange } from "./RewardExchangeListData";
|
|
9
9
|
/**
|
|
10
10
|
* @uiName Reward Exchange List
|
|
11
11
|
*/
|
|
@@ -718,7 +718,7 @@ function useRewardExchangeListDemo(props) {
|
|
|
718
718
|
},
|
|
719
719
|
data: {
|
|
720
720
|
shareCode: "SHARECODE123",
|
|
721
|
-
exchangeList:
|
|
721
|
+
exchangeList: demoRewardExchange.data.exchangeList,
|
|
722
722
|
},
|
|
723
723
|
callbacks: {
|
|
724
724
|
exchangeReward: () => { },
|
|
@@ -11,7 +11,7 @@ import { CSS_NAMESPACE, useRewardsTable } from "./useRewardsTable";
|
|
|
11
11
|
export class RewardsTable {
|
|
12
12
|
constructor() {
|
|
13
13
|
/** @uiName Number of rewards per page */
|
|
14
|
-
this.perPage =
|
|
14
|
+
this.perPage = 4;
|
|
15
15
|
/** @uiName Show column labels */
|
|
16
16
|
this.showLabels = true;
|
|
17
17
|
/** @uiName Previous button text */
|
|
@@ -83,7 +83,7 @@ export class RewardsTable {
|
|
|
83
83
|
},
|
|
84
84
|
"attribute": "per-page",
|
|
85
85
|
"reflect": false,
|
|
86
|
-
"defaultValue": "
|
|
86
|
+
"defaultValue": "4"
|
|
87
87
|
},
|
|
88
88
|
"showLabels": {
|
|
89
89
|
"type": "boolean",
|
|
@@ -324,6 +324,7 @@ function useRewardsTableDemo(props) {
|
|
|
324
324
|
hasPrev: false,
|
|
325
325
|
hasNext: false,
|
|
326
326
|
loading: false,
|
|
327
|
+
show: "rows",
|
|
327
328
|
namespace: CSS_NAMESPACE,
|
|
328
329
|
},
|
|
329
330
|
callbacks: {
|
|
@@ -94,9 +94,15 @@ export function GenericTableView(props) {
|
|
|
94
94
|
h("tbody", null,
|
|
95
95
|
show === "loading" && elements.loadingElement,
|
|
96
96
|
show === "empty" && elements.emptyElement,
|
|
97
|
-
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) =>
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => {
|
|
98
|
+
console.log("ROW", row);
|
|
99
|
+
return (h("tr", { style: {
|
|
100
|
+
borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
|
|
101
|
+
}, part: "table-row" }, row.map((cell, j) => {
|
|
102
|
+
console.log("CELL", cell);
|
|
103
|
+
return (h("td", { class: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "hidden" : "", "data-label": columns[j] + ":" }, cell));
|
|
104
|
+
})));
|
|
105
|
+
})))),
|
|
100
106
|
h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|
|
101
107
|
h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base", class: !states.hasPrev ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.prevLabel),
|
|
102
108
|
h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base", class: !states.hasNext ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.moreLabel))));
|
|
@@ -95,9 +95,15 @@ function GenericTableView(props) {
|
|
|
95
95
|
h("tbody", null,
|
|
96
96
|
show === "loading" && elements.loadingElement,
|
|
97
97
|
show === "empty" && elements.emptyElement,
|
|
98
|
-
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) =>
|
|
99
|
-
|
|
100
|
-
|
|
98
|
+
show === "rows" && (rows === null || rows === void 0 ? void 0 : rows.map((row, i) => {
|
|
99
|
+
console.log("ROW", row);
|
|
100
|
+
return (h("tr", { style: {
|
|
101
|
+
borderTop: `${!data.textOverrides.showLabels && i === 0 ? "none" : ""}`,
|
|
102
|
+
}, part: "table-row" }, row.map((cell, j) => {
|
|
103
|
+
console.log("CELL", cell);
|
|
104
|
+
return (h("td", { class: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "hidden" : "", "data-label": columns[j] + ":" }, cell));
|
|
105
|
+
})));
|
|
106
|
+
})))),
|
|
101
107
|
h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|
|
102
108
|
h("sl-button", { size: "small", disabled: !states.hasPrev, loading: show === "loading", onClick: callbacks.prevPage, exportparts: "base: defaultbutton-base", class: !states.hasPrev ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.prevLabel),
|
|
103
109
|
h("sl-button", { size: "small", loading: show === "loading", disabled: !states.hasNext, onClick: callbacks.nextPage, exportparts: "base: defaultbutton-base", class: !states.hasNext ? sheet.classes.ButtonDisabled : "" }, data.textOverrides.moreLabel))));
|
|
@@ -2202,6 +2202,33 @@ const variableValue = (min, max, unit) => ({
|
|
|
2202
2202
|
sourceMaxValue: max,
|
|
2203
2203
|
prettySourceMaxValue: max + " " + unit,
|
|
2204
2204
|
});
|
|
2205
|
+
const demoData = [
|
|
2206
|
+
{
|
|
2207
|
+
...baseReward,
|
|
2208
|
+
...name("Free swag with a promo code"),
|
|
2209
|
+
...imageUrl("https://res.cloudinary.com/saasquatch/image/upload/v1643653103/squatch-assets/default_rewards_1.png"),
|
|
2210
|
+
...fixedValue("40 Points"),
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
...baseReward,
|
|
2214
|
+
...selected,
|
|
2215
|
+
...name("Visa® Prepaid Card USD"),
|
|
2216
|
+
...imageUrl("https://i.imgur.com/veHErQX.png"),
|
|
2217
|
+
...variableValue(20, 80, "Points"),
|
|
2218
|
+
},
|
|
2219
|
+
{
|
|
2220
|
+
...baseReward,
|
|
2221
|
+
...name("$50 Store credit"),
|
|
2222
|
+
...imageUrl("https://i.imgur.com/WkCMVSE.png"),
|
|
2223
|
+
...fixedValue("100 Points"),
|
|
2224
|
+
},
|
|
2225
|
+
{
|
|
2226
|
+
...baseReward,
|
|
2227
|
+
...name("Variable amount of store credit"),
|
|
2228
|
+
...imageUrl("https://i.imgur.com/Jn2fE0s.png"),
|
|
2229
|
+
...variableValue(20, 100, "Points"),
|
|
2230
|
+
}
|
|
2231
|
+
];
|
|
2205
2232
|
const data = [
|
|
2206
2233
|
{
|
|
2207
2234
|
...baseReward,
|
|
@@ -2259,6 +2286,9 @@ const data = [
|
|
|
2259
2286
|
const rewardExchange = {
|
|
2260
2287
|
...baseResponse(data),
|
|
2261
2288
|
};
|
|
2289
|
+
const demoRewardExchange = {
|
|
2290
|
+
...baseResponse(demoData)
|
|
2291
|
+
};
|
|
2262
2292
|
const rewardExchangeLongText = {
|
|
2263
2293
|
...baseResponse([
|
|
2264
2294
|
{
|
|
@@ -2520,4 +2550,4 @@ const ShadowViewAddon = ({ story }, children) => {
|
|
|
2520
2550
|
h(TagName, { "stencilbook-shadow-view": randomInt })));
|
|
2521
2551
|
};
|
|
2522
2552
|
|
|
2523
|
-
export { CardFeedView as C, EditProfileView as E, LeaderboardView as L, PortalFrameView as P, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, ShareLinkView as a, useShareButton as b, PortalChangePasswordView as c, PortalLoginView as d, PortalRegisterView as e, ProgressBarView as f, RewardExchangeView as g, rewardExchangeLongText as h, rewardExchangeSelected as i, chooseAmountFixed as j, chooseAmountVariable as k, chooseAmountVariableDisabled as l, chooseAmountVariableUnavailable as m, confirmFixed as n, confirmVariable as o, error as p, successVariable as q, rewardExchangeCustomErrorMsg as r, success as s, loading as t, useShareLink as u, rewardExchange as v, autoColorScaleCss as w, ShadowViewAddon as x, withShadowView as y };
|
|
2553
|
+
export { CardFeedView as C, EditProfileView as E, LeaderboardView as L, PortalFrameView as P, ReferralIframeView as R, ShareButtonView as S, TaskCardView as T, ShareLinkView as a, useShareButton as b, PortalChangePasswordView as c, PortalLoginView as d, PortalRegisterView as e, ProgressBarView as f, RewardExchangeView as g, rewardExchangeLongText as h, rewardExchangeSelected as i, chooseAmountFixed as j, chooseAmountVariable as k, chooseAmountVariableDisabled as l, chooseAmountVariableUnavailable as m, confirmFixed as n, confirmVariable as o, error as p, successVariable as q, rewardExchangeCustomErrorMsg as r, success as s, loading as t, useShareLink as u, rewardExchange as v, autoColorScaleCss as w, ShadowViewAddon as x, withShadowView as y, demoRewardExchange as z };
|
|
@@ -15,7 +15,7 @@ import { g as getProps, a as getMissingProps } from './utils-1d345130.js';
|
|
|
15
15
|
import './sqm-text-span-view-7e61c95c.js';
|
|
16
16
|
import { p as pathToRegexp, u as useDemoBigStat, a as useBigStat } from './useDemoBigStat-022e116d.js';
|
|
17
17
|
import './sqm-portal-container-view-f74db584.js';
|
|
18
|
-
import { w as autoColorScaleCss, C as CardFeedView, E as EditProfileView, y as withShadowView, L as LeaderboardView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView,
|
|
18
|
+
import { w as autoColorScaleCss, C as CardFeedView, E as EditProfileView, y as withShadowView, L as LeaderboardView, c as PortalChangePasswordView, P as PortalFrameView, d as PortalLoginView, e as PortalRegisterView, R as ReferralIframeView, g as RewardExchangeView, z as demoRewardExchange, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, T as TaskCardView } from './ShadowViewAddon-94819113.js';
|
|
19
19
|
import './sqm-portal-section-view-88a80af9.js';
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -6565,7 +6565,7 @@ function useRewardExchangeListDemo(props) {
|
|
|
6565
6565
|
},
|
|
6566
6566
|
data: {
|
|
6567
6567
|
shareCode: "SHARECODE123",
|
|
6568
|
-
exchangeList:
|
|
6568
|
+
exchangeList: demoRewardExchange.data.exchangeList,
|
|
6569
6569
|
},
|
|
6570
6570
|
callbacks: {
|
|
6571
6571
|
exchangeReward: () => { },
|
|
@@ -7,7 +7,7 @@ import './extends-c31f1eff.js';
|
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-10353a39.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
10
|
-
import { G as GenericTableView } from './GenericTableView-
|
|
10
|
+
import { G as GenericTableView } from './GenericTableView-54db7aa8.js';
|
|
11
11
|
import { a as useRequestRerender } from './re-render-43311710.js';
|
|
12
12
|
import './useChildElements-0146a8bd.js';
|
|
13
13
|
import { u as useReferralTable } from './useReferralTable-596519fc.js';
|
|
@@ -20,7 +20,7 @@ const ReferralTable = class {
|
|
|
20
20
|
constructor(hostRef) {
|
|
21
21
|
registerInstance(this, hostRef);
|
|
22
22
|
/** @uiName Number of referrals per page */
|
|
23
|
-
this.perPage =
|
|
23
|
+
this.perPage = 4;
|
|
24
24
|
/** @uiName Show column labels */
|
|
25
25
|
this.showLabels = true;
|
|
26
26
|
/** @uiName Previous button text */
|
|
@@ -66,6 +66,7 @@ function useReferraltableDemo(props) {
|
|
|
66
66
|
hasPrev: false,
|
|
67
67
|
hasNext: false,
|
|
68
68
|
loading: false,
|
|
69
|
+
show: "rows",
|
|
69
70
|
},
|
|
70
71
|
callbacks: {
|
|
71
72
|
prevPage: () => console.log("Prev"),
|
|
@@ -7,7 +7,7 @@ import './extends-c31f1eff.js';
|
|
|
7
7
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-10353a39.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
10
|
-
import { G as GenericTableView } from './GenericTableView-
|
|
10
|
+
import { G as GenericTableView } from './GenericTableView-54db7aa8.js';
|
|
11
11
|
import { R as RewardsCellCreditFull, S as StatusCellAvailable, a as SourceCellReferral, D as DateCell, b as RewardsCellCreditCancelled, c as StatusCellCancelled, d as SourceCellDeletedUser, e as RewardsCellCreditRedeemed, f as StatusCellRedeemed, g as SourceCellManual, h as RewardsCellCreditPartial, i as StatusCellAvailableExpiry, j as SourceCellReferred } from './RewardsTableCell.stories-9941e71e.js';
|
|
12
12
|
import { u as useRerenderListener, a as useRequestRerender } from './re-render-43311710.js';
|
|
13
13
|
import { u as useChildElements } from './useChildElements-0146a8bd.js';
|
|
@@ -238,7 +238,7 @@ const RewardsTable = class {
|
|
|
238
238
|
constructor(hostRef) {
|
|
239
239
|
registerInstance(this, hostRef);
|
|
240
240
|
/** @uiName Number of rewards per page */
|
|
241
|
-
this.perPage =
|
|
241
|
+
this.perPage = 4;
|
|
242
242
|
/** @uiName Show column labels */
|
|
243
243
|
this.showLabels = true;
|
|
244
244
|
/** @uiName Previous button text */
|
|
@@ -281,6 +281,7 @@ function useRewardsTableDemo(props) {
|
|
|
281
281
|
hasPrev: false,
|
|
282
282
|
hasNext: false,
|
|
283
283
|
loading: false,
|
|
284
|
+
show: "rows",
|
|
284
285
|
namespace: CSS_NAMESPACE,
|
|
285
286
|
},
|
|
286
287
|
callbacks: {
|
|
@@ -7,7 +7,7 @@ import './extends-c31f1eff.js';
|
|
|
7
7
|
import './cjs-bdfb4486.js';
|
|
8
8
|
import './mixins-10353a39.js';
|
|
9
9
|
import { c as createStyleSheet } from './JSS-96eeab98.js';
|
|
10
|
-
import { G as GenericTableView } from './GenericTableView-
|
|
10
|
+
import { G as GenericTableView } from './GenericTableView-54db7aa8.js';
|
|
11
11
|
import { R as RewardsCellCreditFull, S as StatusCellAvailable, a as SourceCellReferral, D as DateCell$1, b as RewardsCellCreditCancelled, c as StatusCellCancelled, d as SourceCellDeletedUser, e as RewardsCellCreditRedeemed, f as StatusCellRedeemed, g as SourceCellManual, h as RewardsCellCreditPartial, i as StatusCellAvailableExpiry, j as SourceCellReferred, k as RewardsCellCreditLong, l as RewardsTableCell } from './RewardsTableCell.stories-9941e71e.js';
|
|
12
12
|
import { l as luxon } from './luxon-5fa22651.js';
|
|
13
13
|
import { g as getProps } from './utils-1d345130.js';
|
|
@@ -29,7 +29,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-71c84f2e.js';
|
|
|
29
29
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-73e14282.js';
|
|
30
30
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-cbf1cfdc.js';
|
|
31
31
|
import { S as StatContainerView } from './sqm-stat-container-view-8a565c5a.js';
|
|
32
|
-
import { S as ShareButtonView, a as ShareLinkView, L as LeaderboardView, 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, r as rewardExchangeCustomErrorMsg, h as rewardExchangeLongText, i as rewardExchangeSelected, j as chooseAmountFixed, k as chooseAmountVariable, l as chooseAmountVariableDisabled$1, m as chooseAmountVariableUnavailable$1, n as confirmFixed, o as confirmVariable, p as error$1, s as success, q as successVariable, t as loading, v as rewardExchange, C as CardFeedView, w as autoColorScaleCss, x as ShadowViewAddon } from './ShadowViewAddon-
|
|
32
|
+
import { S as ShareButtonView, a as ShareLinkView, L as LeaderboardView, 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, r as rewardExchangeCustomErrorMsg, h as rewardExchangeLongText, i as rewardExchangeSelected, j as chooseAmountFixed, k as chooseAmountVariable, l as chooseAmountVariableDisabled$1, m as chooseAmountVariableUnavailable$1, n as confirmFixed, o as confirmVariable, p as error$1, s as success, q as successVariable, t as loading, v as rewardExchange, C as CardFeedView, w as autoColorScaleCss, x as ShadowViewAddon } from './ShadowViewAddon-94819113.js';
|
|
33
33
|
import { P as PortalSectionView } from './sqm-portal-section-view-88a80af9.js';
|
|
34
34
|
|
|
35
35
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var a,t=1,l=arguments.length;t<l;t++){a=arguments[t];for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s))e[s]=a[s]}return e};return __assign.apply(this,arguments)};import{h}from"./index-17b4da69.js";import{g as gap}from"./mixins-10353a39.js";import{c as createStyleSheet}from"./JSS-96eeab98.js";function GenericTableView(e){var a;var t=e.states,l=e.data,s=e.callbacks,
|
|
1
|
+
var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var a,t=1,l=arguments.length;t<l;t++){a=arguments[t];for(var s in a)if(Object.prototype.hasOwnProperty.call(a,s))e[s]=a[s]}return e};return __assign.apply(this,arguments)};import{h}from"./index-17b4da69.js";import{g as gap}from"./mixins-10353a39.js";import{c as createStyleSheet}from"./JSS-96eeab98.js";function GenericTableView(e){var a;var t=e.states,l=e.data,s=e.callbacks,n=e.elements;var r=n.columns,o=n.rows;var i=t.show;console.log("table",e);console.log("columns 0",r);var d=l.hiddenColumns&&l.hiddenColumns.split(",").map(Number);var p="@media (max-width: "+l.mdBreakpoint+"px)";var m="@media (min-width: "+(!Boolean(o.length)?l.mdBreakpoint:l.smBreakpoint)+"px) and (max-width: "+l.mdBreakpoint+"px)";var c={Table:(a={tableLayout:"fixed",width:"100%","& th":{paddingBottom:"var(--sl-spacing-small)",textAlign:"left",fontWeight:"var(--sl-font-weight-semibold)",overflowWrap:"anywhere"},"& tr":{},"& td":{borderTop:"1px solid var(--sl-color-neutral-200)",padding:"var(--sl-spacing-small)",paddingLeft:"0",overflow:"hidden",textOverflow:"ellipsis"}},a[p]={"& thead":{display:"none"},"& tr":{display:"block",background:"#FFFFFF",border:"1px solid var(--sl-color-neutral-200)",boxShadow:"0px 2px 4px rgba(0, 0, 0, 0.1)",borderRadius:"var(--sl-border-radius-medium)",padding:"var(--sl-spacing-medium)",fontSize:"var(--sl-font-size-small)",marginBottom:"var(--sl-spacing-large)"},"& td":{display:"grid",gridTemplateColumns:"0.5fr 0.5fr",borderTop:"none",padding:"0",marginBottom:"var(--sl-spacing-medium)","&:first-child":{textAlign:"left"},"&:before":{content:"attr(data-label)",whiteSpace:"nowrap"},"&:last-child":{marginBottom:"0"},"&.hidden:before":{content:"none"}}},a[m]={"& tbody":{display:"grid",gridTemplateColumns:"0.5fr 0.5fr",gap:"25px"}},a),ButtonContainer:__assign({display:"flex","justify-content":"flex-end","margin-top":"var(--sl-spacing-small)"},gap({direction:"row",size:"var(--sl-spacing-small)"})),ButtonDisabled:{"&::part(base)":{opacity:"0.25"}}};var g=createStyleSheet(c);var b=g.toString();return h("div",null,h("style",{type:"text/css"},b),h("table",{class:g.classes.Table},l.textOverrides.showLabels&&h("thead",null,h("tr",null,r===null||r===void 0?void 0:r.map((function(e){return h("th",null,e)})))),h("tbody",null,i==="loading"&&n.loadingElement,i==="empty"&&n.emptyElement,i==="rows"&&(o===null||o===void 0?void 0:o.map((function(e,a){console.log("ROW",e);return h("tr",{style:{borderTop:""+(!l.textOverrides.showLabels&&a===0?"none":"")},part:"table-row"},e.map((function(e,a){console.log("CELL",e);return h("td",{class:(d===null||d===void 0?void 0:d.includes(a))?"hidden":"","data-label":r[a]+":"},e)})))}))))),h("div",{class:g.classes.ButtonContainer,part:t.namespace+"-button-wrapper"},h("sl-button",{size:"small",disabled:!t.hasPrev,loading:i==="loading",onClick:s.prevPage,exportparts:"base: defaultbutton-base",class:!t.hasPrev?g.classes.ButtonDisabled:""},l.textOverrides.prevLabel),h("sl-button",{size:"small",loading:i==="loading",disabled:!t.hasNext,onClick:s.nextPage,exportparts:"base: defaultbutton-base",class:!t.hasNext?g.classes.ButtonDisabled:""},l.textOverrides.moreLabel)))}export{GenericTableView as G};
|