@saasquatch/mint-components 1.12.0-3 → 1.12.0-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 (67) hide show
  1. package/dist/cjs/extractProps-fd93ba62.js +21 -0
  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_16.cjs.entry.js +2 -20
  5. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +0 -1
  6. package/dist/cjs/sqm-code-verification.cjs.entry.js +8 -4
  7. package/dist/cjs/sqm-email-verification.cjs.entry.js +7 -6
  8. package/dist/cjs/sqm-widget-verification-internal.cjs.entry.js +34 -11
  9. package/dist/cjs/sqm-widget-verification.cjs.entry.js +87 -1
  10. package/dist/collection/components/sqm-widget-verification/sqm-code-verification/sqm-code-verification.js +11 -6
  11. package/dist/collection/components/sqm-widget-verification/sqm-email-verification/sqm-email-verification.js +8 -6
  12. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification-internal.js +276 -13
  13. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +428 -2
  14. package/dist/collection/components/tax-and-cash/sqm-docusign-form/docusign-iframe/DocusignIframe.js +0 -1
  15. package/dist/collection/components/tax-and-cash/sqm-payout-status-alert/usePayoutStatus.js +0 -1
  16. package/dist/esm/extractProps-ae1afbb3.js +19 -0
  17. package/dist/esm/loader.js +1 -1
  18. package/dist/esm/mint-components.js +1 -1
  19. package/dist/esm/sqm-banking-info-form_16.entry.js +1 -19
  20. package/dist/esm/sqm-big-stat_39.entry.js +0 -1
  21. package/dist/esm/sqm-code-verification.entry.js +10 -6
  22. package/dist/esm/sqm-email-verification.entry.js +8 -7
  23. package/dist/esm/sqm-widget-verification-internal.entry.js +35 -12
  24. package/dist/esm/sqm-widget-verification.entry.js +87 -1
  25. package/dist/esm-es5/extractProps-ae1afbb3.js +1 -0
  26. package/dist/esm-es5/loader.js +1 -1
  27. package/dist/esm-es5/mint-components.js +1 -1
  28. package/dist/esm-es5/sqm-banking-info-form_16.entry.js +1 -1
  29. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  30. package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
  31. package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
  32. package/dist/esm-es5/sqm-widget-verification-internal.entry.js +1 -1
  33. package/dist/esm-es5/sqm-widget-verification.entry.js +1 -1
  34. package/dist/mint-components/mint-components.esm.js +1 -1
  35. package/dist/mint-components/p-158e9d3a.entry.js +1 -0
  36. package/dist/mint-components/p-20c5ce3d.system.entry.js +1 -0
  37. package/dist/mint-components/p-219be817.system.entry.js +1 -0
  38. package/dist/mint-components/p-26468242.js +1 -0
  39. package/dist/mint-components/p-2c03096f.system.entry.js +1 -0
  40. package/dist/mint-components/p-53d9df5e.entry.js +189 -0
  41. package/dist/mint-components/p-5810e318.entry.js +1 -0
  42. package/dist/mint-components/p-6029c42d.entry.js +8 -0
  43. package/dist/mint-components/p-80a32fe9.system.entry.js +1 -0
  44. package/dist/mint-components/p-a2baff3e.entry.js +1 -0
  45. package/dist/mint-components/p-a8645c1b.system.js +1 -0
  46. package/dist/mint-components/p-b52b7e60.system.entry.js +1 -0
  47. package/dist/mint-components/p-e05ff098.system.js +1 -1
  48. package/dist/mint-components/p-f4dff47a.system.entry.js +1 -0
  49. package/dist/mint-components/{p-8da20810.entry.js → p-ff77d11f.entry.js} +1 -1
  50. package/dist/types/components/sqm-widget-verification/sqm-widget-verification-internal.d.ts +15 -0
  51. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +77 -0
  52. package/dist/types/components.d.ts +178 -0
  53. package/docs/docs.docx +0 -0
  54. package/docs/raisins.json +1 -1
  55. package/grapesjs/grapesjs.js +1 -1
  56. package/package.json +1 -1
  57. package/dist/mint-components/p-18399da0.system.entry.js +0 -1
  58. package/dist/mint-components/p-25a70095.system.entry.js +0 -1
  59. package/dist/mint-components/p-6eede6e5.system.entry.js +0 -1
  60. package/dist/mint-components/p-7e5f0292.system.entry.js +0 -1
  61. package/dist/mint-components/p-832eba3a.entry.js +0 -1
  62. package/dist/mint-components/p-8d696fc9.entry.js +0 -189
  63. package/dist/mint-components/p-a9487844.system.entry.js +0 -1
  64. package/dist/mint-components/p-d70bfe30.entry.js +0 -8
  65. package/dist/mint-components/p-d90ef1da.system.entry.js +0 -1
  66. package/dist/mint-components/p-e810da97.entry.js +0 -1
  67. package/dist/mint-components/p-fe8e1071.entry.js +0 -1
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  const index = require('./index-b0129cd6.js');
6
6
  const stencilHooks_module = require('./stencil-hooks.module-a5a04d8a.js');
