@pisell/materials 3.0.21 → 3.0.23
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/meta.js +2 -2
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +2 -2
- package/es/components/MultipleContainersSortList/index.d.ts +5 -5
- package/es/components/MultipleContainersSortList/index.js +10 -10
- package/es/components/filter/components/FilterItem/index.js +5 -2
- package/es/components/filter/components/QuickFilter/index.js +2 -1
- package/es/components/filter/types.d.ts +1 -0
- package/es/components/sort/index.js +3 -1
- package/es/components/sort/index.less +3 -0
- package/es/components/sort/types.d.ts +1 -0
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
- package/es/components/table/Actions/component/Group/PopoverContent.js +11 -7
- package/es/components/table/index.d.ts +2 -2
- package/es/components/table/index.js +27 -25
- package/es/components/table/types.d.ts +6 -1
- package/es/index.d.ts +80 -80
- package/es/index.js +38 -38
- package/lib/components/MultipleContainersSortList/index.d.ts +5 -5
- package/lib/components/MultipleContainersSortList/index.js +16 -11
- package/lib/components/filter/components/FilterItem/index.js +11 -2
- package/lib/components/filter/components/QuickFilter/index.js +2 -1
- package/lib/components/filter/types.d.ts +1 -0
- package/lib/components/sort/index.js +4 -9
- package/lib/components/sort/index.less +3 -0
- package/lib/components/sort/types.d.ts +1 -0
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +2 -2
- package/lib/components/table/Actions/component/Group/PopoverContent.js +2 -1
- package/lib/components/table/index.d.ts +2 -2
- package/lib/components/table/index.js +4 -2
- package/lib/components/table/types.d.ts +6 -1
- package/lib/index.d.ts +80 -80
- package/lowcode/table/meta.ts +42 -0
- package/lowcode/table/snippets.ts +6 -0
- package/package.json +3 -3
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { SortableItemProps } from
|
|
3
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SortableItemProps } from '../DragSortList';
|
|
3
|
+
import './index.less';
|
|
4
4
|
declare type IdType = string | number;
|
|
5
5
|
export interface MultipleContainersSortListProps<T> {
|
|
6
6
|
list: Record<string, T[]>;
|
|
7
7
|
vertical?: boolean;
|
|
8
8
|
wrapStyle?: React.CSSProperties;
|
|
9
9
|
onChange: (val: Record<string, T[]>) => void;
|
|
10
|
-
renderContainer?: DefaultRenderContainerProps[
|
|
10
|
+
renderContainer?: DefaultRenderContainerProps['renderContainer'];
|
|
11
11
|
rowKey: IdType | ((val: T) => IdType);
|
|
12
|
-
children: SortableItemProps<T>[
|
|
12
|
+
children: SortableItemProps<T>['children'];
|
|
13
13
|
quickFilterMaxLength: number;
|
|
14
14
|
}
|
|
15
15
|
export declare const TRASH_ID = "void";
|
|
@@ -14,14 +14,14 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
|
|
|
14
14
|
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; }
|
|
15
15
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
16
16
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
17
|
-
import { DndContext } from
|
|
18
|
-
import { SortableContext, arrayMove, verticalListSortingStrategy, useSortable } from
|
|
19
|
-
import { isFunction } from
|
|
20
|
-
import React, { useCallback, useEffect, useState } from
|
|
17
|
+
import { DndContext } from '@dnd-kit/core';
|
|
18
|
+
import { SortableContext, arrayMove, verticalListSortingStrategy, useSortable } from '@dnd-kit/sortable';
|
|
19
|
+
import { isFunction } from '@pisell/utils';
|
|
20
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
21
21
|
import { SortableItem } from "../DragSortList";
|
|
22
22
|
import "./index.less";
|
|
23
23
|
import { getText } from "../../locales";
|
|
24
|
-
export var TRASH_ID =
|
|
24
|
+
export var TRASH_ID = 'void';
|
|
25
25
|
var DefaultRenderContainer = function DefaultRenderContainer(props) {
|
|
26
26
|
var id = props.id,
|
|
27
27
|
children = props.children,
|
|
@@ -48,7 +48,7 @@ var MultipleContainersSortList = function MultipleContainersSortList(props) {
|
|
|
48
48
|
onChange = props.onChange,
|
|
49
49
|
renderContainer = props.renderContainer,
|
|
50
50
|
_props$rowKey = props.rowKey,
|
|
51
|
-
rowKey = _props$rowKey === void 0 ?
|
|
51
|
+
rowKey = _props$rowKey === void 0 ? 'id' : _props$rowKey,
|
|
52
52
|
quickFilterMaxLength = props.quickFilterMaxLength;
|
|
53
53
|
var _useState = useState([]),
|
|
54
54
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -106,7 +106,7 @@ var MultipleContainersSortList = function MultipleContainersSortList(props) {
|
|
|
106
106
|
var newList = _objectSpread(_objectSpread({}, list), {}, (_objectSpread2 = {}, _defineProperty(_objectSpread2, activeContainer, list[activeContainer].filter(function (item) {
|
|
107
107
|
return getRowKey(item) !== active.id;
|
|
108
108
|
})), _defineProperty(_objectSpread2, overContainer, [].concat(_toConsumableArray(list[overContainer].slice(0, newIndex)), [list[activeContainer][activeIndex]], _toConsumableArray(list[overContainer].slice(newIndex, list[overContainer].length)))), _objectSpread2));
|
|
109
|
-
if (overContainer ===
|
|
109
|
+
if (overContainer === 'quickFilter' && newList[overContainer].length > quickFilterMaxLength) {
|
|
110
110
|
var _objectSpread3;
|
|
111
111
|
newList = _objectSpread(_objectSpread({}, newList), {}, (_objectSpread3 = {}, _defineProperty(_objectSpread3, overContainer, newList[overContainer].slice(0, quickFilterMaxLength)), _defineProperty(_objectSpread3, activeContainer, [].concat(_toConsumableArray(newList[overContainer].slice(quickFilterMaxLength)), _toConsumableArray(newList[activeContainer]))), _objectSpread3));
|
|
112
112
|
}
|
|
@@ -152,15 +152,15 @@ var MultipleContainersSortList = function MultipleContainersSortList(props) {
|
|
|
152
152
|
}),
|
|
153
153
|
strategy: verticalListSortingStrategy
|
|
154
154
|
}, list[container].length ? list[container].map(function (item, index) {
|
|
155
|
-
return /*#__PURE__*/React.createElement(SortableItem, {
|
|
155
|
+
return !(item !== null && item !== void 0 && item.isHidden) ? /*#__PURE__*/React.createElement(SortableItem, {
|
|
156
156
|
key: getRowKey(item),
|
|
157
157
|
id: getRowKey(item),
|
|
158
158
|
item: item,
|
|
159
159
|
index: index
|
|
160
|
-
}, children);
|
|
160
|
+
}, children) : null;
|
|
161
161
|
}) : /*#__PURE__*/React.createElement("span", {
|
|
162
162
|
className: "materials-sort-list-empty"
|
|
163
|
-
}, getText(
|
|
163
|
+
}, getText('table-action-filter-no-filter'))));
|
|
164
164
|
})));
|
|
165
165
|
};
|
|
166
166
|
export default MultipleContainersSortList;
|
|
@@ -7,7 +7,8 @@ var FilterItem = function FilterItem(props) {
|
|
|
7
7
|
var label = props.label,
|
|
8
8
|
type = props.type,
|
|
9
9
|
name = props.name,
|
|
10
|
-
other = props.other
|
|
10
|
+
other = props.other,
|
|
11
|
+
isHidden = props.isHidden;
|
|
11
12
|
var Com = useMemo(function () {
|
|
12
13
|
var _fieldMaps;
|
|
13
14
|
return (_fieldMaps = fieldMaps[type]) === null || _fieldMaps === void 0 ? void 0 : _fieldMaps.edit;
|
|
@@ -15,6 +16,8 @@ var FilterItem = function FilterItem(props) {
|
|
|
15
16
|
return /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
16
17
|
label: label,
|
|
17
18
|
name: name
|
|
18
|
-
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}
|
|
19
|
+
}, (other === null || other === void 0 ? void 0 : other.formItemProps) || {}, {
|
|
20
|
+
hidden: isHidden
|
|
21
|
+
}), /*#__PURE__*/React.createElement(Com, other));
|
|
19
22
|
};
|
|
20
23
|
export default FilterItem;
|
|
@@ -87,7 +87,9 @@ var Sort = function Sort(_ref2) {
|
|
|
87
87
|
key: d.name,
|
|
88
88
|
label: d.label,
|
|
89
89
|
children: sortChildrenMap[d.type](d.name, !!(d !== null && d !== void 0 && d.localFilter)),
|
|
90
|
-
popupClassName: "".concat(prefix, "sort-sub-menu-popup-wrap")
|
|
90
|
+
popupClassName: "".concat(prefix, "sort-sub-menu-popup-wrap"),
|
|
91
|
+
// 增加显示隐藏配置
|
|
92
|
+
className: "".concat(d.isHidden ? "".concat(prefix, "sort-menu-wrap-hide") : "")
|
|
91
93
|
};
|
|
92
94
|
});
|
|
93
95
|
}, [list, localPagination]);
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import React, { useMemo } from
|
|
2
|
-
import { Select, Tooltip } from
|
|
3
|
-
import HelpCircle from
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { Select, Tooltip } from 'antd';
|
|
3
|
+
import HelpCircle from '@pisell/icon/es/HelpCircle';
|
|
4
4
|
import { getText } from "../../../../../locales";
|
|
5
5
|
import "./PopoverContent.less";
|
|
6
|
-
var prefix =
|
|
6
|
+
var prefix = 'pisell-lowcode-';
|
|
7
7
|
var PopoverContent = function PopoverContent(props) {
|
|
8
8
|
var columns = props.columns,
|
|
9
9
|
_props$value = props.value,
|
|
@@ -20,7 +20,11 @@ var PopoverContent = function PopoverContent(props) {
|
|
|
20
20
|
}]);
|
|
21
21
|
};
|
|
22
22
|
var options = useMemo(function () {
|
|
23
|
-
|
|
23
|
+
// 是否开启了隐藏
|
|
24
|
+
var _lists = (columns || []).filter(function (item) {
|
|
25
|
+
return !(item !== null && item !== void 0 && item.isHidden);
|
|
26
|
+
});
|
|
27
|
+
return _lists.map(function (item) {
|
|
24
28
|
return {
|
|
25
29
|
label: item.label,
|
|
26
30
|
value: "".concat(item.name)
|
|
@@ -33,8 +37,8 @@ var PopoverContent = function PopoverContent(props) {
|
|
|
33
37
|
className: "".concat(prefix, "table-action-group-header")
|
|
34
38
|
}, /*#__PURE__*/React.createElement("span", {
|
|
35
39
|
className: "".concat(prefix, "table-action-group-header-title")
|
|
36
|
-
}, getText(
|
|
37
|
-
title: getText(
|
|
40
|
+
}, getText('table-action-group-by-title')), /*#__PURE__*/React.createElement(Tooltip, {
|
|
41
|
+
title: getText('table-action-group-by-title-tip')
|
|
38
42
|
}, /*#__PURE__*/React.createElement(HelpCircle, null))), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Select, {
|
|
39
43
|
options: options,
|
|
40
44
|
value: firstValue.field,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
2
|
-
var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport"];
|
|
2
|
+
var _excluded = ["dataSource", "columns", "dispatch", "style", "filter", "sort", "buttons", "actionButtons", "title", "summary", "onValuesChange", "columnSetting", "dataSourceGroup", "view", "gallery", "currentSettingKey", "exportImport", "currentComponentId"];
|
|
3
3
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
4
4
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
5
5
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
@@ -14,9 +14,9 @@ function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefine
|
|
|
14
14
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
15
15
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
16
16
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
17
|
-
import { useSize } from
|
|
18
|
-
import { Form } from
|
|
19
|
-
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from
|
|
17
|
+
import { useSize } from 'ahooks';
|
|
18
|
+
import { Form } from 'antd';
|
|
19
|
+
import React, { forwardRef, useEffect, useImperativeHandle, useMemo, useRef } from 'react';
|
|
20
20
|
import { useSharedState } from "../../hooks";
|
|
21
21
|
import useEngineContext from "../../hooks/useEngineContext";
|
|
22
22
|
import Actions from "./Actions";
|
|
@@ -32,7 +32,7 @@ import useTriggerValuesChange from "./hooks/useTriggerValuesChange";
|
|
|
32
32
|
import { Context, Provider, formatColumn } from "./model";
|
|
33
33
|
import "./index.less";
|
|
34
34
|
var defaultView = {
|
|
35
|
-
defaultViewMode:
|
|
35
|
+
defaultViewMode: 'grid',
|
|
36
36
|
multiple: false,
|
|
37
37
|
modeList: []
|
|
38
38
|
};
|
|
@@ -56,6 +56,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
56
56
|
gallery = props.gallery,
|
|
57
57
|
currentSettingKey = props.currentSettingKey,
|
|
58
58
|
exportImport = props.exportImport,
|
|
59
|
+
currentComponentId = props.currentComponentId,
|
|
59
60
|
other = _objectWithoutProperties(props, _excluded);
|
|
60
61
|
var modal = useSharedState(Context);
|
|
61
62
|
var _Form$useForm = Form.useForm(),
|
|
@@ -63,7 +64,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
63
64
|
form = _Form$useForm2[0];
|
|
64
65
|
var defaultViewMode = view.defaultViewMode,
|
|
65
66
|
multiple = view.multiple;
|
|
66
|
-
var viewMode = Form.useWatch(
|
|
67
|
+
var viewMode = Form.useWatch('view_mode', {
|
|
67
68
|
form: form,
|
|
68
69
|
preserve: true
|
|
69
70
|
});
|
|
@@ -76,11 +77,12 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
76
77
|
width = _ref.width;
|
|
77
78
|
var utils = context === null || context === void 0 ? void 0 : (_context$appHelper = context.appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils;
|
|
78
79
|
var tableId = useMemo(function () {
|
|
79
|
-
|
|
80
|
-
|
|
80
|
+
console.log(props, 'wh');
|
|
81
|
+
if (props.__designMode === 'design') {
|
|
82
|
+
return 'designMode-mock-table-id';
|
|
81
83
|
}
|
|
82
|
-
return props.__id;
|
|
83
|
-
}, [props.__id, props.__designMode]);
|
|
84
|
+
return (props === null || props === void 0 ? void 0 : props.currentComponentId) || props.__id;
|
|
85
|
+
}, [props.__id, props.__designMode, props === null || props === void 0 ? void 0 : props.currentComponentId]);
|
|
84
86
|
var columns = useMemo(function () {
|
|
85
87
|
return propsColumns.filter(function (item) {
|
|
86
88
|
return !item.hidden;
|
|
@@ -120,7 +122,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
120
122
|
return _columns;
|
|
121
123
|
}, [columns]);
|
|
122
124
|
var currentSettingHash = useMemo(function () {
|
|
123
|
-
return currentSettingKey || getHash(removeTitleColumns) ||
|
|
125
|
+
return currentSettingKey || getHash(removeTitleColumns) || '';
|
|
124
126
|
}, [currentSettingKey, JSON.stringify(removeTitleColumns)]);
|
|
125
127
|
useEffect(function () {
|
|
126
128
|
var setting = getTableSettingFromLocalStorage(tableId);
|
|
@@ -131,7 +133,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
131
133
|
useEffect(function () {
|
|
132
134
|
if (width) {
|
|
133
135
|
modal.dispatch({
|
|
134
|
-
type:
|
|
136
|
+
type: 'setTableWidth',
|
|
135
137
|
payload: width || {}
|
|
136
138
|
});
|
|
137
139
|
}
|
|
@@ -161,13 +163,13 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
161
163
|
});
|
|
162
164
|
useEffect(function () {
|
|
163
165
|
modal.dispatch({
|
|
164
|
-
type:
|
|
166
|
+
type: 'setUtils',
|
|
165
167
|
payload: utils || {}
|
|
166
168
|
});
|
|
167
169
|
}, [utils]);
|
|
168
170
|
useEffect(function () {
|
|
169
171
|
modal.dispatch({
|
|
170
|
-
type:
|
|
172
|
+
type: 'setDefaultColumns',
|
|
171
173
|
payload: mergeColumnSetting({
|
|
172
174
|
columns: columns,
|
|
173
175
|
tableId: tableId,
|
|
@@ -175,36 +177,36 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
175
177
|
})
|
|
176
178
|
});
|
|
177
179
|
modal.dispatch({
|
|
178
|
-
type:
|
|
180
|
+
type: 'setOriginColumns',
|
|
179
181
|
payload: columns
|
|
180
182
|
});
|
|
181
183
|
}, [columns, tableId, currentViewMode]);
|
|
182
184
|
useEffect(function () {
|
|
183
185
|
modal.dispatch({
|
|
184
|
-
type:
|
|
186
|
+
type: 'setDataSource',
|
|
185
187
|
payload: dataSource
|
|
186
188
|
});
|
|
187
189
|
modal.dispatch({
|
|
188
|
-
type:
|
|
190
|
+
type: 'setOriginDataSource',
|
|
189
191
|
payload: dataSource
|
|
190
192
|
});
|
|
191
193
|
}, [dataSource]);
|
|
192
194
|
useEffect(function () {
|
|
193
195
|
modal.dispatch({
|
|
194
|
-
type:
|
|
196
|
+
type: 'setTableId',
|
|
195
197
|
payload: tableId
|
|
196
198
|
});
|
|
197
199
|
}, [tableId]);
|
|
198
200
|
useEffect(function () {
|
|
199
201
|
var _other$pagination;
|
|
200
202
|
modal.dispatch({
|
|
201
|
-
type:
|
|
203
|
+
type: 'setLocalPagination',
|
|
202
204
|
payload: other === null || other === void 0 ? void 0 : (_other$pagination = other.pagination) === null || _other$pagination === void 0 ? void 0 : _other$pagination.localPagination
|
|
203
205
|
});
|
|
204
206
|
}, [other === null || other === void 0 ? void 0 : (_other$pagination2 = other.pagination) === null || _other$pagination2 === void 0 ? void 0 : _other$pagination2.localPagination]);
|
|
205
207
|
useEffect(function () {
|
|
206
208
|
setTimeout(function () {
|
|
207
|
-
document.body.id =
|
|
209
|
+
document.body.id = 'body';
|
|
208
210
|
}, 200);
|
|
209
211
|
}, []);
|
|
210
212
|
var filterDefaultValues = useMemo(function () {
|
|
@@ -238,8 +240,8 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
238
240
|
useEffect(function () {
|
|
239
241
|
// 虚拟表columns由接口获取 columns变更时只重新设置tableSetting
|
|
240
242
|
// 直接设置column_setting对象时useWatch监听数据有误,先设置{}后再设置useWatch可以监听到变更数据
|
|
241
|
-
form.setFieldValue(
|
|
242
|
-
form.setFieldValue(
|
|
243
|
+
form.setFieldValue('column_setting', {});
|
|
244
|
+
form.setFieldValue('column_setting', tableSettingRef.current.column_setting);
|
|
243
245
|
// JSON.stringify会丢失 render函数变更的监听 使用自定义stringify处理
|
|
244
246
|
}, [stringify(removeTitleColumns)]);
|
|
245
247
|
useEffect(function () {
|
|
@@ -254,7 +256,7 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
254
256
|
var _values = _objectSpread(_objectSpread({}, form.getFieldsValue(true)), values.filters || {});
|
|
255
257
|
var _cur = _objectSpread(_objectSpread({}, cur), cur.filters || {});
|
|
256
258
|
var currentKey = Object.keys(cur)[0];
|
|
257
|
-
if (currentKey !==
|
|
259
|
+
if (currentKey !== 'pagination') {
|
|
258
260
|
_values.pagination = _objectSpread(_objectSpread({}, _values.pagination), {}, {
|
|
259
261
|
page: 1
|
|
260
262
|
});
|
|
@@ -277,11 +279,11 @@ var GridView = Provider( /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
277
279
|
if (!getIsTriggerValuesChange(cur, values)) {
|
|
278
280
|
return;
|
|
279
281
|
}
|
|
280
|
-
_onValuesChange === null || _onValuesChange === void 0 ? void 0 : _onValuesChange(omit(_cur, [
|
|
282
|
+
_onValuesChange === null || _onValuesChange === void 0 ? void 0 : _onValuesChange(omit(_cur, ['filters']), _values);
|
|
281
283
|
},
|
|
282
284
|
className: "materials-grid-form-wrap"
|
|
283
285
|
}, /*#__PURE__*/React.createElement("div", {
|
|
284
|
-
className:
|
|
286
|
+
className: 'materials-grid',
|
|
285
287
|
style: style,
|
|
286
288
|
ref: wrapRef
|
|
287
289
|
}, /*#__PURE__*/React.createElement(Header, {
|
|
@@ -26,6 +26,7 @@ declare type DataSourceListItemType = {
|
|
|
26
26
|
columnKey?: string;
|
|
27
27
|
label?: string;
|
|
28
28
|
name?: string | string[];
|
|
29
|
+
isHidden?: boolean;
|
|
29
30
|
};
|
|
30
31
|
/**
|
|
31
32
|
* 数据源分组总配置
|
|
@@ -211,7 +212,11 @@ export declare type GridViewProps = {
|
|
|
211
212
|
/**
|
|
212
213
|
* 当前本地配置的key 用此hash是否改变用来判断是否清空本地配置 不填默认使用columns数据生成hash
|
|
213
214
|
*/
|
|
214
|
-
currentSettingKey?:
|
|
215
|
+
currentSettingKey?: string;
|
|
216
|
+
/**
|
|
217
|
+
* 当前本地配置的唯一值, 不填默认使用currentSettingKey
|
|
218
|
+
*/
|
|
219
|
+
currentComponentId?: string;
|
|
215
220
|
/**
|
|
216
221
|
* 当前表格中数据发生变化事件 包含本地筛选和外部传入数据变化
|
|
217
222
|
* @param currentDataSource
|
package/es/index.d.ts
CHANGED
|
@@ -1,80 +1,80 @@
|
|
|
1
|
-
export { Affix } from
|
|
2
|
-
export { Anchor } from
|
|
3
|
-
export { Alert } from
|
|
4
|
-
export { Avatar } from
|
|
5
|
-
export { Badge } from
|
|
6
|
-
export { Breadcrumb } from
|
|
7
|
-
export { Card } from
|
|
8
|
-
export { Collapse } from
|
|
9
|
-
export { Carousel } from
|
|
10
|
-
export { Col } from
|
|
11
|
-
export { Descriptions } from
|
|
12
|
-
export { Divider } from
|
|
13
|
-
export { Empty } from
|
|
14
|
-
export { Grid } from
|
|
15
|
-
export { Image } from
|
|
16
|
-
export { InputNumber } from
|
|
17
|
-
export { message } from
|
|
18
|
-
export { Menu } from
|
|
19
|
-
export { Mentions } from
|
|
20
|
-
export { Statistic } from
|
|
21
|
-
export { notification } from
|
|
22
|
-
export { Pagination } from
|
|
23
|
-
export { Popconfirm } from
|
|
24
|
-
export { Popover } from
|
|
25
|
-
export { Progress } from
|
|
26
|
-
export { Rate } from
|
|
27
|
-
export { Result } from
|
|
28
|
-
export { Row } from
|
|
29
|
-
export { Space } from
|
|
30
|
-
export { Spin } from
|
|
31
|
-
export { Steps } from
|
|
32
|
-
export { Switch } from
|
|
33
|
-
export { Transfer } from
|
|
34
|
-
export { Tree } from
|
|
35
|
-
export { Tag } from
|
|
36
|
-
export { Timeline } from
|
|
37
|
-
export { Tooltip } from
|
|
38
|
-
export { version } from
|
|
39
|
-
export { default as Typography } from
|
|
40
|
-
export { default as Skeleton } from
|
|
41
|
-
export { default as Checkbox } from
|
|
42
|
-
export { default as Button } from
|
|
43
|
-
export { default as Radio } from
|
|
44
|
-
export { default as Upload } from
|
|
45
|
-
export { default as Icon } from
|
|
46
|
-
export { default as Form } from
|
|
47
|
-
export { default as Dropdown } from
|
|
48
|
-
export { default as Calendar } from
|
|
49
|
-
export { default as ConfigProvider } from
|
|
50
|
-
export { default as DatePicker } from
|
|
51
|
-
export { default as Tabs } from
|
|
52
|
-
export { default as TimePicker } from
|
|
53
|
-
export { default as Slider } from
|
|
54
|
-
export { default as Table } from
|
|
55
|
-
export { default as Modal } from
|
|
56
|
-
export { default as Drawer } from
|
|
57
|
-
export { default as TreeSelect } from
|
|
58
|
-
export { default as Input } from
|
|
59
|
-
export { default as Select } from
|
|
60
|
-
export { default as Cascader } from
|
|
61
|
-
export { default as AutoComplete } from
|
|
62
|
-
export { default as Div } from
|
|
63
|
-
export { default as Page } from
|
|
64
|
-
export { default as Component } from
|
|
65
|
-
export { default as Filter } from
|
|
66
|
-
export { default as Translation } from
|
|
67
|
-
export { default as SortableList } from
|
|
68
|
-
export { default as RecordView } from
|
|
69
|
-
export { default as QRCode } from
|
|
70
|
-
export { default as ClassicLayout } from
|
|
71
|
-
export { default as List } from
|
|
72
|
-
export { default as Sort } from
|
|
73
|
-
export { default as InputNumberRange } from
|
|
74
|
-
export { default as LowCodePage } from
|
|
75
|
-
export { default as Segmented } from
|
|
76
|
-
export { default as VirtualKeyboard } from
|
|
77
|
-
export { default as VirtualKeyboardTime } from
|
|
78
|
-
export { default as SelectTime } from
|
|
79
|
-
export { default as AutoCompleteNumber } from
|
|
80
|
-
export { default as BatchEditor } from
|
|
1
|
+
export { Affix } from 'antd';
|
|
2
|
+
export { Anchor } from 'antd';
|
|
3
|
+
export { Alert } from 'antd';
|
|
4
|
+
export { Avatar } from 'antd';
|
|
5
|
+
export { Badge } from 'antd';
|
|
6
|
+
export { Breadcrumb } from 'antd';
|
|
7
|
+
export { Card } from 'antd';
|
|
8
|
+
export { Collapse } from 'antd';
|
|
9
|
+
export { Carousel } from 'antd';
|
|
10
|
+
export { Col } from 'antd';
|
|
11
|
+
export { Descriptions } from 'antd';
|
|
12
|
+
export { Divider } from 'antd';
|
|
13
|
+
export { Empty } from 'antd';
|
|
14
|
+
export { Grid } from 'antd';
|
|
15
|
+
export { Image } from 'antd';
|
|
16
|
+
export { InputNumber } from 'antd';
|
|
17
|
+
export { message } from 'antd';
|
|
18
|
+
export { Menu } from 'antd';
|
|
19
|
+
export { Mentions } from 'antd';
|
|
20
|
+
export { Statistic } from 'antd';
|
|
21
|
+
export { notification } from 'antd';
|
|
22
|
+
export { Pagination } from 'antd';
|
|
23
|
+
export { Popconfirm } from 'antd';
|
|
24
|
+
export { Popover } from 'antd';
|
|
25
|
+
export { Progress } from 'antd';
|
|
26
|
+
export { Rate } from 'antd';
|
|
27
|
+
export { Result } from 'antd';
|
|
28
|
+
export { Row } from 'antd';
|
|
29
|
+
export { Space } from 'antd';
|
|
30
|
+
export { Spin } from 'antd';
|
|
31
|
+
export { Steps } from 'antd';
|
|
32
|
+
export { Switch } from 'antd';
|
|
33
|
+
export { Transfer } from 'antd';
|
|
34
|
+
export { Tree } from 'antd';
|
|
35
|
+
export { Tag } from 'antd';
|
|
36
|
+
export { Timeline } from 'antd';
|
|
37
|
+
export { Tooltip } from 'antd';
|
|
38
|
+
export { version } from 'antd';
|
|
39
|
+
export { default as Typography } from './components/typography';
|
|
40
|
+
export { default as Skeleton } from './components/skeleton';
|
|
41
|
+
export { default as Checkbox } from './components/checkbox';
|
|
42
|
+
export { default as Button } from './components/button';
|
|
43
|
+
export { default as Radio } from './components/radio';
|
|
44
|
+
export { default as Upload } from './components/upload';
|
|
45
|
+
export { default as Icon } from './components/icon';
|
|
46
|
+
export { default as Form } from './components/form';
|
|
47
|
+
export { default as Dropdown } from './components/dropdown';
|
|
48
|
+
export { default as Calendar } from './components/calendar';
|
|
49
|
+
export { default as ConfigProvider } from './components/config-provider';
|
|
50
|
+
export { default as DatePicker } from './components/date-picker';
|
|
51
|
+
export { default as Tabs } from './components/tabs';
|
|
52
|
+
export { default as TimePicker } from './components/time-picker';
|
|
53
|
+
export { default as Slider } from './components/slider';
|
|
54
|
+
export { default as Table } from './components/table';
|
|
55
|
+
export { default as Modal } from './components/modal';
|
|
56
|
+
export { default as Drawer } from './components/drawer';
|
|
57
|
+
export { default as TreeSelect } from './components/tree-select';
|
|
58
|
+
export { default as Input } from './components/input';
|
|
59
|
+
export { default as Select } from './components/select';
|
|
60
|
+
export { default as Cascader } from './components/cascader';
|
|
61
|
+
export { default as AutoComplete } from './components/auto-complete';
|
|
62
|
+
export { default as Div } from './components/div';
|
|
63
|
+
export { default as Page } from './components/page';
|
|
64
|
+
export { default as Component } from './components/component';
|
|
65
|
+
export { default as Filter } from './components/filter';
|
|
66
|
+
export { default as Translation } from './components/translation';
|
|
67
|
+
export { default as SortableList } from './components/sortableList';
|
|
68
|
+
export { default as RecordView } from './components/record-view';
|
|
69
|
+
export { default as QRCode } from './components/qrcode';
|
|
70
|
+
export { default as ClassicLayout } from './components/classicLayout';
|
|
71
|
+
export { default as List } from './components/list';
|
|
72
|
+
export { default as Sort } from './components/sort';
|
|
73
|
+
export { default as InputNumberRange } from './components/input-number-range';
|
|
74
|
+
export { default as LowCodePage } from './components/lowCodePage';
|
|
75
|
+
export { default as Segmented } from './components/segmented';
|
|
76
|
+
export { default as VirtualKeyboard } from './components/virtual-keyboard';
|
|
77
|
+
export { default as VirtualKeyboardTime } from './components/virtual-keyboard/Time';
|
|
78
|
+
export { default as SelectTime } from './components/select-time';
|
|
79
|
+
export { default as AutoCompleteNumber } from './components/auto-complete-number';
|
|
80
|
+
export { default as BatchEditor } from './components/batch-editor';
|