es-grid-template 0.1.2-2 → 0.1.2

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.
@@ -236,6 +236,7 @@ const InternalTable = props => {
236
236
  const transformedColumn = {
237
237
  ...col,
238
238
  dataIndex: col.field ?? col.dataIndex,
239
+ key: col.field ?? col.dataIndex ?? col.key,
239
240
  title: t ? t(col.headerText ?? col.title) : col.headerText ?? col.title,
240
241
  ellipsis: col.ellipsis !== false,
241
242
  align: col.textAlign ?? col.align,
@@ -247,7 +248,7 @@ const InternalTable = props => {
247
248
  children: transformColumns(col.children, currentPath)
248
249
  };
249
250
  }
250
- if (col.dataIndex === 'index' || col.field === 'index' || col.dataIndex === '#' || col.dataIndex === '#') {
251
+ if (col.dataIndex === 'index' || col.field === 'index' || col.dataIndex === '#' || col.field === '#' || col.allowFiltering === false) {
251
252
  return {
252
253
  ...transformedColumn
253
254
  };
@@ -286,6 +287,7 @@ const InternalTable = props => {
286
287
  };
287
288
  const TableComponent = editAble ? GridEdit : Grid;
288
289
  return /*#__PURE__*/React.createElement(TableComponent, _extends({}, rest, {
290
+ t: t,
289
291
  tableRef: tableRef,
290
292
  dataSource: data,
291
293
  components: {
@@ -115,6 +115,7 @@ const TableGrid = props => {
115
115
  dataSourceFilter: propDataSourceFilter,
116
116
  loading,
117
117
  triggerChangeColumns,
118
+ summary,
118
119
  ...rest
119
120
  } = props;
120
121
  const {
@@ -357,29 +358,37 @@ const TableGrid = props => {
357
358
  onScroll: () => {
358
359
  setMenuVisible(false);
359
360
  },
360
- summary: () => /*#__PURE__*/React.createElement(Table.Summary, {
361
- fixed: true
362
- }, /*#__PURE__*/React.createElement(Table.Summary.Row, null, flatColumns(columns).filter(col => col.hidden !== true).map((col, index) => {
363
- const thousandSeparator = col.format?.thousandSeparator ? col.format?.thousandSeparator : format?.thousandSeparator;
364
- const decimalSeparator = col.format?.decimalSeparator ? col.format?.decimalSeparator : format?.decimalSeparator;
365
- const dec = col.format?.decimalScale || col.format?.decimalScale === 0 ? col.format?.decimalScale : format?.decimalScale;
366
- const sumValue = col.type === 'number' ? sumDataByField(dataSource, col?.key) : 0;
367
- const value = !isEmpty(sumValue) ? dec || dec === 0 ? parseFloat(Number(sumValue).toFixed(dec)).toString() : sumValue.toString() : '0';
368
- const cellValue = col.type === 'number' && col.isSummary !== false ? value : '';
369
- const numericFormatProps = {
370
- thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
371
- decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
372
- allowNegative: (col.format?.allowNegative ? col.format?.allowNegative : format?.allowNegative) ?? false,
373
- prefix: col.format?.prefix ? col.format?.prefix : format?.prefix,
374
- suffix: col.format?.suffix ? col.format?.suffix : format?.suffix,
375
- decimalScale: dec,
376
- fixedDecimalScale: (col.format?.fixedDecimalScale ? col.format?.fixedDecimalScale : format?.fixedDecimalScale) ?? false
377
- };
378
- return /*#__PURE__*/React.createElement(Table.Summary.Cell, {
379
- key: col.key,
380
- index: index
381
- }, col.summaryTemplate ? col.summaryTemplate(cellValue, col.key) : numericFormatter(cellValue, numericFormatProps));
382
- }))),
361
+ summary: () => {
362
+ if (typeof summary === 'function') {
363
+ return summary(dataSource);
364
+ }
365
+ if (!summary) {
366
+ return undefined;
367
+ }
368
+ return /*#__PURE__*/React.createElement(Table.Summary, {
369
+ fixed: true
370
+ }, /*#__PURE__*/React.createElement(Table.Summary.Row, null, flatColumns(columns).filter(col => col.hidden !== true).map((col, index) => {
371
+ const thousandSeparator = col.format?.thousandSeparator ? col.format?.thousandSeparator : format?.thousandSeparator;
372
+ const decimalSeparator = col.format?.decimalSeparator ? col.format?.decimalSeparator : format?.decimalSeparator;
373
+ const dec = col.format?.decimalScale || col.format?.decimalScale === 0 ? col.format?.decimalScale : format?.decimalScale;
374
+ const sumValue = col.type === 'number' ? sumDataByField(dataSource, col?.key) : 0;
375
+ const value = !isEmpty(sumValue) ? dec || dec === 0 ? parseFloat(Number(sumValue).toFixed(dec)).toString() : sumValue.toString() : '0';
376
+ const cellValue = col.type === 'number' && col.isSummary !== false ? value : '';
377
+ const numericFormatProps = {
378
+ thousandSeparator: checkThousandSeparator(thousandSeparator, decimalSeparator),
379
+ decimalSeparator: checkDecimalSeparator(thousandSeparator, decimalSeparator),
380
+ allowNegative: (col.format?.allowNegative ? col.format?.allowNegative : format?.allowNegative) ?? false,
381
+ prefix: col.format?.prefix ? col.format?.prefix : format?.prefix,
382
+ suffix: col.format?.suffix ? col.format?.suffix : format?.suffix,
383
+ decimalScale: dec,
384
+ fixedDecimalScale: (col.format?.fixedDecimalScale ? col.format?.fixedDecimalScale : format?.fixedDecimalScale) ?? false
385
+ };
386
+ return /*#__PURE__*/React.createElement(Table.Summary.Cell, {
387
+ key: col.key,
388
+ index: index
389
+ }, col.summaryTemplate ? col.summaryTemplate(cellValue, col.key) : numericFormatter(cellValue, numericFormatProps));
390
+ })));
391
+ },
383
392
  pagination: pagination && pagination.onChange ? false : {
384
393
  showTotal: (total, range) => `${range[0]}-${range[1]} / ${total} items`,
385
394
  ...pagination
@@ -401,10 +410,9 @@ const TableGrid = props => {
401
410
  items: toolbarItems ?? [],
402
411
  mode: 'responsive'
403
412
  // mode={'scroll'}
404
- ,
405
- onClick: val => {
406
- console.log(val);
407
- }
413
+ // onClick={(val: any) => {
414
+ // console.log(val)
415
+ // }}
408
416
  }), showColumnChoose && /*#__PURE__*/React.createElement(ColumnsChoose, {
409
417
  columns: columns,
410
418
  triggerChangeColumns: triggerChangeColumns
@@ -106,6 +106,7 @@ $rowSelectedHoverBg: 'ui-rc' !default;
106
106
  .#{$prefix}-table-summary {
107
107
  .#{$prefix}-table-cell {
108
108
  background-color: #fafafa;
109
+ height: 32px;
109
110
  }
110
111
 
111
112
  > tr > td {
@@ -6,6 +6,7 @@ import Command from "../Command";
6
6
  import { renderContent } from "../hooks/useColumns";
7
7
  const Grid = props => {
8
8
  const {
9
+ t,
9
10
  columns,
10
11
  height,
11
12
  tableRef,
@@ -31,7 +32,7 @@ const Grid = props => {
31
32
  const transformedColumn = {
32
33
  ...column,
33
34
  dataIndex: column.field ?? column.dataIndex,
34
- title: column.headerText ?? column.title,
35
+ title: t ? t(column.headerText ?? column.title) : column.headerText ?? column.title,
35
36
  ellipsis: column.ellipsis !== false,
36
37
  align: column.textAlign ?? column.align,
37
38
  fixed: column.frozen ? column.frozen.toLowerCase() : column.fixed
@@ -63,7 +64,7 @@ const Grid = props => {
63
64
  render: (value, record, rowIndex) => renderContent(column, value, record, rowIndex, format)
64
65
  };
65
66
  });
66
- }, []);
67
+ }, [format, t]);
67
68
  const mergedColumns = useMemo(() => transformColumns(columns ?? []), [transformColumns, columns]);
68
69
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(GridStyle, {
69
70
  heightTable: height,
@@ -71,6 +72,7 @@ const Grid = props => {
71
72
  position: 'relative'
72
73
  }
73
74
  }, /*#__PURE__*/React.createElement(TableGrid, _extends({}, rest, {
75
+ t: t,
74
76
  tableRef: tableRef,
75
77
  components: {
76
78
  ...components
@@ -118,7 +118,7 @@ export type ColumnsType<RecordType = AnyObject> = ColumnType<RecordType>[];
118
118
  export type ColumnsEditType<RecordType = AnyObject> = ColumnEditType<RecordType>[];
119
119
  export type ColumnTable<RecordType = AnyObject> = ColumnEditType<RecordType> | ColumnType<RecordType>;
120
120
  export type ColumnsTable<RecordType = AnyObject> = (ColumnType<RecordType> | ColumnEditType<RecordType>)[];
121
- export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource'> {
121
+ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource' | 'summary'> {
122
122
  editAble?: boolean;
123
123
  dataSource: RecordType[];
124
124
  columns: ColumnsTable<RecordType>;
@@ -159,6 +159,7 @@ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, '
159
159
  loading?: boolean;
160
160
  allowResizing?: boolean;
161
161
  onDataChange?: (data: RecordType[]) => void;
162
+ summary?: boolean | ((data: readonly RecordType[]) => React.ReactNode);
162
163
  }
163
164
  export interface TableEditProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
164
165
  columns: ColumnsTable<RecordType>;
@@ -245,6 +245,7 @@ const InternalTable = props => {
245
245
  const transformedColumn = {
246
246
  ...col,
247
247
  dataIndex: col.field ?? col.dataIndex,
248
+ key: col.field ?? col.dataIndex ?? col.key,
248
249
  title: t ? t(col.headerText ?? col.title) : col.headerText ?? col.title,
249
250
  ellipsis: col.ellipsis !== false,
250
251
  align: col.textAlign ?? col.align,
@@ -256,7 +257,7 @@ const InternalTable = props => {
256
257
  children: transformColumns(col.children, currentPath)
257
258
  };
258
259
  }
259
- if (col.dataIndex === 'index' || col.field === 'index' || col.dataIndex === '#' || col.dataIndex === '#') {
260
+ if (col.dataIndex === 'index' || col.field === 'index' || col.dataIndex === '#' || col.field === '#' || col.allowFiltering === false) {
260
261
  return {
261
262
  ...transformedColumn
262
263
  };
@@ -295,6 +296,7 @@ const InternalTable = props => {
295
296
  };
296
297
  const TableComponent = editAble ? _GridEdit.default : _Grid.default;
297
298
  return /*#__PURE__*/_react.default.createElement(TableComponent, (0, _extends2.default)({}, rest, {
299
+ t: t,
298
300
  tableRef: tableRef,
299
301
  dataSource: data,
300
302
  components: {
@@ -122,6 +122,7 @@ const TableGrid = props => {
122
122
  dataSourceFilter: propDataSourceFilter,
123
123
  loading,
124
124
  triggerChangeColumns,
125
+ summary,
125
126
  ...rest
126
127
  } = props;
127
128
  const {
@@ -364,29 +365,37 @@ const TableGrid = props => {
364
365
  onScroll: () => {
365
366
  setMenuVisible(false);
366
367
  },
367
- summary: () => /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary, {
368
- fixed: true
369
- }, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary.Row, null, (0, _useColumns.flatColumns)(columns).filter(col => col.hidden !== true).map((col, index) => {
370
- const thousandSeparator = col.format?.thousandSeparator ? col.format?.thousandSeparator : format?.thousandSeparator;
371
- const decimalSeparator = col.format?.decimalSeparator ? col.format?.decimalSeparator : format?.decimalSeparator;
372
- const dec = col.format?.decimalScale || col.format?.decimalScale === 0 ? col.format?.decimalScale : format?.decimalScale;
373
- const sumValue = col.type === 'number' ? (0, _hooks.sumDataByField)(dataSource, col?.key) : 0;
374
- const value = !(0, _hooks.isEmpty)(sumValue) ? dec || dec === 0 ? parseFloat(Number(sumValue).toFixed(dec)).toString() : sumValue.toString() : '0';
375
- const cellValue = col.type === 'number' && col.isSummary !== false ? value : '';
376
- const numericFormatProps = {
377
- thousandSeparator: (0, _hooks.checkThousandSeparator)(thousandSeparator, decimalSeparator),
378
- decimalSeparator: (0, _hooks.checkDecimalSeparator)(thousandSeparator, decimalSeparator),
379
- allowNegative: (col.format?.allowNegative ? col.format?.allowNegative : format?.allowNegative) ?? false,
380
- prefix: col.format?.prefix ? col.format?.prefix : format?.prefix,
381
- suffix: col.format?.suffix ? col.format?.suffix : format?.suffix,
382
- decimalScale: dec,
383
- fixedDecimalScale: (col.format?.fixedDecimalScale ? col.format?.fixedDecimalScale : format?.fixedDecimalScale) ?? false
384
- };
385
- return /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary.Cell, {
386
- key: col.key,
387
- index: index
388
- }, col.summaryTemplate ? col.summaryTemplate(cellValue, col.key) : (0, _reactNumericComponent.numericFormatter)(cellValue, numericFormatProps));
389
- }))),
368
+ summary: () => {
369
+ if (typeof summary === 'function') {
370
+ return summary(dataSource);
371
+ }
372
+ if (!summary) {
373
+ return undefined;
374
+ }
375
+ return /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary, {
376
+ fixed: true
377
+ }, /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary.Row, null, (0, _useColumns.flatColumns)(columns).filter(col => col.hidden !== true).map((col, index) => {
378
+ const thousandSeparator = col.format?.thousandSeparator ? col.format?.thousandSeparator : format?.thousandSeparator;
379
+ const decimalSeparator = col.format?.decimalSeparator ? col.format?.decimalSeparator : format?.decimalSeparator;
380
+ const dec = col.format?.decimalScale || col.format?.decimalScale === 0 ? col.format?.decimalScale : format?.decimalScale;
381
+ const sumValue = col.type === 'number' ? (0, _hooks.sumDataByField)(dataSource, col?.key) : 0;
382
+ const value = !(0, _hooks.isEmpty)(sumValue) ? dec || dec === 0 ? parseFloat(Number(sumValue).toFixed(dec)).toString() : sumValue.toString() : '0';
383
+ const cellValue = col.type === 'number' && col.isSummary !== false ? value : '';
384
+ const numericFormatProps = {
385
+ thousandSeparator: (0, _hooks.checkThousandSeparator)(thousandSeparator, decimalSeparator),
386
+ decimalSeparator: (0, _hooks.checkDecimalSeparator)(thousandSeparator, decimalSeparator),
387
+ allowNegative: (col.format?.allowNegative ? col.format?.allowNegative : format?.allowNegative) ?? false,
388
+ prefix: col.format?.prefix ? col.format?.prefix : format?.prefix,
389
+ suffix: col.format?.suffix ? col.format?.suffix : format?.suffix,
390
+ decimalScale: dec,
391
+ fixedDecimalScale: (col.format?.fixedDecimalScale ? col.format?.fixedDecimalScale : format?.fixedDecimalScale) ?? false
392
+ };
393
+ return /*#__PURE__*/_react.default.createElement(_rcMasterUi.Table.Summary.Cell, {
394
+ key: col.key,
395
+ index: index
396
+ }, col.summaryTemplate ? col.summaryTemplate(cellValue, col.key) : (0, _reactNumericComponent.numericFormatter)(cellValue, numericFormatProps));
397
+ })));
398
+ },
390
399
  pagination: pagination && pagination.onChange ? false : {
391
400
  showTotal: (total, range) => `${range[0]}-${range[1]} / ${total} items`,
392
401
  ...pagination
@@ -408,10 +417,9 @@ const TableGrid = props => {
408
417
  items: toolbarItems ?? [],
409
418
  mode: 'responsive'
410
419
  // mode={'scroll'}
411
- ,
412
- onClick: val => {
413
- console.log(val);
414
- }
420
+ // onClick={(val: any) => {
421
+ // console.log(val)
422
+ // }}
415
423
  }), showColumnChoose && /*#__PURE__*/_react.default.createElement(_ColumnsChoose.ColumnsChoose, {
416
424
  columns: columns,
417
425
  triggerChangeColumns: triggerChangeColumns
@@ -106,6 +106,7 @@ $rowSelectedHoverBg: 'ui-rc' !default;
106
106
  .#{$prefix}-table-summary {
107
107
  .#{$prefix}-table-cell {
108
108
  background-color: #fafafa;
109
+ height: 32px;
109
110
  }
110
111
 
111
112
  > tr > td {
@@ -15,6 +15,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
15
15
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
16
  const Grid = props => {
17
17
  const {
18
+ t,
18
19
  columns,
19
20
  height,
20
21
  tableRef,
@@ -40,7 +41,7 @@ const Grid = props => {
40
41
  const transformedColumn = {
41
42
  ...column,
42
43
  dataIndex: column.field ?? column.dataIndex,
43
- title: column.headerText ?? column.title,
44
+ title: t ? t(column.headerText ?? column.title) : column.headerText ?? column.title,
44
45
  ellipsis: column.ellipsis !== false,
45
46
  align: column.textAlign ?? column.align,
46
47
  fixed: column.frozen ? column.frozen.toLowerCase() : column.fixed
@@ -72,7 +73,7 @@ const Grid = props => {
72
73
  render: (value, record, rowIndex) => (0, _useColumns.renderContent)(column, value, record, rowIndex, format)
73
74
  };
74
75
  });
75
- }, []);
76
+ }, [format, t]);
76
77
  const mergedColumns = (0, _react.useMemo)(() => transformColumns(columns ?? []), [transformColumns, columns]);
77
78
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_GridStyle.GridStyle, {
78
79
  heightTable: height,
@@ -80,6 +81,7 @@ const Grid = props => {
80
81
  position: 'relative'
81
82
  }
82
83
  }, /*#__PURE__*/_react.default.createElement(_TableGrid.default, (0, _extends2.default)({}, rest, {
84
+ t: t,
83
85
  tableRef: tableRef,
84
86
  components: {
85
87
  ...components
@@ -118,7 +118,7 @@ export type ColumnsType<RecordType = AnyObject> = ColumnType<RecordType>[];
118
118
  export type ColumnsEditType<RecordType = AnyObject> = ColumnEditType<RecordType>[];
119
119
  export type ColumnTable<RecordType = AnyObject> = ColumnEditType<RecordType> | ColumnType<RecordType>;
120
120
  export type ColumnsTable<RecordType = AnyObject> = (ColumnType<RecordType> | ColumnEditType<RecordType>)[];
121
- export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource'> {
121
+ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, 'columns' | 'rowSelection' | 'loading' | 'dataSource' | 'summary'> {
122
122
  editAble?: boolean;
123
123
  dataSource: RecordType[];
124
124
  columns: ColumnsTable<RecordType>;
@@ -159,6 +159,7 @@ export interface TableProps<RecordType> extends Omit<RcTableProps<RecordType>, '
159
159
  loading?: boolean;
160
160
  allowResizing?: boolean;
161
161
  onDataChange?: (data: RecordType[]) => void;
162
+ summary?: boolean | ((data: readonly RecordType[]) => React.ReactNode);
162
163
  }
163
164
  export interface TableEditProps<RecordType = AnyObject> extends Omit<TableProps<RecordType>, 'columns'> {
164
165
  columns: ColumnsTable<RecordType>;
package/package.json CHANGED
@@ -1,102 +1,102 @@
1
- {
2
- "name": "es-grid-template",
3
- "version": "0.1.2-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/*.less"
19
- ],
20
- "scripts": {
21
- "compile": "father build",
22
- "docs:build": "dumi build",
23
- "__docs:deploy": "gh-pages -d dist",
24
- "lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
25
- "now-build": "npm run docs:build",
26
- "prepare": "dumi setup",
27
- "prepublishOnly": "npm run compile",
28
- "postpublish": "npm run docs:build",
29
- "__postpublish": "npm run docs:build && npm run docs:deploy",
30
- "start": "dumi dev",
31
- "test": "vitest --watch false",
32
- "coverage": "vitest run --coverage"
33
- },
34
- "dependencies": {
35
- "@ant-design/colors": "^8.0.0",
36
- "@ant-design/cssinjs": "^1.22.0",
37
- "@ant-design/cssinjs-utils": "^1.1.1",
38
- "@ant-design/icons": "^5.5.2",
39
- "@babel/runtime": "^7.11.2",
40
- "@core-rc/rc-select": "^0.0.8",
41
- "@ctrl/tinycolor": "^3.6.1",
42
- "@faker-js/faker": "^9.5.0",
43
- "@floating-ui/react": "^0.27.5",
44
- "@rc-component/color-picker": "^2.0.1",
45
- "@rc-component/father-plugin": "^2.0.1",
46
- "@rc-component/trigger": "^2.0.0",
47
- "@rc-component/util": "^1.0.1",
48
- "@types/react-resizable": "^3.0.8",
49
- "@types/styled-components": "^5.1.34",
50
- "@vitest/coverage-v8": "^2.0.5",
51
- "antd": "^5.24.1",
52
- "antd-style": "^3.7.1",
53
- "becoxy-icons": "^1.9.9",
54
- "classnames": "^2.3.1",
55
- "dayjs": "^1.11.13",
56
- "lodash": "^4.17.21",
57
- "moment": "^2.30.1",
58
- "postcss": "^8.4.35",
59
- "rc-checkbox": "^3.5.0",
60
- "rc-dropdown": "^4.2.1",
61
- "rc-field-form": "^2.6.0",
62
- "rc-master-ui": "^1.1.8",
63
- "rc-select": "^14.16.3",
64
- "rc-tooltip": "^6.3.0",
65
- "rc-tree": "^5.10.1",
66
- "rc-tree-select": "^5.24.5",
67
- "react-hook-form": "^7.54.2",
68
- "react-hot-toast": "^2.5.2",
69
- "react-numeric-component": "^1.0.7",
70
- "react-resizable": "^3.0.5",
71
- "sass": "^1.81.0",
72
- "styled-components": "^6.1.15",
73
- "throttle-debounce": "^5.0.2",
74
- "vitest": "^2.0.5"
75
- },
76
- "devDependencies": {
77
- "@babel/cli": "^7.26.4",
78
- "@babel/preset-env": "^7.26.9",
79
- "@rc-component/np": "^1.0.3",
80
- "@testing-library/react": "^14.0.0",
81
- "@types/jest": "^29.4.0",
82
- "@types/react": "^18.0.26",
83
- "@types/react-dom": "^18.0.10",
84
- "@types/warning": "^3.0.0",
85
- "cross-env": "^7.0.0",
86
- "dumi": "^2.2.13",
87
- "eslint": "^8.56.0",
88
- "eslint-plugin-unicorn": "^55.0.0",
89
- "father": "^4.0.0",
90
- "gh-pages": "^3.1.0",
91
- "less": "^4.1.1",
92
- "np": "^7.1.0",
93
- "rc-test": "^7.0.9",
94
- "react": "^18.2.0",
95
- "react-dom": "^18.2.0",
96
- "typescript": "^4.0.5"
97
- },
98
- "peerDependencies": {
99
- "react": ">=16.9.0",
100
- "react-dom": ">=16.9.0"
101
- }
102
- }
1
+ {
2
+ "name": "es-grid-template",
3
+ "version": "0.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/*.less"
19
+ ],
20
+ "scripts": {
21
+ "compile": "father build",
22
+ "docs:build": "dumi build",
23
+ "__docs:deploy": "gh-pages -d dist",
24
+ "lint": "eslint src/ --ext .tsx,.ts,.jsx,.js",
25
+ "now-build": "npm run docs:build",
26
+ "prepare": "dumi setup",
27
+ "prepublishOnly": "npm run compile",
28
+ "postpublish": "npm run docs:build",
29
+ "__postpublish": "npm run docs:build && npm run docs:deploy",
30
+ "start": "dumi dev",
31
+ "test": "vitest --watch false",
32
+ "coverage": "vitest run --coverage"
33
+ },
34
+ "dependencies": {
35
+ "@ant-design/colors": "^8.0.0",
36
+ "@ant-design/cssinjs": "^1.22.0",
37
+ "@ant-design/cssinjs-utils": "^1.1.1",
38
+ "@ant-design/icons": "^5.5.2",
39
+ "@babel/runtime": "^7.11.2",
40
+ "@core-rc/rc-select": "^0.0.8",
41
+ "@ctrl/tinycolor": "^3.6.1",
42
+ "@faker-js/faker": "^9.5.0",
43
+ "@floating-ui/react": "^0.27.5",
44
+ "@rc-component/color-picker": "^2.0.1",
45
+ "@rc-component/father-plugin": "^2.0.1",
46
+ "@rc-component/trigger": "^2.0.0",
47
+ "@rc-component/util": "^1.0.1",
48
+ "@types/react-resizable": "^3.0.8",
49
+ "@types/styled-components": "^5.1.34",
50
+ "@vitest/coverage-v8": "^2.0.5",
51
+ "antd": "^5.24.1",
52
+ "antd-style": "^3.7.1",
53
+ "becoxy-icons": "^1.9.9",
54
+ "classnames": "^2.3.1",
55
+ "dayjs": "^1.11.13",
56
+ "lodash": "^4.17.21",
57
+ "moment": "^2.30.1",
58
+ "postcss": "^8.4.35",
59
+ "rc-checkbox": "^3.5.0",
60
+ "rc-dropdown": "^4.2.1",
61
+ "rc-field-form": "^2.6.0",
62
+ "rc-master-ui": "^1.1.8",
63
+ "rc-select": "^14.16.3",
64
+ "rc-tooltip": "^6.3.0",
65
+ "rc-tree": "^5.10.1",
66
+ "rc-tree-select": "^5.24.5",
67
+ "react-hook-form": "^7.54.2",
68
+ "react-hot-toast": "^2.5.2",
69
+ "react-numeric-component": "^1.0.7",
70
+ "react-resizable": "^3.0.5",
71
+ "sass": "^1.81.0",
72
+ "styled-components": "^6.1.15",
73
+ "throttle-debounce": "^5.0.2",
74
+ "vitest": "^2.0.5"
75
+ },
76
+ "devDependencies": {
77
+ "@babel/cli": "^7.26.4",
78
+ "@babel/preset-env": "^7.26.9",
79
+ "@rc-component/np": "^1.0.3",
80
+ "@testing-library/react": "^14.0.0",
81
+ "@types/jest": "^29.4.0",
82
+ "@types/react": "^18.0.26",
83
+ "@types/react-dom": "^18.0.10",
84
+ "@types/warning": "^3.0.0",
85
+ "cross-env": "^7.0.0",
86
+ "dumi": "^2.2.13",
87
+ "eslint": "^8.56.0",
88
+ "eslint-plugin-unicorn": "^55.0.0",
89
+ "father": "^4.0.0",
90
+ "gh-pages": "^3.1.0",
91
+ "less": "^4.1.1",
92
+ "np": "^7.1.0",
93
+ "rc-test": "^7.0.9",
94
+ "react": "^18.2.0",
95
+ "react-dom": "^18.2.0",
96
+ "typescript": "^4.0.5"
97
+ },
98
+ "peerDependencies": {
99
+ "react": ">=16.9.0",
100
+ "react-dom": ">=16.9.0"
101
+ }
102
+ }