@tesouro/embedded-components-react 0.7.40 → 0.7.42

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 (47) hide show
  1. package/README.md +2 -2
  2. package/dist/index.css +11 -0
  3. package/dist/index.d.ts +16 -14
  4. package/dist/lib/CounterpartsWidget.d.ts +16 -14
  5. package/dist/lib/CounterpartsWidgetPublic.d.ts +16 -14
  6. package/dist/lib/CustomersWidget.d.ts +16 -14
  7. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/acceptDisclosures.js +33 -28
  8. package/dist/libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/mocks/labels.js +6 -2
  9. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BankAccountOnboardingWidget.js +2 -2
  10. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/BusinessDetailsStep.js +2 -2
  11. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/PersonalDetailsStep.js +1 -1
  12. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/businessDetailsPanelMapping.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/lib/BankAccountOnboardingWidget/personalDetailsPanelMapping.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/bankAccountOnboarding.js +40 -22
  15. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/mocks/labels.js +14 -2
  16. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index.js +8 -10
  17. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index17.js +274 -2
  18. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index18.js +30 -4
  19. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index19.js +21 -272
  20. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index20.js +65 -26
  21. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index21.js +341 -21
  22. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index22.js +27 -65
  23. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index23.js +26 -341
  24. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index24.js +72 -27
  25. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index25.js +85 -26
  26. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index26.js +8 -74
  27. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index27.js +55 -83
  28. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index28.js +7 -6
  29. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index29.js +42 -37
  30. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartsWidget.js +30 -29
  31. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/constants.js +6 -6
  32. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +143 -95
  33. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js +60 -48
  34. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
  35. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index.js +4 -4
  36. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js +22 -15
  37. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index3.js +137 -135
  38. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/expenseManagement.js +163 -140
  39. package/dist/libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/mocks/labels.js +22 -16
  40. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/labels.js +12 -0
  41. package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js +255 -88
  42. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +106 -108
  43. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  44. package/dist/scenarios/index.d.ts +1 -1
  45. package/package.json +1 -1
  46. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index30.js +0 -11
  47. package/dist/libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index31.js +0 -64
@@ -2,123 +2,171 @@
2
2
  "use client";
3
3
  "use client";
4
4
  "use client";
5
- import { toast as e } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
5
+ import { toast as e, useFilterPanel as t } from "../../../../../../../packages/shared-ui-shadcn/dist/index.js";
6
6
  import "../../../../../shared/ui/dist/index.js";
7
- import { buildAnalyticsMap as t, buildCounterpartRows as n } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
8
- import { useCounterpartsQuery as r } from "../../../../../shared/counterpart-management/data-access/dist/index3.js";
9
- import { useCounterpartAddressesForRowsQuery as i } from "../../../../../shared/counterpart-management/data-access/dist/index5.js";
7
+ import { buildAnalyticsMap as n, buildCounterpartRows as r } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
8
+ import { useCounterpartsQuery as i } from "../../../../../shared/counterpart-management/data-access/dist/index3.js";
9
+ import { useCounterpartAddressesForRowsQuery as a } from "../../../../../shared/counterpart-management/data-access/dist/index5.js";
10
10
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
11
- import { PAYABLES_BILLED_STATUSES as a, PAYABLES_OWED_STATUSES as o, RECEIVABLES_BILLED_STATUSES as s, RECEIVABLES_DUE_STATUSES as c } from "./constants.js";
12
- import { usePayablesAnalyticsByCounterpartQuery as l, useReceivablesAnalyticsByCounterpartQuery as u } from "../../../../data-access/dist/index2.js";
11
+ import { PAGE_SIZE_OPTIONS as o, PAYABLES_BILLED_STATUSES as ee, PAYABLES_OWED_STATUSES as te, RECEIVABLES_BILLED_STATUSES as s, RECEIVABLES_DUE_STATUSES as c, TYPE_FILTER_OPTIONS as l } from "./constants.js";
12
+ import { usePayablesAnalyticsByCounterpartQuery as u, useReceivablesAnalyticsByCounterpartQuery as d } from "../../../../data-access/dist/index2.js";
13
13
  import "../../../../data-access/dist/index.js";
