@bigbinary/neeto-molecules 5.4.0 → 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.
Files changed (34) hide show
  1. package/dist/FloatingActionMenu.js +136 -7
  2. package/dist/FloatingActionMenu.js.map +1 -1
  3. package/dist/Sidebar.js +1 -1
  4. package/dist/cjs/FloatingActionMenu.js +140 -11
  5. package/dist/cjs/FloatingActionMenu.js.map +1 -1
  6. package/dist/cjs/Sidebar.js +1 -1
  7. package/dist/cjs/performanceDiagnostics-CS7NTxaH.js +93 -0
  8. package/dist/cjs/performanceDiagnostics-CS7NTxaH.js.map +1 -0
  9. package/dist/cjs/{useWhatsNewChangesCount-CLo5AJny.js → useWhatsNewChangesCount-BVkLLk7f.js} +3 -1
  10. package/dist/cjs/useWhatsNewChangesCount-BVkLLk7f.js.map +1 -0
  11. package/dist/cjs/{useWhatsNewChangesCount-BzQTamII.js → useWhatsNewChangesCount-CyOUS5U3.js} +3 -1
  12. package/dist/cjs/useWhatsNewChangesCount-CyOUS5U3.js.map +1 -0
  13. package/dist/cjs/v2/FloatingActionMenu.js +168 -25
  14. package/dist/cjs/v2/FloatingActionMenu.js.map +1 -1
  15. package/dist/cjs/v2/Sidebar.js +1 -1
  16. package/dist/performanceDiagnostics-DJcT0dfG.js +88 -0
  17. package/dist/performanceDiagnostics-DJcT0dfG.js.map +1 -0
  18. package/dist/{useWhatsNewChangesCount-BaLLrXk5.js → useWhatsNewChangesCount-C71JkNHv.js} +3 -2
  19. package/dist/useWhatsNewChangesCount-C71JkNHv.js.map +1 -0
  20. package/dist/{useWhatsNewChangesCount-DLIMw7dA.js → useWhatsNewChangesCount-CQxhUCpt.js} +3 -2
  21. package/dist/useWhatsNewChangesCount-CQxhUCpt.js.map +1 -0
  22. package/dist/v2/FloatingActionMenu.js +165 -22
  23. package/dist/v2/FloatingActionMenu.js.map +1 -1
  24. package/dist/v2/Sidebar.js +1 -1
  25. package/package.json +1 -1
  26. package/src/translations/en.json +12 -1
  27. package/dist/cjs/urls-DtjJggEY.js +0 -19
  28. package/dist/cjs/urls-DtjJggEY.js.map +0 -1
  29. package/dist/cjs/useWhatsNewChangesCount-BzQTamII.js.map +0 -1
  30. package/dist/cjs/useWhatsNewChangesCount-CLo5AJny.js.map +0 -1
  31. package/dist/urls-DC61u0b2.js +0 -16
  32. package/dist/urls-DC61u0b2.js.map +0 -1
  33. package/dist/useWhatsNewChangesCount-BaLLrXk5.js.map +0 -1
  34. package/dist/useWhatsNewChangesCount-DLIMw7dA.js.map +0 -1
@@ -19,7 +19,7 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
19
19
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
20
20
  var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
21
21
  var neetoAtoms = require('@bigbinary/neeto-atoms');
22
- var useWhatsNewChangesCount = require('../useWhatsNewChangesCount-CLo5AJny.js');
22
+ var useWhatsNewChangesCount = require('../useWhatsNewChangesCount-BVkLLk7f.js');
23
23
  var plus = require('../plus-B3N_9NiI.js');
24
24
  var ellipsis = require('../ellipsis-DDma6joP.js');
25
25
  var chevronRight = require('../chevron-right-BVivH_B-.js');
