@factorialco/f0-react 1.201.6 → 1.201.7
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/experimental.d.ts +152 -2
- package/dist/experimental.js +10508 -10034
- package/dist/f0.d.ts +577 -12
- package/dist/f0.js +198 -190
- package/dist/{hooks-DmNAjFCl.js → hooks-Bg3-9LHc.js} +9491 -9474
- package/dist/styles.css +1 -1
- package/package.json +2 -1
package/dist/f0.d.ts
CHANGED
|
@@ -80,6 +80,12 @@ declare type Action_2 = {
|
|
|
80
80
|
loading?: boolean;
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
declare type ActionDefinition = DropdownItemSeparator | (Omit<DropdownItemObject, "type" | "onClick"> & {
|
|
84
|
+
onClick: () => void;
|
|
85
|
+
enabled?: boolean;
|
|
86
|
+
type?: "primary" | "secondary" | "other";
|
|
87
|
+
});
|
|
88
|
+
|
|
83
89
|
export declare type AlertAvatarProps = VariantProps<typeof alertAvatarVariants> & {
|
|
84
90
|
type: (typeof alertAvatarTypes)[number];
|
|
85
91
|
size?: (typeof alertAvatarSizes)[number];
|
|
@@ -373,6 +379,28 @@ declare type BaseTag<T extends {
|
|
|
373
379
|
|
|
374
380
|
export declare const buildTranslations: (translations: TranslationsType) => TranslationsType;
|
|
375
381
|
|
|
382
|
+
/**
|
|
383
|
+
* Represents a bulk action that can be performed on a collection.
|
|
384
|
+
*/
|
|
385
|
+
declare type BulkAction = string;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Represents a bulk action definition.
|
|
389
|
+
*/
|
|
390
|
+
declare type BulkActionDefinition = {
|
|
391
|
+
label: string;
|
|
392
|
+
icon?: IconType;
|
|
393
|
+
id: string;
|
|
394
|
+
keepSelection?: boolean;
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
declare type BulkActionsDefinition<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: Parameters<OnBulkActionCallback<R, Filters>>[1]) => {
|
|
398
|
+
primary: BulkActionDefinition[];
|
|
399
|
+
secondary?: BulkActionDefinition[];
|
|
400
|
+
} | {
|
|
401
|
+
warningMessage: string;
|
|
402
|
+
};
|
|
403
|
+
|
|
376
404
|
export declare const Button: ForwardRefExoticComponent<ButtonProps & RefAttributes<HTMLButtonElement>>;
|
|
377
405
|
|
|
378
406
|
declare const Button_2: React_2.ForwardRefExoticComponent<ButtonProps_2 & React_2.RefAttributes<HTMLButtonElement>>;
|
|
@@ -467,6 +495,11 @@ declare type CardAvatarVariant = AvatarVariant | {
|
|
|
467
495
|
icon: IconType;
|
|
468
496
|
};
|
|
469
497
|
|
|
498
|
+
/**
|
|
499
|
+
* Group Cards: Renders
|
|
500
|
+
*/
|
|
501
|
+
declare type CardCollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = CollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, CardVisualizationOptions<Record, Filters, Sortings>>;
|
|
502
|
+
|
|
470
503
|
declare interface CardInternalProps {
|
|
471
504
|
/**
|
|
472
505
|
* Whether the card has a compact layout
|
|
@@ -572,6 +605,10 @@ declare interface CardPrimaryAction {
|
|
|
572
605
|
onClick: () => void;
|
|
573
606
|
}
|
|
574
607
|
|
|
608
|
+
declare type CardPropertyDefinition<T> = PropertyDefinition_2<T> & {
|
|
609
|
+
icon?: IconType;
|
|
610
|
+
};
|
|
611
|
+
|
|
575
612
|
declare const cardPropertyRenderers: {
|
|
576
613
|
readonly text: (args: TextCellValue) => default_2.JSX.Element;
|
|
577
614
|
readonly number: (args: NumberCellValue, meta: ValueDisplayRendererContext) => default_2.JSX.Element;
|
|
@@ -602,6 +639,15 @@ declare interface CardSecondaryLink extends Pick<LinkProps, "href" | "target" |
|
|
|
602
639
|
label: string;
|
|
603
640
|
}
|
|
604
641
|
|
|
642
|
+
declare type CardVisualizationOptions<T, _Filters extends FiltersDefinition, _Sortings extends SortingsDefinition> = {
|
|
643
|
+
cardProperties: ReadonlyArray<CardPropertyDefinition<T>>;
|
|
644
|
+
title: (record: T) => string;
|
|
645
|
+
description?: (record: T) => string;
|
|
646
|
+
avatar?: (record: T) => CardAvatarVariant;
|
|
647
|
+
image?: (record: T) => string;
|
|
648
|
+
compact?: boolean;
|
|
649
|
+
};
|
|
650
|
+
|
|
605
651
|
export declare const CategoryBarChart: ForwardRefExoticComponent<Omit<CategoryBarProps & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
606
652
|
|
|
607
653
|
declare interface CheckboxProps extends DataAttributes {
|
|
@@ -688,6 +734,41 @@ declare const chipVariants: (props?: ({
|
|
|
688
734
|
className?: ClassValue;
|
|
689
735
|
})) | undefined) => string;
|
|
690
736
|
|
|
737
|
+
declare type ColId = string;
|
|
738
|
+
|
|
739
|
+
/**
|
|
740
|
+
* Props for the Collection component.
|
|
741
|
+
* @template Record - The type of records in the collection
|
|
742
|
+
* @template Filters - The available filter configurations for the collection
|
|
743
|
+
* @template ItemActions - The available actions that can be performed on records
|
|
744
|
+
* @template VisualizationOptions - Additional options for visualizing the collection
|
|
745
|
+
*/
|
|
746
|
+
declare type CollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>, VisualizationOptions extends object> = {
|
|
747
|
+
/** The data source configuration and state */
|
|
748
|
+
source: DataCollectionSource<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>;
|
|
749
|
+
/** Function to handle item selection */
|
|
750
|
+
onSelectItems: OnSelectItemsCallback<Record, Filters>;
|
|
751
|
+
/** Function to handle data load */
|
|
752
|
+
onLoadData: OnLoadDataCallback<Record, Filters>;
|
|
753
|
+
onLoadError: OnLoadErrorCallback;
|
|
754
|
+
} & VisualizationOptions;
|
|
755
|
+
|
|
756
|
+
declare type CollectionVisualizations<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = {
|
|
757
|
+
table: VisualizacionTypeDefinition<TableCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>, TableVisualizationSettings>;
|
|
758
|
+
list: VisualizacionTypeDefinition<ListCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
|
|
759
|
+
card: VisualizacionTypeDefinition<CardCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
|
|
760
|
+
kanban: VisualizacionTypeDefinition<KanbanCollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping>>;
|
|
761
|
+
};
|
|
762
|
+
|
|
763
|
+
declare const collectionVisualizations: CollectionVisualizations<RecordType, FiltersDefinition, SortingsDefinition, SummariesDefinition, ItemActionsDefinition<RecordType>, NavigationFiltersDefinition, GroupingDefinition<RecordType>>;
|
|
764
|
+
|
|
765
|
+
declare type ColumnWidth = keyof typeof columnWidths | number;
|
|
766
|
+
|
|
767
|
+
declare const columnWidths: {
|
|
768
|
+
readonly auto: undefined;
|
|
769
|
+
readonly fit: 1;
|
|
770
|
+
};
|
|
771
|
+
|
|
691
772
|
export declare type CompanyAvatarVariant = Extract<AvatarVariant, {
|
|
692
773
|
type: "company";
|
|
693
774
|
}>;
|
|
@@ -744,6 +825,95 @@ export declare type Data<R extends RecordType> = {
|
|
|
744
825
|
*/
|
|
745
826
|
export declare type DataAdapter<R extends RecordType, Filters extends FiltersDefinition> = BaseDataAdapter<R, Filters, BaseFetchOptions<Filters>, BaseResponse<R>> | PaginatedDataAdapter<R, Filters, PaginatedFetchOptions<Filters>, PaginatedResponse<R>>;
|
|
746
827
|
|
|
828
|
+
declare type DataCollectionBaseFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = BaseFetchOptions<Filters> & DataCollectionExtendFetchOptions<NavigationFilters>;
|
|
829
|
+
|
|
830
|
+
/**
|
|
831
|
+
* Data collection data adapter
|
|
832
|
+
*/
|
|
833
|
+
declare type DataCollectionDataAdapter<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition> = BaseDataAdapter<R, Filters, DataCollectionBaseFetchOptions<Filters, NavigationFilters>, BaseResponse<R>> | PaginatedDataAdapter<R, Filters, DataCollectionPaginatedFetchOptions<Filters, NavigationFilters>, PaginatedResponse<R>>;
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Extended base fetch options for data collection
|
|
837
|
+
*/
|
|
838
|
+
declare type DataCollectionExtendFetchOptions<NavigationFilters extends NavigationFiltersDefinition> = {
|
|
839
|
+
navigationFilters: NavigationFiltersState<NavigationFilters>;
|
|
840
|
+
};
|
|
841
|
+
|
|
842
|
+
/**
|
|
843
|
+
* Extended base fetch options for data collection
|
|
844
|
+
*/
|
|
845
|
+
declare type DataCollectionPaginatedFetchOptions<Filters extends FiltersDefinition, NavigationFilters extends NavigationFiltersDefinition> = PaginatedFetchOptions<Filters> & DataCollectionExtendFetchOptions<NavigationFilters>;
|
|
846
|
+
|
|
847
|
+
declare type DataCollectionSettings = {
|
|
848
|
+
visualization: VisualizationSettings;
|
|
849
|
+
};
|
|
850
|
+
|
|
851
|
+
/**
|
|
852
|
+
* Data collection source
|
|
853
|
+
* Extends the base data source with data collection specific elements / features
|
|
854
|
+
*/
|
|
855
|
+
declare type DataCollectionSource<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = DataSource<R, Filters, Sortings, Grouping> & DataCollectionSourceDefinition<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping> & {
|
|
856
|
+
currentNavigationFilters: NavigationFiltersState<NavigationFilters>;
|
|
857
|
+
setCurrentNavigationFilters: React.Dispatch<React.SetStateAction<NavigationFiltersState<NavigationFilters>>>;
|
|
858
|
+
/** Current summaries data */
|
|
859
|
+
currentSummaries?: R;
|
|
860
|
+
/** Function to update the current summaries data */
|
|
861
|
+
setCurrentSummaries?: React.Dispatch<React.SetStateAction<R | undefined>>;
|
|
862
|
+
};
|
|
863
|
+
|
|
864
|
+
/**
|
|
865
|
+
* Data collection source definition
|
|
866
|
+
* Extends the base data source definition with data collection specific elements / features
|
|
867
|
+
*/
|
|
868
|
+
declare type DataCollectionSourceDefinition<R extends RecordType = RecordType, Filters extends FiltersDefinition = FiltersDefinition, Sortings extends SortingsDefinition = SortingsDefinition, Summaries extends SummariesDefinition = SummariesDefinition, ItemActions extends ItemActionsDefinition<R> = ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition = NavigationFiltersDefinition, Grouping extends GroupingDefinition<R> = GroupingDefinition<R>> = Omit<DataSourceDefinition<R, Filters, Sortings, Grouping>, "dataAdapter"> & {
|
|
869
|
+
/**
|
|
870
|
+
* Data Collection specific datasource elements / features
|
|
871
|
+
*/
|
|
872
|
+
/** Navigation filters */
|
|
873
|
+
navigationFilters?: NavigationFilters;
|
|
874
|
+
/** URL for a single item in the collection */
|
|
875
|
+
itemUrl?: (item: R) => string | undefined;
|
|
876
|
+
/** Click handler for a single item in the collection */
|
|
877
|
+
itemOnClick?: (item: R) => () => void;
|
|
878
|
+
/** Available actions that can be performed on records */
|
|
879
|
+
itemActions?: ItemActions;
|
|
880
|
+
/** Available primary actions that can be performed on the collection */
|
|
881
|
+
primaryActions?: PrimaryActionsDefinition;
|
|
882
|
+
/** Available secondary actions that can be performed on the collection */
|
|
883
|
+
secondaryActions?: SecondaryActionsDefinition;
|
|
884
|
+
/** Available summaries fields. If not provided, summaries is not allowed. */
|
|
885
|
+
summaries?: Summaries & {
|
|
886
|
+
label?: string;
|
|
887
|
+
};
|
|
888
|
+
dataAdapter: DataCollectionDataAdapter<R, Filters, NavigationFilters>;
|
|
889
|
+
/** Bulk actions that can be performed on the collection */
|
|
890
|
+
bulkActions?: BulkActionsDefinition<R, Filters>;
|
|
891
|
+
totalItemSummary?: (totalItems: number) => string;
|
|
892
|
+
/** Lanes configuration */
|
|
893
|
+
lanes?: ReadonlyArray<Lane<Filters>>;
|
|
894
|
+
};
|
|
895
|
+
|
|
896
|
+
/**
|
|
897
|
+
* The status of the data collection
|
|
898
|
+
*/
|
|
899
|
+
declare type DataCollectionStatus = {
|
|
900
|
+
grouping?: GroupingState<RecordType, GroupingDefinition<RecordType>>;
|
|
901
|
+
sortings?: SortingsState<SortingsDefinition>;
|
|
902
|
+
filters?: FiltersState<FiltersDefinition>;
|
|
903
|
+
search?: string | undefined;
|
|
904
|
+
navigationFilters?: NavigationFiltersState<NavigationFiltersDefinition>;
|
|
905
|
+
visualization?: number;
|
|
906
|
+
};
|
|
907
|
+
|
|
908
|
+
declare type DataCollectionStorage = {
|
|
909
|
+
settings?: DataCollectionSettings;
|
|
910
|
+
} & DataCollectionStatus;
|
|
911
|
+
|
|
912
|
+
declare type DataCollectionStorageHandler = {
|
|
913
|
+
get: (key: string) => Promise<DataCollectionStorage>;
|
|
914
|
+
set: (key: string, storage: DataCollectionStorage) => Promise<void>;
|
|
915
|
+
};
|
|
916
|
+
|
|
747
917
|
/**
|
|
748
918
|
* Represents an error that occurred during data fetching
|
|
749
919
|
*/
|
|
@@ -833,11 +1003,50 @@ declare type DateFilterOptions_2 = {
|
|
|
833
1003
|
view?: CalendarView;
|
|
834
1004
|
};
|
|
835
1005
|
|
|
1006
|
+
declare type DateNavigationOptions = {
|
|
1007
|
+
min?: Date;
|
|
1008
|
+
max?: Date;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
declare type DateNavigationOptions_2 = {
|
|
1012
|
+
granularity?: GranularityDefinitionKey[] | GranularityDefinitionKey;
|
|
1013
|
+
defaultGranularity?: GranularityDefinitionKey;
|
|
1014
|
+
min?: Date;
|
|
1015
|
+
max?: Date;
|
|
1016
|
+
presets?: DatePreset[];
|
|
1017
|
+
hideGoToCurrent?: boolean;
|
|
1018
|
+
};
|
|
1019
|
+
|
|
1020
|
+
declare type DateNavigatorFilterDefinition = NavigationFilterDefinitionBase<Date | DateRange | DateValue> & {
|
|
1021
|
+
type: "date-navigator";
|
|
1022
|
+
} & DateNavigationOptions_2;
|
|
1023
|
+
|
|
1024
|
+
declare interface DatePreset {
|
|
1025
|
+
label: string;
|
|
1026
|
+
granularity: GranularityDefinitionKey;
|
|
1027
|
+
value: DateRange | (() => DateRange);
|
|
1028
|
+
}
|
|
1029
|
+
|
|
836
1030
|
declare type DateRange = {
|
|
837
1031
|
from: Date;
|
|
838
1032
|
to?: Date;
|
|
839
1033
|
};
|
|
840
1034
|
|
|
1035
|
+
declare type DateRangeComplete = Required<DateRange>;
|
|
1036
|
+
|
|
1037
|
+
declare type DateRangeString = {
|
|
1038
|
+
from: string;
|
|
1039
|
+
to?: string;
|
|
1040
|
+
};
|
|
1041
|
+
|
|
1042
|
+
declare type DateStringFormat = "default" | "long";
|
|
1043
|
+
|
|
1044
|
+
declare type DateValue = {
|
|
1045
|
+
value: DateRangeComplete;
|
|
1046
|
+
valueString: string;
|
|
1047
|
+
granularity: GranularityDefinitionKey;
|
|
1048
|
+
};
|
|
1049
|
+
|
|
841
1050
|
declare type DefaultAction = BannerAction;
|
|
842
1051
|
|
|
843
1052
|
export declare const defaultTranslations: {
|
|
@@ -916,6 +1125,7 @@ export declare const defaultTranslations: {
|
|
|
916
1125
|
readonly pagination: {
|
|
917
1126
|
readonly of: "of";
|
|
918
1127
|
};
|
|
1128
|
+
readonly settings: "{%visualizationName} settings";
|
|
919
1129
|
};
|
|
920
1130
|
readonly itemsCount: "items";
|
|
921
1131
|
readonly emptyStates: {
|
|
@@ -1124,6 +1334,8 @@ declare const emojiVariants: (props?: ({
|
|
|
1124
1334
|
className?: ClassValue;
|
|
1125
1335
|
})) | undefined) => string;
|
|
1126
1336
|
|
|
1337
|
+
declare type Enumerate<N extends number, Acc extends number[] = []> = Acc["length"] extends N ? [...Acc, N][number] : Enumerate<N, [...Acc, Acc["length"]]>;
|
|
1338
|
+
|
|
1127
1339
|
export declare interface ErrorMessageProps {
|
|
1128
1340
|
title: string;
|
|
1129
1341
|
description: string;
|
|
@@ -1146,6 +1358,10 @@ declare type EventScalar = string | number | boolean | undefined | null;
|
|
|
1146
1358
|
|
|
1147
1359
|
export declare const experimental: <T extends (...args: any[]) => any>(name: string, component: T) => T;
|
|
1148
1360
|
|
|
1361
|
+
declare type ExtractVisualizationSettings<T> = T extends {
|
|
1362
|
+
settings: infer S;
|
|
1363
|
+
} ? S : never;
|
|
1364
|
+
|
|
1149
1365
|
export declare const F0Avatar: ({ avatar, size }: AvatarProps) => ReactNode;
|
|
1150
1366
|
|
|
1151
1367
|
export declare const F0AvatarAlert: ({ type, size, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, }: AlertAvatarProps) => JSX_2.Element;
|
|
@@ -1350,6 +1566,19 @@ export declare interface F0IconProps extends SVGProps<SVGSVGElement>, VariantPro
|
|
|
1350
1566
|
color?: "default" | "currentColor" | `#${string}` | Lowercase<NestedKeyOf<typeof f1Colors.icon>>;
|
|
1351
1567
|
}
|
|
1352
1568
|
|
|
1569
|
+
export declare const F0Provider: React.FC<{
|
|
1570
|
+
children: React.ReactNode;
|
|
1571
|
+
link?: LinkContextValue;
|
|
1572
|
+
privacyModeInitiallyEnabled?: boolean;
|
|
1573
|
+
image?: ImageContextValue;
|
|
1574
|
+
layout?: Omit<ComponentProps<typeof LayoutProvider>, "children">;
|
|
1575
|
+
i18n: Omit<I18nProviderProps, "children">;
|
|
1576
|
+
l10n: Omit<L10nProviderProps, "children">;
|
|
1577
|
+
isDev?: boolean;
|
|
1578
|
+
showExperimentalWarnings?: boolean;
|
|
1579
|
+
dataCollectionStorageHandler?: DataCollectionStorageHandler;
|
|
1580
|
+
}>;
|
|
1581
|
+
|
|
1353
1582
|
export declare const F0TagAlert: ForwardRefExoticComponent<TagAlertProps & RefAttributes<HTMLDivElement>>;
|
|
1354
1583
|
|
|
1355
1584
|
export declare const F0TagBalance: ForwardRefExoticComponent<TagBalanceProps & RefAttributes<HTMLDivElement>>;
|
|
@@ -1371,18 +1600,6 @@ export declare const F0TagStatus: ForwardRefExoticComponent<TagStatusProps & Ref
|
|
|
1371
1600
|
|
|
1372
1601
|
export declare const F0TagTeam: ForwardRefExoticComponent<TagTeamProps & RefAttributes<HTMLDivElement>>;
|
|
1373
1602
|
|
|
1374
|
-
export declare const FactorialOneProvider: React.FC<{
|
|
1375
|
-
children: React.ReactNode;
|
|
1376
|
-
link?: LinkContextValue;
|
|
1377
|
-
privacyModeInitiallyEnabled?: boolean;
|
|
1378
|
-
image?: ImageContextValue;
|
|
1379
|
-
layout?: Omit<ComponentProps<typeof LayoutProvider>, "children">;
|
|
1380
|
-
i18n: Omit<I18nProviderProps, "children">;
|
|
1381
|
-
l10n: Omit<L10nProviderProps, "children">;
|
|
1382
|
-
isDev?: boolean;
|
|
1383
|
-
showExperimentalWarnings?: boolean;
|
|
1384
|
-
}>;
|
|
1385
|
-
|
|
1386
1603
|
export declare type FileAvatarVariant = Extract<AvatarVariant, {
|
|
1387
1604
|
type: "file";
|
|
1388
1605
|
}>;
|
|
@@ -1514,6 +1731,37 @@ export declare const getDataSourcePaginationType: <D extends {
|
|
|
1514
1731
|
|
|
1515
1732
|
export declare function getEmojiLabel(emoji: string): string;
|
|
1516
1733
|
|
|
1734
|
+
declare interface GranularityDefinition {
|
|
1735
|
+
calendarMode?: CalendarMode;
|
|
1736
|
+
calendarView: CalendarView;
|
|
1737
|
+
label: (viewDate: Date, i18n: TranslationsType) => ReactNode;
|
|
1738
|
+
toRangeString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => DateRangeString;
|
|
1739
|
+
toRange: <T extends Date | DateRange | undefined | null>(date: T) => T extends Date | DateRange ? DateRangeComplete : T;
|
|
1740
|
+
toString: (date: Date | DateRange | undefined | null, i18n: TranslationsType, format?: DateStringFormat) => string;
|
|
1741
|
+
fromString: (dateStr: string | DateRangeString, i18n: TranslationsType) => DateRange | null;
|
|
1742
|
+
navigateUIView: (viewDate: Date, direction: -1 | 1) => Date;
|
|
1743
|
+
navigate: (date: Date, direction: -1 | 1) => Date;
|
|
1744
|
+
getViewDateFromDate: (date: Date) => Date;
|
|
1745
|
+
render: (renderProps: {
|
|
1746
|
+
mode: CalendarMode;
|
|
1747
|
+
selected: Date | DateRange | null;
|
|
1748
|
+
onSelect: (date: Date | DateRange | null) => void;
|
|
1749
|
+
month: Date;
|
|
1750
|
+
onMonthChange: (date: Date) => void;
|
|
1751
|
+
motionDirection: number;
|
|
1752
|
+
minDate?: Date;
|
|
1753
|
+
maxDate?: Date;
|
|
1754
|
+
setViewDate: (date: Date) => void;
|
|
1755
|
+
viewDate: Date;
|
|
1756
|
+
}) => ReactNode;
|
|
1757
|
+
add: (date: DateRangeComplete, delta: number) => DateRangeComplete;
|
|
1758
|
+
getPrevNext(date: DateRange, options: DateNavigationOptions): PrevNextDateNavigation;
|
|
1759
|
+
}
|
|
1760
|
+
|
|
1761
|
+
declare type GranularityDefinitionKey = keyof typeof granularityDefinitions;
|
|
1762
|
+
|
|
1763
|
+
declare const granularityDefinitions: Record<string, GranularityDefinition>;
|
|
1764
|
+
|
|
1517
1765
|
/**
|
|
1518
1766
|
* Symbol used to identify the groupId in the data
|
|
1519
1767
|
*/
|
|
@@ -1668,6 +1916,39 @@ export declare function isInfiniteScrollPagination<R extends RecordType>(paginat
|
|
|
1668
1916
|
|
|
1669
1917
|
export declare function isPageBasedPagination<R extends RecordType>(pagination: PaginationInfo | null): pagination is PageBasedPaginatedResponse<R>;
|
|
1670
1918
|
|
|
1919
|
+
declare type ItemActionsDefinition<T extends RecordType> = (item: T) => ActionDefinition[] | undefined;
|
|
1920
|
+
|
|
1921
|
+
declare type ItemDefinition = {
|
|
1922
|
+
title: string;
|
|
1923
|
+
description?: string[];
|
|
1924
|
+
avatar?: AvatarVariant;
|
|
1925
|
+
};
|
|
1926
|
+
|
|
1927
|
+
declare type KanbanCollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = CollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, KanbanVisualizationOptions<Record, Filters, Sortings>>;
|
|
1928
|
+
|
|
1929
|
+
declare type KanbanLaneDefinition = {
|
|
1930
|
+
id: string;
|
|
1931
|
+
title: string;
|
|
1932
|
+
variant?: Variant;
|
|
1933
|
+
};
|
|
1934
|
+
|
|
1935
|
+
declare type KanbanOnMove<TRecord extends RecordType> = (fromLaneId: string, toLaneId: string, sourceRecord: TRecord, destinyRecord: {
|
|
1936
|
+
record: TRecord;
|
|
1937
|
+
position: "above" | "below";
|
|
1938
|
+
} | null) => Promise<TRecord>;
|
|
1939
|
+
|
|
1940
|
+
declare type KanbanVisualizationOptions<Record extends RecordType, _Filters extends FiltersDefinition, _Sortings extends SortingsDefinition> = {
|
|
1941
|
+
lanes: ReadonlyArray<KanbanLaneDefinition>;
|
|
1942
|
+
title?: (record: Record) => string;
|
|
1943
|
+
description?: (record: Record) => string;
|
|
1944
|
+
avatar?: (record: Record) => CardAvatarVariant;
|
|
1945
|
+
metadata?: (record: Record) => ReadonlyArray<{
|
|
1946
|
+
icon: IconType;
|
|
1947
|
+
property: CardMetadataProperty;
|
|
1948
|
+
}>;
|
|
1949
|
+
onMove?: KanbanOnMove<Record>;
|
|
1950
|
+
};
|
|
1951
|
+
|
|
1671
1952
|
declare type L10nContextValue = {
|
|
1672
1953
|
locale: string;
|
|
1673
1954
|
};
|
|
@@ -1677,6 +1958,15 @@ declare interface L10nProviderProps {
|
|
|
1677
1958
|
l10n: L10nContextValue;
|
|
1678
1959
|
}
|
|
1679
1960
|
|
|
1961
|
+
/**
|
|
1962
|
+
* Represents a single lane configuration with its own filters
|
|
1963
|
+
* @template Filters - The available filter configurations for this lane
|
|
1964
|
+
*/
|
|
1965
|
+
declare type Lane<Filters extends FiltersDefinition> = {
|
|
1966
|
+
id: string;
|
|
1967
|
+
filters: FiltersState<Filters>;
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1680
1970
|
declare interface LayoutProps {
|
|
1681
1971
|
fullScreen?: boolean;
|
|
1682
1972
|
addBodyClasses?: boolean;
|
|
@@ -1729,10 +2019,24 @@ declare const linkVariants: (props?: ({
|
|
|
1729
2019
|
className?: ClassValue;
|
|
1730
2020
|
})) | undefined) => string;
|
|
1731
2021
|
|
|
2022
|
+
/**
|
|
2023
|
+
* Group List: Renders the list for a group
|
|
2024
|
+
*/
|
|
2025
|
+
declare type ListCollectionProps<Record extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<Record>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<Record>> = CollectionProps<Record, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, ListVisualizationOptions<Record, Filters, Sortings>>;
|
|
2026
|
+
|
|
2027
|
+
declare type ListPropertyDefinition<R, Sortings extends SortingsDefinition> = WithOptionalSorting_2<R, Sortings> & PropertyDefinition_2<R>;
|
|
2028
|
+
|
|
2029
|
+
declare type ListVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition> = {
|
|
2030
|
+
itemDefinition: (record: R) => ItemDefinition;
|
|
2031
|
+
fields: ReadonlyArray<ListPropertyDefinition<R, Sortings>>;
|
|
2032
|
+
};
|
|
2033
|
+
|
|
1732
2034
|
export declare interface LoadingStateProps {
|
|
1733
2035
|
label: string;
|
|
1734
2036
|
}
|
|
1735
2037
|
|
|
2038
|
+
declare const MAX_EXPANDED_ACTIONS = 2;
|
|
2039
|
+
|
|
1736
2040
|
declare const moduleAvatarVariants: (props?: ({
|
|
1737
2041
|
size?: "lg" | "md" | "sm" | "xs" | "xxs" | undefined;
|
|
1738
2042
|
} & ({
|
|
@@ -1810,6 +2114,37 @@ export declare const modules: {
|
|
|
1810
2114
|
readonly workflows: ForwardRefExoticComponent<Omit<SVGProps<SVGSVGElement>, "ref"> & RefAttributes<SVGSVGElement>>;
|
|
1811
2115
|
};
|
|
1812
2116
|
|
|
2117
|
+
declare type NavigationFilterDefinition = DateNavigatorFilterDefinition;
|
|
2118
|
+
|
|
2119
|
+
declare type NavigationFilterDefinitionBase<T> = {
|
|
2120
|
+
type: string;
|
|
2121
|
+
defaultValue: T;
|
|
2122
|
+
};
|
|
2123
|
+
|
|
2124
|
+
/**
|
|
2125
|
+
* Record of navigation filter definitions for a collection.
|
|
2126
|
+
* Maps filter keys to their respective definitions.
|
|
2127
|
+
* Used to configure the available navigation filters for a collection.
|
|
2128
|
+
* @template Keys - String literal type for filter keys
|
|
2129
|
+
*/
|
|
2130
|
+
declare type NavigationFiltersDefinition<Keys extends string = string> = Record<Keys, NavigationFilterDefinition>;
|
|
2131
|
+
|
|
2132
|
+
/**
|
|
2133
|
+
* Current state of all navigation filters in a collection.
|
|
2134
|
+
* Maps filter keys to their current values.
|
|
2135
|
+
* This represents the active filter selections at any given time.
|
|
2136
|
+
* @template Definition - Record of filter definitions
|
|
2137
|
+
*/
|
|
2138
|
+
declare type NavigationFiltersState<Definition extends Record<string, NavigationFilterDefinition>> = {
|
|
2139
|
+
[K in keyof Definition]?: NavigationFilterValue<Definition[K]>;
|
|
2140
|
+
};
|
|
2141
|
+
|
|
2142
|
+
/**
|
|
2143
|
+
* Represents a navigation filter with its current value.
|
|
2144
|
+
* @template T - The type of the filter value
|
|
2145
|
+
*/
|
|
2146
|
+
declare type NavigationFilterValue<T> = T extends DateNavigatorFilterDefinition ? DateValue : T extends undefined ? undefined : never;
|
|
2147
|
+
|
|
1813
2148
|
declare type NavigationItem = Pick<LinkProps_2, "href" | "exactMatch" | "onClick"> & {
|
|
1814
2149
|
label: string;
|
|
1815
2150
|
} & DataAttributes;
|
|
@@ -1832,6 +2167,11 @@ export declare interface NextStepsProps {
|
|
|
1832
2167
|
items: StepItemProps[];
|
|
1833
2168
|
}
|
|
1834
2169
|
|
|
2170
|
+
declare type OnBulkActionCallback<Record extends RecordType, Filters extends FiltersDefinition> = (...args: [
|
|
2171
|
+
action: BulkAction,
|
|
2172
|
+
...Parameters<OnSelectItemsCallback<Record, Filters>>
|
|
2173
|
+
]) => void;
|
|
2174
|
+
|
|
1835
2175
|
/**
|
|
1836
2176
|
* OneFiltersPicker component to use as a single component
|
|
1837
2177
|
*/
|
|
@@ -1859,6 +2199,16 @@ declare type OneFilterPickerRootProps<Definition extends FiltersDefinition> = {
|
|
|
1859
2199
|
children?: React.ReactNode;
|
|
1860
2200
|
};
|
|
1861
2201
|
|
|
2202
|
+
declare type OnLoadDataCallback<Record extends RecordType, Filters extends FiltersDefinition> = (data: {
|
|
2203
|
+
totalItems: number | undefined;
|
|
2204
|
+
filters: FiltersState<Filters>;
|
|
2205
|
+
search: string | undefined;
|
|
2206
|
+
isInitialLoading: boolean;
|
|
2207
|
+
data: Record[];
|
|
2208
|
+
}) => void;
|
|
2209
|
+
|
|
2210
|
+
declare type OnLoadErrorCallback = (error: DataError) => void;
|
|
2211
|
+
|
|
1862
2212
|
export declare type OnSelectItemsCallback<R extends RecordType, Filters extends FiltersDefinition> = (selectedItems: SelectedItemsDetailedStatus<R, Filters> & {
|
|
1863
2213
|
byLane?: Record<string, SelectedItemsDetailedStatus<R, Filters>>;
|
|
1864
2214
|
}, clearSelectedItems: () => void) => void;
|
|
@@ -1958,6 +2308,17 @@ export declare type PresetDefinition<Filters extends FiltersDefinition> = {
|
|
|
1958
2308
|
|
|
1959
2309
|
export declare type PresetsDefinition<Filters extends FiltersDefinition> = PresetDefinition<Filters>[];
|
|
1960
2310
|
|
|
2311
|
+
declare type PrevNextDateNavigation = {
|
|
2312
|
+
prev: DateRange | false;
|
|
2313
|
+
next: DateRange | false;
|
|
2314
|
+
};
|
|
2315
|
+
|
|
2316
|
+
/**
|
|
2317
|
+
* Defines the structure and configuration of the primary action that can be performed on a collection.
|
|
2318
|
+
* @returns An action
|
|
2319
|
+
*/
|
|
2320
|
+
declare type PrimaryActionsDefinition = () => Pick<DropdownItemObject, "onClick" | "label" | "icon"> | undefined;
|
|
2321
|
+
|
|
1961
2322
|
export declare const PrivacyModeProvider: React_2.FC<{
|
|
1962
2323
|
initiallyEnabled?: boolean;
|
|
1963
2324
|
children: ReactNode;
|
|
@@ -2085,6 +2446,37 @@ declare type PromoteAction = {
|
|
|
2085
2446
|
icon?: IconType;
|
|
2086
2447
|
};
|
|
2087
2448
|
|
|
2449
|
+
declare type PropertyDefinition_2<T> = {
|
|
2450
|
+
label: string;
|
|
2451
|
+
/**
|
|
2452
|
+
* Optional tooltip text. When provided, displays an info icon next to the header content
|
|
2453
|
+
* that shows this text in a tooltip when hovered.
|
|
2454
|
+
*/
|
|
2455
|
+
info?: string;
|
|
2456
|
+
/**
|
|
2457
|
+
* Function that extracts and formats the value from an item.
|
|
2458
|
+
* Should return an object matching the expected args for the specified renderer type.
|
|
2459
|
+
*
|
|
2460
|
+
* Example usage:
|
|
2461
|
+
* {
|
|
2462
|
+
* render: (item) => ({
|
|
2463
|
+
* type: "avatar",
|
|
2464
|
+
* value: {
|
|
2465
|
+
* type: "person",
|
|
2466
|
+
* firstName: item.firstName,
|
|
2467
|
+
* lastName: item.lastName,
|
|
2468
|
+
* }
|
|
2469
|
+
* })
|
|
2470
|
+
* }
|
|
2471
|
+
*/
|
|
2472
|
+
render: (item: T) => RendererDefinition | string | number | undefined;
|
|
2473
|
+
/**
|
|
2474
|
+
* Function that determines if the property should be hidden for a given item.
|
|
2475
|
+
* Should return true if the property should be hidden, false otherwise.
|
|
2476
|
+
*/
|
|
2477
|
+
hide?: (item: T) => boolean;
|
|
2478
|
+
};
|
|
2479
|
+
|
|
2088
2480
|
declare type Props = {
|
|
2089
2481
|
/**
|
|
2090
2482
|
* Array of chips to display.
|
|
@@ -2139,6 +2531,8 @@ declare type RegularAction = BaseAction & {
|
|
|
2139
2531
|
variant: ButtonVariant;
|
|
2140
2532
|
};
|
|
2141
2533
|
|
|
2534
|
+
declare type RendererDefinition = ValueDisplayRendererDefinition;
|
|
2535
|
+
|
|
2142
2536
|
declare type SearchFilterDefinition = BaseFilterDefinition<"search">;
|
|
2143
2537
|
|
|
2144
2538
|
declare type SearchOptions = {
|
|
@@ -2150,6 +2544,20 @@ declare type SearchOptions = {
|
|
|
2150
2544
|
debounceTime?: number;
|
|
2151
2545
|
};
|
|
2152
2546
|
|
|
2547
|
+
declare type SecondaryActionsDefinition = {
|
|
2548
|
+
expanded: Enumerate<typeof MAX_EXPANDED_ACTIONS>;
|
|
2549
|
+
actions: () => Array<SecondaryActionsItemDefinition> | undefined;
|
|
2550
|
+
} | (() => Array<SecondaryActionsItemDefinition> | undefined);
|
|
2551
|
+
|
|
2552
|
+
/**
|
|
2553
|
+
* Defines the structure and configuration of secondary actions that can be performed on a collection.
|
|
2554
|
+
* @returns An array of actions
|
|
2555
|
+
*/
|
|
2556
|
+
declare type SecondaryActionsItemDefinition = DropdownItem & {
|
|
2557
|
+
enabled?: boolean;
|
|
2558
|
+
hideLabelWhenExpanded?: boolean;
|
|
2559
|
+
};
|
|
2560
|
+
|
|
2153
2561
|
/**
|
|
2154
2562
|
* Represents a collection of selected items.
|
|
2155
2563
|
* @template T - The type of items in the collection
|
|
@@ -2237,6 +2645,124 @@ export declare interface SuccessMessageProps {
|
|
|
2237
2645
|
buttonOnClick?: () => void;
|
|
2238
2646
|
}
|
|
2239
2647
|
|
|
2648
|
+
declare type SummariesDefinition = Record<string, {
|
|
2649
|
+
type: SummaryType;
|
|
2650
|
+
}>;
|
|
2651
|
+
|
|
2652
|
+
/**
|
|
2653
|
+
* Type helper to extract keys from a SummaryDefinition
|
|
2654
|
+
*/
|
|
2655
|
+
declare type SummaryKey<Definition extends SummariesDefinition> = Definition extends readonly string[] ? Definition[number] : keyof Definition;
|
|
2656
|
+
|
|
2657
|
+
declare type SummaryType = "sum";
|
|
2658
|
+
|
|
2659
|
+
declare type TableCollectionProps<R extends RecordType, Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition, ItemActions extends ItemActionsDefinition<R>, NavigationFilters extends NavigationFiltersDefinition, Grouping extends GroupingDefinition<R>> = CollectionProps<R, Filters, Sortings, Summaries, ItemActions, NavigationFilters, Grouping, TableVisualizationOptions<R, Filters, Sortings, Summaries>>;
|
|
2660
|
+
|
|
2661
|
+
declare type TableColumnDefinition<R extends RecordType, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = WithOptionalSorting<R, Sortings> & Pick<ComponentProps<typeof TableHead>, "hidden" | "info" | "infoIcon" | "sticky" | "width"> & {
|
|
2662
|
+
/**
|
|
2663
|
+
* Optional summary configuration for this column
|
|
2664
|
+
* References a key in the Summaries definition, similar to how sorting works
|
|
2665
|
+
*/
|
|
2666
|
+
summary?: SummaryKey<Summaries>;
|
|
2667
|
+
/**
|
|
2668
|
+
* The id of the column (if not provided, the id will be the label of the column)
|
|
2669
|
+
*/
|
|
2670
|
+
id?: ColId;
|
|
2671
|
+
/**
|
|
2672
|
+
* The initial order of the column
|
|
2673
|
+
*/
|
|
2674
|
+
order?: number;
|
|
2675
|
+
/**
|
|
2676
|
+
* The initial state of the hidden (only applies if allowColumnHiding is true)
|
|
2677
|
+
*/
|
|
2678
|
+
hidden?: boolean;
|
|
2679
|
+
/**
|
|
2680
|
+
* Avoid hiding the column by the user
|
|
2681
|
+
*/
|
|
2682
|
+
noHiding?: boolean;
|
|
2683
|
+
};
|
|
2684
|
+
|
|
2685
|
+
declare function TableHead({ children, width, sortState, onSortClick, info, infoIcon, sticky, hidden, align, className, }: TableHeadProps): JSX_2.Element;
|
|
2686
|
+
|
|
2687
|
+
declare interface TableHeadProps {
|
|
2688
|
+
children: React.ReactNode;
|
|
2689
|
+
/**
|
|
2690
|
+
* The width of the header cell. If not provided, the width will be "auto"
|
|
2691
|
+
* @default "auto"
|
|
2692
|
+
*/
|
|
2693
|
+
width?: ColumnWidth;
|
|
2694
|
+
/**
|
|
2695
|
+
* When true, the header cell will stick in the specified position when scrolling horizontally
|
|
2696
|
+
* @default undefined
|
|
2697
|
+
*/
|
|
2698
|
+
sticky?: {
|
|
2699
|
+
left?: number;
|
|
2700
|
+
right?: never;
|
|
2701
|
+
} | {
|
|
2702
|
+
left?: never;
|
|
2703
|
+
right?: number;
|
|
2704
|
+
};
|
|
2705
|
+
/**
|
|
2706
|
+
* The current sort direction of this column. "none" indicates no sorting,
|
|
2707
|
+
* "asc" sorts ascending (A-Z, 1-9), and "desc" sorts descending (Z-A, 9-1)
|
|
2708
|
+
* @default "none"
|
|
2709
|
+
*/
|
|
2710
|
+
sortState?: "none" | "asc" | "desc";
|
|
2711
|
+
/**
|
|
2712
|
+
* Callback fired when the sort button is clicked.
|
|
2713
|
+
* Use this to handle toggling between sort states.
|
|
2714
|
+
*/
|
|
2715
|
+
onSortClick?: () => void;
|
|
2716
|
+
/**
|
|
2717
|
+
* Optional tooltip text. When provided, displays an info icon next to the header content
|
|
2718
|
+
* that shows this text in a tooltip when hovered.
|
|
2719
|
+
*/
|
|
2720
|
+
info?: string;
|
|
2721
|
+
/**
|
|
2722
|
+
* Icon to display when info is provided.
|
|
2723
|
+
* @default InfoCircleLine
|
|
2724
|
+
*/
|
|
2725
|
+
infoIcon?: IconType;
|
|
2726
|
+
/**
|
|
2727
|
+
* When true, the header cell will not be visible.
|
|
2728
|
+
* @default false
|
|
2729
|
+
*/
|
|
2730
|
+
hidden?: boolean;
|
|
2731
|
+
/**
|
|
2732
|
+
* Alingment of the cell
|
|
2733
|
+
* @default "left"
|
|
2734
|
+
*/
|
|
2735
|
+
align?: "left" | "right";
|
|
2736
|
+
/**
|
|
2737
|
+
* The class name of the header cell
|
|
2738
|
+
*/
|
|
2739
|
+
className?: string;
|
|
2740
|
+
}
|
|
2741
|
+
|
|
2742
|
+
declare type TableVisualizationOptions<R extends RecordType, _Filters extends FiltersDefinition, Sortings extends SortingsDefinition, Summaries extends SummariesDefinition> = {
|
|
2743
|
+
/**
|
|
2744
|
+
* The columns to display
|
|
2745
|
+
*/
|
|
2746
|
+
columns: ReadonlyArray<TableColumnDefinition<R, Sortings, Summaries>>;
|
|
2747
|
+
/**
|
|
2748
|
+
* The number of columns to freeze on the left
|
|
2749
|
+
*/
|
|
2750
|
+
frozenColumns?: 0 | 1 | 2;
|
|
2751
|
+
/**
|
|
2752
|
+
* Allow users to reorder columns (you can only reorder columns that are not frozen) (check cols props to define the order)
|
|
2753
|
+
*/
|
|
2754
|
+
allowColumnReordering?: boolean;
|
|
2755
|
+
/**
|
|
2756
|
+
* Allow users to hide columns (you can define especifcally non hiddable columns in col props, also frozen columns are not hiddable)
|
|
2757
|
+
*/
|
|
2758
|
+
allowColumnHiding?: boolean;
|
|
2759
|
+
};
|
|
2760
|
+
|
|
2761
|
+
declare type TableVisualizationSettings = {
|
|
2762
|
+
order: ColId[];
|
|
2763
|
+
hidden: ColId[];
|
|
2764
|
+
};
|
|
2765
|
+
|
|
2240
2766
|
export declare type TagAlertProps<Text extends string = string> = {
|
|
2241
2767
|
text: Text extends "" ? never : Text;
|
|
2242
2768
|
level: Level;
|
|
@@ -2690,6 +3216,17 @@ declare type ValueDisplayRendererContext_2 = {
|
|
|
2690
3216
|
visualization: ValueDisplayVisualizationType;
|
|
2691
3217
|
};
|
|
2692
3218
|
|
|
3219
|
+
/**
|
|
3220
|
+
* The definition of a renderer.
|
|
3221
|
+
* Union type of all possible renderer definitions to ensure the value is the type related the `type`{ [RenderedType]: RendererFuncArgument }.
|
|
3222
|
+
*/
|
|
3223
|
+
declare type ValueDisplayRendererDefinition = {
|
|
3224
|
+
[K in keyof typeof valueDisplayRenderers]: {
|
|
3225
|
+
type: K;
|
|
3226
|
+
value: Parameters<(typeof valueDisplayRenderers)[K]>[0];
|
|
3227
|
+
};
|
|
3228
|
+
}[keyof typeof valueDisplayRenderers];
|
|
3229
|
+
|
|
2693
3230
|
declare const valueDisplayRenderers: {
|
|
2694
3231
|
readonly text: (args: TextCellValue_2) => JSX_2.Element;
|
|
2695
3232
|
readonly longText: (args: LongTextCellValue) => JSX_2.Element;
|
|
@@ -2723,10 +3260,38 @@ showRatio?: boolean;
|
|
|
2723
3260
|
valueFormatter?: (value: string | number | undefined) => string | number;
|
|
2724
3261
|
} & RefAttributes<HTMLDivElement>, "ref"> & RefAttributes<HTMLElement | SVGElement>>;
|
|
2725
3262
|
|
|
3263
|
+
declare type VisualizacionTypeDefinition<Props, Settings = Record<string, never>> = {
|
|
3264
|
+
render: (props: Props) => JSX.Element;
|
|
3265
|
+
renderSettings?: (props: Props) => JSX.Element | null;
|
|
3266
|
+
name: string;
|
|
3267
|
+
icon: IconType;
|
|
3268
|
+
settings: Settings;
|
|
3269
|
+
};
|
|
3270
|
+
|
|
3271
|
+
declare type VisualizationSettings = {
|
|
3272
|
+
[K in keyof typeof collectionVisualizations]: ExtractVisualizationSettings<(typeof collectionVisualizations)[K]>;
|
|
3273
|
+
};
|
|
3274
|
+
|
|
2726
3275
|
export declare type WithGroupId<RecordType> = RecordType & {
|
|
2727
3276
|
[GROUP_ID_SYMBOL]: unknown | undefined;
|
|
2728
3277
|
};
|
|
2729
3278
|
|
|
3279
|
+
declare type WithOptionalSorting<R extends RecordType, Sortings extends SortingsDefinition> = Omit<PropertyDefinition_2<R>, "hide"> & {
|
|
3280
|
+
sorting?: SortingKey<Sortings>;
|
|
3281
|
+
/**
|
|
3282
|
+
* The alignment of the column. If not provided, the alignment will be "left"
|
|
3283
|
+
*/
|
|
3284
|
+
align?: "left" | "right";
|
|
3285
|
+
/**
|
|
3286
|
+
* The width of the column. If not provided, the width will be "auto"
|
|
3287
|
+
*/
|
|
3288
|
+
width?: number;
|
|
3289
|
+
};
|
|
3290
|
+
|
|
3291
|
+
declare type WithOptionalSorting_2<Record, Sortings extends SortingsDefinition> = PropertyDefinition_2<Record> & {
|
|
3292
|
+
sorting?: SortingKey<Sortings>;
|
|
3293
|
+
};
|
|
3294
|
+
|
|
2730
3295
|
declare interface WithTooltipDescription {
|
|
2731
3296
|
/**
|
|
2732
3297
|
* Optional description to show in the tooltip
|