@tesouro/embedded-components-react 0.11.70 → 0.11.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/README.md +1 -0
  2. package/dist/index.css +41 -192
  3. package/dist/index.d.ts +93 -73
  4. package/dist/lib/SettingsWidget.d.ts +5 -1
  5. package/dist/lib/WidgetSuite.d.ts +22 -2
  6. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
  7. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
  8. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
  9. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
  10. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
  11. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
  12. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
  13. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
  14. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
  15. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
  17. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
  18. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
  19. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
  20. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
  21. package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
  22. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
  23. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
  24. package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
  25. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
  26. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
  27. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
  33. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
  34. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
  35. package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
  36. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
  37. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
  38. package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
  39. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
  42. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
  43. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
  44. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
  45. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
  46. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
  47. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
  48. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
  49. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
  50. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
  51. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
  52. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
  53. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
  54. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
  55. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
  56. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
  57. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
  58. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
  59. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
  60. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
  61. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
  62. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
  63. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
  64. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
  65. package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
  66. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
  67. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
  68. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
  69. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
  70. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
  71. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
  72. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
  73. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
  74. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
  75. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
  76. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
  77. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
  78. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
  79. package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
  80. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  81. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
  82. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
  83. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
  84. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/WidgetSuiteProvider.js +12 -4
  85. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/labels.js +9 -0
  86. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/BillPaySection.js +12 -9
  87. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/CardsSection.js +25 -23
  88. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardQuickActions.js +74 -0
  89. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/DashboardSection.js +20 -16
  90. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js +15 -9
  91. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/SettingsSection.js +15 -8
  92. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/TransfersSection.js +23 -21
  93. package/dist/packages/shared-ui-shadcn/dist/index.js +2336 -2274
  94. package/package.json +1 -1
  95. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
  96. package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
  97. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
@@ -2,33 +2,32 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { buildAssignedAvatars as e, buildMemberDirectory as t } from "./index4.js";
6
- import { useGroupAdmin as n } from "./index5.js";
7
- import { useAllTeamMembersQuery as r } from "../../data-access/dist/index14.js";
8
- import { useAllDepartmentsQuery as i } from "../../data-access/dist/index17.js";
9
- import { useDepartmentMembersQuery as a } from "../../data-access/dist/index18.js";
10
- import { useCreateDepartmentMutation as o, useDeactivateDepartmentMutation as s, useDepartmentMembersMutation as c, useUpdateDepartmentMutation as l } from "../../data-access/dist/index19.js";
5
+ import { buildMemberDirectory as e } from "./index4.js";
6
+ import { useGroupAdmin as t } from "./index5.js";
7
+ import { useAllTeamMembersQuery as n } from "../../data-access/dist/index14.js";
8
+ import { useAllDepartmentsQuery as r } from "../../data-access/dist/index17.js";
9
+ import { useDepartmentMembersQuery as i } from "../../data-access/dist/index18.js";
10
+ import { useCreateDepartmentMutation as a, useDeactivateDepartmentMutation as o, useDepartmentMembersMutation as s, useUpdateDepartmentMutation as c } from "../../data-access/dist/index19.js";
11
11
  import "../../data-access/dist/index.js";
