@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
@@ -27,7 +27,7 @@ const useInstantAccessRegistration = require('./useInstantAccessRegistration-239
27
27
  const useLeadFormState = require('./useLeadFormState-b4c2ab5b.js');
28
28
  const utilities = require('./utilities-fcdb9504.js');
29
29
  const ErrorView = require('./ErrorView-ee7b0f36.js');
30
- const ShadowViewAddon = require('./ShadowViewAddon-a26deae6.js');
30
+ const ShadowViewAddon = require('./ShadowViewAddon-f5a79b05.js');
31
31
  require('./sqm-portal-container-view-70a47420.js');
32
32
  const data = require('./data-8c8a08f6.js');
33
33
  const extractProps = require('./extractProps-e9c55ba8.js');
@@ -4620,11 +4620,6 @@ const SqmReferralIframe = class {
4620
4620
  * @uiName IFrame width
4621
4621
  */
4622
4622
  this.iframeWidth = "100%";
4623
- /**
4624
- * Override the default parameter name used in the iframe
4625
- * @uiName Referral code parameter name
4626
- */
4627
- this.codeParam = "rsCode";
4628
4623
  domContextHooks_module.h$1(this);
4629
4624
  }
4630
4625
  disconnectedCallback() { }
@@ -6059,7 +6054,6 @@ function useDemoShareCode(props) {
6059
6054
  borderRadius: props.borderRadius,
6060
6055
  borderColor: props.borderColor,
6061
6056
  buttonType: props.buttonType,
6062
- rewardStatus: "AVAILABLE",
6063
6057
  open,
6064
6058
  onClick: () => {
6065
6059
  // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
@@ -6119,6 +6113,111 @@ const ShareLink = class {
6119
6113
  * @uiGroup Style
6120
6114
  */
6121
6115
  this.buttonStyle = "icon";
6116
+ /**
6117
+ * Enable users to customize their referral link
6118
+ *
6119
+ * @uiName Customize URL
6120
+ * @uiType boolean
6121
+ */
6122
+ this.customizeUrl = false;
6123
+ /**
6124
+ * Text shown below the share link input to trigger customization
6125
+ *
6126
+ * @uiName Customize link label
6127
+ * @uiType string
6128
+ */
6129
+ this.customizeLinkLabel = "Customize Link";
6130
+ /**
6131
+ * Text for the save button in editing mode
6132
+ *
6133
+ * @uiName Save button label
6134
+ * @uiType string
6135
+ */
6136
+ this.saveLabelText = "Save";
6137
+ /**
6138
+ * Text for the cancel button in editing mode
6139
+ *
6140
+ * @uiName Cancel button label
6141
+ * @uiType string
6142
+ */
6143
+ this.cancelLabelText = "Cancel";
6144
+ /**
6145
+ * Message shown briefly after successfully saving a custom link
6146
+ *
6147
+ * @uiName Success message
6148
+ * @uiType string
6149
+ */
6150
+ this.successMessage = "Link updated successfully";
6151
+ /**
6152
+ * Title text shown when the custom link is already taken
6153
+ *
6154
+ * @uiName Link taken error title
6155
+ * @uiType string
6156
+ */
6157
+ this.linkTakenErrorTitle = "This link is already taken";
6158
+ /**
6159
+ * Description text shown when the custom link is already taken
6160
+ *
6161
+ * @uiName Link taken error description
6162
+ * @uiType string
6163
+ */
6164
+ this.linkTakenErrorDescription = "Try adding numbers, a dash or underscore to create a unique link.";
6165
+ /**
6166
+ * Title text shown when the link contains invalid symbols
6167
+ *
6168
+ * @uiName Invalid symbols error title
6169
+ * @uiType string
6170
+ */
6171
+ this.invalidSymbolsErrorTitle = "Please use only letters, numbers, dashes and underscores";
6172
+ /**
6173
+ * Description text shown when the link contains invalid symbols
6174
+ *
6175
+ * @uiName Invalid symbols error description
6176
+ * @uiType string
6177
+ */
6178
+ this.invalidSymbolsErrorDescription = "Special symbols can break the link when sharing.";
6179
+ /**
6180
+ * Title text shown when the link contains a restricted word
6181
+ *
6182
+ * @uiName Restricted word error title
6183
+ * @uiType string
6184
+ */
6185
+ this.restrictedWordErrorTitle = "Please try a different link";
6186
+ /**
6187
+ * Description text shown when the link contains a restricted word
6188
+ *
6189
+ * @uiName Restricted word error description
6190
+ * @uiType string
6191
+ */
6192
+ this.restrictedWordErrorDescription = "This link contains a restricted word.";
6193
+ /**
6194
+ * Text describing the edit limit
6195
+ *
6196
+ * @uiName Edit limit text
6197
+ * @uiType string
6198
+ */
6199
+ this.editLimitText = "You can edit your link up to 5 times.";
6200
+ /**
6201
+ * Message shown when the edit limit has been reached. Use {supportLink} as a placeholder for the support link.
6202
+ *
6203
+ * @uiName Edit limit reached text
6204
+ * @uiType string
6205
+ */
6206
+ this.editLimitReachedText = "5 edit limit reached. To make more changes, please contact {supportLink}.";
6207
+ /**
6208
+ * Display text for the support link in the edit limit reached message
6209
+ *
6210
+ * @uiName Support link text
6211
+ * @uiType string
6212
+ */
6213
+ this.supportLinkText = "Support";
6214
+ /**
6215
+ * Tooltip text shown when link customization is disabled
6216
+ *
6217
+ * @uiName Customize disabled tooltip
6218
+ * @uiType string
6219
+ */
6220
+ this.customizeDisabledTooltip = "Link customization is not available.";
6122
6221
  domContextHooks_module.h$1(this);
6123
6222
  }
6124
6223
  disconnectedCallback() { }
@@ -6127,33 +6226,78 @@ const ShareLink = class {
6127
6226
  const props = index_module.isDemo()
6128
6227
  ? useDemoShareLink(thisProps)
6129
6228
  : ShadowViewAddon.useShareLink(thisProps);
6130
- return index.h(copyTextView.CopyTextView, Object.assign({}, props));
6229
+ return index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, props));
6131
6230
  }
6132
6231
  };
