@saasquatch/mint-components 1.10.2-9 → 1.10.2
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-721bb748.js → ShadowViewAddon-b2621f27.js} +50 -27
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_16.cjs.entry.js +57 -33
- package/dist/cjs/sqm-big-stat_38.cjs.entry.js +69 -14
- package/dist/cjs/sqm-empty_4.cjs.entry.js +8 -1
- package/dist/cjs/{sqm-portal-container-view-5fb2ad49.js → sqm-portal-container-view-990a85a3.js} +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +138 -14
- package/dist/collection/components/sqm-empty/EmptyState.stories.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image-view.js +1 -1
- package/dist/collection/components/sqm-image/sqm-image.js +20 -0
- package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +116 -9
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +51 -26
- package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +118 -16
- package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +40 -3
- package/dist/collection/components/sqm-portal-container/PortalContainer.stories.js +12 -0
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +1 -1
- package/dist/collection/components/sqm-portal-container/sqm-portal-container.js +37 -0
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.js +2 -1
- package/dist/collection/components/tax-and-cash/sqm-user-info-form/sqm-user-info-form-view.js +55 -32
- package/dist/esm/{ShadowViewAddon-31eb5b16.js → ShadowViewAddon-04640297.js} +50 -27
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_16.entry.js +57 -33
- package/dist/esm/sqm-big-stat_38.entry.js +69 -14
- package/dist/esm/sqm-empty_4.entry.js +8 -1
- package/dist/esm/{sqm-portal-container-view-ab89c6cc.js → sqm-portal-container-view-6c582684.js} +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +138 -14
- package/dist/esm-es5/ShadowViewAddon-04640297.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-banking-info-form_16.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-6c582684.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-1c0be73e.entry.js +223 -0
- package/dist/mint-components/p-293b71ba.system.entry.js +1 -0
- package/dist/mint-components/{p-b45ba369.entry.js → p-31e810e9.entry.js} +2 -2
- package/dist/mint-components/{p-bf723ae9.entry.js → p-59d740b3.entry.js} +2 -2
- package/dist/mint-components/p-5de21018.system.entry.js +1 -0
- package/dist/mint-components/p-65d430d4.system.entry.js +1 -0
- package/dist/mint-components/p-9f0629ba.system.entry.js +1 -0
- package/dist/mint-components/{p-e704842c.js → p-c7fd9e16.js} +1 -1
- package/dist/mint-components/{p-d6474614.js → p-d3348267.js} +20 -20
- package/dist/mint-components/p-d8d2de11.entry.js +1 -0
- package/dist/mint-components/p-dbc2167e.system.js +1 -0
- package/dist/mint-components/p-ed17e637.system.js +1 -1
- package/dist/mint-components/p-ed6ebd60.system.js +1 -0
- package/dist/types/components/sqm-image/sqm-image-view.d.ts +1 -0
- package/dist/types/components/sqm-image/sqm-image.d.ts +5 -0
- package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +4 -0
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +6 -3
- package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +28 -4
- package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +4 -1
- package/dist/types/components/sqm-portal-container/PortalContainer.stories.d.ts +1 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container-view.d.ts +1 -0
- package/dist/types/components/sqm-portal-container/sqm-portal-container.d.ts +7 -0
- package/dist/types/components.d.ts +66 -2
- 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-31eb5b16.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-ab89c6cc.js +0 -1
- package/dist/mint-components/p-0d39c815.system.entry.js +0 -1
- package/dist/mint-components/p-1fe65a36.entry.js +0 -1
- package/dist/mint-components/p-27bd5535.entry.js +0 -187
- package/dist/mint-components/p-34fd1229.system.entry.js +0 -1
- package/dist/mint-components/p-922578e4.system.js +0 -1
- package/dist/mint-components/p-b567780d.system.js +0 -1
- package/dist/mint-components/p-c34a507e.system.entry.js +0 -1
- package/dist/mint-components/p-f1a1e7f3.system.entry.js +0 -1
|
@@ -4,7 +4,7 @@ import { i as intl } from './global-04c7d3b5.js';
|
|
|
4
4
|
import './index.module-def4aec5.js';
|
|
5
5
|
import './JSS-67b5cff8.js';
|
|
6
6
|
import { g as getProps } from './utils-334c1e34.js';
|
|
7
|
-
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-
|
|
7
|
+
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-6c582684.js';
|
|
8
8
|
|
|
9
9
|
function EmptyStateView(props) {
|
|
10
10
|
const { emptyStateHeader, emptyStateImage, emptyStateText, supportText, missingFeature = "", } = props;
|
|
@@ -67,6 +67,13 @@ const PortalContainer = class {
|
|
|
67
67
|
* @uiName Maximum width
|
|
68
68
|
*/
|
|
69
69
|
this.maxWidth = "100%";
|
|
70
|
+
/**
|
|
71
|
+
* @uiName Flex wrap behavior
|
|
72
|
+
* @uiType string
|
|
73
|
+
* @uiEnum ["wrap", "nowrap"]
|
|
74
|
+
* @uiEnumNames ["Wrap", "No Wrap"]
|
|
75
|
+
*/
|
|
76
|
+
this.flexWrap = "wrap";
|
|
70
77
|
/**
|
|
71
78
|
* @uiName Background color
|
|
72
79
|
* @uiWidget color
|
package/dist/esm/{sqm-portal-container-view-ab89c6cc.js → sqm-portal-container-view-6c582684.js}
RENAMED
|
@@ -27,7 +27,7 @@ function PortalContainerView(props, children) {
|
|
|
27
27
|
Container: {
|
|
28
28
|
boxSizing: "border-box",
|
|
29
29
|
display: props.display || "grid",
|
|
30
|
-
flexWrap: "wrap",
|
|
30
|
+
flexWrap: props.flexWrap || "wrap",
|
|
31
31
|
"grid-template-columns": props.direction === "row"
|
|
32
32
|
? `repeat(auto-fill, minmax(${props.minWidth}, auto))`
|
|
33
33
|
: "100%",
|
|
@@ -24,8 +24,8 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-ffe955c8.js';
|
|
|
24
24
|
import './utilities-3f5bba22.js';
|
|
25
25
|
import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-79a85e02.js';
|
|
26
26
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-d7ea2c56.js';
|
|
27
|
-
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 ProgressBar$2, Q as autoColorScaleCss, U as ShadowViewAddon } from './ShadowViewAddon-
|
|
28
|
-
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-
|
|
27
|
+
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 ProgressBar$2, Q as autoColorScaleCss, U as ShadowViewAddon } from './ShadowViewAddon-04640297.js';
|
|
28
|
+
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-6c582684.js';
|
|
29
29
|
import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-34ac7513.js';
|
|
30
30
|
|
|
31
31
|
/**
|
|
@@ -1600,8 +1600,8 @@ const SlottedIntoComponent = () => {
|
|
|
1600
1600
|
data: {
|
|
1601
1601
|
rankType: "rowNumber",
|
|
1602
1602
|
leaderboard: [],
|
|
1603
|
-
showUser: true,
|
|
1604
1603
|
rowNumber: 10,
|
|
1604
|
+
showUser: true,
|
|
1605
1605
|
userRank: {
|
|
1606
1606
|
firstName: "Kutay",
|
|
1607
1607
|
lastInitial: "C",
|
|
@@ -1809,7 +1809,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
|
|
|
1809
1809
|
MultipleStats: MultipleStats
|
|
1810
1810
|
});
|
|
1811
1811
|
|
|
1812
|
-
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";
|
|
1812
|
+
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 Scenario Outline: Users names can be hidden or shown\n Given a leaderboard\n And it has prop \"hide-names\" with <propValue>\n When the user views the leaderboard\n Then they <maySee> the referrer column\n\n Examples:\n | propValue | maySee |\n | true | don't see |\n | false | see |\n | | 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";
|
|
1813
1813
|
|
|
1814
1814
|
const Leaderboard_stories = {
|
|
1815
1815
|
title: "Components/Leaderboard",
|
|
@@ -1891,8 +1891,8 @@ const users = [
|
|
|
1891
1891
|
];
|
|
1892
1892
|
const pointsUsers = [
|
|
1893
1893
|
{
|
|
1894
|
-
firstName: "",
|
|
1895
|
-
lastInitial: "",
|
|
1894
|
+
firstName: "Tom",
|
|
1895
|
+
lastInitial: "Smith",
|
|
1896
1896
|
textValue: "82 Points",
|
|
1897
1897
|
rank: 1,
|
|
1898
1898
|
rowNumber: 1,
|
|
@@ -1966,17 +1966,13 @@ const defaultStyles$1 = {
|
|
|
1966
1966
|
statsheading: "Referrals",
|
|
1967
1967
|
rankheading: "Rank",
|
|
1968
1968
|
anonymousUser: "Anonymous User",
|
|
1969
|
+
viewingUserText: "You",
|
|
1970
|
+
rankSuffix: "{rank, selectordinal, one {#st} two {#nd} few {#rd} other {#th}}",
|
|
1969
1971
|
};
|
|
1970
1972
|
const link = h("a", null, "Support");
|
|
1971
1973
|
const defaultElements$1 = {
|
|
1972
1974
|
empty: (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" })),
|
|
1973
1975
|
essentials: (h("sqm-empty", { "empty-state-image": "https://res.cloudinary.com/saasquatch/image/upload/v1715360191/squatch-assets/Leaderboard_Not_Available.svg", "empty-state-header": "Leaderboards aren\u2019t available on your plan", "empty-state-text": "Contact {supportText} to upgrade your plan and start leveraging gamification in your program.", "support-text": "Support" })),
|
|
1974
|
-
loadingstate: (h("slot", { name: "loading" },
|
|
1975
|
-
h("table", null, [...Array(10)].map(() => {
|
|
1976
|
-
return (h("tr", null,
|
|
1977
|
-
h("td", null,
|
|
1978
|
-
h("sl-skeleton", null))));
|
|
1979
|
-
})))),
|
|
1980
1976
|
};
|
|
1981
1977
|
const Empty$1 = () => {
|
|
1982
1978
|
const props = {
|
|
@@ -2182,6 +2178,38 @@ const ReferralLeaderboard = () => {
|
|
|
2182
2178
|
};
|
|
2183
2179
|
return h(LeaderboardView, Object.assign({}, props));
|
|
2184
2180
|
};
|
|
2181
|
+
const ReferralLeaderboardWithMaxWidth = () => {
|
|
2182
|
+
const props = {
|
|
2183
|
+
states: {
|
|
2184
|
+
loading: false,
|
|
2185
|
+
hasLeaders: true,
|
|
2186
|
+
styles: {
|
|
2187
|
+
...defaultStyles$1,
|
|
2188
|
+
rankheading: "Rank",
|
|
2189
|
+
usersheading: "User",
|
|
2190
|
+
statsheading: "Referrals",
|
|
2191
|
+
showRank: false,
|
|
2192
|
+
maxWidth: "300px",
|
|
2193
|
+
},
|
|
2194
|
+
},
|
|
2195
|
+
data: {
|
|
2196
|
+
rankType: "rowNumber",
|
|
2197
|
+
leaderboard: users,
|
|
2198
|
+
rowNumber: 10,
|
|
2199
|
+
viewerRank: {
|
|
2200
|
+
firstName: "Viktor",
|
|
2201
|
+
lastInitial: "V",
|
|
2202
|
+
textValue: "82",
|
|
2203
|
+
rank: 1,
|
|
2204
|
+
rowNumber: 1,
|
|
2205
|
+
},
|
|
2206
|
+
},
|
|
2207
|
+
elements: {
|
|
2208
|
+
...defaultElements$1,
|
|
2209
|
+
},
|
|
2210
|
+
};
|
|
2211
|
+
return h(LeaderboardView, Object.assign({}, props));
|
|
2212
|
+
};
|
|
2185
2213
|
const PointsLeaderboard = () => {
|
|
2186
2214
|
const props = {
|
|
2187
2215
|
states: {
|
|
@@ -2260,7 +2288,7 @@ const ViewerOutside = () => {
|
|
|
2260
2288
|
lastInitial: "C",
|
|
2261
2289
|
textValue: "8",
|
|
2262
2290
|
rowNumber: 11,
|
|
2263
|
-
rank:
|
|
2291
|
+
rank: 24,
|
|
2264
2292
|
},
|
|
2265
2293
|
},
|
|
2266
2294
|
elements: {
|
|
@@ -2291,6 +2319,33 @@ const ViewerAnonymous = () => {
|
|
|
2291
2319
|
};
|
|
2292
2320
|
return h(LeaderboardView, Object.assign({}, props));
|
|
2293
2321
|
};
|
|
2322
|
+
const HideNamesWithViewerOutside = () => {
|
|
2323
|
+
const props = {
|
|
2324
|
+
states: {
|
|
2325
|
+
loading: false,
|
|
2326
|
+
hasLeaders: true,
|
|
2327
|
+
styles: {
|
|
2328
|
+
...defaultStyles$1,
|
|
2329
|
+
showRank: true,
|
|
2330
|
+
hideNames: true,
|
|
2331
|
+
},
|
|
2332
|
+
},
|
|
2333
|
+
data: {
|
|
2334
|
+
rankType: "rowNumber",
|
|
2335
|
+
leaderboard: users,
|
|
2336
|
+
rowNumber: 10,
|
|
2337
|
+
viewerRank: {
|
|
2338
|
+
textValue: "8",
|
|
2339
|
+
rowNumber: 11,
|
|
2340
|
+
rank: 42,
|
|
2341
|
+
},
|
|
2342
|
+
},
|
|
2343
|
+
elements: {
|
|
2344
|
+
...defaultElements$1,
|
|
2345
|
+
},
|
|
2346
|
+
};
|
|
2347
|
+
return h(LeaderboardView, Object.assign({}, props));
|
|
2348
|
+
};
|
|
2294
2349
|
const HideViewer = () => {
|
|
2295
2350
|
const props = {
|
|
2296
2351
|
states: {
|
|
@@ -2321,6 +2376,58 @@ const HideViewer = () => {
|
|
|
2321
2376
|
};
|
|
2322
2377
|
return h(LeaderboardView, Object.assign({}, props));
|
|
2323
2378
|
};
|
|
2379
|
+
const HideNames = () => {
|
|
2380
|
+
const props = {
|
|
2381
|
+
states: {
|
|
2382
|
+
loading: false,
|
|
2383
|
+
hasLeaders: true,
|
|
2384
|
+
rowNumber: 10,
|
|
2385
|
+
styles: {
|
|
2386
|
+
...defaultStyles$1,
|
|
2387
|
+
showRank: true,
|
|
2388
|
+
hideNames: true,
|
|
2389
|
+
},
|
|
2390
|
+
},
|
|
2391
|
+
data: {
|
|
2392
|
+
rankType: "rowNumber",
|
|
2393
|
+
leaderboard: users,
|
|
2394
|
+
rowNumber: 10,
|
|
2395
|
+
viewerRank: {
|
|
2396
|
+
firstName: "Viktor",
|
|
2397
|
+
lastInitial: "V",
|
|
2398
|
+
textValue: "82",
|
|
2399
|
+
rowNumber: 1,
|
|
2400
|
+
rank: 1,
|
|
2401
|
+
},
|
|
2402
|
+
},
|
|
2403
|
+
elements: {
|
|
2404
|
+
...defaultElements$1,
|
|
2405
|
+
},
|
|
2406
|
+
};
|
|
2407
|
+
return h(LeaderboardView, Object.assign({}, props));
|
|
2408
|
+
};
|
|
2409
|
+
const LeaderboardWithNoNamesAndGraphic = () => {
|
|
2410
|
+
return (h("div", { style: {
|
|
2411
|
+
display: "flex",
|
|
2412
|
+
alignItems: "flex-start",
|
|
2413
|
+
justifyContent: "center",
|
|
2414
|
+
width: "100%",
|
|
2415
|
+
gap: "50px",
|
|
2416
|
+
} },
|
|
2417
|
+
h("div", { style: {
|
|
2418
|
+
display: "flex",
|
|
2419
|
+
flexDirection: "column",
|
|
2420
|
+
alignItems: "center",
|
|
2421
|
+
justifyContent: "center",
|
|
2422
|
+
gap: "10px",
|
|
2423
|
+
maxWidth: "30%",
|
|
2424
|
+
} },
|
|
2425
|
+
h("sqm-image", { width: "70%", alignment: "center", imageUrl: "https://res.cloudinary.com/saasquatch-staging/image/upload/v1729728469/Leaderboard_image_z87lsm.png" }),
|
|
2426
|
+
h("h2", { style: { margin: "auto" } }, " Top Performers"),
|
|
2427
|
+
h("p", { style: { margin: "0" } }, "The leaderboard highlights the top performers in real-time. Stay motivated, stay competitive!")),
|
|
2428
|
+
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" },
|
|
2429
|
+
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" }))));
|
|
2430
|
+
};
|
|
2324
2431
|
|
|
2325
2432
|
const Leaderboard = /*#__PURE__*/Object.freeze({
|
|
2326
2433
|
__proto__: null,
|
|
@@ -2331,11 +2438,15 @@ const Leaderboard = /*#__PURE__*/Object.freeze({
|
|
|
2331
2438
|
One: One,
|
|
2332
2439
|
Five: Five,
|
|
2333
2440
|
ReferralLeaderboard: ReferralLeaderboard,
|
|
2441
|
+
ReferralLeaderboardWithMaxWidth: ReferralLeaderboardWithMaxWidth,
|
|
2334
2442
|
PointsLeaderboard: PointsLeaderboard,
|
|
2335
2443
|
TenWithRank: TenWithRank,
|
|
2336
2444
|
ViewerOutside: ViewerOutside,
|
|
2337
2445
|
ViewerAnonymous: ViewerAnonymous,
|
|
2338
|
-
|
|
2446
|
+
HideNamesWithViewerOutside: HideNamesWithViewerOutside,
|
|
2447
|
+
HideViewer: HideViewer,
|
|
2448
|
+
HideNames: HideNames,
|
|
2449
|
+
LeaderboardWithNoNamesAndGraphic: LeaderboardWithNoNamesAndGraphic
|
|
2339
2450
|
});
|
|
2340
2451
|
|
|
2341
2452
|
const HookStoryAddon = ({ story }, children) => {
|
|
@@ -11554,6 +11665,18 @@ const SpaceEvenly = () => {
|
|
|
11554
11665
|
h("p", null, "Points Balance")))),
|
|
11555
11666
|
h("sqm-scroll", { "scroll-id": "tab-2", outline: true, "button-type": "primary", "button-text": "Redeem your rewards", mobile: true }))));
|
|
11556
11667
|
};
|
|
11668
|
+
const ResponsiveBox = () => {
|
|
11669
|
+
return (h("div", { style: { width: "100%", maxWidth: "1000px", border: "1px dashed grey" } },
|
|
11670
|
+
h("sqm-portal-container", { center: true, direction: "row", display: "flex", "justify-content": "space-between", "flex-wrap": "nowrap" },
|
|
11671
|
+
h("sqm-stat-container", { space: "xxx-large", display: "flex" },
|
|
11672
|
+
h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/rewardsRedeemed/CREDIT/global" },
|
|
11673
|
+
h("sqm-text", null,
|
|
11674
|
+
h("p", null, "Rewards Redeemed"))),
|
|
11675
|
+
h("sqm-big-stat", { "flex-reverse": "true", alignment: "left", "stat-type": "/rewardBalance/CREDIT/POINT/value/global" },
|
|
11676
|
+
h("sqm-text", null,
|
|
11677
|
+
h("p", null, "Points Balance")))),
|
|
11678
|
+
h("sqm-scroll", { "scroll-id": "tab-2", outline: true, "button-type": "primary", "button-text": "Redeem your rewards", mobile: true }))));
|
|
11679
|
+
};
|
|
11557
11680
|
const Start$1 = () => {
|
|
11558
11681
|
return (h("div", { style: { width: "1000px", border: "1px dashed grey" } },
|
|
11559
11682
|
h("sqm-portal-container", { center: true, direction: "row", display: "flex", "justify-content": "start" },
|
|
@@ -11617,6 +11740,7 @@ const PortalContainer = /*#__PURE__*/Object.freeze({
|
|
|
11617
11740
|
SpaceBetween: SpaceBetween,
|
|
11618
11741
|
SpaceAround: SpaceAround,
|
|
11619
11742
|
SpaceEvenly: SpaceEvenly,
|
|
11743
|
+
ResponsiveBox: ResponsiveBox,
|
|
11620
11744
|
Start: Start$1,
|
|
11621
11745
|
Center: Center,
|
|
11622
11746
|
End: End,
|