@tesouro/embedded-components-react 0.11.206 → 0.11.211
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +13 -126
- package/dist/index.d.ts +6 -5
- package/dist/lib/ReceivablesWidget.d.ts +6 -5
- package/dist/lib/WidgetSuite.d.ts +6 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableAttachmentsSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivableCustomerSection.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +16 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/details.js +186 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +59 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentRecord.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurrence.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/recurringSeries.js +19 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/reminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/statusColors.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +2 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +16 -16
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +28 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index11.js +18 -120
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index12.js +89 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +91 -36
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +41 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index17.js +9 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index18.js +26 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index19.js +209 -52
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +50 -208
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index21.js +186 -138
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index22.js +157 -12
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index23.js +10 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index24.js +23 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index25.js +2 -116
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index26.js +117 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index27.js +3 -198
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index28.js +198 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index29.js +2 -54
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index30.js +14 -19
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index31.js +22 -8
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index32.js +40 -77
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index33.js +17 -37
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index34.js +8 -18
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index35.js +61 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index36.js +27 -27
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index37.js +26 -15
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index39.js +19 -35
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +31 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +67 -24
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +391 -84
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +2 -494
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +62 -38
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +433 -61
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +176 -428
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +20 -224
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +6 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +264 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +2 -264
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +131 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index54.js +22 -126
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index55.js +235 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index56.js +3 -239
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index57.js +247 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index58.js +26 -244
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index59.js +183 -26
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index60.js +21 -194
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index61.js +143 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js +2 -143
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +47 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +127 -144
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index3.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index16.js +107 -111
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/document-status/ui/dist/index7.js +2 -31
- 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/product-catalog/feature/dist/lib/helpers.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +1554 -1544
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index64.js +0 -47
|
@@ -1,143 +1,2 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { ErrorState as o } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
|
-
import { NoAccessState as s } from "../../../shared/ui/dist/lib/StatePanel/NoAccessState.js";
|
|
5
|
-
import "../../../shared/ui/dist/index.js";
|
|
6
|
-
import { TabRowAction as c } from "./index8.js";
|
|
7
|
-
import { RECURRING_SERIES_SCREEN_LABELS_EN as l } from "./index61.js";
|
|
8
|
-
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
9
|
-
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index62.js
|
|
10
|
-
var f = [
|
|
11
|
-
10,
|
|
12
|
-
25,
|
|
13
|
-
50,
|
|
14
|
-
100
|
|
15
|
-
], p = [];
|
|
16
|
-
function m({ row: e }) {
|
|
17
|
-
return e.customerState === "resolving" ? /* @__PURE__ */ u(r, { className: "ttw:h-4 ttw:w-full" }) : e.customerState === "missing" ? /* @__PURE__ */ u("span", {
|
|
18
|
-
className: "ttw:opacity-40",
|
|
19
|
-
children: e.customerLabel
|
|
20
|
-
}) : /* @__PURE__ */ u("span", { children: e.customerLabel });
|
|
21
|
-
}
|
|
22
|
-
function h({ row: e }) {
|
|
23
|
-
return /* @__PURE__ */ u("span", {
|
|
24
|
-
className: i(e.nextInvoiceMuted && "ttw:text-muted-foreground"),
|
|
25
|
-
children: e.nextInvoiceLabel
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
function g({ row: t }) {
|
|
29
|
-
return t.status.kind === "loading" ? /* @__PURE__ */ u(r, { className: "ttw:h-4 ttw:w-full" }) : t.status.kind === "blank" ? null : /* @__PURE__ */ u(e, {
|
|
30
|
-
tone: t.status.tone,
|
|
31
|
-
children: t.status.label
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
function _({ rows: e, isLoading: r, isError: i, isAccessRestricted: _, sorting: v, onSortingChange: y, pageSize: b, onPageSizeChange: x, pageSizeOptions: S = f, hasNextPage: C, hasPrevPage: w, onNextPage: T, onPrevPage: E, filterBar: D, isFiltering: O, onClearFilters: k, onCreateClick: A, headerActionContainer: j, onRowClick: M, onRetry: N, labels: P }) {
|
|
35
|
-
let F = {
|
|
36
|
-
...l,
|
|
37
|
-
...P
|
|
38
|
-
}, I = [
|
|
39
|
-
{
|
|
40
|
-
accessorKey: "customerLabel",
|
|
41
|
-
header: F.columnCustomer,
|
|
42
|
-
cell: ({ row: e }) => /* @__PURE__ */ u(m, { row: e.original }),
|
|
43
|
-
minSize: 180
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
accessorKey: "repeatsLabel",
|
|
47
|
-
header: F.columnRepeats
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
accessorKey: "nextInvoiceLabel",
|
|
51
|
-
header: F.columnNextInvoice,
|
|
52
|
-
cell: ({ row: e }) => /* @__PURE__ */ u(h, { row: e.original })
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
id: "status",
|
|
56
|
-
header: F.columnStatus,
|
|
57
|
-
cell: ({ row: e }) => /* @__PURE__ */ u(g, { row: e.original })
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
accessorKey: "amountLabel",
|
|
61
|
-
enableSorting: !0,
|
|
62
|
-
header: ({ column: e }) => /* @__PURE__ */ u("div", {
|
|
63
|
-
className: "ttw:flex ttw:justify-end",
|
|
64
|
-
children: /* @__PURE__ */ u(n, {
|
|
65
|
-
column: e,
|
|
66
|
-
title: F.columnAmount
|
|
67
|
-
})
|
|
68
|
-
}),
|
|
69
|
-
cell: ({ row: e }) => /* @__PURE__ */ u("div", {
|
|
70
|
-
className: "ttw:text-right ttw:tabular-nums",
|
|
71
|
-
children: e.original.amountLabel
|
|
72
|
-
})
|
|
73
|
-
}
|
|
74
|
-
], L = (e) => /* @__PURE__ */ d("div", {
|
|
75
|
-
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
76
|
-
children: [
|
|
77
|
-
/* @__PURE__ */ d("div", {
|
|
78
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
79
|
-
children: [/* @__PURE__ */ u("span", {
|
|
80
|
-
className: "ttw:min-w-0 ttw:flex-1 ttw:font-medium",
|
|
81
|
-
children: /* @__PURE__ */ u(m, { row: e })
|
|
82
|
-
}), /* @__PURE__ */ u("span", {
|
|
83
|
-
className: "ttw:tabular-nums",
|
|
84
|
-
children: e.amountLabel
|
|
85
|
-
})]
|
|
86
|
-
}),
|
|
87
|
-
[{
|
|
88
|
-
label: F.columnRepeats,
|
|
89
|
-
value: e.repeatsLabel
|
|
90
|
-
}, {
|
|
91
|
-
label: F.columnNextInvoice,
|
|
92
|
-
value: /* @__PURE__ */ u(h, { row: e })
|
|
93
|
-
}].map((e) => /* @__PURE__ */ d("div", {
|
|
94
|
-
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4",
|
|
95
|
-
children: [/* @__PURE__ */ u("span", {
|
|
96
|
-
className: "ttw:text-muted-foreground",
|
|
97
|
-
children: e.label
|
|
98
|
-
}), /* @__PURE__ */ u("span", { children: e.value })]
|
|
99
|
-
}, e.label)),
|
|
100
|
-
/* @__PURE__ */ u("div", { children: /* @__PURE__ */ u(g, { row: e }) })
|
|
101
|
-
]
|
|
102
|
-
}), R = !_ && !i && !O && e.length === 0;
|
|
103
|
-
return /* @__PURE__ */ d("div", {
|
|
104
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
105
|
-
children: [A && !R && /* @__PURE__ */ u(c, {
|
|
106
|
-
container: j,
|
|
107
|
-
label: F.createButton,
|
|
108
|
-
onClick: A
|
|
109
|
-
}), _ ? /* @__PURE__ */ u(s, {
|
|
110
|
-
title: F.accessRestrictedTitle,
|
|
111
|
-
description: F.accessRestrictedDescription
|
|
112
|
-
}) : /* @__PURE__ */ u(t, {
|
|
113
|
-
columns: I,
|
|
114
|
-
data: i ? p : e,
|
|
115
|
-
isLoading: r,
|
|
116
|
-
sorting: v,
|
|
117
|
-
onSortingChange: y,
|
|
118
|
-
pageSize: b,
|
|
119
|
-
onPageSizeChange: x,
|
|
120
|
-
pageSizeOptions: S,
|
|
121
|
-
hasNextPage: !i && C,
|
|
122
|
-
hasPrevPage: !i && w,
|
|
123
|
-
onNextPage: T,
|
|
124
|
-
onPrevPage: E,
|
|
125
|
-
onRowClick: M,
|
|
126
|
-
rowAriaLabel: (e) => F.openRow(e.customerLabel),
|
|
127
|
-
filterComponent: D,
|
|
128
|
-
renderCard: L,
|
|
129
|
-
children: i ? /* @__PURE__ */ u(o, {
|
|
130
|
-
title: F.errorTitle,
|
|
131
|
-
description: F.errorDescription,
|
|
132
|
-
retryLabel: N ? F.errorRetry : void 0,
|
|
133
|
-
onRetry: N
|
|
134
|
-
}) : /* @__PURE__ */ u(a, {
|
|
135
|
-
title: O ? F.filterEmptyTitle : F.emptyTitle,
|
|
136
|
-
description: O ? void 0 : F.emptyDescription,
|
|
137
|
-
actionLabel: O ? F.filterEmptyAction : F.createButton,
|
|
138
|
-
onAction: O ? k : A
|
|
139
|
-
})
|
|
140
|
-
})]
|
|
141
|
-
});
|
|
142
|
-
}
|
|
143
|
-
export { _ as RecurringSeriesScreen, _ as default };
|
|
1
|
+
import "./index60.js";
|
|
2
|
+
import "./index61.js";
|
|
@@ -1,2 +1,47 @@
|
|
|
1
|
-
import "
|
|
2
|
-
import "./
|
|
1
|
+
import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { UNSAVED_INVOICE_DIALOG_LABELS_EN as s } from "./index19.js";
|
|
3
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
+
import { XIcon as u } from "lucide-react";
|
|
5
|
+
// ../../libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index63.js
|
|
6
|
+
function d({ open: d, onSaveDraft: f, onDiscard: p, onCancel: m, isSaving: h, isSaveDraftDisabled: g, labels: _ }) {
|
|
7
|
+
let v = {
|
|
8
|
+
...s,
|
|
9
|
+
..._
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ c(e, {
|
|
12
|
+
open: d,
|
|
13
|
+
onOpenChange: (e) => {
|
|
14
|
+
!e && !h && m();
|
|
15
|
+
},
|
|
16
|
+
children: /* @__PURE__ */ l(t, {
|
|
17
|
+
showCloseButton: !1,
|
|
18
|
+
children: [
|
|
19
|
+
/* @__PURE__ */ l("button", {
|
|
20
|
+
type: "button",
|
|
21
|
+
onClick: m,
|
|
22
|
+
disabled: h,
|
|
23
|
+
className: "ttw:absolute ttw:right-4 ttw:top-4 ttw:cursor-pointer ttw:rounded-sm ttw:opacity-70 ttw:ring-offset-background ttw:transition-opacity ttw:hover:opacity-100 ttw:focus:outline-hidden ttw:focus:ring-2 ttw:focus:ring-ring ttw:focus:ring-offset-2 ttw:disabled:pointer-events-none",
|
|
24
|
+
children: [/* @__PURE__ */ c(u, { className: "ttw:size-4" }), /* @__PURE__ */ c("span", {
|
|
25
|
+
className: "ttw:sr-only",
|
|
26
|
+
children: v.unsavedCloseButton
|
|
27
|
+
})]
|
|
28
|
+
}),
|
|
29
|
+
/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: v.unsavedTitle }), /* @__PURE__ */ c(n, { children: v.unsavedDescription })] }),
|
|
30
|
+
/* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
31
|
+
type: "button",
|
|
32
|
+
variant: "outline",
|
|
33
|
+
onClick: p,
|
|
34
|
+
disabled: h,
|
|
35
|
+
children: v.unsavedDiscardButton
|
|
36
|
+
}), /* @__PURE__ */ c(o, {
|
|
37
|
+
type: "button",
|
|
38
|
+
loading: h,
|
|
39
|
+
disabled: h || g,
|
|
40
|
+
onClick: f,
|
|
41
|
+
children: v.unsavedSaveDraftButton
|
|
42
|
+
})] })
|
|
43
|
+
]
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { d as UnsavedInvoiceDialog, d as default };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js
CHANGED
|
@@ -14,64 +14,63 @@ import { useResendInviteMutation as a } from "../../data-access/dist/index8.js";
|
|
|
14
14
|
import "../../data-access/dist/index.js";
|
|
15
15
|
import { isMemberActionable as o, isMemberInvited as s } from "./index11.js";
|
|
16
16
|
import { resolveAcceptInviteRedirectUri as c } from "./index8.js";
|
|
17
|
-
import { useEffect as l,
|
|
17
|
+
import { useEffect as l, useRef as u, useState as d } from "react";
|
|
18
18
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js
|
|
19
|
-
function
|
|
20
|
-
let [
|
|
19
|
+
function f({ members: e, canPerform: t, onOpen: n }) {
|
|
20
|
+
let [r, i] = d(), a = r ? e.find((e) => e.id === r) : void 0, s = a && o(a) ? a : void 0, c = !!r && !s;
|
|
21
21
|
return l(() => {
|
|
22
|
-
|
|
23
|
-
}, [
|
|
24
|
-
member:
|
|
22
|
+
c && i(void 0);
|
|
23
|
+
}, [c]), {
|
|
24
|
+
member: s,
|
|
25
25
|
open: (r) => {
|
|
26
|
-
t && e.some((e) => e.id === r) && (n(),
|
|
26
|
+
t && e.some((e) => e.id === r) && (n(), i(r));
|
|
27
27
|
},
|
|
28
28
|
onOpenChange: (e) => {
|
|
29
|
-
e ||
|
|
29
|
+
e || i(void 0);
|
|
30
30
|
},
|
|
31
|
-
close: () =>
|
|
31
|
+
close: () => i(void 0)
|
|
32
32
|
};
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
let
|
|
36
|
-
members:
|
|
37
|
-
canPerform: o,
|
|
38
|
-
onOpen: () => h.reset()
|
|
39
|
-
}), v = () => {
|
|
40
|
-
if (!o || !_.member) return;
|
|
41
|
-
let e = _.member.id;
|
|
42
|
-
h.mutate({ path: { userId: e } }, { onSuccess: () => {
|
|
43
|
-
m(r.MemberDeactivated, { memberId: e }), _.close();
|
|
44
|
-
} });
|
|
45
|
-
}, y = d({
|
|
46
|
-
members: u,
|
|
34
|
+
function p({ canDeactivate: l, canResendInvite: d, members: p, featureLabels: m, acceptInviteRedirectUri: h }) {
|
|
35
|
+
let g = n(), _ = i(), v = a(), y = f({
|
|
36
|
+
members: p,
|
|
47
37
|
canPerform: l,
|
|
48
|
-
onOpen: () =>
|
|
49
|
-
|
|
50
|
-
|
|
38
|
+
onOpen: () => _.reset()
|
|
39
|
+
}), b = () => {
|
|
40
|
+
if (!l || !y.member) return;
|
|
41
|
+
let e = y.member.id;
|
|
42
|
+
_.mutate({ path: { userId: e } }, { onSuccess: () => {
|
|
43
|
+
g(r.MemberDeactivated, { memberId: e }), y.close();
|
|
44
|
+
} });
|
|
45
|
+
}, x = u(!1);
|
|
51
46
|
return {
|
|
52
|
-
isDeactivateOpen: !!
|
|
53
|
-
deactivateMemberName:
|
|
54
|
-
deactivateMemberEmail:
|
|
55
|
-
isDeactivating:
|
|
56
|
-
deactivateErrorMessage:
|
|
57
|
-
openDeactivateConfirmation:
|
|
58
|
-
onDeactivateOpenChange:
|
|
59
|
-
onDeactivateConfirm:
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
47
|
+
isDeactivateOpen: !!y.member,
|
|
48
|
+
deactivateMemberName: y.member?.name ?? "",
|
|
49
|
+
deactivateMemberEmail: y.member?.email ?? "",
|
|
50
|
+
isDeactivating: _.isPending,
|
|
51
|
+
deactivateErrorMessage: _.isError ? t(_.error) ? m.deactivateRejectedError : m.deactivateFailedError : void 0,
|
|
52
|
+
openDeactivateConfirmation: y.open,
|
|
53
|
+
onDeactivateOpenChange: y.onOpenChange,
|
|
54
|
+
onDeactivateConfirm: b,
|
|
55
|
+
isResending: v.isPending,
|
|
56
|
+
resendInvite: (t) => {
|
|
57
|
+
if (!d || x.current) return;
|
|
58
|
+
let n = p.find((e) => e.id === t);
|
|
59
|
+
n && o(n) && s(n) && (x.current = !0, v.mutate({
|
|
60
|
+
userId: n.id,
|
|
61
|
+
redirectUri: c(h)
|
|
62
|
+
}, {
|
|
63
|
+
onSuccess: () => {
|
|
64
|
+
e.success(m.resendSuccessToast);
|
|
65
|
+
},
|
|
66
|
+
onError: () => {
|
|
67
|
+
e.error(m.resendFailedError);
|
|
68
|
+
},
|
|
69
|
+
onSettled: () => {
|
|
70
|
+
x.current = !1;
|
|
71
|
+
}
|
|
72
|
+
}));
|
|
74
73
|
}
|
|
75
74
|
};
|
|
76
75
|
}
|
|
77
|
-
export {
|
|
76
|
+
export { p as useTeamActions };
|