@tesouro/embedded-components-react 0.5.120 → 0.5.123

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.
Files changed (32) hide show
  1. package/dist/lib/monite-sdk.d.ts +2 -0
  2. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +1 -1
  3. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index.js +6 -10
  4. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index2.js +8 -13
  5. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index3.js +19 -10
  6. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index4.js +6 -31
  7. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index5.js +13 -22
  8. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index6.js +14 -22
  9. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +5 -4
  10. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +3 -3
  11. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +4 -3
  12. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +5 -4
  13. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +2 -2
  14. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index.js +2 -3
  15. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index2.js +1 -14
  16. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index4.js +24 -122
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index.js +6 -0
  19. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index2.js +24 -0
  20. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index3.js +10 -0
  21. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index4.js +34 -0
  22. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index5.js +35 -0
  23. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index6.js +33 -0
  24. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index.js +3 -0
  25. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index2.js +17 -0
  26. package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index3.js +126 -0
  27. package/package.json +1 -1
  28. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index10.js +0 -25
  29. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index7.js +0 -19
  30. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index8.js +0 -22
  31. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/data-access/dist/index9.js +0 -26
  32. package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/ui/dist/index5.js +0 -28
@@ -8973,6 +8973,8 @@ interface components {
8973
8973
  * @description The UTC timestamp when the bank account was created.
8974
8974
  */
8975
8975
  createdDateTime: string;
8976
+ /** @description Registered legal or DBA name on the bank account. */
8977
+ nameOnAccount: string;
8976
8978
  /** @description Nickname for the bank account. */
8977
8979
  nickname?: null | string;
8978
8980
  /** @description Bank routing number. */
@@ -27,7 +27,7 @@ var n = (n, r) => {
27
27
  bank_name: null,
28
28
  account_number: d.accountNumber,
29
29
  routing_number: d.routingNumber,
30
- account_holder_name: null,
30
+ account_holder_name: d.nameOnAccount ?? null,
31
31
  bank_account_type: "INTERNAL"
32
32
  };
33
33
  if (p) return {
@@ -1,10 +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
- 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 };
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 };
@@ -2,23 +2,18 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { getTagsOptions as e } from "../../../../shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js";
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 i } from "@tanstack/react-query";
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 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
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 { a as useTagsQuery };
19
+ export { i as useMyEntityQuery };
@@ -1,13 +1,22 @@
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";
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
- var r = ({ client: e, organizationId: r }) => t({
6
- client: e,
7
- headers: n(r)
8
- }), i = ({ client: t, entityId: n }) => e({
9
- client: t,
10
- path: { entity_id: n }
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 entitySettingsInvalidationKey, r as tagsInvalidationKey };
22
+ export { i as useEntitySettingsQuery };
@@ -1,34 +1,9 @@
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";
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
- 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
- }
4
+ var t = ({ client: t, entityId: n }) => e({
5
+ client: t,
6
+ path: { entity_id: n }
7
+ });
33
8
  //#endregion
34
- export { o as useCreateTagMutation };
9
+ export { t as entitySettingsInvalidationKey };
@@ -2,34 +2,25 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { patchTagsId as e } from "../../../../shared/data-access/dist/lib/rest/sdk.gen.js";
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 { tagsInvalidationKey as i } from "./index3.js";
11
- import { useMutation as a } from "@tanstack/react-query";
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 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
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 { o as useUpdateTagMutation };
26
+ export { a as useUpdateEntitySettingsMutation };
@@ -2,32 +2,24 @@
2
2
  "use client";
3
3
  "use client";
4
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";
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 { tagsInvalidationKey as i } from "./index3.js";
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
- 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
- }
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 useDeleteTagMutation };
25
+ export { o as useEntityUsersQuery };
@@ -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 { TagFormSheet as s } from "../../ui/dist/index4.js";
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(s, {
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(c, {
65
+ /* @__PURE__ */ d(s, {
65
66
  open: b.open,
66
67
  onOpenChange: b.onOpenChange,
67
68
  tagName: _?.name ?? "",
@@ -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/index7.js";
7
- import { useEntitySettingsQuery as r } from "../../data-access/dist/index8.js";
8
- import { useEntityUsersQuery as i } from "../../data-access/dist/index10.js";
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
@@ -3,13 +3,14 @@
3
3
  "use client";
4
4
  "use client";
5
5
  import { computeNextOcrAutoTagging as e } from "./index5.js";
6
- import { useDeleteTagMutation as t } from "../../data-access/dist/index6.js";
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 = t(), d = n(), [f, p] = i(!1), m = r((e) => {
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);
@@ -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 { useCreateTagMutation as c } from "../../data-access/dist/index4.js";
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 = c(), C = l(), w = u(), [T, E] = p(!1), [D, O] = p("create"), [k, A] = p(t), [j, M] = p({});
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,
@@ -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 "../../data-access/dist/index2.js";
7
- import "../../data-access/dist/index.js";
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 { TagFormSheet as t } from "./index4.js";
4
- import { TagDeleteDialog as n } from "./index5.js";
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, n as TAG_DELETE_DIALOG_LABELS_EN, t as TAG_FORM_SHEET_LABELS_EN };
26
+ export { e as TAGS_SCREEN_LABELS_EN, t as TAG_DELETE_DIALOG_LABELS_EN };
@@ -1,126 +1,28 @@
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";
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 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
- })
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 { y as TagFormSheet, y as default };
28
+ export { u as TagDeleteDialog, u as default };
@@ -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.120", n = "af6e517a7afaf8a2401a4920c6b6fe5d3adb62e7", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.123", n = "e92880e7f411d0e09b599e39a5bd3d28d319b2eb", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -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 };
@@ -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 };
@@ -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 };
@@ -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 };
@@ -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 };
@@ -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,3 @@
1
+ import "./index2.js";
2
+ import { TagFormSheet as e } from "./index3.js";
3
+ export { e as TagFormSheet };
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.120",
3
+ "version": "0.5.123",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {
@@ -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 };
@@ -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 };
@@ -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 };
@@ -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 };