@zhenliang/sheet 0.1.7-3.beta.0 → 0.1.7-3.beta.1
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/core/editor/cascaderEditor/index.js +2 -2
- package/dist/core/editor/dateEditor/index.js +2 -2
- package/dist/core/editor/numberEditor/index.js +2 -2
- package/dist/core/editor/selectEditor/index.js +4 -4
- package/dist/core/sheet/Cell.d.ts +1 -1
- package/dist/core/sheet/Cell.js +3 -3
- package/dist/core/sheet/Control.d.ts +1 -1
- package/dist/core/sheet/Control.js +2 -2
- package/dist/core/sheet/DataEditor.js +2 -2
- package/dist/core/sheet/DefaultCell.js +1 -1
- package/dist/core/sheet/DefaultRow.js +2 -2
- package/dist/core/sheet/DefaultRowMapper.js +4 -4
- package/dist/core/sheet/DefaultShell.js +1 -1
- package/dist/core/sheet/Event.d.ts +1 -1
- package/dist/core/sheet/Event.js +1 -1
- package/dist/core/sheet/Menu.d.ts +1 -1
- package/dist/core/sheet/Menu.js +3 -3
- package/dist/core/sheet/ValueViewer.js +1 -1
- package/dist/core/sheet/index.js +4 -4
- package/dist/core/sheet/searchInput.d.ts +1 -1
- package/dist/core/sheet/searchInput.js +3 -3
- package/dist/core/sheet/useCellEvent.js +1 -1
- package/dist/core/sheet/useContextMenu.js +1 -1
- package/dist/core/sheet/useMouseEvent.js +1 -1
- package/dist/core/sheet/useSearchInput.js +1 -1
- package/dist/core/sheet/useSelectVisible.js +1 -1
- package/dist/core/sheet/useVirtualList.js +2 -2
- package/dist/core/shell/draggableShell/index.d.ts +1 -1
- package/dist/core/shell/draggableShell/index.js +5 -5
- package/dist/core/shell/tableShell.d.ts +1 -1
- package/dist/core/shell/tableShell.js +4 -4
- package/dist/core/table/addButton.d.ts +1 -1
- package/dist/core/table/addButton.js +3 -3
- package/dist/core/table/events.d.ts +1 -1
- package/dist/core/table/events.js +3 -3
- package/dist/core/table/index.js +3 -3
- package/dist/core/table/useGroupConfig.js +1 -1
- package/dist/core/table/useRowSelection.js +1 -1
- package/dist/core/viewer/btnViewer/index.js +3 -3
- package/dist/core/viewer/cascaderViewer/index.js +2 -2
- package/dist/core/viewer/checkViewer/index.js +2 -2
- package/dist/core/viewer/editViewer/index.js +3 -3
- package/dist/core/viewer/groupViewer/index.js +2 -2
- package/dist/core/viewer/selectorViewer/index.js +1 -1
- package/dist/core/viewer/switchViewer/index.js +2 -2
- package/dist/example/antComponent.d.ts +1 -1
- package/dist/example/antComponent.js +2 -2
- package/dist/example/basic.d.ts +1 -1
- package/dist/example/basic.js +4 -4
- package/dist/example/ellipsis.d.ts +1 -1
- package/dist/example/ellipsis.js +2 -2
- package/dist/example/fixed.d.ts +1 -1
- package/dist/example/fixed.js +2 -2
- package/dist/example/group.js +2 -2
- package/dist/example/selection.d.ts +1 -1
- package/dist/example/selection.js +2 -2
- package/dist/example/sheet.d.ts +1 -1
- package/dist/example/sheet.js +3 -3
- package/dist/example/valuationAnalyze.js +2 -2
- package/dist/hooks/useEventBus.js +1 -1
- package/dist/hooks/useGroupConfig.d.ts +1 -1
- package/dist/hooks/useGroupConfig.js +2 -2
- package/dist/hooks/useKeyboard.js +1 -1
- package/dist/hooks/useMiddlewareReducer.js +1 -1
- package/dist/hooks/useMouse.js +1 -1
- package/dist/hooks/useSetState.js +1 -1
- package/dist/hooks/useSheetEvent.d.ts +1 -1
- package/dist/hooks/useSheetEvent.js +2 -2
- package/dist/hooks/useWidthConfig.d.ts +1 -1
- package/dist/hooks/useWidthConfig.js +2 -2
- package/dist/type/sheet.d.ts +1 -1
- package/dist/type/sheetTable.d.ts +1 -1
- package/package.json +5 -2
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Cascader } from 'antd';
|
|
2
2
|
import 'antd/es/cascader/style/index.css';
|
|
3
3
|
import { isNil } from 'lodash';
|
|
4
|
-
import { useMemo } from
|
|
4
|
+
import { useMemo } from 'react';
|
|
5
5
|
import { optionsToValuesFromLabelOrValue, valuesTransferToLabel } from "../../util";
|
|
6
6
|
import "./index.less";
|
|
7
|
-
import { jsx as _jsx } from "
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
8
|
var getCascaderEditor = function getCascaderEditor(options, getCustomOptions) {
|
|
9
9
|
var CascaderEditor = function CascaderEditor(props) {
|
|
10
10
|
var value = props.value,
|
|
@@ -8,9 +8,9 @@ import { DatePicker } from 'antd';
|
|
|
8
8
|
import 'antd/es/date-picker/style/index.css';
|
|
9
9
|
import { isNil } from 'lodash';
|
|
10
10
|
import moment from 'moment';
|
|
11
|
-
import { useEffect, useMemo, useRef } from
|
|
11
|
+
import { useEffect, useMemo, useRef } from 'react';
|
|
12
12
|
import "./index.less";
|
|
13
|
-
import { jsx as _jsx } from "
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
export var getDateEditor = function getDateEditor(dateProps) {
|
|
15
15
|
var DateEditor = function DateEditor(props) {
|
|
16
16
|
var value = props.value,
|
|
@@ -11,9 +11,9 @@ import { formatPrecision } from "../../../standardUtils";
|
|
|
11
11
|
import { InputNumber as AntInputNumber } from 'antd';
|
|
12
12
|
import 'antd/es/input-number/style/index.css';
|
|
13
13
|
import { isNil, isNumber } from 'lodash';
|
|
14
|
-
import { useCallback, useEffect, useRef } from
|
|
14
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
15
15
|
import "./index.less";
|
|
16
|
-
import { jsx as _jsx } from "
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
17
|
var isNumeric = function isNumeric(str) {
|
|
18
18
|
// 使用正则表达式匹配数字,包括整数和小数
|
|
19
19
|
return /^-?\d+(\.\d+)?$/.test(str);
|
|
@@ -15,11 +15,11 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
15
15
|
import { Select } from 'antd';
|
|
16
16
|
import 'antd/es/select/style/index.css';
|
|
17
17
|
import { isNil } from 'lodash';
|
|
18
|
-
import { useState } from
|
|
18
|
+
import { useState } from 'react';
|
|
19
19
|
import "./index.less";
|
|
20
|
-
import { Fragment as _Fragment } from "
|
|
21
|
-
import { jsx as _jsx } from "
|
|
22
|
-
import { jsxs as _jsxs } from "
|
|
20
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
23
23
|
export var getSelectEditor = function getSelectEditor(options) {
|
|
24
24
|
var valueKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'value';
|
|
25
25
|
var extra = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : /*#__PURE__*/_jsx(_Fragment, {});
|
package/dist/core/sheet/Cell.js
CHANGED
|
@@ -5,13 +5,13 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { isNil } from 'lodash';
|
|
8
|
-
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from
|
|
8
|
+
import React, { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
9
9
|
import { useSetState, useSheetEvent } from "../../hooks";
|
|
10
10
|
import { renderValue } from "../util";
|
|
11
11
|
import DataEditor from "./DataEditor";
|
|
12
12
|
import DefaultCell from "./DefaultCell";
|
|
13
13
|
import ValueViewer from "./ValueViewer";
|
|
14
|
-
import { jsx as _jsx } from "
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
function initialData(_ref) {
|
|
16
16
|
var cell = _ref.cell;
|
|
17
17
|
return renderValue(cell);
|
|
@@ -184,7 +184,7 @@ var Cell = function Cell(props) {
|
|
|
184
184
|
children: content
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
|
-
export default memo(Cell, function (pre, next) {
|
|
187
|
+
export default /*#__PURE__*/memo(Cell, function (pre, next) {
|
|
188
188
|
var shouldUpdate = pre.col === next.col && pre.row === next.row && pre.cell.value === next.cell.value && pre.cell.dataEditor === next.cell.dataEditor && pre.cell.className === next.cell.className && pre.cell.record === next.cell.record && pre.cellFixedInfo === next.cellFixedInfo;
|
|
189
189
|
return shouldUpdate;
|
|
190
190
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EditOutlined, VerticalAlignBottomOutlined, VerticalAlignTopOutlined } from '@ant-design/icons';
|
|
2
2
|
import { Button, Tooltip } from 'antd';
|
|
3
|
-
import React, { useMemo } from
|
|
4
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import React, { useMemo } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
var itemStyle = {
|
|
6
6
|
fontSize: 18,
|
|
7
7
|
marginTop: 2
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { useEffect, useRef } from
|
|
2
|
-
import { jsx as _jsx } from "
|
|
1
|
+
import { useEffect, useRef } from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
var DataEditor = function DataEditor(_ref) {
|
|
4
4
|
var value = _ref.value,
|
|
5
5
|
onChange = _ref.onChange;
|
|
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { classNames } from "../util";
|
|
8
|
-
import { jsx as _jsx } from "
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
9
|
var DefaultCell = function DefaultCell(props) {
|
|
10
10
|
var cell = props.cell,
|
|
11
11
|
row = props.row,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useMemo } from
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { groupConfigToGroupMap } from "../util";
|
|
3
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
var DefaultRow = function DefaultRow(_ref) {
|
|
5
5
|
var _groupMap$get, _groupMap$get2;
|
|
6
6
|
var rowClassName = _ref.rowClassName,
|
|
@@ -4,11 +4,11 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
4
4
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
|
-
import { memo } from
|
|
7
|
+
import { memo } from 'react';
|
|
8
8
|
import Cell from "./Cell";
|
|
9
|
-
import { jsx as _jsx } from "
|
|
10
|
-
import { Fragment as _Fragment } from "
|
|
11
|
-
export var DefaultRowMapper = memo(function (_ref) {
|
|
9
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
10
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
11
|
+
export var DefaultRowMapper = /*#__PURE__*/memo(function (_ref) {
|
|
12
12
|
var rowData = _ref.rowData,
|
|
13
13
|
row = _ref.row,
|
|
14
14
|
fixedInfo = _ref.fixedInfo,
|
package/dist/core/sheet/Event.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MenuRenderProps } from "../../type/sheet";
|
|
2
|
-
import React from
|
|
2
|
+
import React from 'react';
|
|
3
3
|
export declare const Menu: React.ForwardRefExoticComponent<MenuRenderProps & {
|
|
4
4
|
contextMenu?: React.FC<MenuRenderProps> | undefined;
|
|
5
5
|
showMenu: boolean;
|
package/dist/core/sheet/Menu.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React, { forwardRef } from
|
|
2
|
-
import { jsx as _jsx } from "
|
|
3
|
-
export var Menu = forwardRef(function (props, ref) {
|
|
1
|
+
import React, { forwardRef } from 'react';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
export var Menu = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
4
4
|
var showMenu = props.showMenu,
|
|
5
5
|
position = props.position,
|
|
6
6
|
cell = props.cell,
|
package/dist/core/sheet/index.js
CHANGED
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from
|
|
7
|
+
import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
|
8
8
|
// import ReduxLogger from 'redux-logger';
|
|
9
9
|
import ReduxThunk from 'redux-thunk';
|
|
10
10
|
import DefaultRow from "./DefaultRow";
|
|
@@ -27,9 +27,9 @@ import { useMouseEvent } from "./useMouseEvent";
|
|
|
27
27
|
import { useSearchInput } from "./useSearchInput";
|
|
28
28
|
import { useSelectVisible } from "./useSelectVisible";
|
|
29
29
|
import { VirtualizeEnd, VirtualizeStart, useVirtualList } from "./useVirtualList";
|
|
30
|
-
import { jsx as _jsx } from "
|
|
31
|
-
import { jsxs as _jsxs } from "
|
|
32
|
-
import { Fragment as _Fragment } from "
|
|
30
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
31
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
32
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
33
33
|
var Sheet = function Sheet(props) {
|
|
34
34
|
var _visibleData$length, _scroll$y, _scroll$x;
|
|
35
35
|
var _props$sheetInstance = props.sheetInstance,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CloseOutlined, DownOutlined, UpOutlined } from '@ant-design/icons';
|
|
2
2
|
import { Divider, Input } from 'antd';
|
|
3
|
-
import { useEffect, useRef } from
|
|
4
|
-
import { jsxs as _jsxs } from "
|
|
5
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export var SearchInput = function SearchInput(props) {
|
|
7
7
|
var inputRef = useRef(null);
|
|
8
8
|
var _props$current = props.current,
|
|
@@ -11,7 +11,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
13
|
import { useSetState } from "../..";
|
|
14
|
-
import { useEffect } from
|
|
14
|
+
import { useEffect } from 'react';
|
|
15
15
|
import { calcMenuPosition, extractDataRowAndCol, findParentTd } from "../util";
|
|
16
16
|
export var useContextMenu = function useContextMenu(dispatch, elementRef) {
|
|
17
17
|
var enableContextMenu = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useMouse } from "../..";
|
|
2
|
-
import { useCallback, useEffect, useRef } from
|
|
2
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
import { extractDataRowAndCol, findParentTd } from "../util";
|
|
4
4
|
var rowCount = 10; //每秒10行
|
|
5
5
|
var colCount = 5; //每秒5列
|
|
@@ -5,7 +5,7 @@ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key i
|
|
|
5
5
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
|
|
6
6
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
7
|
import { pick } from 'lodash';
|
|
8
|
-
import { useCallback, useEffect } from
|
|
8
|
+
import { useCallback, useEffect } from 'react';
|
|
9
9
|
export var useSearchInput = function useSearchInput(state, dispatch, handlerRef) {
|
|
10
10
|
var goSearchResult = useCallback(function (value) {
|
|
11
11
|
var _state$searchResultLi;
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { throttle } from 'lodash';
|
|
8
|
-
import { useEffect, useState } from
|
|
8
|
+
import { useEffect, useState } from 'react';
|
|
9
9
|
export var useSelectVisible = function useSelectVisible(sheetWrapper, start) {
|
|
10
10
|
var _useState = useState(true),
|
|
11
11
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -7,9 +7,9 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
8
8
|
import { useGroup } from "../../hooks/useGroupConfig";
|
|
9
9
|
import { throttle } from 'lodash';
|
|
10
|
-
import { useEffect, useState } from
|
|
10
|
+
import { useEffect, useState } from 'react';
|
|
11
11
|
import { getRowHeight } from "../util";
|
|
12
|
-
import { jsx as _jsx } from "
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
var extra = 20;
|
|
14
14
|
// 虚拟列表
|
|
15
15
|
export var useVirtualList = function useVirtualList(elementRef) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { SheetType } from "../../../type";
|
|
3
3
|
import './index.less';
|
|
4
|
-
export declare const DraggableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("
|
|
4
|
+
export declare const DraggableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
|
|
5
5
|
children: React.ReactElement;
|
|
6
6
|
isScrolledOver: boolean;
|
|
7
7
|
isScrolledToEnd: boolean;
|
|
@@ -8,15 +8,15 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
8
8
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
|
-
import { createElement, useEffect, useMemo, useRef } from
|
|
11
|
+
import { createElement, useEffect, useMemo, useRef } from 'react';
|
|
12
12
|
import { useSetState, useSheetEvent, useWidth } from "../../../hooks";
|
|
13
13
|
import { classNames } from "../../util";
|
|
14
14
|
import { CheckViewer } from "../../viewer/checkViewer";
|
|
15
15
|
import { GroupViewer } from "../../viewer/groupViewer";
|
|
16
16
|
import "./index.less";
|
|
17
|
-
import { jsx as _jsx } from "
|
|
18
|
-
import { jsxs as _jsxs } from "
|
|
19
|
-
import { Fragment as _Fragment } from "
|
|
17
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
20
20
|
export var DraggableShell = function DraggableShell(_ref) {
|
|
21
21
|
var columns = _ref.columns,
|
|
22
22
|
className = _ref.className,
|
|
@@ -190,7 +190,7 @@ export var DraggableShell = function DraggableShell(_ref) {
|
|
|
190
190
|
},
|
|
191
191
|
children: /*#__PURE__*/_jsx("span", {
|
|
192
192
|
className: "value-viewer",
|
|
193
|
-
children: typeof item.title === 'function' ? createElement(item.title) : item.title
|
|
193
|
+
children: typeof item.title === 'function' ? /*#__PURE__*/createElement(item.title) : item.title
|
|
194
194
|
})
|
|
195
195
|
}, (_item$dataIndex2 = item.dataIndex) !== null && _item$dataIndex2 !== void 0 ? _item$dataIndex2 : index));
|
|
196
196
|
if (item.fixed === 'left') {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { SheetType } from "../../type";
|
|
3
3
|
import './draggableShell/index.less';
|
|
4
|
-
export declare const TableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("
|
|
4
|
+
export declare const TableShell: ({ columns, className, showGroup, showSelect, controlProps, controlWidth, }: SheetType.SheetShell) => import("react").FC<{
|
|
5
5
|
children: React.ReactElement;
|
|
6
6
|
isScrolledOver: boolean;
|
|
7
7
|
isScrolledToEnd: boolean;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useMemo } from
|
|
1
|
+
import { useMemo } from 'react';
|
|
2
2
|
import { useSheetEvent } from "../../hooks";
|
|
3
3
|
import { classNames } from "../util";
|
|
4
4
|
import { CheckViewer } from "../viewer/checkViewer";
|
|
5
5
|
import { GroupViewer } from "../viewer/groupViewer";
|
|
6
6
|
import "./draggableShell/index.less";
|
|
7
|
-
import { jsx as _jsx } from "
|
|
8
|
-
import { jsxs as _jsxs } from "
|
|
9
|
-
import { Fragment as _Fragment } from "
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
9
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
10
10
|
export var TableShell = function TableShell(_ref) {
|
|
11
11
|
var columns = _ref.columns,
|
|
12
12
|
className = _ref.className,
|
|
@@ -6,10 +6,10 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { MoreOutlined } from "@ant-design/icons";
|
|
8
8
|
import { Form, InputNumber, Popover, Button } from "antd";
|
|
9
|
-
import React, { useEffect, useRef, useState } from "
|
|
9
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
10
10
|
import "./index.less";
|
|
11
|
-
import { jsx as _jsx } from "
|
|
12
|
-
import { jsxs as _jsxs } from "
|
|
11
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
12
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
var RowPop = function RowPop(props) {
|
|
14
14
|
var handleBatchAdd = props.handleBatchAdd;
|
|
15
15
|
var inputRef = useRef(null);
|
|
@@ -13,9 +13,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
13
13
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
14
14
|
import { useGroup } from "../../hooks/useGroupConfig";
|
|
15
15
|
import { SheetEvent } from "../sheet/Event";
|
|
16
|
-
import { jsx as _jsx } from "
|
|
17
|
-
import { Fragment as _Fragment } from "
|
|
18
|
-
import { jsxs as _jsxs } from "
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
18
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
19
19
|
export var SelectionEvent = function SelectionEvent(props) {
|
|
20
20
|
var hasChildren = props.hasChildren,
|
|
21
21
|
rowSelection = props.rowSelection,
|
package/dist/core/table/index.js
CHANGED
|
@@ -17,7 +17,7 @@ import { Sheet, useSetState } from "../..";
|
|
|
17
17
|
import { GroupContext } from "../../hooks/useGroupConfig";
|
|
18
18
|
import { WidthContext } from "../../hooks/useWidthConfig";
|
|
19
19
|
import { ConfigProvider, Empty } from 'antd';
|
|
20
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from
|
|
20
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
21
21
|
import { SheetEvent } from "../sheet/Event";
|
|
22
22
|
import { DraggableShell } from "../shell/draggableShell";
|
|
23
23
|
import { TableShell } from "../shell/tableShell";
|
|
@@ -25,8 +25,8 @@ import { AddButton } from "./addButton";
|
|
|
25
25
|
import { GroupEvent, SelectionEvent } from "./events";
|
|
26
26
|
import { formatGroupData, useGroupConfig } from "./useGroupConfig";
|
|
27
27
|
import { formatSelectionData, useRowSelection } from "./useRowSelection";
|
|
28
|
-
import { jsx as _jsx } from "
|
|
29
|
-
import { jsxs as _jsxs } from "
|
|
28
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
30
30
|
var Table = function Table(_ref) {
|
|
31
31
|
var sheetRef = _ref.sheetInstance,
|
|
32
32
|
columns = _ref.columns,
|
|
@@ -15,7 +15,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
15
15
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import { flatten, isNil } from 'lodash';
|
|
18
|
-
import { useCallback, useEffect, useMemo, useRef, useState } from
|
|
18
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
19
19
|
import { groupConfigToGroupMap } from "../util";
|
|
20
20
|
import { GroupViewer } from "../viewer";
|
|
21
21
|
import { dataSourceToRowConfig } from "./util";
|
|
@@ -5,7 +5,7 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import { CheckViewer } from "../..";
|
|
8
|
-
import { useEffect, useRef, useState } from
|
|
8
|
+
import { useEffect, useRef, useState } from 'react';
|
|
9
9
|
export var useRowSelection = function useRowSelection(dataSource, rowSelection, hasChildren) {
|
|
10
10
|
var _dataSource$length;
|
|
11
11
|
var _useState = useState(Array((_dataSource$length = dataSource === null || dataSource === void 0 ? void 0 : dataSource.length) !== null && _dataSource$length !== void 0 ? _dataSource$length : 0).fill(false)),
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { useSheetEvent } from "../../..";
|
|
2
2
|
import { Button, Divider } from 'antd';
|
|
3
|
-
import { useCallback } from
|
|
4
|
-
import { jsx as _jsx } from "
|
|
5
|
-
import { jsxs as _jsxs } from "
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
export var BtnViewer = function BtnViewer(props) {
|
|
7
7
|
var value = props.value,
|
|
8
8
|
row = props.row,
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
// == string 和 number 类型忽略
|
|
3
3
|
|
|
4
4
|
import { valuesTransferToLabel } from "../../util";
|
|
5
|
-
import { Fragment as _Fragment } from "
|
|
6
|
-
import { jsx as _jsx } from "
|
|
5
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
7
|
export var getCascaderViewer = function getCascaderViewer(options) {
|
|
8
8
|
var TypeViewer = function TypeViewer(props) {
|
|
9
9
|
var value = props.value;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSheetEvent } from "../../..";
|
|
2
2
|
import { Checkbox } from 'antd';
|
|
3
|
-
import { useCallback } from
|
|
4
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export var CheckViewer = function CheckViewer(props) {
|
|
6
6
|
var value = props.value,
|
|
7
7
|
row = props.row,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { EditFilled } from '@ant-design/icons';
|
|
2
2
|
import { useSheetEvent } from "../../..";
|
|
3
|
-
import { useCallback } from
|
|
4
|
-
import { jsx as _jsx } from "
|
|
5
|
-
import { jsxs as _jsxs } from "
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
6
|
export var EditViewer = function EditViewer(props) {
|
|
7
7
|
var value = props.value,
|
|
8
8
|
row = props.row,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { MinusSquareOutlined, PlusSquareOutlined } from '@ant-design/icons';
|
|
2
2
|
import { useSheetEvent } from "../../..";
|
|
3
3
|
import { useGroup } from "../../../hooks/useGroupConfig";
|
|
4
|
-
import { useCallback } from
|
|
5
|
-
import { jsx as _jsx } from "
|
|
4
|
+
import { useCallback } from 'react';
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
6
|
export var GroupViewer = function GroupViewer(props) {
|
|
7
7
|
var _config$configMap, _config$configMap2, _config$groupOpen;
|
|
8
8
|
var _props$row = props.row,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useSheetEvent } from "../../..";
|
|
2
2
|
import { Switch } from 'antd';
|
|
3
|
-
import { useCallback } from
|
|
4
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { useCallback } from 'react';
|
|
4
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
5
|
export var SwitchViewer = function SwitchViewer(props) {
|
|
6
6
|
var value = props.value,
|
|
7
7
|
row = props.row,
|
|
@@ -16,7 +16,7 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import { Button, Modal } from 'antd';
|
|
18
18
|
import { cloneDeep, random, range } from 'lodash';
|
|
19
|
-
import React, { useCallback, useMemo, useRef, useState } from
|
|
19
|
+
import React, { useCallback, useMemo, useRef, useState } from 'react';
|
|
20
20
|
import { getCascaderEditor, getDateEditor, getNumberEditor, getSelectEditor } from "../core/editor";
|
|
21
21
|
import Table from "../core/table";
|
|
22
22
|
import { getSelectorViewer } from "../core/viewer";
|
|
@@ -25,7 +25,7 @@ import { getCascaderViewer } from "../core/viewer/cascaderViewer";
|
|
|
25
25
|
import { EditViewer } from "../core/viewer/editViewer";
|
|
26
26
|
import { SwitchViewer } from "../core/viewer/switchViewer";
|
|
27
27
|
import { SheetType } from "../type";
|
|
28
|
-
import { jsx as _jsx } from "
|
|
28
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
29
29
|
var Precision2MoneyEditor = getNumberEditor({
|
|
30
30
|
max: 1000,
|
|
31
31
|
min: 0,
|
package/dist/example/basic.d.ts
CHANGED
package/dist/example/basic.js
CHANGED
|
@@ -17,10 +17,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
17
17
|
import { Table } from "./..";
|
|
18
18
|
import { Space, Tag } from 'antd';
|
|
19
19
|
import 'antd/dist/antd.css';
|
|
20
|
-
import React, { useCallback, useState } from
|
|
21
|
-
import { jsx as _jsx } from "
|
|
22
|
-
import { Fragment as _Fragment } from "
|
|
23
|
-
import { jsxs as _jsxs } from "
|
|
20
|
+
import React, { useCallback, useState } from 'react';
|
|
21
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
22
|
+
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
23
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
var columns = [{
|
|
25
25
|
title: 'Name',
|
|
26
26
|
dataIndex: 'name',
|
package/dist/example/ellipsis.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import Table from "../core/table";
|
|
3
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
var columns = [{
|
|
5
5
|
title: 'Name',
|
|
6
6
|
dataIndex: 'name',
|
package/dist/example/fixed.d.ts
CHANGED
package/dist/example/fixed.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import Table from "../core/table";
|
|
3
|
-
import { jsx as _jsx } from "
|
|
3
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
4
|
var columns = [{
|
|
5
5
|
title: 'Full Name',
|
|
6
6
|
width: 100,
|
package/dist/example/group.js
CHANGED
|
@@ -9,9 +9,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
9
9
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
10
10
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
11
11
|
import { cloneDeep } from 'lodash';
|
|
12
|
-
import { useCallback, useState } from
|
|
12
|
+
import { useCallback, useState } from 'react';
|
|
13
13
|
import Table from "../core/table";
|
|
14
|
-
import { jsx as _jsx } from "
|
|
14
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
15
15
|
var columns = [{
|
|
16
16
|
title: 'Name',
|
|
17
17
|
dataIndex: 'name',
|
|
@@ -16,8 +16,8 @@ function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" !=
|
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
17
|
import { Table } from "./..";
|
|
18
18
|
import 'antd/dist/antd.css';
|
|
19
|
-
import React, { useCallback, useState } from
|
|
20
|
-
import { jsx as _jsx } from "
|
|
19
|
+
import React, { useCallback, useState } from 'react';
|
|
20
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
21
21
|
var columns = [{
|
|
22
22
|
title: 'Name',
|
|
23
23
|
dataIndex: 'name',
|
package/dist/example/sheet.d.ts
CHANGED
package/dist/example/sheet.js
CHANGED
|
@@ -18,14 +18,14 @@ import { MinusCircleOutlined, PlusCircleOutlined } from '@ant-design/icons';
|
|
|
18
18
|
import { Sheet } from "./..";
|
|
19
19
|
import { Tooltip } from 'antd';
|
|
20
20
|
import { cloneDeep, isNil, random, range } from 'lodash';
|
|
21
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from
|
|
21
|
+
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
22
22
|
import { SheetEvent } from "../core/sheet/Event";
|
|
23
23
|
import { DraggableShell } from "../core/shell/draggableShell";
|
|
24
24
|
import { changeGroupConfig } from "../core/util";
|
|
25
25
|
import { useSheetEvent } from "../hooks";
|
|
26
26
|
import "./index.less";
|
|
27
|
-
import { jsx as _jsx } from "
|
|
28
|
-
import { jsxs as _jsxs } from "
|
|
27
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
28
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
29
|
var ExcelIndexCell = function ExcelIndexCell(_ref) {
|
|
30
30
|
var value = _ref.value,
|
|
31
31
|
row = _ref.row,
|
|
@@ -7,10 +7,10 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
7
7
|
import { getNumberEditor, getSelectEditor, Table } from "./..";
|
|
8
8
|
import { Button } from 'antd';
|
|
9
9
|
import { isNil } from 'lodash';
|
|
10
|
-
import { useCallback, useState } from
|
|
10
|
+
import { useCallback, useState } from 'react';
|
|
11
11
|
import { SwitchViewer } from "../core/viewer";
|
|
12
12
|
import { SheetType } from "../type";
|
|
13
|
-
import { jsx as _jsx } from "
|
|
13
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
14
14
|
var RateValueInput = getNumberEditor({
|
|
15
15
|
addonAfter: '%',
|
|
16
16
|
min: 0,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { GroupConfigContext } from '../type/sheet';
|
|
3
|
-
export declare const GroupContext: import("
|
|
3
|
+
export declare const GroupContext: import("react").Context<GroupConfigContext>;
|
|
4
4
|
export declare function useGroup(): GroupConfigContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext, useContext } from
|
|
2
|
-
export var GroupContext = createContext({});
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export var GroupContext = /*#__PURE__*/createContext({});
|
|
3
3
|
export function useGroup() {
|
|
4
4
|
return useContext(GroupContext);
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback, useEffect } from
|
|
1
|
+
import { useCallback, useEffect } from 'react';
|
|
2
2
|
import { A_KEY, BACKSPACE_KEY, C_KEY, DELETE_KEY, DOWN_KEY, ENTER_KEY, ESCAPE_KEY, F_KEY, LEFT_KEY, RIGHT_KEY, TAB_KEY, UP_KEY, V_KEY, X_KEY, Y_KEY, Z_KEY } from "../core/config";
|
|
3
3
|
import { isInputKey } from "../core/util";
|
|
4
4
|
var ua = window.navigator.userAgent;
|
|
@@ -4,7 +4,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
4
4
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
5
5
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
6
6
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
|
-
import * as React from
|
|
7
|
+
import * as React from 'react';
|
|
8
8
|
export var useMiddlewareReducer = function useMiddlewareReducer(reducer, initialState) {
|
|
9
9
|
var middleware = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : [];
|
|
10
10
|
var _React$useState = React.useState(initialState),
|
package/dist/hooks/useMouse.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { debounce } from 'lodash';
|
|
2
|
-
import { useCallback, useEffect, useRef } from
|
|
2
|
+
import { useCallback, useEffect, useRef } from 'react';
|
|
3
3
|
export var useMouse = function useMouse(handler, listenElement) {
|
|
4
4
|
var mouseUp = handler.mouseUp,
|
|
5
5
|
mouseDown = handler.mouseDown,
|
|
@@ -10,7 +10,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
10
10
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
11
11
|
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
12
12
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
13
|
-
import { useCallback, useState } from
|
|
13
|
+
import { useCallback, useState } from 'react';
|
|
14
14
|
var useSetState = function useSetState() {
|
|
15
15
|
var initialState = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
16
16
|
var _useState = useState(initialState),
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
/// <reference types="react" />
|
|
3
3
|
import Events from 'events';
|
|
4
|
-
export declare const SheetEventContext: import("
|
|
4
|
+
export declare const SheetEventContext: import("react").Context<Events | undefined>;
|
|
5
5
|
export declare function useSheetEvent(): Events;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext, useContext } from
|
|
2
|
-
export var SheetEventContext = createContext(undefined);
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export var SheetEventContext = /*#__PURE__*/createContext(undefined);
|
|
3
3
|
export function useSheetEvent() {
|
|
4
4
|
return useContext(SheetEventContext);
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { WidthConfigContext } from '../type/sheet';
|
|
3
|
-
export declare const WidthContext: import("
|
|
3
|
+
export declare const WidthContext: import("react").Context<WidthConfigContext>;
|
|
4
4
|
export declare function useWidth(): WidthConfigContext;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { createContext, useContext } from
|
|
2
|
-
export var WidthContext = createContext({});
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
export var WidthContext = /*#__PURE__*/createContext({});
|
|
3
3
|
export function useWidth() {
|
|
4
4
|
return useContext(WidthContext);
|
|
5
5
|
}
|
package/dist/type/sheet.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import type { EventEmitter } from 'events';
|
|
3
|
-
import { CSSProperties } from
|
|
3
|
+
import { CSSProperties } from 'react';
|
|
4
4
|
import { SheetTableType, SheetType } from '.';
|
|
5
5
|
export declare enum CellAlign {
|
|
6
6
|
left = "left",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zhenliang/sheet",
|
|
3
|
-
"version": "0.1.73.beta.
|
|
3
|
+
"version": "0.1.73.beta.1",
|
|
4
4
|
"description": "A react library developed with dumi",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"module": "dist/index.js",
|
|
@@ -21,6 +21,9 @@
|
|
|
21
21
|
"prepublishOnly": "father doctor && npm run build",
|
|
22
22
|
"start": "npm run dev"
|
|
23
23
|
},
|
|
24
|
+
"resolutions": {
|
|
25
|
+
"@types/react": "17.0.40"
|
|
26
|
+
},
|
|
24
27
|
"commitlint": {
|
|
25
28
|
"extends": [
|
|
26
29
|
"@commitlint/config-conventional"
|
|
@@ -82,4 +85,4 @@
|
|
|
82
85
|
"fizz.zhou@ap.jll.com"
|
|
83
86
|
],
|
|
84
87
|
"preid": "beta"
|
|
85
|
-
}
|
|
88
|
+
}
|