@foris/avocado-not-front 6.0.0 → 8.0.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/avocado-not-front/src/components/breadcrumbs/Breadcrumbs.d.ts +2 -5
- package/dist/avocado-not-front/src/components/breadcrumbs/Breadcrumbs.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/header-navigation/HeaderNavigation.d.ts +10 -0
- package/dist/avocado-not-front/src/components/header-navigation/HeaderNavigation.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/header-navigation/useHeaderNavigationActions.d.ts +6 -0
- package/dist/avocado-not-front/src/components/header-navigation/useHeaderNavigationActions.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/index.d.ts +2 -1
- package/dist/avocado-not-front/src/components/pill/Pill.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/table/Table.d.ts +1 -1
- package/dist/avocado-not-front/src/components/table/Table.viewport.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/table/table.constants.d.ts +17 -0
- package/dist/avocado-not-front/src/components/table/table.constants.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/table/tableAvailableHeight.util.d.ts +12 -0
- package/dist/avocado-not-front/src/components/table/tableScroll.util.d.ts +20 -0
- package/dist/avocado-not-front/src/components/table/tableScroll.util.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/table/useAvailableHeight.d.ts +17 -0
- package/dist/avocado-not-front/src/components/table/useAvailableHeight.test.d.ts +1 -0
- package/dist/avocado-not-front/src/hooks/builder/useBuildComponentsList.test.d.ts +1 -0
- package/dist/avocado-not-front/src/hooks/useAction.d.ts +15 -0
- package/dist/avocado-not-front/src/hooks/useNotFrontBreadcrumbActionRunner.d.ts +6 -0
- package/dist/avocado-not-front/src/hooks/useNotFrontBreadcrumbActionRunner.test.d.ts +1 -0
- package/dist/avocado-not-front/src/hooks/useNotFrontButtonActionRunner.d.ts +2 -5
- package/dist/avocado-not-front/src/types/builder.type.d.ts +4 -2
- package/dist/avocado-not-front/src/types/components.type.d.ts +65 -10
- package/dist/avocado-not-front/src/types/componentsCore.type.d.ts +9 -2
- package/dist/avocado-not-front/src/utils/dataSource.util.d.ts +4 -2
- package/dist/avocado-not-front/src/utils/pillVariant.util.d.ts +9 -0
- package/dist/avocado-not-front.es.js +2321 -2155
- package/dist/avocado-not-front.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +7 -7
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import { BreadcrumbsNotFrontProps } from '../../types';
|
|
2
|
-
/**
|
|
3
|
-
* Extended props for NotFront Breadcrumbs component.
|
|
4
|
-
* Includes context identifiers for the userFlow and pageId.
|
|
5
|
-
*/
|
|
1
|
+
import type { BreadcrumbsNotFrontProps } from '../../types';
|
|
2
|
+
/** Includes context identifiers for the NotFront action pipeline. */
|
|
6
3
|
interface BreadcrumbsNotFrontExtendedProps extends BreadcrumbsNotFrontProps {
|
|
7
4
|
userFlow: string;
|
|
8
5
|
pageId: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { HeaderNavigationNotFrontProps, ResolveComponentPropsMap } from '../../types';
|
|
3
|
+
export interface HeaderNavigationNotFrontExtendedProps extends HeaderNavigationNotFrontProps {
|
|
4
|
+
userFlow: string;
|
|
5
|
+
pageId: string;
|
|
6
|
+
onResolveComponentProps?: ResolveComponentPropsMap;
|
|
7
|
+
}
|
|
8
|
+
/** JSON adapter for both the page slot and nested component lists. */
|
|
9
|
+
declare const HeaderNavigationNotFront: FC<HeaderNavigationNotFrontExtendedProps>;
|
|
10
|
+
export default HeaderNavigationNotFront;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/avocado-not-front/src/components/header-navigation/useHeaderNavigationActions.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { HeaderNavigationNotFrontProps } from '../../types';
|
|
2
|
+
/** Adapts header navigation without retaining stale page or action configuration. */
|
|
3
|
+
export declare const useHeaderNavigationActions: (userFlow: string, pageId: string, responseKey: string, breadcrumbsItems: NonNullable<HeaderNavigationNotFrontProps['breadcrumbsItems']>, menuItems: NonNullable<HeaderNavigationNotFrontProps['menuItems']>) => {
|
|
4
|
+
breadcrumbs: BreadcrumbItem[];
|
|
5
|
+
menu: MenuItem[];
|
|
6
|
+
};
|
package/dist/avocado-not-front/src/components/header-navigation/useHeaderNavigationActions.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -21,6 +21,7 @@ import Divider from './divider/Divider';
|
|
|
21
21
|
import Drawer from './drawer/Drawer';
|
|
22
22
|
import DropdownButtonNotFront from './dropdown-button/DropdownButton';
|
|
23
23
|
import Header from './header/Header';
|
|
24
|
+
import HeaderNavigation from './header-navigation/HeaderNavigation';
|
|
24
25
|
import Link from './link/Link';
|
|
25
26
|
import MenuNotFront from './menu/Menu';
|
|
26
27
|
import Modal from './modal/Modal';
|
|
@@ -40,4 +41,4 @@ import Toast from './toast/Toast';
|
|
|
40
41
|
import Tooltip from './tooltip/Tooltip';
|
|
41
42
|
import { NotFrontPage } from './not-front-page/NotFrontPage';
|
|
42
43
|
import { RenderNotFront, renderNotFront, extractNotFrontComponents } from './render-not-front';
|
|
43
|
-
export { Accordion, AIChatPanel, AIPromptCodeEditor, AISummaryCard, Body, Box, RadioGroupNotFront, StepperNotFront, ProgressBarNotFront, Breadcrumbs, Button, CardAccordion, CardNotFront, CardNotification, Chart, Checkbox, CodeEditor, ContentWrapper, DataCard, Divider, Drawer, DropdownButtonNotFront, Header, Link, MenuNotFront, Modal, NotFrontPage, OverlayRenderer, RenderNotFront, renderNotFront, extractNotFrontComponents, Pill, PreviewerMarkdown, RoundButton, Row, Select, Spacing, Switch, Table, Tabs, Textarea, TextField, Toast, Tooltip, };
|
|
44
|
+
export { Accordion, AIChatPanel, AIPromptCodeEditor, AISummaryCard, Body, Box, RadioGroupNotFront, StepperNotFront, ProgressBarNotFront, Breadcrumbs, Button, CardAccordion, CardNotFront, CardNotification, Chart, Checkbox, CodeEditor, ContentWrapper, DataCard, Divider, Drawer, DropdownButtonNotFront, Header, HeaderNavigation, Link, MenuNotFront, Modal, NotFrontPage, OverlayRenderer, RenderNotFront, renderNotFront, extractNotFrontComponents, Pill, PreviewerMarkdown, RoundButton, Row, Select, Spacing, Switch, Table, Tabs, Textarea, TextField, Toast, Tooltip, };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,5 +7,5 @@ interface TableNotFrontExtendedProps extends TableNotFrontProps {
|
|
|
7
7
|
userFlow: string;
|
|
8
8
|
pageId: string;
|
|
9
9
|
}
|
|
10
|
-
declare const TableNotFront: ({ userFlow, pageId, responseKey, component, dataSource, rightActions, data: inlineData, pageSize, ...tableProps }: TableNotFrontExtendedProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const TableNotFront: ({ userFlow, pageId, responseKey, component, dataSource, rightActions, data: inlineData, pageSize, showRowsPerPage, pageSizeOptions, labelRowsPerPage, autoHeight, ...tableProps }: TableNotFrontExtendedProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
11
|
export default TableNotFront;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare const DEFAULT_TABLE_PAGE_SIZE = 10;
|
|
2
|
+
export declare const DEFAULT_TABLE_PAGE_SIZE_OPTIONS: number[];
|
|
3
|
+
/** Space reserved below the table for the offset pager (nav + rows-per-page row). */
|
|
4
|
+
export declare const PAGER_RESERVED_HEIGHT = 72;
|
|
5
|
+
/** Minimum scroll container height when the table sits low on the page. */
|
|
6
|
+
export declare const MIN_TABLE_HEIGHT = 120;
|
|
7
|
+
/**
|
|
8
|
+
* Resolves the initial rows-per-page value from JSON config and selectable options.
|
|
9
|
+
*
|
|
10
|
+
* Uses `pageSize` when it is listed in `pageSizeOptions`; otherwise falls back to
|
|
11
|
+
* the first option, or {@link DEFAULT_TABLE_PAGE_SIZE} when options are empty.
|
|
12
|
+
*
|
|
13
|
+
* @param pageSize - Optional page size from table JSON config.
|
|
14
|
+
* @param pageSizeOptions - Allowed values for the rows-per-page selector.
|
|
15
|
+
* @returns The page size used for the first fetch and pager display.
|
|
16
|
+
*/
|
|
17
|
+
export declare const resolveInitialPageSize: (pageSize: number | undefined, pageSizeOptions: number[]) => number;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
type ComputeAvailableHeightArgs = {
|
|
2
|
+
viewportHeight: number;
|
|
3
|
+
elementTop: number;
|
|
4
|
+
pagerReservedHeight?: number;
|
|
5
|
+
minTableHeight?: number;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Computes how much vertical space the table scroll container can use so the
|
|
9
|
+
* pager stays within the viewport.
|
|
10
|
+
*/
|
|
11
|
+
export declare const computeAvailableHeight: ({ viewportHeight, elementTop, pagerReservedHeight, minTableHeight, }: ComputeAvailableHeightArgs) => number;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type TableScrollLayout = {
|
|
2
|
+
maxHeight?: string | number;
|
|
3
|
+
stickyHeader: boolean;
|
|
4
|
+
};
|
|
5
|
+
type ResolveTableScrollLayoutArgs = {
|
|
6
|
+
maxHeight?: string | number;
|
|
7
|
+
stickyHeader?: boolean;
|
|
8
|
+
autoFitToViewport: boolean;
|
|
9
|
+
availableHeight?: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Resolves table scroll layout for EntityHub-style tables.
|
|
13
|
+
*
|
|
14
|
+
* David T.'s criterion: cap the table at the viewport space below it so the
|
|
15
|
+
* pager stays on screen. The suite scroll container grows with content up to
|
|
16
|
+
* that cap; overflow triggers internal scroll and the sticky header keeps
|
|
17
|
+
* column labels visible. Independent of rows-per-page (`autoFitToViewport`).
|
|
18
|
+
*/
|
|
19
|
+
export declare const resolveTableScrollLayout: ({ maxHeight, stickyHeader, autoFitToViewport, availableHeight, }: ResolveTableScrollLayoutArgs) => TableScrollLayout;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
type UseAvailableHeightArgs = {
|
|
2
|
+
enabled: boolean;
|
|
3
|
+
};
|
|
4
|
+
/**
|
|
5
|
+
* Measures the vertical space available for the table scroll container.
|
|
6
|
+
*
|
|
7
|
+
* EntityHub pages are JSON-driven and the table cannot assume a flex parent.
|
|
8
|
+
* David T.'s criterion: the table must not grow past the viewport — the pager
|
|
9
|
+
* stays visible and overflow scrolls inside the table. We measure from the
|
|
10
|
+
* container top to the viewport bottom, reserving {@link PAGER_RESERVED_HEIGHT}
|
|
11
|
+
* for the pager below. Recalculates on resize and layout changes, not scroll.
|
|
12
|
+
*/
|
|
13
|
+
export declare const useAvailableHeight: ({ enabled }: UseAvailableHeightArgs) => {
|
|
14
|
+
tableContainerRef: import("react").Dispatch<import("react").SetStateAction<HTMLDivElement | null>>;
|
|
15
|
+
availableHeight: number | undefined;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
import { AxiosResponse } from 'axios';
|
|
2
2
|
import { NotFrontDataSource } from '../types/componentsCore.type';
|
|
3
3
|
import { NextUIResponseData } from '../types/builder.type';
|
|
4
|
+
type GetNextUIFn = (userFlow: string, pageHash: string, entries: Record<string, unknown>, responseKey: string, showLoading?: boolean) => Promise<AxiosResponse<NextUIResponseData> | undefined>;
|
|
5
|
+
type FetchDataSourceFn = (dataSource: NotFrontDataSource, userFlow: string, showLoading?: boolean) => Promise<{
|
|
6
|
+
status?: number;
|
|
7
|
+
data?: unknown;
|
|
8
|
+
} | undefined>;
|
|
9
|
+
/**
|
|
10
|
+
* Runs the GET_DATA_SOURCE pipeline: next-ui fetch config, external request,
|
|
11
|
+
* session update, then next-ui re-render.
|
|
12
|
+
*
|
|
13
|
+
* Fetch results are stored under ``content.responseKey`` from the backend
|
|
14
|
+
* when present; otherwise the triggering component key is used.
|
|
15
|
+
*/
|
|
16
|
+
export declare function runGetDataSourceFlow(userFlow: string, pageHash: string, triggerKey: string, entries: Record<string, unknown>, getNextUI: GetNextUIFn, fetchDataSource: FetchDataSourceFn): Promise<void>;
|
|
4
17
|
/**
|
|
5
18
|
* Custom hook that encapsulates actions related to navigation and data fetching for dynamic UI flows.
|
|
6
19
|
*/
|
|
@@ -11,4 +24,6 @@ export declare const useAction: () => {
|
|
|
11
24
|
data: {};
|
|
12
25
|
} | undefined>;
|
|
13
26
|
fetchAndGetNextUI: (userFlow: string, pageHash: string, entries: any, responseKey: string, dataSource: NotFrontDataSource) => Promise<AxiosResponse<NextUIResponseData, any> | undefined>;
|
|
27
|
+
runGetDataSource: (userFlow: string, pageHash: string, triggerKey: string, entries: Record<string, unknown>) => Promise<void>;
|
|
14
28
|
};
|
|
29
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export interface BreadcrumbActionFields {
|
|
2
|
+
hashCode: string;
|
|
3
|
+
responseKey?: string;
|
|
4
|
+
}
|
|
5
|
+
/** Runs the shared next-UI pipeline for an interactive breadcrumb. */
|
|
6
|
+
export declare const useNotFrontBreadcrumbActionRunner: (userFlow: string, fallbackResponseKey: string) => ({ hashCode, responseKey }: BreadcrumbActionFields) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,8 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type ButtonActionFields
|
|
3
|
-
dataSource?: ButtonNotFrontProps['dataSource'];
|
|
4
|
-
redirectUrl?: string;
|
|
5
|
-
};
|
|
1
|
+
import type { ButtonActionFields } from '../types';
|
|
2
|
+
export type { ButtonActionFields } from '../types';
|
|
6
3
|
/**
|
|
7
4
|
* Runs the same NotFront action pipeline as {@link ButtonNotFront} for a
|
|
8
5
|
* single action bundle (e.g. one menu or dropdown row).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NotFrontComponent } from './components.type';
|
|
2
|
-
import { NotFrontDataSource } from './componentsCore.type';
|
|
1
|
+
import type { HeaderNavigationNotFrontProps, NotFrontComponent } from './components.type';
|
|
2
|
+
import type { NotFrontDataSource } from './componentsCore.type';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for the configuration required to interact with the API.
|
|
5
5
|
* This interface includes the necessary details for the API connection.
|
|
@@ -60,6 +60,8 @@ export interface ObjectNotFront {
|
|
|
60
60
|
*/
|
|
61
61
|
export type PageContent = {
|
|
62
62
|
type: 'page';
|
|
63
|
+
/** Full-width navigation banner, rendered after an explicit legacy header and before the body. */
|
|
64
|
+
headerNavigation?: HeaderNavigationNotFrontProps | null;
|
|
63
65
|
/**
|
|
64
66
|
* A collection of components to be rendered in the page.
|
|
65
67
|
* These components make up the structure of the page content.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, HeadingProps, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableColumn, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
1
|
+
import type { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, HeadingProps, HeaderNavigationVisual, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableColumn, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
2
2
|
import type { AiAgentTheme, ChatPanelTranslations, SuggestionType, SupportedLocale } from '../../../ai-agent';
|
|
3
3
|
import type { TooltipCoverageConfig } from '../components/chart/chart.types';
|
|
4
4
|
import type { ChartSeriesConfig, ChartYAxisConfig } from '../components/chart/chart.types';
|
|
@@ -11,6 +11,42 @@ export interface BoxNotFrontProps extends NotFrontBaseProps {
|
|
|
11
11
|
component: 'box';
|
|
12
12
|
content: NotFrontComponent[];
|
|
13
13
|
}
|
|
14
|
+
/** Navigation action using the existing breadcrumb field names. */
|
|
15
|
+
export type HeaderNavigationBreadcrumbNotFront = Pick<BreadcrumbsItemNotFront, 'title'> & ({
|
|
16
|
+
actionType?: never;
|
|
17
|
+
} | {
|
|
18
|
+
actionType: 'REDIRECT';
|
|
19
|
+
redirectUrl: string;
|
|
20
|
+
} | {
|
|
21
|
+
actionType: 'GO_TO_NEXT_UI';
|
|
22
|
+
hashCode: string;
|
|
23
|
+
responseKey?: string;
|
|
24
|
+
});
|
|
25
|
+
/** Serializable menu row, executed by the standard not-front button pipeline. */
|
|
26
|
+
export type ButtonActionFields = Pick<ButtonNotFrontProps, 'responseKey' | 'actionType' | 'dependencies'> & {
|
|
27
|
+
dataSource?: ButtonNotFrontProps['dataSource'];
|
|
28
|
+
redirectUrl?: string;
|
|
29
|
+
};
|
|
30
|
+
export interface HeaderNavigationMenuItemNotFront extends Omit<ButtonActionFields, 'actionType'>, Pick<ButtonNotFrontProps, 'content' | 'leftIcon'> {
|
|
31
|
+
label?: string;
|
|
32
|
+
actionType: Exclude<NotFrontActionType, 'GO_TO_NEXT_UI_WITHOUT_LOADING' | 'AUTOCLOSE_AND_REDIRECT'>;
|
|
33
|
+
}
|
|
34
|
+
/** Independent page banner; also usable inside component lists. */
|
|
35
|
+
export interface HeaderNavigationNotFrontProps extends NotFrontBaseProps {
|
|
36
|
+
component: 'headerNavigation';
|
|
37
|
+
title: string;
|
|
38
|
+
description?: string;
|
|
39
|
+
background?: 'default' | 'brand';
|
|
40
|
+
leadingVisual?: HeaderNavigationVisual;
|
|
41
|
+
pattern?: boolean | string;
|
|
42
|
+
menuLabel?: string;
|
|
43
|
+
menuDisabled?: boolean;
|
|
44
|
+
className?: string;
|
|
45
|
+
breadcrumbsItems?: HeaderNavigationBreadcrumbNotFront[];
|
|
46
|
+
menuItems?: HeaderNavigationMenuItemNotFront[];
|
|
47
|
+
/** Additional content such as a stepper. */
|
|
48
|
+
components?: NotFrontComponent[];
|
|
49
|
+
}
|
|
14
50
|
/**
|
|
15
51
|
* Interface for the props used in the ChartNotFront component.
|
|
16
52
|
*/
|
|
@@ -363,8 +399,8 @@ export interface PillNotFrontProps extends NotFrontBaseProps, Omit<PillProps, 'c
|
|
|
363
399
|
content: string;
|
|
364
400
|
/**
|
|
365
401
|
* Visual variant that applies predefined color schemes.
|
|
366
|
-
*
|
|
367
|
-
* Default: 'neutral'
|
|
402
|
+
* Resolves color, textColor, and iconColor from the filled or outlined palette
|
|
403
|
+
* depending on `outlined`. Default: 'neutral'
|
|
368
404
|
*/
|
|
369
405
|
variant?: 'success' | 'warning' | 'error' | 'info' | 'neutral';
|
|
370
406
|
}
|
|
@@ -542,14 +578,32 @@ export interface TableNotFrontProps extends NotFrontBaseProps, Omit<TableProps,
|
|
|
542
578
|
*/
|
|
543
579
|
data?: TableProps['data'];
|
|
544
580
|
/**
|
|
545
|
-
*
|
|
546
|
-
* number of rows exceeds
|
|
547
|
-
*
|
|
548
|
-
*
|
|
549
|
-
* Only applies to static `data`. It is ignored when `dataSource` is present
|
|
550
|
-
* (in that case pagination is server-driven via the response).
|
|
581
|
+
* Initial page size. For static `data`, enables client-side pagination when
|
|
582
|
+
* the number of rows exceeds this value. For `dataSource`, sent on the first
|
|
583
|
+
* request and kept in sync when the user changes rows per page.
|
|
551
584
|
*/
|
|
552
585
|
pageSize?: number;
|
|
586
|
+
/**
|
|
587
|
+
* Shows the rows-per-page selector in the pager. Only applies to offset
|
|
588
|
+
* pagination (not cursor). Default: false.
|
|
589
|
+
*/
|
|
590
|
+
showRowsPerPage?: boolean;
|
|
591
|
+
/**
|
|
592
|
+
* Caps the table scroll area to the viewport space below it so the pager
|
|
593
|
+
* stays on screen. Overflow uses internal scroll with a sticky header.
|
|
594
|
+
* Default: true (disabled for cursor pagination). Override with explicit
|
|
595
|
+
* `maxHeight` / `stickyHeader`.
|
|
596
|
+
*/
|
|
597
|
+
autoHeight?: boolean;
|
|
598
|
+
/**
|
|
599
|
+
* Options for the rows-per-page selector. The backend may override the
|
|
600
|
+
* default list. Default when omitted: `[10, 20, 50, 100]`.
|
|
601
|
+
*/
|
|
602
|
+
pageSizeOptions?: number[];
|
|
603
|
+
/**
|
|
604
|
+
* Label for the rows-per-page selector. Default: "Filas por página:".
|
|
605
|
+
*/
|
|
606
|
+
labelRowsPerPage?: string;
|
|
553
607
|
/**
|
|
554
608
|
* Data source to load data for table. Required when not providing static data.
|
|
555
609
|
*/
|
|
@@ -1302,7 +1356,7 @@ export interface AIPromptCodeEditorNotFrontProps extends NotFrontBaseProps {
|
|
|
1302
1356
|
/**
|
|
1303
1357
|
* Union type representing all possible NotFront component prop types.
|
|
1304
1358
|
*/
|
|
1305
|
-
export type NotFrontComponent = AccordionNotFrontProps | AIChatPanelNotFrontProps | AIPromptCodeEditorNotFrontProps | AISummaryCardNotFrontProps | BoxNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardAccordionNotFrontProps | CardNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DataCardNotFrontProps | DividerNotFrontProps | DrawerNotFrontProps | DropdownButtonNotFrontProps | HeadingNotFrontProps | LinkNotFrontProps | MenuNotFrontProps | ModalNotFrontProps | PillNotFrontProps | PreviewerMarkdownNotFrontProps | RadioGroupNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | StepperNotFrontProps | ProgressBarNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TabsNotFrontProps | TextareaNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps | TooltipNotFrontProps;
|
|
1359
|
+
export type NotFrontComponent = HeaderNavigationNotFrontProps | AccordionNotFrontProps | AIChatPanelNotFrontProps | AIPromptCodeEditorNotFrontProps | AISummaryCardNotFrontProps | BoxNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardAccordionNotFrontProps | CardNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DataCardNotFrontProps | DividerNotFrontProps | DrawerNotFrontProps | DropdownButtonNotFrontProps | HeadingNotFrontProps | LinkNotFrontProps | MenuNotFrontProps | ModalNotFrontProps | PillNotFrontProps | PreviewerMarkdownNotFrontProps | RadioGroupNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | StepperNotFrontProps | ProgressBarNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TabsNotFrontProps | TextareaNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps | TooltipNotFrontProps;
|
|
1306
1360
|
/**
|
|
1307
1361
|
* Resolved props for ChatPanel when delegated via onResolveComponentProps.
|
|
1308
1362
|
* These are the props that the consumer receives to render ChatPanel externally.
|
|
@@ -1353,6 +1407,7 @@ export type ResolveComponentPropsMap = {
|
|
|
1353
1407
|
* Mapping of component identifiers (as strings) to their corresponding prop types.
|
|
1354
1408
|
*/
|
|
1355
1409
|
export type NotFrontComponentTypeMap = {
|
|
1410
|
+
headerNavigation: HeaderNavigationNotFrontProps;
|
|
1356
1411
|
accordion: AccordionNotFrontProps;
|
|
1357
1412
|
aiChatPanel: AIChatPanelNotFrontProps;
|
|
1358
1413
|
aiPromptCodeEditor: AIPromptCodeEditorNotFrontProps;
|
|
@@ -9,7 +9,9 @@ export interface NotFrontBaseProps {
|
|
|
9
9
|
* - `FETCH_AND_GO_TO_NEXT_UI`: fetches the component's `dataSource`, then
|
|
10
10
|
* requests the next UI and re-renders the page.
|
|
11
11
|
* - `GET_DATA_SOURCE`: asks the backend for a fetch instruction via next-ui,
|
|
12
|
-
* executes it,
|
|
12
|
+
* executes it, stores the result under the fetch payload's `responseKey`
|
|
13
|
+
* (falling back to the triggering component key), then re-renders with the
|
|
14
|
+
* resulting next UI.
|
|
13
15
|
* - `FETCH_DATA_SOURCE`: side-effect only — fetches the component's
|
|
14
16
|
* `dataSource` and stores the result in entries as `{ status, content }`
|
|
15
17
|
* under the component's `responseKey`. No next-ui call, the current page
|
|
@@ -22,10 +24,15 @@ interface BaseDataSource {
|
|
|
22
24
|
headers?: Record<string, string>;
|
|
23
25
|
params?: any;
|
|
24
26
|
}
|
|
27
|
+
export type NotFrontPaginationKeys = {
|
|
28
|
+
page?: string;
|
|
29
|
+
text?: string;
|
|
30
|
+
size?: string;
|
|
31
|
+
};
|
|
25
32
|
export interface NotFrontDataSourceRest extends BaseDataSource {
|
|
26
33
|
type: 'rest';
|
|
27
34
|
data?: any;
|
|
28
|
-
paginationKeys?:
|
|
35
|
+
paginationKeys?: NotFrontPaginationKeys;
|
|
29
36
|
}
|
|
30
37
|
export interface NotFrontDataSourceGraphQL extends BaseDataSource {
|
|
31
38
|
type: 'graphql';
|
|
@@ -13,9 +13,10 @@ export declare const normalizeHttpMethod: (method: string | undefined) => NotFro
|
|
|
13
13
|
* @param dataSource - The REST data source configuration.
|
|
14
14
|
* @param page - The current pagination page number.
|
|
15
15
|
* @param search - Optional search term to include as a query parameter.
|
|
16
|
+
* @param pageSize - Optional page size to include as a query parameter.
|
|
16
17
|
* @returns {string} The complete URL with all query parameters combined.
|
|
17
18
|
*/
|
|
18
|
-
export declare const buildQueryParams: (dataSource: NotFrontDataSourceRest, page: number, search?: string) => string;
|
|
19
|
+
export declare const buildQueryParams: (dataSource: NotFrontDataSourceRest, page: number, search?: string, pageSize?: number) => string;
|
|
19
20
|
/**
|
|
20
21
|
* Utility to build a normalized NotFrontDataSource object for REST or GraphQL requests.
|
|
21
22
|
*
|
|
@@ -28,8 +29,9 @@ export declare const buildQueryParams: (dataSource: NotFrontDataSourceRest, page
|
|
|
28
29
|
* @param page - The page number for pagination (default: 1)
|
|
29
30
|
* @param search - Optional search string (used for filtering, e.g., in selects)
|
|
30
31
|
* @param cursorPayload - Optional cursor object built from the previous response; merged into the REST request `data` after the flow's original `data`.
|
|
32
|
+
* @param pageSize - Optional page size sent with pagination requests.
|
|
31
33
|
* @returns A NotFrontDataSource object ready for fetchDataSource
|
|
32
34
|
* @throws If the dataSource type is not supported
|
|
33
35
|
*/
|
|
34
|
-
export declare const buildRequestDataSource: (dataSource: NotFrontDataSource, page: number, search?: string, cursorPayload?: Record<string, unknown> | null) => NotFrontDataSource;
|
|
36
|
+
export declare const buildRequestDataSource: (dataSource: NotFrontDataSource, page: number, search?: string, cursorPayload?: Record<string, unknown> | null, pageSize?: number) => NotFrontDataSource;
|
|
35
37
|
export {};
|
|
@@ -15,6 +15,15 @@ export declare const PILL_VARIANT_COLORS: Record<TablePillVariant, TablePillColo
|
|
|
15
15
|
* border. Each variant gets a solid border token and a readable text token.
|
|
16
16
|
*/
|
|
17
17
|
export declare const PILL_OUTLINED_VARIANT_COLORS: Record<TablePillVariant, TablePillColors>;
|
|
18
|
+
/**
|
|
19
|
+
* The tokens a pill of this variant needs, filled or outlined.
|
|
20
|
+
*
|
|
21
|
+
* `Pill` paints `color` as the border when `outlined` is set, so the two looks
|
|
22
|
+
* cannot share a table: the filled tokens would draw a border the user cannot
|
|
23
|
+
* see. Every caller that renders a pill from a variant has to go through here,
|
|
24
|
+
* or the outlined look silently degrades to an invisible outline.
|
|
25
|
+
*/
|
|
26
|
+
export declare const resolvePillColors: (variant: TablePillVariant, outlined?: boolean) => TablePillColors;
|
|
18
27
|
export declare const TABLE_PILL_OUTLINED_TOKEN = "outlined";
|
|
19
28
|
export declare const isTablePillVariant: (value: unknown) => value is "success" | "warning" | "error" | "info" | "neutral";
|
|
20
29
|
export type ParsedTablePill = {
|