@@ -0,0 +1,88 @@
1
+ import { isPresent } from '@bigbinary/neeto-cist';
2
+ import { toLower } from 'ramda';
3
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
4
+
5
+ var getNeetoUrl = function getNeetoUrl(subdomain) {
6
+ var _globalProps;
7
+ return "https://".concat(subdomain, ".").concat(toLower(((_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : _globalProps.appName) || ""), ".com");
8
+ };
9
+ var getProductBillingUrl = function getProductBillingUrl() {
10
+ var _globalProps$organiza;
11
+ var billingOverviewUrl = "".concat((_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.authAppUrl, "/admin/billing/overview");
12
+ var productSlug = toLower(globalProps.appName || "");
13
+ return isPresent(productSlug) ? "".concat(billingOverviewUrl, "/products/").concat(productSlug) : billingOverviewUrl;
14
+ };
15
+
16
+ // The NeetoReplay widget's requests have no timeout; without this a hung
17
+ // upload would keep the Report slowness modal submitting forever.
18
+ var REPORT_SLOWNESS_TIMEOUT_MS = 30000;
19
+
20
+ 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 }; })(); }
21
+ 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); }
22
+
23
+ // NeetoReplay widget API. The widget may not be loaded, and its session starts
24
+ // asynchronously, so check at render time rather than caching.
25
+ var isPerformanceDiagnosticsEnabled = function isPerformanceDiagnosticsEnabled() {
26
+ var _window$NeetoReplayWi, _window$NeetoReplayWi2;
27
+ 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));
28
+ };
29
+
30
+ // Resolves to `{ id, replay_url }`, or `null` on failure or timeout.
31
+ var reportSlowness = /*#__PURE__*/function () {
32
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref) {
33
+ var description, reportedAt, timeoutId, timeout, _yield$Promise$race, _window$NeetoReplayWi3, _window$NeetoReplayWi4, _t, _t2, _t3;
34
+ return _regenerator().w(function (_context) {
35
+ while (1) switch (_context.p = _context.n) {
36
+ case 0:
37
+ description = _ref.description, reportedAt = _ref.reportedAt;
38
+ timeout = new Promise(function (resolve) {
39
+ timeoutId = setTimeout(function () {
40
+ return resolve(null);
41
+ }, REPORT_SLOWNESS_TIMEOUT_MS);
42
+ });
43
+ _context.p = 1;
44
+ _context.n = 2;
45
+ 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, {
46
+ description: description,
47
+ reportedAt: reportedAt
48
+ }), timeout]);
49
+ case 2:
50
+ _t2 = _yield$Promise$race = _context.v;
51
+ _t = _t2 !== null;
52
+ if (!_t) {
53
+ _context.n = 3;
54
+ break;
55
+ }
56
+ _t = _yield$Promise$race !== void 0;
57
+ case 3:
58
+ if (!_t) {
59
+ _context.n = 4;
60
+ break;
61
+ }
62
+ _t3 = _yield$Promise$race;
63
+ _context.n = 5;
64
+ break;
65
+ case 4:
66
+ _t3 = null;
67
+ case 5:
68
+ return _context.a(2, _t3);
69
+ case 6:
70
+ _context.p = 6;
71
+ _context.v;
72
+ return _context.a(2, null);
73
+ case 7:
74
+ _context.p = 7;
75
+ clearTimeout(timeoutId);
76
+ return _context.f(7);
77
+ case 8:
78
+ return _context.a(2);
79
+ }
80
+ }, _callee, null, [[1, 6, 7, 8]]);
81
+ }));
82
+ return function reportSlowness(_x) {
83
+ return _ref2.apply(this, arguments);
84
+ };
85
+ }();
86
+
87
+ export { getProductBillingUrl as a, getNeetoUrl as g, isPerformanceDiagnosticsEnabled as i, reportSlowness as r };
88
+ //# sourceMappingURL=performanceDiagnostics-DJcT0dfG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"performanceDiagnostics-DJcT0dfG.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,OAAO,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;EAC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,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;;;;"}
@@ -24,6 +24,7 @@ var THEMES = {
24
24
  DARK: "neeto-ui-theme--dark"
25
25
  };
26
26
  var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
27
+ var SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;
27
28
 
28
29
  // Shared source of truth for the neetoEngage changelog unread count.
29
30
  //
@@ -91,5 +92,5 @@ var useWhatsNewChangesCount = function useWhatsNewChangesCount() {
91
92
  return changesCount;
92
93
  };
