@saasquatch/mint-components 2.1.8-2 → 2.1.8-4

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 (59) hide show
  1. package/dist/cjs/{ShadowViewAddon-a26deae6.js → ShadowViewAddon-f5a79b05.js} +377 -10
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/mint-components.cjs.js +1 -1
  4. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +4 -4
  5. package/dist/cjs/sqm-big-stat_45.cjs.entry.js +175 -31
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -19
  7. package/dist/collection/components/sqm-referral-iframe/ReferralIframe.stories.js +0 -1
  8. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe-view.js +1 -1
  9. package/dist/collection/components/sqm-referral-iframe/sqm-referral-iframe.js +1 -27
  10. package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
  11. package/dist/collection/components/sqm-share-link/ShareLink.stories.js +142 -11
  12. package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
  13. package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +173 -0
  14. package/dist/collection/components/sqm-share-link/sqm-share-link.js +536 -26
  15. package/dist/collection/components/sqm-share-link/useShareLink.js +201 -5
  16. package/dist/collection/components/tax-and-cash/sqm-indirect-tax-form/sqm-indirect-tax-form.js +4 -4
  17. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card.js +2 -2
  18. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +6 -6
  19. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.js +2 -2
  20. package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-491b58b8.js} +378 -12
  21. package/dist/esm/loader.js +1 -1
  22. package/dist/esm/mint-components.js +1 -1
  23. package/dist/esm/sqm-banking-info-form_10.entry.js +4 -4
  24. package/dist/esm/sqm-big-stat_45.entry.js +175 -31
  25. package/dist/esm/sqm-stencilbook.entry.js +168 -19
  26. package/dist/esm-es5/ShadowViewAddon-491b58b8.js +1 -0
  27. package/dist/esm-es5/loader.js +1 -1
  28. package/dist/esm-es5/mint-components.js +1 -1
  29. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  30. package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -1
  31. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  32. package/dist/mint-components/mint-components.esm.js +1 -1
  33. package/dist/mint-components/p-17be8df0.entry.js +9 -0
  34. package/dist/mint-components/p-296fda71.system.entry.js +1 -0
  35. package/dist/mint-components/p-75520f1a.js +500 -0
  36. package/dist/mint-components/{p-7ee8f2ed.entry.js → p-8465e839.entry.js} +20 -20
  37. package/dist/mint-components/p-aa226140.system.entry.js +1 -0
  38. package/dist/mint-components/p-ca098be1.system.js +1 -1
  39. package/dist/mint-components/{p-5492dd51.system.entry.js → p-cacb897d.system.entry.js} +1 -1
  40. package/dist/mint-components/p-cd24ecfc.system.js +1 -0
  41. package/dist/mint-components/{p-d4f332a7.entry.js → p-ff378015.entry.js} +7 -7
  42. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe-view.d.ts +0 -1
  43. package/dist/types/components/sqm-referral-iframe/sqm-referral-iframe.d.ts +0 -5
  44. package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +10 -0
  45. package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
  46. package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +37 -0
  47. package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +107 -2
  48. package/dist/types/components/sqm-share-link/useShareLink.d.ts +27 -4
  49. package/dist/types/components.d.ts +183 -12
  50. package/docs/docs.docx +0 -0
  51. package/docs/raisins.json +1 -1
  52. package/grapesjs/grapesjs.js +1 -1
  53. package/package.json +1 -1
  54. package/dist/esm-es5/ShadowViewAddon-47f1e579.js +0 -1
  55. package/dist/mint-components/p-0614dcbc.entry.js +0 -9
  56. package/dist/mint-components/p-217dedde.js +0 -463
  57. package/dist/mint-components/p-bf545082.system.entry.js +0 -1
  58. package/dist/mint-components/p-ce050888.system.js +0 -1
  59. package/dist/mint-components/p-de343dd0.system.entry.js +0 -1
