slick-table 1.1.28 → 1.1.30

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.
@@ -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":"SlickgridTable.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.ts"],"names":[],"mappings":";;;;;AA4DA,wBAA6B"}
1
+ {"version":3,"file":"SlickgridTable.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/SlickgridTable/ui/SlickgridTable.style.ts"],"names":[],"mappings":";;;;;AAoIA,wBAA6B"}
@@ -1 +1 @@
1
- {"version":3,"file":"WithTableStyles.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts"],"names":[],"mappings":";;;;;AA+GA,wBAA2B"}
1
+ {"version":3,"file":"WithTableStyles.style.d.ts","sourceRoot":"","sources":["../../../../../../../../src/shared/lib/slickgrid/ui/styles/WithTableStyles/WithTableStyles.style.ts"],"names":[],"mappings":";;;;;AA0CA,wBAA2B"}
@@ -1,2 +1,3 @@
1
1
  export { WithTableStyles } from './WithTableStyles';
2
+ export { wink } from './keyframes';
2
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/ui/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/shared/lib/slickgrid/ui/styles/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,5 @@
1
+ /** The css class is used for making cell wink */
2
+ export declare const WINK = "wink";
3
+ /** The css class is used for increasing font weight */
4
+ export declare const BOLD = "bold";
5
+ //# sourceMappingURL=cssClasses.d.ts.map
@@ -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,4 +1,5 @@
1
1
  export { CHECKBOX_SELECTOR } from './columnId';
2
+ export { BOLD, WINK } from './cssClasses';
2
3
  export { dateFormats } from './dateFormats';
3
4
  export { INVALID_DATE } from './invalidDate';
4
5
  export { NO_PRIVILEGES_MESSAGE } from './noPrivilegesMessage';
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slick-table",
3
- "version": "1.1.28",
3
+ "version": "1.1.30",
4
4
  "description": "Enhanced version of SlickGrid library",
5
5
  "private": false,
6
6
  "type": "module",
package/src/index.ts CHANGED
@@ -51,6 +51,7 @@ export type {
51
51
  ISlickTable,
52
52
  ITotalCalculator,
53
53
  } from "shared/model/types";
