@tesouro/embedded-components-react 0.5.119 → 0.5.121
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/bill-pay-widget/ui/dist/index82.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js +6 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +8 -13
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +19 -10
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +6 -31
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +13 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +14 -22
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +5 -4
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index2.js +1 -14
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +24 -122
- 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/tag-selection/data-access/dist/index.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index2.js +24 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index3.js +10 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index4.js +34 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index5.js +35 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index6.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index.js +3 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index2.js +17 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index3.js +126 -0
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +0 -25
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +0 -19
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +0 -22
- 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/ui/dist/index5.js +0 -28
|
@@ -95,7 +95,7 @@ function S({ rows: S, isLoading: C, isError: w, sorting: Se, onSortingChange: Ce
|
|
|
95
95
|
}, Le = (e) => {
|
|
96
96
|
if (!Y) return;
|
|
97
97
|
e.preventDefault(), J(!1);
|
|
98
|
-
let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = ie(t, h, R !== 1)
|
|
98
|
+
let t = e.dataTransfer.files ? Array.from(e.dataTransfer.files) : [], n = ie(t, h, R !== 1);
|
|
99
99
|
n.length && L?.(n);
|
|
100
100
|
}, Q = _(() => {
|
|
101
101
|
let e = (e) => function({ column: t }) {
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "./index3.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
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 };
|
|
1
|
+
import { useMyEntityQuery as e } from "./index2.js";
|
|
2
|
+
import { useEntitySettingsQuery as t } from "./index3.js";
|
|
3
|
+
import "./index4.js";
|
|
4
|
+
import { useUpdateEntitySettingsMutation as n } from "./index5.js";
|
|
5
|
+
import { useEntityUsersQuery as r } from "./index6.js";
|
|
6
|
+
export { t as useEntitySettingsQuery, r as useEntityUsersQuery, e as useMyEntityQuery, n as useUpdateEntitySettingsMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js
CHANGED
|
@@ -2,23 +2,18 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { getEntitiesMeOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
6
|
import { withAuthEpoch as t } from "../../../../shared/data-access/dist/lib/withAuthEpoch.js";
|
|
7
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
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useQuery as
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
11
10
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js
|
|
12
|
-
function
|
|
13
|
-
let { client:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return i({
|
|
19
|
-
...t(f, u),
|
|
20
|
-
enabled: d
|
|
11
|
+
function i() {
|
|
12
|
+
let { client: i, organizationId: a, widgetToken: o, authEpoch: s } = n(), c = !!(a && o), l = e({ client: i });
|
|
13
|
+
return r({
|
|
14
|
+
...t(l, s),
|
|
15
|
+
enabled: c
|
|
21
16
|
});
|
|
22
17
|
}
|
|
23
18
|
//#endregion
|
|
24
|
-
export {
|
|
19
|
+
export { i as useMyEntityQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js
CHANGED
|
@@ -1,13 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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";
|
|
3
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useQuery as r } from "@tanstack/react-query";
|
|
4
10
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js
|
|
5
|
-
|
|
6
|
-
client: e
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
function i(i) {
|
|
12
|
+
let { client: a, organizationId: o, widgetToken: s, authEpoch: c } = n(), l = !!(o && s && i), u = e({
|
|
13
|
+
client: a,
|
|
14
|
+
path: { entity_id: i ?? "" }
|
|
15
|
+
});
|
|
16
|
+
return r({
|
|
17
|
+
...t(u, c),
|
|
18
|
+
enabled: l
|
|
19
|
+
});
|
|
20
|
+
}
|
|
12
21
|
//#endregion
|
|
13
|
-
export { i as
|
|
22
|
+
export { i as useEntitySettingsQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js
CHANGED
|
@@ -1,34 +1,9 @@
|
|
|
1
|
-
|
|
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";
|
|
1
|
+
import { getEntitiesIdSettingsQueryKey as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
9
2
|
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
3
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
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
|
-
}
|
|
4
|
+
var t = ({ client: t, entityId: n }) => e({
|
|
5
|
+
client: t,
|
|
6
|
+
path: { entity_id: n }
|
|
7
|
+
});
|
|
33
8
|
//#endregion
|
|
34
|
-
export {
|
|
9
|
+
export { t as entitySettingsInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js
CHANGED
|
@@ -2,34 +2,25 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { patchEntitiesIdSettingsMutation as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
6
|
import { invalidateAllClients as t } from "../../../../shared/data-access/dist/lib/clientRegistry.js";
|
|
7
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
8
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as
|
|
9
|
+
import { entitySettingsInvalidationKey as r } from "./index4.js";
|
|
10
|
+
import { useMutation as i } from "@tanstack/react-query";
|
|
12
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js
|
|
13
|
-
function
|
|
14
|
-
let { client:
|
|
15
|
-
return
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
throwOnError: !0
|
|
23
|
-
});
|
|
24
|
-
return i;
|
|
25
|
-
},
|
|
26
|
-
onSuccess: async () => {
|
|
27
|
-
await t(i({
|
|
28
|
-
client: o,
|
|
29
|
-
organizationId: s
|
|
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
|
|
30
21
|
}));
|
|
31
22
|
}
|
|
32
23
|
});
|
|
33
24
|
}
|
|
34
25
|
//#endregion
|
|
35
|
-
export {
|
|
26
|
+
export { a as useUpdateEntitySettingsMutation };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js
CHANGED
|
@@ -2,32 +2,24 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
7
|
import { useEmbedApi as n } from "../../../../shared/data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../../shared/data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../../shared/data-access/dist/index.js";
|
|
10
|
-
import {
|
|
11
|
-
import { useMutation as a } from "@tanstack/react-query";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
12
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
onSuccess: async () => {
|
|
25
|
-
await t(i({
|
|
26
|
-
client: o,
|
|
27
|
-
organizationId: s
|
|
28
|
-
}));
|
|
29
|
-
}
|
|
12
|
+
var a = 100;
|
|
13
|
+
function o(o = a) {
|
|
14
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(), d = !!(c && l), f = e({
|
|
15
|
+
query: { limit: o },
|
|
16
|
+
client: s,
|
|
17
|
+
headers: r(c)
|
|
18
|
+
});
|
|
19
|
+
return i({
|
|
20
|
+
...t(f, u),
|
|
21
|
+
enabled: d
|
|
30
22
|
});
|
|
31
23
|
}
|
|
32
24
|
//#endregion
|
|
33
|
-
export { o as
|
|
25
|
+
export { o as useEntityUsersQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
CHANGED
|
@@ -9,9 +9,10 @@ import { TagsWidgetAnalyticsEvent as n, WIDGET_NAME as r } from "./index2.js";
|
|
|
9
9
|
import { PAGE_SIZE_OPTIONS as i } from "./index3.js";
|
|
10
10
|
import { useTagsWidget as a } from "./index10.js";
|
|
11
11
|
import { TagsScreen as o } from "../../ui/dist/index3.js";
|
|
12
|
-
import {
|
|
13
|
-
import { TagDeleteDialog as c } from "../../ui/dist/index5.js";
|
|
12
|
+
import { TagDeleteDialog as s } from "../../ui/dist/index4.js";
|
|
14
13
|
import "../../ui/dist/index.js";
|
|
14
|
+
import { TagFormSheet as c } from "../../../../shared/tag-selection/ui/dist/index3.js";
|
|
15
|
+
import "../../../../shared/tag-selection/ui/dist/index.js";
|
|
15
16
|
import { useEffect as l } from "react";
|
|
16
17
|
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
17
18
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js
|
|
@@ -42,7 +43,7 @@ function p({ pageSizeOptions: t = i, screenLabels: r, formLabels: p, deleteLabel
|
|
|
42
43
|
labels: r,
|
|
43
44
|
emptyStateTestId: "tags-widget-empty-state"
|
|
44
45
|
}),
|
|
45
|
-
/* @__PURE__ */ d(
|
|
46
|
+
/* @__PURE__ */ d(c, {
|
|
46
47
|
open: y.open,
|
|
47
48
|
onOpenChange: y.onOpenChange,
|
|
48
49
|
mode: y.mode,
|
|
@@ -61,7 +62,7 @@ function p({ pageSizeOptions: t = i, screenLabels: r, formLabels: p, deleteLabel
|
|
|
61
62
|
onDelete: C,
|
|
62
63
|
labels: p
|
|
63
64
|
}),
|
|
64
|
-
/* @__PURE__ */ d(
|
|
65
|
+
/* @__PURE__ */ d(s, {
|
|
65
66
|
open: b.open,
|
|
66
67
|
onOpenChange: b.onOpenChange,
|
|
67
68
|
tagName: _?.name ?? "",
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { buildKeywordsByTagId as e, buildUserNamesById as t } from "./index5.js";
|
|
6
|
-
import { useMyEntityQuery as n } from "../../data-access/dist/
|
|
7
|
-
import { useEntitySettingsQuery as r } from "../../data-access/dist/
|
|
8
|
-
import { useEntityUsersQuery as i } from "../../data-access/dist/
|
|
6
|
+
import { useMyEntityQuery as n } from "../../data-access/dist/index2.js";
|
|
7
|
+
import { useEntitySettingsQuery as r } from "../../data-access/dist/index3.js";
|
|
8
|
+
import { useEntityUsersQuery as i } from "../../data-access/dist/index6.js";
|
|
9
9
|
import "../../data-access/dist/index.js";
|
|
10
10
|
import { useCallback as a, useMemo as o } from "react";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
CHANGED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { computeNextOcrAutoTagging as e } from "./index5.js";
|
|
6
|
-
import {
|
|
7
|
-
import { useUpdateEntitySettingsMutation as n } from "../../data-access/dist/index9.js";
|
|
6
|
+
import { useUpdateEntitySettingsMutation as t } from "../../data-access/dist/index5.js";
|
|
8
7
|
import "../../data-access/dist/index.js";
|
|
8
|
+
import { useDeleteTagMutation as n } from "../../../../shared/tag-selection/data-access/dist/index6.js";
|
|
9
|
+
import "../../../../shared/tag-selection/data-access/dist/index.js";
|
|
9
10
|
import { useCallback as r, useState as i } from "react";
|
|
10
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
|
|
11
12
|
function a({ selectedTag: a, setSelectedTag: o, settings: s }) {
|
|
12
|
-
let { entityId: c, requireFreshSettings: l } = s, u =
|
|
13
|
+
let { entityId: c, requireFreshSettings: l } = s, u = n(), d = t(), [f, p] = i(!1), m = r((e) => {
|
|
13
14
|
o(e), p(!0);
|
|
14
15
|
}, [o]), h = r((e) => {
|
|
15
16
|
e || p(!1);
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
CHANGED
|
@@ -5,14 +5,15 @@
|
|
|
5
5
|
import { extractApiErrorMessage as e } from "../../../../shared/util/dist/lib/apiErrors.js";
|
|
6
6
|
import { EMPTY_FORM_VALUES as t } from "./index3.js";
|
|
7
7
|
import { buildKeywordsByTagId as n, computeNextOcrAutoTagging as r, getCategoryOptions as i, hasFormErrors as a, isDuplicateTagNameError as o, validateTagForm as s } from "./index5.js";
|
|
8
|
-
import {
|
|
9
|
-
import { useUpdateTagMutation as l } from "../../data-access/dist/index5.js";
|
|
10
|
-
import { useUpdateEntitySettingsMutation as u } from "../../data-access/dist/index9.js";
|
|
8
|
+
import { useUpdateEntitySettingsMutation as c } from "../../data-access/dist/index5.js";
|
|
11
9
|
import "../../data-access/dist/index.js";
|
|
10
|
+
import { useCreateTagMutation as l } from "../../../../shared/tag-selection/data-access/dist/index4.js";
|
|
11
|
+
import { useUpdateTagMutation as u } from "../../../../shared/tag-selection/data-access/dist/index5.js";
|
|
12
|
+
import "../../../../shared/tag-selection/data-access/dist/index.js";
|
|
12
13
|
import { useCallback as d, useMemo as f, useState as p } from "react";
|
|
13
14
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
|
|
14
15
|
function m({ selectedTag: m, setSelectedTag: h, settings: g, messages: _ }) {
|
|
15
|
-
let { entityId: v, settingsData: y, refetchSettings: b, requireFreshSettings: x } = g, S =
|
|
16
|
+
let { entityId: v, settingsData: y, refetchSettings: b, requireFreshSettings: x } = g, S = l(), C = u(), w = c(), [T, E] = p(!1), [D, O] = p("create"), [k, A] = p(t), [j, M] = p({});
|
|
16
17
|
return {
|
|
17
18
|
open: T,
|
|
18
19
|
mode: D,
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { buildTagRows as e, sortFieldForColumn as t } from "./index5.js";
|
|
6
|
-
import { useTagsQuery as n } from "
|
|
7
|
-
import "
|
|
6
|
+
import { useTagsQuery as n } from "../../../../shared/tag-selection/data-access/dist/index2.js";
|
|
7
|
+
import "../../../../shared/tag-selection/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/index9.js
|
|
10
10
|
function o({ keywordsByTagId: o, userNamesById: s }) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import "./index2.js";
|
|
2
2
|
import { TagsScreen as e } from "./index3.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export { n as TagDeleteDialog, t as TagFormSheet, e as TagsScreen };
|
|
3
|
+
import { TagDeleteDialog as t } from "./index4.js";
|
|
4
|
+
export { t as TagDeleteDialog, e as TagsScreen };
|
|
@@ -17,23 +17,10 @@ var e = {
|
|
|
17
17
|
errorDescription: "Something went wrong while fetching your tags. Please try again.",
|
|
18
18
|
errorRetry: "Try again"
|
|
19
19
|
}, t = {
|
|
20
|
-
createTitle: "Create new tag",
|
|
21
|
-
editTitle: "Edit tag “{name}”",
|
|
22
|
-
nameLabel: "Name",
|
|
23
|
-
categoryLabel: "Category",
|
|
24
|
-
categoryPlaceholder: "Not set",
|
|
25
|
-
keywordsLabel: "Keywords",
|
|
26
|
-
keywordsPlaceholder: "Add a keyword…",
|
|
27
|
-
removeKeyword: "Remove {keyword}",
|
|
28
|
-
cancelButton: "Cancel",
|
|
29
|
-
createButton: "Create",
|
|
30
|
-
saveButton: "Save",
|
|
31
|
-
deleteButton: "Delete"
|
|
32
|
-
}, n = {
|
|
33
20
|
title: "Delete “{name}” tag?",
|
|
34
21
|
message: "This action can't be undone.",
|
|
35
22
|
confirmButton: "Delete",
|
|
36
23
|
cancelButton: "Cancel"
|
|
37
24
|
};
|
|
38
25
|
//#endregion
|
|
39
|
-
export { e as TAGS_SCREEN_LABELS_EN,
|
|
26
|
+
export { e as TAGS_SCREEN_LABELS_EN, t as TAG_DELETE_DIALOG_LABELS_EN };
|
|
@@ -1,126 +1,28 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { jsx as _, jsxs as v } from "react/jsx-runtime";
|
|
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";
|
|
5
4
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js
|
|
6
|
-
function
|
|
7
|
-
let
|
|
8
|
-
...
|
|
9
|
-
...
|
|
10
|
-
}
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
open:
|
|
13
|
-
onOpenChange:
|
|
14
|
-
children: /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
children: /* @__PURE__ */ v("div", {
|
|
27
|
-
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
|
|
28
|
-
children: [
|
|
29
|
-
C?.form && /* @__PURE__ */ _("p", {
|
|
30
|
-
role: "alert",
|
|
31
|
-
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
32
|
-
children: C.form
|
|
33
|
-
}),
|
|
34
|
-
/* @__PURE__ */ v("div", {
|
|
35
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ _(r, {
|
|
38
|
-
htmlFor: `${L}-name`,
|
|
39
|
-
children: I.nameLabel
|
|
40
|
-
}),
|
|
41
|
-
/* @__PURE__ */ _(t, {
|
|
42
|
-
id: `${L}-name`,
|
|
43
|
-
autoFocus: !0,
|
|
44
|
-
value: S.name,
|
|
45
|
-
"aria-invalid": !!C?.name,
|
|
46
|
-
onChange: (e) => O(e.target.value)
|
|
47
|
-
}),
|
|
48
|
-
C?.name && /* @__PURE__ */ _("p", {
|
|
49
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
50
|
-
children: C.name
|
|
51
|
-
})
|
|
52
|
-
]
|
|
53
|
-
}),
|
|
54
|
-
/* @__PURE__ */ v("div", {
|
|
55
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
56
|
-
children: [/* @__PURE__ */ _(r, {
|
|
57
|
-
htmlFor: `${L}-category`,
|
|
58
|
-
children: I.categoryLabel
|
|
59
|
-
}), /* @__PURE__ */ v(i, {
|
|
60
|
-
value: S.category === "" ? void 0 : S.category,
|
|
61
|
-
onValueChange: k,
|
|
62
|
-
children: [/* @__PURE__ */ _(s, {
|
|
63
|
-
id: `${L}-category`,
|
|
64
|
-
className: "ttw:w-full",
|
|
65
|
-
children: /* @__PURE__ */ _(c, { placeholder: I.categoryPlaceholder })
|
|
66
|
-
}), /* @__PURE__ */ _(a, { children: w.map((e) => /* @__PURE__ */ _(o, {
|
|
67
|
-
value: e.value,
|
|
68
|
-
children: e.label
|
|
69
|
-
}, e.value)) })]
|
|
70
|
-
})]
|
|
71
|
-
}),
|
|
72
|
-
/* @__PURE__ */ v("div", {
|
|
73
|
-
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ _(r, { children: I.keywordsLabel }),
|
|
76
|
-
/* @__PURE__ */ _(n, {
|
|
77
|
-
value: S.keywords,
|
|
78
|
-
onChange: A,
|
|
79
|
-
inputValue: S.keywordsInput,
|
|
80
|
-
onInputValueChange: j,
|
|
81
|
-
placeholder: I.keywordsPlaceholder,
|
|
82
|
-
"aria-invalid": !!C?.keywords,
|
|
83
|
-
removeTagLabel: (e) => I.removeKeyword.replace("{keyword}", e)
|
|
84
|
-
}),
|
|
85
|
-
C?.keywords && /* @__PURE__ */ _("p", {
|
|
86
|
-
className: "ttw:text-sm ttw:text-destructive",
|
|
87
|
-
children: C.keywords
|
|
88
|
-
})
|
|
89
|
-
]
|
|
90
|
-
})
|
|
91
|
-
]
|
|
92
|
-
})
|
|
93
|
-
}),
|
|
94
|
-
/* @__PURE__ */ v(f, {
|
|
95
|
-
className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
|
|
96
|
-
children: [
|
|
97
|
-
x === "edit" && D && P && /* @__PURE__ */ _(e, {
|
|
98
|
-
type: "button",
|
|
99
|
-
className: "ttw:mr-auto",
|
|
100
|
-
variant: "destructive",
|
|
101
|
-
size: "lg",
|
|
102
|
-
onClick: P,
|
|
103
|
-
children: I.deleteButton
|
|
104
|
-
}),
|
|
105
|
-
/* @__PURE__ */ _(e, {
|
|
106
|
-
type: "button",
|
|
107
|
-
variant: "ghost",
|
|
108
|
-
size: "lg",
|
|
109
|
-
onClick: N,
|
|
110
|
-
children: I.cancelButton
|
|
111
|
-
}),
|
|
112
|
-
/* @__PURE__ */ _(e, {
|
|
113
|
-
type: "submit",
|
|
114
|
-
form: L,
|
|
115
|
-
size: "lg",
|
|
116
|
-
disabled: E,
|
|
117
|
-
children: x === "edit" ? I.saveButton : I.createButton
|
|
118
|
-
})
|
|
119
|
-
]
|
|
120
|
-
})
|
|
121
|
-
]
|
|
122
|
-
})
|
|
5
|
+
function u({ open: u, onOpenChange: d, tagName: f, isDeleting: p, onConfirm: m, onCancel: h, labels: g }) {
|
|
6
|
+
let _ = {
|
|
7
|
+
...s,
|
|
8
|
+
...g
|
|
9
|
+
};
|
|
10
|
+
return /* @__PURE__ */ c(e, {
|
|
11
|
+
open: u,
|
|
12
|
+
onOpenChange: d,
|
|
13
|
+
children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: _.title.replace("{name}", f) }), /* @__PURE__ */ c(n, { children: _.message })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
14
|
+
variant: "ghost",
|
|
15
|
+
onClick: h,
|
|
16
|
+
disabled: p,
|
|
17
|
+
children: _.cancelButton
|
|
18
|
+
}), /* @__PURE__ */ c(o, {
|
|
19
|
+
variant: "destructive",
|
|
20
|
+
onClick: m,
|
|
21
|
+
disabled: p,
|
|
22
|
+
loading: p,
|
|
23
|
+
children: _.confirmButton
|
|
24
|
+
})] })] })
|
|
123
25
|
});
|
|
124
26
|
}
|
|
125
27
|
//#endregion
|
|
126
|
-
export {
|
|
28
|
+
export { u as TagDeleteDialog, u as default };
|
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.121", n = "1f1c6d94e082ef7c5790fc90c1fe0042b71733c4", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index.js
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
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
|
+
export { t as useCreateTagMutation, r as useDeleteTagMutation, e as useTagsQuery, n as useUpdateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index2.js
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { getTagsOptions as e } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
6
|
+
import { withAuthEpoch as t } from "../../../data-access/dist/lib/withAuthEpoch.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../data-access/dist/index.js";
|
|
10
|
+
import { useQuery as i } from "@tanstack/react-query";
|
|
11
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index2.js
|
|
12
|
+
function a({ enabled: a, ...o } = {}) {
|
|
13
|
+
let { client: s, organizationId: c, widgetToken: l, authEpoch: u } = n(), d = !!(c && l) && (a === !0 || a === void 0), f = e({
|
|
14
|
+
query: o,
|
|
15
|
+
client: s,
|
|
16
|
+
headers: r(c)
|
|
17
|
+
});
|
|
18
|
+
return i({
|
|
19
|
+
...t(f, u),
|
|
20
|
+
enabled: d
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as useTagsQuery };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index3.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { getTagsQueryKey as e } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
|
|
2
|
+
import { organizationHeaders as t } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
3
|
+
import "../../../data-access/dist/index.js";
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index3.js
|
|
5
|
+
var n = ({ client: n, organizationId: r }) => e({
|
|
6
|
+
client: n,
|
|
7
|
+
headers: t(r)
|
|
8
|
+
});
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as tagsInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index4.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { postTags as e } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../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/shared/tag-selection/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/shared/tag-selection/data-access/dist/index5.js
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { patchTagsId as e } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../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/shared/tag-selection/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/shared/tag-selection/data-access/dist/index6.js
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
5
|
+
import { deleteTagsId as e } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
|
+
import { invalidateAllClients as t } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
7
|
+
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
|
+
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
|
+
import "../../../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/shared/tag-selection/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 };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index2.js
|
|
2
|
+
var e = {
|
|
3
|
+
createTitle: "Create new tag",
|
|
4
|
+
editTitle: "Edit tag “{name}”",
|
|
5
|
+
nameLabel: "Name",
|
|
6
|
+
categoryLabel: "Category",
|
|
7
|
+
categoryPlaceholder: "Not set",
|
|
8
|
+
keywordsLabel: "Keywords",
|
|
9
|
+
keywordsPlaceholder: "Add a keyword…",
|
|
10
|
+
removeKeyword: "Remove {keyword}",
|
|
11
|
+
cancelButton: "Cancel",
|
|
12
|
+
createButton: "Create",
|
|
13
|
+
saveButton: "Save",
|
|
14
|
+
deleteButton: "Delete"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as TAG_FORM_SHEET_LABELS_EN };
|
|
@@ -0,0 +1,126 @@
|
|
|
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/shared/tag-selection/ui/dist/index3.js
|
|
6
|
+
function y({ open: y, onOpenChange: b, mode: x, values: S, errors: C, categoryOptions: w, tagName: T, inProgress: E, showDelete: D, onNameChange: O, onCategoryChange: k, onKeywordsChange: A, onKeywordsInputChange: j, onSubmit: M, onCancel: N, onDelete: P, labels: F }) {
|
|
7
|
+
let I = {
|
|
8
|
+
...h,
|
|
9
|
+
...F
|
|
10
|
+
}, L = g(), R = x === "edit" ? I.editTitle.replace("{name}", T ?? "") : I.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
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ v(p, { children: [/* @__PURE__ */ _(m, { children: R }), /* @__PURE__ */ _(d, {
|
|
18
|
+
className: "ttw:sr-only",
|
|
19
|
+
children: R
|
|
20
|
+
})] }),
|
|
21
|
+
/* @__PURE__ */ _("form", {
|
|
22
|
+
id: L,
|
|
23
|
+
onSubmit: (e) => {
|
|
24
|
+
e.preventDefault(), e.stopPropagation(), M();
|
|
25
|
+
},
|
|
26
|
+
children: /* @__PURE__ */ v("div", {
|
|
27
|
+
className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
|
|
28
|
+
children: [
|
|
29
|
+
C?.form && /* @__PURE__ */ _("p", {
|
|
30
|
+
role: "alert",
|
|
31
|
+
className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
|
|
32
|
+
children: C.form
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ v("div", {
|
|
35
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
36
|
+
children: [
|
|
37
|
+
/* @__PURE__ */ _(r, {
|
|
38
|
+
htmlFor: `${L}-name`,
|
|
39
|
+
children: I.nameLabel
|
|
40
|
+
}),
|
|
41
|
+
/* @__PURE__ */ _(t, {
|
|
42
|
+
id: `${L}-name`,
|
|
43
|
+
autoFocus: !0,
|
|
44
|
+
value: S.name,
|
|
45
|
+
"aria-invalid": !!C?.name,
|
|
46
|
+
onChange: (e) => O(e.target.value)
|
|
47
|
+
}),
|
|
48
|
+
C?.name && /* @__PURE__ */ _("p", {
|
|
49
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
50
|
+
children: C.name
|
|
51
|
+
})
|
|
52
|
+
]
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ v("div", {
|
|
55
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
56
|
+
children: [/* @__PURE__ */ _(r, {
|
|
57
|
+
htmlFor: `${L}-category`,
|
|
58
|
+
children: I.categoryLabel
|
|
59
|
+
}), /* @__PURE__ */ v(i, {
|
|
60
|
+
value: S.category === "" ? void 0 : S.category,
|
|
61
|
+
onValueChange: k,
|
|
62
|
+
children: [/* @__PURE__ */ _(s, {
|
|
63
|
+
id: `${L}-category`,
|
|
64
|
+
className: "ttw:w-full",
|
|
65
|
+
children: /* @__PURE__ */ _(c, { placeholder: I.categoryPlaceholder })
|
|
66
|
+
}), /* @__PURE__ */ _(a, { children: w.map((e) => /* @__PURE__ */ _(o, {
|
|
67
|
+
value: e.value,
|
|
68
|
+
children: e.label
|
|
69
|
+
}, e.value)) })]
|
|
70
|
+
})]
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ v("div", {
|
|
73
|
+
className: "ttw:flex ttw:flex-col ttw:gap-1.5",
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ _(r, { children: I.keywordsLabel }),
|
|
76
|
+
/* @__PURE__ */ _(n, {
|
|
77
|
+
value: S.keywords,
|
|
78
|
+
onChange: A,
|
|
79
|
+
inputValue: S.keywordsInput,
|
|
80
|
+
onInputValueChange: j,
|
|
81
|
+
placeholder: I.keywordsPlaceholder,
|
|
82
|
+
"aria-invalid": !!C?.keywords,
|
|
83
|
+
removeTagLabel: (e) => I.removeKeyword.replace("{keyword}", e)
|
|
84
|
+
}),
|
|
85
|
+
C?.keywords && /* @__PURE__ */ _("p", {
|
|
86
|
+
className: "ttw:text-sm ttw:text-destructive",
|
|
87
|
+
children: C.keywords
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ v(f, {
|
|
95
|
+
className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
|
|
96
|
+
children: [
|
|
97
|
+
x === "edit" && D && P && /* @__PURE__ */ _(e, {
|
|
98
|
+
type: "button",
|
|
99
|
+
className: "ttw:mr-auto",
|
|
100
|
+
variant: "destructive",
|
|
101
|
+
size: "lg",
|
|
102
|
+
onClick: P,
|
|
103
|
+
children: I.deleteButton
|
|
104
|
+
}),
|
|
105
|
+
/* @__PURE__ */ _(e, {
|
|
106
|
+
type: "button",
|
|
107
|
+
variant: "ghost",
|
|
108
|
+
size: "lg",
|
|
109
|
+
onClick: N,
|
|
110
|
+
children: I.cancelButton
|
|
111
|
+
}),
|
|
112
|
+
/* @__PURE__ */ _(e, {
|
|
113
|
+
type: "submit",
|
|
114
|
+
form: L,
|
|
115
|
+
size: "lg",
|
|
116
|
+
disabled: E,
|
|
117
|
+
children: x === "edit" ? I.saveButton : I.createButton
|
|
118
|
+
})
|
|
119
|
+
]
|
|
120
|
+
})
|
|
121
|
+
]
|
|
122
|
+
})
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
//#endregion
|
|
126
|
+
export { y as TagFormSheet, y as default };
|
package/package.json
CHANGED
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js
DELETED
|
@@ -1,25 +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 } = n(), d = !!(c && l), f = e({
|
|
15
|
-
query: { limit: o },
|
|
16
|
-
client: s,
|
|
17
|
-
headers: r(c)
|
|
18
|
-
});
|
|
19
|
-
return i({
|
|
20
|
-
...t(f, u),
|
|
21
|
-
enabled: d
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
export { o as useEntityUsersQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js
DELETED
|
@@ -1,19 +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 } = n(), c = !!(a && o), l = e({ client: i });
|
|
13
|
-
return r({
|
|
14
|
-
...t(l, s),
|
|
15
|
-
enabled: c
|
|
16
|
-
});
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { i as useMyEntityQuery };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js
DELETED
|
@@ -1,22 +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 } = n(), l = !!(o && s && i), u = e({
|
|
13
|
-
client: a,
|
|
14
|
-
path: { entity_id: i ?? "" }
|
|
15
|
-
});
|
|
16
|
-
return r({
|
|
17
|
-
...t(u, c),
|
|
18
|
-
enabled: l
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
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 };
|
|
@@ -1,28 +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/index5.js
|
|
5
|
-
function u({ open: u, onOpenChange: d, tagName: f, isDeleting: p, onConfirm: m, onCancel: h, labels: g }) {
|
|
6
|
-
let _ = {
|
|
7
|
-
...s,
|
|
8
|
-
...g
|
|
9
|
-
};
|
|
10
|
-
return /* @__PURE__ */ c(e, {
|
|
11
|
-
open: u,
|
|
12
|
-
onOpenChange: d,
|
|
13
|
-
children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: _.title.replace("{name}", f) }), /* @__PURE__ */ c(n, { children: _.message })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
|
|
14
|
-
variant: "ghost",
|
|
15
|
-
onClick: h,
|
|
16
|
-
disabled: p,
|
|
17
|
-
children: _.cancelButton
|
|
18
|
-
}), /* @__PURE__ */ c(o, {
|
|
19
|
-
variant: "destructive",
|
|
20
|
-
onClick: m,
|
|
21
|
-
disabled: p,
|
|
22
|
-
loading: p,
|
|
23
|
-
children: _.confirmButton
|
|
24
|
-
})] })] })
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
//#endregion
|
|
28
|
-
export { u as TagDeleteDialog, u as default };
|