@@ -4,7 +4,6 @@ export declare type ReferralIframeViewProps = {
4
4
  iframeSrc: string;
5
5
  iframeHeight: string;
6
6
  iframeWidth: string;
7
- codeParam: string;
8
7
  };
9
8
  };
10
9
  data: {
@@ -21,11 +21,6 @@ export declare class SqmReferralIframe {
21
21
  * @uiName IFrame width
22
22
  */
23
23
  iframeWidth: string;
24
- /**
25
- * Override the default parameter name used in the iframe
26
- * @uiName Referral code parameter name
27
- */
28
- codeParam: string;
29
24
  /**
30
25
  * @undocumented
31
26
  * @uiType object
@@ -16,3 +16,13 @@ export declare const CopyButtonBelow: () => any;
16
16
  export declare const CustomStyles: () => any;
17
17
  export declare const CustomStylesWithDemoHooks: () => any;
18
18
  export declare const FullStack: () => any;
19
+ export declare const CustomizeUrlDefault: () => any;
20
+ export declare const CustomizeUrlEditing: () => any;
21
+ export declare const CustomizeUrlCustomized: () => any;
22
+ export declare const CustomizeUrlLimitReached: () => any;
23
+ export declare const CustomizeUrlDisabled: () => any;
24
+ export declare const CustomizeUrlValidationError: () => any;
25
+ export declare const CustomizeUrlInvalidSymbols: () => any;
26
+ export declare const CustomizeUrlRestrictedWord: () => any;
27
+ export declare const CustomizeUrlSaving: () => any;
28
+ export declare const CustomizeUrlSuccess: () => any;
@@ -20,3 +20,9 @@ export declare const FastTooltip: {
20
20
  hookStory: Function;
21
21
  };
22
22
  };
23
+ export declare const CustomizeUrlEnabled: {
24
+ (): any;
25
+ parameters: {
26
+ hookStory: Function;
27
+ };
28
+ };
@@ -0,0 +1,37 @@
1
+ import { CopyTextViewProps } from "../views/copy-text-view";
2
+ export declare type ValidationErrorCode = "LINK_TAKEN" | "INVALID_SYMBOLS" | "RESTRICTED_WORD" | null;
3
+ export interface ValidationErrorInfo {
4
+ code: ValidationErrorCode;
5
+ title: string;
6
+ description: string;
7
+ }
8
+ export interface ShareLinkViewProps {
9
+ copyTextViewProps: CopyTextViewProps;
10
+ customizeUrl: boolean;
11
+ customizeLinkLabel: string;
12
+ saveLabelText: string;
13
+ cancelLabelText: string;
14
+ successMessage: string;
15
+ isEditing: boolean;
16
+ editValue: string;
17
+ domainPrefix: string;
18
+ editsRemaining: number;
19
+ maxEdits: number;
20
+ limitReached: boolean;
21
+ validationError: ValidationErrorInfo | null;
22
+ isValidating: boolean;
23
+ isSaving: boolean;
24
+ showSuccess: boolean;
25
+ characterLimit: number;
26
+ charactersRemaining: number;
27
+ editLimitText: string;
28
+ editLimitReachedText: string;
29
+ supportLinkText: string;
30
+ customizeDisabled: boolean;
31
+ customizeDisabledTooltip: string;
32
+ onCustomizeClick: () => void;
33
+ onEditValueChange: (value: string) => void;
34
+ onSave: () => void;
35
+ onCancel: () => void;
36
+ }
37
+ export declare function ShareLinkView(props: ShareLinkViewProps): any;
@@ -1,5 +1,5 @@
1
1
  import { DemoData } from "../../global/demo";
2
- import { CopyTextViewProps } from "../views/copy-text-view";
2
+ import { ShareLinkViewProps } from "./sqm-share-link-view";
3
3
  /**
4
4
  * @uiName Share Link
5
5
  * @exampleGroup Sharing
@@ -90,11 +90,116 @@ export declare class ShareLink {
90
90
  * @uiGroup Style
91
91
  */
92
92
  buttonStyle?: "icon" | "button-outside" | "button-below";
93
+ /**
94
+ * Enable users to customize their referral link
95
+ *
96
+ * @uiName Customize URL
97
+ * @uiType boolean
98
+ */
99
+ customizeUrl?: boolean;
100
+ /**
101
+ * Text shown below the share link input to trigger customization
102
+ *
103
+ * @uiName Customize link label
104
+ * @uiType string
105
+ */
106
+ customizeLinkLabel?: string;
107
+ /**
108
+ * Text for the save button in editing mode
109
+ *
110
+ * @uiName Save button label
111
+ * @uiType string
112
+ */
113
+ saveLabelText?: string;
114
+ /**
115
+ * Text for the cancel button in editing mode
116
+ *
117
+ * @uiName Cancel button label
118
+ * @uiType string
119
+ */
120
+ cancelLabelText?: string;
121
+ /**
122
+ * Message shown briefly after successfully saving a custom link
123
+ *
124
+ * @uiName Success message
125
+ * @uiType string
126
+ */
127
+ successMessage?: string;
128
+ /**
129
+ * Title text shown when the custom link is already taken
130
+ *
131
+ * @uiName Link taken error title
132
+ * @uiType string
133
+ */
134
+ linkTakenErrorTitle?: string;
135
+ /**
136
+ * Description text shown when the custom link is already taken
137
+ *
138
+ * @uiName Link taken error description
139
+ * @uiType string
140
+ */
141
+ linkTakenErrorDescription?: string;
142
+ /**
143
+ * Title text shown when the link contains invalid symbols
144
+ *
145
+ * @uiName Invalid symbols error title
146
+ * @uiType string
147
+ */
148
+ invalidSymbolsErrorTitle?: string;
149
+ /**
150
+ * Description text shown when the link contains invalid symbols
151
+ *
152
+ * @uiName Invalid symbols error description
153
+ * @uiType string
154
+ */
155
+ invalidSymbolsErrorDescription?: string;
156
+ /**
157
+ * Title text shown when the link contains a restricted word
158
+ *
159
+ * @uiName Restricted word error title
160
+ * @uiType string
161
+ */
162
+ restrictedWordErrorTitle?: string;
163
+ /**
164
+ * Description text shown when the link contains a restricted word
165
+ *
166
+ * @uiName Restricted word error description
167
+ * @uiType string
168
+ */
169
+ restrictedWordErrorDescription?: string;
170
+ /**
171
+ * Text describing the edit limit
172
+ *
173
+ * @uiName Edit limit text
174
+ * @uiType string
175
+ */
176
+ editLimitText?: string;
177
+ /**
178
+ * Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
179
+ *
180
+ * @uiName Edit limit reached text
181
+ * @uiType string
182
+ */
183
+ editLimitReachedText?: string;
184
+ /**
185
+ * Display text for the support link in the edit limit reached message
186
+ *
187
+ * @uiName Support link text
188
+ * @uiType string
189
+ */
190
+ supportLinkText?: string;
191
+ /**
192
+ * Tooltip text shown when link customization is disabled
193
+ *
194
+ * @uiName Customize disabled tooltip
195
+ * @uiType string
196
+ */
197
+ customizeDisabledTooltip?: string;
93
198
  /**
94
199
  * @undocumented
95
200
  * @uiType object
96
201
  */
97
- demoData?: DemoData<CopyTextViewProps>;
202
+ demoData?: DemoData<ShareLinkViewProps>;
98
203
  constructor();
99
204
  disconnectedCallback(): void;
100
205
  render(): any;
@@ -1,9 +1,32 @@
1
- import { CopyTextViewProps } from "../views/copy-text-view";
2
- interface ShareLinkProps {
1
+ import { ShareLinkViewProps } from "./sqm-share-link-view";
2
+ export interface ShareLinkProps {
3
3
  programId?: string;
4
4
  tooltiptext: string;
5
5
  tooltiplifespan: number;
6
6
  linkOverride?: string;
7
+ customizeUrl?: boolean;
8
+ customizeUrlText?: string;
9
+ customizeLinkLabel?: string;
10
+ saveLabelText?: string;
11
+ cancelLabelText?: string;
12
+ successMessage?: string;
13
+ textAlign?: "left" | "center" | "right";
14
+ buttonStyle?: "icon" | "button-outside" | "button-below";
15
+ backgroundColor?: string;
16
+ textColor?: string;
17
+ borderRadius?: string;
18
+ buttonType?: "primary" | "secondary";
19
+ copyButtonLabel?: string;
20
+ borderColor?: string;
21
+ linkTakenErrorTitle?: string;
22
+ linkTakenErrorDescription?: string;
23
+ invalidSymbolsErrorTitle?: string;
24
+ invalidSymbolsErrorDescription?: string;
25
+ restrictedWordErrorTitle?: string;
26
+ restrictedWordErrorDescription?: string;
27
+ editLimitText?: string;
28
+ editLimitReachedText?: string;
29
+ supportLinkText?: string;
30
+ customizeDisabledTooltip?: string;
7
31
  }
8
- export declare function useShareLink(props: ShareLinkProps): CopyTextViewProps;
9
- export {};
32
+ export declare function useShareLink(props: ShareLinkProps): ShareLinkViewProps;
@@ -54,6 +54,7 @@ import { ReferralIframeViewProps } from "./components/sqm-referral-iframe/sqm-re
54
54
  import { ReferralDates } from "./components/sqm-referral-table/useReferralTable";
55
55
  import { RewardExchangeViewProps } from "./components/sqm-reward-exchange-list/sqm-reward-exchange-list-view";
56
56
  import { ShareButtonViewProps } from "./components/sqm-share-button/sqm-share-button-view";
57
+ import { ShareLinkViewProps } from "./components/sqm-share-link/sqm-share-link-view";
57
58
  import { TaskCardViewProps } from "./components/sqm-task-card/sqm-task-card-view";
58
59
  import { UseTaxAndCashDashboardResult } from "./components/tax-and-cash/sqm-tax-and-cash-dashboard/useTaxAndCashDashboard";
59
60
  import { UseUserInfoFormResult } from "./components/tax-and-cash/sqm-user-info-form/useUserInfoForm";
@@ -3879,11 +3880,6 @@ export namespace Components {
3879
3880
  "titleText"?: string;
3880
3881
  }
3881
3882
  interface SqmReferralIframe {
3882
- /**
3883
- * Override the default parameter name used in the iframe
3884
- * @uiName Referral code parameter name
3885
- */
3886
- "codeParam": string;
3887
3883
  /**
3888
3884
  * @undocumented
3889
3885
  * @uiType object
@@ -4934,21 +4930,111 @@ export namespace Components {
4934
4930
  * @uiGroup Style
4935
4931
  */
4936
4932
  "buttonType"?: "primary" | "secondary";
4933
+ /**
4934
+ * Text for the cancel button in editing mode
4935
+ * @uiName Cancel button label
4936
+ * @uiType string
4937
+ */
4938
+ "cancelLabelText"?: string;
4937
4939
  /**
4938
4940
  * @uiName Copy button label
4939
4941
  */
4940
4942
  "copyButtonLabel": string;
4943
+ /**
4944
+ * Tooltip text shown when link customization is disabled
4945
+ * @uiName Customize disabled tooltip
4946
+ * @uiType string
4947
+ */
4948
+ "customizeDisabledTooltip"?: string;
4949
+ /**
4950
+ * Text shown below the share link input to trigger customization
4951
+ * @uiName Customize link label
4952
+ * @uiType string
4953
+ */
4954
+ "customizeLinkLabel"?: string;
4955
+ /**
4956
+ * Enable users to customize their referral link
4957
+ * @uiName Customize URL
4958
+ * @uiType boolean
4959
+ */
4960
+ "customizeUrl"?: boolean;
4941
4961
  /**
4942
4962
  * @undocumented
4943
4963
  * @uiType object
4944
4964
  */
4945
- "demoData"?: DemoData<CopyTextViewProps>;
4965
+ "demoData"?: DemoData<ShareLinkViewProps>;
4966
+ /**
4967
+ * Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
4968
+ * @uiName Edit limit reached text
4969
+ * @uiType string
4970
+ */
4971
+ "editLimitReachedText"?: string;
4972
+ /**
4973
+ * Text describing the edit limit
4974
+ * @uiName Edit limit text
4975
+ * @uiType string
4976
+ */
4977
+ "editLimitText"?: string;
4978
+ /**
4979
+ * Description text shown when the link contains invalid symbols
4980
+ * @uiName Invalid symbols error description
4981
+ * @uiType string
4982
+ */
4983
+ "invalidSymbolsErrorDescription"?: string;
4984
+ /**
4985
+ * Title text shown when the link contains invalid symbols
4986
+ * @uiName Invalid symbols error title
4987
+ * @uiType string
4988
+ */
4989
+ "invalidSymbolsErrorTitle"?: string;
4990
+ /**
4991
+ * Description text shown when the custom link is already taken
4992
+ * @uiName Link taken error description
4993
+ * @uiType string
4994
+ */
4995
+ "linkTakenErrorDescription"?: string;
4996
+ /**
4997
+ * Title text shown when the custom link is already taken
4998
+ * @uiName Link taken error title
4999
+ * @uiType string
5000
+ */
5001
+ "linkTakenErrorTitle"?: string;
4946
5002
  /**
4947
5003
  * The ID of the program that should generate the link. Defaults to the program ID in context where this widget is loaded.
4948
5004
  * @uiName Program ID
4949
5005
  * @uiWidget programSelector
4950
5006
  */
4951
5007
  "programId"?: string;
5008
+ /**
5009
+ * Description text shown when the link contains a restricted word
5010
+ * @uiName Restricted word error description
5011
+ * @uiType string
5012
+ */
5013
+ "restrictedWordErrorDescription"?: string;
5014
+ /**
5015
+ * Title text shown when the link contains a restricted word
5016
+ * @uiName Restricted word error title
5017
+ * @uiType string
5018
+ */
5019
+ "restrictedWordErrorTitle"?: string;
5020
+ /**
5021
+ * Text for the save button in editing mode
5022
+ * @uiName Save button label
5023
+ * @uiType string
5024
+ */
5025
+ "saveLabelText"?: string;
5026
+ /**
5027
+ * Message shown briefly after successfully saving a custom link
5028
+ * @uiName Success message
5029
+ * @uiType string
5030
+ */
5031
+ "successMessage"?: string;
5032
+ /**
5033
+ * Display text for the support link in the edit limit reached message
5034
+ * @uiName Support link text
5035
+ * @uiType string
5036
+ */
5037
+ "supportLinkText"?: string;
4952
5038
  /**
4953
5039
  * Change the text alignment
4954
5040
  * @uiName Share link alignment
@@ -11801,11 +11887,6 @@ declare namespace LocalJSX {
11801
11887
  "titleText"?: string;
11802
11888
  }
11803
11889
  interface SqmReferralIframe {
11804
- /**
11805
- * Override the default parameter name used in the iframe
11806
- * @uiName Referral code parameter name
11807
- */
11808
- "codeParam"?: string;
11809
11890
  /**
11810
11891
  * @undocumented
11811
11892
  * @uiType object
@@ -12832,21 +12913,111 @@ declare namespace LocalJSX {
12832
12913
  * @uiGroup Style
12833
12914
  */
12834
12915
  "buttonType"?: "primary" | "secondary";
12916
+ /**
12917
+ * Text for the cancel button in editing mode
12918
+ * @uiName Cancel button label
12919
+ * @uiType string
12920
+ */
12921
+ "cancelLabelText"?: string;
12835
12922
  /**
12836
12923
  * @uiName Copy button label
12837
12924
  */
12838
12925
  "copyButtonLabel"?: string;
12926
+ /**
12927
+ * Tooltip text shown when link customization is disabled
12928
+ * @uiName Customize disabled tooltip
12929
+ * @uiType string
12930
+ */
12931
+ "customizeDisabledTooltip"?: string;
12932
+ /**
12933
+ * Text shown below the share link input to trigger customization
12934
+ * @uiName Customize link label
12935
+ * @uiType string
12936
+ */
12937
+ "customizeLinkLabel"?: string;
12938
+ /**
12939
+ * Enable users to customize their referral link
12940
+ * @uiName Customize URL
12941
+ * @uiType boolean
12942
+ */
12943
+ "customizeUrl"?: boolean;
12839
12944
  /**
12840
12945
  * @undocumented
12841
12946
  * @uiType object
12842
12947
  */
12843
- "demoData"?: DemoData<CopyTextViewProps>;
12948
+ "demoData"?: DemoData<ShareLinkViewProps>;
12949
+ /**
12950
+ * Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
12951
+ * @uiName Edit limit reached text
12952
+ * @uiType string
12953
+ */
12954
+ "editLimitReachedText"?: string;
12955
+ /**
12956
+ * Text describing the edit limit
12957
+ * @uiName Edit limit text
12958
+ * @uiType string
12959
+ */
12960
+ "editLimitText"?: string;
12961
+ /**
12962
+ * Description text shown when the link contains invalid symbols
12963
+ * @uiName Invalid symbols error description
12964
+ * @uiType string
12965
+ */
12966
+ "invalidSymbolsErrorDescription"?: string;
12967
+ /**
12968
+ * Title text shown when the link contains invalid symbols
12969
+ * @uiName Invalid symbols error title
12970
+ * @uiType string
12971
+ */
12972
+ "invalidSymbolsErrorTitle"?: string;
12973
+ /**
12974
+ * Description text shown when the custom link is already taken
12975
+ * @uiName Link taken error description
12976
+ * @uiType string
12977
+ */
12978
+ "linkTakenErrorDescription"?: string;
12979
+ /**
12980
+ * Title text shown when the custom link is already taken
12981
+ * @uiName Link taken error title
12982
+ * @uiType string
12983
+ */
12984
+ "linkTakenErrorTitle"?: string;
12844
12985
  /**
12845
12986
  * The ID of the program that should generate the link. Defaults to the program ID in context where this widget is loaded.
12846
12987
  * @uiName Program ID
12847
12988
  * @uiWidget programSelector
12848
12989
  */
12849
12990
  "programId"?: string;
12991
+ /**
12992
+ * Description text shown when the link contains a restricted word
12993
+ * @uiName Restricted word error description
12994
+ * @uiType string
12995
+ */
12996
+ "restrictedWordErrorDescription"?: string;
12997
+ /**
12998
+ * Title text shown when the link contains a restricted word
12999
+ * @uiName Restricted word error title
13000
+ * @uiType string
13001
+ */
13002
+ "restrictedWordErrorTitle"?: string;
13003
+ /**
13004
+ * Text for the save button in editing mode
13005
+ * @uiName Save button label
13006
+ * @uiType string
13007
+ */
13008
+ "saveLabelText"?: string;
13009
+ /**
13010
+ * Message shown briefly after successfully saving a custom link
13011
+ * @uiName Success message
13012
+ * @uiType string
13013
+ */
13014
+ "successMessage"?: string;
13015
+ /**
13016
+ * Display text for the support link in the edit limit reached message
13017
+ * @uiName Support link text
13018
+ * @uiType string
13019
+ */
13020
+ "supportLinkText"?: string;
12850
13021
  /**
12851
13022
  * Change the text alignment
12852
13023
  * @uiName Share link alignment
package/docs/docs.docx CHANGED
Binary file