antd-management-fast-framework 1.12.39 → 1.12.42

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.
@@ -9,14 +9,16 @@ exports.reloadAuthorized = void 0;
9
9
 
10
10
  var _Authorized = _interopRequireDefault(require("../customComponents/Authorized"));
11
11
 
12
+ var _core = require("./core");
13
+
12
14
  var _globalStorageAssist = require("./globalStorageAssist");
13
15
 
14
- var _tools = require("./tools");
16
+ var _localStorageAssist = require("./localStorageAssist");
15
17
 
16
18
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
19
 
18
20
  function getAuthority(str) {
19
- var authorityString = typeof str === 'undefined' ? (0, _tools.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection) : str;
21
+ var authorityString = typeof str === 'undefined' ? (0, _localStorageAssist.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection) : str;
20
22
  var authority;
21
23
 
22
24
  try {
@@ -31,7 +33,7 @@ function getAuthority(str) {
31
33
  return [authority];
32
34
  }
33
35
 
34
- if ((0, _tools.isArray)(authority)) {
36
+ if ((0, _core.isArray)(authority)) {
35
37
  return authority;
36
38
  }
37
39
 
@@ -0,0 +1,70 @@
1
+ export function getAppInitConfigData(): {
2
+ platformName: string;
3
+ appName: string;
4
+ appDescription: string;
5
+ entranceLogo: string;
6
+ shareLogo: string;
7
+ shareLogoName: string;
8
+ leftBarText: string;
9
+ companyName: string;
10
+ copyright: string;
11
+ apiPrefix: {
12
+ corsTargetProduction: string;
13
+ };
14
+ showSelectLanguage: boolean;
15
+ showLogoInEntrance: boolean;
16
+ emptyLogo: string;
17
+ leftBarLogo: string;
18
+ apiSuccessCode: number;
19
+ authenticationFailCode: number;
20
+ entrancePath: string;
21
+ showLogInConsole: boolean;
22
+ showRequestInfo: boolean;
23
+ useVirtualRequest: boolean;
24
+ showUseVirtualRequestMessage: boolean;
25
+ apiVersion: string;
26
+ imageUploadMaxSize: number;
27
+ audioUploadMaxSize: number;
28
+ videoUploadMaxSize: number;
29
+ fileUploadMaxSize: number;
30
+ useNprogress: boolean;
31
+ tinymceApiKey: string;
32
+ tinymceImagesUploadUrl: string;
33
+ };
34
+ export function logShowInConsole(): boolean;
35
+ export function getTinymceImagesUploadUrl(): string;
36
+ export function getTinymceApiKey(): string;
37
+ export function getUseNprogress(): boolean;
38
+ export function getFileUploadMaxSize(): number;
39
+ export function getAudioUploadMaxSize(): number;
40
+ export function getVideoUploadMaxSize(): number;
41
+ export function getImageUploadMaxSize(): number;
42
+ export function getShowSelectLanguage(): boolean;
43
+ export function getShowLogoInEntrance(): boolean;
44
+ export function getEmptyLogo(): string;
45
+ export function getApiSuccessCode(): number;
46
+ export function getAuthenticationFailCode(): number;
47
+ export function getEntrancePath(): string;
48
+ export function getApiVersion(): string;
49
+ export function getUseVirtualRequest(): boolean;
50
+ export function getShowUseVirtualRequestMessage(): boolean;
51
+ export function getShowLogInConsole(): boolean;
52
+ export function getShowRequestInfo(): boolean;
53
+ export function getPlatformName(): string;
54
+ export function getAppName(): string;
55
+ export function getAppDescription(): string;
56
+ export function getTitle(): string;
57
+ export function getEntranceLogo(): string;
58
+ export function getShareLogo(): string;
59
+ export function getShareLogoName(): string;
60
+ export function getCompanyName(): string;
61
+ export function getLeftBarLogo(remoteLogo: any): any;
62
+ export function getLeftBarText(): string;
63
+ export function getCopyright(): string;
64
+ /**
65
+ * 占位函数
66
+ *
67
+ * @export
68
+ * @returns
69
+ */
70
+ export function empty(): {};
@@ -0,0 +1,403 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.empty = empty;
7
+ exports.getApiSuccessCode = getApiSuccessCode;
8
+ exports.getApiVersion = getApiVersion;
9
+ exports.getAppDescription = getAppDescription;
10
+ exports.getAppInitConfigData = getAppInitConfigData;
11
+ exports.getAppName = getAppName;
12
+ exports.getAudioUploadMaxSize = getAudioUploadMaxSize;
13
+ exports.getAuthenticationFailCode = getAuthenticationFailCode;
14
+ exports.getCompanyName = getCompanyName;
15
+ exports.getCopyright = getCopyright;
16
+ exports.getEmptyLogo = getEmptyLogo;
17
+ exports.getEntranceLogo = getEntranceLogo;
18
+ exports.getEntrancePath = getEntrancePath;
19
+ exports.getFileUploadMaxSize = getFileUploadMaxSize;
20
+ exports.getImageUploadMaxSize = getImageUploadMaxSize;
21
+ exports.getLeftBarLogo = getLeftBarLogo;
22
+ exports.getLeftBarText = getLeftBarText;
23
+ exports.getPlatformName = getPlatformName;
24
+ exports.getShareLogo = getShareLogo;
25
+ exports.getShareLogoName = getShareLogoName;
26
+ exports.getShowLogInConsole = getShowLogInConsole;
27
+ exports.getShowLogoInEntrance = getShowLogoInEntrance;
28
+ exports.getShowRequestInfo = getShowRequestInfo;
29
+ exports.getShowSelectLanguage = getShowSelectLanguage;
30
+ exports.getShowUseVirtualRequestMessage = getShowUseVirtualRequestMessage;
31
+ exports.getTinymceApiKey = getTinymceApiKey;
32
+ exports.getTinymceImagesUploadUrl = getTinymceImagesUploadUrl;
33
+ exports.getTitle = getTitle;
34
+ exports.getUseNprogress = getUseNprogress;
35
+ exports.getUseVirtualRequest = getUseVirtualRequest;
36
+ exports.getVideoUploadMaxSize = getVideoUploadMaxSize;
37
+ exports.logShowInConsole = logShowInConsole;
38
+
39
+ var _constants = require("./constants");
40
+
41
+ var _core = require("./core");
42
+
43
+ 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; }
44
+
45
+ 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; }
46
+
47
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
48
+
49
+ function getAppInitConfigData() {
50
+ var appInitConfig = _constants.appInitDefault;
51
+
52
+ if ((0, _core.isBrowser)()) {
53
+ if ((window.appInitCustomLocal || null) != null) {
54
+ appInitConfig = _objectSpread(_objectSpread({}, appInitConfig), window.appInitCustomLocal);
55
+ }
56
+
57
+ if ((window.appInitCustomRemote || null) != null) {
58
+ appInitConfig = _objectSpread(_objectSpread({}, appInitConfig), window.appInitCustomRemote);
59
+ }
60
+ }
61
+
62
+ return appInitConfig;
63
+ }
64
+
65
+ function logShowInConsole() {
66
+ var appInit = getAppInitConfigData();
67
+ var result = !!(appInit.showLogInConsole || false);
68
+ return result;
69
+ }
70
+
71
+ function getTinymceImagesUploadUrl() {
72
+ var appInit = getAppInitConfigData();
73
+
74
+ var _tinymceImagesUploadU = _objectSpread(_objectSpread({}, {
75
+ tinymceImagesUploadUrl: null
76
+ }), appInit || {}),
77
+ tinymceImagesUploadUrl = _tinymceImagesUploadU.tinymceImagesUploadUrl;
78
+
79
+ return tinymceImagesUploadUrl || '';
80
+ }
81
+
82
+ function getTinymceApiKey() {
83
+ var appInit = getAppInitConfigData();
84
+
85
+ var _tinymceApiKey = _objectSpread(_objectSpread({}, {
86
+ tinymceApiKey: ''
87
+ }), appInit || {}),
88
+ tinymceApiKey = _tinymceApiKey.tinymceApiKey;
89
+
90
+ return tinymceApiKey || '';
91
+ }
92
+
93
+ function getUseNprogress() {
94
+ var appInit = getAppInitConfigData();
95
+
96
+ var _useNprogress = _objectSpread(_objectSpread({}, {
97
+ useNprogress: true
98
+ }), appInit || {}),
99
+ useNprogress = _useNprogress.useNprogress;
100
+
101
+ return useNprogress;
102
+ }
103
+
104
+ function getFileUploadMaxSize() {
105
+ var appInit = getAppInitConfigData();
106
+
107
+ var _fileUploadMaxSize = _objectSpread(_objectSpread({}, {
108
+ fileUploadMaxSize: 2
109
+ }), appInit || {}),
110
+ fileUploadMaxSize = _fileUploadMaxSize.fileUploadMaxSize;
111
+
112
+ return fileUploadMaxSize || 2;
113
+ }
114
+
115
+ function getAudioUploadMaxSize() {
116
+ var appInit = getAppInitConfigData();
117
+
118
+ var _audioUploadMaxSize = _objectSpread(_objectSpread({}, {
119
+ audioUploadMaxSize: 4
120
+ }), appInit || {}),
121
+ audioUploadMaxSize = _audioUploadMaxSize.audioUploadMaxSize;
122
+
123
+ return audioUploadMaxSize || 4;
124
+ }
125
+
126
+ function getVideoUploadMaxSize() {
127
+ var appInit = getAppInitConfigData();
128
+
129
+ var _videoUploadMaxSize = _objectSpread(_objectSpread({}, {
130
+ videoUploadMaxSize: 4
131
+ }), appInit || {}),
132
+ videoUploadMaxSize = _videoUploadMaxSize.videoUploadMaxSize;
133
+
134
+ return videoUploadMaxSize || 4;
135
+ }
136
+
137
+ function getImageUploadMaxSize() {
138
+ var appInit = getAppInitConfigData();
139
+
140
+ var _imageUploadMaxSize = _objectSpread(_objectSpread({}, {
141
+ imageUploadMaxSize: 2
142
+ }), appInit || {}),
143
+ imageUploadMaxSize = _imageUploadMaxSize.imageUploadMaxSize;
144
+
145
+ return imageUploadMaxSize || 2;
146
+ }
147
+
148
+ function getShowSelectLanguage() {
149
+ var appInit = getAppInitConfigData();
150
+
151
+ var _showSelectLanguage = _objectSpread(_objectSpread({}, {
152
+ showSelectLanguage: false
153
+ }), appInit || {}),
154
+ showSelectLanguage = _showSelectLanguage.showSelectLanguage;
155
+
156
+ return showSelectLanguage || false;
157
+ }
158
+
159
+ function getShowLogoInEntrance() {
160
+ var appInit = getAppInitConfigData();
161
+
162
+ var _showLogoInEntrance = _objectSpread(_objectSpread({}, {
163
+ showLogoInEntrance: false
164
+ }), appInit || {}),
165
+ showLogoInEntrance = _showLogoInEntrance.showLogoInEntrance;
166
+
167
+ return showLogoInEntrance || false;
168
+ }
169
+
170
+ function getEmptyLogo() {
171
+ var appInit = getAppInitConfigData();
172
+
173
+ var _emptyLogo = _objectSpread(_objectSpread({}, {
174
+ emptyLogo: _constants.emptyLogo
175
+ }), appInit || {}),
176
+ emptyLogo = _emptyLogo.emptyLogo;
177
+
178
+ return emptyLogo || _constants.emptyLogo;
179
+ }
180
+
181
+ function getApiSuccessCode() {
182
+ var appInit = getAppInitConfigData();
183
+
184
+ var _apiSuccessCode = _objectSpread(_objectSpread({}, {
185
+ apiSuccessCode: _constants.apiSuccessCode
186
+ }), appInit || {}),
187
+ apiSuccessCode = _apiSuccessCode.apiSuccessCode;
188
+
189
+ return apiSuccessCode || _constants.apiSuccessCode;
190
+ }
191
+
192
+ function getAuthenticationFailCode() {
193
+ var appInit = getAppInitConfigData();
194
+
195
+ var _authenticationFailCo = _objectSpread({}, _objectSpread({
196
+ authenticationFailCode: _constants.authenticationFailCode
197
+ }, appInit || {})),
198
+ authenticationFailCode = _authenticationFailCo.authenticationFailCode;
199
+
200
+ return authenticationFailCode || _constants.authenticationFailCode;
201
+ }
202
+
203
+ function getEntrancePath() {
204
+ var appInit = getAppInitConfigData();
205
+
206
+ var _entrancePath = _objectSpread(_objectSpread({}, {
207
+ entrancePath: ''
208
+ }), appInit || {}),
209
+ entrancePath = _entrancePath.entrancePath;
210
+
211
+ return entrancePath || '';
212
+ }
213
+
214
+ function getApiVersion() {
215
+ var appInit = getAppInitConfigData();
216
+
217
+ var _apiVersion = _objectSpread(_objectSpread({}, {
218
+ apiVersion: ''
219
+ }), appInit || {}),
220
+ apiVersion = _apiVersion.apiVersion;
221
+
222
+ return apiVersion || '';
223
+ }
224
+
225
+ function getUseVirtualRequest() {
226
+ var appInit = getAppInitConfigData();
227
+
228
+ var _useVirtualRequest = _objectSpread(_objectSpread({}, {
229
+ useVirtualRequest: false
230
+ }), appInit || {}),
231
+ useVirtualRequest = _useVirtualRequest.useVirtualRequest;
232
+
233
+ return useVirtualRequest || false;
234
+ }
235
+
236
+ function getShowUseVirtualRequestMessage() {
237
+ var appInit = getAppInitConfigData();
238
+
239
+ var _showUseVirtualReques = _objectSpread(_objectSpread({}, {
240
+ showUseVirtualRequestMessage: false
241
+ }), appInit || {}),
242
+ showUseVirtualRequestMessage = _showUseVirtualReques.showUseVirtualRequestMessage;
243
+
244
+ return showUseVirtualRequestMessage || false;
245
+ }
246
+
247
+ function getShowLogInConsole() {
248
+ var appInit = getAppInitConfigData();
249
+
250
+ var _showLogInConsole = _objectSpread(_objectSpread({}, {
251
+ showLogInConsole: false
252
+ }), appInit || {}),
253
+ showLogInConsole = _showLogInConsole.showLogInConsole;
254
+
255
+ return showLogInConsole || false;
256
+ }
257
+
258
+ function getShowRequestInfo() {
259
+ var appInit = getAppInitConfigData();
260
+
261
+ var _showRequestInfo = _objectSpread(_objectSpread({}, {
262
+ showRequestInfo: false
263
+ }), appInit || {}),
264
+ showRequestInfo = _showRequestInfo.showRequestInfo;
265
+
266
+ return showRequestInfo || false;
267
+ }
268
+
269
+ function getPlatformName() {
270
+ var appInit = getAppInitConfigData();
271
+
272
+ var _platformName = _objectSpread(_objectSpread({}, {
273
+ platformName: ''
274
+ }), appInit || {}),
275
+ platformName = _platformName.platformName;
276
+
277
+ return platformName || '';
278
+ }
279
+
280
+ function getAppName() {
281
+ var appInit = getAppInitConfigData();
282
+
283
+ var _appName = _objectSpread(_objectSpread({}, {
284
+ appName: ''
285
+ }), appInit || {}),
286
+ appName = _appName.appName;
287
+
288
+ return appName || '';
289
+ }
290
+
291
+ function getAppDescription() {
292
+ var appInit = getAppInitConfigData();
293
+
294
+ var _appDescription = _objectSpread(_objectSpread({}, {
295
+ appDescription: ''
296
+ }), appInit || {}),
297
+ appDescription = _appDescription.appDescription;
298
+
299
+ return appDescription || '';
300
+ }
301
+
302
+ function getTitle() {
303
+ var appInit = getAppInitConfigData();
304
+
305
+ var _appName2 = _objectSpread(_objectSpread({}, {
306
+ appName: ''
307
+ }), appInit || {}),
308
+ appName = _appName2.appName;
309
+
310
+ return appName || '';
311
+ }
312
+
313
+ function getEntranceLogo() {
314
+ var appInit = getAppInitConfigData();
315
+
316
+ var _entranceLogo = _objectSpread(_objectSpread({}, {
317
+ entranceLogo: _constants.emptyLogo
318
+ }), appInit || {}),
319
+ entranceLogo = _entranceLogo.entranceLogo;
320
+
321
+ return entranceLogo || _constants.emptyLogo;
322
+ }
323
+
324
+ function getShareLogo() {
325
+ var appInit = getAppInitConfigData();
326
+
327
+ var _shareLogo = _objectSpread(_objectSpread({}, {
328
+ shareLogo: _constants.emptyLogo
329
+ }), appInit || {}),
330
+ shareLogo = _shareLogo.shareLogo;
331
+
332
+ return shareLogo || _constants.emptyLogo;
333
+ }
334
+
335
+ function getShareLogoName() {
336
+ var appInit = getAppInitConfigData();
337
+
338
+ var _shareLogoName = _objectSpread(_objectSpread({}, {
339
+ shareLogoName: ''
340
+ }), appInit || {}),
341
+ shareLogoName = _shareLogoName.shareLogoName;
342
+
343
+ return shareLogoName || '';
344
+ }
345
+
346
+ function getCompanyName() {
347
+ var appInit = getAppInitConfigData();
348
+
349
+ var _companyName = _objectSpread(_objectSpread({}, {
350
+ companyName: ''
351
+ }), appInit || {}),
352
+ companyName = _companyName.companyName;
353
+
354
+ return companyName || '';
355
+ }
356
+
357
+ function getLeftBarLogo(remoteLogo) {
358
+ if (!(0, _core.stringIsNullOrWhiteSpace)(remoteLogo || null)) {
359
+ return remoteLogo;
360
+ }
361
+
362
+ var appInit = getAppInitConfigData();
363
+
364
+ var _leftBarLogo = _objectSpread(_objectSpread({}, {
365
+ leftBarLogo: _constants.emptyLogo
366
+ }), appInit || {}),
367
+ leftBarLogo = _leftBarLogo.leftBarLogo;
368
+
369
+ return leftBarLogo || _constants.emptyLogo;
370
+ }
371
+
372
+ function getLeftBarText() {
373
+ var appInit = getAppInitConfigData();
374
+
375
+ var _leftBarText = _objectSpread(_objectSpread({}, {
376
+ leftBarText: ''
377
+ }), appInit || {}),
378
+ leftBarText = _leftBarText.leftBarText;
379
+
380
+ return leftBarText || '';
381
+ }
382
+
383
+ function getCopyright() {
384
+ var appInit = getAppInitConfigData();
385
+
386
+ var _copyright = _objectSpread(_objectSpread({}, {
387
+ copyright: ''
388
+ }), appInit || {}),
389
+ copyright = _copyright.copyright;
390
+
391
+ return copyright || '';
392
+ }
393
+ /**
394
+ * 占位函数
395
+ *
396
+ * @export
397
+ * @returns
398
+ */
399
+
400
+
401
+ function empty() {
402
+ return {};
403
+ }
@@ -13,6 +13,8 @@ var _cacheAssist = require("./cacheAssist");
13
13
 
14
14
  var _globalStorageAssist = require("./globalStorageAssist");
15
15
 
16
+ var _localStorageAssist = require("./localStorageAssist");
17
+
16
18
  var _tools = require("./tools");
17
19
 
18
20
  var authorityCollectionCache = 'authorityCollectionCache';
@@ -34,7 +36,7 @@ function getAllAuthorityCore() {
34
36
  }
35
37
  }
