@saasquatch/mint-components 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/cjs/{ShadowViewAddon-1d7d274f.js → ShadowViewAddon-5fe15ad2.js} +6 -3
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-big-stat_38.cjs.entry.js +22 -3
  5. package/dist/cjs/sqm-empty_4.cjs.entry.js +17 -3
  6. package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +4 -2
  7. package/dist/cjs/sqm-stencilbook.cjs.entry.js +57 -3
  8. package/dist/collection/components/sqm-empty/EmptyState.stories.js +2 -0
  9. package/dist/collection/components/sqm-empty/sqm-empty-view.js +15 -2
  10. package/dist/collection/components/sqm-empty/sqm-empty.js +24 -1
  11. package/dist/collection/components/sqm-leaderboard/Leaderboard.stories.js +31 -0
  12. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard-view.js +6 -3
  13. package/dist/collection/components/sqm-leaderboard/sqm-leaderboard.js +46 -1
  14. package/dist/collection/components/sqm-leaderboard/useLeaderboard.js +5 -2
  15. package/dist/collection/components/sqm-popup-container/sqm-popup-container.js +6 -0
  16. package/dist/collection/components/sqm-portal-footer/sqm-portal-footer.js +8 -0
  17. package/dist/collection/components/sqm-rewards-table/RewardsTable.stories.js +8 -1
  18. package/dist/collection/components/sqm-rewards-table/RewardsTableCell.stories.js +13 -0
  19. package/dist/collection/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.js +21 -2
  20. package/dist/collection/components/sqm-titled-section/sqm-titled-section.js +8 -3
  21. package/dist/esm/{ShadowViewAddon-b04465af.js → ShadowViewAddon-b2de2d8f.js} +6 -3
  22. package/dist/esm/loader.js +1 -1
  23. package/dist/esm/mint-components.js +1 -1
  24. package/dist/esm/sqm-big-stat_38.entry.js +22 -3
  25. package/dist/esm/sqm-empty_4.entry.js +17 -3
  26. package/dist/esm/sqm-rewards-table_9.entry.js +4 -2
  27. package/dist/esm/sqm-stencilbook.entry.js +57 -3
  28. package/dist/esm-es5/ShadowViewAddon-b2de2d8f.js +1 -0
  29. package/dist/esm-es5/loader.js +1 -1
  30. package/dist/esm-es5/mint-components.js +1 -1
  31. package/dist/esm-es5/sqm-big-stat_38.entry.js +1 -1
  32. package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
  33. package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
  34. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  35. package/dist/mint-components/mint-components.esm.js +1 -1
  36. package/dist/mint-components/p-00b937ab.system.entry.js +1 -0
  37. package/dist/mint-components/p-0bdfc00e.system.entry.js +1 -0
  38. package/dist/mint-components/p-14f1f79b.entry.js +187 -0
  39. package/dist/mint-components/p-6ffed27b.system.js +1 -1
  40. package/dist/mint-components/{p-a8c90696.system.entry.js → p-7fda77ac.system.entry.js} +1 -1
  41. package/dist/mint-components/p-855eeedd.system.entry.js +1 -0
  42. package/dist/mint-components/p-be00e478.entry.js +1 -0
  43. package/dist/mint-components/{p-3ba7f54e.entry.js → p-c0500993.entry.js} +2 -2
  44. package/dist/mint-components/{p-4869e1d6.js → p-de2aa147.js} +1 -1
  45. package/dist/mint-components/p-e98fe050.system.js +1 -0
  46. package/dist/mint-components/{p-0a0ec6a8.entry.js → p-eac38c5e.entry.js} +2 -2
  47. package/dist/types/components/sqm-empty/sqm-empty-view.d.ts +2 -0
  48. package/dist/types/components/sqm-empty/sqm-empty.d.ts +5 -0
  49. package/dist/types/components/sqm-leaderboard/Leaderboard.stories.d.ts +1 -0
  50. package/dist/types/components/sqm-leaderboard/sqm-leaderboard-view.d.ts +2 -0
  51. package/dist/types/components/sqm-leaderboard/sqm-leaderboard.d.ts +13 -0
  52. package/dist/types/components/sqm-leaderboard/useLeaderboard.d.ts +1 -0
  53. package/dist/types/components/sqm-popup-container/sqm-popup-container.d.ts +2 -0
  54. package/dist/types/components/sqm-portal-footer/sqm-portal-footer.d.ts +2 -0
  55. package/dist/types/components/sqm-rewards-table/RewardsTableCell.stories.d.ts +1 -0
  56. package/dist/types/components/sqm-rewards-table/cells/sqm-rewards-table-source-cell.d.ts +1 -0
  57. package/dist/types/components/sqm-titled-section/sqm-titled-section.d.ts +2 -1
  58. package/dist/types/components.d.ts +35 -3
  59. package/docs/docs.docx +0 -0
  60. package/docs/raisins.json +1 -1
  61. package/grapesjs/grapesjs.js +1 -1
  62. package/package.json +3 -2
  63. package/dist/esm-es5/ShadowViewAddon-b04465af.js +0 -1
  64. package/dist/mint-components/p-2574a651.system.entry.js +0 -1
  65. package/dist/mint-components/p-59bc9a2d.entry.js +0 -187
  66. package/dist/mint-components/p-6cddd2fc.system.entry.js +0 -1
  67. package/dist/mint-components/p-6d2a23e7.system.entry.js +0 -1
  68. package/dist/mint-components/p-c53a801b.system.js +0 -1
  69. package/dist/mint-components/p-ce72e90a.entry.js +0 -1
