@tesouro/embedded-components-react 0.7.34 → 0.7.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +10 -8
  2. package/dist/index.d.ts +31 -32
  3. package/dist/index.js +5 -5
  4. package/dist/lib/CounterpartsWidget.d.ts +0 -1
  5. package/dist/lib/CounterpartsWidgetPublic.d.ts +0 -1
  6. package/dist/lib/CustomersWidget.d.ts +0 -1
  7. package/dist/lib/{MarketingWidget.d.ts → OfferWidget.d.ts} +31 -31
  8. package/dist/lib/OfferWidget.js +6 -0
  9. package/dist/lib/ReceivablesWidget.d.ts +0 -1
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/bill-detail/feature/dist/index33.js +109 -110
  11. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/CounterpartDetailsPanel.js +2 -2
  12. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/lib/CounterpartsWidget/useCounterpartsTable.js +1 -1
  13. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +1 -1
  14. package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/index.js +5 -0
  15. package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget/MarketingWidget.js → offer-widget/feature/dist/lib/OfferWidget/OfferWidget.js} +11 -11
  16. package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget → offer-widget/feature/dist/lib/OfferWidget}/labels.js +2 -2
  17. package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/lib/MarketingWidget/marketingApplicationView.js → offer-widget/feature/dist/lib/OfferWidget/offerApplicationView.js} +2 -2
  18. package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/lib/analytics/events.js +8 -0
  19. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/feature/dist/lib/testIds.js +2 -2
  20. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/feature/dist/mocks/labels.js +2 -2
  21. package/dist/libs/tesouro-embedded-components-react/{marketing-widget/feature/dist/mocks/marketing.js → offer-widget/feature/dist/mocks/offer.js} +3 -3
  22. package/dist/libs/tesouro-embedded-components-react/offer-widget/feature/dist/scenarios.js +2 -0
  23. package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index.js +5 -0
  24. package/dist/libs/tesouro-embedded-components-react/offer-widget/ui/dist/index2.js +10 -0
  25. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index3.js +2 -2
  26. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index4.js +2 -2
  27. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index5.js +2 -2
  28. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index6.js +2 -2
  29. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index7.js +5 -5
  30. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index8.js +3 -3
  31. package/dist/libs/tesouro-embedded-components-react/{marketing-widget → offer-widget}/ui/dist/index9.js +6 -6
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index.js +2 -4
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index4.js +89 -2
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index5.js +48 -50
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/index.js +4 -6
  36. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/helpers.js +2 -3
  37. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/labels.js +0 -1
  38. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/subEntityForms.js +1 -1
  39. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useAddressForm.js +1 -1
  40. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartDetails.js +2 -2
  41. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartForm.js +2 -2
  42. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useDeleteController.js +1 -1
  43. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/usePayableAchInstructions.js +1 -1
  44. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index.js +3 -6
  45. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index11.js +48 -7
  46. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +4 -48
  47. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +28 -6
  48. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  49. package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js +2 -2
  50. package/dist/scenarios/index.d.ts +2 -2
  51. package/dist/scenarios/index.js +3 -3
  52. package/package.json +1 -1
  53. package/dist/lib/MarketingWidget.js +0 -6
  54. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js +0 -5
  55. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/lib/analytics/events.js +0 -8
  56. package/dist/libs/tesouro-embedded-components-react/marketing-widget/feature/dist/scenarios.js +0 -2
  57. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index.js +0 -5
  58. package/dist/libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js +0 -10
  59. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index6.js +0 -7
  60. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js +0 -92
  61. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/CounterpartSelector.js +0 -7
  62. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/feature/dist/lib/useCounterpartSelector.js +0 -8
  63. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index14.js +0 -4
  64. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js +0 -28
  65. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index16.js +0 -4