93
94
 
94
- export { APP_THEME_LOCALSTORAGE_KEY as A, DELETE_WORKSPACE_URL as D, ENGAGE_WIDGET_TRIGGER_ID as E, MY_ORGANIZATION_URL as M, NEETO_AUTH_BILLING_INFO_URL as N, THEMES as T, DEFAULT_MENU_LINK_PROPS as a, useWhatsNewChangesCount as u };
95
- //# sourceMappingURL=useWhatsNewChangesCount-BaLLrXk5.js.map
95
+ export { APP_THEME_LOCALSTORAGE_KEY as A, DELETE_WORKSPACE_URL as D, ENGAGE_WIDGET_TRIGGER_ID as E, MY_ORGANIZATION_URL as M, NEETO_AUTH_BILLING_INFO_URL as N, SLOWNESS_DESCRIPTION_MAX_LENGTH as S, THEMES as T, DEFAULT_MENU_LINK_PROPS as a, useWhatsNewChangesCount as u };
96
+ //# sourceMappingURL=useWhatsNewChangesCount-C71JkNHv.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWhatsNewChangesCount-C71JkNHv.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,CAAC,CAAC,2CAA2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 font-medium [&>[data-slot=menu-item-prefix]>svg]:!size-[18px] [&>[data-slot=menu-item-suffix]>svg]:!size-[18px]";
35
35
  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";
36
36
  var THEME_ICON_BASE = "transition-transform duration-300 ease-out";
37
+ var SLOWNESS_DESCRIPTION_MAX_LENGTH = 2000;
37
38
 
38
39
  // Shared source of truth for the neetoEngage changelog unread count.
39
40
  //
@@ -101,5 +102,5 @@ var useWhatsNewChangesCount = function useWhatsNewChangesCount() {
101
102
  return changesCount;
102
103
  };
103
104
 
104
- export { APP_THEME_LOCALSTORAGE_KEY as A, BILLING_URL as B, DELETE_WORKSPACE_URL as D, ENGAGE_WIDGET_TRIGGER_ID as E, LEGACY_THEMES as L, MENU_ITEM_CLASSES as M, NEETO_AUTH_BILLING_INFO_URL as N, THEMES as T, THEME_ICON_BASE as a, THEME_BUTTON_BASE as b, MY_ORGANIZATION_URL as c, DEFAULT_MENU_LINK_PROPS as d, useWhatsNewChangesCount as u };
105
- //# sourceMappingURL=useWhatsNewChangesCount-DLIMw7dA.js.map
105
+ export { APP_THEME_LOCALSTORAGE_KEY as A, BILLING_URL as B, DELETE_WORKSPACE_URL as D, ENGAGE_WIDGET_TRIGGER_ID as E, LEGACY_THEMES as L, MENU_ITEM_CLASSES as M, NEETO_AUTH_BILLING_INFO_URL as N, SLOWNESS_DESCRIPTION_MAX_LENGTH as S, THEMES as T, THEME_ICON_BASE as a, THEME_BUTTON_BASE as b, MY_ORGANIZATION_URL as c, DEFAULT_MENU_LINK_PROPS as d, useWhatsNewChangesCount as u };
106
+ //# sourceMappingURL=useWhatsNewChangesCount-CQxhUCpt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWhatsNewChangesCount-CQxhUCpt.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,CAAC,CAAC,2CAA2C,CAAC;AACrD,IAAA,aAAa,EAAE;GAChB;AACDC,EAAAA,qBAAqB,EAAE;AACrBF,IAAAA,KAAK,EAAEC,CAAC,CAAC,oDAAoD,CAAC;AAC9D,IAAA,aAAa,EAAE;AACjB;AACF;;AAEA;AACO,IAAME,0BAA0B,GAAG;AAEnC,IAAMC,MAAM,GAAG;AAAEC,EAAAA,KAAK,EAAE,OAAO;AAAEC,EAAAA,IAAI,EAAE;AAAO;;AAErD;AACO,IAAMC,aAAa,GAAG;AAC3BF,EAAAA,KAAK,EAAE,uBAAuB;AAC9BC,EAAAA,IAAI,EAAE;AACR;AAEO,IAAME,2BAA2B,GACtC;AAEK,IAAMC,iBAAiB,GAC5B;AAEK,IAAMC,iBAAiB,GAC5B;AAEK,IAAMC,eAAe,GAAG;AAExB,IAAMC,+BAA+B,GAAG;;ACvC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,IAAIC,YAAY,GAAG,IAAI;AACvB,IAAMC,WAAW,GAAG,IAAIC,GAAG,EAAE;AAC7B,IAAIC,WAAW,GAAG,KAAK;AACvB,IAAIC,qBAAqB;AAEzB,IAAMC,MAAM,GAAG,SAATA,MAAMA,GAAA;AAAA,EAAA,OAASJ,WAAW,CAACK,OAAO,C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,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAvDI,IAAAA,YAAY,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,eAAe,GAAAH,UAAA,CAAA,CAAA,CAAA;AAEpCI,EAAAA,SAAS,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;;;;"}
@@ -4,7 +4,7 @@ import { memo, useState, useRef, useEffect, useMemo, forwardRef } from 'react';
4
4
  import { globalProps as globalProps$1 } from '@bigbinary/neeto-commons-frontend/v2/initializers';
