@bigbinary/neeto-molecules 5.3.18 → 5.3.20
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/FloatingActionMenu.js +12 -10
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/FloatingActionMenu.js +12 -10
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/urls-DtjJggEY.js +19 -0
- package/dist/cjs/urls-DtjJggEY.js.map +1 -0
- package/dist/cjs/v2/FloatingActionMenu.js +10 -9
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/urls-DC61u0b2.js +16 -0
- package/dist/urls-DC61u0b2.js.map +1 -0
- package/dist/v2/FloatingActionMenu.js +10 -9
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/package.json +1 -1
- package/dist/cjs/urls-CC4qs7hW.js +0 -11
- package/dist/cjs/urls-CC4qs7hW.js.map +0 -1
- package/dist/urls-CN1MpSwF.js +0 -9
- package/dist/urls-CN1MpSwF.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"urls-DtjJggEY.js","sources":["../../src/utils/urls.js"],"sourcesContent":["import { isPresent } from \"neetocist\";\nimport { toLower } from \"ramda\";\n\nexport const getNeetoUrl = subdomain =>\n `https://${subdomain}.${toLower(globalProps?.appName || \"\")}.com`;\n\nexport const getProductBillingUrl = () => {\n const billingOverviewUrl = `${globalProps.organization?.authAppUrl}/admin/billing/overview`;\n const productSlug = toLower(globalProps.appName || \"\");\n\n return isPresent(productSlug)\n ? `${billingOverviewUrl}/products/${productSlug}`\n : billingOverviewUrl;\n};\n"],"names":["getNeetoUrl","subdomain","_globalProps","concat","toLower","globalProps","appName","getProductBillingUrl","_globalProps$organiza","billingOverviewUrl","organization","authAppUrl","productSlug","isPresent"],"mappings":";;;;;IAGaA,WAAW,GAAG,SAAdA,WAAWA,CAAGC,SAAS,EAAA;AAAA,EAAA,IAAAC,YAAA;EAAA,OAAA,UAAA,CAAAC,MAAA,CACvBF,SAAS,EAAA,GAAA,CAAA,CAAAE,MAAA,CAAIC,aAAO,CAAC,CAAA,CAAAF,YAAA,GAAAG,WAAW,MAAA,IAAA,IAAAH,YAAA,KAAA,MAAA,GAAA,MAAA,GAAXA,YAAA,CAAaI,OAAO,KAAI,EAAE,CAAC,EAAA,MAAA,CAAA;AAAA;IAEhDC,oBAAoB,GAAG,SAAvBA,oBAAoBA,GAAS;AAAA,EAAA,IAAAC,qBAAA;AACxC,EAAA,IAAMC,kBAAkB,GAAA,EAAA,CAAAN,MAAA,CAAA,CAAAK,qBAAA,GAAMH,WAAW,CAACK,YAAY,cAAAF,qBAAA,KAAA,MAAA,GAAA,MAAA,GAAxBA,qBAAA,CAA0BG,UAAU,EAAA,yBAAA,CAAyB;EAC3F,IAAMC,WAAW,GAAGR,aAAO,CAACC,WAAW,CAACC,OAAO,IAAI,EAAE,CAAC;AAEtD,EAAA,OAAOO,mBAAS,CAACD,WAAW,CAAC,GAAA,EAAA,CAAAT,MAAA,CACtBM,kBAAkB,EAAA,YAAA,CAAA,CAAAN,MAAA,CAAaS,WAAW,IAC7CH,kBAAkB;AACxB;;;;;"}
|
|
@@ -23,8 +23,8 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
23
23
|
var reactQuery = require('@tanstack/react-query');
|
|
24
24
|
var axios = require('axios');
|
|
25
25
|
var search = require('../search-DoXqXFel.js');
|
|
26
|
+
var urls = require('../urls-DtjJggEY.js');
|
|
26
27
|
var useBreakpoints = require('@bigbinary/neeto-commons-frontend/v2/react-utils/useBreakpoints');
|
|
27
|
-
var urls = require('../urls-CC4qs7hW.js');
|
|
28
28
|
var i18next = require('i18next');
|
|
29
29
|
var createLucideIcon = require('../createLucideIcon-BbuuRL2u.js');
|
|
30
30
|
var circleQuestionMark = require('../circle-question-mark-BijjM_4y.js');
|
|
@@ -1354,29 +1354,30 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1354
1354
|
var isAuthenticated = profileInfo.isAuthenticated;
|
|
1355
1355
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1356
1356
|
t = _useTranslation.t;
|
|
1357
|
-
|
|
1358
|
-
|
|
1357
|
+
|
|
1358
|
+
// A paid plan can be named more than one thing, so the badge follows the
|
|
1359
|
+
// isPro flag the backend sends alongside the plan; the plan name is display
|
|
1360
|
+
// text only.
|
|
1361
|
+
var isPro = Boolean((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.isPro);
|
|
1359
1362
|
var isOwner = (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.isOwner;
|
|
1360
|
-
var showUpgradeModal =
|
|
1363
|
+
var showUpgradeModal = !isPro && enableSubscriptionUpgradeRequest && !isOwner;
|
|
1361
1364
|
var getSubscriptionPlanAction = function getSubscriptionPlanAction() {
|
|
1362
1365
|
if (showUpgradeModal) return {
|
|
1363
1366
|
onClick: openUpgradeModal
|
|
1364
1367
|
};
|
|
1365
|
-
if (
|
|
1366
|
-
var _globalProps$organiza;
|
|
1368
|
+
if (!isPro && isOwner && enableSubscriptionUpgradeRequest) {
|
|
1367
1369
|
return {
|
|
1368
|
-
href:
|
|
1370
|
+
href: urls.getProductBillingUrl()
|
|
1369
1371
|
};
|
|
1370
1372
|
}
|
|
1371
1373
|
return {
|
|
1372
1374
|
href: NEETO_AUTH_BILLING_INFO_URL
|
|
1373
1375
|
};
|
|
1374
1376
|
};
|
|
1375
|
-
var isProPlan = normalizedPlan === "pro";
|
|
1376
1377
|
var subscriptionPlanLink = _objectSpread$2({
|
|
1377
1378
|
label: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1378
1379
|
className: "flex items-center gap-2",
|
|
1379
|
-
children: [globalProps.appName,
|
|
1380
|
+
children: [globalProps.appName, isPro ? /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Badge, {
|
|
1380
1381
|
label: neetoCist.humanize((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan),
|
|
1381
1382
|
style: {
|
|
1382
1383
|
"--accent-foreground": "var(--color-amber-950)"
|