@saasquatch/mint-components 2.1.9-10 → 2.1.9-12

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 (43) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/mint-components.cjs.js +1 -1
  3. package/dist/cjs/sqm-big-stat_46.cjs.entry.js +19 -18
  4. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +9 -2
  5. package/dist/cjs/{sqm-partner-info-modal-view-cd758f12.js → sqm-partner-info-modal-view-7bcb2262.js} +23 -16
  6. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  7. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +22 -16
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal.js +30 -2
  9. package/dist/collection/components/sqm-widget-verification/sqm-widget-verification.js +43 -22
  10. package/dist/esm/loader.js +1 -1
  11. package/dist/esm/mint-components.js +1 -1
  12. package/dist/esm/sqm-big-stat_46.entry.js +19 -18
  13. package/dist/esm/sqm-email-verification_2.entry.js +9 -2
  14. package/dist/esm/{sqm-partner-info-modal-view-dbedda28.js → sqm-partner-info-modal-view-dd777f00.js} +23 -17
  15. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  16. package/dist/esm-es5/loader.js +1 -1
  17. package/dist/esm-es5/mint-components.js +1 -1
  18. package/dist/esm-es5/sqm-big-stat_46.entry.js +1 -1
  19. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  20. package/dist/esm-es5/sqm-partner-info-modal-view-dd777f00.js +1 -0
  21. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  22. package/dist/mint-components/mint-components.esm.js +1 -1
  23. package/dist/mint-components/p-0581c425.system.entry.js +1 -0
  24. package/dist/mint-components/{p-7de884a0.system.entry.js → p-0a769ba3.system.entry.js} +1 -1
  25. package/dist/mint-components/p-1c413a06.system.js +1 -1
  26. package/dist/mint-components/{p-59f69bdc.system.entry.js → p-50cdc2d0.system.entry.js} +1 -1
  27. package/dist/mint-components/{p-d2927531.entry.js → p-52e702ad.entry.js} +1 -1
  28. package/dist/mint-components/p-71d00dcf.js +1 -0
  29. package/dist/mint-components/{p-adcc37f3.entry.js → p-aabc6b28.entry.js} +8 -8
  30. package/dist/mint-components/{p-d1a2d813.entry.js → p-e7c3d207.entry.js} +1 -1
  31. package/dist/mint-components/p-f10e42e8.system.js +1 -0
  32. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal-view.d.ts +1 -0
  33. package/dist/types/components/sqm-partner-info-modal/sqm-partner-info-modal.d.ts +5 -0
  34. package/dist/types/components/sqm-widget-verification/sqm-widget-verification.d.ts +5 -0
  35. package/dist/types/components.d.ts +20 -0
  36. package/docs/docs.docx +0 -0
  37. package/docs/raisins.json +1 -1
  38. package/grapesjs/grapesjs.js +1 -1
  39. package/package.json +1 -1
  40. package/dist/esm-es5/sqm-partner-info-modal-view-dbedda28.js +0 -1
  41. package/dist/mint-components/p-6638c7c6.system.js +0 -1
  42. package/dist/mint-components/p-7144ac40.js +0 -1
  43. package/dist/mint-components/p-7a5814ef.system.entry.js +0 -1
@@ -61,14 +61,11 @@ const style = {
61
61
  },
62
62
  },
63
63
  };