5
5
  import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
6
6
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
7
- import { Typography, Spinner, Input, Dialog, DropdownMenu, Badge, Avatar } from '@bigbinary/neeto-atoms';
7
+ import { Typography, Spinner, Input, Dialog, DropdownMenu, Badge, Avatar, Textarea, Button, Toastr } from '@bigbinary/neeto-atoms';
8
8
  import { Collapsible, CollapsibleTrigger, DropdownMenuItem, CollapsibleContent, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, DropdownMenuSeparator, DropdownMenu as DropdownMenu$1, DropdownMenuTrigger, DropdownMenuContent } from '@bigbinary/neeto-atoms/primitives';
9
9
  import { isNotEmpty, isNotPresent, isPresent, truncate, humanize } from '@bigbinary/neeto-cist';
10
10
  import useHotkeys from '@bigbinary/neeto-hotkeys';
@@ -21,9 +21,9 @@ import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
21
21
  import { useQuery } from '@tanstack/react-query';
22
22
  import axios from 'axios';
23
23
  import { S as Search } from '../search-H0uYy0W-.js';
24
- import { g as getNeetoUrl, a as getProductBillingUrl } from '../urls-DC61u0b2.js';
24
+ import { g as getNeetoUrl, i as isPerformanceDiagnosticsEnabled, a as getProductBillingUrl, r as reportSlowness } from '../performanceDiagnostics-DJcT0dfG.js';
25
25
  import useBreakpoints from '@bigbinary/neeto-commons-frontend/v2/react-utils/useBreakpoints';
26
- import { M as MENU_ITEM_CLASSES, D as DELETE_WORKSPACE_URL, A as APP_THEME_LOCALSTORAGE_KEY, T as THEMES, L as LEGACY_THEMES, a as THEME_ICON_BASE, b as THEME_BUTTON_BASE, c as MY_ORGANIZATION_URL, B as BILLING_URL, N as NEETO_AUTH_BILLING_INFO_URL, u as useWhatsNewChangesCount, d as DEFAULT_MENU_LINK_PROPS } from '../useWhatsNewChangesCount-DLIMw7dA.js';
26
+ import { M as MENU_ITEM_CLASSES, D as DELETE_WORKSPACE_URL, A as APP_THEME_LOCALSTORAGE_KEY, T as THEMES, L as LEGACY_THEMES, a as THEME_ICON_BASE, b as THEME_BUTTON_BASE, c as MY_ORGANIZATION_URL, B as BILLING_URL, N as NEETO_AUTH_BILLING_INFO_URL, S as SLOWNESS_DESCRIPTION_MAX_LENGTH, u as useWhatsNewChangesCount, d as DEFAULT_MENU_LINK_PROPS } from '../useWhatsNewChangesCount-CQxhUCpt.js';
27
27
  import { c as createLucideIcon } from '../createLucideIcon--oLqczpc.js';
