@mdtl/uikit 0.0.67 → 0.0.69
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/Snackbar/Snackbar.d.ts +2 -1
- package/dist/components/Snackbar/interfaces.d.ts +0 -5
- package/dist/components/Stepper/Stepper.d.ts +2 -1
- package/dist/components/Table/BasicTable.d.ts +1 -0
- package/dist/components/Table/interfaces/interfaces.d.ts +24 -2
- package/dist/components/Table/utils/util.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +11 -3
- package/dist/themes/aps/controls/configs/checkbox.d.ts +0 -1
- package/dist/themes/aps/controls/configs/radio.d.ts +0 -1
- package/dist/themes/aps/controls/shared/createCheckConfig.d.ts +0 -1
- package/dist/uikit.js +3026 -3001
- package/dist/vite-env.d.ts +0 -0
- package/package.json +3 -17
- package/dist/components/Snackbar/Snackbar.stories.d.ts +0 -26
- package/dist/components/Stepper/Stepper.stories.d.ts +0 -19
- package/dist/components/Tabs/Tabs.stories.d.ts +0 -26
- package/dist/components/Tabs/Test.stories.d.ts +0 -14
- package/dist/components/Tabs/interfaces.d.ts +0 -9
- package/dist/components/Title/Title.stories.d.ts +0 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React, FC } from 'react';
|
|
2
2
|
import { SnackbarStyle } from './interfaces';
|
|
3
|
-
|
|
3
|
+
interface ISnackbarProps {
|
|
4
4
|
isOpen: boolean;
|
|
5
5
|
style: SnackbarStyle;
|
|
6
6
|
label: string;
|
|
@@ -9,3 +9,4 @@ export interface ISnackbarProps {
|
|
|
9
9
|
setConfig: (config: Partial<ISnackbarProps>) => void;
|
|
10
10
|
}
|
|
11
11
|
export declare const Snackbar: FC<ISnackbarProps>;
|
|
12
|
+
export {};
|
|
@@ -4,6 +4,7 @@ import { Row, RowData } from '@tanstack/react-table';
|
|
|
4
4
|
declare module '@tanstack/table-core' {
|
|
5
5
|
interface ColumnDefBase<TData extends RowData, TValue = unknown> {
|
|
6
6
|
editTemplate?: (row: TData, props: IHashMap) => JSX.Element;
|
|
7
|
+
tooltipTemplate?: (row: IHashMap) => JSX.Element;
|
|
7
8
|
editable: boolean;
|
|
8
9
|
template?: (row: Row<TData>, props: IHashMap) => JSX.Element;
|
|
9
10
|
footerTemplate?: (row: IHashMap) => JSX.Element;
|
|
@@ -36,6 +36,8 @@ export interface IHeadCell<TData> {
|
|
|
36
36
|
disablePadding?: boolean;
|
|
37
37
|
/** кастомный шаблон ячейки */
|
|
38
38
|
template?: (row: TData, props: TData) => JSX.Element;
|
|
39
|
+
/** кастомный шаблон для тултипа; чтобы отключить передать пустую строку */
|
|
40
|
+
tooltipTemplate?: (row: IHashMap) => JSX.Element | string;
|
|
39
41
|
/** цвет ячейки */
|
|
40
42
|
backgroundColorCallback?: (row: TData) => string | undefined;
|
|
41
43
|
/** используется в базовых колонках таблиц с шаблонами, чтобы поместить их в конец таблицы */
|
|
@@ -229,6 +231,12 @@ export interface ITableProps<TData> {
|
|
|
229
231
|
emptyTemplate?: React.ReactElement;
|
|
230
232
|
/** подгруженные фронтом строки(если надо точечно подгружать строки в таблицу) */
|
|
231
233
|
loadedRows?: Record<string, any>[];
|
|
234
|
+
/** обработчик клика по ячейке */
|
|
235
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
236
|
+
/** кол-во полей сортировки */
|
|
237
|
+
configSortingLength: number;
|
|
238
|
+
/** коллбэк изменения порядка строк через dnd */
|
|
239
|
+
rowDndCallback?: (items: TData[]) => void;
|
|
232
240
|
}
|
|
233
241
|
export interface ITableBodyProps<TData> {
|
|
234
242
|
name: string;
|
|
@@ -284,6 +292,7 @@ export interface ITableBodyProps<TData> {
|
|
|
284
292
|
onItemClick?: (row: TData) => void;
|
|
285
293
|
highlightDragOverRow?: boolean;
|
|
286
294
|
columnOrder: string[];
|
|
295
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
287
296
|
}
|
|
288
297
|
export interface ITableRowProps<TData> {
|
|
289
298
|
name: string;
|
|
@@ -339,6 +348,7 @@ export interface ITableRowProps<TData> {
|
|
|
339
348
|
highlightDragOverRow?: boolean;
|
|
340
349
|
onItemClick?: (row: TData) => void;
|
|
341
350
|
columnOrder: string[];
|
|
351
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
342
352
|
}
|
|
343
353
|
export interface IRowCellProps<TData> {
|
|
344
354
|
cells: Cell<TData, unknown>[];
|
|
@@ -356,7 +366,6 @@ export interface IRowCellProps<TData> {
|
|
|
356
366
|
selected: boolean;
|
|
357
367
|
onSelect: (item: TData) => void;
|
|
358
368
|
getBorderBottomStyle: () => string;
|
|
359
|
-
onClick: (item: Row<TData>) => void;
|
|
360
369
|
itemActions?: IItemAction<TData>[];
|
|
361
370
|
actionsVisible: boolean;
|
|
362
371
|
parentTreeTileItem: boolean;
|
|
@@ -378,6 +387,8 @@ export interface IRowCellProps<TData> {
|
|
|
378
387
|
itemActionsDisabledTooltip?: (row: TData) => string;
|
|
379
388
|
enableRowDragCallback?: (row: TData) => boolean;
|
|
380
389
|
isDragOver: boolean;
|
|
390
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
391
|
+
isExpanded?: boolean;
|
|
381
392
|
}
|
|
382
393
|
export interface ITableRowWrapperProps<TData> {
|
|
383
394
|
rowDraggable: boolean;
|
|
@@ -432,6 +443,7 @@ export interface ITableRowWrapperProps<TData> {
|
|
|
432
443
|
highlightDragOverRow?: boolean;
|
|
433
444
|
name: string;
|
|
434
445
|
columnOrder: string[];
|
|
446
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
435
447
|
}
|
|
436
448
|
export interface IItemActionsProps<TData> {
|
|
437
449
|
actionsVisible: boolean;
|
|
@@ -491,6 +503,7 @@ export interface ITableHeaderProps<TData> {
|
|
|
491
503
|
dragStartHandler: (event: any) => void;
|
|
492
504
|
dragEndHandler: (event: any) => void;
|
|
493
505
|
name: string;
|
|
506
|
+
configSortingLength: number;
|
|
494
507
|
}
|
|
495
508
|
export interface ITableHeaderCell<TData> {
|
|
496
509
|
header: Header<TData, unknown>;
|
|
@@ -513,13 +526,13 @@ export interface ITableHeaderCell<TData> {
|
|
|
513
526
|
dragStartHandler: (event: any) => void;
|
|
514
527
|
dragEndHandler: (event: any) => void;
|
|
515
528
|
tableName: string;
|
|
529
|
+
configSortingLength: number;
|
|
516
530
|
}
|
|
517
531
|
export interface ICellProps<TData> {
|
|
518
532
|
cell: Cell<TData, unknown>;
|
|
519
533
|
colSpan: number;
|
|
520
534
|
colIndex: number;
|
|
521
535
|
labelId: string;
|
|
522
|
-
cellKey: string;
|
|
523
536
|
row: Row<TData>;
|
|
524
537
|
keyProperty: string;
|
|
525
538
|
getBorderBottomStyle: () => string;
|
|
@@ -536,6 +549,7 @@ export interface ICellProps<TData> {
|
|
|
536
549
|
tooltipTitle?: React.JSX.Element | string;
|
|
537
550
|
isExpanded: boolean;
|
|
538
551
|
isLastColumn?: boolean;
|
|
552
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
539
553
|
}
|
|
540
554
|
export interface ICellColumnProps<TData> {
|
|
541
555
|
cell: Cell<TData, unknown>;
|
|
@@ -544,6 +558,8 @@ export interface ICellColumnProps<TData> {
|
|
|
544
558
|
editable: boolean;
|
|
545
559
|
isEditedRow: boolean;
|
|
546
560
|
isLastColumn?: boolean;
|
|
561
|
+
tooltipTitle?: React.JSX.Element | string;
|
|
562
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
547
563
|
}
|
|
548
564
|
export interface ITillCellProps<TData> {
|
|
549
565
|
isEditedRow: boolean;
|
|
@@ -567,6 +583,7 @@ export interface ITillCellProps<TData> {
|
|
|
567
583
|
resetNewRow: () => void;
|
|
568
584
|
isNewRowCreated: boolean;
|
|
569
585
|
setIsNewRowCreated: React.Dispatch<React.SetStateAction<boolean>>;
|
|
586
|
+
onCellClick?: (info: ICellClickInfo) => void;
|
|
570
587
|
}
|
|
571
588
|
export declare enum TableViewMode {
|
|
572
589
|
TABLE = 0,
|
|
@@ -579,6 +596,11 @@ interface IRowDragOptions {
|
|
|
579
596
|
dragStyle: CSSProperties;
|
|
580
597
|
isOver: boolean;
|
|
581
598
|
}
|
|
599
|
+
export interface ICellClickInfo {
|
|
600
|
+
value: any;
|
|
601
|
+
columnId: string;
|
|
602
|
+
rowId?: string;
|
|
603
|
+
}
|
|
582
604
|
export interface AddingButtonRowTemplateProps<TData> {
|
|
583
605
|
text: string;
|
|
584
606
|
colSpan?: number;
|
|
@@ -55,6 +55,7 @@ export declare const getTableColumns: <TData>(columns: IHeadCell<TData>[], adapt
|
|
|
55
55
|
folder?: import('../interfaces/interfaces').ICellFolderCfg;
|
|
56
56
|
disablePadding?: boolean;
|
|
57
57
|
template?: (row: TData, props: TData) => React.JSX.Element;
|
|
58
|
+
tooltipTemplate?: (row: IHashMap) => React.JSX.Element | string;
|
|
58
59
|
backgroundColorCallback?: (row: TData) => string | undefined;
|
|
59
60
|
isLast?: boolean;
|
|
60
61
|
accessorFn?: string;
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
interface TabProps {
|
|
3
|
+
id: number;
|
|
4
|
+
label: string;
|
|
5
|
+
to?: string;
|
|
6
|
+
startTemplate?: React.ReactNode;
|
|
7
|
+
endTemplate?: React.ReactNode;
|
|
8
|
+
count?: number;
|
|
9
|
+
}
|
|
10
|
+
interface ITabsProps {
|
|
11
|
+
tabs: TabProps[];
|
|
5
12
|
activeTab: number;
|
|
6
13
|
onChange: (tab: number) => void;
|
|
7
14
|
}
|
|
8
15
|
export declare const Tabs: React.FC<ITabsProps>;
|
|
16
|
+
export {};
|