@tesouro/embedded-components-react 0.5.297 → 0.5.298
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 +1 -13
- package/dist/index.d.ts +229 -249
- package/dist/index.js +26 -27
- package/dist/lib/ReceivablesWidget.d.ts +72 -79
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js +140 -146
- 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/lib/WidgetSuite/sections/InvoicingSection.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js +1 -1
- package/package.json +1 -1
- package/dist/lib/InvoicingWidget.d.ts +0 -668
- package/dist/lib/InvoicingWidget.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidgetMonite/ReceivablesWidgetMonite.js +0 -46
|
@@ -3,11 +3,78 @@ import { ComponentType, AnchorHTMLAttributes, ReactNode, ErrorInfo } from 'react
|
|
|
3
3
|
import { PartialDeep } from 'type-fest';
|
|
4
4
|
import { FallbackProps } from 'react-error-boundary';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
interface LabelLabels {
|
|
7
|
+
/**
|
|
8
|
+
* How the field name and its requirement fragment compose. `{label}` is the
|
|
9
|
+
* name, `{marker}` the asterisk or the note — reorder them freely, and note
|
|
10
|
+
* that the space between them is part of this string.
|
|
11
|
+
*/
|
|
12
|
+
composition: string;
|
|
13
|
+
/** In the label's own colour, deliberately not `destructive`. */
|
|
14
|
+
requiredMarker: string;
|
|
15
|
+
/**
|
|
16
|
+
* Screen-reader-only stand-in for the marker, for a control whose role does
|
|
17
|
+
* not take `aria-required` — a popover trigger is a `button`, which does
|
|
18
|
+
* not. Render it hidden and name it from the control's `aria-labelledby`.
|
|
19
|
+
*/
|
|
20
|
+
requiredAccessibleText: string;
|
|
21
|
+
optionalNote: string;
|
|
22
|
+
/** "This has no meaning here", as against `optionalNote`'s "may be blank". */
|
|
23
|
+
notApplicableNote: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
interface RequiredFieldsLegendLabels {
|
|
27
|
+
/**
|
|
28
|
+
* One string, so a translator can move the marker into whatever clause the
|
|
29
|
+
* language wants. `{marker}` is substituted with `marker`, rendered
|
|
30
|
+
* semi-bold; keep the placeholder when overriding.
|
|
31
|
+
*/
|
|
32
|
+
instruction: string;
|
|
33
|
+
marker: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
interface FilterMenuButtonLabels {
|
|
37
|
+
/** Button text, followed by "(N)" when `activeCount` is set. */
|
|
38
|
+
filters: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
interface FilterTagLabels {
|
|
42
|
+
/**
|
|
43
|
+
* Accessible name for the editable tag body. `{label}` is substituted with
|
|
44
|
+
* the tag's own text; keep the placeholder when overriding.
|
|
45
|
+
*/
|
|
46
|
+
edit: string;
|
|
47
|
+
/** Accessible name for the × dismiss button. `{label}` is substituted. */
|
|
48
|
+
remove: string;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
interface DateRangePickerLabels {
|
|
52
|
+
/**
|
|
53
|
+
* Name of the preset field, rendered before the select (a `:` is appended by
|
|
54
|
+
* the component). Owners showing more than one date field pass the one that
|
|
55
|
+
* names theirs, e.g. "Due date range".
|
|
56
|
+
*/
|
|
57
|
+
fieldLabel: string;
|
|
58
|
+
/** Select placeholder shown while the range matches no preset. */
|
|
59
|
+
presetPlaceholder: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
interface AmountFilterLabels {
|
|
63
|
+
/**
|
|
64
|
+
* Rendered next to the min input. Owners pass the wording that matches their
|
|
65
|
+
* bound semantics — "No less than" for inclusive, "Greater than" for not.
|
|
66
|
+
*/
|
|
67
|
+
min: string;
|
|
68
|
+
/** Rendered next to the max input. See {@link min}. */
|
|
69
|
+
max: string;
|
|
70
|
+
/** Amount-mode radio options. */
|
|
71
|
+
modeAny: string;
|
|
72
|
+
modeExact: string;
|
|
73
|
+
modeRange: string;
|
|
74
|
+
/** Flow-direction radio options, shown only when `showFlowDirection`. */
|
|
75
|
+
flowAny: string;
|
|
76
|
+
flowIn: string;
|
|
77
|
+
flowOut: string;
|
|
11
78
|
}
|
|
12
79
|
|
|
13
80
|
type AuthToken = string | undefined;
|
|
@@ -339,80 +406,6 @@ type EmbeddedClient = Client;
|
|
|
339
406
|
type ExtractLiterals<T> = T extends string ? string extends T ? never : T : never;
|
|
340
407
|
type BaseUrl = ExtractLiterals<ClientOptions['baseUrl']>;
|
|
341
408
|
|
|
342
|
-
interface LabelLabels {
|
|
343
|
-
/**
|
|
344
|
-
* How the field name and its requirement fragment compose. `{label}` is the
|
|
345
|
-
* name, `{marker}` the asterisk or the note — reorder them freely, and note
|
|
346
|
-
* that the space between them is part of this string.
|
|
347
|
-
*/
|
|
348
|
-
composition: string;
|
|
349
|
-
/** In the label's own colour, deliberately not `destructive`. */
|
|
350
|
-
requiredMarker: string;
|
|
351
|
-
/**
|
|
352
|
-
* Screen-reader-only stand-in for the marker, for a control whose role does
|
|
353
|
-
* not take `aria-required` — a popover trigger is a `button`, which does
|
|
354
|
-
* not. Render it hidden and name it from the control's `aria-labelledby`.
|
|
355
|
-
*/
|
|
356
|
-
requiredAccessibleText: string;
|
|
357
|
-
optionalNote: string;
|
|
358
|
-
/** "This has no meaning here", as against `optionalNote`'s "may be blank". */
|
|
359
|
-
notApplicableNote: string;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
interface RequiredFieldsLegendLabels {
|
|
363
|
-
/**
|
|
364
|
-
* One string, so a translator can move the marker into whatever clause the
|
|
365
|
-
* language wants. `{marker}` is substituted with `marker`, rendered
|
|
366
|
-
* semi-bold; keep the placeholder when overriding.
|
|
367
|
-
*/
|
|
368
|
-
instruction: string;
|
|
369
|
-
marker: string;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
interface FilterMenuButtonLabels {
|
|
373
|
-
/** Button text, followed by "(N)" when `activeCount` is set. */
|
|
374
|
-
filters: string;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
interface FilterTagLabels {
|
|
378
|
-
/**
|
|
379
|
-
* Accessible name for the editable tag body. `{label}` is substituted with
|
|
380
|
-
* the tag's own text; keep the placeholder when overriding.
|
|
381
|
-
*/
|
|
382
|
-
edit: string;
|
|
383
|
-
/** Accessible name for the × dismiss button. `{label}` is substituted. */
|
|
384
|
-
remove: string;
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
interface DateRangePickerLabels {
|
|
388
|
-
/**
|
|
389
|
-
* Name of the preset field, rendered before the select (a `:` is appended by
|
|
390
|
-
* the component). Owners showing more than one date field pass the one that
|
|
391
|
-
* names theirs, e.g. "Due date range".
|
|
392
|
-
*/
|
|
393
|
-
fieldLabel: string;
|
|
394
|
-
/** Select placeholder shown while the range matches no preset. */
|
|
395
|
-
presetPlaceholder: string;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
interface AmountFilterLabels {
|
|
399
|
-
/**
|
|
400
|
-
* Rendered next to the min input. Owners pass the wording that matches their
|
|
401
|
-
* bound semantics — "No less than" for inclusive, "Greater than" for not.
|
|
402
|
-
*/
|
|
403
|
-
min: string;
|
|
404
|
-
/** Rendered next to the max input. See {@link min}. */
|
|
405
|
-
max: string;
|
|
406
|
-
/** Amount-mode radio options. */
|
|
407
|
-
modeAny: string;
|
|
408
|
-
modeExact: string;
|
|
409
|
-
modeRange: string;
|
|
410
|
-
/** Flow-direction radio options, shown only when `showFlowDirection`. */
|
|
411
|
-
flowAny: string;
|
|
412
|
-
flowIn: string;
|
|
413
|
-
flowOut: string;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
409
|
type LinkComponentProps = AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
417
410
|
children?: ReactNode;
|
|
418
411
|
};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
export { e as InvoicingWidget, t as ReceivablesWidget };
|
|
1
|
+
import { ReceivablesWidget as e } from "./lib/ReceivablesWidget/ReceivablesWidget.js";
|
|
2
|
+
export { e as ReceivablesWidget };
|
|
@@ -5,43 +5,37 @@
|
|
|
5
5
|
import { hasAnyScope as e } from "../../../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
6
|
import { Scope as t } from "../../../../../shared/data-access/dist/lib/scopes.js";
|
|
7
7
|
import "../../../../../shared/data-access/dist/index.js";
|
|
8
|
-
import {
|
|
9
|
-
import { useRefetchWidget as r, useWidgetConfig as i, useWidgetError as ee, useWidgetInitStaleForToken as te, useWidgetLoading as ne } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
|
+
import { useRefetchWidget as n, useWidgetConfig as r, useWidgetError as i, useWidgetInitStaleForToken as ee, useWidgetLoading as te } from "../../../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
9
|
import "../../../../../shared/feature/dist/index.js";
|
|
11
|
-
import {
|
|
12
|
-
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as ie } from "../../../../ui/dist/index14.js";
|
|
10
|
+
import { RECEIVABLE_STATUS_BADGE_LABELS_EN as ne } from "../../../../ui/dist/index14.js";
|
|
13
11
|
import "../../../../ui/dist/index.js";
|
|
14
|
-
import { hasSelectedText as
|
|
12
|
+
import { hasSelectedText as re } from "../../../../../shared/product-catalog/feature/dist/lib/helpers.js";
|
|
15
13
|
import "../../../../../shared/product-catalog/feature/dist/index.js";
|
|
16
|
-
import { getCreateFollowUp as
|
|
17
|
-
import { getDocumentTitle as
|
|
18
|
-
import { RECEIVABLE_MESSAGE_LABELS_EN as
|
|
19
|
-
import { getReceivablePermissions as
|
|
20
|
-
import { useReceivableActions as
|
|
21
|
-
import { useReceivableActionsModal as
|
|
22
|
-
import { useReceivableDetails as
|
|
23
|
-
import { useReceivableForm as
|
|
24
|
-
import { useReceivablesTable as
|
|
14
|
+
import { getCreateFollowUp as ie } from "./actionsModal.js";
|
|
15
|
+
import { getDocumentTitle as ae } from "./helpers.js";
|
|
16
|
+
import { RECEIVABLE_MESSAGE_LABELS_EN as oe } from "./labels.js";
|
|
17
|
+
import { getReceivablePermissions as se } from "./permissions.js";
|
|
18
|
+
import { useReceivableActions as ce } from "./useReceivableActions.js";
|
|
19
|
+
import { useReceivableActionsModal as le } from "./useReceivableActionsModal.js";
|
|
20
|
+
import { useReceivableDetails as ue } from "./useReceivableDetails.js";
|
|
21
|
+
import { useReceivableForm as de } from "./useReceivableForm.js";
|
|
22
|
+
import { useReceivablesTable as fe } from "./useReceivablesTable.js";
|
|
25
23
|
import { useCallback as a, useEffect as o, useMemo as s, useRef as c, useState as l } from "react";
|
|
26
24
|
//#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesWidget.js
|
|
27
|
-
function u({ auditHistoryLabels: u, counterpartMessageLabels:
|
|
28
|
-
let _ = n()
|
|
29
|
-
|
|
30
|
-
_(re.Mounted);
|
|
31
|
-
}, [_]);
|
|
32
|
-
let { initResponse: v, widgetToken: be } = i(), y = ne(), xe = ee(), Se = r(), b = te(), x = !!v && !b, S = s(() => le(v?.scopes), [v?.scopes]), Ce = !!v && b, C = !!v && S.canRead, w = !!v && S.canWrite, T = x && S.canRead, E = x && S.canWrite, D = !!xe && !x && !y, O = !x && !D && !!(be || y), k = s(() => ({
|
|
33
|
-
...ce,
|
|
25
|
+
function u({ auditHistoryLabels: u, counterpartMessageLabels: pe, embeddedBankName: me, filterLabels: he, initialCounterpartId: f, initialView: p, messageLabels: m, onReceivableCreated: h, onReceivableOpened: g, pageSizeOptions: ge, screenLabels: _e }) {
|
|
26
|
+
let { initResponse: _, widgetToken: ve } = r(), v = te(), ye = i(), be = n(), y = ee(), b = !!_ && !y, x = s(() => se(_?.scopes), [_?.scopes]), xe = !!_ && y, S = !!_ && x.canRead, C = !!_ && x.canWrite, w = b && x.canRead, T = b && x.canWrite, E = !!ye && !b && !v, D = !b && !E && !!(ve || v), O = s(() => ({
|
|
27
|
+
...oe,
|
|
34
28
|
...m
|
|
35
|
-
}), [m]),
|
|
36
|
-
...
|
|
37
|
-
...
|
|
38
|
-
}), [
|
|
39
|
-
|
|
40
|
-
let [
|
|
41
|
-
|
|
42
|
-
}, []),
|
|
43
|
-
let r =
|
|
44
|
-
r.openDetails && (
|
|
29
|
+
}), [m]), k = _e?.statusBadge, A = s(() => ({
|
|
30
|
+
...ne,
|
|
31
|
+
...k
|
|
32
|
+
}), [k]), [j, M] = l(), [N, P] = l(!1), [F, Se] = l(j);
|
|
33
|
+
j && j !== F && Se(j);
|
|
34
|
+
let [I, L] = l(!1), [Ce, R] = l(), z = e(_?.scopes, [t.CounterpartReadOrg]), we = a(() => R(void 0), []), [B, V] = l(!1), Te = a(() => V(!0), []), H = a(() => V(!1), []), Ee = a((e) => {
|
|
35
|
+
M(e), P(!0);
|
|
36
|
+
}, []), U = le({ messages: O }), W = U.open, De = a((e, t, n) => {
|
|
37
|
+
let r = ie(n);
|
|
38
|
+
r.openDetails && (M(e), P(!0)), r.actionsModal && W({
|
|
45
39
|
action: n.mode,
|
|
46
40
|
receivableId: e,
|
|
47
41
|
documentType: t,
|
|
@@ -49,28 +43,28 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
49
43
|
inlineItems: n.inlineItems,
|
|
50
44
|
showEmailStep: r.actionsModal.showEmailStep
|
|
51
45
|
}), h?.(e, t);
|
|
52
|
-
}, [h,
|
|
46
|
+
}, [h, W]), G = fe({
|
|
53
47
|
initialCounterpartId: p === "create" ? void 0 : f,
|
|
54
|
-
messages:
|
|
55
|
-
statusLabels:
|
|
56
|
-
filterLabels:
|
|
57
|
-
pageSizeOptions:
|
|
58
|
-
enabled:
|
|
59
|
-
visible:
|
|
60
|
-
}),
|
|
61
|
-
|
|
62
|
-
}, [g]),
|
|
63
|
-
selectedReceivableId:
|
|
64
|
-
enabled:
|
|
65
|
-
canWrite:
|
|
66
|
-
messages:
|
|
67
|
-
statusLabels:
|
|
48
|
+
messages: O,
|
|
49
|
+
statusLabels: A,
|
|
50
|
+
filterLabels: he,
|
|
51
|
+
pageSizeOptions: ge,
|
|
52
|
+
enabled: w,
|
|
53
|
+
visible: S
|
|
54
|
+
}), Oe = a((e) => {
|
|
55
|
+
M(e), P(!0), g?.(e, "invoice");
|
|
56
|
+
}, [g]), K = ue({
|
|
57
|
+
selectedReceivableId: j,
|
|
58
|
+
enabled: N && w,
|
|
59
|
+
canWrite: C,
|
|
60
|
+
messages: O,
|
|
61
|
+
statusLabels: A,
|
|
68
62
|
auditHistoryLabels: u,
|
|
69
|
-
onOpenReceivable:
|
|
70
|
-
onOpenCustomer:
|
|
71
|
-
}),
|
|
72
|
-
let r = n.mode === "issue", i = r &&
|
|
73
|
-
(i || n.inlineItems.length !== 0) &&
|
|
63
|
+
onOpenReceivable: Oe,
|
|
64
|
+
onOpenCustomer: z ? R : void 0
|
|
65
|
+
}), q = c("edit"), ke = a((e, t, n) => {
|
|
66
|
+
let r = n.mode === "issue", i = r && q.current !== "issue" && n.hasCustomerEmail;
|
|
67
|
+
(i || n.inlineItems.length !== 0) && W({
|
|
74
68
|
action: r || n.mode === "recurrence" ? n.mode : "update",
|
|
75
69
|
receivableId: e,
|
|
76
70
|
documentType: t,
|
|
@@ -78,36 +72,36 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
78
72
|
inlineItems: n.inlineItems,
|
|
79
73
|
showEmailStep: i
|
|
80
74
|
});
|
|
81
|
-
}, [
|
|
82
|
-
messages:
|
|
83
|
-
counterpartMessageLabels:
|
|
84
|
-
embeddedBankName:
|
|
85
|
-
canCreateCustomer:
|
|
86
|
-
onCreated:
|
|
87
|
-
onUpdated:
|
|
88
|
-
}),
|
|
89
|
-
|
|
90
|
-
}, [
|
|
75
|
+
}, [W]), J = de({
|
|
76
|
+
messages: O,
|
|
77
|
+
counterpartMessageLabels: pe,
|
|
78
|
+
embeddedBankName: me,
|
|
79
|
+
canCreateCustomer: x.canCreateCustomer,
|
|
80
|
+
onCreated: De,
|
|
81
|
+
onUpdated: ke
|
|
82
|
+
}), Ae = a(() => {
|
|
83
|
+
T && J.openCreate("invoice");
|
|
84
|
+
}, [T, J.openCreate]), Y = c(!1);
|
|
91
85
|
o(() => {
|
|
92
|
-
|
|
86
|
+
Y.current || p === "create" && T && (Y.current = !0, J.openCreate("invoice", { customerId: f }));
|
|
93
87
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
88
|
+
T,
|
|
89
|
+
J.openCreate,
|
|
96
90
|
f,
|
|
97
91
|
p
|
|
98
92
|
]);
|
|
99
|
-
let
|
|
100
|
-
selectedReceivable:
|
|
101
|
-
selectedRecurrence:
|
|
102
|
-
messages:
|
|
103
|
-
onCreated:
|
|
93
|
+
let X = ce({
|
|
94
|
+
selectedReceivable: K.receivable,
|
|
95
|
+
selectedRecurrence: K.recurrence,
|
|
96
|
+
messages: O,
|
|
97
|
+
onCreated: Ee,
|
|
104
98
|
onDeleted: (e) => {
|
|
105
|
-
e ===
|
|
99
|
+
e === j && (M(void 0), P(!1));
|
|
106
100
|
},
|
|
107
101
|
onCompleteBeforeIssue: (e, t) => {
|
|
108
|
-
|
|
102
|
+
q.current = t, J.openEdit(e, { highlightForIssue: !0 }), N && L(!0), P(!1);
|
|
109
103
|
},
|
|
110
|
-
onIssuedForSend: (e, t) =>
|
|
104
|
+
onIssuedForSend: (e, t) => W({
|
|
111
105
|
action: "issue",
|
|
112
106
|
receivableId: e,
|
|
113
107
|
documentType: "invoice",
|
|
@@ -115,7 +109,7 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
115
109
|
inlineItems: [],
|
|
116
110
|
showEmailStep: !0
|
|
117
111
|
}),
|
|
118
|
-
onResend: (e, t) =>
|
|
112
|
+
onResend: (e, t) => W({
|
|
119
113
|
action: "issue",
|
|
120
114
|
receivableId: e,
|
|
121
115
|
documentType: "invoice",
|
|
@@ -126,109 +120,109 @@ function u({ auditHistoryLabels: u, counterpartMessageLabels: he, embeddedBankNa
|
|
|
126
120
|
})
|
|
127
121
|
});
|
|
128
122
|
o(() => {
|
|
129
|
-
|
|
130
|
-
}, [
|
|
131
|
-
|
|
123
|
+
J.open || (q.current = "edit");
|
|
124
|
+
}, [J.open]), o(() => {
|
|
125
|
+
J.open || U.isOpen || !I || (L(!1), P(!0));
|
|
132
126
|
}, [
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
U.isOpen,
|
|
128
|
+
J.open,
|
|
129
|
+
I
|
|
136
130
|
]);
|
|
137
|
-
let
|
|
131
|
+
let Z = b && !x.canWrite, Q = J.open || J.counterpartView !== "none" || !!X.actionTarget || X.payment.isOpen || U.isOpen || B, $ = J.close, je = J.counterpartForm.close, { closeAction: Me } = X, Ne = X.payment.close, Pe = U.close;
|
|
138
132
|
o(() => {
|
|
139
|
-
|
|
133
|
+
Z && Q && ($(), je(), Me(), Ne(), Pe(), H());
|
|
140
134
|
}, [
|
|
141
|
-
|
|
142
|
-
Le,
|
|
135
|
+
Me,
|
|
143
136
|
Pe,
|
|
144
|
-
|
|
145
|
-
U,
|
|
146
|
-
Ie,
|
|
137
|
+
je,
|
|
147
138
|
$,
|
|
148
|
-
|
|
139
|
+
H,
|
|
140
|
+
Ne,
|
|
141
|
+
Q,
|
|
142
|
+
Z
|
|
149
143
|
]);
|
|
150
|
-
let
|
|
151
|
-
|
|
152
|
-
}, [g]),
|
|
153
|
-
|
|
154
|
-
}, []),
|
|
155
|
-
if (
|
|
144
|
+
let Fe = a((e) => {
|
|
145
|
+
re() || (M(e.id), P(!0), g?.(e.id, e.type));
|
|
146
|
+
}, [g]), Ie = a(() => {
|
|
147
|
+
P(!1), M(void 0), R(void 0);
|
|
148
|
+
}, []), Le = a((e, t) => {
|
|
149
|
+
if (T) {
|
|
156
150
|
if (e === "edit") {
|
|
157
|
-
|
|
151
|
+
K.receivable && (q.current = "edit", J.openEdit(K.receivable), L(!0), P(!1));
|
|
158
152
|
return;
|
|
159
153
|
}
|
|
160
|
-
|
|
154
|
+
X.openAction(e, {
|
|
161
155
|
id: t.id,
|
|
162
|
-
title:
|
|
156
|
+
title: K.receivable ? ae(K.receivable, O) : t.title,
|
|
163
157
|
type: t.type
|
|
164
|
-
},
|
|
158
|
+
}, K.receivable ?? null);
|
|
165
159
|
}
|
|
166
160
|
}, [
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
161
|
+
X,
|
|
162
|
+
T,
|
|
163
|
+
K.receivable,
|
|
164
|
+
J.openEdit,
|
|
165
|
+
O
|
|
172
166
|
]);
|
|
173
167
|
return {
|
|
174
|
-
canWrite:
|
|
175
|
-
canEditSettings:
|
|
176
|
-
actionsSuspended:
|
|
177
|
-
isAccessRestricted:
|
|
178
|
-
table:
|
|
179
|
-
...
|
|
168
|
+
canWrite: C,
|
|
169
|
+
canEditSettings: S && x.canEditSettings,
|
|
170
|
+
actionsSuspended: xe,
|
|
171
|
+
isAccessRestricted: b && !x.canRead,
|
|
172
|
+
table: S ? G : {
|
|
173
|
+
...G,
|
|
180
174
|
rows: [],
|
|
181
175
|
statusCards: void 0,
|
|
182
176
|
isError: !1
|
|
183
177
|
},
|
|
184
|
-
isTableLoading:
|
|
185
|
-
isError:
|
|
186
|
-
onRetry:
|
|
187
|
-
details:
|
|
188
|
-
detailsOpen:
|
|
189
|
-
closeDetails:
|
|
190
|
-
detailsPanelKey:
|
|
191
|
-
customerDetailsId:
|
|
192
|
-
closeCustomerDetails:
|
|
193
|
-
openCustomerDetails:
|
|
194
|
-
canCreateCustomer:
|
|
195
|
-
messages:
|
|
178
|
+
isTableLoading: S ? G.isLoading || D && G.rows.length === 0 : D,
|
|
179
|
+
isError: E || S && G.isError,
|
|
180
|
+
onRetry: E ? be : G.onRetry,
|
|
181
|
+
details: K,
|
|
182
|
+
detailsOpen: N && S,
|
|
183
|
+
closeDetails: Ie,
|
|
184
|
+
detailsPanelKey: F,
|
|
185
|
+
customerDetailsId: Ce,
|
|
186
|
+
closeCustomerDetails: we,
|
|
187
|
+
openCustomerDetails: z ? R : void 0,
|
|
188
|
+
canCreateCustomer: x.canCreateCustomer,
|
|
189
|
+
messages: O,
|
|
196
190
|
form: {
|
|
197
|
-
...
|
|
198
|
-
open:
|
|
199
|
-
counterpartView:
|
|
191
|
+
...J,
|
|
192
|
+
open: C && J.open,
|
|
193
|
+
counterpartView: C ? J.counterpartView : "none",
|
|
200
194
|
counterpartForm: {
|
|
201
|
-
...
|
|
202
|
-
submit: d(
|
|
195
|
+
...J.counterpartForm,
|
|
196
|
+
submit: d(T, J.counterpartForm.submit)
|
|
203
197
|
},
|
|
204
|
-
submit: d(
|
|
205
|
-
submitDraft: d(
|
|
206
|
-
submitPrimary: d(
|
|
198
|
+
submit: d(T, J.submit),
|
|
199
|
+
submitDraft: d(T, J.submitDraft),
|
|
200
|
+
submitPrimary: d(T, J.submitPrimary)
|
|
207
201
|
},
|
|
208
|
-
openCreate:
|
|
209
|
-
measureUnitsOpen:
|
|
210
|
-
openMeasureUnits:
|
|
211
|
-
closeMeasureUnits:
|
|
202
|
+
openCreate: Ae,
|
|
203
|
+
measureUnitsOpen: C && B,
|
|
204
|
+
openMeasureUnits: Te,
|
|
205
|
+
closeMeasureUnits: H,
|
|
212
206
|
actions: {
|
|
213
|
-
...
|
|
214
|
-
actionDialog:
|
|
215
|
-
openAction: d(
|
|
216
|
-
confirmAction: d(
|
|
207
|
+
...X,
|
|
208
|
+
actionDialog: C ? X.actionDialog : void 0,
|
|
209
|
+
openAction: d(T, X.openAction),
|
|
210
|
+
confirmAction: d(T, X.confirmAction),
|
|
217
211
|
payment: {
|
|
218
|
-
...
|
|
219
|
-
isOpen:
|
|
220
|
-
save: d(
|
|
221
|
-
confirm: d(
|
|
212
|
+
...X.payment,
|
|
213
|
+
isOpen: C && X.payment.isOpen,
|
|
214
|
+
save: d(T, X.payment.save),
|
|
215
|
+
confirm: d(T, X.payment.confirm)
|
|
222
216
|
}
|
|
223
217
|
},
|
|
224
218
|
actionsModal: {
|
|
225
|
-
...
|
|
226
|
-
isOpen:
|
|
227
|
-
send: d(
|
|
228
|
-
saveItems: d(
|
|
219
|
+
...U,
|
|
220
|
+
isOpen: C && U.isOpen,
|
|
221
|
+
send: d(T, U.send),
|
|
222
|
+
saveItems: d(T, U.saveItems)
|
|
229
223
|
},
|
|
230
|
-
handleRowClick:
|
|
231
|
-
handleDetailsActionClick:
|
|
224
|
+
handleRowClick: Fe,
|
|
225
|
+
handleDetailsActionClick: Le
|
|
232
226
|
};
|
|
233
227
|
}
|
|
234
228
|
function d(e, t) {
|
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.298", n = "d92815559b211a2b13703877b83e8b03b7480d48", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
|
@@ -4,12 +4,12 @@
|
|
|
4
4
|
"use client";
|
|
5
5
|
import { Scope as e } from "../../../../../../shared/data-access/dist/lib/scopes.js";
|
|
6
6
|
import "../../../../../../shared/data-access/dist/index.js";
|
|
7
|
-
import {
|
|
7
|
+
import { ReceivablesWidget as t } from "../../../../../../invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js";
|
|
8
8
|
import "../../../../../../invoicing-widget/feature/dist/index.js";
|
|
9
9
|
import { jsx as n } from "react/jsx-runtime";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/widget-suite/feature/dist/lib/WidgetSuite/sections/InvoicingSection.js
|
|
11
11
|
function r({ renderTitle: e } = {}) {
|
|
12
|
-
return /* @__PURE__ */ n(t, {
|
|
12
|
+
return /* @__PURE__ */ n(t, { headerStart: e?.() });
|
|
13
13
|
}
|
|
14
14
|
var i = {
|
|
15
15
|
anyOfScopes: [e.InvoiceReadOrg],
|
package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { INIT as e, answer as t, composeScenarios as n, problem as r, routesOf as i } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
|
|
2
|
-
import {
|
|
2
|
+
import { receivablesScenarios as a } from "../../../../invoicing-widget/feature/dist/mocks/receivables.js";
|
|
3
3
|
import "../../../../invoicing-widget/feature/dist/scenarios.js";
|
|
4
4
|
import { expenseManagementScenarios as o } from "../../../../expense-management-widget/feature/dist/mocks/expenseManagement.js";
|
|
5
5
|
import "../../../../expense-management-widget/feature/dist/scenarios.js";
|