@saasquatch/mint-components 1.13.1-5 → 1.13.1-7

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 (25) hide show
  1. package/dist/cjs/{ShadowViewAddon-2d76fc88.js → ShadowViewAddon-829de149.js} +5 -23
  2. package/dist/cjs/sqm-big-stat_39.cjs.entry.js +1 -1
  3. package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
  4. package/dist/collection/components/sqm-share-button/sqm-share-button-view.js +2 -11
  5. package/dist/collection/components/sqm-share-button/sqm-share-button.js +1 -1
  6. package/dist/collection/components/sqm-share-button/useShareButton.js +3 -12
  7. package/dist/esm/{ShadowViewAddon-c0e9e31f.js → ShadowViewAddon-1ef084f6.js} +5 -23
  8. package/dist/esm/sqm-big-stat_39.entry.js +1 -1
  9. package/dist/esm/sqm-stencilbook.entry.js +1 -1
  10. package/dist/esm-es5/ShadowViewAddon-1ef084f6.js +1 -0
  11. package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
  12. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  13. package/dist/mint-components/mint-components.esm.js +1 -1
  14. package/dist/mint-components/p-37996351.system.js +1 -1
  15. package/dist/mint-components/{p-5d9f7f45.js → p-4209c356.js} +22 -22
  16. package/dist/mint-components/p-66d42355.system.js +1 -0
  17. package/dist/mint-components/{p-4484210d.entry.js → p-a6d303ff.entry.js} +1 -1
  18. package/dist/mint-components/{p-7fb0e1f3.system.entry.js → p-b2c065f0.system.entry.js} +1 -1
  19. package/dist/mint-components/{p-41080310.system.entry.js → p-beee7f43.system.entry.js} +1 -1
  20. package/dist/mint-components/{p-d63f9526.entry.js → p-f5b0bcaf.entry.js} +1 -1
  21. package/dist/types/components/sqm-share-button/sqm-share-button-view.d.ts +1 -0
  22. package/docs/docs.docx +0 -0
  23. package/package.json +1 -1
  24. package/dist/esm-es5/ShadowViewAddon-c0e9e31f.js +0 -1
  25. package/dist/mint-components/p-19847f89.system.js +0 -1
@@ -83,20 +83,11 @@ function ShareButtonView(props, children) {
83
83
  top: 2%;
84
84
  }
85
85
  `;
86
+ console.log("href", props.isPlainLink ? props.messageLink : undefined);
86
87
  return props.hide ? (index.h(index.Host, { style: { display: "none" } })) : (index.h("div", null,
87
88
  index.h("style", { type: "text/css" }, styleString),
88
89
  index.h("style", { type: "text/css" }, vanillaStyle),
89
- index.h("a", { href: props.messageLink, target: props.openInSameTab ? "_self" : "_blank" },
90
- "(auto) ",
91
- props.messageLink),
92
- index.h("a", { href: props.messageLink, target: "_self" },
93
- "(self) ",
94
- props.messageLink),
95
- index.h("a", { href: props.messageLink, target: "_blank" },
96
- "(blank) ",
97
- props.messageLink),
98
- index.h("br", null),
99
- index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, href: props.messageLink, exportparts: `base: ${props.type}sharebutton-base` },
90
+ index.h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}sharebutton-base` },
100
91
  !props.hideicon && (index.h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
101
92
  !props.hidetext && children)));
102
93
  }
@@ -471,7 +462,7 @@ function FacebookShare(directLink, messageLink, errorText) {
471
462
  }
472
463
  }
473
464
  function GenericShare(messageLink, errorText) {
474
- return messageLink ? window.open(messageLink) : alert(errorText);
465
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
475
466
  }
476
467
  function useShareButton(props) {
477
468
  var _a, _b, _c, _d;
@@ -507,9 +498,6 @@ function useShareButton(props) {
507
498
  else if (medium.toLocaleUpperCase() === "DIRECT") {
508
499
  NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
509
500
  }
510
- else {
511
- GenericShare(messageLink, props.errorText);
512
- }
513
501
  }
514
502
  const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
515
503
  environment.type === "SquatchAndroid") &&
