@saasquatch/mint-components 2.1.8-1 → 2.1.8-11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-5ce32291.js → ShadowViewAddon-0745de12.js} +384 -98
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +50 -377
- package/dist/cjs/{sqm-big-stat_46.cjs.entry.js → sqm-big-stat_45.cjs.entry.js} +172 -351
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -175
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +142 -11
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +173 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +536 -26
- package/dist/collection/components/sqm-share-link/useShareLink.js +210 -6
- package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +0 -2
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +37 -75
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +13 -688
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.js +1 -95
- package/dist/esm/{ShadowViewAddon-9d97b5d5.js → ShadowViewAddon-cd0033a6.js} +386 -100
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +50 -377
- package/dist/esm/{sqm-big-stat_46.entry.js → sqm-big-stat_45.entry.js} +177 -355
- package/dist/esm/sqm-stencilbook.entry.js +168 -175
- package/dist/esm-es5/ShadowViewAddon-cd0033a6.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_45.entry.js +1 -0
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-499885aa.entry.js → p-23e8dd9a.entry.js} +2 -2
- package/dist/mint-components/p-27e8efc8.system.js +1 -0
- package/dist/mint-components/p-2f314004.system.entry.js +1 -0
- package/dist/mint-components/{p-a6621899.system.entry.js → p-8c53dcc9.system.entry.js} +1 -1
- package/dist/mint-components/{p-22e39d2c.entry.js → p-a9bb29df.entry.js} +21 -90
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/p-cacb897d.system.entry.js +1 -0
- package/dist/mint-components/p-fcb7e0a3.js +503 -0
- package/dist/mint-components/p-ff378015.entry.js +106 -0
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +10 -0
- package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +37 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +107 -2
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +27 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form-view.d.ts +0 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -165
- package/dist/types/components.d.ts +183 -380
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/collection/components/sqm-partner-info-modal/PartnerInfoModal.stories.js +0 -143
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +0 -90
- package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +0 -462
- package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +0 -180
- package/dist/esm-es5/ShadowViewAddon-9d97b5d5.js +0 -1
- package/dist/esm-es5/sqm-big-stat_46.entry.js +0 -1
- package/dist/mint-components/p-0f036907.system.js +0 -1
- package/dist/mint-components/p-adc4e263.js +0 -463
- package/dist/mint-components/p-b0253f4c.entry.js +0 -108
- package/dist/mint-components/p-d93e19e9.system.entry.js +0 -1
- package/dist/mint-components/p-e45a9966.system.entry.js +0 -1
- package/dist/types/components/sqm-partner-info-modal/PartnerInfoModal.stories.d.ts +0 -13
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +0 -41
- package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +0 -80
- package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -16
|
@@ -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-
|
|
36
|
+
const ShadowViewAddon = require('./ShadowViewAddon-0745de12.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');
|
|
@@ -14054,21 +14054,151 @@ const CustomStyles$1 = () => {
|
|
|
14054
14054
|
return index.h(copyTextView.CopyTextView, Object.assign({}, props));
|
|
14055
14055
|
};
|
|
14056
14056
|
const CustomStylesWithDemoHooks = () => {
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
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" }));
|
|
14068
14069
|
};
|
|
14069
14070
|
const FullStack = () => {
|
|
14070
14071
|
return index.h("sqm-share-link", null);
|
|
14071
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: "EXISTING_CODE_CONFLICT",
|
|
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 CustomizeUrlInvalidCharacters = () => {
|
|
14159
|
+
return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
|
|
14160
|
+
...defaultCustomizeProps,
|
|
14161
|
+
isEditing: true,
|
|
14162
|
+
editValue: "nvoiwb18",
|
|
14163
|
+
charactersRemaining: 7,
|
|
14164
|
+
validationError: {
|
|
14165
|
+
code: "INVALID_CHARACTERS",
|
|
14166
|
+
title: "Please use only letters, numbers, dashes and underscores",
|
|
14167
|
+
description: "Special characters can break the link when sharing.",
|
|
14168
|
+
},
|
|
14169
|
+
})));
|
|
14170
|
+
};
|
|
14171
|
+
const CustomizeUrlProfanity = () => {
|
|
14172
|
+
return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, {
|
|
14173
|
+
...defaultCustomizeProps,
|
|
14174
|
+
isEditing: true,
|
|
14175
|
+
editValue: "nvoiwb18",
|
|
14176
|
+
charactersRemaining: 7,
|
|
14177
|
+
validationError: {
|
|
14178
|
+
code: "PROFANITY",
|
|
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
|
+
};
|
|
14072
14202
|
|
|
14073
14203
|
const ShareLink = /*#__PURE__*/Object.freeze({
|
|
14074
14204
|
__proto__: null,
|
|
@@ -14083,7 +14213,17 @@ const ShareLink = /*#__PURE__*/Object.freeze({
|
|
|
14083
14213
|
CopyButtonBelow: CopyButtonBelow$3,
|
|
14084
14214
|
CustomStyles: CustomStyles$1,
|
|
14085
14215
|
CustomStylesWithDemoHooks: CustomStylesWithDemoHooks,
|
|
14086
|
-
FullStack: FullStack
|
|
14216
|
+
FullStack: FullStack,
|
|
14217
|
+
CustomizeUrlDefault: CustomizeUrlDefault,
|
|
14218
|
+
CustomizeUrlEditing: CustomizeUrlEditing,
|
|
14219
|
+
CustomizeUrlCustomized: CustomizeUrlCustomized,
|
|
14220
|
+
CustomizeUrlLimitReached: CustomizeUrlLimitReached,
|
|
14221
|
+
CustomizeUrlDisabled: CustomizeUrlDisabled,
|
|
14222
|
+
CustomizeUrlValidationError: CustomizeUrlValidationError,
|
|
14223
|
+
CustomizeUrlInvalidCharacters: CustomizeUrlInvalidCharacters,
|
|
14224
|
+
CustomizeUrlProfanity: CustomizeUrlProfanity,
|
|
14225
|
+
CustomizeUrlSaving: CustomizeUrlSaving,
|
|
14226
|
+
CustomizeUrlSuccess: CustomizeUrlSuccess
|
|
14087
14227
|
});
|
|
14088
14228
|
|
|
14089
14229
|
const UseShareLink_stories = {
|
|
@@ -14121,11 +14261,11 @@ const BareBonesView$1 = createHookStory(() => {
|
|
|
14121
14261
|
return (index.h("div", null,
|
|
14122
14262
|
"Sharelink:",
|
|
14123
14263
|
" ",
|
|
14124
|
-
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)));
|
|
14125
14265
|
});
|
|
14126
14266
|
const RegularView$2 = createHookStory(() => {
|
|
14127
14267
|
setupGraphQL$c();
|
|
14128
|
-
return (index.h(
|
|
14268
|
+
return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, ShadowViewAddon.useShareLink({
|
|
14129
14269
|
programId: "klip-referral-program",
|
|
14130
14270
|
tooltiptext: "Copied to clipboard",
|
|
14131
14271
|
tooltiplifespan: 1000,
|
|
@@ -14133,19 +14273,29 @@ const RegularView$2 = createHookStory(() => {
|
|
|
14133
14273
|
});
|
|
14134
14274
|
const FastTooltip = createHookStory(() => {
|
|
14135
14275
|
setupGraphQL$c();
|
|
14136
|
-
return (index.h(
|
|
14276
|
+
return (index.h(ShadowViewAddon.ShareLinkView, Object.assign({}, ShadowViewAddon.useShareLink({
|
|
14137
14277
|
programId: "klip-referral-program",
|
|
14138
|
-
tooltiptext: "
|
|
14278
|
+
tooltiptext: "Copied to clipboard",
|
|
14139
14279
|
tooltiplifespan: 500,
|
|
14140
14280
|
}))));
|
|
14141
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
|
+
});
|
|
14142
14291
|
|
|
14143
14292
|
const UseShareLink = /*#__PURE__*/Object.freeze({
|
|
14144
14293
|
__proto__: null,
|
|
14145
14294
|
'default': UseShareLink_stories,
|
|
14146
14295
|
BareBonesView: BareBonesView$1,
|
|
14147
14296
|
RegularView: RegularView$2,
|
|
14148
|
-
FastTooltip: FastTooltip
|
|
14297
|
+
FastTooltip: FastTooltip,
|
|
14298
|
+
CustomizeUrlEnabled: CustomizeUrlEnabled
|
|
14149
14299
|
});
|
|
14150
14300
|
|
|
14151
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";
|
|
@@ -18700,162 +18850,6 @@ const UserInfoFormView = /*#__PURE__*/Object.freeze({
|
|
|
18700
18850
|
DisabledForm: DisabledForm
|
|
18701
18851
|
});
|
|
18702
18852
|
|
|
18703
|
-
const PartnerInfoModal_stories = {
|
|
18704
|
-
title: "Components/Partner Info Modal",
|
|
18705
|
-
};
|
|
18706
|
-
const demoCountries = [
|
|
18707
|
-
{ countryCode: "US", displayName: "United States" },
|
|
18708
|
-
{ countryCode: "CA", displayName: "Canada" },
|
|
18709
|
-
{ countryCode: "GB", displayName: "United Kingdom" },
|
|
18710
|
-
{ countryCode: "AU", displayName: "Australia" },
|
|
18711
|
-
{ countryCode: "DE", displayName: "Germany" },
|
|
18712
|
-
{ countryCode: "FR", displayName: "France" },
|
|
18713
|
-
{ countryCode: "JP", displayName: "Japan" },
|
|
18714
|
-
];
|
|
18715
|
-
const demoCurrencies = [
|
|
18716
|
-
{ currencyCode: "USD", displayName: "US Dollar" },
|
|
18717
|
-
{ currencyCode: "CAD", displayName: "Canadian Dollar" },
|
|
18718
|
-
{ currencyCode: "GBP", displayName: "British Pound" },
|
|
18719
|
-
{ currencyCode: "EUR", displayName: "Euro" },
|
|
18720
|
-
{ currencyCode: "AUD", displayName: "Australian Dollar" },
|
|
18721
|
-
];
|
|
18722
|
-
const noopCallbacks = {
|
|
18723
|
-
onCountryChange: (e) => console.log("Country changed:", e),
|
|
18724
|
-
onCurrencyChange: (e) => console.log("Currency changed:", e),
|
|
18725
|
-
onCountrySearch: (v) => console.log("Country search:", v),
|
|
18726
|
-
onCurrencySearch: (v) => console.log("Currency search:", v),
|
|
18727
|
-
onSubmit: () => console.log("Submit"),
|
|
18728
|
-
onClose: () => console.log("Close"),
|
|
18729
|
-
};
|
|
18730
|
-
const defaultText$1 = {
|
|
18731
|
-
modalBrandHeader: "Welcome to {brandName} Program!",
|
|
18732
|
-
descriptionNewPartner: "We just need a bit more information about you before you start earning cash!",
|
|
18733
|
-
descriptionExistingPartner: "We noticed you are already an Impact.com partner, please confirm your information.",
|
|
18734
|
-
countryLabel: "Country",
|
|
18735
|
-
currencyLabel: "Currency",
|
|
18736
|
-
submitButtonLabel: "Submit",
|
|
18737
|
-
confirmButtonLabel: "Confirm",
|
|
18738
|
-
searchCountryPlaceholder: "Search for a country",
|
|
18739
|
-
searchCurrencyPlaceholder: "Search for a currency",
|
|
18740
|
-
};
|
|
18741
|
-
const defaultProps$y = {
|
|
18742
|
-
states: {
|
|
18743
|
-
open: true,
|
|
18744
|
-
loading: false,
|
|
18745
|
-
submitting: false,
|
|
18746
|
-
isExistingPartner: false,
|
|
18747
|
-
countryCode: "",
|
|
18748
|
-
currency: "",
|
|
18749
|
-
error: "",
|
|
18750
|
-
success: false,
|
|
18751
|
-
brandName: "Test Brand",
|
|
18752
|
-
filteredCountries: demoCountries,
|
|
18753
|
-
filteredCurrencies: demoCurrencies,
|
|
18754
|
-
},
|
|
18755
|
-
callbacks: noopCallbacks,
|
|
18756
|
-
text: defaultText$1,
|
|
18757
|
-
};
|
|
18758
|
-
const NewPartnerEmpty = () => {
|
|
18759
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, defaultProps$y));
|
|
18760
|
-
};
|
|
18761
|
-
const NewPartnerPrefilled = () => {
|
|
18762
|
-
const props = {
|
|
18763
|
-
...defaultProps$y,
|
|
18764
|
-
states: {
|
|
18765
|
-
...defaultProps$y.states,
|
|
18766
|
-
countryCode: "US",
|
|
18767
|
-
currency: "",
|
|
18768
|
-
},
|
|
18769
|
-
};
|
|
18770
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18771
|
-
};
|
|
18772
|
-
const NewPartnerFullySelected = () => {
|
|
18773
|
-
const props = {
|
|
18774
|
-
...defaultProps$y,
|
|
18775
|
-
states: {
|
|
18776
|
-
...defaultProps$y.states,
|
|
18777
|
-
countryCode: "US",
|
|
18778
|
-
currency: "USD",
|
|
18779
|
-
},
|
|
18780
|
-
};
|
|
18781
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18782
|
-
};
|
|
18783
|
-
const ExistingPartnerConfirm = () => {
|
|
18784
|
-
const props = {
|
|
18785
|
-
...defaultProps$y,
|
|
18786
|
-
states: {
|
|
18787
|
-
...defaultProps$y.states,
|
|
18788
|
-
isExistingPartner: true,
|
|
18789
|
-
countryCode: "CA",
|
|
18790
|
-
currency: "CAD",
|
|
18791
|
-
},
|
|
18792
|
-
};
|
|
18793
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18794
|
-
};
|
|
18795
|
-
const Submitting = () => {
|
|
18796
|
-
const props = {
|
|
18797
|
-
...defaultProps$y,
|
|
18798
|
-
states: {
|
|
18799
|
-
...defaultProps$y.states,
|
|
18800
|
-
countryCode: "GB",
|
|
18801
|
-
currency: "GBP",
|
|
18802
|
-
submitting: true,
|
|
18803
|
-
},
|
|
18804
|
-
};
|
|
18805
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18806
|
-
};
|
|
18807
|
-
const WithError$3 = () => {
|
|
18808
|
-
const props = {
|
|
18809
|
-
...defaultProps$y,
|
|
18810
|
-
states: {
|
|
18811
|
-
...defaultProps$y.states,
|
|
18812
|
-
countryCode: "US",
|
|
18813
|
-
currency: "USD",
|
|
18814
|
-
error: "An error occurred while creating your partner account. Please try again.",
|
|
18815
|
-
},
|
|
18816
|
-
};
|
|
18817
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18818
|
-
};
|
|
18819
|
-
const ValidationError$1 = () => {
|
|
18820
|
-
const props = {
|
|
18821
|
-
...defaultProps$y,
|
|
18822
|
-
states: {
|
|
18823
|
-
...defaultProps$y.states,
|
|
18824
|
-
countryCode: "",
|
|
18825
|
-
currency: "",
|
|
18826
|
-
error: "Please select both a country and currency.",
|
|
18827
|
-
},
|
|
18828
|
-
};
|
|
18829
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18830
|
-
};
|
|
18831
|
-
const Closed = () => {
|
|
18832
|
-
const props = {
|
|
18833
|
-
...defaultProps$y,
|
|
18834
|
-
states: {
|
|
18835
|
-
...defaultProps$y.states,
|
|
18836
|
-
open: false,
|
|
18837
|
-
},
|
|
18838
|
-
};
|
|
18839
|
-
return index.h(ShadowViewAddon.PartnerInfoModalView, Object.assign({}, props));
|
|
18840
|
-
};
|
|
18841
|
-
const FullStackDemo = () => {
|
|
18842
|
-
return (index.h("sqm-partner-info-modal", { "brand-name": "Acme", "header-new-partner": "Welcome to {brandName} Program!", "description-new-partner": "We just need a bit more information about you before you start earning cash!", "submit-button-label": "Submit" }));
|
|
18843
|
-
};
|
|
18844
|
-
|
|
18845
|
-
const PartnerInfoModal = /*#__PURE__*/Object.freeze({
|
|
18846
|
-
__proto__: null,
|
|
18847
|
-
'default': PartnerInfoModal_stories,
|
|
18848
|
-
NewPartnerEmpty: NewPartnerEmpty,
|
|
18849
|
-
NewPartnerPrefilled: NewPartnerPrefilled,
|
|
18850
|
-
NewPartnerFullySelected: NewPartnerFullySelected,
|
|
18851
|
-
ExistingPartnerConfirm: ExistingPartnerConfirm,
|
|
18852
|
-
Submitting: Submitting,
|
|
18853
|
-
WithError: WithError$3,
|
|
18854
|
-
ValidationError: ValidationError$1,
|
|
18855
|
-
Closed: Closed,
|
|
18856
|
-
FullStackDemo: FullStackDemo
|
|
18857
|
-
});
|
|
18858
|
-
|
|
18859
18853
|
function deepFreeze(obj) {
|
|
18860
18854
|
if (obj instanceof Map) {
|
|
18861
18855
|
obj.clear = obj.delete = obj.set = function () {
|
|
@@ -21549,7 +21543,6 @@ const stories = [
|
|
|
21549
21543
|
TaxAndCashRewardsTable,
|
|
21550
21544
|
TaxAndCashReferralTableRewardsCell,
|
|
21551
21545
|
TaxAndCashReferralTable$1,
|
|
21552
|
-
PartnerInfoModal,
|
|
21553
21546
|
];
|
|
21554
21547
|
const StencilStorybook = class {
|
|
21555
21548
|
constructor(hostRef) {
|
|
@@ -54,7 +54,6 @@
|
|
|
54
54
|
"./components/sqm-navigation-menu/sqm-navigation-menu.js",
|
|
55
55
|
"./components/sqm-navigation-sidebar/sqm-navigation-sidebar.js",
|
|
56
56
|
"./components/sqm-navigation-sidebar-item/sqm-navigation-sidebar-item.js",
|
|
57
|
-
"./components/sqm-partner-info-modal/sqm-partner-info-modal.js",
|
|
58
57
|
"./components/sqm-payout-button-scroll/sqm-payout-button-scroll.js",
|
|
59
58
|
"./components/sqm-popup-container/sqm-popup-container.js",
|
|
60
59
|
"./components/sqm-portal-change-marketing/sqm-portal-change-marketing.js",
|
|
@@ -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
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { h } from "@stencil/core";
|
|
2
2
|
import { CopyTextView } from "../views/copy-text-view";
|
|
3
|
+
import { ShareLinkView } from "./sqm-share-link-view";
|
|
3
4
|
import scenario from "./ShareLink.feature";
|
|
4
5
|
export default {
|
|
5
6
|
title: "Components/Share Link",
|
|
@@ -77,18 +78,148 @@ export const CustomStyles = () => {
|
|
|
77
78
|
return h(CopyTextView, Object.assign({}, props));
|
|
78
79
|
};
|
|
79
80
|
export const CustomStylesWithDemoHooks = () => {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
81
|
+
return (h("sqm-share-link", { demoData: {
|
|
82
|
+
copyTextViewProps: {
|
|
83
|
+
copyString: "https://noah.example.com",
|
|
84
|
+
open: false,
|
|
85
|
+
tooltiptext: "Copied!",
|
|
86
|
+
backgroundColor: "#1ed760",
|
|
87
|
+
borderRadius: "30px",
|
|
88
|
+
textColor: "red",
|
|
89
|
+
buttonType: "primary",
|
|
90
|
+
borderColor: "#121212",
|
|
91
|
+
},
|
|
92
|
+
}, backgroundColor: "#1ed760" }));
|
|
91
93
|
};
|
|
92
94
|
export const FullStack = () => {
|
|
93
95
|
return h("sqm-share-link", null);
|
|
94
96
|
};
|
|
97
|
+
// Customize URL stories
|
|
98
|
+
const noopFn = () => { };
|
|
99
|
+
const defaultCustomizeProps = {
|
|
100
|
+
copyTextViewProps: {
|
|
101
|
+
copyString: "https://ssqt.co/abc123",
|
|
102
|
+
open: false,
|
|
103
|
+
tooltiptext: "Copied!",
|
|
104
|
+
},
|
|
105
|
+
customizeUrl: true,
|
|
106
|
+
customizeLinkLabel: "Customize Link",
|
|
107
|
+
saveLabelText: "Save",
|
|
108
|
+
cancelLabelText: "Cancel",
|
|
109
|
+
successMessage: "Link updated successfully",
|
|
110
|
+
isEditing: false,
|
|
111
|
+
editValue: "",
|
|
112
|
+
domainPrefix: "https://ssqt.co/",
|
|
113
|
+
editsRemaining: 3,
|
|
114
|
+
maxEdits: 5,
|
|
115
|
+
limitReached: false,
|
|
116
|
+
validationError: null,
|
|
117
|
+
isValidating: false,
|
|
118
|
+
isSaving: false,
|
|
119
|
+
showSuccess: false,
|
|
120
|
+
characterLimit: 15,
|
|
121
|
+
charactersRemaining: 15,
|
|
122
|
+
editLimitText: "You can edit your link up to 5 times.",
|
|
123
|
+
editLimitReachedText: "5 edit limit reached. To make more changes, please contact {supportLink}.",
|
|
124
|
+
supportLinkText: "Support",
|
|
125
|
+
customizeDisabled: false,
|
|
126
|
+
customizeDisabledTooltip: "Link customization is not available.",
|
|
127
|
+
onCustomizeClick: noopFn,
|
|
128
|
+
onEditValueChange: noopFn,
|
|
129
|
+
onSave: noopFn,
|
|
130
|
+
onCancel: noopFn,
|
|
131
|
+
};
|
|
132
|
+
export const CustomizeUrlDefault = () => {
|
|
133
|
+
return h(ShareLinkView, Object.assign({}, defaultCustomizeProps));
|
|
134
|
+
};
|
|
135
|
+
export const CustomizeUrlEditing = () => {
|
|
136
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
137
|
+
...defaultCustomizeProps,
|
|
138
|
+
isEditing: true,
|
|
139
|
+
editValue: "nvoiwb18",
|
|
140
|
+
charactersRemaining: 7,
|
|
141
|
+
})));
|
|
142
|
+
};
|
|
143
|
+
export const CustomizeUrlCustomized = () => {
|
|
144
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
145
|
+
...defaultCustomizeProps,
|
|
146
|
+
copyTextViewProps: {
|
|
147
|
+
...defaultCustomizeProps.copyTextViewProps,
|
|
148
|
+
copyString: "https://ssqt.co/bobtesterson",
|
|
149
|
+
},
|
|
150
|
+
})));
|
|
151
|
+
};
|
|
152
|
+
export const CustomizeUrlLimitReached = () => {
|
|
153
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
154
|
+
...defaultCustomizeProps,
|
|
155
|
+
copyTextViewProps: {
|
|
156
|
+
...defaultCustomizeProps.copyTextViewProps,
|
|
157
|
+
copyString: "https://ssqt.co/bobtesterson",
|
|
158
|
+
},
|
|
159
|
+
editsRemaining: 0,
|
|
160
|
+
limitReached: true,
|
|
161
|
+
})));
|
|
162
|
+
};
|
|
163
|
+
export const CustomizeUrlDisabled = () => {
|
|
164
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
165
|
+
...defaultCustomizeProps,
|
|
166
|
+
customizeDisabled: true,
|
|
167
|
+
})));
|
|
168
|
+
};
|
|
169
|
+
export const CustomizeUrlValidationError = () => {
|
|
170
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
171
|
+
...defaultCustomizeProps,
|
|
172
|
+
isEditing: true,
|
|
173
|
+
editValue: "nvoiwb18",
|
|
174
|
+
charactersRemaining: 7,
|
|
175
|
+
validationError: {
|
|
176
|
+
code: "EXISTING_CODE_CONFLICT",
|
|
177
|
+
title: "This link is already taken",
|
|
178
|
+
description: "Try adding numbers, a dash or underscore to create a unique link.",
|
|
179
|
+
},
|
|
180
|
+
})));
|
|
181
|
+
};
|
|
182
|
+
export const CustomizeUrlInvalidCharacters = () => {
|
|
183
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
184
|
+
...defaultCustomizeProps,
|
|
185
|
+
isEditing: true,
|
|
186
|
+
editValue: "nvoiwb18",
|
|
187
|
+
charactersRemaining: 7,
|
|
188
|
+
validationError: {
|
|
189
|
+
code: "INVALID_CHARACTERS",
|
|
190
|
+
title: "Please use only letters, numbers, dashes and underscores",
|
|
191
|
+
description: "Special characters can break the link when sharing.",
|
|
192
|
+
},
|
|
193
|
+
})));
|
|
194
|
+
};
|
|
195
|
+
export const CustomizeUrlProfanity = () => {
|
|
196
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
197
|
+
...defaultCustomizeProps,
|
|
198
|
+
isEditing: true,
|
|
199
|
+
editValue: "nvoiwb18",
|
|
200
|
+
charactersRemaining: 7,
|
|
201
|
+
validationError: {
|
|
202
|
+
code: "PROFANITY",
|
|
203
|
+
title: "Please try a different link",
|
|
204
|
+
description: "This link contains a restricted word.",
|
|
205
|
+
},
|
|
206
|
+
})));
|
|
207
|
+
};
|
|
208
|
+
export const CustomizeUrlSaving = () => {
|
|
209
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
210
|
+
...defaultCustomizeProps,
|
|
211
|
+
isEditing: true,
|
|
212
|
+
editValue: "bobtesterson",
|
|
213
|
+
isSaving: true,
|
|
214
|
+
})));
|
|
215
|
+
};
|
|
216
|
+
export const CustomizeUrlSuccess = () => {
|
|
217
|
+
return (h(ShareLinkView, Object.assign({}, {
|
|
218
|
+
...defaultCustomizeProps,
|
|
219
|
+
copyTextViewProps: {
|
|
220
|
+
...defaultCustomizeProps.copyTextViewProps,
|
|
221
|
+
copyString: "https://ssqt.co/bobtesterson",
|
|
222
|
+
},
|
|
223
|
+
showSuccess: true,
|
|
224
|
+
})));
|
|
225
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setUserIdentity } from "@saasquatch/component-boilerplate";
|
|
2
2
|
import { useEffect } from "@saasquatch/universal-hooks";
|
|
3
3
|
import { h } from "@stencil/core";
|
|
4
|
-
import {
|
|
4
|
+
import { ShareLinkView } from "./sqm-share-link-view";
|
|
5
5
|
import { useShareLink } from "./useShareLink";
|
|
6
6
|
import { createHookStory } from "../sqm-stencilbook/HookStoryAddon";
|
|
7
7
|
export default {
|
|
@@ -39,11 +39,11 @@ export const BareBonesView = createHookStory(() => {
|
|
|
39
39
|
return (h("div", null,
|
|
40
40
|
"Sharelink:",
|
|
41
41
|
" ",
|
|
42
|
-
h("code", { style: { borderStyle: "solid", borderWidth: "1px", padding: "2px" } }, res.copyString)));
|
|
42
|
+
h("code", { style: { borderStyle: "solid", borderWidth: "1px", padding: "2px" } }, res.copyTextViewProps.copyString)));
|
|
43
43
|
});
|
|
44
44
|
export const RegularView = createHookStory(() => {
|
|
45
45
|
setupGraphQL();
|
|
46
|
-
return (h(
|
|
46
|
+
return (h(ShareLinkView, Object.assign({}, useShareLink({
|
|
47
47
|
programId: "klip-referral-program",
|
|
48
48
|
tooltiptext: "Copied to clipboard",
|
|
49
49
|
tooltiplifespan: 1000,
|
|
@@ -51,9 +51,18 @@ export const RegularView = createHookStory(() => {
|
|
|
51
51
|
});
|
|
52
52
|
export const FastTooltip = createHookStory(() => {
|
|
53
53
|
setupGraphQL();
|
|
54
|
-
return (h(
|
|
54
|
+
return (h(ShareLinkView, Object.assign({}, useShareLink({
|
|
55
55
|
programId: "klip-referral-program",
|
|
56
|
-
tooltiptext: "
|
|
56
|
+
tooltiptext: "Copied to clipboard",
|
|
57
57
|
tooltiplifespan: 500,
|
|
58
58
|
}))));
|
|
59
59
|
});
|
|
60
|
+
export const CustomizeUrlEnabled = createHookStory(() => {
|
|
61
|
+
setupGraphQL();
|
|
62
|
+
return (h(ShareLinkView, Object.assign({}, useShareLink({
|
|
63
|
+
programId: "klip-referral-program",
|
|
64
|
+
tooltiptext: "Copied to clipboard",
|
|
65
|
+
tooltiplifespan: 1000,
|
|
66
|
+
customizeUrl: true,
|
|
67
|
+
}))));
|
|
68
|
+
});
|