@tesouro/embedded-components-react 0.5.124 → 0.5.126
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/index.css +6 -0
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index22.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/data-access/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index9.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index7.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/insights-widget/feature/dist/index8.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index9.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index223.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index396.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index465.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index547.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index90.js +6 -6
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/feature/dist/lib/RemoteCheckCaptureWidget/useRemoteCheckCaptureWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/remote-check-capture/ui/dist/index4.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index10.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index11.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index4.js +58 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js +3 -98
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js +62 -62
- package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js +7 -7
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/feature/dist/lib/useApproverOptions.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/approval-policy/ui/dist/index12.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/widgetInitChannel.js +2 -2
- 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/feature/dist/lib/analytics/traceId.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index.js +4 -3
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index3.js +5 -9
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index4.js +7 -31
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index5.js +7 -8
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index6.js +7 -5
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index7.js +33 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/index.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/lib/TagSelectorField.js +11 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/lib/helpers.js +38 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/lib/labels.js +19 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/lib/permissions.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/feature/dist/lib/useTagCreateForm.js +6 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index3.js +30 -30
- package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/ui/dist/index4.js +4 -0
- package/dist/packages/shared-ui-shadcn/dist/index.js +1304 -1219
- package/package.json +12 -12
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index5.js
CHANGED
|
@@ -1,98 +1,3 @@
|
|
|
1
|
-
import { TAG_MESSAGE_LABELS_EN as e } from "
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
"document_type",
|
|
5
|
-
"department",
|
|
6
|
-
"project",
|
|
7
|
-
"cost_center",
|
|
8
|
-
"vendor_type",
|
|
9
|
-
"payment_method",
|
|
10
|
-
"approval_status"
|
|
11
|
-
], n = {
|
|
12
|
-
document_type: "Document Type",
|
|
13
|
-
department: "Department",
|
|
14
|
-
project: "Project",
|
|
15
|
-
cost_center: "Cost Center",
|
|
16
|
-
vendor_type: "Vendor Type",
|
|
17
|
-
payment_method: "Payment Method",
|
|
18
|
-
approval_status: "Approval Status"
|
|
19
|
-
};
|
|
20
|
-
function r(e) {
|
|
21
|
-
return e ? n[e] ?? "" : "";
|
|
22
|
-
}
|
|
23
|
-
function i() {
|
|
24
|
-
return t.map((e) => ({
|
|
25
|
-
value: e,
|
|
26
|
-
label: n[e]
|
|
27
|
-
}));
|
|
28
|
-
}
|
|
29
|
-
var a = {
|
|
30
|
-
createdAtLabel: "created_at",
|
|
31
|
-
updatedAtLabel: "updated_at"
|
|
32
|
-
};
|
|
33
|
-
function o(e) {
|
|
34
|
-
return e && a[e] || "created_at";
|
|
35
|
-
}
|
|
36
|
-
var s = new Intl.DateTimeFormat(void 0, {
|
|
37
|
-
year: "numeric",
|
|
38
|
-
month: "short",
|
|
39
|
-
day: "numeric"
|
|
40
|
-
});
|
|
41
|
-
function c(e) {
|
|
42
|
-
if (!e) return "";
|
|
43
|
-
let t = new Date(e);
|
|
44
|
-
return Number.isNaN(t.getTime()) ? "" : s.format(t);
|
|
45
|
-
}
|
|
46
|
-
function l() {
|
|
47
|
-
let e = globalThis.getSelection?.();
|
|
48
|
-
return !!(e && e.toString().length > 0);
|
|
49
|
-
}
|
|
50
|
-
function u(e) {
|
|
51
|
-
let t = {};
|
|
52
|
-
for (let n of e ?? []) t[n.tag_id] = n.keywords;
|
|
53
|
-
return t;
|
|
54
|
-
}
|
|
55
|
-
function d(e) {
|
|
56
|
-
let t = {};
|
|
57
|
-
for (let n of e ?? []) t[n.id] = `${n.first_name ?? ""} ${n.last_name ?? ""}`.trim();
|
|
58
|
-
return t;
|
|
59
|
-
}
|
|
60
|
-
function f({ tags: e, keywordsByTagId: t, userNamesById: n }) {
|
|
61
|
-
return e.map((e) => ({
|
|
62
|
-
id: e.id,
|
|
63
|
-
name: e.name,
|
|
64
|
-
categoryLabel: r(e.category),
|
|
65
|
-
keywords: (t[e.id] ?? []).join(", "),
|
|
66
|
-
createdAtLabel: c(e.created_at),
|
|
67
|
-
updatedAtLabel: c(e.updated_at),
|
|
68
|
-
createdByLabel: e.created_by_entity_user_id ? n[e.created_by_entity_user_id] ?? "" : ""
|
|
69
|
-
}));
|
|
70
|
-
}
|
|
71
|
-
function p(t, n = e) {
|
|
72
|
-
let r = {}, i = t.name.trim();
|
|
73
|
-
i.length === 0 ? r.name = n.nameRequired : i.length > 255 && (r.name = n.nameTooLong);
|
|
74
|
-
let a = t.keywords.some((e) => e.length < 2), o = t.keywords.some((e) => e.length > 25);
|
|
75
|
-
return a ? r.keywords = n.keywordTooShort : o && (r.keywords = n.keywordTooLong), r;
|
|
76
|
-
}
|
|
77
|
-
function m(e) {
|
|
78
|
-
return !!(e.name || e.keywords);
|
|
79
|
-
}
|
|
80
|
-
function h(e, t, n) {
|
|
81
|
-
let r = e ?? [], i = r.filter((e) => e.tag_id !== t), a = Array.from(new Set(n));
|
|
82
|
-
return i.length === r.length && a.length === 0 ? {
|
|
83
|
-
changed: !1,
|
|
84
|
-
next: r
|
|
85
|
-
} : {
|
|
86
|
-
changed: !0,
|
|
87
|
-
next: a.length ? [...i, {
|
|
88
|
-
tag_id: t,
|
|
89
|
-
keywords: a,
|
|
90
|
-
enabled: !0
|
|
91
|
-
}] : i
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
function g(e) {
|
|
95
|
-
return e === "This tag already exists.";
|
|
96
|
-
}
|
|
97
|
-
//#endregion
|
|
98
|
-
export { t as TAG_CATEGORIES, u as buildKeywordsByTagId, f as buildTagRows, d as buildUserNamesById, h as computeNextOcrAutoTagging, c as formatTagDate, i as getCategoryOptions, r as getTagCategoryLabel, m as hasFormErrors, l as hasSelectedText, g as isDuplicateTagNameError, o as sortFieldForColumn, p as validateTagForm };
|
|
1
|
+
import { TAG_MESSAGE_LABELS_EN as e } from "../../../../shared/tag-selection/feature/dist/lib/labels.js";
|
|
2
|
+
import "../../../../shared/tag-selection/feature/dist/index.js";
|
|
3
|
+
export { e as TAG_MESSAGE_LABELS_EN };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index6.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { buildKeywordsByTagId as e, buildUserNamesById as t } from "./
|
|
5
|
+
import { buildKeywordsByTagId as e, buildUserNamesById as t } from "./index4.js";
|
|
6
6
|
import { useMyEntityQuery as n } from "../../data-access/dist/index2.js";
|
|
7
7
|
import { useEntitySettingsQuery as r } from "../../data-access/dist/index3.js";
|
|
8
8
|
import { useEntityUsersQuery as i } from "../../data-access/dist/index6.js";
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
CHANGED
|
@@ -2,15 +2,15 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { useUpdateEntitySettingsMutation as t } from "../../data-access/dist/index5.js";
|
|
7
|
-
import "../../data-access/dist/index.js";
|
|
8
|
-
import { useDeleteTagMutation as n } from "../../../../shared/tag-selection/data-access/dist/index6.js";
|
|
5
|
+
import { useDeleteTagMutation as e } from "../../../../shared/tag-selection/data-access/dist/index7.js";
|
|
9
6
|
import "../../../../shared/tag-selection/data-access/dist/index.js";
|
|
7
|
+
import { computeNextOcrAutoTagging as t } from "./index4.js";
|
|
8
|
+
import { useUpdateEntitySettingsMutation as n } from "../../data-access/dist/index5.js";
|
|
9
|
+
import "../../data-access/dist/index.js";
|
|
10
10
|
import { useCallback as r, useState as i } from "react";
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index7.js
|
|
12
12
|
function a({ selectedTag: a, setSelectedTag: o, settings: s }) {
|
|
13
|
-
let { entityId: c, requireFreshSettings: l } = s, u =
|
|
13
|
+
let { entityId: c, requireFreshSettings: l } = s, u = e(), d = n(), [f, p] = i(!1), m = r((e) => {
|
|
14
14
|
o(e), p(!0);
|
|
15
15
|
}, [o]), h = r((e) => {
|
|
16
16
|
e || p(!1);
|
|
@@ -21,9 +21,9 @@ function a({ selectedTag: a, setSelectedTag: o, settings: s }) {
|
|
|
21
21
|
onOpenChange: h,
|
|
22
22
|
confirm: r(async () => {
|
|
23
23
|
if (a) try {
|
|
24
|
-
let
|
|
25
|
-
if (await u.mutateAsync({ path: { tag_id: a.id } }), c &&
|
|
26
|
-
let { changed: n, next: r } = e
|
|
24
|
+
let e = c ? await l() : void 0;
|
|
25
|
+
if (await u.mutateAsync({ path: { tag_id: a.id } }), c && e) {
|
|
26
|
+
let { changed: n, next: r } = t(e.payables_ocr_auto_tagging, a.id, []);
|
|
27
27
|
n && await d.mutateAsync({
|
|
28
28
|
path: { entity_id: c },
|
|
29
29
|
body: { payables_ocr_auto_tagging: r }
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
CHANGED
|
@@ -2,103 +2,103 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
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";
|
|
5
|
+
import { EMPTY_FORM_VALUES as e } from "./index3.js";
|
|
6
|
+
import { getCategoryOptions as t, hasFormErrors as n, resolveTagSubmitError as r, validateTagForm as i } from "../../../../shared/tag-selection/feature/dist/lib/helpers.js";
|
|
7
|
+
import { useCreateTagMutation as a } from "../../../../shared/tag-selection/data-access/dist/index5.js";
|
|
8
|
+
import { useUpdateTagMutation as o } from "../../../../shared/tag-selection/data-access/dist/index6.js";
|
|
12
9
|
import "../../../../shared/tag-selection/data-access/dist/index.js";
|
|
13
|
-
import
|
|
10
|
+
import "../../../../shared/tag-selection/feature/dist/index.js";
|
|
11
|
+
import { buildKeywordsByTagId as s, computeNextOcrAutoTagging as c } from "./index4.js";
|
|
12
|
+
import { useUpdateEntitySettingsMutation as l } from "../../data-access/dist/index5.js";
|
|
13
|
+
import "../../data-access/dist/index.js";
|
|
14
|
+
import { useCallback as u, useMemo as d, useState as f } from "react";
|
|
14
15
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index8.js
|
|
15
|
-
function
|
|
16
|
-
let { entityId:
|
|
16
|
+
function p({ selectedTag: p, setSelectedTag: m, settings: h, messages: g }) {
|
|
17
|
+
let { entityId: _, settingsData: v, refetchSettings: y, requireFreshSettings: b } = h, x = a(), S = o(), C = l(), [w, T] = f(!1), [E, D] = f("create"), [O, k] = f(e), [A, j] = f({});
|
|
17
18
|
return {
|
|
18
|
-
open:
|
|
19
|
-
mode:
|
|
20
|
-
values:
|
|
21
|
-
errors:
|
|
22
|
-
categoryOptions:
|
|
23
|
-
isSubmitting:
|
|
24
|
-
openCreate:
|
|
25
|
-
|
|
26
|
-
}, [
|
|
27
|
-
openEdit:
|
|
19
|
+
open: w,
|
|
20
|
+
mode: E,
|
|
21
|
+
values: O,
|
|
22
|
+
errors: A,
|
|
23
|
+
categoryOptions: d(() => t(), []),
|
|
24
|
+
isSubmitting: x.isPending || S.isPending || C.isPending,
|
|
25
|
+
openCreate: u(() => {
|
|
26
|
+
D("create"), m(void 0), k(e), j({}), T(!0);
|
|
27
|
+
}, [m]),
|
|
28
|
+
openEdit: u((e) => {
|
|
28
29
|
(async () => {
|
|
29
|
-
let t =
|
|
30
|
-
|
|
30
|
+
let t = v ?? await y(), n = s(t?.payables_ocr_auto_tagging);
|
|
31
|
+
m(e), D("edit"), k({
|
|
31
32
|
name: e.name,
|
|
32
33
|
category: e.category ?? "",
|
|
33
|
-
keywords:
|
|
34
|
+
keywords: n[e.id] ?? [],
|
|
34
35
|
keywordsInput: ""
|
|
35
|
-
}),
|
|
36
|
+
}), j({}), T(!0);
|
|
36
37
|
})();
|
|
37
38
|
}, [
|
|
39
|
+
v,
|
|
38
40
|
y,
|
|
39
|
-
|
|
40
|
-
h
|
|
41
|
+
m
|
|
41
42
|
]),
|
|
42
|
-
onOpenChange:
|
|
43
|
-
e ||
|
|
43
|
+
onOpenChange: u((e) => {
|
|
44
|
+
e || T(!1);
|
|
44
45
|
}, []),
|
|
45
|
-
close:
|
|
46
|
-
onNameChange:
|
|
46
|
+
close: u(() => T(!1), []),
|
|
47
|
+
onNameChange: u((e) => k((t) => ({
|
|
47
48
|
...t,
|
|
48
49
|
name: e
|
|
49
50
|
})), []),
|
|
50
|
-
onCategoryChange:
|
|
51
|
+
onCategoryChange: u((e) => k((t) => ({
|
|
51
52
|
...t,
|
|
52
53
|
category: e
|
|
53
54
|
})), []),
|
|
54
|
-
onKeywordsChange:
|
|
55
|
+
onKeywordsChange: u((e) => k((t) => ({
|
|
55
56
|
...t,
|
|
56
57
|
keywords: e
|
|
57
58
|
})), []),
|
|
58
|
-
onKeywordsInputChange:
|
|
59
|
+
onKeywordsInputChange: u((e) => k((t) => ({
|
|
59
60
|
...t,
|
|
60
61
|
keywordsInput: e
|
|
61
62
|
})), []),
|
|
62
|
-
submit:
|
|
63
|
-
let
|
|
64
|
-
if (
|
|
65
|
-
|
|
63
|
+
submit: u(async () => {
|
|
64
|
+
let e = i(O, g);
|
|
65
|
+
if (n(e)) {
|
|
66
|
+
j(e);
|
|
66
67
|
return;
|
|
67
68
|
}
|
|
68
|
-
|
|
69
|
-
let
|
|
70
|
-
name:
|
|
71
|
-
...
|
|
69
|
+
j({});
|
|
70
|
+
let t = O.name.trim(), a = O.category === "" ? void 0 : O.category, o = {
|
|
71
|
+
name: t,
|
|
72
|
+
...a ? { category: a } : {}
|
|
72
73
|
};
|
|
73
74
|
try {
|
|
74
|
-
let e =
|
|
75
|
-
path: { tag_id:
|
|
76
|
-
body:
|
|
77
|
-
}) : await
|
|
78
|
-
if (
|
|
79
|
-
let { changed: e, next:
|
|
80
|
-
e && await
|
|
81
|
-
path: { entity_id:
|
|
82
|
-
body: { payables_ocr_auto_tagging:
|
|
75
|
+
let e = O.keywords.length > 0 || E === "edit", t = _ && e ? await b() : void 0, n = E === "edit" && p ? await S.mutateAsync({
|
|
76
|
+
path: { tag_id: p.id },
|
|
77
|
+
body: o
|
|
78
|
+
}) : await x.mutateAsync({ body: o });
|
|
79
|
+
if (_ && t) {
|
|
80
|
+
let { changed: e, next: r } = c(t.payables_ocr_auto_tagging, n.id, O.keywords);
|
|
81
|
+
e && await C.mutateAsync({
|
|
82
|
+
path: { entity_id: _ },
|
|
83
|
+
body: { payables_ocr_auto_tagging: r }
|
|
83
84
|
});
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
-
} catch (
|
|
87
|
-
|
|
88
|
-
o(n) ? M({ name: n }) : M({ form: n ?? _.genericError });
|
|
86
|
+
T(!1);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
j(r(e, g));
|
|
89
89
|
}
|
|
90
90
|
}, [
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
91
|
+
O,
|
|
92
|
+
E,
|
|
93
|
+
p,
|
|
94
|
+
_,
|
|
95
|
+
x,
|
|
95
96
|
S,
|
|
96
97
|
C,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
x
|
|
98
|
+
g,
|
|
99
|
+
b
|
|
100
100
|
])
|
|
101
101
|
};
|
|
102
102
|
}
|
|
103
103
|
//#endregion
|
|
104
|
-
export {
|
|
104
|
+
export { p as useTagForm };
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/tags/feature/dist/index9.js
CHANGED
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { useTagsQuery as n } from "../../../../shared/tag-selection/data-access/dist/index2.js";
|
|
5
|
+
import { useTagsQuery as e } from "../../../../shared/tag-selection/data-access/dist/index2.js";
|
|
7
6
|
import "../../../../shared/tag-selection/data-access/dist/index.js";
|
|
7
|
+
import { buildTagRows as t, sortFieldForColumn as n } from "./index4.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 }) {
|
|
11
11
|
let [c, l] = a([{
|
|
12
12
|
id: "createdAtLabel",
|
|
13
13
|
desc: !0
|
|
14
|
-
}]), [u, d] = a(10), [f, p] = a(), m =
|
|
14
|
+
}]), [u, d] = a(10), [f, p] = a(), m = n(c[0]?.id), h = c[0]?.desc ? "desc" : "asc", g = e({
|
|
15
15
|
sort: m,
|
|
16
16
|
order: h,
|
|
17
17
|
limit: u,
|
|
18
18
|
pagination_token: f
|
|
19
|
-
}), _ = i(() =>
|
|
19
|
+
}), _ = i(() => t({
|
|
20
20
|
tags: g.data?.data ?? [],
|
|
21
21
|
keywordsByTagId: o,
|
|
22
22
|
userNamesById: s
|
|
@@ -25,9 +25,9 @@ function o({ keywordsByTagId: o, userNamesById: s }) {
|
|
|
25
25
|
o,
|
|
26
26
|
s
|
|
27
27
|
]), v = r((e) => (g.data?.data ?? []).find((t) => t.id === e), [g.data]), y = r((e) => {
|
|
28
|
-
let
|
|
29
|
-
l(
|
|
30
|
-
let r = t
|
|
28
|
+
let t = typeof e == "function" ? e(c) : e;
|
|
29
|
+
l(t);
|
|
30
|
+
let r = n(t[0]?.id), i = t[0]?.desc ? "desc" : "asc";
|
|
31
31
|
(r !== m || i !== h) && p(void 0);
|
|
32
32
|
}, [
|
|
33
33
|
c,
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index16.js
CHANGED
|
@@ -63,7 +63,7 @@ function d({ canDeactivate: a, canResendInvite: c, members: l, featureLabels: d,
|
|
|
63
63
|
openResendConfirmation: v.open,
|
|
64
64
|
onResendOpenChange: v.onOpenChange,
|
|
65
65
|
onResendConfirm: () => {
|
|
66
|
-
|
|
66
|
+
c && v.member && h.mutate({
|
|
67
67
|
name: v.member.name,
|
|
68
68
|
email: v.member.email,
|
|
69
69
|
redirectUri: s(f)
|
package/dist/libs/tesouro-embedded-components-react/settings-widget/team/feature/dist/index5.js
CHANGED
|
@@ -8,7 +8,7 @@ import { useEffect as n, useRef as r, useState as i } from "react";
|
|
|
8
8
|
function a(a) {
|
|
9
9
|
let { canRead: o, canWrite: s, directory: c, directoryReady: l, assignedAvatarsByGroupId: u, useListQuery: d, useEditMembers: f, useMutations: p, panelLabels: m, drawerLabels: h, countLabels: g, saveFailedMessage: _, deleteFailedMessage: v } = a, y = d(), b = p(), [x, S] = i("closed"), [C, w] = i(), [T, E] = i(""), [D, O] = i(""), [k, A] = i([]), [j, M] = i(), [N, P] = i(), [F, I] = i(), L = f(x === "edit" ? C : void 0), R = (L.data?.members?.data ?? []).map((e) => e.id), z = o ? y.data?.data ?? [] : [], B = l && (x !== "edit" || !!L.data), V = r(void 0);
|
|
10
10
|
n(() => {
|
|
11
|
-
x
|
|
11
|
+
x === "edit" && C && V.current !== C && L.data && l && (V.current = C, A(R.map((e) => c.idToOption.get(e)).filter((e) => !!e)));
|
|
12
12
|
}, [
|
|
13
13
|
x,
|
|
14
14
|
C,
|
|
@@ -11,7 +11,7 @@ import { useMemo as a } from "react";
|
|
|
11
11
|
//#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js
|
|
12
12
|
function o({ selectedId: o, enabled: s = !0 }) {
|
|
13
13
|
let c = s ? o : void 0, l = e(c), u = l.data, d = u?.type === "organization", f = c ?? null, p = n(f), m = t(f), h = p.data?.data, g = a(() => {
|
|
14
|
-
if (
|
|
14
|
+
if (h && h.length !== 0) {
|
|
15
15
|
if (u?.default_billing_address_id) {
|
|
16
16
|
let e = h.find((e) => e.id === u.default_billing_address_id);
|
|
17
17
|
if (e) return e;
|
|
@@ -18,8 +18,8 @@ function l() {
|
|
|
18
18
|
c(r, e) || (r = e, n.forEach((t) => t(e)));
|
|
19
19
|
}
|
|
20
20
|
function u(e) {
|
|
21
|
-
if (!
|
|
22
|
-
for (let n of t.values()) if (
|
|
21
|
+
if (!i && e) {
|
|
22
|
+
for (let n of t.values()) if (n.widgetToken && n.widgetToken !== e) {
|
|
23
23
|
i = !0, console.warn("[tesouro-embedded] Two top-level widget providers are mounted with different `widgetToken`s. getGlobalWidgetInitState() reports the earliest-mounted one only. Read the other subtree inside React with useWidgetConfig(), which resolves per provider level.");
|
|
24
24
|
return;
|
|
25
25
|
}
|
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.126", n = "351a9209eea8cd0856a6804bb3f29134109e3b42", 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
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { useTagsQuery as e } from "./index2.js";
|
|
2
2
|
import "./index3.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import "./index4.js";
|
|
4
|
+
import { useCreateTagMutation as t } from "./index5.js";
|
|
5
|
+
import { useUpdateTagMutation as n } from "./index6.js";
|
|
6
|
+
import { useDeleteTagMutation as r } from "./index7.js";
|
|
6
7
|
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/index3.js
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
"use client";
|
|
3
|
+
"use client";
|
|
4
|
+
"use client";
|
|
3
5
|
import "../../../data-access/dist/index.js";
|
|
4
|
-
|
|
5
|
-
var n = ({ client: n, organizationId: r }) => e({
|
|
6
|
-
client: n,
|
|
7
|
-
headers: t(r)
|
|
8
|
-
});
|
|
9
|
-
//#endregion
|
|
10
|
-
export { n as tagsInvalidationKey };
|
|
6
|
+
import "@tanstack/react-query";
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index4.js
CHANGED
|
@@ -1,34 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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";
|
|
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";
|
|
9
3
|
import "../../../data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./index3.js";
|
|
11
|
-
import { useMutation as a } from "@tanstack/react-query";
|
|
12
4
|
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/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
|
-
}
|
|
5
|
+
var n = ({ client: n, organizationId: r }) => e({
|
|
6
|
+
client: n,
|
|
7
|
+
headers: t(r)
|
|
8
|
+
});
|
|
33
9
|
//#endregion
|
|
34
|
-
export {
|
|
10
|
+
export { n as tagsInvalidationKey };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index5.js
CHANGED
|
@@ -2,26 +2,25 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { postTags as e } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { invalidateAllClients as t } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
7
7
|
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./
|
|
10
|
+
import { tagsInvalidationKey as i } from "./index4.js";
|
|
11
11
|
import { useMutation as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index5.js
|
|
13
13
|
function o() {
|
|
14
14
|
let { client: o, organizationId: s } = n();
|
|
15
15
|
return a({
|
|
16
|
-
mutationFn: async ({
|
|
17
|
-
let { data:
|
|
16
|
+
mutationFn: async ({ body: t }) => {
|
|
17
|
+
let { data: n } = await e({
|
|
18
18
|
client: o,
|
|
19
19
|
headers: r(s),
|
|
20
|
-
|
|
21
|
-
body: n,
|
|
20
|
+
body: t,
|
|
22
21
|
throwOnError: !0
|
|
23
22
|
});
|
|
24
|
-
return
|
|
23
|
+
return n;
|
|
25
24
|
},
|
|
26
25
|
onSuccess: async () => {
|
|
27
26
|
await t(i({
|
|
@@ -32,4 +31,4 @@ function o() {
|
|
|
32
31
|
});
|
|
33
32
|
}
|
|
34
33
|
//#endregion
|
|
35
|
-
export { o as
|
|
34
|
+
export { o as useCreateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index6.js
CHANGED
|
@@ -2,24 +2,26 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
5
|
+
import { patchTagsId as e } from "../../../data-access/dist/lib/rest/sdk.gen.js";
|
|
6
6
|
import { invalidateAllClients as t } from "../../../data-access/dist/lib/clientRegistry.js";
|
|
7
7
|
import { useEmbedApi as n } from "../../../data-access/dist/lib/EmbedApiContext.js";
|
|
8
8
|
import { organizationHeaders as r } from "../../../data-access/dist/lib/organizationHeaders.js";
|
|
9
9
|
import "../../../data-access/dist/index.js";
|
|
10
|
-
import { tagsInvalidationKey as i } from "./
|
|
10
|
+
import { tagsInvalidationKey as i } from "./index4.js";
|
|
11
11
|
import { useMutation as a } from "@tanstack/react-query";
|
|
12
12
|
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index6.js
|
|
13
13
|
function o() {
|
|
14
14
|
let { client: o, organizationId: s } = n();
|
|
15
15
|
return a({
|
|
16
|
-
mutationFn: async ({ path: t }) => {
|
|
17
|
-
await e({
|
|
16
|
+
mutationFn: async ({ path: t, body: n }) => {
|
|
17
|
+
let { data: i } = await e({
|
|
18
18
|
client: o,
|
|
19
19
|
headers: r(s),
|
|
20
20
|
path: t,
|
|
21
|
+
body: n,
|
|
21
22
|
throwOnError: !0
|
|
22
23
|
});
|
|
24
|
+
return i;
|
|
23
25
|
},
|
|
24
26
|
onSuccess: async () => {
|
|
25
27
|
await t(i({
|
|
@@ -30,4 +32,4 @@ function o() {
|
|
|
30
32
|
});
|
|
31
33
|
}
|
|
32
34
|
//#endregion
|
|
33
|
-
export { o as
|
|
35
|
+
export { o as useUpdateTagMutation };
|
package/dist/libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index7.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 "./index4.js";
|
|
11
|
+
import { useMutation as a } from "@tanstack/react-query";
|
|
12
|
+
//#region ../../libs/tesouro-embedded-components-react/shared/tag-selection/data-access/dist/index7.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/shared/tag-selection/feature/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import "./lib/permissions.js";
|
|
2
|
+
import { TAG_MESSAGE_LABELS_EN as e } from "./lib/labels.js";
|
|
3
|
+
import { getCategoryOptions as t, getTagCategoryLabel as n, hasFormErrors as r, resolveTagSubmitError as i, validateTagForm as a } from "./lib/helpers.js";
|
|
4
|
+
import "./lib/TagSelectorField.js";
|
|
5
|
+
export { e as TAG_MESSAGE_LABELS_EN, t as getCategoryOptions, n as getTagCategoryLabel, r as hasFormErrors, i as resolveTagSubmitError, a as validateTagForm };
|