64
- function PartnerInfoModalView(props) {
64
+ function PartnerInfoModalContentView(props) {
65
65
  var _a, _b;
66
66
  const { states, callbacks, text } = props;
67
67
  const sheet = JSS.createStyleSheet(style);
68
68
  const styleString = sheet.toString();
69
- console.log(states, "partner info modal states"); // TEMP
70
- if (!states.open)
71
- return index.h("div", null);
72
69
  const description = states.isExistingPartner ? (index.h("div", { class: sheet.classes.DescriptionContainer },
73
70
  index.h("p", null, text.descriptionExistingPartner),
74
71
  index.h("p", null, text.supportDescriptionExistingPartner))) : (index.h("p", null,
@@ -77,17 +74,7 @@ function PartnerInfoModalView(props) {
77
74
  const buttonLabel = states.isExistingPartner
78
75
  ? text.confirmButtonLabel
79
76
  : text.submitButtonLabel;
80
- return (index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: false, label: states.isExistingPartner
81
- ? text.modalHeaderExistingPartner
82
- : text.modalHeader, "onSl-request-close": (e) => {
83
- e.preventDefault();
84
- }, "onSl-hide": (e) => {
85
- var _a;
86
- // Prevent closing when clicking outside the dialog but not dropdowns
87
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
88
- e.preventDefault();
89
- }
90
- } },
77
+ return [
91
78
  index.h("style", { type: "text/css" }, styleString),
92
79
  description,
93
80
  index.h("div", { class: sheet.classes.FormFields },
@@ -101,7 +88,27 @@ function PartnerInfoModalView(props) {
101
88
  index.h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }), (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 :
102
89
  _b.map((c) => (index.h("sl-menu-item", { value: c.currencyCode }, c.currencyCode))))),
103
90
  states.error && index.h("p", { class: sheet.classes.ErrorMessage }, states.error),
104
- index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, style: { width: "100%" }, exportparts: "base: primarybutton-base" }, buttonLabel)));
91
+ index.h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, style: { width: "100%" }, exportparts: "base: primarybutton-base" }, buttonLabel),
92
+ ];
93
+ }
94
+ function PartnerInfoModalView(props) {
95
+ const { states, text } = props;
96
+ const sheet = JSS.createStyleSheet(style);
97
+ console.log(states, "partner info modal states"); // TEMP
98
+ if (!states.open)
99
+ return index.h("div", null);
100
+ return (index.h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: false, label: states.isExistingPartner
101
+ ? text.modalHeaderExistingPartner
102
+ : text.modalHeader, "onSl-request-close": (e) => {
103
+ e.preventDefault();
104
+ }, "onSl-hide": (e) => {
105
+ var _a;
106
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
107
+ e.preventDefault();
108
+ }
109
+ } },
110
+ index.h(PartnerInfoModalContentView, Object.assign({}, props))));
105
111
  }
106
112
 
113
+ exports.PartnerInfoModalContentView = PartnerInfoModalContentView;
107
114
  exports.PartnerInfoModalView = PartnerInfoModalView;
