@monolith-forensics/monolith-ui 1.1.91 → 1.2.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/dist/DateInput/DateInput.d.ts +2 -1
- package/dist/DateInput/DateInput.js +9 -6
- package/dist/DropDownMenu/DropDownMenu.js +41 -35
- package/dist/Input/Input.d.ts +1 -3
- package/dist/Input/Input.js +5 -4
- package/dist/Loader/Loader.js +0 -1
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +131 -7
- package/dist/MonolithUIProvider/MonolithUIProvider.js +4 -4
- package/dist/MonolithUIProvider/index.d.ts +1 -1
- package/dist/MonolithUIProvider/index.js +1 -1
- package/dist/QueryFilter/DefaultOperators.d.ts +77 -0
- package/dist/QueryFilter/DefaultOperators.js +22 -0
- package/dist/QueryFilter/QueryFilter.d.ts +5 -0
- package/dist/QueryFilter/QueryFilter.js +224 -0
- package/dist/QueryFilter/index.d.ts +3 -0
- package/dist/QueryFilter/index.js +3 -0
- package/dist/QueryFilter/types.d.ts +51 -0
- package/dist/QueryFilter/useQueryFilter.d.ts +3 -0
- package/dist/QueryFilter/useQueryFilter.js +36 -0
- package/dist/{NewTable → Table}/ActionCell.js +4 -3
- package/dist/{NewTable → Table}/ColumnResizer.js +1 -1
- package/dist/Table/LoadingIndicator.d.ts +4 -0
- package/dist/Table/LoadingIndicator.js +76 -0
- package/dist/Table/RenderSkeleton.d.ts +6 -0
- package/dist/Table/RenderSkeleton.js +25 -0
- package/dist/{NewTable → Table}/StateStorage.d.ts +9 -0
- package/dist/{NewTable → Table}/StateStorage.js +26 -0
- package/dist/Table/Table.d.ts +2 -92
- package/dist/Table/Table.js +73 -679
- package/dist/{NewTable → Table}/TableComponents.js +27 -22
- package/dist/{NewTable → Table}/TableDefaults.d.ts +5 -0
- package/dist/{NewTable → Table}/TableDefaults.js +6 -1
- package/dist/{NewTable → Table}/TableHeader.js +9 -8
- package/dist/Table/TableMenu/InfoBadge.d.ts +10 -0
- package/dist/Table/TableMenu/InfoBadge.js +23 -0
- package/dist/Table/TableMenu/TableMenu.d.ts +2 -0
- package/dist/Table/TableMenu/TableMenu.js +108 -0
- package/dist/Table/TableMenu/index.d.ts +2 -0
- package/dist/Table/TableMenu/index.js +2 -0
- package/dist/{NewTable → Table}/TableProvider.d.ts +1 -1
- package/dist/{NewTable → Table}/TableProvider.js +199 -30
- package/dist/{NewTable → Table}/TableRow.js +1 -1
- package/dist/{NewTable → Table}/VirtualIzedRows.d.ts +0 -1
- package/dist/{NewTable → Table}/VirtualIzedRows.js +6 -6
- package/dist/{NewTable → Table}/enums.d.ts +4 -0
- package/dist/{NewTable → Table}/enums.js +5 -0
- package/dist/Table/index.d.ts +4 -3
- package/dist/Table/index.js +4 -2
- package/dist/{NewTable → Table}/types.d.ts +77 -1
- package/dist/Table/types.js +1 -0
- package/dist/{NewTable → Table}/useTable.js +1 -1
- package/dist/TextInput/TextInput.d.ts +2 -3
- package/dist/TextInput/TextInput.js +5 -4
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.js +1 -0
- package/dist/hooks/useDelayedBoolean.d.ts +2 -0
- package/dist/hooks/useDelayedBoolean.js +17 -0
- package/dist/index.d.ts +3 -5
- package/dist/index.js +3 -3
- package/dist/theme/getTheme.d.ts +3 -0
- package/dist/theme/getTheme.js +13 -0
- package/dist/theme/index.d.ts +3 -168
- package/dist/theme/index.js +3 -12
- package/dist/theme/variants.d.ts +7 -172
- package/dist/theme/variants.js +6 -5
- package/package.json +2 -2
- package/dist/NewTable/Table.d.ts +0 -3
- package/dist/NewTable/Table.js +0 -83
- package/dist/NewTable/index.d.ts +0 -4
- package/dist/NewTable/index.js +0 -4
- /package/dist/{NewTable → QueryFilter}/types.js +0 -0
- /package/dist/{NewTable → Table}/ActionButton.d.ts +0 -0
- /package/dist/{NewTable → Table}/ActionButton.js +0 -0
- /package/dist/{NewTable → Table}/ActionCell.d.ts +0 -0
- /package/dist/{NewTable → Table}/Column.d.ts +0 -0
- /package/dist/{NewTable → Table}/Column.js +0 -0
- /package/dist/{NewTable → Table}/ColumnResizer.d.ts +0 -0
- /package/dist/{NewTable → Table}/SelectionCell.d.ts +0 -0
- /package/dist/{NewTable → Table}/SelectionCell.js +0 -0
- /package/dist/{NewTable → Table}/StaticRows.d.ts +0 -0
- /package/dist/{NewTable → Table}/StaticRows.js +0 -0
- /package/dist/{NewTable → Table}/TableComponents.d.ts +0 -0
- /package/dist/{NewTable → Table}/TableHeader.d.ts +0 -0
- /package/dist/{NewTable → Table}/TableRow.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/index.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/index.js +0 -0
- /package/dist/{NewTable → Table}/Utils/resizeHandler.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/resizeHandler.js +0 -0
- /package/dist/{NewTable → Table}/Utils/resolveColumnReorder.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/resolveColumnReorder.js +0 -0
- /package/dist/{NewTable → Table}/Utils/resolveColumnResize.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/resolveColumnResize.js +0 -0
- /package/dist/{NewTable → Table}/Utils/syncColumnState.d.ts +0 -0
- /package/dist/{NewTable → Table}/Utils/syncColumnState.js +0 -0
- /package/dist/{NewTable → Table}/useTable.d.ts +0 -0
package/dist/theme/variants.d.ts
CHANGED
|
@@ -1,173 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
typography: {
|
|
9
|
-
fontFamily: string;
|
|
10
|
-
fontSize: number;
|
|
11
|
-
fontWeightLight: number;
|
|
12
|
-
fontWeightRegular: number;
|
|
13
|
-
fontWeightMedium: number;
|
|
14
|
-
fontWeightBold: number;
|
|
15
|
-
h1: {
|
|
16
|
-
fontSize: string;
|
|
17
|
-
fontWeight: number;
|
|
18
|
-
lineHeight: number;
|
|
19
|
-
};
|
|
20
|
-
h2: {
|
|
21
|
-
fontSize: string;
|
|
22
|
-
fontWeight: number;
|
|
23
|
-
lineHeight: number;
|
|
24
|
-
};
|
|
25
|
-
h3: {
|
|
26
|
-
fontSize: string;
|
|
27
|
-
fontWeight: number;
|
|
28
|
-
lineHeight: number;
|
|
29
|
-
};
|
|
30
|
-
h4: {
|
|
31
|
-
fontSize: string;
|
|
32
|
-
fontWeight: number;
|
|
33
|
-
lineHeight: number;
|
|
34
|
-
};
|
|
35
|
-
h5: {
|
|
36
|
-
fontSize: string;
|
|
37
|
-
fontWeight: number;
|
|
38
|
-
lineHeight: number;
|
|
39
|
-
};
|
|
40
|
-
h6: {
|
|
41
|
-
fontSize: string;
|
|
42
|
-
fontWeight: number;
|
|
43
|
-
lineHeight: number;
|
|
44
|
-
};
|
|
45
|
-
body1: {
|
|
46
|
-
fontSize: number;
|
|
47
|
-
};
|
|
48
|
-
button: {
|
|
49
|
-
textTransform: string;
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
|
-
palette: {
|
|
53
|
-
mode: string;
|
|
54
|
-
primary: {
|
|
55
|
-
main: string;
|
|
56
|
-
contrastText: string;
|
|
57
|
-
};
|
|
58
|
-
error: {
|
|
59
|
-
main: string;
|
|
60
|
-
contrastText: string;
|
|
61
|
-
};
|
|
62
|
-
secondary: {
|
|
63
|
-
main: string;
|
|
64
|
-
contrastText: string;
|
|
65
|
-
};
|
|
66
|
-
third: {
|
|
67
|
-
main: string;
|
|
68
|
-
contrastText: string;
|
|
69
|
-
};
|
|
70
|
-
fourth: {
|
|
71
|
-
main: string;
|
|
72
|
-
contrastText: string;
|
|
73
|
-
};
|
|
74
|
-
background: {
|
|
75
|
-
default: string;
|
|
76
|
-
paper: string;
|
|
77
|
-
alt: string;
|
|
78
|
-
secondary: string;
|
|
79
|
-
gradient: string;
|
|
80
|
-
};
|
|
81
|
-
menu: {
|
|
82
|
-
background: string;
|
|
83
|
-
};
|
|
84
|
-
signature: {
|
|
85
|
-
penColor: string;
|
|
86
|
-
borderColor: string;
|
|
87
|
-
backgroundColor: string;
|
|
88
|
-
};
|
|
89
|
-
text: {
|
|
90
|
-
primary: string;
|
|
91
|
-
secondary: string;
|
|
92
|
-
};
|
|
93
|
-
input: {
|
|
94
|
-
background: string;
|
|
95
|
-
border: string;
|
|
96
|
-
borderHover: string;
|
|
97
|
-
borderFocus: string;
|
|
98
|
-
borderError: string;
|
|
99
|
-
borderDisabled: string;
|
|
100
|
-
text: string;
|
|
101
|
-
textDisabled: string;
|
|
102
|
-
placeholder: string;
|
|
103
|
-
};
|
|
104
|
-
textArea: {
|
|
105
|
-
background: string;
|
|
106
|
-
border: string;
|
|
107
|
-
borderHover: string;
|
|
108
|
-
borderFocus: string;
|
|
109
|
-
borderError: string;
|
|
110
|
-
borderDisabled: string;
|
|
111
|
-
text: string;
|
|
112
|
-
textDisabled: string;
|
|
113
|
-
placeholder: string;
|
|
114
|
-
};
|
|
115
|
-
dataGrid: {
|
|
116
|
-
hover: string;
|
|
117
|
-
};
|
|
118
|
-
action: {
|
|
119
|
-
hover: string;
|
|
120
|
-
};
|
|
121
|
-
divider: string;
|
|
122
|
-
};
|
|
123
|
-
header: {
|
|
124
|
-
color: string;
|
|
125
|
-
background: string;
|
|
126
|
-
search: {
|
|
127
|
-
color: string;
|
|
128
|
-
};
|
|
129
|
-
indicator: {
|
|
130
|
-
background: string;
|
|
131
|
-
};
|
|
132
|
-
};
|
|
133
|
-
footer: {
|
|
134
|
-
color: string;
|
|
135
|
-
background: string;
|
|
136
|
-
};
|
|
137
|
-
sidebar: {
|
|
138
|
-
color: string;
|
|
139
|
-
background: string;
|
|
140
|
-
active: string;
|
|
141
|
-
header: {
|
|
142
|
-
color: string;
|
|
143
|
-
background: string;
|
|
144
|
-
brand: {
|
|
145
|
-
color: string;
|
|
146
|
-
};
|
|
147
|
-
};
|
|
148
|
-
footer: {
|
|
149
|
-
color: string;
|
|
150
|
-
background: string;
|
|
151
|
-
online: {
|
|
152
|
-
background: string;
|
|
153
|
-
};
|
|
154
|
-
};
|
|
155
|
-
badge: {
|
|
156
|
-
color: string;
|
|
157
|
-
background: string;
|
|
158
|
-
};
|
|
159
|
-
};
|
|
160
|
-
scrollbar: {
|
|
161
|
-
track: string;
|
|
162
|
-
thumb: string;
|
|
163
|
-
thumbHover: string;
|
|
164
|
-
};
|
|
165
|
-
mfBorder: {
|
|
166
|
-
primary: string;
|
|
167
|
-
secondary: string;
|
|
168
|
-
};
|
|
169
|
-
zIndex: {
|
|
170
|
-
snackbar: number;
|
|
171
|
-
};
|
|
172
|
-
}[];
|
|
1
|
+
import { MonolithDefaultTheme } from "../MonolithUIProvider/MonolithUIProvider";
|
|
2
|
+
export declare enum THEMES {
|
|
3
|
+
DARK = "DARK",
|
|
4
|
+
LIGHT = "LIGHT",
|
|
5
|
+
DEFAULT = "DEFAULT"
|
|
6
|
+
}
|
|
7
|
+
declare const variants: MonolithDefaultTheme[];
|
|
173
8
|
export default variants;
|
package/dist/theme/variants.js
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import merge from "deepmerge";
|
|
2
2
|
import typography from "./typography";
|
|
3
3
|
// Themes
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
4
|
+
export var THEMES;
|
|
5
|
+
(function (THEMES) {
|
|
6
|
+
THEMES["DARK"] = "DARK";
|
|
7
|
+
THEMES["LIGHT"] = "LIGHT";
|
|
8
|
+
THEMES["DEFAULT"] = "DEFAULT";
|
|
9
|
+
})(THEMES || (THEMES = {}));
|
|
9
10
|
const customBlue = {
|
|
10
11
|
50: "#e9f0fb",
|
|
11
12
|
100: "#c8daf4",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monolith-forensics/monolith-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Matt Danner (Monolith Forensics LLC)",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"scripts": {
|
|
19
19
|
"clean": "rm -r ./dist",
|
|
20
20
|
"build": "tsc",
|
|
21
|
-
"dist-dev": "yarn
|
|
21
|
+
"dist-dev": "yarn build && npm publish --tag beta-$npm_package_version && yarn clean",
|
|
22
22
|
"release-patch": "yarn version --patch --deferred && yarn build && npm publish && yarn clean",
|
|
23
23
|
"release-minor": "yarn version --minor --deferred && yarn build && npm publish && yarn clean",
|
|
24
24
|
"release-major": "yarn version --major --deferred && yarn build && npm publish && yarn clean"
|
package/dist/NewTable/Table.d.ts
DELETED
package/dist/NewTable/Table.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
2
|
-
var t = {};
|
|
3
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4
|
-
t[p] = s[p];
|
|
5
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
7
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
8
|
-
t[p[i]] = s[p[i]];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import { useEffect, useLayoutEffect, useMemo, useRef, useState } from "react";
|
|
14
|
-
import Column from "./Column";
|
|
15
|
-
import { useOverlayScrollbars } from "overlayscrollbars-react";
|
|
16
|
-
import { StyledTable } from "./TableComponents";
|
|
17
|
-
import TableHeader from "./TableHeader";
|
|
18
|
-
import TableProvider from "./TableProvider";
|
|
19
|
-
import shortUUID from "short-uuid";
|
|
20
|
-
import VirtualizedRows from "./VirtualIzedRows";
|
|
21
|
-
import StaticRows from "./StaticRows";
|
|
22
|
-
const Table = (_a) => {
|
|
23
|
-
var { data, children } = _a, props = __rest(_a, ["data", "children"]) // pass through props straight to table context
|
|
24
|
-
;
|
|
25
|
-
const tableElement = useRef(null);
|
|
26
|
-
const targetElm = useRef(null);
|
|
27
|
-
const listElm = useRef(null);
|
|
28
|
-
const headerRowElm = useRef(null);
|
|
29
|
-
// check if children is array and convert if not
|
|
30
|
-
if (!Array.isArray(children)) {
|
|
31
|
-
children = [children];
|
|
32
|
-
}
|
|
33
|
-
const [tableDimensions, setTableDimensions] = useState({
|
|
34
|
-
width: 0,
|
|
35
|
-
height: 0,
|
|
36
|
-
});
|
|
37
|
-
const handleOnScroll = (event) => {
|
|
38
|
-
// move header row horizontally with the scroll
|
|
39
|
-
const headerRow = headerRowElm.current;
|
|
40
|
-
if (headerRow) {
|
|
41
|
-
// shift position of header row
|
|
42
|
-
headerRow.style.transform = `translateX(-${event.target.scrollLeft}px)`; // move header row horizontally with the scroll
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
const [initialize, getInstance] = useOverlayScrollbars({
|
|
46
|
-
options: {
|
|
47
|
-
scrollbars: {
|
|
48
|
-
autoHide: "scroll",
|
|
49
|
-
autoHideDelay: 500,
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
events: { scroll: (_, event) => handleOnScroll(event) },
|
|
53
|
-
});
|
|
54
|
-
const getTableDimensions = () => {
|
|
55
|
-
if (tableElement.current) {
|
|
56
|
-
const { width, height } = tableElement.current.getBoundingClientRect();
|
|
57
|
-
setTableDimensions({ width, height });
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
useEffect(() => {
|
|
61
|
-
if (targetElm.current && listElm.current) {
|
|
62
|
-
initialize({
|
|
63
|
-
target: targetElm.current,
|
|
64
|
-
elements: {
|
|
65
|
-
viewport: listElm.current,
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
return () => { var _a; return (_a = getInstance()) === null || _a === void 0 ? void 0 : _a.destroy(); };
|
|
69
|
-
}
|
|
70
|
-
}, [targetElm, listElm, initialize, getInstance]);
|
|
71
|
-
useLayoutEffect(() => {
|
|
72
|
-
getTableDimensions();
|
|
73
|
-
window.addEventListener("resize", getTableDimensions);
|
|
74
|
-
return () => {
|
|
75
|
-
window.removeEventListener("resize", getTableDimensions);
|
|
76
|
-
};
|
|
77
|
-
}, []);
|
|
78
|
-
const __data = useMemo(() => data === null || data === void 0 ? void 0 : data.map((d, i) => (Object.assign(Object.assign({}, d), { __key: shortUUID.generate(), __index: i }))), [data]);
|
|
79
|
-
return (_jsx(TableProvider, Object.assign({ columns: children
|
|
80
|
-
.filter((child) => child.type === Column)
|
|
81
|
-
.map((child) => child.props), data: __data }, props, { children: _jsxs(StyledTable, { className: "mfui-table", ref: tableElement, children: [_jsx(TableHeader, { headerRowElm: headerRowElm }), props.virtualized === true ? (_jsx(VirtualizedRows, { tableDimensions: tableDimensions, targetElm: targetElm, listElm: listElm, rowHeight: props.rowHeight, headerRowHeight: props.headerRowHeight, compact: props.compact })) : (_jsx(StaticRows, { targetElm: targetElm, listElm: listElm }))] }) })));
|
|
82
|
-
};
|
|
83
|
-
export default Table;
|
package/dist/NewTable/index.d.ts
DELETED
package/dist/NewTable/index.js
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|