Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Promo codes #427

Open
wants to merge 72 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 48 commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
1e2e4df
added sqm-referral-code component
00salmon Nov 18, 2024
a60d561
added simple referral codes paginated component
00salmon Nov 19, 2024
5425747
Add pagination component
zachharrison Nov 19, 2024
7c329fe
Update story
zachharrison Nov 19, 2024
dea8322
added ability to override link on share link / share buttons
00salmon Nov 20, 2024
76e192f
add groups
00salmon Nov 20, 2024
6e64f28
added override for story
00salmon Nov 21, 2024
83d18b0
added initial specs for referral codes component
00salmon Nov 22, 2024
17ef857
wrong share medium in spec
00salmon Nov 22, 2024
5b3c872
adding props from specs
00salmon Nov 22, 2024
78bc786
cleanup
00salmon Nov 22, 2024
8f8f8d5
edit spec to match different name
00salmon Nov 22, 2024
6ab948a
Style referral code and add stories
zachharrison Nov 26, 2024
e3df42c
More styling updates
zachharrison Nov 27, 2024
23569e8
Add optional notification to copy text view
zachharrison Nov 27, 2024
d59092a
Add css part
zachharrison Nov 27, 2024
6743a54
Update story
zachharrison Nov 27, 2024
404cc83
update a bunch of components to support context overrides for their data
00salmon Nov 27, 2024
e1b6126
bundle referral code exclusive components together
00salmon Nov 27, 2024
45c8b57
pagination demo hook
00salmon Nov 27, 2024
48f09a2
Update sqm-pagination.tsx
00salmon Nov 27, 2024
32423b8
wire up demo hook for pagination
00salmon Nov 27, 2024
e26cdfa
added base example of referral codes component
00salmon Nov 29, 2024
cab4741
Merge branch 'master' into promo-codes
00salmon Nov 29, 2024
d0976ed
publish
00salmon Nov 29, 2024
e0b67ab
update specs
00salmon Dec 2, 2024
c6042a4
add placeholder mutation for setting codes as copied
00salmon Dec 12, 2024
b81e337
wire up to backend, added props for loading + empty state
00salmon Dec 16, 2024
a72dbc6
add engagementMedium to share links, query each different medium
00salmon Dec 16, 2024
d929f0e
fixed a few issues with loading / copied states, wired up some more data
00salmon Dec 16, 2024
ebe0630
added todo
00salmon Dec 16, 2024
c50240e
cleanup imports
00salmon Dec 16, 2024
11d9ddc
Add empty and loading states
zachharrison Dec 19, 2024
399e071
wired up markReferralCodeCopied
00salmon Dec 20, 2024
49ee068
fix mutation and refetch code after setting copied
00salmon Dec 20, 2024
53136fb
fix variables, refetch
00salmon Dec 20, 2024
71b7c3c
use refresh dispatcher to prevent loading state when copying
00salmon Dec 20, 2024
c832c3c
fix a few issues with pagination
00salmon Dec 20, 2024
23cffa1
Add new widget template
zachharrison Jan 7, 2025
e1bdc41
fix issues with share buttons
00salmon Jan 7, 2025
938ee1c
Merge branch 'promo-codes' of https://github.com/saasquatch/program-t…
00salmon Jan 7, 2025
828740e
Update PromoCodeReferralWidget.html
00salmon Jan 7, 2025
7d8ede0
update specs
00salmon Jan 9, 2025
cea024b
fix query, update template
00salmon Jan 9, 2025
02cc323
cleanup imports
00salmon Jan 10, 2025
092d3b1
added scoped program id / override to codes query
00salmon Jan 11, 2025
1cdc248
add template for website referral widget
00salmon Jan 13, 2025
ea6e83d
use program select widget for prop
00salmon Jan 15, 2025
d59d3ce
add slots doc to referral codes component
00salmon Jan 16, 2025
cabc161
add examples of configurable notification text
00salmon Jan 16, 2025
430ed20
fix spec tags
00salmon Jan 17, 2025
7aec44e
update templates
00salmon Jan 21, 2025
7a85779
update spec
00salmon Jan 21, 2025
3b25c56
bandaid fix for issue with single / multi use code query
00salmon Jan 22, 2025
1319cc6
better fix for codes issue
00salmon Jan 22, 2025
be6d169
fix capitalization
00salmon Jan 23, 2025
11d2a0c
make pagination component translatable, fix some demo hook issues
00salmon Jan 27, 2025
7118832
added missing prop, publish
00salmon Jan 27, 2025
a31caf4
Hide pagination if loading or empty
zachharrison Jan 28, 2025
62636ab
publish
00salmon Jan 28, 2025
3bb31d6
Remove unnecessary uiGroup
zachharrison Jan 29, 2025
be5cca7
add missing default prop to non-template example
00salmon Jan 31, 2025
dc6d7de
another missing default
00salmon Jan 31, 2025
fd45791
Update changelog
zachharrison Feb 6, 2025
a213b3f
update mint version
zachharrison Feb 6, 2025
eb71a58
add fallback values to table to prevent first-load issue
00salmon Feb 6, 2025
1bf2fa5
address comments in changelog
00salmon Feb 6, 2025
5483aee
address a bunch of PR comments
00salmon Feb 6, 2025
55838d7
cleanup
00salmon Feb 6, 2025
67f2ec7
update demo data type
00salmon Feb 7, 2025
564d68e
Remove hard coded text
zachharrison Feb 7, 2025
32bad2c
Merge branch 'promo-codes' of github.com:saasquatch/program-tools int…
zachharrison Feb 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/mint-components/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/mint-components/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@saasquatch/mint-components",
"title": "Mint Components",
"version": "1.11.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging pre-release

