@stigg/react-sdk 5.5.1 → 5.7.0
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/components/customerPortal/CustomerPortal.d.ts +2 -1
- package/dist/components/customerPortal/CustomerPortalContainer.d.ts +1 -1
- package/dist/components/customerPortal/types.d.ts +1 -0
- package/dist/components/customerPortal/usage/CustomerUsageData.d.ts +3 -2
- package/dist/components/utils/onWheelBlur.d.ts +2 -0
- package/dist/react-sdk.cjs.development.js +20 -12
- package/dist/react-sdk.cjs.development.js.map +1 -1
- package/dist/react-sdk.cjs.production.min.js +1 -1
- package/dist/react-sdk.cjs.production.min.js.map +1 -1
- package/dist/react-sdk.esm.js +20 -12
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/checkout/steps/addons/CheckoutAddonsStep.tsx +2 -0
- package/src/components/checkout/steps/plan/CheckoutChargeList.tsx +2 -1
- package/src/components/common/VolumePerUnitInput.tsx +2 -0
- package/src/components/customerPortal/CustomerPortal.tsx +2 -1
- package/src/components/customerPortal/CustomerPortalContainer.tsx +8 -1
- package/src/components/customerPortal/subscriptionOverview/charges/ChargeItem.tsx +3 -1
- package/src/components/customerPortal/types.ts +2 -0
- package/src/components/customerPortal/usage/CustomerUsageData.tsx +8 -5
- package/src/components/utils/onWheelBlur.ts +3 -0
package/dist/react-sdk.esm.js
CHANGED
|
@@ -1509,6 +1509,10 @@ function ContentLoadingSkeleton() {
|
|
|
1509
1509
|
})))));
|
|
1510
1510
|
}
|
|
1511
1511
|
|
|
1512
|
+
var ON_WHEEL_BLUR = function ON_WHEEL_BLUR(e) {
|
|
1513
|
+
return e.target.blur();
|
|
1514
|
+
};
|
|
1515
|
+
|
|
1512
1516
|
function VolumePerUnitInput(_ref) {
|
|
1513
1517
|
var width = _ref.width,
|
|
1514
1518
|
tierUnits = _ref.tierUnits,
|
|
@@ -1516,6 +1520,7 @@ function VolumePerUnitInput(_ref) {
|
|
|
1516
1520
|
handleChange = _ref.handleChange;
|
|
1517
1521
|
return React__default.createElement(InputField, {
|
|
1518
1522
|
type: "number",
|
|
1523
|
+
onWheel: ON_WHEEL_BLUR,
|
|
1519
1524
|
fullWidth: true,
|
|
1520
1525
|
sx: {
|
|
1521
1526
|
minHeight: '46px',
|
|
@@ -6074,7 +6079,7 @@ function ChargeItem(_ref) {
|
|
|
6074
6079
|
canUpgradeSubscription = _ref.canUpgradeSubscription,
|
|
6075
6080
|
hasCustomSubscription = _ref.hasCustomSubscription;
|
|
6076
6081
|
return React__default.createElement("div", {
|
|
6077
|
-
className: "stigg-charge-list-item",
|
|
6082
|
+
className: "stigg-charge-list-item stigg-charge-list-item-" + entitlement.feature.refId,
|
|
6078
6083
|
style: {
|
|
6079
6084
|
display: 'flex',
|
|
6080
6085
|
flexDirection: 'column',
|
|
@@ -6726,7 +6731,8 @@ function CustomerUsageLoader() {
|
|
|
6726
6731
|
var MAX_BOXES = 6;
|
|
6727
6732
|
function CustomerUsageData(_ref) {
|
|
6728
6733
|
var onManageSubscription = _ref.onManageSubscription,
|
|
6729
|
-
onBuyMore = _ref.onBuyMore
|
|
6734
|
+
onBuyMore = _ref.onBuyMore,
|
|
6735
|
+
filterEntitlements = _ref.filterEntitlements;
|
|
6730
6736
|
|
|
6731
6737
|
var _React$useState = React__default.useState(false),
|
|
6732
6738
|
showAll = _React$useState[0],
|
|
@@ -6764,10 +6770,11 @@ function CustomerUsageData(_ref) {
|
|
|
6764
6770
|
var otherEntitlements = compact(meteredEntitlements == null ? void 0 : meteredEntitlements.filter(function (entitlement) {
|
|
6765
6771
|
return !subscriptionPriceByFeature[entitlement.feature.refId];
|
|
6766
6772
|
}));
|
|
6767
|
-
var sortedEntitlements = [].concat(priceEntitlements, otherEntitlements);
|
|
6773
|
+
var sortedEntitlements = [].concat(priceEntitlements, otherEntitlements);
|
|
6774
|
+
var filteredEntitlements = filterEntitlements ? filterEntitlements(sortedEntitlements) : sortedEntitlements; // 4 -> 3 per row, 6 -> 2 per row
|
|
6768
6775
|
|
|
6769
|
-
var xs =
|
|
6770
|
-
var entitlementsToShow = showAll ?
|
|
6776
|
+
var xs = filteredEntitlements.length > 2 ? 4 : 6;
|
|
6777
|
+
var entitlementsToShow = showAll ? filteredEntitlements : filteredEntitlements.slice(0, MAX_BOXES);
|
|
6771
6778
|
|
|
6772
6779
|
var toggleShowAll = function toggleShowAll() {
|
|
6773
6780
|
return setShowAll(function (prevState) {
|
|
@@ -6805,7 +6812,7 @@ function CustomerUsageData(_ref) {
|
|
|
6805
6812
|
hasCustomSubscription: hasCustomSubscription,
|
|
6806
6813
|
canUpgradeSubscription: canUpgradeSubscription
|
|
6807
6814
|
}));
|
|
6808
|
-
})),
|
|
6815
|
+
})), filteredEntitlements.length > MAX_BOXES && React__default.createElement(Footer, null, React__default.createElement(StyledButton$1, {
|
|
6809
6816
|
className: "stigg-usage-toggle-many-button",
|
|
6810
6817
|
variant: "text",
|
|
6811
6818
|
startIcon: showAll ? React__default.createElement(Minus, null) : React__default.createElement(Plus, null),
|
|
@@ -6819,7 +6826,8 @@ function CustomerPortalContainer(_ref) {
|
|
|
6819
6826
|
onCancelScheduledUpdates = _ref.onCancelScheduledUpdates,
|
|
6820
6827
|
onContactSupport = _ref.onContactSupport,
|
|
6821
6828
|
paywallComponent = _ref.paywallComponent,
|
|
6822
|
-
hiddenSections = _ref.hiddenSections
|
|
6829
|
+
hiddenSections = _ref.hiddenSections,
|
|
6830
|
+
filterEntitlements = _ref.filterEntitlements;
|
|
6823
6831
|
|
|
6824
6832
|
var _useStiggContext = useStiggContext(),
|
|
6825
6833
|
stigg = _useStiggContext.stigg;
|
|
@@ -6875,7 +6883,8 @@ function CustomerPortalContainer(_ref) {
|
|
|
6875
6883
|
cancelScheduledUpdatesButtonTitle: textOverrides.cancelScheduledUpdatesButtonTitle
|
|
6876
6884
|
}), shouldShowUsage && React__default.createElement(CustomerUsageData, {
|
|
6877
6885
|
onManageSubscription: onManageClick,
|
|
6878
|
-
onBuyMore: onBuyMore
|
|
6886
|
+
onBuyMore: onBuyMore,
|
|
6887
|
+
filterEntitlements: filterEntitlements
|
|
6879
6888
|
}), React__default.createElement(CustomerPortalPaywall, {
|
|
6880
6889
|
ref: customerPortalSectionRef,
|
|
6881
6890
|
paywallComponent: paywallComponent,
|
|
@@ -13418,6 +13427,7 @@ function AddonListItem(_ref) {
|
|
|
13418
13427
|
}, "Undo")), isAdded && React__default.createElement(React__default.Fragment, null, React__default.createElement(InputField, {
|
|
13419
13428
|
id: addon.id + "-input",
|
|
13420
13429
|
type: "number",
|
|
13430
|
+
onWheel: ON_WHEEL_BLUR,
|
|
13421
13431
|
sx: {
|
|
13422
13432
|
width: 120,
|
|
13423
13433
|
marginX: 2
|
|
@@ -14013,6 +14023,7 @@ function PlanCharge(_ref) {
|
|
|
14013
14023
|
},
|
|
14014
14024
|
id: featureId + "-input",
|
|
14015
14025
|
type: "number",
|
|
14026
|
+
onWheel: ON_WHEEL_BLUR,
|
|
14016
14027
|
error: !isValid,
|
|
14017
14028
|
helperText: !isValid ? getValidationText(charge, billableFeature == null ? void 0 : billableFeature.quantity) : undefined,
|
|
14018
14029
|
FormHelperTextProps: {
|
|
@@ -14021,10 +14032,7 @@ function PlanCharge(_ref) {
|
|
|
14021
14032
|
}
|
|
14022
14033
|
},
|
|
14023
14034
|
value: (_billableFeature$quan = billableFeature == null ? void 0 : billableFeature.quantity) != null ? _billableFeature$quan : '',
|
|
14024
|
-
onChange: handleQuantityChange
|
|
14025
|
-
onWheel: function onWheel(e) {
|
|
14026
|
-
return e.target.blur();
|
|
14027
|
-
}
|
|
14035
|
+
onChange: handleQuantityChange
|
|
14028
14036
|
});
|
|
14029
14037
|
}
|
|
14030
14038
|
|