28
28
  import { C as CircleQuestionMark } from '../circle-question-mark-B807GLZf.js';
29
29
  import { C as ChevronRight } from '../chevron-right-CEsVcNLw.js';
@@ -34,6 +34,7 @@ import { getFromLocalStorage } from '@bigbinary/neeto-commons-frontend/v2/utils'
34
34
  import { resetAuthTokens } from '@bigbinary/neeto-commons-frontend/v2/utils/axios';
35
35
  import { removeFromLocalStorage } from '@bigbinary/neeto-commons-frontend/v2/utils/general';
36
36
  import CopyToClipboardButton from './CopyToClipboardButton.js';
37
+ import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
37
38
  import '../useKeyboardShortcutsPaneState-BlyFMEtW.js';
38
39
  import 'zustand/shallow';
39
40
  import '@bigbinary/neeto-commons-frontend/v2/react-utils/withImmutableActions';
@@ -51,7 +52,7 @@ import '../copy-Dj71cP65.js';
51
52
  */
52
53
 
53
54
 
54
- const __iconNode$b = [
55
+ const __iconNode$c = [
55
56
  [
56
57
  "path",
57
58
  {
@@ -60,7 +61,7 @@ const __iconNode$b = [
60
61
  }
61
62
  ]
62
63
  ];
63
- const Activity = createLucideIcon("activity", __iconNode$b);
64
+ const Activity = createLucideIcon("activity", __iconNode$c);
64
65
 
65
66
  /**
66
67
  * @license lucide-react v1.24.0 - ISC
@@ -70,7 +71,7 @@ const Activity = createLucideIcon("activity", __iconNode$b);
70
71
  */
71
72
 
72
73
 
73
- const __iconNode$a = [
74
+ const __iconNode$b = [
74
75
  ["path", { d: "M12 7v14", key: "1akyts" }],
75
76
  [
76
77
  "path",
@@ -80,7 +81,7 @@ const __iconNode$a = [
80
81
  }
81
82
  ]
82
83
  ];
83
- const BookOpen = createLucideIcon("book-open", __iconNode$a);
84
+ const BookOpen = createLucideIcon("book-open", __iconNode$b);
84
85
 
85
86
  /**
86
87
  * @license lucide-react v1.24.0 - ISC
@@ -90,11 +91,11 @@ const BookOpen = createLucideIcon("book-open", __iconNode$a);
90
91
  */
91
92
 
92
93
 
93
- const __iconNode$9 = [
94
+ const __iconNode$a = [
94
95
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
95
96
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
96
97
  ];
97
- const CircleCheck = createLucideIcon("circle-check", __iconNode$9);
98
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$a);
98
99
 
99
100
  /**
100
101
  * @license lucide-react v1.24.0 - ISC
@@ -104,12 +105,12 @@ const CircleCheck = createLucideIcon("circle-check", __iconNode$9);
104
105
  */
105
106
 
106
107
 
107
- const __iconNode$8 = [
108
+ const __iconNode$9 = [
108
109
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
109
110
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
110
111
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
111
112
  ];
112
- const CircleX = createLucideIcon("circle-x", __iconNode$8);
113
+ const CircleX = createLucideIcon("circle-x", __iconNode$9);
113
114
 
114
115
  /**
115
116
  * @license lucide-react v1.24.0 - ISC
@@ -119,7 +120,7 @@ const CircleX = createLucideIcon("circle-x", __iconNode$8);
119
120
  */
120
121
 
121
122
 
122
- const __iconNode$7 = [
123
+ const __iconNode$8 = [
123
124
  [
124
125
  "path",
125
126
  {
@@ -129,7 +130,21 @@ const __iconNode$7 = [
129
130
  ],
130
131
  ["path", { d: "M5 21h14", key: "11awu3" }]
131
132
  ];
132
- const Crown = createLucideIcon("crown", __iconNode$7);
133
+ const Crown = createLucideIcon("crown", __iconNode$8);
134
+
135
+ /**
136
+ * @license lucide-react v1.24.0 - ISC
137
+ *
138
+ * This source code is licensed under the ISC license.
139
+ * See the LICENSE file in the root directory of this source tree.
140
+ */
141
+
142
+
143
+ const __iconNode$7 = [
144
+ ["path", { d: "m12 14 4-4", key: "9kzdfg" }],
145
+ ["path", { d: "M3.34 19a10 10 0 1 1 17.32 0", key: "19p75a" }]
146
+ ];
147
+ const Gauge = createLucideIcon("gauge", __iconNode$7);
133
148
 
134
149
  /**
135
150
  * @license lucide-react v1.24.0 - ISC
@@ -567,7 +582,8 @@ var MenuItem = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
567
582
  MenuItem.displayName = "FloatingActionMenu.MenuItem";
568
583
 
569
584
  var HelpItems = withT(function (_ref) {
570
- var t = _ref.t;
585
+ var t = _ref.t,
586
+ onReportSlowness = _ref.onReportSlowness;
571
587
  return /*#__PURE__*/jsxs(Fragment, {
572
588
  children: [/*#__PURE__*/jsx(MenuItem, {
573
589
  "data-testid": "help-link-help-articles-button",
@@ -625,11 +641,19 @@ var HelpItems = withT(function (_ref) {
625
641
  rel: "noreferrer",
626
642
  target: "_blank",
627
643
  children: t("neetoMolecules.sidebar.helpLinks.systemStatus")
644
+ }), isPerformanceDiagnosticsEnabled() && /*#__PURE__*/jsx(MenuItem, {
645
+ "data-testid": "help-link-report-slowness-button",
646
+ prefix: /*#__PURE__*/jsx(Gauge, {
647
+ size: 18
648
+ }),
649
+ onClick: onReportSlowness,
650
+ children: t("neetoMolecules.sidebar.helpLinks.reportSlowness")
628
651
  })]
629
652
  });
630
653
  });
631
654
 
632
- var MobileHelpMenu = function MobileHelpMenu() {
655
+ var MobileHelpMenu = function MobileHelpMenu(_ref) {
656
+ var onReportSlowness = _ref.onReportSlowness;
633
657
  var _useTranslation = useTranslation(),
634
658
  t = _useTranslation.t;
635
659
  var _useState = useState(false),
@@ -659,18 +683,23 @@ var MobileHelpMenu = function MobileHelpMenu() {
659
683
  })
660
684
  }), /*#__PURE__*/jsx(CollapsibleContent, {
661
685
  className: "flex flex-col gap-0.5 ps-6 pt-1",
662
- children: /*#__PURE__*/jsx(HelpItems, {})
686
+ children: /*#__PURE__*/jsx(HelpItems, {
687
+ onReportSlowness: onReportSlowness
688
+ })
663
689
  })]
664
690
  });
665
691
  };
666
692
 
667
- var HelpMenu = function HelpMenu() {
693
+ var HelpMenu = function HelpMenu(_ref) {
694
+ var onReportSlowness = _ref.onReportSlowness;
668
695
  var _useBreakpoints = useBreakpoints(),
669
696
  isSize = _useBreakpoints.isSize;
670
697
  var isMobile = isSize("mobile");
671
698
  var _useTranslation = useTranslation(),
672
699
  t = _useTranslation.t;
673
- if (isMobile) return /*#__PURE__*/jsx(MobileHelpMenu, {});
700
+ if (isMobile) return /*#__PURE__*/jsx(MobileHelpMenu, {
701
+ onReportSlowness: onReportSlowness
702
+ });
674
703
  return /*#__PURE__*/jsxs(DropdownMenuSub, {
675
704
  children: [/*#__PURE__*/jsxs(DropdownMenuSubTrigger, {
676
705
  className: MENU_ITEM_CLASSES,
@@ -685,7 +714,9 @@ var HelpMenu = function HelpMenu() {
685
714
  className: "z-[99999]",
686
715
  collisionPadding: 16,
687
716
  sideOffset: 8,
688
- children: /*#__PURE__*/jsx(HelpItems, {})
717
+ children: /*#__PURE__*/jsx(HelpItems, {
718
+ onReportSlowness: onReportSlowness
719
+ })
689
720
  })]
690
721
  });
691
722
  };
@@ -1297,7 +1328,8 @@ var ProfileMenu = function ProfileMenu(_ref) {
1297
1328
  isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
1298
1329
  isConsumer = _ref.isConsumer,
1299
1330
  enableSubscriptionUpgradeRequest = _ref.enableSubscriptionUpgradeRequest,
1300
- openUpgradeModal = _ref.openUpgradeModal;
1331
+ openUpgradeModal = _ref.openUpgradeModal,
1332
+ onReportSlowness = _ref.onReportSlowness;
1301
1333
  var isAuthenticated = profileInfo.isAuthenticated;
1302
1334
  var _useTranslation = useTranslation(),
1303
1335
  t = _useTranslation.t;
@@ -1368,7 +1400,9 @@ var ProfileMenu = function ProfileMenu(_ref) {
1368
1400
  links: [subscriptionPlanLink]
1369
1401
  }), showProductSwitcher && /*#__PURE__*/jsx(ProductSwitcher, {
1370
1402
  toggleModal: toggleModal
1371
- }), /*#__PURE__*/jsx(HelpMenu, {}), /*#__PURE__*/jsx(DropdownMenuSeparator, {
1403
+ }), /*#__PURE__*/jsx(HelpMenu, {
1404
+ onReportSlowness: onReportSlowness
1405
+ }), /*#__PURE__*/jsx(DropdownMenuSeparator, {
1372
1406
  className: "my-2"
1373
1407
  })]
1374
1408
  }), isAuthenticated && !isConsumer && /*#__PURE__*/jsx(ProfileExpandMenu, {
@@ -1383,6 +1417,103 @@ var ProfileMenu = function ProfileMenu(_ref) {
1383
1417
  });
1384
1418
  };
1385
1419
 
1420
+ 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 }; })(); }
1421
+ 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); }
1422
+ var ReportSlownessModal = function ReportSlownessModal(_ref) {
1423
+ var reportedAt = _ref.reportedAt,
1424
+ onClose = _ref.onClose;
1425
+ var _useTranslation = useTranslation(),
1426
+ t = _useTranslation.t;
1427
+ var _useState = useState(""),
1428
+ _useState2 = _slicedToArray(_useState, 2),
1429
+ description = _useState2[0],
1430
+ setDescription = _useState2[1];
1431
+ var _useState3 = useState(false),
1432
+ _useState4 = _slicedToArray(_useState3, 2),
1433
+ isSubmitting = _useState4[0],
1434
+ setIsSubmitting = _useState4[1];
1435
+ var handleClose = function handleClose() {
1436
+ setDescription("");
1437
+ onClose();
1438
+ };
1439
+ var handleSubmit = /*#__PURE__*/function () {
1440
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
1441
+ var report;
1442
+ return _regenerator().w(function (_context) {
1443
+ while (1) switch (_context.n) {
1444
+ case 0:
1445
+ setIsSubmitting(true);
1446
+ _context.n = 1;
1447
+ return reportSlowness({
1448
+ description: description.trim(),
1449
+ reportedAt: reportedAt
1450
+ });
1451
+ case 1:
1452
+ report = _context.v;
1453
+ setIsSubmitting(false);
1454
+ if (report) {
1455
+ _context.n = 2;
1456
+ break;
1457
+ }
1458
+ Toastr.error(t("neetoMolecules.reportSlowness.error"));
1459
+ return _context.a(2);
1460
+ case 2:
1461
+ Toastr.success(t("neetoMolecules.reportSlowness.success"), report.replay_url ? {
1462
+ buttonLabel: t("neetoMolecules.reportSlowness.viewReplay"),
1463
+ onClick: function onClick() {
1464
+ return window.open(report.replay_url, "_blank", "noopener,noreferrer");
1465
+ }
1466
+ } : {});
1467
+ handleClose();
1468
+ case 3:
1469
+ return _context.a(2);
1470
+ }
1471
+ }, _callee);
1472
+ }));
1473
+ return function handleSubmit() {
1474
+ return _ref2.apply(this, arguments);
1475
+ };
1476
+ }();
1477
+ return /*#__PURE__*/jsxs(Dialog, {
1478
+ "aria-describedby": undefined,
1479
+ closeOnEsc: !isSubmitting,
1480
+ closeOnOutsideClick: !isSubmitting,
1481
+ isOpen: Boolean(reportedAt),
1482
+ onClose: handleClose,
1483
+ children: [/*#__PURE__*/jsx(Dialog.Header, {
1484
+ children: /*#__PURE__*/jsx(Dialog.Title, {
1485
+ children: t("neetoMolecules.reportSlowness.title")
1486
+ })
1487
+ }), /*#__PURE__*/jsx(Dialog.Body, {
1488
+ children: /*#__PURE__*/jsx(Textarea, {
1489
+ dataTestId: "report-slowness-description",
1490
+ label: t("neetoMolecules.reportSlowness.descriptionLabel"),
1491
+ maxLength: SLOWNESS_DESCRIPTION_MAX_LENGTH,
1492
+ value: description,
1493
+ placeholder: t("neetoMolecules.reportSlowness.descriptionPlaceholder"),
1494
+ onChange: function onChange(e) {
1495
+ return setDescription(e.target.value);
1496
+ }
1497
+ })
1498
+ }), /*#__PURE__*/jsxs(Dialog.Footer, {
1499
+ className: "flex gap-x-2",
1500
+ children: [/*#__PURE__*/jsx(Button, {
1501
+ "data-testid": "report-slowness-cancel-button",
1502
+ disabled: isSubmitting,
1503
+ label: t("neetoMolecules.reportSlowness.cancel"),
1504
+ variant: "secondary",
1505
+ onClick: handleClose
1506
+ }), /*#__PURE__*/jsx(Button, {
1507
+ "data-testid": "report-slowness-submit-button",
1508
+ disabled: isSubmitting,
1509
+ label: t("neetoMolecules.reportSlowness.submit"),
1510
+ loading: isSubmitting,
1511
+ onClick: handleSubmit
1512
+ })]
1513
+ })]
1514
+ });
1515
+ };
1516
+
1386
1517
  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; }
