@stigg/react-sdk 5.5.1 → 5.6.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/react-sdk.cjs.development.js +12 -8
- 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 +12 -8
- package/dist/react-sdk.esm.js.map +1 -1
- package/package.json +1 -1
- 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/dist/react-sdk.esm.js
CHANGED
|
@@ -6074,7 +6074,7 @@ function ChargeItem(_ref) {
|
|
|
6074
6074
|
canUpgradeSubscription = _ref.canUpgradeSubscription,
|
|
6075
6075
|
hasCustomSubscription = _ref.hasCustomSubscription;
|
|
6076
6076
|
return React__default.createElement("div", {
|
|
6077
|
-
className: "stigg-charge-list-item",
|
|
6077
|
+
className: "stigg-charge-list-item stigg-charge-list-item-" + entitlement.feature.refId,
|
|
6078
6078
|
style: {
|
|
6079
6079
|
display: 'flex',
|
|
6080
6080
|
flexDirection: 'column',
|
|
@@ -6726,7 +6726,8 @@ function CustomerUsageLoader() {
|
|
|
6726
6726
|
var MAX_BOXES = 6;
|
|
6727
6727
|
function CustomerUsageData(_ref) {
|
|
6728
6728
|
var onManageSubscription = _ref.onManageSubscription,
|
|
6729
|
-
onBuyMore = _ref.onBuyMore
|
|
6729
|
+
onBuyMore = _ref.onBuyMore,
|
|
6730
|
+
filterEntitlements = _ref.filterEntitlements;
|
|
6730
6731
|
|
|
6731
6732
|
var _React$useState = React__default.useState(false),
|
|
6732
6733
|
showAll = _React$useState[0],
|
|
@@ -6764,10 +6765,11 @@ function CustomerUsageData(_ref) {
|
|
|
6764
6765
|
var otherEntitlements = compact(meteredEntitlements == null ? void 0 : meteredEntitlements.filter(function (entitlement) {
|
|
6765
6766
|
return !subscriptionPriceByFeature[entitlement.feature.refId];
|
|
6766
6767
|
}));
|
|
6767
|
-
var sortedEntitlements = [].concat(priceEntitlements, otherEntitlements);
|
|
6768
|
+
var sortedEntitlements = [].concat(priceEntitlements, otherEntitlements);
|
|
6769
|
+
var filteredEntitlements = filterEntitlements ? filterEntitlements(sortedEntitlements) : sortedEntitlements; // 4 -> 3 per row, 6 -> 2 per row
|
|
6768
6770
|
|
|
6769
|
-
var xs =
|
|
6770
|
-
var entitlementsToShow = showAll ?
|
|
6771
|
+
var xs = filteredEntitlements.length > 2 ? 4 : 6;
|
|
6772
|
+
var entitlementsToShow = showAll ? filteredEntitlements : filteredEntitlements.slice(0, MAX_BOXES);
|
|
6771
6773
|
|
|
6772
6774
|
var toggleShowAll = function toggleShowAll() {
|
|
6773
6775
|
return setShowAll(function (prevState) {
|
|
@@ -6805,7 +6807,7 @@ function CustomerUsageData(_ref) {
|
|
|
6805
6807
|
hasCustomSubscription: hasCustomSubscription,
|
|
6806
6808
|
canUpgradeSubscription: canUpgradeSubscription
|
|
6807
6809
|
}));
|
|
6808
|
-
})),
|
|
6810
|
+
})), filteredEntitlements.length > MAX_BOXES && React__default.createElement(Footer, null, React__default.createElement(StyledButton$1, {
|
|
6809
6811
|
className: "stigg-usage-toggle-many-button",
|
|
6810
6812
|
variant: "text",
|
|
6811
6813
|
startIcon: showAll ? React__default.createElement(Minus, null) : React__default.createElement(Plus, null),
|
|
@@ -6819,7 +6821,8 @@ function CustomerPortalContainer(_ref) {
|
|
|
6819
6821
|
onCancelScheduledUpdates = _ref.onCancelScheduledUpdates,
|
|
6820
6822
|
onContactSupport = _ref.onContactSupport,
|
|
6821
6823
|
paywallComponent = _ref.paywallComponent,
|
|
6822
|
-
hiddenSections = _ref.hiddenSections
|
|
6824
|
+
hiddenSections = _ref.hiddenSections,
|
|
6825
|
+
filterEntitlements = _ref.filterEntitlements;
|
|
6823
6826
|
|
|
6824
6827
|
var _useStiggContext = useStiggContext(),
|
|
6825
6828
|
stigg = _useStiggContext.stigg;
|
|
@@ -6875,7 +6878,8 @@ function CustomerPortalContainer(_ref) {
|
|
|
6875
6878
|
cancelScheduledUpdatesButtonTitle: textOverrides.cancelScheduledUpdatesButtonTitle
|
|
6876
6879
|
}), shouldShowUsage && React__default.createElement(CustomerUsageData, {
|
|
6877
6880
|
onManageSubscription: onManageClick,
|
|
6878
|
-
onBuyMore: onBuyMore
|
|
6881
|
+
onBuyMore: onBuyMore,
|
|
6882
|
+
filterEntitlements: filterEntitlements
|
|
6879
6883
|
}), React__default.createElement(CustomerPortalPaywall, {
|
|
6880
6884
|
ref: customerPortalSectionRef,
|
|
6881
6885
|
paywallComponent: paywallComponent,
|