@saasquatch/mint-components 2.3.0-5 → 2.3.0-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 (67) hide show
  1. package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +28 -721
  2. package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -4
  3. package/dist/cjs/sqm-email-verification_2.cjs.entry.js +17 -32
  4. package/dist/cjs/{sqm-partner-info-modal-view-2eb52318.js → sqm-partner-info-modal-view-65cc677a.js} +1 -0
  5. package/dist/cjs/sqm-stencilbook.cjs.entry.js +254 -77
  6. package/dist/cjs/{sqm-user-info-form-view-0e1ddbe4.js → sqm-user-info-form-view-42323dc5.js} +743 -38
  7. package/dist/cjs/{useIndirectTaxForm-c3c1ec56.js → useIndirectTaxForm-d1cd23f7.js} +5 -5
  8. package/dist/collection/components/sqm-partner-info-modal/sqm-partner-info-modal-view.js +1 -0
  9. package/dist/collection/components/sqm-partner-info-modal/usePartnerInfoModal.js +16 -31
  10. package/dist/collection/components/sqm-stencilbook/sqm-stencilbook.js +2 -0
  11. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.js +6 -0
  12. package/dist/collection/components/tax-and-cash/sqm-payout-details-card/sqm-payout-details-card-view.js +13 -2
  13. package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.js +151 -0
  14. package/dist/esm/sqm-banking-info-form_10.entry.js +16 -709
  15. package/dist/esm/sqm-big-stat_47.entry.js +2 -2
  16. package/dist/esm/sqm-email-verification_2.entry.js +17 -32
  17. package/dist/esm/{sqm-partner-info-modal-view-e8efbef1.js → sqm-partner-info-modal-view-136c443d.js} +1 -0
  18. package/dist/esm/sqm-stencilbook.entry.js +218 -41
  19. package/dist/esm/{sqm-user-info-form-view-e1ba6009.js → sqm-user-info-form-view-dc473cb8.js} +721 -17
  20. package/dist/esm/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  21. package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
  22. package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
  23. package/dist/esm-es5/sqm-email-verification_2.entry.js +1 -1
  24. package/dist/esm-es5/sqm-partner-info-modal-view-136c443d.js +1 -0
  25. package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
  26. package/dist/esm-es5/sqm-user-info-form-view-dc473cb8.js +1 -0
  27. package/dist/esm-es5/subregions-24c1c137.js +1 -0
  28. package/dist/esm-es5/{useIndirectTaxForm-b2888ea5.js → useIndirectTaxForm-27668ad4.js} +1 -1
  29. package/dist/mint-components/mint-components.esm.js +1 -1
  30. package/dist/mint-components/p-1f387c7b.system.js +1 -1
  31. package/dist/mint-components/{p-abe9f5b1.js → p-2e462dd9.js} +5 -5
  32. package/dist/mint-components/{p-b419f9ac.entry.js → p-3c052d3d.entry.js} +1 -1
  33. package/dist/mint-components/p-3f68e4e3.js +1 -0
  34. package/dist/mint-components/{p-a38eece5.system.entry.js → p-4575f71b.system.entry.js} +1 -1
  35. package/dist/mint-components/{p-fa227290.entry.js → p-459c4251.entry.js} +6 -31
  36. package/dist/mint-components/p-4c6ab282.js +1 -0
  37. package/dist/mint-components/p-547f8243.system.entry.js +1 -0
  38. package/dist/mint-components/p-66cb8bec.system.js +1 -0
  39. package/dist/mint-components/p-b21c53cb.system.entry.js +1 -0
  40. package/dist/mint-components/p-b24bb1ee.system.js +1 -0
  41. package/dist/mint-components/p-c2903e7d.entry.js +83 -0
  42. package/dist/mint-components/p-cb58a2c6.js +1 -0
  43. package/dist/mint-components/p-d30c8cb3.entry.js +9 -0
  44. package/dist/mint-components/p-df74f653.system.entry.js +1 -0
  45. package/dist/mint-components/p-ec58628f.system.js +1 -0
  46. package/dist/mint-components/{p-58c24352.system.js → p-ed945efe.system.js} +1 -1
  47. package/dist/types/components/sqm-partner-info-modal/usePartnerInfoModal.d.ts +0 -1
  48. package/dist/types/components/tax-and-cash/sqm-payout-details-card/PayoutDetailsCard.stories.d.ts +1 -0
  49. package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/TaxAndCashDashboardView.stories.d.ts +19 -0
  50. package/docs/docs.docx +0 -0
  51. package/package.json +1 -1
  52. package/dist/esm-es5/sqm-partner-info-modal-view-e8efbef1.js +0 -1
  53. package/dist/esm-es5/sqm-user-info-form-view-e1ba6009.js +0 -1
  54. package/dist/esm-es5/utils-4f5cd04c.js +0 -1
  55. package/dist/mint-components/p-1e6a2945.js +0 -1
  56. package/dist/mint-components/p-25b32748.system.entry.js +0 -1
  57. package/dist/mint-components/p-41415f9a.system.entry.js +0 -1
  58. package/dist/mint-components/p-58c525ce.system.js +0 -1
  59. package/dist/mint-components/p-7f1bc92b.entry.js +0 -9
  60. package/dist/mint-components/p-b0177b7f.js +0 -1
  61. package/dist/mint-components/p-b222bace.system.entry.js +0 -1
  62. package/dist/mint-components/p-b96ed8eb.js +0 -1
  63. package/dist/mint-components/p-cdabd9de.system.js +0 -1
  64. package/dist/mint-components/p-ebc519bc.system.js +0 -1
  65. package/dist/mint-components/p-ffcebe78.entry.js +0 -83
  66. package/dist/cjs/{utils-a3b3d05b.js → subregions-e7273457.js} +44 -44
  67. package/dist/esm/{utils-4f5cd04c.js → subregions-24c1c137.js} +44 -44