7
7
  const index_module = require('./index.module-236d0403.js');
8
+ const utils = require('./utils-6847bc06.js');
8
9
  const keys = require('./keys-cff24974.js');
9
10
 
10
11
  const debug = stencilHooks_module.browser("sq:widget-verification");
@@ -35,8 +36,93 @@ function useTemplateChildren({ parent, callback }) {
35
36
  };
36
37
  }
37
38
  const WidgetVerification = class {
39
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
40
+ CODE STEP PROPS
41
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
38
42
  constructor(hostRef) {
39
43
  index.registerInstance(this, hostRef);
44
+ // ! Any updated must be reflected in sqm-widget-verification-internal AND sqm-email-verification AND sqm-code-verification
45
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
+ EMAIL STEP PROPS
47
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
48
+ /**
49
+ * @uiName Verify email widget header text
50
+ * @uiGroup Email Verification Step
51
+ */
52
+ this.emailStep_verifyEmailHeaderText = "Start by verifying your email. We’ll send you a code through our referral provider, impact.com.";
53
+ /**
54
+ * @uiName Send code to email alert header
55
+ * @uiGroup Email Verification Step
56
+ */
57
+ this.emailStep_sendCodeErrorHeader = "There was an error sending your code.";
58
+ /**
59
+ * @uiName Send code to email alert description
60
+ * @uiGroup Email Verification Step
61
+ */
62
+ this.emailStep_sendCodeErrorDescription = "Please try again. If this problem continues, contact our program support team.";
63
+ /**
64
+ * @uiName Email input label
65
+ * @uiGroup Email Verification Step
66
+ */
67
+ this.emailStep_emailLabel = "Email";
68
+ /**
69
+ * @uiName Send code button text
70
+ * @uiGroup Email Verification Step
71
+ */
72
+ this.emailStep_sendCodeText = "Send code";
73
+ /**
74
+ * @uiName Send code button text
75
+ * @uiGroup Email Verification Step
76
+ */
77
+ this.emailStep_emailValidationErrorText = "Please enter a valid email";
78
+ /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
79
+ EMAIL STEP PROPS
80
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
81
+ /**
82
+ * @uiName Verify code widget header text
83
+ * @uiGroup Code Verification Step
84
+ */
85
+ this.codeStep_verifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
86
+ /**
87
+ * @uiName Reverify code widget header text
88
+ * @uiGroup Code Verification Step
89
+ */
90
+ this.codeStep_reverifyCodeHeaderText = "Enter the code sent to {email} from our referral provider, impact.com.";
91
+ /**
92
+ * Text displayed under verify button
93
+ * @uiName Resend code text
94
+ * @uiGroup Code Verification Step
95
+ */
96
+ this.codeStep_resendCodeText = "Didn't receive your code? {resendCodeLink}";
97
+ /**
98
+ * The link that appears in the resend code link
99
+ * @uiName Resend code label
100
+ * @uiGroup Code Verification Step
101
+ */
102
+ this.codeStep_resendCodeLabel = "Resend code";
103
+ /**
104
+ * Link text displayed under verify button
105
+ * @uiName Resend code text
106
+ * @uiGroup Code Verification Step
107
+ */
108
+ this.codeStep_codeResentSuccessfullyText = "Another code has been sent to {email}";
109
+ /**
110
+ * Error text displayed under verification input
111
+ * @uiName Invalid code text
112
+ * @uiGroup Code Verification Step
113
+ */
114
+ this.codeStep_invalidCodeText = "Please check your code and try again. If you’re still having trouble, try resending your code.";
115
+ /**
116
+ * @uiName Verify code button text
117
+ * @uiGroup Code Verification Step
118
+ */
119
+ this.codeStep_verifyText = "Verify";
120
+ /**
121
+ * Displayed when the email verification fails due to a network error. The participant can try refreshing the page.
122
+ * @uiName Network error message
123
+ * @uiGroup Code Verification Step
124
+ */
125
+ this.codeStep_networkErrorMessage = "An error occurred while verifying your email. Please refresh the page and try again.";
40
126
  stencilHooks_module.h(this);
41
127
  }
42
128
  disconnectedCallback() { }
@@ -120,7 +206,7 @@ const WidgetVerification = class {
120
206
  host.removeEventListener(keys.VERIFICATION_EVENT_KEY, callback);
121
207
  };
122
208
  }, []);
