@foris/avocado-not-front 8.0.1 → 8.0.2
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/body/Body.d.ts +1 -0
- package/dist/avocado-not-front/src/components/contextual-navigation/ContextualNavigation.d.ts +9 -0
- package/dist/avocado-not-front/src/components/contextual-navigation/ContextualNavigation.test.d.ts +1 -0
- package/dist/avocado-not-front/src/components/contextual-navigation/useContextualNavigationActions.d.ts +7 -0
- package/dist/avocado-not-front/src/components/contextual-navigation/useContextualNavigationActions.test.d.ts +1 -0
- package/dist/avocado-not-front/src/hooks/builder/useBuilder.d.ts +5 -1
- package/dist/avocado-not-front/src/types/builder.type.d.ts +3 -1
- package/dist/avocado-not-front/src/types/components.type.d.ts +15 -4
- package/dist/avocado-not-front.es.js +772 -719
- package/dist/avocado-not-front.umd.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import type { FC, ReactNode } from 'react';
|
|
|
2
2
|
import type { ObjectNotFront } from '../../types';
|
|
3
3
|
interface BodyProps extends ObjectNotFront {
|
|
4
4
|
inputs: ReactNode[];
|
|
5
|
+
embedded?: boolean;
|
|
5
6
|
}
|
|
6
7
|
/**
|
|
7
8
|
* Body component that renders a list of dynamic components inside a section.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { FC, ReactNode } from 'react';
|
|
2
|
+
import type { ContextualNavigationNotFrontProps } from '../../types';
|
|
3
|
+
export interface ContextualNavigationNotFrontExtendedProps extends ContextualNavigationNotFrontProps {
|
|
4
|
+
userFlow: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** JSON adapter for the page `contextualNavigation` slot. */
|
|
8
|
+
declare const ContextualNavigationNotFront: FC<ContextualNavigationNotFrontExtendedProps>;
|
|
9
|
+
export default ContextualNavigationNotFront;
|
package/dist/avocado-not-front/src/components/contextual-navigation/ContextualNavigation.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { MouseEvent } from 'react';
|
|
2
|
+
import type { ContextualNavigationNotFrontProps } from '../../types';
|
|
3
|
+
/** Maps JSON destinations to suite items and wires breadcrumb-style actions. */
|
|
4
|
+
export declare const useContextualNavigationActions: (userFlow: string, responseKey: string, sections?: ContextualNavigationNotFrontProps['sections']) => {
|
|
5
|
+
sections: ContextualNavigationItem[][];
|
|
6
|
+
onItemClick: (item: ContextualNavigationItem, event: MouseEvent<HTMLElement>) => void;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,10 @@ import type { ObjectNotFront, ResolveComponentPropsMap } from '../../types';
|
|
|
7
7
|
* @param pageId - The current page identifier.
|
|
8
8
|
* @param type - Indicates whether to render a 'body', 'header'.
|
|
9
9
|
* @param notFrontObject - The configuration object containing component data.
|
|
10
|
+
* @param options.embedded - Renders the body without its own page padding.
|
|
10
11
|
* @returns A rendered Header, Body or Components with its child components or null if the type is unrecognized.
|
|
11
12
|
*/
|
|
12
|
-
export declare const useBuilder: (userFlow: string, pageId: string, type: 'body' | 'header', notFrontObject: ObjectNotFront | null, onResolveComponentProps
|
|
13
|
+
export declare const useBuilder: (userFlow: string, pageId: string, type: 'body' | 'header', notFrontObject: ObjectNotFront | null, { onResolveComponentProps, embedded, }?: {
|
|
14
|
+
onResolveComponentProps?: ResolveComponentPropsMap | undefined;
|
|
15
|
+
embedded?: boolean | undefined;
|
|
16
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { HeaderNavigationNotFrontProps, NotFrontComponent } from './components.type';
|
|
1
|
+
import type { ContextualNavigationNotFrontProps, HeaderNavigationNotFrontProps, NotFrontComponent } from './components.type';
|
|
2
2
|
import type { NotFrontDataSource } from './componentsCore.type';
|
|
3
3
|
/**
|
|
4
4
|
* Interface for the configuration required to interact with the API.
|
|
@@ -62,6 +62,8 @@ export type PageContent = {
|
|
|
62
62
|
type: 'page';
|
|
63
63
|
/** Full-width navigation banner, rendered after an explicit legacy header and before the body. */
|
|
64
64
|
headerNavigation?: HeaderNavigationNotFrontProps | null;
|
|
65
|
+
/** Optional L2 sidebar navigation wrapping the built body. */
|
|
66
|
+
contextualNavigation?: ContextualNavigationNotFrontProps | null;
|
|
65
67
|
/**
|
|
66
68
|
* A collection of components to be rendered in the page.
|
|
67
69
|
* These components make up the structure of the page content.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, DropzoneUploadStatus, FileUploadProps, HeadingProps, HeaderNavigationVisual, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableColumn, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
|
|
1
|
+
import type { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, ContextualNavigationItem, DataCardPaletteIndex, DataCardV2HeaderStyle, DataCardV2Status, DividerProps, DrawerProps, DropzoneUploadStatus, FileUploadProps, 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,8 +11,8 @@ export interface BoxNotFrontProps extends NotFrontBaseProps {
|
|
|
11
11
|
component: 'box';
|
|
12
12
|
content: NotFrontComponent[];
|
|
13
13
|
}
|
|
14
|
-
/** Navigation action
|
|
15
|
-
export type
|
|
14
|
+
/** Navigation action shared by breadcrumbs and sidebar destinations; no action means inert. */
|
|
15
|
+
export type NotFrontNavigationAction = {
|
|
16
16
|
actionType?: never;
|
|
17
17
|
} | {
|
|
18
18
|
actionType: 'REDIRECT';
|
|
@@ -21,7 +21,9 @@ export type HeaderNavigationBreadcrumbNotFront = Pick<BreadcrumbsItemNotFront, '
|
|
|
21
21
|
actionType: 'GO_TO_NEXT_UI';
|
|
22
22
|
hashCode: string;
|
|
23
23
|
responseKey?: string;
|
|
24
|
-
}
|
|
24
|
+
};
|
|
25
|
+
/** Header breadcrumb using the existing breadcrumb field names. */
|
|
26
|
+
export type HeaderNavigationBreadcrumbNotFront = Pick<BreadcrumbsItemNotFront, 'title'> & NotFrontNavigationAction;
|
|
25
27
|
/** Serializable menu row, executed by the standard not-front button pipeline. */
|
|
26
28
|
export type ButtonActionFields = Pick<ButtonNotFrontProps, 'responseKey' | 'actionType' | 'dependencies'> & {
|
|
27
29
|
dataSource?: ButtonNotFrontProps['dataSource'];
|
|
@@ -47,6 +49,15 @@ export interface HeaderNavigationNotFrontProps extends NotFrontBaseProps {
|
|
|
47
49
|
/** Additional content such as a stepper. */
|
|
48
50
|
components?: NotFrontComponent[];
|
|
49
51
|
}
|
|
52
|
+
/** Serializable destination; `REDIRECT` becomes the suite item's `href`. */
|
|
53
|
+
export type ContextualNavigationItemNotFront = Omit<ContextualNavigationItem, 'href'> & NotFrontNavigationAction;
|
|
54
|
+
/** Page-slot sidebar navigation; not a `body.components` entry. */
|
|
55
|
+
export interface ContextualNavigationNotFrontProps extends NotFrontBaseProps {
|
|
56
|
+
sections: ContextualNavigationItemNotFront[][];
|
|
57
|
+
activeId?: string;
|
|
58
|
+
persistenceKey?: string;
|
|
59
|
+
ariaLabel?: string;
|
|
60
|
+
}
|
|
50
61
|
/**
|
|
51
62
|
* Interface for the props used in the ChartNotFront component.
|
|
52
63
|
*/
|