54
+ export { BOLD, WINK } from "shared/model/consts";
54
55
  export {
55
56
  EColumnFilter,
56
57
  EColumnFiltersGroup,
@@ -1,15 +1,73 @@
1
1
  import { Box, styled } from "@mui/material";
2
2
 
3
+ import { wink } from "../../styles";
4
+
3
5
  const fontSize = "0.75rem";
6
+ const cellHeight = "24px";
4
7
 
5
8
  const Container = styled(Box)({
9
+ backgroundColor: "transparent",
10
+ fontFamily: "inherit",
11
+ height: "100%",
12
+ maxHeight: "100%",
13
+ maxWidth: "100%",
14
+ userSelect: "none",
15
+
6
16
  "& .slick-header-column": {
17
+ "&.filter-active .slick-header-button::after": {
18
+ width: "7px",
19
+ height: "7px",
20
+ content: "''",
21
+ backgroundColor: "#2196f3",
22
+ position: "absolute",
23
+ borderRadius: "50%",
24
+ border: "2px solid #f8f8f8",
25
+ top: "3px",
26
+ right: "3px",
27
+ },
28
+ "&:not([data-id=_checkbox_selector]):not([data-id=isEdited])": {
29
+ "& .slick-column-name": {
30
+ textOverflow: "ellipsis",
31
+ whiteSpace: "nowrap",
32
+ overflow: "hidden",
33
+ maxWidth: "calc(100% - 16px)",
34
+ },
35
+ },
36
+ "&.slick-state-hover": {
37
+ "&.filter-active .slick-header-button::after": {
38
+ border: "2px solid #e8e8e8",
39
+ },
40
+ "& .slick-header-button": {
41
+ "&::before": {
42
+ backgroundColor: "#e8e8e8",
43
+ },
44
+ },
45
+ },
7
46
  "& .slick-column-name": {
8
47
  fontSize,
9
48
  },
49
+ "& .slick-header-button": {
50
+ width: "19px",
51
+ height: "12px",
52
+ "&::before": {
53
+ position: "absolute",
54
+ content: "''",
55
+ width: "19px",
56
+ height: "12px",
57
+ top: "6px",
58
+ right: "5px",
59
+ backgroundImage:
60
+ "repeating-linear-gradient(0deg, #808080, #808080 2px, transparent 2px, transparent 4px)",
61
+ clipPath: "polygon(0% 0%, 100% 0%, 50% 110%)",
62
+ backgroundColor: "#f8f8f8",
63
+ },
64
+ },
10
65
  },
11
66
 
12
67
  "& .slick-viewport": {
68
+ // Prevent displaying vertical scroll bar. Override this style when table exceeds available width
69
+ overflowX: "hidden !important",
70
+ backgroundColor: "transparent",
13
71
  "& .slick-cell": {
14
72
  display: "flex",
15
73
  fontSize,
@@ -21,14 +79,28 @@ const Container = styled(Box)({
21
79
  justifyContent: "end",
22
80
  textAlign: "right",
23
81
  },
82
+ "&.bold": {
83
+ fontWeight: "bold",
84
+ },
85
+ "&.wink": {
86
+ animation: `${wink} infinite 0.5s linear`,
87
+ "& input": {
88
+ animation: `${wink} infinite 0.5s linear`,
89
+ },
90
+ },
91
+ "& input.editor-text": {
92
+ textAlign: "inherit",
93
+ },
24
94
  "& #autocomplete": {
95
+ boxShadow: "0 0 5px 1px gray",
96
+ fontSize,
25
97
  margin: 0,
26
- padding: 0,
27
98
  maxHeight: "300px",
28
- width: "100%",
99
+ minWidth: "100%",
29
100
  overflow: "auto",
30
- fontSize,
31
- boxShadow: "0 0 5px 1px gray",
101
+ padding: 0,
102
+ position: "absolute",
103
+ top: cellHeight,
32
104
  "& div": {
33
105
  "&:hover": {
34
106
  cursor: "pointer",
@@ -1,64 +1,10 @@
1
1
  import { Box, styled } from "@mui/material";
2
2
 
3
- import { wink } from "../keyframes";
4
-
5
3
  const Wrapper = styled(Box)(({ theme }) => ({
6
4
  "& .slick-container": {
7
- userSelect: "none",
8
- maxWidth: "100%",
9
- height: "100%",
10
- maxHeight: "100%",
11
5
  color: theme.palette.text.primary,
12
6
  borderColor: theme.palette.background.paper,
13
- fontFamily: "inherit",
14
7
 
15
- "& .slick-header-column": {
16
- "&.filter-active .slick-header-button::after": {
17
- width: "7px",
18
- height: "7px",
19
- content: "''",
20
- backgroundColor: "#2196f3",
21
- position: "absolute",
22
- borderRadius: "50%",
23
- border: "2px solid #f8f8f8",
24
- top: "3px",
25
- right: "3px",
26
- },
27
- "&:not([data-id=_checkbox_selector]):not([data-id=isEdited])": {
28
- "& .slick-column-name": {
29
- textOverflow: "ellipsis",
30
- whiteSpace: "nowrap",
31
- overflow: "hidden",
32
- maxWidth: "calc(100% - 16px)",
33
- },
34
- },
35
- "&.slick-state-hover": {
36
- "&.filter-active .slick-header-button::after": {
37
- border: "2px solid #e8e8e8",
38
- },
39
- "& .slick-header-button": {
40
- "&::before": {
41
- backgroundColor: "#e8e8e8",
42
- },
43
- },
44
- },
45
- "& .slick-header-button": {
46
- width: "19px",
47
- height: "12px",
48
- "&::before": {
49
- position: "absolute",
50
- content: "''",
51
- width: "19px",
52
- height: "12px",
53
- top: "6px",
54
- right: "5px",
55
- backgroundImage:
56
- "repeating-linear-gradient(0deg, #808080, #808080 2px, transparent 2px, transparent 4px)",
57
- clipPath: "polygon(0% 0%, 100% 0%, 50% 110%)",
58
- backgroundColor: "#f8f8f8",
59
- },
60
- },
61
- },
62
8
  "& .slick-viewport": {
63
9
  backgroundColor: theme.palette.background.paper,
64
10
  "& .grid-canvas": {
@@ -76,21 +22,6 @@ const Wrapper = styled(Box)(({ theme }) => ({
76
22
  "&.selected": {
77
23
  color: theme.palette.text.primary,
78
24
  },
79
- "&.text-right": {
80
- textAlign: "right",
81
- },
82
- "&.bold": {
83
- fontWeight: "bold",
84
- },
85
- "&.wink": {
86
- animation: `${wink} infinite 0.5s linear`,
87
- "& input": {
88
- animation: `${wink} infinite 0.5s linear`,
89
- },
90
- },
91
- "& input.editor-text": {
92
- textAlign: "inherit",
93
- },
94
25
  "& select": {
95
26
  color: theme.palette.text.primary,
96
27
  backgroundColor: theme.palette.background.default,
@@ -1 +1,2 @@
1
1
  export { WithTableStyles } from "./WithTableStyles";
2
+ export { wink } from "./keyframes";
@@ -0,0 +1,4 @@
1
+ /** The css class is used for making cell wink */
2
+ export const WINK = "wink";
3
+ /** The css class is used for increasing font weight */
4
+ export const BOLD = "bold";
@@ -1,4 +1,5 @@
1
1
  export { CHECKBOX_SELECTOR } from "./columnId";
2
+ export { BOLD, WINK } from "./cssClasses";
2
3
  export { dateFormats } from "./dateFormats";
3
4
  export { INVALID_DATE } from "./invalidDate";
4
5
  export { NO_PRIVILEGES_MESSAGE } from "./noPrivilegesMessage";