6133
6232
  function useDemoShareLink(props) {
6233
+ var _a;
6134
6234
  const [open, setOpen] = domContextHooks_module.useState(false);
6235
+ const [isEditing, setIsEditing] = domContextHooks_module.useState(false);
6236
+ const [editValue, setEditValue] = domContextHooks_module.useState("");
6237
+ const [showSuccess, setShowSuccess] = domContextHooks_module.useState(false);
6135
6238
  const copyString = "https://www.example.com/sharelink/abc";
6136
- return cjs.cjs({
6137
- copyString: copyString,
6138
- tooltiptext: props.tooltiptext,
6139
- textAlign: props.textAlign,
6140
- buttonStyle: props.buttonStyle,
6141
- backgroundColor: props.backgroundColor,
6142
- textColor: props.textColor,
6143
- borderRadius: props.borderRadius,
6144
- buttonType: props.buttonType,
6145
- copyButtonLabel: props.copyButtonLabel,
6146
- borderColor: props.borderColor,
6147
- rewardStatus: "AVAILABLE",
6148
- open,
6149
- onClick: () => {
6150
- // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility
6151
- // Only if called from a user-initiated event
6152
- navigator.clipboard.writeText(copyString);
6153
- setOpen(true);
6154
- setTimeout(() => setOpen(false), props.tooltiplifespan);
6239
+ const domainPrefix = "https://www.example.com/";
6240
+ const baseProps = {
6241
+ copyTextViewProps: {
6242
+ copyString,
6243
+ tooltiptext: props.tooltiptext,
6244
+ textAlign: props.textAlign,
6245
+ buttonStyle: props.buttonStyle,
6246
+ backgroundColor: props.backgroundColor,
6247
+ textColor: props.textColor,
6248
+ borderRadius: props.borderRadius,
6249
+ buttonType: props.buttonType,
6250
+ copyButtonLabel: props.copyButtonLabel,
6251
+ borderColor: props.borderColor,
6252
+ open,
6253
+ onClick: () => {
6254
+ navigator.clipboard.writeText(copyString);
6255
+ setOpen(true);
6256
+ setTimeout(() => setOpen(false), props.tooltiplifespan);
6257
+ },
6155
6258
  },
6156
- }, props.demoData || {}, { arrayMerge: (_, a) => a });
6259
+ customizeUrl: props.customizeUrl,
6260
+ customizeLinkLabel: props.customizeLinkLabel,
6261
+ saveLabelText: props.saveLabelText,
6262
+ cancelLabelText: props.cancelLabelText,
6263
+ successMessage: props.successMessage,
6264
+ isEditing,
6265
+ editValue,
6266
+ domainPrefix,
6267
+ editsRemaining: 5,
6268
+ maxEdits: 5,
6269
+ limitReached: false,
6270
+ validationError: null,
6271
+ isValidating: false,
6272
+ isSaving: false,
6273
+ showSuccess,
6274
+ characterLimit: 15,
6275
+ charactersRemaining: 15 - editValue.length,
6276
+ editLimitText: props.editLimitText,
6277
+ editLimitReachedText: props.editLimitReachedText,
6278
+ supportLinkText: props.supportLinkText,
6279
+ customizeDisabled: false,
6280
+ customizeDisabledTooltip: (_a = props.customizeDisabledTooltip) !== null && _a !== void 0 ? _a : "Link customization is not available.",
6281
+ onCustomizeClick: () => {
6282
+ setIsEditing(true);
6283
+ setEditValue("");
6284
+ },
6285
+ onEditValueChange: (value) => {
6286
+ setEditValue(value);
6287
+ },
6288
+ onSave: () => {
6289
+ setIsEditing(false);
6290
+ setShowSuccess(true);
6291
+ setTimeout(() => setShowSuccess(false), 3000);
6292
+ },
6293
+ onCancel: () => {
6294
+ setIsEditing(false);
6295
+ setEditValue("");
6296
+ },
6297
+ };
6298
+ return cjs.cjs(baseProps, props.demoData || {}, {
6299
+ arrayMerge: (_, a) => a,
6300
+ });
6157
6301
  }
6158
6302
 
6159
6303
  const StatContainer = class {
@@ -6723,7 +6867,7 @@ const TaxAndCashMonolith = class {
6723
6867
  * @uiName Indirect tax number field label
6724
6868
  * @uiGroup Step 2 Properties
6725
6869
  */
6726
- this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}}";
6870
+ this.step2_indirectTaxNumber = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}}";
6727
6871
  /**
6728
6872
  * @uiName Province field label
6729
6873
  * @uiGroup Step 2 Properties
@@ -6733,7 +6877,7 @@ const TaxAndCashMonolith = class {
6733
6877
  * @uiName Missing indirect tax number error message
6734
6878
  * @uiGroup Step 2 Properties
6735
6879
  */
