@nar-bus/lena-ui-shared 1.1.4 → 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 +101 -1
- package/dist/index.js +2705 -2537
- package/dist/index.js.map +1 -1
- package/dist/theme.css +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -854,6 +854,16 @@ export declare interface DataTableProps<TData> extends DataTableDataProps<TData>
|
|
|
854
854
|
columns: ColumnDef<TData, unknown>[];
|
|
855
855
|
}
|
|
856
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
|
+
|
|
857
867
|
/** Search props */
|
|
858
868
|
export declare interface DataTableSearchProps {
|
|
859
869
|
searchValue: string;
|
|
@@ -974,6 +984,18 @@ export declare function dateStringToTimestamp(dateStr: string, endOfDay?: boolea
|
|
|
974
984
|
*/
|
|
975
985
|
export declare const DEFAULT_PAGE_SIZE_OPTIONS: number[];
|
|
976
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
|
+
|
|
977
999
|
/**
|
|
978
1000
|
* Default values
|
|
979
1001
|
*/
|
|
@@ -1201,6 +1223,44 @@ declare interface FileFieldProps<TFieldValues extends FieldValues> {
|
|
|
1201
1223
|
errorHint?: string;
|
|
1202
1224
|
}
|
|
1203
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
|
+
|
|
1204
1264
|
export declare function FilterFieldRow({ fieldConfig, filter, onFilterChange }: FilterFieldRowProps): JSX.Element;
|
|
1205
1265
|
|
|
1206
1266
|
export declare interface FilterFieldRowProps {
|
|
@@ -1419,6 +1479,19 @@ declare interface IconTextCellProps {
|
|
|
1419
1479
|
className?: string;
|
|
1420
1480
|
}
|
|
1421
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
|
+
|
|
1422
1495
|
export declare function InfoCard({ icon, label, value, variant, iconColor, className, }: InfoCardProps): JSX.Element;
|
|
1423
1496
|
|
|
1424
1497
|
export declare function InfoCardGrid({ children, columns, className, }: InfoCardGridProps): JSX.Element;
|
|
@@ -2592,6 +2665,16 @@ export declare const toggleVariants: (props?: ({
|
|
|
2592
2665
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
2593
2666
|
} & ClassProp) | undefined) => string;
|
|
2594
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
|
+
|
|
2595
2678
|
export declare function Tooltip({ ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Root>): JSX.Element;
|
|
2596
2679
|
|
|
2597
2680
|
export declare function TooltipContent({ className, sideOffset, children, ...props }: React_2.ComponentProps<typeof TooltipPrimitive.Content>): JSX.Element;
|
|
@@ -2625,6 +2708,17 @@ declare interface TreeNodeOperation {
|
|
|
2625
2708
|
|
|
2626
2709
|
export declare const trLabels: LenaUILabels;
|
|
2627
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
|
+
|
|
2628
2722
|
/**
|
|
2629
2723
|
* UnifiedTabs - Single tab component for both list and detail pages
|
|
2630
2724
|
*/
|
|
@@ -2691,7 +2785,7 @@ declare interface UseDataTableOptions<TData> extends CreateDataTableStoreOptions
|
|
|
2691
2785
|
data?: TData[];
|
|
2692
2786
|
}
|
|
2693
2787
|
|
|
2694
|
-
declare interface UseDataTableReturn<TData> {
|
|
2788
|
+
export declare interface UseDataTableReturn<TData> {
|
|
2695
2789
|
/** Search request ready for API call (100% backend compatible) */
|
|
2696
2790
|
searchRequest: SearchRequest;
|
|
2697
2791
|
/** Pagination props to spread to DataTable */
|
|
@@ -2742,6 +2836,12 @@ declare interface UseDataTableUrlOptions {
|
|
|
2742
2836
|
debounceMs?: number;
|
|
2743
2837
|
}
|
|
2744
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
|
+
|
|
2745
2845
|
export declare function useJsonTree({ value, onChange }: UseJsonTreeOptions): UseJsonTreeReturn;
|
|
2746
2846
|
|
|
2747
2847
|
declare interface UseJsonTreeOptions {
|