@saasquatch/mint-components 1.6.13 → 1.6.14-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.
Files changed (26) hide show
  1. package/dist/cjs/{ShadowViewAddon-d55832bb.js → ShadowViewAddon-d8d7865d.js} +29 -0
  2. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +1 -1
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +4 -2
  4. package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +1 -0
  5. package/dist/collection/components/sqm-big-stat/useBigStat.js +29 -0
  6. package/dist/esm/{ShadowViewAddon-0f9993af.js → ShadowViewAddon-0c74201e.js} +29 -0
  7. package/dist/esm/sqm-big-stat_39.entry.js +1 -1
  8. package/dist/esm/sqm-stencilbook.entry.js +4 -2
  9. package/dist/esm-es5/ShadowViewAddon-0c74201e.js +1 -0
  10. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  11. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  12. package/dist/mint-components/mint-components.esm.js +1 -1
  13. package/dist/mint-components/{p-0ebf6140.system.entry.js → p-232aab82.system.entry.js} +1 -1
  14. package/dist/mint-components/{p-e3996469.entry.js → p-3a096b4f.entry.js} +1 -1
  15. package/dist/mint-components/p-5e4735e0.system.entry.js +1 -0
  16. package/dist/mint-components/p-b4f4faac.js +278 -0
  17. package/dist/mint-components/p-c3dd8944.system.js +1 -1
  18. package/dist/mint-components/{p-46319934.entry.js → p-c69d1f1e.entry.js} +2 -2
  19. package/dist/mint-components/p-e7ca4428.system.js +1 -0
  20. package/dist/types/components/sqm-big-stat/UseBigStat.stories.d.ts +6 -0
  21. package/docs/docs.docx +0 -0
  22. package/package.json +1 -1
  23. package/dist/esm-es5/ShadowViewAddon-0f9993af.js +0 -1
  24. package/dist/mint-components/p-1be3030c.system.entry.js +0 -1
  25. package/dist/mint-components/p-50c4d42b.js +0 -268
  26. package/dist/mint-components/p-f870021b.system.js +0 -1
@@ -1290,6 +1290,27 @@ 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
+ traffic
1300
+ }
1301
+ }
1302
+ }
1303
+ }
1304
+ `, {}, (res) => {
1305
+ var _a, _b;
1306
+ const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
1307
+ const fallback = 0;
1308
+ return {
1309
+ value: traffic || fallback,
1310
+ statvalue: traffic || fallback,
1311
+ };
1312
+ });
1313
+ };
1293
1314
  // functions are of the form (programId: string, ...args: string) => string
1294
1315
  const queries = {
1295
1316
  rewardsAssigned: {
@@ -1348,6 +1369,10 @@ const queries = {
1348
1369
  label: "Custom Fields",
1349
1370
  query: customFieldsQuery,
1350
1371
  },
1372
+ traffic: {
1373
+ label: "Traffic",
1374
+ query: trafficQuery,
1375
+ },
1351
1376
  };
1352
1377
  // this should be exposed in documentation somehow
1353
1378
  const StatPaths = [
@@ -1383,6 +1408,10 @@ const StatPaths = [
1383
1408
  name: "rewardBalance",
1384
1409
  route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
1385
1410
  },
1411
+ {
1412
+ name: "traffic",
1413
+ route: "/(traffic)",
1414
+ },
1386
1415
  ];
1387
1416
  const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
1388
1417
  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-d55832bb.js');
20
+ const ShadowViewAddon = require('./ShadowViewAddon-d8d7865d.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-d55832bb.js');
29
+ const ShadowViewAddon = require('./ShadowViewAddon-d8d7865d.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,27 @@ 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
+ traffic
478
+ }
479
+ }
480
+ }
481
+ }
482
+ `, {}, (res) => {
483
+ var _a, _b;
484
+ const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
485
+ const fallback = 0;
486
+ return {
487
+ value: traffic || fallback,
488
+ statvalue: traffic || fallback,
489
+ };
490
+ });
491
+ };
471
492
  // functions are of the form (programId: string, ...args: string) => string
472
493
  export const queries = {
473
494
  rewardsAssigned: {
@@ -526,6 +547,10 @@ export const queries = {
526
547
  label: "Custom Fields",
527
548
  query: customFieldsQuery,
528
549
  },
550
+ traffic: {
551
+ label: "Traffic",
552
+ query: trafficQuery,
553
+ },
529
554
  };
530
555
  // this should be exposed in documentation somehow
531
556
  export const StatPaths = [
@@ -561,6 +586,10 @@ export const StatPaths = [
561
586
  name: "rewardBalance",
562
587
  route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
563
588
  },
589
+ {
590
+ name: "traffic",
591
+ route: "/(traffic)",
592
+ },
564
593
  ];
565
594
  export const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
566
595
  export function useBigStat(props) {
@@ -1288,6 +1288,27 @@ 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
+ traffic
1298
+ }
1299
+ }
1300
+ }
1301
+ }
1302
+ `, {}, (res) => {
1303
+ var _a, _b;
1304
+ const traffic = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.stats.traffic;
1305
+ const fallback = 0;
1306
+ return {
1307
+ value: traffic || fallback,
1308
+ statvalue: traffic || fallback,
1309
+ };
1310
+ });
1311
+ };
1291
1312
  // functions are of the form (programId: string, ...args: string) => string
1292
1313
  const queries = {
1293
1314
  rewardsAssigned: {
@@ -1346,6 +1367,10 @@ const queries = {
1346
1367
  label: "Custom Fields",
1347
1368
  query: customFieldsQuery,
1348
1369
  },
1370
+ traffic: {
1371
+ label: "Traffic",
1372
+ query: trafficQuery,
1373
+ },
1349
1374
  };
1350
1375
  // this should be exposed in documentation somehow
1351
1376
  const StatPaths = [
@@ -1381,6 +1406,10 @@ const StatPaths = [
1381
1406
  name: "rewardBalance",
1382
1407
  route: "/(rewardBalance)/:statType/:unit/:format([prettyValue|value]*)?/:global?",
1383
1408
  },
1409
+ {
1410
+ name: "traffic",
1411
+ route: "/(traffic)",
1412
+ },
1384
1413
  ];
1385
1414
  const StatPatterns = StatPaths.map((pattern) => pathToRegexp(pattern.route));
1386
1415
  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-0f9993af.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-0c74201e.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-0f9993af.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-0c74201e.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() {