6736
- this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number} other {Tax number}} is required";
6880
+ this.step2_indirectTaxNumberError = "{taxType, select, GST {GST number} HST {HST number} VAT {VAT number} CT {CT number} SST {SST number} GENERAL {Indirect tax number}} is required";
6737
6881
  /**
6738
6882
  * Displayed to participants registered for QST.
6739
6883
  * @uiName QST number field label
@@ -7301,7 +7445,7 @@ const TaxAndCashMonolith = class {
7301
7445
  * @uiName Payout status badge
7302
7446
  * @uiGroup Dashboard Properties
7303
7447
  */
7304
- this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} other {Failed} }";
7448
+ this.dashboard_statusBadgeText = "{badgeText, select, payoutToday {Payout Today} nextPayout {Next Payout} }";
7305
7449
  /**
7306
7450
  * Display participants' payout preference on the payout information card, indicating the balance at which they want to get paid.
7307
7451
  * @uiName Payout schedule by threshold text
@@ -33,7 +33,7 @@ require('./utilities-fcdb9504.js');
33
33
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-6b1acd90.js');
34
34
  require('./ErrorView-ee7b0f36.js');
35
35
  const sqmQrCodeView = require('./sqm-qr-code-view-1f2daa76.js');
36
- const ShadowViewAddon = require('./ShadowViewAddon-a26deae6.js');
36
+ const ShadowViewAddon = require('./ShadowViewAddon-f5a79b05.js');
37
37
  const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js');
38
38
  const sqmUserInfoFormView = require('./sqm-user-info-form-view-53306f6e.js');
39
39
  const data = require('./data-8c8a08f6.js');
@@ -10704,7 +10704,6 @@ const props$1 = {
10704
10704
  iframeSrc: "https://example.com",
10705
10705
  iframeHeight: "100%",
10706
10706
  iframeWidth: "100%",
10707
- codeParam: "rsCode",
10708
10707
  },
10709
10708
  },
10710
10709
  };
@@ -14055,21 +14054,151 @@ const CustomStyles$1 = () => {
14055
14054
  return index.h(copyTextView.CopyTextView, Object.assign({}, props));
14056
14055
  };
14057
14056
  const CustomStylesWithDemoHooks = () => {
14058
- const props = {
14059
- copyString: "https://noah.example.com",
14060
- open: false,
14061
- tooltiptext: "Copied!",
14062
- backgroundColor: "#1ed760",
14063
- borderRadius: "30px",
14064
- textColor: "red",
14065
- buttonType: "primary",
14066
- borderColor: "#121212",
14067
- };
14068
- return (index.h("sqm-share-link", { demoData: { ...props }, backgroundColor: "#1ed760" }));
14057
+ return (index.h("sqm-share-link", { demoData: {
14058
+ copyTextViewProps: {
14059
+ copyString: "https://noah.example.com",
14060
+ open: false,
14061
+ tooltiptext: "Copied!",
14062
+ backgroundColor: "#1ed760",
14063
+ borderRadius: "30px",
14064
+ textColor: "red",
14065
+ buttonType: "primary",
14066
+ borderColor: "#121212",
14067
+ },
14068
+ }, backgroundColor: "#1ed760" }));
14069
14069
  };
14070
14070
  const FullStack = () => {
14071
14071
  return index.h("sqm-share-link", null);
14072
14072
  };
14073
+ // Customize URL stories
14074
+ const noopFn = () => { };
14075
+ const defaultCustomizeProps = {
14076
+ copyTextViewProps: {
14077
+ copyString: "https://ssqt.co/abc123",
14078
+ open: false,
14079
+ tooltiptext: "Copied!",
14080
+ },
14081
+ customizeUrl: true,
14082
+ customizeLinkLabel: "Customize Link",
14083
+ saveLabelText: "Save",
14084
+ cancelLabelText: "Cancel",
14085
+ successMessage: "Link updated successfully",
14086
+ isEditing: false,
14087
+ editValue: "",
14088
+ domainPrefix: "https://ssqt.co/",
14089
+ editsRemaining: 3,
14090
+ maxEdits: 5,
14091
+ limitReached: false,
14092
+ validationError: null,
14093
+ isValidating: false,
14094
+ isSaving: false,
14095
+ showSuccess: false,
14096
+ characterLimit: 15,
14097
+ charactersRemaining: 15,
14098
+ editLimitText: "You can edit your link up to 5 times.",
14099
+ editLimitReachedText: "5 edit limit reached. To make more changes, please contact {supportLink}.",
14100
+ supportLinkText: "Support",
14101
+ customizeDisabled: false,
14102
+ customizeDisabledTooltip: "Link customization is not available.",
14103
+ onCustomizeClick: noopFn,
14104
+ onEditValueChange: noopFn,
14105
+ onSave: noopFn,
14106
+ onCancel: noopFn,
14107
+ };
14108
+ const CustomizeUrlDefault = () => {
14109
+ return index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, defaultCustomizeProps));
14110
+ };
14111
+ const CustomizeUrlEditing = () => {
14112
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14113
+ ...defaultCustomizeProps,
14114
+ isEditing: true,
14115
+ editValue: "nvoiwb18",
14116
+ charactersRemaining: 7,
14117
+ })));
14118
+ };
14119
+ const CustomizeUrlCustomized = () => {
14120
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14121
+ ...defaultCustomizeProps,
14122
+ copyTextViewProps: {
14123
+ ...defaultCustomizeProps.copyTextViewProps,
14124
+ copyString: "https://ssqt.co/bobtesterson",
14125
+ },
14126
+ })));
14127
+ };
14128
+ const CustomizeUrlLimitReached = () => {
14129
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14130
+ ...defaultCustomizeProps,
14131
+ copyTextViewProps: {
14132
+ ...defaultCustomizeProps.copyTextViewProps,
14133
+ copyString: "https://ssqt.co/bobtesterson",
14134
+ },
14135
+ editsRemaining: 0,
14136
+ limitReached: true,
14137
+ })));
14138
+ };
14139
+ const CustomizeUrlDisabled = () => {
14140
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14141
+ ...defaultCustomizeProps,
14142
+ customizeDisabled: true,
14143
+ })));
14144
+ };
14145
+ const CustomizeUrlValidationError = () => {
14146
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14147
+ ...defaultCustomizeProps,
14148
+ isEditing: true,
14149
+ editValue: "nvoiwb18",
14150
+ charactersRemaining: 7,
14151
+ validationError: {
14152
+ code: "LINK_TAKEN",
14153
+ title: "This link is already taken",
14154
+ description: "Try adding numbers, a dash or underscore to create a unique link.",
14155
+ },
14156
+ })));
14157
+ };
14158
+ const CustomizeUrlInvalidSymbols = () => {
14159
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14160
+ ...defaultCustomizeProps,
14161
+ isEditing: true,
14162
+ editValue: "nvoiwb18",
14163
+ charactersRemaining: 7,
14164
+ validationError: {
14165
+ code: "INVALID_SYMBOLS",
14166
+ title: "Please use only letters, numbers, dashes and underscores",
14167
+ description: "Special symbols can break the link when sharing.",
14168
+ },
14169
+ })));
14170
+ };
14171
+ const CustomizeUrlRestrictedWord = () => {
14172
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14173
+ ...defaultCustomizeProps,
14174
+ isEditing: true,
14175
+ editValue: "nvoiwb18",
14176
+ charactersRemaining: 7,
14177
+ validationError: {
14178
+ code: "RESTRICTED_WORD",
14179
+ title: "Please try a different link",
14180
+ description: "This link contains a restricted word.",
14181
+ },
14182
+ })));
14183
+ };
14184
+ const CustomizeUrlSaving = () => {
14185
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14186
+ ...defaultCustomizeProps,
14187
+ isEditing: true,
14188
+ editValue: "bobtesterson",
14189
+ isSaving: true,
14190
+ })));
14191
+ };
14192
+ const CustomizeUrlSuccess = () => {
14193
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
14194
+ ...defaultCustomizeProps,
14195
+ copyTextViewProps: {
14196
+ ...defaultCustomizeProps.copyTextViewProps,
14197
+ copyString: "https://ssqt.co/bobtesterson",
14198
+ },
14199
+ showSuccess: true,
14200
+ })));
14201
+ };
14073
14202
 
14074
14203
  const ShareLink = /*#__PURE__*/Object.freeze({
14075
14204
  __proto__: null,
@@ -14084,7 +14213,17 @@ const ShareLink = /*#__PURE__*/Object.freeze({
14084
14213
  CopyButtonBelow: CopyButtonBelow$3,
14085
14214
  CustomStyles: CustomStyles$1,
14086
14215
  CustomStylesWithDemoHooks: CustomStylesWithDemoHooks,
14087
- FullStack: FullStack
14216
+ FullStack: FullStack,
14217
+ CustomizeUrlDefault: CustomizeUrlDefault,
14218
+ CustomizeUrlEditing: CustomizeUrlEditing,
14219
+ CustomizeUrlCustomized: CustomizeUrlCustomized,
14220
+ CustomizeUrlLimitReached: CustomizeUrlLimitReached,
14221
+ CustomizeUrlDisabled: CustomizeUrlDisabled,
14222
+ CustomizeUrlValidationError: CustomizeUrlValidationError,
14223
+ CustomizeUrlInvalidSymbols: CustomizeUrlInvalidSymbols,
14224
+ CustomizeUrlRestrictedWord: CustomizeUrlRestrictedWord,
14225
+ CustomizeUrlSaving: CustomizeUrlSaving,
14226
+ CustomizeUrlSuccess: CustomizeUrlSuccess
14088
14227
  });
14089
14228
 
14090
14229
  const UseShareLink_stories = {
@@ -14122,11 +14261,11 @@ const BareBonesView$1 = createHookStory(() => {
14122
14261
  return (index.h("div", null,
14123
14262
  "Sharelink:",
14124
14263
  " ",
14125
- index.h("code", { style: { borderStyle: "solid", borderWidth: "1px", padding: "2px" } }, res.copyString)));
14264
+ index.h("code", { style: { borderStyle: "solid", borderWidth: "1px", padding: "2px" } }, res.copyTextViewProps.copyString)));
14126
14265
  });
14127
14266
  const RegularView$2 = createHookStory(() => {
14128
14267
  setupGraphQL$c();
14129
- return (index.h(copyTextView.CopyTextView, Object.assign({}, ShadowViewAddon.useShareLink({
14268
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, ShadowViewAddon.useShareLink({
14130
14269
  programId: "klip-referral-program",
14131
14270
  tooltiptext: "Copied to clipboard",
14132
14271
  tooltiplifespan: 1000,
@@ -14134,19 +14273,29 @@ const RegularView$2 = createHookStory(() => {
14134
14273
  });
14135
14274
  const FastTooltip = createHookStory(() => {
14136
14275
  setupGraphQL$c();
14137
- return (index.h(copyTextView.CopyTextView, Object.assign({}, ShadowViewAddon.useShareLink({
14276
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, ShadowViewAddon.useShareLink({
14138
14277
  programId: "klip-referral-program",
14139
- tooltiptext: "⠀⠀⠀⠀⠀⠀⠀⠀⠀HELLO THERE!!!\n⠀⠀⠀⡯⡯⡾⠝⠘⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢊⠘⡮⣣⠪⠢⡑⡌\n⠀⠀⠀⠟⠝⠈⠀⠀⠀⠡⠀⠠⢈⠠⢐⢠⢂⢔⣐⢄⡂⢔⠀⡁⢉⠸⢨⢑⠕⡌\n⠀⠀⡀⠁⠀⠀⠀⡀⢂⠡⠈⡔⣕⢮⣳⢯⣿⣻⣟⣯⣯⢷⣫⣆⡂⠀⠀⢐⠑⡌\n⢀⠠⠐⠈⠀⢀⢂⠢⡂⠕⡁⣝⢮⣳⢽⡽⣾⣻⣿⣯⡯⣟⣞⢾⢜⢆⠀⡀⠀⠪\n⣬⠂⠀⠀⢀⢂⢪⠨⢂⠥⣺⡪⣗⢗⣽⢽⡯⣿⣽⣷⢿⡽⡾⡽⣝⢎⠀⠀⠀⢡\n⣿⠀⠀⠀⢂⠢⢂⢥⢱⡹⣪⢞⡵⣻⡪⡯⡯⣟⡾⣿⣻⡽⣯⡻⣪⠧⠑⠀⠁⢐\n⣿⠀⠀⠀⠢⢑⠠⠑⠕⡝⡎⡗⡝⡎⣞⢽⡹⣕⢯⢻⠹⡹⢚⠝⡷⡽⡨⠀⠀⢔\n⣿⡯⠀⢈⠈⢄⠂⠂⠐⠀⠌⠠⢑⠱⡱⡱⡑⢔⠁⠀⡀⠐⠐⠐⡡⡹⣪⠀⠀⢘\n⣿⣽⠀⡀⡊⠀⠐⠨⠈⡁⠂⢈⠠⡱⡽⣷⡑⠁⠠⠑⠀⢉⢇⣤⢘⣪⢽⠀⢌⢎\n⣿⢾⠀⢌⠌⠀⡁⠢⠂⠐⡀⠀⢀⢳⢽⣽⡺⣨⢄⣑⢉⢃⢭⡲⣕⡭⣹⠠⢐⢗\n⣿⡗⠀⠢⠡⡱⡸⣔⢵⢱⢸⠈⠀⡪⣳⣳⢹⢜⡵⣱⢱⡱⣳⡹⣵⣻⢔⢅⢬⡷\n⣷⡇⡂⠡⡑⢕⢕⠕⡑⠡⢂⢊⢐⢕⡝⡮⡧⡳⣝⢴⡐⣁⠃⡫⡒⣕⢏⡮⣷⡟\n⣷⣻⣅⠑⢌⠢⠁⢐⠠⠑⡐⠐⠌⡪⠮⡫⠪⡪⡪⣺⢸⠰⠡⠠⠐⢱⠨⡪⡪⡰\n⣯⢷⣟⣇⡂⡂⡌⡀⠀⠁⡂⠅⠂⠀⡑⡄⢇⠇⢝⡨⡠⡁⢐⠠⢀⢪⡐⡜⡪⡊\n⣿⢽⡾⢹⡄⠕⡅⢇⠂⠑⣴⡬⣬⣬⣆⢮⣦⣷⣵⣷⡗⢃⢮⠱⡸⢰⢱⢸⢨⢌\n⣯⢯⣟⠸⣳⡅⠜⠔⡌⡐⠈⠻⠟⣿⢿⣿⣿⠿⡻⣃⠢⣱⡳⡱⡩⢢⠣⡃⠢⠁\n⡯⣟⣞⡇⡿⣽⡪⡘⡰⠨⢐⢀⠢⢢⢄⢤⣰⠼⡾⢕⢕⡵⣝⠎⢌⢪⠪⡘⡌⠀\n⡯⣳⠯⠚⢊⠡⡂⢂⠨⠊⠔⡑⠬⡸⣘⢬⢪⣪⡺⡼⣕⢯⢞⢕⢝⠎⢻⢼⣀⠀\n⠁⡂⠔⡁⡢⠣⢀⠢⠀⠅⠱⡐⡱⡘⡔⡕⡕⣲⡹⣎⡮⡏⡑⢜⢼⡱⢩⣗⣯⣟\n⢀⢂⢑⠀⡂⡃⠅⠊⢄⢑⠠⠑⢕⢕⢝⢮⢺⢕⢟⢮⢊⢢⢱⢄⠃⣇⣞⢞⣞⢾\n⢀⠢⡑⡀⢂⢊⠠⠁⡂⡐⠀⠅⡈⠪⠪⠪⠣⠫⠑⡁⢔⠕⣜⣜⢦⡰⡎⡯⡾⡽",
14278
+ tooltiptext: "Copied to clipboard",
14140
14279
  tooltiplifespan: 500,
14141
14280
  }))));
14142
14281
  });
14282
+ const CustomizeUrlEnabled = createHookStory(() => {
14283
+ setupGraphQL$c();
14284
+ return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, ShadowViewAddon.useShareLink({
14285
+ programId: "klip-referral-program",
14286
+ tooltiptext: "Copied to clipboard",
14287
+ tooltiplifespan: 1000,
14288
+ customizeUrl: true,
14289
+ }))));
14290
+ });
14143
14291
 
14144
14292
  const UseShareLink = /*#__PURE__*/Object.freeze({
14145
14293
  __proto__: null,
14146
14294
  'default': UseShareLink_stories,
14147
14295
  BareBonesView: BareBonesView$1,
14148
14296
  RegularView: RegularView$2,
14149
- FastTooltip: FastTooltip
14297
+ FastTooltip: FastTooltip,
14298
+ CustomizeUrlEnabled: CustomizeUrlEnabled
14150
14299
  });
14151
14300
 
14152
14301
  const scenario$C = "@author:Zach\n@owner:Zach\nFeature: Tabs\n\n The Tabs takes in the Tab component as children and maps through to display their header and content.\n\n Background: A user on the portal is viewing the widget\n Given a user viewing the Tabs component\n\n @motivating\n Scenario: Content inside the active tab is shown\n Given the header is set to <tabHeader>\n And the content inside is <tabContent>\n And the user has clicked <tabHeader>\n Then the <tabContent> is shown\n Examples:\n | tabHeader | tabContent |\n | Settings | This is the settings tab |\n | General | This is the general tab |\n | History | This is the history tab |\n\n @motivating\n @ui\n Scenario: The placement of the tabs is configurable\n Given The placement prop has been passed a valid <placement>\n Then tabs are placed on the <placementResult>\n Examples:\n | placement | placementResult |\n | | top of the content |\n | left | left hand side of the content |\n | right | right hand side of the content |\n | bottom | bottom of the content |\n\n\n @minutia\n @ui\n Scenario Outline: Tabs are setup to use the brand color\n Given the brand color is set to darkblue\n Then the text inside the active tab is darkblue\n And the underline of the active tab is darkblue\n\n @ui\n Scenario: Tabs are responsive\n Given the user is on a mobile device\n When there are more tabs than the horizontal space allows for\n Then clickable arrows appear on the left and right of the tabs\n And the tabs are scrollable\n\n @landmine\n Scenario: Program section cannot be used inside of tabs\n Given a tabs component\n And tab containing a program section with program-id \"test123\"\n And the program section wraps a component using program context\n When the tabs component is rendered\n Then the \"sq:program-id\" event listener for the program section is removed\n And the component does not use program-id \"test123\" to source its data\n And falls back to the global program id";
@@ -16,7 +16,6 @@ const props = {
16
16
  iframeSrc: "https://example.com",
17
17
  iframeHeight: "100%",
18
18
  iframeWidth: "100%",
19
- codeParam: "rsCode",
20
19
  },
21
20
  },
22
21
  };
@@ -25,5 +25,5 @@ export function ReferralIframeView(props) {
25
25
  const styleString = sheet.toString();
26
26
  return (h("div", { class: sheet.classes.Container },
27
27
  h("style", { type: "text/css" }, styleString),
28
- h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?${encodeURIComponent(content.codeParam)}=${data.shareCode}` })));
28
+ h("iframe", { class: sheet.classes.IFrame, src: `${content.iframeSrc}?rsCode=${data.shareCode}` })));
29
29
  }
@@ -22,11 +22,6 @@ export class SqmReferralIframe {
22
22
  * @uiName IFrame width
23
23
  */
24
24
  this.iframeWidth = "100%";
25
- /**
26
- * Override the default parameter name used in the iframe
27
- * @uiName Referral code parameter name
28
- */
29
- this.codeParam = "rsCode";
30
25
  withHooks(this);
31
26
  }
32
27
  disconnectedCallback() { }
@@ -113,33 +108,12 @@ export class SqmReferralIframe {
113
108
  "reflect": false,
114
109
  "defaultValue": "\"100%\""
115
110
  },
116
- "codeParam": {
117
- "type": "string",
118
- "mutable": false,
119
- "complexType": {
120
- "original": "string",
121
- "resolved": "string",
122
- "references": {}
123
- },
124
- "required": false,
125
- "optional": false,
126
- "docs": {
127
- "tags": [{
128
- "text": "Referral code parameter name",
129
- "name": "uiName"
130
- }],
131
- "text": "Override the default parameter name used in the iframe"
132
- },
133
- "attribute": "code-param",
134
- "reflect": false,
135
- "defaultValue": "\"rsCode\""
136
- },
137
111
  "demoData": {
138
112
  "type": "unknown",
139
113
  "mutable": false,
140
114
  "complexType": {
141
115
  "original": "DemoData<ReferralIframeViewProps>",
142
- "resolved": "{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; codeParam: string; }; }; data?: { shareCode: string; }; }",
116
+ "resolved": "{ states?: { content: { iframeSrc: string; iframeHeight: string; iframeWidth: string; }; }; data?: { shareCode: string; }; }",
143
117
  "references": {
144
118
  "DemoData": {
145
119
  "location": "import",
@@ -415,7 +415,6 @@ function useDemoShareCode(props) {
415
415
  borderRadius: props.borderRadius,
416
416
  borderColor: props.borderColor,
417
417
  buttonType: props.buttonType,
418
- rewardStatus: "AVAILABLE",
419
418
  open,
420
419
  onClick: () => {
421
420
  // Should well supported: https://developer.mozilla.org/en-US/docs/Web/API/Clipboard#browser_compatibility