@martinsura/ui 0.1.7 → 0.1.9
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.cjs +24 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -5
- package/dist/index.d.ts +12 -5
- package/dist/index.js +24 -15
- package/dist/index.js.map +1 -1
- package/package.json +10 -10
package/dist/index.d.cts
CHANGED
|
@@ -384,9 +384,14 @@ type GridHandle<TSortField = never, TFilter extends object = Record<string, neve
|
|
|
384
384
|
};
|
|
385
385
|
declare function useGrid<TSortField = never, TFilter extends object = Record<string, never>>(defaults?: Partial<GridState<TSortField, TFilter>>, storageKey?: string): GridHandle<TSortField, TFilter>;
|
|
386
386
|
|
|
387
|
+
type Primitive = string | number | boolean | Date | null | undefined;
|
|
388
|
+
/** Generuje všechny klíče objektu T včetně vnořených (dot-notation), např. "project.name" */
|
|
389
|
+
type NestedKeyOf<T> = {
|
|
390
|
+
[K in keyof T & string]: NonNullable<T[K]> extends Primitive | unknown[] ? K : NonNullable<T[K]> extends object ? K | `${K}.${NestedKeyOf<NonNullable<T[K]>>}` : K;
|
|
391
|
+
}[keyof T & string];
|
|
387
392
|
type GridColumn<T, TSortField = never> = {
|
|
388
393
|
title?: string;
|
|
389
|
-
dataField?:
|
|
394
|
+
dataField?: NestedKeyOf<T>;
|
|
390
395
|
sortBy?: TSortField;
|
|
391
396
|
type?: ColumnType;
|
|
392
397
|
align?: "left" | "center" | "right";
|
|
@@ -400,9 +405,9 @@ type GridSelection<T> = {
|
|
|
400
405
|
onChange: (items: T[]) => void;
|
|
401
406
|
};
|
|
402
407
|
type GridProps<T, TSortField = never, TFilter extends object = Record<string, never>> = {
|
|
403
|
-
items
|
|
404
|
-
totalCount
|
|
405
|
-
loading
|
|
408
|
+
items?: T[] | null;
|
|
409
|
+
totalCount?: number | null;
|
|
410
|
+
loading?: boolean;
|
|
406
411
|
columns: GridColumn<T, TSortField>[];
|
|
407
412
|
grid: GridHandle<TSortField, TFilter>;
|
|
408
413
|
rowKey?: keyof T;
|
|
@@ -434,6 +439,8 @@ type GridProps<T, TSortField = never, TFilter extends object = Record<string, ne
|
|
|
434
439
|
};
|
|
435
440
|
};
|
|
436
441
|
};
|
|
442
|
+
/** Načte hodnotu z objektu pomocí dot-notation cesty, např. "project.name" */
|
|
443
|
+
declare function getNestedValue(obj: unknown, path: string): unknown;
|
|
437
444
|
declare const Grid: <T extends object, TSortField = never, TFilter extends object = Record<string, never>>(props: GridProps<T, TSortField, TFilter>) => react_jsx_runtime.JSX.Element;
|
|
438
445
|
|
|
439
446
|
type FilterDescriptor<TFilter extends object> = {
|
|
@@ -1519,4 +1526,4 @@ type UiThemeConfig = {
|
|
|
1519
1526
|
};
|
|
1520
1527
|
declare function initUI(config?: UiThemeConfig): void;
|
|
1521
1528
|
|
|
1522
|
-
export { ActionBar, ActiveTag, type ActiveTagProps, Alert, type AlertProps, type AlertType, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Button, type ButtonSize, type ButtonVariant, CheckboxInput, type CheckboxInputProps, ColorInput, type ColorInputProps, type ColumnType, ConfirmButton, type ConfirmButtonProps, type ConfirmOptions, DateInput, type DateInputProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, DrawerContent, DrawerFooter, type DrawerPlacement, type DrawerProps, DrawerTitle, Dropdown, type DropdownOption, type DropdownPlacement, type DropdownProps, Empty, type EmptyProps, EmptyState, type EmptyStateProps, EntityHeader, type EntityHeaderProps, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, type FilterDateRangeGroup, FilterDateRangePopover, type FilterDescriptor, FilterNumberInput, type FilterSelectGroupItem, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, type FlagTagProps, FormActions, type FormActionsProps, FormSection, type FormSectionProps, Grid, type GridApiQuery, type GridColumn, GridFilters, type GridHandle, type GridProps, type GridState, HtmlInput, type HtmlInputProps, type IconProps, InlineEdit, type InlineEditProps, InputError, InputField, InputLabel, KeyValue, type KeyValueProps, Modal, ModalContent, ModalFooter, type ModalPlacement, type ModalProps, type ModalSize, ModalTitle, MultiSelectInput, type MultiSelectInputProps, type NotificationOptions, NotificationProvider, type NotificationType, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Panel, type PanelProps, Popconfirm, type PopconfirmProps, Pretty, type PrettyProps, RadioGroup, type RadioGroupProps, type RadioOption, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SelectInput, type SelectInputProps, ServerError, type ServerErrorValue, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, SortDirection, Spinner, type SpinnerColor, type SpinnerProps, StatCard, type StatCardProps, type StatTrendDirection, Stepper, type StepperItem, type StepperProps, SwitchInput, type SwitchInputProps, type TabOption, Table, type TableColumn, type TableProps, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, Tag, type TagProps, TextInput, type TextInputProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, TreeSelectInput, type TreeSelectInputProps, type UiColor, type UiDefaultIconType, type UiIconType, type UiSize, type UiThemeConfig, type UploadConfig, UploadInput, type UploadInputProps, type UploadItem, UploadProvider, type UploadStatus, getIcon, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
|
1529
|
+
export { ActionBar, ActiveTag, type ActiveTagProps, Alert, type AlertProps, type AlertType, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Button, type ButtonSize, type ButtonVariant, CheckboxInput, type CheckboxInputProps, ColorInput, type ColorInputProps, type ColumnType, ConfirmButton, type ConfirmButtonProps, type ConfirmOptions, DateInput, type DateInputProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, DrawerContent, DrawerFooter, type DrawerPlacement, type DrawerProps, DrawerTitle, Dropdown, type DropdownOption, type DropdownPlacement, type DropdownProps, Empty, type EmptyProps, EmptyState, type EmptyStateProps, EntityHeader, type EntityHeaderProps, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, type FilterDateRangeGroup, FilterDateRangePopover, type FilterDescriptor, FilterNumberInput, type FilterSelectGroupItem, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, type FlagTagProps, FormActions, type FormActionsProps, FormSection, type FormSectionProps, Grid, type GridApiQuery, type GridColumn, GridFilters, type GridHandle, type GridProps, type GridState, HtmlInput, type HtmlInputProps, type IconProps, InlineEdit, type InlineEditProps, InputError, InputField, InputLabel, KeyValue, type KeyValueProps, Modal, ModalContent, ModalFooter, type ModalPlacement, type ModalProps, type ModalSize, ModalTitle, MultiSelectInput, type MultiSelectInputProps, type NestedKeyOf, type NotificationOptions, NotificationProvider, type NotificationType, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Panel, type PanelProps, Popconfirm, type PopconfirmProps, Pretty, type PrettyProps, RadioGroup, type RadioGroupProps, type RadioOption, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SelectInput, type SelectInputProps, ServerError, type ServerErrorValue, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, SortDirection, Spinner, type SpinnerColor, type SpinnerProps, StatCard, type StatCardProps, type StatTrendDirection, Stepper, type StepperItem, type StepperProps, SwitchInput, type SwitchInputProps, type TabOption, Table, type TableColumn, type TableProps, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, Tag, type TagProps, TextInput, type TextInputProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, TreeSelectInput, type TreeSelectInputProps, type UiColor, type UiDefaultIconType, type UiIconType, type UiSize, type UiThemeConfig, type UploadConfig, UploadInput, type UploadInputProps, type UploadItem, UploadProvider, type UploadStatus, getIcon, getNestedValue, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
package/dist/index.d.ts
CHANGED
|
@@ -384,9 +384,14 @@ type GridHandle<TSortField = never, TFilter extends object = Record<string, neve
|
|
|
384
384
|
};
|
|
385
385
|
declare function useGrid<TSortField = never, TFilter extends object = Record<string, never>>(defaults?: Partial<GridState<TSortField, TFilter>>, storageKey?: string): GridHandle<TSortField, TFilter>;
|
|
386
386
|
|
|
387
|
+
type Primitive = string | number | boolean | Date | null | undefined;
|
|
388
|
+
/** Generuje všechny klíče objektu T včetně vnořených (dot-notation), např. "project.name" */
|
|
389
|
+
type NestedKeyOf<T> = {
|
|
390
|
+
[K in keyof T & string]: NonNullable<T[K]> extends Primitive | unknown[] ? K : NonNullable<T[K]> extends object ? K | `${K}.${NestedKeyOf<NonNullable<T[K]>>}` : K;
|
|
391
|
+
}[keyof T & string];
|
|
387
392
|
type GridColumn<T, TSortField = never> = {
|
|
388
393
|
title?: string;
|
|
389
|
-
dataField?:
|
|
394
|
+
dataField?: NestedKeyOf<T>;
|
|
390
395
|
sortBy?: TSortField;
|
|
391
396
|
type?: ColumnType;
|
|
392
397
|
align?: "left" | "center" | "right";
|
|
@@ -400,9 +405,9 @@ type GridSelection<T> = {
|
|
|
400
405
|
onChange: (items: T[]) => void;
|
|
401
406
|
};
|
|
402
407
|
type GridProps<T, TSortField = never, TFilter extends object = Record<string, never>> = {
|
|
403
|
-
items
|
|
404
|
-
totalCount
|
|
405
|
-
loading
|
|
408
|
+
items?: T[] | null;
|
|
409
|
+
totalCount?: number | null;
|
|
410
|
+
loading?: boolean;
|
|
406
411
|
columns: GridColumn<T, TSortField>[];
|
|
407
412
|
grid: GridHandle<TSortField, TFilter>;
|
|
408
413
|
rowKey?: keyof T;
|
|
@@ -434,6 +439,8 @@ type GridProps<T, TSortField = never, TFilter extends object = Record<string, ne
|
|
|
434
439
|
};
|
|
435
440
|
};
|
|
436
441
|
};
|
|
442
|
+
/** Načte hodnotu z objektu pomocí dot-notation cesty, např. "project.name" */
|
|
443
|
+
declare function getNestedValue(obj: unknown, path: string): unknown;
|
|
437
444
|
declare const Grid: <T extends object, TSortField = never, TFilter extends object = Record<string, never>>(props: GridProps<T, TSortField, TFilter>) => react_jsx_runtime.JSX.Element;
|
|
438
445
|
|
|
439
446
|
type FilterDescriptor<TFilter extends object> = {
|
|
@@ -1519,4 +1526,4 @@ type UiThemeConfig = {
|
|
|
1519
1526
|
};
|
|
1520
1527
|
declare function initUI(config?: UiThemeConfig): void;
|
|
1521
1528
|
|
|
1522
|
-
export { ActionBar, ActiveTag, type ActiveTagProps, Alert, type AlertProps, type AlertType, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Button, type ButtonSize, type ButtonVariant, CheckboxInput, type CheckboxInputProps, ColorInput, type ColorInputProps, type ColumnType, ConfirmButton, type ConfirmButtonProps, type ConfirmOptions, DateInput, type DateInputProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, DrawerContent, DrawerFooter, type DrawerPlacement, type DrawerProps, DrawerTitle, Dropdown, type DropdownOption, type DropdownPlacement, type DropdownProps, Empty, type EmptyProps, EmptyState, type EmptyStateProps, EntityHeader, type EntityHeaderProps, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, type FilterDateRangeGroup, FilterDateRangePopover, type FilterDescriptor, FilterNumberInput, type FilterSelectGroupItem, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, type FlagTagProps, FormActions, type FormActionsProps, FormSection, type FormSectionProps, Grid, type GridApiQuery, type GridColumn, GridFilters, type GridHandle, type GridProps, type GridState, HtmlInput, type HtmlInputProps, type IconProps, InlineEdit, type InlineEditProps, InputError, InputField, InputLabel, KeyValue, type KeyValueProps, Modal, ModalContent, ModalFooter, type ModalPlacement, type ModalProps, type ModalSize, ModalTitle, MultiSelectInput, type MultiSelectInputProps, type NotificationOptions, NotificationProvider, type NotificationType, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Panel, type PanelProps, Popconfirm, type PopconfirmProps, Pretty, type PrettyProps, RadioGroup, type RadioGroupProps, type RadioOption, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SelectInput, type SelectInputProps, ServerError, type ServerErrorValue, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, SortDirection, Spinner, type SpinnerColor, type SpinnerProps, StatCard, type StatCardProps, type StatTrendDirection, Stepper, type StepperItem, type StepperProps, SwitchInput, type SwitchInputProps, type TabOption, Table, type TableColumn, type TableProps, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, Tag, type TagProps, TextInput, type TextInputProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, TreeSelectInput, type TreeSelectInputProps, type UiColor, type UiDefaultIconType, type UiIconType, type UiSize, type UiThemeConfig, type UploadConfig, UploadInput, type UploadInputProps, type UploadItem, UploadProvider, type UploadStatus, getIcon, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
|
1529
|
+
export { ActionBar, ActiveTag, type ActiveTagProps, Alert, type AlertProps, type AlertType, Avatar, type AvatarProps, type AvatarSize, Badge, type BadgeProps, Button, type ButtonSize, type ButtonVariant, CheckboxInput, type CheckboxInputProps, ColorInput, type ColorInputProps, type ColumnType, ConfirmButton, type ConfirmButtonProps, type ConfirmOptions, DateInput, type DateInputProps, type DescriptionItem, DescriptionList, type DescriptionListProps, Drawer, DrawerContent, DrawerFooter, type DrawerPlacement, type DrawerProps, DrawerTitle, Dropdown, type DropdownOption, type DropdownPlacement, type DropdownProps, Empty, type EmptyProps, EmptyState, type EmptyStateProps, EntityHeader, type EntityHeaderProps, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, type FilterDateRangeGroup, FilterDateRangePopover, type FilterDescriptor, FilterNumberInput, type FilterSelectGroupItem, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, type FlagTagProps, FormActions, type FormActionsProps, FormSection, type FormSectionProps, Grid, type GridApiQuery, type GridColumn, GridFilters, type GridHandle, type GridProps, type GridState, HtmlInput, type HtmlInputProps, type IconProps, InlineEdit, type InlineEditProps, InputError, InputField, InputLabel, KeyValue, type KeyValueProps, Modal, ModalContent, ModalFooter, type ModalPlacement, type ModalProps, type ModalSize, ModalTitle, MultiSelectInput, type MultiSelectInputProps, type NestedKeyOf, type NotificationOptions, NotificationProvider, type NotificationType, NumberInput, type NumberInputProps, PageHeader, type PageHeaderProps, Panel, type PanelProps, Popconfirm, type PopconfirmProps, Pretty, type PrettyProps, RadioGroup, type RadioGroupProps, type RadioOption, SearchInput, type SearchInputProps, SectionHeader, type SectionHeaderProps, SelectInput, type SelectInputProps, ServerError, type ServerErrorValue, Skeleton, type SkeletonProps, SkeletonTable, type SkeletonTableProps, SortDirection, Spinner, type SpinnerColor, type SpinnerProps, StatCard, type StatCardProps, type StatTrendDirection, Stepper, type StepperItem, type StepperProps, SwitchInput, type SwitchInputProps, type TabOption, Table, type TableColumn, type TableProps, type TableSize, Tabs, type TabsProps, type TabsSize, type TabsVariant, Tag, type TagProps, TextInput, type TextInputProps, Textarea, type TextareaProps, Timeline, type TimelineItem, type TimelineProps, Toolbar, type ToolbarProps, Tooltip, type TooltipPlacement, type TooltipProps, TreeSelectInput, type TreeSelectInputProps, type UiColor, type UiDefaultIconType, type UiIconType, type UiSize, type UiThemeConfig, type UploadConfig, UploadInput, type UploadInputProps, type UploadItem, UploadProvider, type UploadStatus, getIcon, getNestedValue, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
package/dist/index.js
CHANGED
|
@@ -1654,6 +1654,12 @@ function useGrid(defaults, storageKey) {
|
|
|
1654
1654
|
};
|
|
1655
1655
|
return { ...state, onChange, apiQuery };
|
|
1656
1656
|
}
|
|
1657
|
+
function getNestedValue(obj, path) {
|
|
1658
|
+
return path.split(".").reduce((acc, key) => {
|
|
1659
|
+
if (acc == null || typeof acc !== "object") return void 0;
|
|
1660
|
+
return acc[key];
|
|
1661
|
+
}, obj);
|
|
1662
|
+
}
|
|
1657
1663
|
var columnTypeWidth2 = {
|
|
1658
1664
|
date: 100,
|
|
1659
1665
|
datetime: 130,
|
|
@@ -1739,10 +1745,13 @@ var Pagination = ({ current, pageSize, total, onChange, showPageNumberChanger, s
|
|
|
1739
1745
|
};
|
|
1740
1746
|
var Grid = (props) => {
|
|
1741
1747
|
const { grid } = props;
|
|
1748
|
+
const items = props.items ?? [];
|
|
1749
|
+
const totalCount = props.totalCount ?? 0;
|
|
1750
|
+
const loading = props.loading ?? false;
|
|
1742
1751
|
const sc = tableSizeConfig[props.size ?? "middle"];
|
|
1743
1752
|
const verticalBorders = props.verticalBorders ?? false;
|
|
1744
|
-
const isInitialLoading =
|
|
1745
|
-
const isEmpty = !
|
|
1753
|
+
const isInitialLoading = loading && items.length === 0;
|
|
1754
|
+
const isEmpty = !loading && items.length === 0;
|
|
1746
1755
|
const handleSort = (col) => {
|
|
1747
1756
|
if (col.sortBy === void 0) return;
|
|
1748
1757
|
const isCurrent = grid.sortBy === col.sortBy;
|
|
@@ -1751,20 +1760,20 @@ var Grid = (props) => {
|
|
|
1751
1760
|
direction: isCurrent && grid.direction === SortDirection.Asc ? SortDirection.Desc : SortDirection.Asc
|
|
1752
1761
|
});
|
|
1753
1762
|
};
|
|
1754
|
-
|
|
1763
|
+
items.map((item) => getKey2(item, items, props.rowKey));
|
|
1755
1764
|
const selectedKeys = new Set(
|
|
1756
|
-
(props.selection?.selectedItems ?? []).map((item) => getKey2(item,
|
|
1765
|
+
(props.selection?.selectedItems ?? []).map((item) => getKey2(item, items, props.rowKey))
|
|
1757
1766
|
);
|
|
1758
|
-
const allSelected =
|
|
1759
|
-
const someSelected = !allSelected &&
|
|
1767
|
+
const allSelected = items.length > 0 && items.every((item) => selectedKeys.has(getKey2(item, items, props.rowKey)));
|
|
1768
|
+
const someSelected = !allSelected && items.some((item) => selectedKeys.has(getKey2(item, items, props.rowKey)));
|
|
1760
1769
|
const toggleAll = () => {
|
|
1761
1770
|
if (!props.selection) return;
|
|
1762
|
-
props.selection.onChange(allSelected ? [] : [...
|
|
1771
|
+
props.selection.onChange(allSelected ? [] : [...items]);
|
|
1763
1772
|
};
|
|
1764
1773
|
const toggleRow = (item) => {
|
|
1765
1774
|
if (!props.selection) return;
|
|
1766
|
-
const key = getKey2(item,
|
|
1767
|
-
const next = selectedKeys.has(key) ? props.selection.selectedItems.filter((s) => getKey2(s,
|
|
1775
|
+
const key = getKey2(item, items, props.rowKey);
|
|
1776
|
+
const next = selectedKeys.has(key) ? props.selection.selectedItems.filter((s) => getKey2(s, items, props.rowKey) !== key) : [...props.selection.selectedItems, item];
|
|
1768
1777
|
props.selection.onChange(next);
|
|
1769
1778
|
};
|
|
1770
1779
|
return /* @__PURE__ */ jsxs(
|
|
@@ -1776,7 +1785,7 @@ var Grid = (props) => {
|
|
|
1776
1785
|
props.className
|
|
1777
1786
|
),
|
|
1778
1787
|
children: [
|
|
1779
|
-
|
|
1788
|
+
loading && !isInitialLoading && /* @__PURE__ */ jsx("div", { className: twMerge("absolute inset-0 z-10 bg-white/60 flex items-center justify-center", props.classNames?.overlay), children: /* @__PURE__ */ jsx(Spinner, { size: "large", color: "primary" }) }),
|
|
1780
1789
|
/* @__PURE__ */ jsx("div", { className: "overflow-x-auto", children: /* @__PURE__ */ jsxs("table", { className: twMerge("w-full border-collapse", props.classNames?.table), children: [
|
|
1781
1790
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { className: twMerge("bg-(--ui-primary) text-(--ui-primary-text)", props.classNames?.headerRow), children: [
|
|
1782
1791
|
props.selection && /* @__PURE__ */ jsx("th", { className: twMerge(sc.th, "w-9", verticalBorders && tableHeaderVerticalBorderClass, props.classNames?.headerCell), children: /* @__PURE__ */ jsx(
|
|
@@ -1831,8 +1840,8 @@ var Grid = (props) => {
|
|
|
1831
1840
|
className: twMerge("px-3", props.classNames?.emptyCell),
|
|
1832
1841
|
children: /* @__PURE__ */ jsx(Empty, { size: "compact", text: props.emptyText ?? "\u017D\xE1dn\xE9 z\xE1znamy", className: sc.emptyPy })
|
|
1833
1842
|
}
|
|
1834
|
-
) }) :
|
|
1835
|
-
const key = getKey2(item,
|
|
1843
|
+
) }) : items.map((item, rowIdx) => {
|
|
1844
|
+
const key = getKey2(item, items, props.rowKey);
|
|
1836
1845
|
const isSelected = selectedKeys.has(key);
|
|
1837
1846
|
return /* @__PURE__ */ jsxs(
|
|
1838
1847
|
"tr",
|
|
@@ -1863,7 +1872,7 @@ var Grid = (props) => {
|
|
|
1863
1872
|
}
|
|
1864
1873
|
),
|
|
1865
1874
|
props.columns.map((col, colIdx) => {
|
|
1866
|
-
const content = col.render ? col.render(item) : col.dataField ? formatCellValue(item
|
|
1875
|
+
const content = col.render ? col.render(item) : col.dataField ? formatCellValue(getNestedValue(item, col.dataField), col.type) : null;
|
|
1867
1876
|
const centeredContent = col.align === "center";
|
|
1868
1877
|
const rightAlignedContent = col.align === "right";
|
|
1869
1878
|
return /* @__PURE__ */ jsx(
|
|
@@ -1906,7 +1915,7 @@ var Grid = (props) => {
|
|
|
1906
1915
|
{
|
|
1907
1916
|
current: grid.pageNumber,
|
|
1908
1917
|
pageSize: grid.pageSize,
|
|
1909
|
-
total:
|
|
1918
|
+
total: totalCount,
|
|
1910
1919
|
showPageNumberChanger: props.showPageNumberChanger ?? false,
|
|
1911
1920
|
showPageSizeChanger: props.showPageSizeChanger ?? false,
|
|
1912
1921
|
onChange: (page, pageSize) => grid.onChange({ pageNumber: page, pageSize }),
|
|
@@ -5277,6 +5286,6 @@ function initUI(config) {
|
|
|
5277
5286
|
r.style.setProperty("--ui-empty-compact-description", layout.empty.compactDescription);
|
|
5278
5287
|
}
|
|
5279
5288
|
|
|
5280
|
-
export { ActionBar, ActiveTag, Alert, Avatar, Badge, Button, CheckboxInput, ColorInput, ConfirmButton, DateInput, DescriptionList, Drawer, DrawerContent, DrawerFooter, DrawerTitle, Dropdown, Empty, EmptyState, EntityHeader, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, FilterDateRangePopover, FilterNumberInput, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, FormActions, FormSection, Grid, GridFilters, HtmlInput, InlineEdit, InputError, InputField, InputLabel, KeyValue, Modal, ModalContent, ModalFooter, ModalTitle, MultiSelectInput, NotificationProvider, NumberInput, PageHeader, Panel, Popconfirm, Pretty, RadioGroup, SearchInput, SectionHeader, SelectInput, ServerError, Skeleton, SkeletonTable, SortDirection, Spinner, StatCard, Stepper, SwitchInput, Table, Tabs, Tag, TextInput, Textarea, Timeline, Toolbar, Tooltip, TreeSelectInput, UploadInput, UploadProvider, getIcon, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
|
5289
|
+
export { ActionBar, ActiveTag, Alert, Avatar, Badge, Button, CheckboxInput, ColorInput, ConfirmButton, DateInput, DescriptionList, Drawer, DrawerContent, DrawerFooter, DrawerTitle, Dropdown, Empty, EmptyState, EntityHeader, ErrorProvider, Fieldset, FilterCheckboxInput, FilterDateInput, FilterDateRangePopover, FilterNumberInput, FilterSelectGroupPopover, FilterSelectInput, FilterTextInput, FlagTag, FormActions, FormSection, Grid, GridFilters, HtmlInput, InlineEdit, InputError, InputField, InputLabel, KeyValue, Modal, ModalContent, ModalFooter, ModalTitle, MultiSelectInput, NotificationProvider, NumberInput, PageHeader, Panel, Popconfirm, Pretty, RadioGroup, SearchInput, SectionHeader, SelectInput, ServerError, Skeleton, SkeletonTable, SortDirection, Spinner, StatCard, Stepper, SwitchInput, Table, Tabs, Tag, TextInput, Textarea, Timeline, Toolbar, Tooltip, TreeSelectInput, UploadInput, UploadProvider, getIcon, getNestedValue, initUI, notification, registerIcons, uiTheme, useDrawer, useGrid, useModal, useNotification, useUploadConfig };
|
|
5281
5290
|
//# sourceMappingURL=index.js.map
|
|
5282
5291
|
//# sourceMappingURL=index.js.map
|