@@ -38,7 +38,7 @@ const sqmPortalContainerView = require('./sqm-portal-container-view-70a47420.js'
38
38
  const sqmUserInfoFormView = require('./sqm-user-info-form-view-923ff8d9.js');
39
39
  const data = require('./data-e83f8a41.js');
40
40
  const sqmLeadInputFieldView = require('./sqm-lead-input-field-view-818d9e9a.js');
41
- const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-cd758f12.js');
41
+ const sqmPartnerInfoModalView = require('./sqm-partner-info-modal-view-7bcb2262.js');
42
42
 
43
43
  /**
44
44
  * lodash (Custom Build) <https://lodash.com/>
@@ -58,14 +58,11 @@ const style = {
58
58
  },
59
59
  },
60
60
  };
61
- export function PartnerInfoModalView(props) {
61
+ export function PartnerInfoModalContentView(props) {
62
62
  var _a, _b;
63
63
  const { states, callbacks, text } = props;
64
64
  const sheet = createStyleSheet(style);
65
65
  const styleString = sheet.toString();
66
- console.log(states, "partner info modal states"); // TEMP
67
- if (!states.open)
68
- return h("div", null);
69
66
  const description = states.isExistingPartner ? (h("div", { class: sheet.classes.DescriptionContainer },
70
67
  h("p", null, text.descriptionExistingPartner),
71
68
  h("p", null, text.supportDescriptionExistingPartner))) : (h("p", null,
@@ -74,17 +71,7 @@ export function PartnerInfoModalView(props) {
74
71
  const buttonLabel = states.isExistingPartner
75
72
  ? text.confirmButtonLabel
76
73
  : text.submitButtonLabel;
77
- return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: false, label: states.isExistingPartner
78
- ? text.modalHeaderExistingPartner
79
- : text.modalHeader, "onSl-request-close": (e) => {
80
- e.preventDefault();
81
- }, "onSl-hide": (e) => {
82
- var _a;
83
- // Prevent closing when clicking outside the dialog but not dropdowns
84
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
85
- e.preventDefault();
86
- }
87
- } },
74
+ return [
88
75
  h("style", { type: "text/css" }, styleString),
89
76
  description,
90
77
  h("div", { class: sheet.classes.FormFields },
@@ -98,5 +85,24 @@ export function PartnerInfoModalView(props) {
98
85
  h("sl-input", { class: sheet.classes.SearchInput, placeholder: text.searchCurrencyPlaceholder, onKeyDown: (e) => e.stopPropagation(), "onSl-input": (e) => { var _a; return callbacks.setCurrencySearch((_a = e.target) === null || _a === void 0 ? void 0 : _a.value); } }), (_b = states.filteredCurrencies) === null || _b === void 0 ? void 0 :
99
86
  _b.map((c) => (h("sl-menu-item", { value: c.currencyCode }, c.currencyCode))))),
100
87
  states.error && h("p", { class: sheet.classes.ErrorMessage }, states.error),
101
- h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, style: { width: "100%" }, exportparts: "base: primarybutton-base" }, buttonLabel)));
88
+ h("sl-button", { slot: "footer", type: "primary", loading: states.submitting, disabled: states.submitting || !states.countryCode || !states.currency, onClick: callbacks.onSubmit, style: { width: "100%" }, exportparts: "base: primarybutton-base" }, buttonLabel),
89
+ ];
90
+ }
91
+ export function PartnerInfoModalView(props) {
92
+ const { states, text } = props;
93
+ const sheet = createStyleSheet(style);
94
+ console.log(states, "partner info modal states"); // TEMP
95
+ if (!states.open)
96
+ return h("div", null);
97
+ return (h("sl-dialog", { class: sheet.classes.Dialog, open: states.open, noHeader: false, label: states.isExistingPartner
98
+ ? text.modalHeaderExistingPartner
99
+ : text.modalHeader, "onSl-request-close": (e) => {
100
+ e.preventDefault();
101
+ }, "onSl-hide": (e) => {
102
+ var _a;
103
+ if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
104
+ e.preventDefault();
105
+ }
106
+ } },
107
+ h(PartnerInfoModalContentView, Object.assign({}, props))));
102
108
  }
@@ -4,7 +4,7 @@ import { Component, Prop, h } from "@stencil/core";
4
4
  import deepmerge from "deepmerge";
5
5
  import { parseStates } from "../../utils/parseStates";
6
6
  import { getProps } from "../../utils/utils";
7
- import { PartnerInfoModalView, } from "./sqm-partner-info-modal-view";
7
+ import { PartnerInfoModalContentView, PartnerInfoModalView, } from "./sqm-partner-info-modal-view";
8
8
  import { usePartnerInfoModal, } from "./usePartnerInfoModal";
9
9
  /**
10
10
  * @uiName Partner Info Modal
@@ -89,6 +89,11 @@ export class PartnerInfoModal {
89
89
  * @uiWidget textArea
90
90
  */
91
91
  this.missingFieldsErrorText = "Please select both a country and currency.";
92
+ /**
93
+ * Used to render in another modal.
94
+ * @undocumented
95
+ */
96
+ this.inModal = false;
92
97
  /**
93
98
  * @undocumented
94
99
  * @componentState { "title": "New partner", "props": { "states": { "open": true, "isExistingPartner": false } } }
@@ -103,10 +108,12 @@ export class PartnerInfoModal {
103
108
  return getProps(this);
104
109
  }
105
110
  render() {
106
- // AL: TODO add usePartnerInfoModal
107
111
  const props = isDemo()
108
112
  ? useDemoPartnerInfoModal(this)
109
113
  : usePartnerInfoModal(this);
114
+ if (this.inModal) {
115
+ return h(PartnerInfoModalContentView, Object.assign({}, props));
116
+ }
110
117
  return h(PartnerInfoModalView, Object.assign({}, props));
111
118
  }
112
119
  static get is() { return "sqm-partner-info-modal"; }
@@ -427,6 +434,27 @@ export class PartnerInfoModal {
427
434
  "reflect": false,
428
435
  "defaultValue": "\"Please select both a country and currency.\""
429
436
  },
437
+ "inModal": {
438
+ "type": "boolean",
439
+ "mutable": false,
440
+ "complexType": {
441
+ "original": "boolean",
442
+ "resolved": "boolean",
443
+ "references": {}
444
+ },
445
+ "required": false,
446
+ "optional": false,
447
+ "docs": {
448
+ "tags": [{
449
+ "text": undefined,
450
+ "name": "undocumented"
451
+ }],
452
+ "text": "Used to render in another modal."
453
+ },
454
+ "attribute": "in-modal",
455
+ "reflect": false,
456
+ "defaultValue": "false"
457
+ },
430
458
  "stateController": {
431
459
  "type": "string",
432
460
  "mutable": false,
@@ -19,6 +19,11 @@ export class WidgetVerification {
19
19
  /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
20
  GENERAL PROPS
21
21
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
22
+ /**
23
+ * @uiName General widget header text with partner creation
24
+ * @uiGroup General Text
25
+ */
26
+ this.general_widgetHeaderWithPartnerCreation = "Let's get you ready for rewards";
22
27
  /**
23
28
  * @uiName General verify widget header text
24
29
  * @uiGroup General Text
@@ -235,40 +240,56 @@ export class WidgetVerification {
235
240
  };
236
241
  const sheet = createStyleSheet(style);
237
242
  const styleString = sheet.toString();
238
- const generalText = this.getStepTextProps("general_");
239
- // AL: should probably include this in the jsx and wrap the entire flow in dialog
240
- if (props.showPartnerModal) {
241
- return (h("sqm-partner-info-modal", Object.assign({}, this.getStepTextProps("createPartnerStep_"))));
242
- }
243
+ // const generalText = this.getStepTextProps("general_");
244
+ const partnerText = this.getStepTextProps("createPartnerStep_");
245
+ const dialogLabel = this.general_widgetHeaderWithPartnerCreation;
246
+ const renderStepContent = () => {
247
+ if (props.showPartnerModal) {
248
+ return (h("sqm-partner-info-modal", Object.assign({ inModal: true }, partnerText)));
249
+ }
250
+ if (props.showCode) {
251
+ return (h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))));
252
+ }
253
+ return (h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_"))));
254
+ };
243
255
  return (h("div", null,
244
256
  h("style", { type: "text/css" }, styleString),
245
- h("h3", { style: { fontSize: "24px", margin: "0" } }, generalText.verifyEmailHeader),
246
- h("p", { style: {
247
- color: "var(--sl-color-neutral-500)",
248
- fontSize: "var(--sl-font-size-medium)",
249
- margin: "0",
250
- } }, generalText.verifyEmailDescription),
251
- props.showCode ? (h("sl-dialog", { class: sheet.classes.Dialog, noHeader: false, open: props.showCode, label: "Let's get your started for rewards", "onSl-request-close": (e) => {
252
- e.preventDefault();
253
- }, "onSl-hide": (e) => {
254
- var _a;
255
- if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
256
- e.preventDefault();
257
- }
258
- } },
259
- h("sqm-code-verification", Object.assign({ onVerification: props.onVerification }, this.getStepTextProps("codeStep_"), extractProps(props, "sqm-code-verification_"))))) : props.showPartnerModal ? (h("sqm-partner-info-modal", Object.assign({}, this.getStepTextProps("createPartnerStep_")))) : (h("sl-dialog", { class: sheet.classes.Dialog, noHeader: false, open: !props.showCode, label: "Let's get your started for rewards", "onSl-request-close": (e) => {
257
+ h("sl-dialog", { class: sheet.classes.Dialog, noHeader: false, open: true, label: dialogLabel, "onSl-request-close": (e) => {
260
258
  e.preventDefault();
261
259
  }, "onSl-hide": (e) => {
262
260
  var _a;
263
261
  if (((_a = e.target) === null || _a === void 0 ? void 0 : _a.tagName) === "SL-DIALOG") {
264
262
  e.preventDefault();
265
263
  }
266
- } },
267
- h("sqm-email-verification", Object.assign({}, this.getStepTextProps("emailStep_"), extractProps(props, "sqm-email-verification_")))))));
264
+ } }, renderStepContent())));
268
265
  }
269
266
  static get is() { return "sqm-widget-verification"; }
270
267
  static get encapsulation() { return "shadow"; }
271
268
  static get properties() { return {
269
+ "general_widgetHeaderWithPartnerCreation": {
270
+ "type": "string",
271
+ "mutable": false,
272
+ "complexType": {
273
+ "original": "string",
274
+ "resolved": "string",
275
+ "references": {}
276
+ },
277
+ "required": false,
278
+ "optional": false,
279
+ "docs": {
280
+ "tags": [{
281
+ "text": "General widget header text with partner creation",
282
+ "name": "uiName"
283
+ }, {
284
+ "text": "General Text",
285
+ "name": "uiGroup"
286
+ }],
287
+ "text": ""
288
+ },
289
+ "attribute": "general_widget-header-with-partner-creation",
290
+ "reflect": false,
291
+ "defaultValue": "\"Let's get you ready for rewards\""
292
+ },
272
293
  "general_verifyEmailHeader": {
273
294
  "type": "string",
274
295
  "mutable": false,