123
- return (index.h(index.Host, null, index.h("div", { ref: setSlot, style: { display: "contents" } }, index.h("template", { slot: "not-verified" }, index.h("sqm-widget-verification-internal", null)), index.h("slot", { name: "not-verified" }), index.h("slot", { name: "verified" })), index.h("div", { ref: setContainer }, index.h("slot", { name: "shown" }))));
209
+ return (index.h(index.Host, null, index.h("div", { ref: setSlot, style: { display: "contents" } }, index.h("template", { slot: "not-verified" }, index.h("sqm-widget-verification-internal", Object.assign({}, utils.getProps(this)))), index.h("slot", { name: "not-verified" }), index.h("slot", { name: "verified" })), index.h("div", { ref: setContainer }, index.h("slot", { name: "shown" }))));
124
210
  }
125
211
  };
126
212
 
@@ -1,10 +1,11 @@
1
- import { isDemo } from "@saasquatch/component-boilerplate";
2
- import { withHooks } from "@saasquatch/stencil-hooks";
1
+ import { isDemo, useSetParent } from "@saasquatch/component-boilerplate";
2
+ import { useState, withHooks } from "@saasquatch/stencil-hooks";
3
3
  import { Component, h, Prop } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
5
  import { getProps } from "../../../utils/utils";
6
6
  import { WidgetCodeVerificationView, } from "./sqm-code-verification-view";
7
7
  import { useWidgetCodeVerification } from "./useCodeVerification";
