@saasquatch/mint-components 2.1.2-0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-fcf5ba5c.js → ShadowViewAddon-6e8188f3.js} +37 -10
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +3 -3
- package/dist/cjs/sqm-big-stat_49.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-big-stat/useBigStat.js +37 -10
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +2 -2
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.js +1 -1
- package/dist/esm/{ShadowViewAddon-9f3162e0.js → ShadowViewAddon-8f13244a.js} +37 -10
- package/dist/esm/sqm-banking-info-form_10.entry.js +3 -3
- package/dist/esm/sqm-big-stat_49.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/ShadowViewAddon-8f13244a.js +1 -0
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_49.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/p-3a3eda5b.system.js +1 -0
- package/dist/mint-components/{p-b52f25ea.system.entry.js → p-42a1eac1.system.entry.js} +1 -1
- package/dist/mint-components/{p-4bea5953.entry.js → p-579119ee.entry.js} +1 -1
- package/dist/mint-components/{p-c96a3520.js → p-ab24d60d.js} +26 -11
- package/dist/mint-components/p-b98c5697.system.entry.js +1 -0
- package/dist/mint-components/{p-008821e1.entry.js → p-ce616af7.entry.js} +1 -1
- package/dist/mint-components/p-d22e43d8.system.js +1 -1
- package/dist/mint-components/{p-5a6ad480.system.entry.js → p-eaa390d4.system.entry.js} +1 -1
- package/dist/mint-components/{p-50045232.entry.js → p-f003c506.entry.js} +7 -7
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.d.ts +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-9f3162e0.js +0 -1
- package/dist/mint-components/p-3284d814.system.entry.js +0 -1
- package/dist/mint-components/p-3af2df67.system.js +0 -1
- package/docs/stats.json +0 -122783
|
@@ -943,8 +943,8 @@ const rewardsExpiredQuery = (programId, locale, type, unit, global = "") => {
|
|
|
943
943
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
944
944
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
945
945
|
return {
|
|
946
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
947
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
946
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyExpiredCredit) || 0,
|
|
947
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyExpiredCredit) || fallback,
|
|
948
948
|
};
|
|
949
949
|
});
|
|
950
950
|
};
|
|
@@ -986,8 +986,8 @@ const rewardsCancelledQuery = (programId, locale, type, unit, global = "") => {
|
|
|
986
986
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
987
987
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
988
988
|
return {
|
|
989
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
990
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
989
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyCancelledCredit) || 0,
|
|
990
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyCancelledCredit) || fallback,
|
|
991
991
|
};
|
|
992
992
|
});
|
|
993
993
|
};
|
|
@@ -1040,13 +1040,14 @@ const parseRewardValueFormat = {
|
|
|
1040
1040
|
};
|
|
1041
1041
|
const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValue", global = "") => {
|
|
1042
1042
|
var _a;
|
|
1043
|
+
const formatType = (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED";
|
|
1043
1044
|
return debugQuery(index_module.dist.gql `
|
|
1044
1045
|
query (
|
|
1045
1046
|
$programId: ID
|
|
1046
1047
|
$type: RewardType!
|
|
1047
1048
|
$unit: String!
|
|
1048
|
-
$format: RewardValueFormatType!
|
|
1049
1049
|
$locale: RSLocale
|
|
1050
|
+
$format: RewardValueFormatType!
|
|
1050
1051
|
) {
|
|
1051
1052
|
fallback: formatRewardPrettyValue(
|
|
1052
1053
|
value: 0
|
|
@@ -1062,7 +1063,8 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1062
1063
|
locale: $locale
|
|
1063
1064
|
) {
|
|
1064
1065
|
... on CreditRewardBalance {
|
|
1065
|
-
|
|
1066
|
+
totalAssignedCredit
|
|
1067
|
+
totalPendingCredit
|
|
1066
1068
|
}
|
|
1067
1069
|
}
|
|
1068
1070
|
}
|
|
@@ -1072,15 +1074,40 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1072
1074
|
programId: !global && programId !== "classic" ? programId : null,
|
|
1073
1075
|
type,
|
|
1074
1076
|
unit,
|
|
1075
|
-
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
1076
1077
|
locale,
|
|
1078
|
+
format: formatType,
|
|
1077
1079
|
}, (res) => {
|
|
1078
|
-
var _a, _b, _c, _d
|
|
1080
|
+
var _a, _b, _c, _d;
|
|
1079
1081
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
1080
1082
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
1083
|
+
const balance = arr === null || arr === void 0 ? void 0 : arr[0];
|
|
1084
|
+
const totalEarned = balance
|
|
1085
|
+
? (balance.totalAssignedCredit || 0) +
|
|
1086
|
+
(balance.totalPendingCredit || 0)
|
|
1087
|
+
: 0;
|
|
1088
|
+
const result = index_module.wn(index_module.dist.gql `
|
|
1089
|
+
query (
|
|
1090
|
+
$value: Int!
|
|
1091
|
+
$unit: String!
|
|
1092
|
+
$locale: RSLocale
|
|
1093
|
+
$format: RewardValueFormatType!
|
|
1094
|
+
) {
|
|
1095
|
+
formatRewardPrettyValue(
|
|
1096
|
+
value: $value
|
|
1097
|
+
unit: $unit
|
|
1098
|
+
locale: $locale
|
|
1099
|
+
formatType: $format
|
|
1100
|
+
)
|
|
1101
|
+
}
|
|
1102
|
+
`, {
|
|
1103
|
+
value: totalEarned,
|
|
1104
|
+
unit,
|
|
1105
|
+
locale,
|
|
1106
|
+
format: formatType,
|
|
1107
|
+
}, res.loading);
|
|
1081
1108
|
return {
|
|
1082
|
-
value:
|
|
1083
|
-
statvalue: ((
|
|
1109
|
+
value: totalEarned,
|
|
1110
|
+
statvalue: ((_d = result === null || result === void 0 ? void 0 : result.data) === null || _d === void 0 ? void 0 : _d.formatRewardPrettyValue) || fallback,
|
|
1084
1111
|
};
|
|
1085
1112
|
});
|
|
1086
1113
|
};
|
|
@@ -117,10 +117,10 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
117
117
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
118
118
|
}, {
|
|
119
119
|
bankCountry,
|
|
120
|
-
}), type: "text", name: "/
|
|
120
|
+
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
121
121
|
class: "error-input",
|
|
122
122
|
helpText: getValidationErrorMessage({
|
|
123
|
-
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.
|
|
123
|
+
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.taxPayerId) === null || _2 === void 0 ? void 0 : _2.type,
|
|
124
124
|
label: props.text.taxPayerIdLabel,
|
|
125
125
|
}),
|
|
126
126
|
}))),
|
|
@@ -4378,7 +4378,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4378
4378
|
documentType: states.documentTypeString || "W-9",
|
|
4379
4379
|
})),
|
|
4380
4380
|
index.h("span", { class: sheet$4.classes.StatusAlert }, statusMap[states.status]))),
|
|
4381
|
-
states.noFormNeeded &&
|
|
4381
|
+
!states.noFormNeeded &&
|
|
4382
4382
|
states.status !== "NOT_VERIFIED" && (index.h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet$4.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
|
|
4383
4383
|
index.h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (index.h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4384
4384
|
index.h("sl-skeleton", { class: sheet$4.classes.SkeletonOne }),
|
|
@@ -26,7 +26,7 @@ const utilities = require('./utilities-84ae62cd.js');
|
|
|
26
26
|
const sqmPortalRegistrationFormView = require('./sqm-portal-registration-form-view-5a96c2f5.js');
|
|
27
27
|
const usePortalRegistrationForm = require('./usePortalRegistrationForm-ce49f0a0.js');
|
|
28
28
|
const ErrorView = require('./ErrorView-3f91e5ab.js');
|
|
29
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
29
|
+
const ShadowViewAddon = require('./ShadowViewAddon-6e8188f3.js');
|
|
30
30
|
require('./sqm-portal-container-view-07e4343f.js');
|
|
31
31
|
const data = require('./data-415c191f.js');
|
|
32
32
|
const extractProps = require('./extractProps-e9c55ba8.js');
|
|
@@ -32,7 +32,7 @@ const sqmPortalResetPasswordView = require('./sqm-portal-reset-password-view-25e
|
|
|
32
32
|
const sqmPortalVerifyEmailView = require('./sqm-portal-verify-email-view-1c4e781f.js');
|
|
33
33
|
require('./ErrorView-3f91e5ab.js');
|
|
34
34
|
const sqmQrCodeView = require('./sqm-qr-code-view-4ccf89da.js');
|
|
35
|
-
const ShadowViewAddon = require('./ShadowViewAddon-
|
|
35
|
+
const ShadowViewAddon = require('./ShadowViewAddon-6e8188f3.js');
|
|
36
36
|
const sqmPortalContainerView = require('./sqm-portal-container-view-07e4343f.js');
|
|
37
37
|
const sqmUserInfoFormView = require('./sqm-user-info-form-view-0dad764d.js');
|
|
38
38
|
const data = require('./data-415c191f.js');
|
|
@@ -590,8 +590,8 @@ const rewardsExpiredQuery = (programId, locale, type, unit, global = "") => {
|
|
|
590
590
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
591
591
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
592
592
|
return {
|
|
593
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
594
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
593
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyExpiredCredit) || 0,
|
|
594
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyExpiredCredit) || fallback,
|
|
595
595
|
};
|
|
596
596
|
});
|
|
597
597
|
};
|
|
@@ -633,8 +633,8 @@ const rewardsCancelledQuery = (programId, locale, type, unit, global = "") => {
|
|
|
633
633
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
634
634
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
635
635
|
return {
|
|
636
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
637
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
636
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyCancelledCredit) || 0,
|
|
637
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyCancelledCredit) || fallback,
|
|
638
638
|
};
|
|
639
639
|
});
|
|
640
640
|
};
|
|
@@ -687,13 +687,14 @@ const parseRewardValueFormat = {
|
|
|
687
687
|
};
|
|
688
688
|
const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValue", global = "") => {
|
|
689
689
|
var _a;
|
|
690
|
+
const formatType = (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED";
|
|
690
691
|
return debugQuery(gql `
|
|
691
692
|
query (
|
|
692
693
|
$programId: ID
|
|
693
694
|
$type: RewardType!
|
|
694
695
|
$unit: String!
|
|
695
|
-
$format: RewardValueFormatType!
|
|
696
696
|
$locale: RSLocale
|
|
697
|
+
$format: RewardValueFormatType!
|
|
697
698
|
) {
|
|
698
699
|
fallback: formatRewardPrettyValue(
|
|
699
700
|
value: 0
|
|
@@ -709,7 +710,8 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
709
710
|
locale: $locale
|
|
710
711
|
) {
|
|
711
712
|
... on CreditRewardBalance {
|
|
712
|
-
|
|
713
|
+
totalAssignedCredit
|
|
714
|
+
totalPendingCredit
|
|
713
715
|
}
|
|
714
716
|
}
|
|
715
717
|
}
|
|
@@ -719,15 +721,40 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
719
721
|
programId: !global && programId !== "classic" ? programId : null,
|
|
720
722
|
type,
|
|
721
723
|
unit,
|
|
722
|
-
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
723
724
|
locale,
|
|
725
|
+
format: formatType,
|
|
724
726
|
}, (res) => {
|
|
725
|
-
var _a, _b, _c, _d
|
|
727
|
+
var _a, _b, _c, _d;
|
|
726
728
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
727
729
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
730
|
+
const balance = arr === null || arr === void 0 ? void 0 : arr[0];
|
|
731
|
+
const totalEarned = balance
|
|
732
|
+
? (balance.totalAssignedCredit || 0) +
|
|
733
|
+
(balance.totalPendingCredit || 0)
|
|
734
|
+
: 0;
|
|
735
|
+
const result = useQuery(gql `
|
|
736
|
+
query (
|
|
737
|
+
$value: Int!
|
|
738
|
+
$unit: String!
|
|
739
|
+
$locale: RSLocale
|
|
740
|
+
$format: RewardValueFormatType!
|
|
741
|
+
) {
|
|
742
|
+
formatRewardPrettyValue(
|
|
743
|
+
value: $value
|
|
744
|
+
unit: $unit
|
|
745
|
+
locale: $locale
|
|
746
|
+
formatType: $format
|
|
747
|
+
)
|
|
748
|
+
}
|
|
749
|
+
`, {
|
|
750
|
+
value: totalEarned,
|
|
751
|
+
unit,
|
|
752
|
+
locale,
|
|
753
|
+
format: formatType,
|
|
754
|
+
}, res.loading);
|
|
728
755
|
return {
|
|
729
|
-
value:
|
|
730
|
-
statvalue: ((
|
|
756
|
+
value: totalEarned,
|
|
757
|
+
statvalue: ((_d = result === null || result === void 0 ? void 0 : result.data) === null || _d === void 0 ? void 0 : _d.formatRewardPrettyValue) || fallback,
|
|
731
758
|
};
|
|
732
759
|
});
|
|
733
760
|
};
|
|
@@ -96,10 +96,10 @@ export function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
96
96
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
97
97
|
}, {
|
|
98
98
|
bankCountry,
|
|
99
|
-
}), type: "text", name: "/
|
|
99
|
+
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
100
100
|
class: "error-input",
|
|
101
101
|
helpText: getValidationErrorMessage({
|
|
102
|
-
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.
|
|
102
|
+
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.taxPayerId) === null || _2 === void 0 ? void 0 : _2.type,
|
|
103
103
|
label: props.text.taxPayerIdLabel,
|
|
104
104
|
}),
|
|
105
105
|
}))),
|
|
@@ -656,7 +656,7 @@ export const TaxAndCashDashboardView = (props) => {
|
|
|
656
656
|
documentType: states.documentTypeString || "W-9",
|
|
657
657
|
})),
|
|
658
658
|
h("span", { class: sheet.classes.StatusAlert }, statusMap[states.status]))),
|
|
659
|
-
states.noFormNeeded &&
|
|
659
|
+
!states.noFormNeeded &&
|
|
660
660
|
states.status !== "NOT_VERIFIED" && (h("sl-button", { disabled: states.disabled || states.loading, onClick: callbacks.onClick, type: "default", class: sheet.classes.NewFormButton, exportparts: "base: primarybutton-base" }, text.newFormButton)))))))),
|
|
661
661
|
h("div", { class: sheet.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet.classes.TaxSectionSkeletonContainer },
|
|
662
662
|
h("sl-skeleton", { class: sheet.classes.SkeletonOne }),
|
|
@@ -941,8 +941,8 @@ const rewardsExpiredQuery = (programId, locale, type, unit, global = "") => {
|
|
|
941
941
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
942
942
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
943
943
|
return {
|
|
944
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
945
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
944
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyExpiredCredit) || 0,
|
|
945
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyExpiredCredit) || fallback,
|
|
946
946
|
};
|
|
947
947
|
});
|
|
948
948
|
};
|
|
@@ -984,8 +984,8 @@ const rewardsCancelledQuery = (programId, locale, type, unit, global = "") => {
|
|
|
984
984
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
985
985
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
986
986
|
return {
|
|
987
|
-
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.
|
|
988
|
-
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.
|
|
987
|
+
value: ((_d = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _d === void 0 ? void 0 : _d.prettyCancelledCredit) || 0,
|
|
988
|
+
statvalue: ((_e = arr === null || arr === void 0 ? void 0 : arr[0]) === null || _e === void 0 ? void 0 : _e.prettyCancelledCredit) || fallback,
|
|
989
989
|
};
|
|
990
990
|
});
|
|
991
991
|
};
|
|
@@ -1038,13 +1038,14 @@ const parseRewardValueFormat = {
|
|
|
1038
1038
|
};
|
|
1039
1039
|
const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValue", global = "") => {
|
|
1040
1040
|
var _a;
|
|
1041
|
+
const formatType = (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED";
|
|
1041
1042
|
return debugQuery(dist.gql `
|
|
1042
1043
|
query (
|
|
1043
1044
|
$programId: ID
|
|
1044
1045
|
$type: RewardType!
|
|
1045
1046
|
$unit: String!
|
|
1046
|
-
$format: RewardValueFormatType!
|
|
1047
1047
|
$locale: RSLocale
|
|
1048
|
+
$format: RewardValueFormatType!
|
|
1048
1049
|
) {
|
|
1049
1050
|
fallback: formatRewardPrettyValue(
|
|
1050
1051
|
value: 0
|
|
@@ -1060,7 +1061,8 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1060
1061
|
locale: $locale
|
|
1061
1062
|
) {
|
|
1062
1063
|
... on CreditRewardBalance {
|
|
1063
|
-
|
|
1064
|
+
totalAssignedCredit
|
|
1065
|
+
totalPendingCredit
|
|
1064
1066
|
}
|
|
1065
1067
|
}
|
|
1066
1068
|
}
|
|
@@ -1070,15 +1072,40 @@ const rewardsBalanceQuery = (programId, locale, type, unit, format = "prettyValu
|
|
|
1070
1072
|
programId: !global && programId !== "classic" ? programId : null,
|
|
1071
1073
|
type,
|
|
1072
1074
|
unit,
|
|
1073
|
-
format: (_a = parseRewardValueFormat[format]) !== null && _a !== void 0 ? _a : "UNIT_FORMATTED",
|
|
1074
1075
|
locale,
|
|
1076
|
+
format: formatType,
|
|
1075
1077
|
}, (res) => {
|
|
1076
|
-
var _a, _b, _c, _d
|
|
1078
|
+
var _a, _b, _c, _d;
|
|
1077
1079
|
const arr = (_b = (_a = res.data) === null || _a === void 0 ? void 0 : _a.viewer) === null || _b === void 0 ? void 0 : _b.rewardBalanceDetails;
|
|
1078
1080
|
const fallback = (_c = res.data) === null || _c === void 0 ? void 0 : _c.fallback;
|
|
1081
|
+
const balance = arr === null || arr === void 0 ? void 0 : arr[0];
|
|
1082
|
+
const totalEarned = balance
|
|
1083
|
+
? (balance.totalAssignedCredit || 0) +
|
|
1084
|
+
(balance.totalPendingCredit || 0)
|
|
1085
|
+
: 0;
|
|
1086
|
+
const result = wn(dist.gql `
|
|
1087
|
+
query (
|
|
1088
|
+
$value: Int!
|
|
1089
|
+
$unit: String!
|
|
1090
|
+
$locale: RSLocale
|
|
1091
|
+
$format: RewardValueFormatType!
|
|
1092
|
+
) {
|
|
1093
|
+
formatRewardPrettyValue(
|
|
1094
|
+
value: $value
|
|
1095
|
+
unit: $unit
|
|
1096
|
+
locale: $locale
|
|
1097
|
+
formatType: $format
|
|
1098
|
+
)
|
|
1099
|
+
}
|
|
1100
|
+
`, {
|
|
1101
|
+
value: totalEarned,
|
|
1102
|
+
unit,
|
|
1103
|
+
locale,
|
|
1104
|
+
format: formatType,
|
|
1105
|
+
}, res.loading);
|
|
1079
1106
|
return {
|
|
1080
|
-
value:
|
|
1081
|
-
statvalue: ((
|
|
1107
|
+
value: totalEarned,
|
|
1108
|
+
statvalue: ((_d = result === null || result === void 0 ? void 0 : result.data) === null || _d === void 0 ? void 0 : _d.formatRewardPrettyValue) || fallback,
|
|
1082
1109
|
};
|
|
1083
1110
|
});
|
|
1084
1111
|
};
|
|
@@ -113,10 +113,10 @@ function getFormMap({ props, getValidationErrorMessage, bankCountry, }) {
|
|
|
113
113
|
defaultMessage: props.text.taxPayerIdLabel,
|
|
114
114
|
}, {
|
|
115
115
|
bankCountry,
|
|
116
|
-
}), type: "text", name: "/
|
|
116
|
+
}), type: "text", name: "/taxPayerId", id: "taxPayerId", key: "taxPayerId" }, (((_0 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _0 === void 0 ? void 0 : _0.taxPayerId) && {
|
|
117
117
|
class: "error-input",
|
|
118
118
|
helpText: getValidationErrorMessage({
|
|
119
|
-
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.
|
|
119
|
+
type: (_2 = (_1 = errors === null || errors === void 0 ? void 0 : errors.inputErrors) === null || _1 === void 0 ? void 0 : _1.taxPayerId) === null || _2 === void 0 ? void 0 : _2.type,
|
|
120
120
|
label: props.text.taxPayerIdLabel,
|
|
121
121
|
}),
|
|
122
122
|
}))),
|
|
@@ -4374,7 +4374,7 @@ const TaxAndCashDashboardView = (props) => {
|
|
|
4374
4374
|
documentType: states.documentTypeString || "W-9",
|
|
4375
4375
|
})),
|
|
4376
4376
|
h("span", { class: sheet$4.classes.StatusAlert }, statusMap[states.status]))),
|
|
4377
|
-
states.noFormNeeded &&
|
|
4377
|
+
!states.noFormNeeded &&
|
|
4378
4378
|
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)))))))),
|
|
4379
4379
|
h("div", { class: sheet$4.classes.IndirectTaxPreviewContainer }, states.loading ? (h("div", { class: sheet$4.classes.TaxSectionSkeletonContainer },
|
|
4380
4380
|
h("sl-skeleton", { class: sheet$4.classes.SkeletonOne }),
|
|
@@ -22,7 +22,7 @@ import { i as isEmpty } from './utilities-d71fe436.js';
|
|
|
22
22
|
import { P as PortalRegistrationFormView } from './sqm-portal-registration-form-view-8bdc3804.js';
|
|
23
23
|
import { A as AsYouType, u as usePortalRegistrationForm } from './usePortalRegistrationForm-e61f190a.js';
|
|
24
24
|
import { E as ErrorView } from './ErrorView-bbf0a042.js';
|
|
25
|
-
import { u as useDemoBigStat, Y as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, f as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, W as LeadDropdownFieldView, V as LeadFormView, Z as withShadowView, L as LeaderboardView, N as NameFieldsView, g as ChangeMarktingView, P as PortalChangePasswordView, h as PortalFooterView, i as PortalForgotPasswordView, j as PortalFrameView, k as PortalLoginView, c as BaseRegistrationFormView, e as PortalRegisterView, R as ReferralIframeView, l as RewardExchangeView, _ as demoRewardExchange, M as useShareButton, a as ShareButtonView, O as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-
|
|
25
|
+
import { u as useDemoBigStat, Y as useBigStat, B as BigStatView, C as CardFeedView, d as CheckboxFieldView, f as CouponCodeView, D as DropdownFieldView, E as EditProfileView, H as HeroView, I as InputFieldView, W as LeadDropdownFieldView, V as LeadFormView, Z as withShadowView, L as LeaderboardView, N as NameFieldsView, g as ChangeMarktingView, P as PortalChangePasswordView, h as PortalFooterView, i as PortalForgotPasswordView, j as PortalFrameView, k as PortalLoginView, c as BaseRegistrationFormView, e as PortalRegisterView, R as ReferralIframeView, l as RewardExchangeView, _ as demoRewardExchange, M as useShareButton, a as ShareButtonView, O as useShareLink, S as StatContainerView, T as TaskCardView } from './ShadowViewAddon-8f13244a.js';
|
|
26
26
|
import './sqm-portal-container-view-176e92e3.js';
|
|
27
27
|
import { T as TAX_CONTEXT_NAMESPACE, a as TAX_FORM_CONTEXT_NAMESPACE, U as USER_FORM_CONTEXT_NAMESPACE, C as CURRENCIES_NAMESPACE, b as COUNTRIES_NAMESPACE, S as SORTED_COUNTRIES_NAMESPACE, g as getCountryObj, c as USER_QUERY_NAMESPACE, G as GET_USER$2, d as COUNTRIES_QUERY_NAMESPACE, e as GET_COUNTRIES, h as FINANCE_NETWORK_SETTINGS_NAMESPACE, i as GET_FINANCE_NETWORK_SETTINGS, j as CURRENCIES_QUERY_NAMESPACE, k as GET_CURRENCIES, L as LoadingView } from './data-32f88c60.js';
|
|
28
28
|
import { p as parseStates, e as extractProps } from './extractProps-54064fb0.js';
|
|
@@ -28,7 +28,7 @@ import { P as PortalResetPasswordView } from './sqm-portal-reset-password-view-a
|
|
|
28
28
|
import { P as PortalVerifyEmailView } from './sqm-portal-verify-email-view-33805220.js';
|
|
29
29
|
import './ErrorView-bbf0a042.js';
|
|
30
30
|
import { Q as QrCodeView } from './sqm-qr-code-view-ea505213.js';
|
|
31
|
-
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as PortalRegisterView, f as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, g as ChangeMarktingView, h as PortalFooterView, i as PortalForgotPasswordView, j as PortalFrameView, k as PortalLoginView, R as ReferralIframeView, l as RewardExchangeView, r as rewardExchangeCustomErrorMsg, m as rewardExchangeLongText, n as rewardExchangeSelected, o as chooseAmountFixed, p as chooseAmountFixedNoDescription, q as chooseAmountVariable, s as chooseAmountVariableNoDescription, t as chooseAmountVariableDisabled, v as chooseAmountVariableUnavailable, w as confirmFixed, x as confirmVariable, y as redemptionError, z as queryError, A as success, F as successVariable, G as loading, J as empty$1, K as rewardExchange, M as useShareButton, O as useShareLink, Q as ProgressBarView, U as ProgressBar$2, V as LeadFormView, W as LeadDropdownFieldView, X as ShadowViewAddon } from './ShadowViewAddon-
|
|
31
|
+
import { S as StatContainerView, B as BigStatView, a as ShareButtonView, P as PortalChangePasswordView, b as PoweredByImg$1, c as BaseRegistrationFormView, u as useDemoBigStat, T as TaskCardView, C as CardFeedView, d as CheckboxFieldView, e as PortalRegisterView, f as CouponCodeView, D as DropdownFieldView, E as EditProfileView, L as LeaderboardView, H as HeroView, I as InputFieldView, N as NameFieldsView, g as ChangeMarktingView, h as PortalFooterView, i as PortalForgotPasswordView, j as PortalFrameView, k as PortalLoginView, R as ReferralIframeView, l as RewardExchangeView, r as rewardExchangeCustomErrorMsg, m as rewardExchangeLongText, n as rewardExchangeSelected, o as chooseAmountFixed, p as chooseAmountFixedNoDescription, q as chooseAmountVariable, s as chooseAmountVariableNoDescription, t as chooseAmountVariableDisabled, v as chooseAmountVariableUnavailable, w as confirmFixed, x as confirmVariable, y as redemptionError, z as queryError, A as success, F as successVariable, G as loading, J as empty$1, K as rewardExchange, M as useShareButton, O as useShareLink, Q as ProgressBarView, U as ProgressBar$2, V as LeadFormView, W as LeadDropdownFieldView, X as ShadowViewAddon } from './ShadowViewAddon-8f13244a.js';
|
|
32
32
|
import { P as PortalContainerView, a as PortalSectionView } from './sqm-portal-container-view-176e92e3.js';
|
|
33
33
|
import { I as InvoiceTableView, a as INDIRECT_TAX_SPAIN_REGIONS, b as INDIRECT_TAX_PROVINCES, O as OtherRegionSlotView, U as UserInfoFormView$1 } from './sqm-user-info-form-view-ae6e2ab2.js';
|
|
34
34
|
import { t as taxTypeToName, L as LoadingView } from './data-32f88c60.js';
|