@@ -24,7 +24,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-0b68e4e5.js';
24
24
  import './utilities-ffa6a093.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-b04465af.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-b2de2d8f.js';
28
28
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-ab89c6cc.js';
29
29
  import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-3707b42c.js';
30
30
 
@@ -1579,6 +1579,7 @@ const Empty = () => {
1579
1579
  };
1580
1580
  const defaultElements = {
1581
1581
  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" })),
1582
+ 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" })),
1582
1583
  loadingstate: (h("slot", { name: "loading" },
1583
1584
  h("table", null, [...Array(10)].map(() => {
1584
1585
  return (h("tr", null,
@@ -1591,6 +1592,7 @@ const SlottedIntoComponent = () => {
1591
1592
  states: {
1592
1593
  loading: false,
1593
1594
  hasLeaders: false,
1595
+ isEssentials: false,
1594
1596
  styles: {
1595
1597
  ...defaultStyles,
1596
1598
  },
@@ -1807,7 +1809,7 @@ const BigStat = /*#__PURE__*/Object.freeze({
1807
1809
  MultipleStats: MultipleStats
1808
1810
  });
1809
1811
 
1810
- const scenario$4 = "@owner:noah\n@author:noah\nFeature: Leaderboard\n\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\tBackground: A user exists\n\t\tGiven a user\n\t\tAnd they are viewing the leaderboard\n\n\t@motivating\n\tScenario Outline: Two types of referrals leaderboards can be displayed\n\t\tGiven a leaderboard has prop \"leaderboard-type\" with <value>\n\t\tAnd there are started referrals on the tenant\n\t\tAnd there are started converted on the tenant\n\t\tWhen the user views the leaderboard\n\t\tThen they see the referral <referralType> leaderboard\n\t\tExamples:\n\t\t\t| value | referralType |\n\t\t\t| topStartedReferrers | started |\n\t\t\t| topConvertedReferrers | converted |\n\n\t@motivating\n\tScenario: The top point earners leaderboard can be displayed\n\t\tGiven a leaderboard has prop \"leaderboard-type\" with value \"topPointEarners\"\n\t\tAnd there are users with points\n\t\tWhen the user views the leaderboard\n\t\tThen they see the top point earners leaderboard\n\t\tAnd text values are displayed for point counts\n\n\t@minutia\n\tScenario Outline: Reward pretty value is used on the top point earners leaderboard\n\t\tGiven top point earners leaderboard\n\t\tAnd the \"POINT\" reward unit has a pretty value for the following locales\n\t\t\t| locale |\n\t\t\t| en |\n\t\t\t| fr |\n\t\t\t| tr |\n\t\tWhen the user views the leaderboard\n\t\tAnd they have <locale>\n\t\tThen they see the translated pretty value in the stat value column\n\n\t@motivating\n\tScenario Outline: Program Context is used by default to filter leaderboard results\n\t\tGiven a <leaderboardType> leaderboard loaded with program context for \"my-program\"\n\t\tWhen the user views the leaderboard\n\t\tThen they only see <results> from \"my-program\"\n\t\tExamples:\n\t\t\t| leaderboardType | results |\n\t\t\t| topStartedReferrers | started referrals |\n\t\t\t| topConvertedReferrers | converted referrals |\n\t\t\t| topPointEarners | points earned |\n\n\t@motivating\n\tScenario Outline: Program Id context can be overwritten with a prop\n\t\tGiven a <leaderboardType> leaderboard has prop \"program-Id\" with value \"my-test-program\"\n\t\tWhen the user views the leaderboard\n\t\tThen they only see <results> from \"my-test-program\"\n\t\tExamples:\n\t\t\t| leaderboardType | results |\n\t\t\t| topStartedReferrers | started referrals |\n\t\t\t| topConvertedReferrers | converted referrals |\n\t\t\t| topPointEarners | points earned |\n\n\t@motivating\n\tScenario 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\t\tGiven a <leaderboardType> leaderboard has prop \"program-Id\" with value \"\"\n\t\tWhen the user views the leaderboard\n\t\tThen they see global <results>\n\t\tExamples:\n\t\t\t| leaderboardType | results |\n\t\t\t| topStartedReferrers | started referrals |\n\t\t\t| topConvertedReferrers | converted referrals |\n\t\t\t| topPointEarners | points earned |\n\n\t@motivating\n\tScenario: Leaderboard results are shown in descending order\n\t\tGiven there are leaderboard results\n\t\tWhen the user views the leaderboard\n\t\tThen they see up to the 10 top leaderboard results\n\t\tAnd leaderboard is in descending order\n\n\t@motivating\n\tScenario Outline: Leaderboard results can be filtered with a time interval\n\t\tGiven a <leaderboardType> leaderboard\n\t\tAnd it has prop \"interval\" with value \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n\t\tWhen the user views the leaderboard\n\t\tThen they only see <results> from within \"2021-11-02T07:00:00.000Z/2021-11-07T07:00:00.000Z\"\n\t\tExamples:\n\t\t\t| leaderboardType | results |\n\t\t\t| topStartedReferrers | started referrals |\n\t\t\t| topConvertedReferrers | converted referrals |\n\t\t\t| topPointEarners | points earned |\n\n\t@motivating\n\tScenario Outline: Leaderboard rank type can be configured\n\t\tGiven a leaderboard has prop \"rank-type\" with <value>\n\t\tWhen the user views the leaderboard\n\t\tThen their leaderboard rank is their <rank>\n\t\tExamples:\n\t\t\t| value | rank |\n\t\t\t| rowNumber | row number |\n\t\t\t| denseRank | dense rank |\n\t\t\t| rank | rank |\n\n\t@minutia\n\tScenario Outline: The max number of leaderboard rows displayed can be configured but defaults to 10\n\t\tGiven a leaderboard has prop \"max-rows\" with <value>\n\t\tAnd the leaderboard has <resultCount>\n\t\tWhen the user views the leaderboard\n\t\tThen they see <number> rows\n\t\tExamples:\n\t\t\t| value | resultCount | number |\n\t\t\t| | 10 | 10 |\n\t\t\t| 5 | 10 | 5 |\n\t\t\t| 3 | 1 | 1 |\n\t\t\t| 25 | 15 | 15 |\n\n\t@minutiae\n\t@ui\n\tScenario: Leaderboards with no results show an empty state\n\t\tGiven a leaderboard has no results\n\t\tWhen the user views the leaderboard\n\t\tThen an empty state is dislayed\n\t\tAnd they see an image of a leaderboard\n\t\tAnd below they see \"View your rank in the leaderboard\"\n\t\tAnd below they see \"Be the first to refer a friend and reach the top of the leaderboard\"\n\t\tAnd the text is center aligned\n\n\t@minutiae\n\t@ui\n\tScenario: A custom empty state can be provided\n\t\tGiven a leaderboard has no results\n\t\tWhen the user views the leaderboard\n\t\tThen the contents of the \"empty\" slot are displayed\n\n\t@minutiae\n\t@ui\n\tScenario: Leaderboard headings can be customized\n\t\tGiven a leaderboard\n\t\tAnd it has the following props\n\t\t\t| prop | value |\n\t\t\t| rankheading | Place |\n\t\t\t| usersheading | Customer |\n\t\t\t| statsheading | Referral Count |\n\t\t\t| show-rank | true |\n\t\tWhen the user views the leaderboard\n\t\tThen they see the following columns with headings\n\t\t\t| column | heading |\n\t\t\t| rank | Place |\n\t\t\t| user | Customer |\n\t\t\t| stat | Referral Count |\n\n\t@motivating\n\t@ui\n\tScenario Outline: Leaderboard rank can be hidden or shown\n\t\tGiven a leaderboard\n\t\tAnd it has prop \"show-rank\" with <propValue>\n\t\tWhen the user views the leaderboard\n\t\tThen they <maySee> the rank column\n\t\tExamples:\n\t\t\t| propValue | maySee |\n\t\t\t| true | see |\n\t\t\t| false | don't see |\n\t\t\t| | don't see |\n\n\t@motivating\n\t@ui\n\tScenario: Users in the top 10 of the leaderboard results see their leaderboard row highlighted\n\t\tGiven a user in the top 10 of the leaderboard results\n\t\tWhen they view the leaderboard\n\t\tThen they see the row with their name highlighted with brand colour\n\n\t@motivating\n\t@ui\n\tScenario Outline: Users not in the top 10 leaderboard results can see their progress at the bottom of the leaderboard\n\t\tGiven a user <mayHave> completed actions counted by the leaderboard\n\t\tAnd they are not in the top 10 leaderboard results\n\t\tAnd the leaderboard has prop \"show-user\" with <value>\n\t\tWhen they view the leaderboard\n\t\tThen they <maySee> \"...\" under the top 10 leaderboard results\n\t\tAnd under \"...\" they <maySee> a row highlighted with brand colour\n\t\tAnd they <maySee> their name\n\t\tAnd they <maySee> their leaderboard value\n\t\tAnd they <maySeeRank>\n\t\tExamples:\n\t\t\t| mayHave | value | maySee | maySeeRank |\n\t\t\t| has | true | see | see their rank |\n\t\t\t| hasn't | true | see | don't see their rank |\n\t\t\t| N/A | false | don't see | don't see their rank |\n\t\t\t| hasn't | | see | don't see their rank |\n\n\t@minutiae\n\tScenario: Users without names are displayed as an \"Anonymous User\"\n\t\tGiven a user\n\t\tAnd they do not have a first name\n\t\tAnd they do not have a last initial\n\t\tWhen they view the leaderboard\n\t\tThen they see the user displayed as \"Anonymous User\"\n\n\t@minutiae\n\tScenario Outline: If a user only has a first or last name, then only that is displayed\n\t\tGiven a user\n\t\tAnd they only have a <name>\n\t\tWhen they view the leaderboard\n\t\tThen they only see their <name>\n\t\tExamples:\n\t\t\t| name |\n\t\t\t| firstName |\n\t\t\t| lastName |";
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";
1811
1813
 
1812
1814
  const Leaderboard_stories = {
1813
1815
  title: "Components/Leaderboard",
@@ -1965,8 +1967,10 @@ const defaultStyles$1 = {
1965
1967
  rankheading: "Rank",
1966
1968
  anonymousUser: "Anonymous User",
1967
1969
  };
1970
+ const link = h("a", null, "Support");
1968
1971
  const defaultElements$1 = {
1969
1972
  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
+ 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" })),
1970
1974
  loadingstate: (h("slot", { name: "loading" },
1971
1975
  h("table", null, [...Array(10)].map(() => {
1972
1976
  return (h("tr", null,
@@ -2001,6 +2005,34 @@ const Empty$1 = () => {
2001
2005
  };
2002
2006
  return h(LeaderboardView, Object.assign({}, props));
2003
2007
  };
2008
+ const Essentials = () => {
2009
+ const props = {
2010
+ states: {
2011
+ loading: false,
2012
+ isEssentials: true,
2013
+ hasLeaders: false,
2014
+ styles: {
2015
+ ...defaultStyles$1,
2016
+ },
2017
+ },
2018
+ data: {
2019
+ rankType: "rowNumber",
2020
+ leaderboard: [],
2021
+ rowNumber: 10,
2022
+ viewerRank: {
2023
+ firstName: "Kutay",
2024
+ lastInitial: "C",
2025
+ textValue: "8",
2026
+ rowNumber: 11,
2027
+ rank: 23,
2028
+ },
2029
+ },
2030
+ elements: {
2031
+ ...defaultElements$1,
2032
+ },
2033
+ };
2034
+ return h(LeaderboardView, Object.assign({}, props));
2035
+ };
2004
2036
  const Loading = () => {
2005
2037
  const props = {
2006
2038
  states: {
@@ -2294,6 +2326,7 @@ const Leaderboard = /*#__PURE__*/Object.freeze({
2294
2326
  __proto__: null,
2295
2327
  'default': Leaderboard_stories,
2296
2328
  Empty: Empty$1,
2329
+ Essentials: Essentials,
2297
2330
  Loading: Loading,
2298
2331
  One: One,
2299
2332
  Five: Five,
@@ -11596,7 +11629,7 @@ const scenario2 = "@author:derek\n@owner:derek\nFeature: Reward Table reward Col
11596
11629
 
11597
11630
  const scenario3 = "@author:derek @owner:derek\nFeature: Reward Table Status Column\n Shows the status of each reward\n\n Background: \n Given the status column is included in the reward table\n\n @motivating @ui\n Scenario Outline: The title of the status column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the status column is shown with <columnTitle>\n\n Examples: \n | value | columnTitle |\n | Status | |\n | My column title | My column title |\n\n @motivating @ui\n Scenario Outline: The status column displays the status of each reward\n Given a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples: \n | status | text | pillColour |\n | AVAILABLE | Available | Green |\n | CANCELLED | Cancelled | Red |\n | PENDING | Pending | Orange |\n | EXPIRED | Expired | Red |\n | REDEEMED | Redeemed | Blue |\n | PENDING_REVIEW | Pending | Orange |\n | PAYOUT_TRANSFERRED | Payout Approved | blue |\n | PAYOUT_NOT_YET_DUE | Payout Approved | blue |\n | PAYOUT_OVERDUE | Payout Failed | Red |\n | PAYOUT_REVERSED | Payout Cancelled | Red |\n | PENDING_TAX_REVIEW | Pending | Orange |\n | PENDING_NEW_TAX_FORM | Pending | Orange |\n | PENDING_TAX_SUBMISSION | Pending | Orange |\n | PENDING_PARTNER_CREATION | Pending | Orange |\n | DENIED | Denied | Red |\n\n @motivating\n Scenario Outline: Reward status related information is displayed under status pills\n Given a user\n And they have a <reward>\n And their program is\n When they view the reward table\n Then they see their reward\n And under the pill is <text>\n And the date is localized to the users locale\n\n Examples: \n | reward | text |\n | available reward with an expiry date | localized expiry date in format \"Month-Day-Year\" |\n | redeemed reward | localized redemption date in format \"Month-Day-Year\" |\n | expired reward | localized expired date in format \"Month-Day-Year\" |\n | cancelled reward | localized cancelled date in format \"Month-Day-Year\" |\n | pending reward with a end date | localized pending for date in format \"Month-Day-Year\" |\n | pending reward due to W9 | W-9 required |\n | pending reward due to fufillment error | Fulfillment error |\n | reward pending review of referral | Pending review |\n | pending reward due to no connected Impact partner | Complete your tax and cash payout setup to receive your rewards. |\n | pending reward due to an invalid tax document | Invalid tax form. Submit a new form to receive your rewards. |\n | pending reward due to user required to submit a tax document | Submit your tax documents to receive your rewards. |\n | pending reward due to tax document being in review | Awaiting tax form review. |\n | reward whose payout failed | Payout failed due to a fulfillment issue and is currently being retried. |\n | reward whose payout was approved | Reward approved for payout and was scheduled for payment based on your settings. |\n | reward whose payout was cancelled | If you think this is a mistake, contact our Support team. |\n | cancelled reward from denied referral | Flagged as fraud |\n\n @minutia\n Scenario Outline: Tax-related reward statuses are based on the user's Impact tax connection\n Given a user\n And they are in a program that has Impact tax handling enabled\n And they have at least one pending reward\n And the reward's pending reasons include \"PAYOUT_CONFIGURATION_MISSING\"\n Then the status description will be\n \"\"\"\n Complete your tax and cash payout setup to receive your rewards.\n \"\"\"\n\n @motivating\n Scenario Outline: Statuses can be customized\n Given the \"status-text\" prop is \"{status, select, AVAILABLE {Redeem me!} CANCELLED {Unavailable} PENDING {Coming soon!} EXPIRED {Past due} REDEEMED {Spent} PENDING_REVIEW {Pending Review!} PAYOUT_SENT {Payout Sent!} PAYOUT_FAILED {Payout Failed!} PENDING_TAX_REVIEW {Pending Tax Review!} PENDING_NEW_TAX_FORM {Pending new tax form!} PENDING_TAX_SUBMISSION {Pending tax submission!} PENDING_PARTNER_CREATION {Pending partner creation!} DENIED {Unlucky!}}\"\n And a user\n And they have a <status> reward\n When they view the reward table\n Then the status of their reward is displayed in <pillColour> pill with <text>\n\n Examples: \n | status | text | pillColour |\n | AVAILABLE | Redeem me! | Green |\n | CANCELLED | Unavailable | Red |\n | PENDING | Coming soon! | Orange |\n | EXPIRED | Past due | Red |\n | REDEEMED | Spent | Blue |\n | PENDING_REVIEW | Pending Review! | Orange |\n | PAYOUT_TRANSFERRED | Payout Approved! | Blue |\n | PAYOUT_NOT_YET_DUE | Payout Approved! | Blue |\n | PAYOUT_OVERDUE | Payout Failed! | Red |\n | PAYOUT_REVERSED | Payout Cancelled! | Red |\n | DENIED | Unlucky! | Red |\n\n @minutia @ui\n Scenario: Expiry status date text can be configured\n Given the \"expiry-text\" prop has <value>\n And a user with an available reward with an expiry date\n When they view the reward table\n Then they see <text> under the Available Status pill\n\n Examples: \n | value | text |\n | | Expires on <EXPIRY DATE> |\n | Redeem before | Redeem before <EXPIRY DATE> |\n";
11598
11631
 
11599
- const scenario4 = "@author:derek\n@owner:derek\nFeature: Reward Table Source Column\n\n Shows the source of each reward\n\n @motivating\n @ui\n Scenario Outline: The title of the source column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the source column is shown with <columnTitle>\n Examples:\n | value | columnTitle |\n | Source | |\n | My column title | My column title |\n\n @motivating\n @ui\n Scenario: The source column displays manual if the reward is caused by a manual action\n Given a user with a \"MANUAL\" reward\n When they view the rewards table\n Then the source of their reward is displayed as \"Manual\"\n\n @motivating\n @ui\n Scenario: The source column displays the program name if the reward is caused automatically by a program\n Given a user with a \"AUTOMATED\" program reward\n And the program has name \"Loyalty Program\"\n When they view the rewards table\n Then the source of their reward is displayed as \"Loyalty Program\"\n\n @motivating\n @ui\n Scenario Outline: The source column displays customizable reward exchange text with amount if the reward is caused by reward exchange\n Given the \"reward-exchange-text\" prop is <propValue>\n And a user with a \"MANUAL\" reward\n But it was created by a reward exchange\n Then they view the rewards table\n Then the source displays <exchangeText>\n And under it displays the following\n | prettyRedeemedCredit → prettyValue |\n Examples:\n | propValue | exchangeText |\n | | Reward Exchange |\n | Exchanged | Exchanged |\n\n @motivating\n @ui\n Scenario Outline: The source column displays customizable referral information if the reward is from a referral\n Given the \"reward-source-text\" prop is <propValue>\n And a user with a referral reward\n And that reward has <rewardSource>\n When they view the rewards table\n Then then source displays <referralText>\n And under it displays the full name of the <referralUser>\n Examples:\n | propValue | rewardSource | referralText | referralUser |\n | | REFERRED | Referred by | referrer user |\n | | FRIEND_SIGNUP | Referral to | referred user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | REFERRED | Referred you | referrer user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | FRIEND_SIGNUP | You Referred | referred user |\n\n @motivating\n @ui\n Scenario Outline: The source column displays the existing name for a referral if either the first name or last name does not exist\n Given a user with a referral reward\n And referral user exists\n And referral user has <name>\n But referral user has no <otherName>\n When they view the rewards table\n Then referral user's name is displayed as <name>\n Examples:\n | name | otherName |\n | first.name | last.name |\n | last.name | first.name |\n\n @motivating\n @ui\n Scenario Outline: The source column displays referral as \"Anonymous User\" if the referral user has no names\n Given a user with a referral reward\n And that reward has <rewardSource>\n And the <referralUser> has no first name\n And the <referralUser> has no last name\n When they view the rewards table\n Then then source displays <sourceText>\n And under it displays \"Anonymous User\"\n Examples:\n | rewardSource | referralUser | sourceText |\n | FRIEND_SIGNUP | referrer | Referral to |\n | REFERRED | referred user | Referred by |\n\n @motivating\n @ui\n Scenario Outline: The source column displays referral as \"Deleted User\" if the referral user is deleted in the system\n Given a user with a referral reward\n And that reward has <rewardSource>\n But <referral> user was deleted\n When they view the rewards table\n Then the source displays <sourceText>\n And under it displays \"Deleted User\"\n Examples:\n | rewardSource | referral | sourceText |\n | \"FRIEND_SIGNUP\" | referrer | Referral to |\n | \"REFERRED\" | referred | Referred by |\n\n @minutia\n @ui\n Scenario Outline: Name fallbacks for referral users without names are customizable\n Given <prop> with <value>\n And a user with a referral reward\n But the referral user <hadAction>\n When they view the rewards table\n Then the source displays <value> as the referral user\n Examples:\n | prop | value | hadAction |\n | deleted-user | Former Customer | was deleted |\n | anonymous-user | Nameless User | had first and last name deleted |\n\n @motivating\n Scenario Outline: Source text can be customized\n Given the \"reward-source-text\" prop is \"{rewardSource, select, MANUAL {Support} AUTOMATED {Loyalty Program} other {}}\"\n And a user with a <rewardSource> reward\n When they view the rewards table\n Then the source is <sourceText>\n Examples:\n | rewardSource | sourceText |\n | MANUAL | Support |\n | AUTOMATED | Loyalty Program |";
11632
+ const scenario4 = "@author:derek @owner:derek\nFeature: Reward Table Source Column\n Shows the source of each reward\n\n @motivating @ui\n Scenario Outline: The title of the source column is configurable\n Given the \"column-title\" prop is set to <value>\n Then the source column is shown with <columnTitle>\n\n Examples:\n | value | columnTitle |\n | Source | |\n | My column title | My column title |\n\n @motivating @ui\n Scenario: The source column displays manual if the reward is caused by a manual action\n Given a user with a \"MANUAL\" reward\n When they view the rewards table\n Then the source of their reward is displayed as \"Manual\"\n\n @motivating @ui\n Scenario: The source column displays the program name if the reward is caused automatically by a program\n Given a user with a \"AUTOMATED\" program reward\n And the program has name \"Loyalty Program\"\n When they view the rewards table\n Then the source of their reward is displayed as \"Loyalty Program\"\n\n @motivating @ui\n Scenario Outline: The source column displays customizable reward exchange text with amount if the reward is caused by reward exchange\n Given the \"reward-exchange-text\" prop is <propValue>\n And a user with a \"MANUAL\" reward\n But it was created by a reward exchange\n Then they view the rewards table\n Then the source displays <exchangeText>\n And under it displays the following\n | prettyRedeemedCredit → prettyValue |\n\n Examples:\n | propValue | exchangeText |\n | | Reward Exchange |\n | Exchanged | Exchanged |\n\n @motivating @ui\n Scenario Outline: The source column displays customizable referral information if the reward is from a referral\n Given the \"reward-source-text\" prop is <propValue>\n And a user with a referral reward\n And that reward has <rewardSource>\n When they view the rewards table\n Then then source displays <referralText>\n And under it displays the full name of the <referralUser>\n\n Examples:\n | propValue | rewardSource | referralText | referralUser |\n | | REFERRED | Referred by | referrer user |\n | | FRIEND_SIGNUP | Referral to | referred user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | REFERRED | Referred you | referrer user |\n | {rewardSource, select, FRIEND_SIGNUP {You Referred} REFERRED {Referred you} other {}} | FRIEND_SIGNUP | You Referred | referred user |\n\n @motivating @ui\n Scenario Outline: The source column displays the existing name for a referral if either the first name or last name does not exist\n Given a user with a referral reward\n And referral user exists\n And referral user has <name>\n But referral user has no <otherName>\n When they view the rewards table\n Then referral user's name is displayed as <name>\n\n Examples:\n | name | otherName |\n | first.name | last.name |\n | last.name | first.name |\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Anonymous User\" if the referral user has no names\n Given a user with a referral reward\n And that reward has <rewardSource>\n And the <referralUser> has no first name\n And the <referralUser> has no last name\n When they view the rewards table\n Then then source displays <sourceText>\n And under it displays \"Anonymous User\"\n\n Examples:\n | rewardSource | referralUser | sourceText |\n | FRIEND_SIGNUP | referrer | Referral to |\n | REFERRED | referred user | Referred by |\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Deleted User\" if the referral user is deleted in the system\n Given a user with a referral reward\n And that reward has <rewardSource>\n But <referral> user was deleted\n When they view the rewards table\n Then the source displays <sourceText>\n And under it displays \"Deleted User\"\n\n Examples:\n | rewardSource | referral | sourceText |\n | \"FRIEND_SIGNUP\" | referrer | Referral to |\n | \"REFERRED\" | referred | Referred by |\n# AL: TODO DELETED REFERRAL SPEC\n\n @motivating @ui\n Scenario Outline: The source column displays referral as \"Deleted referral\" if the referral user is deleted in the system\n Given a user with a referral reward\n And that reward has <rewardSource>\n But <referral> user was deleted\n When they view the rewards table\n Then the source displays <sourceText>\n And under it displays \"Deleted referral\"\n\n Examples:\n | rewardSource | referral | sourceText |\n | \"FRIEND_SIGNUP\" | referrer | Referral to |\n | \"REFERRED\" | referred | Referred by |\n\n @minutia @ui\n Scenario Outline: Name fallbacks for referral users without names are customizable\n Given <prop> with <value>\n And a user with a referral reward\n But the referral user <hadAction>\n When they view the rewards table\n Then the source displays <value> as the referral user\n\n Examples:\n | prop | value | hadAction |\n | deleted-user | Former Customer | was deleted |\n | anonymous-user | Nameless User | had first and last name deleted |\n\n @motivating\n Scenario Outline: Source text can be customized\n Given the \"reward-source-text\" prop is \"{rewardSource, select, MANUAL {Support} AUTOMATED {Loyalty Program} other {}}\"\n And a user with a <rewardSource> reward\n When they view the rewards table\n Then the source is <sourceText>\n\n Examples:\n | rewardSource | sourceText |\n | MANUAL | Support |\n | AUTOMATED | Loyalty Program |\n";
11600
11633
 
11601
11634
  const scenario$r = scenario1 + scenario2 + scenario3 + scenario4;
11602
11635
  const RewardsTableCell_stories = {
@@ -11796,6 +11829,12 @@ const referred = (user = null) => {
11796
11829
  },
11797
11830
  };
11798
11831
  };
11832
+ const deletedReferral = () => {
11833
+ return {
11834
+ rewardSource: "REFERRED",
11835
+ referral: null,
11836
+ };
11837
+ };
11799
11838
  const SourceCellReferral = () => {
11800
11839
  return (h("sqm-rewards-table-source-cell", { reward: { ...rewardsData$1, ...referral(johnDoe) }, referralText: "Referral to" }));
11801
11840
  };
@@ -11812,6 +11851,13 @@ const SourceCellAnonymousUser = () => {
11812
11851
  const SourceCellDeletedUser = () => {
11813
11852
  return (h("sqm-rewards-table-source-cell", { reward: { ...rewardsData$1, ...referral(null) }, referralText: "Referral to", deletedUserText: "Deleted User" }));
11814
11853
  };
11854
+ const SourceCellDeletedReferral = () => {
11855
+ return (
11856
+ // AL: TODO
11857
+ h("sqm-rewards-table-source-cell", {
11858
+ //@ts-ignore
11859
+ reward: { ...rewardsData$1, ...deletedReferral() }, referralText: "Referral to", deletedReferralText: "Deleted Referral" }));
11860
+ };
11815
11861
  const StatusCellAvailable = () => {
11816
11862
  return (h("sqm-rewards-table-status-cell", { statusText: "Available", reward: rewardsData$1 }));
11817
11863
  };
@@ -12014,6 +12060,7 @@ const RewardsTableCell = /*#__PURE__*/Object.freeze({
12014
12060
  SourceCellReferred: SourceCellReferred,
12015
12061
  SourceCellAnonymousUser: SourceCellAnonymousUser,
12016
12062
  SourceCellDeletedUser: SourceCellDeletedUser,
12063
+ SourceCellDeletedReferral: SourceCellDeletedReferral,
12017
12064
  StatusCellAvailable: StatusCellAvailable,
12018
12065
  StatusCellAvailableExpiry: StatusCellAvailableExpiry,
12019
12066
  StatusCellRedeemed: StatusCellRedeemed,
@@ -12106,6 +12153,12 @@ const r_expired = [
12106
12153
  h(SourceCellReferred, null),
12107
12154
  h(DateCell$1, null),
12108
12155
  ];
12156
+ const r_deleted = [
12157
+ h(RewardsCellCreditCancelled, null),
12158
+ h(StatusCellCancelled, null),
12159
+ h(SourceCellDeletedReferral, null),
12160
+ h(DateCell$1, null),
12161
+ ];
12109
12162
  const r_cancelled = [
12110
12163
  h(RewardsCellCreditCancelled, null),
12111
12164
  h(StatusCellCancelled, null),
@@ -12189,6 +12242,7 @@ const RewardsTable = () => {
12189
12242
  r_available,
12190
12243
  r_redeemed,
12191
12244
  r_cancelled,
12245
+ r_deleted,
12192
12246
  r_expired,
12193
12247
  r_denied,
12194
12248
  r_pending_review,