@foris/avocado-not-front 8.0.0 → 8.0.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.
@@ -0,0 +1,9 @@
1
+ import type { FC } from 'react';
2
+ import type { FileUploadNotFrontProps } from '../../types';
3
+ interface FileUploadNotFrontExtendedProps extends FileUploadNotFrontProps {
4
+ userFlow: string;
5
+ pageId: string;
6
+ }
7
+ /** Binds suite FileUpload to `entries[responseKey]`; see `.agents/rules/packages/avocado-not-front.md`. */
8
+ declare const FileUploadNotFront: FC<FileUploadNotFrontExtendedProps>;
9
+ export default FileUploadNotFront;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Maps not-front `rule1` / optional `rule2` JSON fields to suite `rules`.
3
+ * Empty or whitespace-only strings are omitted.
4
+ */
5
+ export declare const buildFileUploadRules: (rule1: string, rule2?: string) => string[];
@@ -0,0 +1 @@
1
+ export { default as FileUploadNotFront } from './FileUpload';
@@ -19,6 +19,7 @@ import ContentWrapper from './content-wrapper/ContentWrapper';
19
19
  import DataCard from './data-card/DataCard';
20
20
  import Divider from './divider/Divider';
21
21
  import Drawer from './drawer/Drawer';
22
+ import FileUploadNotFront from './file-upload/FileUpload';
22
23
  import DropdownButtonNotFront from './dropdown-button/DropdownButton';
23
24
  import Header from './header/Header';
24
25
  import HeaderNavigation from './header-navigation/HeaderNavigation';
@@ -41,4 +42,4 @@ import Toast from './toast/Toast';
41
42
  import Tooltip from './tooltip/Tooltip';
42
43
  import { NotFrontPage } from './not-front-page/NotFrontPage';
43
44
  import { RenderNotFront, renderNotFront, extractNotFrontComponents } from './render-not-front';
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, };
45
+ export { Accordion, AIChatPanel, AIPromptCodeEditor, AISummaryCard, Body, Box, RadioGroupNotFront, StepperNotFront, ProgressBarNotFront, Breadcrumbs, Button, CardAccordion, CardNotFront, CardNotification, Chart, Checkbox, CodeEditor, ContentWrapper, DataCard, Divider, Drawer, FileUploadNotFront, DropdownButtonNotFront, Header, HeaderNavigation, Link, MenuNotFront, Modal, NotFrontPage, OverlayRenderer, RenderNotFront, renderNotFront, extractNotFrontComponents, Pill, PreviewerMarkdown, RoundButton, Row, Select, Spacing, Switch, Table, Tabs, Textarea, TextField, Toast, Tooltip, };
@@ -1,4 +1,4 @@
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';
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';
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';
@@ -258,6 +258,20 @@ export interface DividerNotFrontProps extends NotFrontBaseProps, DividerProps {
258
258
  /** Set the position vertical */
259
259
  vertical?: boolean;
260
260
  }
261
+ /**
262
+ * Interface for the props used in the FileUploadNotFront component.
263
+ */
264
+ export interface FileUploadNotFrontProps extends NotFrontBaseProps, Omit<FileUploadProps, 'file' | 'rules' | 'onFileChange' | 'onRemove' | 'onTemplateLinkClick' | 'templateHref' | 'disabled' | 'uploadStatus' | 'notificationVisible'> {
265
+ component: 'fileUpload';
266
+ rule1: string;
267
+ rule2?: string;
268
+ disabled?: boolean;
269
+ uploadStatus?: DropzoneUploadStatus;
270
+ notificationVisible?: boolean;
271
+ templateRedirectUrl?: string;
272
+ templateTarget?: '_blank' | '_self';
273
+ dependencies?: NotFrontDependency[];
274
+ }
261
275
  /**
262
276
  * Interface for the props used in the HeadingNotFront component.
263
277
  */
@@ -1356,7 +1370,7 @@ export interface AIPromptCodeEditorNotFrontProps extends NotFrontBaseProps {
1356
1370
  /**
1357
1371
  * Union type representing all possible NotFront component prop types.
1358
1372
  */
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;
1373
+ export type NotFrontComponent = HeaderNavigationNotFrontProps | AccordionNotFrontProps | AIChatPanelNotFrontProps | AIPromptCodeEditorNotFrontProps | AISummaryCardNotFrontProps | BoxNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardAccordionNotFrontProps | CardNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DataCardNotFrontProps | DividerNotFrontProps | DrawerNotFrontProps | DropdownButtonNotFrontProps | FileUploadNotFrontProps | HeadingNotFrontProps | LinkNotFrontProps | MenuNotFrontProps | ModalNotFrontProps | PillNotFrontProps | PreviewerMarkdownNotFrontProps | RadioGroupNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | StepperNotFrontProps | ProgressBarNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TabsNotFrontProps | TextareaNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps | TooltipNotFrontProps;
1360
1374
  /**
1361
1375
  * Resolved props for ChatPanel when delegated via onResolveComponentProps.
1362
1376
  * These are the props that the consumer receives to render ChatPanel externally.
@@ -1428,6 +1442,7 @@ export type NotFrontComponentTypeMap = {
1428
1442
  divider: DividerNotFrontProps;
1429
1443
  drawer: DrawerNotFrontProps;
1430
1444
  dropdownButton: DropdownButtonNotFrontProps;
1445
+ fileUpload: FileUploadNotFrontProps;
1431
1446
  heading: HeadingNotFrontProps;
1432
1447
  link: LinkNotFrontProps;
1433
1448
  menu: MenuNotFrontProps;