vap1 0.4.3 → 0.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_mixin.scss +89 -0
- package/components/Box/Box.d.ts +3 -3
- package/components/Box/Box.js +38 -29
- package/components/Box/SelectBar.d.ts +3 -3
- package/components/Lists/SList.d.ts +4 -5
- package/components/Lists/SList.js +1 -2
- package/components/SearchBar/ActionButtons.d.ts +4 -4
- package/components/SearchBar/ActionButtons.js +26 -3
- package/components/SearchBar/ByField.d.ts +1 -1
- package/components/SearchBar/ByField.js +2 -2
- package/components/SearchBar/ByKeyword.d.ts +2 -2
- package/components/SearchBar/ByKeyword.js +2 -2
- package/components/SearchBar/SearchField.d.ts +2 -2
- package/components/SearchBar/index.js +1 -1
- package/components/Tables/Components/ActionBar.d.ts +2 -3
- package/components/Tables/Components/Actions.d.ts +7 -7
- package/components/Tables/Components/Actions.js +4 -4
- package/components/Tables/Components/index.d.ts +6 -6
- package/components/Tables/TopTable.d.ts +2 -2
- package/components/Tables/TopTable.js +5 -19
- package/components/Tables/TopTableModal.d.ts +2 -2
- package/components/Tables/TopTableModal.js +1 -1
- package/components/Tables/Util.d.ts +5 -1
- package/components/Tables/Util.js +69 -2
- package/components/Tables/VTable.js +45 -74
- package/components/Tables/index.d.ts +5 -4
- package/components/TreeSelect/BaseTreeSelect.d.ts +3 -3
- package/components/TreeSelect/BaseTreeSelect.js +8 -5
- package/components/TreeSelect/DTreeSelect.d.ts +2 -2
- package/components/TreeSelect/DTreeSelect.js +1 -1
- package/components/TreeSelect/FTreeSelect.d.ts +2 -2
- package/components/TreeSelect/STreeSelect.d.ts +2 -2
- package/components/Trees/BaseTree.d.ts +2 -2
- package/components/Trees/COTree/COButton.js +1 -1
- package/components/Trees/COTree/COSelect.js +1 -1
- package/components/Trees/COTree/COTreeUtil.d.ts +2 -1
- package/components/Trees/DTree.d.ts +7 -0
- package/components/Trees/FTree.d.ts +2 -3
- package/components/Trees/STree.d.ts +2 -2
- package/components/UForm/FormWrapper.d.ts +2 -3
- package/components/UForm/UDescriptions.d.ts +2 -1
- package/components/UForm/UDescriptions.js +28 -5
- package/components/UForm/UForm.js +4 -4
- package/components/UForm/UFormModal.d.ts +2 -2
- package/components/UForm/UInfo.d.ts +2 -2
- package/components/UForm/UInfoModal.d.ts +2 -2
- package/components/UForm/UInfoModal.js +1 -1
- package/components/UForm/UModal.d.ts +2 -2
- package/components/UForm/_FieldType.d.ts +1 -1
- package/components/UForm/_FieldType.js +4 -0
- package/components/UForm/_input.d.ts +3 -3
- package/components/UForm/_input.js +2 -2
- package/components/UForm/_register.d.ts +2 -3
- package/components/UForm/index.d.ts +16 -13
- package/components/Upload/UploadFile.d.ts +2 -2
- package/components/Upload/UploadImage.d.ts +2 -2
- package/components/Upload/UploadImage.js +1 -1
- package/components/Upload/UploadModal.d.ts +4 -4
- package/components/Upload/UploadModal.js +2 -2
- package/components/Upload/useUpload.d.ts +2 -2
- package/components/Upload/useUpload.js +1 -1
- package/components/_RegisterUtil.d.ts +1 -1
- package/components/_RegisterUtil.js +2 -2
- package/components/_adapt/Alert.d.ts +2 -3
- package/components/_adapt/Button.d.ts +3 -4
- package/components/_adapt/Col.d.ts +8 -8
- package/components/_adapt/ColorPicker.js +2 -2
- package/components/_adapt/ConfigProvider.d.ts +3 -3
- package/components/_adapt/Drawer.d.ts +2 -3
- package/components/_adapt/Drawer.js +2 -2
- package/components/_adapt/FloatButton.d.ts +5 -5
- package/components/_adapt/Form.js +3 -3
- package/components/_adapt/Icon.d.ts +2 -1
- package/components/_adapt/Image.js +1 -1
- package/components/_adapt/Layout.d.ts +1 -2
- package/components/_adapt/Layout.js +1 -1
- package/components/_adapt/Menu.d.ts +5 -6
- package/components/_adapt/Menu.js +25 -2
- package/components/_adapt/Modal.d.ts +2 -1
- package/components/_adapt/Modal.js +1 -1
- package/components/_adapt/Progress.d.ts +3 -2
- package/components/_adapt/Progress.js +1 -1
- package/components/_adapt/Row.d.ts +2 -2
- package/components/_adapt/Select.js +1 -1
- package/components/_adapt/Slider.d.ts +7 -7
- package/components/_adapt/Space.d.ts +4 -3
- package/components/_adapt/Table.d.ts +5 -5
- package/components/_adapt/Tabs.d.ts +2 -3
- package/components/_adapt/Tag.js +25 -2
- package/components/_adapt/utils.js +10 -10
- package/components/_common/AutoComplete.d.ts +3 -3
- package/components/_common/CountUp.d.ts +3 -3
- package/components/_common/CountUp.js +1 -1
- package/components/_common/DateRange.d.ts +2 -2
- package/components/_common/HighLight.d.ts +2 -2
- package/components/_common/HighLight.js +1 -1
- package/components/_common/I18N.d.ts +2 -2
- package/components/_common/Loading.d.ts +3 -3
- package/components/_common/MonthRange.d.ts +2 -2
- package/components/_common/PromiseLabel.d.ts +4 -4
- package/components/_common/UTitle.d.ts +6 -5
- package/components/_common/UTitle.js +25 -2
- package/components/_common/Upagination.d.ts +2 -2
- package/deps/JsonView.d.ts +2 -2
- package/deps/JsonView.js +5 -2
- package/deps/app-audit/LookUp.d.ts +3 -3
- package/deps/app-audit/LookUp.js +2 -2
- package/deps/app-data/useSource.js +2 -2
- package/deps/echarts.d.ts +2 -2
- package/deps/editor/Article.d.ts +3 -3
- package/deps/editor/support/buttons/ImageButton.d.ts +2 -2
- package/deps/editor/support/buttons/ImageButton.js +1 -1
- package/deps/editor/tools/Button.d.ts +2 -2
- package/deps/editor/tools/Button.js +1 -1
- package/deps/editor/tools/ToolBar.d.ts +2 -2
- package/deps/editor/tools/_BlockButton.d.ts +2 -2
- package/deps/editor/tools/_InsertButton.d.ts +4 -4
- package/deps/editor/tools/_MarkButton.d.ts +2 -2
- package/deps/editor/tools/_TxtButton.d.ts +6 -6
- package/deps/editor/tools/_TxtButton.js +25 -5
- package/deps/editor/types.d.ts +2 -2
- package/deps/editor/utils/index.js +0 -5
- package/hooks/useApiBase.js +1 -1
- package/hooks/useApp.d.ts +3 -3
- package/hooks/useApp.js +1 -1
- package/hooks/useArray.js +5 -7
- package/hooks/useHover.d.ts +3 -3
- package/hooks/useHover.js +2 -25
- package/package.json +1 -1
- package/screen/Comment.d.ts +3 -3
- package/screen/EchartContent.js +2 -2
- package/screen/Page.d.ts +2 -2
- package/screen/render.d.ts +2 -2
- package/uform/FormEditor.d.ts +2 -2
- package/uform/FormEditor.js +3 -2
- package/uform/inputs/_date.js +1 -1
- package/uform/inputs/_input.js +1 -1
- package/uform/inputs/_select.js +1 -1
- package/uform/inputs/register.d.ts +2 -2
- package/uform/panel/Editor/GroupEditor.js +3 -3
- package/uform/panel/Editor/_GroupCollapse.js +3 -3
- package/uform/panel/Editor/_GroupDefault.js +24 -4
- package/uform/panel/Editor/_GroupStep.js +28 -5
- package/uform/panel/Editor/_GroupTab.js +25 -2
- package/uform/panel/Editor/index.js +1 -1
- package/uform/panel/Items/Fields.d.ts +2 -2
- package/uform/panel/Items/Fields.js +3 -1
- package/uform/panel/Items/InputSelector.d.ts +2 -2
- package/uform/panel/Items/InputSelector.js +2 -1
- package/uform/panel/Items/Inputs.d.ts +2 -1
- package/uform/panel/Items/Inputs.js +24 -4
- package/uform/panel/Propreties/CanvasProperties.js +25 -2
- package/uform/panel/Propreties/Component/FieldPlugin.d.ts +2 -2
- package/uform/panel/Propreties/Component/FieldPlugin.js +1 -1
- package/uform/panel/Propreties/Component/LinkAsyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/LinkAsyncFunction.js +1 -1
- package/uform/panel/Propreties/Component/LinkSyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/LinkSyncFunction.js +1 -1
- package/uform/panel/Propreties/Component/Links.js +1 -1
- package/uform/panel/Propreties/Component/OptionTable.js +25 -5
- package/uform/panel/Propreties/Component/RegexpModal.d.ts +2 -2
- package/uform/panel/Propreties/Component/Validate.js +1 -1
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/ValidateAsyncFunction.js +25 -2
- package/uform/panel/Propreties/Component/ValidateSyncFunction.d.ts +2 -2
- package/uform/panel/Propreties/Component/ValidateSyncFunction.js +25 -2
- package/uform/panel/Propreties/FieldProperties.js +1 -1
- package/uform/panel/Propreties/_ItemAdvance.js +25 -2
- package/uform/panel/Propreties/_ItemBase.js +1 -1
- package/uform/panel/Propreties/_ItemLink.js +24 -4
- package/uform/panel/Propreties/_ItemValidate.js +24 -4
- package/uform/utils/Convert.js +9 -9
- package/utils/CacheUtil.d.ts +4 -4
- package/utils/CacheUtil.js +15 -15
- package/utils/Const.d.ts +3 -2
- package/utils/Const.js +26 -5
- package/utils/CustomApp.d.ts +3 -3
- package/utils/Format.js +2 -1
- package/utils/Renders/ApiGetRender.js +3 -3
- package/utils/Renders/ApiPostRender.js +2 -2
- package/utils/Renders/CondictionRender.d.ts +5 -0
- package/utils/Renders/CondictionRender.js +163 -0
- package/utils/Renders/DateRender.js +5 -5
- package/utils/Renders/DictRender.js +5 -6
- package/utils/Renders/FileRender.d.ts +2 -1
- package/utils/Renders/FileRender.js +5 -5
- package/utils/Renders/ListRender.js +9 -9
- package/utils/Renders/NumberRender.js +4 -4
- package/utils/Renders/StatusRender.js +2 -2
- package/utils/Renders/StringRender.js +4 -4
- package/utils/Renders/_DictBaseRender.d.ts +1 -1
- package/utils/Renders/_DictBaseRender.js +23 -23
- package/utils/Renders/_define.d.ts +6 -6
- package/utils/Renders/_define.js +9 -14
- package/utils/Renders/index.d.ts +1 -0
- package/utils/Renders/index.js +3 -1
- package/utils/StringUtil.d.ts +4 -4
- package/utils/StringUtil.js +15 -14
- package/utils/VAP.d.ts +4 -4
- package/utils/VAP.js +8 -40
- package/utils/i18n.d.ts +3 -3
- package/widget/index.d.ts +2 -2
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
2
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
15
|
};
|
|
5
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
17
|
+
exports.convertColumns = void 0;
|
|
7
18
|
var lodash_1 = __importDefault(require("lodash"));
|
|
8
19
|
var utils_1 = require("../../utils");
|
|
9
20
|
var _i18n_1 = require("../_i18n");
|
|
@@ -40,4 +51,60 @@ var getIdxColumn = function (ref, showIndex, isRank) {
|
|
|
40
51
|
render: idxRender
|
|
41
52
|
};
|
|
42
53
|
};
|
|
43
|
-
|
|
54
|
+
var convertCol = function (col) {
|
|
55
|
+
if (col.roleCode && !utils_1.PageUtil.hasRole(col.roleCode))
|
|
56
|
+
return null;
|
|
57
|
+
var item = __assign({}, col);
|
|
58
|
+
if (col.ik) {
|
|
59
|
+
var title = utils_1.i18n.txt(col.ik);
|
|
60
|
+
item.title = title == '' ? item.title : title;
|
|
61
|
+
}
|
|
62
|
+
var clazz = [];
|
|
63
|
+
if (col.wrap) {
|
|
64
|
+
clazz.push('c-table-col-wrap');
|
|
65
|
+
}
|
|
66
|
+
else if (!lodash_1.default.has(col, 'ellipsis')) {
|
|
67
|
+
item.ellipsis = true;
|
|
68
|
+
}
|
|
69
|
+
if (!lodash_1.default.has(item, 'width')) {
|
|
70
|
+
if (lodash_1.default.isString(item.title)) {
|
|
71
|
+
clazz.push('c-table-col-' + (item.title.length + (item.sorter ? 2 : 0)));
|
|
72
|
+
}
|
|
73
|
+
if (lodash_1.default.isString(col.dataIndex) && col.dataIndex.length && col.dataIndex.indexOf('.') < 0 && col.dataIndex.indexOf('[') < 0) {
|
|
74
|
+
clazz.push('table-col-' + col.dataIndex);
|
|
75
|
+
if (col.sorter) {
|
|
76
|
+
clazz.push('c-table-col-has-sorter');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (col.className) {
|
|
81
|
+
clazz.push(col.className);
|
|
82
|
+
}
|
|
83
|
+
item.className = clazz.join(' ');
|
|
84
|
+
return item;
|
|
85
|
+
};
|
|
86
|
+
var convertColumns = function (props, rank) {
|
|
87
|
+
// props.columns[0]
|
|
88
|
+
var cols = (props.showIndex == false) ? [] : [getIdxColumn(rank.ref, props.showIndex, rank.isRank)];
|
|
89
|
+
props.columns.map(function (col) {
|
|
90
|
+
// @ts-ignore
|
|
91
|
+
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
92
|
+
if (isGroup) {
|
|
93
|
+
console.error('Not Support group mode in 1.5');
|
|
94
|
+
// let column: ColumnGroupType<any> = { ..._.pick(col, ['width', 'align']), children: [], title: col.title, className: 'c-table-header-group' };
|
|
95
|
+
// if (col.className) column.className = `c-table-header-group ${col.className}`;
|
|
96
|
+
// (col as TableColumnGroup).children.map((item => {
|
|
97
|
+
// let subCol = convertCol(item);
|
|
98
|
+
// if (subCol != null) column.children.push(subCol);
|
|
99
|
+
// }));
|
|
100
|
+
// if (column.children.length > 0) cols.push(column);
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
var column = convertCol(col);
|
|
104
|
+
if (column != null)
|
|
105
|
+
cols.push(column);
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return cols;
|
|
109
|
+
};
|
|
110
|
+
exports.convertColumns = convertColumns;
|
|
@@ -98,6 +98,13 @@ exports.getHeightByTagName = getHeightByTagName;
|
|
|
98
98
|
var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
99
99
|
var update = (0, hooks_1.useUpdate)();
|
|
100
100
|
var _a = (0, Box_1.useBox)(), state = _a.state, root = _a.root, resize = _a.resize;
|
|
101
|
+
var inModal = (0, react_1.useMemo)(function () {
|
|
102
|
+
if (root.current == null)
|
|
103
|
+
return false;
|
|
104
|
+
return root.current.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
105
|
+
|| root.current.parentElement.parentElement.parentElement.classList.contains('ant-modal-body')
|
|
106
|
+
|| root.current.parentElement.parentElement.parentElement.parentElement.classList.contains('ant-modal-body');
|
|
107
|
+
}, []);
|
|
101
108
|
// const [scroll, setScroll] = useState<TableProps<PlainObject>['scroll']>(undefined);
|
|
102
109
|
var _b = props.model, rowKey = _b.rowKey, list = _b.list, isQuerying = _b.isQuerying, pageNo = _b.pageNo, pageSize = _b.pageSize, orderBy = _b.orderBy, query = _b.query, total = _b.total;
|
|
103
110
|
var start = (0, react_1.useRef)(0);
|
|
@@ -173,85 +180,45 @@ var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
173
180
|
}, [isFristMounted]);
|
|
174
181
|
// 计算 clolum 及 高亮keyword
|
|
175
182
|
var columns = (0, react_1.useMemo)(function () {
|
|
176
|
-
var cols =
|
|
177
|
-
if (
|
|
178
|
-
cols
|
|
183
|
+
var cols = (0, Util_1.convertColumns)(props, { ref: start, isRank: false });
|
|
184
|
+
if (!utils_1.GLOBAL.CONFIG.SEARCHBAR.DISABLE_KEYWORD || !lodash_1.default.has(props, 'searchBar.keyword'))
|
|
185
|
+
return cols;
|
|
179
186
|
var HighKeys = new Set();
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
(props.searchBar.keyword.highlight || []).map(function (key) { return HighKeys.add(key); });
|
|
183
|
-
}
|
|
184
|
-
else {
|
|
185
|
-
props.columns.map(function (col) {
|
|
186
|
-
// @ts-ignore
|
|
187
|
-
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
188
|
-
if (isGroup) {
|
|
189
|
-
col.children.map((function (item) {
|
|
190
|
-
if (lodash_1.default.isString(item.dataIndex))
|
|
191
|
-
HighKeys.add(item.dataIndex);
|
|
192
|
-
}));
|
|
193
|
-
}
|
|
194
|
-
else {
|
|
195
|
-
var dataIndex = col.dataIndex;
|
|
196
|
-
if (lodash_1.default.isString(dataIndex))
|
|
197
|
-
HighKeys.add(dataIndex);
|
|
198
|
-
}
|
|
199
|
-
});
|
|
200
|
-
}
|
|
187
|
+
if (lodash_1.default.isObject(props.searchBar.keyword)) {
|
|
188
|
+
(props.searchBar.keyword.highlight || []).map(function (key) { return HighKeys.add(key); });
|
|
201
189
|
}
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
item.render = function (record) {
|
|
212
|
-
if (!lodash_1.default.isString(record))
|
|
213
|
-
return record;
|
|
214
|
-
var keyword = '';
|
|
215
|
-
if (record && keyword) {
|
|
216
|
-
return react_1.default.createElement(HighLight_1.HighLight, { text: record, keyword: keyword });
|
|
217
|
-
}
|
|
218
|
-
return record;
|
|
219
|
-
};
|
|
220
|
-
}
|
|
221
|
-
if (!lodash_1.default.has(item, 'ellipsis'))
|
|
222
|
-
item.ellipsis = true;
|
|
223
|
-
if (!lodash_1.default.has(item, 'width') && lodash_1.default.isString(item.title)) {
|
|
224
|
-
var clz = item.title.length + (item.sorter ? 2 : 0);
|
|
225
|
-
if (col.className) {
|
|
226
|
-
item.className = 'c-table-col-' + clz + ' ' + col.className;
|
|
190
|
+
else {
|
|
191
|
+
props.columns.map(function (col) {
|
|
192
|
+
// @ts-ignore
|
|
193
|
+
var isGroup = lodash_1.default.has(col, 'children') && lodash_1.default.isArray(col.children);
|
|
194
|
+
if (isGroup) {
|
|
195
|
+
col.children.map((function (item) {
|
|
196
|
+
if (lodash_1.default.isString(item.dataIndex))
|
|
197
|
+
HighKeys.add(item.dataIndex);
|
|
198
|
+
}));
|
|
227
199
|
}
|
|
228
200
|
else {
|
|
229
|
-
|
|
201
|
+
var dataIndex = col.dataIndex;
|
|
202
|
+
if (lodash_1.default.isString(dataIndex))
|
|
203
|
+
HighKeys.add(dataIndex);
|
|
230
204
|
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
}
|
|
249
|
-
else {
|
|
250
|
-
var column = convertCol(col);
|
|
251
|
-
if (column != null)
|
|
252
|
-
cols.push(column);
|
|
253
|
-
}
|
|
254
|
-
});
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
if (HighKeys.size > 0) {
|
|
208
|
+
cols.map(function (col) {
|
|
209
|
+
if (HighKeys.has(col.dataIndex) && col.render == null) {
|
|
210
|
+
col.render = function (record) {
|
|
211
|
+
if (!lodash_1.default.isString(record))
|
|
212
|
+
return record;
|
|
213
|
+
var keyword = '';
|
|
214
|
+
if (record && keyword) {
|
|
215
|
+
return react_1.default.createElement(HighLight_1.HighLight, { text: record, keyword: keyword });
|
|
216
|
+
}
|
|
217
|
+
return record;
|
|
218
|
+
};
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
}
|
|
255
222
|
return cols;
|
|
256
223
|
}, [props.columns]);
|
|
257
224
|
(0, react_1.useLayoutEffect)(function () {
|
|
@@ -269,6 +236,10 @@ var _VTable = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
269
236
|
}, []);
|
|
270
237
|
// 更新高度 table 需要把 head 排除设置滚动
|
|
271
238
|
// useEffect(() => {
|
|
239
|
+
// if (inModal) {
|
|
240
|
+
// setScroll({ x: true })
|
|
241
|
+
// return;
|
|
242
|
+
// }
|
|
272
243
|
// if (props.scroll === null) return;
|
|
273
244
|
// if (props.mode == undefined || props.mode == 'common') return;
|
|
274
245
|
// let height = state?.height;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { TableDefined } from './Components';
|
|
3
|
-
import type { ForwardRefExoticComponent, ExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import type { ReactNode, ForwardRefExoticComponent, ExoticComponent, RefAttributes } from 'react';
|
|
4
3
|
import type { TableProps } from '../_adapt/Table';
|
|
5
4
|
import type { ColumnProps } from 'antd/es/table/interface';
|
|
6
5
|
import type { SearchBarProps } from '../SearchBar/index';
|
|
@@ -8,7 +7,9 @@ import type { TableActionButton } from './Components/ActionBar';
|
|
|
8
7
|
import type { PlainObject, BaseItem, ApiModel } from '../../basetype';
|
|
9
8
|
import type { BoxMode } from '../Box/Box';
|
|
10
9
|
import type { SelectBarProps } from '../Box/SelectBar';
|
|
11
|
-
export type TableColumn = BaseItem & Omit<ColumnProps<any>, 'children'
|
|
10
|
+
export type TableColumn = BaseItem & Omit<ColumnProps<any>, 'children'> & {
|
|
11
|
+
wrap?: boolean;
|
|
12
|
+
};
|
|
12
13
|
export type TableColumnGroup = Pick<TableColumn, 'className' | 'width' | 'align'> & {
|
|
13
14
|
title: string;
|
|
14
15
|
children: TableColumn[];
|
|
@@ -52,7 +53,7 @@ export type BaseTableProps = TableDefine & {
|
|
|
52
53
|
/**
|
|
53
54
|
* 表格操作区域
|
|
54
55
|
*/
|
|
55
|
-
actionBar?: (TableActionButton[]) |
|
|
56
|
+
actionBar?: (TableActionButton[]) | ReactNode;
|
|
56
57
|
/**
|
|
57
58
|
* 表格选择区域
|
|
58
59
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { ReactNode, PropsWithChildren } from 'react';
|
|
2
|
+
import type { FC, ReactNode, PropsWithChildren } from 'react';
|
|
3
3
|
import type { TreeNodeData } from '../../utils/TreeUtil';
|
|
4
4
|
import type { TreeSelectProps } from 'antd/es/tree-select';
|
|
5
5
|
import type { BaseTreeSelectProps } from './index';
|
|
@@ -25,7 +25,7 @@ type BaseTreeSelectContext = {
|
|
|
25
25
|
};
|
|
26
26
|
declare const BaseTreeSelectContext: React.Context<BaseTreeSelectContext>;
|
|
27
27
|
export declare const useBaseTree: () => BaseTreeSelectContext;
|
|
28
|
-
export declare const BaseTreeSelect:
|
|
28
|
+
export declare const BaseTreeSelect: FC<PropsWithChildren<BaseTreeSelectProps>>;
|
|
29
29
|
export declare const getNodeParam: (node: any, state: BaseTreeSelectState, disabledNode: (node: PlainObject) => boolean) => any;
|
|
30
|
-
export declare const renderRoot: (props: BaseTreeSelectProps, state: BaseTreeSelectState) =>
|
|
30
|
+
export declare const renderRoot: (props: BaseTreeSelectProps, state: BaseTreeSelectState) => ReactNode;
|
|
31
31
|
export {};
|
|
@@ -58,10 +58,13 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
58
58
|
}
|
|
59
59
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
60
60
|
};
|
|
61
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
62
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
63
|
+
};
|
|
61
64
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
62
65
|
exports.renderRoot = exports.getNodeParam = exports.BaseTreeSelect = exports.useBaseTree = void 0;
|
|
63
|
-
var lodash_1 = __importStar(require("lodash"));
|
|
64
66
|
var react_1 = __importStar(require("react"));
|
|
67
|
+
var lodash_1 = __importDefault(require("lodash"));
|
|
65
68
|
var antd_1 = require("antd");
|
|
66
69
|
var HighLight_1 = require("../_common/HighLight");
|
|
67
70
|
var Icon_1 = require("../_adapt/Icon");
|
|
@@ -136,7 +139,7 @@ var BaseTreeSelect = function (props) {
|
|
|
136
139
|
}, []);
|
|
137
140
|
var value = (0, react_1.useMemo)(function () {
|
|
138
141
|
if (props.multiple) {
|
|
139
|
-
if (
|
|
142
|
+
if (lodash_1.default.isArray(props.value))
|
|
140
143
|
return props.value;
|
|
141
144
|
if (props.value)
|
|
142
145
|
return [props.value];
|
|
@@ -206,13 +209,13 @@ var getNodeParam = function (node, state, disabledNode) {
|
|
|
206
209
|
var icon = node[iconField];
|
|
207
210
|
if (icon) {
|
|
208
211
|
if (icon.indexOf('/') >= 0) {
|
|
209
|
-
param.title = react_1.default.createElement(react_1.
|
|
212
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
210
213
|
react_1.default.createElement("span", { className: 'v-icon-bg' },
|
|
211
214
|
react_1.default.createElement("img", { style: { marginTop: -4 }, src: node[iconField] })),
|
|
212
215
|
title);
|
|
213
216
|
}
|
|
214
217
|
else {
|
|
215
|
-
param.title = react_1.default.createElement(react_1.
|
|
218
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
216
219
|
react_1.default.createElement(Icon_1.Icon, { type: node[iconField] }),
|
|
217
220
|
title);
|
|
218
221
|
}
|
|
@@ -221,7 +224,7 @@ var getNodeParam = function (node, state, disabledNode) {
|
|
|
221
224
|
else if (lodash_1.default.isFunction(iconField)) {
|
|
222
225
|
var icon = iconField(node);
|
|
223
226
|
if (icon) {
|
|
224
|
-
param.title = react_1.default.createElement(react_1.
|
|
227
|
+
param.title = react_1.default.createElement(react_1.Fragment, null,
|
|
225
228
|
icon,
|
|
226
229
|
title);
|
|
227
230
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
1
|
import type { BaseTreeSelectProps } from './index';
|
|
3
2
|
import type { DTreeData } from '../Trees/DTree';
|
|
3
|
+
import type { FC } from 'react';
|
|
4
4
|
export type DTreeSelectProps = BaseTreeSelectProps & DTreeData;
|
|
5
|
-
export declare const DTreeSelect:
|
|
5
|
+
export declare const DTreeSelect: FC<DTreeSelectProps>;
|
|
@@ -111,8 +111,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
111
111
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
112
112
|
exports.DTreeSelect = void 0;
|
|
113
113
|
var react_1 = __importStar(require("react"));
|
|
114
|
-
var antd_1 = require("antd");
|
|
115
114
|
var lodash_1 = __importDefault(require("lodash"));
|
|
115
|
+
var antd_1 = require("antd");
|
|
116
116
|
var BaseTreeSelect_1 = require("./BaseTreeSelect");
|
|
117
117
|
var hooks_1 = require("../../hooks");
|
|
118
118
|
var utils_1 = require("../../utils");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseTreeSelectProps } from './index';
|
|
3
3
|
import type { FTreeData } from '../Trees/FTree';
|
|
4
4
|
export type FTreeSelectProps = BaseTreeSelectProps & Required<FTreeData>;
|
|
5
|
-
export declare const FTreeSelect:
|
|
5
|
+
export declare const FTreeSelect: FC<FTreeSelectProps>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { STreeData } from '../Trees/STree';
|
|
3
3
|
import type { BaseTreeSelectProps } from './index';
|
|
4
4
|
export type STreeSelectProps = BaseTreeSelectProps & STreeData;
|
|
5
|
-
export declare const STreeSelect:
|
|
5
|
+
export declare const STreeSelect: FC<STreeSelectProps>;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Language } from '../../utils/_Support';
|
|
3
|
+
import type { FC, PropsWithChildren, ReactNode } from 'react';
|
|
3
4
|
import type { BaseTreeOpts, SearchResult, TreeNodeData } from '../../utils/TreeUtil';
|
|
4
5
|
import type { AntTreeNodeProps, AntTreeNodeSelectedEvent, TreeProps } from 'antd/es/tree';
|
|
5
|
-
import type { PropsWithChildren, ReactNode } from 'react';
|
|
6
6
|
import type { BaseTreeProps } from './index';
|
|
7
7
|
import type { Key, PlainObject } from '../../basetype';
|
|
8
8
|
export type BaseTreeState = Required<BaseTreeOpts> & {
|
|
@@ -27,6 +27,6 @@ type BaseTreeContext = {
|
|
|
27
27
|
};
|
|
28
28
|
declare const BaseTreeContext: React.Context<BaseTreeContext>;
|
|
29
29
|
export declare const useBaseTree: () => BaseTreeContext;
|
|
30
|
-
export declare const BaseTree:
|
|
30
|
+
export declare const BaseTree: FC<PropsWithChildren<BaseTreeProps>>;
|
|
31
31
|
export declare const getNodeParam: (node: any, position: number[], state: BaseTreeState, search: SearchResult, disabledNode: (node: PlainObject) => boolean, folderChecker: (node: PlainObject) => boolean) => AntTreeNodeProps;
|
|
32
32
|
export {};
|
|
@@ -134,7 +134,7 @@ var COButton = function (props) {
|
|
|
134
134
|
value.length > 0 && react_1.default.createElement(index_1.Popover, { style: { width: 480 }, overlayClassName: 'co-button-content', content: react_1.default.createElement(COSelect_1.SelectedTable, __assign({}, props, { value: value })) },
|
|
135
135
|
react_1.default.createElement(index_1.Button, { icon: "unordered-list", type: "primary", style: { paddingRight: 0, paddingLeft: 4 } })),
|
|
136
136
|
react_1.default.createElement(index_1.Modal, { open: open, title: "\u8BF7\u9009\u62E9\u673A\u6784", bodyStyle: { maxHeight: 540, overflow: 'auto' }, width: 720, onCancel: function () { return setOpen(false); }, onOk: onOk },
|
|
137
|
-
react_1.default.createElement(index_1.Alert, { message: react_1.default.createElement(react_1.
|
|
137
|
+
react_1.default.createElement(index_1.Alert, { message: react_1.default.createElement(react_1.Fragment, null,
|
|
138
138
|
"\u9009\u4E2D\u72B6\u6001\u8BF4\u660E \uFF1A ",
|
|
139
139
|
(0, COTreeUtil_1.flagRender)(0, ' :'),
|
|
140
140
|
" ",
|
|
@@ -103,7 +103,7 @@ var COSelect = function (props) {
|
|
|
103
103
|
}
|
|
104
104
|
}, [convert]);
|
|
105
105
|
return react_1.default.createElement(index_1.Input.Group, { compact: true, style: { width: props.width || '100%', display: 'flex' } },
|
|
106
|
-
react_1.default.createElement(index_1.Select, { maxTagCount: 1, mode: "tags", disabled: props.disabled, maxTagPlaceholder:
|
|
106
|
+
react_1.default.createElement(index_1.Select, { maxTagCount: 1, mode: "tags", disabled: props.disabled, maxTagPlaceholder: utils_1.Const.NONE, showSearch: false, className: 'co-select', allowClear: props.allowClear,
|
|
107
107
|
// onClear={() => props.onChange([])}
|
|
108
108
|
placeholder: props.placeholder || '请选择机构', style: { flexGrow: 1 }, showAction: ["click"], options: [], labelInValue: true, value: selectValue, dropdownStyle: { width: props.width || '100%', maxHeight: 360, overflow: 'auto' }, dropdownRender: function () { return react_1.default.createElement(COTree_1.COTree, __assign({}, props, { value: value, onChange: onChange })); }, getPopupContainer: function (evt) {
|
|
109
109
|
return evt.parentElement.parentElement;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
2
3
|
import type { TreeProps } from 'antd/es/tree/Tree';
|
|
3
4
|
import type { COTreeProps, COTreeValueItem, FLAG } from './COTree';
|
|
4
5
|
import type { PlainObject } from '../../../basetype';
|
|
@@ -9,7 +10,7 @@ export type TreeFields = {
|
|
|
9
10
|
parentField: string;
|
|
10
11
|
checkField?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const flagRender: (flag: FLAG, split?:
|
|
13
|
+
export declare const flagRender: (flag: FLAG, split?: ReactNode) => React.JSX.Element;
|
|
13
14
|
export declare const getTreeDataByLoaded: (all: any[], treeProps: COTreeProps, FIELDS: TreeFields) => [TreeProps, Set<string>, Set<string>, Set<string>];
|
|
14
15
|
export declare const convertFormObject: (obj: PlainObject) => COTreeValueItem[];
|
|
15
16
|
export declare const invertToObject: (items: COTreeValueItem[]) => PlainObject;
|
|
@@ -34,6 +34,13 @@ export type DTreeProps = BaseTreeProps & BaseActionTreeProps & DTreeData;
|
|
|
34
34
|
*/
|
|
35
35
|
export declare const DTree: React.MemoExoticComponent<React.ForwardRefExoticComponent<import("../../utils/TreeUtil").BaseTreeOpts & Pick<TreeProps, "className" | "disabled" | "defaultExpandAll"> & {
|
|
36
36
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
37
|
+
/**
|
|
38
|
+
* 展开子节点:
|
|
39
|
+
*
|
|
40
|
+
* 方式一:传一个 api 接口地址,必须返回 VData<Array<Object>> 格式
|
|
41
|
+
*
|
|
42
|
+
* 方式二:传一个方法 ,接收一个父节点参数,必须返回 Promise<TreeNodeData[]> (不要返回 children, 仅返回一级)
|
|
43
|
+
*/
|
|
37
44
|
titleField: string | import("./index").LanguageField;
|
|
38
45
|
mustSelect?: boolean;
|
|
39
46
|
disabledNode?: (node: PlainObject) => boolean;
|
|
@@ -2,7 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import { TreeUtil } from '../../utils';
|
|
3
3
|
import type { TreeProps } from 'antd/es/tree';
|
|
4
4
|
import type { BaseTreeProps, BaseActionTreeProps, ActionTreeRef } from './index';
|
|
5
|
-
import type { PlainObject } from '../../basetype';
|
|
6
5
|
export type FTreeData = {
|
|
7
6
|
/**
|
|
8
7
|
* 获取全部节点的API,如果不传,刚用 API 的GET模式代替
|
|
@@ -20,7 +19,7 @@ export declare const FTree: React.MemoExoticComponent<React.ForwardRefExoticComp
|
|
|
20
19
|
iconField?: string | ((item: any) => React.ReactNode);
|
|
21
20
|
titleField: string | import("./index").LanguageField;
|
|
22
21
|
mustSelect?: boolean;
|
|
23
|
-
disabledNode?: (node: PlainObject) => boolean;
|
|
24
|
-
onSelect?: (key: import("
|
|
22
|
+
disabledNode?: (node: import("../..").PlainObject) => boolean;
|
|
23
|
+
onSelect?: (key: import("../..").Key, node: import("../..").PlainObject, parentNode: import("../..").PlainObject, crumb: import("../..").PlainObject[], pos: number[]) => void;
|
|
25
24
|
searchValue?: string;
|
|
26
25
|
} & BaseActionTreeProps & FTreeData & React.RefAttributes<ActionTreeRef>>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { BaseTreeProps } from './index';
|
|
3
3
|
import type { TreeNodeData } from '../../utils/TreeUtil';
|
|
4
4
|
export type STreeData = {
|
|
@@ -19,4 +19,4 @@ export type STreeProps = BaseTreeProps & STreeData;
|
|
|
19
19
|
* 搜索 : 支持
|
|
20
20
|
* 数据 : 需要组装好后传入
|
|
21
21
|
*/
|
|
22
|
-
export declare const STree:
|
|
22
|
+
export declare const STree: FC<STreeProps>;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC, MutableRefObject, PropsWithChildren } from 'react';
|
|
2
2
|
import type { UFromProps } from './index';
|
|
3
|
-
import type { MutableRefObject, PropsWithChildren } from 'react';
|
|
4
3
|
export type FormState = {
|
|
5
4
|
width: number;
|
|
6
5
|
cols: 1 | 2 | 3;
|
|
@@ -17,6 +16,6 @@ export type FormState = {
|
|
|
17
16
|
};
|
|
18
17
|
export declare const useFormLayout: () => FormState;
|
|
19
18
|
export declare const getDefault: (props: UFromProps) => [boolean, number, 1 | 2 | 3, number];
|
|
20
|
-
export declare const FormWrapper:
|
|
19
|
+
export declare const FormWrapper: FC<PropsWithChildren<UFromProps & {
|
|
21
20
|
isInfo: boolean;
|
|
22
21
|
}>>;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import type { FC } from 'react';
|
|
2
3
|
import type { UDescriptionsItemProps, UDescriptionsProps } from './index';
|
|
3
4
|
export declare const UDescriptions: React.ExoticComponent<React.PropsWithChildren<UDescriptionsProps>> & {
|
|
4
|
-
Item:
|
|
5
|
+
Item: FC<UDescriptionsItemProps>;
|
|
5
6
|
};
|
|
@@ -1,20 +1,43 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.UDescriptions = void 0;
|
|
7
|
-
var react_1 =
|
|
30
|
+
var react_1 = __importStar(require("react"));
|
|
8
31
|
var lodash_1 = __importDefault(require("lodash"));
|
|
9
32
|
var utils_1 = require("../../utils");
|
|
10
33
|
var isReactFragment = function (variableToInspect) {
|
|
11
34
|
if (variableToInspect.type)
|
|
12
|
-
return variableToInspect.type === react_1.
|
|
35
|
+
return variableToInspect.type === react_1.Fragment;
|
|
13
36
|
return false;
|
|
14
37
|
};
|
|
15
38
|
var toArray = function (children) {
|
|
16
39
|
var ret = [];
|
|
17
|
-
react_1.
|
|
40
|
+
react_1.Children.forEach(children, function (child) {
|
|
18
41
|
if (child === undefined || child === null) {
|
|
19
42
|
return;
|
|
20
43
|
}
|
|
@@ -88,12 +111,12 @@ var generateChildrenRows = function (items, column) {
|
|
|
88
111
|
var cells = columns.map(function (item) { return item.props.span; });
|
|
89
112
|
var diffSpan = column - lodash_1.default.sum(cells);
|
|
90
113
|
var lastNode = columns.pop();
|
|
91
|
-
columns.push(react_1.
|
|
114
|
+
columns.push((0, react_1.cloneElement)(lastNode, { span: lastNode.props.span + diffSpan }));
|
|
92
115
|
leftSpans = column - span;
|
|
93
116
|
columns = [];
|
|
94
117
|
rows.push(columns);
|
|
95
118
|
}
|
|
96
|
-
columns.push(react_1.
|
|
119
|
+
columns.push((0, react_1.cloneElement)(node, { span: span }));
|
|
97
120
|
if (leftSpans <= 0) {
|
|
98
121
|
columns = null;
|
|
99
122
|
}
|
|
@@ -219,7 +219,7 @@ var renderFormField = function (state, field, form, update, data) {
|
|
|
219
219
|
var input = (0, _register_1.getUFormInput)(field.type || 'text');
|
|
220
220
|
var labelSpan = state.labelSpan, inputSpan = state.inputSpan, colSpan = state.colSpan, cols = state.cols, disableFields = state.disableFields, hiddenFields = state.hiddenFields, requireFields = state.requireFields, optionFields = state.optionFields;
|
|
221
221
|
if (hiddenFields.current.has(field.field)) {
|
|
222
|
-
return react_1.default.createElement(antd_1.Form.Item, { style: { display: 'none' } }, form.getFieldDecorator(field.field)(react_1.
|
|
222
|
+
return react_1.default.createElement(antd_1.Form.Item, { style: { display: 'none' } }, form.getFieldDecorator(field.field)((0, react_1.createElement)(input.component, {
|
|
223
223
|
form: form,
|
|
224
224
|
field: field,
|
|
225
225
|
disabled: disableFields.current.has(field.field),
|
|
@@ -298,7 +298,7 @@ var renderFormField = function (state, field, form, update, data) {
|
|
|
298
298
|
}
|
|
299
299
|
}
|
|
300
300
|
return react_1.default.createElement(antd_1.Col, __assign({}, colProps),
|
|
301
|
-
react_1.default.createElement(antd_1.Form.Item, __assign({}, itemProps), form.getFieldDecorator(field.field, options)(react_1.
|
|
301
|
+
react_1.default.createElement(antd_1.Form.Item, __assign({}, itemProps), form.getFieldDecorator(field.field, options)((0, react_1.createElement)(input.component, {
|
|
302
302
|
form: form,
|
|
303
303
|
field: field,
|
|
304
304
|
disabled: disableFields.current.has(field.field),
|
|
@@ -494,7 +494,7 @@ var _FormGroup = function (props) {
|
|
|
494
494
|
return props.fields.map(function (group) {
|
|
495
495
|
if (group == null || group === false)
|
|
496
496
|
return utils_1.Const.NONE;
|
|
497
|
-
return react_1.default.createElement(react_1.
|
|
497
|
+
return react_1.default.createElement(react_1.Fragment, null,
|
|
498
498
|
react_1.default.createElement(antd_1.Col, { span: 24, className: "c-form-group-title" }, utils_1.i18n.getText(group.ik, group.title)),
|
|
499
499
|
group.fields.map(function (field) {
|
|
500
500
|
if (field == null || field === false)
|
|
@@ -570,7 +570,7 @@ var _UFormAdaptor = /** @class */ (function (_super) {
|
|
|
570
570
|
return react_1.default.createElement(_UForm, __assign({}, this.props, { ref: this.props.aref }));
|
|
571
571
|
};
|
|
572
572
|
return _UFormAdaptor;
|
|
573
|
-
}(react_1.
|
|
573
|
+
}(react_1.Component));
|
|
574
574
|
// 3.0 适配层
|
|
575
575
|
var UFormAdaptor = (0, react_1.memo)((0, react_1.forwardRef)(function (props, ref) {
|
|
576
576
|
var FROM = antd_1.Form.create()(_UFormAdaptor);
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { UModalProps } from './index';
|
|
3
|
-
export declare const UFormModal:
|
|
3
|
+
export declare const UFormModal: FC<UModalProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { UFromProps, UDescriptionsProps } from './index';
|
|
3
3
|
import type { PlainObject } from '../../basetype';
|
|
4
4
|
export type UInfoProps = Omit<UFromProps, 'buttons' | 'mode' | 'isEdit'> & Pick<UDescriptionsProps, 'hideBorder' | 'theme'> & {
|
|
@@ -7,4 +7,4 @@ export type UInfoProps = Omit<UFromProps, 'buttons' | 'mode' | 'isEdit'> & Pick<
|
|
|
7
7
|
*/
|
|
8
8
|
data: PlainObject;
|
|
9
9
|
};
|
|
10
|
-
export declare const UInfo:
|
|
10
|
+
export declare const UInfo: FC<UInfoProps>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { UModalProps } from './index';
|
|
3
|
-
export declare const UInfoModal:
|
|
3
|
+
export declare const UInfoModal: FC<UModalProps>;
|
|
@@ -55,7 +55,7 @@ var UInfoModal = function (props) {
|
|
|
55
55
|
}
|
|
56
56
|
if (!lodash_1.default.has(props, 'width'))
|
|
57
57
|
param.width = (0, FormWrapper_1.getDefault)(props)[1];
|
|
58
|
-
return react_1.default.createElement(Modal_1.Modal, __assign({ maskClosable: true, footer: null }, param),
|
|
58
|
+
return react_1.default.createElement(Modal_1.Modal, __assign({ className: utils_1.StringUtil.className(['c-info-modal'], props.className), maskClosable: true, footer: null }, param),
|
|
59
59
|
react_1.default.createElement(UInfo_1.UInfo, __assign({}, lodash_1.default.pick(props, FORM_FIELDS))));
|
|
60
60
|
};
|
|
61
61
|
exports.UInfoModal = UInfoModal;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { FC } from 'react';
|
|
2
2
|
import type { UModalProps } from './index';
|
|
3
|
-
export declare const UModal:
|
|
3
|
+
export declare const UModal: FC<UModalProps>;
|