@bigbinary/neeto-molecules 5.3.35 → 5.4.1
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 +136 -7
- package/dist/FloatingActionMenu.js.map +1 -1
- package/dist/Sidebar.js +1 -1
- package/dist/cjs/FloatingActionMenu.js +140 -11
- package/dist/cjs/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/Sidebar.js +1 -1
- package/dist/cjs/performanceDiagnostics-CS7NTxaH.js +93 -0
- package/dist/cjs/performanceDiagnostics-CS7NTxaH.js.map +1 -0
- package/dist/cjs/{useWhatsNewChangesCount-CLo5AJny.js → useWhatsNewChangesCount-BVkLLk7f.js} +3 -1
- package/dist/cjs/useWhatsNewChangesCount-BVkLLk7f.js.map +1 -0
- package/dist/cjs/{useWhatsNewChangesCount-BzQTamII.js → useWhatsNewChangesCount-CyOUS5U3.js} +3 -1
- package/dist/cjs/useWhatsNewChangesCount-CyOUS5U3.js.map +1 -0
- package/dist/cjs/v2/FloatingActionMenu.js +168 -25
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
- package/dist/cjs/v2/Sidebar.js +1 -1
- package/dist/performanceDiagnostics-DJcT0dfG.js +88 -0
- package/dist/performanceDiagnostics-DJcT0dfG.js.map +1 -0
- package/dist/{useWhatsNewChangesCount-BaLLrXk5.js → useWhatsNewChangesCount-C71JkNHv.js} +3 -2
- package/dist/useWhatsNewChangesCount-C71JkNHv.js.map +1 -0
- package/dist/{useWhatsNewChangesCount-DLIMw7dA.js → useWhatsNewChangesCount-CQxhUCpt.js} +3 -2
- package/dist/useWhatsNewChangesCount-CQxhUCpt.js.map +1 -0
- package/dist/v2/FloatingActionMenu.js +165 -22
- package/dist/v2/FloatingActionMenu.js.map +1 -1
- package/dist/v2/Sidebar.js +1 -1
- package/package.json +1 -1
- package/src/translations/en.json +12 -1
- package/dist/cjs/urls-DtjJggEY.js +0 -19
- package/dist/cjs/urls-DtjJggEY.js.map +0 -1
- package/dist/cjs/useWhatsNewChangesCount-BzQTamII.js.map +0 -1
- package/dist/cjs/useWhatsNewChangesCount-CLo5AJny.js.map +0 -1
- package/dist/urls-DC61u0b2.js +0 -16
- package/dist/urls-DC61u0b2.js.map +0 -1
- package/dist/useWhatsNewChangesCount-BaLLrXk5.js.map +0 -1
- package/dist/useWhatsNewChangesCount-DLIMw7dA.js.map +0 -1
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
4
|
+
var ramda = require('ramda');
|
|
5
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
6
|
+
|
|
7
|
+
var getNeetoUrl = function getNeetoUrl(subdomain) {
|
|
8
|
+
var _globalProps;
|
|
9
|
+
return "https://".concat(subdomain, ".").concat(ramda.toLower(((_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : _globalProps.appName) || ""), ".com");
|
|
10
|
+
};
|
|
11
|
+
var getProductBillingUrl = function getProductBillingUrl() {
|
|
12
|
+
var _globalProps$organiza;
|
|
13
|
+
var billingOverviewUrl = "".concat((_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.authAppUrl, "/admin/billing/overview");
|
|
14
|
+
var productSlug = ramda.toLower(globalProps.appName || "");
|
|
15
|
+
return neetoCist.isPresent(productSlug) ? "".concat(billingOverviewUrl, "/products/").concat(productSlug) : billingOverviewUrl;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
// The NeetoReplay widget's requests have no timeout; without this a hung
|
|
19
|
+
// upload would keep the Report slowness modal submitting forever.
|
|
20
|
+
var REPORT_SLOWNESS_TIMEOUT_MS = 30000;
|
|
21
|
+
|
|
22
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
23
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
24
|
+
|
|
25
|
+
// NeetoReplay widget API. The widget may not be loaded, and its session starts
|
|
26
|
+
// asynchronously, so check at render time rather than caching.
|
|
27
|
+
var isPerformanceDiagnosticsEnabled = function isPerformanceDiagnosticsEnabled() {
|
|
28
|
+
var _window$NeetoReplayWi, _window$NeetoReplayWi2;
|
|
29
|
+
return Boolean((_window$NeetoReplayWi = window.NeetoReplayWidget) === null || _window$NeetoReplayWi === void 0 || (_window$NeetoReplayWi2 = _window$NeetoReplayWi.isPerformanceDiagnosticsEnabled) === null || _window$NeetoReplayWi2 === void 0 ? void 0 : _window$NeetoReplayWi2.call(_window$NeetoReplayWi));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// Resolves to `{ id, replay_url }`, or `null` on failure or timeout.
|
|
33
|
+
var reportSlowness = /*#__PURE__*/function () {
|
|
34
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
|
|
35
|
+
var description, reportedAt, timeoutId, timeout, _yield$Promise$race, _window$NeetoReplayWi3, _window$NeetoReplayWi4, _t, _t2, _t3;
|
|
36
|
+
return _regenerator().w(function (_context) {
|
|
37
|
+
while (1) switch (_context.p = _context.n) {
|
|
38
|
+
case 0:
|
|
39
|
+
description = _ref.description, reportedAt = _ref.reportedAt;
|
|
40
|
+
timeout = new Promise(function (resolve) {
|
|
41
|
+
timeoutId = setTimeout(function () {
|
|
42
|
+
return resolve(null);
|
|
43
|
+
}, REPORT_SLOWNESS_TIMEOUT_MS);
|
|
44
|
+
});
|
|
45
|
+
_context.p = 1;
|
|
46
|
+
_context.n = 2;
|
|
47
|
+
return Promise.race([(_window$NeetoReplayWi3 = window.NeetoReplayWidget) === null || _window$NeetoReplayWi3 === void 0 || (_window$NeetoReplayWi4 = _window$NeetoReplayWi3.reportSlowness) === null || _window$NeetoReplayWi4 === void 0 ? void 0 : _window$NeetoReplayWi4.call(_window$NeetoReplayWi3, {
|
|
48
|
+
description: description,
|
|
49
|
+
reportedAt: reportedAt
|
|
50
|
+
}), timeout]);
|
|
51
|
+
case 2:
|
|
52
|
+
_t2 = _yield$Promise$race = _context.v;
|
|
53
|
+
_t = _t2 !== null;
|
|
54
|
+
if (!_t) {
|
|
55
|
+
_context.n = 3;
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
_t = _yield$Promise$race !== void 0;
|
|
59
|
+
case 3:
|
|
60
|
+
if (!_t) {
|
|
61
|
+
_context.n = 4;
|
|
62
|
+
break;
|
|
63
|
+
}
|
|
64
|
+
_t3 = _yield$Promise$race;
|
|
65
|
+
_context.n = 5;
|
|
66
|
+
break;
|
|
67
|
+
case 4:
|
|
68
|
+
_t3 = null;
|
|
69
|
+
case 5:
|
|
70
|
+
return _context.a(2, _t3);
|
|
71
|
+
case 6:
|
|
72
|
+
_context.p = 6;
|
|
73
|
+
_context.v;
|
|
74
|
+
return _context.a(2, null);
|
|
75
|
+
case 7:
|
|
76
|
+
_context.p = 7;
|
|
77
|
+
clearTimeout(timeoutId);
|
|
78
|
+
return _context.f(7);
|
|
79
|
+
case 8:
|
|
80
|
+
return _context.a(2);
|
|
81
|
+
}
|
|
82
|
+
}, _callee, null, [[1, 6, 7, 8]]);
|
|
83
|
+
}));
|
|
84
|
+
return function reportSlowness(_x) {
|
|
85
|
+
return _ref2.apply(this, arguments);
|
|
86
|
+
};
|
|
87
|
+
}();
|
|
88
|
+
|
|
89
|
+
exports.getNeetoUrl = getNeetoUrl;
|
|
90
|
+
exports.getProductBillingUrl = getProductBillingUrl;
|
|
91
|
+
exports.isPerformanceDiagnosticsEnabled = isPerformanceDiagnosticsEnabled;
|
|
92
|
+
exports.reportSlowness = reportSlowness;
|
|
93
|
+
//# sourceMappingURL=performanceDiagnostics-CS7NTxaH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"performanceDiagnostics-CS7NTxaH.js","sources":["../../src/utils/urls.js","../../src/utils/constants.js","../../src/utils/performanceDiagnostics.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","// The NeetoReplay widget's requests have no timeout; without this a hung\n// upload would keep the Report slowness modal submitting forever.\nexport const REPORT_SLOWNESS_TIMEOUT_MS = 30000;\n","import { REPORT_SLOWNESS_TIMEOUT_MS } from \"./constants\";\n\n// NeetoReplay widget API. The widget may not be loaded, and its session starts\n// asynchronously, so check at render time rather than caching.\nexport const isPerformanceDiagnosticsEnabled = () =>\n Boolean(window.NeetoReplayWidget?.isPerformanceDiagnosticsEnabled?.());\n\n// Resolves to `{ id, replay_url }`, or `null` on failure or timeout.\nexport const reportSlowness = async ({ description, reportedAt }) => {\n let timeoutId;\n const timeout = new Promise(resolve => {\n timeoutId = setTimeout(() => resolve(null), REPORT_SLOWNESS_TIMEOUT_MS);\n });\n\n try {\n return (\n (await Promise.race([\n window.NeetoReplayWidget?.reportSlowness?.({ description, reportedAt }),\n timeout,\n ])) ?? null\n );\n } catch {\n return null;\n } finally {\n clearTimeout(timeoutId);\n }\n};\n"],"names":["getNeetoUrl","subdomain","_globalProps","concat","toLower","globalProps","appName","getProductBillingUrl","_globalProps$organiza","billingOverviewUrl","organization","authAppUrl","productSlug","isPresent","REPORT_SLOWNESS_TIMEOUT_MS","e","t","r","Symbol","n","iterator","o","toStringTag","i","c","prototype","Generator","u","Object","create","_regeneratorDefine2","f","p","y","G","v","a","d","bind","length","l","TypeError","call","done","value","GeneratorFunction","GeneratorFunctionPrototype","getPrototypeOf","setPrototypeOf","__proto__","displayName","_regenerator","w","m","defineProperty","_regeneratorDefine","_invoke","enumerable","configurable","writable","isPerformanceDiagnosticsEnabled","_window$NeetoReplayWi","_window$NeetoReplayWi2","Boolean","window","NeetoReplayWidget","reportSlowness","_ref2","_asyncToGenerator","_callee","_ref","description","reportedAt","timeoutId","timeout","_yield$Promise$race","_window$NeetoReplayWi3","_window$NeetoReplayWi4","_t","_t2","_t3","_context","Promise","resolve","setTimeout","race","clearTimeout","_x","apply","arguments"],"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,KA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AAA9C,CAAA;AAAA,UAAA,OAAA8C,QAAA,CAAA7C,CAAA,CAAA,CAAA,EAGN,IAAI,CAAA;AAAA,QAAA,KAAA,CAAA;AAAA6C,UAAAA,QAAA,CAAAjD,CAAA,GAAA,CAAA;UAEXsD,YAAY,CAACb,SAAS,CAAC;UAAC,OAAAQ,QAAA,CAAAlD,CAAA,CAAA,CAAA,CAAA;AAAA,QAAA,KAAA,CAAA;UAAA,OAAAkD,QAAA,CAAA7C,CAAA,CAAA,CAAA,CAAA;AAAA;AAAA,IAAA,CAAA,EAAAiC,OAAA,EAAA,IAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;EAAA,CAE3B,CAAA,CAAA;EAAA,OAAA,SAlBYH,cAAcA,CAAAqB,EAAA,EAAA;AAAA,IAAA,OAAApB,KAAA,CAAAqB,KAAA,CAAA,IAAA,EAAAC,SAAA,CAAA;AAAA,EAAA,CAAA;AAAA,CAAA;;;;;;;"}
|
package/dist/cjs/{useWhatsNewChangesCount-CLo5AJny.js → useWhatsNewChangesCount-BVkLLk7f.js}
RENAMED
|
@@ -36,6 +36,7 @@ var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
|
36
36
|
var MENU_ITEM_CLASSES = "gap-2.5 px-2.5 py-2 font-medium [&>[data-slot=menu-item-prefix]>svg]:!size-[18px] [&>[data-slot=menu-item-suffix]>svg]:!size-[18px]";
|
|
37
37
|
var THEME_BUTTON_BASE = "relative z-10 flex items-center justify-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none";
|
|
38
38
|
var THEME_ICON_BASE = "transition-transform duration-300 ease-out";
|
|
39
|
+
var SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;
|
|
39
40
|
|
|
40
41
|
// Shared source of truth for the neetoEngage changelog unread count.
|
|
41
42
|
//
|
|
@@ -112,8 +113,9 @@ exports.LEGACY_THEMES = LEGACY_THEMES;
|
|
|
112
113
|
exports.MENU_ITEM_CLASSES = MENU_ITEM_CLASSES;
|
|
113
114
|
exports.MY_ORGANIZATION_URL = MY_ORGANIZATION_URL;
|
|
114
115
|
exports.NEETO_AUTH_BILLING_INFO_URL = NEETO_AUTH_BILLING_INFO_URL;
|
|
116
|
+
exports.SLOWNESS_DESCRIPTION_MAX_LENGTH = SLOWNESS_DESCRIPTION_MAX_LENGTH;
|
|
115
117
|
exports.THEMES = THEMES;
|
|
116
118
|
exports.THEME_BUTTON_BASE = THEME_BUTTON_BASE;
|
|
117
119
|
exports.THEME_ICON_BASE = THEME_ICON_BASE;
|
|
118
120
|
exports.useWhatsNewChangesCount = useWhatsNewChangesCount;
|
|
119
|
-
//# sourceMappingURL=useWhatsNewChangesCount-
|
|
121
|
+
//# sourceMappingURL=useWhatsNewChangesCount-BVkLLk7f.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWhatsNewChangesCount-BVkLLk7f.js","sources":["../../src/v2/components/FloatingActionMenu/constants.js","../../src/v2/components/FloatingActionMenu/hooks/useWhatsNewChangesCount.js"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const MY_ORGANIZATION_URL = \"/auth/organization/edit\";\nexport const BILLING_URL = \"/auth/admin_billing\";\nexport const DELETE_WORKSPACE_URL = \"/auth/organization/delete\";\nexport const ENGAGE_WIDGET_TRIGGER_ID = \"neetoengage-trigger\";\n\nexport const DEFAULT_MENU_LINK_PROPS = {\n engageProps: {\n id: ENGAGE_WIDGET_TRIGGER_ID,\n label: t(\"neetoMolecules.sidebar.helpLinks.whatsNew\"),\n \"data-testid\": \"help-link-engage-button\",\n },\n keyboardShortcutProps: {\n label: t(\"neetoMolecules.sidebar.helpLinks.keyboardShortcuts\"),\n \"data-testid\": \"help-link-keyboard-shortcut-button\",\n },\n};\n\n// Theme switcher\nexport const APP_THEME_LOCALSTORAGE_KEY = \"appTheme\";\n\nexport const THEMES = { LIGHT: \"light\", DARK: \"dark\" };\n\n// Legacy neetoUI theme classes — kept until full migration is complete.\nexport const LEGACY_THEMES = {\n LIGHT: \"neeto-ui-theme--light\",\n DARK: \"neeto-ui-theme--dark\",\n};\n\nexport const NEETO_AUTH_BILLING_INFO_URL =\n \"/neeto_sso/api/v1/subscription/billing\";\n\nexport const MENU_ITEM_CLASSES =\n \"gap-2.5 px-2.5 py-2 font-medium [&>[data-slot=menu-item-prefix]>svg]:!size-[18px] [&>[data-slot=menu-item-suffix]>svg]:!size-[18px]\";\n\nexport const THEME_BUTTON_BASE =\n \"relative z-10 flex items-center justify-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium transition-colors focus-visible:outline-none\";\n\nexport const THEME_ICON_BASE = \"transition-transform duration-300 ease-out\";\n\nexport const SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;\n","import { useEffect, useState } from \"react\";\n\n// Shared source of truth for the neetoEngage changelog unread count.\n//\n// The widget reports the count by calling `window.Nv.onReceiveData({ unreadCount })`\n// whenever it changes (on load and each time entries are marked read). Opening\n// the widget doesn't clear it: the count only drops as entries are read. Both the FloatingActionMenu and the\n// Sidebar surface this count, so this module installs a SINGLE set of\n// `window.Nv` handlers (chaining onto any pre-existing ones) and fans the value\n// out to every subscribed component. Installation happens on the first\n// subscriber and is torn down only when the last one unsubscribes — so\n// interleaved mount/unmount of the two surfaces can never leave a stale handler\n// on the global object.\n\nlet currentCount = null;\nconst subscribers = new Set();\nlet isInstalled = false;\nlet previousOnReceiveData;\n\nconst notify = () => subscribers.forEach(setCount => setCount(currentCount));\n\nconst install = () => {\n if (isInstalled) return;\n isInstalled = true;\n\n const existing = window.Nv || {};\n previousOnReceiveData = existing.onReceiveData;\n\n window.Nv = Object.assign(existing, {\n onReceiveData: data => {\n previousOnReceiveData?.(data);\n // Only react to a numeric unreadCount; `0` clears the badge (a non-zero\n // count would otherwise stay stale until the pane is opened).\n if (typeof data?.unreadCount === \"number\") {\n currentCount = data.unreadCount || null;\n notify();\n }\n },\n });\n};\n\nconst uninstall = () => {\n if (!isInstalled) return;\n isInstalled = false;\n\n if (window.Nv) {\n window.Nv.onReceiveData = previousOnReceiveData;\n }\n // currentCount is kept: the widget only reports it on page load and after a\n // \"Mark as read\", so a surface that remounts (e.g. after navigating to a page\n // without a sidebar and back) would otherwise lose it until a full reload.\n};\n\nconst useWhatsNewChangesCount = () => {\n const [changesCount, setChangesCount] = useState(currentCount);\n\n useEffect(() => {\n install();\n subscribers.add(setChangesCount);\n setChangesCount(currentCount);\n\n return () => {\n subscribers.delete(setChangesCount);\n if (subscribers.size === 0) uninstall();\n };\n }, []);\n\n return changesCount;\n};\n\nexport default useWhatsNewChangesCount;\n"],"names":["MY_ORGANIZATION_URL","BILLING_URL","DELETE_WORKSPACE_URL","ENGAGE_WIDGET_TRIGGER_ID","DEFAULT_MENU_LINK_PROPS","engageProps","id","label","t","keyboardShortcutProps","APP_THEME_LOCALSTORAGE_KEY","THEMES","LIGHT","DARK","LEGACY_THEMES","NEETO_AUTH_BILLING_INFO_URL","MENU_ITEM_CLASSES","THEME_BUTTON_BASE","THEME_ICON_BASE","SLOWNESS_DESCRIPTION_MAX_LENGTH","currentCount","subscribers","Set","isInstalled","previousOnReceiveData","notify","forEach","setCount","install","existing","window","Nv","onReceiveData","Object","assign","data","_previousOnReceiveDat","unreadCount","uninstall","useWhatsNewChangesCount","_useState","useState","_useState2","_slicedToArray","changesCount","setChangesCount","useEffect","add","size"],"mappings":";;;;;;AAEO,IAAMA,mBAAmB,GAAG;AAC5B,IAAMC,WAAW,GAAG;AACpB,IAAMC,oBAAoB,GAAG;AAC7B,IAAMC,wBAAwB,GAAG;AAEjC,IAAMC,uBAAuB,GAAG;AACrCC,EAAAA,WAAW,EAAE;AACXC,IAAAA,EAAE,EAAEH,wBAAwB;AAC5BI,IAAAA,KAAK,EAAEC,SAAC,CAAC,2CAA2C,CAAC;AACrD,IAAA,aAAa,EAAE;GAChB;AACDC,EAAAA,qBAAqB,EAAE;AACrBF,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}
|
package/dist/cjs/{useWhatsNewChangesCount-BzQTamII.js → useWhatsNewChangesCount-CyOUS5U3.js}
RENAMED
|
@@ -26,6 +26,7 @@ var THEMES = {
|
|
|
26
26
|
DARK: "neeto-ui-theme--dark"
|
|
27
27
|
};
|
|
28
28
|
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
29
|
+
var SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;
|
|
29
30
|
|
|
30
31
|
// Shared source of truth for the neetoEngage changelog unread count.
|
|
31
32
|
//
|
|
@@ -99,6 +100,7 @@ exports.DELETE_WORKSPACE_URL = DELETE_WORKSPACE_URL;
|
|
|
99
100
|
exports.ENGAGE_WIDGET_TRIGGER_ID = ENGAGE_WIDGET_TRIGGER_ID;
|
|
100
101
|
exports.MY_ORGANIZATION_URL = MY_ORGANIZATION_URL;
|
|
101
102
|
exports.NEETO_AUTH_BILLING_INFO_URL = NEETO_AUTH_BILLING_INFO_URL;
|
|
103
|
+
exports.SLOWNESS_DESCRIPTION_MAX_LENGTH = SLOWNESS_DESCRIPTION_MAX_LENGTH;
|
|
102
104
|
exports.THEMES = THEMES;
|
|
103
105
|
exports.useWhatsNewChangesCount = useWhatsNewChangesCount;
|
|
104
|
-
//# sourceMappingURL=useWhatsNewChangesCount-
|
|
106
|
+
//# sourceMappingURL=useWhatsNewChangesCount-CyOUS5U3.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWhatsNewChangesCount-CyOUS5U3.js","sources":["../../src/components/FloatingActionMenu/constants.js","../../src/components/FloatingActionMenu/hooks/useWhatsNewChangesCount.js"],"sourcesContent":["import { t } from \"i18next\";\n\nexport const MY_ORGANIZATION_URL = \"/auth/organization/edit\";\nexport const DELETE_WORKSPACE_URL = \"/auth/organization/delete\";\nexport const ENGAGE_WIDGET_TRIGGER_ID = \"neetoengage-trigger\";\n\nexport const DEFAULT_MENU_LINK_PROPS = {\n engageProps: {\n id: ENGAGE_WIDGET_TRIGGER_ID,\n label: t(\"neetoMolecules.sidebar.helpLinks.whatsNew\"),\n \"data-testid\": \"help-link-engage-button\",\n },\n keyboardShortcutProps: {\n label: t(\"neetoMolecules.sidebar.helpLinks.keyboardShortcuts\"),\n \"data-testid\": \"help-link-keyboard-shortcut-button\",\n },\n};\n\n// Theme switcher\nexport const APP_THEME_LOCALSTORAGE_KEY = \"appTheme\";\n\nexport const THEMES = {\n LIGHT: \"neeto-ui-theme--light\",\n DARK: \"neeto-ui-theme--dark\",\n};\n\nexport const NEETO_AUTH_BILLING_INFO_URL =\n \"/neeto_sso/api/v1/subscription/billing\";\n\nexport const SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;\n","import { useEffect, useState } from \"react\";\n\n// Shared source of truth for the neetoEngage changelog unread count.\n//\n// The widget reports the count by calling `window.Nv.onReceiveData({ unreadCount })`\n// whenever it changes (on load and each time entries are marked read). Opening\n// the widget doesn't clear it: the count only drops as entries are read. Both the FloatingActionMenu and the\n// Sidebar surface this count, so this module installs a SINGLE set of\n// `window.Nv` handlers (chaining onto any pre-existing ones) and fans the value\n// out to every subscribed component. Installation happens on the first\n// subscriber and is torn down only when the last one unsubscribes — so\n// interleaved mount/unmount of the two surfaces can never leave a stale handler\n// on the global object.\n\nlet currentCount = null;\nconst subscribers = new Set();\nlet isInstalled = false;\nlet previousOnReceiveData;\n\nconst notify = () => subscribers.forEach(setCount => setCount(currentCount));\n\nconst install = () => {\n if (isInstalled) return;\n isInstalled = true;\n\n const existing = window.Nv || {};\n previousOnReceiveData = existing.onReceiveData;\n\n window.Nv = Object.assign(existing, {\n onReceiveData: data => {\n previousOnReceiveData?.(data);\n // Only react to a numeric unreadCount; `0` clears the badge (a non-zero\n // count would otherwise stay stale until the pane is opened).\n if (typeof data?.unreadCount === \"number\") {\n currentCount = data.unreadCount || null;\n notify();\n }\n },\n });\n};\n\nconst uninstall = () => {\n if (!isInstalled) return;\n isInstalled = false;\n\n if (window.Nv) {\n window.Nv.onReceiveData = previousOnReceiveData;\n }\n // currentCount is kept: the widget only reports it on page load and after a\n // \"Mark as read\", so a surface that remounts (e.g. after navigating to a page\n // without a sidebar and back) would otherwise lose it until a full reload.\n};\n\nconst useWhatsNewChangesCount = () => {\n const [changesCount, setChangesCount] = useState(currentCount);\n\n useEffect(() => {\n install();\n subscribers.add(setChangesCount);\n setChangesCount(currentCount);\n\n return () => {\n subscribers.delete(setChangesCount);\n if (subscribers.size === 0) uninstall();\n };\n }, []);\n\n return changesCount;\n};\n\nexport default useWhatsNewChangesCount;\n"],"names":["MY_ORGANIZATION_URL","DELETE_WORKSPACE_URL","ENGAGE_WIDGET_TRIGGER_ID","DEFAULT_MENU_LINK_PROPS","engageProps","id","label","t","keyboardShortcutProps","APP_THEME_LOCALSTORAGE_KEY","THEMES","LIGHT","DARK","NEETO_AUTH_BILLING_INFO_URL","SLOWNESS_DESCRIPTION_MAX_LENGTH","currentCount","subscribers","Set","isInstalled","previousOnReceiveData","notify","forEach","setCount","install","existing","window","Nv","onReceiveData","Object","assign","data","_previousOnReceiveDat","unreadCount","uninstall","useWhatsNewChangesCount","_useState","useState","_useState2","_slicedToArray","changesCount","setChangesCount","useEffect","add","size"],"mappings":";;;;;;AAEO,IAAMA,mBAAmB,GAAG;AAC5B,IAAMC,oBAAoB,GAAG;AAC7B,IAAMC,wBAAwB,GAAG;AAEjC,IAAMC,uBAAuB,GAAG;AACrCC,EAAAA,WAAW,EAAE;AACXC,IAAAA,EAAE,EAAEH,wBAAwB;AAC5BI,IAAAA,KAAK,EAAEC,SAAC,CAAC,2CAA2C,CAAC;AACrD,IAAA,aAAa,EAAE;GAChB;AACDC,EAAAA,qBAAqB,EAAE;AACrBF,IAAAA,KAAK,EAAEC,SAAC,CAAC,oDAAoD,CAAC;AAC9D,IAAA,aAAa,EAAE;AACjB;AACF;;AAEA;AACO,IAAME,0BAA0B,GAAG;AAEnC,IAAMC,MAAM,GAAG;AACpBC,EAAAA,KAAK,EAAE,uBAAuB;A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GAAG,SAAZA,SAASA,GAAS;EACtB,IAAI,CAACf,WAAW,EAAE;AAClBA,EAAAA,WAAW,GAAG,KAAK;EAEnB,IAAIO,MAAM,CAACC,EAAE,EAAE;AACbD,IAAAA,MAAM,CAACC,EAAE,CAACC,aAAa,GAAGR,qBAAqB;AACjD,EAAA;AACA;AACA;AACA;AACF,CAAC;AAED,IAAMe,uBAAuB,GAAG,SAA1BA,uBAAuBA,GAAS;AACpC,EAAA,IAAAC,SAAA,GAAwCC,cAAQ,CAACrB,YAAY,CAAC;IAAAsB,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,YAAY,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,eAAe,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEpCI,EAAAA,eAAS,CAAC,YAAM;AACdlB,IAAAA,OAAO,EAAE;AACTP,IAAAA,WAAW,CAAC0B,GAAG,CAACF,eAAe,CAAC;IAChCA,eAAe,CAACzB,YAAY,CAAC;AAE7B,IAAA,OAAO,YAAM;MACXC,WAAW,CAAA,QAAA,CAAO,CAACwB,eAAe,CAAC;MACnC,IAAIxB,WAAW,CAAC2B,IAAI,KAAK,CAAC,EAAEV,SAAS,EAAE;IACzC,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;AAEN,EAAA,OAAOM,YAAY;AACrB;;;;;;;;;;;;"}
|
|
@@ -23,9 +23,9 @@ 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
|
|
26
|
+
var performanceDiagnostics = require('../performanceDiagnostics-CS7NTxaH.js');
|
|
27
27
|
var useBreakpoints = require('@bigbinary/neeto-commons-frontend/v2/react-utils/useBreakpoints');
|
|
28
|
-
var useWhatsNewChangesCount = require('../useWhatsNewChangesCount-
|
|
28
|
+
var useWhatsNewChangesCount = require('../useWhatsNewChangesCount-BVkLLk7f.js');
|
|
29
29
|
var createLucideIcon = require('../createLucideIcon-BbuuRL2u.js');
|
|
30
30
|
var circleQuestionMark = require('../circle-question-mark-BijjM_4y.js');
|
|
31
31
|
var chevronRight = require('../chevron-right-BVivH_B-.js');
|
|
@@ -36,6 +36,7 @@ var utils = require('@bigbinary/neeto-commons-frontend/v2/utils');
|
|
|
36
36
|
var axios$1 = require('@bigbinary/neeto-commons-frontend/v2/utils/axios');
|
|
37
37
|
var general = require('@bigbinary/neeto-commons-frontend/v2/utils/general');
|
|
38
38
|
var v2_CopyToClipboardButton = require('./CopyToClipboardButton.js');
|
|
39
|
+
var _asyncToGenerator = require('@babel/runtime/helpers/asyncToGenerator');
|
|
39
40
|
require('../useKeyboardShortcutsPaneState-DZUnpw9v.js');
|
|
40
41
|
require('zustand/shallow');
|
|
41
42
|
require('@bigbinary/neeto-commons-frontend/v2/react-utils/withImmutableActions');
|
|
@@ -72,7 +73,7 @@ var AppIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(AppIcons);
|
|
|
72
73
|
*/
|
|
73
74
|
|
|
74
75
|
|
|
75
|
-
const __iconNode$
|
|
76
|
+
const __iconNode$c = [
|
|
76
77
|
[
|
|
77
78
|
"path",
|
|
78
79
|
{
|
|
@@ -81,7 +82,7 @@ const __iconNode$b = [
|
|
|
81
82
|
}
|
|
82
83
|
]
|
|
83
84
|
];
|
|
84
|
-
const Activity = createLucideIcon.createLucideIcon("activity", __iconNode$
|
|
85
|
+
const Activity = createLucideIcon.createLucideIcon("activity", __iconNode$c);
|
|
85
86
|
|
|
86
87
|
/**
|
|
87
88
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -91,7 +92,7 @@ const Activity = createLucideIcon.createLucideIcon("activity", __iconNode$b);
|
|
|
91
92
|
*/
|
|
92
93
|
|
|
93
94
|
|
|
94
|
-
const __iconNode$
|
|
95
|
+
const __iconNode$b = [
|
|
95
96
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
96
97
|
[
|
|
97
98
|
"path",
|
|
@@ -101,7 +102,7 @@ const __iconNode$a = [
|
|
|
101
102
|
}
|
|
102
103
|
]
|
|
103
104
|
];
|
|
104
|
-
const BookOpen = createLucideIcon.createLucideIcon("book-open", __iconNode$
|
|
105
|
+
const BookOpen = createLucideIcon.createLucideIcon("book-open", __iconNode$b);
|
|
105
106
|
|
|
106
107
|
/**
|
|
107
108
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -111,11 +112,11 @@ const BookOpen = createLucideIcon.createLucideIcon("book-open", __iconNode$a);
|
|
|
111
112
|
*/
|
|
112
113
|
|
|
113
114
|
|
|
114
|
-
const __iconNode$
|
|
115
|
+
const __iconNode$a = [
|
|
115
116
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
116
117
|
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
117
118
|
];
|
|
118
|
-
const CircleCheck = createLucideIcon.createLucideIcon("circle-check", __iconNode$
|
|
119
|
+
const CircleCheck = createLucideIcon.createLucideIcon("circle-check", __iconNode$a);
|
|
119
120
|
|
|
120
121
|
/**
|
|
121
122
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -125,12 +126,12 @@ const CircleCheck = createLucideIcon.createLucideIcon("circle-check", __iconNode
|
|
|
125
126
|
*/
|
|
126
127
|
|
|
127
128
|
|
|
128
|
-
const __iconNode$
|
|
129
|
+
const __iconNode$9 = [
|
|
129
130
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
130
131
|
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
131
132
|
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
132
133
|
];
|
|
133
|
-
const CircleX = createLucideIcon.createLucideIcon("circle-x", __iconNode$
|
|
134
|
+
const CircleX = createLucideIcon.createLucideIcon("circle-x", __iconNode$9);
|
|
134
135
|
|
|
135
136
|
/**
|
|
136
137
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -140,7 +141,7 @@ const CircleX = createLucideIcon.createLucideIcon("circle-x", __iconNode$8);
|
|
|
140
141
|
*/
|
|
141
142
|
|
|
142
143
|
|
|
143
|
-
const __iconNode$
|
|
144
|
+
const __iconNode$8 = [
|
|
144
145
|
[
|
|
145
146
|
"path",
|
|
146
147
|
{
|
|
@@ -150,7 +151,21 @@ const __iconNode$7 = [
|
|
|
150
151
|
],
|
|
151
152
|
["path", { d: "M5 21h14", key: "11awu3" }]
|
|
152
153
|
];
|
|
153
|
-
const Crown = createLucideIcon.createLucideIcon("crown", __iconNode$
|
|
154
|
+
const Crown = createLucideIcon.createLucideIcon("crown", __iconNode$8);
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* @license lucide-react v1.24.0 - ISC
|
|
158
|
+
*
|
|
159
|
+
* This source code is licensed under the ISC license.
|
|
160
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
+
*/
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
const __iconNode$7 = [
|
|
165
|
+
["path", { d: "m12 14 4-4", key: "9kzdfg" }],
|
|
166
|
+
["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
|
|
167
|
+
];
|
|
168
|
+
const Gauge = createLucideIcon.createLucideIcon("gauge", __iconNode$7);
|
|
154
169
|
|
|
155
170
|
/**
|
|
156
171
|
* @license lucide-react v1.24.0 - ISC
|
|
@@ -588,11 +603,12 @@ var MenuItem = /*#__PURE__*/React.forwardRef(function (_ref, forwardedRef) {
|
|
|
588
603
|
MenuItem.displayName = "FloatingActionMenu.MenuItem";
|
|
589
604
|
|
|
590
605
|
var HelpItems = reactUtils.withT(function (_ref) {
|
|
591
|
-
var t = _ref.t
|
|
606
|
+
var t = _ref.t,
|
|
607
|
+
onReportSlowness = _ref.onReportSlowness;
|
|
592
608
|
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
593
609
|
children: [/*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
594
610
|
"data-testid": "help-link-help-articles-button",
|
|
595
|
-
href: "".concat(
|
|
611
|
+
href: "".concat(performanceDiagnostics.getNeetoUrl("help"), "/"),
|
|
596
612
|
prefix: /*#__PURE__*/jsxRuntime.jsx(BookOpen, {
|
|
597
613
|
size: 18
|
|
598
614
|
}),
|
|
@@ -621,7 +637,7 @@ var HelpItems = reactUtils.withT(function (_ref) {
|
|
|
621
637
|
children: t("neetoMolecules.sidebar.helpLinks.askTheCommunity")
|
|
622
638
|
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
623
639
|
"data-testid": "help-link-request-feature-button",
|
|
624
|
-
href: "".concat(
|
|
640
|
+
href: "".concat(performanceDiagnostics.getNeetoUrl("engage"), "/feature-requests"),
|
|
625
641
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Lightbulb, {
|
|
626
642
|
size: 18
|
|
627
643
|
}),
|
|
@@ -630,7 +646,7 @@ var HelpItems = reactUtils.withT(function (_ref) {
|
|
|
630
646
|
children: t("neetoMolecules.sidebar.helpLinks.requestFeature")
|
|
631
647
|
}), /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
632
648
|
"data-testid": "help-link-roadmap-button",
|
|
633
|
-
href: "".concat(
|
|
649
|
+
href: "".concat(performanceDiagnostics.getNeetoUrl("engage"), "/product-roadmap"),
|
|
634
650
|
prefix: /*#__PURE__*/jsxRuntime.jsx(Map, {
|
|
635
651
|
size: 18
|
|
636
652
|
}),
|
|
@@ -646,11 +662,19 @@ var HelpItems = reactUtils.withT(function (_ref) {
|
|
|
646
662
|
rel: "noreferrer",
|
|
647
663
|
target: "_blank",
|
|
648
664
|
children: t("neetoMolecules.sidebar.helpLinks.systemStatus")
|
|
665
|
+
}), performanceDiagnostics.isPerformanceDiagnosticsEnabled() && /*#__PURE__*/jsxRuntime.jsx(MenuItem, {
|
|
666
|
+
"data-testid": "help-link-report-slowness-button",
|
|
667
|
+
prefix: /*#__PURE__*/jsxRuntime.jsx(Gauge, {
|
|
668
|
+
size: 18
|
|
669
|
+
}),
|
|
670
|
+
onClick: onReportSlowness,
|
|
671
|
+
children: t("neetoMolecules.sidebar.helpLinks.reportSlowness")
|
|
649
672
|
})]
|
|
650
673
|
});
|
|
651
674
|
});
|
|
652
675
|
|
|
653
|
-
var MobileHelpMenu = function MobileHelpMenu() {
|
|
676
|
+
var MobileHelpMenu = function MobileHelpMenu(_ref) {
|
|
677
|
+
var onReportSlowness = _ref.onReportSlowness;
|
|
654
678
|
var _useTranslation = reactI18next.useTranslation(),
|
|
655
679
|
t = _useTranslation.t;
|
|
656
680
|
var _useState = React.useState(false),
|
|
@@ -680,18 +704,23 @@ var MobileHelpMenu = function MobileHelpMenu() {
|
|
|
680
704
|
})
|
|
681
705
|
}), /*#__PURE__*/jsxRuntime.jsx(primitives.CollapsibleContent, {
|
|
682
706
|
className: "flex flex-col gap-0.5 ps-6 pt-1",
|
|
683
|
-
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {
|
|
707
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {
|
|
708
|
+
onReportSlowness: onReportSlowness
|
|
709
|
+
})
|
|
684
710
|
})]
|
|
685
711
|
});
|
|
686
712
|
};
|
|
687
713
|
|
|
688
|
-
var HelpMenu = function HelpMenu() {
|
|
714
|
+
var HelpMenu = function HelpMenu(_ref) {
|
|
715
|
+
var onReportSlowness = _ref.onReportSlowness;
|
|
689
716
|
var _useBreakpoints = useBreakpoints(),
|
|
690
717
|
isSize = _useBreakpoints.isSize;
|
|
691
718
|
var isMobile = isSize("mobile");
|
|
692
719
|
var _useTranslation = reactI18next.useTranslation(),
|
|
693
720
|
t = _useTranslation.t;
|
|
694
|
-
if (isMobile) return /*#__PURE__*/jsxRuntime.jsx(MobileHelpMenu, {
|
|
721
|
+
if (isMobile) return /*#__PURE__*/jsxRuntime.jsx(MobileHelpMenu, {
|
|
722
|
+
onReportSlowness: onReportSlowness
|
|
723
|
+
});
|
|
695
724
|
return /*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSub, {
|
|
696
725
|
children: [/*#__PURE__*/jsxRuntime.jsxs(primitives.DropdownMenuSubTrigger, {
|
|
697
726
|
className: useWhatsNewChangesCount.MENU_ITEM_CLASSES,
|
|
@@ -706,7 +735,9 @@ var HelpMenu = function HelpMenu() {
|
|
|
706
735
|
className: "z-[99999]",
|
|
707
736
|
collisionPadding: 16,
|
|
708
737
|
sideOffset: 8,
|
|
709
|
-
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {
|
|
738
|
+
children: /*#__PURE__*/jsxRuntime.jsx(HelpItems, {
|
|
739
|
+
onReportSlowness: onReportSlowness
|
|
740
|
+
})
|
|
710
741
|
})]
|
|
711
742
|
});
|
|
712
743
|
};
|
|
@@ -1318,7 +1349,8 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1318
1349
|
isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
|
|
1319
1350
|
isConsumer = _ref.isConsumer,
|
|
1320
1351
|
enableSubscriptionUpgradeRequest = _ref.enableSubscriptionUpgradeRequest,
|
|
1321
|
-
openUpgradeModal = _ref.openUpgradeModal
|
|
1352
|
+
openUpgradeModal = _ref.openUpgradeModal,
|
|
1353
|
+
onReportSlowness = _ref.onReportSlowness;
|
|
1322
1354
|
var isAuthenticated = profileInfo.isAuthenticated;
|
|
1323
1355
|
var _useTranslation = reactI18next.useTranslation(),
|
|
1324
1356
|
t = _useTranslation.t;
|
|
@@ -1335,7 +1367,7 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1335
1367
|
};
|
|
1336
1368
|
if (!isPro && isOwner && enableSubscriptionUpgradeRequest) {
|
|
1337
1369
|
return {
|
|
1338
|
-
href:
|
|
1370
|
+
href: performanceDiagnostics.getProductBillingUrl()
|
|
1339
1371
|
};
|
|
1340
1372
|
}
|
|
1341
1373
|
return {
|
|
@@ -1389,7 +1421,9 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1389
1421
|
links: [subscriptionPlanLink]
|
|
1390
1422
|
}), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
|
|
1391
1423
|
toggleModal: toggleModal
|
|
1392
|
-
}), /*#__PURE__*/jsxRuntime.jsx(HelpMenu, {
|
|
1424
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpMenu, {
|
|
1425
|
+
onReportSlowness: onReportSlowness
|
|
1426
|
+
}), /*#__PURE__*/jsxRuntime.jsx(primitives.DropdownMenuSeparator, {
|
|
1393
1427
|
className: "my-2"
|
|
1394
1428
|
})]
|
|
1395
1429
|
}), isAuthenticated && !isConsumer && /*#__PURE__*/jsxRuntime.jsx(ProfileExpandMenu, {
|
|
@@ -1404,6 +1438,103 @@ var ProfileMenu = function ProfileMenu(_ref) {
|
|
|
1404
1438
|
});
|
|
1405
1439
|
};
|
|
1406
1440
|
|
|
1441
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = false, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = true, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), true), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
1442
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); } r ? i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2)); }, _regeneratorDefine2(e, r, n, t); }
|
|
1443
|
+
var ReportSlownessModal = function ReportSlownessModal(_ref) {
|
|
1444
|
+
var reportedAt = _ref.reportedAt,
|
|
1445
|
+
onClose = _ref.onClose;
|
|
1446
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1447
|
+
t = _useTranslation.t;
|
|
1448
|
+
var _useState = React.useState(""),
|
|
1449
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1450
|
+
description = _useState2[0],
|
|
1451
|
+
setDescription = _useState2[1];
|
|
1452
|
+
var _useState3 = React.useState(false),
|
|
1453
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1454
|
+
isSubmitting = _useState4[0],
|
|
1455
|
+
setIsSubmitting = _useState4[1];
|
|
1456
|
+
var handleClose = function handleClose() {
|
|
1457
|
+
setDescription("");
|
|
1458
|
+
onClose();
|
|
1459
|
+
};
|
|
1460
|
+
var handleSubmit = /*#__PURE__*/function () {
|
|
1461
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
|
|
1462
|
+
var report;
|
|
1463
|
+
return _regenerator().w(function (_context) {
|
|
1464
|
+
while (1) switch (_context.n) {
|
|
1465
|
+
case 0:
|
|
1466
|
+
setIsSubmitting(true);
|
|
1467
|
+
_context.n = 1;
|
|
1468
|
+
return performanceDiagnostics.reportSlowness({
|
|
1469
|
+
description: description.trim(),
|
|
1470
|
+
reportedAt: reportedAt
|
|
1471
|
+
});
|
|
1472
|
+
case 1:
|
|
1473
|
+
report = _context.v;
|
|
1474
|
+
setIsSubmitting(false);
|
|
1475
|
+
if (report) {
|
|
1476
|
+
_context.n = 2;
|
|
1477
|
+
break;
|
|
1478
|
+
}
|
|
1479
|
+
neetoAtoms.Toastr.error(t("neetoMolecules.reportSlowness.error"));
|
|
1480
|
+
return _context.a(2);
|
|
1481
|
+
case 2:
|
|
1482
|
+
neetoAtoms.Toastr.success(t("neetoMolecules.reportSlowness.success"), report.replay_url ? {
|
|
1483
|
+
buttonLabel: t("neetoMolecules.reportSlowness.viewReplay"),
|
|
1484
|
+
onClick: function onClick() {
|
|
1485
|
+
return window.open(report.replay_url, "_blank", "noopener,noreferrer");
|
|
1486
|
+
}
|
|
1487
|
+
} : {});
|
|
1488
|
+
handleClose();
|
|
1489
|
+
case 3:
|
|
1490
|
+
return _context.a(2);
|
|
1491
|
+
}
|
|
1492
|
+
}, _callee);
|
|
1493
|
+
}));
|
|
1494
|
+
return function handleSubmit() {
|
|
1495
|
+
return _ref2.apply(this, arguments);
|
|
1496
|
+
};
|
|
1497
|
+
}();
|
|
1498
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Dialog, {
|
|
1499
|
+
"aria-describedby": undefined,
|
|
1500
|
+
closeOnEsc: !isSubmitting,
|
|
1501
|
+
closeOnOutsideClick: !isSubmitting,
|
|
1502
|
+
isOpen: Boolean(reportedAt),
|
|
1503
|
+
onClose: handleClose,
|
|
1504
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Header, {
|
|
1505
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Title, {
|
|
1506
|
+
children: t("neetoMolecules.reportSlowness.title")
|
|
1507
|
+
})
|
|
1508
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog.Body, {
|
|
1509
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Textarea, {
|
|
1510
|
+
dataTestId: "report-slowness-description",
|
|
1511
|
+
label: t("neetoMolecules.reportSlowness.descriptionLabel"),
|
|
1512
|
+
maxLength: useWhatsNewChangesCount.SLOWNESS_DESCRIPTION_MAX_LENGTH,
|
|
1513
|
+
value: description,
|
|
1514
|
+
placeholder: t("neetoMolecules.reportSlowness.descriptionPlaceholder"),
|
|
1515
|
+
onChange: function onChange(e) {
|
|
1516
|
+
return setDescription(e.target.value);
|
|
1517
|
+
}
|
|
1518
|
+
})
|
|
1519
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Dialog.Footer, {
|
|
1520
|
+
className: "flex gap-x-2",
|
|
1521
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
1522
|
+
"data-testid": "report-slowness-cancel-button",
|
|
1523
|
+
disabled: isSubmitting,
|
|
1524
|
+
label: t("neetoMolecules.reportSlowness.cancel"),
|
|
1525
|
+
variant: "secondary",
|
|
1526
|
+
onClick: handleClose
|
|
1527
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Button, {
|
|
1528
|
+
"data-testid": "report-slowness-submit-button",
|
|
1529
|
+
disabled: isSubmitting,
|
|
1530
|
+
label: t("neetoMolecules.reportSlowness.submit"),
|
|
1531
|
+
loading: isSubmitting,
|
|
1532
|
+
onClick: handleSubmit
|
|
1533
|
+
})]
|
|
1534
|
+
})]
|
|
1535
|
+
});
|
|
1536
|
+
};
|
|
1537
|
+
|
|
1407
1538
|
function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
1408
1539
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1409
1540
|
var ProfileButton = function ProfileButton(_ref) {
|
|
@@ -1430,6 +1561,10 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1430
1561
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
1431
1562
|
isMenuOpen = _useState6[0],
|
|
1432
1563
|
setIsMenuOpen = _useState6[1];
|
|
1564
|
+
var _useState7 = React.useState(null),
|
|
1565
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
1566
|
+
slownessReportedAt = _useState8[0],
|
|
1567
|
+
setSlownessReportedAt = _useState8[1];
|
|
1433
1568
|
var changesCount = useWhatsNewChangesCount.useWhatsNewChangesCount();
|
|
1434
1569
|
var _KeyboardShortcuts$us = v2_KeyboardShortcuts.usePaneState(),
|
|
1435
1570
|
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
@@ -1505,13 +1640,21 @@ var ProfileButton = function ProfileButton(_ref) {
|
|
|
1505
1640
|
openUpgradeModal: function openUpgradeModal() {
|
|
1506
1641
|
return setIsUpgradeModalOpen(true);
|
|
1507
1642
|
},
|
|
1508
|
-
toggleModal: setIsModalOpen
|
|
1643
|
+
toggleModal: setIsModalOpen,
|
|
1644
|
+
onReportSlowness: function onReportSlowness() {
|
|
1645
|
+
return setSlownessReportedAt(Date.now());
|
|
1646
|
+
}
|
|
1509
1647
|
})
|
|
1510
1648
|
})]
|
|
1511
1649
|
}), neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1512
1650
|
className: "bg-foreground text-background pointer-events-none absolute end-0 top-0 z-[3] flex h-[0.9375rem] min-w-[0.9375rem] items-center justify-center rounded-full border border-white px-1 text-[10px] select-none",
|
|
1513
1651
|
"data-testid": "help-icon-changes-count",
|
|
1514
1652
|
children: changesCount
|
|
1653
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ReportSlownessModal, {
|
|
1654
|
+
reportedAt: slownessReportedAt,
|
|
1655
|
+
onClose: function onClose() {
|
|
1656
|
+
return setSlownessReportedAt(null);
|
|
1657
|
+
}
|
|
1515
1658
|
}), /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
1516
1659
|
isOpen: isModalOpen,
|
|
1517
1660
|
onClose: function onClose() {
|