@tesouro/embedded-components-react 0.11.100 → 0.11.102
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/experimental/QuickViewWidget.d.ts +62 -2
- package/dist/experimental/index.d.ts +62 -2
- package/dist/index.css +21 -17
- package/dist/index.d.ts +10 -6
- package/dist/lib/CardDetailsWidget.d.ts +6 -4
- package/dist/lib/CreditCardsWidget.d.ts +6 -4
- package/dist/lib/DebitCardsWidget.d.ts +6 -4
- package/dist/lib/SettingsWidget.d.ts +2 -1
- package/dist/lib/WidgetSuite.d.ts +8 -5
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/CardDetailsPanel.js +199 -168
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/ui/dist/lib/CardDetailsPanel/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +44 -43
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index3.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index6.js +25 -284
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/feature/dist/index7.js +291 -0
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index3.js +28 -17
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index5.js +21 -34
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index6.js +71 -78
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index7.js +71 -77
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/approval-policies/ui/dist/index8.js +43 -49
- package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/ui/dist/index2.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/accounts/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/bills/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/data-access/dist/index2.js +98 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/CardsQuickViewWidgetFeature.js +80 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/labels.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/summarizeCardSpend.js +17 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/testIds.js +7 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/CardsQuickViewWidget/useCardSpendSummary.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/feature/dist/lib/analytics/events.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index2.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/cards/ui/dist/index3.js +31 -0
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/QuickViewWidget.js +57 -44
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/feature/dist/lib/QuickViewWidget/labels.js +6 -3
- package/dist/libs/tesouro-embedded-components-react/quick-view-widget/invoices/ui/dist/index2.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/chart-of-accounts/ui/dist/index3.js +98 -91
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/ExpenseSettingsTabs/ExpenseSettingsTabs.js +24 -21
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/lib/SettingsWidget/SettingsWidget.js +14 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/help/ui/shadcn/dist/index3.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/feature/dist/index10.js +87 -81
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index3.js +63 -44
- package/dist/libs/tesouro-embedded-components-react/settings-widget/invoice-settings/ui/dist/index6.js +9 -6
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index17.js +302 -276
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index.js +10 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js +36 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js +27 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsSectionContent.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js +6 -7
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js +39 -37
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js +39 -35
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index16.js +59 -61
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index6.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index7.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +114 -103
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +43 -43
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/debit-card/useAllDebitCardsQuery.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +97 -97
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +166 -154
- 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/util/dist/index.js +12 -12
- package/dist/packages/shared-ui-shadcn/dist/index.js +18 -15
- package/package.json +1 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import "./index4.js";
|
|
3
|
-
import "./index5.js";
|
|
3
|
+
import { DEFAULT_LABELS as e } from "./index5.js";
|
|
4
4
|
import "./index6.js";
|
|
5
|
-
import { InviteTeamMemberForm as
|
|
6
|
-
import { EditTeamMemberPanel as
|
|
5
|
+
import { InviteTeamMemberForm as t } from "./index7.js";
|
|
6
|
+
import { EditTeamMemberPanel as n } from "./index8.js";
|
|
7
7
|
import "./index9.js";
|
|
8
|
-
import { GroupAdminDrawer as
|
|
8
|
+
import { GroupAdminDrawer as r } from "./index10.js";
|
|
9
9
|
import "./index11.js";
|
|
10
|
-
import { GroupAdminPanel as
|
|
11
|
-
import { TeamActionDialog as
|
|
12
|
-
import { TeamMembersTable as
|
|
13
|
-
import { TeamMemberDetails as
|
|
14
|
-
import { TeamTabs as
|
|
15
|
-
export {
|
|
10
|
+
import { GroupAdminPanel as i } from "./index12.js";
|
|
11
|
+
import { TeamActionDialog as a } from "./index13.js";
|
|
12
|
+
import { TeamMembersTable as o } from "./index15.js";
|
|
13
|
+
import { TeamMemberDetails as s } from "./index16.js";
|
|
14
|
+
import { TeamTabs as c } from "./index17.js";
|
|
15
|
+
export { e as DEFAULT_LABELS, n as EditTeamMemberPanel, r as GroupAdminDrawer, i as GroupAdminPanel, t as InviteTeamMemberForm, a as TeamActionDialog, s as TeamMemberDetails, o as TeamMembersTable, c as TeamTabs };
|
|
@@ -10,39 +10,39 @@ import { DEFAULT_GROUP_ADMIN_PANEL_LABELS as g } from "./index11.js";
|
|
|
10
10
|
import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
|
|
11
11
|
import { MoreVertical as b, Pencil as x, Trash2 as S } from "lucide-react";
|
|
12
12
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index12.js
|
|
13
|
-
function C({
|
|
14
|
-
let
|
|
13
|
+
function C({ showHeader: C = !0, rows: w, isLoading: T = !1, isError: E = !1, onAddClick: D, labels: O }) {
|
|
14
|
+
let k = {
|
|
15
15
|
...g,
|
|
16
|
-
...
|
|
17
|
-
},
|
|
16
|
+
...O
|
|
17
|
+
}, A = (t) => t.onEdit || t.onDelete ? /* @__PURE__ */ y(i, { children: [/* @__PURE__ */ v(f, { children: /* @__PURE__ */ y(u, { children: [/* @__PURE__ */ v(p, {
|
|
18
18
|
asChild: !0,
|
|
19
19
|
children: /* @__PURE__ */ v(c, {
|
|
20
20
|
asChild: !0,
|
|
21
21
|
children: /* @__PURE__ */ v(e, {
|
|
22
22
|
variant: "ghost",
|
|
23
23
|
size: "icon-sm",
|
|
24
|
-
"aria-label": `${
|
|
24
|
+
"aria-label": `${k.rowActionsAriaLabel} ${t.name}`,
|
|
25
25
|
children: /* @__PURE__ */ v(b, { className: "ttw:size-4" })
|
|
26
26
|
})
|
|
27
27
|
})
|
|
28
|
-
}), /* @__PURE__ */ v(d, { children: `${
|
|
28
|
+
}), /* @__PURE__ */ v(d, { children: `${k.rowActionsAriaLabel} ${t.name}` })] }) }), /* @__PURE__ */ y(a, {
|
|
29
29
|
align: "end",
|
|
30
30
|
children: [
|
|
31
31
|
t.onEdit && /* @__PURE__ */ y(o, {
|
|
32
32
|
onClick: t.onEdit,
|
|
33
|
-
children: [/* @__PURE__ */ v(x, { className: "ttw:size-4" }),
|
|
33
|
+
children: [/* @__PURE__ */ v(x, { className: "ttw:size-4" }), k.editAction]
|
|
34
34
|
}),
|
|
35
35
|
t.onEdit && t.onDelete && /* @__PURE__ */ v(s, {}),
|
|
36
36
|
t.onDelete && /* @__PURE__ */ y(o, {
|
|
37
37
|
variant: "destructive",
|
|
38
38
|
onClick: t.onDelete,
|
|
39
|
-
children: [/* @__PURE__ */ v(S, { className: "ttw:size-4" }),
|
|
39
|
+
children: [/* @__PURE__ */ v(S, { className: "ttw:size-4" }), k.deleteAction]
|
|
40
40
|
})
|
|
41
41
|
]
|
|
42
|
-
})] }) : null,
|
|
42
|
+
})] }) : null, j = [
|
|
43
43
|
{
|
|
44
44
|
id: "name",
|
|
45
|
-
header:
|
|
45
|
+
header: k.nameColumn,
|
|
46
46
|
cell: ({ row: e }) => /* @__PURE__ */ v("span", {
|
|
47
47
|
className: "ttw:block ttw:max-w-50 ttw:truncate",
|
|
48
48
|
title: e.original.name,
|
|
@@ -51,59 +51,59 @@ function C({ rows: C, isLoading: w = !1, isError: T = !1, onAddClick: E, labels:
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
id: "members",
|
|
54
|
-
header:
|
|
54
|
+
header: k.assignedColumn,
|
|
55
55
|
cell: ({ row: e }) => e.original.membersLabel
|
|
56
56
|
},
|
|
57
57
|
{
|
|
58
58
|
id: "actions",
|
|
59
|
-
header:
|
|
60
|
-
cell: ({ row: e }) =>
|
|
59
|
+
header: k.actionsColumn,
|
|
60
|
+
cell: ({ row: e }) => A(e.original),
|
|
61
61
|
meta: { fitContent: !0 }
|
|
62
62
|
}
|
|
63
63
|
];
|
|
64
64
|
return /* @__PURE__ */ y("section", {
|
|
65
|
-
"aria-label":
|
|
66
|
-
"aria-busy":
|
|
65
|
+
"aria-label": k.title,
|
|
66
|
+
"aria-busy": T || void 0,
|
|
67
67
|
className: "ttw:overflow-hidden ttw:rounded-md",
|
|
68
|
-
children: [/* @__PURE__ */ y("div", {
|
|
68
|
+
children: [C && /* @__PURE__ */ y("div", {
|
|
69
69
|
className: "ttw:flex ttw:items-center ttw:justify-between ttw:gap-4 ttw:border-b ttw:border-border ttw:p-3",
|
|
70
70
|
children: [/* @__PURE__ */ v(l, {
|
|
71
71
|
variant: "section",
|
|
72
|
-
children:
|
|
73
|
-
}),
|
|
72
|
+
children: k.title
|
|
73
|
+
}), D && (w.length > 0 || T || E) && /* @__PURE__ */ v(e, {
|
|
74
74
|
size: "sm",
|
|
75
|
-
disabled:
|
|
76
|
-
onClick:
|
|
77
|
-
children:
|
|
75
|
+
disabled: T,
|
|
76
|
+
onClick: D,
|
|
77
|
+
children: k.addButton
|
|
78
78
|
})]
|
|
79
79
|
}), /* @__PURE__ */ v(r, {
|
|
80
|
-
columns:
|
|
81
|
-
data:
|
|
80
|
+
columns: j,
|
|
81
|
+
data: E ? [] : w,
|
|
82
82
|
sorting: [],
|
|
83
83
|
onSortingChange: () => void 0,
|
|
84
|
-
pageSize: Math.max(
|
|
84
|
+
pageSize: Math.max(w.length, 4),
|
|
85
85
|
pageSizeOptions: [4],
|
|
86
86
|
onPageSizeChange: () => void 0,
|
|
87
87
|
onNextPage: () => void 0,
|
|
88
88
|
onPrevPage: () => void 0,
|
|
89
89
|
showPagination: !1,
|
|
90
|
-
isLoading:
|
|
91
|
-
labels: { loading:
|
|
90
|
+
isLoading: T && !E,
|
|
91
|
+
labels: { loading: k.loadingLabel },
|
|
92
92
|
framed: !1,
|
|
93
93
|
getRowId: (e) => e.key,
|
|
94
94
|
rowContextMenu: (e) => e.onEdit || e.onDelete ? /* @__PURE__ */ y(_, { children: [
|
|
95
95
|
e.onEdit && /* @__PURE__ */ v(t, {
|
|
96
96
|
onClick: e.onEdit,
|
|
97
|
-
children:
|
|
97
|
+
children: k.editAction
|
|
98
98
|
}),
|
|
99
99
|
e.onEdit && e.onDelete && /* @__PURE__ */ v(n, {}),
|
|
100
100
|
e.onDelete && /* @__PURE__ */ v(t, {
|
|
101
101
|
variant: "destructive",
|
|
102
102
|
onClick: e.onDelete,
|
|
103
|
-
children:
|
|
103
|
+
children: k.deleteAction
|
|
104
104
|
})
|
|
105
105
|
] }) : void 0,
|
|
106
|
-
renderCard: !
|
|
106
|
+
renderCard: !E && w.length > 0 ? (e) => /* @__PURE__ */ y("div", {
|
|
107
107
|
className: "ttw:flex ttw:items-start ttw:justify-between ttw:gap-4",
|
|
108
108
|
children: [/* @__PURE__ */ y("div", {
|
|
109
109
|
className: "ttw:flex ttw:min-w-0 ttw:flex-col ttw:gap-1",
|
|
@@ -115,15 +115,15 @@ function C({ rows: C, isLoading: w = !1, isError: T = !1, onAddClick: E, labels:
|
|
|
115
115
|
className: "ttw:text-muted-foreground",
|
|
116
116
|
children: e.membersLabel
|
|
117
117
|
})]
|
|
118
|
-
}),
|
|
118
|
+
}), A(e)]
|
|
119
119
|
}) : void 0,
|
|
120
|
-
children:
|
|
121
|
-
title:
|
|
122
|
-
description:
|
|
120
|
+
children: E ? /* @__PURE__ */ v(h, {
|
|
121
|
+
title: k.errorTitle,
|
|
122
|
+
description: k.errorDescription
|
|
123
123
|
}) : /* @__PURE__ */ v(m, {
|
|
124
|
-
title:
|
|
125
|
-
actionLabel:
|
|
126
|
-
onAction:
|
|
124
|
+
title: k.emptyMessage,
|
|
125
|
+
actionLabel: k.addButton,
|
|
126
|
+
onAction: D
|
|
127
127
|
})
|
|
128
128
|
})]
|
|
129
129
|
});
|
|
@@ -3,20 +3,34 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
6
|
+
import { createPortal as i } from "react-dom";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
8
|
// ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index17.js
|
|
8
|
-
function
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
-
value:
|
|
11
|
-
onValueChange:
|
|
9
|
+
function s({ headerStart: s, headerActionContainer: c, headerAction: l, tabs: u, activeTabId: d, onTabChange: f, children: p }) {
|
|
10
|
+
return /* @__PURE__ */ o(e, {
|
|
11
|
+
value: d,
|
|
12
|
+
onValueChange: f,
|
|
12
13
|
className: "ttw:flex ttw:w-full ttw:flex-col ttw:gap-4",
|
|
13
|
-
children: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
14
|
+
children: [
|
|
15
|
+
c ? i(l, c) : null,
|
|
16
|
+
s ? /* @__PURE__ */ o("header", {
|
|
17
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
|
|
18
|
+
children: [s, c === void 0 ? l : null]
|
|
19
|
+
}) : null,
|
|
20
|
+
/* @__PURE__ */ o("div", {
|
|
21
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-xl ttw:border ttw:border-border ttw:bg-card ttw:p-6",
|
|
22
|
+
children: [/* @__PURE__ */ o("div", {
|
|
23
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
|
|
24
|
+
children: [/* @__PURE__ */ a(n, { children: u.map((e) => /* @__PURE__ */ a(r, {
|
|
25
|
+
value: e.id,
|
|
26
|
+
children: e.label
|
|
27
|
+
}, e.id)) }), s || c !== void 0 ? null : l]
|
|
28
|
+
}), /* @__PURE__ */ a(t, {
|
|
29
|
+
value: d,
|
|
30
|
+
children: p
|
|
31
|
+
})]
|
|
32
|
+
})
|
|
33
|
+
]
|
|
20
34
|
});
|
|
21
35
|
}
|
|
22
|
-
export {
|
|
36
|
+
export { s as TeamTabs, s as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Heading as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
// ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsSectionContent.js
|
|
5
|
+
function i({ section: i }) {
|
|
6
|
+
let [a, o] = t(null), s = typeof i.content == "function";
|
|
7
|
+
return /* @__PURE__ */ r("div", {
|
|
8
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
9
|
+
children: [/* @__PURE__ */ r("header", {
|
|
10
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
|
|
11
|
+
children: [/* @__PURE__ */ n(e, {
|
|
12
|
+
variant: "section",
|
|
13
|
+
level: 2,
|
|
14
|
+
children: i.label
|
|
15
|
+
}), s ? /* @__PURE__ */ n("div", {
|
|
16
|
+
ref: o,
|
|
17
|
+
className: "ttw:ml-auto ttw:shrink-0"
|
|
18
|
+
}) : null]
|
|
19
|
+
}), typeof i.content == "function" ? i.content(a) : i.content]
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
export { i as SettingsSectionContent };
|
|
@@ -3,14 +3,13 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { Tabs as e, TabsContent as t, TabsList as n, TabsTrigger as r } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
-
import {
|
|
7
|
-
import "
|
|
8
|
-
import { DEFAULT_LABELS as a } from "./labels.js";
|
|
6
|
+
import { DEFAULT_LABELS as i } from "./labels.js";
|
|
7
|
+
import { SettingsSectionContent as a } from "./SettingsSectionContent.js";
|
|
9
8
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
10
9
|
// ../../libs/tesouro-embedded-components-react/settings-widget/ui/dist/lib/SettingsWidgetUi/SettingsWidgetUi.js
|
|
11
10
|
function c({ labels: c, sections: l, selectedSectionId: u, onSectionChange: d }) {
|
|
12
11
|
let f = {
|
|
13
|
-
...
|
|
12
|
+
...i,
|
|
14
13
|
...c
|
|
15
14
|
};
|
|
16
15
|
return /* @__PURE__ */ s("section", {
|
|
@@ -41,10 +40,10 @@ function c({ labels: c, sections: l, selectedSectionId: u, onSectionChange: d })
|
|
|
41
40
|
})
|
|
42
41
|
}), /* @__PURE__ */ o("div", {
|
|
43
42
|
"data-slot": "settings-widget-content",
|
|
44
|
-
className: "ttw:min-w-80 ttw:
|
|
45
|
-
children: l.map((e) => /* @__PURE__ */
|
|
43
|
+
className: "ttw:min-w-0 ttw:basis-80 ttw:grow",
|
|
44
|
+
children: l.map((e) => /* @__PURE__ */ o(t, {
|
|
46
45
|
value: e.id,
|
|
47
|
-
children:
|
|
46
|
+
children: /* @__PURE__ */ o(a, { section: e })
|
|
48
47
|
}, e.id))
|
|
49
48
|
})]
|
|
50
49
|
})
|
|
@@ -15,47 +15,49 @@ import { useApprovalPolicyRules as s } from "./useApprovalPolicyRules.js";
|
|
|
15
15
|
import { useMemo as c } from "react";
|
|
16
16
|
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
17
17
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js
|
|
18
|
-
function d({
|
|
19
|
-
let
|
|
18
|
+
function d({ headerStart: d, headerActionContainer: f, labels: p, componentLabels: m, headingComponent: h = "h3", showHeaderTitle: g = !0 } = {}) {
|
|
19
|
+
let _ = c(() => ({
|
|
20
20
|
...n,
|
|
21
|
-
...
|
|
22
|
-
}), [
|
|
23
|
-
labels:
|
|
24
|
-
componentLabels:
|
|
21
|
+
...p
|
|
22
|
+
}), [p]), v = s({
|
|
23
|
+
labels: _,
|
|
24
|
+
componentLabels: m
|
|
25
25
|
});
|
|
26
26
|
return /* @__PURE__ */ u("div", {
|
|
27
27
|
className: "ttw:flex ttw:flex-col ttw:gap-6",
|
|
28
28
|
children: [
|
|
29
29
|
/* @__PURE__ */ l(i, {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
headerStart: d,
|
|
31
|
+
headerActionContainer: f,
|
|
32
|
+
labels: m?.header,
|
|
33
|
+
headingComponent: h,
|
|
34
|
+
showTitle: g,
|
|
35
|
+
onAddRule: v.items.length > 0 && !v.isError ? v.onAddRule : void 0,
|
|
36
|
+
addRuleDisabled: v.isBusy || v.editingId !== null || v.addRuleDisabledReason !== void 0,
|
|
37
|
+
addRuleDisabledReason: v.addRuleDisabledReason,
|
|
36
38
|
testIds: {
|
|
37
39
|
addRuleButton: r.addRuleButton,
|
|
38
40
|
addRuleBlocked: r.addRuleBlocked
|
|
39
41
|
}
|
|
40
42
|
}),
|
|
41
|
-
|
|
42
|
-
title:
|
|
43
|
-
description:
|
|
44
|
-
retryLabel:
|
|
45
|
-
onRetry:
|
|
43
|
+
v.isError ? /* @__PURE__ */ l(t, {
|
|
44
|
+
title: _.loadErrorTitle,
|
|
45
|
+
description: _.loadErrorDescription,
|
|
46
|
+
retryLabel: _.loadErrorRetry,
|
|
47
|
+
onRetry: v.onRetry
|
|
46
48
|
}) : /* @__PURE__ */ l(o, {
|
|
47
|
-
items:
|
|
48
|
-
editingId:
|
|
49
|
-
onAddRule:
|
|
50
|
-
gaps:
|
|
51
|
-
onSelectGap:
|
|
52
|
-
unlistedPoliciesHeading:
|
|
53
|
-
unlistedPoliciesBlockAmounts:
|
|
54
|
-
unlistedPoliciesStillApply:
|
|
55
|
-
createRuleDisabledReason:
|
|
56
|
-
isLoading:
|
|
57
|
-
disabled:
|
|
58
|
-
labels:
|
|
49
|
+
items: v.items,
|
|
50
|
+
editingId: v.editingId,
|
|
51
|
+
onAddRule: v.onAddRule,
|
|
52
|
+
gaps: v.gaps,
|
|
53
|
+
onSelectGap: v.onSelectGap,
|
|
54
|
+
unlistedPoliciesHeading: v.unlistedPoliciesHeading,
|
|
55
|
+
unlistedPoliciesBlockAmounts: v.unlistedPoliciesBlockAmounts,
|
|
56
|
+
unlistedPoliciesStillApply: v.unlistedPoliciesStillApply,
|
|
57
|
+
createRuleDisabledReason: v.addRuleDisabledReason,
|
|
58
|
+
isLoading: v.isLoading,
|
|
59
|
+
disabled: v.isBusy,
|
|
60
|
+
labels: m?.list,
|
|
59
61
|
testIds: {
|
|
60
62
|
root: r.list,
|
|
61
63
|
loading: r.listLoading,
|
|
@@ -69,14 +71,14 @@ function d({ labels: d, componentLabels: f, headingComponent: p = "h3", showHead
|
|
|
69
71
|
}
|
|
70
72
|
}),
|
|
71
73
|
/* @__PURE__ */ l(a, {
|
|
72
|
-
open:
|
|
73
|
-
details:
|
|
74
|
-
onOpenChange:
|
|
75
|
-
onConfirm:
|
|
76
|
-
onCancel:
|
|
77
|
-
isDeleting:
|
|
78
|
-
confirmDisabled:
|
|
79
|
-
labels:
|
|
74
|
+
open: v.deleteDialog.open,
|
|
75
|
+
details: v.deleteDialog.details,
|
|
76
|
+
onOpenChange: v.deleteDialog.onOpenChange,
|
|
77
|
+
onConfirm: v.deleteDialog.onConfirm,
|
|
78
|
+
onCancel: v.deleteDialog.onCancel,
|
|
79
|
+
isDeleting: v.deleteDialog.isDeleting,
|
|
80
|
+
confirmDisabled: v.deleteDialog.confirmDisabled,
|
|
81
|
+
labels: m?.deleteDialog,
|
|
80
82
|
testIds: {
|
|
81
83
|
root: r.deleteDialog,
|
|
82
84
|
cancelButton: r.deleteDialogCancel,
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import { AmountConditionBuilder as e } from "./index3.js";
|
|
3
3
|
import "./index4.js";
|
|
4
|
-
import "./index5.js";
|
|
4
|
+
import { NoPolicyBanner as t } from "./index5.js";
|
|
5
5
|
import "./index6.js";
|
|
6
|
-
import "./index7.js";
|
|
6
|
+
import { GapCoverageAlert as n } from "./index7.js";
|
|
7
7
|
import "./index8.js";
|
|
8
8
|
import "./index9.js";
|
|
9
9
|
import "./index10.js";
|
|
10
|
-
import { ApprovalPoliciesHeader as
|
|
10
|
+
import { ApprovalPoliciesHeader as r } from "./index11.js";
|
|
11
11
|
import "./index13.js";
|
|
12
12
|
import "./index14.js";
|
|
13
|
-
import { PolicyCardDefaultLabels as
|
|
13
|
+
import { PolicyCardDefaultLabels as i } from "./index15.js";
|
|
14
14
|
import "./index16.js";
|
|
15
|
-
import { PolicyCardFrame as
|
|
16
|
-
import { DeleteRuleDialogDefaultLabels as
|
|
17
|
-
import { DeleteRuleDialog as
|
|
15
|
+
import { PolicyCardFrame as a } from "./index17.js";
|
|
16
|
+
import { DeleteRuleDialogDefaultLabels as o } from "./index18.js";
|
|
17
|
+
import { DeleteRuleDialog as s } from "./index19.js";
|
|
18
18
|
import "./index20.js";
|
|
19
|
-
import { ApprovalPoliciesList as
|
|
20
|
-
export { e as AmountConditionBuilder,
|
|
19
|
+
import { ApprovalPoliciesList as c } from "./index21.js";
|
|
20
|
+
export { e as AmountConditionBuilder, r as ApprovalPoliciesHeader, c as ApprovalPoliciesList, s as DeleteRuleDialog, o as DeleteRuleDialogDefaultLabels, n as GapCoverageAlert, t as NoPolicyBanner, i as PolicyCardDefaultLabels, a as PolicyCardFrame };
|
package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js
CHANGED
|
@@ -1,47 +1,51 @@
|
|
|
1
1
|
import { Button as e, Heading as t, Tooltip as n, TooltipContent as r, TooltipProvider as i, TooltipTrigger as a, Typography as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { ApprovalPoliciesHeaderDefaultLabels as s } from "./index10.js";
|
|
3
3
|
import { useMemo as c } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { createPortal as l } from "react-dom";
|
|
5
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
5
6
|
// ../../libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index11.js
|
|
6
|
-
var
|
|
7
|
-
let
|
|
7
|
+
var f = ({ headerStart: f, headerActionContainer: p, onAddRule: m, addRuleDisabled: h, addRuleDisabledReason: g, labels: _, headingComponent: v = "h2", showTitle: y = !0, testIds: b }) => {
|
|
8
|
+
let x = c(() => ({
|
|
8
9
|
...s,
|
|
9
|
-
...
|
|
10
|
-
}), [
|
|
10
|
+
..._
|
|
11
|
+
}), [_]), S = m ? /* @__PURE__ */ u(e, {
|
|
11
12
|
type: "button",
|
|
12
|
-
variant: "outline",
|
|
13
13
|
size: "sm",
|
|
14
|
-
onClick:
|
|
15
|
-
disabled:
|
|
16
|
-
"data-testid":
|
|
17
|
-
className: "ttw:shrink-0",
|
|
18
|
-
children:
|
|
19
|
-
}) : null
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
className: "ttw:flex ttw:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
14
|
+
onClick: m,
|
|
15
|
+
disabled: h,
|
|
16
|
+
"data-testid": b?.addRuleButton,
|
|
17
|
+
className: "ttw:ml-auto ttw:shrink-0",
|
|
18
|
+
children: x.AddRule
|
|
19
|
+
}) : null, C = S && h && g ? /* @__PURE__ */ u(i, { children: /* @__PURE__ */ d(n, { children: [/* @__PURE__ */ u(a, {
|
|
20
|
+
asChild: !0,
|
|
21
|
+
children: /* @__PURE__ */ u("span", {
|
|
22
|
+
tabIndex: 0,
|
|
23
|
+
className: "ttw:ml-auto ttw:inline-flex ttw:shrink-0 ttw:cursor-not-allowed ttw:rounded-md",
|
|
24
|
+
"data-testid": b?.addRuleBlocked,
|
|
25
|
+
children: S
|
|
26
|
+
})
|
|
27
|
+
}), /* @__PURE__ */ u(r, {
|
|
28
|
+
side: "top",
|
|
29
|
+
children: g
|
|
30
|
+
})] }) }) : S;
|
|
31
|
+
return /* @__PURE__ */ d("div", {
|
|
32
|
+
className: "ttw:flex ttw:flex-col ttw:gap-2",
|
|
33
|
+
children: [
|
|
34
|
+
p ? l(C, p) : null,
|
|
35
|
+
f || y || p === void 0 && C ? /* @__PURE__ */ d("div", {
|
|
36
|
+
className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-between ttw:gap-4",
|
|
37
|
+
children: [f ?? (y ? /* @__PURE__ */ u(t, {
|
|
38
|
+
variant: "section",
|
|
39
|
+
level: Number(v.slice(1)),
|
|
40
|
+
children: x.Title
|
|
41
|
+
}) : null), p === void 0 ? C : null]
|
|
42
|
+
}) : null,
|
|
43
|
+
/* @__PURE__ */ u(o, {
|
|
29
44
|
variant: "body2",
|
|
30
45
|
color: "muted",
|
|
31
|
-
children:
|
|
32
|
-
})]
|
|
33
|
-
}), y && f && p ? /* @__PURE__ */ l(i, { children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ l(a, {
|
|
34
|
-
asChild: !0,
|
|
35
|
-
children: /* @__PURE__ */ l("span", {
|
|
36
|
-
tabIndex: 0,
|
|
37
|
-
className: "ttw:inline-flex ttw:shrink-0 ttw:cursor-not-allowed ttw:rounded-md",
|
|
38
|
-
"data-testid": _?.addRuleBlocked,
|
|
39
|
-
children: y
|
|
46
|
+
children: x.Description
|
|
40
47
|
})
|
|
41
|
-
|
|
42
|
-
side: "top",
|
|
43
|
-
children: p
|
|
44
|
-
})] }) }) : y]
|
|
48
|
+
]
|
|
45
49
|
});
|
|
46
50
|
};
|
|
47
|
-
export {
|
|
51
|
+
export { f as ApprovalPoliciesHeader };
|