"version": "1.11.1-31",
"description": "A minimal design library with components for referral and loyalty experiences. Built with Shoelace components by Saasquatch.",
"icon": "https://res.cloudinary.com/saasquatch/image/upload/v1652219900/squatch-assets/For_Mint.svg",
"raisins": "docs/raisins.json",
Expand Down
182 changes: 181 additions & 1 deletion packages/mint-components/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ import { PortalRegisterViewProps } from "./components/sqm-portal-register/sqm-po
import { PortalRegistrationFormViewProps } from "./components/sqm-portal-registration-form/sqm-portal-registration-form-view";
import { PortalResetPasswordViewProps } from "./components/sqm-portal-reset-password/sqm-portal-reset-password-view";
import { PortalVerifyEmailViewProps } from "./components/sqm-portal-verify-email/sqm-portal-verify-email-view";
import { ReferralCodesViewProps } from "./components/sqm-referral-codes/sqm-referral-codes-view";
import { ReferralIframeViewProps } from "./components/sqm-referral-iframe/sqm-referral-iframe-view";
import { ReferralDates } from "./components/sqm-referral-table/useReferralTable";
import { RewardExchangeViewProps } from "./components/sqm-reward-exchange-list/sqm-reward-exchange-list-view";
Expand Down Expand Up @@ -730,7 +731,7 @@ export namespace Components {
* @format url
* @uiName Image
*/
"emptyStateImage": string;
"emptyStateImage"?: string;
/**
* @uiName Description
* @uiWidget textArea
Expand Down Expand Up @@ -1542,6 +1543,13 @@ export namespace Components {
*/
"path": string;
}
interface SqmPagination {
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<any>;
}
interface SqmPasswordField {
/**
* @undocumented
Expand Down Expand Up @@ -2579,6 +2587,75 @@ export namespace Components {
*/
"verticalAlignment": "start" | "center" | "end";
}
interface SqmReferralCode {
/**
* Set the copy button style and placement
* @uiName Style
* @uiType string
* @uiEnum ["icon", "button-outside", "button-below"]
* @uiEnumNames ["Icon", "Button outside", "Button below"]
*/
"buttonStyle"?: "icon" | "button-outside" | "button-below";
/**
* @uiName Copy button label
*/
"copyButtonLabel"?: string;
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<CopyTextViewProps>;
/**
* Shown underneath the referral code when the user has already copied the code
* @uiName Notification text
*/
"notificationText": string;
/**
* The ID of the program that should generate the code. Defaults to the program ID in context where this widget is loaded.
* @uiName Program ID
* @uiWidget programSelector
*/
"programId"?: string;
/**
* Boolean used to show notification text below input
* @uiName Show notification text
*/
"showNotificationText": boolean;
/**
* Change the text alignment
* @uiName referral code alignment
* @uiType string
* @uiEnum ["left", "center", "right"]
* @uiEnumNames ["Left", "Center", "Right"]
*/
"textAlign": "left" | "center" | "right";
/**
* The number of milliseconds that the tooltip appears for
* @uiName Tooltip lifespan
*/
"tooltiplifespan": number;
/**
* Shown inside a tooltip after someone has successfully copied the link to their clipboard
* @uiName Tooltip text
*/
"tooltiptext": string;
}
interface SqmReferralCodes {
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<ReferralCodesViewProps>;
/**
* @uiName Program ID
* @uiWidget programSelector
*/
"programId"?: string;
/**
* @uiName Title Text
*/
"titleText"?: string;
}
interface SqmReferralIframe {
/**
* @undocumented
Expand Down Expand Up @@ -5375,6 +5452,12 @@ declare global {
prototype: HTMLSqmNavigationSidebarItemElement;
new (): HTMLSqmNavigationSidebarItemElement;
};
interface HTMLSqmPaginationElement extends Components.SqmPagination, HTMLStencilElement {
}
var HTMLSqmPaginationElement: {
prototype: HTMLSqmPaginationElement;
new (): HTMLSqmPaginationElement;
};
interface HTMLSqmPasswordFieldElement extends Components.SqmPasswordField, HTMLStencilElement {
}
var HTMLSqmPasswordFieldElement: {
Expand Down Expand Up @@ -5501,6 +5584,18 @@ declare global {
prototype: HTMLSqmReferralCardElement;
new (): HTMLSqmReferralCardElement;
};
interface HTMLSqmReferralCodeElement extends Components.SqmReferralCode, HTMLStencilElement {
}
var HTMLSqmReferralCodeElement: {
prototype: HTMLSqmReferralCodeElement;
new (): HTMLSqmReferralCodeElement;
};
interface HTMLSqmReferralCodesElement extends Components.SqmReferralCodes, HTMLStencilElement {
}
var HTMLSqmReferralCodesElement: {
prototype: HTMLSqmReferralCodesElement;
new (): HTMLSqmReferralCodesElement;
};
interface HTMLSqmReferralIframeElement extends Components.SqmReferralIframe, HTMLStencilElement {
}
var HTMLSqmReferralIframeElement: {
Expand Down Expand Up @@ -5824,6 +5919,7 @@ declare global {
"sqm-navigation-menu": HTMLSqmNavigationMenuElement;
"sqm-navigation-sidebar": HTMLSqmNavigationSidebarElement;
"sqm-navigation-sidebar-item": HTMLSqmNavigationSidebarItemElement;
"sqm-pagination": HTMLSqmPaginationElement;
"sqm-password-field": HTMLSqmPasswordFieldElement;
"sqm-payout-details-card": HTMLSqmPayoutDetailsCardElement;
"sqm-popup-container": HTMLSqmPopupContainerElement;
Expand All @@ -5845,6 +5941,8 @@ declare global {
"sqm-program-explainer-step": HTMLSqmProgramExplainerStepElement;
"sqm-program-menu": HTMLSqmProgramMenuElement;
"sqm-referral-card": HTMLSqmReferralCardElement;
"sqm-referral-code": HTMLSqmReferralCodeElement;
"sqm-referral-codes": HTMLSqmReferralCodesElement;
"sqm-referral-iframe": HTMLSqmReferralIframeElement;
"sqm-referral-table": HTMLSqmReferralTableElement;
"sqm-referral-table-cell": HTMLSqmReferralTableCellElement;
Expand Down Expand Up @@ -7382,6 +7480,13 @@ declare namespace LocalJSX {
*/
"path"?: string;
}
interface SqmPagination {
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<any>;
}
interface SqmPasswordField {
/**
* @undocumented
Expand Down Expand Up @@ -8419,6 +8524,75 @@ declare namespace LocalJSX {
*/
"verticalAlignment"?: "start" | "center" | "end";
}
interface SqmReferralCode {
/**
* Set the copy button style and placement
* @uiName Style
* @uiType string
* @uiEnum ["icon", "button-outside", "button-below"]
* @uiEnumNames ["Icon", "Button outside", "Button below"]
*/
"buttonStyle"?: "icon" | "button-outside" | "button-below";
/**
* @uiName Copy button label
*/
"copyButtonLabel"?: string;
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<CopyTextViewProps>;
/**
* Shown underneath the referral code when the user has already copied the code
* @uiName Notification text
*/
"notificationText"?: string;
/**
* The ID of the program that should generate the code. Defaults to the program ID in context where this widget is loaded.
* @uiName Program ID
* @uiWidget programSelector
*/
"programId"?: string;
/**
* Boolean used to show notification text below input
* @uiName Show notification text
*/
"showNotificationText"?: boolean;
/**
* Change the text alignment
* @uiName referral code alignment
* @uiType string
* @uiEnum ["left", "center", "right"]
* @uiEnumNames ["Left", "Center", "Right"]
*/
"textAlign"?: "left" | "center" | "right";
/**
* The number of milliseconds that the tooltip appears for
* @uiName Tooltip lifespan
*/
"tooltiplifespan"?: number;
/**
* Shown inside a tooltip after someone has successfully copied the link to their clipboard
* @uiName Tooltip text
*/
"tooltiptext"?: string;
}
interface SqmReferralCodes {
/**
* @undocumented
* @uiType object
*/
"demoData"?: DemoData<ReferralCodesViewProps>;
/**
* @uiName Program ID
* @uiWidget programSelector
*/
"programId"?: string;
/**
* @uiName Title Text
*/
"titleText"?: string;
}
interface SqmReferralIframe {
/**
* @undocumented
Expand Down Expand Up @@ -10989,6 +11163,7 @@ declare namespace LocalJSX {
"sqm-navigation-menu": SqmNavigationMenu;
"sqm-navigation-sidebar": SqmNavigationSidebar;
"sqm-navigation-sidebar-item": SqmNavigationSidebarItem;
"sqm-pagination": SqmPagination;
"sqm-password-field": SqmPasswordField;
"sqm-payout-details-card": SqmPayoutDetailsCard;
"sqm-popup-container": SqmPopupContainer;
Expand All @@ -11010,6 +11185,8 @@ declare namespace LocalJSX {
"sqm-program-explainer-step": SqmProgramExplainerStep;
"sqm-program-menu": SqmProgramMenu;
"sqm-referral-card": SqmReferralCard;
"sqm-referral-code": SqmReferralCode;
"sqm-referral-codes": SqmReferralCodes;
"sqm-referral-iframe": SqmReferralIframe;
"sqm-referral-table": SqmReferralTable;
"sqm-referral-table-cell": SqmReferralTableCell;
Expand Down Expand Up @@ -11103,6 +11280,7 @@ declare module "@stencil/core" {
"sqm-navigation-menu": LocalJSX.SqmNavigationMenu & JSXBase.HTMLAttributes<HTMLSqmNavigationMenuElement>;
"sqm-navigation-sidebar": LocalJSX.SqmNavigationSidebar & JSXBase.HTMLAttributes<HTMLSqmNavigationSidebarElement>;
"sqm-navigation-sidebar-item": LocalJSX.SqmNavigationSidebarItem & JSXBase.HTMLAttributes<HTMLSqmNavigationSidebarItemElement>;
"sqm-pagination": LocalJSX.SqmPagination & JSXBase.HTMLAttributes<HTMLSqmPaginationElement>;
"sqm-password-field": LocalJSX.SqmPasswordField & JSXBase.HTMLAttributes<HTMLSqmPasswordFieldElement>;
"sqm-payout-details-card": LocalJSX.SqmPayoutDetailsCard & JSXBase.HTMLAttributes<HTMLSqmPayoutDetailsCardElement>;
"sqm-popup-container": LocalJSX.SqmPopupContainer & JSXBase.HTMLAttributes<HTMLSqmPopupContainerElement>;
Expand All @@ -11124,6 +11302,8 @@ declare module "@stencil/core" {
"sqm-program-explainer-step": LocalJSX.SqmProgramExplainerStep & JSXBase.HTMLAttributes<HTMLSqmProgramExplainerStepElement>;
"sqm-program-menu": LocalJSX.SqmProgramMenu & JSXBase.HTMLAttributes<HTMLSqmProgramMenuElement>;
"sqm-referral-card": LocalJSX.SqmReferralCard & JSXBase.HTMLAttributes<HTMLSqmReferralCardElement>;
"sqm-referral-code": LocalJSX.SqmReferralCode & JSXBase.HTMLAttributes<HTMLSqmReferralCodeElement>;
"sqm-referral-codes": LocalJSX.SqmReferralCodes & JSXBase.HTMLAttributes<HTMLSqmReferralCodesElement>;
"sqm-referral-iframe": LocalJSX.SqmReferralIframe & JSXBase.HTMLAttributes<HTMLSqmReferralIframeElement>;
"sqm-referral-table": LocalJSX.SqmReferralTable & JSXBase.HTMLAttributes<HTMLSqmReferralTableElement>;
"sqm-referral-table-cell": LocalJSX.SqmReferralTableCell & JSXBase.HTMLAttributes<HTMLSqmReferralTableCellElement>;
Expand Down
Loading
Loading