wargerm 0.7.38 → 0.7.40

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.
@@ -0,0 +1,392 @@
1
+ export declare const getApiTree: (params?: any) => void;
2
+ export declare const groupAdd: (params?: any) => void;
3
+ export declare const groupModify: (params?: any) => void;
4
+ export declare const groupRemove: (params?: any) => void;
5
+ export declare const groupCopy: (params?: any) => void;
6
+ export declare const groupMove: (params?: any) => void;
7
+ export declare const groupPublish: (params?: any) => void;
8
+ export declare const apiAdd: (params?: any) => void;
9
+ export declare const apiModify: (params?: any) => void;
10
+ export declare const apiRemove: (params?: any) => void;
11
+ export declare const apiCopy: (params?: any) => void;
12
+ export declare const apiMove: (params?: any) => void;
13
+ export declare const treeList: {
14
+ code: number;
15
+ data: ({
16
+ key: string;
17
+ label: string;
18
+ parentKey: string;
19
+ children: never[];
20
+ checked: boolean;
21
+ group: {
22
+ status: number;
23
+ createdBy: null;
24
+ createdName: null;
25
+ createdTime: null;
26
+ updatedBy: null;
27
+ updatedName: null;
28
+ updatedTime: null;
29
+ id: string;
30
+ name: string;
31
+ path: string;
32
+ parentId: string;
33
+ type: null;
34
+ sort: null;
35
+ paths: null;
36
+ options: null;
37
+ };
38
+ apiList: ({
39
+ status: number;
40
+ createdBy: null;
41
+ createdName: null;
42
+ createdTime: string;
43
+ updatedBy: null;
44
+ updatedName: null;
45
+ updatedTime: string;
46
+ id: string;
47
+ name: string;
48
+ method: string;
49
+ uri: string;
50
+ fullPath: string;
51
+ groupId: string;
52
+ description: null;
53
+ headers: string;
54
+ parameters: string;
55
+ implScript: string;
56
+ sort: null;
57
+ responseParameters: string;
58
+ change: boolean;
59
+ publish: {
60
+ status: number;
61
+ createdBy: null;
62
+ createdName: null;
63
+ createdTime: string;
64
+ updatedBy: null;
65
+ updatedName: null;
66
+ updatedTime: null;
67
+ id: string;
68
+ defineId: string;
69
+ headers: string;
70
+ parameters: string;
71
+ implScript: string;
72
+ publishStatus: number;
73
+ method: null;
74
+ uri: null;
75
+ fullPath: null;
76
+ responseParameters: null;
77
+ };
78
+ } | {
79
+ status: number;
80
+ createdBy: null;
81
+ createdName: null;
82
+ createdTime: string;
83
+ updatedBy: null;
84
+ updatedName: null;
85
+ updatedTime: string;
86
+ id: string;
87
+ name: string;
88
+ method: string;
89
+ uri: string;
90
+ fullPath: string;
91
+ groupId: string;
92
+ description: null;
93
+ headers: string;
94
+ parameters: string;
95
+ implScript: string;
96
+ sort: null;
97
+ responseParameters: null;
98
+ change: boolean;
99
+ publish: null;
100
+ })[];
101
+ } | {
102
+ key: string;
103
+ label: string;
104
+ parentKey: string;
105
+ children: {
106
+ key: string;
107
+ label: string;
108
+ parentKey: string;
109
+ children: ({
110
+ key: string;
111
+ label: string;
112
+ parentKey: string;
113
+ children: never[];
114
+ checked: boolean;
115
+ group: {
116
+ status: number;
117
+ createdBy: null;
118
+ createdName: null;
119
+ createdTime: null;
120
+ updatedBy: null;
121
+ updatedName: null;
122
+ updatedTime: null;
123
+ id: string;
124
+ name: string;
125
+ path: string;
126
+ parentId: string;
127
+ type: null;
128
+ sort: null;
129
+ paths: null;
130
+ options: null;
131
+ };
132
+ apiList: ({
133
+ status: number;
134
+ createdBy: null;
135
+ createdName: null;
136
+ createdTime: string;
137
+ updatedBy: null;
138
+ updatedName: null;
139
+ updatedTime: string;
140
+ id: string;
141
+ name: string;
142
+ method: string;
143
+ uri: string;
144
+ fullPath: string;
145
+ groupId: string;
146
+ description: null;
147
+ headers: string;
148
+ parameters: string;
149
+ implScript: string;
150
+ sort: null;
151
+ responseParameters: null;
152
+ change: boolean;
153
+ publish: null;
154
+ } | {
155
+ status: number;
156
+ createdBy: null;
157
+ createdName: null;
158
+ createdTime: string;
159
+ updatedBy: null;
160
+ updatedName: null;
161
+ updatedTime: string;
162
+ id: string;
163
+ name: string;
164
+ method: string;
165
+ uri: string;
166
+ fullPath: string;
167
+ groupId: string;
168
+ description: null;
169
+ headers: string;
170
+ parameters: string;
171
+ implScript: string;
172
+ sort: null;
173
+ responseParameters: string;
174
+ change: boolean;
175
+ publish: null;
176
+ })[];
177
+ } | {
178
+ key: string;
179
+ label: string;
180
+ parentKey: string;
181
+ children: never[];
182
+ checked: boolean;
183
+ group: {
184
+ status: number;
185
+ createdBy: null;
186
+ createdName: null;
187
+ createdTime: null;
188
+ updatedBy: null;
189
+ updatedName: null;
190
+ updatedTime: null;
191
+ id: string;
192
+ name: string;
193
+ path: string;
194
+ parentId: string;
195
+ type: null;
196
+ sort: null;
197
+ paths: null;
198
+ options: null;
199
+ };
200
+ apiList: ({
201
+ status: number;
202
+ createdBy: null;
203
+ createdName: null;
204
+ createdTime: string;
205
+ updatedBy: null;
206
+ updatedName: null;
207
+ updatedTime: string;
208
+ id: string;
209
+ name: string;
210
+ method: string;
211
+ uri: string;
212
+ fullPath: string;
213
+ groupId: string;
214
+ description: null;
215
+ headers: string;
216
+ parameters: string;
217
+ implScript: string;
218
+ sort: null;
219
+ responseParameters: null;
220
+ change: boolean;
221
+ publish: {
222
+ status: number;
223
+ createdBy: null;
224
+ createdName: null;
225
+ createdTime: string;
226
+ updatedBy: null;
227
+ updatedName: null;
228
+ updatedTime: null;
229
+ id: string;
230
+ defineId: string;
231
+ headers: string;
232
+ parameters: string;
233
+ implScript: string;
234
+ publishStatus: number;
235
+ method: null;
236
+ uri: null;
237
+ fullPath: null;
238
+ responseParameters: null;
239
+ };
240
+ } | {
241
+ status: number;
242
+ createdBy: null;
243
+ createdName: null;
244
+ createdTime: string;
245
+ updatedBy: null;
246
+ updatedName: null;
247
+ updatedTime: string;
248
+ id: string;
249
+ name: string;
250
+ method: string;
251
+ uri: string;
252
+ fullPath: string;
253
+ groupId: string;
254
+ description: string;
255
+ headers: string;
256
+ parameters: string;
257
+ implScript: string;
258
+ sort: null;
259
+ responseParameters: null;
260
+ change: boolean;
261
+ publish: null;
262
+ })[];
263
+ })[];
264
+ checked: boolean;
265
+ group: {
266
+ status: number;
267
+ createdBy: null;
268
+ createdName: null;
269
+ createdTime: null;
270
+ updatedBy: null;
271
+ updatedName: null;
272
+ updatedTime: null;
273
+ id: string;
274
+ name: string;
275
+ path: string;
276
+ parentId: string;
277
+ type: null;
278
+ sort: null;
279
+ paths: null;
280
+ options: null;
281
+ };
282
+ apiList: never[];
283
+ }[];
284
+ checked: boolean;
285
+ group: {
286
+ status: number;
287
+ createdBy: null;
288
+ createdName: null;
289
+ createdTime: null;
290
+ updatedBy: null;
291
+ updatedName: null;
292
+ updatedTime: null;
293
+ id: string;
294
+ name: string;
295
+ path: string;
296
+ parentId: string;
297
+ type: null;
298
+ sort: null;
299
+ paths: null;
300
+ options: null;
301
+ };
302
+ apiList: never[];
303
+ } | {
304
+ key: string;
305
+ label: string;
306
+ parentKey: string;
307
+ children: {
308
+ key: string;
309
+ label: string;
310
+ parentKey: string;
311
+ children: never[];
312
+ checked: boolean;
313
+ group: {
314
+ status: number;
315
+ createdBy: null;
316
+ createdName: null;
317
+ createdTime: string;
318
+ updatedBy: null;
319
+ updatedName: null;
320
+ updatedTime: null;
321
+ id: string;
322
+ name: string;
323
+ path: string;
324
+ parentId: string;
325
+ type: null;
326
+ sort: null;
327
+ paths: null;
328
+ options: null;
329
+ };
330
+ apiList: {
331
+ status: number;
332
+ createdBy: null;
333
+ createdName: null;
334
+ createdTime: string;
335
+ updatedBy: null;
336
+ updatedName: null;
337
+ updatedTime: string;
338
+ id: string;
339
+ name: string;
340
+ method: string;
341
+ uri: string;
342
+ fullPath: string;
343
+ groupId: string;
344
+ description: string;
345
+ headers: string;
346
+ parameters: string;
347
+ implScript: string;
348
+ sort: null;
349
+ responseParameters: null;
350
+ change: boolean;
351
+ publish: {
352
+ status: number;
353
+ createdBy: null;
354
+ createdName: null;
355
+ createdTime: string;
356
+ updatedBy: null;
357
+ updatedName: null;
358
+ updatedTime: null;
359
+ id: string;
360
+ defineId: string;
361
+ headers: string;
362
+ parameters: string;
363
+ implScript: string;
364
+ publishStatus: number;
365
+ method: null;
366
+ uri: null;
367
+ fullPath: null;
368
+ responseParameters: null;
369
+ };
370
+ }[];
371
+ }[];
372
+ checked: boolean;
373
+ group: {
374
+ status: number;
375
+ createdBy: null;
376
+ createdName: null;
377
+ createdTime: string;
378
+ updatedBy: null;
379
+ updatedName: null;
380
+ updatedTime: null;
381
+ id: string;
382
+ name: string;
383
+ path: string;
384
+ parentId: string;
385
+ type: null;
386
+ sort: null;
387
+ paths: null;
388
+ options: null;
389
+ };
390
+ apiList: never[];
391
+ })[];
392
+ };
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * @description 递归查询对应的路由最底层url
4
+ * @param {Object} routes 路由列表
5
+ * @returns string
6
+ */
7
+ export declare const defaultSelectedChild: (route?: any) => any;
8
+ export default function Left(): JSX.Element;
package/dist/index.esm.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'antd/dist/reset.css';
2
2
  import React, { useRef, useEffect, useMemo, useState, useCallback, useImperativeHandle, memo, forwardRef, createRef } from 'react';
