@foris/avocado-not-front 4.3.3 → 4.5.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.
@@ -1,6 +1,13 @@
1
- import { ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DividerProps, HeadingProps, LinkProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableProps, TextFieldProps, TextProps, ModalProps, AccordionProps, DrawerProps, TabsProps } from '../../../avocado-suite';
2
- import type { AiAgentTheme, SupportedLocale, ChatPanelTranslations, SuggestionType } from '../../../ai-agent';
1
+ import { AccordionProps, ButtonProps, CardAccordionProps, CardNotificationProps, CheckboxProps, DividerProps, DrawerProps, HeadingProps, LinkProps, ModalProps, PillProps, PreviewerMarkdownProps, RoundButtonProps, SelectProps, SwitchProps, TableProps, TabsProps, TextareaProps, TextFieldProps, TextProps } from '../../../avocado-suite';
2
+ import type { AiAgentTheme, ChatPanelTranslations, SuggestionType, SupportedLocale } from '../../../ai-agent';
3
3
  import { NotFrontActionType, NotFrontBaseProps, NotFrontDataSource, NotFrontDataSourceChart, NotFrontDataSourceRest, NotFrontDataSourceSelect, NotFrontDataSourceTable, NotFrontDependency } from './componentsCore.type';
4
+ /**
5
+ * Suite `Box`: single `content` slot; `darkMode` is derived in the wrapper.
6
+ */
7
+ export interface BoxNotFrontProps extends NotFrontBaseProps {
8
+ component: 'box';
9
+ content: NotFrontComponent[];
10
+ }
4
11
  /**
5
12
  * Represents a single breadcrumb item for the NotFront component
6
13
  */
@@ -66,6 +73,10 @@ export interface ButtonNotFrontProps extends NotFrontBaseProps, ButtonProps {
66
73
  * Conditions based on other fields that control this component's behavior.
67
74
  */
68
75
  dependencies?: NotFrontDependency[];
76
+ /** Suite `Button` left icon (exposed for menu/dropdown row mapping). */
77
+ leftIcon?: ButtonProps['leftIcon'];
78
+ /** Suite `Button` right icon. */
79
+ rightIcon?: ButtonProps['rightIcon'];
69
80
  }
70
81
  /**
71
82
  * Interface for the props used in the CardNotificationNotFront component.
@@ -283,6 +294,8 @@ export interface DataCardNotFrontProps extends NotFrontBaseProps {
283
294
  content?: NotFrontComponent[];
284
295
  /** Top band: nested blocks (maps to suite `topContent`). */
285
296
  topContent?: NotFrontComponent[];
297
+ dependencies?: NotFrontDependency[];
298
+ disabled?: boolean;
286
299
  }
287
300
  /**
288
301
  * Interface for the props used in the PillNotFront component.
@@ -483,6 +496,14 @@ export interface TextFieldNotFrontProps extends NotFrontBaseProps, TextFieldProp
483
496
  */
484
497
  dependencies?: NotFrontDependency[];
485
498
  }
499
+ /**
500
+ * Multiline text field wired to the NotFront store (same pattern as `textField`).
501
+ */
502
+ export interface TextareaNotFrontProps extends NotFrontBaseProps, Omit<TextareaProps, 'className' | 'onChange'> {
503
+ component: 'textarea';
504
+ required: boolean;
505
+ dependencies?: NotFrontDependency[];
506
+ }
486
507
  /**
487
508
  * One tab panel: label for the tab control and nested NotFront components for the panel body.
488
509
  * The backend should send every tab’s `components` in the same page payload; switching tabs
@@ -553,127 +574,732 @@ export interface AccordionNotFrontProps extends NotFrontBaseProps, Omit<Accordio
553
574
  actionContent?: NotFrontComponent[];
554
575
  components: NotFrontComponent[];
555
576
  }
577
+ export interface RadioGroupItemNotFront {
578
+ label: string;
579
+ value: string;
580
+ disabled?: boolean;
581
+ }
556
582
  /**
557
- * Suite `CardAccordion`: collapsible panel with optional header actions and nested
558
- * body slots. JSON uses `content` for the collapsible region and `actionContent`
559
- * for header actions; `opened` matches suite initial-open behaviour only.
583
+ * Represents a single breadcrumb item for the NotFront component
560
584
  */
