nntc-ui 0.0.14 → 0.0.16
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/README.md +14 -0
- package/index.css +30 -6
- package/index.d.ts +26 -22
- package/index.js +270 -239
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# Статус деплоя на стендах
|
|
2
|
+
|
|
3
|
+
| Стенд | Статус |
|
|
4
|
+
|-------|--------|
|
|
5
|
+
| iifa-dev | [](https://argocd.np.nntc.pro/applications/argocd/iifa-dev-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fiifa-dev%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
6
|
+
| iifa-test | [](https://argocd.np.nntc.pro/applications/argocd/iifa-test-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fiifa-test%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
7
|
+
| geonova-test | [](https://argocd.np.nntc.pro/applications/argocd/geonova-test-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fgeonova-test%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
8
|
+
| iifa-demo | [](https://argocd.pp.nntc.pro/applications/argocd/iifa-demo-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fiifa-demo%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
9
|
+
| ars-demo | [](https://argocd.pp.nntc.pro/applications/argocd/ars-demo-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%ars-demo%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
10
|
+
| geonova-demo | [](https://argocd.pp.nntc.pro/applications/argocd/geonova-demo-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fgeonova-demo%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
11
|
+
| dflow-demo | [](https://argocd.pp.nntc.pro/applications/argocd/dflow-demo-nntc-ui-kit?view=tree&resource=&node=apps%2FDeployment%2Fdflow-demo%2Fnntc-ui-kit%2F0&tab=logs) |
|
|
12
|
+
|
|
13
|
+
Для перехода к логам нажмите на иконку в колонке статуса
|
|
14
|
+
|
|
1
15
|
# NNTC UI Kit
|
|
2
16
|
|
|
3
17
|
React компонентная библиотека для создания пользовательских интерфейсов.
|
package/index.css
CHANGED
|
@@ -632,6 +632,9 @@ button[disabled] {
|
|
|
632
632
|
letter-spacing: var(--text-overline-letter);
|
|
633
633
|
border-bottom: 1px solid var(--theme-divider);
|
|
634
634
|
}
|
|
635
|
+
.menu_checkbox {
|
|
636
|
+
width: 24px;
|
|
637
|
+
}
|
|
635
638
|
|
|
636
639
|
/* src/components/common/DateTime/dateTime.module.css */
|
|
637
640
|
.dateTime_root {
|
|
@@ -1468,8 +1471,15 @@ button[disabled] {
|
|
|
1468
1471
|
.virtualTable_tableContainer {
|
|
1469
1472
|
height: calc(100% + 16px);
|
|
1470
1473
|
}
|
|
1474
|
+
.virtualTable_root.virtualTable_small .virtualTable_table {
|
|
1475
|
+
font-size: var(--text-body2-size);
|
|
1476
|
+
}
|
|
1477
|
+
.virtualTable_root.virtualTable_medium .virtualTable_table {
|
|
1478
|
+
font-size: var(--text-body1-size);
|
|
1479
|
+
}
|
|
1471
1480
|
.virtualTable_table {
|
|
1472
1481
|
position: relative;
|
|
1482
|
+
color: var(--theme-text-primary);
|
|
1473
1483
|
}
|
|
1474
1484
|
.virtualTable_th {
|
|
1475
1485
|
position: absolute;
|
|
@@ -1477,19 +1487,26 @@ button[disabled] {
|
|
|
1477
1487
|
left: 0;
|
|
1478
1488
|
z-index: 2;
|
|
1479
1489
|
padding: 6px 12px;
|
|
1490
|
+
color: var(--theme-text-secondary);
|
|
1480
1491
|
background-color: var(--theme-table-header);
|
|
1492
|
+
}
|
|
1493
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_th,
|
|
1494
|
+
.virtualTable_root.virtualTable_bordersHorizontal .virtualTable_th {
|
|
1481
1495
|
border-bottom: 1px solid var(--border-color);
|
|
1482
1496
|
}
|
|
1483
|
-
.virtualTable_thLeftBorder
|
|
1497
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_thLeftBorder,
|
|
1498
|
+
.virtualTable_root.virtualTable_bordersVertical .virtualTable_thLeftBorder {
|
|
1484
1499
|
border-left: 1px solid var(--border-color);
|
|
1485
1500
|
}
|
|
1486
|
-
.virtualTable_thRightBorder
|
|
1501
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_thRightBorder,
|
|
1502
|
+
.virtualTable_root.virtualTable_bordersVertical .virtualTable_thRightBorder {
|
|
1487
1503
|
border-right: 1px solid var(--border-color);
|
|
1488
1504
|
}
|
|
1489
1505
|
.virtualTable_thHiddenColumn {
|
|
1490
1506
|
display: none;
|
|
1491
1507
|
}
|
|
1492
|
-
.virtualTable_firstThRow
|
|
1508
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_firstThRow,
|
|
1509
|
+
.virtualTable_root.virtualTable_root.virtualTable_bordersHorizontal .virtualTable_firstThRow {
|
|
1493
1510
|
border-top: 1px solid var(--border-color);
|
|
1494
1511
|
}
|
|
1495
1512
|
.virtualTable_thCell {
|
|
@@ -1502,6 +1519,7 @@ button[disabled] {
|
|
|
1502
1519
|
}
|
|
1503
1520
|
.virtualTable_label {
|
|
1504
1521
|
display: flex;
|
|
1522
|
+
gap: 4px;
|
|
1505
1523
|
align-items: center;
|
|
1506
1524
|
}
|
|
1507
1525
|
.virtualTable_label.virtualTable_alignLeft {
|
|
@@ -1528,9 +1546,13 @@ button[disabled] {
|
|
|
1528
1546
|
z-index: 1;
|
|
1529
1547
|
display: flex;
|
|
1530
1548
|
background-color: var(--theme-table-background);
|
|
1549
|
+
}
|
|
1550
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_tr,
|
|
1551
|
+
.virtualTable_root.virtualTable_root.virtualTable_bordersHorizontal .virtualTable_tr {
|
|
1531
1552
|
border-top: 1px solid var(--border-color);
|
|
1532
1553
|
}
|
|
1533
|
-
.virtualTable_tr:last-child
|
|
1554
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_tr:last-child,
|
|
1555
|
+
.virtualTable_root.virtualTable_bordersHorizontal .virtualTable_tr:last-child {
|
|
1534
1556
|
border-bottom: 1px solid var(--border-color);
|
|
1535
1557
|
}
|
|
1536
1558
|
.virtualTable_td {
|
|
@@ -1538,10 +1560,12 @@ button[disabled] {
|
|
|
1538
1560
|
align-items: center;
|
|
1539
1561
|
padding: 0;
|
|
1540
1562
|
}
|
|
1541
|
-
.virtualTable_td:nth-child(2)
|
|
1563
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_td:nth-child(2),
|
|
1564
|
+
.virtualTable_root.virtualTable_root.virtualTable_bordersVertical .virtualTable_td:nth-child(2) {
|
|
1542
1565
|
border-left: 1px solid var(--border-color);
|
|
1543
1566
|
}
|
|
1544
|
-
.virtualTable_td:not(:nth-last-child(2))
|
|
1567
|
+
.virtualTable_root.virtualTable_bordersAll .virtualTable_td:not(:nth-last-child(2)),
|
|
1568
|
+
.virtualTable_root.virtualTable_root.virtualTable_bordersVertical .virtualTable_td:not(:nth-last-child(2)) {
|
|
1545
1569
|
border-right: 1px solid var(--border-color);
|
|
1546
1570
|
}
|
|
1547
1571
|
.virtualTable_evenRow {
|
package/index.d.ts
CHANGED
|
@@ -12,10 +12,10 @@ type UiProps<P = unknown> = P & {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
type Variant$7 = 'filled' | 'outlined' | 'text' | 'elevated' | 'tonal' | 'link';
|
|
15
|
-
type Size$
|
|
15
|
+
type Size$a = 'medium' | 'small';
|
|
16
16
|
interface Props$m {
|
|
17
17
|
variant?: Variant$7;
|
|
18
|
-
size?: Size$
|
|
18
|
+
size?: Size$a;
|
|
19
19
|
icon?: ReactNode;
|
|
20
20
|
textSecondary?: boolean;
|
|
21
21
|
isActive?: boolean;
|
|
@@ -24,10 +24,10 @@ declare const Button: React.ForwardRefExoticComponent<Omit<React.ClassAttributes
|
|
|
24
24
|
classes?: PropsObject;
|
|
25
25
|
}, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
26
26
|
|
|
27
|
-
type Size$
|
|
27
|
+
type Size$9 = 'medium' | 'large';
|
|
28
28
|
interface Props$l {
|
|
29
29
|
label?: string;
|
|
30
|
-
componentSize?: Size$
|
|
30
|
+
componentSize?: Size$9;
|
|
31
31
|
several?: boolean;
|
|
32
32
|
}
|
|
33
33
|
declare function Checkbox(props: UiProps<Props$l> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
@@ -51,10 +51,10 @@ interface Item$5 {
|
|
|
51
51
|
type MaybeItem = Maybe<Item$5>;
|
|
52
52
|
|
|
53
53
|
type Variant$6 = 'filled' | 'outlined';
|
|
54
|
-
type Size$
|
|
54
|
+
type Size$8 = 'medium' | 'small';
|
|
55
55
|
interface Props$k {
|
|
56
56
|
variant?: Variant$6;
|
|
57
|
-
componentSize?: Size$
|
|
57
|
+
componentSize?: Size$8;
|
|
58
58
|
icon?: ReactNode;
|
|
59
59
|
fullWidth?: boolean;
|
|
60
60
|
label?: string;
|
|
@@ -66,10 +66,10 @@ interface Props$k {
|
|
|
66
66
|
declare function Select(props: UiProps<Props$k> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
67
67
|
|
|
68
68
|
type Variant$5 = 'filled' | 'outlined';
|
|
69
|
-
type Size$
|
|
69
|
+
type Size$7 = 'medium' | 'small';
|
|
70
70
|
interface Props$j {
|
|
71
71
|
variant?: Variant$5;
|
|
72
|
-
componentSize?: Size$
|
|
72
|
+
componentSize?: Size$7;
|
|
73
73
|
fullWidth?: boolean;
|
|
74
74
|
placeholder?: string;
|
|
75
75
|
values?: (string | undefined)[];
|
|
@@ -80,10 +80,10 @@ interface Props$j {
|
|
|
80
80
|
declare function DateTime(props: UiProps<Props$j> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
81
81
|
|
|
82
82
|
type Variant$4 = 'outlined';
|
|
83
|
-
type Size$
|
|
83
|
+
type Size$6 = 'medium' | 'small';
|
|
84
84
|
interface Props$i {
|
|
85
85
|
variant?: Variant$4;
|
|
86
|
-
componentSize?: Size$
|
|
86
|
+
componentSize?: Size$6;
|
|
87
87
|
fullWidth?: boolean;
|
|
88
88
|
label?: string;
|
|
89
89
|
onValueChange?: (newValue: string) => void;
|
|
@@ -91,28 +91,28 @@ interface Props$i {
|
|
|
91
91
|
declare const ColorPicker: (props: UiProps<Props$i> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
|
|
92
92
|
|
|
93
93
|
type Variant$3 = 'outlined';
|
|
94
|
-
type Size$
|
|
94
|
+
type Size$5 = 'medium' | 'small';
|
|
95
95
|
interface Props$h {
|
|
96
96
|
variant?: Variant$3;
|
|
97
|
-
componentSize?: Size$
|
|
97
|
+
componentSize?: Size$5;
|
|
98
98
|
fullWidth?: boolean;
|
|
99
99
|
label?: string;
|
|
100
100
|
}
|
|
101
101
|
declare const Input: (props: UiProps<Props$h> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>) => react_jsx_runtime.JSX.Element;
|
|
102
102
|
|
|
103
103
|
type Variant$2 = 'filled' | 'outlined';
|
|
104
|
-
type Size$
|
|
104
|
+
type Size$4 = 'medium' | 'small';
|
|
105
105
|
interface Props$g {
|
|
106
106
|
variant?: Variant$2;
|
|
107
|
-
componentSize?: Size$
|
|
107
|
+
componentSize?: Size$4;
|
|
108
108
|
disableIcon?: boolean;
|
|
109
109
|
fullWidth?: boolean;
|
|
110
110
|
}
|
|
111
111
|
declare function SearchInput(props: UiProps<Props$g> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
112
112
|
|
|
113
|
-
type Size$
|
|
113
|
+
type Size$3 = 'medium' | 'small';
|
|
114
114
|
interface Props$f {
|
|
115
|
-
componentSize?: Size$
|
|
115
|
+
componentSize?: Size$3;
|
|
116
116
|
}
|
|
117
117
|
declare const WrapForLabel: (props: UiProps<PropsWithChildren<Props$f>>) => react_jsx_runtime.JSX.Element;
|
|
118
118
|
|
|
@@ -127,10 +127,10 @@ interface Item$4 {
|
|
|
127
127
|
type TitleVariant = 'allValue' | 'numberValue' | 'firstValue';
|
|
128
128
|
|
|
129
129
|
type Variant$1 = 'filled' | 'outlined';
|
|
130
|
-
type Size$
|
|
130
|
+
type Size$2 = 'medium' | 'small';
|
|
131
131
|
interface Props$e {
|
|
132
132
|
variant?: Variant$1;
|
|
133
|
-
componentSize?: Size$
|
|
133
|
+
componentSize?: Size$2;
|
|
134
134
|
icon?: ReactNode;
|
|
135
135
|
fullWidth?: boolean;
|
|
136
136
|
label?: string;
|
|
@@ -195,14 +195,15 @@ interface Item$2 {
|
|
|
195
195
|
onClick?: () => void;
|
|
196
196
|
}[];
|
|
197
197
|
onClick?: () => void;
|
|
198
|
+
withCheckbox?: boolean;
|
|
198
199
|
selected?: boolean;
|
|
199
200
|
disabled?: boolean;
|
|
200
201
|
}
|
|
201
202
|
|
|
202
|
-
type Size = 'medium' | 'small';
|
|
203
|
+
type Size$1 = 'medium' | 'small';
|
|
203
204
|
interface Props$9 {
|
|
204
205
|
items: (Item$2 | Divider)[];
|
|
205
|
-
size?: Size;
|
|
206
|
+
size?: Size$1;
|
|
206
207
|
}
|
|
207
208
|
declare function Menu(props: UiProps<Props$9>): react_jsx_runtime.JSX.Element;
|
|
208
209
|
|
|
@@ -258,6 +259,8 @@ interface TableColumn {
|
|
|
258
259
|
toFixed?: number;
|
|
259
260
|
}
|
|
260
261
|
|
|
262
|
+
type Size = 'medium' | 'small';
|
|
263
|
+
type Borders = 'all' | 'horizontal' | 'vertical' | 'none';
|
|
261
264
|
interface Props$7 {
|
|
262
265
|
rows: TableRow[];
|
|
263
266
|
columns: TableColumn[];
|
|
@@ -276,8 +279,9 @@ interface Props$7 {
|
|
|
276
279
|
height?: number;
|
|
277
280
|
scrollToBottom?: boolean;
|
|
278
281
|
useTableContainerAsRootForPopup?: boolean;
|
|
279
|
-
|
|
280
|
-
|
|
282
|
+
size?: Size;
|
|
283
|
+
borders?: Borders;
|
|
284
|
+
showUniqueValuesCount?: boolean;
|
|
281
285
|
}
|
|
282
286
|
declare function VirtualTable(props: UiProps<Props$7>): react_jsx_runtime.JSX.Element;
|
|
283
287
|
|
package/index.js
CHANGED
|
@@ -141,7 +141,7 @@ var checkbox_default = {
|
|
|
141
141
|
// src/components/common/Checkbox/Checkbox.tsx
|
|
142
142
|
import { Fragment, jsx as jsx3, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
143
143
|
function Checkbox(props) {
|
|
144
|
-
const { label, several, componentSize = "medium", classes, id,
|
|
144
|
+
const { label, several, componentSize = "medium", classes, id, ref, ...inputProps } = props;
|
|
145
145
|
const { t } = useTranslation();
|
|
146
146
|
const inputRef = useRef(null);
|
|
147
147
|
const inputId = id ?? uuidv4();
|
|
@@ -441,7 +441,8 @@ var menu_default = {
|
|
|
441
441
|
itemIcon: "menu_itemIcon",
|
|
442
442
|
itemTitle: "menu_itemTitle",
|
|
443
443
|
itemDescription: "menu_itemDescription",
|
|
444
|
-
divider: "menu_divider"
|
|
444
|
+
divider: "menu_divider",
|
|
445
|
+
checkbox: "menu_checkbox"
|
|
445
446
|
};
|
|
446
447
|
|
|
447
448
|
// src/components/navigation/Menu/Menu.tsx
|
|
@@ -472,6 +473,7 @@ function Menu(props) {
|
|
|
472
473
|
onClick: !item.disabled ? handleClick(item) : void 0,
|
|
473
474
|
title: item.name,
|
|
474
475
|
children: /* @__PURE__ */ jsxs4("span", { className: classnames5(menu_default.stateLayer), children: [
|
|
476
|
+
!!item.withCheckbox && /* @__PURE__ */ jsx10(Checkbox, { checked: item.selected, classes: { root: menu_default.checkbox } }),
|
|
475
477
|
!!item.icon && /* @__PURE__ */ jsx10(
|
|
476
478
|
"span",
|
|
477
479
|
{
|
|
@@ -1293,6 +1295,7 @@ var WrapForLabel = (props) => {
|
|
|
1293
1295
|
// src/components/common/MultiSelect/MultiSelect.tsx
|
|
1294
1296
|
import classnames11 from "classnames";
|
|
1295
1297
|
import { useCallback as useCallback6, useMemo as useMemo3, useRef as useRef7 } from "react";
|
|
1298
|
+
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1296
1299
|
import { mergeRefs as mergeRefs7 } from "react-merge-refs";
|
|
1297
1300
|
import { v4 as uuidv45 } from "uuid";
|
|
1298
1301
|
|
|
@@ -1334,7 +1337,8 @@ function SelectPopover2(props) {
|
|
|
1334
1337
|
selected: selected?.includes(i.value),
|
|
1335
1338
|
onClick: () => {
|
|
1336
1339
|
changeSelectedItem(i);
|
|
1337
|
-
}
|
|
1340
|
+
},
|
|
1341
|
+
withCheckbox: true
|
|
1338
1342
|
})
|
|
1339
1343
|
)
|
|
1340
1344
|
}
|
|
@@ -1342,8 +1346,7 @@ function SelectPopover2(props) {
|
|
|
1342
1346
|
}
|
|
1343
1347
|
|
|
1344
1348
|
// src/components/common/MultiSelect/utils/getTitle.ts
|
|
1345
|
-
var getTitle = (titleType, activeItems) => {
|
|
1346
|
-
const { t } = useTranslation();
|
|
1349
|
+
var getTitle = (titleType, activeItems, t) => {
|
|
1347
1350
|
switch (titleType) {
|
|
1348
1351
|
case "allValue": {
|
|
1349
1352
|
return activeItems.map((i) => i.name).join(", ");
|
|
@@ -1377,6 +1380,7 @@ function MultiSelect(props) {
|
|
|
1377
1380
|
titleType = "allValue",
|
|
1378
1381
|
...inputProps
|
|
1379
1382
|
} = props;
|
|
1383
|
+
const { t } = useTranslation2();
|
|
1380
1384
|
const inputRef = useRef7(null);
|
|
1381
1385
|
const popoverTargetRef = useRef7(null);
|
|
1382
1386
|
const activeItems = useMemo3(() => items2.filter((i) => selected?.includes(i.value)), [selected, items2]);
|
|
@@ -1399,8 +1403,8 @@ function MultiSelect(props) {
|
|
|
1399
1403
|
const title = useMemo3(() => {
|
|
1400
1404
|
if (!activeItems.length)
|
|
1401
1405
|
return "";
|
|
1402
|
-
return getTitle(titleType, activeItems);
|
|
1403
|
-
}, [titleType, activeItems
|
|
1406
|
+
return getTitle(titleType, activeItems, t);
|
|
1407
|
+
}, [titleType, activeItems]);
|
|
1404
1408
|
const clearHandler = () => {
|
|
1405
1409
|
onValueChange?.(null);
|
|
1406
1410
|
};
|
|
@@ -1977,6 +1981,11 @@ function Tooltip(props) {
|
|
|
1977
1981
|
);
|
|
1978
1982
|
}
|
|
1979
1983
|
|
|
1984
|
+
// src/utils/toFirstLetterUpperCase.ts
|
|
1985
|
+
var toFirstLetterUpperCase = (name) => {
|
|
1986
|
+
return name[0].toUpperCase() + name.substring(1);
|
|
1987
|
+
};
|
|
1988
|
+
|
|
1980
1989
|
// src/components/view/VirtualTable/constants/defaultRowHeight.ts
|
|
1981
1990
|
var defaultRowHeight = 32;
|
|
1982
1991
|
|
|
@@ -2022,9 +2031,14 @@ function Modal(props) {
|
|
|
2022
2031
|
var virtualTable_default = {
|
|
2023
2032
|
root: "virtualTable_root",
|
|
2024
2033
|
tableContainer: "virtualTable_tableContainer",
|
|
2034
|
+
small: "virtualTable_small",
|
|
2025
2035
|
table: "virtualTable_table",
|
|
2036
|
+
medium: "virtualTable_medium",
|
|
2026
2037
|
th: "virtualTable_th",
|
|
2038
|
+
bordersAll: "virtualTable_bordersAll",
|
|
2039
|
+
bordersHorizontal: "virtualTable_bordersHorizontal",
|
|
2027
2040
|
thLeftBorder: "virtualTable_thLeftBorder",
|
|
2041
|
+
bordersVertical: "virtualTable_bordersVertical",
|
|
2028
2042
|
thRightBorder: "virtualTable_thRightBorder",
|
|
2029
2043
|
thHiddenColumn: "virtualTable_thHiddenColumn",
|
|
2030
2044
|
firstThRow: "virtualTable_firstThRow",
|
|
@@ -2300,6 +2314,7 @@ function HeaderDropdown(props) {
|
|
|
2300
2314
|
headerName,
|
|
2301
2315
|
items: items2,
|
|
2302
2316
|
containerRef,
|
|
2317
|
+
showUniqueValuesCount,
|
|
2303
2318
|
children
|
|
2304
2319
|
} = props;
|
|
2305
2320
|
const headerResultName = sortAnotherName ?? headerName;
|
|
@@ -2404,8 +2419,8 @@ function HeaderDropdown(props) {
|
|
|
2404
2419
|
const hasAnyFilter = Object.keys(filterSelectedItems).length || sortBy.some((sb) => sb.columnName === headerResultName);
|
|
2405
2420
|
const { t } = useTranslation();
|
|
2406
2421
|
return /* @__PURE__ */ jsxs18("div", { className: classnames22(headerDropdown_default.root), children: [
|
|
2407
|
-
children,
|
|
2408
|
-
/* @__PURE__ */ jsx33(
|
|
2422
|
+
children?.(showUniqueValuesCount && /* @__PURE__ */ jsx33("div", { children: `(${filterItems2.length})` })),
|
|
2423
|
+
(sortable || filtrationByValue || filtrationByDate || filtrationByNumber) && /* @__PURE__ */ jsx33(
|
|
2409
2424
|
Popover,
|
|
2410
2425
|
{
|
|
2411
2426
|
placement: "bottom-end",
|
|
@@ -2562,7 +2577,7 @@ var recursiveSort = (items2, sortBy) => {
|
|
|
2562
2577
|
};
|
|
2563
2578
|
|
|
2564
2579
|
// src/components/view/VirtualTable/VirtualTable.tsx
|
|
2565
|
-
import { jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2580
|
+
import { Fragment as Fragment8, jsx as jsx34, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2566
2581
|
function VirtualTable(props) {
|
|
2567
2582
|
const {
|
|
2568
2583
|
rows,
|
|
@@ -2580,8 +2595,9 @@ function VirtualTable(props) {
|
|
|
2580
2595
|
height,
|
|
2581
2596
|
scrollToBottom,
|
|
2582
2597
|
useTableContainerAsRootForPopup,
|
|
2583
|
-
|
|
2584
|
-
|
|
2598
|
+
size = "small",
|
|
2599
|
+
borders = "horizontal",
|
|
2600
|
+
showUniqueValuesCount = false
|
|
2585
2601
|
} = props;
|
|
2586
2602
|
const [filterBy, setFilterBy] = useState14([]);
|
|
2587
2603
|
const [sortBy, setSortBy] = useState14([{ columnName: "isNew", direction: "desc" }]);
|
|
@@ -2721,39 +2737,64 @@ function VirtualTable(props) {
|
|
|
2721
2737
|
fixedColumnsCount && virtualColumns[fixedColumnsCount].index !== fixedColumnsCount ? virtualColumns[fixedColumnsCount].start - fixedColumnsWidth : virtualColumns[0].start,
|
|
2722
2738
|
columnsTotalSize - virtualColumns[virtualColumns.length - 1].end
|
|
2723
2739
|
] : [0, 0];
|
|
2724
|
-
return /* @__PURE__ */ jsx34(
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
|
|
2731
|
-
|
|
2732
|
-
|
|
2733
|
-
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2756
|
-
|
|
2740
|
+
return /* @__PURE__ */ jsx34(
|
|
2741
|
+
"div",
|
|
2742
|
+
{
|
|
2743
|
+
className: classnames23(
|
|
2744
|
+
virtualTable_default.root,
|
|
2745
|
+
virtualTable_default[size],
|
|
2746
|
+
virtualTable_default[`borders${toFirstLetterUpperCase(borders)}`],
|
|
2747
|
+
classes?.root
|
|
2748
|
+
),
|
|
2749
|
+
style: height ? { height } : void 0,
|
|
2750
|
+
children: /* @__PURE__ */ jsxs19("div", { ref: tableContainerRef, className: classnames23(virtualTable_default.tableContainer, "styledScroll"), children: [
|
|
2751
|
+
/* @__PURE__ */ jsxs19(
|
|
2752
|
+
"div",
|
|
2753
|
+
{
|
|
2754
|
+
className: virtualTable_default.table,
|
|
2755
|
+
style: {
|
|
2756
|
+
height: `${rowsTotalSize + summaryHeaderHeight}px`
|
|
2757
|
+
},
|
|
2758
|
+
children: [
|
|
2759
|
+
/* @__PURE__ */ jsx34(
|
|
2760
|
+
"div",
|
|
2761
|
+
{
|
|
2762
|
+
style: {
|
|
2763
|
+
position: "sticky",
|
|
2764
|
+
top: 0,
|
|
2765
|
+
zIndex: 2
|
|
2766
|
+
// marginLeft: 1,
|
|
2767
|
+
},
|
|
2768
|
+
children: headerGroups.map((headerGroup, hgi) => {
|
|
2769
|
+
const innerCell = (header) => {
|
|
2770
|
+
const headerMeta = header.column.columnDef.meta;
|
|
2771
|
+
return /* @__PURE__ */ jsx34("div", { className: classnames23(virtualTable_default.thCell), children: header.column.columnDef.id === header.column.columnDef["accessorKey"] && (headerMeta?.sortable || headerMeta?.filtrationByValue || headerMeta?.filtrationByDate || headerMeta?.filtrationByNumber || headerMeta && showUniqueValuesCount) ? /* @__PURE__ */ jsx34(
|
|
2772
|
+
HeaderDropdown,
|
|
2773
|
+
{
|
|
2774
|
+
headerMeta,
|
|
2775
|
+
sortBy,
|
|
2776
|
+
setSortBy,
|
|
2777
|
+
filterBy,
|
|
2778
|
+
setFilterBy,
|
|
2779
|
+
items: rows,
|
|
2780
|
+
headerName: header.column.columnDef.id ?? header.id,
|
|
2781
|
+
containerRef: useTableContainerAsRootForPopup ? tableContainerRef : void 0,
|
|
2782
|
+
showUniqueValuesCount,
|
|
2783
|
+
children: (afterNode) => /* @__PURE__ */ jsxs19(
|
|
2784
|
+
"div",
|
|
2785
|
+
{
|
|
2786
|
+
className: classnames23(
|
|
2787
|
+
virtualTable_default.label,
|
|
2788
|
+
!!headerMeta?.headerAlign ? virtualTable_default[`align${headerMeta?.headerAlign}`] : virtualTable_default.alignLeft
|
|
2789
|
+
),
|
|
2790
|
+
children: [
|
|
2791
|
+
flexRender(header.column.columnDef.header, header.getContext()),
|
|
2792
|
+
afterNode
|
|
2793
|
+
]
|
|
2794
|
+
}
|
|
2795
|
+
)
|
|
2796
|
+
}
|
|
2797
|
+
) : /* @__PURE__ */ jsx34(
|
|
2757
2798
|
"div",
|
|
2758
2799
|
{
|
|
2759
2800
|
className: classnames23(
|
|
@@ -2762,205 +2803,195 @@ function VirtualTable(props) {
|
|
|
2762
2803
|
),
|
|
2763
2804
|
children: flexRender(header.column.columnDef.header, header.getContext())
|
|
2764
2805
|
}
|
|
2765
|
-
)
|
|
2766
|
-
}
|
|
2767
|
-
|
|
2768
|
-
|
|
2769
|
-
|
|
2770
|
-
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
2796
|
-
|
|
2797
|
-
|
|
2798
|
-
|
|
2799
|
-
|
|
2800
|
-
|
|
2801
|
-
|
|
2802
|
-
|
|
2803
|
-
|
|
2804
|
-
|
|
2805
|
-
|
|
2806
|
-
|
|
2807
|
-
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2806
|
+
) });
|
|
2807
|
+
};
|
|
2808
|
+
return /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2809
|
+
[...Array(fixedColumnsCount)].map((_, index) => {
|
|
2810
|
+
const header = headerGroup.headers[index];
|
|
2811
|
+
const nextHorizontalHeaders = getNextHorizontalHeaders(
|
|
2812
|
+
headerGroup.headers,
|
|
2813
|
+
index,
|
|
2814
|
+
lastVirtualColumnIndex
|
|
2815
|
+
);
|
|
2816
|
+
const nextVerticalHeaders = getNextVerticalHeaders(headerGroups, hgi, index);
|
|
2817
|
+
return /* @__PURE__ */ jsx34(
|
|
2818
|
+
"div",
|
|
2819
|
+
{
|
|
2820
|
+
className: classnames23(
|
|
2821
|
+
virtualTable_default.th,
|
|
2822
|
+
hgi === 0 ? virtualTable_default.firstThRow : void 0,
|
|
2823
|
+
!nextVerticalHeaders.length && index !== headerGroup.headers.length - 1 && virtualTable_default.thRightBorder,
|
|
2824
|
+
index === 0 && virtualTable_default.thLeftBorder,
|
|
2825
|
+
nextVerticalHeaders.length && !nextHorizontalHeaders.length && virtualTable_default.thHiddenColumn,
|
|
2826
|
+
virtualTable_default.marginLeftChanging
|
|
2827
|
+
),
|
|
2828
|
+
style: {
|
|
2829
|
+
zIndex: 3,
|
|
2830
|
+
width: `${columnsEstimateSize(index)}px`,
|
|
2831
|
+
height: `${headerGroupHeight[hgi]}px`,
|
|
2832
|
+
transform: `translateX(${index > 0 ? columnsEstimateSize(index - 1) : 0}px) translateY(${headerGroupY(hgi)}px)`
|
|
2833
|
+
},
|
|
2834
|
+
children: innerCell(header)
|
|
2835
|
+
},
|
|
2836
|
+
`${headerGroup.id}-${header.id}`
|
|
2837
|
+
);
|
|
2838
|
+
}),
|
|
2839
|
+
virtualColumns.map((column) => {
|
|
2840
|
+
if (column.index > fixedColumnsCount - 1) {
|
|
2841
|
+
const header = headerGroup.headers[column.index];
|
|
2842
|
+
const nextHorizontalHeaders = getNextHorizontalHeaders(
|
|
2843
|
+
headerGroup.headers,
|
|
2844
|
+
column.index,
|
|
2845
|
+
lastVirtualColumnIndex
|
|
2846
|
+
);
|
|
2847
|
+
const prevHorizontalHeaders = getPrevHorizontalHeaders(headerGroup.headers, column.index);
|
|
2848
|
+
const nextVerticalHeaders = getNextVerticalHeaders(headerGroups, hgi, column.index);
|
|
2849
|
+
const prevVerticalHeaders = getPrevVerticalHeaders(headerGroups, hgi, column.index);
|
|
2850
|
+
const thWidth = !nextHorizontalHeaders.length && !prevHorizontalHeaders.length ? column.size : column.size + nextHorizontalHeaders.reduce(
|
|
2851
|
+
(sum, current) => sum + (current.column.columnDef.meta?.width ?? 0),
|
|
2852
|
+
0
|
|
2853
|
+
);
|
|
2854
|
+
const zIndex = !nextHorizontalHeaders.length && !prevHorizontalHeaders.length ? void 0 : nextHorizontalHeaders.length + 2;
|
|
2855
|
+
const thHeight = !prevVerticalHeaders.length ? headerGroupHeight[hgi] : headerGroupHeight[hgi] + prevVerticalHeaders.reduce(
|
|
2856
|
+
(sum, _, index) => sum + (headerGroupHeight[hgi - index - 1] ?? 0),
|
|
2857
|
+
0
|
|
2858
|
+
);
|
|
2859
|
+
const translateY = !prevVerticalHeaders.length ? headerGroupY(hgi) : headerGroupY(hgi) - prevVerticalHeaders.reduce(
|
|
2860
|
+
(sum, _, index) => sum + (headerGroupHeight[hgi - index - 1] ?? 0),
|
|
2861
|
+
0
|
|
2862
|
+
);
|
|
2863
|
+
return /* @__PURE__ */ jsx34(
|
|
2864
|
+
"div",
|
|
2865
|
+
{
|
|
2866
|
+
className: classnames23(
|
|
2867
|
+
virtualTable_default.th,
|
|
2868
|
+
hgi === 0 && virtualTable_default.firstThRow,
|
|
2869
|
+
!nextVerticalHeaders.length && column.index !== headerGroup.headers.length - 1 && virtualTable_default.thRightBorder,
|
|
2870
|
+
column.index === 0 && virtualTable_default.thLeftBorder,
|
|
2871
|
+
nextVerticalHeaders.length && !nextHorizontalHeaders.length && virtualTable_default.thHiddenColumn
|
|
2872
|
+
),
|
|
2873
|
+
style: {
|
|
2874
|
+
width: `${thWidth}px`,
|
|
2875
|
+
zIndex,
|
|
2876
|
+
height: `${thHeight}px`,
|
|
2877
|
+
transform: `translateX(${column.start + (!!fixedColumnsCount ? -2 : 0)}px) translateY(${translateY}px)`,
|
|
2878
|
+
borderTop: borders !== "none" && translateY === 0 ? "1px solid var(--border-color)" : void 0
|
|
2879
|
+
},
|
|
2880
|
+
children: innerCell(header)
|
|
2881
|
+
},
|
|
2882
|
+
`${headerGroup.id}-${header.id}`
|
|
2883
|
+
);
|
|
2884
|
+
}
|
|
2885
|
+
return null;
|
|
2886
|
+
}),
|
|
2887
|
+
!!rowButtons && /* @__PURE__ */ jsx34(
|
|
2835
2888
|
"div",
|
|
2836
2889
|
{
|
|
2837
|
-
className: classnames23(
|
|
2838
|
-
virtualTable_default.th,
|
|
2839
|
-
hgi === 0 && virtualTable_default.firstThRow,
|
|
2840
|
-
!nextVerticalHeaders.length && column.index !== headerGroup.headers.length - 1 && virtualTable_default.thRightBorder,
|
|
2841
|
-
column.index === 0 && virtualTable_default.thLeftBorder,
|
|
2842
|
-
nextVerticalHeaders.length && !nextHorizontalHeaders.length && virtualTable_default.thHiddenColumn
|
|
2843
|
-
),
|
|
2890
|
+
className: classnames23(virtualTable_default.th, hgi === 0 ? virtualTable_default.firstThRow : void 0),
|
|
2844
2891
|
style: {
|
|
2845
|
-
width: `${
|
|
2846
|
-
|
|
2847
|
-
|
|
2848
|
-
|
|
2849
|
-
borderTop: translateY === 0 ? "1px solid var(--border-color)" : void 0,
|
|
2850
|
-
fontSize: `${headerFontSize}px`
|
|
2851
|
-
},
|
|
2852
|
-
children: innerCell(header)
|
|
2853
|
-
},
|
|
2854
|
-
`${headerGroup.id}-${header.id}`
|
|
2855
|
-
);
|
|
2856
|
-
}
|
|
2857
|
-
return null;
|
|
2858
|
-
}),
|
|
2859
|
-
!!rowButtons && /* @__PURE__ */ jsx34(
|
|
2860
|
-
"div",
|
|
2861
|
-
{
|
|
2862
|
-
className: classnames23(virtualTable_default.th, hgi === 0 ? virtualTable_default.firstThRow : void 0),
|
|
2863
|
-
style: {
|
|
2864
|
-
width: `${rowActionWidth}px`,
|
|
2865
|
-
height: `${headerGroupHeight[hgi]}px`,
|
|
2866
|
-
transform: `translateX(${columnsTotalSize + (!!fixedColumnsCount ? -2 : 0)}px) translateY(${headerGroupY(hgi)}px)`
|
|
2867
|
-
}
|
|
2868
|
-
}
|
|
2869
|
-
)
|
|
2870
|
-
] }, headerGroup.id);
|
|
2871
|
-
})
|
|
2872
|
-
}
|
|
2873
|
-
),
|
|
2874
|
-
virtualRows.map((virtualRow) => {
|
|
2875
|
-
const row = rowsFromTable[virtualRow.index];
|
|
2876
|
-
return /* @__PURE__ */ jsxs19(
|
|
2877
|
-
"div",
|
|
2878
|
-
{
|
|
2879
|
-
"data-index": virtualRow.index,
|
|
2880
|
-
ref: dynamicRowHeight ? rowVirtualizer.measureElement : void 0,
|
|
2881
|
-
className: classnames23(
|
|
2882
|
-
virtualTable_default.tr,
|
|
2883
|
-
virtualRow.index % 2 !== 0 && virtualTable_default.evenRow,
|
|
2884
|
-
row.original?.isNew?.value === 1 && virtualTable_default.selected
|
|
2885
|
-
),
|
|
2886
|
-
style: {
|
|
2887
|
-
...!dynamicRowHeight && {
|
|
2888
|
-
height: virtualRow.size
|
|
2889
|
-
},
|
|
2890
|
-
transform: `translateY(${summaryHeaderHeight + virtualRow.start - rowVirtualizer.options.scrollMargin}px)`
|
|
2891
|
-
},
|
|
2892
|
-
children: [
|
|
2893
|
-
/* @__PURE__ */ jsx34("div", { style: { width: `${before}px` } }),
|
|
2894
|
-
virtualColumns.map((virtualCol) => {
|
|
2895
|
-
const cell = row.getAllCells()[virtualCol.index];
|
|
2896
|
-
const isSticky = cell.column.getIsPinned() === "left";
|
|
2897
|
-
return /* @__PURE__ */ jsx34(
|
|
2898
|
-
"div",
|
|
2899
|
-
{
|
|
2900
|
-
"data-col-index": virtualCol.index,
|
|
2901
|
-
className: classnames23(virtualTable_default.td, isSticky && virtualTable_default.sticky),
|
|
2902
|
-
style: {
|
|
2903
|
-
...isSticky && {
|
|
2904
|
-
left: virtualCol.start,
|
|
2905
|
-
marginLeft: -1
|
|
2906
|
-
// чтобы появился левый бордер
|
|
2907
|
-
},
|
|
2908
|
-
width: `${virtualCol.size}px`,
|
|
2909
|
-
...!dynamicRowHeight && {
|
|
2910
|
-
overflow: "hidden"
|
|
2911
|
-
},
|
|
2912
|
-
fontSize: `${rowFontSize}px`
|
|
2913
|
-
},
|
|
2914
|
-
"data-index": virtualRow.index,
|
|
2915
|
-
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2916
|
-
},
|
|
2917
|
-
`cell-${virtualRow.key}-${virtualCol.key}`
|
|
2918
|
-
);
|
|
2919
|
-
}),
|
|
2920
|
-
!!rowButtons && /* @__PURE__ */ jsx34(
|
|
2921
|
-
"div",
|
|
2922
|
-
{
|
|
2923
|
-
className: classnames23(virtualTable_default.td),
|
|
2924
|
-
style: {
|
|
2925
|
-
width: `${rowActionWidth}px`,
|
|
2926
|
-
justifyContent: "flex-start",
|
|
2927
|
-
padding: "4px",
|
|
2928
|
-
...!dynamicRowHeight && {
|
|
2929
|
-
overflow: "hidden"
|
|
2892
|
+
width: `${rowActionWidth}px`,
|
|
2893
|
+
height: `${headerGroupHeight[hgi]}px`,
|
|
2894
|
+
transform: `translateX(${columnsTotalSize + (!!fixedColumnsCount ? -2 : 0)}px) translateY(${headerGroupY(hgi)}px)`
|
|
2895
|
+
}
|
|
2930
2896
|
}
|
|
2897
|
+
)
|
|
2898
|
+
] }, headerGroup.id);
|
|
2899
|
+
})
|
|
2900
|
+
}
|
|
2901
|
+
),
|
|
2902
|
+
virtualRows.map((virtualRow) => {
|
|
2903
|
+
const row = rowsFromTable[virtualRow.index];
|
|
2904
|
+
return /* @__PURE__ */ jsxs19(
|
|
2905
|
+
"div",
|
|
2906
|
+
{
|
|
2907
|
+
"data-index": virtualRow.index,
|
|
2908
|
+
ref: dynamicRowHeight ? rowVirtualizer.measureElement : void 0,
|
|
2909
|
+
className: classnames23(
|
|
2910
|
+
virtualTable_default.tr,
|
|
2911
|
+
virtualRow.index % 2 !== 0 && virtualTable_default.evenRow,
|
|
2912
|
+
row.original?.isNew?.value === 1 && virtualTable_default.selected
|
|
2913
|
+
),
|
|
2914
|
+
style: {
|
|
2915
|
+
...!dynamicRowHeight && {
|
|
2916
|
+
height: virtualRow.size
|
|
2931
2917
|
},
|
|
2932
|
-
|
|
2933
|
-
|
|
2918
|
+
transform: `translateY(${summaryHeaderHeight + virtualRow.start - rowVirtualizer.options.scrollMargin}px)`
|
|
2919
|
+
},
|
|
2920
|
+
children: [
|
|
2921
|
+
/* @__PURE__ */ jsx34("div", { style: { width: `${before}px` } }),
|
|
2922
|
+
virtualColumns.map((virtualCol) => {
|
|
2923
|
+
const cell = row.getAllCells()[virtualCol.index];
|
|
2924
|
+
const isSticky = cell.column.getIsPinned() === "left";
|
|
2925
|
+
return /* @__PURE__ */ jsx34(
|
|
2926
|
+
"div",
|
|
2927
|
+
{
|
|
2928
|
+
"data-col-index": virtualCol.index,
|
|
2929
|
+
className: classnames23(virtualTable_default.td, isSticky && virtualTable_default.sticky),
|
|
2930
|
+
style: {
|
|
2931
|
+
...isSticky && {
|
|
2932
|
+
left: virtualCol.start,
|
|
2933
|
+
marginLeft: -1
|
|
2934
|
+
// чтобы появился левый бордер
|
|
2935
|
+
},
|
|
2936
|
+
width: `${virtualCol.size}px`,
|
|
2937
|
+
...!dynamicRowHeight && {
|
|
2938
|
+
overflow: "hidden"
|
|
2939
|
+
}
|
|
2940
|
+
},
|
|
2941
|
+
"data-index": virtualRow.index,
|
|
2942
|
+
children: flexRender(cell.column.columnDef.cell, cell.getContext())
|
|
2943
|
+
},
|
|
2944
|
+
`cell-${virtualRow.key}-${virtualCol.key}`
|
|
2945
|
+
);
|
|
2946
|
+
}),
|
|
2947
|
+
!!rowButtons && /* @__PURE__ */ jsx34(
|
|
2948
|
+
"div",
|
|
2934
2949
|
{
|
|
2935
|
-
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2950
|
+
className: classnames23(virtualTable_default.td),
|
|
2951
|
+
style: {
|
|
2952
|
+
width: `${rowActionWidth}px`,
|
|
2953
|
+
justifyContent: "flex-start",
|
|
2954
|
+
padding: "4px",
|
|
2955
|
+
...!dynamicRowHeight && {
|
|
2956
|
+
overflow: "hidden"
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
2959
|
+
children: rowButtons?.(row.original)?.map((ab) => /* @__PURE__ */ jsx34(Fragment7, { children: ab.template ? ab.template(ab) : /* @__PURE__ */ jsx34(
|
|
2960
|
+
Tooltip,
|
|
2941
2961
|
{
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2962
|
+
label: ab.title,
|
|
2963
|
+
placement: "top",
|
|
2964
|
+
wrapTrigger: true,
|
|
2965
|
+
classes: { trigger: virtualTable_default.rowButtonTrigger },
|
|
2966
|
+
children: /* @__PURE__ */ jsx34(
|
|
2967
|
+
Button,
|
|
2968
|
+
{
|
|
2969
|
+
onClick: () => ab.onClick?.(virtualRow.index, row.original),
|
|
2970
|
+
size: "small",
|
|
2971
|
+
variant: "text",
|
|
2972
|
+
icon: ab.icon
|
|
2973
|
+
}
|
|
2974
|
+
)
|
|
2946
2975
|
}
|
|
2947
|
-
)
|
|
2976
|
+
) }, ab.title))
|
|
2948
2977
|
}
|
|
2949
|
-
)
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
}
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
|
|
2978
|
+
),
|
|
2979
|
+
/* @__PURE__ */ jsx34("div", { style: { width: `${after}px` } })
|
|
2980
|
+
]
|
|
2981
|
+
},
|
|
2982
|
+
`row-${virtualRow.key}`
|
|
2983
|
+
);
|
|
2984
|
+
})
|
|
2985
|
+
]
|
|
2986
|
+
}
|
|
2987
|
+
),
|
|
2988
|
+
borders !== "none" && /* @__PURE__ */ jsxs19(Fragment8, { children: [
|
|
2989
|
+
/* @__PURE__ */ jsx34("div", { className: virtualTable_default.rightBorder, style: { height: `${rowsTotalSize + summaryHeaderHeight}px` } }),
|
|
2990
|
+
/* @__PURE__ */ jsx34("div", { className: virtualTable_default.bottomBorder, style: { width: `${columnsTotalSize}px` } })
|
|
2991
|
+
] })
|
|
2992
|
+
] })
|
|
2993
|
+
}
|
|
2994
|
+
);
|
|
2964
2995
|
}
|
|
2965
2996
|
|
|
2966
2997
|
// src/components/view/TreeView/TreeView.tsx
|
|
@@ -3058,7 +3089,7 @@ var getFilteredTree = (tree, search) => {
|
|
|
3058
3089
|
};
|
|
3059
3090
|
|
|
3060
3091
|
// src/components/view/TreeView/TreeView.tsx
|
|
3061
|
-
import { Fragment as
|
|
3092
|
+
import { Fragment as Fragment9, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3062
3093
|
var TreeView_default = memo2(function TreeView({ data, selected, startIcons, onSelect, withSearch = false }) {
|
|
3063
3094
|
const [searchValue, setSearchValue] = useState16("");
|
|
3064
3095
|
const onChangeSearchValue = useCallback8((e) => setSearchValue(e.target.value), []);
|
|
@@ -3075,7 +3106,7 @@ var TreeView_default = memo2(function TreeView({ data, selected, startIcons, onS
|
|
|
3075
3106
|
const filteredData = useMemo8(() => {
|
|
3076
3107
|
return getFilteredTree(data, searchValue);
|
|
3077
3108
|
}, [data, searchValue]);
|
|
3078
|
-
return /* @__PURE__ */ jsxs21(
|
|
3109
|
+
return /* @__PURE__ */ jsxs21(Fragment9, { children: [
|
|
3079
3110
|
withSearch && /* @__PURE__ */ jsx36(
|
|
3080
3111
|
SearchInput,
|
|
3081
3112
|
{
|
|
@@ -3141,7 +3172,7 @@ function TypographyWithTooltip(props) {
|
|
|
3141
3172
|
}
|
|
3142
3173
|
|
|
3143
3174
|
// src/components/view/Pairs/Pairs.tsx
|
|
3144
|
-
import { Fragment as
|
|
3175
|
+
import { Fragment as Fragment10, jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3145
3176
|
function Pairs(props) {
|
|
3146
3177
|
const { pairs, column1Width = "50%", column2Width = "50%", showBorder, minRowHeight, classes } = props;
|
|
3147
3178
|
return /* @__PURE__ */ jsx38("div", { className: classNames5(classes?.root), children: pairs.map((pair, i) => /* @__PURE__ */ jsx38(
|
|
@@ -3151,7 +3182,7 @@ function Pairs(props) {
|
|
|
3151
3182
|
className: classNames5(classes?.rowContainer, {
|
|
3152
3183
|
[pairs_default.rowContainerBorders]: showBorder
|
|
3153
3184
|
}),
|
|
3154
|
-
children: pair && /* @__PURE__ */ jsxs22(
|
|
3185
|
+
children: pair && /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
3155
3186
|
/* @__PURE__ */ jsx38(
|
|
3156
3187
|
"div",
|
|
3157
3188
|
{
|
package/package.json
CHANGED