@tesouro/embedded-components-react 0.11.71 → 0.11.73
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/README.md +1 -0
- package/dist/index.css +35 -192
- package/dist/index.d.ts +75 -71
- package/dist/lib/SettingsWidget.d.ts +5 -1
- package/dist/lib/WidgetSuite.d.ts +4 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +4 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +196 -131
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +11 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index4.js +5 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +38 -32
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +103 -75
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +140 -168
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +97 -87
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index7.js +11 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/feature/dist/index8.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index2.js +3 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +134 -177
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index4.js +110 -176
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index5.js +28 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +13 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +28 -24
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +35 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index7.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index8.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index11.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index12.js +22 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index17.js +54 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index20.js +75 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +42 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +89 -82
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index9.js +39 -38
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/feature/dist/index4.js +32 -32
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/profile/ui/dist/index3.js +56 -71
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/data-access/dist/index10.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index12.js +86 -66
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index13.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index15.js +146 -132
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +95 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index4.js +8 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +69 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index6.js +51 -51
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +9 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index10.js +83 -298
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index11.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +122 -75
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index13.js +41 -15
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index14.js +7 -131
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index15.js +147 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +240 -11
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +15 -173
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index2.js +38 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index3.js +5 -46
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index4.js +52 -45
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +101 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index6.js +40 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index7.js +415 -40
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js +261 -332
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index9.js +15 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApprovalPolicyRules.js +136 -122
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +99 -100
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index17.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index18.js +10 -55
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index19.js +34 -8
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index20.js +8 -84
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index21.js +86 -0
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index3.js +13 -13
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index5.js +17 -18
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +33 -42
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +24 -24
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/FileDropZone/FileDropZone.js +62 -0
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/LoadingRegion/LoadingRegion.js +1 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +2302 -2284
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index18.js +0 -291
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index19.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/avatarSwatch.js +0 -26
|
@@ -2,392 +2,321 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
5
|
+
import { Badge as e, Button as t, DescriptionList as n, FieldError as r, FieldRequirement as i, Heading as a, Input as o, Label as ee, RequiredFieldsLegend as s, Skeleton as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import { ErrorState as l } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
7
|
+
import { LoadingRegion as u } from "../../../../shared/ui/dist/lib/LoadingRegion/LoadingRegion.js";
|
|
8
|
+
import { InlineErrorAlert as d } from "../../../../shared/ui/dist/lib/InlineErrorAlert/InlineErrorAlert.js";
|
|
7
9
|
import "../../../../shared/ui/dist/index.js";
|
|
8
|
-
import { AccountAccessTable as
|
|
9
|
-
import { DEFAULT_LABELS as
|
|
10
|
-
import { RoleCardGroup as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
10
|
+
import { AccountAccessTable as f } from "./index4.js";
|
|
11
|
+
import { DEFAULT_LABELS as p } from "./index5.js";
|
|
12
|
+
import { RoleCardGroup as m } from "./index6.js";
|
|
13
|
+
import { OptionalSelect as h } from "./index7.js";
|
|
14
|
+
import { useEffect as g, useRef as _, useState as v } from "react";
|
|
15
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
16
|
+
import { ArrowLeftIcon as S } from "lucide-react";
|
|
14
17
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js
|
|
15
|
-
function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
onOpenChange: y,
|
|
30
|
-
children: [/* @__PURE__ */ E(u, {
|
|
31
|
-
asChild: !0,
|
|
32
|
-
children: /* @__PURE__ */ D("button", {
|
|
33
|
-
type: "button",
|
|
34
|
-
id: e,
|
|
35
|
-
role: "combobox",
|
|
36
|
-
"aria-expanded": v,
|
|
37
|
-
"aria-controls": v ? b : void 0,
|
|
38
|
-
disabled: h,
|
|
39
|
-
className: "ttw:flex ttw:h-9 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-input ttw:bg-transparent ttw:px-3 ttw:py-2 ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50 ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50",
|
|
40
|
-
children: [/* @__PURE__ */ E("span", {
|
|
41
|
-
className: g("ttw:truncate", !x && "ttw:text-muted-foreground"),
|
|
42
|
-
children: x ? x.label : d
|
|
43
|
-
}), /* @__PURE__ */ E(A, { className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50" })]
|
|
44
|
-
})
|
|
45
|
-
}), /* @__PURE__ */ E(l, {
|
|
46
|
-
id: b,
|
|
47
|
-
align: "start",
|
|
48
|
-
className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
|
|
49
|
-
children: /* @__PURE__ */ D(t, {
|
|
50
|
-
filter: (e, t) => +!!e.toLowerCase().includes(t.toLowerCase()),
|
|
51
|
-
children: [/* @__PURE__ */ E(r, {
|
|
52
|
-
placeholder: f,
|
|
53
|
-
"aria-label": f
|
|
54
|
-
}), /* @__PURE__ */ D(a, { children: [
|
|
55
|
-
/* @__PURE__ */ E(n, { children: p }),
|
|
56
|
-
o ? /* @__PURE__ */ E(i, {
|
|
57
|
-
value: m,
|
|
58
|
-
onSelect: () => C(""),
|
|
59
|
-
children: m
|
|
60
|
-
}) : null,
|
|
61
|
-
s.map((e) => /* @__PURE__ */ D(i, {
|
|
62
|
-
value: `${e.label} ${e.sublabel ?? ""} ${e.value}`,
|
|
63
|
-
onSelect: () => C(e.value),
|
|
64
|
-
children: [/* @__PURE__ */ D("span", {
|
|
65
|
-
className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-0.5",
|
|
66
|
-
children: [/* @__PURE__ */ E("span", {
|
|
67
|
-
className: "ttw:truncate",
|
|
68
|
-
children: e.label
|
|
69
|
-
}), e.sublabel ? /* @__PURE__ */ E("span", {
|
|
70
|
-
className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
|
|
71
|
-
children: e.sublabel
|
|
72
|
-
}) : null]
|
|
73
|
-
}), e.value === o ? /* @__PURE__ */ E(k, { className: "ttw:ml-auto ttw:size-4 ttw:shrink-0" }) : null]
|
|
74
|
-
}, e.value))
|
|
75
|
-
] })]
|
|
76
|
-
})
|
|
77
|
-
})]
|
|
78
|
-
});
|
|
79
|
-
}
|
|
80
|
-
function F({ id: e, label: t, value: n, options: r, placeholder: i, emptyMessage: a, loadingMessage: o, noneLabel: c, isLoading: l = !1, isError: u = !1, errorMessage: g, errorHelper: _, emptyHelper: v, readyHelper: y, disabled: b, searchable: x = !1, searchPlaceholder: S, noResultsLabel: C, onValueChange: w }) {
|
|
81
|
-
let T = r.length > 0, O = u ? g ?? a : l ? o : T ? i : a, k = u ? _ : !l && !T ? v : T ? y : void 0;
|
|
82
|
-
return /* @__PURE__ */ D("div", {
|
|
83
|
-
className: "ttw:space-y-2",
|
|
84
|
-
children: [
|
|
85
|
-
/* @__PURE__ */ E(s, {
|
|
86
|
-
htmlFor: e,
|
|
87
|
-
children: t
|
|
88
|
-
}),
|
|
89
|
-
x ? /* @__PURE__ */ E(P, {
|
|
90
|
-
id: e,
|
|
91
|
-
value: n,
|
|
92
|
-
options: r,
|
|
93
|
-
placeholder: O,
|
|
94
|
-
searchPlaceholder: S ?? "",
|
|
95
|
-
noResultsLabel: C ?? "",
|
|
96
|
-
noneLabel: c,
|
|
97
|
-
disabled: b || l || !T,
|
|
98
|
-
onValueChange: w
|
|
99
|
-
}) : /* @__PURE__ */ D(d, {
|
|
100
|
-
value: n || void 0,
|
|
101
|
-
disabled: b || l || !T,
|
|
102
|
-
onValueChange: (e) => w(e === N ? "" : e),
|
|
103
|
-
children: [/* @__PURE__ */ E(m, {
|
|
104
|
-
id: e,
|
|
105
|
-
className: "ttw:w-full",
|
|
106
|
-
children: /* @__PURE__ */ E(h, { placeholder: O })
|
|
107
|
-
}), /* @__PURE__ */ D(f, { children: [n ? /* @__PURE__ */ E(p, {
|
|
108
|
-
value: N,
|
|
109
|
-
children: c
|
|
110
|
-
}) : null, r.map((e) => /* @__PURE__ */ E(p, {
|
|
111
|
-
value: e.value,
|
|
112
|
-
description: e.sublabel,
|
|
113
|
-
children: e.label
|
|
114
|
-
}, e.value))] })]
|
|
115
|
-
}),
|
|
116
|
-
k ? /* @__PURE__ */ E("p", {
|
|
117
|
-
className: "ttw:text-xs ttw:text-muted-foreground",
|
|
118
|
-
children: k
|
|
119
|
-
}) : null
|
|
120
|
-
]
|
|
121
|
-
});
|
|
122
|
-
}
|
|
123
|
-
function I({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i, reportingManagerOptions: a, accountAccessOptions: c, departmentsLoading: l = !1, locationsLoading: u = !1, reportingManagersLoading: d = !1, departmentsError: f = !1, locationsError: p = !1, reportingManagersError: m = !1, accountAccessLoading: h = !1, accountAccessError: g = !1, accountAccessMode: S = "hidden", errors: T, submitErrorMessage: k, isSubmitting: A = !1, isSubmitBlocked: N = !1, onFormChange: P, onBackClick: I, onCancel: L, onSubmit: R, labels: z }) {
|
|
124
|
-
let B = {
|
|
125
|
-
...y,
|
|
126
|
-
...z
|
|
127
|
-
}, V = w(null), H = C(() => c.map((e) => ({
|
|
128
|
-
...e,
|
|
129
|
-
checked: S === "admin" || t.accountAccess.includes(e.value)
|
|
130
|
-
})), [
|
|
131
|
-
c,
|
|
132
|
-
S,
|
|
133
|
-
t.accountAccess
|
|
134
|
-
]);
|
|
135
|
-
return x(() => {
|
|
136
|
-
V.current?.focus();
|
|
137
|
-
}, []), /* @__PURE__ */ D("section", {
|
|
138
|
-
"aria-label": B.inviteTitle,
|
|
18
|
+
function C({ open: C, memberName: w, memberEmail: T, roleBadgeLabel: E, statusLabel: D, statusTone: O = "neutral", lastSignInLabel: k, form: A, roleOptions: j, departmentOptions: te, locationOptions: ne, reportingManagerOptions: re, departmentsLoading: ie = !1, locationsLoading: ae = !1, reportingManagersLoading: oe = !1, departmentsError: M = !1, locationsError: N = !1, reportingManagersError: P = !1, accountAccessMode: F = "hidden", accountAccessRows: I = [], onAccountAccessToggle: L, isAccountAccessLoading: R = !1, accountAccessErrorMessage: z, onRetryAccountAccess: B, errors: V, submitErrorMessage: H, isSubmitting: U = !1, isNameDisabled: W = !1, isRoleDisabled: G = !1, isGroupDisabled: K = !1, isReportingManagerDisabled: q = !1, isSaveDisabled: se = !1, onOpenChange: J, onFormChange: Y, onSubmit: ce, labels: le }) {
|
|
19
|
+
let X = {
|
|
20
|
+
...p,
|
|
21
|
+
...le
|
|
22
|
+
}, Z = _(null), Q = _(null), [$, ue] = v(0);
|
|
23
|
+
return g(() => {
|
|
24
|
+
if ($) {
|
|
25
|
+
let e = Q.current?.querySelector("[aria-invalid=\"true\"]");
|
|
26
|
+
(e?.matches("[role=\"radiogroup\"]") ? e.querySelector("[role=\"radio\"]") : e)?.focus();
|
|
27
|
+
}
|
|
28
|
+
}, [$]), g(() => {
|
|
29
|
+
C && Z.current?.focus();
|
|
30
|
+
}, [C]), C ? /* @__PURE__ */ x("section", {
|
|
31
|
+
"aria-label": X.editTitle,
|
|
139
32
|
className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-card ttw:p-4",
|
|
140
33
|
children: [
|
|
141
|
-
/* @__PURE__ */
|
|
142
|
-
ref:
|
|
34
|
+
/* @__PURE__ */ x(t, {
|
|
35
|
+
ref: Z,
|
|
143
36
|
variant: "ghost",
|
|
144
37
|
size: "sm",
|
|
145
|
-
disabled:
|
|
146
|
-
onClick:
|
|
147
|
-
children: [/* @__PURE__ */
|
|
38
|
+
disabled: U,
|
|
39
|
+
onClick: () => J(!1),
|
|
40
|
+
children: [/* @__PURE__ */ b(S, {
|
|
148
41
|
"aria-hidden": !0,
|
|
149
42
|
className: "ttw:size-4"
|
|
150
|
-
}),
|
|
43
|
+
}), X.editBackButton]
|
|
151
44
|
}),
|
|
152
|
-
/* @__PURE__ */
|
|
153
|
-
className: "ttw:mt-4 ttw:
|
|
154
|
-
children:
|
|
45
|
+
/* @__PURE__ */ b("div", {
|
|
46
|
+
className: "ttw:mt-4 ttw:flex ttw:items-center ttw:gap-3",
|
|
47
|
+
children: /* @__PURE__ */ x("div", {
|
|
48
|
+
className: "ttw:min-w-0",
|
|
49
|
+
children: [/* @__PURE__ */ x("div", {
|
|
50
|
+
className: "ttw:flex ttw:items-center ttw:gap-2",
|
|
51
|
+
children: [/* @__PURE__ */ b(a, {
|
|
52
|
+
variant: "section",
|
|
53
|
+
level: 3,
|
|
54
|
+
children: w
|
|
55
|
+
}), E ? /* @__PURE__ */ b(e, {
|
|
56
|
+
variant: "secondary",
|
|
57
|
+
children: E
|
|
58
|
+
}) : null]
|
|
59
|
+
}), /* @__PURE__ */ x("div", {
|
|
60
|
+
className: "ttw:mt-1 ttw:flex ttw:items-center ttw:gap-2 ttw:text-sm ttw:text-muted-foreground",
|
|
61
|
+
children: [D ? /* @__PURE__ */ b(e, {
|
|
62
|
+
tone: O,
|
|
63
|
+
children: D
|
|
64
|
+
}) : null, k ? /* @__PURE__ */ x(y, { children: [
|
|
65
|
+
/* @__PURE__ */ b("span", {
|
|
66
|
+
"aria-hidden": !0,
|
|
67
|
+
children: "|"
|
|
68
|
+
}),
|
|
69
|
+
/* @__PURE__ */ b("span", { children: X.detailsLastSignInLabel }),
|
|
70
|
+
/* @__PURE__ */ b("span", { children: k })
|
|
71
|
+
] }) : null]
|
|
72
|
+
})]
|
|
73
|
+
})
|
|
155
74
|
}),
|
|
156
|
-
/* @__PURE__ */
|
|
75
|
+
/* @__PURE__ */ b("form", {
|
|
76
|
+
ref: Q,
|
|
157
77
|
noValidate: !0,
|
|
158
78
|
className: "ttw:mt-4",
|
|
159
79
|
onSubmit: (e) => {
|
|
160
|
-
e.preventDefault(),
|
|
80
|
+
e.preventDefault(), ce(), ue((e) => e + 1);
|
|
161
81
|
},
|
|
162
|
-
children: /* @__PURE__ */
|
|
163
|
-
className: "ttw:space-y-
|
|
164
|
-
disabled:
|
|
82
|
+
children: /* @__PURE__ */ x("fieldset", {
|
|
83
|
+
className: "ttw:space-y-8",
|
|
84
|
+
disabled: U,
|
|
165
85
|
children: [
|
|
166
|
-
/* @__PURE__ */
|
|
86
|
+
(!W || !G) && /* @__PURE__ */ b(s, {}),
|
|
87
|
+
/* @__PURE__ */ x("div", {
|
|
167
88
|
className: "ttw:space-y-4",
|
|
168
89
|
children: [
|
|
169
|
-
/* @__PURE__ */
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
/* @__PURE__ */
|
|
90
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(a, {
|
|
91
|
+
variant: "component",
|
|
92
|
+
level: 4,
|
|
93
|
+
children: X.inviteDetailsSectionHeading
|
|
94
|
+
}), /* @__PURE__ */ b("p", {
|
|
95
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
|
|
96
|
+
children: X.editDescription
|
|
97
|
+
})] }),
|
|
98
|
+
W && !U ? /* @__PURE__ */ b(n, { items: [{
|
|
99
|
+
label: X.editNameLabel,
|
|
100
|
+
value: A.name
|
|
101
|
+
}, {
|
|
102
|
+
label: X.editEmailLabel,
|
|
103
|
+
value: T
|
|
104
|
+
}] }) : /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ x("div", {
|
|
174
105
|
className: "ttw:space-y-2",
|
|
175
106
|
children: [
|
|
176
|
-
/* @__PURE__ */
|
|
177
|
-
htmlFor: "team-
|
|
178
|
-
|
|
107
|
+
/* @__PURE__ */ b(ee, {
|
|
108
|
+
htmlFor: "team-edit-name",
|
|
109
|
+
requirement: i.Required,
|
|
110
|
+
children: X.editNameLabel
|
|
179
111
|
}),
|
|
180
|
-
/* @__PURE__ */
|
|
181
|
-
id: "team-
|
|
112
|
+
/* @__PURE__ */ b(o, {
|
|
113
|
+
id: "team-edit-name",
|
|
182
114
|
name: "name",
|
|
183
115
|
autoComplete: "name",
|
|
184
116
|
required: !0,
|
|
185
|
-
value:
|
|
186
|
-
|
|
187
|
-
"aria-
|
|
188
|
-
|
|
189
|
-
|
|
117
|
+
value: A.name,
|
|
118
|
+
disabled: U || W,
|
|
119
|
+
"aria-invalid": V?.name ? !0 : void 0,
|
|
120
|
+
"aria-describedby": V?.name ? "team-edit-name-error" : void 0,
|
|
121
|
+
onChange: (e) => Y({
|
|
122
|
+
...A,
|
|
190
123
|
name: e.target.value
|
|
191
124
|
})
|
|
192
125
|
}),
|
|
193
|
-
|
|
194
|
-
id: "team-
|
|
195
|
-
|
|
196
|
-
})
|
|
197
|
-
]
|
|
198
|
-
}),
|
|
199
|
-
/* @__PURE__ */ D("div", {
|
|
200
|
-
className: "ttw:space-y-2",
|
|
201
|
-
children: [
|
|
202
|
-
/* @__PURE__ */ E(s, {
|
|
203
|
-
htmlFor: "team-invite-email",
|
|
204
|
-
children: B.inviteWorkEmailLabel
|
|
205
|
-
}),
|
|
206
|
-
/* @__PURE__ */ E(o, {
|
|
207
|
-
id: "team-invite-email",
|
|
208
|
-
name: "email",
|
|
209
|
-
type: "email",
|
|
210
|
-
autoComplete: "email",
|
|
211
|
-
required: !0,
|
|
212
|
-
value: t.email,
|
|
213
|
-
"aria-invalid": T?.email ? !0 : void 0,
|
|
214
|
-
"aria-describedby": T?.email ? "team-invite-email-error" : void 0,
|
|
215
|
-
onChange: (e) => P({
|
|
216
|
-
...t,
|
|
217
|
-
email: e.target.value
|
|
218
|
-
})
|
|
219
|
-
}),
|
|
220
|
-
T?.email && /* @__PURE__ */ E(M, {
|
|
221
|
-
id: "team-invite-email-error",
|
|
222
|
-
message: T.email
|
|
126
|
+
V?.name && /* @__PURE__ */ b(r, {
|
|
127
|
+
id: "team-edit-name-error",
|
|
128
|
+
children: V.name
|
|
223
129
|
})
|
|
224
130
|
]
|
|
131
|
+
}), /* @__PURE__ */ b(n, { items: [{
|
|
132
|
+
label: X.editEmailLabel,
|
|
133
|
+
value: T
|
|
134
|
+
}] })] }),
|
|
135
|
+
/* @__PURE__ */ b(h, {
|
|
136
|
+
id: "team-edit-department",
|
|
137
|
+
label: X.inviteDepartmentLabel,
|
|
138
|
+
value: A.department,
|
|
139
|
+
options: te,
|
|
140
|
+
placeholder: X.inviteDepartmentPlaceholder,
|
|
141
|
+
emptyMessage: X.inviteDepartmentEmpty,
|
|
142
|
+
loadingMessage: X.inviteOptionsLoading,
|
|
143
|
+
noneLabel: X.inviteOptionNone,
|
|
144
|
+
disabled: K,
|
|
145
|
+
readOnly: K && !U,
|
|
146
|
+
isLoading: ie,
|
|
147
|
+
isError: M,
|
|
148
|
+
errorMessage: X.inviteDepartmentLoadError,
|
|
149
|
+
errorHelper: X.inviteDepartmentLoadErrorHelper,
|
|
150
|
+
emptyHelper: X.inviteDepartmentEmptyHelper,
|
|
151
|
+
onValueChange: (e) => Y({
|
|
152
|
+
...A,
|
|
153
|
+
department: e
|
|
154
|
+
})
|
|
225
155
|
}),
|
|
226
|
-
/* @__PURE__ */
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
}), /* @__PURE__ */ E(F, {
|
|
247
|
-
id: "team-invite-location",
|
|
248
|
-
label: B.inviteLocationLabel,
|
|
249
|
-
value: t.location,
|
|
250
|
-
options: i,
|
|
251
|
-
placeholder: B.inviteLocationPlaceholder,
|
|
252
|
-
emptyMessage: B.inviteLocationEmpty,
|
|
253
|
-
loadingMessage: B.inviteOptionsLoading,
|
|
254
|
-
noneLabel: B.inviteOptionNone,
|
|
255
|
-
isLoading: u,
|
|
256
|
-
isError: p,
|
|
257
|
-
errorMessage: B.inviteLocationLoadError,
|
|
258
|
-
errorHelper: B.inviteLocationLoadErrorHelper,
|
|
259
|
-
emptyHelper: B.inviteLocationEmptyHelper,
|
|
260
|
-
onValueChange: (e) => P({
|
|
261
|
-
...t,
|
|
262
|
-
location: e
|
|
263
|
-
})
|
|
264
|
-
})]
|
|
156
|
+
/* @__PURE__ */ b(h, {
|
|
157
|
+
id: "team-edit-location",
|
|
158
|
+
label: X.inviteLocationLabel,
|
|
159
|
+
value: A.location,
|
|
160
|
+
options: ne,
|
|
161
|
+
placeholder: X.inviteLocationPlaceholder,
|
|
162
|
+
emptyMessage: X.inviteLocationEmpty,
|
|
163
|
+
loadingMessage: X.inviteOptionsLoading,
|
|
164
|
+
noneLabel: X.inviteOptionNone,
|
|
165
|
+
disabled: K,
|
|
166
|
+
readOnly: K && !U,
|
|
167
|
+
isLoading: ae,
|
|
168
|
+
isError: N,
|
|
169
|
+
errorMessage: X.inviteLocationLoadError,
|
|
170
|
+
errorHelper: X.inviteLocationLoadErrorHelper,
|
|
171
|
+
emptyHelper: X.inviteLocationEmptyHelper,
|
|
172
|
+
onValueChange: (e) => Y({
|
|
173
|
+
...A,
|
|
174
|
+
location: e
|
|
175
|
+
})
|
|
265
176
|
}),
|
|
266
|
-
/* @__PURE__ */
|
|
267
|
-
id: "team-
|
|
268
|
-
label:
|
|
269
|
-
value:
|
|
270
|
-
options:
|
|
271
|
-
placeholder:
|
|
272
|
-
emptyMessage:
|
|
273
|
-
loadingMessage:
|
|
274
|
-
noneLabel:
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
177
|
+
/* @__PURE__ */ b(h, {
|
|
178
|
+
id: "team-edit-reporting-manager",
|
|
179
|
+
label: X.inviteReportingManagerLabel,
|
|
180
|
+
value: A.reportingManager,
|
|
181
|
+
options: re,
|
|
182
|
+
placeholder: X.inviteReportingManagerPlaceholder,
|
|
183
|
+
emptyMessage: X.inviteReportingManagerEmpty,
|
|
184
|
+
loadingMessage: X.inviteOptionsLoading,
|
|
185
|
+
noneLabel: X.inviteOptionNone,
|
|
186
|
+
disabled: q,
|
|
187
|
+
readOnly: q && !U,
|
|
188
|
+
isLoading: oe,
|
|
189
|
+
isError: P,
|
|
190
|
+
errorMessage: X.inviteReportingManagerLoadError,
|
|
191
|
+
errorHelper: X.inviteReportingManagerLoadErrorHelper,
|
|
192
|
+
emptyHelper: X.inviteReportingManagerEmptyHelper,
|
|
193
|
+
readyHelper: X.inviteReportingManagerHelper,
|
|
281
194
|
searchable: !0,
|
|
282
|
-
searchPlaceholder:
|
|
283
|
-
noResultsLabel:
|
|
284
|
-
onValueChange: (e) =>
|
|
285
|
-
...
|
|
195
|
+
searchPlaceholder: X.inviteReportingManagerSearchPlaceholder,
|
|
196
|
+
noResultsLabel: X.inviteReportingManagerNoResults,
|
|
197
|
+
onValueChange: (e) => Y({
|
|
198
|
+
...A,
|
|
286
199
|
reportingManager: e
|
|
287
200
|
})
|
|
288
201
|
})
|
|
289
202
|
]
|
|
290
203
|
}),
|
|
291
|
-
/* @__PURE__ */
|
|
292
|
-
className: "ttw:space-y-
|
|
204
|
+
/* @__PURE__ */ x("div", {
|
|
205
|
+
className: "ttw:space-y-2",
|
|
293
206
|
children: [
|
|
294
|
-
/* @__PURE__ */
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
207
|
+
/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ x(a, {
|
|
208
|
+
variant: "component",
|
|
209
|
+
level: 4,
|
|
210
|
+
id: "team-edit-role-heading",
|
|
211
|
+
children: [
|
|
212
|
+
X.inviteRoleSectionHeading,
|
|
213
|
+
" ",
|
|
214
|
+
!G && /* @__PURE__ */ b("span", {
|
|
215
|
+
"aria-hidden": "true",
|
|
216
|
+
children: "*"
|
|
217
|
+
})
|
|
218
|
+
]
|
|
219
|
+
}), /* @__PURE__ */ b("p", {
|
|
220
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
|
|
221
|
+
children: X.inviteRoleSectionDescription
|
|
222
|
+
})] }),
|
|
223
|
+
G && !U && (E || j.some((e) => e.value === A.role)) ? /* @__PURE__ */ b(n, { items: [{
|
|
224
|
+
label: X.inviteRoleSectionHeading,
|
|
225
|
+
value: E ?? j.find((e) => e.value === A.role)?.label
|
|
226
|
+
}] }) : /* @__PURE__ */ b(m, {
|
|
227
|
+
idPrefix: "team-edit-role",
|
|
228
|
+
options: j,
|
|
229
|
+
value: A.role,
|
|
230
|
+
disabled: G,
|
|
231
|
+
onValueChange: (e) => Y({
|
|
232
|
+
...A,
|
|
233
|
+
role: e
|
|
234
|
+
}),
|
|
235
|
+
ariaLabelledBy: "team-edit-role-heading",
|
|
236
|
+
required: !G,
|
|
237
|
+
ariaInvalid: !!V?.role,
|
|
238
|
+
ariaDescribedBy: V?.role ? "team-edit-role-error" : void 0
|
|
317
239
|
}),
|
|
318
|
-
|
|
319
|
-
id: "team-
|
|
320
|
-
|
|
240
|
+
V?.role && /* @__PURE__ */ b(r, {
|
|
241
|
+
id: "team-edit-role-error",
|
|
242
|
+
children: V.role
|
|
321
243
|
})
|
|
322
244
|
]
|
|
323
245
|
}),
|
|
324
|
-
|
|
246
|
+
F === "employee" && /* @__PURE__ */ x("div", {
|
|
325
247
|
className: "ttw:space-y-2",
|
|
326
|
-
children: [/* @__PURE__ */
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
children:
|
|
330
|
-
}), /* @__PURE__ */
|
|
331
|
-
className: "ttw:text-sm ttw:text-muted-foreground",
|
|
332
|
-
children:
|
|
333
|
-
})]
|
|
248
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(a, {
|
|
249
|
+
variant: "component",
|
|
250
|
+
level: 4,
|
|
251
|
+
children: X.inviteAccountAccessSectionHeading
|
|
252
|
+
}), /* @__PURE__ */ b("p", {
|
|
253
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
|
|
254
|
+
children: X.manageAccessEmployeeNote
|
|
255
|
+
})] }), R ? /* @__PURE__ */ b(u, {
|
|
256
|
+
isLoading: !0,
|
|
257
|
+
loadingLabel: X.manageAccessLoadingLabel,
|
|
258
|
+
children: /* @__PURE__ */ b(c, {
|
|
259
|
+
"aria-hidden": !0,
|
|
260
|
+
className: "ttw:h-12 ttw:w-full"
|
|
261
|
+
})
|
|
262
|
+
}) : z ? /* @__PURE__ */ b(l, {
|
|
263
|
+
title: z,
|
|
264
|
+
retryLabel: X.accountAccessRetry,
|
|
265
|
+
onRetry: B
|
|
266
|
+
}) : null]
|
|
334
267
|
}),
|
|
335
|
-
(
|
|
268
|
+
(F === "picker" || F === "admin") && /* @__PURE__ */ x("div", {
|
|
336
269
|
className: "ttw:space-y-2",
|
|
337
|
-
children: [
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
}) : /* @__PURE__ */ E(v, {
|
|
351
|
-
rows: H,
|
|
352
|
-
onToggle: (e, n) => {
|
|
353
|
-
P({
|
|
354
|
-
...t,
|
|
355
|
-
accountAccess: n ? [...t.accountAccess, e] : t.accountAccess.filter((t) => t !== e)
|
|
356
|
-
});
|
|
357
|
-
},
|
|
358
|
-
disabled: S === "admin",
|
|
359
|
-
note: S === "admin" ? B.inviteAccountAccessAdminNote : void 0,
|
|
360
|
-
emptyMessage: B.inviteAccountAccessEmpty,
|
|
361
|
-
labels: {
|
|
362
|
-
accountNameColumn: B.accountAccessNameColumn,
|
|
363
|
-
accessColumn: B.accountAccessAccessColumn,
|
|
364
|
-
toggleAriaLabel: B.accountAccessToggleLabel
|
|
365
|
-
}
|
|
270
|
+
children: [/* @__PURE__ */ x("div", { children: [/* @__PURE__ */ b(a, {
|
|
271
|
+
variant: "component",
|
|
272
|
+
level: 4,
|
|
273
|
+
children: X.inviteAccountAccessSectionHeading
|
|
274
|
+
}), /* @__PURE__ */ b("p", {
|
|
275
|
+
className: "ttw:mt-1 ttw:text-sm ttw:text-muted-foreground",
|
|
276
|
+
children: X.inviteAccountAccessSectionDescription
|
|
277
|
+
})] }), R ? /* @__PURE__ */ b(u, {
|
|
278
|
+
isLoading: !0,
|
|
279
|
+
loadingLabel: X.manageAccessLoadingLabel,
|
|
280
|
+
children: /* @__PURE__ */ b(c, {
|
|
281
|
+
"aria-hidden": !0,
|
|
282
|
+
className: "ttw:h-12 ttw:w-full"
|
|
366
283
|
})
|
|
367
|
-
|
|
284
|
+
}) : z ? /* @__PURE__ */ b(l, {
|
|
285
|
+
title: z,
|
|
286
|
+
retryLabel: X.accountAccessRetry,
|
|
287
|
+
onRetry: B
|
|
288
|
+
}) : /* @__PURE__ */ b(f, {
|
|
289
|
+
rows: I,
|
|
290
|
+
onToggle: (e, t) => L?.(e, t),
|
|
291
|
+
disabled: U || F === "admin",
|
|
292
|
+
note: F === "admin" ? X.manageAccessAdminNote : void 0,
|
|
293
|
+
emptyMessage: X.manageAccessAccountsEmpty,
|
|
294
|
+
labels: {
|
|
295
|
+
accountNameColumn: X.accountAccessNameColumn,
|
|
296
|
+
accessColumn: X.accountAccessAccessColumn,
|
|
297
|
+
toggleAriaLabel: X.accountAccessToggleLabel
|
|
298
|
+
}
|
|
299
|
+
})]
|
|
368
300
|
}),
|
|
369
|
-
|
|
370
|
-
/* @__PURE__ */
|
|
301
|
+
H && /* @__PURE__ */ b(d, { children: H }),
|
|
302
|
+
/* @__PURE__ */ x("div", {
|
|
371
303
|
className: "ttw:flex ttw:justify-end ttw:gap-2",
|
|
372
|
-
children: [/* @__PURE__ */
|
|
304
|
+
children: [/* @__PURE__ */ b(t, {
|
|
373
305
|
type: "button",
|
|
374
306
|
variant: "ghost",
|
|
375
|
-
onClick:
|
|
376
|
-
children:
|
|
377
|
-
}), /* @__PURE__ */
|
|
307
|
+
onClick: () => J(!1),
|
|
308
|
+
children: X.editCancelButton
|
|
309
|
+
}), /* @__PURE__ */ b(t, {
|
|
378
310
|
type: "submit",
|
|
379
|
-
loading:
|
|
380
|
-
disabled:
|
|
381
|
-
children:
|
|
382
|
-
"aria-hidden": !0,
|
|
383
|
-
className: "ttw:size-4"
|
|
384
|
-
})]
|
|
311
|
+
loading: U,
|
|
312
|
+
disabled: se,
|
|
313
|
+
children: X.editSaveButton
|
|
385
314
|
})]
|
|
386
315
|
})
|
|
387
316
|
]
|
|
388
317
|
})
|
|
389
318
|
})
|
|
390
319
|
]
|
|
391
|
-
});
|
|
320
|
+
}) : null;
|
|
392
321
|
}
|
|
393
|
-
export {
|
|
322
|
+
export { C as EditTeamMemberPanel, C as default };
|