@tight-embedded/react 6.5.0 → 6.7.0

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/dist/index.css.gz CHANGED
Binary file
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare type Anchor = AnchorFor<keyof PageAnchorMap>;
15
15
  *
16
16
  * @example
17
17
  * ```TypeScript
18
- * type BODAnchors = AnchorFor<"FinancialOverviewDashboard">;
18
+ * type BODAnchors = AnchorFor<"FinancialOverview">;
19
19
  * // = "conversations-section" | "transactions-section"
20
20
  * ```
21
21
  */
@@ -28,14 +28,12 @@ declare type AnchorFor<T extends keyof PageAnchorMap> = T extends keyof PageAnch
28
28
  * @see NavState
29
29
  */
30
30
  declare type AppProps = {
31
- /** The current navigation target. Controls which page, anchor, and drawer are active. */
32
- navState: NavState;
33
- /** Called when the user triggers an internal navigation event. The host must update `navState` in response. */
34
- onNavigate: (navState: NavState) => void;
35
- /** Bearer token used to authenticate API requests. Obtain one from the Tight Authentication Endpoint. */
31
+ /** Bearer token used to authenticate API requests. Get one from the Tight Authentication Endpoint. */
36
32
  accessToken: string;
37
33
  /** Selects the Tight API environment. Defaults to `"PRODUCTION"`. Use `"SANDBOX"` for development and testing. */
38
34
  environment?: Environment;
35
+ /** The initial page of the TightApp that should open on the initial render. Defaults to the Financial Overview */
36
+ initialNav?: NavState;
39
37
  };
40
38
 
41
39
  declare function BankAccountForm({ bankAccountId }: BankAccountFormProps): JSX.Element;
@@ -73,14 +71,7 @@ declare type BankTransactionType = "EXPENSE" | "REVENUE" | "TRANSFER_IN" | "TRAN
73
71
  *
74
72
  * @see NavState
75
73
  */
76
- export declare type BasePage = "FinancialOverviewDashboard";
77
-
78
- export declare function BusinessOwnerDashboard(props: BusinessOwnerDashboardProps): JSX.Element;
79
-
80
- declare type BusinessOwnerDashboardProps = {
81
- period?: Period;
82
- onChangePeriod?: (period: Period) => void;
83
- };
74
+ export declare type BasePage = "FinancialOverview";
84
75
 
85
76
  /**
86
77
  * A standalone drawer for rendering a conversation that is not attached to an entity.
@@ -113,6 +104,7 @@ declare type DrawerProps = {
113
104
  TransactionsFilterList: EmptyObject;
114
105
  RevenueFilterList: EmptyObject;
115
106
  ExpensesFilterList: EmptyObject;
107
+ TransactionSettingsDrawer: EmptyObject;
116
108
  };
117
109
 
118
110
  declare type DrawerRouteNames = keyof DrawerProps;
@@ -141,6 +133,15 @@ declare type ExternalOptions = {
141
133
  banksAndIntegrations?: BanksAndIntegrationsOptions;
142
134
  };
143
135
 
136
+ export declare function FinancialOverview(props: FinancialOverviewDashboardProps): JSX.Element;
137
+
138
+ declare type FinancialOverviewDashboardProps = {
139
+ period?: Period;
140
+ onChangePeriod?: (period: Period) => void;
141
+ };
142
+
143
+ declare type FinancialOverviewPageProps = Pick<FinancialOverviewDashboardProps, "period">;
144
+
144
145
  declare function FinancialSummaryDrawer({ summaryId, conversationId }: FinancialSummaryDrawerProps): JSX.Element;
145
146
 
146
147
  declare type FinancialSummaryDrawerProps = {
@@ -184,11 +185,11 @@ declare type MobileConversationDrawerProps = {
184
185
  * @example
185
186
  * ```TypeScript
186
187
  * // Navigate to a top-level page
187
- * const nav: NavState = { page: "FinancialOverviewDashboard" };
188
+ * const nav: NavState = { page: "FinancialOverview" };
188
189
  *
189
190
  * // Navigate to a specific anchor section
190
191
  * const navWithAnchor: NavState = {
191
- * page: "FinancialOverviewDashboard",
192
+ * page: "FinancialOverview",
192
193
  * anchor: "conversations-section",
193
194
  * };
194
195
  *
@@ -210,6 +211,7 @@ export declare type NavState = {
210
211
  page: P;
211
212
  anchor?: P extends keyof PageAnchorMap ? AnchorFor<P> : never;
212
213
  drawer?: DrawerNavObject;
214
+ pageProps?: P extends keyof PagePropsMap ? PagePropsMap[P] : never;
213
215
  };
214
216
  }[BasePage];
215
217
 
@@ -236,7 +238,7 @@ declare type OptionSetter = (options: Partial<ExternalOptions>, replace?: boolea
236
238
  *
237
239
  */