14
- import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
14
+ import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
15
15
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js
16
- function h({ isCustomer: h, enabled: g = !0, messages: _ }) {
17
- let [v, y] = m([]), [b, x] = m(10), [S, C] = m(), [w, T] = m(""), [E, D] = m(""), [O, k] = m("all");
18
- f(() => {
16
+ var g = {
17
+ Type: "type",
18
+ Search: "search"
19
+ };
20
+ function _({ isCustomer: _, enabled: v = !0, pageSizeOptions: y = o, messages: b, labels: x }) {
21
+ let [S, C] = h([]), [w, ne] = h(y[0] ?? 10), [re, T] = h(), [E, D] = h(""), [O, k] = h(""), [A, j] = h([]), M = A.length === 1 ? A[0] : void 0, N = t();
22
+ p(() => {
19
23
  let e = setTimeout(() => {
20
- D(w), C(void 0);
24
+ k(E), T(void 0);
21
25
  }, 400);
22
26
  return () => clearTimeout(e);
23
- }, [w]);
24
- let A = v[0], j = r({
25
- sort: A ? "counterpart_name" : void 0,
26
- order: A ? A.desc ? "desc" : "asc" : void 0,
27
- limit: b,
28
- pagination_token: S,
29
- counterpart_name__icontains: E || void 0,
30
- type: O === "all" ? void 0 : O,
31
- ...h ? { is_customer: !0 } : { is_vendor: !0 },
32
- enabled: g
33
- }), M = p(() => j.data?.data.map((e) => e.id) ?? [], [j.data?.data]), N = M.length > 0, P = i({
34
- counterpartIds: M,
35
- enabled: g && N
36
- }), F = u({
27
+ }, [E]);
28
+ let P = S[0], F = i({
29
+ sort: P ? "counterpart_name" : void 0,
30
+ order: P ? P.desc ? "desc" : "asc" : void 0,
31
+ limit: w,
32
+ pagination_token: re,
33
+ counterpart_name__icontains: O || void 0,
34
+ type: M,
35
+ ..._ ? { is_customer: !0 } : { is_vendor: !0 },
36
+ enabled: v
37
+ }), I = m(() => F.data?.data.map((e) => e.id) ?? [], [F.data?.data]), L = I.length > 0, R = a({
38
+ counterpartIds: I,
39
+ enabled: v && L
40
+ }), z = d({
37
41
  type: "invoice",
38
42
  statusIn: [...s],
39
- counterpartIdIn: M,
40
- enabled: g && h && N
41
- }), I = u({
43
+ counterpartIdIn: I,
44
+ enabled: v && _ && L
45
+ }), B = d({
42
46
  metric: "amount_due",
43
47
  type: "invoice",
44
48
  statusIn: [...c],
45
- counterpartIdIn: M,
46
- enabled: g && h && N
47
- }), L = l({
48
- statusIn: [...a],
49
- counterpartIdIn: M,
50
- enabled: g && !h && N
51
- }), R = l({
49
+ counterpartIdIn: I,
50
+ enabled: v && _ && L
51
+ }), V = u({
52
+ statusIn: [...ee],
53
+ counterpartIdIn: I,
54
+ enabled: v && !_ && L
55
+ }), H = u({
52
56
  metric: "amount_due",
53
- statusIn: [...o],
54
- counterpartIdIn: M,
55
- enabled: g && !h && N
56
- }), z = p(() => h ? F.data ? t(F.data.data) : void 0 : L.data ? t(L.data.data) : void 0, [
57
- h,
58
- F.data,
59
- L.data
60
- ]), B = p(() => h ? I.data ? t(I.data.data) : void 0 : R.data ? t(R.data.data) : void 0, [
61
- h,
62
- I.data,
63
- R.data
64
- ]), V = p(() => new Map(M.map((e, t) => [e, P[t]?.data?.data?.[0]])), [M, P]), H = h ? F.isError : L.isError, U = h ? I.isError : R.isError;
65
- f(() => {
66
- (H || U) && e.error(_.amountsUnavailable);
57
+ statusIn: [...te],
58
+ counterpartIdIn: I,
59
+ enabled: v && !_ && L
60
+ }), U = m(() => _ ? z.data ? n(z.data.data) : void 0 : V.data ? n(V.data.data) : void 0, [
61
+ _,
62
+ z.data,
63
+ V.data
64
+ ]), W = m(() => _ ? B.data ? n(B.data.data) : void 0 : H.data ? n(H.data.data) : void 0, [
65
+ _,
66
+ B.data,
67
+ H.data
68
+ ]), G = m(() => new Map(I.map((e, t) => [e, R[t]?.data?.data?.[0]])), [I, R]), K = _ ? z.isError : V.isError, q = _ ? B.isError : H.isError;
69
+ p(() => {
70
+ (K || q) && e.error(b.amountsUnavailable);
67
71
  }, [
68
- H,
69
- U,
70
- _.amountsUnavailable
72
+ K,
73
+ q,
74
+ b.amountsUnavailable
71
75
  ]);
72
- let W = p(() => n({
73
- counterparts: j.data?.data ?? [],
74
- addresses: V,
75
- billedAmounts: z,
76
- dueOrOwedAmounts: B,
77
- isBilledAmountLoading: z === void 0,
78
- isDueOrOwedAmountLoading: B === void 0,
79
- isBilledAmountError: H,
80
- isDueOrOwedAmountError: U
76
+ let J = m(() => r({
77
+ counterparts: F.data?.data ?? [],
78
+ addresses: G,
79
+ billedAmounts: U,
80
+ dueOrOwedAmounts: W,
81
+ isBilledAmountLoading: U === void 0,
82
+ isDueOrOwedAmountLoading: W === void 0,
83
+ isBilledAmountError: K,
84
+ isDueOrOwedAmountError: q
81
85
  }).map((e) => {
82
- let t = (z?.get(e.id) ?? 0) - (B?.get(e.id) ?? 0);
86
+ let t = (U?.get(e.id) ?? 0) - (W?.get(e.id) ?? 0);
83
87
  return {
84
88
  ...e,
89
+ name: e.name || x.unnamedCounterpart,
85
90
  isReceivedOrPaidPositive: t > 0
86
91
  };
87
92
  }), [
88
- j.data?.data,
89
- V,
90
- z,
91
- B,
92
- H,
93
- U
94
- ]), G = !!E || O !== "all", K = d((e) => {
95
- y((t) => typeof e == "function" ? e(t) : e), C(void 0);
96
- }, []), q = d((e) => {
97
- x(e), C(void 0);
98
- }, []), J = d(() => C(j.data?.next_pagination_token ?? void 0), [j.data?.next_pagination_token]), Y = d(() => C(j.data?.prev_pagination_token ?? void 0), [j.data?.prev_pagination_token]), X = d(() => {
99
- j.refetch();
100
- }, [j]), Z = d((e) => {
101
- k(e), C(void 0);
102
- }, []);
93
+ F.data?.data,
94
+ G,
95
+ U,
96
+ W,
97
+ K,
98
+ q,
99
+ x.unnamedCounterpart
100
+ ]), Y = m(() => l.map((e) => ({
101
+ value: e,
102
+ label: e === "individual" ? x.entityFilterIndividual : x.entityFilterOrganization
103
+ })), [x.entityFilterIndividual, x.entityFilterOrganization]), X = m(() => {
104
+ let e = [], t = Y.find((e) => e.value === M)?.label;
105
+ return t && e.push({
106
+ key: g.Type,
107
+ label: x.typeChip(t)
108
+ }), O && e.push({
109
+ key: g.Search,
110
+ label: x.searchChip(O)
111
+ }), e;
112
+ }, [
113
+ O,
114
+ M,
115
+ x,
116
+ Y
117
+ ]), ie = X.length > 0, ae = f((e) => {
118
+ C((t) => typeof e == "function" ? e(t) : e), T(void 0);
119
+ }, []), oe = f((e) => {
120
+ ne(e), T(void 0);
121
+ }, []), se = f(() => T(F.data?.next_pagination_token ?? void 0), [F.data?.next_pagination_token]), ce = f(() => T(F.data?.prev_pagination_token ?? void 0), [F.data?.prev_pagination_token]), Z = f(() => {
122
+ F.refetch();
123
+ }, [F]), Q = f((e) => {
124
+ j(e), T(void 0);
125
+ }, []), $ = f(() => {
126
+ D(""), k(""), T(void 0);
127
+ }, []), le = f((e) => {
128
+ if (e === g.Search) {
129
+ $();
130
+ return;
131
+ }
132
+ Q([]);
133
+ }, [$, Q]), ue = f(() => {
134
+ $(), j([]);
135
+ }, [$]), de = {
136
+ searchValue: E,
137
+ onSearchChange: D,
138
+ isPopoverOpen: N.isMenuOpen || !!N.activePanelId,
139
+ isMenuOpen: N.isMenuOpen,
140
+ isTypePanelOpen: N.activePanelId === g.Type,
141
+ onMenuToggle: N.toggleMenu,
142
+ onPopoverClose: () => {
143
+ N.closeMenu(), N.closePanel();
144
+ },
145
+ onTypeFieldSelect: () => N.openPanel(g.Type),
146
+ activeFilterCount: X.length,
147
+ chips: X,
148
+ onRemoveChip: le,
149
+ onClearAll: ue,
150
+ typeOptions: Y,
151
+ selectedTypes: A,
152
+ onTypeChange: Q
153
+ };
103
154
  return {
104
- rows: W,
105
- isLoading: j.isLoading,
106
- isError: j.isError,
107
- sorting: v,
108
- onSortingChange: K,
109
- pageSize: b,
110
- onPageSizeChange: q,
111
- hasNextPage: !!j.data?.next_pagination_token,
112
- hasPrevPage: !!j.data?.prev_pagination_token,
113
- onNextPage: J,
114
- onPrevPage: Y,
115
- searchValue: w,
116
- onSearchChange: T,
117
- entityFilter: O,
118
- onEntityFilterChange: Z,
119
- isFiltering: G,
120
- onRetry: X
155
+ rows: J,
156
+ isLoading: F.isLoading,
157
+ isError: F.isError,
158
+ sorting: S,
159
+ onSortingChange: ae,
160
+ pageSize: w,
161
+ onPageSizeChange: oe,
162
+ hasNextPage: !!F.data?.next_pagination_token,
163
+ hasPrevPage: !!F.data?.prev_pagination_token,
164
+ onNextPage: se,
165
+ onPrevPage: ce,
166
+ filters: de,
167
+ isFiltering: ie,
168
+ onRetry: Z
121
169
  };
122
170
  }
123
171
  //#endregion
124
- export { h as useCounterpartsTable };
172
+ export { g as CounterpartsFilterChipKey, _ as useCounterpartsTable };
@@ -9,59 +9,71 @@ import { COUNTERPART_MESSAGE_LABELS_EN as i } from "../../../../../shared/counte
9
9
  import { hasSelectedText as a } from "../../../../../shared/counterpart-management/feature/dist/lib/helpers.js";
10
10
  import "../../../../../shared/counterpart-management/feature/dist/index.js";
11
11
  import { getCounterpartPermissions as o } from "./permissions.js";
12
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as s } from "../../../../ui/dist/index2.js";
12
+ import { COUNTERPARTS_SCREEN_LABELS_EN as s, COUNTERPART_DETAILS_SHEET_LABELS_EN as c } from "../../../../ui/dist/index2.js";
13
13
  import "../../../../ui/dist/index.js";
14
- import { useCounterpartsTable as c } from "./useCounterpartsTable.js";
15
- import { useCounterpartDetailsActions as l } from "./useCounterpartDetailsActions.js";
16
- import { useCounterpartDetailsSheetView as u } from "./useCounterpartDetailsSheetView.js";
17
- import { useCallback as d, useEffect as f, useMemo as p, useState as m } from "react";
14
+ import { useCounterpartsTable as l } from "./useCounterpartsTable.js";
15
+ import { useCounterpartDetailsActions as u } from "./useCounterpartDetailsActions.js";
16
+ import { useCounterpartDetailsSheetView as d } from "./useCounterpartDetailsSheetView.js";
17
+ import { useCallback as f, useEffect as p, useMemo as m, useState as h } from "react";
18
18
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsWidget.js
19
- function h({ counterpartType: h, detailsLabels: g, messageLabels: _ }) {
20
- let { initResponse: v, widgetToken: y } = t(), b = r(), x = n(), S = p(() => ({
19
+ function g({ counterpartType: g, pageSizeOptions: _, detailsLabels: v, messageLabels: y, screenLabels: b }) {
20
+ let { initResponse: x, widgetToken: S } = t(), C = r(), w = n(), T = m(() => ({
21
21
  ...i,
22
- ..._
23
- }), [_]), C = p(() => ({
22
+ ...y
23
+ }), [y]), E = m(() => ({
24
+ ...c,
25
+ ...v
26
+ }), [v]), D = m(() => ({
24
27
  ...s,
25
- ...g
26
- }), [g]), w = h === "customer", T = p(() => e(), []), E = p(() => o(v?.scopes), [v?.scopes]), D = !(!y || v || x) || b && !v, [O, k] = m(), [A, j] = m("none"), M = E.canRead ? O : void 0;
27
- f(() => {
28
- E.canRead || (k(void 0), j("none"));
29
- }, [E.canRead]);
30
- let N = c({
31
- isCustomer: w,
32
- enabled: E.canRead,
33
- messages: S
34
- }), { details: P, detailsSheetView: F } = u({
35
- selectedId: M,
36
- isCustomer: w,
37
- enabled: E.canRead,
38
- detailsText: C
39
- }), I = l({
40
- counterpartType: h,
41
- selectedId: M,
42
- setSelectedId: k,
43
- view: A,
44
- setView: j,
45
- details: P,
46
- messages: S
47
- }), { closeAddress: L } = I;
28
+ ...b
29
+ }), [b]), O = g === "customer", k = O ? {
30
+ title: D.customersErrorTitle,
31
+ description: D.customersErrorDescription
32
+ } : {
33
+ title: D.vendorsErrorTitle,
34
+ description: D.vendorsErrorDescription
35
+ }, A = m(() => e(), []), j = m(() => o(x?.scopes), [x?.scopes]), M = !(!S || x || w) || C && !x, [N, P] = h(), [F, I] = h("none"), L = j.canRead ? N : void 0;
36
+ p(() => {
37
+ j.canRead || (P(void 0), I("none"));
38
+ }, [j.canRead]);
39
+ let R = l({
40
+ isCustomer: O,
41
+ enabled: j.canRead,
42
+ pageSizeOptions: _,
43
+ messages: T,
44
+ labels: D
45
+ }), { details: z, detailsSheetView: B } = d({
46
+ selectedId: L,
47
+ isCustomer: O,
48
+ enabled: j.canRead,
49
+ detailsText: E
50
+ }), V = u({
51
+ counterpartType: g,
52
+ selectedId: L,
53
+ setSelectedId: P,
54
+ view: F,
55
+ setView: I,
56
+ details: z,
57
+ messages: T
58
+ }), { closeAddress: H } = V;
48
59
  return {
49
- stateOptions: T,
50
- selectedId: M,
51
- view: A,
52
- table: N,
53
- details: P,
54
- detailsSheetView: F,
55
- permissions: E,
56
- isPermissionLoading: D,
57
- actions: I,
58
- handleRowClick: d((e) => {
59
- E.canRead && !a() && (L(), k(e.id), j("none"));
60
- }, [E.canRead, L]),
61
- closeDetails: d(() => {
62
- L(), k(void 0);
63
- }, [L])
60
+ stateOptions: A,
61
+ selectedId: L,
62
+ view: F,
63
+ table: R,
64
+ listError: k,
65
+ details: z,
66
+ detailsSheetView: B,
67
+ permissions: j,
68
+ isPermissionLoading: M,
69
+ actions: V,
70
+ handleRowClick: f((e) => {
71
+ j.canRead && !a() && (H(), P(e.id), I("none"));
72
+ }, [j.canRead, H]),
73
+ closeDetails: f(() => {
74
+ H(), P(void 0);
75
+ }, [H])
64
76
  };
65
77
  }
66
78
  //#endregion
67
- export { h as useCounterpartsWidget };
79
+ export { g as useCounterpartsWidget };
@@ -4,7 +4,7 @@ var e = {
4
4
  populated: "Six customers with their billed, received and due totals. Search by name, filter by type, sort by name, or click a row to open the customer. Create new adds a customer, and the sheet edits, deletes and adds an address; changes last until you switch scenario.",
5
5
  empty: "The organization has no customers yet. Press Create new, fill in a name and email, and save: the customer opens in its sheet and joins the list.",
6
6
  loading: "The customers read is held open, so the table skeleton stays on screen.",
7
- error: "The customers read fails with a 500, so the table shows Failed to load. Try again re-issues the read, which fails again.",
7
+ error: "The customers read fails with a 500, so the table shows Failed to load Customer. Reload re-issues the read, which fails again.",
8
8
  "control-hidden": "The token has counterpart:read:org but not counterpart:write:org. The list and the customer sheet render, but Create new, Edit, the delete menu and Add address are absent.",
9
9
  paginated: "Fourteen customers at ten a page. The next and previous arrows follow the pagination token; the rows-per-page menu starts again from page one."
10
10
  },
@@ -1,4 +1,4 @@
1
- import { COUNTERPART_DETAILS_SHEET_LABELS_EN as e } from "./index2.js";
2
- import { CounterpartsScreen as t } from "./index3.js";
3
- import { CounterpartDetailsSheet as n } from "./index7.js";
4
- export { e as COUNTERPART_DETAILS_SHEET_LABELS_EN, n as CounterpartDetailsSheet, t as CounterpartsScreen };
1
+ import { COUNTERPARTS_SCREEN_LABELS_EN as e, COUNTERPART_DETAILS_SHEET_LABELS_EN as t } from "./index2.js";
2
+ import { CounterpartsScreen as n } from "./index3.js";
3
+ import { CounterpartDetailsSheet as r } from "./index7.js";
4
+ export { e as COUNTERPARTS_SCREEN_LABELS_EN, t as COUNTERPART_DETAILS_SHEET_LABELS_EN, r as CounterpartDetailsSheet, n as CounterpartsScreen };
@@ -1,6 +1,7 @@
1
+ import { FILTER_MENU_BUTTON_LABELS_EN as e, FILTER_TAG_LABELS_EN as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index2.js
2
- var e = {
3
- createButton: "Create new",
3
+ var n = {
4
+ createButton: "Add customer",
4
5
  vendorsCreateButton: "Add vendor",
5
6
  columnName: "Name",
6
7
  sortByName: "Sort by name",
@@ -9,13 +10,16 @@ var e = {
9
10
  columnAmountDue: "Amount due",
10
11
  columnTotalPaidToDate: "Total paid to date",
11
12
  columnBalanceDue: "Balance due",
12
- columnActions: "Actions",
13
13
  openRow: (e) => `View details — ${e}`,
14
- openActionsMenu: "Open actions menu",
15
- editAction: "Edit",
16
- deleteAction: "Delete",
17
- searchPlaceholder: "Search",
18
- entityFilterAll: "All types",
14
+ unnamedCounterpart: "Unspecified",
15
+ searchPlaceholder: "Search by name",
16
+ searchLabel: "Search by name",
17
+ filtersButton: e.filters,
18
+ filterFieldType: "Type",
19
+ filterChipRemove: t.remove,
20
+ typeChip: (e) => `Type: ${e}`,
21
+ searchChip: (e) => `Search: ${e}`,
22
+ clearAllFilters: "Clear all",
19
23
  entityFilterOrganization: "Companies",
20
24
  entityFilterIndividual: "Individuals",
21
25
  customersEmptyTitle: "No customers yet",
@@ -27,12 +31,15 @@ var e = {
27
31
  customersFilterEmptyTitle: "No customers found",
28
32
  vendorsFilterEmptyTitle: "No vendors found",
29
33
  filterEmptyDescription: "Try adjusting your search or filter criteria.",
30
- errorTitle: "Failed to load",
31
- errorDescription: "Something went wrong while fetching this list. Please try again.",
32
- errorRetry: "Try again",
33
- accessRestrictedTitle: "Access restricted",
34
- accessRestrictedDescription: "You don't have permission to view counterparts."
35
- }, t = {
34
+ filterEmptyAction: "Clear filters",
35
+ customersErrorTitle: "Failed to load Customer",
36
+ customersErrorDescription: "There was an error loading customer.",
37
+ vendorsErrorTitle: "Failed to load Vendor",
38
+ vendorsErrorDescription: "There was an error loading vendor.",
39
+ errorRetry: "Reload",
40
+ accessRestrictedTitle: "Access Restricted",
41
+ accessRestrictedDescription: "You don’t have permissions to view this page. Contact your system administrator for details."
42
+ }, r = {
36
43
  hiddenDescription: "Counterpart details",
37
44
  loadingTitle: "Loading...",
38
45
  notFoundCustomerTitle: "Customer not found",
@@ -140,4 +147,4 @@ var e = {
140
147
  saveButton: "Save"
141
148
  };
142
149
  //#endregion
143
- export { e as COUNTERPARTS_SCREEN_LABELS_EN, t as COUNTERPART_DETAILS_SHEET_LABELS_EN };
150
+ export { n as COUNTERPARTS_SCREEN_LABELS_EN, r as COUNTERPART_DETAILS_SHEET_LABELS_EN };