@nar-bus/lena-ui-shared 1.1.2 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +197 -5
- package/dist/index.js +6117 -5299
- package/dist/index.js.map +1 -1
- package/dist/theme.css +90 -6
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -52,6 +52,14 @@ export declare function AccordionItem({ className, ...props }: React_2.Component
|
|
|
52
52
|
|
|
53
53
|
export declare function AccordionTrigger({ className, children, ...props }: React_2.ComponentProps<typeof AccordionPrimitive.Trigger>): JSX.Element;
|
|
54
54
|
|
|
55
|
+
export declare function ActiveFiltersBar({ fieldConfig, filters, onFiltersChange }: ActiveFiltersBarProps): JSX.Element | null;
|
|
56
|
+
|
|
57
|
+
export declare interface ActiveFiltersBarProps {
|
|
58
|
+
fieldConfig: FieldConfig[];
|
|
59
|
+
filters: FilterState[];
|
|
60
|
+
onFiltersChange: (filters: FilterState[]) => void;
|
|
61
|
+
}
|
|
62
|
+
|
|
55
63
|
export declare function AdvancedJsonEditor({ value, onChange, onSave, title, icon: Icon, defaultOpen, maxViewHeight, rows, placeholder, defaultMode, allowModeSwitch, schema, editable, disabled, disabledReason, isSaving, showLineNumbers, showValidation, showStats, }: AdvancedJsonEditorProps): JSX.Element;
|
|
56
64
|
|
|
57
65
|
export declare interface AdvancedJsonEditorProps {
|
|
@@ -699,7 +707,17 @@ export declare interface CRUDTabContentProps<T extends {
|
|
|
699
707
|
onExternalCreateSheetOpenChange?: (open: boolean) => void;
|
|
700
708
|
}
|
|
701
709
|
|
|
702
|
-
export declare function
|
|
710
|
+
export declare function DataRow({ label, value, mono, suffix, className }: DataRowProps): JSX.Element;
|
|
711
|
+
|
|
712
|
+
export declare interface DataRowProps {
|
|
713
|
+
label: string;
|
|
714
|
+
value?: ReactNode;
|
|
715
|
+
mono?: boolean;
|
|
716
|
+
suffix?: string;
|
|
717
|
+
className?: string;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
export declare function DataTable<TData>({ columns, getRowId, data, isLoading, error, pagination, onPageChange, onPageSizeChange, onPrefetchPage, pageSizeOptions, sortBy, sortDirection, onSortChange, searchValue, onSearchChange, searchPlaceholder, searchDebounceMs, fieldConfig, filters, onFiltersChange, enableRowSelection, rowSelection, onRowSelectionChange, bulkActions, rowActions, toolbarStart, toolbarEnd, className, emptyIcon, emptyTitle, emptyDescription, onRowClick, onRowHover, rowClassName, meta, headerColor, }: DataTableComponentProps<TData>): JSX.Element;
|
|
703
721
|
|
|
704
722
|
declare interface DataTableActions {
|
|
705
723
|
setGeneralSearch: (value: string) => void;
|
|
@@ -775,6 +793,8 @@ declare interface DataTableComponentProps<TData> {
|
|
|
775
793
|
onRowHover?: (row: TData) => void;
|
|
776
794
|
rowClassName?: (row: TData) => string;
|
|
777
795
|
meta?: Record<string, unknown>;
|
|
796
|
+
/** Custom header color (CSS color value). Overrides --table-header variable */
|
|
797
|
+
headerColor?: string;
|
|
778
798
|
}
|
|
779
799
|
|
|
780
800
|
/** Customization props */
|
|
@@ -834,6 +854,16 @@ export declare interface DataTableProps<TData> extends DataTableDataProps<TData>
|
|
|
834
854
|
columns: ColumnDef<TData, unknown>[];
|
|
835
855
|
}
|
|
836
856
|
|
|
857
|
+
export declare function DataTableSearch({ value, onChange, placeholder, debounceMs, className, }: DataTableSearchInputProps): JSX.Element;
|
|
858
|
+
|
|
859
|
+
export declare interface DataTableSearchInputProps {
|
|
860
|
+
value: string;
|
|
861
|
+
onChange: (value: string) => void;
|
|
862
|
+
placeholder?: string;
|
|
863
|
+
debounceMs?: number;
|
|
864
|
+
className?: string;
|
|
865
|
+
}
|
|
866
|
+
|
|
837
867
|
/** Search props */
|
|
838
868
|
export declare interface DataTableSearchProps {
|
|
839
869
|
searchValue: string;
|
|
@@ -954,6 +984,18 @@ export declare function dateStringToTimestamp(dateStr: string, endOfDay?: boolea
|
|
|
954
984
|
*/
|
|
955
985
|
export declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
956
986
|
|
|
987
|
+
/**
|
|
988
|
+
* Default pagination state — use as initial value when API hasn't responded yet
|
|
989
|
+
*/
|
|
990
|
+
export declare const DEFAULT_PAGINATION: {
|
|
991
|
+
readonly page: 0;
|
|
992
|
+
readonly size: 20;
|
|
993
|
+
readonly totalElements: 0;
|
|
994
|
+
readonly totalPages: 0;
|
|
995
|
+
readonly hasNext: false;
|
|
996
|
+
readonly hasPrevious: false;
|
|
997
|
+
};
|
|
998
|
+
|
|
957
999
|
/**
|
|
958
1000
|
* Default values
|
|
959
1001
|
*/
|
|
@@ -1181,8 +1223,78 @@ declare interface FileFieldProps<TFieldValues extends FieldValues> {
|
|
|
1181
1223
|
errorHint?: string;
|
|
1182
1224
|
}
|
|
1183
1225
|
|
|
1226
|
+
export declare function FilterableListLayout({ fieldConfig, filters, onFiltersChange, filterPanelOpen, onFilterPanelToggle, searchValue, onSearchChange, searchPlaceholder, onRefresh, isRefreshing, activeFilterCount, toolbarStart, addButton, filterLabel, refreshLabel, children, className, }: FilterableListLayoutProps): JSX.Element;
|
|
1227
|
+
|
|
1228
|
+
export declare interface FilterableListLayoutProps {
|
|
1229
|
+
/** FieldConfig array for FilterSidePanel + ActiveFiltersBar */
|
|
1230
|
+
fieldConfig: FieldConfig[];
|
|
1231
|
+
/** Current filter state */
|
|
1232
|
+
filters: FilterState[];
|
|
1233
|
+
/** Filter change handler — passed to FilterSidePanel + ActiveFiltersBar */
|
|
1234
|
+
onFiltersChange: (filters: FilterState[]) => void;
|
|
1235
|
+
/** Whether the filter side panel is open */
|
|
1236
|
+
filterPanelOpen: boolean;
|
|
1237
|
+
/** Toggle filter panel */
|
|
1238
|
+
onFilterPanelToggle: () => void;
|
|
1239
|
+
/** Debounced search value */
|
|
1240
|
+
searchValue: string;
|
|
1241
|
+
/** Search change handler */
|
|
1242
|
+
onSearchChange: (value: string) => void;
|
|
1243
|
+
/** Search input placeholder */
|
|
1244
|
+
searchPlaceholder?: string;
|
|
1245
|
+
/** Refresh handler — typically queryClient.invalidateQueries */
|
|
1246
|
+
onRefresh: () => void;
|
|
1247
|
+
/** Shows spinning animation on refresh button */
|
|
1248
|
+
isRefreshing?: boolean;
|
|
1249
|
+
/** Number of active filters — shown as badge on filter button */
|
|
1250
|
+
activeFilterCount?: number;
|
|
1251
|
+
/** Slot: entity label (left side of toolbar) — e.g. ToolbarEntityLabel */
|
|
1252
|
+
toolbarStart?: ReactNode;
|
|
1253
|
+
/** Slot: add/create button (right side of toolbar) */
|
|
1254
|
+
addButton?: ReactNode;
|
|
1255
|
+
/** i18n labels */
|
|
1256
|
+
filterLabel?: string;
|
|
1257
|
+
refreshLabel?: string;
|
|
1258
|
+
/** Main content — typically DataTable */
|
|
1259
|
+
children: ReactNode;
|
|
1260
|
+
/** Additional className for the outer container */
|
|
1261
|
+
className?: string;
|
|
1262
|
+
}
|
|
1263
|
+
|
|
1264
|
+
export declare function FilterFieldRow({ fieldConfig, filter, onFilterChange }: FilterFieldRowProps): JSX.Element;
|
|
1265
|
+
|
|
1266
|
+
export declare interface FilterFieldRowProps {
|
|
1267
|
+
fieldConfig: FieldConfig;
|
|
1268
|
+
filter: FilterState | undefined;
|
|
1269
|
+
onFilterChange: (filter: FilterState | null) => void;
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1184
1272
|
export declare type FilterOperator = 'EQUALS' | 'NOT_EQUALS' | 'CONTAINS' | 'STARTS_WITH' | 'ENDS_WITH' | 'GREATER_THAN' | 'GREATER_THAN_OR_EQUALS' | 'LESS_THAN' | 'LESS_THAN_OR_EQUALS' | 'IN' | 'NOT_IN' | 'BETWEEN' | 'IS_NULL' | 'IS_NOT_NULL';
|
|
1185
1273
|
|
|
1274
|
+
declare interface FilterPanelLabels {
|
|
1275
|
+
title: string;
|
|
1276
|
+
apply: string;
|
|
1277
|
+
clearAll: string;
|
|
1278
|
+
clearChip: string;
|
|
1279
|
+
activeFilter: string;
|
|
1280
|
+
empty: string;
|
|
1281
|
+
notEmpty: string;
|
|
1282
|
+
select: string;
|
|
1283
|
+
yes: string;
|
|
1284
|
+
no: string;
|
|
1285
|
+
operators: Record<string, string>;
|
|
1286
|
+
}
|
|
1287
|
+
|
|
1288
|
+
export declare function FilterSidePanel({ open, onClose, fieldConfig, filters, onFiltersChange, }: FilterSidePanelProps): JSX.Element;
|
|
1289
|
+
|
|
1290
|
+
export declare interface FilterSidePanelProps {
|
|
1291
|
+
open: boolean;
|
|
1292
|
+
onClose: () => void;
|
|
1293
|
+
fieldConfig: FieldConfig[];
|
|
1294
|
+
filters: FilterState[];
|
|
1295
|
+
onFiltersChange: (filters: FilterState[]) => void;
|
|
1296
|
+
}
|
|
1297
|
+
|
|
1186
1298
|
export declare interface FilterState {
|
|
1187
1299
|
/** Unique filter ID (UI only, for React keys) */
|
|
1188
1300
|
id: string;
|
|
@@ -1367,6 +1479,19 @@ declare interface IconTextCellProps {
|
|
|
1367
1479
|
className?: string;
|
|
1368
1480
|
}
|
|
1369
1481
|
|
|
1482
|
+
export declare function IconTooltipButton({ icon: Icon, tooltip, onClick, disabled, variant, size, className, spinning, }: IconTooltipButtonProps): JSX.Element;
|
|
1483
|
+
|
|
1484
|
+
export declare interface IconTooltipButtonProps {
|
|
1485
|
+
icon: LucideIcon;
|
|
1486
|
+
tooltip: string;
|
|
1487
|
+
onClick: () => void;
|
|
1488
|
+
disabled?: boolean;
|
|
1489
|
+
variant?: 'ghost' | 'outline';
|
|
1490
|
+
size?: 'sm' | 'icon';
|
|
1491
|
+
className?: string;
|
|
1492
|
+
spinning?: boolean;
|
|
1493
|
+
}
|
|
1494
|
+
|
|
1370
1495
|
export declare function InfoCard({ icon, label, value, variant, iconColor, className, }: InfoCardProps): JSX.Element;
|
|
1371
1496
|
|
|
1372
1497
|
export declare function InfoCardGrid({ children, columns, className, }: InfoCardGridProps): JSX.Element;
|
|
@@ -1386,6 +1511,14 @@ declare interface InfoCardProps {
|
|
|
1386
1511
|
className?: string;
|
|
1387
1512
|
}
|
|
1388
1513
|
|
|
1514
|
+
export declare function InfoSection({ title, children, className }: InfoSectionProps): JSX.Element;
|
|
1515
|
+
|
|
1516
|
+
export declare interface InfoSectionProps {
|
|
1517
|
+
title: string;
|
|
1518
|
+
children: ReactNode;
|
|
1519
|
+
className?: string;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1389
1522
|
export declare function Input({ className, type, ...props }: React_2.ComponentProps<"input">): JSX.Element;
|
|
1390
1523
|
|
|
1391
1524
|
/**
|
|
@@ -1503,6 +1636,7 @@ export declare interface LenaUILabels {
|
|
|
1503
1636
|
jsonEditor: JsonEditorLabels;
|
|
1504
1637
|
common: CommonLabels;
|
|
1505
1638
|
deleteDialog: DeleteDialogLabels;
|
|
1639
|
+
filterPanel: FilterPanelLabels;
|
|
1506
1640
|
}
|
|
1507
1641
|
|
|
1508
1642
|
/**
|
|
@@ -1623,6 +1757,11 @@ declare interface NumberFieldProps<TFieldValues extends FieldValues> {
|
|
|
1623
1757
|
*/
|
|
1624
1758
|
export declare const OPERATOR_LABELS: Record<FilterOperator, string>;
|
|
1625
1759
|
|
|
1760
|
+
/**
|
|
1761
|
+
* Short symbolic representations of filter operators
|
|
1762
|
+
*/
|
|
1763
|
+
export declare const OPERATOR_SYMBOLS: Record<FilterOperator, string>;
|
|
1764
|
+
|
|
1626
1765
|
/**
|
|
1627
1766
|
* Available operators grouped by field type
|
|
1628
1767
|
* Matches backend GenericSpecification supported operations
|
|
@@ -1643,6 +1782,30 @@ export declare type OptimisticAction<T> = {
|
|
|
1643
1782
|
id: number | string;
|
|
1644
1783
|
};
|
|
1645
1784
|
|
|
1785
|
+
export declare function OverviewPanel({ children, className }: OverviewPanelProps): JSX.Element;
|
|
1786
|
+
|
|
1787
|
+
export declare function OverviewPanelGrid({ children, columns, className }: OverviewPanelGridProps): JSX.Element;
|
|
1788
|
+
|
|
1789
|
+
export declare interface OverviewPanelGridProps {
|
|
1790
|
+
children: ReactNode;
|
|
1791
|
+
columns?: string;
|
|
1792
|
+
className?: string;
|
|
1793
|
+
}
|
|
1794
|
+
|
|
1795
|
+
export declare interface OverviewPanelProps {
|
|
1796
|
+
children: ReactNode;
|
|
1797
|
+
className?: string;
|
|
1798
|
+
}
|
|
1799
|
+
|
|
1800
|
+
export declare function OverviewPanelTopBar({ icon: Icon, segments, actions, className }: OverviewPanelTopBarProps): JSX.Element;
|
|
1801
|
+
|
|
1802
|
+
export declare interface OverviewPanelTopBarProps {
|
|
1803
|
+
icon: LucideIcon;
|
|
1804
|
+
segments: string[];
|
|
1805
|
+
actions?: ReactNode;
|
|
1806
|
+
className?: string;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1646
1809
|
export declare interface PagedResponse<T> {
|
|
1647
1810
|
status: number;
|
|
1648
1811
|
success: boolean;
|
|
@@ -2086,7 +2249,7 @@ export declare interface SidebarNavItem {
|
|
|
2086
2249
|
children?: SidebarNavItem[];
|
|
2087
2250
|
}
|
|
2088
2251
|
|
|
2089
|
-
export declare function SimpleDataTable<TData>({ columns, data, getRowId, isLoading, error, meta, enableSearch, searchPlaceholder, searchColumn, emptyIcon, emptyTitle, emptyDescription, onRowClick, rowClassName, className, loadingRows, }: SimpleDataTableProps<TData>): JSX.Element;
|
|
2252
|
+
export declare function SimpleDataTable<TData>({ columns, data, getRowId, isLoading, error, meta, enableSearch, searchPlaceholder, searchColumn, emptyIcon, emptyTitle, emptyDescription, onRowClick, rowClassName, className, loadingRows, headerColor, }: SimpleDataTableProps<TData>): JSX.Element;
|
|
2090
2253
|
|
|
2091
2254
|
declare interface SimpleDataTableProps<TData> {
|
|
2092
2255
|
/** Column definitions */
|
|
@@ -2121,6 +2284,8 @@ declare interface SimpleDataTableProps<TData> {
|
|
|
2121
2284
|
className?: string;
|
|
2122
2285
|
/** Number of skeleton rows for loading state */
|
|
2123
2286
|
loadingRows?: number;
|
|
2287
|
+
/** Custom header color (CSS color value). Overrides --table-header variable */
|
|
2288
|
+
headerColor?: string;
|
|
2124
2289
|
}
|
|
2125
2290
|
|
|
2126
2291
|
export declare function Skeleton({ className, ...props }: React.ComponentProps<"div">): JSX.Element;
|
|
@@ -2500,6 +2665,16 @@ export declare const toggleVariants: (props?: ({
|
|
|
2500
2665
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2501
2666
|
} & ClassProp) | undefined) => string;
|
|
2502
2667
|
|
|
2668
|
+
export declare function ToolbarEntityLabel({ icon: Icon, entityName, totalElements, countLabel, className, }: ToolbarEntityLabelProps): JSX.Element;
|
|
2669
|
+
|
|
2670
|
+
export declare interface ToolbarEntityLabelProps {
|
|
2671
|
+
icon: LucideIcon;
|
|
2672
|
+
entityName: string;
|
|
2673
|
+
totalElements: number;
|
|
2674
|
+
countLabel?: string;
|
|
2675
|
+
className?: string;
|
|
2676
|
+
}
|
|
2677
|
+
|
|
2503
2678
|
export declare function Tooltip({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Root>): JSX.Element;
|
|
2504
2679
|
|
|
2505
2680
|
export declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Content>): JSX.Element;
|
|
@@ -2533,6 +2708,17 @@ declare interface TreeNodeOperation {
|
|
|
2533
2708
|
|
|
2534
2709
|
export declare const trLabels: LenaUILabels;
|
|
2535
2710
|
|
|
2711
|
+
export declare function UnderConstructionPage({ title, description, goBackLabel, homeLabel, onGoBack, onGoHome, }: UnderConstructionPageProps): JSX.Element;
|
|
2712
|
+
|
|
2713
|
+
export declare interface UnderConstructionPageProps {
|
|
2714
|
+
title?: string;
|
|
2715
|
+
description?: string;
|
|
2716
|
+
goBackLabel?: string;
|
|
2717
|
+
homeLabel?: string;
|
|
2718
|
+
onGoBack?: () => void;
|
|
2719
|
+
onGoHome?: () => void;
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2536
2722
|
/**
|
|
2537
2723
|
* UnifiedTabs - Single tab component for both list and detail pages
|
|
2538
2724
|
*/
|
|
@@ -2547,8 +2733,8 @@ export declare interface UnifiedTabsProps {
|
|
|
2547
2733
|
onTabChange: (tabId: string) => void;
|
|
2548
2734
|
/** Tab content - use TabsContent for overflow variant, conditional render for simple */
|
|
2549
2735
|
children: React.ReactNode;
|
|
2550
|
-
/** Tab variant: 'simple' for list pages, 'overflow' for detail pages */
|
|
2551
|
-
variant?: 'simple' | 'overflow';
|
|
2736
|
+
/** Tab variant: 'simple' for list pages, 'overflow' for detail pages, 'segmented' for iOS-style segmented control */
|
|
2737
|
+
variant?: 'simple' | 'overflow' | 'segmented';
|
|
2552
2738
|
/** Dynamic count getter - overrides static count in TabConfig */
|
|
2553
2739
|
getTabCount?: (tabId: string) => number | undefined;
|
|
2554
2740
|
/** Additional CSS classes for the container */
|
|
@@ -2599,7 +2785,7 @@ declare interface UseDataTableOptions<TData> extends CreateDataTableStoreOptions
|
|
|
2599
2785
|
data?: TData[];
|
|
2600
2786
|
}
|
|
2601
2787
|
|
|
2602
|
-
declare interface UseDataTableReturn<TData> {
|
|
2788
|
+
export declare interface UseDataTableReturn<TData> {
|
|
2603
2789
|
/** Search request ready for API call (100% backend compatible) */
|
|
2604
2790
|
searchRequest: SearchRequest;
|
|
2605
2791
|
/** Pagination props to spread to DataTable */
|
|
@@ -2650,6 +2836,12 @@ declare interface UseDataTableUrlOptions {
|
|
|
2650
2836
|
debounceMs?: number;
|
|
2651
2837
|
}
|
|
2652
2838
|
|
|
2839
|
+
/**
|
|
2840
|
+
* Debounces a value by the specified delay.
|
|
2841
|
+
* Returns the debounced value that only updates after `delay` ms of inactivity.
|
|
2842
|
+
*/
|
|
2843
|
+
export declare function useDebounce<T>(value: T, delay?: number): T;
|
|
2844
|
+
|
|
2653
2845
|
export declare function useJsonTree({ value, onChange }: UseJsonTreeOptions): UseJsonTreeReturn;
|
|
2654
2846
|
|
|
2655
2847
|
declare interface UseJsonTreeOptions {
|