12
- import { useMemo as u } from "react";
12
+ import { useMemo as l } from "react";
13
13
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js
14
- function d({ canRead: d, canWrite: f, featureLabels: p }) {
15
- let m = r({
14
+ function u({ canRead: u, canWrite: d, featureLabels: f }) {
15
+ let p = n({
16
16
  Status: "ALL",
17
- enabled: d
18
- }), h = m.data?.data, g = u(() => t(h ?? []), [h]), _ = u(() => e(h ?? [], (e) => e.department?.id), [h]);
19
- return n({
20
- canRead: d,
21
- canWrite: f,
22
- directory: g,
23
- directoryReady: m.isComplete,
24
- assignedAvatarsByGroupId: _,
25
- useListQuery: () => i({ enabled: d }),
26
- useEditMembers: (e) => a({
17
+ enabled: u
18
+ }), m = p.data?.data, h = l(() => e(m ?? []), [m]);
19
+ return t({
20
+ canRead: u,
21
+ canWrite: d,
22
+ directory: h,
23
+ directoryReady: p.isComplete,
24
+ useListQuery: () => r({ enabled: u }),
25
+ useEditMembers: (e) => i({
27
26
  departmentId: e,
28
- enabled: f
27
+ enabled: d
29
28
  }),
30
29
  useMutations: () => {
31
- let e = o(), t = l(), n = s(), r = c();
30
+ let e = a(), t = c(), n = o(), r = s();
32
31
  return {
33
32
  create: (t) => e.mutateAsync({ name: t }),
34
33
  rename: (e, n) => t.mutateAsync({
@@ -50,40 +49,41 @@ function d({ canRead: d, canWrite: f, featureLabels: p }) {
50
49
  };
51
50
  },
52
51
  panelLabels: {
53
- title: p.departmentsTitle,
54
- addButton: p.departmentsAddButton,
55
- nameColumn: p.groupNameColumn,
56
- assignedColumn: p.groupAssignedColumn,
57
- actionsColumn: p.groupActionsColumn,
58
- editAction: p.groupEditAction,
59
- deleteAction: p.departmentDeleteAction,
60
- emptyMessage: p.departmentsEmpty,
61
- loadingLabel: p.departmentsLoading,
62
- errorTitle: p.departmentsErrorTitle,
63
- errorDescription: p.departmentsErrorDescription,
64
- rowActionsAriaLabel: p.groupRowActionsAriaLabel
52
+ title: f.departmentsTitle,
53
+ addButton: f.departmentsAddButton,
54
+ nameColumn: f.groupNameColumn,
55
+ assignedColumn: f.groupAssignedColumn,
56
+ actionsColumn: f.groupActionsColumn,
57
+ editAction: f.groupEditAction,
58
+ deleteAction: f.departmentDeleteAction,
59
+ emptyMessage: f.departmentsEmpty,
60
+ loadingLabel: f.departmentsLoading,
61
+ errorTitle: f.departmentsErrorTitle,
62
+ errorDescription: f.departmentsErrorDescription,
63
+ rowActionsAriaLabel: f.groupRowActionsAriaLabel
65
64
  },
66
65
  drawerLabels: {
67
- createTitle: p.departmentCreateTitle,
68
- editTitle: p.departmentEditTitle,
69
- description: p.departmentDrawerDescription,
70
- nameLabel: p.departmentNameLabel,
71
- namePlaceholder: p.departmentNamePlaceholder,
72
- membersLabel: p.groupMembersLabel,
73
- membersSearchPlaceholder: p.groupMembersSearchPlaceholder,
74
- membersEmptyMessage: p.groupMembersEmpty,
75
- cancelButton: p.groupCancelButton,
76
- saveButton: p.groupSaveButton,
77
- close: p.groupCloseButton,
78
- deleteButton: p.departmentDeleteAction
66
+ createTitle: f.departmentCreateTitle,
67
+ editTitle: f.departmentEditTitle,
68
+ description: f.departmentDrawerDescription,
69
+ nameLabel: f.departmentNameLabel,
70
+ namePlaceholder: f.departmentNamePlaceholder,
71
+ nameRequired: f.groupNameRequired,
72
+ membersLabel: f.groupMembersLabel,
73
+ membersSearchPlaceholder: f.groupMembersSearchPlaceholder,
74
+ membersEmptyMessage: f.groupMembersEmpty,
75
+ cancelButton: f.groupCancelButton,
76
+ saveButton: f.groupSaveButton,
77
+ close: f.groupCloseButton,
78
+ deleteButton: f.departmentDeleteAction
79
79
  },
80
80
  countLabels: {
81
- memberSingular: p.groupMemberSingular,
82
- memberPlural: p.groupMemberPlural,
83
- noMembers: p.groupNoMembers
81
+ memberSingular: f.groupMemberSingular,
82
+ memberPlural: f.groupMemberPlural,
83
+ noMembers: f.groupNoMembers
84
84
  },
85
- saveFailedMessage: p.departmentSaveFailed,
86
- deleteFailedMessage: p.departmentDeleteFailed
85
+ saveFailedMessage: f.departmentSaveFailed,
86
+ deleteFailedMessage: f.departmentDeleteFailed
87
87
  });
88
88
  }
89
- export { d as useDepartmentsAdmin };
89
+ export { u as useDepartmentsAdmin };
@@ -1,17 +1,15 @@
1
- import "./index3.js";
1
+ import "./index2.js";
2
2
  import "./index4.js";
3
3
  import "./index5.js";
4
4
  import "./index6.js";
5
- import "./index7.js";
6
- import { InviteTeamMemberForm as e } from "./index8.js";
5
+ import { InviteTeamMemberForm as e } from "./index7.js";
6
+ import { EditTeamMemberPanel as t } from "./index8.js";
7
7
  import "./index9.js";
8
- import { EditTeamMemberPanel as t } from "./index10.js";
8
+ import { GroupAdminDrawer as n } from "./index10.js";
9
9
  import "./index11.js";
10
- import { GroupAdminDrawer as n } from "./index12.js";
11
- import "./index13.js";
12
- import { GroupAdminPanel as r } from "./index14.js";
13
- import { TeamActionDialog as i } from "./index15.js";
14
- import { TeamMembersTable as a } from "./index17.js";
15
- import { TeamMemberDetails as o } from "./index18.js";
16
- import { TeamTabs as s } from "./index19.js";
10
+ import { GroupAdminPanel as r } from "./index12.js";
11
+ import { TeamActionDialog as i } from "./index13.js";
12
+ import { TeamMembersTable as a } from "./index15.js";
13
+ import { TeamMemberDetails as o } from "./index16.js";
14
+ import { TeamTabs as s } from "./index17.js";
17
15
  export { t as EditTeamMemberPanel, n as GroupAdminDrawer, r as GroupAdminPanel, e as InviteTeamMemberForm, i as TeamActionDialog, o as TeamMemberDetails, a as TeamMembersTable, s as TeamTabs };
@@ -2,309 +2,94 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { Badge as e, Button as t, Input as n, Label as r, Spinner as i } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
- import { avatarSwatchFor as ee } from "../../../../shared/ui/dist/lib/avatarSwatch.js";
7
- import { InlineErrorAlert as a } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
5
+ import { Button as e, Combobox as t, FieldError as n, FieldRequirement as r, FormSheet as i, Input as a, Label as o, RequiredFieldsLegend as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
+ import { InlineErrorAlert as c } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
8
7
  import "../../../../shared/ui/dist/index.js";
9
- import { AccountAccessTable as o } from "./index4.js";
10
- import { DEFAULT_LABELS as s } from "./index6.js";
11
- import { RoleCardGroup as c } from "./index7.js";
12
- import { OptionalSelect as l } from "./index8.js";
13
- import { statusToneClassName as u } from "./index9.js";
14
- import { useEffect as d, useRef as f } from "react";
15
- import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
16
- import { ArrowLeftIcon as g, LockIcon as _ } from "lucide-react";
8
+ import { DEFAULT_GROUP_ADMIN_DRAWER_LABELS as l } from "./index9.js";
9
+ import { useId as u, useRef as d } from "react";
10
+ import { jsx as f, jsxs as p } from "react/jsx-runtime";
17
11
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js
18
- function v({ open: v, memberName: y, memberEmail: b, memberInitials: x = "", avatarSeed: S, roleBadgeLabel: C, statusLabel: w, statusTone: T = "neutral", lastSignInLabel: E, form: D, roleOptions: O, departmentOptions: te, locationOptions: k, reportingManagerOptions: A, departmentsLoading: j = !1, locationsLoading: M = !1, reportingManagersLoading: N = !1, departmentsError: P = !1, locationsError: F = !1, reportingManagersError: I = !1, accountAccessMode: L = "hidden", accountAccessRows: R = [], onAccountAccessToggle: z, isAccountAccessLoading: B = !1, accountAccessErrorMessage: V, errors: H, submitErrorMessage: U, isSubmitting: W = !1, isNameDisabled: G = !1, isRoleDisabled: K = !1, isGroupDisabled: q = !1, isReportingManagerDisabled: J = !1, isSaveDisabled: Y = !1, onOpenChange: X, onFormChange: Z, onSubmit: ne, labels: re }) {
19
- let Q = {
20
- ...s,
21
- ...re
22
- }, $ = f(null);
23
- return d(() => {
24
- v && $.current?.focus();
25
- }, [v]), v ? /* @__PURE__ */ h("section", {
26
- "aria-label": Q.editTitle,
27
- className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-card ttw:p-4",
28
- children: [
29
- /* @__PURE__ */ h(t, {
30
- ref: $,
31
- variant: "ghost",
32
- size: "sm",
33
- disabled: W,
34
- onClick: () => X(!1),
35
- children: [/* @__PURE__ */ m(g, {
36
- "aria-hidden": !0,
37
- className: "ttw:size-4"
38
- }), Q.editBackButton]
39
- }),
40
- /* @__PURE__ */ h("div", {
41
- className: "ttw:mt-4 ttw:flex ttw:items-center ttw:gap-3",
42
- children: [/* @__PURE__ */ m("span", {
43
- "aria-hidden": !0,
44
- className: `ttw:flex ttw:size-12 ttw:shrink-0 ttw:items-center ttw:justify-center ttw:rounded-full ttw:text-sm ttw:font-semibold ${ee(S || b || y)}`,
45
- children: x
46
- }), /* @__PURE__ */ h("div", {
47
- className: "ttw:min-w-0",
48
- children: [/* @__PURE__ */ h("div", {
49
- className: "ttw:flex ttw:items-center ttw:gap-2",
50
- children: [/* @__PURE__ */ m("h3", {
51
- className: "ttw:text-lg ttw:font-semibold ttw:text-foreground",
52
- children: y
53
- }), C ? /* @__PURE__ */ m(e, {
54
- variant: "outline",
55
- className: "ttw:rounded ttw:border-[#D0D5DD] ttw:font-medium ttw:text-[#344054]",
56
- children: C
57
- }) : null]
58
- }), /* @__PURE__ */ h("div", {
59
- className: "ttw:mt-1 ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:text-muted-foreground",
60
- children: [w ? /* @__PURE__ */ m(e, {
61
- className: u(T),
62
- children: w
63
- }) : null, E ? /* @__PURE__ */ h(p, { children: [
64
- /* @__PURE__ */ m("span", {
65
- "aria-hidden": !0,
66
- children: "|"
67
- }),
68
- /* @__PURE__ */ m("span", { children: Q.detailsLastSignInLabel }),
69
- /* @__PURE__ */ m("span", { children: E })
70
- ] }) : null]
71
- })]
72
- })]
73
- }),
74
- /* @__PURE__ */ m("form", {
75
- noValidate: !0,
76
- className: "ttw:mt-4",
77
- onSubmit: (e) => {
78
- e.preventDefault(), ne();
79
- },
80
- children: /* @__PURE__ */ h("fieldset", {
81
- className: "ttw:space-y-8",
82
- disabled: W,
12
+ function m({ open: m, isEditMode: h, name: g, onNameChange: _, options: v, selectedOptions: y, onSelectedOptionsChange: b, isSaveDisabled: x = !1, nameError: S, submitErrorMessage: C, onOpenChange: w, onSubmit: T, onDelete: E, labels: D }) {
13
+ let O = {
14
+ ...l,
15
+ ...D
16
+ }, k = u(), A = `${k}-name`, j = d(null), M = `${k}-members`;
17
+ return /* @__PURE__ */ f(i, {
18
+ open: m,
19
+ onOpenChange: w,
20
+ title: h ? O.editTitle : O.createTitle,
21
+ description: O.description,
22
+ onDelete: h ? E : void 0,
23
+ labels: {
24
+ close: O.close,
25
+ delete: O.deleteButton
26
+ },
27
+ secondaryAction: /* @__PURE__ */ f(e, {
28
+ type: "button",
29
+ variant: "ghost",
30
+ onClick: () => w(!1),
31
+ children: O.cancelButton
32
+ }),
33
+ primaryAction: /* @__PURE__ */ f(e, {
34
+ type: "submit",
35
+ form: k,
36
+ disabled: x,
37
+ children: O.saveButton
38
+ }),
39
+ children: /* @__PURE__ */ p("form", {
40
+ id: k,
41
+ noValidate: !0,
42
+ onSubmit: (e) => {
43
+ e.preventDefault(), g.trim() || j.current?.focus(), T();
44
+ },
45
+ className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:py-4",
46
+ children: [
47
+ /* @__PURE__ */ f(s, {}),
48
+ /* @__PURE__ */ p("div", {
49
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
83
50
  children: [
84
- /* @__PURE__ */ h("div", {
85
- className: "ttw:space-y-4",
86
- children: [
87
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
88
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
89
- children: Q.inviteDetailsSectionHeading
90
- }), /* @__PURE__ */ m("p", {
91
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
92
- children: Q.editDescription
93
- })] }),
94
- /* @__PURE__ */ h("div", {
95
- className: "ttw:space-y-2",
96
- children: [
97
- /* @__PURE__ */ m(r, {
98
- htmlFor: "team-edit-name",
99
- children: Q.editNameLabel
100
- }),
101
- /* @__PURE__ */ h("div", {
102
- className: "ttw:relative",
103
- children: [/* @__PURE__ */ m(n, {
104
- id: "team-edit-name",
105
- name: "name",
106
- autoComplete: "name",
107
- value: D.name,
108
- disabled: W || G,
109
- className: G ? "ttw:pr-9" : void 0,
110
- "aria-invalid": H?.name ? !0 : void 0,
111
- "aria-describedby": H?.name ? "team-edit-name-error" : void 0,
112
- onChange: (e) => Z({
113
- ...D,
114
- name: e.target.value
115
- })
116
- }), G && /* @__PURE__ */ m(_, {
117
- "aria-hidden": !0,
118
- className: "ttw:pointer-events-none ttw:absolute ttw:top-1/2 ttw:right-3 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground"
119
- })]
120
- }),
121
- H?.name && /* @__PURE__ */ m("p", {
122
- id: "team-edit-name-error",
123
- className: "ttw:text-sm ttw:text-destructive",
124
- children: H.name
125
- })
126
- ]
127
- }),
128
- /* @__PURE__ */ h("div", {
129
- className: "ttw:space-y-2",
130
- children: [/* @__PURE__ */ m(r, {
131
- htmlFor: "team-edit-email",
132
- children: Q.editEmailLabel
133
- }), /* @__PURE__ */ h("div", {
134
- className: "ttw:relative",
135
- children: [/* @__PURE__ */ m(n, {
136
- id: "team-edit-email",
137
- name: "email",
138
- type: "email",
139
- value: b,
140
- disabled: !0,
141
- readOnly: !0,
142
- className: "ttw:pr-9"
143
- }), /* @__PURE__ */ m(_, {
144
- "aria-hidden": !0,
145
- className: "ttw:pointer-events-none ttw:absolute ttw:top-1/2 ttw:right-3 ttw:size-4 ttw:-translate-y-1/2 ttw:text-muted-foreground"
146
- })]
147
- })]
148
- }),
149
- /* @__PURE__ */ m(l, {
150
- id: "team-edit-department",
151
- label: Q.inviteDepartmentLabel,
152
- value: D.department,
153
- options: te,
154
- placeholder: Q.inviteDepartmentPlaceholder,
155
- emptyMessage: Q.inviteDepartmentEmpty,
156
- loadingMessage: Q.inviteOptionsLoading,
157
- noneLabel: Q.inviteOptionNone,
158
- disabled: q,
159
- isLoading: j,
160
- isError: P,
161
- errorMessage: Q.inviteDepartmentLoadError,
162
- errorHelper: Q.inviteDepartmentLoadErrorHelper,
163
- emptyHelper: Q.inviteDepartmentEmptyHelper,
164
- onValueChange: (e) => Z({
165
- ...D,
166
- department: e
167
- })
168
- }),
169
- /* @__PURE__ */ m(l, {
170
- id: "team-edit-location",
171
- label: Q.inviteLocationLabel,
172
- value: D.location,
173
- options: k,
174
- placeholder: Q.inviteLocationPlaceholder,
175
- emptyMessage: Q.inviteLocationEmpty,
176
- loadingMessage: Q.inviteOptionsLoading,
177
- noneLabel: Q.inviteOptionNone,
178
- disabled: q,
179
- isLoading: M,
180
- isError: F,
181
- errorMessage: Q.inviteLocationLoadError,
182
- errorHelper: Q.inviteLocationLoadErrorHelper,
183
- emptyHelper: Q.inviteLocationEmptyHelper,
184
- onValueChange: (e) => Z({
185
- ...D,
186
- location: e
187
- })
188
- }),
189
- /* @__PURE__ */ m(l, {
190
- id: "team-edit-reporting-manager",
191
- label: Q.inviteReportingManagerLabel,
192
- value: D.reportingManager,
193
- options: A,
194
- placeholder: Q.inviteReportingManagerPlaceholder,
195
- emptyMessage: Q.inviteReportingManagerEmpty,
196
- loadingMessage: Q.inviteOptionsLoading,
197
- noneLabel: Q.inviteOptionNone,
198
- disabled: J,
199
- isLoading: N,
200
- isError: I,
201
- errorMessage: Q.inviteReportingManagerLoadError,
202
- errorHelper: Q.inviteReportingManagerLoadErrorHelper,
203
- emptyHelper: Q.inviteReportingManagerEmptyHelper,
204
- readyHelper: Q.inviteReportingManagerHelper,
205
- searchable: !0,
206
- searchPlaceholder: Q.inviteReportingManagerSearchPlaceholder,
207
- noResultsLabel: Q.inviteReportingManagerNoResults,
208
- onValueChange: (e) => Z({
209
- ...D,
210
- reportingManager: e
211
- })
212
- })
213
- ]
214
- }),
215
- /* @__PURE__ */ h("div", {
216
- className: "ttw:space-y-2",
217
- children: [
218
- /* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
219
- id: "team-edit-role-heading",
220
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
221
- children: Q.inviteRoleSectionHeading
222
- }), /* @__PURE__ */ m("p", {
223
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
224
- children: Q.inviteRoleSectionDescription
225
- })] }),
226
- /* @__PURE__ */ m(c, {
227
- idPrefix: "team-edit-role",
228
- options: O,
229
- value: D.role,
230
- disabled: K,
231
- onValueChange: (e) => Z({
232
- ...D,
233
- role: e
234
- }),
235
- ariaLabelledBy: "team-edit-role-heading",
236
- ariaInvalid: !!H?.role,
237
- ariaDescribedBy: H?.role ? "team-edit-role-error" : void 0
238
- }),
239
- H?.role && /* @__PURE__ */ m("p", {
240
- id: "team-edit-role-error",
241
- className: "ttw:text-sm ttw:text-destructive",
242
- children: H.role
243
- })
244
- ]
51
+ /* @__PURE__ */ f(o, {
52
+ htmlFor: A,
53
+ requirement: r.Required,
54
+ children: O.nameLabel
245
55
  }),
246
- L === "employee" && /* @__PURE__ */ h("div", {
247
- className: "ttw:space-y-2",
248
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
249
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
250
- children: Q.inviteAccountAccessSectionHeading
251
- }), /* @__PURE__ */ m("p", {
252
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
253
- children: Q.manageAccessEmployeeNote
254
- })] }), B ? /* @__PURE__ */ h("div", {
255
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:py-2",
256
- children: [/* @__PURE__ */ m(i, { className: "ttw:size-4" }), /* @__PURE__ */ m("span", {
257
- className: "ttw:text-sm ttw:text-muted-foreground",
258
- children: Q.manageAccessLoadingLabel
259
- })]
260
- }) : V ? /* @__PURE__ */ m(a, { children: V }) : null]
56
+ /* @__PURE__ */ f(a, {
57
+ id: A,
58
+ ref: j,
59
+ "aria-invalid": !!S,
60
+ "aria-describedby": S ? `${A}-error` : void 0,
61
+ required: !0,
62
+ value: g,
63
+ placeholder: O.namePlaceholder,
64
+ onChange: (e) => _(e.target.value)
261
65
  }),
262
- (L === "picker" || L === "admin") && /* @__PURE__ */ h("div", {
263
- className: "ttw:space-y-2",
264
- children: [/* @__PURE__ */ h("div", { children: [/* @__PURE__ */ m("h4", {
265
- className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
266
- children: Q.inviteAccountAccessSectionHeading
267
- }), /* @__PURE__ */ m("p", {
268
- className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
269
- children: Q.inviteAccountAccessSectionDescription
270
- })] }), B ? /* @__PURE__ */ h("div", {
271
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:py-2",
272
- children: [/* @__PURE__ */ m(i, { className: "ttw:size-4" }), /* @__PURE__ */ m("span", {
273
- className: "ttw:text-sm ttw:text-muted-foreground",
274
- children: Q.manageAccessLoadingLabel
275
- })]
276
- }) : V ? /* @__PURE__ */ m(a, { children: V }) : /* @__PURE__ */ m(o, {
277
- rows: R,
278
- onToggle: (e, t) => z?.(e, t),
279
- disabled: W || L === "admin",
280
- note: L === "admin" ? Q.manageAccessAdminNote : void 0,
281
- emptyMessage: Q.manageAccessAccountsEmpty,
282
- labels: {
283
- accountNameColumn: Q.accountAccessNameColumn,
284
- accessColumn: Q.accountAccessAccessColumn,
285
- toggleAriaLabel: Q.accountAccessToggleLabel
286
- }
287
- })]
288
- }),
289
- U && /* @__PURE__ */ m(a, { children: U }),
290
- /* @__PURE__ */ h("div", {
291
- className: "ttw:flex ttw:justify-end ttw:gap-2",
292
- children: [/* @__PURE__ */ m(t, {
293
- type: "button",
294
- variant: "ghost",
295
- onClick: () => X(!1),
296
- children: Q.editCancelButton
297
- }), /* @__PURE__ */ m(t, {
298
- type: "submit",
299
- loading: W,
300
- disabled: Y,
301
- children: Q.editSaveButton
302
- })]
66
+ /* @__PURE__ */ f(n, {
67
+ id: `${A}-error`,
68
+ children: S
303
69
  })
304
70
  ]
305
- })
306
- })
307
- ]
308
- }) : null;
71
+ }),
72
+ /* @__PURE__ */ p("div", {
73
+ className: "ttw:flex ttw:flex-col ttw:gap-2",
74
+ children: [/* @__PURE__ */ f(o, {
75
+ htmlFor: M,
76
+ requirement: r.Optional,
77
+ children: O.membersLabel
78
+ }), /* @__PURE__ */ f(t, {
79
+ inputId: M,
80
+ multiple: !0,
81
+ items: v,
82
+ value: y,
83
+ labels: {
84
+ placeholder: O.membersSearchPlaceholder,
85
+ emptyMessage: O.membersEmptyMessage
86
+ },
87
+ onValueChange: b
88
+ })]
89
+ }),
90
+ C ? /* @__PURE__ */ f(c, { children: C }) : null
91
+ ]
92
+ })
93
+ });
309
94
  }
310
- export { v as EditTeamMemberPanel, v as default };
95
+ export { m as GroupAdminDrawer, m as default };
@@ -1,16 +1,16 @@
1
1
  // ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js
2
2
  var e = {
3
- createTitle: "Add group",
4
- editTitle: "Edit group",
5
- description: "Name the group and assign members.",
6
- nameLabel: "Name",
7
- namePlaceholder: "Enter a name",
8
- membersLabel: "Members",
9
- membersSearchPlaceholder: "Search members",
10
- membersEmptyMessage: "No members found.",
11
- cancelButton: "Cancel",
12
- saveButton: "Save",
13
- deleteButton: "Delete",
14
- close: "Close"
3
+ title: "Groups",
4
+ addButton: "Add",
5
+ nameColumn: "Name",
6
+ assignedColumn: "Assigned",
7
+ actionsColumn: "Actions",
8
+ editAction: "Edit",
9
+ deleteAction: "Delete",
10
+ emptyMessage: "No groups found.",
11
+ loadingLabel: "Loading groups",
12
+ errorTitle: "Unable to load",
13
+ errorDescription: "Something went wrong. Please try again.",
14
+ rowActionsAriaLabel: "Actions for"
15
15
  };
16
- export { e as DEFAULT_GROUP_ADMIN_DRAWER_LABELS };
16
+ export { e as DEFAULT_GROUP_ADMIN_PANEL_LABELS };