@tesouro/embedded-components-react 0.3.14 → 0.3.15

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.
@@ -9,31 +9,31 @@ import { Fragment as a, jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
9
9
  import { useLingui as c } from "@lingui/react";
10
10
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js
11
11
  var l = (l) => {
12
- let u = e(), { i18n: d } = c(), f = l.title ?? d._("Access Restricted"), p = l.description ?? /* @__PURE__ */ s("span", { children: [
13
- d._("You don’t have permissions to view this page."),
12
+ let u = "Monite-AccessRestriction", d = e(), { i18n: f } = c(), p = l.title ?? f._("Access Restricted"), m = l.description ?? /* @__PURE__ */ s("span", { children: [
13
+ f._("You don’t have permissions to view this page."),
14
14
  /* @__PURE__ */ o("br", {}),
15
- d._("Contact your system administrator for details.")
15
+ f._("Contact your system administrator for details.")
16
16
  ] });
17
- return /* @__PURE__ */ s(a, { children: [u && /* @__PURE__ */ o("div", {
18
- className: "ttw:flex ttw:justify-end ttw:p-4 Monite-AccessRestriction-InDialog-Header",
17
+ return /* @__PURE__ */ s(a, { children: [d && /* @__PURE__ */ o("div", {
18
+ className: `ttw:flex ttw:justify-end ttw:p-4 ${u}-InDialog-Header`,
19
19
  children: /* @__PURE__ */ o(n, {
20
- onClick: u.onClose,
20
+ onClick: d.onClose,
21
21
  color: "inherit",
22
22
  "aria-label": "close",
23
23
  children: /* @__PURE__ */ o(i, {})
24
24
  })
25
25
  }), /* @__PURE__ */ o(t, {
26
- className: "Monite-AccessRestriction-Content",
26
+ className: u + "-Content",
27
27
  children: /* @__PURE__ */ s("div", {
28
28
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:space-y-4",
29
29
  children: [/* @__PURE__ */ o(r, { className: "ttw:w-8 ttw:h-8 ttw:text-primary" }), /* @__PURE__ */ s("div", {
30
30
  className: "ttw:flex ttw:flex-col ttw:items-center ttw:space-y-2",
31
31
  children: [/* @__PURE__ */ o("h3", {
32
32
  className: "ttw:text-2xl ttw:font-semibold",
33
- children: f
33
+ children: p
34
34
  }), /* @__PURE__ */ o("p", {
35
35
  className: "ttw:text-center",
36
- children: p
36
+ children: m
37
37
  })]
38
38
  })]
39
39
  })
@@ -25,57 +25,57 @@ import { PayableLineItemsForm as he } from "./index383.js";
25
25
  import "./index384.js";
26
26
  import { usePayableDetailsForm as ge } from "./index385.js";
27
27
  import { getPayableDetailsFormSchema as _e, isFieldRequiredByValidations as s } from "./index386.js";
28
- import { useProductCurrencyGroups as c } from "./index389.js";
29
- import { getBankAccountName as ve } from "./index390.js";
30
- import { safeZodResolver as ye } from "./index391.js";
31
- import { useEffect as l, useMemo as be, useRef as xe, useState as Se } from "react";
32
- import { Fragment as Ce, jsx as u, jsxs as d } from "@emotion/react/jsx-runtime";
33
- import { Box as f, Button as p, FormControl as we, FormHelperText as Te, Grid as m, IconButton as Ee, InputLabel as De, MenuItem as Oe, Paper as h, Select as ke, Stack as Ae, Table as je, TableBody as Me, TableCell as g, TableRow as _, TextField as v, Typography as y } from "@mui/material";
34
- import { useLingui as Ne } from "@lingui/react";
35
- import { DatePicker as b } from "@mui/x-date-pickers";
36
- import { Controller as x, FormProvider as Pe, useForm as Fe, useFormState as Ie } from "react-hook-form";
37
- import Le from "@mui/icons-material/DeleteForever";
38
- import S from "@mui/icons-material/Add";
28
+ import { useProductCurrencyGroups as ve } from "./index389.js";
29
+ import { getBankAccountName as ye } from "./index390.js";
30
+ import { safeZodResolver as be } from "./index391.js";
31
+ import { useEffect as c, useMemo as xe, useRef as Se, useState as Ce } from "react";
32
+ import { Fragment as we, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
33
+ import { Box as d, Button as f, FormControl as Te, FormHelperText as Ee, Grid as p, IconButton as De, InputLabel as Oe, MenuItem as ke, Paper as m, Select as Ae, Stack as je, Table as Me, TableBody as Ne, TableCell as h, TableRow as g, TextField as _, Typography as v } from "@mui/material";
34
+ import { useLingui as Pe } from "@lingui/react";
35
+ import { DatePicker as y } from "@mui/x-date-pickers";
36
+ import { Controller as b, FormProvider as Fe, useForm as Ie, useFormState as Le } from "react-hook-form";
37
+ import Re from "@mui/icons-material/DeleteForever";
38
+ import x from "@mui/icons-material/Add";
39
39
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js
40
- var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u(w, {
40
+ var S = ({ ref: e, ...t }) => /* @__PURE__ */ l(r, { children: /* @__PURE__ */ l(C, {
41
41
  ref: e,
42
42
  ...t
43
- }) }), w = ({ payable: r, savePayable: C, createPayable: w, lineItems: T, payableDetailsFormId: Re, initialCounterpartId: E, enableGLCodes: ze, hideAddDiscountButton: Be, hideAddBankAccountButton: Ve, ref: He, ...D }) => {
44
- let { i18n: O } = Ne(), { api: Ue, componentSettings: We } = n(), { root: k } = re(), { formatFromMinorUnits: A, formatToMinorUnits: j, formatCurrencyToDisplay: M, getSymbolFromCurrency: Ge } = te(), { isTagsDisabled: Ke } = i(D), { data: N } = Ue.finops.getPayablesValidations.useQuery(), qe = be(() => o(A, r, T, E), [
43
+ }) }), C = ({ payable: r, savePayable: S, createPayable: C, lineItems: w, payableDetailsFormId: ze, initialCounterpartId: T, enableGLCodes: Be, hideAddDiscountButton: Ve, hideAddBankAccountButton: He, ref: Ue, ...E }) => {
44
+ let { i18n: D } = Pe(), { api: We, componentSettings: Ge } = n(), { root: O } = re(), k = "Monite-PayableDetailsForm", { formatFromMinorUnits: A, formatToMinorUnits: j, formatCurrencyToDisplay: M, getSymbolFromCurrency: Ke } = te(), { isTagsDisabled: qe } = i(E), { data: N } = We.finops.getPayablesValidations.useQuery(), Je = xe(() => o(A, r, w, T), [
45
45
  A,
46
46
  r,
47
- T,
48
- E
49
- ]), P = Fe({
50
- resolver: ye(_e(O, N)),
51
- defaultValues: qe,
47
+ w,
48
+ T
49
+ ]), P = Ie({
50
+ resolver: be(_e(D, N)),
51
+ defaultValues: Je,
52
52
  mode: "onTouched"
53
- }), { control: F, handleSubmit: Je, watch: I, reset: L, trigger: R, setValue: z, getValues: B, getFieldState: V } = P, { dirtyFields: Ye } = Ie({ control: F }), H = I("counterpart"), U = I("counterpartBankAccount"), Xe = I("invoiceDate"), Ze = I("dueDate"), W = I("currency"), Qe = I("lineItems"), G = I("discount"), K = de(Qe, G), [$e, q] = Se(!1), { counterpartQuery: et, counterpartBankAccountQuery: J } = ge({ currentCounterpartId: H }), { ocrRequiredFields: Y, optionalFields: tt } = i(D), { showInvoiceDate: nt, showTags: rt } = ne(tt, {
53
+ }), { control: F, handleSubmit: Ye, watch: I, reset: L, trigger: R, setValue: z, getValues: B, getFieldState: V } = P, { dirtyFields: Xe } = Le({ control: F }), H = I("counterpart"), U = I("counterpartBankAccount"), Ze = I("invoiceDate"), Qe = I("dueDate"), W = I("currency"), $e = I("lineItems"), G = I("discount"), K = de($e, G), [et, q] = Ce(!1), { counterpartQuery: tt, counterpartBankAccountQuery: J } = ge({ currentCounterpartId: H }), { ocrRequiredFields: Y, optionalFields: nt } = i(E), { showInvoiceDate: rt, showTags: it } = ne(nt, {
54
54
  showInvoiceDate: !0,
55
55
  showTags: !0
56
- }), it = ie().has(e.AccountingConfigReadOrg), X = xe(!1), { counterpart: Z, counterpartRawName: at, isCounterpartAIMatched: ot, isCounterpartMatchingToOCRFound: Q, isCounterpartLoading: st } = ue({ payable: r }), { data: $ } = ee(E);
57
- l(() => {
58
- L(o(A, r, T, E));
56
+ }), at = ie().has(e.AccountingConfigReadOrg), X = Se(!1), { counterpart: Z, counterpartRawName: ot, isCounterpartAIMatched: st, isCounterpartMatchingToOCRFound: Q, isCounterpartLoading: ct } = ue({ payable: r }), { data: $ } = ee(T);
57
+ c(() => {
58
+ L(o(A, r, w, T));
59
59
  }, [
60
60
  r,
61
61
  A,
62
62
  L,
63
- T,
64
- E
65
- ]), l(() => {
63
+ w,
64
+ T
65
+ ]), c(() => {
66
66
  !H && U && z("counterpartBankAccount", "", { shouldValidate: !0 });
67
67
  }, [
68
68
  H,
69
69
  U,
70
70
  z
71
- ]), l(() => {
71
+ ]), c(() => {
72
72
  !Q || !Z || V("counterpart").isTouched || z("counterpart", Z.id);
73
73
  }, [
74
74
  Z,
75
75
  V,
76
76
  Q,
77
77
  z
78
- ]), l(() => {
78
+ ]), c(() => {
79
79
  if (J.isSuccess && J.data?.data) {
80
80
  let e = fe(J.data.data, W);
81
81
  B("counterpartBankAccount") !== e && z("counterpartBankAccount", e, {
@@ -90,12 +90,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
90
90
  W,
91
91
  B,
92
92
  z
93
- ]), l(() => {
93
+ ]), c(() => {
94
94
  r?.id && R();
95
95
  }, [R, r?.id]);
96
- let { currencyGroups: ct, isLoadingCurrencyGroups: lt } = c();
97
- return /* @__PURE__ */ d(Ce, { children: [/* @__PURE__ */ u(f, {
98
- className: le(t, "Monite-PayableDetailsForm"),
96
+ let { currencyGroups: lt, isLoadingCurrencyGroups: ut } = ve();
97
+ return /* @__PURE__ */ u(we, { children: [/* @__PURE__ */ l(d, {
98
+ className: le(t, k),
99
99
  sx: {
100
100
  pb: 6,
101
101
  display: "flex",
@@ -104,12 +104,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
104
104
  width: "100%",
105
105
  height: 0
106
106
  },
107
- children: /* @__PURE__ */ u(Pe, {
107
+ children: /* @__PURE__ */ l(Fe, {
108
108
  ...P,
109
- children: /* @__PURE__ */ u("form", {
109
+ children: /* @__PURE__ */ l("form", {
110
110
  style: { width: "100%" },
111
- ref: He,
112
- id: Re,
111
+ ref: Ue,
112
+ id: ze,
113
113
  noValidate: !0,
114
114
  onBlur: () => {
115
115
  X.current = !1;
@@ -117,39 +117,39 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
117
117
  onKeyDown: (e) => {
118
118
  X.current = e.key === "Enter";
119
119
  },
120
- onSubmit: Je(async (e) => {
120
+ onSubmit: Ye(async (e) => {
121
121
  let t = {
122
122
  ...e,
123
123
  currency: e.currency,
124
- counterpartAddressId: me(et.data?.data, $, e.counterpart)
124
+ counterpartAddressId: me(tt.data?.data, $, e.counterpart)
125
125
  }, n = pe(t, j);
126
- r ? C && C(r.id, n, e.lineItems, Ye) : w && w(n, e.lineItems);
126
+ r ? S && S(r.id, n, e.lineItems, Xe) : C && C(n, e.lineItems);
127
127
  }),
128
- children: /* @__PURE__ */ d(m, {
128
+ children: /* @__PURE__ */ u(p, {
129
129
  container: !0,
130
130
  spacing: 3,
131
131
  children: [
132
- /* @__PURE__ */ u(m, {
132
+ /* @__PURE__ */ l(p, {
133
133
  item: !0,
134
134
  xs: 12,
135
- children: /* @__PURE__ */ d(h, {
135
+ children: /* @__PURE__ */ u(m, {
136
136
  variant: "outlined",
137
137
  sx: { p: 3 },
138
- className: "Monite-PayableDetailsForm-Details",
139
- children: [/* @__PURE__ */ u(y, {
138
+ className: k + "-Details",
139
+ children: [/* @__PURE__ */ l(v, {
140
140
  variant: "subtitle2",
141
141
  mb: 2,
142
- children: O._("Details")
143
- }), /* @__PURE__ */ d(Ae, {
142
+ children: D._("Details")
143
+ }), /* @__PURE__ */ u(je, {
144
144
  spacing: 3,
145
145
  children: [
146
- /* @__PURE__ */ u(x, {
146
+ /* @__PURE__ */ l(b, {
147
147
  name: "invoiceNumber",
148
148
  control: F,
149
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(v, {
149
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
150
150
  ...e,
151
151
  id: e.name,
152
- label: O._("Number"),
152
+ label: D._("Number"),
153
153
  variant: "standard",
154
154
  fullWidth: !0,
155
155
  error: !!t,
@@ -157,11 +157,11 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
157
157
  required: a("invoiceNumber", Y)
158
158
  })
159
159
  }),
160
- /* @__PURE__ */ u(oe, {
160
+ /* @__PURE__ */ l(oe, {
161
161
  control: F,
162
- disabled: st,
162
+ disabled: ct,
163
163
  name: "counterpart",
164
- label: O._("Vendor"),
164
+ label: D._("Vendor"),
165
165
  customerType: "vendor",
166
166
  required: a("counterpart", Y) || s("counterpart_id", N),
167
167
  getCounterpartDefaultValues: (e) => ({
@@ -183,35 +183,35 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
183
183
  }
184
184
  }),
185
185
  counterpartMatchingToOCR: Q ? Z : void 0,
186
- counterpartRawName: at,
186
+ counterpartRawName: ot,
187
187
  showEditCounterpartButton: !0,
188
188
  setShowEditCounterpartDialog: q,
189
- counterpartAISuggested: ot ? Z : void 0,
189
+ counterpartAISuggested: st ? Z : void 0,
190
190
  preselectedCounterpart: $
191
191
  }),
192
- /* @__PURE__ */ u(x, {
192
+ /* @__PURE__ */ l(b, {
193
193
  name: "counterpartBankAccount",
194
194
  control: F,
195
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ d(we, {
195
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(Te, {
196
196
  variant: "standard",
197
197
  fullWidth: !0,
198
198
  error: !!t,
199
199
  required: a("counterpartBankAccount", Y) || s("counterpart_bank_account_id", N),
200
200
  children: [
201
- /* @__PURE__ */ u(De, {
201
+ /* @__PURE__ */ l(Oe, {
202
202
  htmlFor: e.name,
203
- children: O._("Bank account")
203
+ children: D._("Bank account")
204
204
  }),
205
- /* @__PURE__ */ d(ke, {
205
+ /* @__PURE__ */ u(Ae, {
206
206
  ...e,
207
207
  id: e.name,
208
208
  labelId: e.name,
209
- label: O._("Bank Account"),
210
- MenuProps: { container: k },
209
+ label: D._("Bank Account"),
210
+ MenuProps: { container: O },
211
211
  disabled: !J?.data || J?.data?.data.length === 0,
212
- children: [!Ve && /* @__PURE__ */ u(p, {
212
+ children: [!He && /* @__PURE__ */ l(f, {
213
213
  variant: "text",
214
- startIcon: /* @__PURE__ */ u(S, {}),
214
+ startIcon: /* @__PURE__ */ l(x, {}),
215
215
  fullWidth: !0,
216
216
  sx: {
217
217
  justifyContent: "flex-start",
@@ -219,24 +219,24 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
219
219
  py: 1
220
220
  },
221
221
  onClick: () => q(!0),
222
- children: O._("Add new bank account")
223
- }), J?.data?.data.map((e) => /* @__PURE__ */ u(Oe, {
222
+ children: D._("Add new bank account")
223
+ }), J?.data?.data.map((e) => /* @__PURE__ */ l(ke, {
224
224
  value: e.id,
225
- children: ve(O, e)
225
+ children: ye(D, e)
226
226
  }, e.id))]
227
227
  }),
228
- t && /* @__PURE__ */ u(Te, { children: t.message })
228
+ t && /* @__PURE__ */ l(Ee, { children: t.message })
229
229
  ]
230
230
  })
231
231
  }),
232
- nt && /* @__PURE__ */ u(x, {
232
+ rt && /* @__PURE__ */ l(b, {
233
233
  name: "invoiceDate",
234
234
  control: F,
235
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(b, {
236
- maxDate: Ze,
235
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
236
+ maxDate: Qe,
237
237
  slotProps: {
238
- popper: { container: k },
239
- dialog: { container: k },
238
+ popper: { container: O },
239
+ dialog: { container: O },
240
240
  actionBar: { actions: ["clear", "today"] },
241
241
  textField: {
242
242
  id: e.name,
@@ -248,7 +248,7 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
248
248
  }
249
249
  },
250
250
  ...e,
251
- label: O._("Issue date"),
251
+ label: D._("Issue date"),
252
252
  views: [
253
253
  "year",
254
254
  "month",
@@ -256,14 +256,14 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
256
256
  ]
257
257
  })
258
258
  }),
259
- /* @__PURE__ */ u(x, {
259
+ /* @__PURE__ */ l(b, {
260
260
  name: "dueDate",
261
261
  control: F,
262
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(b, {
263
- minDate: Xe,
262
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
263
+ minDate: Ze,
264
264
  slotProps: {
265
- popper: { container: k },
266
- dialog: { container: k },
265
+ popper: { container: O },
266
+ dialog: { container: O },
267
267
  actionBar: { actions: ["clear", "today"] },
268
268
  textField: {
269
269
  id: e.name,
@@ -275,7 +275,7 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
275
275
  }
276
276
  },
277
277
  ...e,
278
- label: O._("Due date"),
278
+ label: D._("Due date"),
279
279
  views: [
280
280
  "year",
281
281
  "month",
@@ -283,59 +283,59 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
283
283
  ]
284
284
  })
285
285
  }),
286
- /* @__PURE__ */ u(se, {
286
+ /* @__PURE__ */ l(se, {
287
287
  name: "currency",
288
288
  control: F,
289
289
  required: a("currency", Y) || s("currency", N),
290
- groups: ct,
291
- disabled: lt,
292
- allowedCurrencies: We?.payables?.availableCurrencies
290
+ groups: lt,
291
+ disabled: ut,
292
+ allowedCurrencies: Ge?.payables?.availableCurrencies
293
293
  }),
294
- rt && /* @__PURE__ */ u(ce, {
294
+ it && /* @__PURE__ */ l(ce, {
295
295
  control: F,
296
296
  name: "tags",
297
- label: O._("Tags"),
297
+ label: D._("Tags"),
298
298
  variant: "standard",
299
- disabled: Ke || !it,
299
+ disabled: qe || !at,
300
300
  required: a("tags", Y)
301
301
  })
302
302
  ]
303
303
  })]
304
304
  })
305
305
  }),
306
- /* @__PURE__ */ u(m, {
306
+ /* @__PURE__ */ l(p, {
307
307
  item: !0,
308
308
  xs: 12,
309
- children: /* @__PURE__ */ d(h, {
309
+ children: /* @__PURE__ */ u(m, {
310
310
  variant: "outlined",
311
311
  sx: { p: 3 },
312
- className: "Monite-PayableDetailsForm-Items",
313
- children: [/* @__PURE__ */ u(y, {
312
+ className: k + "-Items",
313
+ children: [/* @__PURE__ */ l(v, {
314
314
  variant: "subtitle2",
315
315
  mb: 2,
316
- children: O._("Items")
317
- }), /* @__PURE__ */ u(he, { enableGLCodes: ze })]
316
+ children: D._("Items")
317
+ }), /* @__PURE__ */ l(he, { enableGLCodes: Be })]
318
318
  })
319
319
  }),
320
- /* @__PURE__ */ u(m, {
320
+ /* @__PURE__ */ l(p, {
321
321
  item: !0,
322
322
  xs: 12,
323
- className: "Monite-PayableDetailsForm-Totals",
324
- children: /* @__PURE__ */ u(h, {
323
+ className: k + "-Totals",
324
+ children: /* @__PURE__ */ l(m, {
325
325
  variant: "outlined",
326
- children: /* @__PURE__ */ u(je, { children: /* @__PURE__ */ d(Me, { children: [
327
- /* @__PURE__ */ d(_, {
328
- className: "Monite-PayableDetailsForm-Totals-Subtotal",
329
- children: [/* @__PURE__ */ u(g, { children: O._("Subtotal") }), /* @__PURE__ */ u(g, {
326
+ children: /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ u(Ne, { children: [
327
+ /* @__PURE__ */ u(g, {
328
+ className: k + "-Totals-Subtotal",
329
+ children: [/* @__PURE__ */ l(h, { children: D._("Subtotal") }), /* @__PURE__ */ l(h, {
330
330
  align: "right",
331
- children: /* @__PURE__ */ d(f, {
331
+ children: /* @__PURE__ */ u(d, {
332
332
  gap: .5,
333
333
  alignItems: "center",
334
334
  justifyContent: "flex-end",
335
335
  display: "flex",
336
- children: [G === null && !Be && /* @__PURE__ */ u(p, {
336
+ children: [G === null && !Ve && /* @__PURE__ */ l(f, {
337
337
  variant: "text",
338
- startIcon: /* @__PURE__ */ u(S, {}),
338
+ startIcon: /* @__PURE__ */ l(x, {}),
339
339
  size: "small",
340
340
  sx: {
341
341
  pl: 1.25,
@@ -346,31 +346,31 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
346
346
  let e = P.setValue;
347
347
  e("discount", 0);
348
348
  },
349
- children: O._("Add Discount")
349
+ children: D._("Add Discount")
350
350
  }), K.subtotal && W ? M(j(K.subtotal, W) || 0, W) : "—"]
351
351
  })
352
352
  })]
353
353
  }),
354
- G !== null && /* @__PURE__ */ d(_, {
355
- className: "Monite-PayableDetailsForm-Totals-Discount",
356
- children: [/* @__PURE__ */ u(g, { children: O._("Discount") }), /* @__PURE__ */ u(g, {
354
+ G !== null && /* @__PURE__ */ u(g, {
355
+ className: k + "-Totals-Discount",
356
+ children: [/* @__PURE__ */ l(h, { children: D._("Discount") }), /* @__PURE__ */ l(h, {
357
357
  align: "right",
358
- children: /* @__PURE__ */ d(f, {
358
+ children: /* @__PURE__ */ u(d, {
359
359
  gap: .5,
360
360
  alignItems: "center",
361
361
  justifyContent: "flex-end",
362
362
  display: "flex",
363
- children: [/* @__PURE__ */ u(Ee, {
363
+ children: [/* @__PURE__ */ l(De, {
364
364
  "aria-label": "delete",
365
365
  onClick: () => {
366
366
  let e = P.setValue;
367
367
  e("discount", null);
368
368
  },
369
- children: /* @__PURE__ */ u(Le, {})
370
- }), /* @__PURE__ */ u(x, {
369
+ children: /* @__PURE__ */ l(Re, {})
370
+ }), /* @__PURE__ */ l(b, {
371
371
  name: "discount",
372
372
  control: F,
373
- render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(v, {
373
+ render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
374
374
  ...e,
375
375
  id: e.name,
376
376
  variant: "standard",
@@ -381,27 +381,27 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
381
381
  },
382
382
  error: !!t,
383
383
  sx: { width: 150 },
384
- InputProps: { endAdornment: Ge(W) }
384
+ InputProps: { endAdornment: Ke(W) }
385
385
  })
386
386
  })]
387
387
  })
388
388
  })]
389
389
  }),
390
- /* @__PURE__ */ d(_, {
391
- className: "Monite-PayableDetailsForm-Totals-Taxes",
392
- children: [/* @__PURE__ */ u(g, { children: O._("Tax total") }), /* @__PURE__ */ u(g, {
390
+ /* @__PURE__ */ u(g, {
391
+ className: k + "-Totals-Taxes",
392
+ children: [/* @__PURE__ */ l(h, { children: D._("Tax total") }), /* @__PURE__ */ l(h, {
393
393
  align: "right",
394
394
  children: K.taxes && W ? M(j(K.taxes, W) || 0, W) : "—"
395
395
  })]
396
396
  }),
397
- /* @__PURE__ */ d(_, {
398
- className: "Monite-PayableDetailsForm-Totals-Total",
399
- children: [/* @__PURE__ */ u(g, { children: /* @__PURE__ */ u(y, {
397
+ /* @__PURE__ */ u(g, {
398
+ className: k + "-Totals-Total",
399
+ children: [/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(v, {
400
400
  variant: "subtitle1",
401
- children: O._("Total")
402
- }) }), /* @__PURE__ */ u(g, {
401
+ children: D._("Total")
402
+ }) }), /* @__PURE__ */ l(h, {
403
403
  align: "right",
404
- children: /* @__PURE__ */ u(y, {
404
+ children: /* @__PURE__ */ l(v, {
405
405
  variant: "subtitle1",
406
406
  children: K.total && W ? M(j(K.total, W) || 0, W) : "—"
407
407
  })
@@ -414,12 +414,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
414
414
  })
415
415
  })
416
416
  })
417
- }), H && /* @__PURE__ */ u(ae, {
417
+ }), H && /* @__PURE__ */ l(ae, {
418
418
  counterpartId: H,
419
- open: $e,
419
+ open: et,
420
420
  onClose: () => q(!1),
421
421
  customerType: "vendor"
422
422
  })] });
423
423
  };
424
424
  //#endregion
425
- export { C as PayableDetailsForm };
425
+ export { S as PayableDetailsForm };