8
+ import { VERIFICATION_PARENT_NAMESPACE } from "../keys";
8
9
  export class WidgetCodeVerification {
9
10
  constructor() {
10
11
  /**
@@ -260,18 +261,22 @@ export class WidgetCodeVerification {
260
261
  }; }
261
262
  }
262
263
  function useDemoWidgetCodeVerification(props) {
264
+ const [emailResent, setEmailResent] = useState(false);
265
+ const setVerifiedContext = useSetParent(VERIFICATION_PARENT_NAMESPACE);
263
266
  return deepmerge({
264
267
  states: {
265
268
  loading: false,
266
- email: "",
267
- verifyFailed: false,
269
+ email: "test@example.com",
270
+ emailResent,
271
+ resendError: true,
272
+ verifyFailed: true,
268
273
  },
269
274
  refs: {
270
275
  codeWrapperRef: () => { },
271
276
  },
272
277
  callbacks: {
273
- resendEmail: async () => { },
274
- submitCode: async () => { },
278
+ resendEmail: async () => setEmailResent(true),
279
+ submitCode: async () => setVerifiedContext({ token: "TOKEN" }),
275
280
  },
276
281
  text: props.getTextProps(),
277
282
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -3,8 +3,9 @@ import { Component, h, Prop } from "@stencil/core";
3
3
  import { useWidgetEmailVerification } from "./useEmailVerification";
4
4
  import { WidgetEmailVerificationView, } from "./sqm-email-verification-view";
5
5
  import { getProps } from "../../../utils/utils";
6
- import { isDemo } from "@saasquatch/component-boilerplate";
6
+ import { isDemo, useSetParent } from "@saasquatch/component-boilerplate";
7
7
  import deepmerge from "deepmerge";
8
+ import { SHOW_CODE_NAMESPACE } from "../keys";
8
9
  /**
9
10
  * @uiName Widget Verification Gate
10
11
  */
@@ -208,16 +209,17 @@ export class WidgetEmailVerification {
208
209
  }; }
209
210
  }