238
240
  declare const PAGE_ANCHOR_MAP: {
239
- readonly FinancialOverviewDashboard: {
241
+ readonly FinancialOverview: {
240
242
  readonly CONVERSATIONS: "conversations-section";
241
243
  readonly TRANSACTIONS: "transactions-section";
242
244
  };
@@ -244,6 +246,10 @@ declare const PAGE_ANCHOR_MAP: {
244
246
 
245
247
  declare type PageAnchorMap = typeof PAGE_ANCHOR_MAP;
246
248
 
249
+ declare type PagePropsMap = {
250
+ FinancialOverview: FinancialOverviewPageProps;
251
+ };
252
+
247
253
  /**
248
254
  * Parses a URL string into a `NavObject` for use as the `navObject` prop on `<App />`.
249
255
  *
@@ -255,13 +261,13 @@ declare type PageAnchorMap = typeof PAGE_ANCHOR_MAP;
255
261
  *
256
262
  * @example
257
263
  * ```TypeScript
258
- * const nav = parseNavUrl("https://app.example.com?bkPage=FinancialOverviewDashboard");
259
- * // nav = { page: "FinancialOverviewDashboard" }
264
+ * const nav = parseNavUrl("https://app.example.com?bkPage=FinancialOverview");
265
+ * // nav = { page: "FinancialOverview" }
260
266
  *
261
267
  * const navWithAnchor = parseNavUrl(
262
- * "https://app.example.com?bkPage=FinancialOverviewDashboard&bkAnchor=conversations-section"
268
+ * "https://app.example.com?bkPage=FinancialOverview&bkAnchor=conversations-section"
263
269
  * );
264
- * // navWithAnchor = { page: "FinancialOverviewDashboard", anchor: "conversations-section" }
270
+ * // navWithAnchor = { page: "FinancialOverview", anchor: "conversations-section" }
265
271
  * ```
266
272
  */
267
273
  export declare function parseNavUrl(url: string): NavState | undefined;
@@ -281,30 +287,27 @@ declare const PLAID_EVENTS: {
281
287
 
282
288
  declare type PlaidEvent = ValueOf<typeof PLAID_EVENTS>;
283
289
 
290
+ export declare function ReportDashboard(): JSX.Element;
291
+
284
292
  declare const SUPPORTED_INTEGRATION_IDENTIFIERS: readonly ["UNIT", "STRIPE", "GUSTO", "SHOPIFY", "SQUARE", "RUTTER", "UBER", "MOOV", "QUALPAY", "MANUAL_ENTRY", "PARTNER_IMPLEMENTATION", "QBO", "XERO", "FRESHBOOKS"];
285
293
 
286
294
  export declare function Tight({ children, environment, accessToken }: TightProps): JSX.Element;
287
295
 
288
296
  /**
289
- * The root component of the Tight application.
290
- *
291
- * Wraps all dashboard views in a shared `MemoryRouter` and navigation context.
292
- * Navigation state is driven externally via the `navState` prop, making the
293
- * component fully controlled — the host application owns navigation state.
297
+ * All-in-one component that provides simple and easy consumption of Tight Embedded Components.
294
298
  *
295
299
  * @param accessToken - Bearer token used to authenticate API requests.
296
300
  * @param environment - Selects the Tight API environment (`"PRODUCTION"` or `"SANDBOX"`). Defaults to `"PRODUCTION"`.
297
- * @param navState - The current navigation target. Controls page, anchor, and open drawer.
298
- * @param onNavigate - Callback fired when the user triggers an internal navigation event.
301
+ * @param initialNav - The initial page of the TightApp that should open on the initial render. Defaults to the Financial Overview
299
302
  *
300
303
  * @example
301
304
  * ```TypeScript
302
- * const [nav, setNav] = useState<NavState>({ page: "FinancialOverviewDashboard" });
305
+ * const initialTightPage = { page: "FinancialOverview" };
303
306
  *
304
- * <TightApp accessToken={accessToken} navState={nav} onNavigate={setNav} />
307
+ * <TightApp accessToken={accessToken} initialNav={initialTightPage} />
305
308
  * ```
306
309
  */
307
- export declare function TightApp({ accessToken, environment, navState, onNavigate }: AppProps): JSX.Element;
310
+ export declare function TightApp({ accessToken, environment, initialNav }: AppProps): JSX.Element;
308
311
 
309
312
  declare type TightProps = PropsWithChildren<{
310
313
  environment: Environment;
@@ -330,7 +333,7 @@ declare const TransactionTableColumns: {
330
333
  readonly DESCRIPTION: "description";
331
334
  readonly AMOUNT: "amount";
332
335
  readonly CATEGORY: "category";
333
- readonly CLASS_SEGMENT: "classSegment";
336
+ readonly DIMENSION_VALUE: "dimensionValue";
334
337
  readonly REVIEW_STATUS: "reviewStatus";
335
338
  readonly COMMENTS: "comments";
336
339
  };