@@ -12,12 +12,12 @@ import { u as useRerenderListener, a as useRequestRerender } from './re-render-b
12
12
  import { u as useChildElements } from './useChildElements-06937df7.js';
13
13
  import { l as luxon } from './luxon-1be92a8e.js';
14
14
  import { g as generateUserError } from './useReferralTable-03d32c6f.js';
15
- import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, U as UserInfoFormView } from './sqm-user-info-form-view-e1ba6009.js';
16
- import { t as taxTypeToName, b as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, o as objectIsFull, A as ADDRESS_REGIONS } from './utils-4f5cd04c.js';
15
+ import { O as OtherRegionSlotView, I as InvoiceTableView, v as vatLabels, T as TaxAndCashDashboardView, U as UserInfoFormView } from './sqm-user-info-form-view-dc473cb8.js';
16
+ import { t as taxTypeToName, b as validTaxDocument, I as INDIRECT_TAX_SPAIN_REGIONS, a as INDIRECT_TAX_PROVINCES, o as objectIsFull, A as ADDRESS_REGIONS } from './subregions-24c1c137.js';
17
17
  import { F as FORM_STEPS, a as TAX_FORM_CONTEXT_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, f as FINANCE_NETWORK_SETTINGS_NAMESPACE, c as USER_QUERY_NAMESPACE, T as TAX_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE } from './data-8698cbc6.js';
18
18
  import { c as VERIFICATION_EVENT_KEY } from './keys-1054056a.js';
19
19
  import { T as TAX_FORM_UPDATED_EVENT_KEY } from './eventKeys-f76b6a03.js';
20
- import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-b2888ea5.js';
20
+ import { a as useIndirectTaxForm, b as useVeriffApp, g as getStatus, V as VERIFF_COMPLETE_EVENT_KEY, c as CONNECT_PARTNER, C as COMPLETE_PARTNER } from './useIndirectTaxForm-27668ad4.js';
21
21
 
22
22
  function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
23
23
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28, _29, _30, _31, _32, _33, _34, _35, _36, _37, _38, _39, _40, _41, _42, _43, _44, _45, _46, _47, _48, _49, _50, _51, _52, _53, _54, _55, _56, _57, _58, _59, _60, _61, _62, _63, _64, _65, _66, _67, _68, _69, _70, _71, _72, _73, _74, _75, _76;
@@ -3649,6 +3649,14 @@ const style$4 = {
3649
3649
  color: "var(--sl-color-white)",
3650
3650
  },
3651
3651
  },
3652
+ DangerBadge: {
3653
+ "&::part(base)": {
3654
+ textAlign: "center",
3655
+ whiteSpace: "pre-line",
3656
+ background: "var(--sqm-danger-color-icon)",
3657
+ color: "var(--sl-color-white)",
3658
+ },
3659
+ },
3652
3660
  Container: {
3653
3661
  display: "flex",
3654
3662
  flexDirection: "column",
@@ -3669,8 +3677,11 @@ function PayoutDetailsCardView(props) {
3669
3677
  h("sqm-skeleton", { width: "25%", height: "16px" })));
3670
3678
  };
