@salutejs/plasma-new-hope 0.317.0-dev.0 → 0.318.0-canary.1888.14216501427.0
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/cjs/components/Table/Table.css +24 -22
- package/cjs/components/Table/Table.js +11 -16
- package/cjs/components/Table/Table.js.map +1 -1
- package/cjs/components/Table/Table.styles.js +17 -11
- package/cjs/components/Table/Table.styles.js.map +1 -1
- package/cjs/components/Table/Table.styles_xngwgy.css +12 -0
- package/cjs/components/Table/Table.tokens.js +9 -0
- package/cjs/components/Table/Table.tokens.js.map +1 -1
- package/cjs/components/Table/ui/Cell/Cell.css +24 -22
- package/cjs/components/Table/ui/Cell/Cell.js.map +1 -1
- package/cjs/components/Table/ui/Cell/Cell.styles.js +1 -1
- package/cjs/components/Table/ui/Cell/Cell.styles.js.map +1 -1
- package/cjs/components/Table/ui/Cell/Cell.styles_1q2mjxm.css +1 -0
- package/cjs/components/Table/ui/EditableCell/EditableCell.css +25 -23
- package/cjs/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/cjs/components/Table/ui/EditableCell/EditableCell.js.map +1 -1
- package/cjs/components/Table/ui/EditableCell/EditableCell.styles.js +5 -5
- package/cjs/components/Table/ui/EditableCell/EditableCell.styles.js.map +1 -1
- package/{es/components/Table/ui/EditableCell/EditableCell.styles_277bjm.css → cjs/components/Table/ui/EditableCell/EditableCell.styles_1g3clv2.css} +3 -3
- package/cjs/components/Table/ui/HeadCell/HeadCell.css +24 -22
- package/cjs/components/Table/ui/HeadCell/HeadCell.js +9 -9
- package/cjs/components/Table/ui/HeadCell/HeadCell.js.map +1 -1
- package/cjs/components/Table/ui/HeadCell/HeadCell.styles.js +7 -1
- package/cjs/components/Table/ui/HeadCell/HeadCell.styles.js.map +1 -1
- package/{es/components/Table/ui/HeadCell/HeadCell.styles_1lo3lcf.css → cjs/components/Table/ui/HeadCell/HeadCell.styles_155gsrn.css} +1 -0
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.css +24 -22
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.js.map +1 -1
- package/cjs/index.css +26 -24
- package/emotion/cjs/components/Table/Table.js +14 -16
- package/emotion/cjs/components/Table/Table.styles.js +20 -16
- package/emotion/cjs/components/Table/Table.tokens.js +9 -1
- package/emotion/cjs/components/Table/ui/Cell/Cell.styles.js +2 -2
- package/emotion/cjs/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/emotion/cjs/components/Table/ui/EditableCell/EditableCell.styles.js +9 -9
- package/emotion/cjs/components/Table/ui/HeadCell/HeadCell.js +9 -9
- package/emotion/cjs/components/Table/ui/HeadCell/HeadCell.styles.js +17 -5
- package/emotion/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/emotion/cjs/examples/plasma_b2c/components/Table/Table.stories.tsx +7 -6
- package/emotion/cjs/examples/plasma_web/components/Table/Table.stories.tsx +7 -6
- package/emotion/es/components/Table/Table.js +15 -17
- package/emotion/es/components/Table/Table.styles.js +19 -15
- package/emotion/es/components/Table/Table.tokens.js +8 -0
- package/emotion/es/components/Table/ui/Cell/Cell.styles.js +2 -2
- package/emotion/es/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/emotion/es/components/Table/ui/EditableCell/EditableCell.styles.js +10 -10
- package/emotion/es/components/Table/ui/HeadCell/HeadCell.js +10 -10
- package/emotion/es/components/Table/ui/HeadCell/HeadCell.styles.js +16 -4
- package/emotion/es/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/emotion/es/examples/plasma_b2c/components/Table/Table.stories.tsx +7 -6
- package/emotion/es/examples/plasma_web/components/Table/Table.stories.tsx +7 -6
- package/es/components/Table/Table.css +24 -22
- package/es/components/Table/Table.js +13 -18
- package/es/components/Table/Table.js.map +1 -1
- package/es/components/Table/Table.styles.js +17 -12
- package/es/components/Table/Table.styles.js.map +1 -1
- package/es/components/Table/Table.styles_xngwgy.css +12 -0
- package/es/components/Table/Table.tokens.js +9 -1
- package/es/components/Table/Table.tokens.js.map +1 -1
- package/es/components/Table/ui/Cell/Cell.css +24 -22
- package/es/components/Table/ui/Cell/Cell.js.map +1 -1
- package/es/components/Table/ui/Cell/Cell.styles.js +1 -1
- package/es/components/Table/ui/Cell/Cell.styles.js.map +1 -1
- package/es/components/Table/ui/Cell/Cell.styles_1q2mjxm.css +1 -0
- package/es/components/Table/ui/EditableCell/EditableCell.css +25 -23
- package/es/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/es/components/Table/ui/EditableCell/EditableCell.js.map +1 -1
- package/es/components/Table/ui/EditableCell/EditableCell.styles.js +5 -5
- package/es/components/Table/ui/EditableCell/EditableCell.styles.js.map +1 -1
- package/{cjs/components/Table/ui/EditableCell/EditableCell.styles_277bjm.css → es/components/Table/ui/EditableCell/EditableCell.styles_1g3clv2.css} +3 -3
- package/es/components/Table/ui/HeadCell/HeadCell.css +24 -22
- package/es/components/Table/ui/HeadCell/HeadCell.js +10 -10
- package/es/components/Table/ui/HeadCell/HeadCell.js.map +1 -1
- package/es/components/Table/ui/HeadCell/HeadCell.styles.js +7 -2
- package/es/components/Table/ui/HeadCell/HeadCell.styles.js.map +1 -1
- package/{cjs/components/Table/ui/HeadCell/HeadCell.styles_1lo3lcf.css → es/components/Table/ui/HeadCell/HeadCell.styles_155gsrn.css} +1 -0
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.css +24 -22
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/es/components/Table/ui/HeadCell/ui/Filter/Filter.js.map +1 -1
- package/es/index.css +26 -24
- package/package.json +2 -2
- package/styled-components/cjs/components/Table/Table.js +14 -16
- package/styled-components/cjs/components/Table/Table.styles.js +13 -10
- package/styled-components/cjs/components/Table/Table.tokens.js +9 -1
- package/styled-components/cjs/components/Table/ui/Cell/Cell.styles.js +1 -1
- package/styled-components/cjs/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/styled-components/cjs/components/Table/ui/EditableCell/EditableCell.styles.js +4 -4
- package/styled-components/cjs/components/Table/ui/HeadCell/HeadCell.js +9 -9
- package/styled-components/cjs/components/Table/ui/HeadCell/HeadCell.styles.js +5 -2
- package/styled-components/cjs/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Table/Table.stories.tsx +7 -6
- package/styled-components/cjs/examples/plasma_web/components/Table/Table.stories.tsx +7 -6
- package/styled-components/es/components/Table/Table.js +15 -17
- package/styled-components/es/components/Table/Table.styles.js +12 -9
- package/styled-components/es/components/Table/Table.tokens.js +8 -0
- package/styled-components/es/components/Table/ui/Cell/Cell.styles.js +1 -1
- package/styled-components/es/components/Table/ui/EditableCell/EditableCell.js +15 -9
- package/styled-components/es/components/Table/ui/EditableCell/EditableCell.styles.js +5 -5
- package/styled-components/es/components/Table/ui/HeadCell/HeadCell.js +10 -10
- package/styled-components/es/components/Table/ui/HeadCell/HeadCell.styles.js +4 -1
- package/styled-components/es/components/Table/ui/HeadCell/ui/Filter/Filter.js +3 -1
- package/styled-components/es/examples/plasma_b2c/components/Table/Table.stories.tsx +7 -6
- package/styled-components/es/examples/plasma_web/components/Table/Table.stories.tsx +7 -6
- package/types/components/Table/Table.d.ts +2 -15
- package/types/components/Table/Table.d.ts.map +1 -1
- package/types/components/Table/Table.styles.d.ts +1 -0
- package/types/components/Table/Table.styles.d.ts.map +1 -1
- package/types/components/Table/Table.tokens.d.ts +8 -0
- package/types/components/Table/Table.tokens.d.ts.map +1 -1
- package/types/components/Table/Table.types.d.ts +11 -1
- package/types/components/Table/Table.types.d.ts.map +1 -1
- package/types/components/Table/ui/Cell/Cell.d.ts +3 -2
- package/types/components/Table/ui/Cell/Cell.d.ts.map +1 -1
- package/types/components/Table/ui/EditableCell/EditableCell.d.ts +12 -1
- package/types/components/Table/ui/EditableCell/EditableCell.d.ts.map +1 -1
- package/types/components/Table/ui/EditableCell/EditableCell.styles.d.ts.map +1 -1
- package/types/components/Table/ui/HeadCell/HeadCell.d.ts +11 -1
- package/types/components/Table/ui/HeadCell/HeadCell.d.ts.map +1 -1
- package/types/components/Table/ui/HeadCell/HeadCell.styles.d.ts +1 -0
- package/types/components/Table/ui/HeadCell/HeadCell.styles.d.ts.map +1 -1
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.d.ts +10 -1
- package/types/components/Table/ui/HeadCell/ui/Filter/Filter.d.ts.map +1 -1
- package/cjs/components/Table/Table.styles_1eg2zsx.css +0 -11
- package/cjs/components/Table/ui/Cell/Cell.styles_1ikyrwt.css +0 -1
- package/es/components/Table/Table.styles_1eg2zsx.css +0 -11
- package/es/components/Table/ui/Cell/Cell.styles_1ikyrwt.css +0 -1
@@ -6,6 +6,7 @@ var reactTable = require('@tanstack/react-table');
|
|
6
6
|
var React = require('react');
|
7
7
|
var Table_styles = require('../../Table.styles.js');
|
8
8
|
var Table = require('../../Table.js');
|
9
|
+
var Table_tokens = require('../../Table.tokens.js');
|
9
10
|
var HeadCell_styles = require('./HeadCell.styles.js');
|
10
11
|
var Filter = require('./ui/Filter/Filter.js');
|
11
12
|
var IconArrowUp = require('../../../_Icon/Icons/IconArrowUp.js');
|
@@ -41,23 +42,22 @@ var HeadCell = function HeadCell(_ref) {
|
|
41
42
|
size: size,
|
42
43
|
outerFiltered: outerFiltered,
|
43
44
|
tableContainerRef: tableContainerRef
|
44
|
-
}), header.column.getCanSort() && /*#__PURE__*/React__default.default.createElement(
|
45
|
-
style: {
|
46
|
-
lineHeight: 0,
|
47
|
-
cursor: 'pointer',
|
48
|
-
userSelect: 'none'
|
49
|
-
},
|
45
|
+
}), header.column.getCanSort() && /*#__PURE__*/React__default.default.createElement(HeadCell_styles.IconWrapper, {
|
50
46
|
onClick: header.column.getToggleSortingHandler()
|
51
47
|
}, (_asc$desc = {
|
52
48
|
asc: /*#__PURE__*/React__default.default.createElement(IconArrowUp.IconArrowUp, {
|
53
|
-
size: getIconSize(size)
|
49
|
+
size: getIconSize(size),
|
50
|
+
className: Table_tokens.classes.sortingAscIcon
|
54
51
|
}),
|
55
52
|
desc: /*#__PURE__*/React__default.default.createElement(IconArrowDown.IconArrowDown, {
|
56
|
-
size: getIconSize(size)
|
53
|
+
size: getIconSize(size),
|
54
|
+
className: Table_tokens.classes.sortingDescIcon
|
57
55
|
})
|
58
56
|
}[header.column.getIsSorted()]) !== null && _asc$desc !== void 0 ? _asc$desc : /*#__PURE__*/React__default.default.createElement(IconSwapVert.IconSwapVert, {
|
59
|
-
size: getIconSize(size)
|
57
|
+
size: getIconSize(size),
|
58
|
+
className: Table_tokens.classes.sortingDefaultIcon
|
60
59
|
}))))), header.column.getCanResize() && /*#__PURE__*/React__default.default.createElement(Table_styles.Resizer, {
|
60
|
+
className: Table_tokens.classes.resizeDivider,
|
61
61
|
onMouseDown: header.getResizeHandler(),
|
62
62
|
onTouchStart: header.getResizeHandler(),
|
63
63
|
isResizing: header.column.getIsResizing()
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HeadCell.js","sources":["../../../../../src/components/Table/ui/HeadCell/HeadCell.tsx"],"sourcesContent":["import { flexRender } from '@tanstack/react-table';\nimport React from 'react';\n\nimport { Th, Resizer } from '../../Table.styles';\nimport { IconSwapVert, IconArrowDown, IconArrowUp } from '../../../_Icon';\nimport { SELECT_COLUMN_ID } from '../../Table';\n\nimport { ControlButtons, ThWrapper } from './HeadCell.styles';\nimport { Filter } from './ui/Filter/Filter';\n\nexport const getIconSize = (size?: string) => {\n return size === 's' ? 'xs' : 's';\n};\n\nexport const HeadCell: React.FC<
|
1
|
+
{"version":3,"file":"HeadCell.js","sources":["../../../../../src/components/Table/ui/HeadCell/HeadCell.tsx"],"sourcesContent":["import { flexRender, Header } from '@tanstack/react-table';\nimport React from 'react';\n\nimport { Th, Resizer } from '../../Table.styles';\nimport { IconSwapVert, IconArrowDown, IconArrowUp } from '../../../_Icon';\nimport { SELECT_COLUMN_ID } from '../../Table';\nimport { TableProps, TableRowData } from '../../Table.types';\nimport { classes } from '../../Table.tokens';\n\nimport { ControlButtons, ThWrapper, IconWrapper } from './HeadCell.styles';\nimport { Filter } from './ui/Filter/Filter';\n\nexport const getIconSize = (size?: string) => {\n return size === 's' ? 'xs' : 's';\n};\n\ntype Props = {\n borderVariant: TableProps['borderVariant'];\n size: TableProps['size'];\n header: Header<TableRowData, unknown>;\n outerFiltered: TableProps['filtered'];\n tableContainerRef: React.RefObject<HTMLDivElement>;\n};\n\nexport const HeadCell: React.FC<Props> = ({ header, size, borderVariant, outerFiltered, tableContainerRef }) => {\n const { filters } = header?.column?.columnDef?.meta || {};\n\n return (\n <Th\n key={header.id}\n colSpan={header.colSpan}\n borderVariant={borderVariant}\n selectionCell={header.column.id === SELECT_COLUMN_ID}\n style={header.column.id !== SELECT_COLUMN_ID ? { width: header.getSize() } : undefined}\n >\n {header.isPlaceholder ? null : (\n <>\n <ThWrapper>\n {flexRender(header.column.columnDef.header, header.getContext())}\n\n {header.column.id !== SELECT_COLUMN_ID && (\n <ControlButtons>\n {filters && (\n <Filter\n header={header}\n size={size}\n outerFiltered={outerFiltered}\n tableContainerRef={tableContainerRef}\n />\n )}\n\n {header.column.getCanSort() && (\n <IconWrapper onClick={header.column.getToggleSortingHandler()}>\n {{\n asc: (\n <IconArrowUp\n size={getIconSize(size)}\n className={classes.sortingAscIcon}\n />\n ),\n desc: (\n <IconArrowDown\n size={getIconSize(size)}\n className={classes.sortingDescIcon}\n />\n ),\n }[header.column.getIsSorted() as string] ?? (\n <IconSwapVert\n size={getIconSize(size)}\n className={classes.sortingDefaultIcon}\n />\n )}\n </IconWrapper>\n )}\n </ControlButtons>\n )}\n </ThWrapper>\n </>\n )}\n {header.column.getCanResize() && (\n <Resizer\n className={classes.resizeDivider}\n onMouseDown={header.getResizeHandler()}\n onTouchStart={header.getResizeHandler()}\n isResizing={header.column.getIsResizing()}\n />\n )}\n </Th>\n );\n};\n"],"names":["getIconSize","size","HeadCell","_ref","_header$column","_asc$desc","header","borderVariant","outerFiltered","tableContainerRef","_ref2","column","columnDef","meta","filters","React","createElement","Th","key","id","colSpan","selectionCell","SELECT_COLUMN_ID","style","width","getSize","undefined","isPlaceholder","Fragment","ThWrapper","flexRender","getContext","ControlButtons","Filter","getCanSort","IconWrapper","onClick","getToggleSortingHandler","asc","IconArrowUp","className","classes","sortingAscIcon","desc","IconArrowDown","sortingDescIcon","getIsSorted","IconSwapVert","sortingDefaultIcon","getCanResize","Resizer","resizeDivider","onMouseDown","getResizeHandler","onTouchStart","isResizing","getIsResizing"],"mappings":";;;;;;;;;;;;;;;;;;;IAYaA,WAAW,GAAG,SAAdA,WAAWA,CAAIC,IAAa,EAAK;AAC1C,EAAA,OAAOA,IAAI,KAAK,GAAG,GAAG,IAAI,GAAG,GAAG,CAAA;AACpC,EAAC;IAUYC,QAAyB,GAAG,SAA5BA,QAAyBA,CAAAC,IAAA,EAA0E;EAAA,IAAAC,cAAA,EAAAC,SAAA,CAAA;AAAA,EAAA,IAApEC,MAAM,GAAAH,IAAA,CAANG,MAAM;IAAEL,IAAI,GAAAE,IAAA,CAAJF,IAAI;IAAEM,aAAa,GAAAJ,IAAA,CAAbI,aAAa;IAAEC,aAAa,GAAAL,IAAA,CAAbK,aAAa;IAAEC,iBAAiB,GAAAN,IAAA,CAAjBM,iBAAiB,CAAA;AACrG,EAAA,IAAAC,KAAA,GAAoB,CAAAJ,MAAM,KAANA,IAAAA,IAAAA,MAAM,KAAAF,KAAAA,CAAAA,IAAAA,CAAAA,cAAA,GAANE,MAAM,CAAEK,MAAM,MAAAP,IAAAA,IAAAA,cAAA,KAAAA,KAAAA,CAAAA,IAAAA,CAAAA,cAAA,GAAdA,cAAA,CAAgBQ,SAAS,MAAAR,IAAAA,IAAAA,cAAA,KAAzBA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,cAAA,CAA2BS,IAAI,KAAI,EAAE;IAAjDC,OAAO,GAAAJ,KAAA,CAAPI,OAAO,CAA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AC,aAAA,CAACuB,uBAAW,EAAA;AACRtC,MAAAA,IAAI,EAAED,WAAW,CAACC,IAAI,CAAE;MACxBuC,SAAS,EAAEC,oBAAO,CAACC,cAAAA;AAAe,KACrC,CACJ;AACDC,IAAAA,IAAI,eACA5B,sBAAA,CAAAC,aAAA,CAAC4B,2BAAa,EAAA;AACV3C,MAAAA,IAAI,EAAED,WAAW,CAACC,IAAI,CAAE;MACxBuC,SAAS,EAAEC,oBAAO,CAACI,eAAAA;KACtB,CAAA;AAET,GAAC,CAACvC,MAAM,CAACK,MAAM,CAACmC,WAAW,EAAE,CAAW,MAAAzC,IAAAA,IAAAA,SAAA,cAAAA,SAAA,gBACpCU,sBAAA,CAAAC,aAAA,CAAC+B,yBAAY,EAAA;AACT9C,IAAAA,IAAI,EAAED,WAAW,CAACC,IAAI,CAAE;IACxBuC,SAAS,EAAEC,oBAAO,CAACO,kBAAAA;AAAmB,GACzC,CAEI,CAEL,CAEb,CACb,CACL,EACA1C,MAAM,CAACK,MAAM,CAACsC,YAAY,EAAE,iBACzBlC,sBAAA,CAAAC,aAAA,CAACkC,oBAAO,EAAA;IACJV,SAAS,EAAEC,oBAAO,CAACU,aAAc;AACjCC,IAAAA,WAAW,EAAE9C,MAAM,CAAC+C,gBAAgB,EAAG;AACvCC,IAAAA,YAAY,EAAEhD,MAAM,CAAC+C,gBAAgB,EAAG;AACxCE,IAAAA,UAAU,EAAEjD,MAAM,CAACK,MAAM,CAAC6C,aAAa,EAAC;AAAE,GAC7C,CAEL,CAAC,CAAA;AAEb;;;;;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require('./HeadCell.
|
1
|
+
require('./HeadCell.styles_155gsrn.css');
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
Object.defineProperty(exports, '__esModule', { value: true });
|
@@ -15,7 +15,13 @@ var ThWrapper = /*#__PURE__*/react.styled('div')({
|
|
15
15
|
"class": "t1179z8p",
|
16
16
|
propsAsIs: false
|
17
17
|
});
|
18
|
+
var IconWrapper = /*#__PURE__*/react.styled('div')({
|
19
|
+
name: "IconWrapper",
|
20
|
+
"class": "iy1msq1",
|
21
|
+
propsAsIs: false
|
22
|
+
});
|
18
23
|
|
19
24
|
exports.ControlButtons = ControlButtons;
|
25
|
+
exports.IconWrapper = IconWrapper;
|
20
26
|
exports.ThWrapper = ThWrapper;
|
21
27
|
//# sourceMappingURL=HeadCell.styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"HeadCell.styles.js","sources":["../../../../../src/components/Table/ui/HeadCell/HeadCell.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nexport const ControlButtons = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n`;\n\nexport const ThWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n`;\n"],"names":["ControlButtons","styled","name","class","propsAsIs","ThWrapper"],"mappings":";;;;;;AAEO,IAAMA,cAAc,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKnC,EAAA;AAEM,IAAMC,SAAS,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK9B
|
1
|
+
{"version":3,"file":"HeadCell.styles.js","sources":["../../../../../src/components/Table/ui/HeadCell/HeadCell.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nexport const ControlButtons = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n`;\n\nexport const ThWrapper = styled.div`\n display: flex;\n justify-content: space-between;\n align-items: center;\n gap: 0.5rem;\n`;\n\nexport const IconWrapper = styled.div`\n line-height: 0;\n cursor: pointer;\n user-select: none;\n`;\n"],"names":["ControlButtons","styled","name","class","propsAsIs","ThWrapper","IconWrapper"],"mappings":";;;;;;AAEO,IAAMA,cAAc,gBAAGC,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,gBAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAKnC,EAAA;AAEM,IAAMC,SAAS,gBAAGJ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,WAAA;AAAAC,EAAAA,OAAAA,EAAA,UAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAK9B,EAAA;AAEM,IAAME,WAAW,gBAAGL,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,aAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAIhC;;;;;;"}
|
@@ -1,2 +1,3 @@
|
|
1
1
|
.c14eoxb5{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
2
2
|
.t1179z8p{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
3
|
+
.iy1msq1{line-height:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
@@ -2,19 +2,20 @@
|
|
2
2
|
|
3
3
|
.IconButton_styles_403on7_b1ua728l__d34a8ea7{position:relative;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);--plasma_private-btn-br:var(--plasma_computed-btn-br);border-radius:var(--plasma_private-btn-br);color:var(--plasma-button-color);background:var(--plasma-button-background-color);height:var(--plasma-button-height);width:var(--plasma-button-width);padding:0 var(--plasma-button-padding,calc(var(--plasma-button-height) * 1.618 / 4));font-family:var(--plasma-button-font-family);font-size:var(--plasma-button-font-size);font-style:var(--plasma-button-font-style);font-weight:var(--plasma-button-font-weight);-webkit-letter-spacing:var(--plasma-button-letter-spacing);-moz-letter-spacing:var(--plasma-button-letter-spacing);-ms-letter-spacing:var(--plasma-button-letter-spacing);letter-spacing:var(--plasma-button-letter-spacing);line-height:var(--plasma-button-line-height);--plasma_private-btn-outline-size:var(--plasma-button-outline-size,0.0625rem);position:relative;--plasma-button-padding:0;--plasma-button-color:var(--plasma-icon-button-color);--plasma-button-background-color:var(--plasma-icon-button-background-color);--plasma-button-color-hover:var(--plasma-icon-button-color-hover);--plasma-button-background-color-hover:var(--plasma-icon-button-background-color-hover);--plasma-button-color-active:var(--plasma-icon-button-color-active);--plasma-button-background-color-active:var(--plasma-icon-button-background-color-active);--plasma-button-loading-background-color:var(--plasma-icon-button-loading-background-color);--plasma-button-font-family:var(--plasma-icon-button-font-family);--plasma-button-font-size:var(--plasma-icon-button-font-size);--plasma-button-font-style:var(--plasma-icon-button-font-style);--plasma-button-font-weight:var(--plasma-icon-button-font-weight);--plasma-button-letter-spacing:var(--plasma-icon-button-letter-spacing);--plasma-button-line-height:var(--plasma-icon-button-line-height);--plasma-button-width:var(--plasma-icon-button-width);--plasma-button-height:var(--plasma-icon-button-height);--plasma-button-radius:var(--plasma-icon-button-radius);--plasma-button-disabled-opacity:var(--plasma-icon-button-disabled-opacity);--plasma-button-focus-color:var(--plasma-icon-button-focus-color);--plasma-button-spinner-size:var(--plasma-icon-button-spinner-size);--plasma-button-spinner-color:var(--plasma-icon-button-spinner-color);}a.IconButton_styles_403on7_b1ua728l__d34a8ea7{-webkit-text-decoration:none;text-decoration:none;}.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_buttonSquare__d34a8ea7{width:var(--plasma-button-height);padding:0;}.IconButton_styles_403on7_b1ua728l__d34a8ea7:hover{color:var(--plasma-button-color-hover,var(--plasma-button-color));background:var(--plasma-button-background-color-hover,var(--plasma-button-background-color));scale:var(--plasma-button-scale-hover);}.IconButton_styles_403on7_b1ua728l__d34a8ea7:active{color:var(--plasma-button-color-active,var(--plasma-button-color));background:var(--plasma-button-background-color-active,var(--plasma-button-background-color));scale:var(---plasma-button-scale-active);}.IconButton_styles_403on7_b1ua728l__d34a8ea7:focus{outline:none;}.IconButton_styles_403on7_b1ua728l__d34a8ea7::before{content:'';position:absolute;top:-0.125rem;left:-0.125rem;right:-0.125rem;bottom:-0.125rem;z-index:1;display:block;box-sizing:content-box;border:var(--plasma_private-btn-outline-size) solid transparent;border-radius:calc(0.125rem + var(--plasma_private-btn-br));-webkit-transition:box-shadow 0.2s ease-in-out;transition:box-shadow 0.2s ease-in-out;pointer-events:none;}.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_focusVisible__d34a8ea7:focus::before,.IconButton_styles_403on7_b1ua728l__d34a8ea7[data-focus-visible-added]::before{outline:none;box-shadow:0 0 0 var(--plasma_private-btn-outline-size) var(--plasma-button-focus-color);}.IconButton_styles_403on7_b1ua728l__d34a8ea7[disabled]{opacity:var(--plasma-button-disabled-opacity);cursor:not-allowed;}.IconButton_styles_403on7_b1ua728l__d34a8ea7[disabled]:hover,.IconButton_styles_403on7_b1ua728l__d34a8ea7[disabled]:active{scale:none;color:var(--plasma-button-color);background:var(--plasma-button-background-color);}.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_buttonStretchingFixed__d34a8ea7{width:var(--plasma-button-width);}.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_buttonStretchingFilled__d34a8ea7{width:100%;}.IconButton_styles_403on7_b1ua728l__d34a8ea7.IconButton_styles_403on7_buttonStretchingAuto__d34a8ea7{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}
|
4
4
|
|
5
|
-
.
|
6
|
-
.
|
7
|
-
.
|
8
|
-
.
|
9
|
-
.
|
10
|
-
.
|
11
|
-
.
|
12
|
-
.
|
5
|
+
.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b{position:relative;padding:var(--t12w3lu5-0);height:var(--plasma-table-row-height);border-width:0.0625rem;border-top-width:0;border-style:solid;border-color:var(--t12w3lu5-1);border-bottom-color:var(--t12w3lu5-2);cursor:pointer;box-sizing:border-box;}.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b .EditableCell_styles_1g3clv2_editIcon__5329cb3b{opacity:0;}.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b:hover .EditableCell_styles_1g3clv2_editIcon__5329cb3b{opacity:1;}
|
6
|
+
.EditableCell_styles_1g3clv2_idy8fgn__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:100%;}
|
7
|
+
.EditableCell_styles_1g3clv2_cwrhll2__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.25rem;}
|
8
|
+
.EditableCell_styles_1g3clv2_e1dkea5v__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;gap:var(--plasma-table-editable-cell-padding);height:100%;}
|
9
|
+
.EditableCell_styles_1g3clv2_i1uj28nu__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;padding:var(--plasma-table-editable-cell-input-padding);background:var(--plasma-table-editable-cell-input-background);border:0.0625rem solid var(--plasma-table-editable-cell-input-border-color);border-radius:var(--plasma-table-editable-cell-input-border-radius);box-sizing:border-box;gap:var(--plasma-table-editable-cell-icon-gap);}
|
10
|
+
.EditableCell_styles_1g3clv2_i1c7bo0z__5329cb3b{width:auto;border:none;padding:0;background:transparent;outline:none;caret-color:var(--text-accent);color:var(--text-primary);font-family:var(--plasma-table-font-family);font-size:var(--plasma-table-font-size);font-style:var(--plasma-table-font-style);font-weight:var(--plasma-table-font-weight);-webkit-letter-spacing:var(--plasma-table-letter-spacing);-moz-letter-spacing:var(--plasma-table-letter-spacing);-ms-letter-spacing:var(--plasma-table-letter-spacing);letter-spacing:var(--plasma-table-letter-spacing);line-height:var(--plasma-table-line-height);}
|
11
|
+
.EditableCell_styles_1g3clv2_i1jx30pt__5329cb3b{--plasma-icon-button-width:var(--plasma-table-editable-cell-icon-button-width);--plasma-icon-button-height:var(--plasma-table-editable-cell-icon-button-height);}
|
12
|
+
.EditableCell_styles_1g3clv2_i17hwnh4__5329cb3b{--plasma-icon-button-width:auto;--plasma-icon-button-height:auto;}
|
13
13
|
|
14
|
-
.
|
14
|
+
.Cell_styles_1q2mjxm_tv72tnk__e6a383c5{position:relative;padding:var(--tv72tnk-0);height:var(--plasma-table-row-height);border-width:0.0625rem;border-top-width:0;border-style:solid;border-color:var(--tv72tnk-1);border-bottom-color:var(--tv72tnk-2);box-sizing:border-box;}
|
15
15
|
|
16
|
-
.
|
17
|
-
.
|
16
|
+
.HeadCell_styles_155gsrn_c14eoxb5__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
17
|
+
.HeadCell_styles_155gsrn_t1179z8p__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
18
|
+
.HeadCell_styles_155gsrn_iy1msq1__5c959fae{line-height:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
18
19
|
|
19
20
|
.base_1xk2qu8_b17hdes8__122b4c2e input[type='checkbox']:indeterminate + .base_1xk2qu8_shwv1in__122b4c2e .base_1xk2qu8_s1u3nd7e__122b4c2e{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}.base_1xk2qu8_b17hdes8__122b4c2e input:checked + .base_1xk2qu8_shwv1in__122b4c2e .base_1xk2qu8_s1u3nd7e__122b4c2e{border:none;background:var(--plasma-checkbox-fill-color);border-color:var(--plasma-checkbox-fill-color);}
|
20
21
|
|
@@ -77,17 +78,18 @@
|
|
77
78
|
.LinkButton_styles_1kw1zkj_s1uogc3z__846f988c{line-height:0;margin:var(--plasma-link-button-left-content-margin);}
|
78
79
|
.LinkButton_styles_1kw1zkj_s176p3a0__846f988c{line-height:0;margin:var(--plasma-link-button-right-content-margin);}
|
79
80
|
|
80
|
-
.
|
81
|
-
.
|
82
|
-
.
|
83
|
-
.
|
84
|
-
|
85
|
-
.
|
86
|
-
.
|
87
|
-
.
|
88
|
-
.
|
89
|
-
.
|
90
|
-
.
|
81
|
+
.Table_styles_xngwgy_b1lxisuf__5cfbdc68{display:inline-block;overflow-y:auto;}
|
82
|
+
.Table_styles_xngwgy_t15d4jbz__5cfbdc68{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;font-family:var(--plasma-table-font-family);font-size:var(--plasma-table-font-size);font-style:var(--plasma-table-font-style);font-weight:var(--plasma-table-font-weight);-webkit-letter-spacing:var(--plasma-table-letter-spacing);-moz-letter-spacing:var(--plasma-table-letter-spacing);-ms-letter-spacing:var(--plasma-table-letter-spacing);letter-spacing:var(--plasma-table-letter-spacing);line-height:var(--plasma-table-line-height);border-collapse:collapse;border-width:0;border-style:solid;border-color:var(--t15d4jbz-0);}
|
83
|
+
.Table_styles_xngwgy_t1ri3no5__5cfbdc68{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background-color:var(--t1ri3no5-0);}
|
84
|
+
.Table_styles_xngwgy_t1uk535o__5cfbdc68{position:var(--t1uk535o-0);top:0;background:var(--t1uk535o-1);z-index:1;box-shadow:var(--t1uk535o-2);}.Table_styles_xngwgy_t1uk535o__5cfbdc68 .Table_styles_xngwgy_t1ri3no5__5cfbdc68{background:transparent;}
|
85
|
+
|
86
|
+
.Table_styles_xngwgy_r18b5m0z__5cfbdc68{display:var(--r18b5m0z-0);position:absolute;z-index:1;top:-0.0625rem;bottom:0;right:-0.125rem;width:0.1875rem;background:var(--outline-accent);cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:none;}
|
87
|
+
.Table_styles_xngwgy_tedz16__5cfbdc68{padding:var(--tedz16-0);position:relative;font-weight:600;text-align:left;height:var(--plasma-table-header-row-height);background-color:transparent;color:inherit;border-width:0.0625rem;border-top-width:0;border-bottom-width:0;border-style:solid;border-color:var(--tedz16-1);}.Table_styles_xngwgy_tedz16__5cfbdc68:hover .Table_styles_xngwgy_r18b5m0z__5cfbdc68{display:block;}
|
88
|
+
.Table_styles_xngwgy_s3mgb7q__5cfbdc68{--plasma-checkbox-trigger-size:var(--plasma-table-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-table-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--text-accent);--plasma-checkbox-icon-color:var(--on-dark-text-primary);--plasma-checkbox-trigger-border-color:var(--text-secondary);}
|
89
|
+
.Table_styles_xngwgy_s177cehz__5cfbdc68{--plasma-divider-base-side-size:0.0625rem;--plasma-divider-background:var(--surface-transparent-tertiary);--plasma-divider-border-radius:0.0625rem;}
|
90
|
+
.Table_styles_xngwgy_beus4rw__5cfbdc68{--plasma-button-height:var(--plasma-table-button-height);--plasma-button-disabled-opacity:0.4;--plasma-button-font-family:var(--plasma-table-button-font-family);--plasma-button-font-size:var(--plasma-table-button-font-size);--plasma-button-font-style:var(--plasma-table-button-font-style);--plasma-button-font-weight:var(--plasma-table-button-font-weight);--plasma-button-letter-spacing:var(--plasma-table-button-letter-spacing);--plasma-button-line-height:var(--plasma-table-button-line-height);}
|
91
|
+
.Table_styles_xngwgy_bfybxxj__5cfbdc68.Table_styles_xngwgy_beus4rw__5cfbdc68{--plasma-button-color:var(--on-dark-text-primary);--plasma-button-value-color:var(--on-dark-text-secondary);--plasma-button-background-color:var(--surface-accent);--plasma-button-background-color-hover:var(--surface-accent-hover);--plasma-button-background-color-active:var(--surface-accent-active);}
|
92
|
+
.Table_styles_xngwgy_l1ql6jvb__5cfbdc68{--plasma-link-button-color:var(--text-primary);--plasma-link-button-background-color:var(--surface-transparent-clear);--plasma-link-button-color-hover:var(--text-primary-hover);--plasma-link-button-color-active:var(--text-primary-active);--plasma-link-button-focus-color:var(--surface-accent);--plasma-link-button-font-family:var(--plasma-table-link-button-font-family);--plasma-link-button-font-size:var(--plasma-table-link-button-font-size);--plasma-link-button-font-style:var(--plasma-table-link-button-font-style);--plasma-link-button-font-weight:var(--plasma-table-link-button-font-weight);--plasma-link-button-letter-spacing:var(--plasma-table-link-button-letter-spacing);--plasma-link-button-line-height:var(--plasma-table-link-button-line-height);}
|
91
93
|
|
92
94
|
.CellTextboxLabel_styles_1x97zqi_supiagz__b05150dd{color:var(--plasma-cell-label-color);font-size:var(--plasma-cell-label-font-size);font-weight:var(--plasma-cell-label-font-weight);font-family:var(--plasma-cell-label-font-family);font-style:var(--plasma-cell-label-font-style);line-height:var(--plasma-cell-label-line-height);-webkit-letter-spacing:var(--plasma-cell-label-letter-spacing);-moz-letter-spacing:var(--plasma-cell-label-letter-spacing);-ms-letter-spacing:var(--plasma-cell-label-letter-spacing);letter-spacing:var(--plasma-cell-label-letter-spacing);}
|
93
95
|
|
@@ -6,6 +6,7 @@ var _rollupPluginBabelHelpers = require('../../../../../../_virtual/_rollupPlugi
|
|
6
6
|
var React = require('react');
|
7
7
|
var HeadCell = require('../../HeadCell.js');
|
8
8
|
var Table_styles = require('../../../../Table.styles.js');
|
9
|
+
var Table_tokens = require('../../../../Table.tokens.js');
|
9
10
|
var Filter_styles = require('./Filter.styles.js');
|
10
11
|
var useDidMountEffect = require('../../../../../../hooks/useDidMountEffect.js');
|
11
12
|
var IconFilterFunnel = require('../../../../../_Icon/Icons/IconFilterFunnel.js');
|
@@ -76,7 +77,8 @@ var Filter = function Filter(_ref) {
|
|
76
77
|
onChange: setLocalFiltered,
|
77
78
|
renderTarget: function renderTarget() {
|
78
79
|
return /*#__PURE__*/React__default.default.createElement(Filter_styles.IconFilterWrapper, null, /*#__PURE__*/React__default.default.createElement(IconFilterFunnel.IconFilterFunnel, {
|
79
|
-
size: HeadCell.getIconSize(size)
|
80
|
+
size: HeadCell.getIconSize(size),
|
81
|
+
className: Table_tokens.classes.filterIcon
|
80
82
|
}), filtered.length ? _StyledIndicator || (_StyledIndicator = /*#__PURE__*/React__default.default.createElement(Filter_styles.StyledIndicator, {
|
81
83
|
size: "s",
|
82
84
|
view: "accent"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Filter.js","sources":["../../../../../../../src/components/Table/ui/HeadCell/ui/Filter/Filter.tsx"],"sourcesContent":["import React, { useState } from 'react';\n\nimport { useDidMountEffect } from '../../../../../../hooks';\nimport { IconFilterFunnel } from '../../../../../_Icon';\nimport { getIconSize } from '../../HeadCell';\nimport { ButtonAccent, LinkButton } from '../../../../Table.styles';\n\nimport { IconFilterWrapper, StyledIndicator, Select, StyledDivider, ControlPanel } from './Filter.styles';\n\nconst getSelectWidth = (size
|
1
|
+
{"version":3,"file":"Filter.js","sources":["../../../../../../../src/components/Table/ui/HeadCell/ui/Filter/Filter.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Header } from '@tanstack/react-table';\n\nimport { useDidMountEffect } from '../../../../../../hooks';\nimport { IconFilterFunnel } from '../../../../../_Icon';\nimport { getIconSize } from '../../HeadCell';\nimport { ButtonAccent, LinkButton } from '../../../../Table.styles';\nimport { TableProps, TableRowData } from '../../../../Table.types';\nimport { classes } from '../../../../Table.tokens';\n\nimport { IconFilterWrapper, StyledIndicator, Select, StyledDivider, ControlPanel } from './Filter.styles';\n\nconst getSelectWidth = (size?: string) => {\n switch (size) {\n case 'l': {\n return '18.75rem';\n }\n case 'm': {\n return '16rem';\n }\n case 's': {\n return '14rem';\n }\n default: {\n return '14rem';\n }\n }\n};\n\nconst isFilterChanged = (outerFiltered: string[], localFiltered: string[]) => {\n return (\n outerFiltered.length !== localFiltered.length ||\n new Set([...outerFiltered, ...localFiltered]).size !== outerFiltered.length\n );\n};\n\ntype Props = {\n header: Header<TableRowData, unknown>;\n size: TableProps['size'];\n outerFiltered: TableProps['filtered'];\n tableContainerRef: React.RefObject<HTMLDivElement>;\n};\n\nexport const Filter: React.FC<Props> = ({ header, size, outerFiltered, tableContainerRef }) => {\n const filtered = (header.column.getFilterValue() as string[]) || [];\n\n const [localFiltered, setLocalFiltered] = useState<string[]>(filtered || []);\n\n const { filters } = header?.column?.columnDef?.meta || {};\n\n const isDisabled = !isFilterChanged(filtered, localFiltered);\n\n const handleFilterSubmit = () => {\n header.column.setFilterValue(localFiltered);\n };\n\n const handleReset = () => {\n setLocalFiltered([]);\n };\n\n const handleToggle = (opened: boolean) => {\n if (!opened) {\n setLocalFiltered((header.column.getFilterValue() as string[]) || []);\n }\n };\n\n useDidMountEffect(() => {\n setLocalFiltered(filtered);\n }, [outerFiltered]);\n\n return (\n <Select\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n placement=\"bottom-end\"\n multiselect\n value={localFiltered}\n onChange={setLocalFiltered}\n renderTarget={() => (\n <IconFilterWrapper>\n <IconFilterFunnel size={getIconSize(size)} className={classes.filterIcon} />\n\n {filtered.length ? <StyledIndicator size=\"s\" view=\"accent\" /> : undefined}\n </IconFilterWrapper>\n )}\n items={filters}\n portal={tableContainerRef}\n listWidth={getSelectWidth(size)}\n onToggle={handleToggle}\n afterList={\n <>\n <StyledDivider orientation=\"horizontal\" length=\"auto\" />\n\n <ControlPanel>\n <LinkButton onClick={handleReset}>Сбросить фильтр</LinkButton>\n <ButtonAccent disabled={isDisabled} onClick={handleFilterSubmit}>\n Применить\n </ButtonAccent>\n </ControlPanel>\n </>\n }\n />\n );\n};\n"],"names":["getSelectWidth","size","isFilterChanged","outerFiltered","localFiltered","length","Set","concat","_toConsumableArray","Filter","_ref","_header$column","header","tableContainerRef","filtered","column","getFilterValue","_useState","useState","_useState2","_slicedToArray","setLocalFiltered","_ref2","columnDef","meta","filters","isDisabled","handleFilterSubmit","setFilterValue","handleReset","handleToggle","opened","useDidMountEffect","React","createElement","Select","placement","multiselect","value","onChange","renderTarget","IconFilterWrapper","IconFilterFunnel","getIconSize","className","classes","filterIcon","_StyledIndicator","StyledIndicator","view","undefined","items","portal","listWidth","onToggle","afterList","Fragment","_StyledDivider","StyledDivider","orientation","ControlPanel","LinkButton","onClick","ButtonAccent","disabled"],"mappings":";;;;;;;;;;;;;;;;;;AAYA,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAIC,IAAa,EAAK;AACtC,EAAA,QAAQA,IAAI;AACR,IAAA,KAAK,GAAG;AAAE,MAAA;AACN,QAAA,OAAO,UAAU,CAAA;AACrB,OAAA;AACA,IAAA,KAAK,GAAG;AAAE,MAAA;AACN,QAAA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les_178qpj9_t1kp0wa7__381585e2{display:block;position:relative;}
|
905
905
|
.Note_styles_178qpj9_tf1lafs__381585e2{visibility:hidden;position:absolute;z-index:-9999;opacity:0;top:0;left:0;}
|
906
906
|
|
907
|
-
.
|
908
|
-
.
|
907
|
+
.HeadCell_styles_155gsrn_c14eoxb5__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
908
|
+
.HeadCell_styles_155gsrn_t1179z8p__5c959fae{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.5rem;}
|
909
|
+
.HeadCell_styles_155gsrn_iy1msq1__5c959fae{line-height:0;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
909
910
|
|
910
911
|
.Filter_styles_zerrb9_ss3v1fl__e58abdba{--plasma-select-padding:var(--plasma-table-select-padding);--plasma-select-border-radius:var(--plasma-table-select-border-radius);--plasma-select-item-height:var(--plasma-table-select-item-height);--plasma-select-item-padding:var(--plasma-table-select-item-padding);--plasma-select-item-border-radius:var(--plasma-table-select-item-border-radius);--plasma-select-item-icon-margin:var(--plasma-table-select-item-icon-margin);--plasma-select-item-icon-size:var(--plasma-table-select-item-icon-size);--plasma-select-cell-padding:var(--plasma-table-select-cell-padding);--plasma-select-cell-title-font-family:var(--plasma-table-select-cell-title-font-family);--plasma-select-cell-title-font-size:var(--plasma-table-select-cell-title-font-size);--plasma-select-cell-title-font-style:var(--plasma-table-select-cell-title-font-style);--plasma-select-cell-title-font-weight:var(--plasma-table-select-cell-title-font-weight);--plasma-select-cell-title-letter-spacing:var(--plasma-table-select-cell-title-letter-spacing);--plasma-select-cell-title-line-height:var(--plasma-table-select-cell-title-line-height);--plasma-select-checkbox-trigger-size:var(--plasma-table-select-checkbox-trigger-size);--plasma-select-checkbox-trigger-border-radius:var(--plasma-table-select-checkbox-trigger-border-radius);--plasma-select-checkbox-fill-color:var(--text-accent);--plasma-select-checkbox-icon-color:var(--on-dark-text-primary);--plasma-select-checkbox-trigger-border-color:var(--text-secondary);}
|
911
912
|
.Filter_styles_zerrb9_ixw8ftq__e58abdba{position:relative;line-height:0;cursor:pointer;}
|
@@ -914,28 +915,29 @@
|
|
914
915
|
.Filter_styles_zerrb9_s1amtrwp__e58abdba{margin:var(--plasma-table-filter-divider-margin);}
|
915
916
|
.Filter_styles_zerrb9_cda48hg__e58abdba{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;padding:var(--plasma-table-select-control-panel-padding);gap:var(--plasma-table-select-control-panel-gap);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
916
917
|
|
917
|
-
.
|
918
|
-
.
|
919
|
-
.
|
920
|
-
.
|
921
|
-
.
|
922
|
-
.
|
923
|
-
.
|
924
|
-
.
|
925
|
-
|
926
|
-
.
|
927
|
-
|
928
|
-
.
|
929
|
-
.
|
930
|
-
.
|
931
|
-
.
|
932
|
-
|
933
|
-
.
|
934
|
-
.
|
935
|
-
.
|
936
|
-
.
|
937
|
-
.
|
938
|
-
.
|
918
|
+
.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b{position:relative;padding:var(--t12w3lu5-0);height:var(--plasma-table-row-height);border-width:0.0625rem;border-top-width:0;border-style:solid;border-color:var(--t12w3lu5-1);border-bottom-color:var(--t12w3lu5-2);cursor:pointer;box-sizing:border-box;}.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b .EditableCell_styles_1g3clv2_editIcon__5329cb3b{opacity:0;}.EditableCell_styles_1g3clv2_t12w3lu5__5329cb3b:hover .EditableCell_styles_1g3clv2_editIcon__5329cb3b{opacity:1;}
|
919
|
+
.EditableCell_styles_1g3clv2_idy8fgn__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;width:100%;height:100%;}
|
920
|
+
.EditableCell_styles_1g3clv2_cwrhll2__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:0.25rem;}
|
921
|
+
.EditableCell_styles_1g3clv2_e1dkea5v__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;gap:var(--plasma-table-editable-cell-padding);height:100%;}
|
922
|
+
.EditableCell_styles_1g3clv2_i1uj28nu__5329cb3b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;padding:var(--plasma-table-editable-cell-input-padding);background:var(--plasma-table-editable-cell-input-background);border:0.0625rem solid var(--plasma-table-editable-cell-input-border-color);border-radius:var(--plasma-table-editable-cell-input-border-radius);box-sizing:border-box;gap:var(--plasma-table-editable-cell-icon-gap);}
|
923
|
+
.EditableCell_styles_1g3clv2_i1c7bo0z__5329cb3b{width:auto;border:none;padding:0;background:transparent;outline:none;caret-color:var(--text-accent);color:var(--text-primary);font-family:var(--plasma-table-font-family);font-size:var(--plasma-table-font-size);font-style:var(--plasma-table-font-style);font-weight:var(--plasma-table-font-weight);-webkit-letter-spacing:var(--plasma-table-letter-spacing);-moz-letter-spacing:var(--plasma-table-letter-spacing);-ms-letter-spacing:var(--plasma-table-letter-spacing);letter-spacing:var(--plasma-table-letter-spacing);line-height:var(--plasma-table-line-height);}
|
924
|
+
.EditableCell_styles_1g3clv2_i1jx30pt__5329cb3b{--plasma-icon-button-width:var(--plasma-table-editable-cell-icon-button-width);--plasma-icon-button-height:var(--plasma-table-editable-cell-icon-button-height);}
|
925
|
+
.EditableCell_styles_1g3clv2_i17hwnh4__5329cb3b{--plasma-icon-button-width:auto;--plasma-icon-button-height:auto;}
|
926
|
+
|
927
|
+
.Cell_styles_1q2mjxm_tv72tnk__e6a383c5{position:relative;padding:var(--tv72tnk-0);height:var(--plasma-table-row-height);border-width:0.0625rem;border-top-width:0;border-style:solid;border-color:var(--tv72tnk-1);border-bottom-color:var(--tv72tnk-2);box-sizing:border-box;}
|
928
|
+
|
929
|
+
.Table_styles_xngwgy_b1lxisuf__5cfbdc68{display:inline-block;overflow-y:auto;}
|
930
|
+
.Table_styles_xngwgy_t15d4jbz__5cfbdc68{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;font-family:var(--plasma-table-font-family);font-size:var(--plasma-table-font-size);font-style:var(--plasma-table-font-style);font-weight:var(--plasma-table-font-weight);-webkit-letter-spacing:var(--plasma-table-letter-spacing);-moz-letter-spacing:var(--plasma-table-letter-spacing);-ms-letter-spacing:var(--plasma-table-letter-spacing);letter-spacing:var(--plasma-table-letter-spacing);line-height:var(--plasma-table-line-height);border-collapse:collapse;border-width:0;border-style:solid;border-color:var(--t15d4jbz-0);}
|
931
|
+
.Table_styles_xngwgy_t1ri3no5__5cfbdc68{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;background-color:var(--t1ri3no5-0);}
|
932
|
+
.Table_styles_xngwgy_t1uk535o__5cfbdc68{position:var(--t1uk535o-0);top:0;background:var(--t1uk535o-1);z-index:1;box-shadow:var(--t1uk535o-2);}.Table_styles_xngwgy_t1uk535o__5cfbdc68 .Table_styles_xngwgy_t1ri3no5__5cfbdc68{background:transparent;}
|
933
|
+
|
934
|
+
.Table_styles_xngwgy_r18b5m0z__5cfbdc68{display:var(--r18b5m0z-0);position:absolute;z-index:1;top:-0.0625rem;bottom:0;right:-0.125rem;width:0.1875rem;background:var(--outline-accent);cursor:col-resize;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;touch-action:none;}
|
935
|
+
.Table_styles_xngwgy_tedz16__5cfbdc68{padding:var(--tedz16-0);position:relative;font-weight:600;text-align:left;height:var(--plasma-table-header-row-height);background-color:transparent;color:inherit;border-width:0.0625rem;border-top-width:0;border-bottom-width:0;border-style:solid;border-color:var(--tedz16-1);}.Table_styles_xngwgy_tedz16__5cfbdc68:hover .Table_styles_xngwgy_r18b5m0z__5cfbdc68{display:block;}
|
936
|
+
.Table_styles_xngwgy_s3mgb7q__5cfbdc68{--plasma-checkbox-trigger-size:var(--plasma-table-checkbox-trigger-size);--plasma-checkbox-trigger-border-radius:var(--plasma-table-checkbox-trigger-border-radius);--plasma-checkbox-fill-color:var(--text-accent);--plasma-checkbox-icon-color:var(--on-dark-text-primary);--plasma-checkbox-trigger-border-color:var(--text-secondary);}
|
937
|
+
.Table_styles_xngwgy_s177cehz__5cfbdc68{--plasma-divider-base-side-size:0.0625rem;--plasma-divider-background:var(--surface-transparent-tertiary);--plasma-divider-border-radius:0.0625rem;}
|
938
|
+
.Table_styles_xngwgy_beus4rw__5cfbdc68{--plasma-button-height:var(--plasma-table-button-height);--plasma-button-disabled-opacity:0.4;--plasma-button-font-family:var(--plasma-table-button-font-family);--plasma-button-font-size:var(--plasma-table-button-font-size);--plasma-button-font-style:var(--plasma-table-button-font-style);--plasma-button-font-weight:var(--plasma-table-button-font-weight);--plasma-button-letter-spacing:var(--plasma-table-button-letter-spacing);--plasma-button-line-height:var(--plasma-table-button-line-height);}
|
939
|
+
.Table_styles_xngwgy_bfybxxj__5cfbdc68.Table_styles_xngwgy_beus4rw__5cfbdc68{--plasma-button-color:var(--on-dark-text-primary);--plasma-button-value-color:var(--on-dark-text-secondary);--plasma-button-background-color:var(--surface-accent);--plasma-button-background-color-hover:var(--surface-accent-hover);--plasma-button-background-color-active:var(--surface-accent-active);}
|
940
|
+
.Table_styles_xngwgy_l1ql6jvb__5cfbdc68{--plasma-link-button-color:var(--text-primary);--plasma-link-button-background-color:var(--surface-transparent-clear);--plasma-link-button-color-hover:var(--text-primary-hover);--plasma-link-button-color-active:var(--text-primary-active);--plasma-link-button-focus-color:var(--surface-accent);--plasma-link-button-font-family:var(--plasma-table-link-button-font-family);--plasma-link-button-font-size:var(--plasma-table-link-button-font-size);--plasma-link-button-font-style:var(--plasma-table-link-button-font-style);--plasma-link-button-font-weight:var(--plasma-table-link-button-font-weight);--plasma-link-button-letter-spacing:var(--plasma-table-link-button-letter-spacing);--plasma-link-button-line-height:var(--plasma-table-link-button-line-height);}
|
939
941
|
|
940
942
|
.base_1bvd5n_b1o5hlxs__d4f41253{color:var(--plasma-link-button-color);background:var(--plasma-link-button-background-color);}.base_1bvd5n_b1o5hlxs__d4f41253:hover{color:var(--plasma-link-button-color-hover,var(--plasma-link-button-color));}.base_1bvd5n_b1o5hlxs__d4f41253:active{color:var(--plasma-link-button-color-active,var(--plasma-link-button-color));}
|
941
943
|
|
@@ -10,8 +10,10 @@ var _reactTable = /*#__PURE__*/require("@tanstack/react-table");
|
|
10
10
|
var _plasmaCore = /*#__PURE__*/require("@salutejs/plasma-core");
|
11
11
|
var _ui = /*#__PURE__*/require("./ui");
|
12
12
|
var _Table = /*#__PURE__*/require("./Table.styles");
|
13
|
+
var _excluded = ["data", "onChange", "columns", "view", "size", "borderVariant", "enableSelection", "selected", "filtered", "sorted", "maxHeight", "stickyHeader", "onCellUpdate"];
|
13
14
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
14
15
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
15
17
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
16
18
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
17
19
|
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
@@ -22,7 +24,9 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
22
24
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
23
25
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
24
26
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
25
|
-
var
|
27
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
28
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
29
|
+
var SELECT_COLUMN_ID = exports.SELECT_COLUMN_ID = 'SELECT_COLUMN_UNIQUE_ID';
|
26
30
|
var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
27
31
|
return /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
28
32
|
var data = _ref.data,
|
@@ -38,7 +42,8 @@ var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
|
38
42
|
outerSorted = _ref.sorted,
|
39
43
|
maxHeight = _ref.maxHeight,
|
40
44
|
stickyHeader = _ref.stickyHeader,
|
41
|
-
onCellUpdate = _ref.onCellUpdate
|
45
|
+
onCellUpdate = _ref.onCellUpdate,
|
46
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
42
47
|
var _useState = (0, _react.useState)(outerSelected || {}),
|
43
48
|
_useState2 = _slicedToArray(_useState, 2),
|
44
49
|
innerSelected = _useState2[0],
|
@@ -132,17 +137,10 @@ var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
|
132
137
|
enableSorting: enableSorting,
|
133
138
|
enableResizing: enableResizing,
|
134
139
|
filterFn: function filterFn(row, columnId, filterArr) {
|
135
|
-
if (outerFilterFn && filterArr && Array.isArray(filterArr)) {
|
136
|
-
|
137
|
-
return
|
138
|
-
}
|
139
|
-
for (var i = 0; i < filterArr.length; i++) {
|
140
|
-
var filterValue = filterArr[i];
|
141
|
-
if (outerFilterFn(filterValue, row.getValue(columnId))) {
|
142
|
-
return true;
|
143
|
-
}
|
144
|
-
}
|
145
|
-
return false;
|
140
|
+
if ((filterArr === null || filterArr === void 0 ? void 0 : filterArr.length) !== 0 && outerFilterFn && filterArr && Array.isArray(filterArr)) {
|
141
|
+
return filterArr.some(function (filterValue) {
|
142
|
+
return outerFilterFn(filterValue, row.getValue(columnId));
|
143
|
+
});
|
146
144
|
}
|
147
145
|
return true;
|
148
146
|
},
|
@@ -183,7 +181,7 @@ var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
|
183
181
|
}
|
184
182
|
}
|
185
183
|
});
|
186
|
-
return /*#__PURE__*/_react["default"].createElement(Root, {
|
184
|
+
return /*#__PURE__*/_react["default"].createElement(Root, _extends({
|
187
185
|
ref: rootRef,
|
188
186
|
data: data,
|
189
187
|
columns: columns,
|
@@ -192,7 +190,7 @@ var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
|
192
190
|
style: {
|
193
191
|
maxHeight: maxHeight || 'none'
|
194
192
|
}
|
195
|
-
}, /*#__PURE__*/_react["default"].createElement(_Table.Table, {
|
193
|
+
}, props), /*#__PURE__*/_react["default"].createElement(_Table.Table, {
|
196
194
|
borderVariant: borderVariant,
|
197
195
|
stickyHeader: stickyHeader
|
198
196
|
}, /*#__PURE__*/_react["default"].createElement(_Table.Thead, {
|
@@ -212,7 +210,7 @@ var tableRoot = exports.tableRoot = function tableRoot(Root) {
|
|
212
210
|
tableContainerRef: tableContainerRef
|
213
211
|
});
|
214
212
|
}));
|
215
|
-
})), /*#__PURE__*/_react["default"].createElement(
|
213
|
+
})), /*#__PURE__*/_react["default"].createElement(_Table.Tbody, null, table.getRowModel().rows.map(function (row) {
|
216
214
|
return /*#__PURE__*/_react["default"].createElement(_Table.Tr, {
|
217
215
|
key: row.id,
|
218
216
|
selected: row.getIsSelected()
|