210
211
  function useDemoWidgetEmailVerification(props) {
212
+ const setShowCode = useSetParent(SHOW_CODE_NAMESPACE);
211
213
  return deepmerge({
212
214
  states: {
213
- error: "",
215
+ error: true,
216
+ initialLoading: false,
214
217
  loading: false,
215
- email: "",
216
- isEmailPrefilled: false,
217
- sendCodeError: false,
218
+ email: "test@example.com",
219
+ sendCodeError: true,
218
220
  },
219
221
  callbacks: {
220
- submitEmail: async () => { },
222
+ submitEmail: async () => setShowCode(true),
221
223
  },
222
224
  text: props.getTextProps(),
223
225
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
@@ -1,27 +1,290 @@
1
- import { useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
1
+ import { isDemo, useParentState, useUserIdentity, } from "@saasquatch/component-boilerplate";
2
2
  import { withHooks } from "@saasquatch/stencil-hooks";
3
- import { Component, h } from "@stencil/core";
3
+ import { Component, h, Prop } from "@stencil/core";
4
4
  import { SHOW_CODE_NAMESPACE, VERIFICATION_EMAIL_NAMESPACE } from "./keys";
5
+ import { getProps } from "../../utils/utils";
6
+ import { extractProps } from "../tax-and-cash/sqm-tax-and-cash/extractProps";
7
+ function useWidgetVerificationInternal() {
8
+ const userIdentity = useUserIdentity();
9
+ const [showCode, setShowCode] = useParentState({
10
+ namespace: SHOW_CODE_NAMESPACE,
11
+ initialValue: false,
12
+ });
13
+ const [email, setEmail] = useParentState({
14
+ namespace: VERIFICATION_EMAIL_NAMESPACE,
15
+ initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
16
+ });
17
+ return { showCode };
18
+ }
5
19
  export class WidgetVerificationInternal {
6
20
  constructor() {
7
21
  withHooks(this);
8
22
  }
9
23
  disconnectedCallback() { }
24
+ getStepTextProps(prefix) {
25
+ const props = getProps(this);
26
+ return extractProps(props, prefix);
27
+ }
10
28
  render() {
11
- const userIdentity = useUserIdentity();
12
- const [showCode, setShowCode] = useParentState({
13
- namespace: SHOW_CODE_NAMESPACE,
14
- initialValue: false,
15
- });
16
- const [email, setEmail] = useParentState({
17
- namespace: VERIFICATION_EMAIL_NAMESPACE,
18
- initialValue: userIdentity === null || userIdentity === void 0 ? void 0 : userIdentity.email,
19
- });
29
+ const { showCode } = isDemo()
30
+ ? useDemoWidgetVerificationInternal()
31
+ : useWidgetVerificationInternal();
20
32
  if (showCode) {
21
- return h("sqm-code-verification", null);
33
+ return (h("sqm-code-verification", Object.assign({}, this.getStepTextProps("codeStep_"))));
22
34
  }
23
- return h("sqm-email-verification", null);
35
+ return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"))));
24
36
  }
25
37
  static get is() { return "sqm-widget-verification-internal"; }
26
38
  static get encapsulation() { return "shadow"; }
39
+ static get properties() { return {
40
+ "emailStep_verifyEmailHeaderText": {
41
+ "type": "string",
42
+ "mutable": false,
43
+ "complexType": {
44
+ "original": "string",
45
+ "resolved": "string",
46
+ "references": {}
47
+ },
48
+ "required": false,
49
+ "optional": false,
50
+ "docs": {
51
+ "tags": [],
52
+ "text": ""
53
+ },
54
+ "attribute": "email-step_verify-email-header-text",
55
+ "reflect": false
56
+ },
57
+ "emailStep_sendCodeErrorHeader": {
58
+ "type": "string",
59
+ "mutable": false,
60
+ "complexType": {
61
+ "original": "string",
62
+ "resolved": "string",
63
+ "references": {}
64
+ },
65
+ "required": false,
66
+ "optional": false,
67
+ "docs": {
68
+ "tags": [],
69
+ "text": ""
70
+ },
71
+ "attribute": "email-step_send-code-error-header",
72
+ "reflect": false
73
+ },
74
+ "emailStep_sendCodeErrorDescription": {
75
+ "type": "string",
76
+ "mutable": false,
77
+ "complexType": {
78
+ "original": "string",
79
+ "resolved": "string",
80
+ "references": {}
81
+ },
82
+ "required": false,
83
+ "optional": false,
84
+ "docs": {
85
+ "tags": [],
86
+ "text": ""
87
+ },
88
+ "attribute": "email-step_send-code-error-description",
89
+ "reflect": false
90
+ },
91
+ "emailStep_emailLabel": {
92
+ "type": "string",
93
+ "mutable": false,
94
+ "complexType": {
95
+ "original": "string",
96
+ "resolved": "string",
97
+ "references": {}
98
+ },
99
+ "required": false,
100
+ "optional": false,
101
+ "docs": {
102
+ "tags": [],
103
+ "text": ""
104
+ },
105
+ "attribute": "email-step_email-label",
106
+ "reflect": false
107
+ },
108
+ "emailStep_sendCodeText": {
109
+ "type": "string",
110
+ "mutable": false,
111
+ "complexType": {
112
+ "original": "string",
113
+ "resolved": "string",
114
+ "references": {}
115
+ },
116
+ "required": false,
117
+ "optional": false,
118
+ "docs": {
119
+ "tags": [],
120
+ "text": ""
121
+ },
122
+ "attribute": "email-step_send-code-text",
123
+ "reflect": false
124
+ },
125
+ "emailStep_emailValidationErrorText": {
126
+ "type": "string",
127
+ "mutable": false,
128
+ "complexType": {
129
+ "original": "string",
130
+ "resolved": "string",
131
+ "references": {}
132
+ },
133
+ "required": false,
134
+ "optional": false,
135
+ "docs": {
136
+ "tags": [],
137
+ "text": ""
138
+ },
139
+ "attribute": "email-step_email-validation-error-text",
140
+ "reflect": false
141
+ },
142
+ "codeStep_verifyCodeHeaderText": {
143
+ "type": "string",
144
+ "mutable": false,
145
+ "complexType": {
146
+ "original": "string",
147
+ "resolved": "string",
148
+ "references": {}
149
+ },
150
+ "required": false,
151
+ "optional": false,
152
+ "docs": {
153
+ "tags": [],
154
+ "text": ""
155
+ },
156
+ "attribute": "code-step_verify-code-header-text",
157
+ "reflect": false
158
+ },
159
+ "codeStep_reverifyCodeHeaderText": {
160
+ "type": "string",
161
+ "mutable": false,
162
+ "complexType": {
163
+ "original": "string",
164
+ "resolved": "string",
165
+ "references": {}
166
+ },
167
+ "required": false,
168
+ "optional": false,
169
+ "docs": {
170
+ "tags": [],
171
+ "text": ""
172
+ },
173
+ "attribute": "code-step_reverify-code-header-text",
174
+ "reflect": false
175
+ },
176
+ "codeStep_resendCodeText": {
177
+ "type": "string",
178
+ "mutable": false,
179
+ "complexType": {
180
+ "original": "string",
181
+ "resolved": "string",
182
+ "references": {}
183
+ },
184
+ "required": false,
185
+ "optional": false,
186
+ "docs": {
187
+ "tags": [],
188
+ "text": ""
189
+ },
190
+ "attribute": "code-step_resend-code-text",
191
+ "reflect": false
192
+ },
193
+ "codeStep_resendCodeLabel": {
194
+ "type": "string",
195
+ "mutable": false,
196
+ "complexType": {
197
+ "original": "string",
198
+ "resolved": "string",
199
+ "references": {}
200
+ },
201
+ "required": false,
202
+ "optional": false,
203
+ "docs": {
204
+ "tags": [],
205
+ "text": ""
206
+ },
207
+ "attribute": "code-step_resend-code-label",
208
+ "reflect": false
209
+ },
210
+ "codeStep_codeResentSuccessfullyText": {
211
+ "type": "string",
212
+ "mutable": false,
213
+ "complexType": {
214
+ "original": "string",
215
+ "resolved": "string",
216
+ "references": {}
217
+ },
218
+ "required": false,
219
+ "optional": false,
220
+ "docs": {
221
+ "tags": [],
222
+ "text": ""
223
+ },
224
+ "attribute": "code-step_code-resent-successfully-text",
225
+ "reflect": false
226
+ },
227
+ "codeStep_invalidCodeText": {
228
+ "type": "string",
229
+ "mutable": false,
230
+ "complexType": {
231
+ "original": "string",
232
+ "resolved": "string",
233
+ "references": {}
234
+ },
235
+ "required": false,
236
+ "optional": false,
237
+ "docs": {
238
+ "tags": [],
239
+ "text": ""
240
+ },
241
+ "attribute": "code-step_invalid-code-text",
242
+ "reflect": false
243
+ },
244
+ "codeStep_verifyText": {
245
+ "type": "string",
246
+ "mutable": false,
247
+ "complexType": {
248
+ "original": "string",
249
+ "resolved": "string",
250
+ "references": {}
251
+ },
252
+ "required": false,
253
+ "optional": false,
254
+ "docs": {
255
+ "tags": [],
256
+ "text": ""
257
+ },
258
+ "attribute": "code-step_verify-text",
259
+ "reflect": false
260
+ },
261
+ "codeStep_networkErrorMessage": {
262
+ "type": "string",
263
+ "mutable": false,
264
+ "complexType": {
265
+ "original": "string",
266
+ "resolved": "string",
267
+ "references": {}
268
+ },
269
+ "required": false,
270
+ "optional": false,
271
+ "docs": {
272
+ "tags": [],
273
+ "text": ""
274
+ },
275
+ "attribute": "code-step_network-error-message",
276
+ "reflect": false
277
+ }
278
+ }; }
279
+ }
280
+ function useDemoWidgetVerificationInternal() {
281
+ const [showCode, setShowCode] = useParentState({
282
+ namespace: SHOW_CODE_NAMESPACE,
283
+ initialValue: false,
284
+ });
285
+ const [email, setEmail] = useParentState({
286
+ namespace: VERIFICATION_EMAIL_NAMESPACE,
287
+ initialValue: undefined,
288
+ });
289
+ return { showCode };
27
290
  }