@saasquatch/mint-components 1.3.2-6 → 1.3.2-7
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/sqm-big-stat.cjs.entry.js +1 -1
- package/dist/cjs/sqm-divided-layout_28.cjs.entry.js +6 -2
- package/dist/cjs/{useDemoBigStat-d7c65044.js → useDemoBigStat-051a69f7.js} +26 -0
- package/dist/collection/components/sqm-big-stat/UseBigStat.stories.js +3 -0
- package/dist/collection/components/sqm-big-stat/useBigStat.js +26 -0
- package/dist/esm/sqm-big-stat.entry.js +1 -1
- package/dist/esm/sqm-divided-layout_28.entry.js +6 -2
- package/dist/esm/{useDemoBigStat-3d4832ef.js → useDemoBigStat-95889548.js} +26 -0
- package/dist/esm-es5/sqm-big-stat.entry.js +1 -1
- package/dist/esm-es5/sqm-divided-layout_28.entry.js +1 -1
- package/dist/esm-es5/useDemoBigStat-95889548.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-0faf1857.system.js +1 -0
- package/dist/mint-components/{p-aefa270d.entry.js → p-1d445125.entry.js} +1 -1
- package/dist/mint-components/{p-2d209222.system.entry.js → p-32b27a5c.system.entry.js} +1 -1
- package/dist/mint-components/p-91d39961.system.js +1 -1
- package/dist/mint-components/{p-6e9944ed.system.entry.js → p-b2633117.system.entry.js} +1 -1
- package/dist/mint-components/{p-0c07c81a.js → p-b6e6be5e.js} +9 -1
- package/dist/mint-components/{p-8f04bed2.entry.js → p-f1953bd7.entry.js} +4 -4
- package/dist/types/components/sqm-big-stat/UseBigStat.stories.d.ts +6 -0
- package/package.json +1 -1
- package/dist/esm-es5/useDemoBigStat-3d4832ef.js +0 -1
- package/dist/mint-components/p-fca9971b.system.js +0 -1
|
@@ -8,7 +8,7 @@ require('./use-callback-fadb2643.js');
|
|
|
8
8
|
const index_module = require('./index.module-6a7bda18.js');
|
|
9
9
|
require('./jss-preset-default.esm-6304d24f.js');
|
|
10
10
|
require('./cjs-1066ec21.js');
|
|
11
|
-
const useDemoBigStat = require('./useDemoBigStat-
|
|
11
|
+
const useDemoBigStat = require('./useDemoBigStat-051a69f7.js');
|
|
12
12
|
|
|
13
13
|
const BigStat = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -19,7 +19,7 @@ const sqmTextSpanView = require('./sqm-text-span-view-b5ae787b.js');
|
|
|
19
19
|
const index$1 = require('./index-19309631.js');
|
|
20
20
|
const reRender = require('./re-render-7cdb2d81.js');
|
|
21
21
|
const useChildElements = require('./useChildElements-428ca5b8.js');
|
|
22
|
-
const useDemoBigStat = require('./useDemoBigStat-
|
|
22
|
+
const useDemoBigStat = require('./useDemoBigStat-051a69f7.js');
|
|
23
23
|
const sqmShareLinkView = require('./sqm-share-link-view-a935d07e.js');
|
|
24
24
|
const ShadowViewAddon = require('./ShadowViewAddon-75c18b96.js');
|
|
25
25
|
const sqmLeaderboardRankView = require('./sqm-leaderboard-rank-view-35015d30.js');
|
|
@@ -17928,6 +17928,9 @@ const RewardBalanceCashUSD = createHookStory(() => {
|
|
|
17928
17928
|
const ProgramGoals = createHookStory(() => {
|
|
17929
17929
|
const dummy = encodeURIComponent("Paid-Member-Goal/referrals");
|
|
17930
17930
|
return View(`/programGoals/count/${dummy}`, "/(programGoals)/:metricType/:goalId");
|
|
17931
|
+
});
|
|
17932
|
+
const CustomField = createHookStory(() => {
|
|
17933
|
+
return View(`/customFields/paidMember`, "/(customFields)/:customField");
|
|
17931
17934
|
});
|
|
17932
17935
|
|
|
17933
17936
|
const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
@@ -17959,7 +17962,8 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
|
17959
17962
|
RewardsAvailableWithSlash: RewardsAvailableWithSlash,
|
|
17960
17963
|
RewardBalance: RewardBalance,
|
|
17961
17964
|
RewardBalanceCashUSD: RewardBalanceCashUSD,
|
|
17962
|
-
ProgramGoals: ProgramGoals
|
|
17965
|
+
ProgramGoals: ProgramGoals,
|
|
17966
|
+
CustomField: CustomField
|
|
17963
17967
|
});
|
|
17964
17968
|
|
|
17965
17969
|
function setupGraphQL$4() {
|
|
@@ -401,6 +401,27 @@ const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
|
401
401
|
};
|
|
402
402
|
});
|
|
403
403
|
};
|
|
404
|
+
const customFieldsQuery = (programId, locale, fieldName, goalId) => {
|
|
405
|
+
// Confirm this behaviour
|
|
406
|
+
if (programId === "classic")
|
|
407
|
+
return null;
|
|
408
|
+
return debugQuery(index_module.dist.gql `
|
|
409
|
+
query {
|
|
410
|
+
viewer {
|
|
411
|
+
... on User {
|
|
412
|
+
customFields
|
|
413
|
+
}
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
`, { programId, fieldName, goalId, locale }, (res) => {
|
|
417
|
+
var _a, _b, _c;
|
|
418
|
+
const customField = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.customFields) === null || _c === void 0 ? void 0 : _c[fieldName];
|
|
419
|
+
return {
|
|
420
|
+
value: customField || 0,
|
|
421
|
+
statvalue: (customField === null || customField === void 0 ? void 0 : customField.toString()) || "0",
|
|
422
|
+
};
|
|
423
|
+
});
|
|
424
|
+
};
|
|
404
425
|
const referralsMonthQuery = (programId) => {
|
|
405
426
|
const programFilter = programId === "classic"
|
|
406
427
|
? { programId_exists: false }
|
|
@@ -831,10 +852,15 @@ const queries = {
|
|
|
831
852
|
label: "Program Goals",
|
|
832
853
|
query: programGoalsQuery,
|
|
833
854
|
},
|
|
855
|
+
customFields: {
|
|
856
|
+
label: "Custom Fields",
|
|
857
|
+
query: customFieldsQuery,
|
|
858
|
+
},
|
|
834
859
|
};
|
|
835
860
|
// this should be exposed in documentation somehow
|
|
836
861
|
const StatPaths = [
|
|
837
862
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
863
|
+
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
838
864
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
839
865
|
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
840
866
|
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
@@ -103,3 +103,6 @@ export const ProgramGoals = createHookStory(() => {
|
|
|
103
103
|
const dummy = encodeURIComponent("Paid-Member-Goal/referrals");
|
|
104
104
|
return View(`/programGoals/count/${dummy}`, "/(programGoals)/:metricType/:goalId");
|
|
105
105
|
});
|
|
106
|
+
export const CustomField = createHookStory(() => {
|
|
107
|
+
return View(`/customFields/paidMember`, "/(customFields)/:customField");
|
|
108
|
+
});
|
|
@@ -69,6 +69,27 @@ const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
|
69
69
|
};
|
|
70
70
|
});
|
|
71
71
|
};
|
|
72
|
+
const customFieldsQuery = (programId, locale, fieldName, goalId) => {
|
|
73
|
+
// Confirm this behaviour
|
|
74
|
+
if (programId === "classic")
|
|
75
|
+
return null;
|
|
76
|
+
return debugQuery(gql `
|
|
77
|
+
query {
|
|
78
|
+
viewer {
|
|
79
|
+
... on User {
|
|
80
|
+
customFields
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
`, { programId, fieldName, goalId, locale }, (res) => {
|
|
85
|
+
var _a, _b, _c;
|
|
86
|
+
const customField = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.customFields) === null || _c === void 0 ? void 0 : _c[fieldName];
|
|
87
|
+
return {
|
|
88
|
+
value: customField || 0,
|
|
89
|
+
statvalue: (customField === null || customField === void 0 ? void 0 : customField.toString()) || "0",
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
};
|
|
72
93
|
const referralsMonthQuery = (programId) => {
|
|
73
94
|
const programFilter = programId === "classic"
|
|
74
95
|
? { programId_exists: false }
|
|
@@ -499,10 +520,15 @@ export const queries = {
|
|
|
499
520
|
label: "Program Goals",
|
|
500
521
|
query: programGoalsQuery,
|
|
501
522
|
},
|
|
523
|
+
customFields: {
|
|
524
|
+
label: "Custom Fields",
|
|
525
|
+
query: customFieldsQuery,
|
|
526
|
+
},
|
|
502
527
|
};
|
|
503
528
|
// this should be exposed in documentation somehow
|
|
504
529
|
export const StatPaths = [
|
|
505
530
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
531
|
+
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
506
532
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
507
533
|
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
508
534
|
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
@@ -4,7 +4,7 @@ import './use-callback-b38a1523.js';
|
|
|
4
4
|
import { j } from './index.module-f80561db.js';
|
|
5
5
|
import './jss-preset-default.esm-71fae192.js';
|
|
6
6
|
import './cjs-bdfb4486.js';
|
|
7
|
-
import { a as useDemoBigStat, u as useBigStat, B as BigStatView } from './useDemoBigStat-
|
|
7
|
+
import { a as useDemoBigStat, u as useBigStat, B as BigStatView } from './useDemoBigStat-95889548.js';
|
|
8
8
|
|
|
9
9
|
const BigStat = class {
|
|
10
10
|
constructor(hostRef) {
|
|
@@ -15,7 +15,7 @@ import { T as TextSpanView } from './sqm-text-span-view-1781df94.js';
|
|
|
15
15
|
import { g as gql } from './index-2f5dd0a1.js';
|
|
16
16
|
import { u as useRerenderListener } from './re-render-9ab5fe0f.js';
|
|
17
17
|
import { u as useChildElements } from './useChildElements-506f00d0.js';
|
|
18
|
-
import { p as pathToRegexp, B as BigStatView, u as useBigStat, a as useDemoBigStat } from './useDemoBigStat-
|
|
18
|
+
import { p as pathToRegexp, B as BigStatView, u as useBigStat, a as useDemoBigStat } from './useDemoBigStat-95889548.js';
|
|
19
19
|
import { S as ShareLinkView } from './sqm-share-link-view-9282b8e8.js';
|
|
20
20
|
import { L as LeaderboardView, u as useLeaderboard, S as ShadowViewAddon } from './ShadowViewAddon-fff5d35d.js';
|
|
21
21
|
import { L as LeaderboardRankView } from './sqm-leaderboard-rank-view-da91f5f3.js';
|
|
@@ -17924,6 +17924,9 @@ const RewardBalanceCashUSD = createHookStory(() => {
|
|
|
17924
17924
|
const ProgramGoals = createHookStory(() => {
|
|
17925
17925
|
const dummy = encodeURIComponent("Paid-Member-Goal/referrals");
|
|
17926
17926
|
return View(`/programGoals/count/${dummy}`, "/(programGoals)/:metricType/:goalId");
|
|
17927
|
+
});
|
|
17928
|
+
const CustomField = createHookStory(() => {
|
|
17929
|
+
return View(`/customFields/paidMember`, "/(customFields)/:customField");
|
|
17927
17930
|
});
|
|
17928
17931
|
|
|
17929
17932
|
const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
@@ -17955,7 +17958,8 @@ const UseBigStat = /*#__PURE__*/Object.freeze({
|
|
|
17955
17958
|
RewardsAvailableWithSlash: RewardsAvailableWithSlash,
|
|
17956
17959
|
RewardBalance: RewardBalance,
|
|
17957
17960
|
RewardBalanceCashUSD: RewardBalanceCashUSD,
|
|
17958
|
-
ProgramGoals: ProgramGoals
|
|
17961
|
+
ProgramGoals: ProgramGoals,
|
|
17962
|
+
CustomField: CustomField
|
|
17959
17963
|
});
|
|
17960
17964
|
|
|
17961
17965
|
function setupGraphQL$4() {
|
|
@@ -399,6 +399,27 @@ const programGoalsQuery = (programId, locale, metricType, goalId) => {
|
|
|
399
399
|
};
|
|
400
400
|
});
|
|
401
401
|
};
|
|
402
|
+
const customFieldsQuery = (programId, locale, fieldName, goalId) => {
|
|
403
|
+
// Confirm this behaviour
|
|
404
|
+
if (programId === "classic")
|
|
405
|
+
return null;
|
|
406
|
+
return debugQuery(dist.gql `
|
|
407
|
+
query {
|
|
408
|
+
viewer {
|
|
409
|
+
... on User {
|
|
410
|
+
customFields
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
`, { programId, fieldName, goalId, locale }, (res) => {
|
|
415
|
+
var _a, _b, _c;
|
|
416
|
+
const customField = (_c = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.customFields) === null || _c === void 0 ? void 0 : _c[fieldName];
|
|
417
|
+
return {
|
|
418
|
+
value: customField || 0,
|
|
419
|
+
statvalue: (customField === null || customField === void 0 ? void 0 : customField.toString()) || "0",
|
|
420
|
+
};
|
|
421
|
+
});
|
|
422
|
+
};
|
|
402
423
|
const referralsMonthQuery = (programId) => {
|
|
403
424
|
const programFilter = programId === "classic"
|
|
404
425
|
? { programId_exists: false }
|
|
@@ -829,10 +850,15 @@ const queries = {
|
|
|
829
850
|
label: "Program Goals",
|
|
830
851
|
query: programGoalsQuery,
|
|
831
852
|
},
|
|
853
|
+
customFields: {
|
|
854
|
+
label: "Custom Fields",
|
|
855
|
+
query: customFieldsQuery,
|
|
856
|
+
},
|
|
832
857
|
};
|
|
833
858
|
// this should be exposed in documentation somehow
|
|
834
859
|
const StatPaths = [
|
|
835
860
|
{ name: "programGoals", route: "/(programGoals)/:metricType/:goalId" },
|
|
861
|
+
{ name: "customFields", route: "/(customFields)/:customField" },
|
|
836
862
|
{ name: "referralsCount", route: "/(referralsCount)/:status?" },
|
|
837
863
|
{ name: "referralsMonth", route: "/(referralsMonth)" },
|
|
838
864
|
{ name: "referralsWeek", route: "/(referralsWeek)" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as registerInstance,h as h$1}from"./index-17b4da69.js";import{m as h}from"./extends-3a3f9fe2.js";import"./use-callback-b38a1523.js";import{j}from"./index.module-f80561db.js";import"./jss-preset-default.esm-71fae192.js";import"./cjs-bdfb4486.js";import{a as useDemoBigStat,u as useBigStat,B as BigStatView}from"./useDemoBigStat-
|
|
1
|
+
import{r as registerInstance,h as h$1}from"./index-17b4da69.js";import{m as h}from"./extends-3a3f9fe2.js";import"./use-callback-b38a1523.js";import{j}from"./index.module-f80561db.js";import"./jss-preset-default.esm-71fae192.js";import"./cjs-bdfb4486.js";import{a as useDemoBigStat,u as useBigStat,B as BigStatView}from"./useDemoBigStat-95889548.js";var BigStat=function(){function t(t){registerInstance(this,t);this.flexReverse=false;this.ignored=true;h(this)}t.prototype.disconnectedCallback=function(){};t.prototype.render=function(){var t=j()?useDemoBigStat(this):useBigStat(this),e=t.props,s=t.label;return h$1(BigStatView,Object.assign({},e),h$1("slot",null,s))};return t}();export{BigStat as sqm_big_stat};
|