@monolith-forensics/monolith-ui 1.8.1-dev.2 → 1.8.1-dev.3
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/Calendar/Calendar.d.ts +4 -1
- package/dist/Calendar/Calendar.js +126 -50
- package/dist/Calendar/CalendarStyles.d.ts +3 -2
- package/dist/Calendar/CalendarStyles.js +62 -23
- package/dist/Calendar/calendarHelpers.d.ts +1 -1
- package/dist/CheckBox/CheckBox.js +35 -4
- package/dist/DateTimeRangePicker/DateTimeRangePicker.d.ts +41 -0
- package/dist/DateTimeRangePicker/DateTimeRangePicker.js +363 -0
- package/dist/DateTimeRangePicker/index.d.ts +2 -0
- package/dist/DateTimeRangePicker/index.js +2 -0
- package/dist/DropDownMenu/DropDownMenu.js +25 -15
- package/dist/DropDownMenu/components/MenuComponent.js +6 -1
- package/dist/DropDownMenu/components/MenuItem.js +6 -0
- package/dist/DropDownMenu/components/MenuItemList.d.ts +2 -0
- package/dist/DropDownMenu/components/MenuItemList.js +94 -13
- package/dist/DropDownMenu/components/StyledContent.js +1 -2
- package/dist/DropDownMenu/types.d.ts +1 -0
- package/dist/FileViewer/viewers/ImageViewer.js +75 -18
- package/dist/MonolithUIProvider/MonolithUIProvider.d.ts +1 -0
- package/dist/QueryFilter/DefaultOperators.d.ts +1 -76
- package/dist/QueryFilter/DefaultOperators.js +1 -21
- package/dist/QueryFilter/QueryFilter.constants.d.ts +134 -0
- package/dist/QueryFilter/QueryFilter.constants.js +39 -0
- package/dist/QueryFilter/QueryFilter.d.ts +1 -1
- package/dist/QueryFilter/QueryFilter.js +3 -303
- package/dist/QueryFilter/QueryFilter.lib.d.ts +14 -0
- package/dist/QueryFilter/QueryFilter.lib.js +84 -0
- package/dist/QueryFilter/QueryFilter.styled.d.ts +89 -0
- package/dist/QueryFilter/QueryFilter.styled.js +184 -0
- package/dist/QueryFilter/QueryFilter.types.d.ts +61 -0
- package/dist/QueryFilter/QueryFilter.types.js +1 -0
- package/dist/QueryFilter/components/MultiSelectEditor.d.ts +7 -0
- package/dist/QueryFilter/components/MultiSelectEditor.js +44 -0
- package/dist/QueryFilter/components/RuleChip.d.ts +8 -0
- package/dist/QueryFilter/components/RuleChip.js +37 -0
- package/dist/QueryFilter/components/Rules.d.ts +11 -0
- package/dist/QueryFilter/components/Rules.js +41 -0
- package/dist/QueryFilter/components/UnavailableRuleChip.d.ts +5 -0
- package/dist/QueryFilter/components/UnavailableRuleChip.js +7 -0
- package/dist/QueryFilter/components/ValueEditor.d.ts +7 -0
- package/dist/QueryFilter/components/ValueEditor.js +45 -0
- package/dist/QueryFilter/components/ValueSelector.d.ts +7 -0
- package/dist/QueryFilter/components/ValueSelector.js +34 -0
- package/dist/QueryFilter/components/index.d.ts +6 -0
- package/dist/QueryFilter/components/index.js +6 -0
- package/dist/QueryFilter/index.d.ts +3 -2
- package/dist/QueryFilter/index.js +3 -2
- package/dist/QueryFilter/types.d.ts +1 -52
- package/dist/QueryFilter/types.js +1 -1
- package/dist/QueryFilter/useQueryFilter.d.ts +1 -1
- package/dist/QueryFilter/useQueryFilter.js +23 -19
- package/dist/RichTextEditor/Extensions/getTiptapExtensions.js +5 -15
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.d.ts +3 -0
- package/dist/RichTextEditor/Plugins/ImageActionsPlugin.js +241 -0
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.d.ts +15 -0
- package/dist/RichTextEditor/Plugins/UploadImagesPlugin.js +115 -51
- package/dist/RichTextEditor/Plugins/index.d.ts +1 -0
- package/dist/RichTextEditor/Plugins/index.js +1 -0
- package/dist/RichTextEditor/RichTextEditor.d.ts +3 -2
- package/dist/RichTextEditor/RichTextEditor.js +302 -35
- package/dist/SuperDatePicker/SuperDatePicker.constants.d.ts +24 -0
- package/dist/SuperDatePicker/SuperDatePicker.constants.js +30 -0
- package/dist/SuperDatePicker/SuperDatePicker.d.ts +3 -0
- package/dist/SuperDatePicker/SuperDatePicker.js +31 -0
- package/dist/SuperDatePicker/SuperDatePicker.lib.d.ts +17 -0
- package/dist/SuperDatePicker/SuperDatePicker.lib.js +206 -0
- package/dist/SuperDatePicker/SuperDatePicker.styled.d.ts +60 -0
- package/dist/SuperDatePicker/SuperDatePicker.styled.js +256 -0
- package/dist/SuperDatePicker/SuperDatePicker.types.d.ts +48 -0
- package/dist/SuperDatePicker/SuperDatePicker.types.js +1 -0
- package/dist/SuperDatePicker/components/CommonPresetGroups.d.ts +7 -0
- package/dist/SuperDatePicker/components/CommonPresetGroups.js +6 -0
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.d.ts +10 -0
- package/dist/SuperDatePicker/components/EndpointCalendarDropdown.js +9 -0
- package/dist/SuperDatePicker/components/EndpointDateInput.d.ts +16 -0
- package/dist/SuperDatePicker/components/EndpointDateInput.js +26 -0
- package/dist/SuperDatePicker/components/EndpointPopover.d.ts +18 -0
- package/dist/SuperDatePicker/components/EndpointPopover.js +11 -0
- package/dist/SuperDatePicker/components/QuickRangeDropdown.d.ts +14 -0
- package/dist/SuperDatePicker/components/QuickRangeDropdown.js +19 -0
- package/dist/SuperDatePicker/components/QuickRangePopover.d.ts +18 -0
- package/dist/SuperDatePicker/components/QuickRangePopover.js +12 -0
- package/dist/SuperDatePicker/components/index.d.ts +6 -0
- package/dist/SuperDatePicker/components/index.js +6 -0
- package/dist/SuperDatePicker/index.d.ts +3 -0
- package/dist/SuperDatePicker/index.js +3 -0
- package/dist/SuperDatePicker/useSuperDatePicker.d.ts +32 -0
- package/dist/SuperDatePicker/useSuperDatePicker.js +125 -0
- package/dist/Table/ColumnResizer.d.ts +6 -9
- package/dist/Table/ColumnResizer.js +30 -10
- package/dist/Table/TableComponents.js +14 -10
- package/dist/Table/TableHeader.js +31 -16
- package/dist/Table/TableMenu/TableMenu.js +1 -1
- package/dist/Table/TableProvider.js +91 -4
- package/dist/Table/TableRow.js +19 -12
- package/dist/Table/Utils/index.d.ts +0 -1
- package/dist/Table/Utils/index.js +0 -1
- package/dist/Table/types.d.ts +6 -19
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/theme/variants.js +2 -0
- package/package.json +22 -18
|
@@ -68,6 +68,69 @@ const calculateSelectionTotal = (selectionState, totalRecords, dataLength = 0) =
|
|
|
68
68
|
}
|
|
69
69
|
};
|
|
70
70
|
export const TableContext = createContext(null);
|
|
71
|
+
const expandColumnWidthsToTable = ({ columnWidths, columns, expansionColumns, tableWidth, fixedCellWidth, }) => {
|
|
72
|
+
const availableWidth = Math.max(tableWidth - fixedCellWidth, 0);
|
|
73
|
+
const columnWidthTotal = columns.reduce((sum, column) => {
|
|
74
|
+
return sum + (columnWidths[column.columnId] || 0);
|
|
75
|
+
}, 0);
|
|
76
|
+
const remainingWidth = availableWidth - columnWidthTotal;
|
|
77
|
+
if (remainingWidth <= 0 || columns.length === 0) {
|
|
78
|
+
return columnWidths;
|
|
79
|
+
}
|
|
80
|
+
const targetColumns = expansionColumns.length > 0
|
|
81
|
+
? expansionColumns
|
|
82
|
+
: [columns[columns.length - 1]].filter(Boolean);
|
|
83
|
+
const widthToAdd = remainingWidth / targetColumns.length;
|
|
84
|
+
return targetColumns.reduce((widths, column) => (Object.assign(Object.assign({}, widths), { [column.columnId]: (widths[column.columnId] || column.minWidth) + widthToAdd })), columnWidths);
|
|
85
|
+
};
|
|
86
|
+
const getVisibleColumnLayout = ({ columns, tableWidth, fixedCellWidth, resizeColumnWidths, }) => {
|
|
87
|
+
const visibleColumns = columns.filter((column) => column.visible !== false);
|
|
88
|
+
const fluidColumns = visibleColumns.filter((column) => typeof column.width !== "number" || column.width <= 0);
|
|
89
|
+
if (resizeColumnWidths) {
|
|
90
|
+
const columnWidths = expandColumnWidthsToTable({
|
|
91
|
+
columnWidths: resizeColumnWidths,
|
|
92
|
+
columns: visibleColumns,
|
|
93
|
+
expansionColumns: fluidColumns,
|
|
94
|
+
tableWidth,
|
|
95
|
+
fixedCellWidth,
|
|
96
|
+
});
|
|
97
|
+
const contentWidth = fixedCellWidth +
|
|
98
|
+
visibleColumns.reduce((sum, column) => {
|
|
99
|
+
return sum + (columnWidths[column.columnId] || column.minWidth);
|
|
100
|
+
}, 0);
|
|
101
|
+
return {
|
|
102
|
+
contentWidth: Math.max(tableWidth, contentWidth),
|
|
103
|
+
columnWidths,
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
const fixedColumns = visibleColumns.filter((column) => typeof column.width === "number" && column.width > 0);
|
|
107
|
+
const fixedWidth = fixedColumns.reduce((sum, column) => sum + column.width, 0);
|
|
108
|
+
const fluidMinWidth = fluidColumns.reduce((sum, column) => sum + column.minWidth, 0);
|
|
109
|
+
const availableFluidWidth = Math.max(tableWidth - fixedCellWidth - fixedWidth, fluidMinWidth);
|
|
110
|
+
const fluidWidth = fluidColumns.length > 0 ? availableFluidWidth / fluidColumns.length : 0;
|
|
111
|
+
const baseColumnWidths = visibleColumns.reduce((widths, column) => {
|
|
112
|
+
widths[column.columnId] =
|
|
113
|
+
typeof column.width === "number" && column.width > 0
|
|
114
|
+
? column.width
|
|
115
|
+
: Math.max(column.minWidth, fluidWidth);
|
|
116
|
+
return widths;
|
|
117
|
+
}, {});
|
|
118
|
+
const columnWidths = expandColumnWidthsToTable({
|
|
119
|
+
columnWidths: baseColumnWidths,
|
|
120
|
+
columns: visibleColumns,
|
|
121
|
+
expansionColumns: fluidColumns,
|
|
122
|
+
tableWidth,
|
|
123
|
+
fixedCellWidth,
|
|
124
|
+
});
|
|
125
|
+
const contentWidth = fixedCellWidth +
|
|
126
|
+
visibleColumns.reduce((sum, column) => {
|
|
127
|
+
return sum + columnWidths[column.columnId];
|
|
128
|
+
}, 0);
|
|
129
|
+
return {
|
|
130
|
+
contentWidth: Math.max(tableWidth, contentWidth),
|
|
131
|
+
columnWidths,
|
|
132
|
+
};
|
|
133
|
+
};
|
|
71
134
|
const TableProvider = (_a) => {
|
|
72
135
|
var { children, columns, data, keyField, tableInstanceRef, stateStorage, tableMenuOptions, manualSorting, manualFiltering, manualSearch, manualExport, height, maxHeight, minHeight, focusedRowId, enableColumnResize, enableSorting, compact, totalRecords, onColumnStateChange, onColumnReorder, onColumnHeaderClick, onSort, onRowUpdated, tableElement, headerRowElm, tableDimensions, targetElm, listElm, defaultSelectionState, selectionState, onSelectionChange, defaultFilterState, filterState, onFilterChange, treeOptions, treeMeta, defaultExpandedKeys, expandedKeys, onExpandedChange } = _a, props = __rest(_a, ["children", "columns", "data", "keyField", "tableInstanceRef", "stateStorage", "tableMenuOptions", "manualSorting", "manualFiltering", "manualSearch", "manualExport", "height", "maxHeight", "minHeight", "focusedRowId", "enableColumnResize", "enableSorting", "compact", "totalRecords", "onColumnStateChange", "onColumnReorder", "onColumnHeaderClick", "onSort", "onRowUpdated", "tableElement", "headerRowElm", "tableDimensions", "targetElm", "listElm", "defaultSelectionState", "selectionState", "onSelectionChange", "defaultFilterState", "filterState", "onFilterChange", "treeOptions", "treeMeta", "defaultExpandedKeys", "expandedKeys", "onExpandedChange"]);
|
|
73
136
|
const _treeOptions = treeOptions || DEFAULT_TREE_OPTIONS;
|
|
@@ -105,6 +168,7 @@ const TableProvider = (_a) => {
|
|
|
105
168
|
const { columnState: savedColumnState, selectionState: savedSelectionState, sortState: savedSortState, searchState: savedSearchState, filterState: savedFilterState, expandedKeys: savedExpandedKeys, } = savedTableState || {};
|
|
106
169
|
const [compactState, setCompactState] = useState(compact || false);
|
|
107
170
|
const [columnState, _setColumnState] = useState(syncColumnState(_columns, savedColumnState));
|
|
171
|
+
const [resizeColumnWidths, setResizeColumnWidths] = useState(null);
|
|
108
172
|
const columnStateRef = useRef(columnState);
|
|
109
173
|
useEffect(() => {
|
|
110
174
|
columnStateRef.current = columnState;
|
|
@@ -142,6 +206,19 @@ const TableProvider = (_a) => {
|
|
|
142
206
|
return Object.assign(Object.assign({}, prev), { selectedRowKeys });
|
|
143
207
|
});
|
|
144
208
|
};
|
|
209
|
+
const tableLayout = useMemo(() => getVisibleColumnLayout({
|
|
210
|
+
columns: columnState,
|
|
211
|
+
tableWidth: tableDimensions.width,
|
|
212
|
+
fixedCellWidth: (props.enableSelection ? TableDefaults.actionCell.width : 0) +
|
|
213
|
+
(props.enableActionButton ? TableDefaults.actionCell.width : 0),
|
|
214
|
+
resizeColumnWidths,
|
|
215
|
+
}), [
|
|
216
|
+
columnState,
|
|
217
|
+
tableDimensions.width,
|
|
218
|
+
props.enableSelection,
|
|
219
|
+
props.enableActionButton,
|
|
220
|
+
resizeColumnWidths,
|
|
221
|
+
]);
|
|
145
222
|
const getCalculatedSelectionTotal = () => {
|
|
146
223
|
return calculateSelectionTotal({
|
|
147
224
|
selectedRowKeys,
|
|
@@ -383,7 +460,6 @@ const TableProvider = (_a) => {
|
|
|
383
460
|
};
|
|
384
461
|
};
|
|
385
462
|
const rowMatchesRule = (row, rule) => {
|
|
386
|
-
var _a, _b, _c, _d;
|
|
387
463
|
const column = columnState.find((col) => col.dataField === rule.dataField);
|
|
388
464
|
const { value, operator, dataField } = rule;
|
|
389
465
|
if (operator.value === "isEmpty") {
|
|
@@ -395,6 +471,15 @@ const TableProvider = (_a) => {
|
|
|
395
471
|
if (!value || value.length === 0) {
|
|
396
472
|
return true;
|
|
397
473
|
}
|
|
474
|
+
if ((operator.value === "between" || operator.value === "notBetween") &&
|
|
475
|
+
(value[0] == null ||
|
|
476
|
+
value[0] === "" ||
|
|
477
|
+
value[1] == null ||
|
|
478
|
+
value[1] === "")) {
|
|
479
|
+
return true;
|
|
480
|
+
}
|
|
481
|
+
const fieldText = row[dataField] == null ? "" : row[dataField].toString().toLowerCase();
|
|
482
|
+
const ruleText = value[0] == null ? "" : value[0].toString().toLowerCase();
|
|
398
483
|
switch (operator.value) {
|
|
399
484
|
case "=":
|
|
400
485
|
if ((column === null || column === void 0 ? void 0 : column.dataType) === "date") {
|
|
@@ -463,9 +548,9 @@ const TableProvider = (_a) => {
|
|
|
463
548
|
return (row[dataField] < value[0] ||
|
|
464
549
|
row[dataField] > value[1]);
|
|
465
550
|
case "contains":
|
|
466
|
-
return
|
|
551
|
+
return fieldText.includes(ruleText);
|
|
467
552
|
case "doesNotContain":
|
|
468
|
-
return !
|
|
553
|
+
return !fieldText.includes(ruleText);
|
|
469
554
|
case "in":
|
|
470
555
|
if (!Array.isArray(value) || value.length === 0) {
|
|
471
556
|
return true;
|
|
@@ -801,7 +886,9 @@ const TableProvider = (_a) => {
|
|
|
801
886
|
},
|
|
802
887
|
};
|
|
803
888
|
}
|
|
804
|
-
return (_jsx(TableContext.Provider, { value: Object.assign({ columnState, setColumnState: updateColumnState,
|
|
889
|
+
return (_jsx(TableContext.Provider, { value: Object.assign({ columnState, setColumnState: updateColumnState, tableLayout,
|
|
890
|
+
setResizeColumnWidths,
|
|
891
|
+
sortState, searchState: search, totalRecords,
|
|
805
892
|
keyField,
|
|
806
893
|
handleColumnReorder,
|
|
807
894
|
handleColumnHeaderClick, selectionState: _selectionState, selectRow,
|
package/dist/Table/TableRow.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { ChevronRightIcon, Maximize2Icon } from "lucide-react";
|
|
3
|
-
import ColumnResizer from "./ColumnResizer";
|
|
4
3
|
import { InnerCellContent, TD, TR, TreeCellContent, TreeCellWrapper, TreeChevronButton, TreeChevronPlaceholder, TreeIndentSpacer, } from "./TableComponents";
|
|
5
4
|
import useTable from "./useTable";
|
|
6
5
|
import ActionCell from "./ActionCell";
|
|
@@ -8,21 +7,25 @@ import ActionButton from "./ActionButton";
|
|
|
8
7
|
import CheckBox from "../CheckBox";
|
|
9
8
|
import { LoadingCellIndicator } from "./LoadingCellIndicator";
|
|
10
9
|
const TableRow = ({ rowData, loading, rowStyle }) => {
|
|
11
|
-
const { columnState, enableActionButton, onActionButtonClick, actionButtonIcon: Icon, enableSelection, selectRow, deselectRow, isRowSelected, isRowFocused, onRowUpdated, treeOptions, firstVisibleDataField, isRowExpanded, toggleRowExpanded, } = useTable();
|
|
10
|
+
const { columnState, enableActionButton, onActionButtonClick, actionButtonIcon: Icon, enableSelection, selectRow, deselectRow, isRowSelected, isRowFocused, onRowUpdated, treeOptions, firstVisibleDataField, isRowExpanded, toggleRowExpanded, tableLayout, } = useTable();
|
|
12
11
|
const selected = isRowSelected(rowData);
|
|
13
12
|
const focused = isRowFocused(rowData);
|
|
14
13
|
const handleSelectionChange = (e) => {
|
|
15
14
|
e === true ? selectRow(rowData) : deselectRow(rowData);
|
|
16
15
|
};
|
|
17
|
-
return (_jsxs(TR, { className: "mfui-tr",
|
|
16
|
+
return (_jsxs(TR, { className: "mfui-tr", "data-key": rowData.__key, "data-selected": selected, "data-focused": focused, style: Object.assign(Object.assign({}, rowStyle), { width: tableLayout.contentWidth }), children: [enableSelection && (_jsx(ActionCell, { className: `mfui-td column-select`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action row-selection-action", children: _jsx(CheckBox, { className: `mfui-checkbox`, value: selected, onChange: (e) => handleSelectionChange(e) }) }) })), enableActionButton && (_jsx(ActionCell, { className: `mfui-td column-action`, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content row-action", children: _jsx(ActionButton, { variant: "subtle", onClick: () => onActionButtonClick === null || onActionButtonClick === void 0 ? void 0 : onActionButtonClick(rowData), children: Icon ? _jsx(Icon, { size: 14 }) : _jsx(Maximize2Icon, { size: 14 }) }) }) })), columnState.map((column, index) => {
|
|
18
17
|
var _a;
|
|
19
18
|
if (column.visible === false)
|
|
20
19
|
return null;
|
|
21
20
|
if (loading) {
|
|
21
|
+
const columnWidth = tableLayout.columnWidths[column.columnId] || column.minWidth;
|
|
22
22
|
return (_jsx(TD, { className: `mfui-td column-${column.columnId}`, "data-field": column.dataField, style: {
|
|
23
|
-
width:
|
|
23
|
+
width: columnWidth,
|
|
24
24
|
minWidth: column.minWidth,
|
|
25
|
-
|
|
25
|
+
maxWidth: column.maxWidth,
|
|
26
|
+
flexBasis: columnWidth,
|
|
27
|
+
flexGrow: 0,
|
|
28
|
+
flexShrink: 0,
|
|
26
29
|
}, children: _jsx(LoadingCellIndicator, {}) }, index));
|
|
27
30
|
}
|
|
28
31
|
const cellBody = column.render
|
|
@@ -31,14 +34,18 @@ const TableRow = ({ rowData, loading, rowStyle }) => {
|
|
|
31
34
|
const isTreeColumn = (treeOptions === null || treeOptions === void 0 ? void 0 : treeOptions.enabled) === true &&
|
|
32
35
|
column.dataField === firstVisibleDataField;
|
|
33
36
|
const expanded = isTreeColumn ? isRowExpanded(rowData) : false;
|
|
34
|
-
|
|
35
|
-
|
|
37
|
+
const columnWidth = tableLayout.columnWidths[column.columnId] || column.minWidth;
|
|
38
|
+
return (_jsx(TD, { className: `mfui-td column-${column.columnId}`, "data-field": column.dataField, "data-tree-cell": isTreeColumn ? "true" : undefined, style: {
|
|
39
|
+
width: columnWidth,
|
|
36
40
|
minWidth: column.minWidth,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
maxWidth: column.maxWidth,
|
|
42
|
+
flexBasis: columnWidth,
|
|
43
|
+
flexGrow: 0,
|
|
44
|
+
flexShrink: 0,
|
|
45
|
+
}, children: _jsx(InnerCellContent, { className: "mfui inner-cell-content", children: isTreeColumn ? (_jsxs(TreeCellWrapper, { children: [_jsx(TreeIndentSpacer, { "$level": (_a = rowData.__level) !== null && _a !== void 0 ? _a : 0, "$indentPx": treeOptions.indentPx }), rowData.__hasChildren ? (_jsx(TreeChevronButton, { type: "button", "$expanded": expanded, onClick: (e) => {
|
|
46
|
+
e.stopPropagation();
|
|
47
|
+
toggleRowExpanded(rowData);
|
|
48
|
+
}, "aria-label": expanded ? "Collapse row" : "Expand row", "aria-expanded": expanded, children: _jsx(ChevronRightIcon, { size: 14 }) })) : (_jsx(TreeChevronPlaceholder, {})), _jsx(TreeCellContent, { children: cellBody })] })) : (cellBody) }) }, index));
|
|
42
49
|
})] }));
|
|
43
50
|
};
|
|
44
51
|
export default TableRow;
|
package/dist/Table/types.d.ts
CHANGED
|
@@ -93,26 +93,7 @@ export type TableState = {
|
|
|
93
93
|
searchState?: string;
|
|
94
94
|
expandedKeys?: ExpandedKeysState;
|
|
95
95
|
};
|
|
96
|
-
export interface onResizeFinishedProps {
|
|
97
|
-
column: ColumnState;
|
|
98
|
-
columnId?: string;
|
|
99
|
-
targetColumn: Element | null;
|
|
100
|
-
newWidth: string | null;
|
|
101
|
-
}
|
|
102
|
-
export interface onResizeProps {
|
|
103
|
-
columns: {
|
|
104
|
-
dataField: string;
|
|
105
|
-
width: number;
|
|
106
|
-
}[];
|
|
107
|
-
}
|
|
108
96
|
export type ColumnStateUpdate = ColumnState[] | ((prevColumnState: ColumnState[]) => ColumnState[]);
|
|
109
|
-
export interface ResizeHandlerProps {
|
|
110
|
-
event: React.MouseEvent<HTMLDivElement>;
|
|
111
|
-
columnId?: string;
|
|
112
|
-
columnProps: ColumnState;
|
|
113
|
-
onResize: (e: onResizeProps) => void;
|
|
114
|
-
onResizeFinished?: (e: onResizeFinishedProps) => void;
|
|
115
|
-
}
|
|
116
97
|
export interface TableHeaderProps {
|
|
117
98
|
headerRowHeight?: number;
|
|
118
99
|
enableColumnResize?: boolean;
|
|
@@ -131,9 +112,15 @@ export type TableDimensions = {
|
|
|
131
112
|
width: number;
|
|
132
113
|
height: number;
|
|
133
114
|
};
|
|
115
|
+
export type TableLayout = {
|
|
116
|
+
contentWidth: number;
|
|
117
|
+
columnWidths: Record<string, number>;
|
|
118
|
+
};
|
|
134
119
|
export type TableContextType = {
|
|
135
120
|
columnState: ColumnState[];
|
|
136
121
|
setColumnState: (columnStateUpdate: ColumnStateUpdate) => void;
|
|
122
|
+
tableLayout: TableLayout;
|
|
123
|
+
setResizeColumnWidths: (widths: Record<string, number> | null) => void;
|
|
137
124
|
sortState?: SortState | null;
|
|
138
125
|
filterState?: Query | null;
|
|
139
126
|
searchState?: string | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ export * from "./Alert";
|
|
|
14
14
|
export * from "./Kanban";
|
|
15
15
|
export { default as IconButton } from "./IconButton";
|
|
16
16
|
export { default as DateInput } from "./DateInput";
|
|
17
|
+
export { default as SuperDatePicker } from "./SuperDatePicker";
|
|
18
|
+
export type { SuperDatePickerChangeMeta, SuperDatePickerProps, SuperDatePickerPreset, SuperDatePickerValue, } from "./SuperDatePicker";
|
|
17
19
|
export { default as TextArea } from "./TextArea";
|
|
18
20
|
export { default as TextAreaInput } from "./TextAreaInput";
|
|
19
21
|
export type { ActionMenuOptions, TextAreaInputProps } from "./TextAreaInput";
|
package/dist/index.js
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./Alert";
|
|
|
9
9
|
export * from "./Kanban";
|
|
10
10
|
export { default as IconButton } from "./IconButton";
|
|
11
11
|
export { default as DateInput } from "./DateInput";
|
|
12
|
+
export { default as SuperDatePicker } from "./SuperDatePicker";
|
|
12
13
|
export { default as TextArea } from "./TextArea";
|
|
13
14
|
export { default as TextAreaInput } from "./TextAreaInput";
|
|
14
15
|
export { default as TagBox } from "./TagBox";
|
package/dist/theme/variants.js
CHANGED
|
@@ -79,6 +79,7 @@ const lightVariant = {
|
|
|
79
79
|
alt: "#ededed",
|
|
80
80
|
secondary: "#f0f0f0",
|
|
81
81
|
gradient: "linear-gradient(#FFFFFF 0%, #ccdcf9 50%)",
|
|
82
|
+
subtle: "#ededed",
|
|
82
83
|
},
|
|
83
84
|
menu: {
|
|
84
85
|
background: "#FFF",
|
|
@@ -242,6 +243,7 @@ const darkVariant = merge(lightVariant, {
|
|
|
242
243
|
alt: "#1e1e1e",
|
|
243
244
|
secondary: "#303030",
|
|
244
245
|
gradient: "linear-gradient(#333333 0%, #1e1e1e 50%)",
|
|
246
|
+
subtle: "#333333",
|
|
245
247
|
},
|
|
246
248
|
menu: {
|
|
247
249
|
background: "#222222",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@monolith-forensics/monolith-ui",
|
|
3
|
-
"version": "1.8.1-dev.
|
|
3
|
+
"version": "1.8.1-dev.3",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"author": "Matt Danner (Monolith Forensics LLC)",
|
|
@@ -40,22 +40,18 @@
|
|
|
40
40
|
"@radix-ui/react-switch": "^1.0.7",
|
|
41
41
|
"@radix-ui/react-tooltip": "^1.0.7",
|
|
42
42
|
"@tabler/icons-react": "^3.11.0",
|
|
43
|
-
"@tiptap/
|
|
44
|
-
"@tiptap/extension-
|
|
45
|
-
"@tiptap/extension-horizontal-rule": "
|
|
46
|
-
"@tiptap/extension-image": "
|
|
47
|
-
"@tiptap/extension-
|
|
48
|
-
"@tiptap/extension-
|
|
49
|
-
"@tiptap/extension-
|
|
50
|
-
"@tiptap/
|
|
51
|
-
"@tiptap/
|
|
52
|
-
"@tiptap/
|
|
53
|
-
"@tiptap/
|
|
54
|
-
"@tiptap/
|
|
55
|
-
"@tiptap/pm": "^2.5.8",
|
|
56
|
-
"@tiptap/react": "^2.5.8",
|
|
57
|
-
"@tiptap/starter-kit": "^2.5.8",
|
|
58
|
-
"@tiptap/suggestion": "^2.5.9",
|
|
43
|
+
"@tiptap/core": "3.22.4",
|
|
44
|
+
"@tiptap/extension-color": "3.22.4",
|
|
45
|
+
"@tiptap/extension-horizontal-rule": "3.22.4",
|
|
46
|
+
"@tiptap/extension-image": "3.22.4",
|
|
47
|
+
"@tiptap/extension-table": "3.22.4",
|
|
48
|
+
"@tiptap/extension-text-align": "3.22.4",
|
|
49
|
+
"@tiptap/extension-text-style": "3.22.4",
|
|
50
|
+
"@tiptap/extensions": "3.22.4",
|
|
51
|
+
"@tiptap/pm": "3.22.4",
|
|
52
|
+
"@tiptap/react": "3.22.4",
|
|
53
|
+
"@tiptap/starter-kit": "3.22.4",
|
|
54
|
+
"@tiptap/suggestion": "3.22.4",
|
|
59
55
|
"@uiw/codemirror-theme-vscode": "^4.23.6",
|
|
60
56
|
"@uiw/react-codemirror": "^4.23.6",
|
|
61
57
|
"d3-scale": "^4.0.2",
|
|
@@ -88,11 +84,19 @@
|
|
|
88
84
|
"@types/d3-scale": "^4.0.9",
|
|
89
85
|
"@types/d3-shape": "^3.1.8",
|
|
90
86
|
"@types/overlayscrollbars": "^1.12.5",
|
|
91
|
-
"@types/react
|
|
87
|
+
"@types/react": "19.0.8",
|
|
88
|
+
"@types/react-dom": "19.0.3",
|
|
92
89
|
"@types/react-window": "^1.8.8",
|
|
93
90
|
"@types/spark-md5": "^3.0.4",
|
|
94
91
|
"chokidar-cli": "^3.0.0",
|
|
95
92
|
"typescript": "^5.5.4",
|
|
96
93
|
"yalc": "^1.0.0-pre.53"
|
|
94
|
+
},
|
|
95
|
+
"resolutions": {
|
|
96
|
+
"@types/react": "19.0.8",
|
|
97
|
+
"prosemirror-model": "1.25.4",
|
|
98
|
+
"prosemirror-state": "1.4.4",
|
|
99
|
+
"prosemirror-transform": "1.12.0",
|
|
100
|
+
"prosemirror-view": "1.41.8"
|
|
97
101
|
}
|
|
98
102
|
}
|