@tesouro/embedded-components-react 0.5.153 → 0.5.155
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 +21 -19
- package/dist/index.css +0 -3
- package/dist/index.d.ts +106 -94
- package/dist/index.js +15 -15
- package/dist/lib/CreditCardsWidget.d.ts +6 -0
- package/dist/lib/DebitCardsWidget.d.ts +6 -0
- package/dist/lib/SettingsWidget.d.ts +0 -3
- package/dist/lib/WidgetSuite.d.ts +102 -9
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/cards-widget/ui/dist/lib/CardsList/CardsList.js +45 -44
- 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/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js +16 -10
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js +19 -18
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js +16 -15
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js +15 -2
- 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.155", n = "7e771ab8aeadf8bdff5e1c0666e4a465d3397857", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -3,19 +3,25 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { useWidgetSuiteProvider as e } from "./index6.js";
|
|
6
|
-
import {
|
|
6
|
+
import { hasAnyScope as t } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
8
|
import "../../../shared/data-access/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
+
import { LinkedAccountsWidget as r } from "../../../linked-accounts-widget/feature/dist/index10.js";
|
|
10
|
+
import "../../../linked-accounts-widget/feature/dist/index.js";
|
|
11
|
+
import { TransfersWidget as i } from "../../../transfers-widget/feature/dist/index7.js";
|
|
9
12
|
import "../../../transfers-widget/feature/dist/index.js";
|
|
10
|
-
import { jsx as
|
|
13
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
11
14
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index14.js
|
|
12
|
-
function
|
|
13
|
-
let { labels:
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
+
function s() {
|
|
16
|
+
let { grantedScopes: s, labels: c } = e(), l = t(s, [n.ExternalBankAccountReadOrg]);
|
|
17
|
+
return /* @__PURE__ */ o("div", {
|
|
18
|
+
className: "ttw:grid ttw:gap-4",
|
|
19
|
+
children: [l && /* @__PURE__ */ a(r, { ...c.sections.linkedAccounts }), /* @__PURE__ */ a(i, { ...c.sections.transfers })]
|
|
20
|
+
});
|
|
15
21
|
}
|
|
16
|
-
var
|
|
17
|
-
anyOfScopes: [
|
|
18
|
-
Content:
|
|
22
|
+
var c = {
|
|
23
|
+
anyOfScopes: [n.BankAccountReadOrg],
|
|
24
|
+
Content: s
|
|
19
25
|
};
|
|
20
26
|
//#endregion
|
|
21
|
-
export {
|
|
27
|
+
export { s as TransfersSection, c as transfersSection };
|
|
@@ -106,32 +106,33 @@ function P({ showSectionTitle: n = !0, onboardingDisclosureLinks: r }) {
|
|
|
106
106
|
labels: c.shell
|
|
107
107
|
});
|
|
108
108
|
}
|
|
109
|
-
function F({ sections: e = r, section: t, defaultSection: i, onSectionChange: o, labels: l,
|
|
110
|
-
let
|
|
109
|
+
function F({ sections: e = r, section: t, defaultSection: i, onSectionChange: o, labels: l, cardArtSrc: u, ...d }) {
|
|
110
|
+
let p = f();
|
|
111
111
|
E(() => {
|
|
112
|
-
|
|
113
|
-
}, [
|
|
114
|
-
let { initResponse:
|
|
115
|
-
|
|
116
|
-
let [
|
|
117
|
-
|
|
118
|
-
let
|
|
119
|
-
|
|
120
|
-
let
|
|
121
|
-
|
|
122
|
-
let
|
|
112
|
+
p(x.Mounted);
|
|
113
|
+
}, [p]);
|
|
114
|
+
let { initResponse: m } = h(), g = m?.scopes, { client: _, widgetToken: v } = s(), b = m?.userId ?? null, [S, C] = k(b), [w, T] = k(0);
|
|
115
|
+
b !== S && (C(b), S !== null && T((e) => e + 1));
|
|
116
|
+
let [O, A] = k(_);
|
|
117
|
+
_ !== O && (A(_), T((e) => e + 1));
|
|
118
|
+
let M = !!v, [N, F] = k(M);
|
|
119
|
+
M !== N && (F(M), T((e) => e + 1));
|
|
120
|
+
let I = m?.organizationId ?? null, [L, R] = k(I);
|
|
121
|
+
I !== L && (R(I), L !== null && T((e) => e + 1));
|
|
122
|
+
let z = D(() => n(l), [l]), B = e.filter((e) => {
|
|
123
123
|
let t = y[e];
|
|
124
|
-
return !!t && (!t.anyOfScopes || c(
|
|
124
|
+
return !!t && (!t.anyOfScopes || c(g, t.anyOfScopes));
|
|
125
125
|
});
|
|
126
126
|
return /* @__PURE__ */ j(a, {
|
|
127
127
|
sections: e,
|
|
128
|
-
availableSections:
|
|
129
|
-
grantedScopes:
|
|
130
|
-
labels:
|
|
128
|
+
availableSections: B,
|
|
129
|
+
grantedScopes: g,
|
|
130
|
+
labels: z,
|
|
131
131
|
section: t,
|
|
132
132
|
defaultSection: i,
|
|
133
133
|
onSectionChange: o,
|
|
134
|
-
|
|
134
|
+
cardArtSrc: u,
|
|
135
|
+
children: /* @__PURE__ */ j(P, { ...d }, w)
|
|
135
136
|
});
|
|
136
137
|
}
|
|
137
138
|
function I({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: a, implementation: o, uiFramework: s, errorFallback: c, onError: l, analytics: u, disclosuresAcceptance: d, providerLabels: f, ...m }) {
|
|
@@ -8,31 +8,32 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
8
8
|
import { useControllableState as s } from "@radix-ui/react-use-controllable-state";
|
|
9
9
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index6.js
|
|
10
10
|
var c = t(null);
|
|
11
|
-
function l({ sections: t, availableSections: r, grantedScopes: l, labels: u, section: d, defaultSection: f, onSectionChange: p,
|
|
12
|
-
let [
|
|
11
|
+
function l({ sections: t, availableSections: r, grantedScopes: l, labels: u, section: d, defaultSection: f, onSectionChange: p, cardArtSrc: m, children: h }) {
|
|
12
|
+
let [g, _] = s({
|
|
13
13
|
prop: d,
|
|
14
14
|
defaultProp: f ?? t[0],
|
|
15
15
|
caller: "WidgetSuite"
|
|
16
|
-
}),
|
|
16
|
+
}), v = g && r.includes(g) ? g : r.at(0), [y, b] = a(null);
|
|
17
17
|
i(() => {
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
}, [p,
|
|
23
|
-
|
|
24
|
-
}, [p,
|
|
18
|
+
v !== e.Accounts && b(null);
|
|
19
|
+
}, [v]);
|
|
20
|
+
let x = n((e) => {
|
|
21
|
+
_(e), p?.(e);
|
|
22
|
+
}, [p, _]), S = n((t) => {
|
|
23
|
+
b(t), _(e.Accounts), p?.(e.Accounts);
|
|
24
|
+
}, [p, _]);
|
|
25
25
|
return /* @__PURE__ */ o(c.Provider, {
|
|
26
26
|
value: {
|
|
27
27
|
availableSections: r,
|
|
28
|
-
activeSection:
|
|
28
|
+
activeSection: v,
|
|
29
29
|
grantedScopes: l,
|
|
30
30
|
labels: u,
|
|
31
|
-
arrivingAccountId:
|
|
32
|
-
navigate:
|
|
33
|
-
openAccount:
|
|
31
|
+
arrivingAccountId: y,
|
|
32
|
+
navigate: x,
|
|
33
|
+
openAccount: S,
|
|
34
|
+
cardArtSrc: m
|
|
34
35
|
},
|
|
35
|
-
children:
|
|
36
|
+
children: h
|
|
36
37
|
});
|
|
37
38
|
}
|
|
38
39
|
function u() {
|
|
@@ -14,10 +14,23 @@ import "../../../cards-widget/feature/dist/index.js";
|
|
|
14
14
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/index9.js
|
|
16
16
|
function c() {
|
|
17
|
-
let { grantedScopes: c, labels: l } = e(),
|
|
17
|
+
let { grantedScopes: c, labels: l, cardArtSrc: u } = e(), d = l.sections.cards;
|
|
18
18
|
return /* @__PURE__ */ s("div", {
|
|
19
19
|
className: "ttw:grid ttw:gap-8",
|
|
20
|
-
children: [t(c, [n.CreditCardReadOrg]) && /* @__PURE__ */
|
|
20
|
+
children: [t(c, [n.CreditCardReadOrg]) && /* @__PURE__ */ o(i, {
|
|
21
|
+
...d.creditCards,
|
|
22
|
+
headerStart: /* @__PURE__ */ o(r, {
|
|
23
|
+
className: "ttw:mb-0",
|
|
24
|
+
children: d.creditCardsTitle
|
|
25
|
+
})
|
|
26
|
+
}), t(c, [n.DebitCardReadOrg]) && /* @__PURE__ */ o(a, {
|
|
27
|
+
...d.debitCards,
|
|
28
|
+
cardArtSrc: u,
|
|
29
|
+
headerStart: /* @__PURE__ */ o(r, {
|
|
30
|
+
className: "ttw:mb-0",
|
|
31
|
+
children: d.debitCardsTitle
|
|
32
|
+
})
|
|
33
|
+
})]
|
|
21
34
|
});
|
|
22
35
|
}
|
|
23
36
|
var l = {
|
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 };
|