@tesouro/embedded-components-react 0.5.95 → 0.5.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/experimental/index.d.ts +3 -274
- package/dist/experimental/index.js +2 -4
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index2.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index3.js +18 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index4.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index5.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index6.js +29 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/data-access/dist/index7.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/create-card/feature/dist/index2.js +5 -0
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index3.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index4.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index5.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index6.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index7.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index8.js +15 -15
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardArt.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/CardControlRow.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/CardControls.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/MerchantCategoriesControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/CreateCardWidget.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/ManualAddressFields.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/PreparingView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/SetupView.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/SuccessView.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/labels.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/lib/CreateCardWidget/types.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index2.js +3 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/cards-widget/shared/util/dist/lib/widgetName.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +86 -77
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/package.json +1 -1
- package/dist/experimental/InvoiceSettings.d.ts +0 -902
- package/dist/experimental/InvoiceSettings.js +0 -3
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index2.js +0 -13
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index3.js +0 -18
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index4.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index5.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index6.js +0 -29
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/data-access/dist/index7.js +0 -22
- package/dist/libs/tesouro-embedded-components-react/create-card-widget/feature/dist/index2.js +0 -4
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/data-access/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/feature/dist/index.js +0 -0
- /package/dist/libs/tesouro-embedded-components-react/{create-card-widget → cards-widget/create-card}/ui/dist/index.js +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { cn as e } from "
|
|
1
|
+
import { cn as e } from "../../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { resolveCardControlsLabels as t } from "./labels.js";
|
|
3
3
|
import { MerchantCategoriesControl as n } from "./MerchantCategoriesControl.js";
|
|
4
4
|
import { PerTransactionMaximumControl as r } from "./PerTransactionMaximumControl.js";
|
|
5
5
|
import { SpendLimitControl as i } from "./SpendLimitControl.js";
|
|
6
6
|
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
7
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/CardControls.js
|
|
8
8
|
var s = () => void 0;
|
|
9
9
|
function c({ labels: c, className: l, isSpendLimitEnabled: u = !1, onSpendLimitEnabledChange: d = s, spendLimitAmount: f = "", onSpendLimitAmountChange: p = s, spendLimitPeriodOptions: m = [], selectedSpendLimitPeriod: h = null, onSpendLimitPeriodSelect: g = s, spendLimitPeriodNotices: _, isMerchantCategoriesEnabled: v = !1, onMerchantCategoriesEnabledChange: y = s, merchantCategoryOptions: b = [], selectedMerchantCategories: x = [], onMerchantCategoryToggle: S = s, isMerchantCategoriesToggleDisabled: C = !1, isPerTransactionMaximumEnabled: w = !1, onPerTransactionMaximumEnabledChange: T = s, perTransactionMaximumAmount: E = "", onPerTransactionMaximumAmountChange: D = s }) {
|
|
10
10
|
let O = t(c);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { cn as e } from "
|
|
1
|
+
import { cn as e } from "../../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { CardControlRow as t } from "./CardControlRow.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { CheckIcon as i } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/MerchantCategoriesControl.js
|
|
6
6
|
function a({ labels: a, isEnabled: o, onEnabledChange: s, categoryOptions: c, selectedCategories: l, onCategoryToggle: u, isToggleDisabled: d = !1 }) {
|
|
7
7
|
return /* @__PURE__ */ n(t, {
|
|
8
8
|
title: a.title,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "
|
|
1
|
+
import { InputGroup as e, InputGroupAddon as t, InputGroupInput as n } from "../../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as r } from "./labels.js";
|
|
3
3
|
import { CardControlRow as i } from "./CardControlRow.js";
|
|
4
4
|
import { limitDecimalPlaces as a } from "./limitDecimalPlaces.js";
|
|
5
5
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
6
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/PerTransactionMaximumControl.js
|
|
7
7
|
function c({ labels: c, currencySymbol: l, isEnabled: u, onEnabledChange: d, amount: f, onAmountChange: p }) {
|
|
8
8
|
return /* @__PURE__ */ o(i, {
|
|
9
9
|
title: c.title,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { Alert as e, AlertDescription as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Tabs as a, TabsContent as o, TabsList as s, TabsTrigger as c } from "
|
|
1
|
+
import { Alert as e, AlertDescription as t, InputGroup as n, InputGroupAddon as r, InputGroupInput as i, Tabs as a, TabsContent as o, TabsList as s, TabsTrigger as c } from "../../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { formatAmountAriaLabel as l } from "./labels.js";
|
|
3
3
|
import { CardControlRow as u } from "./CardControlRow.js";
|
|
4
4
|
import { limitDecimalPlaces as d } from "./limitDecimalPlaces.js";
|
|
5
5
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
6
6
|
import { InfoIcon as m, TriangleAlertIcon as h } from "lucide-react";
|
|
7
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
7
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/SpendLimitControl.js
|
|
8
8
|
function g({ notice: n }) {
|
|
9
9
|
if (!n) return null;
|
|
10
10
|
let r = n.variant === "warning";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/labels.js
|
|
2
2
|
var e = {
|
|
3
3
|
currencySymbol: "$",
|
|
4
4
|
spendLimit: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CardControls/limitDecimalPlaces.js
|
|
2
2
|
function e(e, t = 2) {
|
|
3
3
|
let n = e.indexOf(".");
|
|
4
4
|
return n === -1 ? e : e.slice(0, n + 1 + t);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import { Button as e, cn as t } from "
|
|
5
|
+
import { Button as e, cn as t } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
6
|
import { resolveCreateCardWidgetLabels as n } from "./labels.js";
|
|
7
7
|
import { CreateCardView as r } from "./types.js";
|
|
8
8
|
import { PreparingView as i } from "./PreparingView.js";
|
|
@@ -11,7 +11,7 @@ import { SetupView as a } from "./SetupView.js";
|
|
|
11
11
|
import { SuccessView as o } from "./SuccessView.js";
|
|
12
12
|
import { Fragment as s, jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
13
13
|
import { ChevronRightIcon as u, XIcon as d } from "lucide-react";
|
|
14
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
14
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/CreateCardWidget.js
|
|
15
15
|
var f = {
|
|
16
16
|
street: "",
|
|
17
17
|
city: "",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Input as e, Label as t, Select as n, SelectContent as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "
|
|
1
|
+
import { Input as e, Label as t, Select as n, SelectContent as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { useId as s } from "react";
|
|
3
3
|
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/ManualAddressFields.js
|
|
5
5
|
function u({ values: u, stateOptions: d, onChange: f, labels: p }) {
|
|
6
6
|
let m = s(), h = `${m}-street`, g = `${m}-city`, _ = `${m}-state`, v = `${m}-zip`;
|
|
7
7
|
return /* @__PURE__ */ l("div", {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { Spinner as e } from "
|
|
1
|
+
import { Spinner as e } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { CardArt as t } from "./CardArt.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
4
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/PreparingView.js
|
|
5
5
|
function i({ cardArtSrc: i, labels: a }) {
|
|
6
6
|
return /* @__PURE__ */ r("div", {
|
|
7
7
|
className: "ttw:flex ttw:min-h-full ttw:flex-1 ttw:flex-col ttw:items-center ttw:justify-center ttw:gap-6 ttw:bg-gradient-to-b ttw:from-background ttw:to-primary/10 ttw:px-6 ttw:py-12",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { Label as e, RadioGroup as t, RadioGroupItem as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Separator as c } from "
|
|
2
|
-
import { ErrorState as l } from "
|
|
3
|
-
import "
|
|
1
|
+
import { Label as e, RadioGroup as t, RadioGroupItem as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s, Separator as c } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { ErrorState as l } from "../../../../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
|
|
3
|
+
import "../../../../../../shared/ui/dist/index.js";
|
|
4
4
|
import { MailingOptionValue as u } from "./types.js";
|
|
5
5
|
import { CardArt as d } from "./CardArt.js";
|
|
6
6
|
import { CardControls as f } from "./CardControls/CardControls.js";
|
|
7
7
|
import { ManualAddressFields as p } from "./ManualAddressFields.js";
|
|
8
8
|
import { useId as m } from "react";
|
|
9
9
|
import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
10
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
10
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SetupView.js
|
|
11
11
|
function v({ cardArtSrc: v, labels: y, cardholderOptions: b, selectedCardholder: x, onCardholderSelect: S, isCardholderError: C = !1, onCardholderRetry: w, cardFormatOptions: T, selectedCardFormat: E, onCardFormatSelect: D, isFundingAccountVisible: O, fundingAccountOptions: k, selectedFundingAccount: A, onFundingAccountSelect: j, isFundingAccountError: M = !1, onFundingAccountRetry: N, isMailingSectionVisible: P, selectedMailingOption: F, onMailingOptionSelect: I, businessAddress: L, isBusinessAddressVisible: R, isManualAddressVisible: z, manualAddress: B, onManualAddressChange: V, stateOptions: H, isCardControlsSectionVisible: U, cardControls: W }) {
|
|
12
12
|
let G = m(), K = `${G}-cardholder`, q = `${G}-card-format`, J = `${G}-funding-account`, Y = `${G}-mailing-business`, X = `${G}-mailing-custom`;
|
|
13
13
|
return /* @__PURE__ */ _("div", {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { Button as e } from "
|
|
1
|
+
import { Button as e } from "../../../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
2
|
import { CardArt as t } from "./CardArt.js";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
import { CheckIcon as i, ChevronRightIcon as a } from "lucide-react";
|
|
5
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
5
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/SuccessView.js
|
|
6
6
|
function o({ cardArtSrc: o, labels: s, onCreateAnotherClick: c, onViewCardClick: l }) {
|
|
7
7
|
return /* @__PURE__ */ r("div", {
|
|
8
8
|
className: "ttw:flex ttw:min-h-0 ttw:flex-1 ttw:flex-col",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CARD_CONTROLS_LABELS_EN as e, resolveCardControlsLabels as t } from "./CardControls/labels.js";
|
|
2
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
2
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/labels.js
|
|
3
3
|
var n = {
|
|
4
4
|
header: {
|
|
5
5
|
title: "Create a new card",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//#region ../../libs/tesouro-embedded-components-react/create-card
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/cards-widget/create-card/ui/dist/lib/CreateCardWidget/types.js
|
|
2
2
|
var e = {
|
|
3
3
|
Setup: "setup",
|
|
4
4
|
Preparing: "preparing",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import { CARDS_WIDGET_NAME as e } from "../../shared/util/dist/lib/widgetName.js";
|
|
1
2
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index2.js
|
|
2
|
-
var
|
|
3
|
+
var t = { Mounted: `${e}.mounted` }, n = e;
|
|
3
4
|
//#endregion
|
|
4
|
-
export {
|
|
5
|
+
export { t as CardsWidgetAnalyticsEvent, n as WIDGET_NAME };
|
|
@@ -13,8 +13,8 @@ import "../../ui/dist/index.js";
|
|
|
13
13
|
import { useCardsWidget as s } from "./index8.js";
|
|
14
14
|
import { CardDetailsWidget as c } from "../../../card-details-widget/feature/dist/index13.js";
|
|
15
15
|
import "../../../card-details-widget/feature/dist/index.js";
|
|
16
|
-
import { CreateCardWidget as l } from "
|
|
17
|
-
import "
|
|
16
|
+
import { CreateCardWidget as l } from "../../create-card/feature/dist/index8.js";
|
|
17
|
+
import "../../create-card/feature/dist/index.js";
|
|
18
18
|
import { useCallback as u, useMemo as d, useState as f } from "react";
|
|
19
19
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
20
20
|
//#region ../../libs/tesouro-embedded-components-react/cards-widget/feature/dist/index9.js
|
|
@@ -3,6 +3,4 @@ import { SettingsSection as e } from "./index4.js";
|
|
|
3
3
|
import { HELP_FAQ_EN as t } from "../../help/ui/contract/dist/index3.js";
|
|
4
4
|
import { SettingsWidget as n } from "./index6.js";
|
|
5
5
|
import "./index7.js";
|
|
6
|
-
|
|
7
|
-
import "../../invoice-settings/feature/dist/index.js";
|
|
8
|
-
export { t as HELP_FAQ_EN, r as InvoiceSettings, e as SettingsSection, n as SettingsWidget };
|
|
6
|
+
export { t as HELP_FAQ_EN, e as SettingsSection, n as SettingsWidget };
|
|
@@ -10,14 +10,14 @@ import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetPro
|
|
|
10
10
|
import "../../../shared/feature/dist/index.js";
|
|
11
11
|
import { ApprovalPoliciesSettings as i } from "../../../shared/approval-policy/feature/dist/lib/ApprovalPoliciesSettings.js";
|
|
12
12
|
import "../../../shared/approval-policy/feature/dist/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import "../../../monite-sdk/dist/index.js";
|
|
15
|
-
import { MoniteRegionProvider as o } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
|
|
13
|
+
import { MoniteRegionProvider as a } from "../../../shared/monite-wrapper/feature/dist/lib/MoniteRegionProvider.js";
|
|
16
14
|
import "../../../shared/monite-wrapper/feature/dist/index.js";
|
|
17
|
-
import { DEFAULT_FEATURE_LABELS as
|
|
18
|
-
import { SettingsSection as
|
|
19
|
-
import { SettingsWidgetAnalyticsEvent as
|
|
20
|
-
import { ExpenseSettingsTabs as
|
|
15
|
+
import { DEFAULT_FEATURE_LABELS as o } from "./index3.js";
|
|
16
|
+
import { SettingsSection as s, mergeAdditionalSections as c } from "./index4.js";
|
|
17
|
+
import { SettingsWidgetAnalyticsEvent as l, WIDGET_NAME as u } from "./index2.js";
|
|
18
|
+
import { ExpenseSettingsTabs as d } from "./index5.js";
|
|
19
|
+
import { InvoiceSettings as f } from "../../invoice-settings/feature/dist/index10.js";
|
|
20
|
+
import "../../invoice-settings/feature/dist/index.js";
|
|
21
21
|
import { TagsWidget as p } from "../../tags/feature/dist/index11.js";
|
|
22
22
|
import "../../tags/feature/dist/index.js";
|
|
23
23
|
import { BankDisclosuresWidget as m } from "../../../shared/bank-disclosures/feature/dist/lib/BankDisclosuresWidget/BankDisclosuresWidget.js";
|
|
@@ -32,121 +32,130 @@ import { HelpWidget as v } from "../../help/feature/dist/index3.js";
|
|
|
32
32
|
import "../../help/feature/dist/index.js";
|
|
33
33
|
import { ProfileWidget as y } from "../../profile/feature/dist/index4.js";
|
|
34
34
|
import "../../profile/feature/dist/index.js";
|
|
35
|
-
import {
|
|
36
|
-
import { jsx as
|
|
37
|
-
import { useControllableState as
|
|
35
|
+
import { useCallback as b, useEffect as x, useRef as S } from "react";
|
|
36
|
+
import { jsx as C } from "react/jsx-runtime";
|
|
37
|
+
import { useControllableState as w } from "@radix-ui/react-use-controllable-state";
|
|
38
38
|
//#region ../../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js
|
|
39
|
-
var
|
|
40
|
-
[
|
|
41
|
-
[
|
|
42
|
-
[
|
|
43
|
-
[
|
|
39
|
+
var T = {
|
|
40
|
+
[s.Profile]: [],
|
|
41
|
+
[s.Team]: [t.UserReadOrg],
|
|
42
|
+
[s.Invoice]: [t.OrganizationSettingsWriteOrg],
|
|
43
|
+
[s.BillPay]: [
|
|
44
44
|
t.ApprovalPolicyWriteOrg,
|
|
45
45
|
t.PayableWriteOrg,
|
|
46
46
|
t.RoleReadOrg,
|
|
47
47
|
t.UserReadOrg
|
|
48
48
|
],
|
|
49
|
-
[
|
|
50
|
-
[
|
|
51
|
-
[
|
|
52
|
-
[
|
|
53
|
-
[
|
|
49
|
+
[s.Accounting]: [t.AccountingConfigReadOrg],
|
|
50
|
+
[s.Tags]: [t.AccountingConfigReadOrg],
|
|
51
|
+
[s.Expense]: [t.ApprovalPolicyWriteOrg, t.ExpenseWriteOrg],
|
|
52
|
+
[s.Legal]: [],
|
|
53
|
+
[s.Help]: []
|
|
54
54
|
};
|
|
55
|
-
function
|
|
56
|
-
let
|
|
57
|
-
...
|
|
58
|
-
...
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
}, [
|
|
63
|
-
let { initResponse:
|
|
55
|
+
function E({ labels: t, featureLabels: a, acceptInviteRedirectUri: u, helpContactUrl: E, helpFaq: D, profileContactUrl: O, selectedSection: k, defaultSelectedSection: A, onSelectedSectionChange: j, additionalSections: M, profileContent: N, teamContent: P, billPayContent: F, helpContent: I, expenseContent: L, accountingContent: R, tagsContent: z, invoiceContent: B, legalContent: V }) {
|
|
56
|
+
let H = {
|
|
57
|
+
...o,
|
|
58
|
+
...a
|
|
59
|
+
}, U = S(null), W = n();
|
|
60
|
+
x(() => {
|
|
61
|
+
W(l.Mounted);
|
|
62
|
+
}, [W]);
|
|
63
|
+
let { initResponse: G } = r(), K = G?.scopes, q = [
|
|
64
64
|
{
|
|
65
|
-
id:
|
|
66
|
-
label:
|
|
67
|
-
content:
|
|
65
|
+
id: s.Profile,
|
|
66
|
+
label: H.profileSection,
|
|
67
|
+
content: N ?? /* @__PURE__ */ C(y, { contactUrl: O })
|
|
68
68
|
},
|
|
69
69
|
{
|
|
70
|
-
id:
|
|
71
|
-
label:
|
|
72
|
-
content:
|
|
70
|
+
id: s.Team,
|
|
71
|
+
label: H.teamSection,
|
|
72
|
+
content: P ?? /* @__PURE__ */ C(h, { acceptInviteRedirectUri: u })
|
|
73
73
|
},
|
|
74
74
|
{
|
|
75
|
-
id:
|
|
76
|
-
label:
|
|
77
|
-
content:
|
|
75
|
+
id: s.Invoice,
|
|
76
|
+
label: H.invoiceSection,
|
|
77
|
+
content: B ?? /* @__PURE__ */ C(f, { ref: U })
|
|
78
78
|
},
|
|
79
79
|
{
|
|
80
|
-
id:
|
|
81
|
-
label:
|
|
82
|
-
content:
|
|
83
|
-
approvalsLabel:
|
|
84
|
-
requirementsLabel:
|
|
80
|
+
id: s.Expense,
|
|
81
|
+
label: H.expenseSection,
|
|
82
|
+
content: L ?? /* @__PURE__ */ C(d, {
|
|
83
|
+
approvalsLabel: H.expenseApprovalsTab,
|
|
84
|
+
requirementsLabel: H.expenseRequirementsTab
|
|
85
85
|
})
|
|
86
86
|
},
|
|
87
87
|
{
|
|
88
|
-
id:
|
|
89
|
-
label:
|
|
90
|
-
content:
|
|
88
|
+
id: s.BillPay,
|
|
89
|
+
label: H.billPaySection,
|
|
90
|
+
content: F ?? /* @__PURE__ */ C(i, {
|
|
91
91
|
showHeaderTitle: !1,
|
|
92
|
-
componentLabels: { header: { Description:
|
|
92
|
+
componentLabels: { header: { Description: H.billPayDescription } }
|
|
93
93
|
})
|
|
94
94
|
},
|
|
95
95
|
{
|
|
96
|
-
id:
|
|
97
|
-
label:
|
|
98
|
-
content:
|
|
96
|
+
id: s.Accounting,
|
|
97
|
+
label: H.accountingSection,
|
|
98
|
+
content: R ?? /* @__PURE__ */ C(_, {})
|
|
99
99
|
},
|
|
100
100
|
{
|
|
101
|
-
id:
|
|
102
|
-
label:
|
|
103
|
-
content:
|
|
101
|
+
id: s.Tags,
|
|
102
|
+
label: H.tagsSection,
|
|
103
|
+
content: z ?? /* @__PURE__ */ C(p, {})
|
|
104
104
|
},
|
|
105
105
|
{
|
|
106
|
-
id:
|
|
107
|
-
label:
|
|
108
|
-
content:
|
|
106
|
+
id: s.Legal,
|
|
107
|
+
label: H.legalSection,
|
|
108
|
+
content: V ?? /* @__PURE__ */ C(m, {})
|
|
109
109
|
},
|
|
110
110
|
{
|
|
111
|
-
id:
|
|
112
|
-
label:
|
|
113
|
-
content:
|
|
114
|
-
contactUrl:
|
|
115
|
-
faq:
|
|
111
|
+
id: s.Help,
|
|
112
|
+
label: H.helpSection,
|
|
113
|
+
content: I ?? /* @__PURE__ */ C(v, {
|
|
114
|
+
contactUrl: E,
|
|
115
|
+
faq: D
|
|
116
116
|
})
|
|
117
117
|
}
|
|
118
|
-
],
|
|
119
|
-
prop:
|
|
120
|
-
defaultProp:
|
|
121
|
-
onChange:
|
|
118
|
+
], J = c(q.filter((t) => T[t.id].every((t) => e(K, [t]))), M ?? []), Y = J[0]?.id ?? "", [X, Z] = w({
|
|
119
|
+
prop: k,
|
|
120
|
+
defaultProp: A ?? Y,
|
|
121
|
+
onChange: j,
|
|
122
122
|
caller: "SettingsWidget"
|
|
123
|
-
}),
|
|
124
|
-
|
|
123
|
+
}), Q = J.some((e) => e.id === X) ? X : Y, $ = b((e) => {
|
|
124
|
+
let t = U.current;
|
|
125
|
+
if (Q !== s.Invoice || !t) {
|
|
126
|
+
Z(e);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
t.confirmLeave().then((t) => {
|
|
130
|
+
t && Z(e);
|
|
131
|
+
});
|
|
132
|
+
}, [Q, Z]);
|
|
133
|
+
return /* @__PURE__ */ C(g, {
|
|
125
134
|
labels: t,
|
|
126
|
-
sections:
|
|
127
|
-
selectedSectionId:
|
|
128
|
-
onSectionChange:
|
|
135
|
+
sections: J,
|
|
136
|
+
selectedSectionId: Q,
|
|
137
|
+
onSectionChange: $
|
|
129
138
|
});
|
|
130
139
|
}
|
|
131
|
-
function
|
|
132
|
-
return /* @__PURE__ */
|
|
133
|
-
widgetName:
|
|
140
|
+
function D({ baseUrl: e, widgetToken: t, organizationId: n, configClient: r, gatewayRouting: i, linkComponent: o, implementation: s, uiFramework: c, errorFallback: l, onError: d, finopsThemeColors: f, analytics: p, disclosuresAcceptance: m, providerLabels: h, ...g }) {
|
|
141
|
+
return /* @__PURE__ */ C(a, {
|
|
142
|
+
widgetName: u,
|
|
134
143
|
baseUrl: e,
|
|
135
144
|
widgetToken: t,
|
|
136
145
|
organizationId: n,
|
|
137
146
|
configClient: r,
|
|
138
147
|
gatewayRouting: i,
|
|
139
|
-
linkComponent:
|
|
148
|
+
linkComponent: o,
|
|
140
149
|
implementation: s,
|
|
141
150
|
uiFramework: c,
|
|
142
151
|
errorFallback: l,
|
|
143
|
-
onError:
|
|
152
|
+
onError: d,
|
|
144
153
|
finopsThemeColors: f,
|
|
145
154
|
analytics: p,
|
|
146
155
|
disclosuresAcceptance: m,
|
|
147
156
|
providerLabels: h,
|
|
148
|
-
children: /* @__PURE__ */
|
|
157
|
+
children: /* @__PURE__ */ C(E, { ...g })
|
|
149
158
|
});
|
|
150
159
|
}
|
|
151
160
|
//#endregion
|
|
152
|
-
export {
|
|
161
|
+
export { D as SettingsWidget, D as default };
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.97", n = "4d71d2b81322751aa1c0b08414771363012b7999", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|