slick-table 1.1.29 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +59 -59
- package/dist/index.es.js +1162 -1155
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/lib/functions/copySelectedRows.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.d.ts.map +1 -1
- package/dist/types/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.d.ts.map +1 -1
- package/dist/types/shared/model/consts/cssClasses.d.ts +5 -0
- package/dist/types/shared/model/consts/cssClasses.d.ts.map +1 -0
- package/dist/types/shared/model/consts/index.d.ts +1 -0
- package/dist/types/shared/model/consts/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.ts +1 -0
- package/src/shared/lib/slickgrid/lib/functions/copySelectedRows.ts +3 -2
- package/src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.ts +13 -0
- package/src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts +0 -8
- package/src/shared/model/consts/cssClasses.ts +4 -0
- package/src/shared/model/consts/index.ts +1 -0
package/dist/types/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export { HeaderContextMenu } from './features/header-context-menu';
|
|
|
6
6
|
export { Autocomplete, ColumnPicker, ColumnSorter, DecoratorColumnFilter, DecoratorFilter, DefaultHotKeys, DefaultPrinter, DeletedRowsFilter, FORMATTER_NUMBER, Filter, HotKeysDecorator, PreventCopying, RedoUndoOnly, SlickTable, SlickgridTable, TotalCalculator, WithSummary, WithoutHotKeys, columnIsEdited, columnCheckboxSelector, commitCurrentEdit, copySelectedRows, formatterGroupTotals, getDisplayedRows, getFormatterNumber, getNextId, handleHeaderButtons, headerButtons, hotKeysCopy, hotKeysDelete, hotKeysRedo, hotKeysUndo, openColumnFilter, openContextMenu, useListenIfTablesWereEdited, } from './shared/lib/slickgrid';
|
|
7
7
|
export { formatNumber } from './shared/lib/format';
|
|
8
8
|
export type { IColumn, IFilter, IFilterArguments, IFormatterNumberOptions, IHotKeysBehavior, IPrinter, ISlickTable, ITotalCalculator, } from './shared/model/types';
|
|
9
|
+
export { BOLD, WINK } from './shared/model/consts';
|
|
9
10
|
export { EColumnFilter, EColumnFiltersGroup, ESortType, } from './shared/model/enums';
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAC;AACjE,OAAO,EACN,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,qBAAqB,EACrB,eAAe,EACf,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,YAAY,EACZ,UAAU,EACV,cAAc,EACd,eAAe,EACf,WAAW,EACX,cAAc,EACd,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,kBAAkB,EAClB,SAAS,EACT,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,eAAe,EACf,2BAA2B,GAC3B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EACX,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,QAAQ,EACR,WAAW,EACX,gBAAgB,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,SAAS,GACT,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"copySelectedRows.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/lib/functions/copySelectedRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,WAAW,CAAC;AAMrD,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"copySelectedRows.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/lib/functions/copySelectedRows.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,SAAS,EAAE,MAAM,WAAW,CAAC;AAMrD,eAAO,MAAM,gBAAgB,GAAI,MAAM,SAAS,KAAG,IA4BlD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlickgridTable.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"SlickgridTable.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.ts"],"names":[],"mappings":";;;;;AAoIA,wBAA6B"}
|
package/dist/types/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WithTableStyles.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts"],"names":[],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"WithTableStyles.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts"],"names":[],"mappings":";;;;;AA0CA,wBAA2B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cssClasses.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/consts/cssClasses.ts"],"names":[],"mappings":"AAAA,iDAAiD;AACjD,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,uDAAuD;AACvD,eAAO,MAAM,IAAI,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/model/consts/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC"}
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -11,18 +11,19 @@ export const copySelectedRows = (grid: SlickGrid): void => {
|
|
|
11
11
|
const rows = dataView.getItems();
|
|
12
12
|
const newRows: any[] = [];
|
|
13
13
|
const idPropertyName = dataView.getIdPropertyName();
|
|
14
|
+
let nextId = getNextId(grid);
|
|
14
15
|
if (selectedRows.length) {
|
|
15
16
|
selectedRows.forEach((row: number) => {
|
|
16
17
|
newRows.push({
|
|
17
18
|
...displayedRows[row],
|
|
18
|
-
[idPropertyName]:
|
|
19
|
+
[idPropertyName]: nextId++,
|
|
19
20
|
isEdited: true,
|
|
20
21
|
isNew: true,
|
|
21
22
|
});
|
|
22
23
|
});
|
|
23
24
|
} else {
|
|
24
25
|
newRows.push({
|
|
25
|
-
[idPropertyName]:
|
|
26
|
+
[idPropertyName]: nextId,
|
|
26
27
|
isEdited: true,
|
|
27
28
|
isNew: true,
|
|
28
29
|
});
|
|
@@ -6,6 +6,13 @@ const fontSize = "0.75rem";
|
|
|
6
6
|
const cellHeight = "24px";
|
|
7
7
|
|
|
8
8
|
const Container = styled(Box)({
|
|
9
|
+
backgroundColor: "transparent",
|
|
10
|
+
fontFamily: "inherit",
|
|
11
|
+
height: "100%",
|
|
12
|
+
maxHeight: "100%",
|
|
13
|
+
maxWidth: "100%",
|
|
14
|
+
userSelect: "none",
|
|
15
|
+
|
|
9
16
|
"& .slick-header-column": {
|
|
10
17
|
"&.filter-active .slick-header-button::after": {
|
|
11
18
|
width: "7px",
|
|
@@ -58,6 +65,9 @@ const Container = styled(Box)({
|
|
|
58
65
|
},
|
|
59
66
|
|
|
60
67
|
"& .slick-viewport": {
|
|
68
|
+
// Prevent displaying vertical scroll bar. Override this style when table exceeds available width
|
|
69
|
+
overflowX: "hidden !important",
|
|
70
|
+
backgroundColor: "transparent",
|
|
61
71
|
"& .slick-cell": {
|
|
62
72
|
display: "flex",
|
|
63
73
|
fontSize,
|
|
@@ -69,6 +79,9 @@ const Container = styled(Box)({
|
|
|
69
79
|
justifyContent: "end",
|
|
70
80
|
textAlign: "right",
|
|
71
81
|
},
|
|
82
|
+
"&.bold": {
|
|
83
|
+
fontWeight: "bold",
|
|
84
|
+
},
|
|
72
85
|
"&.wink": {
|
|
73
86
|
animation: `${wink} infinite 0.5s linear`,
|
|
74
87
|
"& input": {
|
|
@@ -2,13 +2,8 @@ import { Box, styled } from "@mui/material";
|
|
|
2
2
|
|
|
3
3
|
const Wrapper = styled(Box)(({ theme }) => ({
|
|
4
4
|
"& .slick-container": {
|
|
5
|
-
userSelect: "none",
|
|
6
|
-
maxWidth: "100%",
|
|
7
|
-
height: "100%",
|
|
8
|
-
maxHeight: "100%",
|
|
9
5
|
color: theme.palette.text.primary,
|
|
10
6
|
borderColor: theme.palette.background.paper,
|
|
11
|
-
fontFamily: "inherit",
|
|
12
7
|
|
|
13
8
|
"& .slick-viewport": {
|
|
14
9
|
backgroundColor: theme.palette.background.paper,
|
|
@@ -27,9 +22,6 @@ const Wrapper = styled(Box)(({ theme }) => ({
|
|
|
27
22
|
"&.selected": {
|
|
28
23
|
color: theme.palette.text.primary,
|
|
29
24
|
},
|
|
30
|
-
"&.bold": {
|
|
31
|
-
fontWeight: "bold",
|
|
32
|
-
},
|
|
33
25
|
"& select": {
|
|
34
26
|
color: theme.palette.text.primary,
|
|
35
27
|
backgroundColor: theme.palette.background.default,
|