@tesouro/embedded-components-react 0.5.154 → 0.5.156
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 +1 -2
- package/dist/index.css +0 -3
- package/dist/index.d.ts +0 -3
- package/dist/lib/SettingsWidget.d.ts +0 -3
- package/dist/lib/WidgetSuite.d.ts +0 -3
- 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/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
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.156", n = "6a09db3b90b5c3e5343af062b1f6873d8e55c916", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/package.json
CHANGED
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { useTagsQuery as e } from "./index2.js";
|
|
2
|
-
import "./index3.js";
|
|
3
|
-
import { useCreateTagMutation as t } from "./index4.js";
|
|
4
|
-
import { useUpdateTagMutation as n } from "./index5.js";
|
|
5
|
-
import { useDeleteTagMutation as r } from "./index6.js";
|
|
6
|
-
import { useMyEntityQuery as i } from "./index7.js";
|
|
7
|
-
import { useEntitySettingsQuery as a } from "./index8.js";
|
|
8
|
-
import { useUpdateEntitySettingsMutation as o } from "./index9.js";
|
|
9
|
-
import { useEntityUsersQuery as s } from "./index10.js";
|
|
10
|
-
export { t as useCreateTagMutation, r as useDeleteTagMutation, a as useEntitySettingsQuery, s as useEntityUsersQuery, i as useMyEntityQuery, e as useTagsQuery, o as useUpdateEntitySettingsMutation, n as useUpdateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getEntityUsersOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useQuery as i } from "@tanstack/react-query";
|
|
11
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js
|
|
12
|
-
var a = 100;
|
|
13
|
-
function o(o = a) {
|
|
14
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l), p = e({
|
|
15
|
-
query: { limit: o },
|
|
16
|
-
client: s,
|
|
17
|
-
headers: r(c)
|
|
18
|
-
});
|
|
19
|
-
return i({
|
|
20
|
-
...t(p, {
|
|
21
|
-
authEpoch: u,
|
|
22
|
-
organizationPending: d
|
|
23
|
-
}),
|
|
24
|
-
enabled: f
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { o as useEntityUsersQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getTagsOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useQuery as i } from "@tanstack/react-query";
|
|
11
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js
|
|
12
|
-
function a({ enabled: a, ...o } = {}) {
|
|
13
|
-
let { client: s, organizationId: c, widgetToken: l, authEpoch: u, organizationPending: d } = n(), f = !!(c && l) && (a === !0 || a === void 0), p = e({
|
|
14
|
-
query: o,
|
|
15
|
-
client: s,
|
|
16
|
-
headers: r(c)
|
|
17
|
-
});
|
|
18
|
-
return i({
|
|
19
|
-
...t(p, {
|
|
20
|
-
authEpoch: u,
|
|
21
|
-
organizationPending: d
|
|
22
|
-
}, { carryWithinOrg: !0 }),
|
|
23
|
-
enabled: f
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
//#endregion
|
|
27
|
-
export { a as useTagsQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { getEntitiesIdSettingsQueryKey as e, getTagsQueryKey as t } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
-
import { organizationHeaders as n } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
3
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js
|
|
5
|
-
var r = ({ client: t, entityId: n }) => e({
|
|
6
|
-
client: t,
|
|
7
|
-
path: { entity_id: n }
|
|
8
|
-
}), i = ({ client: e, organizationId: r }) => t({
|
|
9
|
-
client: e,
|
|
10
|
-
headers: n(r)
|
|
11
|
-
});
|
|
12
|
-
//#endregion
|
|
13
|
-
export { r as entitySettingsInvalidationKey, i as tagsInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { postTags as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./index3.js";
|
|
11
|
-
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js
|
|
13
|
-
function o() {
|
|
14
|
-
let { client: o, organizationId: s } = n();
|
|
15
|
-
return a({
|
|
16
|
-
mutationFn: async ({ body: t }) => {
|
|
17
|
-
let { data: n } = await e({
|
|
18
|
-
client: o,
|
|
19
|
-
headers: r(s),
|
|
20
|
-
body: t,
|
|
21
|
-
throwOnError: !0
|
|
22
|
-
});
|
|
23
|
-
return n;
|
|
24
|
-
},
|
|
25
|
-
onSuccess: async () => {
|
|
26
|
-
await t(i({
|
|
27
|
-
client: o,
|
|
28
|
-
organizationId: s
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
//#endregion
|
|
34
|
-
export { o as useCreateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { patchTagsId as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./index3.js";
|
|
11
|
-
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js
|
|
13
|
-
function o() {
|
|
14
|
-
let { client: o, organizationId: s } = n();
|
|
15
|
-
return a({
|
|
16
|
-
mutationFn: async ({ path: t, body: n }) => {
|
|
17
|
-
let { data: i } = await e({
|
|
18
|
-
client: o,
|
|
19
|
-
headers: r(s),
|
|
20
|
-
path: t,
|
|
21
|
-
body: n,
|
|
22
|
-
throwOnError: !0
|
|
23
|
-
});
|
|
24
|
-
return i;
|
|
25
|
-
},
|
|
26
|
-
onSuccess: async () => {
|
|
27
|
-
await t(i({
|
|
28
|
-
client: o,
|
|
29
|
-
organizationId: s
|
|
30
|
-
}));
|
|
31
|
-
}
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
//#endregion
|
|
35
|
-
export { o as useUpdateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { deleteTagsId as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./index3.js";
|
|
11
|
-
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js
|
|
13
|
-
function o() {
|
|
14
|
-
let { client: o, organizationId: s } = n();
|
|
15
|
-
return a({
|
|
16
|
-
mutationFn: async ({ path: t }) => {
|
|
17
|
-
await e({
|
|
18
|
-
client: o,
|
|
19
|
-
headers: r(s),
|
|
20
|
-
path: t,
|
|
21
|
-
throwOnError: !0
|
|
22
|
-
});
|
|
23
|
-
},
|
|
24
|
-
onSuccess: async () => {
|
|
25
|
-
await t(i({
|
|
26
|
-
client: o,
|
|
27
|
-
organizationId: s
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { o as useDeleteTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getEntitiesMeOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js
|
|
11
|
-
function i() {
|
|
12
|
-
let { client: i, organizationId: a, widgetToken: o, authEpoch: s, organizationPending: c } = n(), l = !!(a && o), u = e({ client: i });
|
|
13
|
-
return r({
|
|
14
|
-
...t(u, {
|
|
15
|
-
authEpoch: s,
|
|
16
|
-
organizationPending: c
|
|
17
|
-
}),
|
|
18
|
-
enabled: l
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { i as useMyEntityQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { getEntitiesIdSettingsOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useQuery as r } from "@tanstack/react-query";
|
|
10
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js
|
|
11
|
-
function i(i) {
|
|
12
|
-
let { client: a, organizationId: o, widgetToken: s, authEpoch: c, organizationPending: l } = n(), u = !!(o && s && i), d = e({
|
|
13
|
-
client: a,
|
|
14
|
-
path: { entity_id: i ?? "" }
|
|
15
|
-
});
|
|
16
|
-
return r({
|
|
17
|
-
...t(d, {
|
|
18
|
-
authEpoch: c,
|
|
19
|
-
organizationPending: l
|
|
20
|
-
}),
|
|
21
|
-
enabled: u
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
export { i as useEntitySettingsQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { patchEntitiesIdSettingsMutation as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
-
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
|
-
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { entitySettingsInvalidationKey as r } from "./index3.js";
|
|
10
|
-
import { useMutation as i } from "@tanstack/react-query";
|
|
11
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js
|
|
12
|
-
function a() {
|
|
13
|
-
let { client: a } = n();
|
|
14
|
-
return i({
|
|
15
|
-
...e({ client: a }),
|
|
16
|
-
onSuccess: async (e, n) => {
|
|
17
|
-
let i = n?.path?.entity_id;
|
|
18
|
-
i && await t(r({
|
|
19
|
-
client: a,
|
|
20
|
-
entityId: i
|
|
21
|
-
}));
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
//#endregion
|
|
26
|
-
export { a as useUpdateEntitySettingsMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { buildTagRows as e, sortFieldForColumn as t } from "./index6.js";
|
|
6
|
-
import { useTagsQuery as n } from "../../data-access/dist/index2.js";
|
|
7
|
-
import "../../data-access/dist/index.js";
|
|
8
|
-
import { useCallback as r, useMemo as i, useState as a } from "react";
|
|
9
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js
|
|
10
|
-
function o({ keywordsByTagId: o, userNamesById: s, pageSizeOptions: c }) {
|
|
11
|
-
let [l, u] = a([{
|
|
12
|
-
id: "createdAtLabel",
|
|
13
|
-
desc: !0
|
|
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
|
-
keywordsByTagId: o,
|
|
22
|
-
userNamesById: s
|
|
23
|
-
}), [
|
|
24
|
-
_.data,
|
|
25
|
-
o,
|
|
26
|
-
s
|
|
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
|
-
let r = t(n[0]?.id), i = n[0]?.desc ? "desc" : "asc";
|
|
31
|
-
(r !== h || i !== g) && m(void 0);
|
|
32
|
-
}, [
|
|
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
|
-
return {
|
|
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
|
-
};
|
|
60
|
-
}
|
|
61
|
-
//#endregion
|
|
62
|
-
export { o as useTagsTable };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { TAGS_MESSAGE_LABELS_EN as e } from "./index5.js";
|
|
6
|
-
import { hasSelectedText as t } from "./index6.js";
|
|
7
|
-
import { useEntitySettings as n } from "./index7.js";
|
|
8
|
-
import { useTagDelete as r } from "./index8.js";
|
|
9
|
-
import { useTagForm as i } from "./index9.js";
|
|
10
|
-
import { useTagsTable as a } from "./index10.js";
|
|
11
|
-
import { useCallback as o, useMemo as s, useState as c } from "react";
|
|
12
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
|
|
13
|
-
function l({ messageLabels: l, canWrite: u, canMutate: d, pageSizeOptions: f }) {
|
|
14
|
-
let p = s(() => ({
|
|
15
|
-
...e,
|
|
16
|
-
...l
|
|
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,
|
|
26
|
-
canWrite: u,
|
|
27
|
-
canMutate: d
|
|
28
|
-
}), y = r({
|
|
29
|
-
selectedTag: m,
|
|
30
|
-
setSelectedTag: h,
|
|
31
|
-
settings: g,
|
|
32
|
-
canWrite: u,
|
|
33
|
-
canMutate: d,
|
|
34
|
-
messages: p
|
|
35
|
-
});
|
|
36
|
-
return {
|
|
37
|
-
selectedTag: m,
|
|
38
|
-
table: _,
|
|
39
|
-
form: v,
|
|
40
|
-
del: y,
|
|
41
|
-
handleRowClick: o((e) => {
|
|
42
|
-
if (t()) return;
|
|
43
|
-
let n = _.findTag(e.id);
|
|
44
|
-
n && v.openEdit(n);
|
|
45
|
-
}, [_, v]),
|
|
46
|
-
handleDeleteClick: o((e) => {
|
|
47
|
-
let t = _.findTag(e.id);
|
|
48
|
-
t && y.requestDelete(t);
|
|
49
|
-
}, [_, y]),
|
|
50
|
-
handleFormDelete: o(() => {
|
|
51
|
-
v.close(), m && y.requestDelete(m);
|
|
52
|
-
}, [
|
|
53
|
-
v,
|
|
54
|
-
m,
|
|
55
|
-
y
|
|
56
|
-
])
|
|
57
|
-
};
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
export { l as useTagsWidget };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js
DELETED
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
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";
|
|
10
|
-
import "../../../../shared/feature/dist/index.js";
|
|
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";
|
|
18
|
-
import "../../ui/dist/index.js";
|
|
19
|
-
import { useEffect as p, useMemo as m } from "react";
|
|
20
|
-
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
21
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index12.js
|
|
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
|
|
32
|
-
});
|
|
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,
|
|
53
|
-
emptyStateTestId: "tags-widget-empty-state"
|
|
54
|
-
}),
|
|
55
|
-
/* @__PURE__ */ g(f, {
|
|
56
|
-
open: D.open,
|
|
57
|
-
onOpenChange: D.onOpenChange,
|
|
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,
|
|
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
|
|
84
|
-
})
|
|
85
|
-
] });
|
|
86
|
-
}
|
|
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,
|
|
90
|
-
baseUrl: e,
|
|
91
|
-
widgetToken: t,
|
|
92
|
-
organizationId: r,
|
|
93
|
-
configClient: i,
|
|
94
|
-
gatewayRouting: a,
|
|
95
|
-
linkComponent: s,
|
|
96
|
-
implementation: c,
|
|
97
|
-
uiFramework: l,
|
|
98
|
-
errorFallback: u,
|
|
99
|
-
onError: d,
|
|
100
|
-
analytics: f,
|
|
101
|
-
disclosuresAcceptance: p,
|
|
102
|
-
providerLabels: m,
|
|
103
|
-
children: /* @__PURE__ */ g(v, { ...h })
|
|
104
|
-
});
|
|
105
|
-
}
|
|
106
|
-
//#endregion
|
|
107
|
-
export { y as TagsWidget, y as default };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index2.js
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { SETTINGS_WIDGET_NAME as e } from "../../../shared/util/dist/lib/widgetName.js";
|
|
2
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index2.js
|
|
3
|
-
var t = `${e}.tags`, n = { Mounted: `${t}.mounted` };
|
|
4
|
-
//#endregion
|
|
5
|
-
export { n as TagsWidgetAnalyticsEvent, t as WIDGET_NAME };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index3.js
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { hasAnyScope as e } from "../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
2
|
-
import { Scope as t } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
3
|
-
import "../../../../shared/data-access/dist/index.js";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index3.js
|
|
5
|
-
var n = [t.AccountingConfigWriteOrg];
|
|
6
|
-
function r(t) {
|
|
7
|
-
return { canWrite: e(new Set(t ?? []), n) };
|
|
8
|
-
}
|
|
9
|
-
//#endregion
|
|
10
|
-
export { r as getTagsPermissions };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js
|
|
2
|
-
var e = [
|
|
3
|
-
10,
|
|
4
|
-
25,
|
|
5
|
-
50,
|
|
6
|
-
100
|
|
7
|
-
], t = {
|
|
8
|
-
name: "",
|
|
9
|
-
category: "",
|
|
10
|
-
keywords: [],
|
|
11
|
-
keywordsInput: ""
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { t as EMPTY_FORM_VALUES, e as PAGE_SIZE_OPTIONS };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js
|
|
2
|
-
var e = {
|
|
3
|
-
nameRequired: "Required",
|
|
4
|
-
nameTooLong: "Value must be at most '255' characters",
|
|
5
|
-
keywordTooShort: "Keyword should be at least 2 characters long",
|
|
6
|
-
keywordTooLong: "Keyword should be at most 25 characters long",
|
|
7
|
-
genericError: "Something went wrong. Please try again.",
|
|
8
|
-
duplicateName: "A tag with this name already exists.",
|
|
9
|
-
keywordsNotSaved: "The tag was saved, but its keywords were not. Save again to finish."
|
|
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 = {
|
|
19
|
-
document_type: "Document Type",
|
|
20
|
-
department: "Department",
|
|
21
|
-
project: "Project",
|
|
22
|
-
cost_center: "Cost Center",
|
|
23
|
-
vendor_type: "Vendor Type",
|
|
24
|
-
payment_method: "Payment Method",
|
|
25
|
-
approval_status: "Approval Status"
|
|
26
|
-
};
|
|
27
|
-
//#endregion
|
|
28
|
-
export { t as TAGS_MESSAGE_LABELS_EN, n as TAG_CATEGORY_LABELS_EN, e as TAG_MESSAGE_LABELS_EN };
|