@tesouro/embedded-components-react 0.5.56 → 0.5.58

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.
@@ -1,17 +1,11 @@
1
- import { formatPhoneNumberInput as e } from "./index2.js";
2
- import { sanitizeZipCodeInput as t } from "./index3.js";
3
- import { normalizeAdditionalOwnerDraft as n } from "./index15.js";
1
+ import { parseCalendarDate as e } from "../../../shared/util/dist/lib/parseCalendarDate.js";
2
+ import { formatPhoneNumberInput as t } from "./index2.js";
3
+ import { sanitizeZipCodeInput as n } from "./index3.js";
4
+ import { normalizeAdditionalOwnerDraft as r } from "./index15.js";
4
5
  //#region ../../libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js
5
- var r = .25, i = (t) => t ? e(t) : void 0, a = (e) => e ? t(e) : void 0;
6
- function o(e) {
7
- return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
8
- }
6
+ var i = .25, a = (e) => e ? t(e) : void 0, o = (e) => e ? n(e) : void 0;
9
7
  function s(e) {
10
- if (!e) return;
11
- let t = /^(\d{4})-(\d{2})-(\d{2})/.exec(e);
12
- if (!t) return;
13
- let [, n, r, i] = t;
14
- return new Date(Number(n), Number(r) - 1, Number(i));
8
+ return Object.fromEntries(Object.entries(e).filter(([, e]) => e !== void 0));
15
9
  }
