zaravand-ui 3.1.4 → 3.1.6
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/components/Table/Table.constants.d.ts +2 -1
- package/dist/components/Table/Table.interface.d.ts +26 -0
- package/dist/components/Table/hooks/useTablePagination.d.ts +0 -1
- package/dist/index.cjs +12 -12
- package/dist/index.css +1 -1
- package/dist/index.js +3303 -3244
- package/package.json +1 -1
|
@@ -5,6 +5,8 @@ export declare const noSearchResultMessage = "\u062F\u0627\u062F\u0647\u200C\u06
|
|
|
5
5
|
export declare const actionsColumnLabel = "\u0639\u0645\u0644\u06CC\u0627\u062A";
|
|
6
6
|
export declare const rowNumberColumnLabel = "\u0631\u062F\u06CC\u0641";
|
|
7
7
|
export declare const addButtonLabel = "\u0627\u0641\u0632\u0648\u062F\u0646";
|
|
8
|
+
export declare const printButtonLabel = "\u0686\u0627\u067E";
|
|
9
|
+
export declare const previewPrintButtonLabel = "\u067E\u06CC\u0634\u200C\u0646\u0645\u0627\u06CC\u0634 \u0686\u0627\u067E";
|
|
8
10
|
export declare const editButtonLabel = "\u0648\u06CC\u0631\u0627\u06CC\u0634";
|
|
9
11
|
export declare const deleteButtonLabel = "\u062D\u0630\u0641";
|
|
10
12
|
export declare const actionIconClassName = "zui:size-4";
|
|
@@ -27,7 +29,6 @@ export declare const maxRowsBeforeInternalScroll = 20;
|
|
|
27
29
|
export declare const infiniteAppendSkeletonRowsFallback = 3;
|
|
28
30
|
export declare const stickyHeaderCellClassName = "zui:sticky zui:top-0 zui:z-20 zui:bg-[var(--zui-color-primary)]";
|
|
29
31
|
export declare const infiniteScrollViewportPrefetchDistancePx: number;
|
|
30
|
-
export declare const infiniteObserverRootMargin = "208px 0px";
|
|
31
32
|
export declare const infiniteLoadingStatusLabel = "\u062F\u0631 \u062D\u0627\u0644 \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0631\u062F\u06CC\u0641\u200C\u0647\u0627\u06CC \u0628\u06CC\u0634\u062A\u0631...";
|
|
32
33
|
export declare const infiniteReadyStatusLabel = "\u0628\u0631\u0627\u06CC \u0628\u0627\u0631\u06AF\u0630\u0627\u0631\u06CC \u0628\u06CC\u0634\u062A\u0631 \u0628\u0647 \u067E\u0627\u06CC\u06CC\u0646 \u0627\u0633\u06A9\u0631\u0648\u0644 \u06A9\u0646\u06CC\u062F.";
|
|
33
34
|
export declare const infiniteCompletedStatusLabel = "\u0647\u0645\u0647 \u0631\u062F\u06CC\u0641\u200C\u0647\u0627 \u0646\u0645\u0627\u06CC\u0634 \u062F\u0627\u062F\u0647 \u0634\u062F.";
|
|
@@ -27,6 +27,20 @@ export type TableRowActionInput = {
|
|
|
27
27
|
export type TableAddRowHandler = () => void | Promise<void>;
|
|
28
28
|
export type TableEditRowHandler = (input: TableRowActionInput) => void | Promise<void>;
|
|
29
29
|
export type TableDeleteRowHandler = (input: TableRowActionInput) => void | Promise<void>;
|
|
30
|
+
export type TablePrintHandlerInput = {
|
|
31
|
+
/**
|
|
32
|
+
* Currently filtered + sorted rows (full result set, not just the active
|
|
33
|
+
* page). Consumers wanting to print exactly what the user sees on the
|
|
34
|
+
* current page can slice this using their own pagination state.
|
|
35
|
+
*/
|
|
36
|
+
rows: DynamicTableRow[];
|
|
37
|
+
/**
|
|
38
|
+
* Currently visible columns (row-number/actions columns excluded), in the
|
|
39
|
+
* same order rendered by the table.
|
|
40
|
+
*/
|
|
41
|
+
columns: TableSchemaColumn[];
|
|
42
|
+
};
|
|
43
|
+
export type TablePrintHandler = (input: TablePrintHandlerInput) => void | Promise<void>;
|
|
30
44
|
export type TableAction = {
|
|
31
45
|
icon: React.ReactNode;
|
|
32
46
|
onClick: (input: TableRowActionInput) => void | Promise<void>;
|
|
@@ -141,6 +155,18 @@ export interface TableProps {
|
|
|
141
155
|
onAdd?: TableAddRowHandler;
|
|
142
156
|
onEdit?: TableEditRowHandler;
|
|
143
157
|
onDelete?: TableDeleteRowHandler;
|
|
158
|
+
/**
|
|
159
|
+
* When provided, shows a print icon button in the table controls that
|
|
160
|
+
* calls this handler with the current filtered/sorted rows and visible
|
|
161
|
+
* columns. The table performs no printing itself.
|
|
162
|
+
*/
|
|
163
|
+
onPrint?: TablePrintHandler;
|
|
164
|
+
/**
|
|
165
|
+
* When provided, shows a print-preview icon button in the table controls
|
|
166
|
+
* that calls this handler with the current filtered/sorted rows and
|
|
167
|
+
* visible columns. The table performs no printing itself.
|
|
168
|
+
*/
|
|
169
|
+
onPreviewPrint?: TablePrintHandler;
|
|
144
170
|
actions?: TableAction[];
|
|
145
171
|
onCellSelectChange?: TableCellSelectChangeHandler;
|
|
146
172
|
getRowId?: TableRowIdResolver;
|
|
@@ -27,7 +27,6 @@ type UseTablePaginationResult = {
|
|
|
27
27
|
shouldUseRemotePaging: boolean;
|
|
28
28
|
shouldUseScrollableRows: boolean;
|
|
29
29
|
tableScrollViewportRef: React.RefObject<HTMLDivElement | null>;
|
|
30
|
-
infiniteScrollSentinelRef: React.RefObject<HTMLDivElement | null>;
|
|
31
30
|
tableScrollViewportStyle: React.CSSProperties | undefined;
|
|
32
31
|
handlePageChange: (nextPage: number) => void;
|
|
33
32
|
handlePagingModeToggle: () => void;
|