@bigbinary/neeto-molecules 4.1.47 → 4.1.49
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/{ConfigureView-DD3TW3Z8.js → ConfigureView-C84AmCMq.js} +4 -142
- package/dist/ConfigureView-C84AmCMq.js.map +1 -0
- package/dist/chevron-right-DcaO-Hlu.js +15 -0
- package/dist/chevron-right-DcaO-Hlu.js.map +1 -0
- package/dist/cjs/{ConfigureView-CIHmB-58.js → ConfigureView-DGf7cRMQ.js} +3 -142
- package/dist/cjs/ConfigureView-DGf7cRMQ.js.map +1 -0
- package/dist/cjs/chevron-right-DpleLIQp.js +17 -0
- package/dist/cjs/chevron-right-DpleLIQp.js.map +1 -0
- package/dist/cjs/createLucideIcon-DBDhE7kE.js +145 -0
- package/dist/cjs/createLucideIcon-DBDhE7kE.js.map +1 -0
- package/dist/cjs/v2/ConfigurePageSidebar.js +2 -1
- package/dist/cjs/v2/ConfigurePageSidebar.js.map +1 -1
- package/dist/cjs/v2/FloatingActionMenu.js +1592 -0
- package/dist/cjs/v2/FloatingActionMenu.js.map +1 -0
- package/dist/cjs/v2/Sidebar.js +6 -15
- package/dist/cjs/v2/Sidebar.js.map +1 -1
- package/dist/createLucideIcon-mNMhCCpf.js +143 -0
- package/dist/createLucideIcon-mNMhCCpf.js.map +1 -0
- package/dist/v2/ConfigurePageSidebar.js +2 -1
- package/dist/v2/ConfigurePageSidebar.js.map +1 -1
- package/dist/v2/FloatingActionMenu.js +1571 -0
- package/dist/v2/FloatingActionMenu.js.map +1 -0
- package/dist/v2/Sidebar.js +3 -12
- package/dist/v2/Sidebar.js.map +1 -1
- package/package.json +3 -3
- package/types/v2/FloatingActionMenu.d.ts +48 -0
- package/dist/ConfigureView-DD3TW3Z8.js.map +0 -1
- package/dist/cjs/ConfigureView-CIHmB-58.js.map +0 -1
|
@@ -0,0 +1,1592 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var _defineProperty = require('@babel/runtime/helpers/defineProperty');
|
|
4
|
+
var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var initializers = require('@bigbinary/neeto-commons-frontend/initializers');
|
|
7
|
+
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
8
|
+
var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
|
|
9
|
+
var neetoAtoms = require('@bigbinary/neeto-atoms');
|
|
10
|
+
var neetoCist = require('@bigbinary/neeto-cist');
|
|
11
|
+
var useHotkeys = require('@bigbinary/neeto-hotkeys');
|
|
12
|
+
var Profile = require('@bigbinary/neeto-team-members-frontend/Profile');
|
|
13
|
+
var ramda = require('ramda');
|
|
14
|
+
var KeyboardShortcuts = require('../KeyboardShortcuts.js');
|
|
15
|
+
var SubscriptionUpgradeRequestModal = require('../SubscriptionUpgradeRequestModal.js');
|
|
16
|
+
var classnames = require('classnames');
|
|
17
|
+
var reactI18next = require('react-i18next');
|
|
18
|
+
var Neeto = require('@bigbinary/neeto-icons/typeface-logos/Neeto');
|
|
19
|
+
var AppIcons = require('@bigbinary/neeto-icons/typeface-logos');
|
|
20
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
21
|
+
var reactQuery = require('@tanstack/react-query');
|
|
22
|
+
var axios = require('axios');
|
|
23
|
+
var createLucideIcon = require('../createLucideIcon-DBDhE7kE.js');
|
|
24
|
+
var chevronRight = require('../chevron-right-DpleLIQp.js');
|
|
25
|
+
var useBreakpoints = require('@bigbinary/neeto-commons-frontend/react-utils/useBreakpoints');
|
|
26
|
+
var _objectDestructuringEmpty = require('@babel/runtime/helpers/objectDestructuringEmpty');
|
|
27
|
+
var i18next = require('i18next');
|
|
28
|
+
var useLocalStorage = require('@bigbinary/neeto-commons-frontend/react-utils/useLocalStorage');
|
|
29
|
+
var utils = require('@bigbinary/neeto-commons-frontend/utils');
|
|
30
|
+
var axios$1 = require('@bigbinary/neeto-commons-frontend/utils/axios');
|
|
31
|
+
var general = require('@bigbinary/neeto-commons-frontend/utils/general');
|
|
32
|
+
var CopyToClipboardButton = require('../CopyToClipboardButton.js');
|
|
33
|
+
require('../useKeyboardShortcutsPaneState-BrgdLb9F.js');
|
|
34
|
+
require('zustand/shallow');
|
|
35
|
+
require('@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions');
|
|
36
|
+
require('zustand');
|
|
37
|
+
require('@bigbinary/neeto-icons/Close');
|
|
38
|
+
require('@bigbinary/neetoui/Typography');
|
|
39
|
+
require('@bigbinary/neetoui/Button');
|
|
40
|
+
require('@bigbinary/neetoui/managers');
|
|
41
|
+
require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
42
|
+
require('@bigbinary/neetoui/Kbd');
|
|
43
|
+
require('../ua-parser-DgQ3nYoO.js');
|
|
44
|
+
require('../inject-css-B6qYtOJe.js');
|
|
45
|
+
require('@bigbinary/neetoui/Modal');
|
|
46
|
+
require('@bigbinary/neeto-icons/Copy');
|
|
47
|
+
require('@bigbinary/neeto-icons/Check');
|
|
48
|
+
|
|
49
|
+
function _interopNamespaceDefault(e) {
|
|
50
|
+
var n = Object.create(null);
|
|
51
|
+
if (e) {
|
|
52
|
+
Object.keys(e).forEach(function (k) {
|
|
53
|
+
if (k !== 'default') {
|
|
54
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
55
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
56
|
+
enumerable: true,
|
|
57
|
+
get: function () { return e[k]; }
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
n.default = e;
|
|
63
|
+
return Object.freeze(n);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
var AppIcons__namespace = /*#__PURE__*/_interopNamespaceDefault(AppIcons);
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* @license lucide-react v1.7.0 - ISC
|
|
70
|
+
*
|
|
71
|
+
* This source code is licensed under the ISC license.
|
|
72
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
73
|
+
*/
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
const __iconNode$c = [
|
|
77
|
+
[
|
|
78
|
+
"path",
|
|
79
|
+
{
|
|
80
|
+
d: "M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",
|
|
81
|
+
key: "169zse"
|
|
82
|
+
}
|
|
83
|
+
]
|
|
84
|
+
];
|
|
85
|
+
const Activity = createLucideIcon.createLucideIcon("activity", __iconNode$c);
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* @license lucide-react v1.7.0 - ISC
|
|
89
|
+
*
|
|
90
|
+
* This source code is licensed under the ISC license.
|
|
91
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
const __iconNode$b = [
|
|
96
|
+
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
97
|
+
[
|
|
98
|
+
"path",
|
|
99
|
+
{
|
|
100
|
+
d: "M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",
|
|
101
|
+
key: "ruj8y"
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
];
|
|
105
|
+
const BookOpen = createLucideIcon.createLucideIcon("book-open", __iconNode$b);
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* @license lucide-react v1.7.0 - ISC
|
|
109
|
+
*
|
|
110
|
+
* This source code is licensed under the ISC license.
|
|
111
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
+
*/
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
const __iconNode$a = [
|
|
116
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
117
|
+
["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
|
|
118
|
+
];
|
|
119
|
+
const CircleCheck = createLucideIcon.createLucideIcon("circle-check", __iconNode$a);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @license lucide-react v1.7.0 - ISC
|
|
123
|
+
*
|
|
124
|
+
* This source code is licensed under the ISC license.
|
|
125
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
+
*/
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
const __iconNode$9 = [
|
|
130
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
131
|
+
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
132
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
133
|
+
];
|
|
134
|
+
const CircleQuestionMark = createLucideIcon.createLucideIcon("circle-question-mark", __iconNode$9);
|
|
135
|
+
|
|
136
|
+
/**
|
|
137
|
+
* @license lucide-react v1.7.0 - ISC
|
|
138
|
+
*
|
|
139
|
+
* This source code is licensed under the ISC license.
|
|
140
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
+
*/
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
const __iconNode$8 = [
|
|
145
|
+
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
146
|
+
["path", { d: "m15 9-6 6", key: "1uzhvr" }],
|
|
147
|
+
["path", { d: "m9 9 6 6", key: "z0biqf" }]
|
|
148
|
+
];
|
|
149
|
+
const CircleX = createLucideIcon.createLucideIcon("circle-x", __iconNode$8);
|
|
150
|
+
|
|
151
|
+
/**
|
|
152
|
+
* @license lucide-react v1.7.0 - ISC
|
|
153
|
+
*
|
|
154
|
+
* This source code is licensed under the ISC license.
|
|
155
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
+
*/
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
const __iconNode$7 = [
|
|
160
|
+
[
|
|
161
|
+
"path",
|
|
162
|
+
{
|
|
163
|
+
d: "M11.562 3.266a.5.5 0 0 1 .876 0L15.39 8.87a1 1 0 0 0 1.516.294L21.183 5.5a.5.5 0 0 1 .798.519l-2.834 10.246a1 1 0 0 1-.956.734H5.81a1 1 0 0 1-.957-.734L2.02 6.02a.5.5 0 0 1 .798-.519l4.276 3.664a1 1 0 0 0 1.516-.294z",
|
|
164
|
+
key: "1vdc57"
|
|
165
|
+
}
|
|
166
|
+
],
|
|
167
|
+
["path", { d: "M5 21h14", key: "11awu3" }]
|
|
168
|
+
];
|
|
169
|
+
const Crown = createLucideIcon.createLucideIcon("crown", __iconNode$7);
|
|
170
|
+
|
|
171
|
+
/**
|
|
172
|
+
* @license lucide-react v1.7.0 - ISC
|
|
173
|
+
*
|
|
174
|
+
* This source code is licensed under the ISC license.
|
|
175
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
+
*/
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
const __iconNode$6 = [
|
|
180
|
+
["path", { d: "m16 17 5-5-5-5", key: "1bji2h" }],
|
|
181
|
+
["path", { d: "M21 12H9", key: "dn1m92" }],
|
|
182
|
+
["path", { d: "M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4", key: "1uf3rs" }]
|
|
183
|
+
];
|
|
184
|
+
const LogOut = createLucideIcon.createLucideIcon("log-out", __iconNode$6);
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* @license lucide-react v1.7.0 - ISC
|
|
188
|
+
*
|
|
189
|
+
* This source code is licensed under the ISC license.
|
|
190
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
+
*/
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
const __iconNode$5 = [
|
|
195
|
+
[
|
|
196
|
+
"path",
|
|
197
|
+
{
|
|
198
|
+
d: "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",
|
|
199
|
+
key: "1sd12s"
|
|
200
|
+
}
|
|
201
|
+
],
|
|
202
|
+
["path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3", key: "1u773s" }],
|
|
203
|
+
["path", { d: "M12 17h.01", key: "p32p05" }]
|
|
204
|
+
];
|
|
205
|
+
const MessageCircleQuestionMark = createLucideIcon.createLucideIcon("message-circle-question-mark", __iconNode$5);
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* @license lucide-react v1.7.0 - ISC
|
|
209
|
+
*
|
|
210
|
+
* This source code is licensed under the ISC license.
|
|
211
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
+
*/
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
const __iconNode$4 = [
|
|
216
|
+
[
|
|
217
|
+
"path",
|
|
218
|
+
{
|
|
219
|
+
d: "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",
|
|
220
|
+
key: "kfwtm"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
];
|
|
224
|
+
const Moon = createLucideIcon.createLucideIcon("moon", __iconNode$4);
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* @license lucide-react v1.7.0 - ISC
|
|
228
|
+
*
|
|
229
|
+
* This source code is licensed under the ISC license.
|
|
230
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
const __iconNode$3 = [
|
|
235
|
+
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
236
|
+
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
237
|
+
];
|
|
238
|
+
const Search = createLucideIcon.createLucideIcon("search", __iconNode$3);
|
|
239
|
+
|
|
240
|
+
/**
|
|
241
|
+
* @license lucide-react v1.7.0 - ISC
|
|
242
|
+
*
|
|
243
|
+
* This source code is licensed under the ISC license.
|
|
244
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
245
|
+
*/
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
const __iconNode$2 = [
|
|
249
|
+
["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
|
|
250
|
+
["path", { d: "M12 2v2", key: "tus03m" }],
|
|
251
|
+
["path", { d: "M12 20v2", key: "1lh1kg" }],
|
|
252
|
+
["path", { d: "m4.93 4.93 1.41 1.41", key: "149t6j" }],
|
|
253
|
+
["path", { d: "m17.66 17.66 1.41 1.41", key: "ptbguv" }],
|
|
254
|
+
["path", { d: "M2 12h2", key: "1t8f8n" }],
|
|
255
|
+
["path", { d: "M20 12h2", key: "1q8mjw" }],
|
|
256
|
+
["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
|
|
257
|
+
["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
|
|
258
|
+
];
|
|
259
|
+
const Sun = createLucideIcon.createLucideIcon("sun", __iconNode$2);
|
|
260
|
+
|
|
261
|
+
/**
|
|
262
|
+
* @license lucide-react v1.7.0 - ISC
|
|
263
|
+
*
|
|
264
|
+
* This source code is licensed under the ISC license.
|
|
265
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
+
*/
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
const __iconNode$1 = [
|
|
270
|
+
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
271
|
+
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
272
|
+
];
|
|
273
|
+
const User = createLucideIcon.createLucideIcon("user", __iconNode$1);
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* @license lucide-react v1.7.0 - ISC
|
|
277
|
+
*
|
|
278
|
+
* This source code is licensed under the ISC license.
|
|
279
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
280
|
+
*/
|
|
281
|
+
|
|
282
|
+
|
|
283
|
+
const __iconNode = [
|
|
284
|
+
["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
|
|
285
|
+
["path", { d: "M16 3.128a4 4 0 0 1 0 7.744", key: "16gr8j" }],
|
|
286
|
+
["path", { d: "M22 21v-2a4 4 0 0 0-3-3.87", key: "kshegd" }],
|
|
287
|
+
["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }]
|
|
288
|
+
];
|
|
289
|
+
const Users = createLucideIcon.createLucideIcon("users", __iconNode);
|
|
290
|
+
|
|
291
|
+
var QUERY_KEYS$1 = {
|
|
292
|
+
NEETO_APPS_LIST: "neeto-apps-list"
|
|
293
|
+
};
|
|
294
|
+
var SPECIAL_APP_NAMES = {
|
|
295
|
+
bugwatch: "BugWatch"
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
var _excluded$3 = ["name", "description", "url", "isHighlighted"];
|
|
299
|
+
function ownKeys$b(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; }
|
|
300
|
+
function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
301
|
+
var ProductLink$1 = function ProductLink(_ref) {
|
|
302
|
+
var _globalProps, _globalProps2;
|
|
303
|
+
var name = _ref.name,
|
|
304
|
+
description = _ref.description,
|
|
305
|
+
url = _ref.url,
|
|
306
|
+
_ref$isHighlighted = _ref.isHighlighted,
|
|
307
|
+
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted,
|
|
308
|
+
props = _objectWithoutProperties(_ref, _excluded$3);
|
|
309
|
+
var normalizedName = (name || "").toLowerCase();
|
|
310
|
+
var specialCase = SPECIAL_APP_NAMES[normalizedName];
|
|
311
|
+
var safeName = name || "";
|
|
312
|
+
var appName = "Neeto".concat(safeName.charAt(0)).concat(safeName.slice(1).toLowerCase());
|
|
313
|
+
var AppIcon = specialCase ? AppIcons__namespace["Neeto".concat(specialCase)] : AppIcons__namespace[appName];
|
|
314
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", _objectSpread$b(_objectSpread$b({
|
|
315
|
+
"data-testid": "".concat(normalizedName, "-app-link"),
|
|
316
|
+
href: url,
|
|
317
|
+
rel: "noreferrer",
|
|
318
|
+
target: "_blank",
|
|
319
|
+
className: classnames("bg-background focus-visible:bg-accent flex w-full max-w-full cursor-pointer flex-col gap-4 rounded-lg border p-2.5 no-underline transition-all outline-none", {
|
|
320
|
+
"border-primary bg-primary/5": (_globalProps = globalProps) === null || _globalProps === void 0 || (_globalProps = _globalProps.appName) === null || _globalProps === void 0 ? void 0 : _globalProps.includes(name),
|
|
321
|
+
"neeto-molecules-product-switcher-link--highlighted bg-accent": isHighlighted,
|
|
322
|
+
"border-border hover:border-primary": !((_globalProps2 = globalProps) !== null && _globalProps2 !== void 0 && (_globalProps2 = _globalProps2.appName) !== null && _globalProps2 !== void 0 && _globalProps2.includes(name))
|
|
323
|
+
})
|
|
324
|
+
}, props), {}, {
|
|
325
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("div", {
|
|
326
|
+
className: "shrink-0 grow [&>svg]:h-9 [&>svg]:w-auto",
|
|
327
|
+
children: AppIcon ? /*#__PURE__*/jsxRuntime.jsx(AppIcon, {}) : /*#__PURE__*/jsxRuntime.jsx(Neeto, {
|
|
328
|
+
className: "h-6 w-auto"
|
|
329
|
+
})
|
|
330
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
331
|
+
className: "shrink-0",
|
|
332
|
+
children: /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
333
|
+
className: "text-muted-foreground block text-xs",
|
|
334
|
+
children: description
|
|
335
|
+
})
|
|
336
|
+
})]
|
|
337
|
+
}));
|
|
338
|
+
};
|
|
339
|
+
var ProductLink = /*#__PURE__*/React.memo(ProductLink$1);
|
|
340
|
+
|
|
341
|
+
function ownKeys$a(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; }
|
|
342
|
+
function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
343
|
+
var Content = function Content(_ref) {
|
|
344
|
+
var highlightedIndex = _ref.highlightedIndex,
|
|
345
|
+
filteredApps = _ref.filteredApps,
|
|
346
|
+
isLoading = _ref.isLoading;
|
|
347
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
348
|
+
t = _useTranslation.t;
|
|
349
|
+
if (isLoading) {
|
|
350
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
351
|
+
className: "flex items-center justify-center py-8",
|
|
352
|
+
children: /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Spinner, {
|
|
353
|
+
"data-testid": "neeto-ui-spinner"
|
|
354
|
+
})
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
return (filteredApps === null || filteredApps === void 0 ? void 0 : filteredApps.length) > 0 ? /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
358
|
+
className: "grid grid-cols-[repeat(auto-fill,minmax(288px,1fr))] gap-3 max-lg:grid-cols-[repeat(auto-fill,minmax(248px,1fr))] max-sm:grid-cols-1",
|
|
359
|
+
children: filteredApps.map(function (app, index) {
|
|
360
|
+
return /*#__PURE__*/jsxRuntime.jsx(ProductLink, _objectSpread$a(_objectSpread$a({}, app), {}, {
|
|
361
|
+
"data-highlighted-index": index,
|
|
362
|
+
isHighlighted: index === highlightedIndex
|
|
363
|
+
}), app.name);
|
|
364
|
+
})
|
|
365
|
+
}) : /*#__PURE__*/jsxRuntime.jsx("p", {
|
|
366
|
+
className: "text-center text-sm",
|
|
367
|
+
"data-testid": "no-apps-found-title",
|
|
368
|
+
children: t("neetoMolecules.productSwitcher.noApps")
|
|
369
|
+
});
|
|
370
|
+
};
|
|
371
|
+
|
|
372
|
+
var fetch$1 = function fetch() {
|
|
373
|
+
return axios.get("/api/v1/neeto_apps");
|
|
374
|
+
};
|
|
375
|
+
var neetoAppsApi = {
|
|
376
|
+
fetch: fetch$1
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
function ownKeys$9(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; }
|
|
380
|
+
function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
381
|
+
var useFetchNeetoApps = function useFetchNeetoApps(options) {
|
|
382
|
+
return reactQuery.useQuery(_objectSpread$9({
|
|
383
|
+
queryKey: [QUERY_KEYS$1.NEETO_APPS_LIST],
|
|
384
|
+
queryFn: neetoAppsApi.fetch,
|
|
385
|
+
staleTime: 5 * 60 * 1000
|
|
386
|
+
}, options));
|
|
387
|
+
};
|
|
388
|
+
|
|
389
|
+
var useProductSwitcherNavigation = function useProductSwitcherNavigation() {
|
|
390
|
+
var filteredApps = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
391
|
+
var _useState = React.useState(0),
|
|
392
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
393
|
+
highlightedIndex = _useState2[0],
|
|
394
|
+
setHighlightedIndex = _useState2[1];
|
|
395
|
+
var scrollContainerRef = React.useRef(null);
|
|
396
|
+
React.useEffect(function () {
|
|
397
|
+
return setHighlightedIndex(0);
|
|
398
|
+
}, [filteredApps]);
|
|
399
|
+
React.useEffect(function () {
|
|
400
|
+
if (!scrollContainerRef.current || ramda.isEmpty(filteredApps)) return;
|
|
401
|
+
var container = scrollContainerRef.current;
|
|
402
|
+
var highlightedElement = container.querySelector("[data-highlighted-index=\"".concat(highlightedIndex, "\"]"));
|
|
403
|
+
if (!highlightedElement) return;
|
|
404
|
+
var containerRect = container.getBoundingClientRect();
|
|
405
|
+
var elRect = highlightedElement.getBoundingClientRect();
|
|
406
|
+
if (elRect.top < containerRect.top) {
|
|
407
|
+
container.scrollTop += elRect.top - containerRect.top;
|
|
408
|
+
} else if (elRect.bottom > containerRect.bottom) {
|
|
409
|
+
container.scrollTop += elRect.bottom - containerRect.bottom;
|
|
410
|
+
}
|
|
411
|
+
}, [highlightedIndex, filteredApps]);
|
|
412
|
+
var getColumnsPerRow = function getColumnsPerRow() {
|
|
413
|
+
var width = window.innerWidth;
|
|
414
|
+
if (width < 768) return 1;
|
|
415
|
+
if (width < 1024) return 2;
|
|
416
|
+
if (width < 1536) return 3;
|
|
417
|
+
return 4;
|
|
418
|
+
};
|
|
419
|
+
var handleOpenHighlightedApp = function handleOpenHighlightedApp() {
|
|
420
|
+
var app = filteredApps[highlightedIndex];
|
|
421
|
+
if (!(app !== null && app !== void 0 && app.url)) return;
|
|
422
|
+
window.open(app.url, "_blank", "noopener,noreferrer");
|
|
423
|
+
};
|
|
424
|
+
var navigationHandlers = {
|
|
425
|
+
left: function left(prev) {
|
|
426
|
+
return prev === 0 ? filteredApps.length - 1 : prev - 1;
|
|
427
|
+
},
|
|
428
|
+
right: function right(prev) {
|
|
429
|
+
return prev === filteredApps.length - 1 ? 0 : prev + 1;
|
|
430
|
+
},
|
|
431
|
+
up: function up(prev) {
|
|
432
|
+
var columnsPerRow = getColumnsPerRow();
|
|
433
|
+
var newIndex = prev - columnsPerRow;
|
|
434
|
+
if (newIndex >= 0) return newIndex;
|
|
435
|
+
var currentCol = prev % columnsPerRow;
|
|
436
|
+
var lastIndex = filteredApps.length - 1;
|
|
437
|
+
return lastIndex - (lastIndex - currentCol) % columnsPerRow;
|
|
438
|
+
},
|
|
439
|
+
down: function down(prev) {
|
|
440
|
+
var columnsPerRow = getColumnsPerRow();
|
|
441
|
+
var newIndex = prev + columnsPerRow;
|
|
442
|
+
if (newIndex < filteredApps.length) return newIndex;
|
|
443
|
+
return prev % columnsPerRow;
|
|
444
|
+
}
|
|
445
|
+
};
|
|
446
|
+
var keyActions = {
|
|
447
|
+
Enter: handleOpenHighlightedApp,
|
|
448
|
+
ArrowLeft: function ArrowLeft() {
|
|
449
|
+
return setHighlightedIndex(navigationHandlers["left"]);
|
|
450
|
+
},
|
|
451
|
+
ArrowRight: function ArrowRight() {
|
|
452
|
+
return setHighlightedIndex(navigationHandlers["right"]);
|
|
453
|
+
},
|
|
454
|
+
ArrowUp: function ArrowUp() {
|
|
455
|
+
return setHighlightedIndex(navigationHandlers["up"]);
|
|
456
|
+
},
|
|
457
|
+
ArrowDown: function ArrowDown() {
|
|
458
|
+
return setHighlightedIndex(navigationHandlers["down"]);
|
|
459
|
+
},
|
|
460
|
+
Tab: function Tab(e) {
|
|
461
|
+
return setHighlightedIndex(navigationHandlers[e.shiftKey ? "left" : "right"]);
|
|
462
|
+
}
|
|
463
|
+
};
|
|
464
|
+
var handleKeyDown = function handleKeyDown(e) {
|
|
465
|
+
var action = keyActions[e.key];
|
|
466
|
+
if (!action) return;
|
|
467
|
+
e.preventDefault();
|
|
468
|
+
e.stopPropagation();
|
|
469
|
+
if (neetoCist.isNotEmpty(filteredApps)) action(e);
|
|
470
|
+
};
|
|
471
|
+
return {
|
|
472
|
+
highlightedIndex: highlightedIndex,
|
|
473
|
+
handleKeyDown: handleKeyDown,
|
|
474
|
+
scrollContainerRef: scrollContainerRef
|
|
475
|
+
};
|
|
476
|
+
};
|
|
477
|
+
|
|
478
|
+
var Menu = function Menu(_ref) {
|
|
479
|
+
var _ref$isMobile = _ref.isMobile,
|
|
480
|
+
isMobile = _ref$isMobile === void 0 ? false : _ref$isMobile;
|
|
481
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
482
|
+
t = _useTranslation.t;
|
|
483
|
+
var _useState = React.useState(""),
|
|
484
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
485
|
+
searchTerm = _useState2[0],
|
|
486
|
+
setSearchTerm = _useState2[1];
|
|
487
|
+
var _useFetchNeetoApps = useFetchNeetoApps(),
|
|
488
|
+
data = _useFetchNeetoApps.data,
|
|
489
|
+
isLoading = _useFetchNeetoApps.isLoading;
|
|
490
|
+
var substring = searchTerm.replace(/ /g, "").toLowerCase();
|
|
491
|
+
var filteredApps = React.useMemo(function () {
|
|
492
|
+
var _data$neetoApps;
|
|
493
|
+
if (!data) return [];
|
|
494
|
+
return data === null || data === void 0 || (_data$neetoApps = data.neetoApps) === null || _data$neetoApps === void 0 ? void 0 : _data$neetoApps.filter(function (_ref2) {
|
|
495
|
+
var name = _ref2.name;
|
|
496
|
+
var nameLower = name.toLowerCase();
|
|
497
|
+
var searchTermLower = substring.toLowerCase();
|
|
498
|
+
var isNeetoPrefixMatch = searchTermLower.length <= 4 && "neeto".startsWith(searchTermLower);
|
|
499
|
+
if (isNeetoPrefixMatch) return true;
|
|
500
|
+
var productName = searchTermLower.startsWith("neeto") ? searchTermLower.replace("neeto", "") : searchTermLower;
|
|
501
|
+
return nameLower.includes(productName);
|
|
502
|
+
});
|
|
503
|
+
}, [data, substring]);
|
|
504
|
+
var _useProductSwitcherNa = useProductSwitcherNavigation(filteredApps),
|
|
505
|
+
highlightedIndex = _useProductSwitcherNa.highlightedIndex,
|
|
506
|
+
handleKeyDown = _useProductSwitcherNa.handleKeyDown,
|
|
507
|
+
scrollContainerRef = _useProductSwitcherNa.scrollContainerRef;
|
|
508
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
509
|
+
className: "bg-background flex w-full max-w-full flex-col items-start overflow-y-auto p-6 transition-all max-md:p-4",
|
|
510
|
+
"data-testid": "switcher-wrapper",
|
|
511
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
512
|
+
"data-testid": "product-switcher-body-wrapper",
|
|
513
|
+
className: classnames("mb-8 flex w-full items-center justify-between gap-8 pt-1 max-md:flex-col max-md:items-start max-md:gap-6", {
|
|
514
|
+
"max-md:mb-6": isMobile
|
|
515
|
+
}),
|
|
516
|
+
children: [!isMobile && /*#__PURE__*/jsxRuntime.jsx("h1", {
|
|
517
|
+
className: "text-2xl font-bold max-sm:text-xl",
|
|
518
|
+
children: t("neetoMolecules.productSwitcher.chooseNeetoProduct")
|
|
519
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
520
|
+
className: "flex-grow lg:w-[296px] lg:flex-grow-0",
|
|
521
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
522
|
+
className: "relative",
|
|
523
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Search, {
|
|
524
|
+
className: "text-muted-foreground absolute start-3 top-1/2 size-4 -translate-y-1/2"
|
|
525
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Input, {
|
|
526
|
+
autoFocus: true,
|
|
527
|
+
className: "h-10 ps-9",
|
|
528
|
+
"data-testid": "product-switcher-search-input",
|
|
529
|
+
placeholder: t("neetoMolecules.productSwitcher.searchProducts"),
|
|
530
|
+
type: "search",
|
|
531
|
+
value: searchTerm,
|
|
532
|
+
onChange: function onChange(e) {
|
|
533
|
+
return setSearchTerm(e.target.value);
|
|
534
|
+
},
|
|
535
|
+
onKeyDown: handleKeyDown
|
|
536
|
+
})]
|
|
537
|
+
})
|
|
538
|
+
})]
|
|
539
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
540
|
+
className: "mb-6 flex w-full flex-col gap-3 text-sm",
|
|
541
|
+
ref: scrollContainerRef,
|
|
542
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Content, {
|
|
543
|
+
filteredApps: filteredApps,
|
|
544
|
+
highlightedIndex: highlightedIndex,
|
|
545
|
+
isLoading: isLoading
|
|
546
|
+
})
|
|
547
|
+
})]
|
|
548
|
+
}, "switcher-wrapper");
|
|
549
|
+
};
|
|
550
|
+
|
|
551
|
+
var Modal = function Modal(_ref) {
|
|
552
|
+
var isOpen = _ref.isOpen,
|
|
553
|
+
onClose = _ref.onClose;
|
|
554
|
+
return /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Dialog, {
|
|
555
|
+
open: isOpen,
|
|
556
|
+
onOpenChange: function onOpenChange(open) {
|
|
557
|
+
return !open && onClose();
|
|
558
|
+
},
|
|
559
|
+
children: /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.DialogContent, {
|
|
560
|
+
"aria-describedby": undefined,
|
|
561
|
+
className: "sm:max-w-4xl",
|
|
562
|
+
showCloseButton: false,
|
|
563
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.DialogTitle, {
|
|
564
|
+
className: "sr-only",
|
|
565
|
+
children: "Product Switcher"
|
|
566
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
567
|
+
"data-testid": "product-switcher-modal",
|
|
568
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Menu, {})
|
|
569
|
+
})]
|
|
570
|
+
})
|
|
571
|
+
});
|
|
572
|
+
};
|
|
573
|
+
|
|
574
|
+
var MENU_ITEM_CLASS$1 = "flex h-9 w-full items-center gap-2 neeto-ui-rounded-md px-2.5 text-sm font-medium hover:bg-accent";
|
|
575
|
+
|
|
576
|
+
function ownKeys$8(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; }
|
|
577
|
+
function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
578
|
+
var MenuButton$4 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
579
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
580
|
+
t = _useTranslation.t;
|
|
581
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$8(_objectSpread$8({
|
|
582
|
+
ref: ref,
|
|
583
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
584
|
+
"data-testid": "help-menu-button",
|
|
585
|
+
type: "button"
|
|
586
|
+
}, props), {}, {
|
|
587
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CircleQuestionMark, {
|
|
588
|
+
size: 18
|
|
589
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
590
|
+
className: "flex-grow text-start",
|
|
591
|
+
children: t("neetoMolecules.sidebar.help")
|
|
592
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
593
|
+
className: "rtl:scale-x-[-1]",
|
|
594
|
+
size: 18
|
|
595
|
+
})]
|
|
596
|
+
}));
|
|
597
|
+
});
|
|
598
|
+
MenuButton$4.displayName = "HelpMenuButton";
|
|
599
|
+
|
|
600
|
+
var HelpMenu = function HelpMenu() {
|
|
601
|
+
var _globalProps;
|
|
602
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
603
|
+
t = _useTranslation.t;
|
|
604
|
+
var _useState = React.useState(false),
|
|
605
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
606
|
+
open = _useState2[0],
|
|
607
|
+
setOpen = _useState2[1];
|
|
608
|
+
var timeoutRef = React.useRef(null);
|
|
609
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
610
|
+
clearTimeout(timeoutRef.current);
|
|
611
|
+
setOpen(true);
|
|
612
|
+
}, []);
|
|
613
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
614
|
+
timeoutRef.current = setTimeout(function () {
|
|
615
|
+
return setOpen(false);
|
|
616
|
+
}, 150);
|
|
617
|
+
}, []);
|
|
618
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
619
|
+
open: open,
|
|
620
|
+
onOpenChange: setOpen,
|
|
621
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
622
|
+
asChild: true,
|
|
623
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$4, {
|
|
624
|
+
onClick: function onClick() {
|
|
625
|
+
return setOpen(function (prev) {
|
|
626
|
+
return !prev;
|
|
627
|
+
});
|
|
628
|
+
},
|
|
629
|
+
onMouseEnter: handleMouseEnter,
|
|
630
|
+
onMouseLeave: handleMouseLeave
|
|
631
|
+
})
|
|
632
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.PopoverContent, {
|
|
633
|
+
align: "center",
|
|
634
|
+
className: "z-[99999] w-56 gap-0.5 p-1",
|
|
635
|
+
side: "right",
|
|
636
|
+
sideOffset: 8,
|
|
637
|
+
onMouseEnter: handleMouseEnter,
|
|
638
|
+
onMouseLeave: handleMouseLeave,
|
|
639
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
640
|
+
className: MENU_ITEM_CLASS$1,
|
|
641
|
+
"data-testid": "help-link-help-articles-button",
|
|
642
|
+
href: "https://help.".concat(ramda.toLower(((_globalProps = globalProps) === null || _globalProps === void 0 ? void 0 : _globalProps.appName) || ""), ".com/"),
|
|
643
|
+
rel: "noreferrer",
|
|
644
|
+
target: "_blank",
|
|
645
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(BookOpen, {
|
|
646
|
+
size: 18
|
|
647
|
+
}), t("neetoMolecules.sidebar.helpLinks.helpArticles")]
|
|
648
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
649
|
+
className: MENU_ITEM_CLASS$1,
|
|
650
|
+
"data-testid": "help-link-live-chat-button",
|
|
651
|
+
type: "button",
|
|
652
|
+
onClick: function onClick() {
|
|
653
|
+
var _window$NeetoChat, _window$NeetoChat2;
|
|
654
|
+
(_window$NeetoChat = window.NeetoChat) === null || _window$NeetoChat === void 0 || (_window$NeetoChat = _window$NeetoChat.contextualHelp) === null || _window$NeetoChat === void 0 || _window$NeetoChat.maximizeWidget();
|
|
655
|
+
(_window$NeetoChat2 = window.NeetoChat) === null || _window$NeetoChat2 === void 0 || (_window$NeetoChat2 = _window$NeetoChat2.contextualHelp) === null || _window$NeetoChat2 === void 0 || _window$NeetoChat2.openWidget();
|
|
656
|
+
},
|
|
657
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(MessageCircleQuestionMark, {
|
|
658
|
+
size: 18
|
|
659
|
+
}), t("neetoMolecules.sidebar.helpLinks.liveChat")]
|
|
660
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
661
|
+
className: MENU_ITEM_CLASS$1,
|
|
662
|
+
"data-testid": "help-link-community-button",
|
|
663
|
+
href: "https://www.launchpass.com/neetohq",
|
|
664
|
+
rel: "noreferrer",
|
|
665
|
+
target: "_blank",
|
|
666
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Users, {
|
|
667
|
+
size: 18
|
|
668
|
+
}), t("neetoMolecules.sidebar.helpLinks.askTheCommunity")]
|
|
669
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
670
|
+
className: MENU_ITEM_CLASS$1,
|
|
671
|
+
"data-testid": "help-link-status-button",
|
|
672
|
+
href: "https://neetostatus.com/",
|
|
673
|
+
rel: "noreferrer",
|
|
674
|
+
target: "_blank",
|
|
675
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Activity, {
|
|
676
|
+
size: 18
|
|
677
|
+
}), t("neetoMolecules.sidebar.helpLinks.systemStatus")]
|
|
678
|
+
})]
|
|
679
|
+
})]
|
|
680
|
+
});
|
|
681
|
+
};
|
|
682
|
+
|
|
683
|
+
var _excluded$2 = ["label", "icon", "changesCount", "href"];
|
|
684
|
+
function ownKeys$7(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; }
|
|
685
|
+
function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
686
|
+
var LinkSection = function LinkSection(_ref) {
|
|
687
|
+
var links = _ref.links;
|
|
688
|
+
if (neetoCist.isNotPresent(links)) return null;
|
|
689
|
+
return /*#__PURE__*/jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
690
|
+
children: links.map(function (_ref2, idx) {
|
|
691
|
+
var label = _ref2.label,
|
|
692
|
+
Icon = _ref2.icon,
|
|
693
|
+
changesCount = _ref2.changesCount,
|
|
694
|
+
href = _ref2.href,
|
|
695
|
+
otherProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
696
|
+
var Tag = href ? "a" : "button";
|
|
697
|
+
return /*#__PURE__*/jsxRuntime.jsxs(Tag, _objectSpread$7(_objectSpread$7(_objectSpread$7({
|
|
698
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
699
|
+
"data-testid": "floating-action-menu-link-section",
|
|
700
|
+
type: href ? undefined : "button"
|
|
701
|
+
}, href ? {
|
|
702
|
+
href: href
|
|
703
|
+
} : {}), otherProps), {}, {
|
|
704
|
+
children: [Icon && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
705
|
+
size: 18
|
|
706
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
707
|
+
className: "flex flex-grow items-center gap-2",
|
|
708
|
+
children: [label, neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
709
|
+
className: "bg-accent-foreground flex h-[1.125rem] min-w-[1.125rem] shrink-0 items-center justify-center rounded-full px-1 text-[10px] text-white select-none",
|
|
710
|
+
"data-testid": "help-section-menu-changes-count",
|
|
711
|
+
children: changesCount
|
|
712
|
+
})]
|
|
713
|
+
})]
|
|
714
|
+
}), idx);
|
|
715
|
+
})
|
|
716
|
+
});
|
|
717
|
+
};
|
|
718
|
+
|
|
719
|
+
var fetch = function fetch(email) {
|
|
720
|
+
return axios.get("/logged_in_organizations", {
|
|
721
|
+
params: {
|
|
722
|
+
email: email
|
|
723
|
+
}
|
|
724
|
+
});
|
|
725
|
+
};
|
|
726
|
+
var loggedInOrganizationsApi = {
|
|
727
|
+
fetch: fetch
|
|
728
|
+
};
|
|
729
|
+
|
|
730
|
+
var QUERY_KEYS = {
|
|
731
|
+
LOGGED_IN_ORGANIZATIONS_LIST: "logged-in-organizations-list"
|
|
732
|
+
};
|
|
733
|
+
|
|
734
|
+
var LOGGED_IN_ORGANIZATIONS_LIST = QUERY_KEYS.LOGGED_IN_ORGANIZATIONS_LIST;
|
|
735
|
+
var useFetchLoggedInOrganizations = function useFetchLoggedInOrganizations(email) {
|
|
736
|
+
return reactQuery.useQuery({
|
|
737
|
+
queryKey: [LOGGED_IN_ORGANIZATIONS_LIST, email],
|
|
738
|
+
queryFn: function queryFn() {
|
|
739
|
+
return loggedInOrganizationsApi.fetch(email);
|
|
740
|
+
}
|
|
741
|
+
});
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
function ownKeys$6(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; }
|
|
745
|
+
function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
746
|
+
var MenuButton$3 = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
747
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
748
|
+
t = _useTranslation.t;
|
|
749
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$6(_objectSpread$6({
|
|
750
|
+
ref: ref,
|
|
751
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
752
|
+
"data-testid": "organization-switcher-button",
|
|
753
|
+
type: "button"
|
|
754
|
+
}, props), {}, {
|
|
755
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
756
|
+
className: "flex-grow text-start",
|
|
757
|
+
children: t("neetoMolecules.sidebar.organizationSwitcher.label")
|
|
758
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
759
|
+
className: "rtl:scale-x-[-1]",
|
|
760
|
+
size: 18
|
|
761
|
+
})]
|
|
762
|
+
}));
|
|
763
|
+
});
|
|
764
|
+
MenuButton$3.displayName = "OrganizationSwitcherMenuButton";
|
|
765
|
+
|
|
766
|
+
var OrganizationSwitcher = function OrganizationSwitcher() {
|
|
767
|
+
var _globalProps$user;
|
|
768
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
769
|
+
t = _useTranslation.t;
|
|
770
|
+
var _useState = React.useState(false),
|
|
771
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
772
|
+
open = _useState2[0],
|
|
773
|
+
setOpen = _useState2[1];
|
|
774
|
+
var timeoutRef = React.useRef(null);
|
|
775
|
+
var _useFetchLoggedInOrga = useFetchLoggedInOrganizations(initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email),
|
|
776
|
+
_useFetchLoggedInOrga2 = _useFetchLoggedInOrga.data,
|
|
777
|
+
_useFetchLoggedInOrga3 = _useFetchLoggedInOrga2 === void 0 ? {} : _useFetchLoggedInOrga2,
|
|
778
|
+
organizations = _useFetchLoggedInOrga3.organizations,
|
|
779
|
+
authAppUrl = _useFetchLoggedInOrga3.authAppUrl;
|
|
780
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
781
|
+
clearTimeout(timeoutRef.current);
|
|
782
|
+
setOpen(true);
|
|
783
|
+
}, []);
|
|
784
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
785
|
+
timeoutRef.current = setTimeout(function () {
|
|
786
|
+
return setOpen(false);
|
|
787
|
+
}, 150);
|
|
788
|
+
}, []);
|
|
789
|
+
var isCurrentSubdomain = function isCurrentSubdomain(link) {
|
|
790
|
+
try {
|
|
791
|
+
var currentSubdomain = window.location.hostname.split(".")[0];
|
|
792
|
+
var linkSubdomain = new URL(link).hostname.split(".")[0];
|
|
793
|
+
return currentSubdomain === linkSubdomain;
|
|
794
|
+
} catch (_unused) {
|
|
795
|
+
return false;
|
|
796
|
+
}
|
|
797
|
+
};
|
|
798
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
799
|
+
open: open,
|
|
800
|
+
onOpenChange: setOpen,
|
|
801
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
802
|
+
asChild: true,
|
|
803
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$3, {
|
|
804
|
+
onClick: function onClick() {
|
|
805
|
+
return setOpen(function (prev) {
|
|
806
|
+
return !prev;
|
|
807
|
+
});
|
|
808
|
+
},
|
|
809
|
+
onMouseEnter: handleMouseEnter,
|
|
810
|
+
onMouseLeave: handleMouseLeave
|
|
811
|
+
})
|
|
812
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.PopoverContent, {
|
|
813
|
+
align: "center",
|
|
814
|
+
className: "z-[99999] w-56 gap-0.5 p-1",
|
|
815
|
+
side: "right",
|
|
816
|
+
sideOffset: 8,
|
|
817
|
+
onMouseEnter: handleMouseEnter,
|
|
818
|
+
onMouseLeave: handleMouseLeave,
|
|
819
|
+
children: [organizations === null || organizations === void 0 ? void 0 : organizations.map(function (organization) {
|
|
820
|
+
return /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
821
|
+
href: organization.organizationUrl,
|
|
822
|
+
rel: "noreferrer",
|
|
823
|
+
target: "_blank",
|
|
824
|
+
className: classnames("hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium", {
|
|
825
|
+
"text-green-600": isCurrentSubdomain(organization.organizationUrl)
|
|
826
|
+
}),
|
|
827
|
+
children: [organization.orgName, isCurrentSubdomain(organization.organizationUrl) && /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Badge, {
|
|
828
|
+
variant: "default",
|
|
829
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CircleCheck, {
|
|
830
|
+
size: 12
|
|
831
|
+
}), t("neetoMolecules.sidebar.organizationSwitcher.signedin")]
|
|
832
|
+
})]
|
|
833
|
+
}, organization.userId);
|
|
834
|
+
}), /*#__PURE__*/jsxRuntime.jsx("a", {
|
|
835
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
836
|
+
href: authAppUrl,
|
|
837
|
+
rel: "noreferrer",
|
|
838
|
+
target: "_blank",
|
|
839
|
+
children: t("neetoMolecules.sidebar.organizationSwitcher.addAccount")
|
|
840
|
+
})]
|
|
841
|
+
})]
|
|
842
|
+
});
|
|
843
|
+
};
|
|
844
|
+
|
|
845
|
+
function ownKeys$5(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; }
|
|
846
|
+
function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
847
|
+
var MenuButton$2 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
848
|
+
var otherProps = Object.assign({}, (_objectDestructuringEmpty(_ref), _ref));
|
|
849
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
850
|
+
t = _useTranslation.t;
|
|
851
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$5(_objectSpread$5({
|
|
852
|
+
ref: ref,
|
|
853
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
854
|
+
"data-testid": "product-switcher-button",
|
|
855
|
+
type: "button"
|
|
856
|
+
}, otherProps), {}, {
|
|
857
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
858
|
+
className: "flex-grow text-start",
|
|
859
|
+
children: t("neetoMolecules.sidebar.productSwitcher")
|
|
860
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
861
|
+
className: "rtl:scale-x-[-1]",
|
|
862
|
+
size: 18
|
|
863
|
+
})]
|
|
864
|
+
}));
|
|
865
|
+
});
|
|
866
|
+
MenuButton$2.displayName = "ProductSwitcherMenuButton";
|
|
867
|
+
|
|
868
|
+
var Dropdown = function Dropdown() {
|
|
869
|
+
var _useState = React.useState(false),
|
|
870
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
871
|
+
open = _useState2[0],
|
|
872
|
+
setOpen = _useState2[1];
|
|
873
|
+
var timeoutRef = React.useRef(null);
|
|
874
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
875
|
+
clearTimeout(timeoutRef.current);
|
|
876
|
+
setOpen(true);
|
|
877
|
+
}, []);
|
|
878
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
879
|
+
timeoutRef.current = setTimeout(function () {
|
|
880
|
+
return setOpen(false);
|
|
881
|
+
}, 150);
|
|
882
|
+
}, []);
|
|
883
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
884
|
+
open: open,
|
|
885
|
+
onOpenChange: setOpen,
|
|
886
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
887
|
+
asChild: true,
|
|
888
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$2, {
|
|
889
|
+
onClick: function onClick() {
|
|
890
|
+
return setOpen(function (prev) {
|
|
891
|
+
return !prev;
|
|
892
|
+
});
|
|
893
|
+
},
|
|
894
|
+
onMouseEnter: handleMouseEnter,
|
|
895
|
+
onMouseLeave: handleMouseLeave
|
|
896
|
+
})
|
|
897
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverContent, {
|
|
898
|
+
align: "start",
|
|
899
|
+
className: "z-[99999] w-[calc(100vw-25rem)] max-w-none overflow-y-auto rounded-xl p-0",
|
|
900
|
+
collisionPadding: 16,
|
|
901
|
+
side: "right",
|
|
902
|
+
sideOffset: 8,
|
|
903
|
+
style: {
|
|
904
|
+
maxHeight: "var(--radix-popover-content-available-height)"
|
|
905
|
+
},
|
|
906
|
+
onMouseEnter: handleMouseEnter,
|
|
907
|
+
onMouseLeave: handleMouseLeave,
|
|
908
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Menu, {})
|
|
909
|
+
})]
|
|
910
|
+
});
|
|
911
|
+
};
|
|
912
|
+
|
|
913
|
+
var ProductSwitcher = function ProductSwitcher(_ref) {
|
|
914
|
+
var toggleModal = _ref.toggleModal;
|
|
915
|
+
var _useBreakpoints = useBreakpoints(),
|
|
916
|
+
isSize = _useBreakpoints.isSize;
|
|
917
|
+
var isMobile = isSize("mobile");
|
|
918
|
+
return isMobile ? /*#__PURE__*/jsxRuntime.jsx(MenuButton$2, {
|
|
919
|
+
onClick: function onClick() {
|
|
920
|
+
return toggleModal(true);
|
|
921
|
+
}
|
|
922
|
+
}) : /*#__PURE__*/jsxRuntime.jsx(Dropdown, {});
|
|
923
|
+
};
|
|
924
|
+
|
|
925
|
+
var MENU_ITEM_CLASS = "flex h-9 w-full items-center gap-2 neeto-ui-rounded-md px-2.5 text-sm font-medium hover:bg-accent";
|
|
926
|
+
|
|
927
|
+
var getInitials$1 = function getInitials(name) {
|
|
928
|
+
return (name || "").split(" ").filter(Boolean).map(function (n) {
|
|
929
|
+
return n[0];
|
|
930
|
+
}).join("").toUpperCase().slice(0, 2);
|
|
931
|
+
};
|
|
932
|
+
var ProfileHeader = function ProfileHeader(_ref) {
|
|
933
|
+
var profileInfo = _ref.profileInfo;
|
|
934
|
+
var name = profileInfo.name,
|
|
935
|
+
email = profileInfo.email,
|
|
936
|
+
imageUrl = profileInfo.imageUrl;
|
|
937
|
+
return /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
938
|
+
className: "flex w-full min-w-0 items-center gap-2 text-start",
|
|
939
|
+
"data-testid": "floating-action-menu-profile-header",
|
|
940
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Avatar, {
|
|
941
|
+
className: "size-8 shrink-0",
|
|
942
|
+
"data-testid": "floating-action-menu-header-profile-icon",
|
|
943
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.AvatarImage, {
|
|
944
|
+
alt: name,
|
|
945
|
+
src: imageUrl
|
|
946
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.AvatarFallback, {
|
|
947
|
+
children: getInitials$1(name)
|
|
948
|
+
})]
|
|
949
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
950
|
+
className: "flex min-w-0 flex-grow flex-col gap-1",
|
|
951
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
952
|
+
className: "text-sm leading-tight font-semibold",
|
|
953
|
+
"data-testid": "floating-action-menu-header-user-name",
|
|
954
|
+
title: name,
|
|
955
|
+
children: neetoCist.truncate(name, 18)
|
|
956
|
+
}), email && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
957
|
+
className: "text-muted-foreground w-full truncate text-xs leading-tight",
|
|
958
|
+
"data-testid": "floating-action-menu-header-user-email",
|
|
959
|
+
children: email
|
|
960
|
+
})]
|
|
961
|
+
})]
|
|
962
|
+
});
|
|
963
|
+
};
|
|
964
|
+
|
|
965
|
+
var _excluded$1 = ["profileInfo"];
|
|
966
|
+
function ownKeys$4(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; }
|
|
967
|
+
function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
968
|
+
var MenuButton$1 = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
969
|
+
var profileInfo = _ref.profileInfo,
|
|
970
|
+
otherProps = _objectWithoutProperties(_ref, _excluded$1);
|
|
971
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$4(_objectSpread$4({
|
|
972
|
+
ref: ref,
|
|
973
|
+
className: "hover:bg-accent flex w-full items-center gap-2 rounded-md px-2.5 py-2 transition-colors",
|
|
974
|
+
"data-testid": "profile-expand-menu-button",
|
|
975
|
+
type: "button"
|
|
976
|
+
}, otherProps), {}, {
|
|
977
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(ProfileHeader, {
|
|
978
|
+
profileInfo: profileInfo
|
|
979
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
980
|
+
className: "shrink-0 rtl:scale-x-[-1]",
|
|
981
|
+
size: 18
|
|
982
|
+
})]
|
|
983
|
+
}));
|
|
984
|
+
});
|
|
985
|
+
MenuButton$1.displayName = "ProfileExpandMenuButton";
|
|
986
|
+
|
|
987
|
+
var MY_ORGANIZATION_URL = "/auth/organization/edit";
|
|
988
|
+
var DELETE_WORKSPACE_URL = "/auth/organization/delete";
|
|
989
|
+
var ENGAGE_WIDGET_TRIGGER_ID = "neetoengage-trigger";
|
|
990
|
+
var DEFAULT_MENU_LINK_PROPS = {
|
|
991
|
+
engageProps: {
|
|
992
|
+
id: ENGAGE_WIDGET_TRIGGER_ID,
|
|
993
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.whatsNew"),
|
|
994
|
+
"data-testid": "help-link-engage-button"
|
|
995
|
+
},
|
|
996
|
+
keyboardShortcutProps: {
|
|
997
|
+
label: i18next.t("neetoMolecules.sidebar.helpLinks.keyboardShortcuts"),
|
|
998
|
+
"data-testid": "help-link-keyboard-shortcut-button"
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
|
|
1002
|
+
// Theme switcher
|
|
1003
|
+
var APP_THEME_LOCALSTORAGE_KEY = "appTheme";
|
|
1004
|
+
var THEMES = {
|
|
1005
|
+
LIGHT: "neeto-ui-theme--light",
|
|
1006
|
+
DARK: "neeto-ui-theme--dark"
|
|
1007
|
+
};
|
|
1008
|
+
|
|
1009
|
+
// Shadcn uses `.dark` class for dark mode via @custom-variant dark (&:is(.dark *))
|
|
1010
|
+
var SHADCN_DARK_CLASS = "dark";
|
|
1011
|
+
var NEETO_AUTH_BILLING_INFO_URL = "/neeto_sso/api/v1/subscription/billing";
|
|
1012
|
+
|
|
1013
|
+
var ProfileExpandMenu = function ProfileExpandMenu(_ref) {
|
|
1014
|
+
var _window$globalProps;
|
|
1015
|
+
var profileInfo = _ref.profileInfo;
|
|
1016
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1017
|
+
t = _useTranslation.t;
|
|
1018
|
+
var _useState = React.useState(false),
|
|
1019
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1020
|
+
open = _useState2[0],
|
|
1021
|
+
setOpen = _useState2[1];
|
|
1022
|
+
var _Profile$usePaneState = Profile.usePaneState(),
|
|
1023
|
+
_Profile$usePaneState2 = _slicedToArray(_Profile$usePaneState, 2),
|
|
1024
|
+
setIsProfilePaneOpen = _Profile$usePaneState2[1];
|
|
1025
|
+
var timeoutRef = React.useRef(null);
|
|
1026
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
1027
|
+
clearTimeout(timeoutRef.current);
|
|
1028
|
+
setOpen(true);
|
|
1029
|
+
}, []);
|
|
1030
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
1031
|
+
timeoutRef.current = setTimeout(function () {
|
|
1032
|
+
return setOpen(false);
|
|
1033
|
+
}, 150);
|
|
1034
|
+
}, []);
|
|
1035
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
1036
|
+
open: open,
|
|
1037
|
+
onOpenChange: setOpen,
|
|
1038
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
1039
|
+
asChild: true,
|
|
1040
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton$1, {
|
|
1041
|
+
profileInfo: profileInfo,
|
|
1042
|
+
onClick: function onClick() {
|
|
1043
|
+
return setOpen(function (prev) {
|
|
1044
|
+
return !prev;
|
|
1045
|
+
});
|
|
1046
|
+
},
|
|
1047
|
+
onMouseEnter: handleMouseEnter,
|
|
1048
|
+
onMouseLeave: handleMouseLeave
|
|
1049
|
+
})
|
|
1050
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.PopoverContent, {
|
|
1051
|
+
align: "center",
|
|
1052
|
+
className: "z-[99999] w-56 gap-0.5 p-1",
|
|
1053
|
+
side: "right",
|
|
1054
|
+
sideOffset: 8,
|
|
1055
|
+
onMouseEnter: handleMouseEnter,
|
|
1056
|
+
onMouseLeave: handleMouseLeave,
|
|
1057
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1058
|
+
className: MENU_ITEM_CLASS,
|
|
1059
|
+
"data-testid": "profile-my-profile-button",
|
|
1060
|
+
type: "button",
|
|
1061
|
+
onClick: function onClick() {
|
|
1062
|
+
return setIsProfilePaneOpen(true);
|
|
1063
|
+
},
|
|
1064
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(User, {
|
|
1065
|
+
size: 18
|
|
1066
|
+
}), t("neetoMolecules.sidebar.myProfile")]
|
|
1067
|
+
}), ((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 || (_window$globalProps = _window$globalProps.user) === null || _window$globalProps === void 0 ? void 0 : _window$globalProps.isOwner) && /*#__PURE__*/jsxRuntime.jsxs("a", {
|
|
1068
|
+
className: MENU_ITEM_CLASS,
|
|
1069
|
+
"data-testid": "profile-cancel-account-button",
|
|
1070
|
+
href: DELETE_WORKSPACE_URL,
|
|
1071
|
+
rel: "noreferrer",
|
|
1072
|
+
target: "_blank",
|
|
1073
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(CircleX, {
|
|
1074
|
+
size: 18
|
|
1075
|
+
}), t("neetoMolecules.sidebar.cancelAccount")]
|
|
1076
|
+
})]
|
|
1077
|
+
})]
|
|
1078
|
+
});
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
var getSidebarStateLocalStorageKey = function getSidebarStateLocalStorageKey() {
|
|
1082
|
+
var _globalProps$user, _globalProps$user2;
|
|
1083
|
+
var user = ((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.email) || ((_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.phoneNumber);
|
|
1084
|
+
return "sidebarState-".concat(user);
|
|
1085
|
+
};
|
|
1086
|
+
var getUserProfileInfo = function getUserProfileInfo() {
|
|
1087
|
+
var _globalProps$user$fir, _globalProps$user3, _globalProps$user$las, _globalProps$user4, _globalProps$user5, _globalProps$user6, _globalProps$user7;
|
|
1088
|
+
return {
|
|
1089
|
+
name: "".concat((_globalProps$user$fir = (_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.firstName) !== null && _globalProps$user$fir !== void 0 ? _globalProps$user$fir : "", " ").concat((_globalProps$user$las = (_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.lastName) !== null && _globalProps$user$las !== void 0 ? _globalProps$user$las : ""),
|
|
1090
|
+
imageUrl: globalProps.authenticated ? (_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.profileImageUrl : "https://d2v7kzglnr2dnh.cloudfront.net/others/profile-pic.jpg",
|
|
1091
|
+
email: ((_globalProps$user6 = globalProps.user) === null || _globalProps$user6 === void 0 ? void 0 : _globalProps$user6.email) || ((_globalProps$user7 = globalProps.user) === null || _globalProps$user7 === void 0 ? void 0 : _globalProps$user7.phoneNumber),
|
|
1092
|
+
isAuthenticated: globalProps.authenticated
|
|
1093
|
+
};
|
|
1094
|
+
};
|
|
1095
|
+
var getConsumerProfileInfo = function getConsumerProfileInfo() {
|
|
1096
|
+
var _globalProps$consumer, _globalProps$consumer2, _globalProps$consumer3, _globalProps$consumer4, _globalProps$consumer5, _globalProps$consumer6, _globalProps$consumer7;
|
|
1097
|
+
return {
|
|
1098
|
+
name: "".concat((_globalProps$consumer = (_globalProps$consumer2 = globalProps.consumer) === null || _globalProps$consumer2 === void 0 ? void 0 : _globalProps$consumer2.firstName) !== null && _globalProps$consumer !== void 0 ? _globalProps$consumer : "", " ").concat((_globalProps$consumer3 = (_globalProps$consumer4 = globalProps.consumer) === null || _globalProps$consumer4 === void 0 ? void 0 : _globalProps$consumer4.lastName) !== null && _globalProps$consumer3 !== void 0 ? _globalProps$consumer3 : ""),
|
|
1099
|
+
imageUrl: ((_globalProps$consumer5 = globalProps.consumer) === null || _globalProps$consumer5 === void 0 ? void 0 : _globalProps$consumer5.profileImageUrl) || "https://d2v7kzglnr2dnh.cloudfront.net/others/profile-pic.jpg",
|
|
1100
|
+
email: ((_globalProps$consumer6 = globalProps.consumer) === null || _globalProps$consumer6 === void 0 ? void 0 : _globalProps$consumer6.email) || ((_globalProps$consumer7 = globalProps.consumer) === null || _globalProps$consumer7 === void 0 ? void 0 : _globalProps$consumer7.phoneNumber),
|
|
1101
|
+
isAuthenticated: globalProps.isConsumer
|
|
1102
|
+
};
|
|
1103
|
+
};
|
|
1104
|
+
var getDefaultBottomLinks = function getDefaultBottomLinks(isAuthenticated, isConsumer) {
|
|
1105
|
+
return [isAuthenticated ? {
|
|
1106
|
+
label: i18next.t("neetoMolecules.sidebar.logout"),
|
|
1107
|
+
icon: LogOut,
|
|
1108
|
+
onClick: function onClick() {
|
|
1109
|
+
axios$1.resetAuthTokens();
|
|
1110
|
+
general.removeFromLocalStorage(getSidebarStateLocalStorageKey());
|
|
1111
|
+
isConsumer ? window.location.href = "/consumers/logout?redirect_uri=".concat(window.location.href) : window.location.href = "/logout";
|
|
1112
|
+
},
|
|
1113
|
+
"data-testid": "profile-logout-button"
|
|
1114
|
+
} : {
|
|
1115
|
+
label: i18next.t("neetoMolecules.sidebar.login"),
|
|
1116
|
+
onClick: function onClick() {
|
|
1117
|
+
window.location.href = "/login";
|
|
1118
|
+
},
|
|
1119
|
+
"data-testid": "profile-login-button"
|
|
1120
|
+
}];
|
|
1121
|
+
};
|
|
1122
|
+
var getProfileInfo = function getProfileInfo(profileInfoOverrides, isConsumer) {
|
|
1123
|
+
return ramda.mergeDeepLeft(profileInfoOverrides, isConsumer ? getConsumerProfileInfo() : getUserProfileInfo());
|
|
1124
|
+
};
|
|
1125
|
+
|
|
1126
|
+
// Theme switcher utils.
|
|
1127
|
+
var setDarkTheme = function setDarkTheme() {
|
|
1128
|
+
if (!document.body) return;
|
|
1129
|
+
document.body.classList.remove(THEMES.LIGHT);
|
|
1130
|
+
document.body.classList.add(THEMES.DARK, SHADCN_DARK_CLASS);
|
|
1131
|
+
};
|
|
1132
|
+
var setLightTheme = function setLightTheme() {
|
|
1133
|
+
if (!document.body) return;
|
|
1134
|
+
document.body.classList.remove(THEMES.DARK, SHADCN_DARK_CLASS);
|
|
1135
|
+
document.body.classList.add(THEMES.LIGHT);
|
|
1136
|
+
};
|
|
1137
|
+
var setAppTheme = function setAppTheme() {
|
|
1138
|
+
var isDarkTheme = utils.getFromLocalStorage(APP_THEME_LOCALSTORAGE_KEY) === THEMES.DARK;
|
|
1139
|
+
isDarkTheme ? setDarkTheme() : setLightTheme();
|
|
1140
|
+
};
|
|
1141
|
+
|
|
1142
|
+
var ThemeSwitcher = function ThemeSwitcher() {
|
|
1143
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1144
|
+
t = _useTranslation.t;
|
|
1145
|
+
var _useLocalStorage = useLocalStorage(APP_THEME_LOCALSTORAGE_KEY, THEMES.LIGHT),
|
|
1146
|
+
_useLocalStorage2 = _slicedToArray(_useLocalStorage, 2),
|
|
1147
|
+
appTheme = _useLocalStorage2[0],
|
|
1148
|
+
setAppTheme = _useLocalStorage2[1];
|
|
1149
|
+
var isDarkThemeSelected = appTheme === THEMES.DARK;
|
|
1150
|
+
var switchTheme = function switchTheme(theme) {
|
|
1151
|
+
theme === THEMES.LIGHT ? setLightTheme() : setDarkTheme();
|
|
1152
|
+
setAppTheme(theme);
|
|
1153
|
+
};
|
|
1154
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1155
|
+
className: "bg-muted/40 flex items-center justify-between gap-3 rounded-b-xl px-4 py-3",
|
|
1156
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1157
|
+
className: "text-muted-foreground text-xs font-medium",
|
|
1158
|
+
children: t("neetoMolecules.sidebar.themeSwitcher.label")
|
|
1159
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1160
|
+
className: "bg-muted flex rounded-lg p-0.5",
|
|
1161
|
+
"data-testid": "theme-switcher-button",
|
|
1162
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1163
|
+
"data-testid": "theme-switcher-light-button",
|
|
1164
|
+
type: "button",
|
|
1165
|
+
className: classnames("flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium transition-all", isDarkThemeSelected ? "text-muted-foreground hover:text-foreground" : "bg-background text-foreground ring-border shadow-sm ring-1"),
|
|
1166
|
+
onClick: function onClick() {
|
|
1167
|
+
return switchTheme(THEMES.LIGHT);
|
|
1168
|
+
},
|
|
1169
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Sun, {
|
|
1170
|
+
size: 13
|
|
1171
|
+
}), t("neetoMolecules.sidebar.themeSwitcher.light")]
|
|
1172
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1173
|
+
"data-testid": "theme-switcher-dark-button",
|
|
1174
|
+
type: "button",
|
|
1175
|
+
className: classnames("flex items-center gap-1 rounded-md px-2.5 py-1.5 text-xs font-medium transition-all", isDarkThemeSelected ? "bg-background text-foreground ring-border shadow-sm ring-1" : "text-muted-foreground hover:text-foreground"),
|
|
1176
|
+
onClick: function onClick() {
|
|
1177
|
+
return switchTheme(THEMES.DARK);
|
|
1178
|
+
},
|
|
1179
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Moon, {
|
|
1180
|
+
size: 13
|
|
1181
|
+
}), t("neetoMolecules.sidebar.themeSwitcher.dark")]
|
|
1182
|
+
})]
|
|
1183
|
+
})]
|
|
1184
|
+
});
|
|
1185
|
+
};
|
|
1186
|
+
|
|
1187
|
+
function ownKeys$3(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; }
|
|
1188
|
+
function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1189
|
+
var MenuButton = /*#__PURE__*/React.forwardRef(function (props, ref) {
|
|
1190
|
+
var _globalProps$organiza;
|
|
1191
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1192
|
+
t = _useTranslation.t;
|
|
1193
|
+
return /*#__PURE__*/jsxRuntime.jsxs("button", _objectSpread$3(_objectSpread$3({
|
|
1194
|
+
ref: ref,
|
|
1195
|
+
className: "hover:bg-accent flex w-full items-center gap-2 rounded-md px-2.5 py-2 text-start",
|
|
1196
|
+
"data-testid": "workspace-display",
|
|
1197
|
+
type: "button"
|
|
1198
|
+
}, props), {}, {
|
|
1199
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1200
|
+
className: "flex flex-grow flex-col gap-1.5",
|
|
1201
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1202
|
+
className: "text-sm font-medium",
|
|
1203
|
+
children: t("neetoMolecules.sidebar.workspace")
|
|
1204
|
+
}), ((_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.name) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1205
|
+
className: "text-muted-foreground text-xs",
|
|
1206
|
+
children: initializers.globalProps.organization.name
|
|
1207
|
+
})]
|
|
1208
|
+
}), /*#__PURE__*/jsxRuntime.jsx(chevronRight.ChevronRight, {
|
|
1209
|
+
className: "shrink-0 rtl:scale-x-[-1]",
|
|
1210
|
+
size: 18
|
|
1211
|
+
})]
|
|
1212
|
+
}));
|
|
1213
|
+
});
|
|
1214
|
+
MenuButton.displayName = "WorkspaceMenuButton";
|
|
1215
|
+
|
|
1216
|
+
var WorkspaceMenu = function WorkspaceMenu() {
|
|
1217
|
+
var _globalProps$organiza;
|
|
1218
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1219
|
+
t = _useTranslation.t;
|
|
1220
|
+
var _useState = React.useState(false),
|
|
1221
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1222
|
+
open = _useState2[0],
|
|
1223
|
+
setOpen = _useState2[1];
|
|
1224
|
+
var timeoutRef = React.useRef(null);
|
|
1225
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
1226
|
+
clearTimeout(timeoutRef.current);
|
|
1227
|
+
setOpen(true);
|
|
1228
|
+
}, []);
|
|
1229
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
1230
|
+
timeoutRef.current = setTimeout(function () {
|
|
1231
|
+
return setOpen(false);
|
|
1232
|
+
}, 150);
|
|
1233
|
+
}, []);
|
|
1234
|
+
return /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
1235
|
+
open: open,
|
|
1236
|
+
onOpenChange: setOpen,
|
|
1237
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
1238
|
+
asChild: true,
|
|
1239
|
+
children: /*#__PURE__*/jsxRuntime.jsx(MenuButton, {
|
|
1240
|
+
onClick: function onClick() {
|
|
1241
|
+
return setOpen(function (prev) {
|
|
1242
|
+
return !prev;
|
|
1243
|
+
});
|
|
1244
|
+
},
|
|
1245
|
+
onMouseEnter: handleMouseEnter,
|
|
1246
|
+
onMouseLeave: handleMouseLeave
|
|
1247
|
+
})
|
|
1248
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.PopoverContent, {
|
|
1249
|
+
align: "center",
|
|
1250
|
+
className: "z-[99999] w-56 gap-0.5 p-1",
|
|
1251
|
+
side: "right",
|
|
1252
|
+
sideOffset: 8,
|
|
1253
|
+
onMouseEnter: handleMouseEnter,
|
|
1254
|
+
onMouseLeave: handleMouseLeave,
|
|
1255
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("a", {
|
|
1256
|
+
className: "hover:bg-accent flex h-9 w-full items-center gap-2 rounded-md px-2.5 text-sm font-medium",
|
|
1257
|
+
"data-testid": "profile-organization-settings-button",
|
|
1258
|
+
href: MY_ORGANIZATION_URL,
|
|
1259
|
+
rel: "noreferrer",
|
|
1260
|
+
target: "_blank",
|
|
1261
|
+
children: t("neetoMolecules.sidebar.workspaceMenu.settings")
|
|
1262
|
+
}), ((_globalProps$organiza = initializers.globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.subdomain) && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1263
|
+
className: "px-3 py-2",
|
|
1264
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1265
|
+
className: "flex flex-col gap-0.5 text-start",
|
|
1266
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1267
|
+
className: "text-sm font-medium",
|
|
1268
|
+
children: t("neetoMolecules.sidebar.workspaceMenu.subdomain")
|
|
1269
|
+
}), /*#__PURE__*/jsxRuntime.jsxs("span", {
|
|
1270
|
+
className: "text-muted-foreground flex items-center gap-1 text-xs",
|
|
1271
|
+
children: [/*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1272
|
+
className: "min-w-0 truncate",
|
|
1273
|
+
children: initializers.globalProps.organization.subdomain
|
|
1274
|
+
}), /*#__PURE__*/jsxRuntime.jsx(CopyToClipboardButton, {
|
|
1275
|
+
className: "flex-shrink-0",
|
|
1276
|
+
size: "small",
|
|
1277
|
+
style: "text",
|
|
1278
|
+
value: initializers.globalProps.organization.subdomain
|
|
1279
|
+
})]
|
|
1280
|
+
})]
|
|
1281
|
+
})
|
|
1282
|
+
})]
|
|
1283
|
+
})]
|
|
1284
|
+
});
|
|
1285
|
+
};
|
|
1286
|
+
|
|
1287
|
+
function ownKeys$2(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; }
|
|
1288
|
+
function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1289
|
+
var ProfileMenu = function ProfileMenu(_ref) {
|
|
1290
|
+
var _globalProps$user, _globalProps$user2, _globalProps$user3, _globalProps$user4, _globalProps$user5;
|
|
1291
|
+
var profileInfo = _ref.profileInfo,
|
|
1292
|
+
showProductSwitcher = _ref.showProductSwitcher,
|
|
1293
|
+
defaultLinks = _ref.defaultLinks,
|
|
1294
|
+
topLinks = _ref.topLinks,
|
|
1295
|
+
bottomLinks = _ref.bottomLinks,
|
|
1296
|
+
customContent = _ref.customContent,
|
|
1297
|
+
toggleModal = _ref.toggleModal,
|
|
1298
|
+
isThemeSwitcherEnabled = _ref.isThemeSwitcherEnabled,
|
|
1299
|
+
isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
|
|
1300
|
+
isConsumer = _ref.isConsumer,
|
|
1301
|
+
enableSubscriptionUpgradeRequest = _ref.enableSubscriptionUpgradeRequest,
|
|
1302
|
+
openUpgradeModal = _ref.openUpgradeModal;
|
|
1303
|
+
var isAuthenticated = profileInfo.isAuthenticated;
|
|
1304
|
+
var _useTranslation = reactI18next.useTranslation(),
|
|
1305
|
+
t = _useTranslation.t;
|
|
1306
|
+
var normalizedPlan = (((_globalProps$user = globalProps.user) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.subscriptionPlan) || "").toLowerCase();
|
|
1307
|
+
var isFreePlan = normalizedPlan === "free";
|
|
1308
|
+
var isOwner = (_globalProps$user2 = globalProps.user) === null || _globalProps$user2 === void 0 ? void 0 : _globalProps$user2.isOwner;
|
|
1309
|
+
var showUpgradeModal = isFreePlan && enableSubscriptionUpgradeRequest && !isOwner;
|
|
1310
|
+
var getSubscriptionPlanAction = function getSubscriptionPlanAction() {
|
|
1311
|
+
if (showUpgradeModal) return {
|
|
1312
|
+
onClick: openUpgradeModal
|
|
1313
|
+
};
|
|
1314
|
+
if (isFreePlan && isOwner && enableSubscriptionUpgradeRequest) {
|
|
1315
|
+
var _globalProps$organiza;
|
|
1316
|
+
return {
|
|
1317
|
+
href: "".concat((_globalProps$organiza = globalProps.organization) === null || _globalProps$organiza === void 0 ? void 0 : _globalProps$organiza.authAppUrl, "/admin/billing/overview")
|
|
1318
|
+
};
|
|
1319
|
+
}
|
|
1320
|
+
return {
|
|
1321
|
+
href: NEETO_AUTH_BILLING_INFO_URL
|
|
1322
|
+
};
|
|
1323
|
+
};
|
|
1324
|
+
var subscriptionPlanLink = _objectSpread$2({
|
|
1325
|
+
label: /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1326
|
+
children: [globalProps.appName, " ", /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1327
|
+
className: classnames("inline-flex items-center gap-1 rounded-full px-2.5 py-1 text-[10px] leading-tight font-semibold", {
|
|
1328
|
+
"bg-[#FFE44A] text-black": normalizedPlan === "pro",
|
|
1329
|
+
"bg-primary text-primary-foreground": isFreePlan
|
|
1330
|
+
}),
|
|
1331
|
+
children: normalizedPlan === "pro" ? neetoCist.humanize((_globalProps$user3 = globalProps.user) === null || _globalProps$user3 === void 0 ? void 0 : _globalProps$user3.subscriptionPlan) : /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1332
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Crown, {
|
|
1333
|
+
size: 12
|
|
1334
|
+
}), t("neetoMolecules.sidebar.upgradePlan")]
|
|
1335
|
+
})
|
|
1336
|
+
})]
|
|
1337
|
+
}),
|
|
1338
|
+
"data-testid": "subscription-plan"
|
|
1339
|
+
}, getSubscriptionPlanAction());
|
|
1340
|
+
return /*#__PURE__*/jsxRuntime.jsxs("div", {
|
|
1341
|
+
className: "p-1.5",
|
|
1342
|
+
children: [!isConsumer && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1343
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1344
|
+
links: defaultLinks
|
|
1345
|
+
}), neetoCist.isNotEmpty(topLinks) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1346
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1347
|
+
className: "my-2"
|
|
1348
|
+
}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1349
|
+
links: topLinks
|
|
1350
|
+
})]
|
|
1351
|
+
}), neetoCist.isPresent(customContent) && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1352
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1353
|
+
className: "my-2"
|
|
1354
|
+
}), /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1355
|
+
className: "px-3 py-1",
|
|
1356
|
+
children: customContent
|
|
1357
|
+
})]
|
|
1358
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1359
|
+
className: "my-2"
|
|
1360
|
+
}), ((_globalProps$user4 = globalProps.user) === null || _globalProps$user4 === void 0 ? void 0 : _globalProps$user4.isOwner) && /*#__PURE__*/jsxRuntime.jsx(WorkspaceMenu, {}), isOrganizationSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsx(OrganizationSwitcher, {}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1361
|
+
className: "my-2"
|
|
1362
|
+
}), neetoCist.isPresent((_globalProps$user5 = globalProps.user) === null || _globalProps$user5 === void 0 ? void 0 : _globalProps$user5.subscriptionPlan) && /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1363
|
+
links: [subscriptionPlanLink]
|
|
1364
|
+
}), showProductSwitcher && /*#__PURE__*/jsxRuntime.jsx(ProductSwitcher, {
|
|
1365
|
+
toggleModal: toggleModal
|
|
1366
|
+
}), /*#__PURE__*/jsxRuntime.jsx(HelpMenu, {}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1367
|
+
className: "my-2"
|
|
1368
|
+
})]
|
|
1369
|
+
}), isAuthenticated && !isConsumer && /*#__PURE__*/jsxRuntime.jsx(ProfileExpandMenu, {
|
|
1370
|
+
profileInfo: profileInfo
|
|
1371
|
+
}), /*#__PURE__*/jsxRuntime.jsx(LinkSection, {
|
|
1372
|
+
links: bottomLinks
|
|
1373
|
+
}), isThemeSwitcherEnabled && /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1374
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.Separator, {
|
|
1375
|
+
className: "my-2"
|
|
1376
|
+
}), /*#__PURE__*/jsxRuntime.jsx(ThemeSwitcher, {})]
|
|
1377
|
+
})]
|
|
1378
|
+
});
|
|
1379
|
+
};
|
|
1380
|
+
|
|
1381
|
+
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; }
|
|
1382
|
+
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; }
|
|
1383
|
+
var getInitials = function getInitials(name) {
|
|
1384
|
+
return (name || "").split(" ").filter(Boolean).map(function (n) {
|
|
1385
|
+
return n[0];
|
|
1386
|
+
}).join("").toUpperCase().slice(0, 2);
|
|
1387
|
+
};
|
|
1388
|
+
var ProfileButton = function ProfileButton(_ref) {
|
|
1389
|
+
var profileInfoOverrides = _ref.profileInfoOverrides,
|
|
1390
|
+
showProductSwitcher = _ref.showProductSwitcher,
|
|
1391
|
+
bottomLinks = _ref.bottomLinks,
|
|
1392
|
+
topLinks = _ref.topLinks,
|
|
1393
|
+
customContent = _ref.customContent,
|
|
1394
|
+
isThemeSwitcherEnabled = _ref.isThemeSwitcherEnabled,
|
|
1395
|
+
isOrganizationSwitcherEnabled = _ref.isOrganizationSwitcherEnabled,
|
|
1396
|
+
profilePopoverProps = _ref.profilePopoverProps,
|
|
1397
|
+
isConsumer = _ref.isConsumer,
|
|
1398
|
+
enableSubscriptionUpgradeRequest = _ref.enableSubscriptionUpgradeRequest;
|
|
1399
|
+
var _useState = React.useState(false),
|
|
1400
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
1401
|
+
isModalOpen = _useState2[0],
|
|
1402
|
+
setIsModalOpen = _useState2[1];
|
|
1403
|
+
var _useState3 = React.useState(false),
|
|
1404
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
1405
|
+
isUpgradeModalOpen = _useState4[0],
|
|
1406
|
+
setIsUpgradeModalOpen = _useState4[1];
|
|
1407
|
+
var _useState5 = React.useState(false),
|
|
1408
|
+
_useState6 = _slicedToArray(_useState5, 2),
|
|
1409
|
+
isPopoverOpen = _useState6[0],
|
|
1410
|
+
setIsPopoverOpen = _useState6[1];
|
|
1411
|
+
var _useState7 = React.useState(null),
|
|
1412
|
+
_useState8 = _slicedToArray(_useState7, 2),
|
|
1413
|
+
changesCount = _useState8[0],
|
|
1414
|
+
setChangesCount = _useState8[1];
|
|
1415
|
+
var timeoutRef = React.useRef(null);
|
|
1416
|
+
var _KeyboardShortcuts$us = KeyboardShortcuts.usePaneState(),
|
|
1417
|
+
_KeyboardShortcuts$us2 = _slicedToArray(_KeyboardShortcuts$us, 2),
|
|
1418
|
+
setIsOpen = _KeyboardShortcuts$us2[1];
|
|
1419
|
+
useHotkeys(["ctrl+u", "command+u"], function () {
|
|
1420
|
+
return setIsModalOpen(ramda.not);
|
|
1421
|
+
}, {
|
|
1422
|
+
mode: "global"
|
|
1423
|
+
});
|
|
1424
|
+
var profileInfo = getProfileInfo(profileInfoOverrides, isConsumer);
|
|
1425
|
+
React.useEffect(function () {
|
|
1426
|
+
var Nv = {
|
|
1427
|
+
onReceiveData: function onReceiveData(data) {
|
|
1428
|
+
if (!data.unreadCount) return;
|
|
1429
|
+
setChangesCount(data.unreadCount);
|
|
1430
|
+
},
|
|
1431
|
+
onShow: function onShow() {
|
|
1432
|
+
setChangesCount(null);
|
|
1433
|
+
}
|
|
1434
|
+
};
|
|
1435
|
+
window.Nv = window.Nv ? Object.assign(window.Nv, Nv) : Nv;
|
|
1436
|
+
}, []);
|
|
1437
|
+
React.useEffect(function () {
|
|
1438
|
+
return function () {
|
|
1439
|
+
return clearTimeout(timeoutRef.current);
|
|
1440
|
+
};
|
|
1441
|
+
}, []);
|
|
1442
|
+
var handleMouseEnter = React.useCallback(function () {
|
|
1443
|
+
clearTimeout(timeoutRef.current);
|
|
1444
|
+
setIsPopoverOpen(true);
|
|
1445
|
+
}, []);
|
|
1446
|
+
var handleMouseLeave = React.useCallback(function () {
|
|
1447
|
+
timeoutRef.current = setTimeout(function () {
|
|
1448
|
+
return setIsPopoverOpen(false);
|
|
1449
|
+
}, 150);
|
|
1450
|
+
}, []);
|
|
1451
|
+
var newBottomLinks = [].concat(_toConsumableArray(getDefaultBottomLinks(profileInfo.isAuthenticated, isConsumer)), _toConsumableArray(bottomLinks));
|
|
1452
|
+
var defaultLinks = Object.keys(DEFAULT_MENU_LINK_PROPS).map(function (key) {
|
|
1453
|
+
return _objectSpread$1(_objectSpread$1(_objectSpread$1({}, DEFAULT_MENU_LINK_PROPS[key]), key === "keyboardShortcutProps" && {
|
|
1454
|
+
onClick: function onClick() {
|
|
1455
|
+
return setIsOpen(function (prev) {
|
|
1456
|
+
return !prev;
|
|
1457
|
+
});
|
|
1458
|
+
}
|
|
1459
|
+
}), key === "engageProps" && changesCount && {
|
|
1460
|
+
changesCount: changesCount
|
|
1461
|
+
});
|
|
1462
|
+
}).filter(function (_ref2) {
|
|
1463
|
+
var hide = _ref2.hide;
|
|
1464
|
+
return !hide;
|
|
1465
|
+
});
|
|
1466
|
+
return /*#__PURE__*/jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
1467
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(Profile.Pane, {
|
|
1468
|
+
popoverProps: profilePopoverProps
|
|
1469
|
+
}), isPopoverOpen && /*#__PURE__*/jsxRuntime.jsx("div", {
|
|
1470
|
+
className: "pointer-events-none fixed inset-0 z-[99998] bg-black/[0.27]"
|
|
1471
|
+
}), /*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Popover, {
|
|
1472
|
+
open: isPopoverOpen,
|
|
1473
|
+
onOpenChange: setIsPopoverOpen,
|
|
1474
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverAnchor, {
|
|
1475
|
+
asChild: true,
|
|
1476
|
+
children: /*#__PURE__*/jsxRuntime.jsxs("button", {
|
|
1477
|
+
className: "bg-primary flex flex-col items-center justify-center gap-1.5 rounded-e-2xl p-1",
|
|
1478
|
+
type: "button",
|
|
1479
|
+
onMouseEnter: handleMouseEnter,
|
|
1480
|
+
onMouseLeave: handleMouseLeave,
|
|
1481
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(neetoAtoms.Avatar, {
|
|
1482
|
+
className: "size-[1.625rem] shrink-0 rounded-full border-2 border-white",
|
|
1483
|
+
"data-testid": "profile-avatar",
|
|
1484
|
+
children: [/*#__PURE__*/jsxRuntime.jsx(neetoAtoms.AvatarImage, {
|
|
1485
|
+
alt: profileInfo.name,
|
|
1486
|
+
src: profileInfo.imageUrl
|
|
1487
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.AvatarFallback, {
|
|
1488
|
+
className: "text-[10px]",
|
|
1489
|
+
children: getInitials(profileInfo.name)
|
|
1490
|
+
})]
|
|
1491
|
+
}), /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1492
|
+
className: "flex size-[1.625rem] items-center justify-center rounded-full bg-white",
|
|
1493
|
+
children: /*#__PURE__*/jsxRuntime.jsx(CircleQuestionMark, {
|
|
1494
|
+
size: 20
|
|
1495
|
+
})
|
|
1496
|
+
})]
|
|
1497
|
+
})
|
|
1498
|
+
}), /*#__PURE__*/jsxRuntime.jsx(neetoAtoms.PopoverContent, {
|
|
1499
|
+
align: "end",
|
|
1500
|
+
className: "z-[99999] max-h-[var(--radix-popover-content-available-height)] w-64 overflow-y-auto rounded-xl p-0",
|
|
1501
|
+
collisionPadding: 16,
|
|
1502
|
+
side: "right",
|
|
1503
|
+
sideOffset: 8,
|
|
1504
|
+
onMouseEnter: handleMouseEnter,
|
|
1505
|
+
onMouseLeave: handleMouseLeave,
|
|
1506
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ProfileMenu, {
|
|
1507
|
+
customContent: customContent,
|
|
1508
|
+
defaultLinks: defaultLinks,
|
|
1509
|
+
enableSubscriptionUpgradeRequest: enableSubscriptionUpgradeRequest,
|
|
1510
|
+
isConsumer: isConsumer,
|
|
1511
|
+
isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
|
|
1512
|
+
isThemeSwitcherEnabled: isThemeSwitcherEnabled,
|
|
1513
|
+
profileInfo: profileInfo,
|
|
1514
|
+
showProductSwitcher: showProductSwitcher,
|
|
1515
|
+
topLinks: topLinks,
|
|
1516
|
+
bottomLinks: newBottomLinks,
|
|
1517
|
+
openUpgradeModal: function openUpgradeModal() {
|
|
1518
|
+
return setIsUpgradeModalOpen(true);
|
|
1519
|
+
},
|
|
1520
|
+
toggleModal: setIsModalOpen
|
|
1521
|
+
})
|
|
1522
|
+
})]
|
|
1523
|
+
}), neetoCist.isPresent(changesCount) && /*#__PURE__*/jsxRuntime.jsx("span", {
|
|
1524
|
+
className: "bg-accent-foreground 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] text-white select-none",
|
|
1525
|
+
"data-testid": "help-icon-changes-count",
|
|
1526
|
+
children: changesCount
|
|
1527
|
+
}), /*#__PURE__*/jsxRuntime.jsx(Modal, {
|
|
1528
|
+
isOpen: isModalOpen,
|
|
1529
|
+
onClose: function onClose() {
|
|
1530
|
+
return setIsModalOpen(false);
|
|
1531
|
+
}
|
|
1532
|
+
}), enableSubscriptionUpgradeRequest && /*#__PURE__*/jsxRuntime.jsx(SubscriptionUpgradeRequestModal, {
|
|
1533
|
+
isOpen: isUpgradeModalOpen,
|
|
1534
|
+
onClose: function onClose() {
|
|
1535
|
+
return setIsUpgradeModalOpen(false);
|
|
1536
|
+
}
|
|
1537
|
+
})]
|
|
1538
|
+
});
|
|
1539
|
+
};
|
|
1540
|
+
|
|
1541
|
+
var _excluded = ["profileInfoOverrides", "topLinks", "bottomLinks", "showProductSwitcher", "isThemeSwitcherEnabled", "isOrganizationSwitcherEnabled", "customContent", "profilePopoverProps", "isConsumer", "enableSubscriptionUpgradeRequest"];
|
|
1542
|
+
function ownKeys(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; }
|
|
1543
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
1544
|
+
var FloatingActionMenu = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
1545
|
+
var _globalProps$user;
|
|
1546
|
+
var _ref$profileInfoOverr = _ref.profileInfoOverrides,
|
|
1547
|
+
profileInfoOverrides = _ref$profileInfoOverr === void 0 ? {} : _ref$profileInfoOverr,
|
|
1548
|
+
_ref$topLinks = _ref.topLinks,
|
|
1549
|
+
topLinks = _ref$topLinks === void 0 ? [] : _ref$topLinks,
|
|
1550
|
+
_ref$bottomLinks = _ref.bottomLinks,
|
|
1551
|
+
bottomLinks = _ref$bottomLinks === void 0 ? [] : _ref$bottomLinks,
|
|
1552
|
+
_ref$showProductSwitc = _ref.showProductSwitcher,
|
|
1553
|
+
showProductSwitcher = _ref$showProductSwitc === void 0 ? true : _ref$showProductSwitc,
|
|
1554
|
+
_ref$isThemeSwitcherE = _ref.isThemeSwitcherEnabled,
|
|
1555
|
+
isThemeSwitcherEnabled = _ref$isThemeSwitcherE === void 0 ? false : _ref$isThemeSwitcherE,
|
|
1556
|
+
_ref$isOrganizationSw = _ref.isOrganizationSwitcherEnabled,
|
|
1557
|
+
isOrganizationSwitcherEnabled = _ref$isOrganizationSw === void 0 ? false : _ref$isOrganizationSw,
|
|
1558
|
+
customContent = _ref.customContent,
|
|
1559
|
+
_ref$profilePopoverPr = _ref.profilePopoverProps,
|
|
1560
|
+
profilePopoverProps = _ref$profilePopoverPr === void 0 ? {} : _ref$profilePopoverPr,
|
|
1561
|
+
_ref$isConsumer = _ref.isConsumer,
|
|
1562
|
+
isConsumer = _ref$isConsumer === void 0 ? false : _ref$isConsumer,
|
|
1563
|
+
_ref$enableSubscripti = _ref.enableSubscriptionUpgradeRequest,
|
|
1564
|
+
enableSubscriptionUpgradeRequest = _ref$enableSubscripti === void 0 ? true : _ref$enableSubscripti,
|
|
1565
|
+
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
1566
|
+
React.useEffect(function () {
|
|
1567
|
+
isThemeSwitcherEnabled && setAppTheme();
|
|
1568
|
+
}, [isThemeSwitcherEnabled]);
|
|
1569
|
+
var isBigBinaryEmail = initializers.globalProps === null || initializers.globalProps === void 0 || (_globalProps$user = initializers.globalProps.user) === null || _globalProps$user === void 0 || (_globalProps$user = _globalProps$user.email) === null || _globalProps$user === void 0 ? void 0 : _globalProps$user.endsWith("@bigbinary.com");
|
|
1570
|
+
return /*#__PURE__*/jsxRuntime.jsx("div", _objectSpread(_objectSpread({
|
|
1571
|
+
ref: ref,
|
|
1572
|
+
className: "fixed start-0 bottom-4 z-[99999] rounded-e-[1.0625rem] border border-s-0 border-white bg-white",
|
|
1573
|
+
"data-testid": "floating-action-menu-container"
|
|
1574
|
+
}, otherProps), {}, {
|
|
1575
|
+
children: /*#__PURE__*/jsxRuntime.jsx(ProfileButton, _defineProperty({
|
|
1576
|
+
bottomLinks: bottomLinks,
|
|
1577
|
+
customContent: customContent,
|
|
1578
|
+
enableSubscriptionUpgradeRequest: enableSubscriptionUpgradeRequest,
|
|
1579
|
+
isConsumer: isConsumer,
|
|
1580
|
+
isOrganizationSwitcherEnabled: isOrganizationSwitcherEnabled,
|
|
1581
|
+
isThemeSwitcherEnabled: isThemeSwitcherEnabled,
|
|
1582
|
+
profileInfoOverrides: profileInfoOverrides,
|
|
1583
|
+
profilePopoverProps: profilePopoverProps,
|
|
1584
|
+
showProductSwitcher: showProductSwitcher,
|
|
1585
|
+
topLinks: topLinks
|
|
1586
|
+
}, "isOrganizationSwitcherEnabled", isBigBinaryEmail || isOrganizationSwitcherEnabled))
|
|
1587
|
+
}));
|
|
1588
|
+
});
|
|
1589
|
+
FloatingActionMenu.displayName = "FloatingActionMenu";
|
|
1590
|
+
|
|
1591
|
+
module.exports = FloatingActionMenu;
|
|
1592
|
+
//# sourceMappingURL=FloatingActionMenu.js.map
|