@next-core/brick-kit 2.89.2 → 2.91.0
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/CHANGELOG.md +48 -0
- package/dist/index.bundle.js +299 -251
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +397 -349
- package/dist/index.esm.js.map +1 -1
- package/dist/types/EasyopsEmpty/EasyopsEmpty.d.ts.map +1 -1
- package/dist/types/auth.d.ts.map +1 -1
- package/dist/types/core/Kernel.d.ts.map +1 -1
- package/dist/types/core/LocationContext.d.ts.map +1 -1
- package/dist/types/core/Resolver.d.ts.map +1 -1
- package/dist/types/core/Runtime.d.ts +2 -0
- package/dist/types/core/Runtime.d.ts.map +1 -1
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts +6 -3
- package/dist/types/core/StoryboardFunctionRegistryFactory.d.ts.map +1 -1
- package/dist/types/core/StoryboardFunctions.d.ts +1 -1
- package/dist/types/core/StoryboardFunctions.d.ts.map +1 -1
- package/dist/types/core/WidgetI18n.d.ts +5 -0
- package/dist/types/core/WidgetI18n.d.ts.map +1 -0
- package/dist/types/i18n/index.d.ts +2 -0
- package/dist/types/i18n/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/internal/checkPermissions.d.ts.map +1 -1
- package/dist/types/internal/evaluate.d.ts.map +1 -1
- package/dist/types/internal/images.d.ts +2 -4
- package/dist/types/internal/images.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/index.bundle.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('history'), require('@babel/runtime/helpers/objectSpread2'), require('@babel/runtime/helpers/objectWithoutProperties'), require('@babel/runtime/helpers/asyncToGenerator'), require('@babel/runtime/helpers/defineProperty'), require('react'), require('lodash'), require('@next-core/brick-utils'), require('@next-core/brick-http'), require('i18next'), require('moment'), require('@next-core/pipes'), require('@next-core/easyops-analytics'), require('js-yaml'), require('antd'), require('@ant-design/icons'), require('react-i18next'), require('@babel/runtime/helpers/esm/extends'), require('@next-core/illustrations'), require('@babel/runtime/helpers/decorate')) :
|
|
3
3
|
typeof define === 'function' && define.amd ? define(['exports', 'history', '@babel/runtime/helpers/objectSpread2', '@babel/runtime/helpers/objectWithoutProperties', '@babel/runtime/helpers/asyncToGenerator', '@babel/runtime/helpers/defineProperty', 'react', 'lodash', '@next-core/brick-utils', '@next-core/brick-http', 'i18next', 'moment', '@next-core/pipes', '@next-core/easyops-analytics', 'js-yaml', 'antd', '@ant-design/icons', 'react-i18next', '@babel/runtime/helpers/esm/extends', '@next-core/illustrations', '@babel/runtime/helpers/decorate'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BrickKit = {}, global.history$1, global._objectSpread, global._objectWithoutProperties, global._asyncToGenerator$4, global._defineProperty$
|
|
5
|
-
})(this, (function (exports, history$1, _objectSpread, _objectWithoutProperties, _asyncToGenerator$4, _defineProperty$
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BrickKit = {}, global.history$1, global._objectSpread, global._objectWithoutProperties, global._asyncToGenerator$4, global._defineProperty$1, global.React, global.lodash, global.brickUtils, global.brickHttp, global.i18next, global.moment, global.pipes, global.easyopsAnalytics, global.yaml, global.antd, global.icons, global.reactI18next, global._extends$1, global.illustrations, global._decorate));
|
|
5
|
+
})(this, (function (exports, history$1, _objectSpread, _objectWithoutProperties, _asyncToGenerator$4, _defineProperty$1, React, lodash, brickUtils, brickHttp, i18next, moment, pipes, easyopsAnalytics, yaml, antd, icons, reactI18next, _extends$1, illustrations, _decorate) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
28
28
|
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
29
29
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator$4);
|
|
30
|
-
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$
|
|
30
|
+
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$1);
|
|
31
31
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
32
32
|
var React__namespace = /*#__PURE__*/_interopNamespace(React);
|
|
33
33
|
var lodash__default = /*#__PURE__*/_interopDefaultLegacy(lodash);
|
|
34
34
|
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
35
35
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
36
36
|
var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml);
|
|
37
|
-
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends$
|
|
37
|
+
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends$1);
|
|
38
38
|
var _decorate__default = /*#__PURE__*/_interopDefaultLegacy(_decorate);
|
|
39
39
|
|
|
40
40
|
class BaseBar {
|
|
@@ -426,7 +426,7 @@
|
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
|
|
429
|
-
function _defineProperty
|
|
429
|
+
function _defineProperty(obj, key, value) {
|
|
430
430
|
if (key in obj) {
|
|
431
431
|
Object.defineProperty(obj, key, {
|
|
432
432
|
value: value,
|
|
@@ -441,7 +441,7 @@
|
|
|
441
441
|
return obj;
|
|
442
442
|
}
|
|
443
443
|
|
|
444
|
-
function ownKeys
|
|
444
|
+
function ownKeys(object, enumerableOnly) {
|
|
445
445
|
var keys = Object.keys(object);
|
|
446
446
|
|
|
447
447
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -455,18 +455,18 @@
|
|
|
455
455
|
return keys;
|
|
456
456
|
}
|
|
457
457
|
|
|
458
|
-
function _objectSpread2
|
|
458
|
+
function _objectSpread2(target) {
|
|
459
459
|
for (var i = 1; i < arguments.length; i++) {
|
|
460
460
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
461
461
|
|
|
462
462
|
if (i % 2) {
|
|
463
|
-
ownKeys
|
|
464
|
-
_defineProperty
|
|
463
|
+
ownKeys(Object(source), true).forEach(function (key) {
|
|
464
|
+
_defineProperty(target, key, source[key]);
|
|
465
465
|
});
|
|
466
466
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
467
467
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
468
468
|
} else {
|
|
469
|
-
ownKeys
|
|
469
|
+
ownKeys(Object(source)).forEach(function (key) {
|
|
470
470
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
471
471
|
});
|
|
472
472
|
}
|
|
@@ -484,7 +484,7 @@
|
|
|
484
484
|
var _ref = _asyncToGenerator$3(function* (objectId, instanceId, params, options) {
|
|
485
485
|
return (
|
|
486
486
|
/**! @contract easyops.api.cmdb.instance.GetDetail */
|
|
487
|
-
(yield brickHttp.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(objectId, "/instance/").concat(instanceId), _objectSpread2
|
|
487
|
+
(yield brickHttp.http.get("api/gateway/cmdb.instance.GetDetail/object/".concat(objectId, "/instance/").concat(instanceId), _objectSpread2(_objectSpread2({}, options), {}, {
|
|
488
488
|
params
|
|
489
489
|
}))).data
|
|
490
490
|
);
|
|
@@ -685,12 +685,12 @@
|
|
|
685
685
|
};
|
|
686
686
|
}
|
|
687
687
|
|
|
688
|
-
function imagesFactory(
|
|
688
|
+
function imagesFactory(appId, isBuildPush) {
|
|
689
689
|
return {
|
|
690
690
|
get(name) {
|
|
691
691
|
var _window$PUBLIC_ROOT;
|
|
692
692
|
|
|
693
|
-
return
|
|
693
|
+
return isBuildPush ? "api/gateway/object_store.object_store.GetObject/api/v1/objectStore/bucket/next-builder/object/".concat(name) : "".concat((_window$PUBLIC_ROOT = window.PUBLIC_ROOT) !== null && _window$PUBLIC_ROOT !== void 0 ? _window$PUBLIC_ROOT : "", "micro-apps/").concat(appId, "/images/").concat(name);
|
|
694
694
|
}
|
|
695
695
|
|
|
696
696
|
};
|
|
@@ -1260,6 +1260,54 @@
|
|
|
1260
1260
|
};
|
|
1261
1261
|
}();
|
|
1262
1262
|
|
|
1263
|
+
var auth = {};
|
|
1264
|
+
/** @internal */
|
|
1265
|
+
|
|
1266
|
+
function authenticate(newAuth) {
|
|
1267
|
+
Object.assign(auth, {
|
|
1268
|
+
org: newAuth.org,
|
|
1269
|
+
username: newAuth.username,
|
|
1270
|
+
userInstanceId: newAuth.userInstanceId,
|
|
1271
|
+
loginFrom: newAuth.loginFrom,
|
|
1272
|
+
accessRule: newAuth.accessRule,
|
|
1273
|
+
isAdmin: newAuth.isAdmin
|
|
1274
|
+
}); // re-init analytics to set user_id
|
|
1275
|
+
|
|
1276
|
+
if (easyopsAnalytics.userAnalytics.initialized) {
|
|
1277
|
+
easyopsAnalytics.userAnalytics.setUserId(newAuth.userInstanceId);
|
|
1278
|
+
}
|
|
1279
|
+
}
|
|
1280
|
+
/**
|
|
1281
|
+
* 获取当前登录认证信息。
|
|
1282
|
+
*
|
|
1283
|
+
* @returns 当前登录认证信息。
|
|
1284
|
+
*/
|
|
1285
|
+
|
|
1286
|
+
function getAuth() {
|
|
1287
|
+
return _objectSpread__default["default"]({}, auth);
|
|
1288
|
+
}
|
|
1289
|
+
/** @internal */
|
|
1290
|
+
|
|
1291
|
+
function logout() {
|
|
1292
|
+
auth.org = undefined;
|
|
1293
|
+
auth.username = undefined;
|
|
1294
|
+
auth.userInstanceId = undefined;
|
|
1295
|
+
auth.accessRule = undefined;
|
|
1296
|
+
auth.isAdmin = undefined;
|
|
1297
|
+
resetPermissionPreChecks(); // re-init analytics to clear user_id
|
|
1298
|
+
|
|
1299
|
+
easyopsAnalytics.userAnalytics.setUserId();
|
|
1300
|
+
}
|
|
1301
|
+
/**
|
|
1302
|
+
* 查看当前是否已登录。
|
|
1303
|
+
*
|
|
1304
|
+
* @returns 当前是否已登录。
|
|
1305
|
+
*/
|
|
1306
|
+
|
|
1307
|
+
function isLoggedIn() {
|
|
1308
|
+
return auth.username !== undefined;
|
|
1309
|
+
}
|
|
1310
|
+
|
|
1263
1311
|
var permissionMap = new Map();
|
|
1264
1312
|
function preCheckPermissions(_x) {
|
|
1265
1313
|
return _preCheckPermissions.apply(this, arguments);
|
|
@@ -1316,6 +1364,10 @@
|
|
|
1316
1364
|
}
|
|
1317
1365
|
|
|
1318
1366
|
function checkPermissions() {
|
|
1367
|
+
if (getAuth().isAdmin) {
|
|
1368
|
+
return true;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1319
1371
|
for (var _len = arguments.length, actions = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
1320
1372
|
actions[_key] = arguments[_key];
|
|
1321
1373
|
}
|
|
@@ -1389,11 +1441,55 @@
|
|
|
1389
1441
|
}
|
|
1390
1442
|
}
|
|
1391
1443
|
|
|
1444
|
+
var locale$7 = {
|
|
1445
|
+
[K.REQUEST_FAILED]: "Request Failed",
|
|
1446
|
+
[K.MODAL_OK]: "Ok",
|
|
1447
|
+
[K.MODAL_CANCEL]: "Cancel",
|
|
1448
|
+
[K.SOMETHING_WENT_WRONG]: "Something went wrong!",
|
|
1449
|
+
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1450
|
+
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1451
|
+
};
|
|
1452
|
+
var en = locale$7;
|
|
1453
|
+
|
|
1454
|
+
var locale$6 = {
|
|
1455
|
+
[K.REQUEST_FAILED]: "请求失败",
|
|
1456
|
+
[K.MODAL_OK]: "确认",
|
|
1457
|
+
[K.MODAL_CANCEL]: "取消",
|
|
1458
|
+
[K.SOMETHING_WENT_WRONG]: "出现了一些问题!",
|
|
1459
|
+
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1460
|
+
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1461
|
+
};
|
|
1462
|
+
var zh = locale$6;
|
|
1463
|
+
|
|
1464
|
+
/** @internal */
|
|
1465
|
+
|
|
1466
|
+
var initI18n = () => {
|
|
1467
|
+
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT, en);
|
|
1468
|
+
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT, zh);
|
|
1469
|
+
};
|
|
1470
|
+
/** @internal */
|
|
1471
|
+
|
|
1472
|
+
function getI18nNamespace(type, id) {
|
|
1473
|
+
return "$".concat(type, "-").concat(id);
|
|
1474
|
+
}
|
|
1475
|
+
|
|
1476
|
+
function registerWidgetI18n(widgetId, i18n) {
|
|
1477
|
+
var ns = getI18nNamespace("widget", widgetId);
|
|
1478
|
+
Object.entries(i18n).forEach(_ref => {
|
|
1479
|
+
var [lang, resources] = _ref;
|
|
1480
|
+
i18next__default["default"].addResourceBundle(lang, ns, resources);
|
|
1481
|
+
});
|
|
1482
|
+
}
|
|
1483
|
+
function widgetI18nFactory(widgetId) {
|
|
1484
|
+
return i18next.getFixedT(null, getI18nNamespace("widget", widgetId));
|
|
1485
|
+
}
|
|
1486
|
+
|
|
1392
1487
|
/** @internal */
|
|
1393
1488
|
|
|
1394
1489
|
/** @internal */
|
|
1395
1490
|
function StoryboardFunctionRegistryFactory() {
|
|
1396
1491
|
var {
|
|
1492
|
+
widgetId,
|
|
1397
1493
|
collectCoverage
|
|
1398
1494
|
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1399
1495
|
var registeredFunctions = new Map(); // Use `Proxy` with a frozen target, to make a readonly function registry.
|
|
@@ -1405,7 +1501,30 @@
|
|
|
1405
1501
|
|
|
1406
1502
|
});
|
|
1407
1503
|
|
|
1408
|
-
|
|
1504
|
+
var builtinSupply = _objectSpread__default["default"]({
|
|
1505
|
+
// Functions can call other functions.
|
|
1506
|
+
FN: storyboardFunctions
|
|
1507
|
+
}, collectCoverage ? {
|
|
1508
|
+
// Fake builtin methods for tests.
|
|
1509
|
+
I18N: lodash.identity,
|
|
1510
|
+
I18N_TEXT: fakeI18nText,
|
|
1511
|
+
IMG: fakeImageFactory()
|
|
1512
|
+
} : widgetId ? {
|
|
1513
|
+
I18N: widgetI18nFactory(widgetId),
|
|
1514
|
+
I18N_TEXT: i18nText,
|
|
1515
|
+
IMG: widgetImagesFactory(widgetId)
|
|
1516
|
+
} : {
|
|
1517
|
+
I18N_TEXT: i18nText
|
|
1518
|
+
});
|
|
1519
|
+
|
|
1520
|
+
function registerStoryboardFunctions(functions, app) {
|
|
1521
|
+
if (app) {
|
|
1522
|
+
Object.assign(builtinSupply, {
|
|
1523
|
+
I18N: i18next.getFixedT(null, getI18nNamespace("app", app.id)),
|
|
1524
|
+
IMG: imagesFactory(app.id, app.isBuildPush)
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
|
|
1409
1528
|
registeredFunctions.clear();
|
|
1410
1529
|
|
|
1411
1530
|
if (Array.isArray(functions)) {
|
|
@@ -1445,10 +1564,7 @@
|
|
|
1445
1564
|
rules: {
|
|
1446
1565
|
noVar: true
|
|
1447
1566
|
},
|
|
1448
|
-
globalVariables: supply(precooked.attemptToVisitGlobals,
|
|
1449
|
-
// Functions can call other functions.
|
|
1450
|
-
FN: storyboardFunctions
|
|
1451
|
-
}),
|
|
1567
|
+
globalVariables: supply(precooked.attemptToVisitGlobals, builtinSupply),
|
|
1452
1568
|
hooks: collector && {
|
|
1453
1569
|
beforeEvaluate: collector.beforeEvaluate,
|
|
1454
1570
|
beforeCall: collector.beforeCall,
|
|
@@ -1473,6 +1589,19 @@
|
|
|
1473
1589
|
};
|
|
1474
1590
|
}
|
|
1475
1591
|
|
|
1592
|
+
function fakeI18nText(data) {
|
|
1593
|
+
return data === null || data === void 0 ? void 0 : data.en;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
function fakeImageFactory() {
|
|
1597
|
+
return {
|
|
1598
|
+
get(name) {
|
|
1599
|
+
return "mock/images/".concat(name);
|
|
1600
|
+
}
|
|
1601
|
+
|
|
1602
|
+
};
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1476
1605
|
var {
|
|
1477
1606
|
storyboardFunctions,
|
|
1478
1607
|
registerStoryboardFunctions
|
|
@@ -1494,7 +1623,9 @@
|
|
|
1494
1623
|
var {
|
|
1495
1624
|
storyboardFunctions,
|
|
1496
1625
|
registerStoryboardFunctions
|
|
1497
|
-
} = StoryboardFunctionRegistryFactory(
|
|
1626
|
+
} = StoryboardFunctionRegistryFactory({
|
|
1627
|
+
widgetId
|
|
1628
|
+
});
|
|
1498
1629
|
widgetFunctionRegistry.set(widgetId, storyboardFunctions);
|
|
1499
1630
|
registerStoryboardFunctions(functions);
|
|
1500
1631
|
}
|
|
@@ -1665,7 +1796,7 @@
|
|
|
1665
1796
|
}
|
|
1666
1797
|
|
|
1667
1798
|
if (attemptToVisitGlobals.has("IMG")) {
|
|
1668
|
-
globalVariables.IMG = imagesFactory(app);
|
|
1799
|
+
globalVariables.IMG = imagesFactory(app.id, app.isBuildPush);
|
|
1669
1800
|
}
|
|
1670
1801
|
|
|
1671
1802
|
if (attemptToVisitGlobals.has("__WIDGET_IMG__")) {
|
|
@@ -1673,7 +1804,11 @@
|
|
|
1673
1804
|
}
|
|
1674
1805
|
|
|
1675
1806
|
if (attemptToVisitGlobals.has("I18N")) {
|
|
1676
|
-
globalVariables.I18N = i18next__default["default"].getFixedT(null, "
|
|
1807
|
+
globalVariables.I18N = i18next__default["default"].getFixedT(null, getI18nNamespace("app", app.id));
|
|
1808
|
+
}
|
|
1809
|
+
|
|
1810
|
+
if (attemptToVisitGlobals.has("__WIDGET_I18N__")) {
|
|
1811
|
+
globalVariables.__WIDGET_I18N__ = widgetI18nFactory;
|
|
1677
1812
|
}
|
|
1678
1813
|
|
|
1679
1814
|
if (attemptToVisitGlobals.has("I18N_TEXT")) {
|
|
@@ -2465,6 +2600,8 @@
|
|
|
2465
2600
|
|
|
2466
2601
|
_defineProperty__default["default"](this, "registerWidgetFunctions", registerWidgetFunctions);
|
|
2467
2602
|
|
|
2603
|
+
_defineProperty__default["default"](this, "registerWidgetI18n", registerWidgetI18n);
|
|
2604
|
+
|
|
2468
2605
|
_defineProperty__default["default"](this, "getBasePath", getBasePath);
|
|
2469
2606
|
|
|
2470
2607
|
_defineProperty__default["default"](this, "getCurrentTheme", getCurrentTheme);
|
|
@@ -5743,55 +5880,6 @@
|
|
|
5743
5880
|
};
|
|
5744
5881
|
}
|
|
5745
5882
|
|
|
5746
|
-
function _defineProperty(obj, key, value) {
|
|
5747
|
-
if (key in obj) {
|
|
5748
|
-
Object.defineProperty(obj, key, {
|
|
5749
|
-
value: value,
|
|
5750
|
-
enumerable: true,
|
|
5751
|
-
configurable: true,
|
|
5752
|
-
writable: true
|
|
5753
|
-
});
|
|
5754
|
-
} else {
|
|
5755
|
-
obj[key] = value;
|
|
5756
|
-
}
|
|
5757
|
-
|
|
5758
|
-
return obj;
|
|
5759
|
-
}
|
|
5760
|
-
|
|
5761
|
-
function ownKeys(object, enumerableOnly) {
|
|
5762
|
-
var keys = Object.keys(object);
|
|
5763
|
-
|
|
5764
|
-
if (Object.getOwnPropertySymbols) {
|
|
5765
|
-
var symbols = Object.getOwnPropertySymbols(object);
|
|
5766
|
-
if (enumerableOnly) symbols = symbols.filter(function (sym) {
|
|
5767
|
-
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
5768
|
-
});
|
|
5769
|
-
keys.push.apply(keys, symbols);
|
|
5770
|
-
}
|
|
5771
|
-
|
|
5772
|
-
return keys;
|
|
5773
|
-
}
|
|
5774
|
-
|
|
5775
|
-
function _objectSpread2(target) {
|
|
5776
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
5777
|
-
var source = arguments[i] != null ? arguments[i] : {};
|
|
5778
|
-
|
|
5779
|
-
if (i % 2) {
|
|
5780
|
-
ownKeys(Object(source), true).forEach(function (key) {
|
|
5781
|
-
_defineProperty(target, key, source[key]);
|
|
5782
|
-
});
|
|
5783
|
-
} else if (Object.getOwnPropertyDescriptors) {
|
|
5784
|
-
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5785
|
-
} else {
|
|
5786
|
-
ownKeys(Object(source)).forEach(function (key) {
|
|
5787
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5788
|
-
});
|
|
5789
|
-
}
|
|
5790
|
-
}
|
|
5791
|
-
|
|
5792
|
-
return target;
|
|
5793
|
-
}
|
|
5794
|
-
|
|
5795
5883
|
var checkLogin = /*#__PURE__*/function () {
|
|
5796
5884
|
var _ref2 = _asyncToGenerator$1(function* (options) {
|
|
5797
5885
|
return (yield brickHttp.http.get("api/auth/login", options)).data;
|
|
@@ -5802,30 +5890,6 @@
|
|
|
5802
5890
|
};
|
|
5803
5891
|
}();
|
|
5804
5892
|
|
|
5805
|
-
var bootstrap = /*#__PURE__*/function () {
|
|
5806
|
-
var _ref3 = _asyncToGenerator$1(function* (params, options) {
|
|
5807
|
-
return (yield brickHttp.http.get("api/auth/bootstrap", _objectSpread2(_objectSpread2({}, options), {}, {
|
|
5808
|
-
params
|
|
5809
|
-
}))).data;
|
|
5810
|
-
});
|
|
5811
|
-
|
|
5812
|
-
return function bootstrap(_x4, _x5) {
|
|
5813
|
-
return _ref3.apply(this, arguments);
|
|
5814
|
-
};
|
|
5815
|
-
}();
|
|
5816
|
-
|
|
5817
|
-
var getAppStoryboard = /*#__PURE__*/function () {
|
|
5818
|
-
var _ref4 = _asyncToGenerator$1(function* (appId, params, options) {
|
|
5819
|
-
return (yield brickHttp.http.get("api/auth/bootstrap/".concat(appId), _objectSpread2(_objectSpread2({}, options), {}, {
|
|
5820
|
-
params
|
|
5821
|
-
}))).data;
|
|
5822
|
-
});
|
|
5823
|
-
|
|
5824
|
-
return function getAppStoryboard(_x6, _x7, _x8) {
|
|
5825
|
-
return _ref4.apply(this, arguments);
|
|
5826
|
-
};
|
|
5827
|
-
}();
|
|
5828
|
-
|
|
5829
5893
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
5830
5894
|
try {
|
|
5831
5895
|
var info = gen[key](arg);
|
|
@@ -5880,52 +5944,6 @@
|
|
|
5880
5944
|
};
|
|
5881
5945
|
}();
|
|
5882
5946
|
|
|
5883
|
-
var auth = {};
|
|
5884
|
-
/** @internal */
|
|
5885
|
-
|
|
5886
|
-
function authenticate(newAuth) {
|
|
5887
|
-
Object.assign(auth, {
|
|
5888
|
-
org: newAuth.org,
|
|
5889
|
-
username: newAuth.username,
|
|
5890
|
-
userInstanceId: newAuth.userInstanceId,
|
|
5891
|
-
loginFrom: newAuth.loginFrom,
|
|
5892
|
-
accessRule: newAuth.accessRule
|
|
5893
|
-
}); // re-init analytics to set user_id
|
|
5894
|
-
|
|
5895
|
-
if (easyopsAnalytics.userAnalytics.initialized) {
|
|
5896
|
-
easyopsAnalytics.userAnalytics.setUserId(newAuth.userInstanceId);
|
|
5897
|
-
}
|
|
5898
|
-
}
|
|
5899
|
-
/**
|
|
5900
|
-
* 获取当前登录认证信息。
|
|
5901
|
-
*
|
|
5902
|
-
* @returns 当前登录认证信息。
|
|
5903
|
-
*/
|
|
5904
|
-
|
|
5905
|
-
function getAuth() {
|
|
5906
|
-
return _objectSpread__default["default"]({}, auth);
|
|
5907
|
-
}
|
|
5908
|
-
/** @internal */
|
|
5909
|
-
|
|
5910
|
-
function logout() {
|
|
5911
|
-
auth.org = undefined;
|
|
5912
|
-
auth.username = undefined;
|
|
5913
|
-
auth.userInstanceId = undefined;
|
|
5914
|
-
auth.accessRule = undefined;
|
|
5915
|
-
resetPermissionPreChecks(); // re-init analytics to clear user_id
|
|
5916
|
-
|
|
5917
|
-
easyopsAnalytics.userAnalytics.setUserId();
|
|
5918
|
-
}
|
|
5919
|
-
/**
|
|
5920
|
-
* 查看当前是否已登录。
|
|
5921
|
-
*
|
|
5922
|
-
* @returns 当前是否已登录。
|
|
5923
|
-
*/
|
|
5924
|
-
|
|
5925
|
-
function isLoggedIn() {
|
|
5926
|
-
return auth.username !== undefined;
|
|
5927
|
-
}
|
|
5928
|
-
|
|
5929
5947
|
/**
|
|
5930
5948
|
* Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
|
|
5931
5949
|
*
|
|
@@ -6251,17 +6269,12 @@
|
|
|
6251
6269
|
var _this3 = this;
|
|
6252
6270
|
|
|
6253
6271
|
return _asyncToGenerator__default["default"](function* () {
|
|
6254
|
-
|
|
6255
|
-
var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : localStorage.getItem("__$$use-bootstrap-v2-provider$$__") ? BootstrapV2Api_bootstrapV2(_objectSpread__default["default"]({
|
|
6272
|
+
var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : BootstrapV2Api_bootstrapV2(_objectSpread__default["default"]({
|
|
6256
6273
|
appFields: "defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status",
|
|
6257
6274
|
ignoreTemplateFields: "templates",
|
|
6258
6275
|
ignoreBrickFields: "bricks,processors,providers,editors"
|
|
6259
6276
|
}, params), {
|
|
6260
6277
|
interceptorParams
|
|
6261
|
-
}) : bootstrap(_objectSpread__default["default"]({
|
|
6262
|
-
brief: true
|
|
6263
|
-
}, params), {
|
|
6264
|
-
interceptorParams
|
|
6265
6278
|
});
|
|
6266
6279
|
|
|
6267
6280
|
var bootstrapResponse = _objectSpread__default["default"]({
|
|
@@ -6308,12 +6321,11 @@
|
|
|
6308
6321
|
$$fulfilled: true
|
|
6309
6322
|
});
|
|
6310
6323
|
} else {
|
|
6311
|
-
/* istanbul ignore next */
|
|
6312
6324
|
var {
|
|
6313
6325
|
routes,
|
|
6314
6326
|
meta,
|
|
6315
6327
|
app
|
|
6316
|
-
} = yield
|
|
6328
|
+
} = yield BootstrapV2Api_getAppStoryboardV2(storyboard.app.id, {});
|
|
6317
6329
|
Object.assign(storyboard, {
|
|
6318
6330
|
routes,
|
|
6319
6331
|
meta,
|
|
@@ -6326,7 +6338,7 @@
|
|
|
6326
6338
|
|
|
6327
6339
|
if ((_storyboard$meta = storyboard.meta) !== null && _storyboard$meta !== void 0 && _storyboard$meta.i18n) {
|
|
6328
6340
|
// Prefix to avoid conflict between brick package's i18n namespace.
|
|
6329
|
-
var i18nNamespace = "
|
|
6341
|
+
var i18nNamespace = getI18nNamespace("app", storyboard.app.id); // Support any language in `meta.i18n`.
|
|
6330
6342
|
|
|
6331
6343
|
Object.entries(storyboard.meta.i18n).forEach(_ref => {
|
|
6332
6344
|
var [lang, resources] = _ref;
|
|
@@ -7901,7 +7913,8 @@
|
|
|
7901
7913
|
username: auth.username,
|
|
7902
7914
|
userInstanceId: auth.userInstanceId,
|
|
7903
7915
|
loginFrom: auth.loginFrom,
|
|
7904
|
-
accessRule: auth.accessRule
|
|
7916
|
+
accessRule: auth.accessRule,
|
|
7917
|
+
isAdmin: auth.isAdmin
|
|
7905
7918
|
}, getRuntimeMisc()),
|
|
7906
7919
|
flags: this.kernel.getFeatureFlags(),
|
|
7907
7920
|
segues: this.segues,
|
|
@@ -8311,7 +8324,7 @@
|
|
|
8311
8324
|
|
|
8312
8325
|
preCheckPermissions(container, context) {
|
|
8313
8326
|
return _asyncToGenerator__default["default"](function* () {
|
|
8314
|
-
if (isLoggedIn() && container.permissionsPreCheck && Array.isArray(container.permissionsPreCheck)) {
|
|
8327
|
+
if (isLoggedIn() && !getAuth().isAdmin && container.permissionsPreCheck && Array.isArray(container.permissionsPreCheck)) {
|
|
8315
8328
|
var usedActions = computeRealValue(container.permissionsPreCheck, context, true);
|
|
8316
8329
|
yield validatePermissions(usedActions);
|
|
8317
8330
|
}
|
|
@@ -8976,12 +8989,13 @@
|
|
|
8976
8989
|
} else {
|
|
8977
8990
|
var actualArgs = args ? ref ? args // `args` are already computed for `defineResolves`
|
|
8978
8991
|
: context ? computeRealValue(args, context, true) : args : providerBrick.args || [];
|
|
8992
|
+
promise = _asyncToGenerator__default["default"](function* () {
|
|
8993
|
+
if (useProvider) {
|
|
8994
|
+
actualArgs = yield getArgsOfCustomApi(useProvider, actualArgs);
|
|
8995
|
+
}
|
|
8979
8996
|
|
|
8980
|
-
|
|
8981
|
-
|
|
8982
|
-
}
|
|
8983
|
-
|
|
8984
|
-
promise = providerBrick[method](...actualArgs);
|
|
8997
|
+
return providerBrick[method](...actualArgs);
|
|
8998
|
+
})();
|
|
8985
8999
|
|
|
8986
9000
|
_this2.cache.set(cacheKey, promise);
|
|
8987
9001
|
}
|
|
@@ -9049,7 +9063,7 @@
|
|
|
9049
9063
|
|
|
9050
9064
|
var _loop = function (providerBrick, interval) {
|
|
9051
9065
|
var request = /*#__PURE__*/function () {
|
|
9052
|
-
var
|
|
9066
|
+
var _ref2 = _asyncToGenerator__default["default"](function* () {
|
|
9053
9067
|
yield providerBrick.$refresh({
|
|
9054
9068
|
ignoreErrors: interval.ignoreErrors,
|
|
9055
9069
|
throwErrors: true,
|
|
@@ -9063,7 +9077,7 @@
|
|
|
9063
9077
|
});
|
|
9064
9078
|
|
|
9065
9079
|
return function request() {
|
|
9066
|
-
return
|
|
9080
|
+
return _ref2.apply(this, arguments);
|
|
9067
9081
|
};
|
|
9068
9082
|
}();
|
|
9069
9083
|
|
|
@@ -9294,7 +9308,7 @@
|
|
|
9294
9308
|
|
|
9295
9309
|
brickUtils.restoreDynamicTemplates(storyboard); // 预加载权限信息
|
|
9296
9310
|
|
|
9297
|
-
if (isLoggedIn()) {
|
|
9311
|
+
if (isLoggedIn() && !getAuth().isAdmin) {
|
|
9298
9312
|
yield preCheckPermissions(storyboard);
|
|
9299
9313
|
} // 如果找到匹配的 storyboard,那么根据路由匹配得到的 sub-storyboard 加载它的依赖库。
|
|
9300
9314
|
|
|
@@ -9305,7 +9319,7 @@
|
|
|
9305
9319
|
|
|
9306
9320
|
_this3.kernel.registerCustomTemplatesInStoryboard(storyboard);
|
|
9307
9321
|
|
|
9308
|
-
registerStoryboardFunctions((_storyboard$meta = storyboard.meta) === null || _storyboard$meta === void 0 ? void 0 : _storyboard$meta.functions);
|
|
9322
|
+
registerStoryboardFunctions((_storyboard$meta = storyboard.meta) === null || _storyboard$meta === void 0 ? void 0 : _storyboard$meta.functions, storyboard.app);
|
|
9309
9323
|
}
|
|
9310
9324
|
|
|
9311
9325
|
var {
|
|
@@ -9631,33 +9645,6 @@
|
|
|
9631
9645
|
return runtime;
|
|
9632
9646
|
}
|
|
9633
9647
|
|
|
9634
|
-
var locale$7 = {
|
|
9635
|
-
[K.REQUEST_FAILED]: "Request Failed",
|
|
9636
|
-
[K.MODAL_OK]: "Ok",
|
|
9637
|
-
[K.MODAL_CANCEL]: "Cancel",
|
|
9638
|
-
[K.SOMETHING_WENT_WRONG]: "Something went wrong!",
|
|
9639
|
-
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
9640
|
-
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
9641
|
-
};
|
|
9642
|
-
var en = locale$7;
|
|
9643
|
-
|
|
9644
|
-
var locale$6 = {
|
|
9645
|
-
[K.REQUEST_FAILED]: "请求失败",
|
|
9646
|
-
[K.MODAL_OK]: "确认",
|
|
9647
|
-
[K.MODAL_CANCEL]: "取消",
|
|
9648
|
-
[K.SOMETHING_WENT_WRONG]: "出现了一些问题!",
|
|
9649
|
-
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
9650
|
-
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
9651
|
-
};
|
|
9652
|
-
var zh = locale$6;
|
|
9653
|
-
|
|
9654
|
-
/** @internal */
|
|
9655
|
-
|
|
9656
|
-
var initI18n = () => {
|
|
9657
|
-
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT, en);
|
|
9658
|
-
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT, zh);
|
|
9659
|
-
};
|
|
9660
|
-
|
|
9661
9648
|
// Ref https://reactjs.org/docs/error-boundaries.html
|
|
9662
9649
|
class LegacyErrorBoundary extends React__default["default"].Component {
|
|
9663
9650
|
constructor(props) {
|
|
@@ -10825,92 +10812,153 @@
|
|
|
10825
10812
|
};
|
|
10826
10813
|
var defaultLocale = localeValues;
|
|
10827
10814
|
|
|
10828
|
-
function _extends$1() { _extends$1 = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$1.apply(this, arguments); }
|
|
10829
|
-
|
|
10830
|
-
var _ref$1 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
10831
|
-
fill: "none"
|
|
10832
|
-
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
10833
|
-
d: "M61.108 51.8H15.892a2.8 2.8 0 0 0-1.941.782L5.6 60.615V74.2a5.6 5.6 0 0 0 5.6 5.6h54.6a5.6 5.6 0 0 0 5.6-5.6V60.615l-8.35-8.033a2.8 2.8 0 0 0-1.942-.782z",
|
|
10834
|
-
fill: "#C4C4C4"
|
|
10835
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10836
|
-
d: "M16.8 19.6h43.4a2.8 2.8 0 0 1 2.8 2.8v44.8a2.8 2.8 0 0 1-2.8 2.8H16.8a2.8 2.8 0 0 1-2.8-2.8V22.4a2.8 2.8 0 0 1 2.8-2.8z",
|
|
10837
|
-
fill: "#F7F7F7"
|
|
10838
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10839
|
-
d: "M23.8 26.6h29.4a2.8 2.8 0 0 1 2.8 2.8v9.8a2.8 2.8 0 0 1-2.8 2.8H23.8a2.8 2.8 0 0 1-2.8-2.8v-9.8a2.8 2.8 0 0 1 2.8-2.8zm0 26.6h22.4a1.4 1.4 0 0 1 0 2.8H23.8a1.4 1.4 0 0 1 0-2.8zm0-7h29.4a1.4 1.4 0 0 1 0 2.8H23.8a1.4 1.4 0 0 1 0-2.8z",
|
|
10840
|
-
fill: "#E5E5E5"
|
|
10841
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10842
|
-
d: "M82.6 42a.7.7 0 0 1 .7.7v1.399l1.4.001a.7.7 0 0 1 0 1.4l-1.4-.001V46.9a.7.7 0 0 1-1.4 0v-1.401l-1.4.001a.7.7 0 0 1 0-1.4l1.4-.001V42.7a.7.7 0 0 1 .7-.7z",
|
|
10843
|
-
fill: "#CDCDCD"
|
|
10844
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10845
|
-
d: "M2.1 30.8c.29 0 .525.235.525.525l-.001.874.876.001a.7.7 0 0 1 0 1.4h-.876l.001.875a.525.525 0 1 1-1.05 0l-.001-.875H.7a.7.7 0 0 1 0-1.4l.874-.001.001-.874c0-.29.235-.525.525-.525zm6.3 49l-.17-.005A2.8 2.8 0 0 1 5.6 77V60.2h12.393l.175-.006c3.802-.04 7.95 5.943 19.61 6.19l.022-.002.022.002c10.856.218 15.009-5.902 19.558-6.175l.227-.009H71.4V77a2.8 2.8 0 0 1-2.63 2.795l-.17.005H8.4z",
|
|
10846
|
-
fill: "#E5E5E5"
|
|
10847
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10848
|
-
d: "M21 3.356S24.518 2.509 25.516 0c1.438 2.057 2.18 2.947 3.884 3.338-2.321.692-3.33 1.468-4.123 3.662-.912-2.584-1.741-2.919-4.277-3.644",
|
|
10849
|
-
fill: "#F5F5F5"
|
|
10850
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10851
|
-
d: "M63 10.125S72.382 7.923 75.044 1.4c3.834 5.35 5.81 7.663 10.356 8.68-6.19 1.797-8.878 3.816-10.995 9.52-2.43-6.72-4.643-7.59-11.405-9.475",
|
|
10852
|
-
fill: "#E5E5E5"
|
|
10853
|
-
}));
|
|
10854
|
-
|
|
10855
|
-
function SvgEmptyGreyImage(props) {
|
|
10856
|
-
return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
|
|
10857
|
-
width: 86,
|
|
10858
|
-
height: 80,
|
|
10859
|
-
viewBox: "0 0 86 80",
|
|
10860
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10861
|
-
}, props), _ref$1);
|
|
10862
|
-
}
|
|
10863
|
-
|
|
10864
10815
|
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
10865
10816
|
|
|
10866
|
-
var _ref = /*#__PURE__*/React__namespace.createElement("
|
|
10867
|
-
|
|
10817
|
+
var _ref = /*#__PURE__*/React__namespace.createElement("defs", null, /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
10818
|
+
x1: "5.718%",
|
|
10819
|
+
y1: "4.311%",
|
|
10820
|
+
x2: "83.05%",
|
|
10821
|
+
y2: "88.915%",
|
|
10822
|
+
id: "empty-image_svg__a"
|
|
10823
|
+
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10824
|
+
stopColor: "#D4D8E4",
|
|
10825
|
+
offset: "0%"
|
|
10826
|
+
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10827
|
+
stopColor: "#A9B0C4",
|
|
10828
|
+
offset: "100%"
|
|
10829
|
+
})), /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
10830
|
+
x1: "0%",
|
|
10831
|
+
y1: "11.08%",
|
|
10832
|
+
x2: "80.548%",
|
|
10833
|
+
y2: "107.704%",
|
|
10834
|
+
id: "empty-image_svg__d"
|
|
10835
|
+
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10836
|
+
stopColor: "#C2C7DA",
|
|
10837
|
+
offset: "0%"
|
|
10838
|
+
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10839
|
+
stopColor: "#8F96B3",
|
|
10840
|
+
offset: "100%"
|
|
10841
|
+
})), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10842
|
+
d: "M34 36h8a4 4 0 0 1 4 4v8a4 4 0 0 1-4 4h-8a4 4 0 0 1-4-4v-8a4 4 0 0 1 4-4z",
|
|
10843
|
+
id: "empty-image_svg__c"
|
|
10844
|
+
}), /*#__PURE__*/React__namespace.createElement("filter", {
|
|
10845
|
+
x: "-37.5%",
|
|
10846
|
+
y: "-31.3%",
|
|
10847
|
+
width: "187.5%",
|
|
10848
|
+
height: "187.5%",
|
|
10849
|
+
filterUnits: "objectBoundingBox",
|
|
10850
|
+
id: "empty-image_svg__b"
|
|
10851
|
+
}, /*#__PURE__*/React__namespace.createElement("feOffset", {
|
|
10852
|
+
dx: 1,
|
|
10853
|
+
dy: 2,
|
|
10854
|
+
in: "SourceAlpha",
|
|
10855
|
+
result: "shadowOffsetOuter1"
|
|
10856
|
+
}), /*#__PURE__*/React__namespace.createElement("feGaussianBlur", {
|
|
10857
|
+
stdDeviation: 2,
|
|
10858
|
+
in: "shadowOffsetOuter1",
|
|
10859
|
+
result: "shadowBlurOuter1"
|
|
10860
|
+
}), /*#__PURE__*/React__namespace.createElement("feComposite", {
|
|
10861
|
+
in: "shadowBlurOuter1",
|
|
10862
|
+
in2: "SourceAlpha",
|
|
10863
|
+
operator: "out",
|
|
10864
|
+
result: "shadowBlurOuter1"
|
|
10865
|
+
}), /*#__PURE__*/React__namespace.createElement("feColorMatrix", {
|
|
10866
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.22 0",
|
|
10867
|
+
in: "shadowBlurOuter1"
|
|
10868
|
+
})), /*#__PURE__*/React__namespace.createElement("linearGradient", {
|
|
10869
|
+
x1: "41.823%",
|
|
10870
|
+
y1: "24.795%",
|
|
10871
|
+
x2: "8.813%",
|
|
10872
|
+
y2: "86.427%",
|
|
10873
|
+
id: "empty-image_svg__g"
|
|
10874
|
+
}, /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10875
|
+
stopColor: "#CCD0DD",
|
|
10876
|
+
offset: "0%"
|
|
10877
|
+
}), /*#__PURE__*/React__namespace.createElement("stop", {
|
|
10878
|
+
stopColor: "#9DA3B9",
|
|
10879
|
+
offset: "100%"
|
|
10880
|
+
})), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10881
|
+
d: "M59 19a4 4 0 0 1 4 4v7.314L51.686 19H59z",
|
|
10882
|
+
id: "empty-image_svg__f"
|
|
10883
|
+
}), /*#__PURE__*/React__namespace.createElement("filter", {
|
|
10884
|
+
x: "-61.9%",
|
|
10885
|
+
y: "-79.5%",
|
|
10886
|
+
width: "223.7%",
|
|
10887
|
+
height: "223.7%",
|
|
10888
|
+
filterUnits: "objectBoundingBox",
|
|
10889
|
+
id: "empty-image_svg__e"
|
|
10890
|
+
}, /*#__PURE__*/React__namespace.createElement("feOffset", {
|
|
10891
|
+
dy: -2,
|
|
10892
|
+
in: "SourceAlpha",
|
|
10893
|
+
result: "shadowOffsetOuter1"
|
|
10894
|
+
}), /*#__PURE__*/React__namespace.createElement("feGaussianBlur", {
|
|
10895
|
+
stdDeviation: 2,
|
|
10896
|
+
in: "shadowOffsetOuter1",
|
|
10897
|
+
result: "shadowBlurOuter1"
|
|
10898
|
+
}), /*#__PURE__*/React__namespace.createElement("feColorMatrix", {
|
|
10899
|
+
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0",
|
|
10900
|
+
in: "shadowBlurOuter1"
|
|
10901
|
+
})));
|
|
10902
|
+
|
|
10903
|
+
var _ref2 = /*#__PURE__*/React__namespace.createElement("g", {
|
|
10904
|
+
fill: "none",
|
|
10905
|
+
fillRule: "evenodd"
|
|
10868
10906
|
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
10869
|
-
d: "
|
|
10870
|
-
|
|
10871
|
-
fill: "#FDFDFD"
|
|
10872
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10873
|
-
d: "M16.8 19.6h43.4a2.8 2.8 0 0 1 2.8 2.8v44.8a2.8 2.8 0 0 1-2.8 2.8H16.8a2.8 2.8 0 0 1-2.8-2.8V22.4a2.8 2.8 0 0 1 2.8-2.8z",
|
|
10874
|
-
stroke: "#EEE",
|
|
10875
|
-
fill: "#F7F7F7"
|
|
10876
|
-
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10877
|
-
d: "M23.8 26.6h29.4a2.8 2.8 0 0 1 2.8 2.8v9.8a2.8 2.8 0 0 1-2.8 2.8H23.8a2.8 2.8 0 0 1-2.8-2.8v-9.8a2.8 2.8 0 0 1 2.8-2.8zm0 26.6h22.4a1.4 1.4 0 0 1 0 2.8H23.8a1.4 1.4 0 0 1 0-2.8zm0-7h29.4a1.4 1.4 0 0 1 0 2.8H23.8a1.4 1.4 0 0 1 0-2.8z",
|
|
10878
|
-
fill: "#E5E5E5"
|
|
10907
|
+
d: "M61.108 51.8H15.892a2.8 2.8 0 0 0-1.941.782L5.6 60.615V74.2a5.6 5.6 0 0 0 5.6 5.6h54.6a5.6 5.6 0 0 0 5.6-5.6V60.615l-8.35-8.033a2.8 2.8 0 0 0-1.942-.782z",
|
|
10908
|
+
fill: "#A6AAC3"
|
|
10879
10909
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10880
|
-
d: "
|
|
10881
|
-
fill: "#
|
|
10910
|
+
d: "M51.686 19L63 30.314V66.2a2.8 2.8 0 0 1-2.8 2.8H16.8a2.8 2.8 0 0 1-2.8-2.8V25a6 6 0 0 1 6-6h31.686z",
|
|
10911
|
+
fill: "url(#empty-image_svg__a)"
|
|
10912
|
+
}), /*#__PURE__*/React__namespace.createElement("g", null, /*#__PURE__*/React__namespace.createElement("use", {
|
|
10913
|
+
fill: "#000",
|
|
10914
|
+
filter: "url(#empty-image_svg__b)",
|
|
10915
|
+
xlinkHref: "#empty-image_svg__c"
|
|
10882
10916
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10883
|
-
|
|
10884
|
-
|
|
10917
|
+
stroke: "#FFF",
|
|
10918
|
+
d: "M42 36.5c.966 0 1.841.392 2.475 1.025A3.489 3.489 0 0 1 45.5 40h0v8c0 .966-.392 1.841-1.025 2.475A3.489 3.489 0 0 1 42 51.5h0-8a3.489 3.489 0 0 1-2.475-1.025A3.489 3.489 0 0 1 30.5 48h0v-8c0-.966.392-1.841 1.025-2.475A3.489 3.489 0 0 1 34 36.5h0z",
|
|
10919
|
+
strokeLinejoin: "square",
|
|
10920
|
+
fill: "url(#empty-image_svg__d)"
|
|
10921
|
+
})), /*#__PURE__*/React__namespace.createElement("g", {
|
|
10922
|
+
transform: "rotate(180 57.343 24.657)"
|
|
10923
|
+
}, /*#__PURE__*/React__namespace.createElement("use", {
|
|
10924
|
+
fill: "#000",
|
|
10925
|
+
filter: "url(#empty-image_svg__e)",
|
|
10926
|
+
xlinkHref: "#empty-image_svg__f"
|
|
10927
|
+
}), /*#__PURE__*/React__namespace.createElement("use", {
|
|
10928
|
+
fill: "url(#empty-image_svg__g)",
|
|
10929
|
+
xlinkHref: "#empty-image_svg__f"
|
|
10930
|
+
})), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10931
|
+
d: "M82.6 42a.7.7 0 0 1 .7.7v1.399l1.4.001a.7.7 0 0 1 0 1.4l-1.4-.001V46.9a.7.7 0 0 1-1.4 0v-1.401l-1.4.001a.7.7 0 0 1 0-1.4l1.4-.001V42.7a.7.7 0 0 1 .7-.7zM2.1 30.8c.29 0 .525.235.525.525l-.001.874.876.001a.7.7 0 0 1 0 1.4h-.876l.001.875a.525.525 0 1 1-1.05 0l-.001-.875H.7a.7.7 0 0 1 0-1.4l.874-.001.001-.874c0-.29.235-.525.525-.525z",
|
|
10932
|
+
fill: "#D6D8E4",
|
|
10933
|
+
opacity: 0.3
|
|
10885
10934
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10886
|
-
d: "
|
|
10887
|
-
|
|
10888
|
-
fill: "#F7F5F5"
|
|
10935
|
+
d: "M8.4 79.8l-.17-.005A2.8 2.8 0 0 1 5.6 77V60.2h12.393l.175-.006c3.802-.04 7.95 5.943 19.61 6.19l.022-.002.022.002c10.856.218 15.009-5.902 19.558-6.175l.227-.009H71.4V77a2.8 2.8 0 0 1-2.63 2.795l-.17.005H8.4z",
|
|
10936
|
+
fill: "#D6D8E4"
|
|
10889
10937
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10890
10938
|
d: "M21 3.356S24.518 2.509 25.516 0c1.438 2.057 2.18 2.947 3.884 3.338-2.321.692-3.33 1.468-4.123 3.662-.912-2.584-1.741-2.919-4.277-3.644",
|
|
10891
|
-
fill: "#
|
|
10939
|
+
fill: "#D6D8E4",
|
|
10940
|
+
opacity: 0.5
|
|
10892
10941
|
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
10893
10942
|
d: "M63 10.125S72.382 7.923 75.044 1.4c3.834 5.35 5.81 7.663 10.356 8.68-6.19 1.797-8.878 3.816-10.995 9.52-2.43-6.72-4.643-7.59-11.405-9.475",
|
|
10894
|
-
fill: "#
|
|
10943
|
+
fill: "#D6D8E4",
|
|
10944
|
+
opacity: 0.8
|
|
10895
10945
|
}));
|
|
10896
10946
|
|
|
10897
|
-
function
|
|
10947
|
+
function SvgEmptyImage(props) {
|
|
10898
10948
|
return /*#__PURE__*/React__namespace.createElement("svg", _extends({
|
|
10899
10949
|
width: 86,
|
|
10900
10950
|
height: 80,
|
|
10901
10951
|
viewBox: "0 0 86 80",
|
|
10902
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
10903
|
-
|
|
10952
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
10953
|
+
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
10954
|
+
}, props), _ref, _ref2);
|
|
10904
10955
|
}
|
|
10905
10956
|
|
|
10906
10957
|
/**
|
|
10907
10958
|
* 用于展示空数据的 React 组件。
|
|
10908
10959
|
*/
|
|
10909
10960
|
function EasyopsEmpty(props) {
|
|
10910
|
-
var
|
|
10911
|
-
|
|
10912
|
-
var background = (_props$background = props.background) !== null && _props$background !== void 0 ? _props$background : "white";
|
|
10913
|
-
var emptyImage = background === "white" ? SvgEmptyGreyImage : SvgEmptyLightGreyImage;
|
|
10961
|
+
var emptyImage = SvgEmptyImage;
|
|
10914
10962
|
var illustration = React.useMemo(() => props.illustration && illustrations.getIllustration(props.illustration), [props.illustration]);
|
|
10915
10963
|
var image = props.illustration ? illustration : /*#__PURE__*/React__default["default"].createElement(emptyImage);
|
|
10916
10964
|
return /*#__PURE__*/React__default["default"].createElement(antd.Empty, {
|