@tesouro/embedded-components-react 0.7.49 → 0.7.51
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/lib/monite-sdk.d.ts +42 -42
- package/dist/lib/monite-sdk.js +18 -18
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/counterparts.js +233 -88
- package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index100.js +56 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index101.js +10 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index102.js +39 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index103.js +0 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index104.js +105 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index105.js +1 -56
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index106.js +56 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index107.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index108.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index109.js +1 -55
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index110.js +55 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index111.js +1 -153
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index112.js +150 -52
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index113.js +55 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index114.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index115.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index116.js +0 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index117.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index118.js +7 -53
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index119.js +51 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index120.js +38 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index121.js +72 -39
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index122.js +36 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index123.js +7 -6
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index124.js +6 -64
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index125.js +57 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index126.js +172 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index127.js +6 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index128.js +2 -76
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index129.js +76 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index130.js +0 -78
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index131.js +78 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index132.js +1 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index133.js +35 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index134.js +0 -57
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index135.js +56 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index136.js +44 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index137.js +0 -568
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index138.js +568 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index139.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index140.js +1 -160
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index141.js +159 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index142.js +0 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index143.js +26 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index144.js +1 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index145.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index146.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index147.js +10 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index148.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index149.js +19 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index150.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index151.js +1 -93
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index154.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index159.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index162.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index164.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index168.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index172.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index173.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index175.js +12 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index178.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index179.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index229.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index235.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index249.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index252.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index260.js +87 -41
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index261.js +44 -48
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index262.js +48 -82
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index263.js +83 -7
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index264.js +7 -305
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index265.js +307 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index266.js +1 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index267.js +32 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index268.js +1 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index269.js +29 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index270.js +1 -22
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index271.js +22 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index272.js +0 -159
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index273.js +159 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index274.js +1 -37
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index275.js +34 -33
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index276.js +33 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index277.js +3 -102
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index278.js +88 -172
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index279.js +171 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index280.js +114 -191
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index281.js +209 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index282.js +11 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index283.js +14 -28
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index284.js +31 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index285.js +0 -241
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index286.js +241 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index287.js +1 -36
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index288.js +31 -137
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index289.js +142 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index290.js +0 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index291.js +166 -25
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index292.js +26 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index293.js +16 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index294.js +17 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index295.js +4 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index296.js +12 -18
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index297.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index298.js +21 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index299.js +4 -13
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index300.js +11 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index301.js +20 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index302.js +8 -26
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index303.js +23 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index304.js +12 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index305.js +8 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index306.js +25 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index307.js +14 -81
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index308.js +81 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index309.js +14 -100
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index310.js +98 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index311.js +43 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index312.js +30 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index313.js +0 -105
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index314.js +102 -35
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index315.js +32 -166
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index316.js +171 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index317.js +13 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index318.js +4 -70
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index319.js +62 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index320.js +24 -209
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index321.js +207 -87
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index322.js +90 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index323.js +17 -158
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index324.js +144 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index325.js +100 -42
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index326.js +46 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index327.js +4 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index328.js +20 -73
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index329.js +74 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index330.js +16 -19
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index331.js +19 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index332.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index333.js +10 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index334.js +11 -131
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index335.js +129 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index336.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index337.js +8 -5
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index338.js +4 -221
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index339.js +219 -31
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index340.js +31 -11
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index341.js +12 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index342.js +34 -20
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index343.js +18 -72
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index344.js +73 -181
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index345.js +182 -14
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index346.js +14 -204
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index347.js +192 -88
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index348.js +97 -61
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index349.js +63 -54
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index350.js +46 -83
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index351.js +91 -40
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index352.js +39 -75
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index353.js +63 -71
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index354.js +85 -12
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index355.js +12 -24
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index356.js +25 -16
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index357.js +14 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index358.js +4 -23
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index359.js +23 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index360.js +0 -45
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index361.js +46 -32
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index362.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index363.js +2 -34
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index364.js +33 -15
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index365.js +14 -29
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index366.js +29 -27
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index367.js +31 -2
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index368.js +2 -97
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index369.js +97 -0
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index96.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index97.js +17 -3
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index98.js +5 -1
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index99.js +1 -57
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
|
@@ -1,52 +1,52 @@
|
|
|
1
1
|
import { Scope as e } from "../../../../shared/data-access/dist/lib/scopes.js";
|
|
2
2
|
import "../../../../shared/data-access/dist/index.js";
|
|
3
|
-
import { AN_INVOICE_LINE_ITEM as t,
|
|
4
|
-
import { SCENARIO_LABELS as
|
|
5
|
-
import { FINOPS as
|
|
3
|
+
import { AN_INVOICE_LINE_ITEM as t, AN_ORGANIZATION_ID as n, AN_OUTSTANDING_INVOICE as r, A_COUNTERPART_ADDRESS as i, A_CUSTOMER_COUNTERPART as a } from "../../../../shared/data-access-mocks/dist/lib/fixtures.js";
|
|
4
|
+
import { SCENARIO_LABELS as o } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/labels.js";
|
|
5
|
+
import { FINOPS as s, bodyOf as c, endpoint as l, initRoute as ee, json as u, noContent as d, problem as f } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/scenario.js";
|
|
6
6
|
import { COUNTERPARTS_LABELS as p } from "./labels.js";
|
|
7
7
|
import { MintKind as m, contains as h, finopsOffsetPage as g, listOverride as _, minter as v, notFound as y, sortRows as b } from "../../../../shared/data-access-mocks/dist/mocks/scenarios/worlds.js";
|
|
8
8
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/counterparts.js
|
|
9
|
-
var x = (e) => `00000000-0000-4000-8000-000000000${e}`, { organization:
|
|
10
|
-
...
|
|
9
|
+
var x = (e) => `00000000-0000-4000-8000-000000000${e}`, { organization: te, ...ne } = a, S = (e, t, n, r = {}) => ({
|
|
10
|
+
...a,
|
|
11
11
|
id: e,
|
|
12
12
|
organization: {
|
|
13
13
|
legal_name: t,
|
|
14
14
|
email: n
|
|
15
15
|
},
|
|
16
16
|
...r
|
|
17
|
-
}),
|
|
18
|
-
...
|
|
17
|
+
}), C = (e, t, n = {}) => ({
|
|
18
|
+
...ne,
|
|
19
19
|
id: e,
|
|
20
20
|
type: "individual",
|
|
21
21
|
individual: t,
|
|
22
22
|
...n
|
|
23
|
-
}),
|
|
24
|
-
...
|
|
23
|
+
}), w = (e) => "organization" in e ? e.organization.legal_name : `${e.individual.first_name} ${e.individual.last_name}`, T = {
|
|
24
|
+
...a,
|
|
25
25
|
tax_id: "93-1234567",
|
|
26
26
|
reminders_enabled: !0,
|
|
27
27
|
organization: {
|
|
28
|
-
...
|
|
28
|
+
...a.organization,
|
|
29
29
|
phone: "5035550142"
|
|
30
30
|
}
|
|
31
|
-
},
|
|
31
|
+
}, E = S(x(280), "Harbor & Pine Studio", "billing@harborpine.example", { created_at: "2026-02-03T10:00:00.000Z" }), D = C(x(281), {
|
|
32
32
|
first_name: "Maya",
|
|
33
33
|
last_name: "Chen",
|
|
34
34
|
email: "maya@chen.example"
|
|
35
35
|
}, {
|
|
36
36
|
created_at: "2026-03-12T10:00:00.000Z",
|
|
37
37
|
tax_id: "123-45-6789"
|
|
38
|
-
}),
|
|
38
|
+
}), O = S(x(282), "Lakeside Dental Group", "accounts@lakesidedental.example", { created_at: "2026-04-20T10:00:00.000Z" }), k = C(x(283), {
|
|
39
39
|
first_name: "Daniel",
|
|
40
40
|
last_name: "Okafor",
|
|
41
41
|
email: "dan@okafor.example"
|
|
42
|
-
}, { created_at: "2026-05-02T10:00:00.000Z" }),
|
|
42
|
+
}, { created_at: "2026-05-02T10:00:00.000Z" }), A = S(x(284), "Brightline Events LLC", "finance@brightline.example", { created_at: "2026-06-18T10:00:00.000Z" }), j = [
|
|
43
|
+
T,
|
|
43
44
|
E,
|
|
44
45
|
D,
|
|
45
46
|
O,
|
|
46
47
|
k,
|
|
47
|
-
A
|
|
48
|
-
|
|
49
|
-
], N = [
|
|
48
|
+
A
|
|
49
|
+
], M = [
|
|
50
50
|
"Cedar Row Bakery",
|
|
51
51
|
"Summit Bike Works",
|
|
52
52
|
"Oakline Architects",
|
|
@@ -55,45 +55,154 @@ var x = (e) => `00000000-0000-4000-8000-000000000${e}`, { organization: ee, ...S
|
|
|
55
55
|
"Copperleaf Cafe",
|
|
56
56
|
"Meridian Tutoring",
|
|
57
57
|
"Tidewater Marine Supply"
|
|
58
|
-
].map((e, t) =>
|
|
59
|
-
...
|
|
58
|
+
].map((e, t) => S(x(300 + t), e, `ap@${e.split(" ")[0]?.toLowerCase()}.example`)), N = (e, t, n) => ({
|
|
59
|
+
...i,
|
|
60
60
|
id: x(e),
|
|
61
61
|
counterpart_id: t.id,
|
|
62
62
|
line2: null,
|
|
63
63
|
...n
|
|
64
|
-
}),
|
|
65
|
-
|
|
66
|
-
|
|
64
|
+
}), P = [
|
|
65
|
+
i,
|
|
66
|
+
N(311, E, {
|
|
67
67
|
line1: "88 Pier Street",
|
|
68
68
|
city: "Seattle",
|
|
69
69
|
state: "WA",
|
|
70
70
|
postal_code: "98101"
|
|
71
71
|
}),
|
|
72
|
-
|
|
72
|
+
N(312, D, {
|
|
73
73
|
line1: "1402 Elm Avenue",
|
|
74
74
|
city: "Austin",
|
|
75
75
|
state: "TX",
|
|
76
76
|
postal_code: "78701"
|
|
77
77
|
}),
|
|
78
|
-
|
|
78
|
+
N(313, O, {
|
|
79
79
|
line1: "5 Lakeshore Drive",
|
|
80
80
|
city: "Chicago",
|
|
81
81
|
state: "IL",
|
|
82
82
|
postal_code: "60601"
|
|
83
83
|
}),
|
|
84
|
-
|
|
84
|
+
N(314, A, {
|
|
85
85
|
line1: "740 Market Street",
|
|
86
86
|
city: "Denver",
|
|
87
87
|
state: "CO",
|
|
88
88
|
postal_code: "80202"
|
|
89
89
|
})
|
|
90
|
-
],
|
|
90
|
+
], F = {
|
|
91
|
+
is_customer: !1,
|
|
92
|
+
is_vendor: !0
|
|
93
|
+
}, I = S(x(340), "Northwind Office Supply", "ap@northwind.example", {
|
|
94
|
+
...F,
|
|
95
|
+
created_at: "2026-01-20T10:00:00.000Z"
|
|
96
|
+
}), L = C(x(341), {
|
|
97
|
+
first_name: "Priya",
|
|
98
|
+
last_name: "Raman",
|
|
99
|
+
email: "priya@raman.example"
|
|
100
|
+
}, {
|
|
101
|
+
...F,
|
|
102
|
+
created_at: "2026-03-04T10:00:00.000Z"
|
|
103
|
+
}), R = S(x(342), "Cedar Print Co.", "orders@cedarprint.example", {
|
|
104
|
+
...F,
|
|
105
|
+
created_at: "2026-05-11T10:00:00.000Z"
|
|
106
|
+
}), re = [
|
|
107
|
+
I,
|
|
108
|
+
L,
|
|
109
|
+
R
|
|
110
|
+
], ie = [
|
|
111
|
+
N(343, I, {
|
|
112
|
+
line1: "12 Harbor Way",
|
|
113
|
+
city: "Oakland",
|
|
114
|
+
state: "CA",
|
|
115
|
+
postal_code: "94607"
|
|
116
|
+
}),
|
|
117
|
+
N(344, L, {
|
|
118
|
+
line1: "77 Birch Lane",
|
|
119
|
+
city: "Madison",
|
|
120
|
+
state: "WI",
|
|
121
|
+
postal_code: "53703"
|
|
122
|
+
}),
|
|
123
|
+
N(345, R, {
|
|
124
|
+
line1: "300 Cedar Street",
|
|
125
|
+
city: "Boise",
|
|
126
|
+
state: "ID",
|
|
127
|
+
postal_code: "83702"
|
|
128
|
+
})
|
|
129
|
+
], ae = [{
|
|
130
|
+
id: x(346),
|
|
131
|
+
counterpart_id: I.id,
|
|
132
|
+
account_holder_name: "Northwind Office Supply",
|
|
133
|
+
account_number: "000123456789",
|
|
134
|
+
routing_number: "123456780",
|
|
135
|
+
country: "US",
|
|
136
|
+
currency: "USD",
|
|
137
|
+
is_default_for_currency: !0
|
|
138
|
+
}];
|
|
139
|
+
function z(e, t, r) {
|
|
140
|
+
let { total: i, paid: a = 0, ...o } = r, s = `${r.issued_at}T09:00:00.000Z`;
|
|
141
|
+
return {
|
|
142
|
+
id: x(e),
|
|
143
|
+
created_at: s,
|
|
144
|
+
updated_at: s,
|
|
145
|
+
entity_id: n,
|
|
146
|
+
credit_notes: [],
|
|
147
|
+
payable_origin: "upload",
|
|
148
|
+
source_of_payable_data: "user_specified",
|
|
149
|
+
currency: "USD",
|
|
150
|
+
counterpart_id: t.id,
|
|
151
|
+
counterpart_raw_data: { name: w(t) },
|
|
152
|
+
subtotal: i,
|
|
153
|
+
tax: 0,
|
|
154
|
+
total_amount: i,
|
|
155
|
+
amount_paid: a,
|
|
156
|
+
amount_due: i - a,
|
|
157
|
+
amount_to_pay: i - a,
|
|
158
|
+
...o
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
var oe = [
|
|
162
|
+
z(347, I, {
|
|
163
|
+
document_id: "BILL-2041",
|
|
164
|
+
status: "new",
|
|
165
|
+
issued_at: "2026-09-01",
|
|
166
|
+
due_date: "2026-10-01",
|
|
167
|
+
total: 245e3
|
|
168
|
+
}),
|
|
169
|
+
z(348, I, {
|
|
170
|
+
document_id: "BILL-2044",
|
|
171
|
+
status: "partially_paid",
|
|
172
|
+
issued_at: "2026-08-12",
|
|
173
|
+
due_date: "2026-09-11",
|
|
174
|
+
total: 8e4,
|
|
175
|
+
paid: 3e4
|
|
176
|
+
}),
|
|
177
|
+
z(349, I, {
|
|
178
|
+
document_id: "BILL-2036",
|
|
179
|
+
status: "paid",
|
|
180
|
+
issued_at: "2026-06-20",
|
|
181
|
+
due_date: "2026-07-20",
|
|
182
|
+
total: 12e4,
|
|
183
|
+
paid: 12e4
|
|
184
|
+
}),
|
|
185
|
+
z(352, I, {
|
|
186
|
+
document_id: "BILL-2039",
|
|
187
|
+
status: "rejected",
|
|
188
|
+
issued_at: "2026-07-08",
|
|
189
|
+
due_date: "2026-08-07",
|
|
190
|
+
total: 15e3
|
|
191
|
+
}),
|
|
192
|
+
z(353, L, {
|
|
193
|
+
document_id: "BILL-2046",
|
|
194
|
+
status: "waiting_to_be_paid",
|
|
195
|
+
issued_at: "2026-09-18",
|
|
196
|
+
due_date: "2026-10-18",
|
|
197
|
+
total: 64e3
|
|
198
|
+
})
|
|
199
|
+
], se = M.map((e, t) => N(315 + t, e, {
|
|
91
200
|
line1: `${10 + t} Main Street`,
|
|
92
201
|
city: "Springfield",
|
|
93
202
|
state: "IL",
|
|
94
203
|
postal_code: "62701"
|
|
95
204
|
}));
|
|
96
|
-
function
|
|
205
|
+
function B(e, n, r, i, a, o = 0) {
|
|
97
206
|
let s = typeof e == "string" ? e : x(e), c = r * i;
|
|
98
207
|
return {
|
|
99
208
|
...t,
|
|
@@ -123,9 +232,9 @@ function L(e, n, r, i, a, o = 0) {
|
|
|
123
232
|
}
|
|
124
233
|
};
|
|
125
234
|
}
|
|
126
|
-
var
|
|
235
|
+
var V = (e) => ({
|
|
127
236
|
counterpart_id: e.id,
|
|
128
|
-
counterpart_name:
|
|
237
|
+
counterpart_name: w(e),
|
|
129
238
|
counterpart_type: e.type,
|
|
130
239
|
counterpart_contact: "organization" in e ? {
|
|
131
240
|
first_name: "Accounts",
|
|
@@ -133,34 +242,34 @@ var R = (e) => ({
|
|
|
133
242
|
email: e.organization.email
|
|
134
243
|
} : { ...e.individual }
|
|
135
244
|
});
|
|
136
|
-
function
|
|
137
|
-
let a =
|
|
245
|
+
function H(e, t, n, i = {}) {
|
|
246
|
+
let a = n.reduce((e, t) => e + t.total_after_tax, 0), o = n.reduce((e, t) => e + t.total_before_tax, 0), s = i.amount_paid ?? 0;
|
|
138
247
|
return {
|
|
139
|
-
...
|
|
248
|
+
...r,
|
|
140
249
|
id: typeof e == "string" ? e : x(e),
|
|
141
|
-
...
|
|
142
|
-
line_items:
|
|
250
|
+
...V(t),
|
|
251
|
+
line_items: n,
|
|
143
252
|
subtotal: o,
|
|
144
253
|
total_amount: a,
|
|
145
254
|
total_amount_with_credit_notes: a,
|
|
146
255
|
total_tax_amount: a - o,
|
|
147
256
|
amount_paid: s,
|
|
148
257
|
amount_due: a - s,
|
|
149
|
-
updated_at: i.created_at ??
|
|
258
|
+
updated_at: i.created_at ?? r.updated_at,
|
|
150
259
|
...i
|
|
151
260
|
};
|
|
152
261
|
}
|
|
153
|
-
var
|
|
262
|
+
var U = [
|
|
154
263
|
{
|
|
155
|
-
...
|
|
156
|
-
...
|
|
157
|
-
line_items: [
|
|
264
|
+
...r,
|
|
265
|
+
...V(T),
|
|
266
|
+
line_items: [B(323, "Pallet racking install", 1, 128500, "item")],
|
|
158
267
|
issue_date: "2026-08-14",
|
|
159
268
|
due_date: "2026-10-14",
|
|
160
269
|
created_at: "2026-08-14T09:00:00.000Z",
|
|
161
270
|
updated_at: "2026-08-14T09:00:00.000Z"
|
|
162
271
|
},
|
|
163
|
-
|
|
272
|
+
H(285, T, [B(324, "Warehouse audit", 16, 15e3, "hour")], {
|
|
164
273
|
document_id: "INV-1038",
|
|
165
274
|
status: "paid",
|
|
166
275
|
amount_paid: 24e4,
|
|
@@ -169,7 +278,7 @@ var B = [
|
|
|
169
278
|
paid_at: "2026-06-28T12:00:00.000Z",
|
|
170
279
|
created_at: "2026-06-02T09:00:00.000Z"
|
|
171
280
|
}),
|
|
172
|
-
|
|
281
|
+
H(286, E, [B(325, "Brand identity package", 1, 25e4, "item"), B(326, "Design consultation", 5, 14e3, "hour")], {
|
|
173
282
|
document_id: "INV-1045",
|
|
174
283
|
status: "partially_paid",
|
|
175
284
|
amount_paid: 12e4,
|
|
@@ -177,28 +286,28 @@ var B = [
|
|
|
177
286
|
due_date: "2026-09-20",
|
|
178
287
|
created_at: "2026-08-21T09:00:00.000Z"
|
|
179
288
|
}),
|
|
180
|
-
|
|
289
|
+
H(287, D, [B(327, "Portrait session", 1, 45e3, "item")], {
|
|
181
290
|
document_id: "INV-1047",
|
|
182
291
|
status: "overdue",
|
|
183
292
|
issue_date: "2026-08-01",
|
|
184
293
|
due_date: "2026-08-31",
|
|
185
294
|
created_at: "2026-08-01T09:00:00.000Z"
|
|
186
295
|
}),
|
|
187
|
-
|
|
296
|
+
H(288, O, [B(328, "Clinic signage", 4, 13e4, "item", 825)], {
|
|
188
297
|
document_id: "INV-1049",
|
|
189
298
|
status: "issued",
|
|
190
299
|
issue_date: "2026-09-15",
|
|
191
300
|
due_date: "2026-10-15",
|
|
192
301
|
created_at: "2026-09-15T09:00:00.000Z"
|
|
193
302
|
}),
|
|
194
|
-
|
|
303
|
+
H(289, A, [B(329, "Event staffing", 35, 5e3, "hour")], {
|
|
195
304
|
document_id: null,
|
|
196
305
|
status: "draft",
|
|
197
306
|
issue_date: null,
|
|
198
307
|
due_date: "2026-10-30",
|
|
199
308
|
created_at: "2026-09-24T09:00:00.000Z"
|
|
200
309
|
}),
|
|
201
|
-
|
|
310
|
+
H(290, O, [B(330, "Window lettering", 1, 98e3, "item")], {
|
|
202
311
|
document_id: "INV-1036",
|
|
203
312
|
status: "paid",
|
|
204
313
|
amount_paid: 98e3,
|
|
@@ -207,7 +316,7 @@ var B = [
|
|
|
207
316
|
paid_at: "2026-06-01T12:00:00.000Z",
|
|
208
317
|
created_at: "2026-05-10T09:00:00.000Z"
|
|
209
318
|
}),
|
|
210
|
-
|
|
319
|
+
H(291, E, [B(331, "Photo retouching", 12, 5e3, "hour")], {
|
|
211
320
|
document_id: "INV-1033",
|
|
212
321
|
status: "canceled",
|
|
213
322
|
issue_date: "2026-04-11",
|
|
@@ -215,7 +324,7 @@ var B = [
|
|
|
215
324
|
created_at: "2026-04-11T09:00:00.000Z"
|
|
216
325
|
})
|
|
217
326
|
];
|
|
218
|
-
function
|
|
327
|
+
function W(e, t) {
|
|
219
328
|
let n = t.get("type"), r = t.get("status"), i = t.getAll("status__in"), a = t.get("counterpart_id"), o = t.get("search_text"), s = e.filter((e) => (!n || e.type === n) && (!r || e.status === r) && (!i.length || i.includes(e.status)) && (!a || e.counterpart_id === a) && (!o || h(e.document_id, o) || h(e.counterpart_name, o))), c = t.get("sort");
|
|
220
329
|
return c ? b(s, (e) => {
|
|
221
330
|
switch (c) {
|
|
@@ -229,32 +338,38 @@ function V(e, t) {
|
|
|
229
338
|
}
|
|
230
339
|
}, t.get("order")) : s;
|
|
231
340
|
}
|
|
232
|
-
function
|
|
341
|
+
function G(e, t) {
|
|
233
342
|
let n = t.getAll("counterpart_id__in"), r = t.getAll("status__in"), i = t.get("type"), a = t.get("metric") === "amount_due" ? "amount_due" : "total", o = /* @__PURE__ */ new Map();
|
|
234
343
|
for (let t of e) {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
344
|
+
let e = t.counterpart_id;
|
|
345
|
+
if (!e || n.length && !n.includes(e) || r.length && !r.includes(t.status) || i && t.type !== i) continue;
|
|
346
|
+
let s = (a === "amount_due" ? t.amount_due : t.total_amount) ?? 0;
|
|
347
|
+
o.set(e, (o.get(e) ?? 0) + s);
|
|
238
348
|
}
|
|
239
349
|
return { data: [...o].map(([e, t]) => ({
|
|
240
350
|
dimension_value: e,
|
|
241
351
|
metric_value: t
|
|
242
352
|
})) };
|
|
243
353
|
}
|
|
244
|
-
function
|
|
354
|
+
function ce(e, t) {
|
|
355
|
+
let n = t.get("counterpart_id"), r = t.getAll("status__in"), i = e.filter((e) => (!n || e.counterpart_id === n) && (!r.length || r.includes(e.status)));
|
|
356
|
+
return t.get("sort") === "created_at" ? b(i, (e) => e.created_at, t.get("order")) : i;
|
|
357
|
+
}
|
|
358
|
+
function K(e, t, n, r = v(), i = []) {
|
|
245
359
|
return {
|
|
246
360
|
customers: [...e],
|
|
247
361
|
addresses: [...t],
|
|
362
|
+
bankAccounts: [...i],
|
|
248
363
|
invoices: n,
|
|
249
364
|
mint: r
|
|
250
365
|
};
|
|
251
366
|
}
|
|
252
|
-
var
|
|
253
|
-
function
|
|
254
|
-
let n = t.getAll("id__in"), r = t.get("counterpart_name__icontains"), i = t.get("type"), a = e.filter((e) => (t.get("is_customer") !== "true" || e.is_customer) && (t.get("is_vendor") !== "true" || e.is_vendor) && (!n.length || n.includes(e.id)) && (!r || h(
|
|
255
|
-
return t.get("sort") === "counterpart_name" ? b(a,
|
|
367
|
+
var q = `${s}/counterparts`;
|
|
368
|
+
function le(e, t) {
|
|
369
|
+
let n = t.getAll("id__in"), r = t.get("counterpart_name__icontains"), i = t.get("type"), a = e.filter((e) => (t.get("is_customer") !== "true" || e.is_customer) && (t.get("is_vendor") !== "true" || e.is_vendor) && (!n.length || n.includes(e.id)) && (!r || h(w(e), r)) && (!i || e.type === i));
|
|
370
|
+
return t.get("sort") === "counterpart_name" ? b(a, w, t.get("order")) : a;
|
|
256
371
|
}
|
|
257
|
-
function
|
|
372
|
+
function J(e, t, n) {
|
|
258
373
|
return {
|
|
259
374
|
id: e.mint(m.Address),
|
|
260
375
|
counterpart_id: t,
|
|
@@ -266,24 +381,26 @@ function K(e, t, n) {
|
|
|
266
381
|
country: n.country ?? "US"
|
|
267
382
|
};
|
|
268
383
|
}
|
|
269
|
-
function
|
|
384
|
+
function ue(e, t) {
|
|
270
385
|
let n = (/* @__PURE__ */ new Date()).toISOString(), r = {
|
|
271
386
|
id: e.mint(m.Customer),
|
|
272
387
|
created_at: n,
|
|
273
388
|
updated_at: n,
|
|
389
|
+
is_customer: t.is_customer ?? !0,
|
|
390
|
+
is_vendor: t.is_vendor ?? !1,
|
|
274
391
|
tax_id: t.tax_id ?? null,
|
|
275
392
|
reminders_enabled: t.reminders_enabled ?? !1
|
|
276
393
|
}, i, a;
|
|
277
394
|
if (t.type === "individual") {
|
|
278
395
|
let { address: e, ...n } = t.individual ?? {};
|
|
279
|
-
a = e, i =
|
|
396
|
+
a = e, i = C(r.id, {
|
|
280
397
|
first_name: "",
|
|
281
398
|
last_name: "",
|
|
282
399
|
...n
|
|
283
400
|
}, r);
|
|
284
401
|
} else {
|
|
285
402
|
let { address: e, ...n } = t.organization ?? {};
|
|
286
|
-
a = e, i =
|
|
403
|
+
a = e, i = S(r.id, n.legal_name ?? "", n.email ?? "", {
|
|
287
404
|
...r,
|
|
288
405
|
organization: {
|
|
289
406
|
legal_name: "",
|
|
@@ -292,12 +409,18 @@ function q(e, t) {
|
|
|
292
409
|
});
|
|
293
410
|
}
|
|
294
411
|
if (e.customers.unshift(i), a) {
|
|
295
|
-
let t =
|
|
412
|
+
let t = J(e, i.id, a);
|
|
296
413
|
e.addresses.push(t), i.default_billing_address_id = t.id;
|
|
297
414
|
}
|
|
298
415
|
return i;
|
|
299
416
|
}
|
|
300
|
-
function
|
|
417
|
+
function Y(e, t) {
|
|
418
|
+
t.is_default_for_currency && (e.bankAccounts = e.bankAccounts.map((e) => e.counterpart_id === t.counterpart_id && e.currency === t.currency && e.id !== t.id ? {
|
|
419
|
+
...e,
|
|
420
|
+
is_default_for_currency: !1
|
|
421
|
+
} : e));
|
|
422
|
+
}
|
|
423
|
+
function de(e, t) {
|
|
301
424
|
let n = {
|
|
302
425
|
updated_at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
303
426
|
...t.tax_id === void 0 ? {} : { tax_id: t.tax_id || null },
|
|
@@ -319,65 +442,87 @@ function J(e, t) {
|
|
|
319
442
|
}
|
|
320
443
|
};
|
|
321
444
|
}
|
|
322
|
-
function
|
|
445
|
+
function X(e, { list: t, analyticsFail: n = !1 } = {}) {
|
|
323
446
|
let r = (t) => e.customers.find((e) => e.id === t), i = (t) => {
|
|
324
447
|
e.customers = e.customers.map((e) => e.id === t.id ? t : e);
|
|
325
448
|
};
|
|
326
449
|
return [
|
|
327
|
-
...t ? [_(t,
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
450
|
+
...t ? [_(t, q, () => e.customers)] : [],
|
|
451
|
+
l("GET", q, ({ query: t }) => u(g(le(e.customers, t), t))),
|
|
452
|
+
l("POST", q, (t) => u(ue(e, c(t)), 201)),
|
|
453
|
+
l("GET", `${q}/:id`, (e, { id: t }) => {
|
|
331
454
|
let n = r(t);
|
|
332
455
|
return n ? u(n) : y();
|
|
333
456
|
}),
|
|
334
|
-
|
|
457
|
+
l("PATCH", `${q}/:id`, (e, { id: t }) => {
|
|
335
458
|
let n = r(t);
|
|
336
459
|
if (!n) return y();
|
|
337
|
-
let a =
|
|
460
|
+
let a = de(n, c(e));
|
|
338
461
|
return i(a), u(a);
|
|
339
462
|
}),
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
let r =
|
|
463
|
+
l("DELETE", `${q}/:id`, (t, { id: n }) => (e.customers = e.customers.filter((e) => e.id !== n), d())),
|
|
464
|
+
l("GET", `${q}/:id/addresses`, (t, { id: n }) => u({ data: e.addresses.filter((e) => e.counterpart_id === n) })),
|
|
465
|
+
l("POST", `${q}/:id/addresses`, (t, { id: n }) => {
|
|
466
|
+
let r = J(e, n, c(t));
|
|
344
467
|
return e.addresses.push(r), u(r, 201);
|
|
345
468
|
}),
|
|
346
|
-
|
|
469
|
+
l("PATCH", `${q}/:id/addresses/:addressId`, (t, { addressId: n }) => {
|
|
347
470
|
let r = e.addresses.find((e) => e.id === n);
|
|
348
471
|
if (!r) return y();
|
|
349
472
|
let i = {
|
|
350
473
|
...r,
|
|
351
|
-
...
|
|
474
|
+
...c(t)
|
|
352
475
|
};
|
|
353
476
|
return e.addresses = e.addresses.map((e) => e.id === n ? i : e), u(i);
|
|
354
477
|
}),
|
|
355
|
-
|
|
356
|
-
|
|
478
|
+
l("GET", `${q}/:id/bank-accounts`, (t, { id: n }) => u({ data: e.bankAccounts.filter((e) => e.counterpart_id === n) })),
|
|
479
|
+
l("POST", `${q}/:id/bank-accounts`, (t, { id: n }) => {
|
|
480
|
+
let r = {
|
|
481
|
+
country: "US",
|
|
482
|
+
currency: "USD",
|
|
483
|
+
...c(t),
|
|
484
|
+
id: e.mint(m.BankAccount),
|
|
485
|
+
counterpart_id: n
|
|
486
|
+
};
|
|
487
|
+
return e.bankAccounts.push(r), Y(e, r), u(r, 201);
|
|
488
|
+
}),
|
|
489
|
+
l("PATCH", `${q}/:id/bank-accounts/:bankAccountId`, (t, { bankAccountId: n }) => {
|
|
490
|
+
let r = e.bankAccounts.find((e) => e.id === n);
|
|
491
|
+
if (!r) return y();
|
|
492
|
+
let i = {
|
|
493
|
+
...r,
|
|
494
|
+
...c(t)
|
|
495
|
+
};
|
|
496
|
+
return e.bankAccounts = e.bankAccounts.map((e) => e.id === n ? i : e), Y(e, i), u(i);
|
|
497
|
+
}),
|
|
498
|
+
l("DELETE", `${q}/:id/bank-accounts/:bankAccountId`, (t, { bankAccountId: n }) => (e.bankAccounts = e.bankAccounts.filter((e) => e.id !== n), d())),
|
|
499
|
+
l("GET", `${s}/analytics/receivables`, ({ query: t }) => n ? f(500, "Internal Server Error", "Something went wrong.") : u(G(e.invoices(), t)))
|
|
357
500
|
];
|
|
358
501
|
}
|
|
359
|
-
var
|
|
360
|
-
function Z(e, t, {
|
|
502
|
+
var fe = [e.CounterpartReadOrg, e.CounterpartWriteOrg];
|
|
503
|
+
function Z(e, t, { counterparts: n = [...j, ...re], addresses: r = [...P, ...ie], scopes: i = fe, ...a } = {}) {
|
|
361
504
|
return {
|
|
362
505
|
key: e,
|
|
363
506
|
...t,
|
|
364
507
|
routes: () => {
|
|
365
|
-
let e =
|
|
508
|
+
let e = oe.filter((e) => n.some((t) => t.id === e.counterpart_id)), t = K(n, r, () => U, v(), ae.filter((e) => n.some((t) => t.id === e.counterpart_id)));
|
|
366
509
|
return [
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
510
|
+
ee(i),
|
|
511
|
+
l("GET", `${s}/receivables`, ({ query: e }) => u(g(W(t.invoices(), e), e))),
|
|
512
|
+
l("GET", `${s}/payables`, ({ query: t }) => u(g(ce(e, t), t))),
|
|
513
|
+
l("GET", `${s}/analytics/payables`, ({ query: t }) => a.analyticsFail ? f(500, "Internal Server Error", "Something went wrong.") : u(G(e, t))),
|
|
514
|
+
...X(t, a)
|
|
370
515
|
];
|
|
371
516
|
}
|
|
372
517
|
};
|
|
373
518
|
}
|
|
374
519
|
var Q = (e, t = {}) => Z(e, {
|
|
375
|
-
label:
|
|
520
|
+
label: o[e].label,
|
|
376
521
|
blurb: p.blurbs[e]
|
|
377
|
-
}, t), $ = (e, t) => Z(e, p.scenarios[e], t),
|
|
522
|
+
}, t), $ = (e, t) => Z(e, p.scenarios[e], t), pe = [
|
|
378
523
|
Q("populated"),
|
|
379
524
|
Q("empty", {
|
|
380
|
-
|
|
525
|
+
counterparts: [],
|
|
381
526
|
addresses: []
|
|
382
527
|
}),
|
|
383
528
|
Q("loading", { list: "held" }),
|
|
@@ -385,10 +530,10 @@ var Q = (e, t = {}) => Z(e, {
|
|
|
385
530
|
Q("control-hidden", { scopes: [e.CounterpartReadOrg] }),
|
|
386
531
|
$("access-restricted", { scopes: [] }),
|
|
387
532
|
Q("paginated", {
|
|
388
|
-
|
|
389
|
-
addresses: [...
|
|
533
|
+
counterparts: [...j, ...M],
|
|
534
|
+
addresses: [...P, ...se]
|
|
390
535
|
}),
|
|
391
536
|
$("amounts-unavailable", { analyticsFail: !0 })
|
|
392
537
|
];
|
|
393
538
|
//#endregion
|
|
394
|
-
export {
|
|
539
|
+
export { j as CUSTOMERS, P as CUSTOMER_ADDRESSES, U as CUSTOMER_INVOICES, k as DANIEL_OKAFOR, T as RIVERMILL, V as billTo, pe as counterpartsScenarios, w as customerName, X as customerRoutes, K as customerWorld, W as filterInvoices, x as id, H as invoice, B as lineItem };
|
package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/mocks/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
blurbs: {
|
|
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.",
|
|
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. In vendor mode, three vendors with their bills and bank accounts.",
|
|
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
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.",
|
|
@@ -37,9 +37,9 @@ import { useIsMobile as oe } from "./index86.js";
|
|
|
37
37
|
import { useComponentSettings as se } from "./index87.js";
|
|
38
38
|
import { breakpoints as ce, useIsDesktopScreen as le, useIsExtraLargeDesktopScreen as ue, useIsLargeDesktopScreen as de, useIsLargerThan as fe, useIsMobileScreen as pe, useIsSmallerThan as me, useIsTabletScreen as he, useMediaQuery as ge } from "./index88.js";
|
|
39
39
|
import "./index89.js";
|
|
40
|
-
import { Combobox as _e, ComboboxChip as ve, ComboboxChips as ye, ComboboxChipsInput as be, ComboboxCollection as xe, ComboboxContent as Se, ComboboxEmpty as Ce, ComboboxGroup as we, ComboboxInput as Te, ComboboxItem as Ee, ComboboxLabel as De, ComboboxList as Oe, ComboboxSeparator as ke, ComboboxTrigger as Ae, ComboboxValue as je, useComboboxAnchor as Me } from "./
|
|
41
|
-
import { Dialog as Ne, useDialog as Pe } from "./
|
|
42
|
-
import { ApprovalPolicyDetails as Fe } from "./
|
|
40
|
+
import { Combobox as _e, ComboboxChip as ve, ComboboxChips as ye, ComboboxChipsInput as be, ComboboxCollection as xe, ComboboxContent as Se, ComboboxEmpty as Ce, ComboboxGroup as we, ComboboxInput as Te, ComboboxItem as Ee, ComboboxLabel as De, ComboboxList as Oe, ComboboxSeparator as ke, ComboboxTrigger as Ae, ComboboxValue as je, useComboboxAnchor as Me } from "./index126.js";
|
|
41
|
+
import { Dialog as Ne, useDialog as Pe } from "./index129.js";
|
|
42
|
+
import { ApprovalPolicyDetails as Fe } from "./index143.js";
|
|
43
43
|
import { MoniteScopedProviders as Ie } from "./index155.js";
|
|
44
44
|
import { ApprovalPoliciesTable as Le } from "./index175.js";
|
|
45
45
|
import { PageHeader as Re } from "./index177.js";
|
|
@@ -66,20 +66,20 @@ import { useForceApprovePayable as at } from "./index216.js";
|
|
|
66
66
|
import { useReopenPayable as ot } from "./index217.js";
|
|
67
67
|
import { useDeletePayable as st } from "./index218.js";
|
|
68
68
|
import { useGetPayablesAnalytics as ct } from "./index219.js";
|
|
69
|
-
import { PayableDetails as lt } from "./
|
|
70
|
-
import { PayablesTable as ut } from "./
|
|
71
|
-
import { Payables as dt } from "./
|
|
72
|
-
import { ProductsTable as ft } from "./
|
|
73
|
-
import { ProductDetails as pt } from "./
|
|
74
|
-
import { CreateProduct as mt } from "./
|
|
75
|
-
import { Products as ht } from "./
|
|
76
|
-
import { FinanceBanner as gt } from "./
|
|
77
|
-
import { FinanceIntegrationCard as _t } from "./
|
|
78
|
-
import { FinanceInvoice as vt } from "./
|
|
79
|
-
import { FinanceTab as yt } from "./
|
|
80
|
-
import { Integrations as bt } from "./
|
|
81
|
-
import "./
|
|
82
|
-
import { MoniteAPIProvider as xt } from "./
|
|
83
|
-
import { MoniteProvider as St } from "./
|
|
84
|
-
import { toast as Ct } from "./
|
|
69
|
+
import { PayableDetails as lt } from "./index273.js";
|
|
70
|
+
import { PayablesTable as ut } from "./index286.js";
|
|
71
|
+
import { Payables as dt } from "./index291.js";
|
|
72
|
+
import { ProductsTable as ft } from "./index316.js";
|
|
73
|
+
import { ProductDetails as pt } from "./index324.js";
|
|
74
|
+
import { CreateProduct as mt } from "./index325.js";
|
|
75
|
+
import { Products as ht } from "./index326.js";
|
|
76
|
+
import { FinanceBanner as gt } from "./index339.js";
|
|
77
|
+
import { FinanceIntegrationCard as _t } from "./index349.js";
|
|
78
|
+
import { FinanceInvoice as vt } from "./index351.js";
|
|
79
|
+
import { FinanceTab as yt } from "./index356.js";
|
|
80
|
+
import { Integrations as bt } from "./index359.js";
|
|
81
|
+
import "./index361.js";
|
|
82
|
+
import { MoniteAPIProvider as xt } from "./index366.js";
|
|
83
|
+
import { MoniteProvider as St } from "./index367.js";
|
|
84
|
+
import { toast as Ct } from "./index368.js";
|
|
85
85
|
export { ze as ApprovalPolicies, Le as ApprovalPoliciesTable, Fe as ApprovalPolicyDetails, Ve as ApprovalRequests, Be as ApprovalRequestsTable, _e as Combobox, ve as ComboboxChip, ye as ComboboxChips, be as ComboboxChipsInput, xe as ComboboxCollection, Se as ComboboxContent, Ce as ComboboxEmpty, we as ComboboxGroup, Te as ComboboxInput, Ee as ComboboxItem, De as ComboboxLabel, Oe as ComboboxList, ke as ComboboxSeparator, Ae as ComboboxTrigger, je as ComboboxValue, mt as CreateProduct, Ne as Dialog, gt as FinanceBanner, _t as FinanceIntegrationCard, vt as FinanceInvoice, yt as FinanceTab, bt as Integrations, Y as LOGO_MAX_FILE_SIZE_IN_MB, X as LOGO_SUPPORTED_FORMATS, xt as MoniteAPIProvider, St as MoniteProvider, Ie as MoniteScopedProviders, Z as OCR_SUPPORTED_FORMATS, Re as PageHeader, lt as PayableDetails, dt as Payables, ut as PayablesTable, pt as ProductDetails, ht as Products, ft as ProductsTable, K as RootElementsProvider, ce as breakpoints, t as countryCurrencyList, e as createAPIClient, g as dateStringToLocalDate, n as defaultAvailableCountries, a as defaultAvailableCurrencies, $ as defaultCounterpartColumnWidth, o as filterOptions, _ as formatDateRangeFilterChip, v as formatFilterChipMultiSelectValueSegment, r as getCountries, i as getCountriesArray, s as getCurrencies, c as getCurrenciesArray, j as getEntityName, l as getGroupTitleForOption, p as getIndividualName, m as getIndividualNameWithFallback, qe as getPayableRefetchInterval, h as getUserDisplayName, u as rateMajorToMinor, d as rateMinorToMajor, f as sortCurrencyOptionsByGroup, Ct as toast, k as useApprovalPolicyById, ee as useAreCounterpartsLoading, te as useAutosizeGridColumns, nt as useCancelPayableById, Me as useComboboxAnchor, se as useComponentSettings, C as useCounterpartAddresses, x as useCounterpartById, T as useCounterpartContactList, S as useCounterpartList, w as useCounterpartVatList, Ze as useCreatePayable, $e as useCreatePayableLineItem, P as useCreatePaymentRecord, W as useCurrencies, ie as useDebounce, ae as useDebounceCallback, st as useDeletePayable, tt as useDeletePayableLineItem, Pe as useDialog, z as useEntitySettings, E as useEntityUserByAuthToken, D as useEntityUserById, O as useEntityUserNames, A as useFileById, Q as useFileInput, at as useForceApprovePayable, it as useForceRejectPayable, ne as useFormPersist, Xe as useGetPayableApprovalRequests, Je as useGetPayableById, He as useGetPayableCounterpart, Ye as useGetPayableLineItems, ct as useGetPayablesAnalytics, V as useGetReceivableById, H as useGetReceivables, U as useGetReceivablesAnalytics, le as useIsDesktopScreen, ue as useIsExtraLargeDesktopScreen, de as useIsLargeDesktopScreen, fe as useIsLargerThan, oe as useIsMobile, pe as useIsMobileScreen, y as useIsMounted, me as useIsSmallerThan, he as useIsTabletScreen, Ke as useLedgerAccounts, re as useLocalStorageFields, M as useMe, ge as useMediaQuery, J as useMenuButton, b as useMoniteContext, N as useMyEntity, G as useOptionalFields, B as usePatchEntitiesIdSettings, Ge as usePayButtonVisibility, We as usePayableCallbacks, Ue as usePayableDetailsThemeProps, F as usePayablePaymentIntentsAndRecords, R as usePaymentIntentById, I as usePaymentRecordById, L as usePaymentRecords, ot as useReopenPayable, q as useRootElements, rt as useSubmitPayableForApproval, Qe as useUpdatePayable, et as useUpdatePayableLineItem };
|