@@ -517,20 +505,14 @@ function useShareButton(props) {
517
505
  messageLink;
518
506
  const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
519
507
  const openInSameTab = ios && !safari;
520
- console.log("userAgent", userAgent);
521
- console.log("safari", safari);
522
- console.log("ios", ios);
523
- console.log("openInSameTab", openInSameTab);
524
508
  console.log("isPlainLink", isPlainLink);
525
- console.log("messageLink", messageLink);
526
- console.log("environment.type", environment.type);
527
- console.log("medium", medium);
528
509
  return {
529
510
  ...props,
530
511
  loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
531
512
  messageLink,
513
+ isPlainLink,
532
514
  // If we have just a normal share link onClick should be undefined so we fallback to default link behavior
533
- onClick: isPlainLink ? undefined : onClick,
515
+ onClick: onClick,
534
516
  openInSameTab,
535
517
  hide,
536
518
  };
@@ -22,7 +22,7 @@ const sqmPortalLoginView = require('./sqm-portal-login-view-761a4d8e.js');
22
22
  const usePortalLogin = require('./usePortalLogin-63d896d1.js');
23
23
  const AsYouType = require('./AsYouType-6788393a.js');
24
24
  const utilities = require('./utilities-78f5e169.js');
25
- const ShadowViewAddon = require('./ShadowViewAddon-2d76fc88.js');
25
+ const ShadowViewAddon = require('./ShadowViewAddon-829de149.js');
26
26
  require('./sqm-portal-container-view-4f15143a.js');
27
27
  const usePayoutStatus = require('./usePayoutStatus-4b5894ef.js');
28
28
 
@@ -32,7 +32,7 @@ const sqmPortalProfileView = require('./sqm-portal-profile-view-33164798.js');
32
32
  require('./utilities-78f5e169.js');
33
33
  const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-fe602822.js');
34
34
  const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-7b678f34.js');
35
- const ShadowViewAddon = require('./ShadowViewAddon-2d76fc88.js');
35
+ const ShadowViewAddon = require('./ShadowViewAddon-829de149.js');
36
36
  const sqmPortalContainerView = require('./sqm-portal-container-view-4f15143a.js');
37
37
  const sqmInvoiceTableView = require('./sqm-invoice-table-view-baded4af.js');
38
38
 
@@ -68,20 +68,11 @@ export function ShareButtonView(props, children) {
68
68
  top: 2%;
69
69
  }
70
70
  `;
71
+ console.log("href", props.isPlainLink ? props.messageLink : undefined);
71
72
  return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
72
73
  h("style", { type: "text/css" }, styleString),
73
74
  h("style", { type: "text/css" }, vanillaStyle),
74
- h("a", { href: props.messageLink, target: props.openInSameTab ? "_self" : "_blank" },
75
- "(auto) ",
76
- props.messageLink),
77
- h("a", { href: props.messageLink, target: "_self" },
78
- "(self) ",
79
- props.messageLink),
80
- h("a", { href: props.messageLink, target: "_blank" },
81
- "(blank) ",
82
- props.messageLink),
83
- h("br", null),
84
- h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, href: props.messageLink, exportparts: `base: ${props.type}sharebutton-base` },
75
+ h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}sharebutton-base` },
85
76
  !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
86
77
  !props.hidetext && children)));
87
78
  }
