@tesouro/embedded-components-react 0.5.153 → 0.5.155
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 +21 -19
- package/dist/index.css +0 -3
- package/dist/index.d.ts +106 -94
- package/dist/index.js +15 -15
- package/dist/lib/CreditCardsWidget.d.ts +6 -0
- package/dist/lib/DebitCardsWidget.d.ts +6 -0
- package/dist/lib/SettingsWidget.d.ts +0 -3
- package/dist/lib/WidgetSuite.d.ts +102 -9
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +45 -44
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index3.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +56 -64
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +34 -34
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +191 -231
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +91 -147
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +15 -2
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +0 -27
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +0 -34
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +0 -35
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +0 -62
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +0 -60
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js +0 -107
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index2.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index3.js +0 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js +0 -14
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +0 -28
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +0 -99
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +0 -80
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +0 -146
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index2.js +0 -41
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index3.js +0 -143
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js +0 -127
|
@@ -1,143 +0,0 @@
|
|
|
1
|
-
import { Button as e, DataTable as t, DropdownMenu as n, DropdownMenuContent as r, DropdownMenuItem as i, DropdownMenuTrigger as a } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { EmptyState as o } from "../../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
|
|
3
|
-
import { ErrorState as s } from "../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
4
|
-
import "../../../../shared/ui/dist/index.js";
|
|
5
|
-
import { TAGS_SCREEN_LABELS_EN as c } from "./index2.js";
|
|
6
|
-
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
7
|
-
import { ArrowDownIcon as d, ArrowUpDownIcon as f, ArrowUpIcon as p, MoreVerticalIcon as m, PlusIcon as h, Trash2Icon as g } from "lucide-react";
|
|
8
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index3.js
|
|
9
|
-
var _ = [
|
|
10
|
-
10,
|
|
11
|
-
25,
|
|
12
|
-
50,
|
|
13
|
-
100
|
|
14
|
-
];
|
|
15
|
-
function v({ label: t, isSorted: n, onToggle: r }) {
|
|
16
|
-
return /* @__PURE__ */ u("div", {
|
|
17
|
-
className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
|
|
18
|
-
children: [t, /* @__PURE__ */ l(e, {
|
|
19
|
-
variant: "ghost",
|
|
20
|
-
size: "icon-sm",
|
|
21
|
-
onClick: r,
|
|
22
|
-
children: l(n === "asc" ? p : n === "desc" ? d : f, { className: "ttw:size-4" })
|
|
23
|
-
})]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
function y({ tags: d, isLoading: f, isError: p, sorting: y, onSortingChange: b, pageSize: x, onPageSizeChange: S, pageSizeOptions: C = _, hasNextPage: w, hasPrevPage: T, onNextPage: E, onPrevPage: D, onCreateClick: O, onRowClick: k, onDeleteClick: A, onRetry: j, labels: M, emptyStateTestId: N }) {
|
|
27
|
-
let P = {
|
|
28
|
-
...c,
|
|
29
|
-
...M
|
|
30
|
-
}, F = [
|
|
31
|
-
{
|
|
32
|
-
accessorKey: "name",
|
|
33
|
-
header: P.columnName
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
accessorKey: "categoryLabel",
|
|
37
|
-
header: P.columnCategory
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
accessorKey: "keywords",
|
|
41
|
-
header: P.columnKeywords
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
accessorKey: "createdAtLabel",
|
|
45
|
-
enableSorting: !0,
|
|
46
|
-
header: ({ column: e }) => /* @__PURE__ */ l(v, {
|
|
47
|
-
label: P.columnCreatedAt,
|
|
48
|
-
isSorted: e.getIsSorted(),
|
|
49
|
-
onToggle: () => e.toggleSorting(e.getIsSorted() === "asc")
|
|
50
|
-
})
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
accessorKey: "updatedAtLabel",
|
|
54
|
-
enableSorting: !0,
|
|
55
|
-
header: ({ column: e }) => /* @__PURE__ */ l(v, {
|
|
56
|
-
label: P.columnUpdatedAt,
|
|
57
|
-
isSorted: e.getIsSorted(),
|
|
58
|
-
onToggle: () => e.toggleSorting(e.getIsSorted() === "asc")
|
|
59
|
-
})
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
accessorKey: "createdByLabel",
|
|
63
|
-
header: P.columnCreatedBy
|
|
64
|
-
}
|
|
65
|
-
];
|
|
66
|
-
A && F.push({
|
|
67
|
-
id: "actions",
|
|
68
|
-
header: () => /* @__PURE__ */ l("div", {
|
|
69
|
-
className: "ttw:text-right",
|
|
70
|
-
children: P.columnActions
|
|
71
|
-
}),
|
|
72
|
-
cell: ({ row: t }) => /* @__PURE__ */ l("div", {
|
|
73
|
-
className: "ttw:flex ttw:justify-end",
|
|
74
|
-
children: /* @__PURE__ */ u(n, { children: [/* @__PURE__ */ l(a, {
|
|
75
|
-
asChild: !0,
|
|
76
|
-
children: /* @__PURE__ */ u(e, {
|
|
77
|
-
variant: "ghost",
|
|
78
|
-
size: "icon-sm",
|
|
79
|
-
onClick: (e) => e.stopPropagation(),
|
|
80
|
-
children: [/* @__PURE__ */ l("span", {
|
|
81
|
-
className: "ttw:sr-only",
|
|
82
|
-
children: P.openActionsMenu
|
|
83
|
-
}), /* @__PURE__ */ l(m, { className: "ttw:size-4" })]
|
|
84
|
-
})
|
|
85
|
-
}), /* @__PURE__ */ l(r, {
|
|
86
|
-
align: "end",
|
|
87
|
-
children: /* @__PURE__ */ u(i, {
|
|
88
|
-
variant: "destructive",
|
|
89
|
-
onClick: (e) => {
|
|
90
|
-
e.stopPropagation(), A(t.original);
|
|
91
|
-
},
|
|
92
|
-
children: [/* @__PURE__ */ l(g, { className: "ttw:size-4" }), P.actionDelete]
|
|
93
|
-
})
|
|
94
|
-
})] })
|
|
95
|
-
})
|
|
96
|
-
});
|
|
97
|
-
let I = k ? {
|
|
98
|
-
onRowClick: k,
|
|
99
|
-
rowAriaLabel: (e) => P.openRow(e.name)
|
|
100
|
-
} : {};
|
|
101
|
-
return /* @__PURE__ */ u("div", {
|
|
102
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4",
|
|
103
|
-
children: [O && /* @__PURE__ */ l("div", {
|
|
104
|
-
className: "ttw:flex ttw:items-center ttw:justify-end",
|
|
105
|
-
children: /* @__PURE__ */ u(e, {
|
|
106
|
-
size: "sm",
|
|
107
|
-
onClick: O,
|
|
108
|
-
children: [/* @__PURE__ */ l(h, {
|
|
109
|
-
"aria-hidden": !0,
|
|
110
|
-
className: "ttw:size-4"
|
|
111
|
-
}), P.createButton]
|
|
112
|
-
})
|
|
113
|
-
}), p ? /* @__PURE__ */ l(s, {
|
|
114
|
-
title: P.errorTitle,
|
|
115
|
-
description: P.errorDescription,
|
|
116
|
-
retryLabel: j ? P.errorRetry : void 0,
|
|
117
|
-
onRetry: j
|
|
118
|
-
}) : /* @__PURE__ */ l(t, {
|
|
119
|
-
columns: F,
|
|
120
|
-
data: d,
|
|
121
|
-
isLoading: f,
|
|
122
|
-
sorting: y,
|
|
123
|
-
onSortingChange: b,
|
|
124
|
-
pageSize: x,
|
|
125
|
-
onPageSizeChange: S,
|
|
126
|
-
pageSizeOptions: C,
|
|
127
|
-
hasNextPage: w,
|
|
128
|
-
hasPrevPage: T,
|
|
129
|
-
onNextPage: E,
|
|
130
|
-
onPrevPage: D,
|
|
131
|
-
...I,
|
|
132
|
-
children: /* @__PURE__ */ l(o, {
|
|
133
|
-
testId: N,
|
|
134
|
-
title: P.emptyTitle,
|
|
135
|
-
description: O ? P.emptyDescription : P.emptyDescriptionNoAction,
|
|
136
|
-
actionLabel: P.emptyAction,
|
|
137
|
-
onAction: O
|
|
138
|
-
})
|
|
139
|
-
})]
|
|
140
|
-
});
|
|
141
|
-
}
|
|
142
|
-
//#endregion
|
|
143
|
-
export { y as TagsScreen, y as default };
|
|
@@ -1,36 +0,0 @@
|
|
|
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 { TAG_DELETE_DIALOG_LABELS_EN as s } from "./index2.js";
|
|
3
|
-
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js
|
|
5
|
-
function u({ open: u, onOpenChange: d, tagName: f, isDeleting: p, error: m, confirmDisabled: h, onConfirm: g, onCancel: _, labels: v }) {
|
|
6
|
-
let y = {
|
|
7
|
-
...s,
|
|
8
|
-
...v
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ c(e, {
|
|
11
|
-
open: u,
|
|
12
|
-
onOpenChange: d,
|
|
13
|
-
children: /* @__PURE__ */ l(t, { children: [
|
|
14
|
-
/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: y.title.replace("{name}", f) }), /* @__PURE__ */ c(n, { children: y.message })] }),
|
|
15
|
-
m ? /* @__PURE__ */ c("p", {
|
|
16
|
-
role: "alert",
|
|
17
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
18
|
-
children: m
|
|
19
|
-
}) : null,
|
|
20
|
-
/* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
21
|
-
variant: "ghost",
|
|
22
|
-
onClick: _,
|
|
23
|
-
disabled: p,
|
|
24
|
-
children: y.cancelButton
|
|
25
|
-
}), /* @__PURE__ */ c(o, {
|
|
26
|
-
variant: "destructive",
|
|
27
|
-
onClick: g,
|
|
28
|
-
disabled: p || h,
|
|
29
|
-
loading: p,
|
|
30
|
-
children: y.confirmButton
|
|
31
|
-
})] })
|
|
32
|
-
] })
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
//#endregion
|
|
36
|
-
export { u as TagDeleteDialog, u as default };
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import { Button as e, Input as t, InputTags as n, Label as r, Select as i, SelectContent as a, SelectItem as o, SelectTrigger as s, SelectValue as c, Sheet as l, SheetContent as u, SheetDescription as d, SheetFooter as f, SheetHeader as p, SheetTitle as m } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
-
import { TAG_FORM_SHEET_LABELS_EN as h } from "./index2.js";
|
|
3
|
-
import { useId as g } from "react";
|
|
4
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js
|
|
6
|
-
function y({ open: y, onOpenChange: b, mode: x, values: S, errors: C, categoryOptions: w, tagName: T, inProgress: E, showDelete: D, showKeywords: O = !0, onNameChange: k, onCategoryChange: A, onKeywordsChange: j, onKeywordsInputChange: M, onSubmit: N, onCancel: P, onDelete: F, labels: I }) {
|
|
7
|
-
let L = {
|
|
8
|
-
...h,
|
|
9
|
-
...I
|
|
10
|
-
}, R = g(), z = x === "edit" ? L.editTitle.replace("{name}", T ?? "") : L.createTitle;
|
|
11
|
-
return /* @__PURE__ */ _(l, {
|
|
12
|
-
open: y,
|
|
13
|
-
onOpenChange: b,
|
|
14
|
-
children: /* @__PURE__ */ v(u, {
|
|
15
|
-
className: "ttw:w-[600px] ttw:sm:max-w-[600px]",
|
|
16
|
-
onEscapeKeyDown: (e) => e.stopPropagation(),
|
|
17
|
-
children: [
|
|
18
|
-
/* @__PURE__ */ v(p, { children: [/* @__PURE__ */ _(m, { children: z }), /* @__PURE__ */ _(d, {
|
|
19
|
-
className: "ttw:sr-only",
|
|
20
|
-
children: z
|
|
21
|
-
})] }),
|
|
22
|
-
/* @__PURE__ */ _("form", {
|
|
23
|
-
id: R,
|
|
24
|
-
onSubmit: (e) => {
|
|
25
|
-
e.preventDefault(), e.stopPropagation(), N();
|
|
26
|
-
},
|
|
27
|
-
children: /* @__PURE__ */ v("div", {
|
|
28
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
|
|
29
|
-
children: [
|
|
30
|
-
C?.form && /* @__PURE__ */ _("p", {
|
|
31
|
-
role: "alert",
|
|
32
|
-
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
33
|
-
children: C.form
|
|
34
|
-
}),
|
|
35
|
-
/* @__PURE__ */ v("div", {
|
|
36
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
37
|
-
children: [
|
|
38
|
-
/* @__PURE__ */ _(r, {
|
|
39
|
-
htmlFor: `${R}-name`,
|
|
40
|
-
children: L.nameLabel
|
|
41
|
-
}),
|
|
42
|
-
/* @__PURE__ */ _(t, {
|
|
43
|
-
id: `${R}-name`,
|
|
44
|
-
autoFocus: !0,
|
|
45
|
-
value: S.name,
|
|
46
|
-
"aria-invalid": !!C?.name,
|
|
47
|
-
onChange: (e) => k(e.target.value)
|
|
48
|
-
}),
|
|
49
|
-
C?.name && /* @__PURE__ */ _("p", {
|
|
50
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
51
|
-
children: C.name
|
|
52
|
-
})
|
|
53
|
-
]
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ v("div", {
|
|
56
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
57
|
-
children: [/* @__PURE__ */ _(r, {
|
|
58
|
-
htmlFor: `${R}-category`,
|
|
59
|
-
children: L.categoryLabel
|
|
60
|
-
}), /* @__PURE__ */ v(i, {
|
|
61
|
-
value: S.category === "" ? void 0 : S.category,
|
|
62
|
-
onValueChange: A,
|
|
63
|
-
children: [/* @__PURE__ */ _(s, {
|
|
64
|
-
id: `${R}-category`,
|
|
65
|
-
className: "ttw:w-full",
|
|
66
|
-
children: /* @__PURE__ */ _(c, { placeholder: L.categoryPlaceholder })
|
|
67
|
-
}), /* @__PURE__ */ _(a, { children: w.map((e) => /* @__PURE__ */ _(o, {
|
|
68
|
-
value: e.value,
|
|
69
|
-
children: e.label
|
|
70
|
-
}, e.value)) })]
|
|
71
|
-
})]
|
|
72
|
-
}),
|
|
73
|
-
O && /* @__PURE__ */ v("div", {
|
|
74
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
75
|
-
children: [
|
|
76
|
-
/* @__PURE__ */ _(r, { children: L.keywordsLabel }),
|
|
77
|
-
/* @__PURE__ */ _(n, {
|
|
78
|
-
value: S.keywords,
|
|
79
|
-
onChange: j,
|
|
80
|
-
inputValue: S.keywordsInput,
|
|
81
|
-
onInputValueChange: M,
|
|
82
|
-
placeholder: L.keywordsPlaceholder,
|
|
83
|
-
"aria-invalid": !!C?.keywords,
|
|
84
|
-
removeTagLabel: (e) => L.removeKeyword.replace("{keyword}", e)
|
|
85
|
-
}),
|
|
86
|
-
C?.keywords && /* @__PURE__ */ _("p", {
|
|
87
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
88
|
-
children: C.keywords
|
|
89
|
-
})
|
|
90
|
-
]
|
|
91
|
-
})
|
|
92
|
-
]
|
|
93
|
-
})
|
|
94
|
-
}),
|
|
95
|
-
/* @__PURE__ */ v(f, {
|
|
96
|
-
className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
|
|
97
|
-
children: [
|
|
98
|
-
x === "edit" && D && F && /* @__PURE__ */ _(e, {
|
|
99
|
-
type: "button",
|
|
100
|
-
className: "ttw:mr-auto",
|
|
101
|
-
variant: "destructive",
|
|
102
|
-
size: "lg",
|
|
103
|
-
onClick: F,
|
|
104
|
-
children: L.deleteButton
|
|
105
|
-
}),
|
|
106
|
-
/* @__PURE__ */ _(e, {
|
|
107
|
-
type: "button",
|
|
108
|
-
variant: "ghost",
|
|
109
|
-
size: "lg",
|
|
110
|
-
onClick: P,
|
|
111
|
-
children: L.cancelButton
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ _(e, {
|
|
114
|
-
type: "submit",
|
|
115
|
-
form: R,
|
|
116
|
-
size: "lg",
|
|
117
|
-
disabled: E,
|
|
118
|
-
children: x === "edit" ? L.saveButton : L.createButton
|
|
119
|
-
})
|
|
120
|
-
]
|
|
121
|
-
})
|
|
122
|
-
]
|
|
123
|
-
})
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
|
-
//#endregion
|
|
127
|
-
export { y as TagFormSheet, y as default };
|