@tesouro/embedded-components-react 0.5.150 → 0.5.153
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/lib/monite-sdk.d.ts +2 -44
- package/dist/lib/monite-sdk.js +9 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +10 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index21.js +0 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index22.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +1 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index373.js +8 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index379.js +1 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index413.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index552.js +21 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index553.js +72 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index554.js +19 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index555.js +20 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index556.js +5 -51
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index557.js +10 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index558.js +11 -167
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index559.js +133 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index560.js +5 -184
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index561.js +8 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index562.js +3 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index563.js +221 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index564.js +11 -21
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index565.js +33 -74
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index566.js +180 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index567.js +201 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index568.js +98 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index569.js +63 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index570.js +55 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index571.js +89 -128
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index572.js +40 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index573.js +75 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index574.js +87 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index575.js +12 -220
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index576.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index577.js +17 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index578.js +5 -184
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index579.js +20 -202
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index580.js +1 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index581.js +60 -66
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index582.js +28 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index583.js +2 -92
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index584.js +33 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index585.js +14 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index586.js +28 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index587.js +28 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index588.js +2 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index589.js +97 -17
- 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/dist/libs/tesouro-embedded-components-react/shared/monite-wrapper/feature/dist/lib/MoniteWrapper.js +1 -1
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index590.js +0 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index591.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index592.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index593.js +0 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index594.js +0 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index595.js +0 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index596.js +0 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index597.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index598.js +0 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index599.js +0 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index600.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index601.js +0 -97
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 };
|