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