36
38
 
37
- var authorityString = (0, _tools.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection);
39
+ var authorityString = (0, _localStorageAssist.getStringFromLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection);
38
40
  var authority;
39
41
 
40
42
  try {
@@ -250,7 +252,7 @@ function checkHasAuthority(auth) {
250
252
 
251
253
  function setAuthority(authority) {
252
254
  var authorityCollection = typeof authority === 'string' ? [authority] : authority;
253
- (0, _tools.saveJsonToLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection, authorityCollection);
255
+ (0, _localStorageAssist.saveJsonToLocalStorage)(_globalStorageAssist.storageKeyCollection.authorityCollection, authorityCollection);
254
256
  (0, _cacheAssist.flushAllCache)(); // auto reload
255
257
 
256
258
  (0, _Authorized.reloadAuthorized)();
@@ -20,7 +20,11 @@ exports.takeCache = takeCache;
20
20
 
21
21
  var _nodeCache = _interopRequireDefault(require("node-cache"));
22
22
 
23
- var _tools = require("./tools");
23
+ var _core = require("./core");
24
+
25
+ var _developAssist = require("./developAssist");
26
+
27
+ var _typeCheck = require("./typeCheck");
24
28
 
25
29
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
26
30
 
@@ -31,12 +35,12 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
31
35
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
32
36
 
33
37
  function checkKey(key) {
34
- if ((0, _tools.stringIsNullOrWhiteSpace)(key)) {
38
+ if ((0, _core.stringIsNullOrWhiteSpace)(key)) {
35
39
  throw new Error('cache key is null or empty');
36
40
  }
37
41
 
38
- if (!((0, _tools.isString)(key) || (0, _tools.isNumber)(key))) {
39
- (0, _tools.recordError)(key);
42
+ if (!((0, _typeCheck.isString)(key) || (0, _typeCheck.isNumber)(key))) {
43
+ (0, _developAssist.recordError)(key);
40
44
  throw new Error('cache key must be string or number,you can check it in console');
41
45
  }
42
46
  }
@@ -100,7 +104,7 @@ function setCache(_ref2) {
100
104
 
101
105
 
102
106
  function setMultiCache(list) {
103
- if (!(0, _tools.isArray)(list)) {
107
+ if (!(0, _typeCheck.isArray)(list)) {
104
108
  throw new Error('setMultiCache: list must be array');
105
109
  }
106
110
 
@@ -119,7 +123,7 @@ function setMultiCache(list) {
119
123
  value = _key$value$expiration.value,
120
124
  expiration = _key$value$expiration.expiration;
121
125
 
122
- if (!(0, _tools.stringIsNullOrWhiteSpace)(key)) {
126
+ if (!(0, _core.stringIsNullOrWhiteSpace)(key)) {
123
127
  checkKey(key);
124
128
  listData.push({
125
129
  key: key,
@@ -203,7 +207,7 @@ function getCache(_ref5) {
203
207
 
204
208
 
205
209
  function getMultiCache(list) {
206
- if (!(0, _tools.isArray)(list)) {
210
+ if (!(0, _typeCheck.isArray)(list)) {
207
211
  throw new Error('getMultiCache: list must be array');
208
212
  }
209
213
 
@@ -258,7 +262,7 @@ function deleteCache(_ref7) {
258
262
 
259
263
 
260
264
  function deleteMultiCache(list) {
261
- if (!(0, _tools.isArray)(list)) {
265
+ if (!(0, _typeCheck.isArray)(list)) {
262
266
  throw new Error('deleteMultiCache: list must be array');
263
267
  }
264
268
 
@@ -0,0 +1,11 @@
1
+ export function replace(source: any, pattern: any, replacement: any): string;
2
+ export function trim(source: any): string;
3
+ export function stringIsNullOrWhiteSpace(value: any): boolean;
4
+ export function isBrowser(): boolean;
5
+ /**
6
+ * 占位函数
7
+ *
8
+ * @export
9
+ * @returns
10
+ */
11
+ export function empty(): {};
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.empty = empty;
7
+ exports.isBrowser = isBrowser;
8
+ exports.replace = replace;
9
+ exports.stringIsNullOrWhiteSpace = stringIsNullOrWhiteSpace;
10
+ exports.trim = trim;
11
+
12
+ var _lodash = require("lodash");
13
+
14
+ function replace(source, pattern, replacement) {
15
+ return (0, _lodash.replace)(source, pattern, replacement);
16
+ }
17
+
18
+ function trim(source) {
19
+ return (0, _lodash.trim)(source);
20
+ }
21
+
22
+ function stringIsNullOrWhiteSpace(value) {
23
+ return trim(replace(value || '', ' ', '')) === '';
24
+ }
25
+
26
+ function isBrowser() {
27
+ return typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined';
28
+ }
29
+ /**
30
+ * 占位函数
31
+ *
32
+ * @export
33
+ * @returns
34
+ */
35
+
36
+
37
+ function empty() {
38
+ return {};
39
+ }