16
10
  function c(e) {
17
11
  if (e == null || e === "") return null;
@@ -21,7 +15,7 @@ function c(e) {
21
15
  function l(e) {
22
16
  if (e == null || e === "") return null;
23
17
  let t = typeof e == "string" ? Number(e) : e;
24
- return Number.isFinite(t) ? t >= r : null;
18
+ return Number.isFinite(t) ? t >= i : null;
25
19
  }
26
20
  function u(e) {
27
21
  return {
@@ -33,14 +27,14 @@ function u(e) {
33
27
  }
34
28
  function d(e, t) {
35
29
  let n = u(e.address);
36
- return o({
30
+ return s({
37
31
  companyLegalName: e.legalName ?? void 0,
38
32
  companyDbaName: e.dbaName ?? "",
39
33
  businessAddress: n.line1,
40
34
  city: n.city,
41
35
  state: n.state,
42
- zipCode: a(n.zipCode),
43
- companyPhoneNumber: i(e.phoneNumber),
36
+ zipCode: o(n.zipCode),
37
+ companyPhoneNumber: a(e.phoneNumber),
44
38
  companyStructure: e.businessStructureType ?? void 0,
45
39
  website: e.website ?? "",
46
40
  naicsCode: e.northAmericanIndustryClassificationSystemCode ?? void 0,
@@ -51,40 +45,40 @@ function d(e, t) {
51
45
  isCheckboxChecked: !1
52
46
  });
53
47
  }
54
- function f(e) {
55
- let t = u(e.homeAddress);
56
- return o({
57
- firstName: e.firstName ?? void 0,
58
- lastName: e.lastName ?? void 0,
59
- dateOfBirth: s(e.birthDate),
60
- homeAddress: t.line1,
61
- city: t.city,
62
- state: t.state,
63
- zipCode: a(t.zipCode),
64
- mobilePhoneNumber: i(e.mobilePhoneNumber),
65
- workEmail: e.workEmailAddress ?? void 0,
66
- ownsOver25Percent: l(e.ownershipPercentage) ?? void 0,
67
- ownershipPercentage: c(e.ownershipPercentage) ?? void 0,
48
+ function f(t) {
49
+ let n = u(t.homeAddress);
50
+ return s({
51
+ firstName: t.firstName ?? void 0,
52
+ lastName: t.lastName ?? void 0,
53
+ dateOfBirth: e(t.birthDate),
54
+ homeAddress: n.line1,
55
+ city: n.city,
56
+ state: n.state,
57
+ zipCode: o(n.zipCode),
58
+ mobilePhoneNumber: a(t.mobilePhoneNumber),
59
+ workEmail: t.workEmailAddress ?? void 0,
60
+ ownsOver25Percent: l(t.ownershipPercentage) ?? void 0,
61
+ ownershipPercentage: c(t.ownershipPercentage) ?? void 0,
68
62
  ssn: "",
69
- ssnOnFileLast4: e.personalIdentificationNumberLast4 ?? void 0
63
+ ssnOnFileLast4: t.personalIdentificationNumberLast4 ?? void 0
70
64
  });
71
65
  }
72
- function p(e) {
73
- let t = u(e.homeAddress);
74
- return n({
75
- ...e.id ? { id: e.id } : {},
76
- firstName: e.firstName ?? "",
77
- lastName: e.lastName ?? "",
78
- dateOfBirth: s(e.birthDate),
66
+ function p(t) {
67
+ let n = u(t.homeAddress);
68
+ return r({
69
+ ...t.id ? { id: t.id } : {},
70
+ firstName: t.firstName ?? "",
71
+ lastName: t.lastName ?? "",
72
+ dateOfBirth: e(t.birthDate),
79
73
  ssn: "",
80
- ...e.id && e.personalIdentificationNumberLast4 ? { ssnOnFileLast4: e.personalIdentificationNumberLast4 } : {},
81
- homeAddress: t.line1 ?? "",
82
- city: t.city ?? "",
83
- state: t.state ?? "",
84
- zipCode: t.zipCode ?? "",
85
- mobilePhoneNumber: e.mobilePhoneNumber ?? "",
74
+ ...t.id && t.personalIdentificationNumberLast4 ? { ssnOnFileLast4: t.personalIdentificationNumberLast4 } : {},
75
+ homeAddress: n.line1 ?? "",
76
+ city: n.city ?? "",
77
+ state: n.state ?? "",
78
+ zipCode: n.zipCode ?? "",
79
+ mobilePhoneNumber: t.mobilePhoneNumber ?? "",
86
80
  ownsOver25Percent: null,
87
- ownershipPercentage: c(e.ownershipPercentage)
81
+ ownershipPercentage: c(t.ownershipPercentage)
88
82
  });
89
83
  }
90
84
  function m(e) {
@@ -1,18 +1,12 @@
1
+ import { parseDateOrTimestamp as e } from "../../../../shared/util/dist/lib/parseCalendarDate.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/bank-accounts-widget/account-details/feature/dist/index4.js
2
- var e = /^(\d{4})-(\d{2})-(\d{2})$/;
3
3
  function t(t) {
4
- let n = e.exec(t);
5
- if (!n) return new Date(t);
6
- let r = Number(n[1]), i = Number(n[2]) - 1, a = Number(n[3]), o = new Date(r, i, a);
7
- return o.getFullYear() !== r || o.getMonth() !== i || o.getDate() !== a ? /* @__PURE__ */ new Date(NaN) : o;
8
- }
9
- function n(e) {
10
- let n = e.trim();
4
+ let n = t.trim();
11
5
  if (!n) return "";
12
- let r = t(n);
13
- return Number.isNaN(r.getTime()) ? n : new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(r);
6
+ let r = e(n);
7
+ return r ? new Intl.DateTimeFormat(void 0, { dateStyle: "medium" }).format(r) : n;
14
8
  }
15
- function r(e, t = "—") {
9
+ function n(e, t = "—") {
16
10
  if (!e) return t;
17
11
  let n = Number(e.value);
18
12
  return Number.isFinite(n) ? new Intl.NumberFormat(void 0, {
@@ -20,7 +14,7 @@ function r(e, t = "—") {
20
14
  currency: e.currencyCode
21
15
  }).format(n / 100) : t;
22
16
  }
23
- function i(e, t, n = "—") {
17
+ function r(e, t, n = "—") {
24
18
  if (!e) return n;
25
19
  let r = Math.abs(Number(e.value));
26
20
  if (!Number.isFinite(r)) return n;
@@ -30,11 +24,11 @@ function i(e, t, n = "—") {
30
24
  }).format(r / 100);
31
25
  return t === "CREDIT" ? `+${i}` : `-${i}`;
32
26
  }
33
- function a(e) {
27
+ function i(e) {
34
28
  let t = e.trim();
35
29
  return t ? `••••••••${t.slice(-4)}` : "";
36
30
  }
37
- async function o(e) {
31
+ async function a(e) {
38
32
  if (!e.trim()) return !1;
39
33
  try {
40
34
  return await navigator.clipboard.writeText(e), !0;
@@ -43,4 +37,4 @@ async function o(e) {
43
37
  }
44
38
  }
45
39
  //#endregion
46
- export { o as copyTextToClipboard, r as formatAmountLabel, i as formatSignedTransactionAmountLabel, n as formatTransactionDateLabel, a as maskAccountNumber };
40
+ export { a as copyTextToClipboard, n as formatAmountLabel, r as formatSignedTransactionAmountLabel, t as formatTransactionDateLabel, i as maskAccountNumber };
@@ -1,6 +1,7 @@
1
1
  import { minorExponentForCurrency as e } from "../../../shared/util/dist/lib/amountOutputToMajorUnits.js";
2
+ import { parseDateOrTimestamp as t } from "../../../shared/util/dist/lib/parseCalendarDate.js";
2
3
  //#region ../../libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/index5.js
3
- var t = /^(\d{4})-(\d{2})-(\d{2})$/, n = {
4
+ var n = {
4
5
  to: "",
5
6
  cc: "",
6
7
  bcc: "",
@@ -51,43 +52,36 @@ function c(e) {
51
52
  function l({ defaultTab: e, enabledTabs: t }) {
52
53
  return e && t.includes(e) ? e : t[0] ?? "invoices";
53
54
  }
54
- function u(e, t) {
55
- if (!e) return t;
56
- let n = d(e);
57
- return Number.isNaN(n.getTime()) ? t : new Intl.DateTimeFormat(void 0, {
55
+ function u(e, n) {
56
+ let r = t(e);
57
+ return r ? new Intl.DateTimeFormat(void 0, {
58
58
  day: "numeric",
59
59
  month: "short",
60
60
  year: "numeric"
61
- }).format(n);
61
+ }).format(r) : n;
62
62
  }
63
- function d(e) {
64
- let n = t.exec(e);
65
- if (!n) return new Date(e);
66
- let r = Number(n[1]), i = Number(n[2]) - 1, a = Number(n[3]), o = new Date(r, i, a);
67
- return o.getFullYear() !== r || o.getMonth() !== i || o.getDate() !== a ? /* @__PURE__ */ new Date(NaN) : o;
68
- }
69
- function f({ amount: t, currency: n, fallback: r }) {
63
+ function d({ amount: t, currency: n, fallback: r }) {
70
64
  return t == null || !n ? r : new Intl.NumberFormat(void 0, {
71
65
  currency: n,
72
66
  style: "currency"
73
67
  }).format(t / 10 ** e(n));
74
68
  }
75
- function p(t, n) {
69
+ function f(t, n) {
76
70
  let r = Number(t);
77
71
  if (!Number.isFinite(r)) return;
78
72
  let i = n ? e(n) : 2;
79
73
  return Math.round(r * 10 ** i);
80
74
  }
81
- function m(e, t) {
75
+ function p(e, t) {
82
76
  return e.document_id || t.untitledDocument;
83
77
  }
84
- function h(e, t) {
78
+ function m(e, t) {
85
79
  return e === "quote" ? t.quoteType : e === "credit_note" ? t.creditNoteType : t.invoiceType;
86
80
  }
87
- function g(e) {
81
+ function h(e) {
88
82
  return e === "paid" || e === "accepted" || e === "issued" || e === "recurring" ? "success" : e === "draft" || e === "issuing" ? "neutral" : e === "overdue" || e === "partially_paid" ? "warning" : e === "failed" || e === "declined" || e === "expired" || e === "uncollectible" || e === "canceled" || e === "deleted" ? "danger" : "info";
89
83
  }
90
- function _(e) {
84
+ function g(e) {
91
85
  let t = e.status === "draft", n = e.status === "issued", r = e.type === "invoice", i = e.type === "quote", a = e.type === "credit_note", o = r && [
92
86
  "issued",
93
87
  "overdue",
@@ -117,48 +111,48 @@ function _(e) {
117
111
  ].includes(e.status) && !a
118
112
  };
119
113
  }
120
- function v({ receivables: e, messages: t }) {
114
+ function _({ receivables: e, messages: t }) {
121
115
  return e.map((e) => {
122
116
  let n = e.type === "invoice" ? e.amount_due : void 0;
123
117
  return {
124
118
  id: e.id,
125
119
  type: e.type,
126
- documentLabel: m(e, t),
120
+ documentLabel: p(e, t),
127
121
  customerLabel: e.counterpart_name || t.unknownCustomer,
128
122
  status: e.status,
129
- statusTone: g(e.status),
123
+ statusTone: h(e.status),
130
124
  issueDateLabel: u(e.issue_date, t.notAvailable),
131
125
  dueDateLabel: u(e.type === "quote" ? e.expiry_date : e.due_date, t.notAvailable),
132
- totalLabel: f({
126
+ totalLabel: d({
133
127
  amount: e.total_amount,
134
128
  currency: e.currency,
135
129
  fallback: t.notAvailable
136
130
  }),
137
- amountDueLabel: f({
131
+ amountDueLabel: d({
138
132
  amount: n,
139
133
  currency: e.currency,
140
134
  fallback: t.notAvailable
141
135
  }),
142
- actions: _(e)
136
+ actions: g(e)
143
137
  };
144
138
  });
145
139
  }
146
- function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
140
+ function v({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
147
141
  if (!e) return;
148
142
  let a = e.type === "invoice" ? e.amount_due : void 0, o = e.type === "quote" ? e.expiry_date : e.due_date;
149
143
  return {
150
144
  id: e.id,
151
145
  type: e.type,
152
- title: m(e, i),
146
+ title: p(e, i),
153
147
  customerLabel: e.counterpart_name || i.unknownCustomer,
154
148
  status: e.status,
155
- statusTone: g(e.status),
156
- totalLabel: f({
149
+ statusTone: h(e.status),
150
+ totalLabel: d({
157
151
  amount: e.total_amount,
158
152
  currency: e.currency,
159
153
  fallback: i.notAvailable
160
154
  }),
161
- amountDueLabel: f({
155
+ amountDueLabel: d({
162
156
  amount: a,
163
157
  currency: e.currency,
164
158
  fallback: i.notAvailable
@@ -167,11 +161,11 @@ function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
167
161
  summaryItems: [
168
162
  {
169
163
  label: i.summaryDocumentType,
170
- value: h(e.type, i)
164
+ value: m(e.type, i)
171
165
  },
172
166
  {
173
167
  label: i.summaryDocumentNumber,
174
- value: m(e, i)
168
+ value: p(e, i)
175
169
  },
176
170
  {
177
171
  label: i.summaryCustomer,
@@ -195,7 +189,7 @@ function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
195
189
  },
196
190
  {
197
191
  label: i.summaryTotal,
198
- value: f({
192
+ value: d({
199
193
  amount: e.total_amount,
200
194
  currency: e.currency,
201
195
  fallback: i.notAvailable
@@ -203,7 +197,7 @@ function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
203
197
  },
204
198
  {
205
199
  label: i.summaryAmountDue,
206
- value: f({
200
+ value: d({
207
201
  amount: a,
208
202
  currency: e.currency,
209
203
  fallback: i.notAvailable
@@ -214,12 +208,12 @@ function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
214
208
  id: t.product.id || String(n),
215
209
  name: t.product.name,
216
210
  quantityLabel: String(t.quantity),
217
- unitPriceLabel: f({
211
+ unitPriceLabel: d({
218
212
  amount: t.product.price?.value,
219
213
  currency: t.product.price?.currency || e.currency,
220
214
  fallback: i.notAvailable
221
215
  }),
222
- totalLabel: f({
216
+ totalLabel: d({
223
217
  amount: t.total_after_tax ?? t.total_before_tax,
224
218
  currency: e.currency,
225
219
  fallback: i.notAvailable
@@ -227,23 +221,23 @@ function y({ receivable: e, history: t, mails: n, pdfUrl: r, messages: i }) {
227
221
  })),
228
222
  activityItems: t.map((e) => ({
229
223
  id: e.id,
230
- title: b(e.event_type, i),
224
+ title: y(e.event_type, i),
231
225
  description: e.event_type,
232
226
  timestampLabel: u(e.timestamp, i.notAvailable)
233
227
  })),
234
228
  mailItems: n.map((e) => ({
235
229
  id: e.id,
236
230
  statusLabel: e.status,
237
- recipientsLabel: x(e, i),
231
+ recipientsLabel: b(e, i),
238
232
  sentAtLabel: u(e.created_at, i.notAvailable)
239
233
  })),
240
- actions: _(e)
234
+ actions: g(e)
241
235
  };
242
236
  }
243
- function b(e, t) {
237
+ function y(e, t) {
244
238
  return e === "status_changed" ? t.activityStatusChanged : e === "receivable_created" ? t.activityReceivableCreated : e === "receivable_updated" ? t.activityReceivableUpdated : e === "payment_received" ? t.activityPaymentReceived : e === "mail_sent" ? t.activityMailSent : t.activityUnknown;
245
239
  }
246
- function x(e, t) {
240
+ function b(e, t) {
247
241
  let n = [
248
242
  ...e.recipients?.to ?? [],
249
243
  ...e.recipients?.cc ?? [],
@@ -251,7 +245,7 @@ function x(e, t) {
251
245
  ].map((e) => e.email).filter(Boolean);
252
246
  return n.length > 0 ? n.join(", ") : t.recipientsNone;
253
247
  }
254
- function S({ values: e, billingAddressId: t, messages: n }) {
248
+ function x({ values: e, billingAddressId: t, messages: n }) {
255
249
  let r = {};
256
250
  e.customerId ? t || (r.customerId = n.customerAddressRequired) : r.customerId = n.customerRequired, e.currency || (r.currency = n.currencyRequired);
257
251
  for (let t of e.lineItems) {
@@ -263,10 +257,10 @@ function S({ values: e, billingAddressId: t, messages: n }) {
263
257
  }
264
258
  return r;
265
259
  }
266
- function C(e) {
260
+ function S(e) {
267
261
  return Object.keys(e).length > 0;
268
262
  }
269
- function w({ values: e, billingAddressId: t }) {
263
+ function C({ values: e, billingAddressId: t }) {
270
264
  let n = e.lineItems.map((e) => ({
271
265
  product_id: e.productId,
272
266
  quantity: Number(e.quantity)
@@ -288,7 +282,7 @@ function w({ values: e, billingAddressId: t }) {
288
282
  type: "invoice"
289
283
  };
290
284
  }
291
- function T(e) {
285
+ function w(e) {
292
286
  let t = e.type === "quote" ? "quote" : "invoice", n = e.type === "invoice" ? e.payment_terms?.id ?? "" : "", r = e.line_items.map((e) => ({
293
287
  id: i().id,
294
288
  productId: e.product.id || "",
@@ -299,14 +293,14 @@ function T(e) {
299
293
  type: t,
300
294
  customerId: e.counterpart_id,
301
295
  currency: e.currency,
302
- issueDate: O(e.issue_date),
303
- dueDate: O(e.type === "quote" ? e.expiry_date : e.due_date),
296
+ issueDate: D(e.issue_date),
297
+ dueDate: D(e.type === "quote" ? e.expiry_date : e.due_date),
304
298
  memo: e.memo ?? "",
305
299
  paymentTermsId: n,
306
300
  lineItems: r.length > 0 ? r : [i()]
307
301
  };
308
302
  }
309
- function E({ values: e, billingAddressId: t }) {
303
+ function T({ values: e, billingAddressId: t }) {
310
304
  let n = {
311
305
  counterpart_billing_address_id: t,
312
306
  counterpart_id: e.customerId,
@@ -325,43 +319,43 @@ function E({ values: e, billingAddressId: t }) {
325
319
  payment_terms: !e.paymentTermsId && e.dueDate ? { term_final: { end_date: e.dueDate } } : void 0
326
320
  } };
327
321
  }
328
- function D(e) {
322
+ function E(e) {
329
323
  return { data: e.lineItems.map((e) => ({
330
324
  product_id: e.productId,
331
325
  quantity: Number(e.quantity)
332
326
  })) };
333
327
  }
334
- function O(e) {
328
+ function D(e) {
335
329
  return e?.slice(0, 10) ?? "";
336
330
  }
337
- function k(e) {
331
+ function O(e) {
338
332
  return (e ?? []).map((e) => ({
339
333
  value: e.id,
340
334
  label: e.name
341
335
  }));
342
336
  }
343
- function A(e, t) {
337
+ function k(e, t) {
344
338
  let n = {};
345
339
  return e.to.trim() || (n.to = t.sendToRequired), e.subject.trim() || (n.subject = t.sendSubjectRequired), e.body.trim() || (n.body = t.sendBodyRequired), n;
346
340
  }
347
- function j(e) {
341
+ function A(e) {
348
342
  return Object.keys(e).length > 0;
349
343
  }
350
- function M(e) {
344
+ function j(e) {
351
345
  return e.split(",").map((e) => e.trim()).filter(Boolean);
352
346
  }
353
- function N(e, t, n) {
347
+ function M(e, t, n) {
354
348
  let r = {};
355
349
  if (e.mode === "partial") {
356
- let i = p(e.amountPaid, n);
350
+ let i = f(e.amountPaid, n);
357
351
  (!i || i <= 0) && (r.amountPaid = t.paymentAmountInvalid);
358
352
  }
359
353
  return r;
360
354
  }
361
- function P(e) {
355
+ function N(e) {
362
356
  return Object.keys(e).length > 0;
363
357
  }
364
- function F(e, t) {
358
+ function P(e, t) {
365
359
  return {
366
360
  ...n,
367
361
  to: e?.counterpart_contact?.email ?? "",
@@ -369,13 +363,13 @@ function F(e, t) {
369
363
  body: t.sendBodyDefault
370
364
  };
371
365
  }
372
- function I() {
366
+ function F() {
373
367
  return {
374
368
  ...r,
375
369
  paidAt: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
376
370
  };
377
371
  }
378
- function L() {
372
+ function I() {
379
373
  return [
380
374
  "draft",
381
375
  "issued",
@@ -395,4 +389,4 @@ function L() {
395
389
  }));
396
390
  }
397
391
  //#endregion
398
- export { r as EMPTY_RECEIVABLE_PAYMENT_VALUES, n as EMPTY_RECEIVABLE_SEND_VALUES, _ as buildReceivableActions, y as buildReceivableDetailsView, v as buildReceivableRows, c as coerceEnabledTabs, a as createEmptyReceivableFormValues, i as createLineItem, I as defaultPaymentValues, F as defaultSendValues, u as formatDate, f as formatMoney, p as fromMajorUnits, m as getDocumentTitle, h as getDocumentTypeLabel, k as getPaymentTermOptions, g as getStatusTone, P as hasPaymentErrors, C as hasReceivableFormErrors, j as hasSendErrors, w as receivableFormValuesToCreatePayload, D as receivableFormValuesToLineItemsPayload, E as receivableFormValuesToUpdatePayload, T as receivableToFormValues, l as resolveInitialTab, M as splitEmailList, L as statusFilterOptions, s as tabForType, o as typeForTab, N as validatePaymentValues, S as validateReceivableForm, A as validateSendValues };
392
+ export { r as EMPTY_RECEIVABLE_PAYMENT_VALUES, n as EMPTY_RECEIVABLE_SEND_VALUES, g as buildReceivableActions, v as buildReceivableDetailsView, _ as buildReceivableRows, c as coerceEnabledTabs, a as createEmptyReceivableFormValues, i as createLineItem, F as defaultPaymentValues, P as defaultSendValues, u as formatDate, d as formatMoney, f as fromMajorUnits, p as getDocumentTitle, m as getDocumentTypeLabel, O as getPaymentTermOptions, h as getStatusTone, N as hasPaymentErrors, S as hasReceivableFormErrors, A as hasSendErrors, C as receivableFormValuesToCreatePayload, E as receivableFormValuesToLineItemsPayload, T as receivableFormValuesToUpdatePayload, w as receivableToFormValues, l as resolveInitialTab, j as splitEmailList, I as statusFilterOptions, s as tabForType, o as typeForTab, M as validatePaymentValues, x as validateReceivableForm, k as validateSendValues };
@@ -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.56", n = "a38dec9e868e238fed2e7599b00b71fd6c5c2313", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.5.58", n = "53d6d2847ae590e68dff3d231e9164900e41c933", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -0,0 +1,17 @@
1
+ //#region ../../libs/tesouro-embedded-components-react/shared/util/dist/lib/parseCalendarDate.js
2
+ var e = /^(\d{4})-(\d{2})-(\d{2})$/;
3
+ function t(t) {
4
+ if (!t) return;
5
+ let n = e.exec(t);
6
+ if (!n) return;
7
+ let r = Number(n[1]), i = Number(n[2]) - 1, a = Number(n[3]), o = new Date(r, i, a);
8
+ if (o.getFullYear() === r && o.getMonth() === i && o.getDate() === a) return o;
9
+ }
10
+ function n(n) {
11
+ if (!n) return;
12
+ if (e.test(n)) return t(n);
13
+ let r = new Date(n);
14
+ return Number.isNaN(r.getTime()) ? void 0 : r;
15
+ }
16
+ //#endregion
17
+ export { t as parseCalendarDate, n as parseDateOrTimestamp };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.5.56",
3
+ "version": "0.5.58",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "packageDepSync": {