@coveord/plasma-mantine 56.8.1 → 56.9.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/.turbo/turbo-build.log +4 -4
- package/.turbo/turbo-test.log +107 -106
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/Table/Table.d.ts +2 -12
- package/dist/cjs/components/Table/Table.d.ts.map +1 -1
- package/dist/cjs/components/Table/Table.js +0 -3
- package/dist/cjs/components/Table/Table.js.map +1 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.d.ts +15 -0
- package/dist/cjs/components/Table/table-column/TableActionsColumn.d.ts.map +1 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.js +14 -1
- package/dist/cjs/components/Table/table-column/TableActionsColumn.js.map +1 -1
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.d.ts +11 -32
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.d.ts.map +1 -1
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.js +101 -97
- package/dist/cjs/components/Table/table-columns-selector/TableColumnsSelector.js.map +1 -1
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/Table/Table.d.ts +2 -12
- package/dist/esm/components/Table/Table.d.ts.map +1 -1
- package/dist/esm/components/Table/Table.js +0 -3
- package/dist/esm/components/Table/Table.js.map +1 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.d.ts +15 -0
- package/dist/esm/components/Table/table-column/TableActionsColumn.d.ts.map +1 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.js +12 -1
- package/dist/esm/components/Table/table-column/TableActionsColumn.js.map +1 -1
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.d.ts +11 -32
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.d.ts.map +1 -1
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.js +94 -84
- package/dist/esm/components/Table/table-columns-selector/TableColumnsSelector.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/package.json +3 -3
- package/src/components/Table/Table.tsx +4 -9
- package/src/components/Table/__tests__/TableColumnsSelectorHeader.spec.tsx +325 -0
- package/src/components/Table/table-column/TableActionsColumn.tsx +28 -1
- package/src/components/Table/table-columns-selector/TableColumnsSelector.tsx +96 -125
- package/src/index.ts +1 -0
- package/src/components/Table/__tests__/TableColumnsSelector.spec.tsx +0 -352
|
@@ -1,99 +1,109 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { IconSettings } from '@coveord/plasma-react-icons';
|
|
3
|
+
import { Checkbox, Combobox, Text, Tooltip, useCombobox } from '@mantine/core';
|
|
3
4
|
import { flexRender } from '@tanstack/react-table';
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
label: 'Edit columns',
|
|
8
|
-
buttonVariant: 'outline',
|
|
5
|
+
import { ActionIcon } from '../../ActionIcon/ActionIcon';
|
|
6
|
+
const DEFAULT_OPTIONS = {
|
|
7
|
+
footer: (max)=>`You can display up to ${max} columns.`,
|
|
9
8
|
limitReachedTooltip: 'You have reached the maximum display limit.',
|
|
10
|
-
alwaysVisibleTooltip: 'This column is always visible.'
|
|
11
|
-
showVisibleCountLabel: false
|
|
9
|
+
alwaysVisibleTooltip: 'This column is always visible.'
|
|
12
10
|
};
|
|
13
|
-
export const
|
|
14
|
-
const {
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
export const TableColumnsSelectorHeader = ({ table, options })=>{
|
|
12
|
+
const { maxSelectableColumns, footer, limitReachedTooltip, alwaysVisibleTooltip } = {
|
|
13
|
+
...DEFAULT_OPTIONS,
|
|
14
|
+
...options
|
|
15
|
+
};
|
|
16
|
+
const combobox = useCombobox({
|
|
17
|
+
onDropdownClose: ()=>{
|
|
18
|
+
combobox.resetSelectedOption();
|
|
19
|
+
},
|
|
20
|
+
onDropdownOpen: ()=>combobox.updateSelectedOptionIndex('active')
|
|
21
|
+
});
|
|
17
22
|
const allColumns = table.getAllLeafColumns();
|
|
18
23
|
const filteredColumns = allColumns.filter((column)=>!column.columnDef.meta?.controlColumn);
|
|
19
24
|
const selectedColumnsCount = filteredColumns.filter((column)=>column.getIsVisible()).length;
|
|
25
|
+
// Validate maxSelectableColumns - must be a positive integer to be effective
|
|
26
|
+
const effectiveMaxColumns = maxSelectableColumns !== undefined && maxSelectableColumns > 0 ? maxSelectableColumns : undefined;
|
|
20
27
|
if (filteredColumns.length <= 0) {
|
|
21
28
|
return null;
|
|
22
29
|
}
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
|
|
30
|
+
const getColumnState = (column)=>{
|
|
31
|
+
const alwaysVisible = !column.getCanHide();
|
|
32
|
+
const isDisabled = effectiveMaxColumns !== undefined && selectedColumnsCount >= effectiveMaxColumns && !column.getIsVisible() || alwaysVisible;
|
|
33
|
+
const isVisible = column.getIsVisible() || alwaysVisible;
|
|
34
|
+
return {
|
|
35
|
+
alwaysVisible,
|
|
36
|
+
isDisabled,
|
|
37
|
+
isVisible
|
|
38
|
+
};
|
|
26
39
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
children: /*#__PURE__*/ _jsx(Stack, {
|
|
56
|
-
...getStyles('columnSelectorWrapper', stylesApiProps),
|
|
57
|
-
children: filteredColumns.map((column)=>{
|
|
58
|
-
const alwaysVisible = !column.getCanHide();
|
|
59
|
-
const isDisabled = selectedColumnsCount >= maxSelectableColumns && !column.getIsVisible() || alwaysVisible;
|
|
60
|
-
return /*#__PURE__*/ _jsx(Tooltip, {
|
|
61
|
-
label: alwaysVisible ? alwaysVisibleTooltip : limitReachedTooltip,
|
|
62
|
-
disabled: !isDisabled,
|
|
63
|
-
position: "left",
|
|
64
|
-
children: /*#__PURE__*/ _jsx("div", {
|
|
65
|
-
children: /*#__PURE__*/ _jsx(Checkbox, {
|
|
66
|
-
label: flexRender(column.columnDef.header, {
|
|
67
|
-
table,
|
|
68
|
-
column,
|
|
69
|
-
header: {
|
|
70
|
-
column
|
|
71
|
-
}
|
|
72
|
-
}),
|
|
73
|
-
name: column.id,
|
|
74
|
-
checked: column.getIsVisible() || alwaysVisible,
|
|
75
|
-
disabled: isDisabled,
|
|
76
|
-
onChange: column.getToggleVisibilityHandler()
|
|
77
|
-
}, column.id)
|
|
78
|
-
})
|
|
79
|
-
}, column.id);
|
|
80
|
-
})
|
|
81
|
-
})
|
|
40
|
+
const handleOptionClick = (columnId)=>{
|
|
41
|
+
const column = filteredColumns.find((col)=>col.id === columnId);
|
|
42
|
+
if (column) {
|
|
43
|
+
const { isDisabled } = getColumnState(column);
|
|
44
|
+
if (!isDisabled) {
|
|
45
|
+
column.toggleVisibility();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
const columnOptions = filteredColumns.map((column)=>{
|
|
50
|
+
const { alwaysVisible, isDisabled, isVisible } = getColumnState(column);
|
|
51
|
+
return /*#__PURE__*/ _jsx(Combobox.Option, {
|
|
52
|
+
value: column.id,
|
|
53
|
+
disabled: isDisabled,
|
|
54
|
+
active: isVisible,
|
|
55
|
+
children: /*#__PURE__*/ _jsx(Tooltip, {
|
|
56
|
+
label: alwaysVisible ? alwaysVisibleTooltip : limitReachedTooltip,
|
|
57
|
+
disabled: !isDisabled,
|
|
58
|
+
position: "left",
|
|
59
|
+
children: /*#__PURE__*/ _jsx("div", {
|
|
60
|
+
children: /*#__PURE__*/ _jsx(Checkbox, {
|
|
61
|
+
checked: isVisible,
|
|
62
|
+
label: flexRender(column.columnDef.header, {
|
|
63
|
+
table,
|
|
64
|
+
column,
|
|
65
|
+
header: {
|
|
66
|
+
column
|
|
67
|
+
}
|
|
82
68
|
}),
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
/*#__PURE__*/ _jsx(Divider, {
|
|
86
|
-
mb: "xs",
|
|
87
|
-
mt: "sm"
|
|
88
|
-
}),
|
|
89
|
-
footer
|
|
90
|
-
]
|
|
91
|
-
})
|
|
92
|
-
]
|
|
69
|
+
disabled: isDisabled
|
|
70
|
+
})
|
|
93
71
|
})
|
|
94
|
-
|
|
95
|
-
})
|
|
72
|
+
})
|
|
73
|
+
}, column.id);
|
|
96
74
|
});
|
|
97
|
-
|
|
75
|
+
return /*#__PURE__*/ _jsxs(Combobox, {
|
|
76
|
+
store: combobox,
|
|
77
|
+
position: "bottom-end",
|
|
78
|
+
shadow: "md",
|
|
79
|
+
onOptionSubmit: handleOptionClick,
|
|
80
|
+
children: [
|
|
81
|
+
/*#__PURE__*/ _jsx(Combobox.Target, {
|
|
82
|
+
children: /*#__PURE__*/ _jsx(ActionIcon.Tertiary, {
|
|
83
|
+
onClick: ()=>combobox.toggleDropdown(),
|
|
84
|
+
"aria-label": "settings",
|
|
85
|
+
children: /*#__PURE__*/ _jsx(IconSettings, {
|
|
86
|
+
height: 16
|
|
87
|
+
})
|
|
88
|
+
})
|
|
89
|
+
}),
|
|
90
|
+
/*#__PURE__*/ _jsxs(Combobox.Dropdown, {
|
|
91
|
+
miw: 270,
|
|
92
|
+
children: [
|
|
93
|
+
/*#__PURE__*/ _jsx(Combobox.Options, {
|
|
94
|
+
children: columnOptions
|
|
95
|
+
}),
|
|
96
|
+
effectiveMaxColumns && /*#__PURE__*/ _jsx(Combobox.Footer, {
|
|
97
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
98
|
+
size: "sm",
|
|
99
|
+
c: "dimmed",
|
|
100
|
+
children: typeof footer === 'function' ? footer(effectiveMaxColumns) : footer
|
|
101
|
+
})
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
})
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
};
|
|
98
108
|
|
|
99
109
|
//# sourceMappingURL=TableColumnsSelector.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/components/Table/table-columns-selector/TableColumnsSelector.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"sources":["../../../../../src/components/Table/table-columns-selector/TableColumnsSelector.tsx"],"sourcesContent":["import {IconSettings} from '@coveord/plasma-react-icons';\nimport {Checkbox, Combobox, Text, Tooltip, useCombobox} from '@mantine/core';\nimport {flexRender, Header, Table} from '@tanstack/react-table';\nimport {ActionIcon} from '../../ActionIcon/ActionIcon';\n\nexport interface TableColumnsSelectorOptions {\n /**\n * The maximum number of columns that can be selected at the same time.\n * If defined a footer will render with the remaining number of columns that can be selected.\n * Must be a positive integer (greater than 0).\n */\n maxSelectableColumns?: number;\n /**\n * The content to display in the footer when maxSelectableColumns is defined.\n * Can be a string or a function that receives the maxSelectableColumns value.\n * @default (max) => `You can display up to ${max} columns.`\n */\n footer?: string | ((maxSelectableColumns: number) => string);\n /**\n * The tooltip to display when the user hovers over a disabled checkbox because of the limit.\n * @default 'You have reached the maximum display limit.'\n */\n limitReachedTooltip?: string;\n /**\n * The tooltip to display when the user hovers over a disabled checkbox because a column cannot be hidden.\n * @default 'This column is always visible.'\n */\n alwaysVisibleTooltip?: string;\n}\n\nexport interface TableColumnsSelectorHeaderProps {\n table: Table<unknown>;\n options?: TableColumnsSelectorOptions;\n}\n\nconst DEFAULT_OPTIONS: Omit<TableColumnsSelectorOptions, 'footer'> & {\n footer: (maxSelectableColumns: number) => string;\n} = {\n footer: (max) => `You can display up to ${max} columns.`,\n limitReachedTooltip: 'You have reached the maximum display limit.',\n alwaysVisibleTooltip: 'This column is always visible.',\n};\n\nexport const TableColumnsSelectorHeader = ({table, options}: TableColumnsSelectorHeaderProps) => {\n const {maxSelectableColumns, footer, limitReachedTooltip, alwaysVisibleTooltip} = {\n ...DEFAULT_OPTIONS,\n ...options,\n };\n\n const combobox = useCombobox({\n onDropdownClose: () => {\n combobox.resetSelectedOption();\n },\n onDropdownOpen: () => combobox.updateSelectedOptionIndex('active'),\n });\n\n const allColumns = table.getAllLeafColumns();\n const filteredColumns = allColumns.filter((column) => !column.columnDef.meta?.controlColumn);\n const selectedColumnsCount = filteredColumns.filter((column) => column.getIsVisible()).length;\n\n // Validate maxSelectableColumns - must be a positive integer to be effective\n const effectiveMaxColumns =\n maxSelectableColumns !== undefined && maxSelectableColumns > 0 ? maxSelectableColumns : undefined;\n\n if (filteredColumns.length <= 0) {\n return null;\n }\n\n const getColumnState = (column: (typeof filteredColumns)[number]) => {\n const alwaysVisible = !column.getCanHide();\n const isDisabled =\n (effectiveMaxColumns !== undefined &&\n selectedColumnsCount >= effectiveMaxColumns &&\n !column.getIsVisible()) ||\n alwaysVisible;\n const isVisible = column.getIsVisible() || alwaysVisible;\n return {alwaysVisible, isDisabled, isVisible};\n };\n\n const handleOptionClick = (columnId: string) => {\n const column = filteredColumns.find((col) => col.id === columnId);\n if (column) {\n const {isDisabled} = getColumnState(column);\n if (!isDisabled) {\n column.toggleVisibility();\n }\n }\n };\n\n const columnOptions = filteredColumns.map((column) => {\n const {alwaysVisible, isDisabled, isVisible} = getColumnState(column);\n\n return (\n <Combobox.Option value={column.id} key={column.id} disabled={isDisabled} active={isVisible}>\n <Tooltip\n label={alwaysVisible ? alwaysVisibleTooltip : limitReachedTooltip}\n disabled={!isDisabled}\n position=\"left\"\n >\n <div>\n <Checkbox\n checked={isVisible}\n label={flexRender(column.columnDef.header, {\n table,\n column,\n header: {column} as Header<unknown, unknown>,\n })}\n disabled={isDisabled}\n />\n </div>\n </Tooltip>\n </Combobox.Option>\n );\n });\n\n return (\n <Combobox store={combobox} position=\"bottom-end\" shadow=\"md\" onOptionSubmit={handleOptionClick}>\n <Combobox.Target>\n <ActionIcon.Tertiary onClick={() => combobox.toggleDropdown()} aria-label=\"settings\">\n <IconSettings height={16} />\n </ActionIcon.Tertiary>\n </Combobox.Target>\n <Combobox.Dropdown miw={270}>\n <Combobox.Options>{columnOptions}</Combobox.Options>\n {effectiveMaxColumns && (\n <Combobox.Footer>\n <Text size=\"sm\" c=\"dimmed\">\n {typeof footer === 'function' ? footer(effectiveMaxColumns) : footer}\n </Text>\n </Combobox.Footer>\n )}\n </Combobox.Dropdown>\n </Combobox>\n );\n};\n"],"names":["IconSettings","Checkbox","Combobox","Text","Tooltip","useCombobox","flexRender","ActionIcon","DEFAULT_OPTIONS","footer","max","limitReachedTooltip","alwaysVisibleTooltip","TableColumnsSelectorHeader","table","options","maxSelectableColumns","combobox","onDropdownClose","resetSelectedOption","onDropdownOpen","updateSelectedOptionIndex","allColumns","getAllLeafColumns","filteredColumns","filter","column","columnDef","meta","controlColumn","selectedColumnsCount","getIsVisible","length","effectiveMaxColumns","undefined","getColumnState","alwaysVisible","getCanHide","isDisabled","isVisible","handleOptionClick","columnId","find","col","id","toggleVisibility","columnOptions","map","Option","value","disabled","active","label","position","div","checked","header","store","shadow","onOptionSubmit","Target","Tertiary","onClick","toggleDropdown","aria-label","height","Dropdown","miw","Options","Footer","size","c"],"mappings":";AAAA,SAAQA,YAAY,QAAO,8BAA8B;AACzD,SAAQC,QAAQ,EAAEC,QAAQ,EAAEC,IAAI,EAAEC,OAAO,EAAEC,WAAW,QAAO,gBAAgB;AAC7E,SAAQC,UAAU,QAAsB,wBAAwB;AAChE,SAAQC,UAAU,QAAO,8BAA8B;AAgCvD,MAAMC,kBAEF;IACAC,QAAQ,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;IACJ;IAEA,MAAMC,gBAAgBtB,gBAAgBuB,GAAG,CAAC,CAACrB;QACvC,MAAM,EAACU,aAAa,EAAEE,UAAU,EAAEC,SAAS,EAAC,GAAGJ,eAAeT;QAE9D,qBACI,KAACxB,SAAS8C,MAAM;YAACC,OAAOvB,OAAOkB,EAAE;YAAkBM,UAAUZ;YAAYa,QAAQZ;sBAC7E,cAAA,KAACnC;gBACGgD,OAAOhB,gBAAgBxB,uBAAuBD;gBAC9CuC,UAAU,CAACZ;gBACXe,UAAS;0BAET,cAAA,KAACC;8BACG,cAAA,KAACrD;wBACGsD,SAAShB;wBACTa,OAAO9C,WAAWoB,OAAOC,SAAS,CAAC6B,MAAM,EAAE;4BACvC1C;4BACAY;4BACA8B,QAAQ;gCAAC9B;4BAAM;wBACnB;wBACAwB,UAAUZ;;;;WAdcZ,OAAOkB,EAAE;IAoBzD;IAEA,qBACI,MAAC1C;QAASuD,OAAOxC;QAAUoC,UAAS;QAAaK,QAAO;QAAKC,gBAAgBnB;;0BACzE,KAACtC,SAAS0D,MAAM;0BACZ,cAAA,KAACrD,WAAWsD,QAAQ;oBAACC,SAAS,IAAM7C,SAAS8C,cAAc;oBAAIC,cAAW;8BACtE,cAAA,KAAChE;wBAAaiE,QAAQ;;;;0BAG9B,MAAC/D,SAASgE,QAAQ;gBAACC,KAAK;;kCACpB,KAACjE,SAASkE,OAAO;kCAAEtB;;oBAClBb,qCACG,KAAC/B,SAASmE,MAAM;kCACZ,cAAA,KAAClE;4BAAKmE,MAAK;4BAAKC,GAAE;sCACb,OAAO9D,WAAW,aAAaA,OAAOwB,uBAAuBxB;;;;;;;AAO1F,EAAE"}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export { PasswordInput } from './components/PasswordInput/PasswordInput.js';
|
|
|
46
46
|
export { Select } from './components/Select/Select.js';
|
|
47
47
|
export * from './components/StickyFooter/StickyFooter.js';
|
|
48
48
|
export { flexRender as renderTableCell } from '@tanstack/react-table';
|
|
49
|
+
export { TableActionsColumn } from './components/Table/table-column/TableActionsColumn.js';
|
|
49
50
|
export { type TablePredicateProps } from './components/Table/table-predicate/TablePredicate.js';
|
|
50
51
|
export { Table, TableComponentsOrder, type PlasmaTableFactory } from './components/Table/Table.js';
|
|
51
52
|
export { type TableAction, type TableLayout, type TableLayoutProps, type TableProps, } from './components/Table/Table.types.js';
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,kBAAkB,EAAE,IAAI,EAAC,MAAM,eAAe,CAAC;AACvD,OAAO,EAAC,KAAK,OAAO,EAAC,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAAC,KAAK,YAAY,EAAC,MAAM,yBAAyB,CAAC;AAE1D,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,KAAK,eAAe,EAAC,MAAM,gBAAgB,CAAC;AACpD,cAAc,eAAe,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,wBAAwB,CAAC;AACvC,OAAO,EAAC,KAAK,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC/D,cAAc,sBAAsB,CAAC;AAIrC,OAAO,EAAC,SAAS,EAAC,MAAM,qCAAqC,CAAC;AAG9D,OAAO,EAAC,UAAU,EAAE,KAAK,eAAe,EAAC,MAAM,uCAAuC,CAAC;AAGvF,OAAO,EAAC,KAAK,EAAC,MAAM,6BAA6B,CAAC;AAGlD,OAAO,EACH,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,aAAa,EAClB,KAAK,kBAAkB,GAC1B,MAAM,6BAA6B,CAAC;AAGrC,cAAc,uCAAuC,CAAC;AAGtD,cAAc,+CAA+C,CAAC;AAG9D,OAAO,EAAC,MAAM,EAAE,KAAK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iCAAiC,CAAC;AACjH,OAAO,EAAC,iBAAiB,EAAE,KAAK,gBAAgB,EAAE,KAAK,wBAAwB,EAAC,MAAM,iCAAiC,CAAC;AAExH,OAAO,EAAC,IAAI,EAAC,CAAC;AAGd,cAAc,uCAAuC,CAAC;AACtD,cAAc,wBAAwB,CAAC;AAEvC,OAAO,QAAQ,eAAe,CAAC;IAC3B,UAAiB,0BAA0B;QACvC,MAAM,EAAE,MAAM,CAAC,MAAM,OAAO,YAAY,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,kBAAkB,CAAC,CAAC;KACjF;CACJ;AAED,OAAO,QAAQ,uBAAuB,CAAC;IACnC,UAAU,UAAU,CAAC,KAAK,SAAS,OAAO,EAAE,MAAM;QAC9C;;;;WAIG;QACH,aAAa,EAAE,OAAO,CAAC;KAC1B;CACJ"}
|
package/dist/esm/index.js
CHANGED
|
@@ -70,6 +70,7 @@ export { Select } from './components/Select/Select.js';
|
|
|
70
70
|
export * from './components/StickyFooter/StickyFooter.js';
|
|
71
71
|
// Table - override Mantine Table
|
|
72
72
|
export { flexRender as renderTableCell } from '@tanstack/react-table';
|
|
73
|
+
export { TableActionsColumn } from './components/Table/table-column/TableActionsColumn.js';
|
|
73
74
|
export { Table, TableComponentsOrder } from './components/Table/Table.js';
|
|
74
75
|
export { useTableContext } from './components/Table/TableContext.js';
|
|
75
76
|
export { useTable } from './components/Table/use-table.js';
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","RadioCard","PasswordInput","Select","flexRender","renderTableCell","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SAAQC,UAAU,QAAO,gBAAgB;AAEzC,cAAc,gBAAgB;AAC9B,cAAc,iBAAiB;AAC/B,cAAc,yBAAyB;AAEvC,cAAc,uBAAuB;AAErC,wBAAwB;AACxB,YAAY;AACZ,SAAQC,SAAS,QAAO,sCAAsC;AAE9D,4CAA4C;AAC5C,SAAQC,UAAU,QAA6B,wCAAwC;AAEvF,iCAAiC;AACjC,SAAQC,KAAK,QAAO,8BAA8B;AAElD,iCAAiC;AACjC,SACIC,KAAK,QAIF,8BAA8B;AAErC,cAAc;AACd,cAAc,wCAAwC;AAEtD,kBAAkB;AAClB,cAAc,gDAAgD;AAE9D,mCAAmC;AACnC,SAAQC,MAAM,QAAyB,gCAAgC;AAGvE,WAAW;AACX,cAAc,4CAA4C;AAE1D,aAAa;AACb,cAAc,sCAAsC;AAEpD,+BAA+B;AAC/B,SAAQC,IAAI,QAAO,4BAA4B;AAE/C,cAAc;AACd,cAAc,wCAAwC;AAEtD,aAAa;AACb,cAAc,wCAAwC;AACtD,SAAQC,0BAA0B,QAAO,wDAAwD;AAEjG,oBAAoB;AACpB,cAAc,kDAAkD;AAEhE,oBAAoB;AACpB,cAAc,kDAAkD;AAChE,cAAc,gEAAgE;AAC9E,cAAc,iEAAiE;AAC/E,cAAc,8DAA8D;AAE5E,yBAAyB;AACzB,cAAc,0DAA0D;AAExE,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,gDAAgD;AAChD,SACIC,MAAM,QAQH,gCAAgC;AAEvC,aAAa;AACb,cAAc,sCAAsC;AAEpD,iBAAiB;AACjB,cAAc,8CAA8C;AAC5D,cAAc,qDAAqD;AAEnE,eAAe;AACf,cAAc,0CAA0C;AAExD,SAAS;AACT,cAAc,4CAA4C;AAE1D,+BAA+B;AAC/B,SAAQC,IAAI,QAA2B,4BAA4B;AAEnE,iCAAiC;AACjC,SAAQC,KAAK,QAA2C,8BAA8B;AACtF,cAAc,oCAAoC;AAElD,SAAS;AACT,cAAc,gCAAgC;AAE9C,yCAAyC;AACzC,SAAQC,SAAS,QAA4B,sCAAsC;AAEnF,wDAAwD;AACxD,SAAQC,aAAa,QAAO,8CAA8C;AAC1E,SAAQC,MAAM,QAAO,gCAAgC;AAErD,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,iCAAiC;AACjC,SAAQC,cAAcC,eAAe,QAAO,wBAAwB;
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import {MantineColorsTuple, noop} from '@mantine/core';\nimport {type RowData} from '@tanstack/table-core';\nimport {type PlasmaColors} from './theme/PlasmaColors.js';\n\nexport * from '@mantine/carousel';\nexport * from '@mantine/core';\nexport {Pagination} from '@mantine/core';\nexport {type DatesRangeValue} from '@mantine/dates';\nexport * from '@mantine/form';\nexport * from '@mantine/hooks';\nexport * from '@mantine/notifications';\nexport {type NotificationsProps} from '@mantine/notifications';\nexport * from '@tanstack/table-core';\n\n// Export all components\n// Accordion\nexport {Accordion} from './components/Accordion/Accordion.js';\n\n// Action Icon - override Mantine ActionIcon\nexport {ActionIcon, type ActionIconProps} from './components/ActionIcon/ActionIcon.js';\n\n// Alert - override Mantine Alert\nexport {Alert} from './components/Alert/Alert.js';\n\n// Badge - override Mantine Badge\nexport {\n Badge,\n type BadgeOverloadFactory,\n type SemanticBadge,\n type SemanticBadgeProps,\n} from './components/Badge/Badge.js';\n\n// Blank Slate\nexport * from './components/BlankSlate/BlankSlate.js';\n\n// Browser Preview\nexport * from './components/BrowserPreview/BrowserPreview.js';\n\n// Button - override Mantine Button\nexport {Button, type ButtonProps} from './components/Button/Button.js';\nexport {type ButtonWithDisabledTooltipProps} from './components/Button/ButtonWithDisabledTooltip.js';\n\n// Checkbox\nexport * from './components/CheckboxIcon/CheckboxIcon.js';\n\n// Child Form\nexport * from './components/ChildForm/ChildForm.js';\n\n// Chip - override Mantine Chip\nexport {Chip} from './components/Chip/Chip.js';\n\n// Code Editor\nexport * from './components/CodeEditor/CodeEditor.js';\n\n// Collection\nexport * from './components/Collection/Collection.js';\nexport {enhanceWithCollectionProps} from './components/Collection/enhanceWithCollectionProps.js';\n\n// Copy to Clipboard\nexport * from './components/CopyToClipboard/CopyToClipboard.js';\n\n// Date Range Picker\nexport * from './components/DateRangePicker/DateRangePicker.js';\nexport * from './components/DateRangePicker/DateRangePickerInlineCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPopoverCalendar.js';\nexport * from './components/DateRangePicker/DateRangePickerPresetSelect.js';\n\n// Date Time Range Picker\nexport * from './components/DateTimeRangePicker/DateTimeRangePicker.js';\n\n// Ellipsis Text\nexport * from './components/EllipsisText/EllipsisText.js';\n\n// Header - override @tanstack/table-core Header\nexport {\n Header,\n type HeaderBreadcrumbsProps,\n type HeaderDocAnchorProps,\n type HeaderFactory,\n type HeaderProps,\n type HeaderRightProps,\n type HeaderStyleNames,\n type HeaderVariant,\n} from './components/Header/Header.js';\n\n// Info Token\nexport * from './components/InfoToken/InfoToken.js';\n\n// Inline Confirm\nexport * from './components/InlineConfirm/InlineConfirm.js';\nexport * from './components/InlineConfirm/InlineConfirmContext.js';\n\n// Last Updated\nexport * from './components/LastUpdated/LastUpdated.js';\n\n// Loader\nexport * from './components/CircleLoader/CircleLoader.js';\n\n// Menu - override Mantine Menu\nexport {Menu, type MenuItemProps} from './components/Menu/Menu.js';\n\n// Modal - override Mantine Modal\nexport {Modal, type ModalFactory, type ModalProps} from './components/Modal/Modal.js';\nexport * from './components/Modal/ModalFooter.js';\n\n// Prompt\nexport * from './components/Prompt/Prompt.js';\n\n// RadioCard - override Mantine RadioCard\nexport {RadioCard, type RadioCardProps} from './components/RadioCard/RadioCard.js';\n\n// Read Only - override Mantine PasswordInput and Select\nexport {PasswordInput} from './components/PasswordInput/PasswordInput.js';\nexport {Select} from './components/Select/Select.js';\n\n// Sticky Footer\nexport * from './components/StickyFooter/StickyFooter.js';\n\n// Table - override Mantine Table\nexport {flexRender as renderTableCell} from '@tanstack/react-table';\nexport {TableActionsColumn} from './components/Table/table-column/TableActionsColumn.js';\nexport {type TablePredicateProps} from './components/Table/table-predicate/TablePredicate.js';\nexport {Table, TableComponentsOrder, type PlasmaTableFactory} from './components/Table/Table.js';\nexport {\n type TableAction,\n type TableLayout,\n type TableLayoutProps,\n type TableProps,\n} from './components/Table/Table.types.js';\nexport {useTableContext} from './components/Table/TableContext.js';\nexport {useTable, type TableState, type TableStore, type UseTableOptions} from './components/Table/use-table.js';\nexport {useUrlSyncedState, type SearchParamEntry, type UseUrlSyncedStateOptions} from './hooks/use-url-synced-state.js';\n\nexport {noop};\n\n// Theme\nexport * from './theme/plasmaCSSVariablesResolver.js';\nexport * from './theme/Plasmantine.js';\n\ndeclare module '@mantine/core' {\n export interface MantineThemeColorsOverride {\n colors: Record<keyof typeof PlasmaColors | (string & {}), MantineColorsTuple>;\n }\n}\n\ndeclare module '@tanstack/react-table' {\n interface ColumnMeta<TData extends RowData, TValue> {\n /**\n * Whether the column is a control column.\n * Control columns are columns that are not part of the data but are used to control the table.\n * For example, a column that contains checkboxes to select rows.\n */\n controlColumn: boolean;\n }\n}\n"],"names":["noop","Pagination","Accordion","ActionIcon","Alert","Badge","Button","Chip","enhanceWithCollectionProps","Header","Menu","Modal","RadioCard","PasswordInput","Select","flexRender","renderTableCell","TableActionsColumn","Table","TableComponentsOrder","useTableContext","useTable","useUrlSyncedState"],"mappings":"AAAA,SAA4BA,IAAI,QAAO,gBAAgB;AAIvD,cAAc,oBAAoB;AAClC,cAAc,gBAAgB;AAC9B,SA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;AACzC,SAAQC,SAAS,QAA4B,sCAAsC;AAEnF,wDAAwD;AACxD,SAAQC,aAAa,QAAO,8CAA8C;AAC1E,SAAQC,MAAM,QAAO,gCAAgC;AAErD,gBAAgB;AAChB,cAAc,4CAA4C;AAE1D,iCAAiC;AACjC,SAAQC,cAAcC,eAAe,QAAO,wBAAwB;AACpE,SAAQC,kBAAkB,QAAO,wDAAwD;AAEzF,SAAQC,KAAK,EAAEC,oBAAoB,QAAgC,8BAA8B;AAOjG,SAAQC,eAAe,QAAO,qCAAqC;AACnE,SAAQC,QAAQ,QAA+D,kCAAkC;AACjH,SAAQC,iBAAiB,QAA6D,kCAAkC;AAExH,SAAQtB,IAAI,GAAE;AAEd,QAAQ;AACR,cAAc,wCAAwC;AACtD,cAAc,yBAAyB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coveord/plasma-mantine",
|
|
3
|
-
"version": "56.
|
|
3
|
+
"version": "56.9.0",
|
|
4
4
|
"description": "A Plasma flavoured Mantine theme",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"plasma",
|
|
@@ -81,8 +81,8 @@
|
|
|
81
81
|
"fast-deep-equal": "3.1.3",
|
|
82
82
|
"lodash.defaultsdeep": "4.6.1",
|
|
83
83
|
"monaco-editor": "0.55.1",
|
|
84
|
-
"@coveord/plasma-
|
|
85
|
-
"@coveord/plasma-
|
|
84
|
+
"@coveord/plasma-react-icons": "56.8.1",
|
|
85
|
+
"@coveord/plasma-tokens": "56.8.1"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@mantine/carousel": "8.3.10",
|
|
@@ -2,10 +2,10 @@ import {Box, Center, Factory, Loader, useProps, useStyles} from '@mantine/core';
|
|
|
2
2
|
import {useClickOutside, useMergedRef} from '@mantine/hooks';
|
|
3
3
|
import {
|
|
4
4
|
ColumnDef,
|
|
5
|
-
Row,
|
|
6
|
-
RowSelectionState,
|
|
7
5
|
defaultColumnSizing,
|
|
8
6
|
getCoreRowModel,
|
|
7
|
+
Row,
|
|
8
|
+
RowSelectionState,
|
|
9
9
|
useReactTable,
|
|
10
10
|
} from '@tanstack/react-table';
|
|
11
11
|
import isEqual from 'fast-deep-equal';
|
|
@@ -16,8 +16,8 @@ import {TableLayout, TableProps} from './Table.types.js';
|
|
|
16
16
|
import {TableProvider} from './TableContext.js';
|
|
17
17
|
import {TableLayouts} from './layouts/TableLayouts.js';
|
|
18
18
|
import {TableActionItem, TableActionItemStylesNames} from './table-actions/TableActionItem.js';
|
|
19
|
-
import {TableHeaderActionsStylesNames} from './table-actions/TableHeaderActions.js';
|
|
20
19
|
import {TableActionsListStylesNames} from './table-actions/TableActionsList.js';
|
|
20
|
+
import {TableHeaderActionsStylesNames} from './table-actions/TableHeaderActions.js';
|
|
21
21
|
import {TableActionsColumn} from './table-column/TableActionsColumn.js';
|
|
22
22
|
import {
|
|
23
23
|
TableAccordionColumn,
|
|
@@ -25,7 +25,6 @@ import {
|
|
|
25
25
|
TableCollapsibleColumnStylesNames,
|
|
26
26
|
} from './table-column/TableCollapsibleColumn.js';
|
|
27
27
|
import {TableSelectableColumn} from './table-column/TableSelectableColumn.js';
|
|
28
|
-
import {TableColumnsSelector, TableColumnsSelectorStylesNames} from './table-columns-selector/TableColumnsSelector.js';
|
|
29
28
|
import {TableDateRangePicker, TableDateRangePickerStylesNames} from './table-date-range-picker/TableDateRangePicker.js';
|
|
30
29
|
import {TableFilter, TableFilterStylesNames} from './table-filter/TableFilter.js';
|
|
31
30
|
import {TableFooter} from './table-footer/TableFooter.js';
|
|
@@ -53,8 +52,7 @@ type TableStylesNames =
|
|
|
53
52
|
| TableHeaderStylesNames
|
|
54
53
|
| TableThStylesNames
|
|
55
54
|
| TableLastUpdatedStylesNames
|
|
56
|
-
| TablePredicateStylesNames
|
|
57
|
-
| TableColumnsSelectorStylesNames;
|
|
55
|
+
| TablePredicateStylesNames;
|
|
58
56
|
|
|
59
57
|
export type PlasmaTableFactory = Factory<{
|
|
60
58
|
props: TableProps<unknown>;
|
|
@@ -65,7 +63,6 @@ export type PlasmaTableFactory = Factory<{
|
|
|
65
63
|
ActionsColumn: typeof TableActionsColumn;
|
|
66
64
|
ActionItem: typeof TableActionItem;
|
|
67
65
|
CollapsibleColumn: typeof TableCollapsibleColumn;
|
|
68
|
-
ColumnsSelector: typeof TableColumnsSelector;
|
|
69
66
|
DateRangePicker: typeof TableDateRangePicker;
|
|
70
67
|
Filter: typeof TableFilter;
|
|
71
68
|
Footer: typeof TableFooter;
|
|
@@ -297,7 +294,6 @@ export const TableComponentsOrder = {
|
|
|
297
294
|
Predicate: 5,
|
|
298
295
|
Filter: 4,
|
|
299
296
|
DateRangePicker: 3,
|
|
300
|
-
ColumnsSelector: 2,
|
|
301
297
|
LayoutControl: 1,
|
|
302
298
|
};
|
|
303
299
|
|
|
@@ -305,7 +301,6 @@ Table.AccordionColumn = TableAccordionColumn;
|
|
|
305
301
|
Table.ActionsColumn = TableActionsColumn;
|
|
306
302
|
Table.ActionItem = TableActionItem;
|
|
307
303
|
Table.CollapsibleColumn = TableCollapsibleColumn;
|
|
308
|
-
Table.ColumnsSelector = TableColumnsSelector;
|
|
309
304
|
Table.DateRangePicker = TableDateRangePicker;
|
|
310
305
|
Table.Filter = TableFilter;
|
|
311
306
|
Table.Footer = TableFooter;
|