@saasquatch/mint-components 1.10.2-8 → 1.10.2-9
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-3e537eb3.js → ShadowViewAddon-721bb748.js} +18 -25
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +5 -65
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +6 -94
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image-view.js +1 -2
- package/dist/collection/components/sqm-image/sqm-image.js +0 -20
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +2 -87
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +18 -26
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +3 -93
- package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +2 -40
- package/dist/esm/{ShadowViewAddon-2ac771ca.js → ShadowViewAddon-31eb5b16.js} +18 -25
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-big-stat_38.entry.js +5 -65
- package/dist/esm/sqm-stencilbook.entry.js +6 -94
- package/dist/esm-es5/ShadowViewAddon-31eb5b16.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.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-0d39c815.system.entry.js +1 -0
- package/dist/mint-components/p-27bd5535.entry.js +187 -0
- package/dist/mint-components/p-b567780d.system.js +1 -0
- package/dist/mint-components/{p-560f7316.entry.js → p-bf723ae9.entry.js} +2 -2
- package/dist/mint-components/{p-a7949e42.js → p-d6474614.js} +1 -1
- package/dist/mint-components/p-ed17e637.system.js +1 -1
- package/dist/mint-components/p-f1a1e7f3.system.entry.js +1 -0
- package/dist/types/components/sqm-image/sqm-image-view.d.ts +0 -1
- package/dist/types/components/sqm-image/sqm-image.d.ts +0 -5
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +0 -3
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +0 -3
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +1 -19
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +0 -3
- package/dist/types/components.d.ts +2 -40
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/ShadowViewAddon-2ac771ca.js +0 -1
- package/dist/mint-components/p-0e507dfe.system.entry.js +0 -1
- package/dist/mint-components/p-4348de13.system.js +0 -1
- package/dist/mint-components/p-5a1b4b5d.entry.js +0 -223
- package/dist/mint-components/p-e82b056c.system.entry.js +0 -1
|
@@ -28,7 +28,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-fde54e35.js');
|
|
|
28
28
|
require('./utilities-cec9dd36.js');
|
|
29
29
|
const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-96f329ed.js');
|
|
30
30
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7ffcc0d4.js');
|
|
31
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
31
|
+
const ShadowViewAddon = require('./ShadowViewAddon-721bb748.js');
|
|
32
32
|
const sqmPortalContainerView = require('./sqm-portal-container-view-5fb2ad49.js');
|
|
33
33
|
const sqmInvoiceTableView = require('./sqm-invoice-table-view-28b14d28.js');
|
|
34
34
|
|
|
@@ -1604,8 +1604,8 @@ const SlottedIntoComponent = () => {
|
|
|
1604
1604
|
data: {
|
|
1605
1605
|
rankType: "rowNumber",
|
|
1606
1606
|
leaderboard: [],
|
|
1607
|
-
rowNumber: 10,
|
|
1608
1607
|
showUser: true,
|
|
1608
|
+
rowNumber: 10,
|
|
1609
1609
|
userRank: {
|
|
1610
1610
|
firstName: "Kutay",
|
|
1611
1611
|
lastInitial: "C",
|
|
@@ -1813,7 +1813,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
1813
1813
|
MultipleStats: MultipleStats
|
|
1814
1814
|
});
|
|
1815
1815
|
|
|
1816
|
-
const scenario$4 = "@owner:noah @author:noah\nFeature: Leaderboard\n\tThe leaderboard supports three main cases\n\t- Top Started Referrers\n\t- Top Converted Referrers\n\t- Top Point Earners\n\tTo display these different types of leaderboards it uses the backends pre-canned options.\n\tThe backend supports filtering on programId and interval, programId is sourced from program context.\n\n Background: A user exists\n Given a user\n And they are viewing the leaderboard\n\n @motivating\n Scenario Outline: Two types of referrals leaderboards can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with <value>\n And there are started referrals on the tenant\n And there are started converted on the tenant\n When the user views the leaderboard\n Then they see the referral <referralType> leaderboard\n\n Examples:\n | value | referralType |\n | topStartedReferrers | started |\n | topConvertedReferrers | converted |\n\n @motivating\n Scenario: The top point earners leaderboard can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with value \"topPointEarners\"\n And there are users with points\n When the user views the leaderboard\n Then they see the top point earners leaderboard\n And text values are displayed for point counts\n\n @minutia\n Scenario Outline: Reward pretty value is used on the top point earners leaderboard\n Given top point earners leaderboard\n And the \"POINT\" reward unit has a pretty value for the following locales\n | locale |\n | en |\n | fr |\n | tr |\n When the user views the leaderboard\n And they have <locale>\n Then they see the translated pretty value in the stat value column\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard results\n Given a <leaderboardType> leaderboard loaded with program context for \"my-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"my-test-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-test-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards can be displayed by clearing program context\n\t\t#This is important for clients with use cases like StaffTracks global points leaderboard\n\t\t#This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"\"\n When the user views the leaderboard\n Then they see global <results>\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Leaderboard results are shown in descending order\n Given there are leaderboard results\n When the user views the leaderboard\n Then they see up to the 10 top leaderboard results\n And leaderboard is in descending order\n\n @motivating\n Scenario Outline: Leaderboard results can be filtered with a time interval\n Given a <leaderboardType> leaderboard\n And it has prop \"interval\" with value \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n When the user views the leaderboard\n Then they only see <results> from within \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Leaderboard rank type can be configured\n Given a leaderboard has prop \"rank-type\" with <value>\n When the user views the leaderboard\n Then their leaderboard rank is their <rank>\n\n Examples:\n | value | rank |\n | rowNumber | row number |\n | denseRank | dense rank |\n | rank | rank |\n\n @minutia\n Scenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n Given a leaderboard has prop \"max-rows\" with <value>\n And the leaderboard has <resultCount>\n When the user views the leaderboard\n Then they see <number> rows\n\n Examples:\n | value | resultCount | number |\n | | 10 | 10 |\n | 5 | 10 | 5 |\n | 3 | 1 | 1 |\n | 25 | 15 | 15 |\n\n @minutiae @ui\n Scenario: Leaderboards with no results show an empty state\n Given a leaderboard has no results\n When the user views the leaderboard\n Then an empty state is dislayed\n And they see an image of a leaderboard\n And below they see \"View your rank in the leaderboard\"\n And below they see \"Be the first to refer a friend and reach the top of the leaderboard\"\n And the text is center aligned\n\n @minutiae @ui\n Scenario: A custom empty state can be provided\n Given a leaderboard has no results\n When the user views the leaderboard\n Then the contents of the \"empty\" slot are displayed\n\n @minutiae @ui\n Scenario: User is on Essentials plan\n Given the user has an Essentials plan\n When they view the leaderboard\n Then a message telling them to upgrade their plan appears:\n \"\"\"\n Contact Support to upgrade your plan and start leveraging\n gamification in your program.\n \"\"\"\n And an empty table image is displayed\n\n @minutiae @ui\n Scenario: Leaderboard headings can be customized\n Given a leaderboard\n And it has the following props\n | prop | value |\n | rankheading | Place |\n | usersheading | Customer |\n | statsheading | Referral Count |\n | show-rank | true |\n When the user views the leaderboard\n Then they see the following columns with headings\n | column | heading |\n | rank | Place |\n | user | Customer |\n | stat | Referral Count |\n\n @motivating @ui\n Scenario Outline: Leaderboard rank can be hidden or shown\n Given a leaderboard\n And it has prop \"show-rank\" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the rank column\n\n Examples:\n | propValue | maySee |\n | true | see |\n | false | don't see |\n | | don't see |\n\n
|
|
1816
|
+
const scenario$4 = "@owner:noah @author:noah\nFeature: Leaderboard\n\tThe leaderboard supports three main cases\n\t- Top Started Referrers\n\t- Top Converted Referrers\n\t- Top Point Earners\n\tTo display these different types of leaderboards it uses the backends pre-canned options.\n\tThe backend supports filtering on programId and interval, programId is sourced from program context.\n\n Background: A user exists\n Given a user\n And they are viewing the leaderboard\n\n @motivating\n Scenario Outline: Two types of referrals leaderboards can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with <value>\n And there are started referrals on the tenant\n And there are started converted on the tenant\n When the user views the leaderboard\n Then they see the referral <referralType> leaderboard\n\n Examples:\n | value | referralType |\n | topStartedReferrers | started |\n | topConvertedReferrers | converted |\n\n @motivating\n Scenario: The top point earners leaderboard can be displayed\n Given a leaderboard has prop \"leaderboard-type\" with value \"topPointEarners\"\n And there are users with points\n When the user views the leaderboard\n Then they see the top point earners leaderboard\n And text values are displayed for point counts\n\n @minutia\n Scenario Outline: Reward pretty value is used on the top point earners leaderboard\n Given top point earners leaderboard\n And the \"POINT\" reward unit has a pretty value for the following locales\n | locale |\n | en |\n | fr |\n | tr |\n When the user views the leaderboard\n And they have <locale>\n Then they see the translated pretty value in the stat value column\n\n @motivating\n Scenario Outline: Program Context is used by default to filter leaderboard results\n Given a <leaderboardType> leaderboard loaded with program context for \"my-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Program Id context can be overwritten with a prop\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"my-test-program\"\n When the user views the leaderboard\n Then they only see <results> from \"my-test-program\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Global leaderboards can be displayed by clearing program context\n\t\t#This is important for clients with use cases like StaffTracks global points leaderboard\n\t\t#This can also be done with a program section in a similar manner\n Given a <leaderboardType> leaderboard has prop \"program-Id\" with value \"\"\n When the user views the leaderboard\n Then they see global <results>\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario: Leaderboard results are shown in descending order\n Given there are leaderboard results\n When the user views the leaderboard\n Then they see up to the 10 top leaderboard results\n And leaderboard is in descending order\n\n @motivating\n Scenario Outline: Leaderboard results can be filtered with a time interval\n Given a <leaderboardType> leaderboard\n And it has prop \"interval\" with value \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n When the user views the leaderboard\n Then they only see <results> from within \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n\n Examples:\n | leaderboardType | results |\n | topStartedReferrers | started referrals |\n | topConvertedReferrers | converted referrals |\n | topPointEarners | points earned |\n\n @motivating\n Scenario Outline: Leaderboard rank type can be configured\n Given a leaderboard has prop \"rank-type\" with <value>\n When the user views the leaderboard\n Then their leaderboard rank is their <rank>\n\n Examples:\n | value | rank |\n | rowNumber | row number |\n | denseRank | dense rank |\n | rank | rank |\n\n @minutia\n Scenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n Given a leaderboard has prop \"max-rows\" with <value>\n And the leaderboard has <resultCount>\n When the user views the leaderboard\n Then they see <number> rows\n\n Examples:\n | value | resultCount | number |\n | | 10 | 10 |\n | 5 | 10 | 5 |\n | 3 | 1 | 1 |\n | 25 | 15 | 15 |\n\n @minutiae @ui\n Scenario: Leaderboards with no results show an empty state\n Given a leaderboard has no results\n When the user views the leaderboard\n Then an empty state is dislayed\n And they see an image of a leaderboard\n And below they see \"View your rank in the leaderboard\"\n And below they see \"Be the first to refer a friend and reach the top of the leaderboard\"\n And the text is center aligned\n\n @minutiae @ui\n Scenario: A custom empty state can be provided\n Given a leaderboard has no results\n When the user views the leaderboard\n Then the contents of the \"empty\" slot are displayed\n\n @minutiae @ui\n Scenario: User is on Essentials plan\n Given the user has an Essentials plan\n When they view the leaderboard\n Then a message telling them to upgrade their plan appears:\n \"\"\"\n Contact Support to upgrade your plan and start leveraging\n gamification in your program.\n \"\"\"\n And an empty table image is displayed\n\n @minutiae @ui\n Scenario: Leaderboard headings can be customized\n Given a leaderboard\n And it has the following props\n | prop | value |\n | rankheading | Place |\n | usersheading | Customer |\n | statsheading | Referral Count |\n | show-rank | true |\n When the user views the leaderboard\n Then they see the following columns with headings\n | column | heading |\n | rank | Place |\n | user | Customer |\n | stat | Referral Count |\n\n @motivating @ui\n Scenario Outline: Leaderboard rank can be hidden or shown\n Given a leaderboard\n And it has prop \"show-rank\" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the rank column\n\n Examples:\n | propValue | maySee |\n | true | see |\n | false | don't see |\n | | don't see |\n\n @motivating @ui\n Scenario: Users in the top 10 of the leaderboard results see their leaderboard row highlighted\n Given a user in the top 10 of the leaderboard results\n When they view the leaderboard\n Then they see the row with their name highlighted with brand colour\n\n @motivating @ui\n Scenario Outline: Users not in the top 10 leaderboard results can see their progress at the bottom of the leaderboard\n Given a user <mayHave> completed actions counted by the leaderboard\n And they are not in the top 10 leaderboard results\n And the leaderboard has prop \"show-user\" with <value>\n When they view the leaderboard\n Then they <maySee> \"...\" under the top 10 leaderboard results\n And under \"...\" they <maySee> a row highlighted with brand colour\n And they <maySee> their name\n And they <maySee> their leaderboard value\n And they <maySeeRank>\n\n Examples:\n | mayHave | value | maySee | maySeeRank |\n | has | true | see | see their rank |\n | hasn't | true | see | don't see their rank |\n | N/A | false | don't see | don't see their rank |\n | hasn't | | see | don't see their rank |\n\n @minutiae\n Scenario: Users without names are displayed as an \"Anonymous User\"\n Given a user\n And they do not have a first name\n And they do not have a last initial\n When they view the leaderboard\n Then they see the user displayed as \"Anonymous User\"\n\n @minutiae\n Scenario Outline: If a user only has a first or last name, then only that is displayed\n Given a user\n And they only have a <name>\n When they view the leaderboard\n Then they only see their <name>\n\n Examples:\n | name |\n | firstName |\n | lastName |\n";
|
|
1817
1817
|
|
|
1818
1818
|
const Leaderboard_stories = {
|
|
1819
1819
|
title: "Components/Leaderboard",
|
|
@@ -1895,8 +1895,8 @@ const users = [
|
|
|
1895
1895
|
];
|
|
1896
1896
|
const pointsUsers = [
|
|
1897
1897
|
{
|
|
1898
|
-
firstName: "
|
|
1899
|
-
lastInitial: "
|
|
1898
|
+
firstName: "",
|
|
1899
|
+
lastInitial: "",
|
|
1900
1900
|
textValue: "82 Points",
|
|
1901
1901
|
rank: 1,
|
|
1902
1902
|
rowNumber: 1,
|
|
@@ -1970,7 +1970,6 @@ const defaultStyles$1 = {
|
|
|
1970
1970
|
statsheading: "Referrals",
|
|
1971
1971
|
rankheading: "Rank",
|
|
1972
1972
|
anonymousUser: "Anonymous User",
|
|
1973
|
-
rankSuffix: "{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}",
|
|
1974
1973
|
};
|
|
1975
1974
|
const link = index.h("a", null, "Support");
|
|
1976
1975
|
const defaultElements$1 = {
|
|
@@ -2187,38 +2186,6 @@ const ReferralLeaderboard = () => {
|
|
|
2187
2186
|
};
|
|
2188
2187
|
return index.h(ShadowViewAddon.LeaderboardView, Object.assign({}, props));
|
|
2189
2188
|
};
|
|
2190
|
-
const ReferralLeaderboardWithMaxWidth = () => {
|
|
2191
|
-
const props = {
|
|
2192
|
-
states: {
|
|
2193
|
-
loading: false,
|
|
2194
|
-
hasLeaders: true,
|
|
2195
|
-
styles: {
|
|
2196
|
-
...defaultStyles$1,
|
|
2197
|
-
rankheading: "Rank",
|
|
2198
|
-
usersheading: "User",
|
|
2199
|
-
statsheading: "Referrals",
|
|
2200
|
-
showRank: false,
|
|
2201
|
-
maxWidth: "300px",
|
|
2202
|
-
},
|
|
2203
|
-
},
|
|
2204
|
-
data: {
|
|
2205
|
-
rankType: "rowNumber",
|
|
2206
|
-
leaderboard: users,
|
|
2207
|
-
rowNumber: 10,
|
|
2208
|
-
viewerRank: {
|
|
2209
|
-
firstName: "Viktor",
|
|
2210
|
-
lastInitial: "V",
|
|
2211
|
-
textValue: "82",
|
|
2212
|
-
rank: 1,
|
|
2213
|
-
rowNumber: 1,
|
|
2214
|
-
},
|
|
2215
|
-
},
|
|
2216
|
-
elements: {
|
|
2217
|
-
...defaultElements$1,
|
|
2218
|
-
},
|
|
2219
|
-
};
|
|
2220
|
-
return index.h(ShadowViewAddon.LeaderboardView, Object.assign({}, props));
|
|
2221
|
-
};
|
|
2222
2189
|
const PointsLeaderboard = () => {
|
|
2223
2190
|
const props = {
|
|
2224
2191
|
states: {
|
|
@@ -2358,58 +2325,6 @@ const HideViewer = () => {
|
|
|
2358
2325
|
};
|
|
2359
2326
|
return index.h(ShadowViewAddon.LeaderboardView, Object.assign({}, props));
|
|
2360
2327
|
};
|
|
2361
|
-
const HideNames = () => {
|
|
2362
|
-
const props = {
|
|
2363
|
-
states: {
|
|
2364
|
-
loading: false,
|
|
2365
|
-
hasLeaders: true,
|
|
2366
|
-
rowNumber: 10,
|
|
2367
|
-
styles: {
|
|
2368
|
-
...defaultStyles$1,
|
|
2369
|
-
showRank: true,
|
|
2370
|
-
hideNames: true,
|
|
2371
|
-
},
|
|
2372
|
-
},
|
|
2373
|
-
data: {
|
|
2374
|
-
rankType: "rowNumber",
|
|
2375
|
-
leaderboard: users,
|
|
2376
|
-
rowNumber: 10,
|
|
2377
|
-
viewerRank: {
|
|
2378
|
-
firstName: "Viktor",
|
|
2379
|
-
lastInitial: "V",
|
|
2380
|
-
textValue: "82",
|
|
2381
|
-
rowNumber: 1,
|
|
2382
|
-
rank: 1,
|
|
2383
|
-
},
|
|
2384
|
-
},
|
|
2385
|
-
elements: {
|
|
2386
|
-
...defaultElements$1,
|
|
2387
|
-
},
|
|
2388
|
-
};
|
|
2389
|
-
return index.h(ShadowViewAddon.LeaderboardView, Object.assign({}, props));
|
|
2390
|
-
};
|
|
2391
|
-
const LeaderboardWithNoNamesAndGraphic = () => {
|
|
2392
|
-
return (index.h("div", { style: {
|
|
2393
|
-
display: "flex",
|
|
2394
|
-
alignItems: "flex-start",
|
|
2395
|
-
justifyContent: "center",
|
|
2396
|
-
width: "100%",
|
|
2397
|
-
gap: "50px",
|
|
2398
|
-
} },
|
|
2399
|
-
index.h("div", { style: {
|
|
2400
|
-
display: "flex",
|
|
2401
|
-
flexDirection: "column",
|
|
2402
|
-
alignItems: "center",
|
|
2403
|
-
justifyContent: "center",
|
|
2404
|
-
gap: "10px",
|
|
2405
|
-
maxWidth: "30%",
|
|
2406
|
-
} },
|
|
2407
|
-
index.h("sqm-image", { width: "70%", alignment: "center", imageUrl: "https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png" }),
|
|
2408
|
-
index.h("h2", { style: { margin: "auto" } }, " Top Performers"),
|
|
2409
|
-
index.h("p", { style: { margin: "0" } }, "The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!")),
|
|
2410
|
-
index.h("sqm-leaderboard", { width: "300px", usersheading: "Referrer", statsheading: "Referrals", "rank-type": "rank", "leaderboard-type": "topStartedReferrers", rankheading: "Rank", "show-rank": "true", "hide-names": "true", "hide-viewer": "true" },
|
|
2411
|
-
index.h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png", "empty-state-header": "View your rank in the leaderboard", "empty-state-text": "Be the first to refer a friend and reach the top of the leaderboard" }))));
|
|
2412
|
-
};
|
|
2413
2328
|
|
|
2414
2329
|
const Leaderboard = /*#__PURE__*/Object.freeze({
|
|
2415
2330
|
__proto__: null,
|
|
@@ -2420,14 +2335,11 @@ const Leaderboard = /*#__PURE__*/Object.freeze({
|
|
|
2420
2335
|
One: One,
|
|
2421
2336
|
Five: Five,
|
|
2422
2337
|
ReferralLeaderboard: ReferralLeaderboard,
|
|
2423
|
-
ReferralLeaderboardWithMaxWidth: ReferralLeaderboardWithMaxWidth,
|
|
2424
2338
|
PointsLeaderboard: PointsLeaderboard,
|
|
2425
2339
|
TenWithRank: TenWithRank,
|
|
2426
2340
|
ViewerOutside: ViewerOutside,
|
|
2427
2341
|
ViewerAnonymous: ViewerAnonymous,
|
|
2428
|
-
HideViewer: HideViewer
|
|
2429
|
-
HideNames: HideNames,
|
|
2430
|
-
LeaderboardWithNoNamesAndGraphic: LeaderboardWithNoNamesAndGraphic
|
|
2342
|
+
HideViewer: HideViewer
|
|
2431
2343
|
});
|
|
2432
2344
|
|
|
2433
2345
|
const HookStoryAddon = ({ story }, children) => {
|
|
@@ -5,14 +5,13 @@ export function ImageView(props) {
|
|
|
5
5
|
const style = {
|
|
6
6
|
Container: {
|
|
7
7
|
display: "flex",
|
|
8
|
-
// width: props.width || "100%",
|
|
9
8
|
width: "100%",
|
|
10
9
|
justifyContent: props.alignment || "center",
|
|
11
10
|
background: props.backgroundColor || "",
|
|
12
11
|
},
|
|
13
12
|
Image: {
|
|
14
13
|
minHeight: props.minHeight || "100%",
|
|
15
|
-
width:
|
|
14
|
+
width: "100%",
|
|
16
15
|
maxWidth: "max-content",
|
|
17
16
|
objectFit: "cover",
|
|
18
17
|
},
|
|
@@ -126,26 +126,6 @@ export class Image {
|
|
|
126
126
|
},
|
|
127
127
|
"attribute": "min-height",
|
|
128
128
|
"reflect": false
|
|
129
|
-
},
|
|
130
|
-
"width": {
|
|
131
|
-
"type": "string",
|
|
132
|
-
"mutable": false,
|
|
133
|
-
"complexType": {
|
|
134
|
-
"original": "string",
|
|
135
|
-
"resolved": "string",
|
|
136
|
-
"references": {}
|
|
137
|
-
},
|
|
138
|
-
"required": false,
|
|
139
|
-
"optional": true,
|
|
140
|
-
"docs": {
|
|
141
|
-
"tags": [{
|
|
142
|
-
"text": "Width",
|
|
143
|
-
"name": "uiName"
|
|
144
|
-
}],
|
|
145
|
-
"text": "(Optional) Constrains the width of the image. Can be a pixel value or a percentage i.e. \"500px\", \"33%\", etc."
|
|
146
|
-
},
|
|
147
|
-
"attribute": "width",
|
|
148
|
-
"reflect": false
|
|
149
129
|
}
|
|
150
130
|
}; }
|
|
151
131
|
}
|
|
@@ -81,8 +81,8 @@ const users = [
|
|
|
81
81
|
];
|
|
82
82
|
const pointsUsers = [
|
|
83
83
|
{
|
|
84
|
-
firstName: "
|
|
85
|
-
lastInitial: "
|
|
84
|
+
firstName: "",
|
|
85
|
+
lastInitial: "",
|
|
86
86
|
textValue: "82 Points",
|
|
87
87
|
rank: 1,
|
|
88
88
|
rowNumber: 1,
|
|
@@ -156,7 +156,6 @@ const defaultStyles = {
|
|
|
156
156
|
statsheading: "Referrals",
|
|
157
157
|
rankheading: "Rank",
|
|
158
158
|
anonymousUser: "Anonymous User",
|
|
159
|
-
rankSuffix: "{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}",
|
|
160
159
|
};
|
|
161
160
|
const link = h("a", null, "Support");
|
|
162
161
|
const tag = "Contact" + link + "about upgrading your plan";
|
|
@@ -374,38 +373,6 @@ export const ReferralLeaderboard = () => {
|
|
|
374
373
|
};
|
|
375
374
|
return h(LeaderboardView, Object.assign({}, props));
|
|
376
375
|
};
|
|
377
|
-
export const ReferralLeaderboardWithMaxWidth = () => {
|
|
378
|
-
const props = {
|
|
379
|
-
states: {
|
|
380
|
-
loading: false,
|
|
381
|
-
hasLeaders: true,
|
|
382
|
-
styles: {
|
|
383
|
-
...defaultStyles,
|
|
384
|
-
rankheading: "Rank",
|
|
385
|
-
usersheading: "User",
|
|
386
|
-
statsheading: "Referrals",
|
|
387
|
-
showRank: false,
|
|
388
|
-
maxWidth: "300px",
|
|
389
|
-
},
|
|
390
|
-
},
|
|
391
|
-
data: {
|
|
392
|
-
rankType: "rowNumber",
|
|
393
|
-
leaderboard: users,
|
|
394
|
-
rowNumber: 10,
|
|
395
|
-
viewerRank: {
|
|
396
|
-
firstName: "Viktor",
|
|
397
|
-
lastInitial: "V",
|
|
398
|
-
textValue: "82",
|
|
399
|
-
rank: 1,
|
|
400
|
-
rowNumber: 1,
|
|
401
|
-
},
|
|
402
|
-
},
|
|
403
|
-
elements: {
|
|
404
|
-
...defaultElements,
|
|
405
|
-
},
|
|
406
|
-
};
|
|
407
|
-
return h(LeaderboardView, Object.assign({}, props));
|
|
408
|
-
};
|
|
409
376
|
export const PointsLeaderboard = () => {
|
|
410
377
|
const props = {
|
|
411
378
|
states: {
|
|
@@ -545,55 +512,3 @@ export const HideViewer = () => {
|
|
|
545
512
|
};
|
|
546
513
|
return h(LeaderboardView, Object.assign({}, props));
|
|
547
514
|
};
|
|
548
|
-
export const HideNames = () => {
|
|
549
|
-
const props = {
|
|
550
|
-
states: {
|
|
551
|
-
loading: false,
|
|
552
|
-
hasLeaders: true,
|
|
553
|
-
rowNumber: 10,
|
|
554
|
-
styles: {
|
|
555
|
-
...defaultStyles,
|
|
556
|
-
showRank: true,
|
|
557
|
-
hideNames: true,
|
|
558
|
-
},
|
|
559
|
-
},
|
|
560
|
-
data: {
|
|
561
|
-
rankType: "rowNumber",
|
|
562
|
-
leaderboard: users,
|
|
563
|
-
rowNumber: 10,
|
|
564
|
-
viewerRank: {
|
|
565
|
-
firstName: "Viktor",
|
|
566
|
-
lastInitial: "V",
|
|
567
|
-
textValue: "82",
|
|
568
|
-
rowNumber: 1,
|
|
569
|
-
rank: 1,
|
|
570
|
-
},
|
|
571
|
-
},
|
|
572
|
-
elements: {
|
|
573
|
-
...defaultElements,
|
|
574
|
-
},
|
|
575
|
-
};
|
|
576
|
-
return h(LeaderboardView, Object.assign({}, props));
|
|
577
|
-
};
|
|
578
|
-
export const LeaderboardWithNoNamesAndGraphic = () => {
|
|
579
|
-
return (h("div", { style: {
|
|
580
|
-
display: "flex",
|
|
581
|
-
alignItems: "flex-start",
|
|
582
|
-
justifyContent: "center",
|
|
583
|
-
width: "100%",
|
|
584
|
-
gap: "50px",
|
|
585
|
-
} },
|
|
586
|
-
h("div", { style: {
|
|
587
|
-
display: "flex",
|
|
588
|
-
flexDirection: "column",
|
|
589
|
-
alignItems: "center",
|
|
590
|
-
justifyContent: "center",
|
|
591
|
-
gap: "10px",
|
|
592
|
-
maxWidth: "30%",
|
|
593
|
-
} },
|
|
594
|
-
h("sqm-image", { width: "70%", alignment: "center", imageUrl: "https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png" }),
|
|
595
|
-
h("h2", { style: { margin: "auto" } }, " Top Performers"),
|
|
596
|
-
h("p", { style: { margin: "0" } }, "The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!")),
|
|
597
|
-
h("sqm-leaderboard", { width: "300px", usersheading: "Referrer", statsheading: "Referrals", "rank-type": "rank", "leaderboard-type": "topStartedReferrers", rankheading: "Rank", "show-rank": "true", "hide-names": "true", "hide-viewer": "true" },
|
|
598
|
-
h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png", "empty-state-header": "View your rank in the leaderboard", "empty-state-text": "Be the first to refer a friend and reach the top of the leaderboard" }))));
|
|
599
|
-
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { createStyleSheet } from "../../styling/JSS";
|
|
3
|
-
import { intl } from "../../global/global";
|
|
4
3
|
const style = {
|
|
5
4
|
Leaderboard: {
|
|
6
5
|
"& table": {
|
|
@@ -40,9 +39,6 @@ const style = {
|
|
|
40
39
|
width: "auto",
|
|
41
40
|
whiteSpace: "nowrap",
|
|
42
41
|
},
|
|
43
|
-
"& .fullWidth": {
|
|
44
|
-
width: "100%",
|
|
45
|
-
},
|
|
46
42
|
},
|
|
47
43
|
};
|
|
48
44
|
const sheet = createStyleSheet(style);
|
|
@@ -53,7 +49,7 @@ const vanillaStyle = `
|
|
|
53
49
|
}
|
|
54
50
|
`;
|
|
55
51
|
export function LeaderboardView(props) {
|
|
56
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l
|
|
52
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
57
53
|
const { states, data, elements } = props;
|
|
58
54
|
const { styles } = states;
|
|
59
55
|
if (states.loading)
|
|
@@ -67,18 +63,17 @@ export function LeaderboardView(props) {
|
|
|
67
63
|
if (!states.hasLeaders)
|
|
68
64
|
return elements.empty;
|
|
69
65
|
let userSeenFlag = false;
|
|
70
|
-
|
|
71
|
-
console.log("The rank suffix is: ", styles.width);
|
|
72
|
-
return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base", style: { width: styles.width || "100%" } },
|
|
66
|
+
return (h("div", { class: sheet.classes.Leaderboard, part: "sqm-base" },
|
|
73
67
|
h("style", { type: "text/css" },
|
|
74
68
|
styleString,
|
|
75
69
|
vanillaStyle),
|
|
70
|
+
h("div", null, "Leaderboards"),
|
|
76
71
|
h("table", { part: "sqm-table" },
|
|
77
72
|
h("tr", null,
|
|
78
|
-
styles.showRank &&
|
|
79
|
-
|
|
80
|
-
h("th", { class: "Score" }, styles.statsheading)), (
|
|
81
|
-
|
|
73
|
+
styles.showRank && h("th", { class: "Rank" }, styles.rankheading),
|
|
74
|
+
h("th", { class: "User" }, styles.usersheading),
|
|
75
|
+
h("th", { class: "Score" }, styles.statsheading)), (_a = data.leaderboard) === null || _a === void 0 ? void 0 :
|
|
76
|
+
_a.map((user) => {
|
|
82
77
|
var _a, _b;
|
|
83
78
|
if (user.rowNumber === ((_a = data.viewerRank) === null || _a === void 0 ? void 0 : _a.rowNumber))
|
|
84
79
|
userSeenFlag = true;
|
|
@@ -86,27 +81,24 @@ export function LeaderboardView(props) {
|
|
|
86
81
|
user.rowNumber === ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rowNumber)
|
|
87
82
|
? "highlight"
|
|
88
83
|
: "" },
|
|
89
|
-
styles.showRank &&
|
|
90
|
-
|
|
91
|
-
defaultMessage: styles.rankSuffix,
|
|
92
|
-
}, { rank: user.rank }))),
|
|
93
|
-
!styles.hideNames && (h("td", { class: "User" }, user.firstName && user.lastInitial
|
|
84
|
+
styles.showRank && h("td", { class: "Rank" }, user.rank),
|
|
85
|
+
h("td", { class: "User" }, user.firstName && user.lastInitial
|
|
94
86
|
? user.firstName + " " + user.lastInitial
|
|
95
87
|
: user.firstName || user.lastInitial
|
|
96
88
|
? user.firstName || user.lastInitial
|
|
97
|
-
: styles.anonymousUser)
|
|
89
|
+
: styles.anonymousUser),
|
|
98
90
|
h("td", { class: "Score" }, user.textValue)));
|
|
99
91
|
}),
|
|
100
92
|
!userSeenFlag && !styles.hideViewer && (h("tr", null,
|
|
101
93
|
h("td", { colSpan: 100, class: "ellipses" },
|
|
102
94
|
h("sl-icon", { name: "three-dots", style: { verticalAlign: "middle" } })))),
|
|
103
95
|
!userSeenFlag && !styles.hideViewer && (h("tr", { class: "highlight" },
|
|
104
|
-
styles.showRank && (h("td", { class: "Rank" }, ((
|
|
105
|
-
|
|
106
|
-
? ((
|
|
107
|
-
" " + ((
|
|
108
|
-
: ((
|
|
109
|
-
? ((
|
|
110
|
-
: styles.anonymousUser)
|
|
111
|
-
h("td", { class: "Score" }, ((
|
|
96
|
+
styles.showRank && (h("td", { class: "Rank" }, ((_b = data.viewerRank) === null || _b === void 0 ? void 0 : _b.rank) || "-")),
|
|
97
|
+
h("td", { class: "User" }, ((_c = data.viewerRank) === null || _c === void 0 ? void 0 : _c.firstName) && ((_d = data.viewerRank) === null || _d === void 0 ? void 0 : _d.lastInitial)
|
|
98
|
+
? ((_e = data.viewerRank) === null || _e === void 0 ? void 0 : _e.firstName) +
|
|
99
|
+
" " + ((_f = data.viewerRank) === null || _f === void 0 ? void 0 : _f.lastInitial)
|
|
100
|
+
: ((_g = data.viewerRank) === null || _g === void 0 ? void 0 : _g.firstName) || ((_h = data.viewerRank) === null || _h === void 0 ? void 0 : _h.lastInitial)
|
|
101
|
+
? ((_j = data.viewerRank) === null || _j === void 0 ? void 0 : _j.firstName) || ((_k = data.viewerRank) === null || _k === void 0 ? void 0 : _k.lastInitial)
|
|
102
|
+
: styles.anonymousUser),
|
|
103
|
+
h("td", { class: "Score" }, ((_l = data.viewerRank) === null || _l === void 0 ? void 0 : _l.textValue) || "0"))))));
|
|
112
104
|
}
|
|
@@ -9,25 +9,14 @@ import { useLeaderboard } from "./useLeaderboard";
|
|
|
9
9
|
* @uiName Leaderboard
|
|
10
10
|
* @slots [{"name":"empty", "title":"Empty State"}]
|
|
11
11
|
* @requiredFeatures ["LEADERBOARDS"]
|
|
12
|
-
* @validParents ["div"]
|
|
13
12
|
* @exampleGroup Leaderboard
|
|
14
13
|
* @example Referral Started Leaderboard - <sqm-leaderboard usersheading="Referrer" statsheading="Referrals" rank-type="rank" leaderboard-type="topStartedReferrers" rankheading="Rank" show-rank="true"><sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png" empty-state-header="View your rank in the leaderboard" empty-state-text="Be the first to refer a friend and reach the top of the leaderboard" ></sqm-empty></sqm-leaderboard>
|
|
15
14
|
* @example Referral Converted Leaderboard - <sqm-leaderboard usersheading="Referrer" statsheading="Referrals" rank-type="rank" leaderboard-type="topConvertedReferrers" rankheading="Rank" show-rank="true"><sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png" empty-state-header="View your rank in the leaderboard" empty-state-text="Be the first to refer a friend and reach the top of the leaderboard" ></sqm-empty></sqm-leaderboard>
|
|
16
15
|
* @example Points Earned Leaderboard - <sqm-leaderboard usersheading="Name" statsheading="Points" rank-type="rank" leaderboard-type="topPointEarners" rankheading="Rank" show-rank="true"><sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png" empty-state-header="View your rank in the leaderboard" empty-state-text="Be the first to refer a friend and reach the top of the leaderboard" ></sqm-empty></sqm-leaderboard>
|
|
17
|
-
* @example Anonymous Leaderboard - <div style="display: flex; align-items: flex-start; justify-content: center; width: 100%; gap: 50px;"><div style="display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; max-width: 30%;"><sqm-image width="70%" alignment="center" imageUrl="https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png"></sqm-image><h2 style="margin: auto;">Top Performers</h2><p style="margin: 0;">The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!</p></div><sqm-leaderboard width="300px" usersheading="Referrer" statsheading="Referrals" rank-type="rank" leaderboard-type="topStartedReferrers" rankheading="Rank" show-rank="true" hide-names="true" hide-viewer="true"><sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png" empty-state-header="View your rank in the leaderboard" empty-state-text="Be the first to refer a friend and reach the top of the leaderboard"></sqm-empty></sqm-leaderboard></div>
|
|
18
|
-
* @example Test - <sqm-leaderboard usersheading="Name" statsheading="Points" rank-type="rank" leaderboard-type="topPointEarners" rankheading="Rank" show-rank="true"><sqm-empty empty-state-image="https://res.cloudinary.com/saasquatch/image/upload/v1644360953/squatch-assets/empty_leaderboard2.png" empty-state-header="View your rank in the leaderboard" empty-state-text="Be the first to refer a friend and reach the top of the leaderboard" ></sqm-empty></sqm-leaderboard>
|
|
19
16
|
* @featureTooltip <div>Motivate your participants by gamifying your program. Contact <a href="mailto:saasquatch-support%40impact.com?subject=Next steps for Leaderboards feature&body=Hi Support Team, %0D%0A%0D%0A I am interested in learning more about how Leaderboards can support the growth of our referral program. Please connect me with a program strategy manager to discuss this feature further, and determine the next steps.%0D%0A%0D%0A%0D%0AThank you,%0D%0A[Add your name here]">Support</a> to upgrade your plan and add a leaderboard.</div>
|
|
20
17
|
*/
|
|
21
18
|
export class Leaderboard {
|
|
22
19
|
constructor() {
|
|
23
|
-
/**
|
|
24
|
-
* @uiName Place text
|
|
25
|
-
*/
|
|
26
|
-
this.width = "100%";
|
|
27
|
-
/**
|
|
28
|
-
* @uiName Rank Suffix
|
|
29
|
-
*/
|
|
30
|
-
this.rankSuffix = "{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}";
|
|
31
20
|
/**
|
|
32
21
|
* Hide the viewer's leaderboard row if not in the top results.
|
|
33
22
|
*
|
|
@@ -35,17 +24,10 @@ export class Leaderboard {
|
|
|
35
24
|
* @default
|
|
36
25
|
*/
|
|
37
26
|
this.hideViewer = false;
|
|
38
|
-
/**
|
|
39
|
-
* Hide the Names of users to protect personal identifiable information
|
|
40
|
-
*
|
|
41
|
-
* @uiName Hide users names
|
|
42
|
-
* @default
|
|
43
|
-
*/
|
|
44
|
-
this.hideNames = false;
|
|
45
27
|
/**
|
|
46
28
|
* Hides the leaderboard if user is on Essentials plan
|
|
47
29
|
*
|
|
48
|
-
* @uiName Hide
|
|
30
|
+
* @uiName Hide viewing user
|
|
49
31
|
* @default
|
|
50
32
|
*/
|
|
51
33
|
this.isEssentials = false;
|
|
@@ -80,11 +62,8 @@ export class Leaderboard {
|
|
|
80
62
|
anonymousUser: this.anonymousUser,
|
|
81
63
|
interval: this.interval,
|
|
82
64
|
hideViewer: this.hideViewer,
|
|
83
|
-
hideNames: this.hideNames,
|
|
84
65
|
showRank: this.showRank,
|
|
85
66
|
isEssentials: this.isEssentials,
|
|
86
|
-
rankSuffix: this.rankSuffix,
|
|
87
|
-
width: this.width,
|
|
88
67
|
};
|
|
89
68
|
const demoProps = { ...props, demoData: this.demoData };
|
|
90
69
|
const viewprops = isDemo()
|
|
@@ -198,48 +177,6 @@ export class Leaderboard {
|
|
|
198
177
|
"attribute": "show-rank",
|
|
199
178
|
"reflect": false
|
|
200
179
|
},
|
|
201
|
-
"width": {
|
|
202
|
-
"type": "string",
|
|
203
|
-
"mutable": false,
|
|
204
|
-
"complexType": {
|
|
205
|
-
"original": "string",
|
|
206
|
-
"resolved": "string",
|
|
207
|
-
"references": {}
|
|
208
|
-
},
|
|
209
|
-
"required": false,
|
|
210
|
-
"optional": false,
|
|
211
|
-
"docs": {
|
|
212
|
-
"tags": [{
|
|
213
|
-
"text": "Place text",
|
|
214
|
-
"name": "uiName"
|
|
215
|
-
}],
|
|
216
|
-
"text": ""
|
|
217
|
-
},
|
|
218
|
-
"attribute": "width",
|
|
219
|
-
"reflect": false,
|
|
220
|
-
"defaultValue": "\"100%\""
|
|
221
|
-
},
|
|
222
|
-
"rankSuffix": {
|
|
223
|
-
"type": "string",
|
|
224
|
-
"mutable": false,
|
|
225
|
-
"complexType": {
|
|
226
|
-
"original": "string",
|
|
227
|
-
"resolved": "string",
|
|
228
|
-
"references": {}
|
|
229
|
-
},
|
|
230
|
-
"required": false,
|
|
231
|
-
"optional": false,
|
|
232
|
-
"docs": {
|
|
233
|
-
"tags": [{
|
|
234
|
-
"text": "Rank Suffix",
|
|
235
|
-
"name": "uiName"
|
|
236
|
-
}],
|
|
237
|
-
"text": ""
|
|
238
|
-
},
|
|
239
|
-
"attribute": "rank-suffix",
|
|
240
|
-
"reflect": false,
|
|
241
|
-
"defaultValue": "\"{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}\""
|
|
242
|
-
},
|
|
243
180
|
"hideViewer": {
|
|
244
181
|
"type": "boolean",
|
|
245
182
|
"mutable": false,
|
|
@@ -264,30 +201,6 @@ export class Leaderboard {
|
|
|
264
201
|
"reflect": false,
|
|
265
202
|
"defaultValue": "false"
|
|
266
203
|
},
|
|
267
|
-
"hideNames": {
|
|
268
|
-
"type": "boolean",
|
|
269
|
-
"mutable": false,
|
|
270
|
-
"complexType": {
|
|
271
|
-
"original": "boolean",
|
|
272
|
-
"resolved": "boolean",
|
|
273
|
-
"references": {}
|
|
274
|
-
},
|
|
275
|
-
"required": false,
|
|
276
|
-
"optional": false,
|
|
277
|
-
"docs": {
|
|
278
|
-
"tags": [{
|
|
279
|
-
"text": "Hide users names",
|
|
280
|
-
"name": "uiName"
|
|
281
|
-
}, {
|
|
282
|
-
"text": undefined,
|
|
283
|
-
"name": "default"
|
|
284
|
-
}],
|
|
285
|
-
"text": "Hide the Names of users to protect personal identifiable information"
|
|
286
|
-
},
|
|
287
|
-
"attribute": "hide-names",
|
|
288
|
-
"reflect": false,
|
|
289
|
-
"defaultValue": "false"
|
|
290
|
-
},
|
|
291
204
|
"isEssentials": {
|
|
292
205
|
"type": "boolean",
|
|
293
206
|
"mutable": false,
|
|
@@ -300,7 +213,7 @@ export class Leaderboard {
|
|
|
300
213
|
"optional": true,
|
|
301
214
|
"docs": {
|
|
302
215
|
"tags": [{
|
|
303
|
-
"text": "Hide
|
|
216
|
+
"text": "Hide viewing user",
|
|
304
217
|
"name": "uiName"
|
|
305
218
|
}, {
|
|
306
219
|
"text": undefined,
|
|
@@ -446,7 +359,7 @@ export class Leaderboard {
|
|
|
446
359
|
"mutable": false,
|
|
447
360
|
"complexType": {
|
|
448
361
|
"original": "DemoData<LeaderboardViewProps>",
|
|
449
|
-
"resolved": "{ states?: { loading: boolean; hasLeaders: boolean; isEssentials?: boolean; styles: { usersheading: string; statsheading: string; rankheading?: string; showRank?: boolean; hideViewer?: boolean;
|
|
362
|
+
"resolved": "{ states?: { loading: boolean; hasLeaders: boolean; isEssentials?: boolean; styles: { usersheading: string; statsheading: string; rankheading?: string; showRank?: boolean; hideViewer?: boolean; anonymousUser?: string; }; }; data?: { rankType: string; leaderboard: { textValue: string; rank: number; firstName: string; lastInitial: string; rowNumber: number; }[]; viewerRank?: { textValue: string; rank: number; firstName: string; lastInitial: string; rowNumber: number; }; }; elements?: { empty: VNode; essentials: VNode; loadingstate: VNode; }; }",
|
|
450
363
|
"references": {
|
|
451
364
|
"DemoData": {
|
|
452
365
|
"location": "import",
|
|
@@ -547,9 +460,6 @@ function useLeaderboardDemo(props) {
|
|
|
547
460
|
: "Anonymous User",
|
|
548
461
|
showRank: props.showRank,
|
|
549
462
|
hideViewer: props.hideViewer,
|
|
550
|
-
hideNames: props.hideNames,
|
|
551
|
-
rankSuffix: props.rankSuffix,
|
|
552
|
-
width: props.width,
|
|
553
463
|
},
|
|
554
464
|
},
|
|
555
465
|
data: {
|