@bunnyapp/components 1.2.0 → 1.3.0-beta.3
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
CHANGED
|
@@ -154,7 +154,7 @@ var BrandContext = react.createContext({
|
|
|
154
154
|
});
|
|
155
155
|
|
|
156
156
|
// This will be replaced at build time by rollup-plugin-replace
|
|
157
|
-
var PACKAGE_VERSION = '1.
|
|
157
|
+
var PACKAGE_VERSION = '1.3.0-beta.2';
|
|
158
158
|
var createRequestHeaders = function (token) {
|
|
159
159
|
var headers = common.createClientDevHeaders(token);
|
|
160
160
|
// Add the components version header
|
|
@@ -20472,6 +20472,7 @@ var useCurrentUserData = function (token) {
|
|
|
20472
20472
|
var currentUserData = reactQuery.useQuery({
|
|
20473
20473
|
queryKey: common.QueryKeyFactory.default.currentUserKey(token),
|
|
20474
20474
|
queryFn: function () { return getCurrentUserData({ token: token, apiHost: apiHost }); },
|
|
20475
|
+
enabled: Boolean(token),
|
|
20475
20476
|
}).data;
|
|
20476
20477
|
return currentUserData || {};
|
|
20477
20478
|
};
|
|
@@ -20484,7 +20485,8 @@ var BunnyFooterIcon = function (_a) {
|
|
|
20484
20485
|
var Text$g = antd.Typography.Text;
|
|
20485
20486
|
var Footer = function (_a) {
|
|
20486
20487
|
var className = _a.className;
|
|
20487
|
-
var
|
|
20488
|
+
var token = useToken();
|
|
20489
|
+
var _b = useCurrentUserData(token), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
|
|
20488
20490
|
var isMobile = common.useIsMobile();
|
|
20489
20491
|
return (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxRuntime.jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsxRuntime.jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsxRuntime.jsx(BunnyMarketingLink, {})] })));
|
|
20490
20492
|
};
|
|
@@ -22385,7 +22387,7 @@ var PriceListGridDesktop = function (_a) {
|
|
|
22385
22387
|
var doesPrevPriceListExist = displayPriceLists[index - 1];
|
|
22386
22388
|
if (!priceList)
|
|
22387
22389
|
return jsxRuntime.jsx(PlanPickerGridCell, { noBorder: !Boolean(doesPrevPriceListExist) }, index);
|
|
22388
|
-
return (jsxRuntime.jsx(PriceListCard, { isSelected: priceList.
|
|
22390
|
+
return (jsxRuntime.jsx(PriceListCard, { isSelected: priceList.id === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id), onClick: onChangePriceList, priceList: priceList, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays }, index));
|
|
22389
22391
|
}), (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus) ? (jsxRuntime.jsx(EverythingPlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct })) : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(PlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct }), hasFeatureAddons && (jsxRuntime.jsx(PlanFeatureAddons, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay }))] }))] }))] })));
|
|
22390
22392
|
};
|
|
22391
22393
|
|
package/dist/esm/index.js
CHANGED
|
@@ -143,7 +143,7 @@ var BrandContext = createContext({
|
|
|
143
143
|
});
|
|
144
144
|
|
|
145
145
|
// This will be replaced at build time by rollup-plugin-replace
|
|
146
|
-
var PACKAGE_VERSION = '1.
|
|
146
|
+
var PACKAGE_VERSION = '1.3.0-beta.2';
|
|
147
147
|
var createRequestHeaders = function (token) {
|
|
148
148
|
var headers = createClientDevHeaders(token);
|
|
149
149
|
// Add the components version header
|
|
@@ -20461,6 +20461,7 @@ var useCurrentUserData = function (token) {
|
|
|
20461
20461
|
var currentUserData = useQuery({
|
|
20462
20462
|
queryKey: QueryKeyFactory.default.currentUserKey(token),
|
|
20463
20463
|
queryFn: function () { return getCurrentUserData({ token: token, apiHost: apiHost }); },
|
|
20464
|
+
enabled: Boolean(token),
|
|
20464
20465
|
}).data;
|
|
20465
20466
|
return currentUserData || {};
|
|
20466
20467
|
};
|
|
@@ -20473,7 +20474,8 @@ var BunnyFooterIcon = function (_a) {
|
|
|
20473
20474
|
var Text$g = Typography.Text;
|
|
20474
20475
|
var Footer = function (_a) {
|
|
20475
20476
|
var className = _a.className;
|
|
20476
|
-
var
|
|
20477
|
+
var token = useToken();
|
|
20478
|
+
var _b = useCurrentUserData(token), privacyUrl = _b.privacyUrl, termsUrl = _b.termsUrl;
|
|
20477
20479
|
var isMobile = useIsMobile();
|
|
20478
20480
|
return (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-justify-between bunny-shrink-0 ".concat(isMobile ? 'bunny-flex-col bunny-gap-2' : '', " ").concat(className) }, { children: [(termsUrl || privacyUrl) && (jsxs("div", __assign({ className: "bunny-flex bunny-items-center bunny-gap-3" }, { children: [termsUrl && (jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: termsUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Terms" }))), privacyUrl && (jsx(StyedLink, __assign({ className: "bunny-text-xs bunny-text-slate-400", href: privacyUrl, rel: "noopener noreferrer", target: "_blank", type: "text" }, { children: "Privacy" })))] }))), jsx(BunnyMarketingLink, {})] })));
|
|
20479
20481
|
};
|
|
@@ -22374,7 +22376,7 @@ var PriceListGridDesktop = function (_a) {
|
|
|
22374
22376
|
var doesPrevPriceListExist = displayPriceLists[index - 1];
|
|
22375
22377
|
if (!priceList)
|
|
22376
22378
|
return jsx(PlanPickerGridCell, { noBorder: !Boolean(doesPrevPriceListExist) }, index);
|
|
22377
|
-
return (jsx(PriceListCard, { isSelected: priceList.
|
|
22379
|
+
return (jsx(PriceListCard, { isSelected: priceList.id === (selectedPriceList === null || selectedPriceList === void 0 ? void 0 : selectedPriceList.id), onClick: onChangePriceList, priceList: priceList, subscriptions: subscriptions, trialRemainingDays: trialRemainingDays }, index));
|
|
22378
22380
|
}), (selectedProduct === null || selectedProduct === void 0 ? void 0 : selectedProduct.everythingInPlus) ? (jsx(EverythingPlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct })) : (jsxs(Fragment, { children: [jsx(PlanFeatures, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay, selectedProduct: selectedProduct }), hasFeatureAddons && (jsx(PlanFeatureAddons, { displayPriceLists: displayPriceLists, plansToDisplay: plansToDisplay }))] }))] }))] })));
|
|
22379
22381
|
};
|
|
22380
22382
|
|
package/package.json
CHANGED