3671
3679
  const renderStatusBadge = (status, statusBadgeText) => {
3672
- const badgeType = status === "nextPayout" ? "success" : "primary";
3673
- const badgeClass = badgeType === "success" ? classes.SuccessBadge : classes.PrimaryBadge;
3680
+ const badgeClass = status === "nextPayout"
3681
+ ? classes.SuccessBadge
3682
+ : status === "payoutToday"
3683
+ ? classes.PrimaryBadge
3684
+ : classes.DangerBadge;
3674
3685
  const statusText = intl.formatMessage({
3675
3686
  id: "badgeText",
3676
3687
  defaultMessage: statusBadgeText,
@@ -3828,710 +3839,6 @@ function useDemoPayoutDetailsCard(props) {
3828
3839
  }, props.demoData || {}, { arrayMerge: (_, a) => a });
3829
3840
  }
3830
3841
 
3831
- const style$5 = {
3832
- ErrorAlertContainer: {
3833
- "&::part(base)": {
3834
- backgroundColor: "var(--sl-color-red-100)",
3835
- borderTop: "none",
3836
- },
3837
- },
3838
- WarningAlertContainer: {
3839
- "&::part(base)": {
3840
- backgroundColor: "var(--sl-color-yellow-100)",
3841
- borderTop: "none",
3842
- maxWidth: "600px",
3843
- },
3844
- },
3845
- WarningHoldAlertContainer: {
3846
- marginLeft: "-20px",
3847
- "&::part(base)": {
3848
- maxWidth: "850px",
3849
- border: "none",
3850
- backgroundColor: "transparent",
3851
- color: "var(--sqm-text)",
3852
- },
3853
- "& sl-icon::part(base)": {
3854
- color: "var(--sqm-warning-color-icon)",
3855
- },
3856
- },
3857
- ErrorHoldAlertContainer: {
3858
- marginLeft: "-20px",
3859
- "&::part(base)": {
3860
- maxWidth: "850px",
3861
- border: "none",
3862
- backgroundColor: "transparent",
3863
- color: "var(--sqm-text)",
3864
- },
3865
- "& sl-icon::part(base)": {
3866
- color: "var(--sqm-danger-color-icon)",
3867
- },
3868
- },
3869
- ExpiringSoonAlertContainer: {
3870
- "&::part(base)": {
3871
- backgroundColor: "var(--sl-color-yellow-100)",
3872
- borderTop: "none",
3873
- },
3874
- },
3875
- BankingInformationContainer: {
3876
- maxWidth: "700px",
3877
- },
3878
- IndirectTaxPreviewContainer: {
3879
- marginTop: "var(--sl-spacing-x-large)",
3880
- borderTop: "1px solid var(--sl-color-neutral-200)",
3881
- },
3882
- IndirectTaxPreviewHeaderContainer: {
3883
- marginTop: "var(--sl-spacing-large)",
3884
- marginBottom: "var(--sl-spacing-xx-small)",
3885
- margin: "0",
3886
- display: "flex",
3887
- alignItems: "center",
3888
- gap: "var(--sl-spacing-x-small)",
3889
- "&::part(base)": {
3890
- color: "var(--sqm-text)",
3891
- },
3892
- },
3893
- IndirectTaxPreviewDetails: {
3894
- gap: "var(--sl-spacing-x-small)",
3895
- display: "flex",
3896
- flexDirection: "column",
3897
- lineHeight: "var(--sl-spacing-medium)",
3898
- fontSize: "var(--sl-font-size-small)",
3899
- color: "var(--sqm-text-subdued)",
3900
- },
3901
- InvoiceTableContainer: {
3902
- marginTop: "var(--sl-spacing-medium)",
3903
- },
3904
- NotRegisteredIndirectTaxText: {
3905
- color: "var(--sqm-text-subdued)",
3906
- },
3907
- TaxDocumentsContainer: {
3908
- marginTop: "var(--sl-spacing-xx-large)",
3909
- borderTop: "1px solid var(--sl-color-neutral-200)",
3910
- },
3911
- TaxDocumentsSectionHeaderContainer: {
3912
- marginTop: "var(--sl-spacing-x-large)",
3913
- marginBottom: "var(--sl-spacing-xx-small)",
3914
- },
3915
- StatusContainer: {
3916
- marginTop: "var(--sl-spacing-x-large)",
3917
- display: "flex",
3918
- flexDirection: "column",
3919
- gap: "var(--sl-spacing-x-small)",
3920
- "& h3": {
3921
- margin: "0",
3922
- },
3923
- "& p": {
3924
- margin: "0",
3925
- paddingTop: "2px",
3926
- },
3927
- },
3928
- StatusAlert: {
3929
- fontSize: "var(--sl-font-size-small)",
3930
- },
3931
- TaxFormDetailsContainer: {
3932
- display: "flex",
3933
- gap: "var(--sl-spacing-small)",
3934
- alignItems: "center",
3935
- },
3936
- NewFormButton: {
3937
- marginTop: "var(--sl-spacing-large)",
3938
- maxWidth: "300px",
3939
- },
3940
- EditBankDetailsButton: {
3941
- marginTop: "var(--sl-spacing-large)",
3942
- },
3943
- TaxSectionSkeletonContainer: {
3944
- display: "flex",
3945
- flexDirection: "column",
3946
- marginTop: "var(--sl-spacing-x-large)",
3947
- },
3948
- TaxDocSubtext: {
3949
- margin: "0",
3950
- color: "var(--sqm-text-subdued)",
3951
- lineHeight: "var(--sl-spacing-medium)",
3952
- fontSize: "var(--sl-font-size-small)",
3953
- marginLeft: "1px",
3954
- },
3955
- TooltipContainer: {
3956
- display: "flex",
3957
- textAlign: "center",
3958
- width: "250px",
3959
- "&::part(body)": {
3960
- pointerEvents: "auto",
3961
- },
3962
- },
3963
- ToolTip: {
3964
- top: "6px",
3965
- width: "16px",
3966
- height: "16px",
3967
- },
3968
- TaxNumberContainer: {
3969
- display: "flex",
3970
- flexDirection: "column",
3971
- gap: "6px",
3972
- },
3973
- DescriptionText: {
3974
- color: "var(--sqm-text-subdued)",
3975
- fontSize: "var(--sl-font-size-x-small)",
3976
- marginBottom: "none",
3977
- maxWidth: "492px",
3978
- },
3979
- PageDescriptionText: {
3980
- color: "var(--sqm-text-subdued)",
3981
- fontSize: "var(--sl-font-size-medium)",
3982
- marginTop: "0",
3983
- },
3984
- Dialog: {
3985
- "&::part(panel)": {
3986
- maxWidth: "420px",
3987
- },
3988
- "&::part(close-button)": {
3989
- marginBottom: "var(--sl-spacing-xx-large)",
3990
- },
3991
- "&::part(title)": {
3992
- fontSize: "var(--sl-font-size-x-large)",
3993
- fontWeight: "600",
3994
- marginTop: "var(--sl-spacing-xxx-large)",
3995
- padding: "var(--sl-spacing-x-large) var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
3996
- },
3997
- "&::part(body)": {
3998
- padding: "0 var(--sl-spacing-x-large) 0 var(--sl-spacing-x-large)",
3999
- fontSize: "var(--sl-font-size-small)",
4000
- },
4001
- "&::part(footer)": {
4002
- display: "flex",
4003
- flexDirection: "column",
4004
- gap: "var(--sl-spacing-small)",
4005
- marginBottom: "var(--sl-spacing-xx-small)",
4006
- alignItems: "center",
4007
- flex: "1",
4008
- },
4009
- },
4010
- DialogButton: { margin: "auto", width: "100%" },
4011
- SuccessBadge: {
4012
- "&::part(base)": {
4013
- textAlign: "center",
4014
- whiteSpace: "pre-line",
4015
- background: "var(--sqm-success-color-icon)",
4016
- },
4017
- },
4018
- WarningBadge: {
4019
- "&::part(base)": {
4020
- textAlign: "center",
4021
- whiteSpace: "pre-line",
4022
- background: "var(--sqm-warning-color-icon)",
4023
- },
4024
- },
4025
- ErrorBadge: {
4026
- "&::part(base)": {
4027
- textAlign: "center",
4028
- whiteSpace: "pre-line",
4029
- background: "var(--sqm-danger-color-icon)",
4030
- },
4031
- },
4032
- SubduedText: {
4033
- color: "var(--sqm-text-subdued)",
4034
- },
4035
- ButtonContainer: {
4036
- display: "flex",
4037
- gap: "var(--sl-spacing-medium)",
4038
- flexWrap: "wrap",
4039
- },
4040
- DropdownTooltipContainer: {
4041
- top: "-4px",
4042
- "&::part(panel)": {
4043
- boxShadow: "none",
4044
- border: "none",
4045
- marginTop: "var(--sl-spacing-x-small)",
4046
- },
4047
- },
4048
- DropdownContent: {
4049
- padding: "var(--sl-spacing-xxx-small) var(--sl-spacing-x-small)",
4050
- fontSize: "var(--sl-font-size-small)",
4051
- fontFamily: "var(--sl-font-sans)",
4052
- fontWeight: "var(--sl-font-weight-normal)",
4053
- lineHeight: "var(--sl-line-height-dense)",
4054
- minWidth: "225px",
4055
- backgroundColor: "var(--sl-color-gray-900)",
4056
- color: "var(--sl-color-white)",
4057
- borderRadius: "var(--sl-border-radius-medium)",
4058
- position: "relative",
4059
- marginLeft: "5px",
4060
- },
4061
- DropdownArrow: {
4062
- position: "absolute",
4063
- left: "-5px",
4064
- top: "50%",
4065
- transform: "translateY(-50%)",
4066
- width: "0",
4067
- height: "0",
4068
- borderTop: "5px solid transparent",
4069
- borderBottom: "5px solid transparent",
4070
- borderRight: "5px solid var(--sl-color-gray-900)",
4071
- zIndex: "1",
4072
- },
4073
- DropdownLink: {
4074
- color: "var(--sl-color-white)",
4075
- textDecoration: "underline",
4076
- },
4077
- };
4078
- const sheet$4 = createStyleSheet(style$5);
4079
- const styleString$4 = sheet$4.toString();
4080
- const vanillaStyle$3 = `
4081
- :host{
4082
- display: block;
4083
- }
4084
-
4085
- sl-button[type="secondary"]::part(base) {
4086
- font-family: var(--sqm-primary-font);
4087
- background-color: var(--sqm-secondary-button-background);
4088
- color: var(--sqm-secondary-button-color);
4089
- border-color: var(--sqm-secondary-button-color-border);
4090
- border-radius: var(--sqm-secondary-button-radius);
4091
- }
4092
-
4093
- sl-button[type="secondary"]::part(base):hover {
4094
- background-color: var(--sqm-secondary-button-background-hover);
4095
- color: var(--sqm-secondary-button-color-hover);
4096
- border-color: var(--sqm-secondary-button-border-color-hover);
4097
- }
4098
-
4099
- `;
4100
- const TaxAndCashDashboardView = (props) => {
4101
- var _a;
4102
- const { states, text, callbacks, slots } = props;
4103
- function getAlert(status) {
4104
- switch (status) {
4105
- case "OVER_W9_THRESHOLD":
4106
- if (states.enforceUsTaxComplianceOption === "CASH_ONLY_DEFER_W9") {
4107
- return {
4108
- header: text.w9RequiredHeader,
4109
- description: intl.formatMessage({
4110
- id: "w9RequiredDescription",
4111
- defaultMessage: text.w9RequiredDescription,
4112
- }, {
4113
- termsAndConditions: (h("a", { target: "_blank", href: `https://terms.advocate.impact.com/PayoutTermsAndConditions.html` }, text.termsAndConditions)),
4114
- }),
4115
- button: (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", onClick: callbacks.onNewFormClick }, text.w9RequiredButtonText)),
4116
- alertType: "warning",
4117
- icon: "info-circle",
4118
- class: sheet$4.classes.WarningHoldAlertContainer,
4119
- };
4120
- }
4121
- else {
4122
- return {
4123
- header: text.payoutHoldAlertHeader,
4124
- description: intl.formatMessage({
4125
- id: "payoutHoldAlertDescription",
4126
- defaultMessage: text.payoutHoldAlertDescription,
4127
- }, {
4128
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4129
- }),
4130
- buttonText: null,
4131
- alertType: "warning",
4132
- icon: "exclamation-triangle",
4133
- class: sheet$4.classes.WarningHoldAlertContainer,
4134
- };
4135
- }
4136
- case "VERIFICATION:REQUIRED":
4137
- return {
4138
- header: text.verificationRequiredHeader,
4139
- description: intl.formatMessage({
4140
- id: "verificationRequiredDescription",
4141
- defaultMessage: text.verificationRequiredDescription,
4142
- }, {
4143
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4144
- }),
4145
- buttonText: text.verificationRequiredButtonText,
4146
- alertType: "warning",
4147
- icon: "exclamation-triangle",
4148
- class: sheet$4.classes.WarningHoldAlertContainer,
4149
- };
4150
- case "VERIFICATION:INTERNAL":
4151
- return {
4152
- header: text.verificationRequiredInternalHeader,
4153
- description: intl.formatMessage({
4154
- id: "verificationRequiredInternalDescription",
4155
- defaultMessage: text.verificationRequiredInternalDescription,
4156
- }, {
4157
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4158
- }),
4159
- alertType: "warning",
4160
- icon: "exclamation-triangle",
4161
- class: sheet$4.classes.WarningHoldAlertContainer,
4162
- };
4163
- case "VERIFICATION:REVIEW":
4164
- return {
4165
- header: text.verificationReviewInternalHeader,
4166
- description: intl.formatMessage({
4167
- id: "verificationReviewInternalDescription",
4168
- defaultMessage: text.verificationReviewInternalDescription,
4169
- }, {
4170
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4171
- }),
4172
- alertType: "warning",
4173
- icon: "exclamation-triangle",
4174
- class: sheet$4.classes.WarningHoldAlertContainer,
4175
- };
4176
- case "VERIFICATION:FAILED":
4177
- return {
4178
- header: text.verificationFailedInternalHeader,
4179
- description: intl.formatMessage({
4180
- id: "verificationFailedInternalDescription",
4181
- defaultMessage: text.verificationFailedInternalDescription,
4182
- }, {
4183
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4184
- }),
4185
- alertType: "error",
4186
- icon: "exclamation-octagon",
4187
- class: sheet$4.classes.ErrorHoldAlertContainer,
4188
- };
4189
- case "NEW_PAYEE_REVIEW":
4190
- return {
4191
- header: text.accountReviewHeader,
4192
- description: intl.formatMessage({
4193
- id: "accountReviewDescription",
4194
- defaultMessage: text.accountReviewDescription,
4195
- }, {
4196
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4197
- }),
4198
- buttonText: null,
4199
- alertType: "warning",
4200
- icon: "exclamation-triangle",
4201
- class: sheet$4.classes.WarningHoldAlertContainer,
4202
- };
4203
- case "PAYMENT_HOLD_ON_CHANGE":
4204
- return {
4205
- header: text.paymentHoldOnChangeHeader,
4206
- description: intl.formatMessage({
4207
- id: "accountReviewDescription",
4208
- defaultMessage: text.paymentHoldOnChangeDescription,
4209
- }, {
4210
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4211
- }),
4212
- buttonText: null,
4213
- alertType: "warning",
4214
- icon: "exclamation-triangle",
4215
- class: sheet$4.classes.WarningHoldAlertContainer,
4216
- };
4217
- case "BENEFICIARY_NAME_INVALID":
4218
- return {
4219
- header: text.beneficiaryNameInvalidHeader,
4220
- description: intl.formatMessage({
4221
- id: "accountReviewDescription",
4222
- defaultMessage: text.beneficiaryNameInvalidDescription,
4223
- }, {
4224
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4225
- }),
4226
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4227
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4228
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4229
- alertType: "warning",
4230
- icon: "exclamation-triangle",
4231
- class: sheet$4.classes.WarningHoldAlertContainer,
4232
- };
4233
- case "BENEFICIARY_NAME_MISMATCH":
4234
- return {
4235
- header: text.beneficiaryNameMismatchHeader,
4236
- description: intl.formatMessage({
4237
- id: "accountReviewDescription",
4238
- defaultMessage: text.beneficiaryNameMismatchDescription,
4239
- }, {
4240
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4241
- }),
4242
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4243
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4244
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4245
- alertType: "warning",
4246
- icon: "exclamation-triangle",
4247
- class: sheet$4.classes.WarningHoldAlertContainer,
4248
- };
4249
- case "BANK_TAX_NAME_MISMATCH":
4250
- return {
4251
- header: text.bankTaxNameMismatchHeader,
4252
- description: intl.formatMessage({
4253
- id: "accountReviewDescription",
4254
- defaultMessage: text.bankTaxNameMismatchDescription,
4255
- }, {
4256
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4257
- }),
4258
- button: (h("div", { class: sheet$4.classes.ButtonContainer },
4259
- h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton),
4260
- h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onNewFormClick }, text.newFormButton))),
4261
- alertType: "warning",
4262
- icon: "exclamation-triangle",
4263
- class: sheet$4.classes.WarningHoldAlertContainer,
4264
- };
4265
- case "WITHDRAWAL_SETTINGS_INVALID":
4266
- return {
4267
- header: text.withdrawalSettingsInvalidHeader,
4268
- description: intl.formatMessage({
4269
- id: "accountReviewDescription",
4270
- defaultMessage: text.withdrawalSettingsInvalidDescription,
4271
- }, {
4272
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4273
- }),
4274
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "default", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4275
- alertType: "warning",
4276
- icon: "exclamation-triangle",
4277
- class: sheet$4.classes.WarningHoldAlertContainer,
4278
- };
4279
- case "PAYMENT_RETURNED":
4280
- return {
4281
- header: text.paymentReturnedHeader,
4282
- description: intl.formatMessage({
4283
- id: "accountReviewDescription",
4284
- defaultMessage: text.paymentReturnedDescription,
4285
- }, {
4286
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4287
- }),
4288
- button: (h("sl-button", { disabled: states.disabled || states.loading, type: "primary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)),
4289
- alertType: "error",
4290
- icon: "exclamation-triangle",
4291
- class: sheet$4.classes.WarningHoldAlertContainer,
4292
- };
4293
- case "HOLD":
4294
- return {
4295
- header: text.payoutHoldAlertHeader,
4296
- description: intl.formatMessage({
4297
- id: "payoutHoldAlertDescription",
4298
- defaultMessage: text.payoutHoldAlertDescription,
4299
- }, {
4300
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4301
- }),
4302
- buttonText: null,
4303
- alertType: "warning",
4304
- icon: "exclamation-triangle",
4305
- class: sheet$4.classes.WarningHoldAlertContainer,
4306
- };
4307
- default:
4308
- return;
4309
- }
4310
- }
4311
- const statusMap = {
4312
- NOT_VERIFIED: (h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4313
- h("sl-badge", { class: sheet$4.classes.WarningBadge, type: "warning", pill: true }, text.statusTextNotVerified),
4314
- h("p", { class: sheet$4.classes.SubduedText }, intl.formatMessage({
4315
- id: `badgeTextAwaitingReview`,
4316
- defaultMessage: text.badgeTextAwaitingReview,
4317
- }, {
4318
- dateSubmitted: states.dateSubmitted,
4319
- })))),
4320
- ACTIVE: (h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4321
- h("sl-badge", { class: sheet$4.classes.SuccessBadge, type: "success", pill: true }, text.statusTextActive),
4322
- h("p", { class: sheet$4.classes.SubduedText }, intl.formatMessage({
4323
- id: `badgeTextSubmittedOn`,
4324
- defaultMessage: states.documentType === "W9" || !states.documentType
4325
- ? text.badgeTextSubmittedOn
4326
- : text.badgeTextSubmittedOnW8,
4327
- }, {
4328
- dateSubmitted: states.dateSubmitted,
4329
- })))),
4330
- INACTIVE: (h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4331
- h("sl-badge", { class: sheet$4.classes.ErrorBadge, type: "danger", pill: true }, text.statusTextNotActive),
4332
- h("p", { class: sheet$4.classes.SubduedText }, text.invalidForm))),
4333
- undefined: (h("div", { class: sheet$4.classes.TaxFormDetailsContainer },
4334
- h("sl-badge", { type: "danger", pill: true }, text.statusTextRequired),
4335
- h("p", null, intl.formatMessage({
4336
- id: `requiredTaxForm`,
4337
- defaultMessage: text.requiredTaxForm,
4338
- }, {
4339
- taxFormType: states.documentType,
4340
- })))),
4341
- };
4342
- const alertMap = {
4343
- INACTIVE: (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", class: sheet$4.classes.ErrorHoldAlertContainer, type: "danger", open: true },
4344
- h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4345
- h("strong", null, intl.formatMessage({
4346
- id: `taxAlertHeaderNotActive`,
4347
- defaultMessage: states.documentType === "W9"
4348
- ? text.taxAlertHeaderNotActiveW9
4349
- : text.taxAlertHeaderNotActiveW8,
4350
- }, {
4351
- documentType: states.documentType || "Your",
4352
- })),
4353
- h("br", null),
4354
- intl.formatMessage({
4355
- id: `taxAlertMessage`,
4356
- defaultMessage: states.documentType === "W9"
4357
- ? text.taxAlertNotActiveMessageW9
4358
- : text.taxAlertNotActiveMessageW8,
4359
- }, {
4360
- documentType: states.documentTypeString || "tax",
4361
- }))),
4362
- };
4363
- const getIndirectTaxRegisteredIn = () => {
4364
- if (states.province) {
4365
- return intl.formatMessage({
4366
- id: `indirectTaxInfoCanada`,
4367
- defaultMessage: text.indirectTaxInfoCanada,
4368
- }, {
4369
- country: "Canada",
4370
- province: states.province,
4371
- });
4372
- }
4373
- else if (states.subRegion) {
4374
- return intl.formatMessage({
4375
- id: `indirectTaxInfoSpain`,
4376
- defaultMessage: text.indirectTaxInfoSpain,
4377
- }, {
4378
- country: states.country,
4379
- subRegion: states.subRegion,
4380
- });
4381
- }
4382
- else {
4383
- return intl.formatMessage({
4384
- id: `indirectTaxInfoOtherCountry`,
4385
- defaultMessage: text.indirectTaxInfoOtherCountry,
4386
- }, {
4387
- country: states.country,
4388
- });
4389
- }
4390
- };
4391
- const alertInfo = getAlert(states.payoutStatus);
4392
- const dropdownHover = (el) => {
4393
- var _a;
4394
- if (!el)
4395
- return;
4396
- const trigger = el.querySelector('[slot="trigger"]');
4397
- const panel = (_a = el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".dropdown__panel");
4398
- if (!trigger || !panel)
4399
- return;
4400
- let hideTimeout;
4401
- const show = () => {
4402
- clearTimeout(hideTimeout);
4403
- el.show();
4404
- };
4405
- const scheduleHide = () => {
4406
- hideTimeout = setTimeout(() => el.hide(), 100);
4407
- };
4408
- trigger.addEventListener("mouseenter", show);
4409
- trigger.addEventListener("mouseleave", scheduleHide);
4410
- panel.addEventListener("mouseenter", show);
4411
- panel.addEventListener("mouseleave", scheduleHide);
4412
- return () => {
4413
- trigger.removeEventListener("mouseenter", show);
4414
- trigger.removeEventListener("mouseleave", scheduleHide);
4415
- panel.removeEventListener("mouseenter", show);
4416
- panel.removeEventListener("mouseleave", scheduleHide);
4417
- clearTimeout(hideTimeout);
4418
- };
4419
- };
4420
- return (h("div", null,
4421
- h("div", null,
4422
- h("style", { type: "text/css" },
4423
- styleString$4,
4424
- vanillaStyle$3),
4425
- states.loadingError && (h("div", null,
4426
- h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
4427
- h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4428
- h("strong", null, text.error.loadingErrorAlertHeader),
4429
- h("br", null),
4430
- intl.formatMessage({
4431
- id: "loadingErrorAlertDescription",
4432
- defaultMessage: text.error.loadingErrorAlertDescription,
4433
- }, {
4434
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4435
- })))),
4436
- ((_a = states.errors) === null || _a === void 0 ? void 0 : _a.general) && (h("sl-alert", { exportparts: "base: alert-base, icon:alert-icon", type: "danger", open: true, class: sheet$4.classes.ErrorAlertContainer },
4437
- h("sl-icon", { slot: "icon", name: "exclamation-octagon" }),
4438
- h("strong", null, text.error.generalTitle),
4439
- h("br", null),
4440
- intl.formatMessage({
4441
- id: "generalDescription",
4442
- defaultMessage: text.error.generalDescription,
4443
- }, {
4444
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4445
- }))),
4446
- alertInfo && (h("sqm-form-message", { loading: states.loading, exportparts: "base: alert-base, icon:alert-icon", type: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.alertType, class: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.class, icon: alertInfo === null || alertInfo === void 0 ? void 0 : alertInfo.icon, transparent: true },
4447
- h("strong", null, alertInfo.header),
4448
- h("p", { style: { margin: "0" } }, alertInfo.description),
4449
- alertInfo.buttonText && (h("sl-button", { style: { marginTop: "var(--sl-spacing-x-small)" }, type: "default", loading: states.veriffLoading, onClick: () => callbacks.onVerifyClick() }, alertInfo.buttonText)),
4450
- alertInfo.button ? (alertInfo.button) : (h("div", { style: { display: "none" } })))),
4451
- h("sl-dialog", { label: text.replaceTaxFormModalHeader, class: sheet$4.classes.Dialog, open: states.showNewFormDialog, "onSl-hide": callbacks.onNewFormCancel },
4452
- h("p", null, text.replaceTaxFormModalBodyText),
4453
- h("sl-button", { slot: "footer", type: "primary", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormClick }, text.newFormButton),
4454
- h("sl-button", { slot: "footer", type: "default", class: sheet$4.classes.DialogButton, onClick: callbacks.onNewFormCancel }, text.cancelButton)),
4455
- states.status === "INACTIVE" && alertMap[states.status],
4456
- h("div", null,
4457
- h("h3", { style: { marginBottom: "0" } }, text.bankingInformationSectionHeader),
4458
- h("div", { class: sheet$4.classes.BankingInformationContainer },
4459
- slots.payoutDetailsCardSlot,
4460
- !states.loading && (h("p", { class: sheet$4.classes.DescriptionText }, text.payoutFromImpact)),
4461
- states.canEditPayoutInfo && (h("sl-button", { disabled: states.disabled || states.loading, exportparts: "base: secondarybutton-base", type: "secondary", class: sheet$4.classes.EditBankDetailsButton, onClick: callbacks.onEditPayoutInfo }, text.editPaymentInformationButton)))),
4462
- (!states.noFormNeeded || !!states.status) && (h("div", { class: sheet$4.classes.TaxDocumentsContainer },
4463
- h("div", null, states.loading ? (h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4464
- h("sqm-skeleton", { width: "15%", height: "10px" }),
4465
- h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
4466
- h("div", null,
4467
- h("span", { class: sheet$4.classes.TaxFormDetailsContainer },
4468
- h("div", { class: sheet$4.classes.StatusContainer },
4469
- h("h3", null, states.documentType
4470
- ? intl.formatMessage({
4471
- id: "section-subheader",
4472
- defaultMessage: text.taxDocumentSectionSubHeader,
4473
- }, {
4474
- documentType: states.documentTypeString,
4475
- })
4476
- : text.taxDocumentSectionSubHeaderNoDocument),
4477
- h("span", { class: sheet$4.classes.StatusAlert }, statusMap[states.status]))),
4478
- (!states.noFormNeeded || !!states.status) &&
4479
- states.status !== "NOT_VERIFIED" && (h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
4480
- h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
4481
- h("sqm-skeleton", { width: "15%", height: "10px" }),
4482
- h("sqm-skeleton", { width: "25%", height: "24px" }))) : (h("div", null,
4483
- h("h3", { class: sheet$4.classes.IndirectTaxPreviewHeaderContainer },
4484
- text.indirectTaxInfoSectionHeader,
4485
- h("sl-dropdown", { placement: "right", distance: 1, ref: dropdownHover, class: sheet$4.classes.DropdownTooltipContainer },
4486
- h("sl-icon", { slot: "trigger", name: "info-circle", class: sheet$4.classes.ToolTip, style: { cursor: "pointer" } }),
4487
- h("div", { class: sheet$4.classes.DropdownContent },
4488
- h("div", { class: sheet$4.classes.DropdownArrow }),
4489
- intl.formatMessage({
4490
- id: "indirectTaxTooltipSupport",
4491
- defaultMessage: text.indirectTaxTooltipSupport,
4492
- }, {
4493
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com`, class: sheet$4.classes.DropdownLink }, text.supportLink)),
4494
- })))),
4495
- h("div", { class: sheet$4.classes.IndirectTaxPreviewDetails },
4496
- h("span", null, states.notRegistered ? (h("span", { class: sheet$4.classes.NotRegisteredIndirectTaxText }, intl.formatMessage({
4497
- id: "notRegisteredForTax",
4498
- defaultMessage: text.notRegisteredForTax,
4499
- }, {
4500
- supportLink: (h("a", { target: "_blank", href: `mailto:advocate-support@impact.com` }, text.supportLink)),
4501
- }))) : (getIndirectTaxRegisteredIn())),
4502
- !states.notRegistered && (h("div", { class: sheet$4.classes.TaxNumberContainer },
4503
- h("span", null, intl.formatMessage({
4504
- id: `indirectTaxDetails`,
4505
- defaultMessage: text.indirectTaxDetails,
4506
- }, {
4507
- indirectTaxType: states.indirectTaxType,
4508
- indirectTaxNumber: states.indirectTaxNumber,
4509
- })),
4510
- h("span", null,
4511
- states.qstNumber &&
4512
- intl.formatMessage({
4513
- id: `qstNumber`,
4514
- defaultMessage: text.qstNumber,
4515
- }, {
4516
- qstNumber: states.qstNumber,
4517
- }),
4518
- states.subRegionTaxNumber &&
4519
- intl.formatMessage({
4520
- id: `subRegionTaxNumber`,
4521
- defaultMessage: text.subRegionTaxNumber,
4522
- }, {
4523
- subRegionTaxNumber: states.subRegionTaxNumber,
4524
- })))),
4525
- !states.notRegistered && (h("div", { class: sheet$4.classes.InvoiceTableContainer },
4526
- h("sqm-invoice-table", { description: text.invoiceDescription, "prev-label": text.invoicePrevLabel, "more-label": text.invoiceMoreLabel, header: text.invoiceHeader, "empty-state-header": text.invoiceEmptyStateHeader, "empty-state-text": text.invoiceEmptyStateText },
4527
- h("sqm-invoice-table-download-column", null),
4528
- h("sqm-invoice-table-date-column", { "column-title": text.dateColumnTitle }),
4529
- h("sqm-invoice-table-data-column", { "column-title": text.invoiceColumnTitle, property: "invoiceId" }),
4530
- h("sqm-invoice-table-data-column", { "column-title": text.earningsColumnTitle, property: "earnings" }),
4531
- h("sqm-invoice-table-data-column", { "column-title": text.indirectTaxColumnTitle, property: "indirectTax" }),
4532
- h("sqm-invoice-table-data-column", { "column-title": text.earningsAfterTaxColumnTitle, property: "netEarnings" })))))))))));
4533
- };
4534
-
4535
3842
  const GET_TAX_SETTING = dist.gql `
4536
3843
  query getTenantSettings {
4537
3844
  tenantSettings {