@@ -1,48 +1,4 @@
1
- import { Typography as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { BANK_ACCOUNT_FORM_SHEET_LABELS_EN as t } from "./index2.js";
3
- import { AchFieldGroup as n } from "./index5.js";
4
- import { FormSheet as r } from "./index9.js";
5
- import { useId as i } from "react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
7
- //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js
8
- function s({ open: s, onOpenChange: c, mode: l, values: u, errors: d, highlightedFields: f, inProgress: p, submitDisabled: m, onChange: h, onSubmit: g, onCancel: _, labels: v }) {
9
- let y = {
10
- ...t,
11
- ...v,
12
- fieldMarkers: {
13
- ...t.fieldMarkers,
14
- ...v?.fieldMarkers
15
- }
16
- }, b = i();
17
- return /* @__PURE__ */ o(r, {
18
- open: s,
19
- onOpenChange: c,
20
- title: l === "edit" ? y.editTitle : y.createTitle,
21
- formError: d?.form,
22
- inProgress: p,
23
- submitDisabled: m,
24
- submitLabel: y.saveButton,
25
- cancelLabel: y.cancelButton,
26
- onSubmit: g,
27
- onCancel: _,
28
- children: [/* @__PURE__ */ a(n, {
29
- idPrefix: b,
30
- values: u,
31
- errors: d,
32
- highlighted: f,
33
- onChange: h,
34
- labels: {
35
- accountHolderName: y.accountHolderNameLabel,
36
- routingNumber: y.routingNumberLabel,
37
- accountNumber: y.accountNumberLabel,
38
- fieldMarkers: y.fieldMarkers
39
- }
40
- }), /* @__PURE__ */ a(e, {
41
- variant: "body2",
42
- color: "muted",
43
- children: y.helperText
44
- })]
45
- });
46
- }
47
- //#endregion
48
- export { s as BankAccountFormSheet, s as default };
1
+ import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "./index2.js";
3
+ import "./index6.js";
4
+ import "react/jsx-runtime";
@@ -1,6 +1,28 @@
1
- import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index2.js";
3
- import "./index4.js";
4
- import "./index9.js";
5
- import "react";
6
- import "react/jsx-runtime";
1
+ import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { CONFIRM_DELETE_DIALOG_LABELS_EN as s } from "./index2.js";
3
+ import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
+ //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
5
+ function u({ open: u, onOpenChange: d, title: f, message: p, isDeleting: m, onConfirm: h, onCancel: g, labels: _ }) {
6
+ let v = {
7
+ ...s,
8
+ ..._
9
+ };
10
+ return /* @__PURE__ */ c(e, {
11
+ open: u,
12
+ onOpenChange: d,
13
+ children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: f }), /* @__PURE__ */ c(n, { children: p })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
14
+ variant: "ghost",
15
+ onClick: g,
16
+ disabled: m,
17
+ children: v.cancelButton
18
+ }), /* @__PURE__ */ c(o, {
19
+ variant: "destructive",
20
+ onClick: h,
21
+ disabled: m,
22
+ loading: m,
23
+ children: v.confirmButton
24
+ })] })] })
25
+ });
26
+ }
27
+ //#endregion
28
+ export { u as ConfirmDeleteDialog, u as default };
@@ -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.7.34", n = "1d3bf8810b6c516ffe8aff8d8b4d84ee6d80adca", r = Object.freeze({
2
+ var e = "@tesouro/embedded-components-react", t = "0.7.36", n = "33e8f601ef34560d21f1bf6c3b66adea54239146", r = Object.freeze({
3
3
  library_name: e,
4
4
  library_version: t,
5
5
  library_sha: n
@@ -20,8 +20,8 @@ import { insightsScenarios as m } from "../../../../insights-widget/feature/dist
20
20
  import "../../../../insights-widget/feature/dist/scenarios.js";
21
21
  import { linkedAccountsScenarios as h } from "../../../../linked-accounts-widget/feature/dist/mocks/linkedAccounts.js";
22
22
  import "../../../../linked-accounts-widget/feature/dist/scenarios.js";
23
- import { marketingScenarios as g } from "../../../../marketing-widget/feature/dist/mocks/marketing.js";
24
- import "../../../../marketing-widget/feature/dist/scenarios.js";
23
+ import { offerScenarios as g } from "../../../../offer-widget/feature/dist/mocks/offer.js";
24
+ import "../../../../offer-widget/feature/dist/scenarios.js";
25
25
  import { settingsScenarios as _ } from "../../../../settings-widget/feature/dist/mocks/settings.js";
26
26
  import "../../../../settings-widget/feature/dist/scenarios.js";
27
27
  import { transfersScenarios as v } from "../../../../transfers-widget/feature/dist/mocks/transfers.js";
@@ -541,7 +541,7 @@ declare const receivablesScenarios: Scenario[];
541
541
 
542
542
  declare const linkedAccountsScenarios: Scenario[];
543
543
 
544
- declare const marketingScenarios: Scenario[];
544
+ declare const offerScenarios: Scenario[];
545
545
 
546
546
  declare const productsScenarios: Scenario[];
547
547
 
@@ -560,5 +560,5 @@ interface WidgetSuiteDemoProps {
560
560
  }
561
561
  declare const widgetSuiteScenarios: Scenario<WidgetSuiteDemoProps>[];
562
562
 
563
- export { CARDS_PAGING, CARD_DETAILS_CARD_ID, CROSS_CUTTING_KEYS, EMBEDDED_PAGING, FINOPS, FINOPS_PAGING, IDENTITY, INIT, LOADING_DELAY_MS, PROXY, SCENARIO_LABELS, acceptDisclosuresScenarios, answer, answerFrom, balancesScenarios, bankAccountOnboardingScenarios, bankAccountsScenarios, billPayScenarios, bodyOf, cardDetailsScenarios, composeScenarios, counterpartsScenarios, creditCardsScenarios, crossCuttingScenarios, counterpartsScenarios as customersScenarios, debitCardsScenarios, defaultScenario, endpoint, expenseManagementScenarios, finopsPage, initRoute, insightsScenarios, invoicingScenarios, json, linkedAccountsScenarios, marketingScenarios, matchPath, noContent, page, paged, problem, productsScenarios, readRoute, receivablesScenarios, routesOf, scenarioFetch, settingsScenarios, templatePath, transfersScenarios, wait, widgetSuiteScenarios };
563
+ export { CARDS_PAGING, CARD_DETAILS_CARD_ID, CROSS_CUTTING_KEYS, EMBEDDED_PAGING, FINOPS, FINOPS_PAGING, IDENTITY, INIT, LOADING_DELAY_MS, PROXY, SCENARIO_LABELS, acceptDisclosuresScenarios, answer, answerFrom, balancesScenarios, bankAccountOnboardingScenarios, bankAccountsScenarios, billPayScenarios, bodyOf, cardDetailsScenarios, composeScenarios, counterpartsScenarios, creditCardsScenarios, crossCuttingScenarios, counterpartsScenarios as customersScenarios, debitCardsScenarios, defaultScenario, endpoint, expenseManagementScenarios, finopsPage, initRoute, insightsScenarios, invoicingScenarios, json, linkedAccountsScenarios, matchPath, noContent, offerScenarios, page, paged, problem, productsScenarios, readRoute, receivablesScenarios, routesOf, scenarioFetch, settingsScenarios, templatePath, transfersScenarios, wait, widgetSuiteScenarios };
564
564
  export type { ConfigClient, CrossCuttingKey, CrossCuttingSpec, PagingStyle, PrimaryRead, RequestSummary, Route, RouteRequest, Scenario, ScenarioCopy, SettingsDemoProps, UploadedFile, WidgetInit, WidgetSuiteDemoProps };
@@ -29,12 +29,12 @@ import { insightsScenarios as W } from "../libs/tesouro-embedded-components-reac
29
29
  import "../libs/tesouro-embedded-components-react/insights-widget/feature/dist/scenarios.js";
30
30
  import { linkedAccountsScenarios as G } from "../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/mocks/linkedAccounts.js";
31
31
  import "../libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/scenarios.js";
32
- import { marketingScenarios as K } from "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/mocks/marketing.js";
33
- import "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/scenarios.js";
32
+ import { offerScenarios as K } from "../libs/tesouro-embedded-components-react/offer-widget/feature/dist/mocks/offer.js";
33
+ import "../libs/tesouro-embedded-components-react/offer-widget/feature/dist/scenarios.js";
34
34
  import { settingsScenarios as q } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/mocks/settings.js";
35
35
  import "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/scenarios.js";
36
36
  import { transfersScenarios as J } from "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/mocks/transfers.js";
37
37
  import "../libs/tesouro-embedded-components-react/transfers-widget/feature/dist/scenarios.js";
38
38
  import { widgetSuiteScenarios as Y } from "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/mocks/widgetSuite.js";
39
39
  import "../libs/tesouro-embedded-components-react/widget-suite/feature/dist/scenarios.js";
40
- export { n as CARDS_PAGING, B as CARD_DETAILS_CARD_ID, e as CROSS_CUTTING_KEYS, r as EMBEDDED_PAGING, i as FINOPS, a as FINOPS_PAGING, o as IDENTITY, s as INIT, c as LOADING_DELAY_MS, l as PROXY, t as SCENARIO_LABELS, R as acceptDisclosuresScenarios, u as answer, d as answerFrom, z as balancesScenarios, F as bankAccountOnboardingScenarios, L as bankAccountsScenarios, I as billPayScenarios, f as bodyOf, V as cardDetailsScenarios, p as composeScenarios, j as counterpartsScenarios, H as creditCardsScenarios, m as crossCuttingScenarios, j as customersScenarios, U as debitCardsScenarios, h as defaultScenario, g as endpoint, P as expenseManagementScenarios, _ as finopsPage, v as initRoute, W as insightsScenarios, A as invoicingScenarios, y as json, G as linkedAccountsScenarios, K as marketingScenarios, b as matchPath, x as noContent, S as page, C as paged, w as problem, M as productsScenarios, T as readRoute, N as receivablesScenarios, E as routesOf, D as scenarioFetch, q as settingsScenarios, O as templatePath, J as transfersScenarios, k as wait, Y as widgetSuiteScenarios };
40
+ export { n as CARDS_PAGING, B as CARD_DETAILS_CARD_ID, e as CROSS_CUTTING_KEYS, r as EMBEDDED_PAGING, i as FINOPS, a as FINOPS_PAGING, o as IDENTITY, s as INIT, c as LOADING_DELAY_MS, l as PROXY, t as SCENARIO_LABELS, R as acceptDisclosuresScenarios, u as answer, d as answerFrom, z as balancesScenarios, F as bankAccountOnboardingScenarios, L as bankAccountsScenarios, I as billPayScenarios, f as bodyOf, V as cardDetailsScenarios, p as composeScenarios, j as counterpartsScenarios, H as creditCardsScenarios, m as crossCuttingScenarios, j as customersScenarios, U as debitCardsScenarios, h as defaultScenario, g as endpoint, P as expenseManagementScenarios, _ as finopsPage, v as initRoute, W as insightsScenarios, A as invoicingScenarios, y as json, G as linkedAccountsScenarios, b as matchPath, x as noContent, K as offerScenarios, S as page, C as paged, w as problem, M as productsScenarios, T as readRoute, N as receivablesScenarios, E as routesOf, D as scenarioFetch, q as settingsScenarios, O as templatePath, J as transfersScenarios, k as wait, Y as widgetSuiteScenarios };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.7.34",
3
+ "version": "0.7.36",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -1,6 +0,0 @@
1
- import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/lib/MarketingWidget/labels.js";
2
- import { MARKETING_WIDGET_LABELS_EN as t } from "../libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js";
3
- import { MarketingBenefitIcon as n } from "../libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index3.js";
4
- import { MarketingWidget as r } from "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/lib/MarketingWidget/MarketingWidget.js";
5
- import "../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/index.js";
6
- export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
@@ -1,5 +0,0 @@
1
- import { MARKETING_WIDGET_STATUS_LABELS_EN as e } from "./lib/MarketingWidget/labels.js";
2
- import { MARKETING_WIDGET_LABELS_EN as t } from "../../ui/dist/index2.js";
3
- import { MarketingBenefitIcon as n } from "../../ui/dist/index3.js";
4
- import { MarketingWidget as r } from "./lib/MarketingWidget/MarketingWidget.js";
5
- export { t as MARKETING_WIDGET_LABELS_EN, e as MARKETING_WIDGET_STATUS_LABELS_EN, n as MarketingBenefitIcon, r as MarketingWidget };
@@ -1,8 +0,0 @@
1
- //#region ../../libs/tesouro-embedded-components-react/marketing-widget/feature/dist/lib/analytics/events.js
2
- var e = {
3
- Mounted: "marketing.mounted",
4
- OpenModal: "marketing.open_modal",
5
- PrimaryCta: "marketing.primary_cta"
6
- }, t = "marketing";
7
- //#endregion
8
- export { e as MarketingWidgetAnalyticsEvent, t as WIDGET_NAME };
@@ -1,2 +0,0 @@
1
- import { marketingScenarios as e } from "./mocks/marketing.js";
2
- export { e as marketingScenarios };
@@ -1,5 +0,0 @@
1
- import { MARKETING_WIDGET_LABELS_EN as e } from "./index2.js";
2
- import { MarketingBenefitIcon as t, MarketingWidgetStatusTone as n } from "./index3.js";
3
- import "./index7.js";
4
- import { MarketingWidget as r } from "./index9.js";
5
- export { e as MARKETING_WIDGET_LABELS_EN, t as MarketingBenefitIcon, r as MarketingWidget, n as MarketingWidgetStatusTone };
@@ -1,10 +0,0 @@
1
- //#region ../../libs/tesouro-embedded-components-react/marketing-widget/ui/dist/index2.js
2
- var e = {
3
- applyNow: "Apply now",
4
- learnMore: "Learn more",
5
- primaryCta: "Start application",
6
- primaryCtaSubtext: "takes about 5 minutes",
7
- dismissModalAriaLabel: "Close marketing modal"
8
- };
9
- //#endregion
10
- export { e as MARKETING_WIDGET_LABELS_EN };
@@ -1,7 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import "../../../data-access/dist/index.js";
6
- import "./index2.js";
7
- import "@tanstack/react-query";
@@ -1,92 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import { patchCounterpartsIdAddressesId as e, postCounterpartsIdAddresses as t } from "../../../data-access/dist/lib/rest/sdk.gen.js";
6
- import { getCounterpartsIdAddressesOptions as n } from "../../../data-access/dist/lib/rest/@tanstack/react-query.gen.js";
7
- import { withAuthEpoch as r } from "../../../data-access/dist/lib/withAuthEpoch.js";
8
- import { invalidateAllClients as i } from "../../../data-access/dist/lib/clientRegistry.js";
9
- import { useEmbedApi as a } from "../../../data-access/dist/lib/EmbedApiContext.js";
10
- import { organizationHeaders as o } from "../../../data-access/dist/lib/organizationHeaders.js";
11
- import "../../../data-access/dist/index.js";
12
- import { counterpartAddressesInvalidationKey as s, counterpartInvalidationKey as c } from "./index2.js";
13
- import { useMutation as l, useQueries as u, useQuery as d } from "@tanstack/react-query";
14
- //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/data-access/dist/index7.js
15
- function f(e) {
16
- let { client: t, organizationId: i, widgetToken: s, authEpoch: c, organizationStatus: l } = a(), u = !!(i && s && e), f = n({
17
- client: t,
18
- headers: o(i),
19
- path: { counterpart_id: e ?? "" }
20
- });
21
- return d({
22
- ...r(f, {
23
- authEpoch: c,
24
- organizationStatus: l
25
- }),
26
- enabled: u
27
- });
28
- }
29
- function p({ counterpartIds: e, enabled: t }) {
30
- let { client: i, organizationId: s, widgetToken: c, authEpoch: l, organizationStatus: d } = a(), f = !!(s && c) && e.length > 0 && (t === !0 || t === void 0);
31
- return u({ queries: e.map((e) => ({
32
- ...r(n({
33
- client: i,
34
- headers: o(s),
35
- path: { counterpart_id: e }
36
- }), {
37
- authEpoch: l,
38
- organizationStatus: d
39
- }),
40
- enabled: f && !!e
41
- })) });
42
- }
43
- function m() {
44
- let { client: e, organizationId: n } = a();
45
- return l({
46
- mutationFn: async ({ path: r, body: i }) => {
47
- let { data: a } = await t({
48
- client: e,
49
- headers: o(n),
50
- path: r,
51
- body: i,
52
- throwOnError: !0
53
- });
54
- return a;
55
- },
56
- onSuccess: async (t, r) => {
57
- await Promise.all([i(s({
58
- client: e,
59
- organizationId: n,
60
- counterpartId: r.path.counterpart_id
61
- })), i(c({
62
- client: e,
63
- organizationId: n,
64
- counterpartId: r.path.counterpart_id
65
- }))]);
66
- }
67
- });
68
- }
69
- function h() {
70
- let { client: t, organizationId: n } = a();
71
- return l({
72
- mutationFn: async ({ path: r, body: i }) => {
73
- let { data: a } = await e({
74
- client: t,
75
- headers: o(n),
76
- path: r,
77
- body: i,
78
- throwOnError: !0
79
- });
80
- return a;
81
- },
82
- onSuccess: async (e, r) => {
83
- await i(s({
84
- client: t,
85
- organizationId: n,
86
- counterpartId: r.path.counterpart_id
87
- }));
88
- }
89
- });
90
- }
91
- //#endregion
92
- export { p as useCounterpartAddressesForRowsQuery, f as useCounterpartAddressesQuery, m as useCreateCounterpartAddressMutation, h as useUpdateCounterpartAddressMutation };
@@ -1,7 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import "../../../ui/dist/index.js";
6
- import "./useCounterpartSelector.js";
7
- import "react/jsx-runtime";
@@ -1,8 +0,0 @@
1
- "use client";
2
- "use client";
3
- "use client";
4
- "use client";
5
- import "../../../ui/dist/index.js";
6
- import "./helpers.js";
7
- import "../../../data-access/dist/index.js";
8
- import "react";
@@ -1,4 +0,0 @@
1
- import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index2.js";
3
- import "./index6.js";
4
- import "react/jsx-runtime";
@@ -1,28 +0,0 @@
1
- import { AlertDialog as e, AlertDialogContent as t, AlertDialogDescription as n, AlertDialogFooter as r, AlertDialogHeader as i, AlertDialogTitle as a, Button as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { CONFIRM_DELETE_DIALOG_LABELS_EN as s } from "./index2.js";
3
- import { jsx as c, jsxs as l } from "react/jsx-runtime";
4
- //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index15.js
5
- function u({ open: u, onOpenChange: d, title: f, message: p, isDeleting: m, onConfirm: h, onCancel: g, labels: _ }) {
6
- let v = {
7
- ...s,
8
- ..._
9
- };
10
- return /* @__PURE__ */ c(e, {
11
- open: u,
12
- onOpenChange: d,
13
- children: /* @__PURE__ */ l(t, { children: [/* @__PURE__ */ l(i, { children: [/* @__PURE__ */ c(a, { children: f }), /* @__PURE__ */ c(n, { children: p })] }), /* @__PURE__ */ l(r, { children: [/* @__PURE__ */ c(o, {
14
- variant: "ghost",
15
- onClick: g,
16
- disabled: m,
17
- children: v.cancelButton
18
- }), /* @__PURE__ */ c(o, {
19
- variant: "destructive",
20
- onClick: h,
21
- disabled: m,
22
- loading: m,
23
- children: v.confirmButton
24
- })] })] })
25
- });
26
- }
27
- //#endregion
28
- export { u as ConfirmDeleteDialog, u as default };
@@ -1,4 +0,0 @@
1
- import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import "./index2.js";
3
- import "react/jsx-runtime";
4
- import "lucide-react";