@tesouro/embedded-components-react 0.5.150 → 0.5.152
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/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +39 -39
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +32 -30
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js +77 -72
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +9 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +27 -23
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +21 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +64 -48
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +107 -92
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +23 -15
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js
CHANGED
|
@@ -7,55 +7,55 @@ import { useTagsQuery as n } from "../../data-access/dist/index2.js";
|
|
|
7
7
|
import "../../data-access/dist/index.js";
|
|
8
8
|
import { useCallback as r, useMemo as i, useState as a } from "react";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js
|
|
10
|
-
function o({ keywordsByTagId: o, userNamesById: s }) {
|
|
11
|
-
let [
|
|
10
|
+
function o({ keywordsByTagId: o, userNamesById: s, pageSizeOptions: c }) {
|
|
11
|
+
let [l, u] = a([{
|
|
12
12
|
id: "createdAtLabel",
|
|
13
13
|
desc: !0
|
|
14
|
-
}]), [
|
|
15
|
-
sort:
|
|
16
|
-
order:
|
|
17
|
-
limit:
|
|
18
|
-
pagination_token:
|
|
19
|
-
}),
|
|
20
|
-
tags:
|
|
14
|
+
}]), [d, f] = a(() => c[0] ?? 10), [p, m] = a(), h = t(l[0]?.id), g = l[0]?.desc ? "desc" : "asc", _ = n({
|
|
15
|
+
sort: h,
|
|
16
|
+
order: g,
|
|
17
|
+
limit: d,
|
|
18
|
+
pagination_token: p
|
|
19
|
+
}), v = i(() => e({
|
|
20
|
+
tags: _.data?.data ?? [],
|
|
21
21
|
keywordsByTagId: o,
|
|
22
22
|
userNamesById: s
|
|
23
23
|
}), [
|
|
24
|
-
|
|
24
|
+
_.data,
|
|
25
25
|
o,
|
|
26
26
|
s
|
|
27
|
-
]),
|
|
28
|
-
let n = typeof e == "function" ? e(
|
|
29
|
-
|
|
27
|
+
]), y = r((e) => (_.data?.data ?? []).find((t) => t.id === e), [_.data]), b = r((e) => {
|
|
28
|
+
let n = typeof e == "function" ? e(l) : e;
|
|
29
|
+
u(n);
|
|
30
30
|
let r = t(n[0]?.id), i = n[0]?.desc ? "desc" : "asc";
|
|
31
|
-
(r !==
|
|
31
|
+
(r !== h || i !== g) && m(void 0);
|
|
32
32
|
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
]),
|
|
37
|
-
|
|
38
|
-
}, []),
|
|
39
|
-
|
|
40
|
-
}, [
|
|
41
|
-
|
|
42
|
-
}, [
|
|
43
|
-
|
|
44
|
-
}, [
|
|
33
|
+
l,
|
|
34
|
+
h,
|
|
35
|
+
g
|
|
36
|
+
]), x = r((e) => {
|
|
37
|
+
f(e), m(void 0);
|
|
38
|
+
}, []), S = r(() => {
|
|
39
|
+
m(_.data?.next_pagination_token ?? void 0);
|
|
40
|
+
}, [_.data?.next_pagination_token]), C = r(() => {
|
|
41
|
+
m(_.data?.prev_pagination_token ?? void 0);
|
|
42
|
+
}, [_.data?.prev_pagination_token]), w = r(() => {
|
|
43
|
+
_.refetch();
|
|
44
|
+
}, [_]);
|
|
45
45
|
return {
|
|
46
|
-
rows:
|
|
47
|
-
isLoading:
|
|
48
|
-
isError:
|
|
49
|
-
sorting:
|
|
50
|
-
onSortingChange:
|
|
51
|
-
pageSize:
|
|
52
|
-
onPageSizeChange:
|
|
53
|
-
hasNextPage: !!
|
|
54
|
-
hasPrevPage: !!
|
|
55
|
-
onNextPage:
|
|
56
|
-
onPrevPage:
|
|
57
|
-
onRetry:
|
|
58
|
-
findTag:
|
|
46
|
+
rows: v,
|
|
47
|
+
isLoading: _.isLoading,
|
|
48
|
+
isError: _.isError,
|
|
49
|
+
sorting: l,
|
|
50
|
+
onSortingChange: b,
|
|
51
|
+
pageSize: d,
|
|
52
|
+
onPageSizeChange: x,
|
|
53
|
+
hasNextPage: !!_.data?.next_pagination_token,
|
|
54
|
+
hasPrevPage: !!_.data?.prev_pagination_token,
|
|
55
|
+
onNextPage: S,
|
|
56
|
+
onPrevPage: C,
|
|
57
|
+
onRetry: w,
|
|
58
|
+
findTag: y
|
|
59
59
|
};
|
|
60
60
|
}
|
|
61
61
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { TAGS_MESSAGE_LABELS_EN as e } from "./index5.js";
|
|
6
6
|
import { hasSelectedText as t } from "./index6.js";
|
|
7
7
|
import { useEntitySettings as n } from "./index7.js";
|
|
8
8
|
import { useTagDelete as r } from "./index8.js";
|
|
@@ -10,47 +10,49 @@ import { useTagForm as i } from "./index9.js";
|
|
|
10
10
|
import { useTagsTable as a } from "./index10.js";
|
|
11
11
|
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
|
|
13
|
-
function l({ messageLabels: l, canWrite: u, canMutate: d }) {
|
|
14
|
-
let
|
|
13
|
+
function l({ messageLabels: l, canWrite: u, canMutate: d, pageSizeOptions: f }) {
|
|
14
|
+
let p = s(() => ({
|
|
15
15
|
...e,
|
|
16
16
|
...l
|
|
17
|
-
}), [l]), [
|
|
18
|
-
keywordsByTagId:
|
|
19
|
-
userNamesById:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
}), [l]), [m, h] = c(), g = n({ messages: p }), _ = a({
|
|
18
|
+
keywordsByTagId: g.keywordsByTagId,
|
|
19
|
+
userNamesById: g.userNamesById,
|
|
20
|
+
pageSizeOptions: f
|
|
21
|
+
}), v = i({
|
|
22
|
+
selectedTag: m,
|
|
23
|
+
setSelectedTag: h,
|
|
24
|
+
settings: g,
|
|
25
|
+
messages: p,
|
|
25
26
|
canWrite: u,
|
|
26
27
|
canMutate: d
|
|
27
|
-
}),
|
|
28
|
-
selectedTag:
|
|
29
|
-
setSelectedTag:
|
|
30
|
-
settings:
|
|
28
|
+
}), y = r({
|
|
29
|
+
selectedTag: m,
|
|
30
|
+
setSelectedTag: h,
|
|
31
|
+
settings: g,
|
|
31
32
|
canWrite: u,
|
|
32
|
-
canMutate: d
|
|
33
|
+
canMutate: d,
|
|
34
|
+
messages: p
|
|
33
35
|
});
|
|
34
36
|
return {
|
|
35
|
-
selectedTag:
|
|
36
|
-
table:
|
|
37
|
-
form:
|
|
38
|
-
del:
|
|
37
|
+
selectedTag: m,
|
|
38
|
+
table: _,
|
|
39
|
+
form: v,
|
|
40
|
+
del: y,
|
|
39
41
|
handleRowClick: o((e) => {
|
|
40
42
|
if (t()) return;
|
|
41
|
-
let n =
|
|
42
|
-
n &&
|
|
43
|
-
}, [
|
|
43
|
+
let n = _.findTag(e.id);
|
|
44
|
+
n && v.openEdit(n);
|
|
45
|
+
}, [_, v]),
|
|
44
46
|
handleDeleteClick: o((e) => {
|
|
45
|
-
let t =
|
|
46
|
-
t &&
|
|
47
|
-
}, [
|
|
47
|
+
let t = _.findTag(e.id);
|
|
48
|
+
t && y.requestDelete(t);
|
|
49
|
+
}, [_, y]),
|
|
48
50
|
handleFormDelete: o(() => {
|
|
49
|
-
|
|
51
|
+
v.close(), m && y.requestDelete(m);
|
|
50
52
|
}, [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
53
|
+
v,
|
|
54
|
+
m,
|
|
55
|
+
y
|
|
54
56
|
])
|
|
55
57
|
};
|
|
56
58
|
}
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js
CHANGED
|
@@ -2,91 +2,96 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { EmbeddedToaster as e } from "../../../../shared/ui/dist/lib/EmbeddedToaster.js";
|
|
6
|
+
import "../../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useAnalyticsTrack as t } from "../../../../shared/feature/dist/lib/analytics/hooks.js";
|
|
8
|
+
import { WidgetProvider as n } from "../../../../shared/feature/dist/lib/WidgetProvider/WidgetProvider.js";
|
|
9
|
+
import { useWidgetConfig as r, useWidgetInitStaleForToken as i } from "../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
10
|
import "../../../../shared/feature/dist/index.js";
|
|
9
|
-
import { TagsWidgetAnalyticsEvent as
|
|
10
|
-
import { getTagsPermissions as
|
|
11
|
-
import { PAGE_SIZE_OPTIONS as
|
|
12
|
-
import { useTagsWidget as
|
|
13
|
-
import { TagsScreen as
|
|
14
|
-
import { TagDeleteDialog as
|
|
15
|
-
import { TagFormSheet as
|
|
11
|
+
import { TagsWidgetAnalyticsEvent as a, WIDGET_NAME as o } from "./index2.js";
|
|
12
|
+
import { getTagsPermissions as s } from "./index3.js";
|
|
13
|
+
import { PAGE_SIZE_OPTIONS as c } from "./index4.js";
|
|
14
|
+
import { useTagsWidget as l } from "./index11.js";
|
|
15
|
+
import { TagsScreen as u } from "../../ui/dist/index3.js";
|
|
16
|
+
import { TagDeleteDialog as d } from "../../ui/dist/index4.js";
|
|
17
|
+
import { TagFormSheet as f } from "../../ui/dist/index5.js";
|
|
16
18
|
import "../../ui/dist/index.js";
|
|
17
|
-
import { useEffect as
|
|
18
|
-
import { Fragment as
|
|
19
|
+
import { useEffect as p, useMemo as m } from "react";
|
|
20
|
+
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
19
21
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js
|
|
20
|
-
function
|
|
21
|
-
let
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}, [
|
|
25
|
-
let { initResponse:
|
|
26
|
-
messageLabels:
|
|
27
|
-
canWrite:
|
|
28
|
-
canMutate:
|
|
22
|
+
function v({ pageSizeOptions: n = c, screenLabels: o, formLabels: v, deleteLabels: y, messageLabels: b }) {
|
|
23
|
+
let x = t();
|
|
24
|
+
p(() => {
|
|
25
|
+
x(a.Mounted);
|
|
26
|
+
}, [x]);
|
|
27
|
+
let { initResponse: S } = r(), C = i(), { canWrite: w } = m(() => s(S?.scopes), [S?.scopes]), { selectedTag: T, table: E, form: D, del: O, handleRowClick: k, handleDeleteClick: A, handleFormDelete: j } = l({
|
|
28
|
+
messageLabels: b,
|
|
29
|
+
canWrite: w,
|
|
30
|
+
canMutate: w && !C,
|
|
31
|
+
pageSizeOptions: n
|
|
29
32
|
});
|
|
30
|
-
return /* @__PURE__ */
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
33
|
+
return /* @__PURE__ */ _(h, { children: [
|
|
34
|
+
/* @__PURE__ */ g(e, {}),
|
|
35
|
+
/* @__PURE__ */ g(u, {
|
|
36
|
+
tags: E.rows,
|
|
37
|
+
isLoading: E.isLoading,
|
|
38
|
+
isError: E.isError,
|
|
39
|
+
sorting: E.sorting,
|
|
40
|
+
onSortingChange: E.onSortingChange,
|
|
41
|
+
pageSize: E.pageSize,
|
|
42
|
+
onPageSizeChange: E.onPageSizeChange,
|
|
43
|
+
pageSizeOptions: n,
|
|
44
|
+
hasNextPage: E.hasNextPage,
|
|
45
|
+
hasPrevPage: E.hasPrevPage,
|
|
46
|
+
onNextPage: E.onNextPage,
|
|
47
|
+
onPrevPage: E.onPrevPage,
|
|
48
|
+
onCreateClick: w ? D.openCreate : void 0,
|
|
49
|
+
onRowClick: w ? k : void 0,
|
|
50
|
+
onDeleteClick: w ? A : void 0,
|
|
51
|
+
onRetry: E.onRetry,
|
|
52
|
+
labels: o,
|
|
49
53
|
emptyStateTestId: "tags-widget-empty-state"
|
|
50
54
|
}),
|
|
51
|
-
/* @__PURE__ */
|
|
52
|
-
open: E.open,
|
|
53
|
-
onOpenChange: E.onOpenChange,
|
|
54
|
-
mode: E.mode,
|
|
55
|
-
values: E.values,
|
|
56
|
-
errors: E.errors,
|
|
57
|
-
categoryOptions: E.categoryOptions,
|
|
58
|
-
tagName: w?.name,
|
|
59
|
-
inProgress: E.isSubmitting || S,
|
|
60
|
-
showDelete: C,
|
|
61
|
-
onNameChange: E.onNameChange,
|
|
62
|
-
onCategoryChange: E.onCategoryChange,
|
|
63
|
-
onKeywordsChange: E.onKeywordsChange,
|
|
64
|
-
onKeywordsInputChange: E.onKeywordsInputChange,
|
|
65
|
-
onSubmit: E.submit,
|
|
66
|
-
onCancel: E.close,
|
|
67
|
-
onDelete: A,
|
|
68
|
-
labels: _
|
|
69
|
-
}),
|
|
70
|
-
/* @__PURE__ */ h(u, {
|
|
55
|
+
/* @__PURE__ */ g(f, {
|
|
71
56
|
open: D.open,
|
|
72
57
|
onOpenChange: D.onOpenChange,
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
58
|
+
mode: D.mode,
|
|
59
|
+
values: D.values,
|
|
60
|
+
errors: D.errors,
|
|
61
|
+
categoryOptions: D.categoryOptions,
|
|
62
|
+
tagName: T?.name,
|
|
63
|
+
inProgress: D.isSubmitting || C,
|
|
64
|
+
showDelete: w,
|
|
65
|
+
onNameChange: D.onNameChange,
|
|
66
|
+
onCategoryChange: D.onCategoryChange,
|
|
67
|
+
onKeywordsChange: D.onKeywordsChange,
|
|
68
|
+
onKeywordsInputChange: D.onKeywordsInputChange,
|
|
69
|
+
onSubmit: D.submit,
|
|
70
|
+
onCancel: D.close,
|
|
71
|
+
onDelete: j,
|
|
78
72
|
labels: v
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ g(d, {
|
|
75
|
+
open: O.open,
|
|
76
|
+
onOpenChange: O.onOpenChange,
|
|
77
|
+
tagName: T?.name ?? "",
|
|
78
|
+
isDeleting: O.isDeleting,
|
|
79
|
+
error: O.error,
|
|
80
|
+
confirmDisabled: O.confirmDisabled || C,
|
|
81
|
+
onConfirm: O.confirm,
|
|
82
|
+
onCancel: O.cancel,
|
|
83
|
+
labels: y
|
|
79
84
|
})
|
|
80
85
|
] });
|
|
81
86
|
}
|
|
82
|
-
function
|
|
83
|
-
return /* @__PURE__ */
|
|
84
|
-
widgetName:
|
|
87
|
+
function y({ baseUrl: e, widgetToken: t, organizationId: r, configClient: i, gatewayRouting: a, linkComponent: s, implementation: c, uiFramework: l, errorFallback: u, onError: d, analytics: f, disclosuresAcceptance: p, providerLabels: m, ...h }) {
|
|
88
|
+
return /* @__PURE__ */ g(n, {
|
|
89
|
+
widgetName: o,
|
|
85
90
|
baseUrl: e,
|
|
86
|
-
widgetToken:
|
|
91
|
+
widgetToken: t,
|
|
87
92
|
organizationId: r,
|
|
88
93
|
configClient: i,
|
|
89
|
-
gatewayRouting:
|
|
94
|
+
gatewayRouting: a,
|
|
90
95
|
linkComponent: s,
|
|
91
96
|
implementation: c,
|
|
92
97
|
uiFramework: l,
|
|
@@ -95,8 +100,8 @@ function v({ baseUrl: e, widgetToken: n, organizationId: r, configClient: i, gat
|
|
|
95
100
|
analytics: f,
|
|
96
101
|
disclosuresAcceptance: p,
|
|
97
102
|
providerLabels: m,
|
|
98
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ g(v, { ...h })
|
|
99
104
|
});
|
|
100
105
|
}
|
|
101
106
|
//#endregion
|
|
102
|
-
export {
|
|
107
|
+
export { y as TagsWidget, y as default };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js
CHANGED
|
@@ -8,6 +8,14 @@ var e = {
|
|
|
8
8
|
duplicateName: "A tag with this name already exists.",
|
|
9
9
|
keywordsNotSaved: "The tag was saved, but its keywords were not. Save again to finish."
|
|
10
10
|
}, t = {
|
|
11
|
+
...e,
|
|
12
|
+
tagCreated: "Tag “{name}” created",
|
|
13
|
+
tagUpdated: "Tag “{name}” updated",
|
|
14
|
+
tagDeleted: "Tag “{name}” deleted",
|
|
15
|
+
deleteError: "Could not delete this tag. Please try again.",
|
|
16
|
+
keywordCleanupError: "Tag “{name}” was deleted, but its OCR keywords could not be removed.",
|
|
17
|
+
keywordSyncError: "Tag “{name}” was saved, but its OCR keywords were not."
|
|
18
|
+
}, n = {
|
|
11
19
|
document_type: "Document Type",
|
|
12
20
|
department: "Department",
|
|
13
21
|
project: "Project",
|
|
@@ -17,4 +25,4 @@ var e = {
|
|
|
17
25
|
approval_status: "Approval Status"
|
|
18
26
|
};
|
|
19
27
|
//#endregion
|
|
20
|
-
export { t as TAG_CATEGORY_LABELS_EN, e as TAG_MESSAGE_LABELS_EN };
|
|
28
|
+
export { t as TAGS_MESSAGE_LABELS_EN, n as TAG_CATEGORY_LABELS_EN, e as TAG_MESSAGE_LABELS_EN };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js
CHANGED
|
@@ -8,42 +8,46 @@ var r = {
|
|
|
8
8
|
function i(e) {
|
|
9
9
|
return e && r[e] || "created_at";
|
|
10
10
|
}
|
|
11
|
-
var a =
|
|
11
|
+
var a = {
|
|
12
12
|
year: "numeric",
|
|
13
13
|
month: "short",
|
|
14
14
|
day: "numeric"
|
|
15
|
-
}
|
|
16
|
-
function o(e) {
|
|
15
|
+
};
|
|
16
|
+
function o(e, t) {
|
|
17
|
+
return e.replace("{name}", () => t);
|
|
18
|
+
}
|
|
19
|
+
var s;
|
|
20
|
+
function c(e) {
|
|
17
21
|
if (!e) return "";
|
|
18
22
|
let t = new Date(e);
|
|
19
|
-
return Number.isNaN(t.getTime()) ? "" : a.format(t);
|
|
23
|
+
return Number.isNaN(t.getTime()) ? "" : (s ??= new Intl.DateTimeFormat(void 0, a), s.format(t));
|
|
20
24
|
}
|
|
21
|
-
function
|
|
25
|
+
function l() {
|
|
22
26
|
let e = globalThis.getSelection?.();
|
|
23
27
|
return !!(e && e.toString().length > 0);
|
|
24
28
|
}
|
|
25
|
-
function
|
|
29
|
+
function u(e) {
|
|
26
30
|
let t = {};
|
|
27
31
|
for (let n of e ?? []) t[n.tag_id] = n.keywords;
|
|
28
32
|
return t;
|
|
29
33
|
}
|
|
30
|
-
function
|
|
34
|
+
function d(e) {
|
|
31
35
|
let t = {};
|
|
32
36
|
for (let n of e ?? []) t[n.id] = `${n.first_name ?? ""} ${n.last_name ?? ""}`.trim();
|
|
33
37
|
return t;
|
|
34
38
|
}
|
|
35
|
-
function
|
|
39
|
+
function f({ tags: e, keywordsByTagId: t, userNamesById: n }) {
|
|
36
40
|
return e.map((e) => ({
|
|
37
41
|
id: e.id,
|
|
38
42
|
name: e.name,
|
|
39
|
-
categoryLabel:
|
|
43
|
+
categoryLabel: h(e.category),
|
|
40
44
|
keywords: (t[e.id] ?? []).join(", "),
|
|
41
|
-
createdAtLabel:
|
|
42
|
-
updatedAtLabel:
|
|
45
|
+
createdAtLabel: c(e.created_at),
|
|
46
|
+
updatedAtLabel: c(e.updated_at),
|
|
43
47
|
createdByLabel: e.created_by_entity_user_id ? n[e.created_by_entity_user_id] ?? "" : ""
|
|
44
48
|
}));
|
|
45
49
|
}
|
|
46
|
-
function
|
|
50
|
+
function p(e, t, n) {
|
|
47
51
|
let r = e ?? [], i = r.filter((e) => e.tag_id !== t), a = Array.from(new Set(n));
|
|
48
52
|
return i.length === r.length && a.length === 0 ? {
|
|
49
53
|
changed: !1,
|
|
@@ -57,7 +61,7 @@ function d(e, t, n) {
|
|
|
57
61
|
}] : i
|
|
58
62
|
};
|
|
59
63
|
}
|
|
60
|
-
var
|
|
64
|
+
var m = [
|
|
61
65
|
"document_type",
|
|
62
66
|
"department",
|
|
63
67
|
"project",
|
|
@@ -66,30 +70,30 @@ var f = [
|
|
|
66
70
|
"payment_method",
|
|
67
71
|
"approval_status"
|
|
68
72
|
];
|
|
69
|
-
function
|
|
73
|
+
function h(e, n) {
|
|
70
74
|
return e ? n?.[e] ?? t[e] ?? "" : "";
|
|
71
75
|
}
|
|
72
|
-
function
|
|
73
|
-
return
|
|
76
|
+
function g(e) {
|
|
77
|
+
return m.map((t) => ({
|
|
74
78
|
value: t,
|
|
75
|
-
label:
|
|
79
|
+
label: h(t, e)
|
|
76
80
|
}));
|
|
77
81
|
}
|
|
78
|
-
function
|
|
82
|
+
function _(e, t = n) {
|
|
79
83
|
let r = {}, i = e.name.trim();
|
|
80
84
|
i.length === 0 ? r.name = t.nameRequired : i.length > 255 && (r.name = t.nameTooLong);
|
|
81
85
|
let a = e.keywords.some((e) => e.length < 2), o = e.keywords.some((e) => e.length > 25);
|
|
82
86
|
return a ? r.keywords = t.keywordTooShort : o && (r.keywords = t.keywordTooLong), r;
|
|
83
87
|
}
|
|
84
|
-
function
|
|
88
|
+
function v(e) {
|
|
85
89
|
return !!(e.name || e.keywords);
|
|
86
90
|
}
|
|
87
|
-
function
|
|
91
|
+
function y(e) {
|
|
88
92
|
return e === "This tag already exists.";
|
|
89
93
|
}
|
|
90
|
-
function
|
|
94
|
+
function b(t, r = n, { preferApiMessage: i = !1 } = {}) {
|
|
91
95
|
let a = e(t);
|
|
92
|
-
return
|
|
96
|
+
return y(a) ? { name: r.duplicateName } : { form: (i ? a : void 0) ?? r.genericError };
|
|
93
97
|
}
|
|
94
98
|
//#endregion
|
|
95
|
-
export {
|
|
99
|
+
export { m as TAG_CATEGORIES, u as buildKeywordsByTagId, f as buildTagRows, d as buildUserNamesById, p as computeNextOcrAutoTagging, c as formatTagDate, g as getCategoryOptions, h as getTagCategoryLabel, v as hasFormErrors, l as hasSelectedText, y as isDuplicateTagNameError, b as resolveTagSubmitError, i as sortFieldForColumn, _ as validateTagForm, o as withTagName };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
CHANGED
|
@@ -7,22 +7,30 @@ import { useMyEntityQuery as n } from "../../data-access/dist/index7.js";
|
|
|
7
7
|
import { useEntitySettingsQuery as r } from "../../data-access/dist/index8.js";
|
|
8
8
|
import { useEntityUsersQuery as i } from "../../data-access/dist/index10.js";
|
|
9
9
|
import "../../data-access/dist/index.js";
|
|
10
|
-
import { useCallback as a, useMemo as o } from "react";
|
|
10
|
+
import { useCallback as a, useMemo as o, useRef as s, useState as c } from "react";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
|
|
12
|
-
function
|
|
13
|
-
let
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
function l({ messages: l }) {
|
|
13
|
+
let u = n().data?.id, d = r(u), f = i(), p = o(() => e(d.data?.payables_ocr_auto_tagging), [d.data]), m = o(() => t(f.data?.data), [f.data]), h = a(async () => (await d.refetch()).data ?? d.data, [d]), g = s(Promise.resolve()), _ = s(0), [v, y] = c(!1), b = a((e) => {
|
|
14
|
+
_.current += 1, y(!0);
|
|
15
|
+
let t = g.current.then(e, e), n = () => {
|
|
16
|
+
--_.current, _.current === 0 && y(!1);
|
|
17
|
+
};
|
|
18
|
+
return g.current = t.then(n, n), t;
|
|
19
|
+
}, []), x = a(async () => {
|
|
20
|
+
let e = await h();
|
|
21
|
+
if (!e) throw Error(l.genericError);
|
|
16
22
|
return e;
|
|
17
|
-
}, [
|
|
23
|
+
}, [l.genericError, h]);
|
|
18
24
|
return {
|
|
19
|
-
entityId:
|
|
20
|
-
keywordsByTagId:
|
|
21
|
-
userNamesById:
|
|
22
|
-
settingsData:
|
|
23
|
-
refetchSettings:
|
|
24
|
-
requireFreshSettings:
|
|
25
|
+
entityId: u,
|
|
26
|
+
keywordsByTagId: p,
|
|
27
|
+
userNamesById: m,
|
|
28
|
+
settingsData: d.data,
|
|
29
|
+
refetchSettings: h,
|
|
30
|
+
requireFreshSettings: x,
|
|
31
|
+
withSettingsLock: b,
|
|
32
|
+
settingsBusy: v
|
|
25
33
|
};
|
|
26
34
|
}
|
|
27
35
|
//#endregion
|
|
28
|
-
export {
|
|
36
|
+
export { l as useEntitySettings };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
CHANGED
|
@@ -2,63 +2,79 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../../shared/ui/dist/index.js";
|
|
7
|
+
import { extractApiErrorMessage as t } from "../../../../shared/util/dist/lib/apiErrors.js";
|
|
8
|
+
import { computeNextOcrAutoTagging as n, withTagName as r } from "./index6.js";
|
|
9
|
+
import { useDeleteTagMutation as i } from "../../data-access/dist/index6.js";
|
|
10
|
+
import { useUpdateEntitySettingsMutation as a } from "../../data-access/dist/index9.js";
|
|
8
11
|
import "../../data-access/dist/index.js";
|
|
9
|
-
import { useCallback as
|
|
12
|
+
import { useCallback as o, useEffect as s, useRef as c, useState as l } from "react";
|
|
10
13
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
|
|
11
|
-
function
|
|
12
|
-
let { entityId:
|
|
13
|
-
|
|
14
|
-
}, []);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}, [
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
let x = r((e) => {
|
|
21
|
-
u && (y(), c(e), _(!0));
|
|
14
|
+
function u({ selectedTag: u, setSelectedTag: d, settings: f, messages: p, canWrite: m, canMutate: h }) {
|
|
15
|
+
let { entityId: g, requireFreshSettings: _, withSettingsLock: v, settingsBusy: y } = f, b = i(), x = a(), [S, C] = l(!1), [w, T] = l(), E = c(0), D = o(() => {
|
|
16
|
+
E.current += 1;
|
|
17
|
+
}, []), O = c(h);
|
|
18
|
+
O.current = h, s(() => {
|
|
19
|
+
m || (D(), C(!1));
|
|
20
|
+
}, [m, D]);
|
|
21
|
+
let k = o((e) => {
|
|
22
|
+
m && (D(), d(e), T(void 0), C(!0));
|
|
22
23
|
}, [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
]),
|
|
27
|
-
e || (
|
|
28
|
-
}, [
|
|
29
|
-
|
|
30
|
-
}, [
|
|
24
|
+
m,
|
|
25
|
+
D,
|
|
26
|
+
d
|
|
27
|
+
]), A = o((e) => {
|
|
28
|
+
e || (D(), T(void 0), C(!1));
|
|
29
|
+
}, [D]), j = o(() => {
|
|
30
|
+
D(), T(void 0), C(!1);
|
|
31
|
+
}, [D]);
|
|
31
32
|
return {
|
|
32
|
-
open:
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
33
|
+
open: S,
|
|
34
|
+
error: w,
|
|
35
|
+
requestDelete: k,
|
|
36
|
+
onOpenChange: A,
|
|
37
|
+
confirm: o(async () => {
|
|
38
|
+
if (!h || !u) return;
|
|
39
|
+
let i = u;
|
|
40
|
+
T(void 0);
|
|
41
|
+
let a = E.current, o = () => E.current === a;
|
|
42
|
+
await v(async () => {
|
|
43
|
+
let a;
|
|
44
|
+
try {
|
|
45
|
+
if (a = g ? await _() : void 0, !O.current) return;
|
|
46
|
+
await b.mutateAsync({ path: { tag_id: i.id } });
|
|
47
|
+
} catch (n) {
|
|
48
|
+
let r = t(n) ?? p.deleteError;
|
|
49
|
+
o() ? T(r) : e.error(r);
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
if (e.success(r(p.tagDeleted, i.name)), o() && (C(!1), d(void 0)), !g || !a) return;
|
|
53
|
+
let { changed: s, next: c } = n(a.payables_ocr_auto_tagging, i.id, []);
|
|
54
|
+
if (s && O.current) try {
|
|
55
|
+
await x.mutateAsync({
|
|
56
|
+
path: { entity_id: g },
|
|
57
|
+
body: { payables_ocr_auto_tagging: c }
|
|
46
58
|
});
|
|
59
|
+
} catch {
|
|
60
|
+
e.error(r(p.keywordCleanupError, i.name));
|
|
47
61
|
}
|
|
48
|
-
|
|
49
|
-
} catch {}
|
|
62
|
+
});
|
|
50
63
|
}, [
|
|
51
|
-
d,
|
|
52
|
-
s,
|
|
53
|
-
f,
|
|
54
|
-
p,
|
|
55
|
-
m,
|
|
56
64
|
h,
|
|
57
|
-
|
|
65
|
+
u,
|
|
66
|
+
g,
|
|
67
|
+
_,
|
|
68
|
+
v,
|
|
69
|
+
b,
|
|
70
|
+
x,
|
|
71
|
+
d,
|
|
72
|
+
p
|
|
58
73
|
]),
|
|
59
|
-
cancel:
|
|
60
|
-
isDeleting:
|
|
74
|
+
cancel: j,
|
|
75
|
+
isDeleting: b.isPending,
|
|
76
|
+
confirmDisabled: y
|
|
61
77
|
};
|
|
62
78
|
}
|
|
63
79
|
//#endregion
|
|
64
|
-
export {
|
|
80
|
+
export { u as useTagDelete };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js
CHANGED
|
@@ -2,130 +2,145 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
5
|
+
import { toast as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../../shared/ui/dist/index.js";
|
|
7
|
+
import { EMPTY_FORM_VALUES as t } from "./index4.js";
|
|
8
|
+
import { buildKeywordsByTagId as n, computeNextOcrAutoTagging as r, getCategoryOptions as i, hasFormErrors as a, resolveTagSubmitError as o, validateTagForm as s, withTagName as c } from "./index6.js";
|
|
9
|
+
import { useCreateTagMutation as l } from "../../data-access/dist/index4.js";
|
|
10
|
+
import { useUpdateTagMutation as u } from "../../data-access/dist/index5.js";
|
|
11
|
+
import { useUpdateEntitySettingsMutation as d } from "../../data-access/dist/index9.js";
|
|
10
12
|
import "../../data-access/dist/index.js";
|
|
11
|
-
import { useCallback as
|
|
13
|
+
import { useCallback as f, useEffect as p, useMemo as m, useRef as h, useState as g } from "react";
|
|
12
14
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js
|
|
13
|
-
function
|
|
14
|
-
let { entityId:
|
|
15
|
-
|
|
15
|
+
function _({ selectedTag: _, setSelectedTag: v, settings: y, messages: b, canWrite: x, canMutate: S }) {
|
|
16
|
+
let { entityId: C, settingsData: w, refetchSettings: T, requireFreshSettings: E, withSettingsLock: D, settingsBusy: O } = y, k = l(), A = u(), j = d(), [M, N] = g(!1), [P, F] = g("create"), [I, L] = g(t), [R, z] = g({}), B = m(() => i(), []), V = h(0), H = O || k.isPending || A.isPending || j.isPending, U = f(() => {
|
|
17
|
+
V.current += 1;
|
|
16
18
|
}, []);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
return
|
|
24
|
-
open:
|
|
25
|
-
mode:
|
|
26
|
-
values:
|
|
27
|
-
errors:
|
|
28
|
-
categoryOptions:
|
|
29
|
-
isSubmitting:
|
|
30
|
-
openCreate:
|
|
31
|
-
|
|
19
|
+
p(() => {
|
|
20
|
+
x || (U(), N(!1));
|
|
21
|
+
}, [x, U]);
|
|
22
|
+
let W = h(x);
|
|
23
|
+
W.current = x;
|
|
24
|
+
let G = h(S);
|
|
25
|
+
return G.current = S, {
|
|
26
|
+
open: M,
|
|
27
|
+
mode: P,
|
|
28
|
+
values: I,
|
|
29
|
+
errors: R,
|
|
30
|
+
categoryOptions: B,
|
|
31
|
+
isSubmitting: H,
|
|
32
|
+
openCreate: f(() => {
|
|
33
|
+
x && (U(), F("create"), v(void 0), L(t), z({}), N(!0));
|
|
32
34
|
}, [
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
35
|
+
x,
|
|
36
|
+
U,
|
|
37
|
+
v
|
|
36
38
|
]),
|
|
37
|
-
openEdit:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
openEdit: f((e) => {
|
|
40
|
+
if (!x) return;
|
|
41
|
+
U();
|
|
42
|
+
let t = V.current;
|
|
43
|
+
(async () => {
|
|
44
|
+
let r = w ?? await T();
|
|
45
|
+
if (!W.current || V.current !== t) return;
|
|
46
|
+
let i = n(r?.payables_ocr_auto_tagging);
|
|
47
|
+
v(e), F("edit"), L({
|
|
43
48
|
name: e.name,
|
|
44
49
|
category: e.category ?? "",
|
|
45
|
-
keywords:
|
|
50
|
+
keywords: i[e.id] ?? [],
|
|
46
51
|
keywordsInput: ""
|
|
47
|
-
}),
|
|
48
|
-
})()
|
|
52
|
+
}), z({}), N(!0);
|
|
53
|
+
})();
|
|
49
54
|
}, [
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
x,
|
|
56
|
+
U,
|
|
57
|
+
w,
|
|
58
|
+
T,
|
|
59
|
+
v
|
|
55
60
|
]),
|
|
56
|
-
onOpenChange:
|
|
57
|
-
e || (
|
|
58
|
-
}, [
|
|
59
|
-
close:
|
|
60
|
-
|
|
61
|
-
}, [
|
|
62
|
-
onNameChange:
|
|
61
|
+
onOpenChange: f((e) => {
|
|
62
|
+
e || (U(), N(!1));
|
|
63
|
+
}, [U]),
|
|
64
|
+
close: f(() => {
|
|
65
|
+
U(), N(!1);
|
|
66
|
+
}, [U]),
|
|
67
|
+
onNameChange: f((e) => L((t) => ({
|
|
63
68
|
...t,
|
|
64
69
|
name: e
|
|
65
70
|
})), []),
|
|
66
|
-
onCategoryChange:
|
|
71
|
+
onCategoryChange: f((e) => L((t) => ({
|
|
67
72
|
...t,
|
|
68
73
|
category: e
|
|
69
74
|
})), []),
|
|
70
|
-
onKeywordsChange:
|
|
75
|
+
onKeywordsChange: f((e) => L((t) => ({
|
|
71
76
|
...t,
|
|
72
77
|
keywords: e
|
|
73
78
|
})), []),
|
|
74
|
-
onKeywordsInputChange:
|
|
79
|
+
onKeywordsInputChange: f((e) => L((t) => ({
|
|
75
80
|
...t,
|
|
76
81
|
keywordsInput: e
|
|
77
82
|
})), []),
|
|
78
|
-
submit:
|
|
79
|
-
if (!
|
|
80
|
-
let
|
|
81
|
-
if (
|
|
82
|
-
|
|
83
|
+
submit: f(async () => {
|
|
84
|
+
if (!S) return;
|
|
85
|
+
let t = s(I, b);
|
|
86
|
+
if (a(t)) {
|
|
87
|
+
z(t);
|
|
83
88
|
return;
|
|
84
89
|
}
|
|
85
|
-
|
|
86
|
-
let
|
|
87
|
-
name:
|
|
88
|
-
...
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
90
|
+
z({});
|
|
91
|
+
let n = I.name.trim(), i = I.category === "" ? void 0 : I.category, l = {
|
|
92
|
+
name: n,
|
|
93
|
+
...i ? { category: i } : {}
|
|
94
|
+
}, u = V.current, d = () => V.current === u, f = (t) => {
|
|
95
|
+
d() ? (v(t), F("edit"), z({ form: b.keywordsNotSaved })) : e.error(c(b.keywordSyncError, n));
|
|
96
|
+
}, p;
|
|
97
|
+
await D(async () => {
|
|
98
|
+
try {
|
|
99
|
+
let t = I.keywords.length > 0 || P === "edit", i = C && t ? await E() : void 0;
|
|
100
|
+
if (!G.current) return;
|
|
101
|
+
let a = P === "edit" && _ ? await A.mutateAsync({
|
|
102
|
+
path: { tag_id: _.id },
|
|
103
|
+
body: l
|
|
104
|
+
}) : await k.mutateAsync({ body: l });
|
|
105
|
+
if (p = a, C && i) {
|
|
106
|
+
let { changed: e, next: t } = r(i.payables_ocr_auto_tagging, a.id, I.keywords);
|
|
107
|
+
if (e) {
|
|
108
|
+
if (!G.current) {
|
|
109
|
+
f(a);
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
await j.mutateAsync({
|
|
113
|
+
path: { entity_id: C },
|
|
114
|
+
body: { payables_ocr_auto_tagging: t }
|
|
115
|
+
});
|
|
103
116
|
}
|
|
104
|
-
await D.mutateAsync({
|
|
105
|
-
path: { entity_id: x },
|
|
106
|
-
body: { payables_ocr_auto_tagging: i }
|
|
107
|
-
});
|
|
108
117
|
}
|
|
118
|
+
e.success(c(P === "edit" ? b.tagUpdated : b.tagCreated, n)), d() && N(!1);
|
|
119
|
+
} catch (t) {
|
|
120
|
+
if (p) {
|
|
121
|
+
f(p);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let n = o(t, b, { preferApiMessage: !0 });
|
|
125
|
+
d() ? z(n) : e.error(n.form ?? n.name ?? b.genericError);
|
|
109
126
|
}
|
|
110
|
-
|
|
111
|
-
} catch (e) {
|
|
112
|
-
l() && F(a(e, v, { preferApiMessage: !0 }));
|
|
113
|
-
}
|
|
127
|
+
});
|
|
114
128
|
}, [
|
|
115
|
-
|
|
116
|
-
|
|
129
|
+
S,
|
|
130
|
+
I,
|
|
131
|
+
P,
|
|
132
|
+
F,
|
|
133
|
+
v,
|
|
134
|
+
_,
|
|
135
|
+
C,
|
|
136
|
+
k,
|
|
117
137
|
A,
|
|
118
138
|
j,
|
|
119
|
-
|
|
120
|
-
h,
|
|
121
|
-
x,
|
|
122
|
-
T,
|
|
139
|
+
b,
|
|
123
140
|
E,
|
|
124
|
-
D
|
|
125
|
-
v,
|
|
126
|
-
w
|
|
141
|
+
D
|
|
127
142
|
])
|
|
128
143
|
};
|
|
129
144
|
}
|
|
130
145
|
//#endregion
|
|
131
|
-
export {
|
|
146
|
+
export { _ as useTagForm };
|
|
@@ -2,26 +2,34 @@ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n,
|
|
|
2
2
|
import { TAG_DELETE_DIALOG_LABELS_EN as s } from "./index2.js";
|
|
3
3
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
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,
|
|
6
|
-
let
|
|
5
|
+
function u({ open: u, onOpenChange: d, tagName: f, isDeleting: p, error: m, confirmDisabled: h, onConfirm: g, onCancel: _, labels: v }) {
|
|
6
|
+
let y = {
|
|
7
7
|
...s,
|
|
8
|
-
...
|
|
8
|
+
...v
|
|
9
9
|
};
|
|
10
10
|
return /* @__PURE__ */ c(e, {
|
|
11
11
|
open: u,
|
|
12
12
|
onOpenChange: d,
|
|
13
|
-
children: /* @__PURE__ */ l(t, { children: [
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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
|
+
] })
|
|
25
33
|
});
|
|
26
34
|
}
|
|
27
35
|
//#endregion
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.152", n = "7687365879f9ac21a36e43eb14f11441ec7386dc", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|