@saasquatch/mint-components 1.6.13 → 1.6.14-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-d55832bb.js → ShadowViewAddon-ac94a95b.js} +32 -0
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +4 -2
- package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +1 -0
- package/dist/collection/components/sqm-big-stat/useBigStat.js +32 -0
- package/dist/esm/{ShadowViewAddon-0f9993af.js → ShadowViewAddon-8cd731b0.js} +32 -0
- package/dist/esm/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +4 -2
- package/dist/esm-es5/ShadowViewAddon-8cd731b0.js +1 -0
- package/dist/esm-es5/sqm-big-stat_39.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-e3996469.entry.js → p-10e4bf6e.entry.js} +1 -1
- package/dist/mint-components/p-369f489b.system.entry.js +1 -0
- package/dist/mint-components/{p-46319934.entry.js → p-45c5f8f7.entry.js} +2 -2
- package/dist/mint-components/p-652f937a.system.js +1 -0
- package/dist/mint-components/{p-0ebf6140.system.entry.js → p-78e9583d.system.entry.js} +1 -1
- package/dist/mint-components/p-b8f65174.js +281 -0
- package/dist/mint-components/p-c3dd8944.system.js +1 -1
- package/dist/types/components/sqm-big-stat/UseBigStat.stories.d.ts +6 -0
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-0f9993af.js +0 -1
- package/dist/mint-components/p-1be3030c.system.entry.js +0 -1
- package/dist/mint-components/p-50c4d42b.js +0 -268
- package/dist/mint-components/p-f870021b.system.js +0 -1
|
@@ -1290,6 +1290,30 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1290
1290
|
};
|
|
1291
1291
|
});
|
|
1292
1292
|
};
|
|
1293
|
+
const trafficQuery = () => {
|
|
1294
|
+
return debugQuery(index_module.dist.gql `
|
|
1295
|
+
query traffic {
|
|
1296
|
+
viewer: viewer {
|
|
1297
|
+
... on User {
|
|
1298
|
+
stats(
|
|
1299
|
+
programId: $programId
|
|
1300
|
+
) {
|
|
1301
|
+
traffic
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
}
|
|
1307
|
+
`, {}, (res) => {
|
|
1308
|
+
var _a, _b;
|
|
1309
|
+
const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
|
|
1310
|
+
const fallback = 0;
|
|
1311
|
+
return {
|
|
1312
|
+
value: traffic || fallback,
|
|
1313
|
+
statvalue: traffic || fallback,
|
|
1314
|
+
};
|
|
1315
|
+
});
|
|
1316
|
+
};
|
|
1293
1317
|
// functions are of the form (programId: string, ...args: string) => string
|
|
1294
1318
|
const queries = {
|
|
1295
1319
|
rewardsAssigned: {
|
|
@@ -1348,6 +1372,10 @@ const queries = {
|
|
|
1348
1372
|
label: "Custom Fields",
|
|
1349
1373
|
query: customFieldsQuery,
|
|
1350
1374
|
},
|
|
1375
|
+
traffic: {
|
|
1376
|
+
label: "Traffic",
|
|
1377
|
+
query: trafficQuery,
|
|
1378
|
+
},
|
|
1351
1379
|
};
|
|
1352
1380
|
// this should be exposed in documentation somehow
|
|
1353
1381
|
const StatPaths = [
|
|
@@ -1383,6 +1411,10 @@ const StatPaths = [
|
|
|
1383
1411
|
name: "rewardBalance",
|
|
1384
1412
|
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1385
1413
|
},
|
|
1414
|
+
{
|
|
1415
|
+
name: "traffic",
|
|
1416
|
+
route: "/(traffic)",
|
|
1417
|
+
},
|
|
1386
1418
|
];
|
|
1387
1419
|
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
1388
1420
|
function useBigStat(props) {
|
|
@@ -17,7 +17,7 @@ const utils = require('./utils-6847bc06.js');
|
|
|
17
17
|
require('./sqm-text-span-view-8a7b98d0.js');
|
|
18
18
|
const useRegistrationFormState = require('./useRegistrationFormState-7e9641c4.js');
|
|
19
19
|
const AsYouType = require('./AsYouType-6788393a.js');
|
|
20
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
20
|
+
const ShadowViewAddon = require('./ShadowViewAddon-ac94a95b.js');
|
|
21
21
|
require('./sqm-portal-container-view-3ebf55a7.js');
|
|
22
22
|
|
|
23
23
|
const BigStat = class {
|
|
@@ -26,7 +26,7 @@ const sqmPortalForgotPasswordView = require('./sqm-portal-forgot-password-view-9
|
|
|
26
26
|
const sqmPortalProfileView = require('./sqm-portal-profile-view-28176f3e.js');
|
|
27
27
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-4a03d26a.js');
|
|
28
28
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-fb3bbf7b.js');
|
|
29
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
29
|
+
const ShadowViewAddon = require('./ShadowViewAddon-ac94a95b.js');
|
|
30
30
|
const sqmPortalContainerView = require('./sqm-portal-container-view-3ebf55a7.js');
|
|
31
31
|
|
|
32
32
|
/**
|
|
@@ -2936,6 +2936,7 @@ const CustomFieldWithEmptySpaceLabel = createHookStory(() => {
|
|
|
2936
2936
|
const CustomFieldWithTextLabel = createHookStory(() => {
|
|
2937
2937
|
return View(`/customFields/thingCount`, "/(customFields)/:customField", "Thing Count");
|
|
2938
2938
|
});
|
|
2939
|
+
const Traffic = createHookStory(() => View("/traffic", "/(traffic)"));
|
|
2939
2940
|
|
|
2940
2941
|
const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
2941
2942
|
__proto__: null,
|
|
@@ -2971,7 +2972,8 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
|
2971
2972
|
CustomFieldWithLabel: CustomFieldWithLabel,
|
|
2972
2973
|
CustomFieldWithEmptyLabel: CustomFieldWithEmptyLabel,
|
|
2973
2974
|
CustomFieldWithEmptySpaceLabel: CustomFieldWithEmptySpaceLabel,
|
|
2974
|
-
CustomFieldWithTextLabel: CustomFieldWithTextLabel
|
|
2975
|
+
CustomFieldWithTextLabel: CustomFieldWithTextLabel,
|
|
2976
|
+
Traffic: Traffic
|
|
2975
2977
|
});
|
|
2976
2978
|
|
|
2977
2979
|
function setupGraphQL$4() {
|
|
@@ -111,3 +111,4 @@ export const CustomFieldWithEmptySpaceLabel = createHookStory(() => {
|
|
|
111
111
|
export const CustomFieldWithTextLabel = createHookStory(() => {
|
|
112
112
|
return View(`/customFields/thingCount`, "/(customFields)/:customField", "Thing Count");
|
|
113
113
|
});
|
|
114
|
+
export const Traffic = createHookStory(() => View("/traffic", "/(traffic)"));
|
|
@@ -468,6 +468,30 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
468
468
|
};
|
|
469
469
|
});
|
|
470
470
|
};
|
|
471
|
+
const trafficQuery = () => {
|
|
472
|
+
return debugQuery(gql `
|
|
473
|
+
query traffic {
|
|
474
|
+
viewer: viewer {
|
|
475
|
+
... on User {
|
|
476
|
+
stats(
|
|
477
|
+
programId: $programId
|
|
478
|
+
) {
|
|
479
|
+
traffic
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
`, {}, (res) => {
|
|
486
|
+
var _a, _b;
|
|
487
|
+
const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
|
|
488
|
+
const fallback = 0;
|
|
489
|
+
return {
|
|
490
|
+
value: traffic || fallback,
|
|
491
|
+
statvalue: traffic || fallback,
|
|
492
|
+
};
|
|
493
|
+
});
|
|
494
|
+
};
|
|
471
495
|
// functions are of the form (programId: string, ...args: string) => string
|
|
472
496
|
export const queries = {
|
|
473
497
|
rewardsAssigned: {
|
|
@@ -526,6 +550,10 @@ export const queries = {
|
|
|
526
550
|
label: "Custom Fields",
|
|
527
551
|
query: customFieldsQuery,
|
|
528
552
|
},
|
|
553
|
+
traffic: {
|
|
554
|
+
label: "Traffic",
|
|
555
|
+
query: trafficQuery,
|
|
556
|
+
},
|
|
529
557
|
};
|
|
530
558
|
// this should be exposed in documentation somehow
|
|
531
559
|
export const StatPaths = [
|
|
@@ -561,6 +589,10 @@ export const StatPaths = [
|
|
|
561
589
|
name: "rewardBalance",
|
|
562
590
|
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
563
591
|
},
|
|
592
|
+
{
|
|
593
|
+
name: "traffic",
|
|
594
|
+
route: "/(traffic)",
|
|
595
|
+
},
|
|
564
596
|
];
|
|
565
597
|
export const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
566
598
|
export function useBigStat(props) {
|
|
@@ -1288,6 +1288,30 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1288
1288
|
};
|
|
1289
1289
|
});
|
|
1290
1290
|
};
|
|
1291
|
+
const trafficQuery = () => {
|
|
1292
|
+
return debugQuery(dist.gql `
|
|
1293
|
+
query traffic {
|
|
1294
|
+
viewer: viewer {
|
|
1295
|
+
... on User {
|
|
1296
|
+
stats(
|
|
1297
|
+
programId: $programId
|
|
1298
|
+
) {
|
|
1299
|
+
traffic
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
}
|
|
1304
|
+
}
|
|
1305
|
+
`, {}, (res) => {
|
|
1306
|
+
var _a, _b;
|
|
1307
|
+
const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
|
|
1308
|
+
const fallback = 0;
|
|
1309
|
+
return {
|
|
1310
|
+
value: traffic || fallback,
|
|
1311
|
+
statvalue: traffic || fallback,
|
|
1312
|
+
};
|
|
1313
|
+
});
|
|
1314
|
+
};
|
|
1291
1315
|
// functions are of the form (programId: string, ...args: string) => string
|
|
1292
1316
|
const queries = {
|
|
1293
1317
|
rewardsAssigned: {
|
|
@@ -1346,6 +1370,10 @@ const queries = {
|
|
|
1346
1370
|
label: "Custom Fields",
|
|
1347
1371
|
query: customFieldsQuery,
|
|
1348
1372
|
},
|
|
1373
|
+
traffic: {
|
|
1374
|
+
label: "Traffic",
|
|
1375
|
+
query: trafficQuery,
|
|
1376
|
+
},
|
|
1349
1377
|
};
|
|
1350
1378
|
// this should be exposed in documentation somehow
|
|
1351
1379
|
const StatPaths = [
|
|
@@ -1381,6 +1409,10 @@ const StatPaths = [
|
|
|
1381
1409
|
name: "rewardBalance",
|
|
1382
1410
|
route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
|
|
1383
1411
|
},
|
|
1412
|
+
{
|
|
1413
|
+
name: "traffic",
|
|
1414
|
+
route: "/(traffic)",
|
|
1415
|
+
},
|
|
1384
1416
|
];
|
|
1385
1417
|
const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
|
|
1386
1418
|
function useBigStat(props) {
|
|
@@ -13,7 +13,7 @@ import { g as getProps, a as getMissingProps, s as sanitizeUrlPath } from './uti
|
|
|
13
13
|
import './sqm-text-span-view-1eaedc4d.js';
|
|
14
14
|
import { R as REGISTRATION_FORM_STATE_CONTEXT, u as useRegistrationFormState } from './useRegistrationFormState-b1f730bd.js';
|
|
15
15
|
import { A as AsYouType } from './AsYouType-46f67d0d.js';
|
|
16
|
-
import { b as useDemoBigStat, U as useBigStat, B as BigStatView, O as autoColorScaleCss, K as CardFeedView, j as CheckboxFieldView, M as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, W as demoRewardExchange, k as RewardExchangeView, X as pathToRegexp, a as useShareButton, S as ShareButtonView, C as CopyTextView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
16
|
+
import { b as useDemoBigStat, U as useBigStat, B as BigStatView, O as autoColorScaleCss, K as CardFeedView, j as CheckboxFieldView, M as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, V as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, i as PortalFooterView, P as PortalFrameView, e as PortalLoginView, f as PortalRegisterView, R as ReferralIframeView, W as demoRewardExchange, k as RewardExchangeView, X as pathToRegexp, a as useShareButton, S as ShareButtonView, C as CopyTextView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-8cd731b0.js';
|
|
17
17
|
import './sqm-portal-container-view-b7b10841.js';
|
|
18
18
|
|
|
19
19
|
const BigStat = class {
|
|
@@ -22,7 +22,7 @@ import { P as PortalForgotPasswordView } from './sqm-portal-forgot-password-view
|
|
|
22
22
|
import { P as PortalProfileView } from './sqm-portal-profile-view-cc13ab93.js';
|
|
23
23
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-e4f288e8.js';
|
|
24
24
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-f0994025.js';
|
|
25
|
-
import { S as ShareButtonView, L as LeaderboardView, C as CopyTextView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalLoginView, f as PortalRegisterView, T as TaskCardView, g as ProgressBarView, h as PoweredByImg$1, i as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, j as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, k as RewardExchangeView, r as rewardExchangeCustomErrorMsg, l as rewardExchangeLongText, m as rewardExchangeSelected, n as chooseAmountFixed, o as chooseAmountFixedNoDescription, p as chooseAmountVariable, q as chooseAmountVariableNoDescription, s as chooseAmountVariableDisabled, t as chooseAmountVariableUnavailable, v as confirmFixed, w as confirmVariable, x as redemptionError, y as queryError, z as success, A as successVariable, F as loading, G as empty$1, J as rewardExchange, K as CardFeedView, M as CouponCodeView, O as autoColorScaleCss, Q as ShadowViewAddon } from './ShadowViewAddon-
|
|
25
|
+
import { S as ShareButtonView, L as LeaderboardView, C as CopyTextView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalLoginView, f as PortalRegisterView, T as TaskCardView, g as ProgressBarView, h as PoweredByImg$1, i as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, j as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, k as RewardExchangeView, r as rewardExchangeCustomErrorMsg, l as rewardExchangeLongText, m as rewardExchangeSelected, n as chooseAmountFixed, o as chooseAmountFixedNoDescription, p as chooseAmountVariable, q as chooseAmountVariableNoDescription, s as chooseAmountVariableDisabled, t as chooseAmountVariableUnavailable, v as confirmFixed, w as confirmVariable, x as redemptionError, y as queryError, z as success, A as successVariable, F as loading, G as empty$1, J as rewardExchange, K as CardFeedView, M as CouponCodeView, O as autoColorScaleCss, Q as ShadowViewAddon } from './ShadowViewAddon-8cd731b0.js';
|
|
26
26
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-b7b10841.js';
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -2932,6 +2932,7 @@ const CustomFieldWithEmptySpaceLabel = createHookStory(() => {
|
|
|
2932
2932
|
const CustomFieldWithTextLabel = createHookStory(() => {
|
|
2933
2933
|
return View(`/customFields/thingCount`, "/(customFields)/:customField", "Thing Count");
|
|
2934
2934
|
});
|
|
2935
|
+
const Traffic = createHookStory(() => View("/traffic", "/(traffic)"));
|
|
2935
2936
|
|
|
2936
2937
|
const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
2937
2938
|
__proto__: null,
|
|
@@ -2967,7 +2968,8 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
|
2967
2968
|
CustomFieldWithLabel: CustomFieldWithLabel,
|
|
2968
2969
|
CustomFieldWithEmptyLabel: CustomFieldWithEmptyLabel,
|
|
2969
2970
|
CustomFieldWithEmptySpaceLabel: CustomFieldWithEmptySpaceLabel,
|
|
2970
|
-
CustomFieldWithTextLabel: CustomFieldWithTextLabel
|
|
2971
|
+
CustomFieldWithTextLabel: CustomFieldWithTextLabel,
|
|
2972
|
+
Traffic: Traffic
|
|
2971
2973
|
});
|
|
2972
2974
|
|
|
2973
2975
|
function setupGraphQL$4() {
|