@bunnyapp/components 1.7.0-beta.22 → 1.7.0-beta.23
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/index.js +4 -3
- package/dist/esm/index.js +4 -3
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1283,7 +1283,7 @@ const DEFAULT_CONFIG = {
|
|
|
1283
1283
|
};
|
|
1284
1284
|
|
|
1285
1285
|
// This will be replaced at build time by rollup-plugin-replace
|
|
1286
|
-
const PACKAGE_VERSION = '1.7.0-beta.
|
|
1286
|
+
const PACKAGE_VERSION = '1.7.0-beta.22';
|
|
1287
1287
|
const createRequestHeaders = (token) => {
|
|
1288
1288
|
const headers = createClientDevHeaders({ token });
|
|
1289
1289
|
// Add the components version header
|
|
@@ -27084,7 +27084,7 @@ const createAvailableBillingPeriods_SubscriptionFragment = t(`
|
|
|
27084
27084
|
}
|
|
27085
27085
|
`);
|
|
27086
27086
|
const createAvailableBillingPeriods = (priceLists, selectedProduct, maskedUpgradingSubscription) => {
|
|
27087
|
-
var _a, _b, _c, _d;
|
|
27087
|
+
var _a, _b, _c, _d, _e;
|
|
27088
27088
|
// Read fragment
|
|
27089
27089
|
const upgradingSubscription = readFragment(createAvailableBillingPeriods_SubscriptionFragment, maskedUpgradingSubscription);
|
|
27090
27090
|
if (((_b = (_a = upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.addon) === true) {
|
|
@@ -27092,7 +27092,8 @@ const createAvailableBillingPeriods = (priceLists, selectedProduct, maskedUpgrad
|
|
|
27092
27092
|
? [(_d = upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList) === null || _d === void 0 ? void 0 : _d.periodMonths]
|
|
27093
27093
|
: undefined;
|
|
27094
27094
|
}
|
|
27095
|
-
const availablePriceLists = priceLists === null || priceLists === void 0 ? void 0 : priceLists.filter(priceList => priceList.product.id === (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id))
|
|
27095
|
+
const availablePriceLists = (_e = priceLists === null || priceLists === void 0 ? void 0 : priceLists.filter(priceList => priceList.product.id === (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id)) // only show price lists for the selected product
|
|
27096
|
+
) === null || _e === void 0 ? void 0 : _e.filter(priceList => priceList.periodMonths !== 0).map(priceList => priceList.periodMonths).sort((a, b) => a - b).filter((currentValue, index, array) => index === array.indexOf(currentValue));
|
|
27096
27097
|
return availablePriceLists;
|
|
27097
27098
|
};
|
|
27098
27099
|
|
package/dist/esm/index.js
CHANGED
|
@@ -1281,7 +1281,7 @@ const DEFAULT_CONFIG = {
|
|
|
1281
1281
|
};
|
|
1282
1282
|
|
|
1283
1283
|
// This will be replaced at build time by rollup-plugin-replace
|
|
1284
|
-
const PACKAGE_VERSION = '1.7.0-beta.
|
|
1284
|
+
const PACKAGE_VERSION = '1.7.0-beta.22';
|
|
1285
1285
|
const createRequestHeaders = (token) => {
|
|
1286
1286
|
const headers = createClientDevHeaders({ token });
|
|
1287
1287
|
// Add the components version header
|
|
@@ -27082,7 +27082,7 @@ const createAvailableBillingPeriods_SubscriptionFragment = t(`
|
|
|
27082
27082
|
}
|
|
27083
27083
|
`);
|
|
27084
27084
|
const createAvailableBillingPeriods = (priceLists, selectedProduct, maskedUpgradingSubscription) => {
|
|
27085
|
-
var _a, _b, _c, _d;
|
|
27085
|
+
var _a, _b, _c, _d, _e;
|
|
27086
27086
|
// Read fragment
|
|
27087
27087
|
const upgradingSubscription = readFragment(createAvailableBillingPeriods_SubscriptionFragment, maskedUpgradingSubscription);
|
|
27088
27088
|
if (((_b = (_a = upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList) === null || _a === void 0 ? void 0 : _a.plan) === null || _b === void 0 ? void 0 : _b.addon) === true) {
|
|
@@ -27090,7 +27090,8 @@ const createAvailableBillingPeriods = (priceLists, selectedProduct, maskedUpgrad
|
|
|
27090
27090
|
? [(_d = upgradingSubscription === null || upgradingSubscription === void 0 ? void 0 : upgradingSubscription.priceList) === null || _d === void 0 ? void 0 : _d.periodMonths]
|
|
27091
27091
|
: undefined;
|
|
27092
27092
|
}
|
|
27093
|
-
const availablePriceLists = priceLists === null || priceLists === void 0 ? void 0 : priceLists.filter(priceList => priceList.product.id === (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id))
|
|
27093
|
+
const availablePriceLists = (_e = priceLists === null || priceLists === void 0 ? void 0 : priceLists.filter(priceList => priceList.product.id === (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.id)) // only show price lists for the selected product
|
|
27094
|
+
) === null || _e === void 0 ? void 0 : _e.filter(priceList => priceList.periodMonths !== 0).map(priceList => priceList.periodMonths).sort((a, b) => a - b).filter((currentValue, index, array) => index === array.indexOf(currentValue));
|
|
27094
27095
|
return availablePriceLists;
|
|
27095
27096
|
};
|
|
27096
27097
|
|
package/package.json
CHANGED