@bigbinary/neeto-team-members-frontend 5.0.32 → 5.0.34
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/app/javascript/src/translations/ar.json +2 -1
- package/app/javascript/src/translations/bg.json +2 -1
- package/app/javascript/src/translations/ca.json +2 -1
- package/app/javascript/src/translations/cs.json +2 -1
- package/app/javascript/src/translations/da.json +2 -1
- package/app/javascript/src/translations/de.json +2 -1
- package/app/javascript/src/translations/en.json +1 -0
- package/app/javascript/src/translations/es-MX.json +2 -1
- package/app/javascript/src/translations/es.json +2 -1
- package/app/javascript/src/translations/et.json +2 -1
- package/app/javascript/src/translations/fi.json +2 -1
- package/app/javascript/src/translations/fil.json +2 -1
- package/app/javascript/src/translations/fr.json +2 -1
- package/app/javascript/src/translations/he.json +2 -1
- package/app/javascript/src/translations/hi.json +2 -1
- package/app/javascript/src/translations/hr.json +2 -1
- package/app/javascript/src/translations/hu.json +2 -1
- package/app/javascript/src/translations/id.json +2 -1
- package/app/javascript/src/translations/it.json +2 -1
- package/app/javascript/src/translations/ja.json +2 -1
- package/app/javascript/src/translations/ko.json +2 -1
- package/app/javascript/src/translations/nl.json +2 -1
- package/app/javascript/src/translations/pl.json +2 -1
- package/app/javascript/src/translations/pt-BR.json +2 -1
- package/app/javascript/src/translations/pt.json +2 -1
- package/app/javascript/src/translations/ro.json +2 -1
- package/app/javascript/src/translations/ru.json +2 -1
- package/app/javascript/src/translations/sk.json +2 -1
- package/app/javascript/src/translations/sl.json +2 -1
- package/app/javascript/src/translations/sv.json +2 -1
- package/app/javascript/src/translations/th.json +2 -1
- package/app/javascript/src/translations/tr.json +2 -1
- package/app/javascript/src/translations/uk.json +2 -1
- package/app/javascript/src/translations/vi.json +2 -1
- package/app/javascript/src/translations/zh-CN.json +2 -1
- package/app/javascript/src/translations/zh-TW.json +2 -1
- package/dist/.ready +1 -1
- package/dist/{Permissions-3L2jJkiY.js → Permissions-Ds61VDtG.js} +4 -4
- package/dist/Permissions-Ds61VDtG.js.map +1 -0
- package/dist/{Permissions-CpmpfRk1.js → Permissions-rFYQmsMn.js} +4 -4
- package/dist/Permissions-rFYQmsMn.js.map +1 -0
- package/dist/{RolesRadioGroup-fBmS68cW.js → RolesRadioGroup-bXyHmk_Q.js} +35 -38
- package/dist/RolesRadioGroup-bXyHmk_Q.js.map +1 -0
- package/dist/{RolesRadioGroup-tSNC-Wtu.js → RolesRadioGroup-n1NclSyf.js} +35 -38
- package/dist/RolesRadioGroup-n1NclSyf.js.map +1 -0
- package/dist/cjs/v2/Groups.js +1 -1
- package/dist/cjs/v2/Groups.js.map +1 -1
- package/dist/cjs/v2/ManageMember.js +5 -3
- package/dist/cjs/v2/ManageMember.js.map +1 -1
- package/dist/cjs/v2/MembersDropdown.js +1 -1
- package/dist/cjs/v2/MembersInvite.js +1 -1
- package/dist/cjs/v2/MembersInvite.js.map +1 -1
- package/dist/cjs/v2/Permissions.js +1 -1
- package/dist/cjs/v2/Profile.js +189 -202
- package/dist/cjs/v2/Profile.js.map +1 -1
- package/dist/cjs/v2/Roles.js +2 -2
- package/dist/cjs/v2/RolesRadioGroup.js +1 -1
- package/dist/cjs/v2/TeamMembers.js +5 -3
- package/dist/cjs/v2/TeamMembers.js.map +1 -1
- package/dist/cjs/v2/TeamsAndMembersDropdown.js +12 -18
- package/dist/cjs/v2/TeamsAndMembersDropdown.js.map +1 -1
- package/dist/cjs/v2/TeamsDropdown.js +1 -1
- package/dist/{index-SkKQWXyo.js → index-B2PgGcMs.js} +183 -104
- package/dist/index-B2PgGcMs.js.map +1 -0
- package/dist/{index-DCtowiCJ.js → index-BBIYGX2C.js} +183 -104
- package/dist/index-BBIYGX2C.js.map +1 -0
- package/dist/{index-DqqXniGT.js → index-BaW7CGuF.js} +3 -3
- package/dist/index-BaW7CGuF.js.map +1 -0
- package/dist/{index-DeYRFiJy.js → index-C8Aaixo-.js} +3 -3
- package/dist/index-C8Aaixo-.js.map +1 -0
- package/dist/timezone-selector-BGpvIcKU.js +175 -0
- package/dist/timezone-selector-BGpvIcKU.js.map +1 -0
- package/dist/timezone-selector-ojZT6BkF.js +165 -0
- package/dist/timezone-selector-ojZT6BkF.js.map +1 -0
- package/dist/v2/Groups.js +1 -1
- package/dist/v2/Groups.js.map +1 -1
- package/dist/v2/ManageMember.js +5 -3
- package/dist/v2/ManageMember.js.map +1 -1
- package/dist/v2/MembersDropdown.js +1 -1
- package/dist/v2/MembersInvite.js +1 -1
- package/dist/v2/MembersInvite.js.map +1 -1
- package/dist/v2/Permissions.js +1 -1
- package/dist/v2/Profile.js +184 -199
- package/dist/v2/Profile.js.map +1 -1
- package/dist/v2/Roles.js +2 -2
- package/dist/v2/RolesRadioGroup.js +1 -1
- package/dist/v2/TeamMembers.js +5 -3
- package/dist/v2/TeamMembers.js.map +1 -1
- package/dist/v2/TeamsAndMembersDropdown.js +12 -18
- package/dist/v2/TeamsAndMembersDropdown.js.map +1 -1
- package/dist/v2/TeamsDropdown.js +1 -1
- package/package.json +1 -1
- package/dist/Permissions-3L2jJkiY.js.map +0 -1
- package/dist/Permissions-CpmpfRk1.js.map +0 -1
- package/dist/RolesRadioGroup-fBmS68cW.js.map +0 -1
- package/dist/RolesRadioGroup-tSNC-Wtu.js.map +0 -1
- package/dist/index-DCtowiCJ.js.map +0 -1
- package/dist/index-DeYRFiJy.js.map +0 -1
- package/dist/index-DqqXniGT.js.map +0 -1
- package/dist/index-SkKQWXyo.js.map +0 -1
- package/dist/useCountries-CQdvJz0R.js +0 -249
- package/dist/useCountries-CQdvJz0R.js.map +0 -1
- package/dist/useCountries-DePOPtue.js +0 -235
- package/dist/useCountries-DePOPtue.js.map +0 -1
package/dist/v2/Profile.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
2
2
|
import { useRef, useCallback, useEffect, memo, useState } from 'react';
|
|
3
|
-
import { Spinner, Label, cn, Typography, Avatar, Button
|
|
4
|
-
import
|
|
3
|
+
import { Spinner, Sheet, Label, cn, Typography, Avatar, Button } from '@bigbinary/neeto-atoms';
|
|
4
|
+
import MoreDropdown from '@bigbinary/neeto-molecules/v2/MoreDropdown';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
7
7
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
8
8
|
import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
|
|
9
9
|
import _regeneratorRuntime from '@babel/runtime/regenerator';
|
|
10
10
|
import { Input } from '@bigbinary/neeto-atoms/formik';
|
|
11
|
+
import { Card, CardContent, CardAction } from '@bigbinary/neeto-atoms/primitives/Card';
|
|
11
12
|
import { NeetoTimezoneSelector, ianaTimezoneToHumanReadable } from '@bigbinary/neeto-time-zones';
|
|
12
13
|
import { findBy, noop, _findBy } from '@bigbinary/neeto-cist';
|
|
13
14
|
import { DEFAULT_STALE_TIME, LANGUAGE_OPTIONS } from '@bigbinary/neeto-commons-frontend/constants';
|
|
@@ -21,14 +22,17 @@ import 'formik';
|
|
|
21
22
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
22
23
|
import { useQuery } from '@tanstack/react-query';
|
|
23
24
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
24
|
-
import { p as profileApi, u as useCountries, P as ProfileImage
|
|
25
|
+
import { p as profileApi, u as useCountries, P as ProfileImage } from '../timezone-selector-ojZT6BkF.js';
|
|
25
26
|
import { t } from 'i18next';
|
|
26
27
|
import { globalProps } from '@bigbinary/neeto-commons-frontend/initializers';
|
|
27
28
|
import * as yup from 'yup';
|
|
28
29
|
import withImmutableActions from '@bigbinary/neeto-commons-frontend/react-utils/withImmutableActions';
|
|
29
30
|
import { create } from 'zustand';
|
|
30
31
|
import { shallow } from 'zustand/shallow';
|
|
32
|
+
import { Crown } from 'lucide-react';
|
|
33
|
+
import CopyToClipboardButton from '@bigbinary/neeto-molecules/v2/CopyToClipboardButton';
|
|
31
34
|
import 'axios';
|
|
35
|
+
import '../inject-css-C2dztUxs.js';
|
|
32
36
|
|
|
33
37
|
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; }
|
|
34
38
|
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; }
|
|
@@ -229,6 +233,7 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
229
233
|
});
|
|
230
234
|
}
|
|
231
235
|
return /*#__PURE__*/jsx(FormikForm, {
|
|
236
|
+
className: "flex flex-col h-full flex-1 overflow-y-auto",
|
|
232
237
|
formProps: {
|
|
233
238
|
"data-testid": "ntm-profile-form"
|
|
234
239
|
},
|
|
@@ -243,12 +248,19 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
243
248
|
touched = _ref4.touched;
|
|
244
249
|
setFieldValueRef.current = setFieldValue;
|
|
245
250
|
return /*#__PURE__*/jsxs(Fragment, {
|
|
246
|
-
children: [/*#__PURE__*/
|
|
247
|
-
className: "w-full flex-1 overflow-y-auto p-4",
|
|
248
|
-
children: /*#__PURE__*/
|
|
249
|
-
className: "w-full
|
|
250
|
-
|
|
251
|
-
|
|
251
|
+
children: [/*#__PURE__*/jsxs(Sheet.Body, {
|
|
252
|
+
className: "flex min-h-0 w-full flex-1 flex-col gap-2 overflow-y-auto p-4",
|
|
253
|
+
children: [/*#__PURE__*/jsx(Card, {
|
|
254
|
+
className: "w-full shrink-0 ring-0",
|
|
255
|
+
size: "sm",
|
|
256
|
+
children: /*#__PURE__*/jsx(CardContent, {
|
|
257
|
+
children: /*#__PURE__*/jsx(ProfileImage, {})
|
|
258
|
+
})
|
|
259
|
+
}), /*#__PURE__*/jsx(Card, {
|
|
260
|
+
className: "w-full shrink-0 ring-0",
|
|
261
|
+
size: "sm",
|
|
262
|
+
children: /*#__PURE__*/jsxs(CardContent, {
|
|
263
|
+
className: "space-y-6",
|
|
252
264
|
children: [/*#__PURE__*/jsx(Input, {
|
|
253
265
|
autoFocus: true,
|
|
254
266
|
required: true,
|
|
@@ -264,51 +276,42 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
264
276
|
name: "lastName",
|
|
265
277
|
type: "text",
|
|
266
278
|
placeholder: t("neetoTeamMembers.profile.inputs.placeholder.lastName")
|
|
267
|
-
})
|
|
268
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
269
|
-
className: "mt-4 w-full space-y-4 border-t border-border pt-4",
|
|
270
|
-
children: [/*#__PURE__*/jsx(FormikSelect, {
|
|
279
|
+
}), /*#__PURE__*/jsx(FormikSelect, {
|
|
271
280
|
required: true,
|
|
272
281
|
"data-testid": "ntm-profile-country-select",
|
|
273
282
|
label: t("neetoTeamMembers.profile.inputs.label.country"),
|
|
274
283
|
name: "countryId",
|
|
275
284
|
options: countryDropdownOptions,
|
|
276
285
|
value: selectedCountryOption,
|
|
277
|
-
onChange: function onChange(
|
|
286
|
+
onChange: function onChange(value) {
|
|
287
|
+
var option = findBy({
|
|
288
|
+
value: value
|
|
289
|
+
}, countryDropdownOptions);
|
|
278
290
|
var dependentFields = handleCountryChange(option);
|
|
279
291
|
setFieldValue("dateFormat", dependentFields === null || dependentFields === void 0 ? void 0 : dependentFields.dateFormat);
|
|
280
|
-
setFieldValue("countryId", option === null || option === void 0 ? void 0 : option.value);
|
|
281
292
|
}
|
|
282
|
-
}), /*#__PURE__*/jsx(
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
options: LANGUAGE_OPTIONS,
|
|
289
|
-
label: t("neetoTeamMembers.profile.inputs.label.language"),
|
|
290
|
-
onChange: function onChange(option) {
|
|
291
|
-
setFieldValue("language", option.value);
|
|
292
|
-
}
|
|
293
|
-
})
|
|
293
|
+
}), /*#__PURE__*/jsx(FormikSelect, {
|
|
294
|
+
required: true,
|
|
295
|
+
"data-testid": "ntm-language-select",
|
|
296
|
+
label: t("neetoTeamMembers.profile.inputs.label.language"),
|
|
297
|
+
name: "language",
|
|
298
|
+
options: LANGUAGE_OPTIONS
|
|
294
299
|
}), /*#__PURE__*/jsxs("div", {
|
|
295
300
|
className: "space-y-2",
|
|
296
|
-
children: [/*#__PURE__*/jsxs(
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
children:
|
|
300
|
-
className: "text-destructive",
|
|
301
|
-
children: " *"
|
|
302
|
-
})]
|
|
303
|
-
}), /*#__PURE__*/jsx("div", {
|
|
304
|
-
"data-testid": "ntm-profile-time-zone-select",
|
|
305
|
-
ref: timezoneRef,
|
|
306
|
-
className: cn("w-full grow", {
|
|
307
|
-
"pointer-events-none bg-muted": isTimezoneFieldDisabled
|
|
308
|
-
})
|
|
301
|
+
children: [/*#__PURE__*/jsxs(Label, {
|
|
302
|
+
children: [t("neetoTeamMembers.profile.inputs.label.timeZone"), /*#__PURE__*/jsx("span", {
|
|
303
|
+
className: "text-destructive",
|
|
304
|
+
children: " *"
|
|
309
305
|
})]
|
|
306
|
+
}), /*#__PURE__*/jsx("div", {
|
|
307
|
+
"data-testid": "ntm-profile-time-zone-select",
|
|
308
|
+
ref: timezoneRef,
|
|
309
|
+
className: cn("w-full grow", {
|
|
310
|
+
"pointer-events-none bg-muted": isTimezoneFieldDisabled
|
|
311
|
+
})
|
|
310
312
|
}), touched.timeZone && errors.timeZone && /*#__PURE__*/jsx(Typography, {
|
|
311
|
-
className: "text-
|
|
313
|
+
className: "text-destructive",
|
|
314
|
+
variant: "caption",
|
|
312
315
|
children: errors.timeZone
|
|
313
316
|
})]
|
|
314
317
|
}), /*#__PURE__*/jsx(FormikSelect, {
|
|
@@ -316,27 +319,18 @@ var ChangeProfile = function ChangeProfile(_ref) {
|
|
|
316
319
|
"data-testid": "ntm-time-format-select",
|
|
317
320
|
name: "timeFormat",
|
|
318
321
|
options: TIME_FORMAT_OPTIONS,
|
|
319
|
-
label: t("neetoTeamMembers.profile.inputs.label.preferredTimeFormat")
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
required: true,
|
|
327
|
-
"data-testid": "ntm-date-format-select",
|
|
328
|
-
name: "dateFormat",
|
|
329
|
-
options: DATE_FORMAT_OPTIONS,
|
|
330
|
-
label: t("neetoTeamMembers.profile.inputs.label.preferredDateFormat"),
|
|
331
|
-
onChange: function onChange(option) {
|
|
332
|
-
setFieldValue("dateFormat", option.value);
|
|
333
|
-
}
|
|
334
|
-
})
|
|
322
|
+
label: t("neetoTeamMembers.profile.inputs.label.preferredTimeFormat")
|
|
323
|
+
}), /*#__PURE__*/jsx(FormikSelect, {
|
|
324
|
+
required: true,
|
|
325
|
+
"data-testid": "ntm-date-format-select",
|
|
326
|
+
name: "dateFormat",
|
|
327
|
+
options: DATE_FORMAT_OPTIONS,
|
|
328
|
+
label: t("neetoTeamMembers.profile.inputs.label.preferredDateFormat")
|
|
335
329
|
})]
|
|
336
|
-
})
|
|
337
|
-
})
|
|
338
|
-
}), /*#__PURE__*/jsx(
|
|
339
|
-
className: "border-t border-border
|
|
330
|
+
})
|
|
331
|
+
})]
|
|
332
|
+
}), /*#__PURE__*/jsx(Sheet.Footer, {
|
|
333
|
+
className: "border-t border-border",
|
|
340
334
|
children: /*#__PURE__*/jsx(FormikActionBlock, {
|
|
341
335
|
isSubmitting: isUpdatingProfile || isUploading,
|
|
342
336
|
cancelButtonProps: {
|
|
@@ -384,6 +378,24 @@ var sanitizeValue = function sanitizeValue(value, defaultValue) {
|
|
|
384
378
|
return isNil(value) || is(String, value) && trim(value) === "" ? defaultValue : value;
|
|
385
379
|
};
|
|
386
380
|
|
|
381
|
+
var Field = function Field(_ref) {
|
|
382
|
+
var label = _ref.label,
|
|
383
|
+
children = _ref.children,
|
|
384
|
+
testId = _ref.testId;
|
|
385
|
+
return /*#__PURE__*/jsxs("div", {
|
|
386
|
+
className: "flex flex-col gap-1 py-3 first:pt-0 last:pb-0",
|
|
387
|
+
children: [/*#__PURE__*/jsx(Typography, {
|
|
388
|
+
color: "muted",
|
|
389
|
+
variant: "caption",
|
|
390
|
+
weight: "medium",
|
|
391
|
+
children: label
|
|
392
|
+
}), /*#__PURE__*/jsx(Typography, {
|
|
393
|
+
"data-testid": testId,
|
|
394
|
+
variant: "body2",
|
|
395
|
+
children: children
|
|
396
|
+
})]
|
|
397
|
+
});
|
|
398
|
+
};
|
|
387
399
|
var Preview$1 = function Preview() {
|
|
388
400
|
var _globalProps$user, _Intl$DateTimeFormat$, _findBy2, _findBy3, _findBy4;
|
|
389
401
|
var _useTranslation = useTranslation(),
|
|
@@ -435,12 +447,12 @@ var Preview$1 = function Preview() {
|
|
|
435
447
|
children: /*#__PURE__*/jsx(Spinner, {})
|
|
436
448
|
});
|
|
437
449
|
}
|
|
438
|
-
return /*#__PURE__*/
|
|
439
|
-
className: "w-full flex-1 overflow-y-auto
|
|
440
|
-
children: /*#__PURE__*/
|
|
441
|
-
className: "
|
|
442
|
-
|
|
443
|
-
|
|
450
|
+
return /*#__PURE__*/jsxs(Sheet.Body, {
|
|
451
|
+
className: "flex min-h-0 w-full flex-1 flex-col gap-2 overflow-y-auto p-4",
|
|
452
|
+
children: [/*#__PURE__*/jsx(Card, {
|
|
453
|
+
className: "w-full shrink-0 ring-0",
|
|
454
|
+
size: "sm",
|
|
455
|
+
children: /*#__PURE__*/jsx(CardContent, {
|
|
444
456
|
children: /*#__PURE__*/jsxs("div", {
|
|
445
457
|
className: "flex items-center gap-3",
|
|
446
458
|
children: [/*#__PURE__*/jsx(Avatar, {
|
|
@@ -452,14 +464,15 @@ var Preview$1 = function Preview() {
|
|
|
452
464
|
}), /*#__PURE__*/jsxs("div", {
|
|
453
465
|
className: "flex flex-col",
|
|
454
466
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
455
|
-
className: "text-base font-semibold",
|
|
456
467
|
"data-testid": "profile-full-name-field",
|
|
468
|
+
variant: "h4",
|
|
457
469
|
children: name
|
|
458
470
|
}), /*#__PURE__*/jsxs("div", {
|
|
459
471
|
className: "flex items-center gap-1",
|
|
460
472
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
461
|
-
|
|
473
|
+
color: "muted",
|
|
462
474
|
"data-testid": "profile-email-field",
|
|
475
|
+
variant: "body3",
|
|
463
476
|
children: email
|
|
464
477
|
}), /*#__PURE__*/jsx(CopyToClipboardButton, {
|
|
465
478
|
size: "icon-xs",
|
|
@@ -469,102 +482,69 @@ var Preview$1 = function Preview() {
|
|
|
469
482
|
})]
|
|
470
483
|
})]
|
|
471
484
|
})
|
|
472
|
-
})
|
|
473
|
-
|
|
485
|
+
})
|
|
486
|
+
}), /*#__PURE__*/jsx(Card, {
|
|
487
|
+
className: "w-full shrink-0 ring-0",
|
|
488
|
+
size: "sm",
|
|
489
|
+
children: /*#__PURE__*/jsxs(CardContent, {
|
|
490
|
+
className: "divide-y divide-border",
|
|
491
|
+
children: [/*#__PURE__*/jsx(Field, {
|
|
492
|
+
label: t("neetoTeamMembers.labels.firstName"),
|
|
493
|
+
testId: "profile-first-name-field",
|
|
494
|
+
children: firstName
|
|
495
|
+
}), /*#__PURE__*/jsx(Field, {
|
|
496
|
+
label: t("neetoTeamMembers.labels.lastName"),
|
|
497
|
+
testId: "profile-last-name-field",
|
|
498
|
+
children: lastName
|
|
499
|
+
}), /*#__PURE__*/jsx(Field, {
|
|
500
|
+
label: t("neetoTeamMembers.labels.country"),
|
|
501
|
+
testId: "profile-country-field",
|
|
502
|
+
children: countryName
|
|
503
|
+
}), /*#__PURE__*/jsx(Field, {
|
|
504
|
+
label: t("neetoTeamMembers.labels.language"),
|
|
505
|
+
testId: "profile-preferred-language-field",
|
|
506
|
+
children: ((_findBy2 = _findBy({
|
|
507
|
+
value: language
|
|
508
|
+
}, LANGUAGE_OPTIONS)) === null || _findBy2 === void 0 ? void 0 : _findBy2.label) || "-"
|
|
509
|
+
}), /*#__PURE__*/jsxs(Field, {
|
|
510
|
+
label: t("neetoTeamMembers.labels.timeZone"),
|
|
511
|
+
testId: "profile-time-zone-field",
|
|
512
|
+
children: [ianaTimezoneToHumanReadable(timeZone), timeZoneAbbreviation ? " (".concat(timeZoneAbbreviation, ")") : "", " ", time]
|
|
513
|
+
}), /*#__PURE__*/jsx(Field, {
|
|
514
|
+
label: t("neetoTeamMembers.labels.preferredTimeFormat"),
|
|
515
|
+
testId: "profile-preferred-time-format-field",
|
|
516
|
+
children: ((_findBy3 = _findBy({
|
|
517
|
+
value: timeFormat
|
|
518
|
+
}, TIME_FORMAT_OPTIONS)) === null || _findBy3 === void 0 ? void 0 : _findBy3.label) || "-"
|
|
519
|
+
}), /*#__PURE__*/jsx(Field, {
|
|
520
|
+
label: t("neetoTeamMembers.labels.preferredDateFormat"),
|
|
521
|
+
testId: "profile-preferred-date-format-field",
|
|
522
|
+
children: ((_findBy4 = _findBy({
|
|
523
|
+
value: dateFormat
|
|
524
|
+
}, DATE_FORMAT_OPTIONS)) === null || _findBy4 === void 0 ? void 0 : _findBy4.label) || "-"
|
|
525
|
+
})]
|
|
526
|
+
})
|
|
527
|
+
}), /*#__PURE__*/jsx(Card, {
|
|
528
|
+
className: "w-full shrink-0 ring-0",
|
|
529
|
+
size: "sm",
|
|
530
|
+
children: /*#__PURE__*/jsxs(CardContent, {
|
|
531
|
+
className: "grid grid-cols-[1fr_auto] items-center gap-2",
|
|
474
532
|
children: [/*#__PURE__*/jsxs("div", {
|
|
475
|
-
className: "flex flex-col gap-1
|
|
476
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
477
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
478
|
-
children: t("neetoTeamMembers.labels.firstName")
|
|
479
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
480
|
-
className: "text-[15px] text-foreground",
|
|
481
|
-
"data-testid": "profile-first-name-field",
|
|
482
|
-
children: firstName
|
|
483
|
-
})]
|
|
484
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
485
|
-
className: "flex flex-col gap-1 py-3",
|
|
533
|
+
className: "flex flex-col gap-1",
|
|
486
534
|
children: [/*#__PURE__*/jsx(Typography, {
|
|
487
|
-
|
|
488
|
-
|
|
535
|
+
color: "muted",
|
|
536
|
+
variant: "caption",
|
|
537
|
+
weight: "medium",
|
|
538
|
+
children: t("neetoTeamMembers.labels.currentPlan")
|
|
489
539
|
}), /*#__PURE__*/jsx(Typography, {
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
children:
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
className: "flex flex-col gap-1 py-3",
|
|
496
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
497
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
498
|
-
children: t("neetoTeamMembers.labels.country")
|
|
499
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
500
|
-
className: "text-[15px] text-foreground",
|
|
501
|
-
"data-testid": "profile-country-field",
|
|
502
|
-
children: countryName
|
|
503
|
-
})]
|
|
504
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
505
|
-
className: "flex flex-col gap-1 py-3",
|
|
506
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
507
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
508
|
-
children: t("neetoTeamMembers.labels.language")
|
|
509
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
510
|
-
className: "text-[15px] text-foreground",
|
|
511
|
-
"data-testid": "profile-preferred-language-field",
|
|
512
|
-
children: ((_findBy2 = _findBy({
|
|
513
|
-
value: language
|
|
514
|
-
}, LANGUAGE_OPTIONS)) === null || _findBy2 === void 0 ? void 0 : _findBy2.label) || "-"
|
|
515
|
-
})]
|
|
516
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
517
|
-
className: "flex flex-col gap-1 py-3",
|
|
518
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
519
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
520
|
-
children: t("neetoTeamMembers.labels.timeZone")
|
|
521
|
-
}), /*#__PURE__*/jsxs(Typography, {
|
|
522
|
-
className: "text-[15px] text-foreground",
|
|
523
|
-
"data-testid": "profile-time-zone-field",
|
|
524
|
-
children: [ianaTimezoneToHumanReadable(timeZone), timeZoneAbbreviation ? " (".concat(timeZoneAbbreviation, ")") : "", " ", time]
|
|
525
|
-
})]
|
|
526
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
527
|
-
className: "flex flex-col gap-1 py-3",
|
|
528
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
529
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
530
|
-
children: t("neetoTeamMembers.labels.preferredTimeFormat")
|
|
531
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
532
|
-
className: "text-[15px] text-foreground",
|
|
533
|
-
"data-testid": "profile-preferred-time-format-field",
|
|
534
|
-
children: ((_findBy3 = _findBy({
|
|
535
|
-
value: timeFormat
|
|
536
|
-
}, TIME_FORMAT_OPTIONS)) === null || _findBy3 === void 0 ? void 0 : _findBy3.label) || "-"
|
|
537
|
-
})]
|
|
538
|
-
}), /*#__PURE__*/jsxs("div", {
|
|
539
|
-
className: "flex flex-col gap-1 pt-3",
|
|
540
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
541
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
542
|
-
children: t("neetoTeamMembers.labels.preferredDateFormat")
|
|
543
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
544
|
-
className: "text-[15px] text-foreground",
|
|
545
|
-
"data-testid": "profile-preferred-date-format-field",
|
|
546
|
-
children: ((_findBy4 = _findBy({
|
|
547
|
-
value: dateFormat
|
|
548
|
-
}, DATE_FORMAT_OPTIONS)) === null || _findBy4 === void 0 ? void 0 : _findBy4.label) || "-"
|
|
540
|
+
"data-testid": "profile-subscription-type",
|
|
541
|
+
variant: "body2",
|
|
542
|
+
children: t("neetoTeamMembers.common.subscriptionType", {
|
|
543
|
+
subscription: subscription
|
|
544
|
+
})
|
|
549
545
|
})]
|
|
550
|
-
})
|
|
551
|
-
|
|
552
|
-
className: "neeto-ui-rounded-md bg-background p-3",
|
|
553
|
-
children: /*#__PURE__*/jsxs("div", {
|
|
554
|
-
className: "flex items-center justify-between",
|
|
555
|
-
children: [/*#__PURE__*/jsxs("div", {
|
|
556
|
-
className: "flex flex-col gap-1",
|
|
557
|
-
children: [/*#__PURE__*/jsx(Typography, {
|
|
558
|
-
className: "text-xs font-medium text-muted-foreground",
|
|
559
|
-
children: t("neetoTeamMembers.labels.currentPlan")
|
|
560
|
-
}), /*#__PURE__*/jsx(Typography, {
|
|
561
|
-
className: "text-[15px] text-foreground",
|
|
562
|
-
"data-testid": "profile-subscription-type",
|
|
563
|
-
children: t("neetoTeamMembers.common.subscriptionType", {
|
|
564
|
-
subscription: subscription
|
|
565
|
-
})
|
|
566
|
-
})]
|
|
567
|
-
}), /*#__PURE__*/jsx(Button, {
|
|
546
|
+
}), /*#__PURE__*/jsx(CardAction, {
|
|
547
|
+
children: /*#__PURE__*/jsx(Button, {
|
|
568
548
|
asChild: true,
|
|
569
549
|
"data-testid": "profile-upgrade-button",
|
|
570
550
|
size: "sm",
|
|
@@ -574,10 +554,10 @@ var Preview$1 = function Preview() {
|
|
|
574
554
|
className: "size-4"
|
|
575
555
|
}), t("neetoTeamMembers.buttons.upgrade")]
|
|
576
556
|
})
|
|
577
|
-
})
|
|
578
|
-
})
|
|
579
|
-
})
|
|
580
|
-
})
|
|
557
|
+
})
|
|
558
|
+
})]
|
|
559
|
+
})
|
|
560
|
+
})]
|
|
581
561
|
});
|
|
582
562
|
};
|
|
583
563
|
var Preview = /*#__PURE__*/memo(Preview$1);
|
|
@@ -600,47 +580,52 @@ var Profile = function Profile() {
|
|
|
600
580
|
var enableEditMode = function enableEditMode() {
|
|
601
581
|
return setIsEditMode(true);
|
|
602
582
|
};
|
|
583
|
+
var menuItems = [{
|
|
584
|
+
key: "edit-basic-info",
|
|
585
|
+
"data-testid": "edit-basic-info-menu-button",
|
|
586
|
+
label: t("neetoTeamMembers.buttons.editBasicInfo"),
|
|
587
|
+
onClick: enableEditMode
|
|
588
|
+
}, {
|
|
589
|
+
key: "update-email",
|
|
590
|
+
"data-testid": "update-email-menu-button",
|
|
591
|
+
label: t("neetoTeamMembers.buttons.updateEmail"),
|
|
592
|
+
onClick: function onClick() {
|
|
593
|
+
return window.open(MY_PROFILE_PATH, "_self");
|
|
594
|
+
}
|
|
595
|
+
}, {
|
|
596
|
+
key: "manage-billing-subscriptions",
|
|
597
|
+
"data-testid": "manage-billing-subscriptions-menu-button",
|
|
598
|
+
label: t("neetoTeamMembers.buttons.manageBillingAndSubscriptions"),
|
|
599
|
+
onClick: function onClick() {
|
|
600
|
+
return window.open(MY_PROFILE_PATH, "_self");
|
|
601
|
+
}
|
|
602
|
+
}];
|
|
603
603
|
return /*#__PURE__*/jsx("div", {
|
|
604
604
|
className: "w-full",
|
|
605
605
|
children: /*#__PURE__*/jsxs(Sheet, {
|
|
606
606
|
isOpen: isOpen,
|
|
607
607
|
onClose: onClose,
|
|
608
|
-
className: "max-w-96 bg-
|
|
609
|
-
children: [/*#__PURE__*/
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
className: "text-xl font-semibold",
|
|
608
|
+
className: "ntm-timezone-shadcn-overrides max-w-96 gap-0 bg-sidebar",
|
|
609
|
+
children: [/*#__PURE__*/jsxs(Sheet.Header, {
|
|
610
|
+
children: [/*#__PURE__*/jsx(Sheet.Title, {
|
|
611
|
+
asChild: true,
|
|
612
|
+
children: /*#__PURE__*/jsx(Typography, {
|
|
613
|
+
variant: "h3",
|
|
615
614
|
children: t("neetoTeamMembers.profile.common.myProfile")
|
|
616
|
-
})
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
615
|
+
})
|
|
616
|
+
}), !isEditMode && /*#__PURE__*/jsx(MoreDropdown, {
|
|
617
|
+
menuItems: menuItems,
|
|
618
|
+
isVertical: true,
|
|
619
|
+
dropdownProps: {
|
|
620
620
|
position: "bottom-end",
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
children: /*#__PURE__*/jsx(DropdownMenu.MenuItem.Button, {
|
|
630
|
-
"data-testid": "update-email-menu-button",
|
|
631
|
-
href: MY_PROFILE_PATH,
|
|
632
|
-
children: t("neetoTeamMembers.buttons.updateEmail")
|
|
633
|
-
})
|
|
634
|
-
}), /*#__PURE__*/jsx(DropdownMenu.MenuItem, {
|
|
635
|
-
children: /*#__PURE__*/jsx(DropdownMenu.MenuItem.Button, {
|
|
636
|
-
"data-testid": "manage-billing-subscriptions-menu-button",
|
|
637
|
-
href: MY_PROFILE_PATH,
|
|
638
|
-
children: t("neetoTeamMembers.buttons.manageBillingAndSubscriptions")
|
|
639
|
-
})
|
|
640
|
-
})]
|
|
641
|
-
})
|
|
642
|
-
})]
|
|
643
|
-
})
|
|
621
|
+
strategy: "fixed"
|
|
622
|
+
},
|
|
623
|
+
dropdownButtonProps: {
|
|
624
|
+
"data-testid": "profile-more-dropdown-button",
|
|
625
|
+
size: "icon-sm",
|
|
626
|
+
className: "absolute top-3 end-12"
|
|
627
|
+
}
|
|
628
|
+
})]
|
|
644
629
|
}), isEditMode ? /*#__PURE__*/jsx(ChangeProfile, {
|
|
645
630
|
onClose: onClose
|
|
646
631
|
}) : /*#__PURE__*/jsx(Preview, {})]
|