1387
1518
  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; }
1388
1519
  var ProfileButton = function ProfileButton(_ref) {
@@ -1409,6 +1540,10 @@ var ProfileButton = function ProfileButton(_ref) {
1409
1540
  _useState6 = _slicedToArray(_useState5, 2),
1410
1541
  isMenuOpen = _useState6[0],
1411
1542
  setIsMenuOpen = _useState6[1];
1543
+ var _useState7 = useState(null),
1544
+ _useState8 = _slicedToArray(_useState7, 2),
1545
+ slownessReportedAt = _useState8[0],
1546
+ setSlownessReportedAt = _useState8[1];
1412
1547
  var changesCount = useWhatsNewChangesCount();
1413
1548
  var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
1414
1549
  _KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
@@ -1484,13 +1619,21 @@ var ProfileButton = function ProfileButton(_ref) {
1484
1619
  openUpgradeModal: function openUpgradeModal() {
1485
1620
  return setIsUpgradeModalOpen(true);
1486
1621
  },
1487
- toggleModal: setIsModalOpen
1622
+ toggleModal: setIsModalOpen,
1623
+ onReportSlowness: function onReportSlowness() {
1624
+ return setSlownessReportedAt(Date.now());
1625
+ }
1488
1626
  })
1489
1627
  })]
1490
1628
  }), isPresent(changesCount) && /*#__PURE__*/jsx("span", {
1491
1629
  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",
1492
1630
  "data-testid": "help-icon-changes-count",
1493
1631
  children: changesCount
1632
+ }), /*#__PURE__*/jsx(ReportSlownessModal, {
1633
+ reportedAt: slownessReportedAt,
1634
+ onClose: function onClose() {
1635
+ return setSlownessReportedAt(null);
1636
+ }
1494
1637
  }), /*#__PURE__*/jsx(Modal, {
1495
1638
  isOpen: isModalOpen,
1496
1639
  onClose: function onClose() {