@tesouro/embedded-components-react 0.3.63 → 0.4.1
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 +1 -70
- package/dist/index.d.ts +67 -832
- package/dist/index.js +18 -34
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/lib/SettingsWidget.d.ts +53 -7
- package/dist/lib/SettingsWidget.js +4 -2
- package/dist/lib/WidgetSuite.d.ts +38 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +8 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +8 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +7 -57
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +56 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +18 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +126 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +22 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +40 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +5 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +72 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +47 -91
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +91 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +33 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +167 -75
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +75 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +23 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +199 -203
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +198 -89
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +105 -13
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +12 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +47 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +27 -198
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +198 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +30 -234
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +240 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +18 -341
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +343 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +4 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +31 -83
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +78 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +170 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +2 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +46 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +1 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +6 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +9 -92
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +3 -128
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +125 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +8 -46
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +43 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +20 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +27 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +83 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +47 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +239 -101
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +107 -202
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +209 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +6 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +0 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/feature/dist/index.js +3 -3
- package/dist/libs/tesouro-embedded-components-react/gl-code-table-widget/ui/dist/index.js +5 -5
- package/dist/libs/tesouro-embedded-components-react/help-widget/feature/dist/index.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/help-widget/ui/shadcn/dist/index.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/help-widget/ui/shadcn/dist/index4.js +2 -3
- package/dist/libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js +35 -32
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
- package/dist/lib/ChartOfAccountsWidget.d.ts +0 -958
- package/dist/lib/ChartOfAccountsWidget.js +0 -9
- package/dist/lib/HelpWidget.d.ts +0 -739
- package/dist/lib/HelpWidget.js +0 -6
- package/dist/lib/ProfileWidget.d.ts +0 -672
- package/dist/lib/ProfileWidget.js +0 -3
- package/dist/lib/TagsWidget.d.ts +0 -719
- package/dist/lib/TagsWidget.js +0 -3
- package/dist/lib/TeamWidget.d.ts +0 -878
- package/dist/lib/TeamWidget.js +0 -3
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { RefreshingRootWidgetProvider as _ } from "./libs/tesouro-embedded-compo
|
|
|
14
14
|
import { useDisclosuresAcceptanceSurface as v, useOwnWidgetConfig as y, useRefetchWidget as b, useWidgetConfig as x, useWidgetError as S, useWidgetLoading as C } from "./libs/tesouro-embedded-components-react/shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
15
15
|
import { BankAccountsWidget as w } from "./libs/tesouro-embedded-components-react/bank-accounts-widget/feature/dist/index8.js";
|
|
16
16
|
import { CounterpartsWidget as T } from "./libs/tesouro-embedded-components-react/counterparts-widget/feature/dist/index8.js";
|
|
17
|
-
import { BillPayWidget as E } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
17
|
+
import { BillPayWidget as E } from "./libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js";
|
|
18
18
|
import { CardDetailsWidget as D } from "./libs/tesouro-embedded-components-react/card-details-widget/feature/dist/index13.js";
|
|
19
19
|
import { CreditCardsWidget as O } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index10.js";
|
|
20
20
|
import { DebitCardsWidget as k } from "./libs/tesouro-embedded-components-react/cards-widget/feature/dist/index11.js";
|
|
@@ -32,25 +32,14 @@ import { UploadReceiptWidget as B } from "./libs/tesouro-embedded-components-rea
|
|
|
32
32
|
import { ExpenseRequirementsWidget as V } from "./libs/tesouro-embedded-components-react/expense-requirements-widget/feature/dist/lib/ExpenseRequirementsWidget.js";
|
|
33
33
|
import { ExpenseManagementWidget as H } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index9.js";
|
|
34
34
|
import { ReceiptMatchWidget as U } from "./libs/tesouro-embedded-components-react/expense-management-widget/feature/dist/index13.js";
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import { HELP_WIDGET_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/help-widget/ui/contract/dist/index2.js";
|
|
44
|
-
import { HELP_FAQ_EN as te } from "./libs/tesouro-embedded-components-react/help-widget/ui/contract/dist/index3.js";
|
|
45
|
-
import { HelpWidget as ne } from "./libs/tesouro-embedded-components-react/help-widget/feature/dist/index3.js";
|
|
46
|
-
import { ProfileWidget as re } from "./libs/tesouro-embedded-components-react/profile-widget/feature/dist/index4.js";
|
|
47
|
-
import { SettingsWidget as ie } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
48
|
-
import { DEFAULT_FEATURE_LABELS as ae } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
|
|
49
|
-
import { TRANSFERS_WIDGET_LABELS_EN as oe } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
50
|
-
import { TransfersWidget as se } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
|
|
51
|
-
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as ce } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
52
|
-
import { AcceptDisclosuresWidget as le } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
|
|
53
|
-
import { WidgetSuite as ue } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
|
|
35
|
+
import { HELP_FAQ_EN as W } from "./libs/tesouro-embedded-components-react/help-widget/ui/contract/dist/index3.js";
|
|
36
|
+
import { SettingsWidget as G } from "./libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
37
|
+
import { DEFAULT_FEATURE_LABELS as K } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index3.js";
|
|
38
|
+
import { TRANSFERS_WIDGET_LABELS_EN as q } from "./libs/tesouro-embedded-components-react/transfers-widget/ui/dist/lib/TransfersWidget/labels.js";
|
|
39
|
+
import { TransfersWidget as J } from "./libs/tesouro-embedded-components-react/transfers-widget/feature/dist/index7.js";
|
|
40
|
+
import { ACCEPT_DISCLOSURES_WIDGET_LABELS_EN as Y } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/ui/dist/lib/AcceptDisclosuresWidget/labels.js";
|
|
41
|
+
import { AcceptDisclosuresWidget as X } from "./libs/tesouro-embedded-components-react/accept-disclosures-widget/feature/dist/index5.js";
|
|
42
|
+
import { WidgetSuite as Z } from "./libs/tesouro-embedded-components-react/widget-suite/feature/dist/index16.js";
|
|
54
43
|
import "./lib/WidgetSuite.js";
|
|
55
44
|
import "./lib/AcceptDisclosuresWidget.js";
|
|
56
45
|
import "./lib/BankAccountsWidget.js";
|
|
@@ -64,27 +53,22 @@ import "./lib/ExpenseApprovalPoliciesWidget.js";
|
|
|
64
53
|
import "./lib/ExpenseRequirementsWidget.js";
|
|
65
54
|
import "./lib/BalancesWidget.js";
|
|
66
55
|
import "./lib/InsightsWidget.js";
|
|
67
|
-
import "./lib/ChartOfAccountsWidget.js";
|
|
68
|
-
import "./lib/HelpWidget.js";
|
|
69
56
|
import "./lib/InvoicingWidget.js";
|
|
70
|
-
import { LinkedAccountsWidget as
|
|
57
|
+
import { LinkedAccountsWidget as Q } from "./libs/tesouro-embedded-components-react/linked-accounts-widget/feature/dist/index10.js";
|
|
71
58
|
import "./lib/LinkedAccountsWidget.js";
|
|
72
|
-
import { ADDITIONAL_OWNERS_LABELS_EN as
|
|
73
|
-
import { BUSINESS_DETAILS_LABELS_EN as
|
|
74
|
-
import { PERSONAL_DETAILS_LABELS_EN as
|
|
75
|
-
import { RESULT_LABELS_EN as
|
|
76
|
-
import { BankAccountOnboardingWidget as
|
|
59
|
+
import { ADDITIONAL_OWNERS_LABELS_EN as $ } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index4.js";
|
|
60
|
+
import { BUSINESS_DETAILS_LABELS_EN as ee } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index6.js";
|
|
61
|
+
import { PERSONAL_DETAILS_LABELS_EN as te } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index7.js";
|
|
62
|
+
import { RESULT_LABELS_EN as ne } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/ui/dist/index12.js";
|
|
63
|
+
import { BankAccountOnboardingWidget as re } from "./libs/tesouro-embedded-components-react/bank-account-onboarding-widget/feature/dist/index18.js";
|
|
77
64
|
import "./lib/BankAccountOnboardingWidget.js";
|
|
78
|
-
import { ProductsWidget as
|
|
65
|
+
import { ProductsWidget as ie } from "./libs/tesouro-embedded-components-react/products-widget/feature/dist/index8.js";
|
|
79
66
|
import "./lib/ProductsWidget.js";
|
|
80
|
-
import "./lib/ProfileWidget.js";
|
|
81
67
|
import "./lib/ReceivablesWidget.js";
|
|
82
68
|
import "./lib/ReceiptMatchWidget.js";
|
|
83
69
|
import "./lib/SettingsWidget.js";
|
|
84
|
-
import "./lib/TagsWidget.js";
|
|
85
|
-
import "./lib/TeamWidget.js";
|
|
86
70
|
import "./lib/TransfersWidget.js";
|
|
87
71
|
import "./lib/UploadReceiptWidget.js";
|
|
88
|
-
import { WidgetProvider as
|
|
72
|
+
import { WidgetProvider as ae } from "./lib/WidgetProviderPublic.js";
|
|
89
73
|
import "./lib/WidgetProvider.js";
|
|
90
|
-
export {
|
|
74
|
+
export { Y as ACCEPT_DISCLOSURES_WIDGET_LABELS_EN, $ as ADDITIONAL_OWNERS_LABELS_EN, X as AcceptDisclosuresWidget, A as BALANCES_WIDGET_LABELS_EN, ee as BUSINESS_DETAILS_LABELS_EN, j as BalancesWidget, re as BankAccountOnboardingWidget, w as BankAccountsWidget, E as BillPayWidget, D as CardDetailsWidget, T as CounterpartsWidget, O as CreditCardsWidget, k as DebitCardsWidget, s as ERROR_STATE_ID, z as ExpenseApprovalPoliciesWidget, H as ExpenseManagementWidget, V as ExpenseRequirementsWidget, W as HELP_FAQ_EN, M as INSIGHTS_FEATURE_LABELS_EN, N as INSIGHTS_WIDGET_LABELS_EN, c as Implementation, F as InsightsWidget, I as InvoicingWidget, Q as LinkedAccountsWidget, te as PERSONAL_DETAILS_LABELS_EN, ie as ProductsWidget, ne as RESULT_LABELS_EN, U as ReceiptMatchWidget, L as ReceivablesWidget, _ as RefreshingRootWidgetProvider, m as RootWidgetProvider, P as SINGLE_INSIGHT_LABELS_EN, R as SettingsSection, G as SettingsWidget, K as TRANSFERS_FEATURE_LABELS_EN, q as TRANSFERS_WIDGET_LABELS_EN, J as TransfersWidget, i as UIFramework, B as UploadReceiptWidget, t as WIDGET_SUITE_DEFAULT_SECTIONS, e as WIDGET_SUITE_LABELS_EN, ae as WidgetProvider, Z as WidgetSuite, n as WidgetSuiteSectionId, h as WidgetTokenRefreshProvider, r as cloneEmbeddedClient, l as getGlobalWidgetConfig, f as getGlobalWidgetInitState, a as registerDesignSystemEnsurer, o as registerUIRenderers, u as setGlobalWidgetConfig, p as subscribeToGlobalWidgetInitState, d as updateGlobalWidgetConfig, v as useDisclosuresAcceptanceSurface, y as useOwnWidgetConfig, b as useRefetchWidget, x as useWidgetConfig, S as useWidgetError, C as useWidgetLoading, g as useWidgetToken };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/
|
|
1
|
+
import { BillPayWidget as e } from "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index82.js";
|
|
2
2
|
import "../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js";
|
|
3
3
|
export { e as BillPayWidget };
|
|
@@ -12,13 +12,46 @@ interface SettingsWidgetSection {
|
|
|
12
12
|
content: ReactNode;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
/**
|
|
16
|
+
* Static FAQ content for the Help widget.
|
|
17
|
+
*
|
|
18
|
+
* The shape mirrors the original MUI `HelpPage` rich-text model so the renderer
|
|
19
|
+
* can reproduce paragraphs, ordered/unordered bullet lists, nested bullets, and
|
|
20
|
+
* inline `<bold>…</bold>` runs. Callers may supply their own `HelpFaqSection[]`
|
|
21
|
+
* to override the default content below.
|
|
22
|
+
*/
|
|
23
|
+
/** Which list marker to render for a group of bullet points. */
|
|
24
|
+
type HelpFaqBulletType = 'bullet' | 'numeric';
|
|
25
|
+
/** A single bullet point, optionally with its own nested list. */
|
|
26
|
+
interface HelpFaqBullet {
|
|
27
|
+
text: string;
|
|
28
|
+
bulletPointType?: HelpFaqBulletType;
|
|
29
|
+
bulletPoints?: HelpFaqBullet[];
|
|
18
30
|
}
|
|
19
|
-
|
|
20
|
-
|
|
31
|
+
/** One answer block: a paragraph, optionally followed by a bullet list. */
|
|
32
|
+
interface HelpFaqAnswer {
|
|
33
|
+
text: string;
|
|
34
|
+
bulletPointType?: HelpFaqBulletType;
|
|
35
|
+
bulletPoints?: HelpFaqBullet[];
|
|
36
|
+
}
|
|
37
|
+
/** A question and its ordered list of answer blocks. */
|
|
38
|
+
interface HelpFaqItem {
|
|
39
|
+
question: string;
|
|
40
|
+
answers: HelpFaqAnswer[];
|
|
41
|
+
}
|
|
42
|
+
/** A titled group of questions rendered as a single card. */
|
|
43
|
+
interface HelpFaqSection {
|
|
44
|
+
title: string;
|
|
45
|
+
items: HelpFaqItem[];
|
|
21
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Default English FAQ content, ported from the original
|
|
49
|
+
* `embedded-banking-dashboard-settings` Help page (`defaultWidgetFaqContent` —
|
|
50
|
+
* the embedded-widget variant, which omits the password-management questions
|
|
51
|
+
* since embedded users authenticate through the provider). A stray "Testing 1"
|
|
52
|
+
* placeholder bullet from the source has been dropped.
|
|
53
|
+
*/
|
|
54
|
+
declare const HELP_FAQ_EN: HelpFaqSection[];
|
|
22
55
|
|
|
23
56
|
type AuthToken = string | undefined;
|
|
24
57
|
interface Auth {
|
|
@@ -645,6 +678,14 @@ interface WidgetProviderProps extends WidgetProviderBaseProps {
|
|
|
645
678
|
providerLabels?: Partial<WidgetProviderLabels>;
|
|
646
679
|
}
|
|
647
680
|
|
|
681
|
+
interface FinopsThemeColors {
|
|
682
|
+
primary?: string;
|
|
683
|
+
primaryForeground?: string;
|
|
684
|
+
}
|
|
685
|
+
interface MoniteWrapperProps {
|
|
686
|
+
finopsThemeColors?: FinopsThemeColors;
|
|
687
|
+
}
|
|
688
|
+
|
|
648
689
|
type MoniteRegionProviderProps = WidgetProviderProps & MoniteWrapperProps;
|
|
649
690
|
|
|
650
691
|
interface FeatureLabels {
|
|
@@ -715,6 +756,11 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
715
756
|
* support address to fall back on. The bank name in that line comes from
|
|
716
757
|
* widget init, so this is the only value a host needs to supply. */
|
|
717
758
|
helpContactUrl?: string;
|
|
759
|
+
/** Forwarded to the embedded Help section's {@link HelpWidget} — the FAQ it
|
|
760
|
+
* renders. Defaults to the package's own list. A host that owns surfaces the
|
|
761
|
+
* package cannot answer for (passwords, say) supplies an extended list here;
|
|
762
|
+
* it is the reason a host does not need `helpContent` just to change copy. */
|
|
763
|
+
helpFaq?: HelpFaqSection[];
|
|
718
764
|
/** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
|
|
719
765
|
* its "to change this information, contact your bank" line links. The line
|
|
720
766
|
* falls back to a plain, unlinked sentence when unset, for the same reason
|
|
@@ -749,5 +795,5 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
749
795
|
}
|
|
750
796
|
declare function SettingsWidget({ baseUrl, widgetToken, organizationId, configClient, gatewayRouting, linkComponent, implementation, uiFramework, errorFallback, onError, finopsThemeColors, analytics, disclosuresAcceptance, providerLabels, ...innerProps }: SettingsWidgetProps): React.JSX.Element;
|
|
751
797
|
|
|
752
|
-
export { SettingsSection, SettingsWidget };
|
|
753
|
-
export type { SettingsWidgetAdditionalSection, FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId };
|
|
798
|
+
export { HELP_FAQ_EN, SettingsSection, SettingsWidget };
|
|
799
|
+
export type { HelpFaqAnswer, HelpFaqBullet, HelpFaqBulletType, HelpFaqItem, HelpFaqSection, SettingsWidgetAdditionalSection, FeatureLabels as SettingsWidgetFeatureLabels, Labels as SettingsWidgetLabels, SettingsWidgetProps, SettingsWidgetSection, SettingsWidgetSectionId };
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { SettingsSection as e } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index4.js";
|
|
2
|
-
import {
|
|
2
|
+
import { HELP_FAQ_EN as t } from "../libs/tesouro-embedded-components-react/help-widget/ui/contract/dist/index3.js";
|
|
3
|
+
import "../libs/tesouro-embedded-components-react/help-widget/feature/dist/index.js";
|
|
4
|
+
import { SettingsWidget as n } from "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index6.js";
|
|
3
5
|
import "../libs/tesouro-embedded-components-react/settings-widget/feature/dist/index.js";
|
|
4
|
-
export { e as SettingsSection,
|
|
6
|
+
export { t as HELP_FAQ_EN, e as SettingsSection, n as SettingsWidget };
|
|
@@ -1718,6 +1718,39 @@ interface SettingsWidgetSection {
|
|
|
1718
1718
|
content: ReactNode;
|
|
1719
1719
|
}
|
|
1720
1720
|
|
|
1721
|
+
/**
|
|
1722
|
+
* Static FAQ content for the Help widget.
|
|
1723
|
+
*
|
|
1724
|
+
* The shape mirrors the original MUI `HelpPage` rich-text model so the renderer
|
|
1725
|
+
* can reproduce paragraphs, ordered/unordered bullet lists, nested bullets, and
|
|
1726
|
+
* inline `<bold>…</bold>` runs. Callers may supply their own `HelpFaqSection[]`
|
|
1727
|
+
* to override the default content below.
|
|
1728
|
+
*/
|
|
1729
|
+
/** Which list marker to render for a group of bullet points. */
|
|
1730
|
+
type HelpFaqBulletType = 'bullet' | 'numeric';
|
|
1731
|
+
/** A single bullet point, optionally with its own nested list. */
|
|
1732
|
+
interface HelpFaqBullet {
|
|
1733
|
+
text: string;
|
|
1734
|
+
bulletPointType?: HelpFaqBulletType;
|
|
1735
|
+
bulletPoints?: HelpFaqBullet[];
|
|
1736
|
+
}
|
|
1737
|
+
/** One answer block: a paragraph, optionally followed by a bullet list. */
|
|
1738
|
+
interface HelpFaqAnswer {
|
|
1739
|
+
text: string;
|
|
1740
|
+
bulletPointType?: HelpFaqBulletType;
|
|
1741
|
+
bulletPoints?: HelpFaqBullet[];
|
|
1742
|
+
}
|
|
1743
|
+
/** A question and its ordered list of answer blocks. */
|
|
1744
|
+
interface HelpFaqItem {
|
|
1745
|
+
question: string;
|
|
1746
|
+
answers: HelpFaqAnswer[];
|
|
1747
|
+
}
|
|
1748
|
+
/** A titled group of questions rendered as a single card. */
|
|
1749
|
+
interface HelpFaqSection {
|
|
1750
|
+
title: string;
|
|
1751
|
+
items: HelpFaqItem[];
|
|
1752
|
+
}
|
|
1753
|
+
|
|
1721
1754
|
interface FinopsThemeColors {
|
|
1722
1755
|
primary?: string;
|
|
1723
1756
|
primaryForeground?: string;
|
|
@@ -1796,6 +1829,11 @@ interface SettingsWidgetProps extends MoniteRegionProviderProps {
|
|
|
1796
1829
|
* support address to fall back on. The bank name in that line comes from
|
|
1797
1830
|
* widget init, so this is the only value a host needs to supply. */
|
|
1798
1831
|
helpContactUrl?: string;
|
|
1832
|
+
/** Forwarded to the embedded Help section's {@link HelpWidget} — the FAQ it
|
|
1833
|
+
* renders. Defaults to the package's own list. A host that owns surfaces the
|
|
1834
|
+
* package cannot answer for (passwords, say) supplies an extended list here;
|
|
1835
|
+
* it is the reason a host does not need `helpContent` just to change copy. */
|
|
1836
|
+
helpFaq?: HelpFaqSection[];
|
|
1799
1837
|
/** Forwarded to the embedded Profile section's {@link ProfileWidget} — where
|
|
1800
1838
|
* its "to change this information, contact your bank" line links. The line
|
|
1801
1839
|
* falls back to a plain, unlinked sentence when unset, for the same reason
|
|
@@ -9,23 +9,23 @@ import "./index10.js";
|
|
|
9
9
|
import "./index11.js";
|
|
10
10
|
import "./index23.js";
|
|
11
11
|
import "./index24.js";
|
|
12
|
-
import "./
|
|
13
|
-
import "./
|
|
14
|
-
import "./
|
|
15
|
-
import "./index53.js";
|
|
12
|
+
import "./index41.js";
|
|
13
|
+
import "./index50.js";
|
|
14
|
+
import "./index52.js";
|
|
16
15
|
import "./index54.js";
|
|
17
16
|
import "./index55.js";
|
|
18
17
|
import "./index56.js";
|
|
19
18
|
import "./index57.js";
|
|
20
19
|
import "./index58.js";
|
|
21
|
-
import "./
|
|
20
|
+
import "./index59.js";
|
|
22
21
|
import "./index63.js";
|
|
23
22
|
import "./index64.js";
|
|
24
23
|
import "./index65.js";
|
|
25
24
|
import "./index66.js";
|
|
26
|
-
import "./
|
|
27
|
-
import "./
|
|
25
|
+
import "./index67.js";
|
|
26
|
+
import "./index70.js";
|
|
28
27
|
import "./index76.js";
|
|
29
28
|
import "./index77.js";
|
|
30
|
-
import
|
|
29
|
+
import "./index78.js";
|
|
30
|
+
import { BillPayWidget as e } from "./index82.js";
|
|
31
31
|
export { e as BillPayWidget };
|
|
@@ -1,17 +1,11 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
"use client";
|
|
3
|
-
"use client";
|
|
4
|
-
"use client";
|
|
5
|
-
import { usePayableHistoryQuery as e } from "../../data-access/dist/index8.js";
|
|
6
|
-
import "../../data-access/dist/index.js";
|
|
7
1
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
let
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
2
|
+
function e(e) {
|
|
3
|
+
let t = [];
|
|
4
|
+
for (let n of e.steps) n.chips.some((e) => e.approved) || t.push({
|
|
5
|
+
id: n.id,
|
|
6
|
+
names: n.chips.map((e) => e.label)
|
|
7
|
+
});
|
|
8
|
+
return t;
|
|
15
9
|
}
|
|
16
10
|
//#endregion
|
|
17
|
-
export {
|
|
11
|
+
export { e as buildPendingApproverGroupsFromCardView };
|
|
@@ -2,66 +2,16 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
-
import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
8
|
-
import { useAllOrganizationUsersQuery as r } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
-
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
11
|
-
import "../../../shared/feature/dist/index.js";
|
|
12
|
-
import { usePayableApprovalRequestsQuery as a } from "../../data-access/dist/index7.js";
|
|
5
|
+
import { usePayableHistoryQuery as e } from "../../data-access/dist/index8.js";
|
|
13
6
|
import "../../data-access/dist/index.js";
|
|
14
|
-
import { useGetApprovalPoliciesQuery as o } from "../../../shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js";
|
|
15
|
-
import "../../../shared/approval-policy/data-access/dist/index.js";
|
|
16
|
-
import { buildApprovalPolicyCardView as s } from "./index25.js";
|
|
17
|
-
import { currentApprovalRound as c } from "./index26.js";
|
|
18
|
-
import { buildPendingApproverGroups as l } from "./index27.js";
|
|
19
|
-
import { usePayableApprovalRoundStart as u } from "./index28.js";
|
|
20
|
-
import { useMemo as d } from "react";
|
|
21
7
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
enabled: g && y
|
|
26
|
-
}), D = d(() => {
|
|
27
|
-
let e = /* @__PURE__ */ new Map();
|
|
28
|
-
for (let t of C.data?.data ?? []) e.set(t.id, {
|
|
29
|
-
label: t.name,
|
|
30
|
-
kind: "role"
|
|
31
|
-
});
|
|
32
|
-
for (let t of w.data?.data ?? []) e.set(t.id, {
|
|
33
|
-
label: t.name,
|
|
34
|
-
kind: "user"
|
|
35
|
-
});
|
|
36
|
-
return e;
|
|
37
|
-
}, [C.data, w.data]), O = d(() => c(T.data?.data, E), [T.data, E]), k = d(() => new Set(O.flatMap((e) => e.approved_by ?? [])), [O]), A = d(() => new Set(O.filter((e) => (e.approved_by ?? []).length > 0).flatMap((e) => e.role_ids ?? [])), [O]), j = d(() => p ? S.data?.data.find((e) => e.id === p) : void 0, [S.data, p]);
|
|
8
|
+
var t = "submitted_for_approval";
|
|
9
|
+
function n({ payableId: n, enabled: r = !0 }) {
|
|
10
|
+
let i = e(n, { enabled: r });
|
|
38
11
|
return {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
lookup: D,
|
|
42
|
-
approvedUserIds: k,
|
|
43
|
-
approvedRoleIds: A,
|
|
44
|
-
copy: h
|
|
45
|
-
}) : void 0, [
|
|
46
|
-
g,
|
|
47
|
-
j,
|
|
48
|
-
D,
|
|
49
|
-
k,
|
|
50
|
-
A,
|
|
51
|
-
h
|
|
52
|
-
]),
|
|
53
|
-
pendingApprovers: d(() => g ? l({
|
|
54
|
-
requestsNewestFirst: T.data?.data,
|
|
55
|
-
roundStartedAt: E,
|
|
56
|
-
lookup: D
|
|
57
|
-
}) : [], [
|
|
58
|
-
g,
|
|
59
|
-
T.data,
|
|
60
|
-
E,
|
|
61
|
-
D
|
|
62
|
-
]),
|
|
63
|
-
isLoading: g && (S.isResolving || C.isResolving || w.isResolving || T.isLoading)
|
|
12
|
+
roundStartedAt: (i.data?.data ?? []).reduce((e, n) => n.event_type === t ? n.timestamp : e, void 0),
|
|
13
|
+
isLoading: i.isLoading
|
|
64
14
|
};
|
|
65
15
|
}
|
|
66
16
|
//#endregion
|
|
67
|
-
export {
|
|
17
|
+
export { n as usePayableApprovalRoundStart };
|
|
@@ -3,27 +3,67 @@
|
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
5
|
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { Scope as t } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
7
|
+
import { useAllOrganizationRolesQuery as n } from "../../../shared/data-access/dist/lib/role/useAllOrganizationRolesQuery.js";
|
|
8
|
+
import { useAllOrganizationUsersQuery as r } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
8
9
|
import "../../../shared/data-access/dist/index.js";
|
|
9
|
-
import { useWidgetConfig as
|
|
10
|
+
import { useWidgetConfig as i } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
10
11
|
import "../../../shared/feature/dist/index.js";
|
|
11
|
-
import { usePayableApprovalRequestsQuery as
|
|
12
|
+
import { usePayableApprovalRequestsQuery as a } from "../../data-access/dist/index7.js";
|
|
12
13
|
import "../../data-access/dist/index.js";
|
|
13
|
-
import {
|
|
14
|
-
import
|
|
14
|
+
import { useGetApprovalPoliciesQuery as o } from "../../../shared/approval-policy/data-access/dist/lib/approvalPoliciesApi.js";
|
|
15
|
+
import "../../../shared/approval-policy/data-access/dist/index.js";
|
|
16
|
+
import { buildApprovalPolicyCardView as s } from "./index25.js";
|
|
17
|
+
import { currentApprovalRound as c } from "./index26.js";
|
|
18
|
+
import { buildPendingApproverGroups as l } from "./index27.js";
|
|
19
|
+
import { buildPendingApproverGroupsFromCardView as u } from "./index28.js";
|
|
20
|
+
import { usePayableApprovalRoundStart as d } from "./index29.js";
|
|
21
|
+
import { useMemo as f } from "react";
|
|
15
22
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js
|
|
16
|
-
function
|
|
17
|
-
let { initResponse:
|
|
18
|
-
payableId:
|
|
19
|
-
enabled:
|
|
20
|
-
}),
|
|
23
|
+
function p({ payableId: p, approvalPolicyId: m, enabled: h = !0, copy: g }) {
|
|
24
|
+
let _ = h && !!m, { initResponse: v } = i(), y = e(v?.scopes, [t.ApprovalPolicyReadOrg]), b = e(v?.scopes, [t.ApprovalRequestReadOrg]), x = e(v?.scopes, [t.RoleReadOrg]), S = e(v?.scopes, [t.UserReadOrg]), C = o({ enabled: _ && y }), w = n({ enabled: _ && x }), T = r({ enabled: _ && S }), E = a(p, { enabled: _ && b }), { roundStartedAt: D } = d({
|
|
25
|
+
payableId: p,
|
|
26
|
+
enabled: _ && b
|
|
27
|
+
}), O = f(() => {
|
|
28
|
+
let e = /* @__PURE__ */ new Map();
|
|
29
|
+
for (let t of w.data?.data ?? []) e.set(t.id, {
|
|
30
|
+
label: t.name,
|
|
31
|
+
kind: "role"
|
|
32
|
+
});
|
|
33
|
+
for (let t of T.data?.data ?? []) e.set(t.id, {
|
|
34
|
+
label: t.name,
|
|
35
|
+
kind: "user"
|
|
36
|
+
});
|
|
37
|
+
return e;
|
|
38
|
+
}, [w.data, T.data]), k = f(() => c(E.data?.data, D), [E.data, D]), A = f(() => new Set(k.flatMap((e) => e.approved_by ?? [])), [k]), j = f(() => new Set(k.filter((e) => (e.approved_by ?? []).length > 0).flatMap((e) => e.role_ids ?? [])), [k]), M = f(() => m ? C.data?.data.find((e) => e.id === m) : void 0, [C.data, m]), N = f(() => _ && M ? s({
|
|
39
|
+
policy: M,
|
|
40
|
+
lookup: O,
|
|
41
|
+
approvedUserIds: A,
|
|
42
|
+
approvedRoleIds: j,
|
|
43
|
+
copy: g
|
|
44
|
+
}) : void 0, [
|
|
45
|
+
_,
|
|
46
|
+
M,
|
|
47
|
+
O,
|
|
48
|
+
A,
|
|
49
|
+
j,
|
|
50
|
+
g
|
|
51
|
+
]);
|
|
21
52
|
return {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
53
|
+
view: N,
|
|
54
|
+
pendingApprovers: f(() => _ ? N ? u(N) : l({
|
|
55
|
+
requestsNewestFirst: E.data?.data,
|
|
56
|
+
roundStartedAt: D,
|
|
57
|
+
lookup: O
|
|
58
|
+
}) : [], [
|
|
59
|
+
_,
|
|
60
|
+
N,
|
|
61
|
+
E.data,
|
|
62
|
+
D,
|
|
63
|
+
O
|
|
64
|
+
]),
|
|
65
|
+
isLoading: _ && (C.isResolving || w.isResolving || T.isResolving || E.isLoading)
|
|
26
66
|
};
|
|
27
67
|
}
|
|
28
68
|
//#endregion
|
|
29
|
-
export {
|
|
69
|
+
export { p as useApprovalPolicyCardView };
|
|
@@ -2,136 +2,28 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import "../../../shared/
|
|
7
|
-
import {
|
|
5
|
+
import { hasAnyScope as e } from "../../../shared/data-access/dist/lib/hasAnyScope.js";
|
|
6
|
+
import { useCurrentUserQuery as t } from "../../../shared/data-access/dist/lib/useCurrentUserQuery.js";
|
|
7
|
+
import { Scope as n } from "../../../shared/data-access/dist/lib/scopes.js";
|
|
8
|
+
import "../../../shared/data-access/dist/index.js";
|
|
9
|
+
import { useWidgetConfig as r } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
8
10
|
import "../../../shared/feature/dist/index.js";
|
|
9
|
-
import {
|
|
10
|
-
import { useCancelPayableMutation as i, useCancelScheduledPaymentMutation as a, useForceApprovePayableMutation as o, useForceRejectPayableMutation as s, useReopenPayableMutation as c } from "../../data-access/dist/index12.js";
|
|
11
|
+
import { usePayableApprovalRequestsQuery as i } from "../../data-access/dist/index7.js";
|
|
11
12
|
import "../../data-access/dist/index.js";
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { HandIcon as d } from "lucide-react";
|
|
13
|
+
import { currentApprovalRound as a } from "./index26.js";
|
|
14
|
+
import { usePayableApprovalRoundStart as o } from "./index29.js";
|
|
15
15
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js
|
|
16
|
-
function
|
|
17
|
-
let { initResponse:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
isPolicyApprover: _,
|
|
22
|
-
hasWaitingRequest: v,
|
|
23
|
-
arePendingApproversUnknown: y,
|
|
24
|
-
hasScheduledPayment: b || S,
|
|
25
|
-
scheduledPaymentIntentId: x,
|
|
26
|
-
labels: C
|
|
27
|
-
}) : [], H = (t) => ({
|
|
28
|
-
onError: () => e.error(C.actionError),
|
|
29
|
-
onSuccess: () => {
|
|
30
|
-
e.success(C.actionSuccess[t]), O?.();
|
|
31
|
-
}
|
|
32
|
-
}), U = {
|
|
33
|
-
reject: {
|
|
34
|
-
isPending: A.isPending,
|
|
35
|
-
run: (e) => m && A.mutate({
|
|
36
|
-
path: { approval_request_id: m },
|
|
37
|
-
body: e ? { reject_reason: e } : void 0
|
|
38
|
-
}, H("reject"))
|
|
39
|
-
},
|
|
40
|
-
approve: {
|
|
41
|
-
isPending: j.isPending,
|
|
42
|
-
run: () => m && j.mutate({ path: { approval_request_id: m } }, H("approve"))
|
|
43
|
-
},
|
|
44
|
-
cancel: {
|
|
45
|
-
isPending: M.isPending,
|
|
46
|
-
run: () => d && M.mutate({ path: { payable_id: d } }, H("cancel"))
|
|
47
|
-
},
|
|
48
|
-
cancelScheduledPayment: {
|
|
49
|
-
isPending: N.isPending,
|
|
50
|
-
run: () => {
|
|
51
|
-
let e = B?.scheduledPaymentIntentId;
|
|
52
|
-
!d || !e || N.mutate({
|
|
53
|
-
path: { payment_intent_id: e },
|
|
54
|
-
payableId: d
|
|
55
|
-
}, H("cancelScheduledPayment"));
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
reopen: {
|
|
59
|
-
isPending: P.isPending,
|
|
60
|
-
run: () => d && P.mutate({ path: { payable_id: d } }, H("reopen"))
|
|
61
|
-
},
|
|
62
|
-
forceApprove: {
|
|
63
|
-
isPending: F.isPending,
|
|
64
|
-
run: () => d && F.mutate({ path: { payable_id: d } }, H("forceApprove"))
|
|
65
|
-
},
|
|
66
|
-
forceReject: {
|
|
67
|
-
isPending: I.isPending,
|
|
68
|
-
run: () => d && I.mutate({ path: { payable_id: d } }, H("forceReject"))
|
|
69
|
-
}
|
|
70
|
-
}, W = V.map((e) => ({
|
|
71
|
-
...e,
|
|
72
|
-
disabled: L,
|
|
73
|
-
loading: e.id === "markAsPaid" ? w : U[e.id]?.isPending ?? !1,
|
|
74
|
-
onSelect: () => {
|
|
75
|
-
if (!(L || !d)) {
|
|
76
|
-
if (e.id === "payBill") {
|
|
77
|
-
E();
|
|
78
|
-
return;
|
|
79
|
-
}
|
|
80
|
-
if (e.id === "markAsPaid") {
|
|
81
|
-
D();
|
|
82
|
-
return;
|
|
83
|
-
}
|
|
84
|
-
if (h(e.id)) {
|
|
85
|
-
z({
|
|
86
|
-
id: e.id,
|
|
87
|
-
scheduledPaymentIntentId: x
|
|
88
|
-
});
|
|
89
|
-
return;
|
|
90
|
-
}
|
|
91
|
-
U[e.id]?.run();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
}));
|
|
16
|
+
function s({ payableId: s, status: c }) {
|
|
17
|
+
let { initResponse: l } = r(), u = e(l?.scopes, [n.ApprovalRequestReadOrg]), d = c === "approve_in_progress" && u, f = i(s, { enabled: d }), p = t({ enabled: d }), { roundStartedAt: m } = o({
|
|
18
|
+
payableId: s,
|
|
19
|
+
enabled: d
|
|
20
|
+
}), h = p.data?.id, g = d ? a(f.data?.data, m) : [], _ = (e) => e.caller_is_policy_approver ?? !!(h && e.user_ids.includes(h)), v = g.some(_), y = g.filter((e) => e.status === "waiting");
|
|
95
21
|
return {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
},
|
|
101
|
-
decisionDialog: {
|
|
102
|
-
open: !!B,
|
|
103
|
-
copy: B ? {
|
|
104
|
-
...C.decisionDialog[B.id],
|
|
105
|
-
presentation: g(B.id) ? p : void 0,
|
|
106
|
-
pendingApprovers: g(B.id) ? T ?? [] : void 0
|
|
107
|
-
} : void 0,
|
|
108
|
-
isPending: B ? U[B.id]?.isPending ?? !1 : !1,
|
|
109
|
-
onCancel: () => {
|
|
110
|
-
L || z(void 0);
|
|
111
|
-
},
|
|
112
|
-
onConfirm: (e) => {
|
|
113
|
-
!B || L || (U[B.id]?.run(e), z(void 0));
|
|
114
|
-
}
|
|
115
|
-
}
|
|
22
|
+
id: y.filter(_).find((e) => !(h && (e.approved_by ?? []).includes(h)))?.id,
|
|
23
|
+
isPolicyApprover: v,
|
|
24
|
+
hasWaitingRequest: y.length > 0,
|
|
25
|
+
isLoading: f.isLoading || p.isLoading
|
|
116
26
|
};
|
|
117
27
|
}
|
|
118
|
-
var p = {
|
|
119
|
-
alignment: "center",
|
|
120
|
-
icon: d,
|
|
121
|
-
tone: "destructive",
|
|
122
|
-
actionWidth: "equal"
|
|
123
|
-
}, m = [
|
|
124
|
-
"reject",
|
|
125
|
-
"cancel",
|
|
126
|
-
"cancelScheduledPayment",
|
|
127
|
-
"forceApprove",
|
|
128
|
-
"forceReject"
|
|
129
|
-
];
|
|
130
|
-
function h(e) {
|
|
131
|
-
return m.includes(e);
|
|
132
|
-
}
|
|
133
|
-
function g(e) {
|
|
134
|
-
return e === "forceApprove" || e === "forceReject";
|
|
135
|
-
}
|
|
136
28
|
//#endregion
|
|
137
|
-
export {
|
|
29
|
+
export { s as useCurrentApprovalRequestId };
|