@saasquatch/mint-components 1.5.1-1 → 1.5.1
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/CHANGELOG.md +18 -6
- package/dist/cjs/{ShadowViewAddon-16dae1bc.js → ShadowViewAddon-8151e5d3.js} +2 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/{sqm-big-stat_35.cjs.entry.js → sqm-big-stat_34.cjs.entry.js} +43 -164
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +7 -107
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-checkbox-field/CheckboxField.stories.js +1 -1
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field-view.js +2 -1
- package/dist/collection/components/sqm-checkbox-field/sqm-checkbox-field.js +1 -1
- package/dist/collection/components/sqm-checkbox-field/useCheckboxField.js +2 -2
- package/dist/collection/components/sqm-dropdown-field/sqm-dropdown-field.js +3 -3
- package/dist/collection/components/sqm-dropdown-field/useDropdownField.js +2 -2
- package/dist/collection/components/sqm-name-fields/sqm-name-fields.js +1 -1
- package/dist/collection/components/sqm-name-fields/useNameFields.js +2 -2
- package/dist/collection/components/sqm-portal-register/sqm-portal-register.js +1 -1
- package/dist/collection/components/sqm-portal-register/useValidationState.js +2 -2
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
- package/dist/esm/{ShadowViewAddon-3908b50d.js → ShadowViewAddon-e42c07c6.js} +2 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/{sqm-big-stat_35.entry.js → sqm-big-stat_34.entry.js} +47 -167
- package/dist/esm/sqm-stencilbook.entry.js +7 -107
- package/dist/esm-es5/{ShadowViewAddon-3908b50d.js → ShadowViewAddon-e42c07c6.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-big-stat_34.entry.js +1 -0
- 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-fc6c07a7.entry.js → p-23259e4c.entry.js} +12 -21
- package/dist/mint-components/p-436da6b8.system.js +1 -1
- package/dist/mint-components/{p-268d0240.js → p-55358561.js} +1 -1
- package/dist/mint-components/{p-9d83a0b3.system.entry.js → p-5bc9f6f4.system.entry.js} +1 -1
- package/dist/mint-components/{p-c648f983.system.js → p-6c9bd397.system.js} +1 -1
- package/dist/mint-components/{p-aa6292e7.entry.js → p-6cb9eed6.entry.js} +2 -2
- package/dist/mint-components/p-b2770bdb.system.entry.js +1 -0
- package/dist/types/components/sqm-checkbox-field/sqm-checkbox-field-view.d.ts +2 -1
- package/dist/types/components/sqm-checkbox-field/useCheckboxField.d.ts +1 -5
- package/dist/types/components/sqm-dropdown-field/sqm-dropdown-field-view.d.ts +2 -1
- package/dist/types/components/sqm-dropdown-field/useDropdownField.d.ts +1 -5
- package/dist/types/components/sqm-name-fields/sqm-name-fields-view.d.ts +2 -1
- package/dist/types/components/sqm-name-fields/useNameFields.d.ts +1 -5
- package/dist/types/components/sqm-portal-register/useValidationState.d.ts +1 -0
- package/dist/types/components.d.ts +0 -62
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/sqm-country-field/UseCountryField.stories.js +0 -91
- package/dist/collection/components/sqm-country-field/sqm-country-field-view.js +0 -47
- package/dist/collection/components/sqm-country-field/sqm-country-field.js +0 -197
- package/dist/collection/components/sqm-country-field/useCountryField.js +0 -23
- package/dist/esm-es5/sqm-big-stat_35.entry.js +0 -1
- package/dist/mint-components/p-29e6a994.system.entry.js +0 -1
- package/dist/types/components/sqm-country-field/UseCountryField.stories.d.ts +0 -40
- package/dist/types/components/sqm-country-field/sqm-country-field-view.d.ts +0 -18
- package/dist/types/components/sqm-country-field/sqm-country-field.d.ts +0 -33
- package/dist/types/components/sqm-country-field/useCountryField.d.ts +0 -10
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { r as registerInstance, h as h$1, c as Host } from './index-17b4da69.js';
|
|
2
|
-
import { m as h, e as useEffect, o as d, k as useState, f as useRef,
|
|
2
|
+
import { m as h, e as useEffect, y, o as d, k as useState, f as useRef, b as browser, u as useReducer } from './stencil-hooks.module-acc8a613.js';
|
|
3
3
|
import { i as intl } from './global-15cdf41a.js';
|
|
4
4
|
import { u as useCallback } from './use-callback-7e0bfd3b.js';
|
|
5
|
-
import { j as jn, P, d as dist, i as ie,
|
|
5
|
+
import { j as jn, P, d as dist, i as ie, b as sn, q as qe, M, r as rn, c as dn, g as $e, E as Ee, D as De, H as He, l as ln, R as Rn, A as An } from './index.module-f5e17a4e.js';
|
|
6
6
|
import './extends-c31f1eff.js';
|
|
7
7
|
import { j as jsonpointer } from './jsonpointer-388a7082.js';
|
|
8
8
|
import { c as cjs } from './cjs-bdfb4486.js';
|
|
9
9
|
import './mixins-59fd94b7.js';
|
|
10
|
-
import {
|
|
10
|
+
import { c as createStyleSheet } from './JSS-418cab16.js';
|
|
11
11
|
import { a as useRequestRerender } from './re-render-8f0a7ab1.js';
|
|
12
12
|
import { u as useChildElements } from './useChildElements-3ffd7077.js';
|
|
13
13
|
import './luxon-f44215d9.js';
|
|
14
14
|
import { g as getProps, a as getMissingProps } from './utils-1d345130.js';
|
|
15
15
|
import './sqm-text-span-view-020db63f.js';
|
|
16
16
|
import './sqm-portal-container-view-34f26e2a.js';
|
|
17
|
-
import { c as useDemoBigStat, J as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, K as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, M as demoRewardExchange, i as RewardExchangeView, O as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
17
|
+
import { c as useDemoBigStat, J as useBigStat, B as BigStatView, H as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, D as DropdownFieldView, E as EditProfileView, K as withShadowView, L as LeaderboardView, N as NameFieldsView, e as PortalChangePasswordView, P as PortalFrameView, f as PortalLoginView, g as PortalRegisterView, R as ReferralIframeView, M as demoRewardExchange, i as RewardExchangeView, O as pathToRegexp, b as useShareButton, S as ShareButtonView, a as ShareLinkView, u as useShareLink, d as StatContainerView, T as TaskCardView } from './ShadowViewAddon-e42c07c6.js';
|
|
18
18
|
import './sqm-portal-section-view-c8d1c727.js';
|
|
19
19
|
|
|
20
20
|
const BigStat = class {
|
|
@@ -119,9 +119,15 @@ const CardFeed = class {
|
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
|
|
122
|
-
const
|
|
122
|
+
const FORM_VALIDATION_CONTEXT = "sq:validation-state";
|
|
123
|
+
function useValidationState(formState) {
|
|
124
|
+
const host = P();
|
|
125
|
+
const [validationState, setValidationState] = y(host, FORM_VALIDATION_CONTEXT, formState);
|
|
126
|
+
return { validationState, setValidationState };
|
|
127
|
+
}
|
|
128
|
+
|
|
123
129
|
function useCheckboxField() {
|
|
124
|
-
const validationState = d(
|
|
130
|
+
const validationState = d(FORM_VALIDATION_CONTEXT);
|
|
125
131
|
const [checked, setChecked] = useState(false);
|
|
126
132
|
return {
|
|
127
133
|
states: {
|
|
@@ -184,133 +190,6 @@ function useCheckboxFieldDemo(props) {
|
|
|
184
190
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
185
191
|
}
|
|
186
192
|
|
|
187
|
-
const CONTEXT_NAME$1 = "sq:validation-state";
|
|
188
|
-
function useDropdownField() {
|
|
189
|
-
const validationState = d(CONTEXT_NAME$1);
|
|
190
|
-
return {
|
|
191
|
-
states: {
|
|
192
|
-
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
193
|
-
},
|
|
194
|
-
};
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
const style = {
|
|
198
|
-
ErrorStyle: {
|
|
199
|
-
"--sl-input-border-color": "var(--sl-color-danger-500)",
|
|
200
|
-
"--sl-input-background-color": "var(--sl-color-danger-10)",
|
|
201
|
-
"--sl-input-border-color-focus": "var(--sl-color-danger-500)",
|
|
202
|
-
"--sl-input-border-color-hover": "var(--sl-color-danger-500)",
|
|
203
|
-
},
|
|
204
|
-
ErrorMessageStyle: {
|
|
205
|
-
margin: 0,
|
|
206
|
-
color: "var(--sl-color-danger-500)",
|
|
207
|
-
fontSize: "var(--sl-input-help-text-font-size-medium)",
|
|
208
|
-
},
|
|
209
|
-
FieldContainer: {
|
|
210
|
-
"margin-bottom": "var(--sl-spacing-large)",
|
|
211
|
-
},
|
|
212
|
-
};
|
|
213
|
-
const vanillaStyle = `
|
|
214
|
-
:host {
|
|
215
|
-
margin: 0 auto;
|
|
216
|
-
width: 100%;
|
|
217
|
-
display: block;
|
|
218
|
-
}
|
|
219
|
-
sl-select::part(label){
|
|
220
|
-
font-size: var(--sl-input-label-font-size-small);
|
|
221
|
-
font-weight: var(--sl-font-weight-semibold);
|
|
222
|
-
}
|
|
223
|
-
`;
|
|
224
|
-
jss.setup(create());
|
|
225
|
-
const sheet = jss.createStyleSheet(style);
|
|
226
|
-
const styleString = sheet.toString();
|
|
227
|
-
function CountryFieldView(props) {
|
|
228
|
-
var _a;
|
|
229
|
-
const { states, content, data } = props;
|
|
230
|
-
const validationErrors = states === null || states === void 0 ? void 0 : states.validationErrors;
|
|
231
|
-
return (h$1("div", { class: sheet.classes.FieldContainer },
|
|
232
|
-
h$1("style", { type: "text/css" },
|
|
233
|
-
vanillaStyle,
|
|
234
|
-
styleString),
|
|
235
|
-
h$1("sl-select", Object.assign({ exportparts: "label: input-label", label: content.dropdownLabel, name: `/${content.dropdownName}` }, (content.dropdownRequired ? { required: true } : []), ((validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) ? {
|
|
236
|
-
class: sheet.classes.ErrorStyle,
|
|
237
|
-
}
|
|
238
|
-
: [])), (_a = data.countries) === null || _a === void 0 ? void 0 : _a.map((country) => (h$1("sl-menu-item", { value: country.displayName }, country.displayName)))),
|
|
239
|
-
(validationErrors === null || validationErrors === void 0 ? void 0 : validationErrors[content.dropdownName]) && (h$1("p", { class: sheet.classes.ErrorMessageStyle }, content.errorMessage))));
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
const GET_COUNTRIES = dist.gql `
|
|
243
|
-
query countryList($locale: RSLocale) {
|
|
244
|
-
countries(limit: 250) {
|
|
245
|
-
data {
|
|
246
|
-
countryCode
|
|
247
|
-
displayName(locale: $locale)
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
`;
|
|
252
|
-
function useCountryField(props) {
|
|
253
|
-
var _a;
|
|
254
|
-
const user = ie();
|
|
255
|
-
const locale = props.locale || An();
|
|
256
|
-
const { data: res } = sn(GET_COUNTRIES, { locale }, user && locale === undefined);
|
|
257
|
-
return {
|
|
258
|
-
data: {
|
|
259
|
-
countries: (_a = res === null || res === void 0 ? void 0 : res.countries) === null || _a === void 0 ? void 0 : _a.data,
|
|
260
|
-
},
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
const CountryField = class {
|
|
265
|
-
constructor(hostRef) {
|
|
266
|
-
registerInstance(this, hostRef);
|
|
267
|
-
this.ignored = true;
|
|
268
|
-
/**
|
|
269
|
-
* @uiName Country name attribute
|
|
270
|
-
*/
|
|
271
|
-
this.dropdownName = "countryCode";
|
|
272
|
-
/**
|
|
273
|
-
* @uiName Country Dropdown label
|
|
274
|
-
*/
|
|
275
|
-
this.dropdownLabel = "Country";
|
|
276
|
-
/**
|
|
277
|
-
* @uiName Unselected error message
|
|
278
|
-
*/
|
|
279
|
-
this.errorMessage = "Must select a country";
|
|
280
|
-
/**
|
|
281
|
-
* @uiName Required
|
|
282
|
-
*/
|
|
283
|
-
this.dropdownRequired = true;
|
|
284
|
-
/**
|
|
285
|
-
* @uiName Country name locale override
|
|
286
|
-
*/
|
|
287
|
-
this.locale = null;
|
|
288
|
-
h(this);
|
|
289
|
-
}
|
|
290
|
-
disconnectedCallback() { }
|
|
291
|
-
render() {
|
|
292
|
-
const content = {
|
|
293
|
-
...getProps(this),
|
|
294
|
-
selectOptions: h$1("slot", null),
|
|
295
|
-
};
|
|
296
|
-
const { states } = useDropdownField();
|
|
297
|
-
const { data } = jn()
|
|
298
|
-
? useCountryFieldDemo(this)
|
|
299
|
-
: useCountryField(this);
|
|
300
|
-
return (h$1(CountryFieldView, { states: states, content: content, data: data }));
|
|
301
|
-
}
|
|
302
|
-
};
|
|
303
|
-
function useCountryFieldDemo(props) {
|
|
304
|
-
return cjs({
|
|
305
|
-
states: {
|
|
306
|
-
validationErrors: [],
|
|
307
|
-
},
|
|
308
|
-
data: {
|
|
309
|
-
countries: [],
|
|
310
|
-
},
|
|
311
|
-
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
312
|
-
}
|
|
313
|
-
|
|
314
193
|
function DividedLayoutView(props, children) {
|
|
315
194
|
const getBorder = () => {
|
|
316
195
|
if (props.direction === "row") {
|
|
@@ -378,6 +257,15 @@ const DividedLayout = class {
|
|
|
378
257
|
}
|
|
379
258
|
};
|
|
380
259
|
|
|
260
|
+
function useDropdownField() {
|
|
261
|
+
const validationState = d(FORM_VALIDATION_CONTEXT);
|
|
262
|
+
return {
|
|
263
|
+
states: {
|
|
264
|
+
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
265
|
+
},
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
|
|
381
269
|
const DropdownField = class {
|
|
382
270
|
constructor(hostRef) {
|
|
383
271
|
registerInstance(this, hostRef);
|
|
@@ -389,7 +277,7 @@ const DropdownField = class {
|
|
|
389
277
|
/**
|
|
390
278
|
* @uiName Unselected error message
|
|
391
279
|
*/
|
|
392
|
-
this.errorMessage = "
|
|
280
|
+
this.errorMessage = "Select an option";
|
|
393
281
|
/**
|
|
394
282
|
* @uiName Required
|
|
395
283
|
*/
|
|
@@ -1051,9 +939,8 @@ function useLeaderboardDemo(props) {
|
|
|
1051
939
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1052
940
|
}
|
|
1053
941
|
|
|
1054
|
-
const CONTEXT_NAME$2 = "sq:validation-state";
|
|
1055
942
|
function useNameFields(props) {
|
|
1056
|
-
const validationState = d(
|
|
943
|
+
const validationState = d(FORM_VALIDATION_CONTEXT);
|
|
1057
944
|
return {
|
|
1058
945
|
states: {
|
|
1059
946
|
validationErrors: validationState === null || validationState === void 0 ? void 0 : validationState.validationErrors,
|
|
@@ -1460,13 +1347,6 @@ function useLoginDemo(props) {
|
|
|
1460
1347
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
1461
1348
|
}
|
|
1462
1349
|
|
|
1463
|
-
const CONTEXT_NAME$3 = "sq:validation-state";
|
|
1464
|
-
function useValidationState(formState) {
|
|
1465
|
-
const host = P();
|
|
1466
|
-
const [validationState, setValidationState] = y(host, CONTEXT_NAME$3, formState);
|
|
1467
|
-
return { validationState, setValidationState };
|
|
1468
|
-
}
|
|
1469
|
-
|
|
1470
1350
|
// This file is a workaround for a bug in web browsers' "native"
|
|
1471
1351
|
// ES6 importing system which is uncapable of importing "*.json" files.
|
|
1472
1352
|
// https://github.com/catamphetamine/libphonenumber-js/issues/239
|
|
@@ -5715,7 +5595,7 @@ const ProgramMenu = class {
|
|
|
5715
5595
|
}
|
|
5716
5596
|
};
|
|
5717
5597
|
|
|
5718
|
-
const style
|
|
5598
|
+
const style = {
|
|
5719
5599
|
Container: {
|
|
5720
5600
|
display: "flex",
|
|
5721
5601
|
color: "var(--sl-color-neutral-900)",
|
|
@@ -5749,9 +5629,9 @@ const style$1 = {
|
|
|
5749
5629
|
},
|
|
5750
5630
|
},
|
|
5751
5631
|
};
|
|
5752
|
-
const sheet
|
|
5753
|
-
const styleString
|
|
5754
|
-
const vanillaStyle
|
|
5632
|
+
const sheet = createStyleSheet(style);
|
|
5633
|
+
const styleString = sheet.toString();
|
|
5634
|
+
const vanillaStyle = `
|
|
5755
5635
|
:host{
|
|
5756
5636
|
display: block;
|
|
5757
5637
|
}
|
|
@@ -5759,9 +5639,9 @@ const vanillaStyle$1 = `
|
|
|
5759
5639
|
function ReferralCardView(props) {
|
|
5760
5640
|
return (h$1("div", null,
|
|
5761
5641
|
h$1("style", { type: "text/css" },
|
|
5762
|
-
styleString
|
|
5763
|
-
vanillaStyle
|
|
5764
|
-
h$1("div", { class: sheet
|
|
5642
|
+
styleString,
|
|
5643
|
+
vanillaStyle),
|
|
5644
|
+
h$1("div", { class: sheet.classes.Container },
|
|
5765
5645
|
h$1("div", { class: "left", style: {
|
|
5766
5646
|
alignSelf: props.verticalAlignment,
|
|
5767
5647
|
} }, props.slots.left),
|
|
@@ -5817,7 +5697,7 @@ function useReferralIframe(props) {
|
|
|
5817
5697
|
};
|
|
5818
5698
|
}
|
|
5819
5699
|
|
|
5820
|
-
const style$
|
|
5700
|
+
const style$1 = {
|
|
5821
5701
|
IconStyle: {
|
|
5822
5702
|
display: "block",
|
|
5823
5703
|
position: "absolute",
|
|
@@ -5836,21 +5716,21 @@ const style$2 = {
|
|
|
5836
5716
|
margin: "30px",
|
|
5837
5717
|
},
|
|
5838
5718
|
};
|
|
5839
|
-
const sheet$
|
|
5840
|
-
const styleString$
|
|
5719
|
+
const sheet$1 = createStyleSheet(style$1);
|
|
5720
|
+
const styleString$1 = sheet$1.toString();
|
|
5841
5721
|
function RequiredPropsError({ missingProps }) {
|
|
5842
5722
|
if (!missingProps)
|
|
5843
5723
|
return false;
|
|
5844
5724
|
const host = P();
|
|
5845
5725
|
const [detailsOpen, setDetailsOpen] = useState(false);
|
|
5846
|
-
return (h$1("sl-alert", { type: "danger", open: true, class: sheet$
|
|
5847
|
-
h$1("style", { type: "text/css" }, styleString$
|
|
5848
|
-
h$1("div", { slot: "icon", class: sheet$
|
|
5726
|
+
return (h$1("sl-alert", { type: "danger", open: true, class: sheet$1.classes.Alert },
|
|
5727
|
+
h$1("style", { type: "text/css" }, styleString$1),
|
|
5728
|
+
h$1("div", { slot: "icon", class: sheet$1.classes.IconStyle },
|
|
5849
5729
|
h$1("sl-icon", { name: "exclamation-octagon" })),
|
|
5850
|
-
h$1("div", { class: sheet$
|
|
5851
|
-
h$1("h2", { class: sheet$
|
|
5730
|
+
h$1("div", { class: sheet$1.classes.DivStyle },
|
|
5731
|
+
h$1("h2", { class: sheet$1.classes.Heading }, "There was a problem loading this page"),
|
|
5852
5732
|
h$1("p", null, "There was a technical problem that prevented this page from loading. Please contact us with the link to this page.")),
|
|
5853
|
-
h$1("details", { class: sheet$
|
|
5733
|
+
h$1("details", { class: sheet$1.classes.Details },
|
|
5854
5734
|
h$1("summary", { onClick: () => setDetailsOpen(!detailsOpen) },
|
|
5855
5735
|
detailsOpen ? "Less" : "More",
|
|
5856
5736
|
" details"),
|
|
@@ -7498,7 +7378,7 @@ const Gift = () => (h$1("svg", { width: "24", height: "24", viewBox: "0 0 24 24"
|
|
|
7498
7378
|
const Circle = () => (h$1("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" },
|
|
7499
7379
|
h$1("circle", { cx: "12", cy: "12", r: "9", fill: "currentColor", stroke: "currentColor", "stroke-width": "2" })));
|
|
7500
7380
|
|
|
7501
|
-
const style$
|
|
7381
|
+
const style$2 = {
|
|
7502
7382
|
TimelineReward: {
|
|
7503
7383
|
color: "var(--sl-color-neutral-900)",
|
|
7504
7384
|
lineHeight: "var(--sl-line-height-dense)",
|
|
@@ -7541,9 +7421,9 @@ const style$3 = {
|
|
|
7541
7421
|
},
|
|
7542
7422
|
},
|
|
7543
7423
|
};
|
|
7544
|
-
const sheet$
|
|
7545
|
-
const styleString$
|
|
7546
|
-
const vanillaStyle$
|
|
7424
|
+
const sheet$2 = createStyleSheet(style$2);
|
|
7425
|
+
const styleString$2 = sheet$2.toString();
|
|
7426
|
+
const vanillaStyle$1 = `
|
|
7547
7427
|
:host{
|
|
7548
7428
|
display: block;
|
|
7549
7429
|
}
|
|
@@ -7555,10 +7435,10 @@ const vanillaStyle$2 = `
|
|
|
7555
7435
|
function TimelineEntryView(props) {
|
|
7556
7436
|
var _a;
|
|
7557
7437
|
const timeline_icon = (_a = props.icon) !== null && _a !== void 0 ? _a : props.iconState;
|
|
7558
|
-
return (h$1("div", { class: sheet$
|
|
7438
|
+
return (h$1("div", { class: sheet$2.classes.TimelineReward },
|
|
7559
7439
|
h$1("style", { type: "text/css" },
|
|
7560
|
-
styleString$
|
|
7561
|
-
vanillaStyle$
|
|
7440
|
+
styleString$2,
|
|
7441
|
+
vanillaStyle$1),
|
|
7562
7442
|
h$1("div", { class: "container" },
|
|
7563
7443
|
h$1("div", { class: "line" }, "/"),
|
|
7564
7444
|
h$1("div", { class: "step" },
|
|
@@ -7647,4 +7527,4 @@ function useUserNameDemo(props) {
|
|
|
7647
7527
|
}, props.demoData || {}, { arrayMerge: (_, a) => a });
|
|
7648
7528
|
}
|
|
7649
7529
|
|
|
7650
|
-
export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field,
|
|
7530
|
+
export { BigStat as sqm_big_stat, BrandComponent as sqm_brand, CardFeed as sqm_card_feed, CheckboxField as sqm_checkbox_field, DividedLayout as sqm_divided_layout, DropdownField as sqm_dropdown_field, EditProfile as sqm_edit_profile, HeroImage as sqm_hero_image, SqmHookStoryContainer as sqm_hook_story_container, Leaderboard as sqm_leaderboard, NameFields as sqm_name_fields, NavigationMenu as sqm_navigation_menu, PortalChangePassword as sqm_portal_change_password, PortalFrame as sqm_portal_frame, PortalLogin as sqm_portal_login, PortalRegister as sqm_portal_register, ProgramExplainer as sqm_program_explainer, ProgramExplainerStep as sqm_program_explainer_step, ProgramMenu as sqm_program_menu, ReferralCard as sqm_referral_card, SqmReferralIframe as sqm_referral_iframe, SqmRewardExchangeList as sqm_reward_exchange_list, SqmRouter as sqm_router, Scroll as sqm_scroll, ShareButton as sqm_share_button, ShareCode as sqm_share_code, ShareLink as sqm_share_link, StatContainer as sqm_stat_container, TableCell as sqm_table_cell, TableRow as sqm_table_row, TaskCard as sqm_task_card, Timeline as sqm_timeline, TimelineReward as sqm_timeline_entry, UserName as sqm_user_name };
|
|
@@ -23,7 +23,7 @@ import { P as PortalContainerView } from './sqm-portal-container-view-34f26e2a.j
|
|
|
23
23
|
import { P as PortalProfileView } from './sqm-portal-profile-view-28c39970.js';
|
|
24
24
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-e0436989.js';
|
|
25
25
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-c489166b.js';
|
|
26
|
-
import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, I as ShadowViewAddon } from './ShadowViewAddon-
|
|
26
|
+
import { S as ShareButtonView, L as LeaderboardView, a as ShareLinkView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, b as useShareButton, c as useDemoBigStat, d as StatContainerView, e as PortalChangePasswordView, f as PortalLoginView, g as PortalRegisterView, T as TaskCardView, h as ProgressBarView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, H as autoColorScaleCss, I as ShadowViewAddon } from './ShadowViewAddon-e42c07c6.js';
|
|
27
27
|
import { P as PortalSectionView } from './sqm-portal-section-view-c8d1c727.js';
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -9377,7 +9377,7 @@ const ReferralIframeReadme = "# sqm-referral-iframe\r\n\r\n\r\n\r\n<!-- Auto Gen
|
|
|
9377
9377
|
|
|
9378
9378
|
const ForgotPasswordReadme = "# sqm-portal-forgot-password\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------- | --------------- | -------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; success: boolean; loginPath: string; }; content?: { secondaryButton: any; messageSlot: any; emailLabel?: string; submitLabel?: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the password reset email. | `string` | `\"/resetPassword\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Request Password Reset\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-forgot-password --> sqm-form-message\r\n style sqm-portal-forgot-password fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
9379
9379
|
|
|
9380
|
-
const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\n\n\n## Properties\n\n| Property | Attribute | Description | Type | Default |\n| -------------------------- | ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; };
|
|
9380
|
+
const RegisterReadme = "# sqm-portal-register\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| -------------------------- | ---------------------------- | ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------- |\r\n| `confirmPassword` | `confirm-password` | | `boolean` | `false` |\r\n| `confirmPasswordLabel` | `confirm-password-label` | | `string` | `\"Confirm Password\"` |\r\n| `demoData` | -- | | `{ states?: { error: string; loading: boolean; confirmPassword: boolean; hideInputs: boolean; validationState?: FormState; enablePasswordValidation?: boolean; loginPath: string; }; refs?: { formRef: any; }; content?: { formData?: VNode; terms?: VNode; passwordField?: VNode; secondaryButton?: VNode; emailLabel?: string; passwordLabel?: string; submitLabel?: string; pageLabel?: string; confirmPasswordLabel: string; }; }` | `undefined` |\r\n| `emailLabel` | `email-label` | | `string` | `\"Email\"` |\r\n| `enablePasswordValidation` | `enable-password-validation` | | `boolean` | `true` |\r\n| `hideInputs` | `hide-inputs` | | `boolean` | `false` |\r\n| `loginLabel` | `login-label` | | `string` | `\"Sign in\"` |\r\n| `loginPath` | `login-path` | | `string` | `\"/login\"` |\r\n| `nextPage` | `next-page` | | `string` | `\"/\"` |\r\n| `pageLabel` | `page-label` | | `string` | `\"Register\"` |\r\n| `passwordLabel` | `password-label` | | `string` | `\"Password\"` |\r\n| `redirectPath` | `redirect-path` | The page that users are redirected to from the verification email. | `string` | `\"/verifyEmail\"` |\r\n| `submitLabel` | `submit-label` | | `string` | `\"Register\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Used by\r\n\r\n - [sqm-stencilbook](../sqm-stencilbook)\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n- [sqm-password-field](../sqm-password-field)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-register --> sqm-form-message\r\n sqm-portal-register --> sqm-password-field\r\n sqm-stencilbook --> sqm-portal-register\r\n style sqm-portal-register fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
9381
9381
|
|
|
9382
9382
|
const EditProfileReadme = "# sqm-portal-profile\r\n\r\n\r\n\r\n<!-- Auto Generated Below -->\r\n\r\n\r\n## Properties\r\n\r\n| Property | Attribute | Description | Type | Default |\r\n| ------------------------ | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ |\r\n| `countrytext` | `countrytext` | | `string` | `\"Country\"` |\r\n| `demoData` | -- | | `{ states?: { success: boolean; loading: boolean; submitDisabled: boolean; showCountry: boolean; formState: { country: string; firstName: string; lastName: string; errors: any; error: string; }; user: { id: string; accountId: string; firstName: string; lastName: string; email: string; countryCode: string; }; text: { firstnametext: string; lastnametext: string; emailtext: string; countrytext: string; editProfileHeader: string; editProfileSubHeader: string; submitChangeButtonText: string; }; }; }` | `undefined` |\r\n| `editProfileHeader` | `edit-profile-header` | | `string` | `\"Edit your profile\"` |\r\n| `editProfileSubHeader` | `edit-profile-sub-header` | | `string` | `\"Personal Information\"` |\r\n| `emailtext` | `emailtext` | | `string` | `\"Email\"` |\r\n| `firstnametext` | `firstnametext` | | `string` | `\"First Name\"` |\r\n| `lastnametext` | `lastnametext` | | `string` | `\"Last Name\"` |\r\n| `showCountry` | `show-country` | | `boolean` | `true` |\r\n| `submitChangeButtonText` | `submit-change-button-text` | | `string` | `\"Submit Changes\"` |\r\n\r\n\r\n## Dependencies\r\n\r\n### Depends on\r\n\r\n- [sqm-form-message](../sqm-form-message)\r\n\r\n### Graph\r\n```mermaid\r\ngraph TD;\r\n sqm-portal-profile --> sqm-form-message\r\n style sqm-portal-profile fill:#f9f,stroke:#333,stroke-width:4px\r\n```\r\n\r\n----------------------------------------------\r\n\r\n*Built with [StencilJS](https://stenciljs.com/)*\r\n";
|
|
9383
9383
|
|
|
@@ -9967,7 +9967,7 @@ const TermsAndConditionsLongCustomLabel = createHookStory(() => (h(PortalRegiste
|
|
|
9967
9967
|
//@ts-ignore
|
|
9968
9968
|
content: {
|
|
9969
9969
|
...defaultRegisterProps.content,
|
|
9970
|
-
terms: (h("sqm-checkbox-field", { "checkbox-label": "Participants must be at least 18 years of age and a legal resident of the U.S. or Canada. By signing up to participate in the rewards program, you agree to the
|
|
9970
|
+
terms: (h("sqm-checkbox-field", { "checkbox-label": "Participants must be at least 18 years of age and a legal resident of the U.S. or Canada. By signing up to participate in the rewards program, you agree to the {labelLink}.", "checkbox-label-link": "https://www.example.com", "checkbox-label-link-text": "terms", "checkbox-name": "termsAndConditions" })),
|
|
9971
9971
|
} }))));
|
|
9972
9972
|
|
|
9973
9973
|
const CheckboxField = /*#__PURE__*/Object.freeze({
|
|
@@ -10142,105 +10142,6 @@ const UseDropdownField = /*#__PURE__*/Object.freeze({
|
|
|
10142
10142
|
Countries: Countries
|
|
10143
10143
|
});
|
|
10144
10144
|
|
|
10145
|
-
const UseCountryField_stories = {
|
|
10146
|
-
title: "Hooks / useCountryField",
|
|
10147
|
-
};
|
|
10148
|
-
function setupGraphQL$b({ token, id }) {
|
|
10149
|
-
const accountId = id;
|
|
10150
|
-
//@ts-ignore
|
|
10151
|
-
window.widgetIdent = {
|
|
10152
|
-
tenantAlias: "test_a74miwdpofztj",
|
|
10153
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
10154
|
-
};
|
|
10155
|
-
useEffect(() => {
|
|
10156
|
-
ae$1({
|
|
10157
|
-
accountId,
|
|
10158
|
-
id,
|
|
10159
|
-
jwt: token,
|
|
10160
|
-
});
|
|
10161
|
-
return () => {
|
|
10162
|
-
window.widgetIdent = undefined;
|
|
10163
|
-
ae$1(undefined);
|
|
10164
|
-
};
|
|
10165
|
-
}, []);
|
|
10166
|
-
return { id, accountId };
|
|
10167
|
-
}
|
|
10168
|
-
const Default$d = createHookStory(() => {
|
|
10169
|
-
setupGraphQL$b({
|
|
10170
|
-
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImlkIjoibm9sb2NhbGUiLCJhY2NvdW50SWQiOiJub2xvY2FsZSJ9fQ.ACri_gO_eIdNfh3ifMmbbDp7gZz3yjT_8mfiQ96T-BY",
|
|
10171
|
-
id: "nolocale",
|
|
10172
|
-
});
|
|
10173
|
-
return (h("sqm-portal-register", null,
|
|
10174
|
-
h("sqm-country-field", { slot: "formData" })));
|
|
10175
|
-
});
|
|
10176
|
-
const English = createHookStory(() => {
|
|
10177
|
-
setupGraphQL$b({
|
|
10178
|
-
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbWVuZ2xpc2giLCJpZCI6InNhbWVuZ2xpc2gifX0._6OTVF3gcipu_ibgthUNr5UHwC-2E_lhCENI5HpYvcw",
|
|
10179
|
-
id: "samenglish",
|
|
10180
|
-
});
|
|
10181
|
-
return (h("sqm-portal-register", null,
|
|
10182
|
-
h("sqm-country-field", { slot: "formData" })));
|
|
10183
|
-
});
|
|
10184
|
-
const French = createHookStory(() => {
|
|
10185
|
-
setupGraphQL$b({
|
|
10186
|
-
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbWZyZW5jaCIsImlkIjoic2FtZnJlbmNoIn19.cwhasHpfU5MLV4vGbCQcazb6p19iSw5pD2zyrVHgePg",
|
|
10187
|
-
id: "samfrench",
|
|
10188
|
-
});
|
|
10189
|
-
return (h("sqm-portal-register", null,
|
|
10190
|
-
h("sqm-country-field", { slot: "formData" })));
|
|
10191
|
-
});
|
|
10192
|
-
const Turkish = createHookStory(() => {
|
|
10193
|
-
setupGraphQL$b({
|
|
10194
|
-
token: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1c2VyIjp7ImFjY291bnRJZCI6InNhbXR1cmtleSIsImlkIjoic2FtdHVya2V5In19.usSMe0RWg8W5FtwcvJayvAlxTw6vMxjTyWXaP8jI8_U",
|
|
10195
|
-
id: "samturkey",
|
|
10196
|
-
});
|
|
10197
|
-
return (h("sqm-portal-register", null,
|
|
10198
|
-
h("sqm-country-field", { slot: "formData" })));
|
|
10199
|
-
});
|
|
10200
|
-
const NoUser = createHookStory(() => {
|
|
10201
|
-
//@ts-ignore
|
|
10202
|
-
window.widgetIdent = {
|
|
10203
|
-
tenantAlias: "test_a74miwdpofztj",
|
|
10204
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
10205
|
-
};
|
|
10206
|
-
useEffect(() => {
|
|
10207
|
-
ae$1(undefined);
|
|
10208
|
-
return () => {
|
|
10209
|
-
window.widgetIdent = undefined;
|
|
10210
|
-
ae$1(undefined);
|
|
10211
|
-
};
|
|
10212
|
-
}, []);
|
|
10213
|
-
return (h("sqm-portal-register", null,
|
|
10214
|
-
h("sqm-country-field", { slot: "formData" })));
|
|
10215
|
-
});
|
|
10216
|
-
const NoUserFrench = createHookStory(() => {
|
|
10217
|
-
//@ts-ignore
|
|
10218
|
-
window.widgetIdent = {
|
|
10219
|
-
tenantAlias: "test_a74miwdpofztj",
|
|
10220
|
-
appDomain: "https://staging.referralsaasquatch.com",
|
|
10221
|
-
};
|
|
10222
|
-
useEffect(() => {
|
|
10223
|
-
ae$1(undefined);
|
|
10224
|
-
return () => {
|
|
10225
|
-
window.widgetIdent = undefined;
|
|
10226
|
-
ae$1(undefined);
|
|
10227
|
-
};
|
|
10228
|
-
}, []);
|
|
10229
|
-
return (h("sqm-portal-register", null,
|
|
10230
|
-
h("sqm-country-field", { slot: "formData", locale: "fr" })));
|
|
10231
|
-
});
|
|
10232
|
-
|
|
10233
|
-
const UseCountryField = /*#__PURE__*/Object.freeze({
|
|
10234
|
-
__proto__: null,
|
|
10235
|
-
'default': UseCountryField_stories,
|
|
10236
|
-
Default: Default$d,
|
|
10237
|
-
English: English,
|
|
10238
|
-
French: French,
|
|
10239
|
-
Turkish: Turkish,
|
|
10240
|
-
NoUser: NoUser,
|
|
10241
|
-
NoUserFrench: NoUserFrench
|
|
10242
|
-
});
|
|
10243
|
-
|
|
10244
10145
|
const scenario$i = "@author:derek\r\n@owner:derek\r\nFeature: Reward Exchange List\r\n\r\n The Reward Exchange List gives end users the power to exchange their rewards for other rewards.\r\n It populates a list from the reward exchange rules set up on a given tenant.\r\n\r\n Background:\r\n Given a tenant with reward exchange rules\r\n\r\n @motivating\r\n @ui\r\n Scenario: The empty state is shown if there are no visible exchanges\r\n Given a user with no visible exchanges\r\n When they view the reward exchange\r\n Then no exchange options are displayed\r\n And they see an image of a present\r\n And \"Redeem Rewards\" in bold\r\n And \"Use your points to redeem rewards once they become available\" below the bolded text\r\n And the pagination buttons are disabled\r\n\r\n @minutae\r\n @ui\r\n Scenario: A custom empty state can be provided\r\n Given a user with no visible exchanges\r\n And a custom empty state has been supplied in the \"empty\" slot\r\n When they view the reward exchange\r\n Then they see the custom empty state\r\n\r\n @motivating\r\n @ui\r\n Scenario: A Loading Skeleton is displayed when the reward exchange rules are loading\r\n Given a user\r\n When they load the reward exchange list\r\n Then they see a loading Skeleton\r\n And it has 8 skeleton cards\r\n When the reward exchange rules have loaded\r\n Then the skeleton is replaced with reward exchange options\r\n\r\n @motivating\r\n Scenario: An error banner appears when the reward exchange list fails to load\r\n Given a user trying to view the reward exchange list\r\n But it fails to load\r\n Then an error banner is displayed\r\n And it displays \"Unable to load reward exchange list. Please try again\"\r\n\r\n @motivating\r\n @ui\r\n Scenario: The exchange progress bar progresses through the exchange process\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the process bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with green outline, white fill and number 1 in green |\r\n | Step 2 `Select` title in grey |\r\n | Step 2 circle with grey fill and number 2 in white |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | lines between all steps are greyed out |\r\n When they continue to the selection page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with green outline, white fill and number 2 in green |\r\n | Step 3 `Confirm` title in grey |\r\n | Step 3 circle with grey fill and number 3 in white |\r\n | Green line between step 1 and 2 |\r\n | Grey line between step 2 and 3 |\r\n When they continue to the confirmation page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with green outline, white fill and number 3 in green |\r\n | Green line between all steps |\r\n When they continue to the redemption page\r\n Then the progress bar displays the following elements\r\n | elements |\r\n | Step 1 `Rewards` title in black |\r\n | Step 1 circle with white checkmark and green fill |\r\n | Step 2 `Select` title in black |\r\n | Step 2 circle with white checkmark and green fill |\r\n | Step 3 `Confirm` title in black |\r\n | Step 3 circle with white checkmark and green fill |\r\n | Green line between all steps |\r\n\r\n @motivating\r\n Scenario: Users must choose a reward exchange option to continue to the selection page\r\n Given a user who is eligible for the tenants reward exchange rules\r\n When they view the reward exchange list\r\n Then the 'Continue' button is disabled\r\n When they select a reward exchange card\r\n Then the card is outlined in brand colour with a brand colour cirlcular check box icon in the top right\r\n And the continue button is no longer disabled\r\n When they click \"Continue\"\r\n Then they are brought to the selection page\r\n\r\n @motivating\r\n @ui\r\n Scenario: Reward exchange rule names and images are used in the reward exchange cards\r\n Given a tenant reward exchange rule\r\n And it has name \"My Visa Exchange Rule\"\r\n And it has an image\r\n When a user views the reward exchange list\r\n Then they see a exchange card with title \"My Visa Exchange Rule\"\r\n And the exchange image on the left hand side of the card\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange source values are displayed on reward exchange cards\r\n Given a <type> reward exchange rule\r\n When a user views the reward exchange list\r\n Then they see <text> under the name on the exchange option cards\r\n And the pretty values are localized to a user locale\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | the exchange source pretty value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_GLOBAL_REWARD | the exchange source min pretty value to the source max pretty value |\r\n | VARIABLE_CREDIT_REWARD | the exchange source min pretty value to the source max pretty value |\r\n\r\n @motivating\r\n Scenario Outline: Reward exchange cards can display customized error messages\r\n Given a reward exchange rule\r\n And it has <availabilityPredicate>\r\n And the reward exchange list has prop \"not-available-error\" with <value>\r\n When the user views the reward exchange list\r\n Then the card for the reward exchange rule is disabled\r\n And <message> is displayed\r\n Examples:\r\n | availabilityPredicate | value | message |\r\n | 'champion' in user.segments ? \"NOT_CHAMPION\" : true | {unavailableReasonCode, select, NOT_CHAMPION {Sorry must be a champion!} other {unavailableReasonCode} } | Sorry must be a champion! |\r\n | user.customFields.purchaseCount < 10 ? \"MORE_PURCHASE\" : true | {unavailableReasonCode, select, MORE_PURCHASE {Complete 10 purchases to unlock} other {unavailableReasonCode} } | Complete 10 purchases to unlock |\r\n\r\n @motivating\r\n Scenario: Exchange options are disabled if they put a user over the W9 limit\r\n Given a user who is approaching their W9 limit\r\n And a reward exchange rule\r\n And its destination reward has a US taxable value that would put the user over their limit\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a \"US Tax Limit\" error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n\r\n @motivating\r\n Scenario Outline: Exchange options are disabled if a users lacks enough credit to redeem\r\n Given a <type> reward exchange rule\r\n But the user lacks enough credit to exchange for it\r\n When they view the reward exchange list\r\n Then the reward exchange card is disabled\r\n And a <text> error message is displayed on to the right of a exclamation triangle icon\r\n And the text is orange\r\n And the icon is orange\r\n Examples:\r\n | type | text |\r\n | FIXED_GLOBAL_REWARD | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_GLOBAL_REWARD | {prettySourceMinValue} required |\r\n | VARIABLE_CREDIT_REWARD | {prettySourceMinValue} required |\r\n\r\n @motivating\r\n Scenario: Users can go back to the Rewards page from the Select page\r\n Given a user viewing the Select page\r\n Then they see a \"Cancel\" text button\r\n And a \"Continue to confirmation\" brand colour button in the bottom right corner\r\n When they click \"Cancel\"\r\n Then they return to the Rewards page\r\n\r\n @motivating\r\n Scenario: Users can go back to the Select Page from the Confirm page\r\n Given a user viewing the Confirm page\r\n Then they see a \"Back\" text button\r\n And a \"Redeem\" brand colour button in the bottom right corner\r\n When they click \"Back\"\r\n Then they return to the Select Page\r\n\r\n @motivating\r\n Scenario: Reward rules with visibility predicates that evaluates to false are not shown\r\n Given a tenant reward exchange rule with visibility predicates that evaluates to false\r\n When a user views the reward exchange list\r\n Then they do not see the card for that reward exchange rule\r\n\r\n @motivating\r\n Scenario Outline: Users can choose their reward option for variable rewards on the Select page\r\n Given a <type> exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange description |\r\n | select list with all exchange options using pretty values, destination reward above source reward |\r\n Examples:\r\n | type |\r\n | STEPPED_FIXED_GLOBAL_REWARD |\r\n | VARIABLE_GLOBAL_REWARD |\r\n | VARIABLE_CREDIT_REWARD |\r\n\r\n @motivating\r\n Scenario: Users who selected a fixed exchange rule see exchange information on the Select page\r\n Given a \"FIXED_GLOBAL_REWARD\" exchange rule\r\n And it has the following fields\r\n | fields |\r\n | name |\r\n | description |\r\n | image |\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see the exchange rule image on the left hand side\r\n And on the right hand side they see the following in this order from top to bottom\r\n | elements |\r\n | exchange name |\r\n | exchange source pretty value displayed in brand colour |\r\n | exchange description |\r\n\r\n @motivating\r\n Scenario Outline: Users selection variable rewards can only select rewards they are eligible to exchange for\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they progress to the Select page for this exchange\r\n Then they see a drop down with all the reward exchange selections\r\n When they click on the drop down\r\n But they are not eligible for all of the exchanges options <dueToReason>\r\n Then the ineligble options are disabled\r\n And under the source value is <text>\r\n Examples:\r\n | type | dueToReason | text |\r\n | STEPPED_FIXED_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_GLOBAL_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | VARIABLE_CREDIT_REWARD | due to insufficent source value | {prettySourceValue} required |\r\n | STEPPED_FIXED_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_GLOBAL_REWARD | W9 | US Tax Limit |\r\n | VARIABLE_CREDIT_REWARD | W9 | US Tax Limit |\r\n\r\n @motivating\r\n Scenario Outline: The Confirm page allows users to view their exchange before committing\r\n Given a <type> exchange rule\r\n When a user views the reward exchange list\r\n And they select the exchange\r\n And they progress to Confirm page\r\n Then they see a row with title \"Reward\"\r\n And it contains the exchange name\r\n And it contains the exchange image\r\n And they <maySee> a row with title \"Reward Amount\"\r\n And it <mayContain> <amountTitle>\r\n And they see a row with title \"Cost to Redeem\"\r\n And it contains the source reward pretty value in bolded text\r\n Examples:\r\n | type | maySee | mayContain | amountTitle |\r\n | FIXED_GLOBAL_REWARD | don't | doesn't contain | N/A |\r\n | VARIABLE_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | STEPPED_FIXED_GLOBAL_REWARD | see | contains | the pretty destination value |\r\n | VARIABLE_CREDIT_REWARD | see | contains | the pretty destination value |\r\n\r\n @motivating\r\n Scenario: An error banner is displayed if an error occurs during redemeption\r\n Given a user has selected a reward to exchange\r\n And is on the confirmation page\r\n When they click \"Redeem\"\r\n But an error occurs\r\n Then an error banner appears\r\n And it contains details about the error\r\n And the reward exchange is not completed\r\n\r\n @motivating\r\n Scenario: Confetti is displayed when a reward exchange succeeds\r\n Given a user has selected a reward to exchange\r\n And they are on the confirmation page\r\n When they click \"Redeem\"\r\n And the exchange is successful\r\n Then they see confetti centered on the success page\r\n And they see text describing what they exchanged for their new reward\r\n And they see a \"Done\" brand colour button\r\n When they click \"Done\"\r\n Then they see the Rewards page\r\n\r\n @motivating\r\n Scenario: Fuel tank codes are shown when a reward exchange succeeds\r\n Given a user has selected to exchange for a fuel tank reward\r\n When they complete the reward exchange\r\n And are on the success page\r\n Then they see a textbox with their fuel tank code\r\n And a clipboard icon\r\n When they click the clipboard icon\r\n Then their fuel tank code is copied to their clipboard\r\n\r\n @motivating\r\n Scenario Outline: Users can exchange for any type of reward\r\n Given a <type> reward exchange rule for a <reward>\r\n And a user who has enough source credit to exchange for the reward\r\n When they go through the exchange flow\r\n And exchange for their reward\r\n Then their credit is exchanged for the <reward>\r\n Examples:\r\n | type | reward |\r\n | FIXED_GLOBAL_REWARD | gift card |\r\n | FIXED_GLOBAL_REWARD | fuel tank code |\r\n | FIXED_GLOBAL_REWARD | discount |\r\n | FIXED_GLOBAL_REWARD | credit reward |\r\n | STEPPED_FIXED_GLOBAL_REWARD | gift card |\r\n | STEPPED_FIXED_GLOBAL_REWARD | discount |\r\n | STEPPED_FIXED_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_GLOBAL_REWARD | gift card |\r\n | VARIABLE_GLOBAL_REWARD | discount |\r\n | VARIABLE_GLOBAL_REWARD | credit reward |\r\n | VARIABLE_CREDIT_REWARD | credit reward |";
|
|
10245
10146
|
|
|
10246
10147
|
const RewardExchangeList_stories = {
|
|
@@ -11310,7 +11211,7 @@ const RewardsTable$1 = /*#__PURE__*/Object.freeze({
|
|
|
11310
11211
|
const UseReferralTable_stories = {
|
|
11311
11212
|
title: "Hooks / useReferralTable",
|
|
11312
11213
|
};
|
|
11313
|
-
function setupGraphQL$
|
|
11214
|
+
function setupGraphQL$b() {
|
|
11314
11215
|
const id = "testestest";
|
|
11315
11216
|
const accountId = id;
|
|
11316
11217
|
//@ts-ignore
|
|
@@ -11353,7 +11254,7 @@ function setupGraphQLKlip$1({ token, id }) {
|
|
|
11353
11254
|
return { id, accountId };
|
|
11354
11255
|
}
|
|
11355
11256
|
const ReferralTable$1 = createHookStory(() => {
|
|
11356
|
-
setupGraphQL$
|
|
11257
|
+
setupGraphQL$b();
|
|
11357
11258
|
A$1("sam-partner-test-2");
|
|
11358
11259
|
return (h("sqm-referral-table", null,
|
|
11359
11260
|
h("sqm-referral-table-user-column", null),
|
|
@@ -12655,7 +12556,7 @@ const ShareCode$1 = /*#__PURE__*/Object.freeze({
|
|
|
12655
12556
|
*
|
|
12656
12557
|
*/
|
|
12657
12558
|
//
|
|
12658
|
-
const Default$
|
|
12559
|
+
const Default$d = `
|
|
12659
12560
|
// No CSS
|
|
12660
12561
|
`;
|
|
12661
12562
|
const Orangey = `
|
|
@@ -12689,7 +12590,7 @@ const Klip = `
|
|
|
12689
12590
|
|
|
12690
12591
|
const Themes = /*#__PURE__*/Object.freeze({
|
|
12691
12592
|
__proto__: null,
|
|
12692
|
-
Default: Default$
|
|
12593
|
+
Default: Default$d,
|
|
12693
12594
|
Orangey: Orangey,
|
|
12694
12595
|
Netflix: Netflix,
|
|
12695
12596
|
SaaSquatchCorporate: SaaSquatchCorporate,
|
|
@@ -15297,7 +15198,6 @@ const stories = [
|
|
|
15297
15198
|
UseLeaderboard,
|
|
15298
15199
|
UseCheckboxField,
|
|
15299
15200
|
UseDropdownField,
|
|
15300
|
-
UseCountryField,
|
|
15301
15201
|
Router,
|
|
15302
15202
|
PortalFrame,
|
|
15303
15203
|
EditProfile,
|