es-grid-template 1.2.2 → 1.2.4
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/assets/index.css +0 -17
- package/assets/index.scss +1082 -1063
- package/es/grid-component/ColumnsChoose.d.ts +1 -0
- package/es/grid-component/ColumnsChoose.js +351 -61
- package/es/grid-component/GridStyle.js +1 -1
- package/es/grid-component/InternalTable.js +7 -0
- package/es/grid-component/TableGrid.js +3 -2
- package/es/grid-component/hooks/useColumns.js +3 -3
- package/es/grid-component/hooks/useForceUpdate.d.ts +2 -0
- package/es/grid-component/hooks/useForceUpdate.js +5 -0
- package/es/grid-component/hooks/utils.d.ts +2 -0
- package/es/grid-component/hooks/utils.js +77 -16
- package/es/grid-component/styles.scss +22 -3
- package/es/grid-component/table/Grid.js +2 -1
- package/es/grid-component/table/GridEdit.js +72 -9
- package/es/grid-component/type.d.ts +1 -0
- package/lib/grid-component/ColumnsChoose.d.ts +1 -0
- package/lib/grid-component/ColumnsChoose.js +350 -60
- package/lib/grid-component/GridStyle.js +1 -1
- package/lib/grid-component/InternalTable.js +7 -0
- package/lib/grid-component/TableGrid.js +3 -2
- package/lib/grid-component/hooks/useColumns.js +3 -3
- package/lib/grid-component/hooks/useForceUpdate.d.ts +2 -0
- package/lib/grid-component/hooks/useForceUpdate.js +13 -0
- package/lib/grid-component/hooks/utils.d.ts +2 -0
- package/lib/grid-component/hooks/utils.js +81 -17
- package/lib/grid-component/styles.scss +22 -3
- package/lib/grid-component/table/Grid.js +2 -1
- package/lib/grid-component/table/GridEdit.js +71 -8
- package/lib/grid-component/type.d.ts +1 -0
- package/package.json +106 -106
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.addRowIdArray = void 0;
|
|
8
8
|
exports.addRows8 = addRows8;
|
|
9
|
-
exports.customWeekStartEndFormat = exports.countItemsBeforeIndex = exports.convertLabelToTitle = exports.convertFlatColumn = exports.convertDayjsToDate = exports.convertDateToDayjs = exports.convertArrayWithIndent = exports.checkThousandSeparator = exports.checkFieldKey = exports.checkDecimalSeparator = void 0;
|
|
9
|
+
exports.customWeekStartEndFormat = exports.countItemsBeforeIndex = exports.convertLabelToTitle = exports.convertFlatColumn = exports.convertDayjsToDate = exports.convertDateToDayjs = exports.convertColumns = exports.convertArrayWithIndent = exports.checkThousandSeparator = exports.checkFieldKey = exports.checkDecimalSeparator = exports.checkChild = void 0;
|
|
10
10
|
exports.findAllChildrenKeys = findAllChildrenKeys;
|
|
11
11
|
exports.getFirstSelectCell = exports.getEditType = exports.getDefaultValue = exports.getDatepickerFormat = exports.getDateString = exports.getColumnsVisible = exports.getAllVisibleKeys = exports.genPresets = exports.flattenData = exports.flattenArray = exports.findItemByKey = void 0;
|
|
12
12
|
exports.getHiddenParentKeys = getHiddenParentKeys;
|
|
@@ -17,6 +17,7 @@ var _uuid = require("uuid");
|
|
|
17
17
|
var _colors = require("@ant-design/colors");
|
|
18
18
|
var _rcMasterUi = require("rc-master-ui");
|
|
19
19
|
var _columns = require("./columns");
|
|
20
|
+
var _useColumns = require("./useColumns");
|
|
20
21
|
const newGuid = () => {
|
|
21
22
|
for (let i = 0; i < 20; i++) {
|
|
22
23
|
// @ts-ignore
|
|
@@ -163,9 +164,14 @@ const updateColumns = (columns, includes) => {
|
|
|
163
164
|
newColumn.children = updateColumns(newColumn.children, includes);
|
|
164
165
|
hasVisibleChild = newColumn.children.some(child => !child.hidden);
|
|
165
166
|
}
|
|
166
|
-
|
|
167
|
+
|
|
168
|
+
// newColumn.hidden = newColumn.key && !includes.includes(newColumn.key)
|
|
169
|
+
newColumn.hidden = newColumn.field && !includes.includes(newColumn.field);
|
|
170
|
+
// newColumn.fixed = newColumn.field && !includes.includes(newColumn.field) ? undefined : newColumn.fixed
|
|
171
|
+
|
|
167
172
|
if (newColumn.children && newColumn.children.length > 0) {
|
|
168
173
|
newColumn.hidden = !hasVisibleChild;
|
|
174
|
+
// newColumn.fixed = !hasVisibleChild ? undefined : newColumn.fixed
|
|
169
175
|
}
|
|
170
176
|
return newColumn;
|
|
171
177
|
});
|
|
@@ -526,18 +532,6 @@ const getFirstSelectCell = selectCells => {
|
|
|
526
532
|
col
|
|
527
533
|
};
|
|
528
534
|
};
|
|
529
|
-
|
|
530
|
-
// export const getLastSelectCell = (selectCells: any): {row: number, col: number} => {
|
|
531
|
-
//
|
|
532
|
-
// if (selectCells.size === 0) {
|
|
533
|
-
// return {row: 0, col: 0}
|
|
534
|
-
// }
|
|
535
|
-
// const lastValue = [...selectCells].pop();
|
|
536
|
-
//
|
|
537
|
-
// const [row, col] = lastValue.split("-").map(Number);
|
|
538
|
-
// return {row, col};
|
|
539
|
-
//
|
|
540
|
-
// }
|
|
541
535
|
exports.getFirstSelectCell = getFirstSelectCell;
|
|
542
536
|
const getRowsPasteIndex = pasteRows => {
|
|
543
537
|
if (!pasteRows) {
|
|
@@ -557,8 +551,25 @@ function addRows8(arr, n) {
|
|
|
557
551
|
const addedRows = [];
|
|
558
552
|
|
|
559
553
|
// Hàm kiểm tra kiểu date hợp lệ
|
|
560
|
-
const isValidDate =
|
|
561
|
-
|
|
554
|
+
const isValidDate = item => {
|
|
555
|
+
// console.log('!isNaN(Date.parse(d))', !isNaN(Date.parse(d)))
|
|
556
|
+
// return !isNaN(Date.parse(d))
|
|
557
|
+
|
|
558
|
+
if (typeof item === 'number') {
|
|
559
|
+
// return 'number'
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
if (typeof item === 'string') {
|
|
563
|
+
// Kiểm tra nếu là chuỗi ISO date hợp lệ
|
|
564
|
+
const date = new Date(item);
|
|
565
|
+
if (!isNaN(date.getTime()) && item.includes('T')) {
|
|
566
|
+
// return 'date'
|
|
567
|
+
return true;
|
|
568
|
+
}
|
|
569
|
+
// return 'string'
|
|
570
|
+
return false;
|
|
571
|
+
}
|
|
572
|
+
return !isNaN(Date.parse(item));
|
|
562
573
|
};
|
|
563
574
|
|
|
564
575
|
// Lấy giá trị mẫu của cột j từ hàng đầu tiên
|
|
@@ -768,4 +779,57 @@ const convertFlatColumn = array => {
|
|
|
768
779
|
});
|
|
769
780
|
return result;
|
|
770
781
|
};
|
|
771
|
-
exports.convertFlatColumn = convertFlatColumn;
|
|
782
|
+
exports.convertFlatColumn = convertFlatColumn;
|
|
783
|
+
const convertColumns = cols => {
|
|
784
|
+
return cols.map(col => {
|
|
785
|
+
if (col === _useColumns.SELECTION_COLUMN) {
|
|
786
|
+
return _useColumns.SELECTION_COLUMN;
|
|
787
|
+
}
|
|
788
|
+
const transformedColumn = {
|
|
789
|
+
...col,
|
|
790
|
+
dataIndex: col.field ?? col.dataIndex,
|
|
791
|
+
key: col.field ?? col.dataIndex ?? col.key,
|
|
792
|
+
// title: t ? t(col.columnGroupText ?? col.headerText ?? col.title) : col.columnGroupText ?? col.headerText ?? col.title,
|
|
793
|
+
// title: () => (<span>aaa</span>),
|
|
794
|
+
// title: () => (<HeaderContent column={{...col} as any} t={t}/>),
|
|
795
|
+
// title: () => (<span>{t ? t(col.columnGroupText ?? col.headerText ?? col.title) : col.columnGroupText ?? col.headerText ?? col.title}</span>),
|
|
796
|
+
ellipsis: col.ellipsis !== false,
|
|
797
|
+
align: col.textAlign ?? col.align,
|
|
798
|
+
fixed: col.frozen ? col.frozen.toLowerCase() : col.fixed
|
|
799
|
+
};
|
|
800
|
+
if (transformedColumn.children && transformedColumn.children?.length) {
|
|
801
|
+
return {
|
|
802
|
+
...transformedColumn,
|
|
803
|
+
children: convertColumns(transformedColumn.children)
|
|
804
|
+
};
|
|
805
|
+
}
|
|
806
|
+
if (["index", "#"].includes(col.field)) {
|
|
807
|
+
return {
|
|
808
|
+
...transformedColumn,
|
|
809
|
+
onCell: () => ({
|
|
810
|
+
className: 'cell-number'
|
|
811
|
+
}),
|
|
812
|
+
render: (_, __, rowIndex) => rowIndex + 1
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
if (col.key === 'command') {
|
|
816
|
+
return {
|
|
817
|
+
...transformedColumn,
|
|
818
|
+
onCell: () => ({
|
|
819
|
+
className: 'cell-number',
|
|
820
|
+
style: {
|
|
821
|
+
padding: '2px 8px'
|
|
822
|
+
}
|
|
823
|
+
})
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
return {
|
|
827
|
+
...transformedColumn
|
|
828
|
+
};
|
|
829
|
+
});
|
|
830
|
+
};
|
|
831
|
+
exports.convertColumns = convertColumns;
|
|
832
|
+
const checkChild = inputArray => {
|
|
833
|
+
return inputArray.some(item => item.children && item.children.length > 0);
|
|
834
|
+
};
|
|
835
|
+
exports.checkChild = checkChild;
|
|
@@ -42,6 +42,14 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
42
42
|
//font-weight: 500;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
.ui-rc-table {
|
|
46
|
+
.#{$prefix}-table-cell {
|
|
47
|
+
&.#{$prefix}-table-selection-column {
|
|
48
|
+
//padding: 6px 8px !important;
|
|
49
|
+
//padding: 6px 8px !important;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
45
53
|
|
|
46
54
|
|
|
47
55
|
&.table-none-column-select {
|
|
@@ -57,8 +65,12 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
57
65
|
}
|
|
58
66
|
|
|
59
67
|
.#{$prefix}-table {
|
|
60
|
-
|
|
68
|
+
|
|
69
|
+
//line-height: 20px;
|
|
70
|
+
|
|
61
71
|
.#{$prefix}-table-cell {
|
|
72
|
+
//min-height: 35px;
|
|
73
|
+
//height: 35px;
|
|
62
74
|
|
|
63
75
|
.#{$prefix}-table-filter-column {
|
|
64
76
|
.#{$prefix}-dropdown-trigger.#{$prefix}-table-filter-trigger {
|
|
@@ -323,6 +335,13 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
323
335
|
|
|
324
336
|
.#{$prefix}-table-wrapper {
|
|
325
337
|
|
|
338
|
+
.#{$prefix}-table.#{$prefix}-table-small {
|
|
339
|
+
.#{$prefix}-table-selection-column{
|
|
340
|
+
//padding: 8px 8px;
|
|
341
|
+
//padding: 6px 8px;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
326
345
|
&.grid-editable {
|
|
327
346
|
|
|
328
347
|
.#{$prefix}-table-row {
|
|
@@ -527,7 +546,7 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
527
546
|
.#{$prefix}-table.#{$prefix}-table-small {
|
|
528
547
|
.#{$prefix}-table-selection-column{
|
|
529
548
|
//padding: 8px 8px;
|
|
530
|
-
padding: 6px 8px;
|
|
549
|
+
//padding: 6px 8px;
|
|
531
550
|
}
|
|
532
551
|
}
|
|
533
552
|
|
|
@@ -619,7 +638,7 @@ $fontFamily: "Montserrat",Helvetica,Arial,serif !default;
|
|
|
619
638
|
.#{$prefix}-table-row-expand-icon {
|
|
620
639
|
position: absolute;
|
|
621
640
|
//.ui-rc_content {
|
|
622
|
-
padding-left: $i * 10px;
|
|
641
|
+
//padding-left: $i * 10px;
|
|
623
642
|
//}
|
|
624
643
|
}
|
|
625
644
|
|
|
@@ -92,8 +92,6 @@ const GridEdit = props => {
|
|
|
92
92
|
const [isSelectDragging, setSelectIsDragging] = (0, _react.useState)(false);
|
|
93
93
|
const [isPasteDragging, setIsPasteDragging] = (0, _react.useState)(false); // isPasteDragging == tiếp tục hiển thị con trỏ crosshair
|
|
94
94
|
|
|
95
|
-
// const [showDraggingPoint, setShowDraggingPoint] = useState(false);
|
|
96
|
-
|
|
97
95
|
const [rowsSelected, setRowsSelected] = (0, _react.useState)(new Set());
|
|
98
96
|
const [startSelectedCells, setStartSelectedCell] = (0, _react.useState)(null);
|
|
99
97
|
const [innerExpandedKeys, setInnerExpandedKeys] = _react.default.useState(() => {
|
|
@@ -266,10 +264,54 @@ const GridEdit = props => {
|
|
|
266
264
|
}
|
|
267
265
|
}
|
|
268
266
|
};
|
|
269
|
-
const
|
|
267
|
+
const handleInsertChild = item => {
|
|
268
|
+
const defaultRowValue = (0, _hooks.getDefaultValue)(defaultValue);
|
|
269
|
+
const rowId = defaultRowValue && defaultRowValue.id ? defaultRowValue.id : (0, _hooks.newGuid)();
|
|
270
|
+
const record = (0, _hooks.flattenData)(childrenColumnName, dataSource)[rowsFocus[rowsFocus.length - 1]];
|
|
271
|
+
if (item.onClick) {
|
|
272
|
+
item.onClick({
|
|
273
|
+
toolbar: item
|
|
274
|
+
});
|
|
275
|
+
} else {
|
|
276
|
+
const newData = [...dataSource];
|
|
277
|
+
let newElement = {};
|
|
278
|
+
if (!record.children || record.children.length === 0) {
|
|
279
|
+
newElement = {
|
|
280
|
+
...record,
|
|
281
|
+
children: [{
|
|
282
|
+
...defaultRowValue,
|
|
283
|
+
parentId: record.rowId,
|
|
284
|
+
rowId
|
|
285
|
+
}]
|
|
286
|
+
};
|
|
287
|
+
} else {
|
|
288
|
+
newElement = {
|
|
289
|
+
...record,
|
|
290
|
+
children: [...record.children, {
|
|
291
|
+
...defaultRowValue,
|
|
292
|
+
parentId: record.rowId,
|
|
293
|
+
rowId
|
|
294
|
+
}]
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
const newDataSource = (0, _hooks.updateArrayByKey)(newData, newElement, rowKey);
|
|
298
|
+
triggerChangeData?.(newDataSource, 'INSERT_CHILDREN');
|
|
299
|
+
}
|
|
300
|
+
const key = getRowKey(record, dataSource.indexOf(record));
|
|
301
|
+
|
|
302
|
+
// let newExpandedKeys: Key[];
|
|
303
|
+
const hasKey = mergedExpandedKeys.has(key);
|
|
304
|
+
if (!hasKey) {
|
|
305
|
+
const newExpandedKeys = [...mergedExpandedKeys, key];
|
|
306
|
+
setInnerExpandedKeys(newExpandedKeys);
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
const handleDeleteAll = () => {
|
|
310
|
+
triggerChangeData?.([], 'INSERT_BEFORE');
|
|
311
|
+
};
|
|
270
312
|
const toolbarItemsBottom = (0, _react.useMemo)(() => {
|
|
271
313
|
if (!rowsFocus || rowsFocus.length === 0) {
|
|
272
|
-
return toolbarItems?.filter(it => it.position === 'Bottom' && it.visible !== false && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER').map(item => {
|
|
314
|
+
return toolbarItems?.filter(it => it.position === 'Bottom' && it.visible !== false && it.key !== 'DUPLICATE' && it.key !== 'INSERT_BEFORE' && it.key !== 'INSERT_AFTER' && it.key !== 'INSERT_CHILDREN').map(item => {
|
|
273
315
|
if (item.key === 'ADD') {
|
|
274
316
|
return {
|
|
275
317
|
...item,
|
|
@@ -398,6 +440,24 @@ const GridEdit = props => {
|
|
|
398
440
|
}
|
|
399
441
|
};
|
|
400
442
|
}
|
|
443
|
+
if (item.key === 'INSERT_CHILDREN') {
|
|
444
|
+
return {
|
|
445
|
+
...item,
|
|
446
|
+
template: () => {
|
|
447
|
+
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
448
|
+
className: (0, _classnames.default)(`be-toolbar-item`, item?.className)
|
|
449
|
+
}, /*#__PURE__*/_react.default.createElement(_antd.Button, {
|
|
450
|
+
style: {
|
|
451
|
+
color: '#28c76f',
|
|
452
|
+
borderColor: '#28c76f'
|
|
453
|
+
},
|
|
454
|
+
variant: 'outlined',
|
|
455
|
+
onClick: () => handleInsertChild(item),
|
|
456
|
+
className: "d-flex toolbar-button"
|
|
457
|
+
}, item.title ? t ? t(item.title) : item.title : t ? t('Insert item after') : 'Insert item after')));
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
}
|
|
401
461
|
if (item.key === 'DELETE') {
|
|
402
462
|
return {
|
|
403
463
|
...item,
|
|
@@ -958,8 +1018,8 @@ const GridEdit = props => {
|
|
|
958
1018
|
const newData = [...dataSource];
|
|
959
1019
|
|
|
960
1020
|
// @ts-ignore
|
|
961
|
-
const index = newData.findIndex(item => formData[rowKey] === item[rowKey]);
|
|
962
|
-
const rs = (0, _hooks.updateArrayByKey)(
|
|
1021
|
+
const index = (0, _hooks.flattenData)(childrenColumnName, newData).findIndex(item => formData[rowKey] === item[rowKey]);
|
|
1022
|
+
const rs = (0, _hooks.updateArrayByKey)(newData, row, rowKey);
|
|
963
1023
|
if (index > -1) {
|
|
964
1024
|
triggerChangeData?.(rs, 'onChange');
|
|
965
1025
|
}
|
|
@@ -1331,7 +1391,7 @@ const GridEdit = props => {
|
|
|
1331
1391
|
onMouseUp: handleMouseUp
|
|
1332
1392
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
1333
1393
|
className: 'ui-rc_content'
|
|
1334
|
-
}, (0, _columns.renderContent)(column, value, record, rowIndex, format)), (0, _hooks.getLastSelectCell)(selectedCells).row === rowNumber && (0, _hooks.getLastSelectCell)(selectedCells).col === colIndex && !isSelectDragging &&
|
|
1394
|
+
}, (0, _columns.renderContent)(column, value, record, rowIndex, format)), selectedCells && selectedCells.size > 0 && (0, _hooks.getLastSelectCell)(selectedCells).row === rowNumber && (0, _hooks.getLastSelectCell)(selectedCells).col === colIndex && !isSelectDragging &&
|
|
1335
1395
|
/*#__PURE__*/
|
|
1336
1396
|
// showDraggingPoint &&
|
|
1337
1397
|
_react.default.createElement("div", {
|
|
@@ -1420,7 +1480,8 @@ const GridEdit = props => {
|
|
|
1420
1480
|
rowSelectedHoverBg: '#eb4619',
|
|
1421
1481
|
cellFontSize: 12,
|
|
1422
1482
|
cellFontSizeSM: 13,
|
|
1423
|
-
headerBg: '#ffffff'
|
|
1483
|
+
headerBg: '#ffffff',
|
|
1484
|
+
cellPaddingBlockSM: 7
|
|
1424
1485
|
// cellPaddingBlock: 0,
|
|
1425
1486
|
// cellPaddingBlockSM: 0,
|
|
1426
1487
|
// cellPaddingInlineSM: 0,
|
|
@@ -1454,6 +1515,7 @@ const GridEdit = props => {
|
|
|
1454
1515
|
rowHoverable: false,
|
|
1455
1516
|
bottomToolbar: bottomToolbar,
|
|
1456
1517
|
expandable: {
|
|
1518
|
+
expandIconColumnIndex: (0, _hooks.checkChild)(dataSource) ? 3 : undefined,
|
|
1457
1519
|
...expandable,
|
|
1458
1520
|
expandedRowKeys: innerExpandedKeys,
|
|
1459
1521
|
expandIcon: args => {
|
|
@@ -1488,6 +1550,7 @@ const GridEdit = props => {
|
|
|
1488
1550
|
}
|
|
1489
1551
|
}
|
|
1490
1552
|
},
|
|
1553
|
+
triggerChangeColumns: triggerChangeColumns,
|
|
1491
1554
|
rowSelection: columns && columns.length === 0 ? undefined : {
|
|
1492
1555
|
type: mode === 'checkbox' || type === 'multiple' ? 'checkbox' : "radio",
|
|
1493
1556
|
columnWidth: !mode ? 0.0000001 : columnWidth ?? 50,
|
|
@@ -178,6 +178,7 @@ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, '
|
|
|
178
178
|
onDataChange?: (data: RecordType[]) => void;
|
|
179
179
|
defaultValue?: AnyObject | (() => AnyObject);
|
|
180
180
|
summary?: boolean | ((data: readonly RecordType[]) => React.ReactNode);
|
|
181
|
+
showEmptyText?: boolean;
|
|
181
182
|
}
|
|
182
183
|
export interface TableEditProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
|
|
183
184
|
columns: ColumnsTable<RecordType>;
|
package/package.json
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "es-grid-template",
|
|
3
|
-
"version": "1.2.
|
|
4
|
-
"description": "es-grid-template",
|
|
5
|
-
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"react-component",
|
|
8
|
-
"grid",
|
|
9
|
-
"table"
|
|
10
|
-
],
|
|
11
|
-
"license": "MIT",
|
|
12
|
-
"main": "lib/index",
|
|
13
|
-
"module": "es/index",
|
|
14
|
-
"files": [
|
|
15
|
-
"lib",
|
|
16
|
-
"es",
|
|
17
|
-
"assets/*.css",
|
|
18
|
-
"assets/*.scss"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"__compile": "father build && ",
|
|
22
|
-
"compile": "father build && sass assets/index.scss assets/index.css",
|
|
23
|
-
"docs:build": "dumi build",
|
|
24
|
-
"__docs:deploy": "gh-pages -d dist",
|
|
25
|
-
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
26
|
-
"now-build": "npm run docs:build",
|
|
27
|
-
"prepare": "dumi setup",
|
|
28
|
-
"prepublishOnly": "npm run compile",
|
|
29
|
-
"postpublish": "npm run docs:build",
|
|
30
|
-
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
31
|
-
"start": "dumi dev",
|
|
32
|
-
"test": "vitest --watch false",
|
|
33
|
-
"coverage": "vitest run --coverage"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {
|
|
36
|
-
"@ant-design/colors": "^8.0.0",
|
|
37
|
-
"@ant-design/cssinjs": "^1.22.0",
|
|
38
|
-
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
39
|
-
"@ant-design/icons": "^5.5.2",
|
|
40
|
-
"@babel/runtime": "^7.11.2",
|
|
41
|
-
"@core-rc/rc-select": "^0.0.8",
|
|
42
|
-
"@ctrl/tinycolor": "^3.6.1",
|
|
43
|
-
"@faker-js/faker": "^9.5.0",
|
|
44
|
-
"@floating-ui/react": "^0.27.5",
|
|
45
|
-
"@rc-component/color-picker": "^2.0.1",
|
|
46
|
-
"@rc-component/father-plugin": "^2.0.1",
|
|
47
|
-
"@rc-component/trigger": "^2.0.0",
|
|
48
|
-
"@rc-component/util": "^1.0.1",
|
|
49
|
-
"@types/react-resizable": "^3.0.8",
|
|
50
|
-
"@types/styled-components": "^5.1.34",
|
|
51
|
-
"@vitest/coverage-v8": "^2.0.5",
|
|
52
|
-
"antd": "^5.24.1",
|
|
53
|
-
"antd-style": "^3.7.1",
|
|
54
|
-
"becoxy-icons": "^2.0.1",
|
|
55
|
-
"classnames": "^2.3.1",
|
|
56
|
-
"dayjs": "^1.11.13",
|
|
57
|
-
"lodash": "^4.17.21",
|
|
58
|
-
"moment": "^2.30.1",
|
|
59
|
-
"postcss": "^8.4.35",
|
|
60
|
-
"rc-checkbox": "^3.5.0",
|
|
61
|
-
"rc-dropdown": "^4.2.1",
|
|
62
|
-
"rc-field-form": "^2.6.0",
|
|
63
|
-
"rc-master-ui": "^1.1.21",
|
|
64
|
-
"rc-select": "^14.16.3",
|
|
65
|
-
"rc-tooltip": "^6.3.0",
|
|
66
|
-
"rc-tree": "^5.10.1",
|
|
67
|
-
"rc-tree-select": "^5.24.5",
|
|
68
|
-
"react-hook-form": "^7.54.2",
|
|
69
|
-
"react-hot-toast": "^2.5.2",
|
|
70
|
-
"react-numeric-component": "^1.0.7",
|
|
71
|
-
"react-resizable": "^3.0.5",
|
|
72
|
-
"sass": "^1.81.0",
|
|
73
|
-
"styled-components": "^6.1.15",
|
|
74
|
-
"throttle-debounce": "^5.0.2",
|
|
75
|
-
"vitest": "^2.0.5"
|
|
76
|
-
},
|
|
77
|
-
"devDependencies": {
|
|
78
|
-
"@babel/cli": "^7.26.4",
|
|
79
|
-
"@babel/preset-env": "^7.26.9",
|
|
80
|
-
"@rc-component/np": "^1.0.3",
|
|
81
|
-
"@testing-library/react": "^14.0.0",
|
|
82
|
-
"@types/jest": "^29.4.0",
|
|
83
|
-
"@types/react": "^18.0.26",
|
|
84
|
-
"@types/react-dom": "^18.0.10",
|
|
85
|
-
"@types/warning": "^3.0.0",
|
|
86
|
-
"cross-env": "^7.0.0",
|
|
87
|
-
"dumi": "^2.2.13",
|
|
88
|
-
"eslint": "^8.56.0",
|
|
89
|
-
"eslint-plugin-unicorn": "^55.0.0",
|
|
90
|
-
"father": "^4.0.0",
|
|
91
|
-
"gh-pages": "^3.1.0",
|
|
92
|
-
"less": "^4.1.1",
|
|
93
|
-
"np": "^7.1.0",
|
|
94
|
-
"rc-test": "^7.0.9",
|
|
95
|
-
"react": "^18.2.0",
|
|
96
|
-
"react-dom": "^18.2.0",
|
|
97
|
-
"typescript": "^4.0.5"
|
|
98
|
-
},
|
|
99
|
-
"peerDependencies": {
|
|
100
|
-
"react": ">=16.9.0",
|
|
101
|
-
"react-dom": ">=16.9.0"
|
|
102
|
-
},
|
|
103
|
-
"umi": {
|
|
104
|
-
"configFile": "config.ts"
|
|
105
|
-
}
|
|
106
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "es-grid-template",
|
|
3
|
+
"version": "1.2.4",
|
|
4
|
+
"description": "es-grid-template",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"react",
|
|
7
|
+
"react-component",
|
|
8
|
+
"grid",
|
|
9
|
+
"table"
|
|
10
|
+
],
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"main": "lib/index",
|
|
13
|
+
"module": "es/index",
|
|
14
|
+
"files": [
|
|
15
|
+
"lib",
|
|
16
|
+
"es",
|
|
17
|
+
"assets/*.css",
|
|
18
|
+
"assets/*.scss"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"__compile": "father build && ",
|
|
22
|
+
"compile": "father build && sass assets/index.scss assets/index.css",
|
|
23
|
+
"docs:build": "dumi build",
|
|
24
|
+
"__docs:deploy": "gh-pages -d dist",
|
|
25
|
+
"lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
|
|
26
|
+
"now-build": "npm run docs:build",
|
|
27
|
+
"prepare": "dumi setup",
|
|
28
|
+
"prepublishOnly": "npm run compile",
|
|
29
|
+
"postpublish": "npm run docs:build",
|
|
30
|
+
"__postpublish": "npm run docs:build && npm run docs:deploy",
|
|
31
|
+
"start": "dumi dev",
|
|
32
|
+
"test": "vitest --watch false",
|
|
33
|
+
"coverage": "vitest run --coverage"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@ant-design/colors": "^8.0.0",
|
|
37
|
+
"@ant-design/cssinjs": "^1.22.0",
|
|
38
|
+
"@ant-design/cssinjs-utils": "^1.1.1",
|
|
39
|
+
"@ant-design/icons": "^5.5.2",
|
|
40
|
+
"@babel/runtime": "^7.11.2",
|
|
41
|
+
"@core-rc/rc-select": "^0.0.8",
|
|
42
|
+
"@ctrl/tinycolor": "^3.6.1",
|
|
43
|
+
"@faker-js/faker": "^9.5.0",
|
|
44
|
+
"@floating-ui/react": "^0.27.5",
|
|
45
|
+
"@rc-component/color-picker": "^2.0.1",
|
|
46
|
+
"@rc-component/father-plugin": "^2.0.1",
|
|
47
|
+
"@rc-component/trigger": "^2.0.0",
|
|
48
|
+
"@rc-component/util": "^1.0.1",
|
|
49
|
+
"@types/react-resizable": "^3.0.8",
|
|
50
|
+
"@types/styled-components": "^5.1.34",
|
|
51
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
52
|
+
"antd": "^5.24.1",
|
|
53
|
+
"antd-style": "^3.7.1",
|
|
54
|
+
"becoxy-icons": "^2.0.1",
|
|
55
|
+
"classnames": "^2.3.1",
|
|
56
|
+
"dayjs": "^1.11.13",
|
|
57
|
+
"lodash": "^4.17.21",
|
|
58
|
+
"moment": "^2.30.1",
|
|
59
|
+
"postcss": "^8.4.35",
|
|
60
|
+
"rc-checkbox": "^3.5.0",
|
|
61
|
+
"rc-dropdown": "^4.2.1",
|
|
62
|
+
"rc-field-form": "^2.6.0",
|
|
63
|
+
"rc-master-ui": "^1.1.21",
|
|
64
|
+
"rc-select": "^14.16.3",
|
|
65
|
+
"rc-tooltip": "^6.3.0",
|
|
66
|
+
"rc-tree": "^5.10.1",
|
|
67
|
+
"rc-tree-select": "^5.24.5",
|
|
68
|
+
"react-hook-form": "^7.54.2",
|
|
69
|
+
"react-hot-toast": "^2.5.2",
|
|
70
|
+
"react-numeric-component": "^1.0.7",
|
|
71
|
+
"react-resizable": "^3.0.5",
|
|
72
|
+
"sass": "^1.81.0",
|
|
73
|
+
"styled-components": "^6.1.15",
|
|
74
|
+
"throttle-debounce": "^5.0.2",
|
|
75
|
+
"vitest": "^2.0.5"
|
|
76
|
+
},
|
|
77
|
+
"devDependencies": {
|
|
78
|
+
"@babel/cli": "^7.26.4",
|
|
79
|
+
"@babel/preset-env": "^7.26.9",
|
|
80
|
+
"@rc-component/np": "^1.0.3",
|
|
81
|
+
"@testing-library/react": "^14.0.0",
|
|
82
|
+
"@types/jest": "^29.4.0",
|
|
83
|
+
"@types/react": "^18.0.26",
|
|
84
|
+
"@types/react-dom": "^18.0.10",
|
|
85
|
+
"@types/warning": "^3.0.0",
|
|
86
|
+
"cross-env": "^7.0.0",
|
|
87
|
+
"dumi": "^2.2.13",
|
|
88
|
+
"eslint": "^8.56.0",
|
|
89
|
+
"eslint-plugin-unicorn": "^55.0.0",
|
|
90
|
+
"father": "^4.0.0",
|
|
91
|
+
"gh-pages": "^3.1.0",
|
|
92
|
+
"less": "^4.1.1",
|
|
93
|
+
"np": "^7.1.0",
|
|
94
|
+
"rc-test": "^7.0.9",
|
|
95
|
+
"react": "^18.2.0",
|
|
96
|
+
"react-dom": "^18.2.0",
|
|
97
|
+
"typescript": "^4.0.5"
|
|
98
|
+
},
|
|
99
|
+
"peerDependencies": {
|
|
100
|
+
"react": ">=16.9.0",
|
|
101
|
+
"react-dom": ">=16.9.0"
|
|
102
|
+
},
|
|
103
|
+
"umi": {
|
|
104
|
+
"configFile": "config.ts"
|
|
105
|
+
}
|
|
106
|
+
}
|