@@ -489,7 +489,7 @@ export class ShareButton {
489
489
  "mutable": false,
490
490
  "complexType": {
491
491
  "original": "DemoData<ShareButtonViewProps>",
492
- "resolved": "{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; pill?: boolean; type?: \"text\" | \"warning\" | \"info\" | \"success\" | \"default\" | \"primary\" | \"danger\"; size?: \"small\" | \"medium\" | \"large\"; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; }",
492
+ "resolved": "{ loading?: boolean; icon?: string; disabled?: boolean; onClick?: () => void; medium?: \"facebook\" | \"twitter\" | \"email\" | \"direct\" | \"linkedin\" | \"sms\" | \"fbmessenger\" | \"whatsapp\" | \"linemessenger\" | \"pinterest\" | \"reminder\" | \"unknown\"; pill?: boolean; type?: \"text\" | \"warning\" | \"info\" | \"success\" | \"default\" | \"primary\" | \"danger\"; size?: \"small\" | \"medium\" | \"large\"; hideicon?: boolean; hidetext?: boolean; iconslot?: \"prefix\" | \"suffix\"; hide?: boolean; borderradius?: number; backgroundcolor?: string; textcolor?: string; messageLink?: string; openInSameTab?: boolean; isPlainLink?: boolean; }",
493
493
  "references": {
494
494
  "DemoData": {
495
495
  "location": "import",
@@ -51,7 +51,7 @@ function FacebookShare(directLink, messageLink, errorText) {
51
51
  }
52
52
  }
53
53
  function GenericShare(messageLink, errorText) {
54
- return messageLink ? window.open(messageLink) : alert(errorText);
54
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
55
55
  }
56
56
  export function useShareButton(props) {
57
57
  var _a, _b, _c, _d;
@@ -87,9 +87,6 @@ export function useShareButton(props) {
87
87
  else if (medium.toLocaleUpperCase() === "DIRECT") {
88
88
  NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
89
89
  }
90
- else {
91
- GenericShare(messageLink, props.errorText);
92
- }
93
90
  }
94
91
  const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
95
92
  environment.type === "SquatchAndroid") &&
@@ -97,20 +94,14 @@ export function useShareButton(props) {
97
94
  messageLink;
98
95
  const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
99
96
  const openInSameTab = ios && !safari;
100
- console.log("userAgent", userAgent);
101
- console.log("safari", safari);
102
- console.log("ios", ios);
103
- console.log("openInSameTab", openInSameTab);
104
97
  console.log("isPlainLink", isPlainLink);
105
- console.log("messageLink", messageLink);
106
- console.log("environment.type", environment.type);
107
- console.log("medium", medium);
108
98
  return {
109
99
  ...props,
110
100
  loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
111
101
  messageLink,
102
+ isPlainLink,
112
103
  // If we have just a normal share link onClick should be undefined so we fallback to default link behavior
113
- onClick: isPlainLink ? undefined : onClick,
104
+ onClick: onClick,
114
105
  openInSameTab,
115
106
  hide,
116
107
  };
@@ -81,20 +81,11 @@ function ShareButtonView(props, children) {
81
81
  top: 2%;
82
82
  }
83
83
  `;
84
+ console.log("href", props.isPlainLink ? props.messageLink : undefined);
84
85
  return props.hide ? (h(Host, { style: { display: "none" } })) : (h("div", null,
85
86
  h("style", { type: "text/css" }, styleString),
86
87
  h("style", { type: "text/css" }, vanillaStyle),
87
- h("a", { href: props.messageLink, target: props.openInSameTab ? "_self" : "_blank" },
88
- "(auto) ",
89
- props.messageLink),
90
- h("a", { href: props.messageLink, target: "_self" },
91
- "(self) ",
92
- props.messageLink),
93
- h("a", { href: props.messageLink, target: "_blank" },
94
- "(blank) ",
95
- props.messageLink),
96
- h("br", null),
97
- h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: props.onClick, href: props.messageLink, exportparts: `base: ${props.type}sharebutton-base` },
88
+ h("sl-button", { class: sheet.classes.buttonStyle, target: props.openInSameTab ? "_self" : "_blank", loading: props.loading, disabled: props.disabled, pill: props.pill, size: props.size, type: props.type, onClick: !props.isPlainLink ? props.onClick : undefined, href: props.isPlainLink ? props.messageLink : undefined, exportparts: `base: ${props.type}sharebutton-base` },
98
89
  !props.hideicon && (h("sl-icon", { slot: props.iconslot || "prefix", name: props.icon ? props.icon : medium[props.medium].icon, exportparts: "base: icon" })),
99
90
  !props.hidetext && children)));
100
91
  }
@@ -469,7 +460,7 @@ function FacebookShare(directLink, messageLink, errorText) {
469
460
  }
470
461
  }
471
462
  function GenericShare(messageLink, errorText) {
472
- return messageLink ? window.open(messageLink) : alert(errorText);
463
+ return messageLink ? (window.location.href = messageLink) : alert(errorText);
473
464
  }
474
465
  function useShareButton(props) {
475
466
  var _a, _b, _c, _d;
@@ -505,9 +496,6 @@ function useShareButton(props) {
505
496
  else if (medium.toLocaleUpperCase() === "DIRECT") {
506
497
  NativeShare({ sharetitle, sharetext }, directLink, props.errorText, props.unsupportedPlatformText);
507
498
  }
508
- else {
509
- GenericShare(messageLink, props.errorText);
510
- }
511
499
  }
512
500
  const isPlainLink = !(medium.toLocaleUpperCase() === "FACEBOOK" &&
513
501
  environment.type === "SquatchAndroid") &&
@@ -515,20 +503,14 @@ function useShareButton(props) {
515
503
  messageLink;
516
504
  const userAgent = window.navigator.userAgent.toLowerCase(), safari = /safari/.test(userAgent), ios = /iphone|ipod|ipad/.test(userAgent);
517
505
  const openInSameTab = ios && !safari;
518
- console.log("userAgent", userAgent);
519
- console.log("safari", safari);
520
- console.log("ios", ios);
521
- console.log("openInSameTab", openInSameTab);
522
506
  console.log("isPlainLink", isPlainLink);
523
- console.log("messageLink", messageLink);
524
- console.log("environment.type", environment.type);
525
- console.log("medium", medium);
526
507
  return {
527
508
  ...props,
528
509
  loading: res.loading && !(overrideData === null || overrideData === void 0 ? void 0 : overrideData.messageLink),
529
510
  messageLink,
511
+ isPlainLink,
530
512
  // If we have just a normal share link onClick should be undefined so we fallback to default link behavior
531
- onClick: isPlainLink ? undefined : onClick,
513
+ onClick: onClick,
532
514
  openInSameTab,
533
515
  hide,
534
516
  };
@@ -18,7 +18,7 @@ import { P as PortalLoginView } from './sqm-portal-login-view-7e49609a.js';
18
18
  import { u as usePortalLogin } from './usePortalLogin-ef647a50.js';
19
19
  import { A as AsYouType } from './AsYouType-46f67d0d.js';
20
20
  import { i as isEmpty } from './utilities-5b0ca040.js';
21
- import { b as useDemoBigStat, Q as useBigStat, B as BigStatView, M as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, J as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, V as demoRewardExchange, i as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-c0e9e31f.js';
21
+ import { b as useDemoBigStat, Q as useBigStat, B as BigStatView, M as autoColorScaleCss, G as CardFeedView, C as CheckboxFieldView, J as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, U as withShadowView, L as LeaderboardView, N as NameFieldsView, d as PortalChangePasswordView, h as PortalFooterView, P as PortalFrameView, e as PortalRegisterView, R as ReferralIframeView, V as demoRewardExchange, i as RewardExchangeView, a as useShareButton, S as ShareButtonView, u as useShareLink, c as StatContainerView, T as TaskCardView } from './ShadowViewAddon-1ef084f6.js';
22
22
  import './sqm-portal-container-view-1683ae32.js';
23
23
  import { u as usePayoutStatus } from './usePayoutStatus-58aa56b4.js';
24
24
 
@@ -28,7 +28,7 @@ import { P as PortalProfileView } from './sqm-portal-profile-view-93003974.js';
28
28
  import './utilities-5b0ca040.js';
29
29
  import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-54a8651f.js';
30
30
  import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-b12cb894.js';
31
- import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, J as CouponCodeView, K as ProgressBar$2, M as autoColorScaleCss, O as ShadowViewAddon } from './ShadowViewAddon-c0e9e31f.js';
31
+ import { S as ShareButtonView, L as LeaderboardView, B as BigStatView, P as PortalFrameView, E as EditProfileView, u as useShareLink, a as useShareButton, b as useDemoBigStat, c as StatContainerView, d as PortalChangePasswordView, e as PortalRegisterView, T as TaskCardView, f as ProgressBarView, g as PoweredByImg$1, h as PortalFooterView, H as HeroView, R as ReferralIframeView, N as NameFieldsView, C as CheckboxFieldView, D as DropdownFieldView, I as InputFieldView, i as RewardExchangeView, r as rewardExchangeCustomErrorMsg, j as rewardExchangeLongText, k as rewardExchangeSelected, l as chooseAmountFixed, m as chooseAmountFixedNoDescription, n as chooseAmountVariable, o as chooseAmountVariableNoDescription, p as chooseAmountVariableDisabled, q as chooseAmountVariableUnavailable, s as confirmFixed, t as confirmVariable, v as redemptionError, w as queryError, x as success, y as successVariable, z as loading, A as empty$1, F as rewardExchange, G as CardFeedView, J as CouponCodeView, K as ProgressBar$2, M as autoColorScaleCss, O as ShadowViewAddon } from './ShadowViewAddon-1ef084f6.js';
32
32
  import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-1683ae32.js';
33
33
  import { O as OtherRegionSlotView, I as InvoiceTableView, T as TaxForm } from './sqm-invoice-table-view-af69cd33.js';
34
34