@freelog/tools-lib 0.1.151 → 0.1.153
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/i18n/I18nNext.d.ts +1 -1
- package/dist/service-API/collections.d.ts +1 -0
- package/dist/service-API/operation.d.ts +1 -0
- package/dist/service-API/resources.d.ts +21 -4
- package/dist/service-API/storages.d.ts +1 -1
- package/dist/tools-lib.cjs.development.js +110 -51
- package/dist/tools-lib.cjs.development.js.map +1 -1
- package/dist/tools-lib.cjs.production.min.js +1 -1
- package/dist/tools-lib.cjs.production.min.js.map +1 -1
- package/dist/tools-lib.esm.js +110 -51
- package/dist/tools-lib.esm.js.map +1 -1
- package/dist/utils/hooks.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/linkTo.d.ts +10 -0
- package/dist/utils/regexp.d.ts +2 -0
- package/package.json +4 -2
- package/src/i18n/I18nNext.ts +155 -155
- package/src/service-API/collections.ts +1 -3
- package/src/service-API/nodes.ts +81 -81
- package/src/service-API/operation.ts +1 -0
- package/src/service-API/presentables.ts +292 -292
- package/src/service-API/recombinations/index.ts +97 -97
- package/src/service-API/resources.ts +30 -4
- package/src/service-API/storages.ts +362 -361
- package/src/utils/hooks.ts +17 -0
- package/src/utils/index.ts +22 -20
- package/src/utils/linkTo.ts +439 -413
- package/src/utils/regexp.ts +12 -5
package/dist/i18n/I18nNext.d.ts
CHANGED
|
@@ -60,6 +60,7 @@ interface ListParamsType {
|
|
|
60
60
|
keywords?: string;
|
|
61
61
|
resourceType?: string;
|
|
62
62
|
resourceTypeCode?: string;
|
|
63
|
+
resourceTypeCategory?: 1 | 2;
|
|
63
64
|
omitResourceType?: string;
|
|
64
65
|
isSelf?: 0 | 1;
|
|
65
66
|
userId?: number;
|
|
@@ -140,6 +141,10 @@ interface CreateVersionParamsType {
|
|
|
140
141
|
policyId: string;
|
|
141
142
|
}[];
|
|
142
143
|
}[];
|
|
144
|
+
inputAttrs: {
|
|
145
|
+
key: string;
|
|
146
|
+
value: string;
|
|
147
|
+
}[];
|
|
143
148
|
}
|
|
144
149
|
export declare function createVersion({ resourceId, ...params }: CreateVersionParamsType): Promise<any>;
|
|
145
150
|
interface ResourceVersionInfo1ParamsType {
|
|
@@ -181,6 +186,10 @@ interface UpdateResourceVersionInfoParamsType {
|
|
|
181
186
|
policyId: string;
|
|
182
187
|
}[];
|
|
183
188
|
}[];
|
|
189
|
+
inputAttrs: {
|
|
190
|
+
key: string;
|
|
191
|
+
value: string;
|
|
192
|
+
}[];
|
|
184
193
|
}
|
|
185
194
|
export declare function updateResourceVersionInfo(params: UpdateResourceVersionInfoParamsType): Promise<any>;
|
|
186
195
|
interface SaveVersionsDraftParamsType {
|
|
@@ -278,22 +287,30 @@ export declare function availableTags({ ...params }: AvailableTagsParamsType): P
|
|
|
278
287
|
interface ResourceTypesParamsType {
|
|
279
288
|
codeOrName?: string;
|
|
280
289
|
category?: 1 | 2;
|
|
290
|
+
isMine?: boolean;
|
|
291
|
+
status?: 0 | 1;
|
|
281
292
|
}
|
|
282
293
|
export declare function resourceTypes({ ...params }?: ResourceTypesParamsType): Promise<any>;
|
|
283
294
|
interface ListSimpleByParentCodeParamsType {
|
|
284
295
|
parentCode: string;
|
|
285
296
|
name?: string;
|
|
286
297
|
category?: 1 | 2;
|
|
298
|
+
excludeParentCode?: boolean;
|
|
299
|
+
isTerminate?: boolean;
|
|
287
300
|
}
|
|
288
301
|
export declare function ListSimpleByParentCode({ ...params }: ListSimpleByParentCodeParamsType): Promise<any>;
|
|
289
302
|
interface GetResourceTypeInfoByCodeParamsType {
|
|
290
303
|
code: string;
|
|
291
304
|
}
|
|
292
305
|
export declare function getResourceTypeInfoByCode({ ...params }: GetResourceTypeInfoByCodeParamsType): Promise<any>;
|
|
293
|
-
interface
|
|
306
|
+
interface GetResourceAttrListSimpleParamsType {
|
|
307
|
+
}
|
|
308
|
+
export declare function getResourceAttrListSimple({ ...params }: GetResourceAttrListSimpleParamsType): Promise<any>;
|
|
309
|
+
interface ListSimple4RecentlyParamsType {
|
|
294
310
|
}
|
|
295
|
-
export declare function
|
|
296
|
-
interface
|
|
311
|
+
export declare function listSimple4Recently({ ...params }?: ListSimple4RecentlyParamsType): Promise<any>;
|
|
312
|
+
interface GetAttrsInfoByKeyParamsType {
|
|
313
|
+
key: string;
|
|
297
314
|
}
|
|
298
|
-
export declare function
|
|
315
|
+
export declare function getAttrsInfoByKey({ ...params }: GetAttrsInfoByKeyParamsType): Promise<any>;
|
|
299
316
|
export {};
|
|
@@ -91,8 +91,8 @@ interface UpdateObjectParamsType {
|
|
|
91
91
|
type: string;
|
|
92
92
|
versionRange?: string;
|
|
93
93
|
}[];
|
|
94
|
-
resourceType?: string[];
|
|
95
94
|
resourceTypeCode?: string;
|
|
95
|
+
resourceTypeName?: string;
|
|
96
96
|
}
|
|
97
97
|
export declare function updateObject({ objectIdOrName, ...params }: UpdateObjectParamsType): Promise<any>;
|
|
98
98
|
interface BatchObjectListParamsType {
|
|
@@ -8,6 +8,7 @@ var moment = _interopDefault(require('moment'));
|
|
|
8
8
|
var querystring = require('querystring');
|
|
9
9
|
var axios = _interopDefault(require('axios'));
|
|
10
10
|
var CryptoJS = require('crypto-js');
|
|
11
|
+
var React = require('react');
|
|
11
12
|
var i18next = _interopDefault(require('i18next'));
|
|
12
13
|
var Cookies = _interopDefault(require('js-cookie'));
|
|
13
14
|
|
|
@@ -125,12 +126,11 @@ var Format = {
|
|
|
125
126
|
var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源名称
|
|
126
127
|
|
|
127
128
|
var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源类型
|
|
128
|
-
// export const RESOURCE_TYPE: RegExp = new RegExp(/^(?!_)[a-z0-9_]{3,20}(?<!_)$/);
|
|
129
129
|
|
|
130
|
-
var RESOURCE_TYPE = /*#__PURE__*/new RegExp(
|
|
131
|
-
// export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z0-9_]{1,
|
|
130
|
+
var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$"); // 自定义属性键
|
|
131
|
+
// export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z_]([a-zA-Z0-9_]{1,19})?$/);
|
|
132
132
|
|
|
133
|
-
var CUSTOM_KEY = /*#__PURE__*/new RegExp(
|
|
133
|
+
var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,19})?$'); // 节点名称
|
|
134
134
|
|
|
135
135
|
var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/); // 节点地址
|
|
136
136
|
// export const NODE_DOMAIN: RegExp = new RegExp(/^(?!-)[a-z0-9-]{4,24}(?<!-)$/);
|
|
@@ -153,12 +153,17 @@ var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/);
|
|
|
153
153
|
var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/); // 正整数
|
|
154
154
|
|
|
155
155
|
var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/); // 最多两位小数的正数
|
|
156
|
+
// export const MAX_2_DECIMAL_POSITIVE_NUMBER = new RegExp(/^\d+(.\d{1,2})?$/);
|
|
156
157
|
|
|
157
|
-
var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(
|
|
158
|
+
var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/); // 对象的Bucket名称
|
|
158
159
|
|
|
159
160
|
var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/); // JS变量名称
|
|
160
161
|
|
|
161
|
-
var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/);
|
|
162
|
+
var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/); // 日期
|
|
163
|
+
|
|
164
|
+
var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/); // 日期时间
|
|
165
|
+
|
|
166
|
+
var DATE_TIME = /*#__PURE__*/new RegExp(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/);
|
|
162
167
|
|
|
163
168
|
var Regexp = {
|
|
164
169
|
__proto__: null,
|
|
@@ -177,7 +182,9 @@ var Regexp = {
|
|
|
177
182
|
POSITIVE_INTEGER: POSITIVE_INTEGER,
|
|
178
183
|
MAX_2_DECIMAL_POSITIVE_NUMBER: MAX_2_DECIMAL_POSITIVE_NUMBER,
|
|
179
184
|
BUCKET_NAME: BUCKET_NAME,
|
|
180
|
-
JS_VARIABLE_NAME: JS_VARIABLE_NAME
|
|
185
|
+
JS_VARIABLE_NAME: JS_VARIABLE_NAME,
|
|
186
|
+
DATE: DATE,
|
|
187
|
+
DATE_TIME: DATE_TIME
|
|
181
188
|
};
|
|
182
189
|
|
|
183
190
|
function _regeneratorRuntime() {
|
|
@@ -601,7 +608,8 @@ var _excluded = ["resourceID"],
|
|
|
601
608
|
_excluded2 = ["nodeID", "showPage"],
|
|
602
609
|
_excluded3 = ["nodeID", "showPage"],
|
|
603
610
|
_excluded4 = ["goTo"],
|
|
604
|
-
_excluded5 = ["goTo"]
|
|
611
|
+
_excluded5 = ["goTo"],
|
|
612
|
+
_excluded6 = ["goTo", "returnUrl"];
|
|
605
613
|
function home(_temp) {
|
|
606
614
|
var _ref = _temp === void 0 ? {} : _temp;
|
|
607
615
|
|
|
@@ -783,84 +791,101 @@ function resourceFreeze(_ref29) {
|
|
|
783
791
|
var resourceID = _ref29.resourceID;
|
|
784
792
|
return "/result/resource/freeze/" + resourceID;
|
|
785
793
|
}
|
|
794
|
+
function globalSearch(_ref30) {
|
|
795
|
+
var search = _ref30.search;
|
|
796
|
+
return "/search" + handleQuery({
|
|
797
|
+
search: search
|
|
798
|
+
});
|
|
799
|
+
}
|
|
786
800
|
function login(_temp13) {
|
|
787
|
-
var
|
|
788
|
-
goTo =
|
|
801
|
+
var _ref31 = _temp13 === void 0 ? {} : _temp13,
|
|
802
|
+
goTo = _ref31.goTo;
|
|
789
803
|
|
|
790
804
|
return "/login" + handleQuery({
|
|
791
805
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
792
806
|
});
|
|
793
807
|
}
|
|
794
808
|
function logon(_temp14) {
|
|
795
|
-
var
|
|
796
|
-
goTo =
|
|
797
|
-
params = _objectWithoutPropertiesLoose(
|
|
809
|
+
var _ref32 = _temp14 === void 0 ? {} : _temp14,
|
|
810
|
+
goTo = _ref32.goTo,
|
|
811
|
+
params = _objectWithoutPropertiesLoose(_ref32, _excluded5);
|
|
798
812
|
|
|
799
813
|
return "/logon" + handleQuery(_extends({
|
|
800
814
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
801
815
|
}, params));
|
|
802
816
|
}
|
|
803
|
-
function
|
|
804
|
-
var
|
|
805
|
-
goTo =
|
|
817
|
+
function bind(_temp15) {
|
|
818
|
+
var _ref33 = _temp15 === void 0 ? {} : _temp15,
|
|
819
|
+
goTo = _ref33.goTo,
|
|
820
|
+
returnUrl = _ref33.returnUrl,
|
|
821
|
+
params = _objectWithoutPropertiesLoose(_ref33, _excluded6);
|
|
822
|
+
|
|
823
|
+
return "/bind" + handleQuery(_extends({
|
|
824
|
+
goTo: goTo ? encodeURIComponent(goTo) : undefined,
|
|
825
|
+
returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
|
|
826
|
+
}, params));
|
|
827
|
+
}
|
|
828
|
+
function retrieveUserPassword(_temp16) {
|
|
829
|
+
var _ref34 = _temp16 === void 0 ? {} : _temp16,
|
|
830
|
+
goTo = _ref34.goTo;
|
|
806
831
|
|
|
807
832
|
return "/retrieve" + handleQuery({
|
|
808
833
|
goTo: goTo ? encodeURIComponent(goTo) : undefined
|
|
809
834
|
});
|
|
810
835
|
}
|
|
811
|
-
function retrievePayPassword(
|
|
812
|
-
var
|
|
836
|
+
function retrievePayPassword(_temp17) {
|
|
837
|
+
var _ref35 = _temp17 === void 0 ? {} : _temp17;
|
|
813
838
|
|
|
814
|
-
_objectDestructuringEmpty(
|
|
839
|
+
_objectDestructuringEmpty(_ref35);
|
|
815
840
|
|
|
816
841
|
return "/retrievePayPassword";
|
|
817
842
|
}
|
|
818
|
-
function userFreeze(
|
|
819
|
-
var
|
|
843
|
+
function userFreeze(_temp18) {
|
|
844
|
+
var _ref36 = _temp18 === void 0 ? {} : _temp18;
|
|
820
845
|
|
|
821
|
-
_objectDestructuringEmpty(
|
|
846
|
+
_objectDestructuringEmpty(_ref36);
|
|
822
847
|
|
|
823
848
|
return "/freeze";
|
|
824
849
|
}
|
|
825
|
-
function wallet(
|
|
826
|
-
var
|
|
850
|
+
function wallet(_temp19) {
|
|
851
|
+
var _ref37 = _temp19 === void 0 ? {} : _temp19;
|
|
827
852
|
|
|
828
|
-
_objectDestructuringEmpty(
|
|
853
|
+
_objectDestructuringEmpty(_ref37);
|
|
829
854
|
|
|
830
855
|
return "/logged/wallet";
|
|
831
856
|
}
|
|
832
|
-
function reward(
|
|
833
|
-
var
|
|
857
|
+
function reward(_temp20) {
|
|
858
|
+
var _ref38 = _temp20 === void 0 ? {} : _temp20;
|
|
834
859
|
|
|
835
|
-
_objectDestructuringEmpty(
|
|
860
|
+
_objectDestructuringEmpty(_ref38);
|
|
836
861
|
|
|
837
862
|
return "/logged/reward";
|
|
838
863
|
}
|
|
839
|
-
function contract(
|
|
840
|
-
var
|
|
864
|
+
function contract(_temp21) {
|
|
865
|
+
var _ref39 = _temp21 === void 0 ? {} : _temp21;
|
|
841
866
|
|
|
842
|
-
_objectDestructuringEmpty(
|
|
867
|
+
_objectDestructuringEmpty(_ref39);
|
|
843
868
|
|
|
844
869
|
return "/logged/contract";
|
|
845
870
|
}
|
|
846
|
-
function setting(
|
|
847
|
-
var
|
|
871
|
+
function setting(_temp22) {
|
|
872
|
+
var _ref40 = _temp22 === void 0 ? {} : _temp22;
|
|
848
873
|
|
|
849
|
-
_objectDestructuringEmpty(
|
|
874
|
+
_objectDestructuringEmpty(_ref40);
|
|
850
875
|
|
|
851
876
|
return "/logged/setting";
|
|
852
877
|
}
|
|
853
|
-
function binding(
|
|
854
|
-
var
|
|
878
|
+
function binding(_temp23) {
|
|
879
|
+
var _ref41 = _temp23 === void 0 ? {} : _temp23;
|
|
855
880
|
|
|
856
|
-
_objectDestructuringEmpty(
|
|
881
|
+
_objectDestructuringEmpty(_ref41);
|
|
857
882
|
|
|
858
883
|
return "/logged/binding";
|
|
859
884
|
}
|
|
860
|
-
function resultBindingSuccess(
|
|
861
|
-
var
|
|
885
|
+
function resultBindingSuccess(_temp24) {
|
|
886
|
+
var _ref42 = _temp24 === void 0 ? {} : _temp24;
|
|
862
887
|
|
|
863
|
-
_objectDestructuringEmpty(
|
|
888
|
+
_objectDestructuringEmpty(_ref42);
|
|
864
889
|
|
|
865
890
|
return "/result/binding";
|
|
866
891
|
}
|
|
@@ -914,8 +939,10 @@ var LinkTo = {
|
|
|
914
939
|
exception403: exception403,
|
|
915
940
|
nodeFreeze: nodeFreeze,
|
|
916
941
|
resourceFreeze: resourceFreeze,
|
|
942
|
+
globalSearch: globalSearch,
|
|
917
943
|
login: login,
|
|
918
944
|
logon: logon,
|
|
945
|
+
bind: bind,
|
|
919
946
|
retrieveUserPassword: retrieveUserPassword,
|
|
920
947
|
retrievePayPassword: retrievePayPassword,
|
|
921
948
|
userFreeze: userFreeze,
|
|
@@ -1030,7 +1057,7 @@ var _excluded$1 = ["presentableId"],
|
|
|
1030
1057
|
_excluded3$1 = ["presentableId"],
|
|
1031
1058
|
_excluded4$1 = ["presentableId"],
|
|
1032
1059
|
_excluded5$1 = ["presentableId"],
|
|
1033
|
-
_excluded6 = ["presentableId"],
|
|
1060
|
+
_excluded6$1 = ["presentableId"],
|
|
1034
1061
|
_excluded7 = ["presentableId"],
|
|
1035
1062
|
_excluded8 = ["presentableId"],
|
|
1036
1063
|
_excluded9 = ["nodeId"],
|
|
@@ -1127,7 +1154,7 @@ function relationTree(_ref4) {
|
|
|
1127
1154
|
}
|
|
1128
1155
|
function authTree(_ref5) {
|
|
1129
1156
|
var presentableId = _ref5.presentableId,
|
|
1130
|
-
params = _objectWithoutPropertiesLoose(_ref5, _excluded6);
|
|
1157
|
+
params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
|
|
1131
1158
|
|
|
1132
1159
|
// return FUtil.Axios.get(`/v2/presentables/${presentableId}/authTree`, {params});
|
|
1133
1160
|
return FUtil.Request({
|
|
@@ -1462,9 +1489,6 @@ function collectResource(params) {
|
|
|
1462
1489
|
});
|
|
1463
1490
|
}
|
|
1464
1491
|
function collectionResources(params) {
|
|
1465
|
-
// return FUtil.Axios.get('/v2/collections/resources', {
|
|
1466
|
-
// params
|
|
1467
|
-
// });
|
|
1468
1492
|
return FUtil.Request({
|
|
1469
1493
|
method: 'GET',
|
|
1470
1494
|
url: "/v2/collections/resources",
|
|
@@ -1512,7 +1536,7 @@ var _excluded$3 = ["resourceIdOrName"],
|
|
|
1512
1536
|
_excluded3$3 = ["resourceId"],
|
|
1513
1537
|
_excluded4$3 = ["resourceId"],
|
|
1514
1538
|
_excluded5$3 = ["resourceId", "version"],
|
|
1515
|
-
_excluded6$
|
|
1539
|
+
_excluded6$2 = ["fileSha1"],
|
|
1516
1540
|
_excluded7$1 = ["fileSha1"],
|
|
1517
1541
|
_excluded8$1 = ["resourceId"],
|
|
1518
1542
|
_excluded9$1 = ["resourceId"],
|
|
@@ -1611,7 +1635,7 @@ function resourceVersionInfo2(params) {
|
|
|
1611
1635
|
}
|
|
1612
1636
|
function getResourceVersionBySha1(_ref6) {
|
|
1613
1637
|
var fileSha1 = _ref6.fileSha1,
|
|
1614
|
-
params = _objectWithoutPropertiesLoose(_ref6, _excluded6$
|
|
1638
|
+
params = _objectWithoutPropertiesLoose(_ref6, _excluded6$2);
|
|
1615
1639
|
|
|
1616
1640
|
// return FUtil.Axios.get(`/v2/resources/files/${fileSha1}/versions`, {
|
|
1617
1641
|
// params,
|
|
@@ -1822,6 +1846,15 @@ function listSimple4Recently(_temp2) {
|
|
|
1822
1846
|
params: params
|
|
1823
1847
|
});
|
|
1824
1848
|
}
|
|
1849
|
+
function getAttrsInfoByKey(_ref22) {
|
|
1850
|
+
var params = _extends({}, _ref22);
|
|
1851
|
+
|
|
1852
|
+
return FUtil.Request({
|
|
1853
|
+
method: 'GET',
|
|
1854
|
+
url: "/v2/resources/attrs/getInfoByKey",
|
|
1855
|
+
params: params
|
|
1856
|
+
});
|
|
1857
|
+
}
|
|
1825
1858
|
|
|
1826
1859
|
var Resource = {
|
|
1827
1860
|
__proto__: null,
|
|
@@ -1856,7 +1889,8 @@ var Resource = {
|
|
|
1856
1889
|
ListSimpleByParentCode: ListSimpleByParentCode,
|
|
1857
1890
|
getResourceTypeInfoByCode: getResourceTypeInfoByCode,
|
|
1858
1891
|
getResourceAttrListSimple: getResourceAttrListSimple,
|
|
1859
|
-
listSimple4Recently: listSimple4Recently
|
|
1892
|
+
listSimple4Recently: listSimple4Recently,
|
|
1893
|
+
getAttrsInfoByKey: getAttrsInfoByKey
|
|
1860
1894
|
};
|
|
1861
1895
|
|
|
1862
1896
|
var _excluded$4 = ["loginName"];
|
|
@@ -2069,7 +2103,7 @@ var _excluded$5 = ["nodeId"],
|
|
|
2069
2103
|
_excluded3$4 = ["nodeId"],
|
|
2070
2104
|
_excluded4$4 = ["nodeId"],
|
|
2071
2105
|
_excluded5$4 = ["nodeId"],
|
|
2072
|
-
_excluded6$
|
|
2106
|
+
_excluded6$3 = ["testResourceId"],
|
|
2073
2107
|
_excluded7$2 = ["testResourceId"],
|
|
2074
2108
|
_excluded8$2 = ["nodeId"],
|
|
2075
2109
|
_excluded9$2 = ["nodeId"],
|
|
@@ -2134,7 +2168,7 @@ function testNodeRules(_ref6) {
|
|
|
2134
2168
|
}
|
|
2135
2169
|
function updateTestResourceContracts(_ref7) {
|
|
2136
2170
|
var testResourceId = _ref7.testResourceId,
|
|
2137
|
-
params = _objectWithoutPropertiesLoose(_ref7, _excluded6$
|
|
2171
|
+
params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
|
|
2138
2172
|
|
|
2139
2173
|
// return FUtil.Axios.put(`/v2/testNodes/testResources/${testResourceId}`, params);
|
|
2140
2174
|
return FUtil.Request({
|
|
@@ -3227,6 +3261,30 @@ function _request() {
|
|
|
3227
3261
|
return _request.apply(this, arguments);
|
|
3228
3262
|
}
|
|
3229
3263
|
|
|
3264
|
+
function useGetState(initVal) {
|
|
3265
|
+
var _React$useState = React.useState(initVal),
|
|
3266
|
+
state = _React$useState[0],
|
|
3267
|
+
setState = _React$useState[1];
|
|
3268
|
+
|
|
3269
|
+
var ref = React.useRef(initVal);
|
|
3270
|
+
|
|
3271
|
+
function setStateCopy(newVal) {
|
|
3272
|
+
ref.current = newVal;
|
|
3273
|
+
setState(newVal);
|
|
3274
|
+
}
|
|
3275
|
+
|
|
3276
|
+
function getState() {
|
|
3277
|
+
return ref.current;
|
|
3278
|
+
}
|
|
3279
|
+
|
|
3280
|
+
return [state, setStateCopy, getState];
|
|
3281
|
+
}
|
|
3282
|
+
|
|
3283
|
+
var Hook = {
|
|
3284
|
+
__proto__: null,
|
|
3285
|
+
useGetState: useGetState
|
|
3286
|
+
};
|
|
3287
|
+
|
|
3230
3288
|
var FUtil = {
|
|
3231
3289
|
Format: Format,
|
|
3232
3290
|
Regexp: Regexp,
|
|
@@ -3234,7 +3292,8 @@ var FUtil = {
|
|
|
3234
3292
|
Predefined: Predefined,
|
|
3235
3293
|
Axios: axios,
|
|
3236
3294
|
Request: request,
|
|
3237
|
-
Tool: Tool
|
|
3295
|
+
Tool: Tool,
|
|
3296
|
+
Hook: Hook
|
|
3238
3297
|
};
|
|
3239
3298
|
|
|
3240
3299
|
var ossJsonUrl = 'https://freelog-i18n.oss-cn-shenzhen.aliyuncs.com/configs/i18n.json';
|