3
- import { cloneDeep, uniqBy, pick, chunk, isEmpty } from 'lodash-es';
3
+ import { cloneDeep, uniqBy, omit, chunk, isEmpty } from 'lodash-es';
4
4
  import { useSyncExternalStore } from 'use-sync-external-store/shim';
5
5
  import { Menu, Dropdown, Button, Input, Upload as Upload$1, Modal as Modal$2, message, InputNumber, DatePicker, Radio, Space, Checkbox, Select, Switch, Tooltip, TreeSelect as TreeSelect$1, Cascader, Form, Row, Col, Spin, Pagination, Breadcrumb, ConfigProvider, notification } from 'antd';
6
6
  import { createFromIconfontCN, PlusOutlined, CloseCircleOutlined, SearchOutlined, ReloadOutlined, MinusOutlined, FullscreenOutlined, EllipsisOutlined, ExclamationCircleOutlined, EyeOutlined, EditOutlined, DeleteOutlined, LeftOutlined, RightOutlined, CloseOutlined } from '@ant-design/icons';
@@ -4701,7 +4701,8 @@ function Table(_ref) {
4701
4701
 
4702
4702
  useEffect(function () {
4703
4703
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
4704
- var requestParams, values, res;
4704
+ var _formSearchRef$curren5, _formSearchRef$curren6, requestParams, values, res;
4705
+
4705
4706
  return regeneratorRuntime.wrap(function _callee$(_context) {
4706
4707
  while (1) {
4707
4708
  switch (_context.prev = _context.next) {
@@ -4719,7 +4720,7 @@ function Table(_ref) {
4719
4720
  requestParams.pageSize = pagination.pageSize || 20;
4720
4721
  }
4721
4722
 
4722
- values = formSearchRef.current.getFormValues() || {};
4723
+ values = (formSearchRef === null || formSearchRef === void 0 ? void 0 : (_formSearchRef$curren5 = formSearchRef.current) === null || _formSearchRef$curren5 === void 0 ? void 0 : (_formSearchRef$curren6 = _formSearchRef$curren5.getFormValues) === null || _formSearchRef$curren6 === void 0 ? void 0 : _formSearchRef$curren6.call(_formSearchRef$curren5)) || {};
4723
4724
  requestParams = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, requestParams), params), values), pageParams);
4724
4725
  _context.next = 8;
4725
4726
  return request(requestParams);
@@ -7525,7 +7526,7 @@ var TabelCard = function TabelCard(props, ref) {
7525
7526
  return renderTableBar === null || renderTableBar === void 0 ? void 0 : renderTableBar.map(function (item) {
7526
7527
  if (item.type === 'add') {
7527
7528
  return {
7528
- config: item,
7529
+ config: omit(item, ['type', 'actionMethod', 'actionRender']),
7529
7530
  children: /*#__PURE__*/React.createElement(Tooltip, {
7530
7531
  title: "\u65B0\u589E",
7531
7532
  key: "add"
@@ -7577,7 +7578,7 @@ var TabelCard = function TabelCard(props, ref) {
7577
7578
  var _item$actionRender2;
7578
7579
 
7579
7580
  return {
7580
- config: pick(item, ['type', 'actionMethod', 'actionRender']),
7581
+ config: omit(item, ['type', 'actionMethod', 'actionRender']),
7581
7582
  children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
7582
7583
  item.actionMethod && item.actionMethod(actionRef, function () {
7583
7584
  var _actionRef$current5;
@@ -12215,7 +12216,8 @@ function NtTable(_ref, ref) {
12215
12216
  });
12216
12217
  useEffect(function () {
12217
12218
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
12218
- var requestParams, values, res;
12219
+ var _formSearchRef$curren6, _formSearchRef$curren7, requestParams, values, res;
12220
+
12219
12221
  return regeneratorRuntime.wrap(function _callee$(_context) {
12220
12222
  while (1) {
12221
12223
  switch (_context.prev = _context.next) {
@@ -12233,7 +12235,7 @@ function NtTable(_ref, ref) {
12233
12235
  requestParams.pageSize = pagination.pageSize || 20;
12234
12236
  }
12235
12237
 
12236
- values = formSearchRef.current.getFormValues() || {};
12238
+ values = (formSearchRef === null || formSearchRef === void 0 ? void 0 : (_formSearchRef$curren6 = formSearchRef.current) === null || _formSearchRef$curren6 === void 0 ? void 0 : (_formSearchRef$curren7 = _formSearchRef$curren6.getFormValues) === null || _formSearchRef$curren7 === void 0 ? void 0 : _formSearchRef$curren7.call(_formSearchRef$curren6)) || {};
12237
12239
  requestParams = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, requestParams), params), values), pageParams);
12238
12240
  _context.next = 8;
12239
12241
  return request(requestParams);
package/dist/index.js CHANGED
@@ -4745,7 +4745,8 @@ function Table(_ref) {
4745
4745
 
4746
4746
  React.useEffect(function () {
4747
4747
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
4748
- var requestParams, values, res;
4748
+ var _formSearchRef$curren5, _formSearchRef$curren6, requestParams, values, res;
4749
+
4749
4750
  return regeneratorRuntime.wrap(function _callee$(_context) {
4750
4751
  while (1) {
4751
4752
  switch (_context.prev = _context.next) {
@@ -4763,7 +4764,7 @@ function Table(_ref) {
4763
4764
  requestParams.pageSize = pagination.pageSize || 20;
4764
4765
  }
4765
4766
 
4766
- values = formSearchRef.current.getFormValues() || {};
4767
+ values = (formSearchRef === null || formSearchRef === void 0 ? void 0 : (_formSearchRef$curren5 = formSearchRef.current) === null || _formSearchRef$curren5 === void 0 ? void 0 : (_formSearchRef$curren6 = _formSearchRef$curren5.getFormValues) === null || _formSearchRef$curren6 === void 0 ? void 0 : _formSearchRef$curren6.call(_formSearchRef$curren5)) || {};
4767
4768
  requestParams = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, requestParams), params), values), pageParams);
4768
4769
  _context.next = 8;
4769
4770
  return request(requestParams);
@@ -7569,7 +7570,7 @@ var TabelCard = function TabelCard(props, ref) {
7569
7570
  return renderTableBar === null || renderTableBar === void 0 ? void 0 : renderTableBar.map(function (item) {
7570
7571
  if (item.type === 'add') {
7571
7572
  return {
7572
- config: item,
7573
+ config: lodashEs.omit(item, ['type', 'actionMethod', 'actionRender']),
7573
7574
  children: /*#__PURE__*/React__default['default'].createElement(antd.Tooltip, {
7574
7575
  title: "\u65B0\u589E",
7575
7576
  key: "add"
@@ -7621,7 +7622,7 @@ var TabelCard = function TabelCard(props, ref) {
7621
7622
  var _item$actionRender2;
7622
7623
 
7623
7624
  return {
7624
- config: lodashEs.pick(item, ['type', 'actionMethod', 'actionRender']),
7625
+ config: lodashEs.omit(item, ['type', 'actionMethod', 'actionRender']),
7625
7626
  children: (_item$actionRender2 = item.actionRender) === null || _item$actionRender2 === void 0 ? void 0 : _item$actionRender2.call(item, actionRef, function () {
7626
7627
  item.actionMethod && item.actionMethod(actionRef, function () {
7627
7628
  var _actionRef$current5;
@@ -12259,7 +12260,8 @@ function NtTable(_ref, ref) {
12259
12260
  });
12260
12261
  React.useEffect(function () {
12261
12262
  _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee() {
12262
- var requestParams, values, res;
12263
+ var _formSearchRef$curren6, _formSearchRef$curren7, requestParams, values, res;
12264
+
12263
12265
  return regeneratorRuntime.wrap(function _callee$(_context) {
12264
12266
  while (1) {
12265
12267
  switch (_context.prev = _context.next) {
@@ -12277,7 +12279,7 @@ function NtTable(_ref, ref) {
12277
12279
  requestParams.pageSize = pagination.pageSize || 20;
12278
12280
  }
12279
12281
 
12280
- values = formSearchRef.current.getFormValues() || {};
12282
+ values = (formSearchRef === null || formSearchRef === void 0 ? void 0 : (_formSearchRef$curren6 = formSearchRef.current) === null || _formSearchRef$curren6 === void 0 ? void 0 : (_formSearchRef$curren7 = _formSearchRef$curren6.getFormValues) === null || _formSearchRef$curren7 === void 0 ? void 0 : _formSearchRef$curren7.call(_formSearchRef$curren6)) || {};
12281
12283
  requestParams = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, requestParams), params), values), pageParams);
12282
12284
  _context.next = 8;
12283
12285
  return request(requestParams);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "private": false,
3
3
  "name": "wargerm",
4
- "version": "0.7.38",
4
+ "version": "0.7.40",
5
5
  "scripts": {
6
6
  "dev": "dumi dev",
7
7
  "docs:build": "dumi build",