561
- export interface CardAccordionNotFrontProps extends NotFrontBaseProps, Omit<CardAccordionProps, 'children' | 'actionContent' | 'description'> {
562
- component: 'cardAccordion';
563
- description?: string;
564
- dependencies?: NotFrontDependency[];
565
- content?: NotFrontComponent[];
566
- actionContent?: NotFrontComponent[];
585
+ export interface BreadcrumbsItemNotFront {
586
+ /**
587
+ * Visible label of the breadcrumb item.
588
+ */
589
+ title: string;
590
+ /**
591
+ * Type of action to be triggered when the breadcrumb is clicked.
592
+ */
593
+ actionType: NotFrontActionType;
594
+ /**
595
+ * Optional URL to redirect the user when the breadcrumb is clicked.
596
+ * Used only if `actionType` is `REDIRECT`.
597
+ */
598
+ redirectUrl: string;
599
+ /**
600
+ * Unique page identifier associated with this breadcrumb
601
+ */
602
+ hashCode: string;
567
603
  }
568
604
  /**
569
- * Interface for the props used in the AISummaryCardNotFront component.
605
+ * Interface for the props used in the ButtonNotFrontProps component.
570
606
  */
571
- export interface AISummaryCardNotFrontProps extends NotFrontBaseProps {
572
- component: 'aiSummaryCard';
573
- dataSource: NotFrontDataSource;
574
- /** Locale for default translations. Defaults to "en" if not provided. */
575
- locale?: SupportedLocale;
576
- /** Labels for title, loading and empty state. All keys are optional; defaults are used when omitted. */
577
- translations?: {
578
- title?: string;
579
- loading?: string;
580
- noData?: string;
581
- };
607
+ export interface BreadcrumbsNotFrontProps extends NotFrontBaseProps {
608
+ /**
609
+ * Identifier to specify that this is a breadcrumbs component.
610
+ */
611
+ component: 'breadcrumbs';
612
+ /**
613
+ * List of breadcrumb items to render in order.
614
+ */
615
+ items: BreadcrumbsItemNotFront[];
582
616
  }
583
- export interface AIChatPanelNotFrontProps extends NotFrontBaseProps {
584
- component: 'aiChatPanel';
617
+ /**
618
+ * Interface for the props used in the ButtonNotFrontProps component.
619
+ */
620
+ export interface ButtonNotFrontProps extends NotFrontBaseProps, ButtonProps {
621
+ component: 'button';
622
+ /**
623
+ * Defines the action triggered when the button is clicked.
624
+ */
625
+ actionType: NotFrontActionType;
626
+ /**
627
+ * The content inside the Button component.
628
+ */
629
+ content?: string;
630
+ /**
631
+ * @deprecated Use `content` instead.
632
+ * Retained for backward compatibility with legacy backend responses.
633
+ */
634
+ label?: string;
635
+ /**
636
+ * Optional data source used when the actionType involves fetching data.
637
+ */
585
638
  dataSource: NotFrontDataSource;
586
- /** Locale for default translations. Defaults to "en" if not provided. */
587
- locale?: 'en' | 'es';
588
- /** Labels for customizable text. All keys are optional; defaults are used when omitted. */
589
- translations?: ChatPanelTranslations;
590
- /** Initial suggestion cards shown in the welcome screen. */
591
- initialSuggestions?: SuggestionType[];
639
+ /**
640
+ * Optional URL to redirect the user.
641
+ */
642
+ redirectUrl: string;
643
+ /**
644
+ * Conditions based on other fields that control this component's behavior.
645
+ */
646
+ dependencies?: NotFrontDependency[];
647
+ /** Suite `Button` left icon (exposed for menu/dropdown row mapping). */
648
+ leftIcon?: ButtonProps['leftIcon'];
649
+ /** Suite `Button` right icon. */
650
+ rightIcon?: ButtonProps['rightIcon'];
592
651
  }
593
652
  /**
594
- * Interface for the props used in the AIPromptCodeEditorNotFront component.
653
+ * Interface for the props used in the CardNotificationNotFront component.
595
654
  */
596
- export interface AIPromptCodeEditorNotFrontProps extends NotFrontBaseProps {
597
- component: 'aiPromptCodeEditor';
598
- dataSource: NotFrontDataSourceRest;
599
- inputLabel?: string;
600
- inputPlaceholder?: string;
601
- codeBlockLabel?: string;
602
- codeBlockValue?: string;
603
- language?: string;
604
- disabled?: boolean;
605
- dependencies?: NotFrontDependency[];
655
+ export interface CardNotificationNotFrontProps extends NotFrontBaseProps, CardNotificationProps {
656
+ component: 'cardNotification';
657
+ /**
658
+ * The content to be displayed inside the CardNotification component.
659
+ * This property is optional and represents the main text or message of the notification.
660
+ */
661
+ content?: string;
662
+ /**
663
+ * @deprecated Use `content` instead.
664
+ * This property will be removed in the future once the backend stops sending it.
665
+ * Currently kept for backward compatibility with existing implementations.
666
+ */
667
+ description?: string;
606
668
  }
607
669
  /**
608
- * Union type representing all possible NotFront component prop types.
670
+ * Interface for the props used in the ChartNotFront component.
609
671
  */
610
- export type NotFrontComponent = AccordionNotFrontProps | AIChatPanelNotFrontProps | AISummaryCardNotFrontProps | AIPromptCodeEditorNotFrontProps | BreadcrumbsNotFrontProps | ButtonNotFrontProps | CardAccordionNotFrontProps | CardNotificationNotFrontProps | ChartNotFrontProps | DataCardNotFrontProps | CheckboxNotFrontProps | CodeEditorNotFrontProps | DividerNotFrontProps | DrawerNotFrontProps | HeadingNotFrontProps | LinkNotFrontProps | ModalNotFrontProps | PillNotFrontProps | PreviewerMarkdownNotFrontProps | RoundButtonNotFrontProps | RowNotFrontProps | SelectNotFrontProps | SpacingNotFrontProps | SwitchNotFrontProps | TableNotFrontProps | TabsNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps;
672
+ export interface ChartNotFrontProps extends NotFrontBaseProps {
673
+ component: 'chart';
674
+ /** Chart type */
675
+ type: 'area' | 'bar' | 'line' | 'pie';
676
+ /** Data source to load data for chart. */
677
+ dataSource: NotFrontDataSourceChart;
678
+ /** Chart data */
679
+ data: any;
680
+ /** Key for the x-axis */
681
+ xKey: string;
682
+ /** Keys for the y-axis */
683
+ yKeys: string[];
684
+ }
611
685
  /**
612
- * Resolved props for ChatPanel when delegated via onResolveComponentProps.
613
- * These are the props that the consumer receives to render ChatPanel externally.
686
+ * Interface for the props used in the CheckboxNotFront component.
614
687
  */
615
- export interface ChatPanelResolvedProps {
616
- dataSource: {
617
- url: string;
618
- method?: string;
619
- headers?: Record<string, string>;
620
- params?: unknown;
621
- };
622
- locale: 'en' | 'es';
623
- translations: Record<string, string>;
624
- initialSuggestions?: SuggestionType[];
625
- theme: AiAgentTheme;
688
+ export interface CheckboxNotFrontProps extends NotFrontBaseProps, CheckboxProps {
689
+ component: 'checkbox';
690
+ /**
691
+ * Defines the action triggered when the button is clicked.
692
+ */
693
+ actionType: NotFrontActionType;
694
+ /**
695
+ * The text label displayed next to the checkbox.
696
+ */
697
+ label: string;
698
+ /**
699
+ * Indicates if the checkbox input is mandatory.
700
+ */
701
+ required: boolean;
702
+ /**
703
+ * Determines if the checkbox is initially checked.
704
+ */
705
+ value: boolean;
706
+ /**
707
+ * Conditions based on other fields that control this component's behavior.
708
+ */
709
+ dependencies?: NotFrontDependency[];
626
710
  }
627
711
  /**
628
- * Resolved props for SummaryCard when delegated via onResolveComponentProps.
629
- * These are the props that the consumer receives to render SummaryCard externally.
712
+ * Interface for the props used in the CodeEditorNotFront component.
630
713
  */
631
- export interface SummaryCardResolvedProps {
632
- dataSource: {
633
- url: string;
634
- method?: string;
635
- headers?: Record<string, string>;
636
- body?: unknown;
637
- };
638
- locale: 'en' | 'es';
639
- translations: Record<string, string>;
714
+ export interface CodeEditorNotFrontProps extends NotFrontBaseProps {
715
+ component: 'code';
716
+ /**
717
+ * Disabled state.
718
+ */
719
+ disabled?: boolean;
720
+ /**
721
+ * The label shown above the code editor input.
722
+ */
723
+ label?: string;
724
+ /**
725
+ * Initial or current value of the code editor. Could be string or parsed object.
726
+ */
727
+ value: any;
728
+ /**
729
+ * Placeholder text displayed when the editor is empty.
730
+ */
731
+ placeholder: string;
732
+ /**
733
+ * Indicates whether the code editor input is mandatory.
734
+ */
735
+ required: boolean;
736
+ /**
737
+ * Programming language for syntax highlighting (e.g., 'yaml', 'json', 'sql','markdown').
738
+ */
739
+ language: string;
740
+ /**
741
+ * Conditions based on other fields that control this component's behavior.
742
+ */
743
+ dependencies?: NotFrontDependency[];
744
+ /**
745
+ * Enable the preview for a markdown type.
746
+ */
747
+ showPreview?: boolean;
640
748
  }
641
749
  /**
642
- * Maps delegable component types to their resolved props.
643
- * Extend this interface to add new delegable components.
750
+ * Interface for the props used in the DividerNotFront component.
644
751
  */
645
- export interface ResolvableComponentMap {
646
- aiChatPanel: ChatPanelResolvedProps;
647
- aiSummaryCard: SummaryCardResolvedProps;
752
+ export interface DividerNotFrontProps extends NotFrontBaseProps, DividerProps {
753
+ component: 'divider';
754
+ /** Disabled state */
755
+ disabled?: boolean;
756
+ /** Set the position vertical */
757
+ vertical?: boolean;
648
758
  }
649
759
  /**
650
- * Optional callbacks for components that the consumer wants to render externally.
651
- * When a callback is provided for a component type, that component will call
652
- * the callback with its resolved props and return null instead of rendering.
760
+ * Interface for the props used in the HeadingNotFront component.
653
761
  */
654
- export type ResolveComponentPropsMap = {
655
- [K in keyof ResolvableComponentMap]?: (props: ResolvableComponentMap[K]) => void;
656
- };
762
+ export interface HeadingNotFrontProps extends NotFrontBaseProps, HeadingProps {
763
+ component: 'heading';
764
+ /**
765
+ * The content to be displayed inside the Heading component.
766
+ * This property is optional and represents the text or content shown in the heading.
767
+ */
768
+ content?: string;
769
+ /**
770
+ * The visual and semantic variant of the heading.
771
+ * Defines the HTML tag and appearance of the heading element.
772
+ */
773
+ variant?: 'h1' | 'h2' | 'h3' | 'h4';
774
+ }
657
775
  /**
658
- * Mapping of component identifiers (as strings) to their corresponding prop types.
776
+ * Interface for the props used in the LinkNotFront component.
777
+ */
778
+ export interface LinkNotFrontProps extends NotFrontBaseProps, Omit<LinkProps, 'children' | 'onClick'> {
779
+ component: 'link';
780
+ /**
781
+ * The content inside the Link component.
782
+ */
783
+ content?: string;
784
+ /**
785
+ * Defines the action triggered when the link is clicked.
786
+ */
787
+ actionType?: NotFrontActionType;
788
+ /**
789
+ * Optional URL to redirect the user.
790
+ */
791
+ redirectUrl?: string;
792
+ /**
793
+ * Conditions based on other fields that control this component's behavior.
794
+ */
795
+ dependencies?: NotFrontDependency[];
796
+ }
797
+ /**
798
+ * Interface for the props used in the ModalNotFront component.
799
+ */
800
+ export interface ModalNotFrontProps extends NotFrontBaseProps, ModalProps {
801
+ /**
802
+ * Identifier to specify that this is a modal component.
803
+ */
804
+ component: 'modal';
805
+ /**
806
+ * The content to be rendered in the header section of the modal.
807
+ * This value should reference a `hash` or a key used by el backend
808
+ * to map a predefined layout structure (e.g., a heading component).
809
+ */
810
+ header: string | NotFrontComponent[];
811
+ /**
812
+ * Optional status color used to visually indicate the modal's purpose or state (e.g., 'info', 'warning', 'error').
813
+ * Typically used as a color accent in the header section.
814
+ */
815
+ headerStatusColor?: string;
816
+ /**
817
+ * The content to be rendered in the body section of the modal.
818
+ * This typically includes informational text, inputs, alerts, etc.
819
+ */
820
+ body: NotFrontComponent[];
821
+ /**
822
+ * The content to be rendered in the footer section of the modal.
823
+ * This usually contains buttons such as "Save" or "Cancel".
824
+ */
825
+ footer: NotFrontComponent[];
826
+ }
827
+ export interface RadioGroupItemNotFront {
828
+ label: string;
829
+ value: string;
830
+ disabled?: boolean;
831
+ }
832
+ /**
833
+ * Radio group: multiple suite `RadioButton` with shared `name` from
834
+ * `responseKey`.
835
+ */
836
+ export interface RadioGroupNotFrontProps extends NotFrontBaseProps {
837
+ component: 'radioGroup';
838
+ label?: string;
839
+ value?: string;
840
+ required?: boolean;
841
+ actionType?: NotFrontActionType;
842
+ dependencies?: NotFrontDependency[];
843
+ direction?: 'row' | 'column';
844
+ items: RadioGroupItemNotFront[];
845
+ }
846
+ /**
847
+ * Suite `DropdownButton`: trigger uses `content` + optional suite button icons;
848
+ * menu rows are `button` not-front nodes.
849
+ */
850
+ export interface DropdownButtonNotFrontProps extends NotFrontBaseProps {
851
+ component: 'dropdownButton';
852
+ content: string;
853
+ items: ButtonNotFrontProps[];
854
+ disabled?: boolean;
855
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
856
+ /** Maps to suite `Button` `leftIcon`. */
857
+ leftIcon?: ButtonProps['leftIcon'];
858
+ /** Maps to suite `Button` `rightIcon` (dropdown also adds chevron). */
859
+ rightIcon?: ButtonProps['rightIcon'];
860
+ }
861
+ /**
862
+ * Suite `Tooltip`: trigger in `content`; `label` is plain string in v1.
863
+ */
864
+ export interface TooltipNotFrontProps extends NotFrontBaseProps {
865
+ component: 'tooltip';
866
+ label: string;
867
+ content: NotFrontComponent[];
868
+ placement?: 'top' | 'topLeft' | 'topRight' | 'bottom' | 'bottomLeft' | 'bottomRight' | 'left' | 'right';
869
+ notShowArrow?: boolean;
870
+ visible?: boolean;
871
+ }
872
+ /**
873
+ * Suite overflow `Menu`: rows are full `button` not-front nodes; trigger stays
874
+ * the suite `RoundButton` (dots).
875
+ */
876
+ export interface MenuNotFrontProps extends NotFrontBaseProps {
877
+ component: 'menu';
878
+ items: ButtonNotFrontProps[];
879
+ closeOnClick?: boolean;
880
+ disabled?: boolean;
881
+ listOrigin?: 'left' | 'right';
882
+ size?: 'sm' | 'md';
883
+ variant?: 'primary' | 'secondary' | 'ghost' | 'danger';
884
+ }
885
+ /** Suite `Stepper`: `items` are step labels only. */
886
+ export interface StepperNotFrontProps extends NotFrontBaseProps {
887
+ component: 'stepper';
888
+ items: string[];
889
+ itemActive: number;
890
+ darkMode?: boolean;
891
+ }
892
+ export interface RadioGroupItemNotFront {
893
+ label: string;
894
+ value: string;
895
+ disabled?: boolean;
896
+ }
897
+ /**
898
+ * Radio group: multiple suite `RadioButton` with shared `name` from
899
+ * `responseKey`.
900
+ */
901
+ export interface RadioGroupNotFrontProps extends NotFrontBaseProps {
902
+ component: 'radioGroup';
903
+ label?: string;
904
+ value?: string;
905
+ required?: boolean;
906
+ actionType?: NotFrontActionType;
907
+ dependencies?: NotFrontDependency[];
908
+ direction?: 'row' | 'column';
909
+ items: RadioGroupItemNotFront[];
910
+ }
911
+ /**
912
+ * Suite layout `Card`: `content` slot; optional click / refresh hooks in Fluent.
913
+ */
914
+ export interface CardNotFrontProps extends NotFrontBaseProps {
915
+ component: 'card';
916
+ content: NotFrontComponent[];
917
+ colorId?: number;
918
+ disabled?: boolean;
919
+ actionType?: NotFrontActionType;
920
+ dataSource?: NotFrontDataSource;
921
+ redirectUrl?: string;
922
+ dependencies?: NotFrontDependency[];
923
+ }
924
+ /**
925
+ * Represents a single breadcrumb item for the NotFront component
926
+ */
927
+ export interface BreadcrumbsItemNotFront {
928
+ /**
929
+ * Visible label of the breadcrumb item.
930
+ */
931
+ title: string;
932
+ /**
933
+ * Type of action to be triggered when the breadcrumb is clicked.
934
+ */
935
+ actionType: NotFrontActionType;
936
+ /**
937
+ * Optional URL to redirect the user when the breadcrumb is clicked.
938
+ * Used only if `actionType` is `REDIRECT`.
939
+ */
940
+ redirectUrl: string;
941
+ /**
942
+ * Unique page identifier associated with this breadcrumb
943
+ */
944
+ hashCode: string;
945
+ }
946
+ /**
947
+ * Interface for the props used in the ButtonNotFrontProps component.
948
+ */
949
+ export interface BreadcrumbsNotFrontProps extends NotFrontBaseProps {
950
+ /**
951
+ * Identifier to specify that this is a breadcrumbs component.
952
+ */
953
+ component: 'breadcrumbs';
954
+ /**
955
+ * List of breadcrumb items to render in order.
956
+ */
957
+ items: BreadcrumbsItemNotFront[];
958
+ }
959
+ /**
960
+ * Interface for the props used in the ButtonNotFrontProps component.
961
+ */
962
+ export interface ButtonNotFrontProps extends NotFrontBaseProps, ButtonProps {
963
+ component: 'button';
964
+ /**
965
+ * Defines the action triggered when the button is clicked.
966
+ */
967
+ actionType: NotFrontActionType;
968
+ /**
969
+ * The content inside the Button component.
970
+ */
971
+ content?: string;
972
+ /**
973
+ * @deprecated Use `content` instead.
974
+ * Retained for backward compatibility with legacy backend responses.
975
+ */
976
+ label?: string;
977
+ /**
978
+ * Optional data source used when the actionType involves fetching data.
979
+ */
980
+ dataSource: NotFrontDataSource;
981
+ /**
982
+ * Optional URL to redirect the user.
983
+ */
984
+ redirectUrl: string;
985
+ /**
986
+ * Conditions based on other fields that control this component's behavior.
987
+ */
988
+ dependencies?: NotFrontDependency[];
989
+ /** Suite `Button` left icon (exposed for menu/dropdown row mapping). */
990
+ leftIcon?: ButtonProps['leftIcon'];
991
+ /** Suite `Button` right icon. */
992
+ rightIcon?: ButtonProps['rightIcon'];
993
+ }
994
+ /**
995
+ * Interface for the props used in the CardNotificationNotFront component.
996
+ */
997
+ export interface CardNotificationNotFrontProps extends NotFrontBaseProps, CardNotificationProps {
998
+ component: 'cardNotification';
999
+ /**
1000
+ * The content to be displayed inside the CardNotification component.
1001
+ * This property is optional and represents the main text or message of the notification.
1002
+ */
1003
+ content?: string;
1004
+ /**
1005
+ * @deprecated Use `content` instead.
1006
+ * This property will be removed in the future once the backend stops sending it.
1007
+ * Currently kept for backward compatibility with existing implementations.
1008
+ */
1009
+ description?: string;
1010
+ }
1011
+ /**
1012
+ * Interface for the props used in the ChartNotFront component.
1013
+ */
1014
+ export interface ChartNotFrontProps extends NotFrontBaseProps {
1015
+ component: 'chart';
1016
+ /** Chart type */
1017
+ type: 'area' | 'bar' | 'line' | 'pie';
1018
+ /** Data source to load data for chart. */
1019
+ dataSource: NotFrontDataSourceChart;
1020
+ /** Chart data */
1021
+ data: any;
1022
+ /** Key for the x-axis */
1023
+ xKey: string;
1024
+ /** Keys for the y-axis */
1025
+ yKeys: string[];
1026
+ }
1027
+ /**
1028
+ * Interface for the props used in the CheckboxNotFront component.
1029
+ */
1030
+ export interface CheckboxNotFrontProps extends NotFrontBaseProps, CheckboxProps {
1031
+ component: 'checkbox';
1032
+ /**
1033
+ * Defines the action triggered when the button is clicked.
1034
+ */
1035
+ actionType: NotFrontActionType;
1036
+ /**
1037
+ * The text label displayed next to the checkbox.
1038
+ */
1039
+ label: string;
1040
+ /**
1041
+ * Indicates if the checkbox input is mandatory.
1042
+ */
1043
+ required: boolean;
1044
+ /**
1045
+ * Determines if the checkbox is initially checked.
1046
+ */
1047
+ value: boolean;
1048
+ /**
1049
+ * Conditions based on other fields that control this component's behavior.
1050
+ */
1051
+ dependencies?: NotFrontDependency[];
1052
+ }
1053
+ /**
1054
+ * Interface for the props used in the CodeEditorNotFront component.
1055
+ */
1056
+ export interface CodeEditorNotFrontProps extends NotFrontBaseProps {
1057
+ component: 'code';
1058
+ /**
1059
+ * Disabled state.
1060
+ */
1061
+ disabled?: boolean;
1062
+ /**
1063
+ * The label shown above the code editor input.
1064
+ */
1065
+ label?: string;
1066
+ /**
1067
+ * Initial or current value of the code editor. Could be string or parsed object.
1068
+ */
1069
+ value: any;
1070
+ /**
1071
+ * Placeholder text displayed when the editor is empty.
1072
+ */
1073
+ placeholder: string;
1074
+ /**
1075
+ * Indicates whether the code editor input is mandatory.
1076
+ */
1077
+ required: boolean;
1078
+ /**
1079
+ * Programming language for syntax highlighting (e.g., 'yaml', 'json', 'sql','markdown').
1080
+ */
1081
+ language: string;
1082
+ /**
1083
+ * Conditions based on other fields that control this component's behavior.
1084
+ */
1085
+ dependencies?: NotFrontDependency[];
1086
+ /**
1087
+ * Enable the preview for a markdown type.
1088
+ */
1089
+ showPreview?: boolean;
1090
+ }
1091
+ /**
1092
+ * Interface for the props used in the DividerNotFront component.
1093
+ */
1094
+ export interface DividerNotFrontProps extends NotFrontBaseProps, DividerProps {
1095
+ component: 'divider';
1096
+ /** Disabled state */
1097
+ disabled?: boolean;
1098
+ /** Set the position vertical */
1099
+ vertical?: boolean;
1100
+ }
1101
+ /**
1102
+ * Interface for the props used in the HeadingNotFront component.
1103
+ */
1104
+ export interface HeadingNotFrontProps extends NotFrontBaseProps, HeadingProps {
1105
+ component: 'heading';
1106
+ /**
1107
+ * The content to be displayed inside the Heading component.
1108
+ * This property is optional and represents the text or content shown in the heading.
1109
+ */
1110
+ content?: string;
1111
+ /**
1112
+ * The visual and semantic variant of the heading.
1113
+ * Defines the HTML tag and appearance of the heading element.
1114
+ */
1115
+ variant?: 'h1' | 'h2' | 'h3' | 'h4';
1116
+ }
1117
+ /**
1118
+ * Interface for the props used in the LinkNotFront component.
1119
+ */
1120
+ export interface LinkNotFrontProps extends NotFrontBaseProps, Omit<LinkProps, 'children' | 'onClick'> {
1121
+ component: 'link';
1122
+ /**
1123
+ * The content inside the Link component.
1124
+ */
1125
+ content?: string;
1126
+ /**
1127
+ * Defines the action triggered when the link is clicked.
1128
+ */
1129
+ actionType?: NotFrontActionType;
1130
+ /**
1131
+ * Optional URL to redirect the user.
1132
+ */
1133
+ redirectUrl?: string;
1134
+ /**
1135
+ * Conditions based on other fields that control this component's behavior.
1136
+ */
1137
+ dependencies?: NotFrontDependency[];
1138
+ }
1139
+ /**
1140
+ * Interface for the props used in the ModalNotFront component.
1141
+ */
1142
+ export interface ModalNotFrontProps extends NotFrontBaseProps, ModalProps {
1143
+ /**
1144
+ * Identifier to specify that this is a modal component.
1145
+ */
1146
+ component: 'modal';
1147
+ /**
1148
+ * The content to be rendered in the header section of the modal.
1149
+ * This value should reference a `hash` or a key used by el backend
1150
+ * to map a predefined layout structure (e.g., a heading component).
1151
+ */
1152
+ header: string | NotFrontComponent[];
1153
+ /**
1154
+ * Optional status color used to visually indicate the modal's purpose or state (e.g., 'info', 'warning', 'error').
1155
+ * Typically used as a color accent in the header section.
1156
+ */
1157
+ headerStatusColor?: string;
1158
+ /**
1159
+ * The content to be rendered in the body section of the modal.
1160
+ * This typically includes informational text, inputs, alerts, etc.
1161
+ */
1162
+ body: NotFrontComponent[];
1163
+ /**
1164
+ * The content to be rendered in the footer section of the modal.
1165
+ * This usually contains buttons such as "Save" or "Cancel".
1166
+ */
1167
+ footer: NotFrontComponent[];
1168
+ }
1169
+ /** Suite `Stepper`: `items` are step labels only. */
1170
+ export interface StepperNotFrontProps extends NotFrontBaseProps {
1171
+ component: 'stepper';
1172
+ items: string[];
1173
+ itemActive: number;
1174
+ darkMode?: boolean;
1175
+ }
1176
+ /**
1177
+ * Suite `CardAccordion`: collapsible panel with optional header actions and nested
1178
+ * body slots. JSON uses `content` for the collapsible region and `actionContent`
1179
+ * for header actions; `opened` matches suite initial-open behaviour only.
1180
+ */
1181
+ export interface CardAccordionNotFrontProps extends NotFrontBaseProps, Omit<CardAccordionProps, 'children' | 'actionContent' | 'description'> {
1182
+ component: 'cardAccordion';
1183
+ description?: string;
1184
+ dependencies?: NotFrontDependency[];
1185
+ content?: NotFrontComponent[];
1186
+ actionContent?: NotFrontComponent[];
1187
+ }
1188
+ /**
1189
+ * Interface for the props used in the AISummaryCardNotFront component.
1190
+ */
1191
+ export interface AISummaryCardNotFrontProps extends NotFrontBaseProps {
1192
+ component: 'aiSummaryCard';
1193
+ dataSource: NotFrontDataSource;
1194
+ /** Locale for default translations. Defaults to "en" if not provided. */
1195
+ locale?: SupportedLocale;
1196
+ /** Labels for title, loading and empty state. All keys are optional; defaults are used when omitted. */
1197
+ translations?: {
1198
+ title?: string;
1199
+ loading?: string;
1200
+ noData?: string;
1201
+ };
1202
+ }
1203
+ export interface AIChatPanelNotFrontProps extends NotFrontBaseProps {
1204
+ component: 'aiChatPanel';
1205
+ dataSource: NotFrontDataSource;
1206
+ /** Locale for default translations. Defaults to "en" if not provided. */
1207
+ locale?: 'en' | 'es';
1208
+ /** Labels for customizable text. All keys are optional; defaults are used when omitted. */
1209
+ translations?: ChatPanelTranslations;
1210
+ /** Initial suggestion cards shown in the welcome screen. */
1211
+ initialSuggestions?: SuggestionType[];
1212
+ }
1213
+ /**
1214
+ * Interface for the props used in the AIPromptCodeEditorNotFront component.
1215
+ */
1216
+ export interface AIPromptCodeEditorNotFrontProps extends NotFrontBaseProps {
1217
+ component: 'aiPromptCodeEditor';
1218
+ dataSource: NotFrontDataSourceRest;
1219
+ inputLabel?: string;
1220
+ inputPlaceholder?: string;
1221
+ codeBlockLabel?: string;
1222
+ codeBlockValue?: string;
1223
+ language?: string;
1224
+ disabled?: boolean;
1225
+ dependencies?: NotFrontDependency[];
1226
+ }
1227
+ /**
1228
+ * Union type representing all possible NotFront component prop types.
1229
+ */
1230
+ 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 | SwitchNotFrontProps | TableNotFrontProps | TabsNotFrontProps | TextareaNotFrontProps | TextFieldNotFrontProps | TextNotFrontProps | ToastNotFrontProps | TooltipNotFrontProps;
1231
+ /**
1232
+ * Resolved props for ChatPanel when delegated via onResolveComponentProps.
1233
+ * These are the props that the consumer receives to render ChatPanel externally.
1234
+ */
1235
+ export interface ChatPanelResolvedProps {
1236
+ dataSource: {
1237
+ url: string;
1238
+ method?: string;
1239
+ headers?: Record<string, string>;
1240
+ params?: unknown;
1241
+ };
1242
+ locale: 'en' | 'es';
1243
+ translations: Record<string, string>;
1244
+ initialSuggestions?: SuggestionType[];
1245
+ theme: AiAgentTheme;
1246
+ }
1247
+ /**
1248
+ * Resolved props for SummaryCard when delegated via onResolveComponentProps.
1249
+ * These are the props that the consumer receives to render SummaryCard externally.
1250
+ */
1251
+ export interface SummaryCardResolvedProps {
1252
+ dataSource: {
1253
+ url: string;
1254
+ method?: string;
1255
+ headers?: Record<string, string>;
1256
+ body?: unknown;
1257
+ };
1258
+ locale: 'en' | 'es';
1259
+ translations: Record<string, string>;
1260
+ }
1261
+ /**
1262
+ * Maps delegable component types to their resolved props.
1263
+ * Extend this interface to add new delegable components.
1264
+ */
1265
+ export interface ResolvableComponentMap {
1266
+ aiChatPanel: ChatPanelResolvedProps;
1267
+ aiSummaryCard: SummaryCardResolvedProps;
1268
+ }
1269
+ /**
1270
+ * Optional callbacks for components that the consumer wants to render externally.
1271
+ * When a callback is provided for a component type, that component will call
1272
+ * the callback with its resolved props and return null instead of rendering.
1273
+ */
1274
+ export type ResolveComponentPropsMap = {
1275
+ [K in keyof ResolvableComponentMap]?: (props: ResolvableComponentMap[K]) => void;
1276
+ };
1277
+ /**
1278
+ * Mapping of component identifiers (as strings) to their corresponding prop types.
659
1279
  */
660
1280
  export type NotFrontComponentTypeMap = {
661
1281
  accordion: AccordionNotFrontProps;
662
1282
  aiChatPanel: AIChatPanelNotFrontProps;
663
- aiSummaryCard: AISummaryCardNotFrontProps;
664
1283
  aiPromptCodeEditor: AIPromptCodeEditorNotFrontProps;
1284
+ aiSummaryCard: AISummaryCardNotFrontProps;
1285
+ box: BoxNotFrontProps;
1286
+ radioGroup: RadioGroupNotFrontProps;
1287
+ stepper: StepperNotFrontProps;
665
1288
  breadcrumbs: BreadcrumbsNotFrontProps;
666
1289
  button: ButtonNotFrontProps;
1290
+ card: CardNotFrontProps;
667
1291
  cardAccordion: CardAccordionNotFrontProps;
668
1292
  cardNotification: CardNotificationNotFrontProps;
669
1293
  chart: ChartNotFrontProps;
670
- dataCard: DataCardNotFrontProps;
671
1294
  checkbox: CheckboxNotFrontProps;
672
1295
  code: CodeEditorNotFrontProps;
1296
+ dataCard: DataCardNotFrontProps;
673
1297
  divider: DividerNotFrontProps;
674
1298
  drawer: DrawerNotFrontProps;
1299
+ dropdownButton: DropdownButtonNotFrontProps;
675
1300
  heading: HeadingNotFrontProps;
676
1301
  link: LinkNotFrontProps;
1302
+ menu: MenuNotFrontProps;
677
1303
  modal: ModalNotFrontProps;
678
1304
  pill: PillNotFrontProps;
679
1305
  previewerMarkdown: PreviewerMarkdownNotFrontProps;
@@ -685,6 +1311,8 @@ export type NotFrontComponentTypeMap = {
685
1311
  table: TableNotFrontProps;
686
1312
  tabs: TabsNotFrontProps;
687
1313
  text: TextNotFrontProps;
1314
+ textarea: TextareaNotFrontProps;
688
1315
  textField: TextFieldNotFrontProps;
689
1316
  toast: ToastNotFrontProps;
1317
+ tooltip: TooltipNotFrontProps;
690
1318
  };