nntc-ui 0.0.34 → 0.0.36
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/index.css +37 -3
- package/index.d.ts +4 -0
- package/index.js +191 -118
- package/package.json +1 -1
package/index.css
CHANGED
|
@@ -144,12 +144,19 @@
|
|
|
144
144
|
.button_textSecondary.button_active > span > svg {
|
|
145
145
|
fill: var(--theme-focus) !important;
|
|
146
146
|
}
|
|
147
|
-
|
|
148
|
-
|
|
147
|
+
.button_root:disabled,
|
|
148
|
+
.button_root[disabled] {
|
|
149
149
|
color: var(--theme-text-inactive);
|
|
150
150
|
pointer-events: none;
|
|
151
151
|
-webkit-user-select: none;
|
|
152
152
|
user-select: none;
|
|
153
|
+
}
|
|
154
|
+
.button_tonal:disabled,
|
|
155
|
+
.button_tonal[disabled],
|
|
156
|
+
.button_elevated:disabled,
|
|
157
|
+
.button_elevated[disabled],
|
|
158
|
+
.button_filled:disabled,
|
|
159
|
+
.button_filled[disabled] {
|
|
153
160
|
background-color: var(--theme-grey-700);
|
|
154
161
|
}
|
|
155
162
|
|
|
@@ -1260,9 +1267,36 @@ button[disabled] {
|
|
|
1260
1267
|
width: 100%;
|
|
1261
1268
|
height: 0;
|
|
1262
1269
|
}
|
|
1270
|
+
.multiSelect_input:disabled,
|
|
1271
|
+
.multiSelect_input[disabled],
|
|
1272
|
+
.multiSelect_input:disabled + .multiSelect_arrow,
|
|
1273
|
+
.multiSelect_input[disabled] + .multiSelect_arrow {
|
|
1274
|
+
color: var(--theme-text-inactive);
|
|
1275
|
+
pointer-events: none;
|
|
1276
|
+
-webkit-user-select: none;
|
|
1277
|
+
user-select: none;
|
|
1278
|
+
}
|
|
1279
|
+
.multiSelect_outlined:hover > .multiSelect_input:disabled,
|
|
1280
|
+
.multiSelect_outlined:hover > .multiSelect_input.multiSelect_input[disabled] {
|
|
1281
|
+
outline-color: var(--theme-input-border);
|
|
1282
|
+
}
|
|
1283
|
+
.multiSelect_filled .multiSelect_input:disabled,
|
|
1284
|
+
.multiSelect_filled .multiSelect_input[disabled] {
|
|
1285
|
+
background-color: var(--theme-grey-700);
|
|
1286
|
+
}
|
|
1263
1287
|
.multiSelect_popoverContent {
|
|
1288
|
+
display: flex;
|
|
1289
|
+
flex-direction: column;
|
|
1290
|
+
gap: 8px;
|
|
1291
|
+
padding-right: 16px;
|
|
1292
|
+
padding-bottom: 16px;
|
|
1293
|
+
}
|
|
1294
|
+
.multiSelect_menuWrapper {
|
|
1264
1295
|
max-height: 250px;
|
|
1265
|
-
|
|
1296
|
+
}
|
|
1297
|
+
.multiSelect_searchInputRoot {
|
|
1298
|
+
padding: 0 8px;
|
|
1299
|
+
margin-top: 8px;
|
|
1266
1300
|
}
|
|
1267
1301
|
|
|
1268
1302
|
/* src/components/common/Checklist/checklist.module.css */
|
package/index.d.ts
CHANGED
|
@@ -138,6 +138,8 @@ interface Props$e {
|
|
|
138
138
|
onValueChange?: (newItem: string[] | null) => void;
|
|
139
139
|
selected: string[] | null;
|
|
140
140
|
titleType?: TitleVariant;
|
|
141
|
+
enableSearch?: boolean;
|
|
142
|
+
popoverInComponent?: boolean;
|
|
141
143
|
}
|
|
142
144
|
declare function MultiSelect(props: UiProps<Props$e> & DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>): react_jsx_runtime.JSX.Element;
|
|
143
145
|
|
|
@@ -352,6 +354,8 @@ interface Props$4 {
|
|
|
352
354
|
wrapTrigger?: boolean;
|
|
353
355
|
containerOffset?: number;
|
|
354
356
|
root?: HTMLElement | MutableRefObject<HTMLElement | null> | null;
|
|
357
|
+
open?: boolean;
|
|
358
|
+
onOpenChange?: (open: boolean) => void;
|
|
355
359
|
}
|
|
356
360
|
declare function Popover(props: PropsWithChildren<UiProps<Props$4>>): string | number | true | Iterable<ReactNode> | react_jsx_runtime.JSX.Element | null;
|
|
357
361
|
|
package/index.js
CHANGED
|
@@ -417,7 +417,19 @@ var PopoverTrigger = forwardRef4(
|
|
|
417
417
|
// src/components/view/Popover/Popover.tsx
|
|
418
418
|
import { jsx as jsx7, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
419
419
|
function Popover(props) {
|
|
420
|
-
const {
|
|
420
|
+
const {
|
|
421
|
+
description,
|
|
422
|
+
clickable,
|
|
423
|
+
initialOpen,
|
|
424
|
+
placement,
|
|
425
|
+
wrapTrigger,
|
|
426
|
+
containerOffset,
|
|
427
|
+
root: root22,
|
|
428
|
+
open,
|
|
429
|
+
onOpenChange,
|
|
430
|
+
children: children2,
|
|
431
|
+
classes
|
|
432
|
+
} = props;
|
|
421
433
|
const [showTooltip, setShowTooltip] = useState2(false);
|
|
422
434
|
if (!children2) {
|
|
423
435
|
return null;
|
|
@@ -430,8 +442,8 @@ function Popover(props) {
|
|
|
430
442
|
{
|
|
431
443
|
placement,
|
|
432
444
|
initialOpen,
|
|
433
|
-
open: clickable ? showTooltip : void 0,
|
|
434
|
-
onOpenChange: clickable ? setShowTooltip : void 0,
|
|
445
|
+
open: open !== void 0 ? open : clickable ? showTooltip : void 0,
|
|
446
|
+
onOpenChange: onOpenChange !== void 0 ? onOpenChange : clickable ? setShowTooltip : void 0,
|
|
435
447
|
containerOffset,
|
|
436
448
|
root: root22,
|
|
437
449
|
children: [
|
|
@@ -1553,7 +1565,12 @@ var WrapForLabel = (props) => {
|
|
|
1553
1565
|
|
|
1554
1566
|
// src/components/common/MultiSelect/MultiSelect.tsx
|
|
1555
1567
|
import classnames11 from "classnames";
|
|
1556
|
-
import {
|
|
1568
|
+
import {
|
|
1569
|
+
useCallback as useCallback6,
|
|
1570
|
+
useMemo as useMemo3,
|
|
1571
|
+
useRef as useRef7,
|
|
1572
|
+
useState as useState8
|
|
1573
|
+
} from "react";
|
|
1557
1574
|
import { useTranslation as useTranslation2 } from "react-i18next";
|
|
1558
1575
|
import { mergeRefs as mergeRefs7 } from "react-merge-refs";
|
|
1559
1576
|
import { v4 as uuidv45 } from "uuid";
|
|
@@ -1570,10 +1587,12 @@ __export(multiSelect_exports, {
|
|
|
1570
1587
|
itemIcon: () => itemIcon3,
|
|
1571
1588
|
label: () => label5,
|
|
1572
1589
|
medium: () => medium9,
|
|
1590
|
+
menuWrapper: () => menuWrapper,
|
|
1573
1591
|
outlined: () => outlined7,
|
|
1574
1592
|
popoverContent: () => popoverContent3,
|
|
1575
1593
|
popoverTarget: () => popoverTarget4,
|
|
1576
1594
|
root: () => root12,
|
|
1595
|
+
searchInputRoot: () => searchInputRoot,
|
|
1577
1596
|
small: () => small9,
|
|
1578
1597
|
withIcon: () => withIcon4,
|
|
1579
1598
|
withItemIcon: () => withItemIcon2,
|
|
@@ -1595,6 +1614,8 @@ var clear = "multiSelect_clear";
|
|
|
1595
1614
|
var arrow3 = "multiSelect_arrow";
|
|
1596
1615
|
var popoverTarget4 = "multiSelect_popoverTarget";
|
|
1597
1616
|
var popoverContent3 = "multiSelect_popoverContent";
|
|
1617
|
+
var menuWrapper = "multiSelect_menuWrapper";
|
|
1618
|
+
var searchInputRoot = "multiSelect_searchInputRoot";
|
|
1598
1619
|
var multiSelect_default = {
|
|
1599
1620
|
root: root12,
|
|
1600
1621
|
medium: medium9,
|
|
@@ -1611,33 +1632,68 @@ var multiSelect_default = {
|
|
|
1611
1632
|
clear,
|
|
1612
1633
|
arrow: arrow3,
|
|
1613
1634
|
popoverTarget: popoverTarget4,
|
|
1614
|
-
popoverContent: popoverContent3
|
|
1635
|
+
popoverContent: popoverContent3,
|
|
1636
|
+
menuWrapper,
|
|
1637
|
+
searchInputRoot
|
|
1615
1638
|
};
|
|
1616
1639
|
|
|
1617
1640
|
// src/components/common/MultiSelect/ui/SelectPopover/SelectPopover.tsx
|
|
1618
|
-
import
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
name: i.name,
|
|
1630
|
-
description: i.description,
|
|
1631
|
-
disabled: i.disabled,
|
|
1632
|
-
selected: selected5?.includes(i.value),
|
|
1633
|
-
onClick: () => {
|
|
1634
|
-
changeSelectedItem(i);
|
|
1635
|
-
},
|
|
1636
|
-
withCheckbox: true
|
|
1637
|
-
})
|
|
1638
|
-
)
|
|
1639
|
-
}
|
|
1641
|
+
import classNames4 from "classnames";
|
|
1642
|
+
import { useState as useState7 } from "react";
|
|
1643
|
+
|
|
1644
|
+
// src/components/common/MultiSelect/utils/filterItems.ts
|
|
1645
|
+
var filterItems = (items2, filterText) => {
|
|
1646
|
+
if (!filterText) {
|
|
1647
|
+
return items2;
|
|
1648
|
+
}
|
|
1649
|
+
const searchText = filterText.toUpperCase();
|
|
1650
|
+
return items2.filter(
|
|
1651
|
+
(item3) => item3.name.toUpperCase().includes(searchText) || item3.description && item3.description.toUpperCase().includes(searchText)
|
|
1640
1652
|
);
|
|
1653
|
+
};
|
|
1654
|
+
|
|
1655
|
+
// src/components/common/MultiSelect/ui/SelectPopover/SelectPopover.tsx
|
|
1656
|
+
import { Fragment as Fragment3, jsx as jsx19, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1657
|
+
function SelectPopover2(props) {
|
|
1658
|
+
const { items: items2, componentSize, selected: selected5, changeSelectedItem, classes, enableSearch = false } = props;
|
|
1659
|
+
const [searchValue, setSearchValue] = useState7("");
|
|
1660
|
+
const filteredItems = enableSearch ? filterItems(items2, searchValue) : items2;
|
|
1661
|
+
const handleSearchChange = (e) => {
|
|
1662
|
+
setSearchValue(e.target.value);
|
|
1663
|
+
};
|
|
1664
|
+
return /* @__PURE__ */ jsxs11(Fragment3, { children: [
|
|
1665
|
+
enableSearch && /* @__PURE__ */ jsx19(
|
|
1666
|
+
SearchInput,
|
|
1667
|
+
{
|
|
1668
|
+
variant: "outlined",
|
|
1669
|
+
componentSize,
|
|
1670
|
+
value: searchValue,
|
|
1671
|
+
fullWidth: true,
|
|
1672
|
+
classes: classes?.searchInput,
|
|
1673
|
+
onChange: handleSearchChange
|
|
1674
|
+
}
|
|
1675
|
+
),
|
|
1676
|
+
/* @__PURE__ */ jsx19("div", { className: classNames4(classes?.menuWrapper), children: /* @__PURE__ */ jsx19(
|
|
1677
|
+
Menu,
|
|
1678
|
+
{
|
|
1679
|
+
size: componentSize,
|
|
1680
|
+
classes: classes?.menu,
|
|
1681
|
+
items: filteredItems.map(
|
|
1682
|
+
(i) => ({
|
|
1683
|
+
type: "item",
|
|
1684
|
+
name: i.name,
|
|
1685
|
+
description: i.description,
|
|
1686
|
+
disabled: i.disabled,
|
|
1687
|
+
selected: selected5?.includes(i.value),
|
|
1688
|
+
onClick: () => {
|
|
1689
|
+
changeSelectedItem(i);
|
|
1690
|
+
},
|
|
1691
|
+
withCheckbox: true
|
|
1692
|
+
})
|
|
1693
|
+
)
|
|
1694
|
+
}
|
|
1695
|
+
) })
|
|
1696
|
+
] });
|
|
1641
1697
|
}
|
|
1642
1698
|
|
|
1643
1699
|
// src/components/common/MultiSelect/utils/getTitle.ts
|
|
@@ -1656,7 +1712,7 @@ var getTitle = (titleType, activeItems, t) => {
|
|
|
1656
1712
|
};
|
|
1657
1713
|
|
|
1658
1714
|
// src/components/common/MultiSelect/MultiSelect.tsx
|
|
1659
|
-
import { jsx as jsx20, jsxs as
|
|
1715
|
+
import { jsx as jsx20, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1660
1716
|
function MultiSelect(props) {
|
|
1661
1717
|
const {
|
|
1662
1718
|
variant = "filled",
|
|
@@ -1673,19 +1729,24 @@ function MultiSelect(props) {
|
|
|
1673
1729
|
disabled: disabled2,
|
|
1674
1730
|
id,
|
|
1675
1731
|
titleType = "allValue",
|
|
1732
|
+
enableSearch = false,
|
|
1733
|
+
popoverInComponent = false,
|
|
1676
1734
|
...inputProps
|
|
1677
1735
|
} = props;
|
|
1678
1736
|
const { t } = useTranslation2();
|
|
1737
|
+
const wrapperRef = useRef7(null);
|
|
1679
1738
|
const inputRef = useRef7(null);
|
|
1680
1739
|
const popoverTargetRef = useRef7(null);
|
|
1740
|
+
const [isPopoverOpen, setIsPopoverOpen] = useState8(false);
|
|
1681
1741
|
const activeItems = useMemo3(() => items2.filter((i) => selected5?.includes(i.value)), [selected5, items2]);
|
|
1682
1742
|
const inputClickHandler = useCallback6(
|
|
1683
1743
|
(e) => {
|
|
1684
1744
|
e.preventDefault();
|
|
1685
|
-
if (!disabled2)
|
|
1686
|
-
|
|
1745
|
+
if (!disabled2) {
|
|
1746
|
+
setIsPopoverOpen((prev) => !prev);
|
|
1747
|
+
}
|
|
1687
1748
|
},
|
|
1688
|
-
[
|
|
1749
|
+
[disabled2]
|
|
1689
1750
|
);
|
|
1690
1751
|
const changeSelectedItem = (item3) => {
|
|
1691
1752
|
const newValue = selected5 ?? [];
|
|
@@ -1704,7 +1765,7 @@ function MultiSelect(props) {
|
|
|
1704
1765
|
onValueChange?.(null);
|
|
1705
1766
|
};
|
|
1706
1767
|
const inputId = id ?? uuidv45();
|
|
1707
|
-
return /* @__PURE__ */
|
|
1768
|
+
return /* @__PURE__ */ jsxs12(
|
|
1708
1769
|
"div",
|
|
1709
1770
|
{
|
|
1710
1771
|
className: classnames11(root12, multiSelect_exports[componentSize], classes?.root),
|
|
@@ -1723,9 +1784,10 @@ function MultiSelect(props) {
|
|
|
1723
1784
|
children: label7
|
|
1724
1785
|
}
|
|
1725
1786
|
),
|
|
1726
|
-
/* @__PURE__ */
|
|
1787
|
+
/* @__PURE__ */ jsxs12(
|
|
1727
1788
|
"div",
|
|
1728
1789
|
{
|
|
1790
|
+
ref: wrapperRef,
|
|
1729
1791
|
className: classnames11(
|
|
1730
1792
|
wrapper4,
|
|
1731
1793
|
multiSelect_exports[variant],
|
|
@@ -1754,19 +1816,30 @@ function MultiSelect(props) {
|
|
|
1754
1816
|
Popover,
|
|
1755
1817
|
{
|
|
1756
1818
|
placement: "bottom-start",
|
|
1819
|
+
open: isPopoverOpen,
|
|
1820
|
+
onOpenChange: setIsPopoverOpen,
|
|
1757
1821
|
classes: {
|
|
1758
|
-
content: classnames11(popoverContent3,
|
|
1822
|
+
content: classnames11(popoverContent3, classes?.popoverContent),
|
|
1759
1823
|
...classes?.popover
|
|
1760
1824
|
},
|
|
1761
1825
|
containerOffset: 4,
|
|
1826
|
+
root: popoverInComponent ? wrapperRef.current : void 0,
|
|
1762
1827
|
description: /* @__PURE__ */ jsx20(
|
|
1763
1828
|
SelectPopover2,
|
|
1764
1829
|
{
|
|
1765
1830
|
items: items2,
|
|
1766
|
-
classes
|
|
1831
|
+
classes: {
|
|
1832
|
+
searchInput: {
|
|
1833
|
+
root: searchInputRoot,
|
|
1834
|
+
...classes?.selectPopover?.searchInput
|
|
1835
|
+
},
|
|
1836
|
+
menuWrapper: classnames11(menuWrapper, "styledScroll"),
|
|
1837
|
+
...classes?.selectPopover
|
|
1838
|
+
},
|
|
1767
1839
|
componentSize,
|
|
1768
1840
|
selected: selected5,
|
|
1769
|
-
changeSelectedItem
|
|
1841
|
+
changeSelectedItem,
|
|
1842
|
+
enableSearch
|
|
1770
1843
|
}
|
|
1771
1844
|
),
|
|
1772
1845
|
children: /* @__PURE__ */ jsx20("div", { ref: popoverTargetRef, className: classnames11(popoverTarget4) })
|
|
@@ -1782,7 +1855,7 @@ function MultiSelect(props) {
|
|
|
1782
1855
|
|
|
1783
1856
|
// src/components/common/Checklist/Checklist.tsx
|
|
1784
1857
|
import classnames12 from "classnames";
|
|
1785
|
-
import { useState as
|
|
1858
|
+
import { useState as useState9 } from "react";
|
|
1786
1859
|
|
|
1787
1860
|
// src/components/common/Checklist/checklist.module.css
|
|
1788
1861
|
var root13 = "checklist_root";
|
|
@@ -1790,7 +1863,7 @@ var scrolled = "checklist_scrolled";
|
|
|
1790
1863
|
var actionWrap = "checklist_actionWrap";
|
|
1791
1864
|
|
|
1792
1865
|
// src/components/common/Checklist/utils/filterItems.ts
|
|
1793
|
-
var
|
|
1866
|
+
var filterItems2 = (items2, filterText, selectedItems) => {
|
|
1794
1867
|
if (!filterText) {
|
|
1795
1868
|
return items2.filter((item3) => !selectedItems[item3.value]);
|
|
1796
1869
|
}
|
|
@@ -1804,13 +1877,13 @@ var filterItems = (items2, filterText, selectedItems) => {
|
|
|
1804
1877
|
};
|
|
1805
1878
|
|
|
1806
1879
|
// src/components/common/Checklist/Checklist.tsx
|
|
1807
|
-
import { Fragment as
|
|
1880
|
+
import { Fragment as Fragment4, jsx as jsx21, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1808
1881
|
function Checklist(props) {
|
|
1809
1882
|
const { items: items2, selected: selected5, disableSearch, isDisabled, actionWithSelected, onChangeItem, classes } = props;
|
|
1810
1883
|
const { t } = useTranslation();
|
|
1811
|
-
const [filterSubstring, setFilterSubstring] =
|
|
1812
|
-
const [selectedItems, setSelectedItems] =
|
|
1813
|
-
const filteredItems =
|
|
1884
|
+
const [filterSubstring, setFilterSubstring] = useState9("");
|
|
1885
|
+
const [selectedItems, setSelectedItems] = useState9(selected5);
|
|
1886
|
+
const filteredItems = filterItems2(items2, filterSubstring, selectedItems);
|
|
1814
1887
|
const handleClick = (item3) => {
|
|
1815
1888
|
const value = !selected5[item3.value];
|
|
1816
1889
|
if (onChangeItem) {
|
|
@@ -1833,7 +1906,7 @@ function Checklist(props) {
|
|
|
1833
1906
|
setSelectedItems(newSelected);
|
|
1834
1907
|
actionWithSelected(newSelected);
|
|
1835
1908
|
};
|
|
1836
|
-
return /* @__PURE__ */
|
|
1909
|
+
return /* @__PURE__ */ jsxs13("div", { className: classnames12(root13, classes?.root), children: [
|
|
1837
1910
|
!disableSearch && /* @__PURE__ */ jsx21(
|
|
1838
1911
|
SearchInput,
|
|
1839
1912
|
{
|
|
@@ -1845,9 +1918,9 @@ function Checklist(props) {
|
|
|
1845
1918
|
onChange: (e) => setFilterSubstring(e.target.value)
|
|
1846
1919
|
}
|
|
1847
1920
|
),
|
|
1848
|
-
/* @__PURE__ */
|
|
1849
|
-
items2.some((item3) => !!selectedItems[item3.value]) && /* @__PURE__ */
|
|
1850
|
-
/* @__PURE__ */
|
|
1921
|
+
/* @__PURE__ */ jsxs13("div", { className: classnames12(scrolled, "styledScroll"), children: [
|
|
1922
|
+
items2.some((item3) => !!selectedItems[item3.value]) && /* @__PURE__ */ jsxs13(Fragment4, { children: [
|
|
1923
|
+
/* @__PURE__ */ jsxs13("div", { className: classnames12(actionWrap, classes?.actionWrap), children: [
|
|
1851
1924
|
/* @__PURE__ */ jsx21(Typography, { className: classnames12(classes?.typography), children: t("\u0412\u044B\u0431\u0440\u0430\u043D\u043D\u043E\u0435") }),
|
|
1852
1925
|
/* @__PURE__ */ jsx21(
|
|
1853
1926
|
Button,
|
|
@@ -1951,11 +2024,11 @@ function Layout(props) {
|
|
|
1951
2024
|
|
|
1952
2025
|
// src/components/navigation/Tabs/Tabs.tsx
|
|
1953
2026
|
import classnames17 from "classnames";
|
|
1954
|
-
import { useEffect as useEffect5, useState as
|
|
2027
|
+
import { useEffect as useEffect5, useState as useState12 } from "react";
|
|
1955
2028
|
|
|
1956
2029
|
// src/components/view/Tooltip/Tooltip.tsx
|
|
1957
2030
|
import classnames16 from "classnames";
|
|
1958
|
-
import { useRef as useRef8, useState as
|
|
2031
|
+
import { useRef as useRef8, useState as useState11 } from "react";
|
|
1959
2032
|
|
|
1960
2033
|
// src/components/view/Tooltip/tooltip.module.css
|
|
1961
2034
|
var tooltip_exports = {};
|
|
@@ -2008,7 +2081,7 @@ import { createContext as createContext2 } from "react";
|
|
|
2008
2081
|
var TooltipContext = createContext2(null);
|
|
2009
2082
|
|
|
2010
2083
|
// src/components/view/Tooltip/ui/TooltipContent/TooltipContent.tsx
|
|
2011
|
-
import { jsx as jsx24, jsxs as
|
|
2084
|
+
import { jsx as jsx24, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
2012
2085
|
var TooltipContent = forwardRef5(function TooltipContent2({ styles, style, children: children2, ...props }, propRef) {
|
|
2013
2086
|
const context = useContext5(TooltipContext);
|
|
2014
2087
|
if (!context) {
|
|
@@ -2049,7 +2122,7 @@ var TooltipContent = forwardRef5(function TooltipContent2({ styles, style, child
|
|
|
2049
2122
|
default:
|
|
2050
2123
|
break;
|
|
2051
2124
|
}
|
|
2052
|
-
return /* @__PURE__ */ jsx24(FloatingPortal2, { root: otherContext.root, children: /* @__PURE__ */
|
|
2125
|
+
return /* @__PURE__ */ jsx24(FloatingPortal2, { root: otherContext.root, children: /* @__PURE__ */ jsxs14(
|
|
2053
2126
|
"div",
|
|
2054
2127
|
{
|
|
2055
2128
|
ref,
|
|
@@ -2093,7 +2166,7 @@ import {
|
|
|
2093
2166
|
useInteractions as useInteractions2,
|
|
2094
2167
|
useRole as useRole2
|
|
2095
2168
|
} from "@floating-ui/react";
|
|
2096
|
-
import { useMemo as useMemo4, useState as
|
|
2169
|
+
import { useMemo as useMemo4, useState as useState10 } from "react";
|
|
2097
2170
|
function useTooltip(props = {}) {
|
|
2098
2171
|
const {
|
|
2099
2172
|
initialOpen = false,
|
|
@@ -2104,7 +2177,7 @@ function useTooltip(props = {}) {
|
|
|
2104
2177
|
arrowRef,
|
|
2105
2178
|
root: root22
|
|
2106
2179
|
} = props;
|
|
2107
|
-
const [uncontrolledOpen, setUncontrolledOpen] =
|
|
2180
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState10(initialOpen);
|
|
2108
2181
|
const open = controlledOpen ?? uncontrolledOpen;
|
|
2109
2182
|
const setOpen = setControlledOpen ?? setUncontrolledOpen;
|
|
2110
2183
|
const data = useFloating2({
|
|
@@ -2184,7 +2257,7 @@ var TooltipTrigger = forwardRef6(
|
|
|
2184
2257
|
);
|
|
2185
2258
|
|
|
2186
2259
|
// src/components/view/Tooltip/Tooltip.tsx
|
|
2187
|
-
import { jsx as jsx27, jsxs as
|
|
2260
|
+
import { jsx as jsx27, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
2188
2261
|
function Tooltip(props) {
|
|
2189
2262
|
const {
|
|
2190
2263
|
label: label7,
|
|
@@ -2198,7 +2271,7 @@ function Tooltip(props) {
|
|
|
2198
2271
|
children: children2,
|
|
2199
2272
|
classes
|
|
2200
2273
|
} = props;
|
|
2201
|
-
const [showTooltip, setShowTooltip] =
|
|
2274
|
+
const [showTooltip, setShowTooltip] = useState11(false);
|
|
2202
2275
|
const arrowRef = useRef8(null);
|
|
2203
2276
|
if (!label7) {
|
|
2204
2277
|
return children2;
|
|
@@ -2206,7 +2279,7 @@ function Tooltip(props) {
|
|
|
2206
2279
|
if (!children2) {
|
|
2207
2280
|
return null;
|
|
2208
2281
|
}
|
|
2209
|
-
return /* @__PURE__ */
|
|
2282
|
+
return /* @__PURE__ */ jsxs15(
|
|
2210
2283
|
TooltipProvider,
|
|
2211
2284
|
{
|
|
2212
2285
|
placement,
|
|
@@ -2299,7 +2372,7 @@ var tabs_default = {
|
|
|
2299
2372
|
};
|
|
2300
2373
|
|
|
2301
2374
|
// src/components/navigation/Tabs/Tabs.tsx
|
|
2302
|
-
import { jsx as jsx28, jsxs as
|
|
2375
|
+
import { jsx as jsx28, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
2303
2376
|
function Tabs(props) {
|
|
2304
2377
|
const {
|
|
2305
2378
|
items: items2,
|
|
@@ -2315,8 +2388,8 @@ function Tabs(props) {
|
|
|
2315
2388
|
value,
|
|
2316
2389
|
classes
|
|
2317
2390
|
} = props;
|
|
2318
|
-
const [isMounted, setIsMounted] =
|
|
2319
|
-
const [selectedTab, setSelectedTab] =
|
|
2391
|
+
const [isMounted, setIsMounted] = useState12(false);
|
|
2392
|
+
const [selectedTab, setSelectedTab] = useState12(defaultSelected);
|
|
2320
2393
|
const currentValue = useExternalState ? value : selectedTab;
|
|
2321
2394
|
const handleClick = (item3) => () => {
|
|
2322
2395
|
if (item3.isDisabled) {
|
|
@@ -2362,7 +2435,7 @@ function Tabs(props) {
|
|
|
2362
2435
|
children: items2.map((item3) => {
|
|
2363
2436
|
const isButton = !!item3.onClick;
|
|
2364
2437
|
const isSelected = !isButton && currentValue === item3.value;
|
|
2365
|
-
const tabContent = /* @__PURE__ */
|
|
2438
|
+
const tabContent = /* @__PURE__ */ jsxs16(
|
|
2366
2439
|
"div",
|
|
2367
2440
|
{
|
|
2368
2441
|
className: classnames17(
|
|
@@ -2379,7 +2452,7 @@ function Tabs(props) {
|
|
|
2379
2452
|
),
|
|
2380
2453
|
onClick: handleClick(item3),
|
|
2381
2454
|
children: [
|
|
2382
|
-
/* @__PURE__ */
|
|
2455
|
+
/* @__PURE__ */ jsxs16(
|
|
2383
2456
|
"div",
|
|
2384
2457
|
{
|
|
2385
2458
|
className: classnames17(
|
|
@@ -2424,7 +2497,7 @@ import { flexRender, getCoreRowModel, useReactTable } from "@tanstack/react-tabl
|
|
|
2424
2497
|
import { defaultRangeExtractor, useVirtualizer } from "@tanstack/react-virtual";
|
|
2425
2498
|
import classnames22 from "classnames";
|
|
2426
2499
|
import dayjs4 from "dayjs";
|
|
2427
|
-
import { Fragment as
|
|
2500
|
+
import { Fragment as Fragment8, useCallback as useCallback7, useEffect as useEffect8, useMemo as useMemo6, useRef as useRef11, useState as useState16 } from "react";
|
|
2428
2501
|
|
|
2429
2502
|
// src/utils/toFirstLetterUpperCase.ts
|
|
2430
2503
|
var toFirstLetterUpperCase = (name) => {
|
|
@@ -2436,7 +2509,7 @@ var defaultRowHeight = 32;
|
|
|
2436
2509
|
|
|
2437
2510
|
// src/components/view/VirtualTable/ui/DefaultColumn/DefaultColumn.tsx
|
|
2438
2511
|
import classnames18 from "classnames";
|
|
2439
|
-
import { useEffect as useEffect6, useRef as useRef10, useState as
|
|
2512
|
+
import { useEffect as useEffect6, useRef as useRef10, useState as useState13 } from "react";
|
|
2440
2513
|
|
|
2441
2514
|
// src/components/view/Modal/Modal.tsx
|
|
2442
2515
|
import { forwardRef as forwardRef7, useRef as useRef9 } from "react";
|
|
@@ -2597,15 +2670,15 @@ var virtualTable_default = {
|
|
|
2597
2670
|
};
|
|
2598
2671
|
|
|
2599
2672
|
// src/components/view/VirtualTable/ui/DefaultColumn/DefaultColumn.tsx
|
|
2600
|
-
import { Fragment as
|
|
2673
|
+
import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2601
2674
|
var DefaultColumn = {
|
|
2602
2675
|
cell: ({ getValue, row: { index, original }, column: { id, columnDef }, table: table2 }) => {
|
|
2603
2676
|
const initialValue = getValue();
|
|
2604
2677
|
const { meta } = columnDef;
|
|
2605
2678
|
const tableMeta = table2.options.meta;
|
|
2606
|
-
const [value, setValue] =
|
|
2607
|
-
const [isEdit, setIsEdit] =
|
|
2608
|
-
const [showModal, setShowModal] =
|
|
2679
|
+
const [value, setValue] = useState13(initialValue);
|
|
2680
|
+
const [isEdit, setIsEdit] = useState13(false);
|
|
2681
|
+
const [showModal, setShowModal] = useState13(false);
|
|
2609
2682
|
const closeModalRef = useRef10();
|
|
2610
2683
|
closeModalRef.current = () => {
|
|
2611
2684
|
setShowModal(false);
|
|
@@ -2622,10 +2695,10 @@ var DefaultColumn = {
|
|
|
2622
2695
|
const onChange = (e) => {
|
|
2623
2696
|
setValue(e.target.value);
|
|
2624
2697
|
};
|
|
2625
|
-
return /* @__PURE__ */ jsx30(Tooltip, { label: original[id]?.error ?? "", alertType: "error", children: additionalViewResult?.edit !== null && additionalViewResult?.edit !== void 0 ? additionalViewResult.edit(onChange, onBlur) : /* @__PURE__ */ jsx30(
|
|
2698
|
+
return /* @__PURE__ */ jsx30(Tooltip, { label: original[id]?.error ?? "", alertType: "error", children: additionalViewResult?.edit !== null && additionalViewResult?.edit !== void 0 ? additionalViewResult.edit(onChange, onBlur) : /* @__PURE__ */ jsx30(Fragment5, { children: /* @__PURE__ */ jsx30("input", { onChange, onBlur, value: value ?? "", autoFocus: true }) }) });
|
|
2626
2699
|
}
|
|
2627
2700
|
const shownValue = additionalViewResult?.view !== null && additionalViewResult?.view !== void 0 ? additionalViewResult.view : meta?.valueFormat ? meta.valueFormat(initialValue?.toString() ?? "") : meta?.toFixed !== void 0 && !Number.isNaN(parseFloat(initialValue)) ? parseFloat(Number(initialValue).toFixed(meta.toFixed)) : initialValue;
|
|
2628
|
-
return /* @__PURE__ */ jsx30(Tooltip, { label: original[id]?.error, alertType: "error", children: /* @__PURE__ */
|
|
2701
|
+
return /* @__PURE__ */ jsx30(Tooltip, { label: original[id]?.error, alertType: "error", children: /* @__PURE__ */ jsxs17(
|
|
2629
2702
|
"div",
|
|
2630
2703
|
{
|
|
2631
2704
|
className: classnames18(
|
|
@@ -2659,7 +2732,7 @@ var checklistWrap = "headerDropdown_checklistWrap";
|
|
|
2659
2732
|
|
|
2660
2733
|
// src/components/view/VirtualTable/ui/DateFiltration/DateFiltration.tsx
|
|
2661
2734
|
import classnames19 from "classnames";
|
|
2662
|
-
import { useEffect as useEffect7, useState as
|
|
2735
|
+
import { useEffect as useEffect7, useState as useState14 } from "react";
|
|
2663
2736
|
|
|
2664
2737
|
// src/components/view/VirtualTable/ui/DateFiltration/dateFiltration.module.css
|
|
2665
2738
|
var root19 = "dateFiltration_root";
|
|
@@ -2668,7 +2741,7 @@ var root19 = "dateFiltration_root";
|
|
|
2668
2741
|
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
2669
2742
|
function DateFiltration(props) {
|
|
2670
2743
|
const { defaultValues = [void 0, void 0], actionWithSelected } = props;
|
|
2671
|
-
const [values, setValues] =
|
|
2744
|
+
const [values, setValues] = useState14(defaultValues);
|
|
2672
2745
|
const handleChangeDates = (newValues) => {
|
|
2673
2746
|
setValues(newValues);
|
|
2674
2747
|
};
|
|
@@ -2690,7 +2763,7 @@ function DateFiltration(props) {
|
|
|
2690
2763
|
|
|
2691
2764
|
// src/components/view/VirtualTable/ui/NumberFiltration/NumberFiltration.tsx
|
|
2692
2765
|
import classnames20 from "classnames";
|
|
2693
|
-
import { useState as
|
|
2766
|
+
import { useState as useState15 } from "react";
|
|
2694
2767
|
|
|
2695
2768
|
// src/components/view/VirtualTable/ui/NumberFiltration/numberFiltration.module.css
|
|
2696
2769
|
var root20 = "numberFiltration_root";
|
|
@@ -2699,7 +2772,7 @@ var inputsContainer = "numberFiltration_inputsContainer";
|
|
|
2699
2772
|
var input8 = "numberFiltration_input";
|
|
2700
2773
|
|
|
2701
2774
|
// src/components/view/VirtualTable/ui/NumberFiltration/NumberFiltration.tsx
|
|
2702
|
-
import { Fragment as
|
|
2775
|
+
import { Fragment as Fragment6, jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2703
2776
|
var items = [
|
|
2704
2777
|
{ type: "item", name: "\u041E\u0442 \u2014 \u0434\u043E", value: "range" },
|
|
2705
2778
|
{ type: "item", name: "\u0411\u043E\u043B\u044C\u0448\u0435", value: "more" },
|
|
@@ -2708,10 +2781,10 @@ var items = [
|
|
|
2708
2781
|
];
|
|
2709
2782
|
function NumberFiltration(props) {
|
|
2710
2783
|
const { defaultValues = [-Infinity, Infinity], actionWithSelected } = props;
|
|
2711
|
-
const [selectedItem, setSelectedItem] =
|
|
2784
|
+
const [selectedItem, setSelectedItem] = useState15(
|
|
2712
2785
|
defaultValues[0] === -Infinity && defaultValues[1] === Infinity ? items[0] : defaultValues[0] === defaultValues[1] ? items[3] : defaultValues[0] === -Infinity ? items[2] : defaultValues[1] === Infinity ? items[1] : items[0]
|
|
2713
2786
|
);
|
|
2714
|
-
const [values, setValues] =
|
|
2787
|
+
const [values, setValues] = useState15(defaultValues);
|
|
2715
2788
|
const handleSelect = (item3) => {
|
|
2716
2789
|
if (!!item3) {
|
|
2717
2790
|
const newValues = [...values];
|
|
@@ -2740,7 +2813,7 @@ function NumberFiltration(props) {
|
|
|
2740
2813
|
(prev) => type === "equal" ? [value.length ? +value : -Infinity, value.length ? +value : Infinity] : type === "more" ? [value.length ? +value : -Infinity, prev[1]] : [prev[0], value.length ? +value : Infinity]
|
|
2741
2814
|
);
|
|
2742
2815
|
};
|
|
2743
|
-
return /* @__PURE__ */
|
|
2816
|
+
return /* @__PURE__ */ jsxs18("div", { className: classnames20(root20), children: [
|
|
2744
2817
|
/* @__PURE__ */ jsx32(
|
|
2745
2818
|
Select,
|
|
2746
2819
|
{
|
|
@@ -2753,7 +2826,7 @@ function NumberFiltration(props) {
|
|
|
2753
2826
|
tabIndex: -1
|
|
2754
2827
|
}
|
|
2755
2828
|
),
|
|
2756
|
-
/* @__PURE__ */ jsx32("div", { className: classnames20(inputsContainer), children: selectedItem.value === "range" ? /* @__PURE__ */
|
|
2829
|
+
/* @__PURE__ */ jsx32("div", { className: classnames20(inputsContainer), children: selectedItem.value === "range" ? /* @__PURE__ */ jsxs18(Fragment6, { children: [
|
|
2757
2830
|
/* @__PURE__ */ jsx32(
|
|
2758
2831
|
Input,
|
|
2759
2832
|
{
|
|
@@ -2818,7 +2891,7 @@ function NumberFiltration(props) {
|
|
|
2818
2891
|
}
|
|
2819
2892
|
|
|
2820
2893
|
// src/components/view/VirtualTable/ui/HeaderDropdown/HeaderDropdown.tsx
|
|
2821
|
-
import { Fragment as
|
|
2894
|
+
import { Fragment as Fragment7, jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2822
2895
|
function HeaderDropdown(props) {
|
|
2823
2896
|
const {
|
|
2824
2897
|
headerMeta: {
|
|
@@ -2841,7 +2914,7 @@ function HeaderDropdown(props) {
|
|
|
2841
2914
|
children: children2
|
|
2842
2915
|
} = props;
|
|
2843
2916
|
const headerResultName = sortAnotherName ?? headerName;
|
|
2844
|
-
const
|
|
2917
|
+
const filterItems3 = useMemo5(() => {
|
|
2845
2918
|
const checklistItems = items2.filter((i) => Object.keys(i).includes(headerResultName)).map(
|
|
2846
2919
|
(i) => ({
|
|
2847
2920
|
name: valueFormat ? valueFormat(i[headerResultName].value?.toString() ?? "") : toFixed !== void 0 && !Number.isNaN(parseFloat(i[headerResultName].value)) ? parseFloat(Number(i[headerResultName].value).toFixed(toFixed)) : i[headerResultName].value,
|
|
@@ -2941,21 +3014,21 @@ function HeaderDropdown(props) {
|
|
|
2941
3014
|
};
|
|
2942
3015
|
const hasAnyFilter = Object.keys(filterSelectedItems).length || sortBy.some((sb) => sb.columnName === headerResultName);
|
|
2943
3016
|
const { t } = useTranslation();
|
|
2944
|
-
return /* @__PURE__ */
|
|
2945
|
-
children2?.(showUniqueValuesCount && /* @__PURE__ */ jsx33("div", { children: `(${
|
|
3017
|
+
return /* @__PURE__ */ jsxs19("div", { className: classnames21(root18), children: [
|
|
3018
|
+
children2?.(showUniqueValuesCount && /* @__PURE__ */ jsx33("div", { children: `(${filterItems3.length})` })),
|
|
2946
3019
|
(sortable || filtrationByValue || filtrationByDate || filtrationByNumber) && /* @__PURE__ */ jsx33(
|
|
2947
3020
|
Popover,
|
|
2948
3021
|
{
|
|
2949
3022
|
placement: "bottom-end",
|
|
2950
3023
|
wrapTrigger: true,
|
|
2951
3024
|
root: containerRef,
|
|
2952
|
-
description: /* @__PURE__ */
|
|
3025
|
+
description: /* @__PURE__ */ jsxs19(Fragment7, { children: [
|
|
2953
3026
|
filtrationByNumber && /* @__PURE__ */ jsx33(NumberFiltration, { defaultValues: filterNumbers, actionWithSelected: actionWithSelectedNumbers }),
|
|
2954
3027
|
filtrationByDate && /* @__PURE__ */ jsx33(DateFiltration, { defaultValues: filterDates, actionWithSelected: actionWithSelectedDates }),
|
|
2955
3028
|
filtrationByValue && /* @__PURE__ */ jsx33("div", { className: classnames21(checklistWrap), children: /* @__PURE__ */ jsx33(
|
|
2956
3029
|
Checklist,
|
|
2957
3030
|
{
|
|
2958
|
-
items:
|
|
3031
|
+
items: filterItems3,
|
|
2959
3032
|
selected: filterSelectedItems,
|
|
2960
3033
|
actionWithSelected: actionWithSelectedObjects
|
|
2961
3034
|
}
|
|
@@ -3100,7 +3173,7 @@ var recursiveSort = (items2, sortBy) => {
|
|
|
3100
3173
|
};
|
|
3101
3174
|
|
|
3102
3175
|
// src/components/view/VirtualTable/VirtualTable.tsx
|
|
3103
|
-
import { Fragment as
|
|
3176
|
+
import { Fragment as Fragment9, jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3104
3177
|
function VirtualTable(props) {
|
|
3105
3178
|
const {
|
|
3106
3179
|
rows,
|
|
@@ -3123,8 +3196,8 @@ function VirtualTable(props) {
|
|
|
3123
3196
|
showUniqueValuesCount = false
|
|
3124
3197
|
// globalFilters,
|
|
3125
3198
|
} = props;
|
|
3126
|
-
const [filterBy, setFilterBy] =
|
|
3127
|
-
const [sortBy, setSortBy] =
|
|
3199
|
+
const [filterBy, setFilterBy] = useState16([]);
|
|
3200
|
+
const [sortBy, setSortBy] = useState16([{ columnName: "isNew", direction: "desc" }]);
|
|
3128
3201
|
const tableContainerRef = useRef11(null);
|
|
3129
3202
|
const memoizedColumns = useMemo6(() => getColumns(columns), [columns]);
|
|
3130
3203
|
const memoizedData = useMemo6(() => {
|
|
@@ -3271,8 +3344,8 @@ function VirtualTable(props) {
|
|
|
3271
3344
|
classes?.root
|
|
3272
3345
|
),
|
|
3273
3346
|
style: height ? { height } : void 0,
|
|
3274
|
-
children: /* @__PURE__ */
|
|
3275
|
-
/* @__PURE__ */
|
|
3347
|
+
children: /* @__PURE__ */ jsxs20("div", { ref: tableContainerRef, className: classnames22(tableContainer, "styledScroll"), children: [
|
|
3348
|
+
/* @__PURE__ */ jsxs20(
|
|
3276
3349
|
"div",
|
|
3277
3350
|
{
|
|
3278
3351
|
className: table,
|
|
@@ -3304,7 +3377,7 @@ function VirtualTable(props) {
|
|
|
3304
3377
|
headerName: header2.column.columnDef.id ?? header2.id,
|
|
3305
3378
|
containerRef: useTableContainerAsRootForPopup ? tableContainerRef : void 0,
|
|
3306
3379
|
showUniqueValuesCount,
|
|
3307
|
-
children: (afterNode) => /* @__PURE__ */
|
|
3380
|
+
children: (afterNode) => /* @__PURE__ */ jsxs20(
|
|
3308
3381
|
"div",
|
|
3309
3382
|
{
|
|
3310
3383
|
className: classnames22(
|
|
@@ -3329,7 +3402,7 @@ function VirtualTable(props) {
|
|
|
3329
3402
|
}
|
|
3330
3403
|
) });
|
|
3331
3404
|
};
|
|
3332
|
-
return /* @__PURE__ */
|
|
3405
|
+
return /* @__PURE__ */ jsxs20(Fragment8, { children: [
|
|
3333
3406
|
[...Array(fixedColumnsCount)].map((_, index) => {
|
|
3334
3407
|
const header2 = headerGroup.headers[index];
|
|
3335
3408
|
const nextHorizontalHeaders = getNextHorizontalHeaders(
|
|
@@ -3425,7 +3498,7 @@ function VirtualTable(props) {
|
|
|
3425
3498
|
),
|
|
3426
3499
|
virtualRows.map((virtualRow) => {
|
|
3427
3500
|
const row = rowsFromTable[virtualRow.index];
|
|
3428
|
-
return /* @__PURE__ */
|
|
3501
|
+
return /* @__PURE__ */ jsxs20(
|
|
3429
3502
|
"div",
|
|
3430
3503
|
{
|
|
3431
3504
|
"data-index": virtualRow.index,
|
|
@@ -3480,7 +3553,7 @@ function VirtualTable(props) {
|
|
|
3480
3553
|
overflow: "hidden"
|
|
3481
3554
|
}
|
|
3482
3555
|
},
|
|
3483
|
-
children: rowButtons?.(row.original)?.map((ab) => /* @__PURE__ */ jsx34(
|
|
3556
|
+
children: rowButtons?.(row.original)?.map((ab) => /* @__PURE__ */ jsx34(Fragment8, { children: ab.template ? ab.template(ab) : /* @__PURE__ */ jsx34(
|
|
3484
3557
|
Tooltip,
|
|
3485
3558
|
{
|
|
3486
3559
|
label: ab.title,
|
|
@@ -3509,7 +3582,7 @@ function VirtualTable(props) {
|
|
|
3509
3582
|
]
|
|
3510
3583
|
}
|
|
3511
3584
|
),
|
|
3512
|
-
borders !== "none" && /* @__PURE__ */
|
|
3585
|
+
borders !== "none" && /* @__PURE__ */ jsxs20(Fragment9, { children: [
|
|
3513
3586
|
/* @__PURE__ */ jsx34("div", { className: rightBorder, style: { height: `${rowsTotalSize + summaryHeaderHeight}px` } }),
|
|
3514
3587
|
/* @__PURE__ */ jsx34("div", { className: bottomBorder, style: { width: `${columnsTotalSize}px` } })
|
|
3515
3588
|
] })
|
|
@@ -3519,14 +3592,14 @@ function VirtualTable(props) {
|
|
|
3519
3592
|
}
|
|
3520
3593
|
|
|
3521
3594
|
// src/components/view/TreeView/TreeView.tsx
|
|
3522
|
-
import { memo as memo2, useCallback as useCallback8, useMemo as useMemo7, useState as
|
|
3595
|
+
import { memo as memo2, useCallback as useCallback8, useMemo as useMemo7, useState as useState18 } from "react";
|
|
3523
3596
|
|
|
3524
3597
|
// src/components/view/TreeView/treeView.module.css
|
|
3525
3598
|
var search = "treeView_search";
|
|
3526
3599
|
|
|
3527
3600
|
// src/components/view/TreeView/ui/TreeViewItem/TreeViewItem.tsx
|
|
3528
|
-
import
|
|
3529
|
-
import { memo, useEffect as useEffect9, useState as
|
|
3601
|
+
import classNames5 from "classnames";
|
|
3602
|
+
import { memo, useEffect as useEffect9, useState as useState17 } from "react";
|
|
3530
3603
|
|
|
3531
3604
|
// src/components/view/TreeView/ui/TreeViewItem/treeViewItem.module.css
|
|
3532
3605
|
var item2 = "treeViewItem_item";
|
|
@@ -3537,7 +3610,7 @@ var selected4 = "treeViewItem_selected";
|
|
|
3537
3610
|
var selectIcon = "treeViewItem_selectIcon";
|
|
3538
3611
|
|
|
3539
3612
|
// src/components/view/TreeView/ui/TreeViewItem/TreeViewItem.tsx
|
|
3540
|
-
import { jsx as jsx35, jsxs as
|
|
3613
|
+
import { jsx as jsx35, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3541
3614
|
var TreeViewItem_default = memo(function TreeViewItem({
|
|
3542
3615
|
title: title2,
|
|
3543
3616
|
value,
|
|
@@ -3549,7 +3622,7 @@ var TreeViewItem_default = memo(function TreeViewItem({
|
|
|
3549
3622
|
startIcons,
|
|
3550
3623
|
children: children2
|
|
3551
3624
|
}) {
|
|
3552
|
-
const [isOpen, setIsOpen] =
|
|
3625
|
+
const [isOpen, setIsOpen] = useState17(false);
|
|
3553
3626
|
useEffect9(() => {
|
|
3554
3627
|
setIsOpen(!!searchValue);
|
|
3555
3628
|
}, [searchValue]);
|
|
@@ -3563,10 +3636,10 @@ var TreeViewItem_default = memo(function TreeViewItem({
|
|
|
3563
3636
|
}
|
|
3564
3637
|
};
|
|
3565
3638
|
const isSelected = selected5[value];
|
|
3566
|
-
return /* @__PURE__ */
|
|
3567
|
-
/* @__PURE__ */
|
|
3639
|
+
return /* @__PURE__ */ jsxs21("div", { children: [
|
|
3640
|
+
/* @__PURE__ */ jsxs21("div", { className: classNames5(item2, { [selectable]: isSelectable }), onClick: handleClick, children: [
|
|
3568
3641
|
hasChildren && /* @__PURE__ */ jsx35(KeyboardArrowDownIcon, {}),
|
|
3569
|
-
/* @__PURE__ */
|
|
3642
|
+
/* @__PURE__ */ jsxs21("div", { className: classNames5(title, { [selected4]: isSelected }), children: [
|
|
3570
3643
|
startIcon,
|
|
3571
3644
|
/* @__PURE__ */ jsx35(Typography, { variant: "subtitle2", children: title2 }),
|
|
3572
3645
|
isSelectable && /* @__PURE__ */ jsx35("span", { className: selectIcon, children: isSelected ? /* @__PURE__ */ jsx35(DoneIcon, {}) : /* @__PURE__ */ jsx35(AddIcon, {}) })
|
|
@@ -3609,9 +3682,9 @@ var getFilteredTree = (tree, search2) => {
|
|
|
3609
3682
|
};
|
|
3610
3683
|
|
|
3611
3684
|
// src/components/view/TreeView/TreeView.tsx
|
|
3612
|
-
import { Fragment as
|
|
3685
|
+
import { Fragment as Fragment10, jsx as jsx36, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3613
3686
|
var TreeView_default = memo2(function TreeView({ data, selected: selected5, startIcons, onSelect, withSearch = false }) {
|
|
3614
|
-
const [searchValue, setSearchValue] =
|
|
3687
|
+
const [searchValue, setSearchValue] = useState18("");
|
|
3615
3688
|
const onChangeSearchValue = useCallback8((e) => setSearchValue(e.target.value), []);
|
|
3616
3689
|
const selectedValues = useMemo7(
|
|
3617
3690
|
() => selected5.reduce(
|
|
@@ -3626,7 +3699,7 @@ var TreeView_default = memo2(function TreeView({ data, selected: selected5, star
|
|
|
3626
3699
|
const filteredData = useMemo7(() => {
|
|
3627
3700
|
return getFilteredTree(data, searchValue);
|
|
3628
3701
|
}, [data, searchValue]);
|
|
3629
|
-
return /* @__PURE__ */
|
|
3702
|
+
return /* @__PURE__ */ jsxs22(Fragment10, { children: [
|
|
3630
3703
|
withSearch && /* @__PURE__ */ jsx36(
|
|
3631
3704
|
SearchInput,
|
|
3632
3705
|
{
|
|
@@ -3656,7 +3729,7 @@ var TreeView_default = memo2(function TreeView({ data, selected: selected5, star
|
|
|
3656
3729
|
});
|
|
3657
3730
|
|
|
3658
3731
|
// src/components/view/Pairs/Pairs.tsx
|
|
3659
|
-
import
|
|
3732
|
+
import classNames6 from "classnames";
|
|
3660
3733
|
|
|
3661
3734
|
// src/components/view/Pairs/pairs.module.css
|
|
3662
3735
|
var rowContainerBorders = "pairs_rowContainerBorders";
|
|
@@ -3667,11 +3740,11 @@ var valuesWithBorders = "pairs_valuesWithBorders";
|
|
|
3667
3740
|
var dimTypography = "pairs_dimTypography";
|
|
3668
3741
|
|
|
3669
3742
|
// src/components/view/Pairs/ui/TypographyWithTooltip.tsx
|
|
3670
|
-
import { useState as
|
|
3743
|
+
import { useState as useState19 } from "react";
|
|
3671
3744
|
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
3672
3745
|
function TypographyWithTooltip(props) {
|
|
3673
3746
|
const { label: label7 } = props;
|
|
3674
|
-
const [tooltip, setTooltip] =
|
|
3747
|
+
const [tooltip, setTooltip] = useState19(label7);
|
|
3675
3748
|
return /* @__PURE__ */ jsx37(Tooltip, { label: tooltip, children: /* @__PURE__ */ jsx37(
|
|
3676
3749
|
Typography,
|
|
3677
3750
|
{
|
|
@@ -3689,21 +3762,21 @@ function TypographyWithTooltip(props) {
|
|
|
3689
3762
|
}
|
|
3690
3763
|
|
|
3691
3764
|
// src/components/view/Pairs/Pairs.tsx
|
|
3692
|
-
import { Fragment as
|
|
3765
|
+
import { Fragment as Fragment11, jsx as jsx38, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3693
3766
|
function Pairs(props) {
|
|
3694
3767
|
const { pairs, column1Width = "50%", column2Width = "50%", showBorder, minRowHeight, classes } = props;
|
|
3695
|
-
return /* @__PURE__ */ jsx38("div", { className:
|
|
3768
|
+
return /* @__PURE__ */ jsx38("div", { className: classNames6(classes?.root), children: pairs.map((pair, i) => /* @__PURE__ */ jsx38(
|
|
3696
3769
|
"div",
|
|
3697
3770
|
{
|
|
3698
3771
|
style: { minHeight: minRowHeight, display: "flex" },
|
|
3699
|
-
className:
|
|
3772
|
+
className: classNames6(classes?.rowContainer, {
|
|
3700
3773
|
[rowContainerBorders]: showBorder
|
|
3701
3774
|
}),
|
|
3702
|
-
children: pair && /* @__PURE__ */
|
|
3775
|
+
children: pair && /* @__PURE__ */ jsxs23(Fragment11, { children: [
|
|
3703
3776
|
/* @__PURE__ */ jsx38(
|
|
3704
3777
|
"div",
|
|
3705
3778
|
{
|
|
3706
|
-
className:
|
|
3779
|
+
className: classNames6(labelsContainer, classes?.labelsContainer, {
|
|
3707
3780
|
[labelsWithBorders]: showBorder
|
|
3708
3781
|
}),
|
|
3709
3782
|
style: {
|
|
@@ -3720,7 +3793,7 @@ function Pairs(props) {
|
|
|
3720
3793
|
width: column2Width,
|
|
3721
3794
|
minWidth: column2Width
|
|
3722
3795
|
},
|
|
3723
|
-
className:
|
|
3796
|
+
className: classNames6(valuesContainer, classes?.valuesContainer, {
|
|
3724
3797
|
[valuesWithBorders]: showBorder
|
|
3725
3798
|
}),
|
|
3726
3799
|
children: /* @__PURE__ */ jsx38(TypographyWithTooltip, { label: pair.value })
|
|
@@ -3733,7 +3806,7 @@ function Pairs(props) {
|
|
|
3733
3806
|
}
|
|
3734
3807
|
|
|
3735
3808
|
// src/components/view/Card/Card.tsx
|
|
3736
|
-
import
|
|
3809
|
+
import classNames7 from "classnames";
|
|
3737
3810
|
|
|
3738
3811
|
// src/components/view/Card/card.module.css
|
|
3739
3812
|
var root21 = "card_root";
|
|
@@ -3741,15 +3814,15 @@ var header = "card_header";
|
|
|
3741
3814
|
var actions = "card_actions";
|
|
3742
3815
|
|
|
3743
3816
|
// src/components/view/Card/Card.tsx
|
|
3744
|
-
import { jsx as jsx39, jsxs as
|
|
3817
|
+
import { jsx as jsx39, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3745
3818
|
function Card(props) {
|
|
3746
3819
|
const { surfaceType = "primary", title: title2, actions: actions2, children: children2, classes } = props;
|
|
3747
|
-
return /* @__PURE__ */
|
|
3748
|
-
(!!title2 || !!actions2) && /* @__PURE__ */
|
|
3820
|
+
return /* @__PURE__ */ jsxs24(Surface, { type: surfaceType, classes: { root: classNames7(root21, classes?.root) }, children: [
|
|
3821
|
+
(!!title2 || !!actions2) && /* @__PURE__ */ jsxs24("div", { className: header, children: [
|
|
3749
3822
|
title2 ?? /* @__PURE__ */ jsx39("div", {}),
|
|
3750
|
-
!!actions2 && /* @__PURE__ */ jsx39("div", { className:
|
|
3823
|
+
!!actions2 && /* @__PURE__ */ jsx39("div", { className: classNames7(actions, classes?.actions), children: actions2 })
|
|
3751
3824
|
] }),
|
|
3752
|
-
/* @__PURE__ */ jsx39("div", { className:
|
|
3825
|
+
/* @__PURE__ */ jsx39("div", { className: classNames7(classes?.body), children: children2 })
|
|
3753
3826
|
] });
|
|
3754
3827
|
}
|
|
3755
3828
|
export {
|