@next-core/brick-kit 2.90.2 → 2.92.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 CHANGED
@@ -3,6 +3,50 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [2.92.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.91.2...@next-core/brick-kit@2.92.0) (2021-12-06)
7
+
8
+
9
+ ### Features
10
+
11
+ * expose http code ([#1227](https://github.com/easyops-cn/next-core/issues/1227)) ([9e22deb](https://github.com/easyops-cn/next-core/commit/9e22deb2dc27b7d907bb782790fa4a59960ccc82))
12
+
13
+
14
+
15
+
16
+
17
+ ## [2.91.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.91.1...@next-core/brick-kit@2.91.2) (2021-12-05)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * add icons field ([7415b3f](https://github.com/easyops-cn/next-core/commit/7415b3ffaafe109c3bd555878a1d5ab2cd117183))
23
+
24
+
25
+
26
+
27
+
28
+ ## [2.91.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.91.0...@next-core/brick-kit@2.91.1) (2021-12-03)
29
+
30
+
31
+ ### Bug Fixes
32
+
33
+ * fix page tracker ([dbf1d00](https://github.com/easyops-cn/next-core/commit/dbf1d003cd2e60ad18471e403c5dc9c9690b30fa))
34
+
35
+
36
+
37
+
38
+
39
+ # [2.91.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.90.2...@next-core/brick-kit@2.91.0) (2021-12-03)
40
+
41
+
42
+ ### Features
43
+
44
+ * support isAdmin ([f160156](https://github.com/easyops-cn/next-core/commit/f1601567b59c9f4a27aa130dc3e2e327c84c35db))
45
+
46
+
47
+
48
+
49
+
6
50
  ## [2.90.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.90.1...@next-core/brick-kit@2.90.2) (2021-12-01)
7
51
 
8
52
 
@@ -1,40 +1,21 @@
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$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$2, 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$2, illustrations, _decorate) { 'use strict';
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, 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, illustrations, _decorate) { 'use strict';
6
6
 
7
7
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
8
 
9
- function _interopNamespace(e) {
10
- if (e && e.__esModule) return e;
11
- var n = Object.create(null);
12
- if (e) {
13
- Object.keys(e).forEach(function (k) {
14
- if (k !== 'default') {
15
- var d = Object.getOwnPropertyDescriptor(e, k);
16
- Object.defineProperty(n, k, d.get ? d : {
17
- enumerable: true,
18
- get: function () { return e[k]; }
19
- });
20
- }
21
- });
22
- }
23
- n["default"] = e;
24
- return Object.freeze(n);
25
- }
26
-
27
9
  var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
28
10
  var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
29
11
  var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator$4);
30
12
  var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$1);
31
13
  var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
32
- var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
14
  var lodash__default = /*#__PURE__*/_interopDefaultLegacy(lodash);
34
15
  var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
35
16
  var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
36
17
  var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml);
37
- var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends$2);
18
+ var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
38
19
  var _decorate__default = /*#__PURE__*/_interopDefaultLegacy(_decorate);
39
20
 
40
21
  class BaseBar {
@@ -1260,6 +1241,54 @@
1260
1241
  };
1261
1242
  }();
1262
1243
 
1244
+ var auth = {};
1245
+ /** @internal */
1246
+
1247
+ function authenticate(newAuth) {
1248
+ Object.assign(auth, {
1249
+ org: newAuth.org,
1250
+ username: newAuth.username,
1251
+ userInstanceId: newAuth.userInstanceId,
1252
+ loginFrom: newAuth.loginFrom,
1253
+ accessRule: newAuth.accessRule,
1254
+ isAdmin: newAuth.isAdmin
1255
+ }); // re-init analytics to set user_id
1256
+
1257
+ if (easyopsAnalytics.userAnalytics.initialized) {
1258
+ easyopsAnalytics.userAnalytics.setUserId(newAuth.userInstanceId);
1259
+ }
1260
+ }
1261
+ /**
1262
+ * 获取当前登录认证信息。
1263
+ *
1264
+ * @returns 当前登录认证信息。
1265
+ */
1266
+
1267
+ function getAuth() {
1268
+ return _objectSpread__default["default"]({}, auth);
1269
+ }
1270
+ /** @internal */
1271
+
1272
+ function logout() {
1273
+ auth.org = undefined;
1274
+ auth.username = undefined;
1275
+ auth.userInstanceId = undefined;
1276
+ auth.accessRule = undefined;
1277
+ auth.isAdmin = undefined;
1278
+ resetPermissionPreChecks(); // re-init analytics to clear user_id
1279
+
1280
+ easyopsAnalytics.userAnalytics.setUserId();
1281
+ }
1282
+ /**
1283
+ * 查看当前是否已登录。
1284
+ *
1285
+ * @returns 当前是否已登录。
1286
+ */
1287
+
1288
+ function isLoggedIn() {
1289
+ return auth.username !== undefined;
1290
+ }
1291
+
1263
1292
  var permissionMap = new Map();
1264
1293
  function preCheckPermissions(_x) {
1265
1294
  return _preCheckPermissions.apply(this, arguments);
@@ -1316,6 +1345,10 @@
1316
1345
  }
1317
1346
 
1318
1347
  function checkPermissions() {
1348
+ if (getAuth().isAdmin) {
1349
+ return true;
1350
+ }
1351
+
1319
1352
  for (var _len = arguments.length, actions = new Array(_len), _key = 0; _key < _len; _key++) {
1320
1353
  actions[_key] = arguments[_key];
1321
1354
  }
@@ -5892,52 +5925,6 @@
5892
5925
  };
5893
5926
  }();
5894
5927
 
5895
- var auth = {};
5896
- /** @internal */
5897
-
5898
- function authenticate(newAuth) {
5899
- Object.assign(auth, {
5900
- org: newAuth.org,
5901
- username: newAuth.username,
5902
- userInstanceId: newAuth.userInstanceId,
5903
- loginFrom: newAuth.loginFrom,
5904
- accessRule: newAuth.accessRule
5905
- }); // re-init analytics to set user_id
5906
-
5907
- if (easyopsAnalytics.userAnalytics.initialized) {
5908
- easyopsAnalytics.userAnalytics.setUserId(newAuth.userInstanceId);
5909
- }
5910
- }
5911
- /**
5912
- * 获取当前登录认证信息。
5913
- *
5914
- * @returns 当前登录认证信息。
5915
- */
5916
-
5917
- function getAuth() {
5918
- return _objectSpread__default["default"]({}, auth);
5919
- }
5920
- /** @internal */
5921
-
5922
- function logout() {
5923
- auth.org = undefined;
5924
- auth.username = undefined;
5925
- auth.userInstanceId = undefined;
5926
- auth.accessRule = undefined;
5927
- resetPermissionPreChecks(); // re-init analytics to clear user_id
5928
-
5929
- easyopsAnalytics.userAnalytics.setUserId();
5930
- }
5931
- /**
5932
- * 查看当前是否已登录。
5933
- *
5934
- * @returns 当前是否已登录。
5935
- */
5936
-
5937
- function isLoggedIn() {
5938
- return auth.username !== undefined;
5939
- }
5940
-
5941
5928
  /**
5942
5929
  * Merge `app.defaultConfig` and `app.userConfig` to `app.config`.
5943
5930
  *
@@ -6264,7 +6251,7 @@
6264
6251
 
6265
6252
  return _asyncToGenerator__default["default"](function* () {
6266
6253
  var data = yield window.STANDALONE_MICRO_APPS ? standaloneBootstrap() : BootstrapV2Api_bootstrapV2(_objectSpread__default["default"]({
6267
- appFields: "defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status",
6254
+ appFields: "defaultConfig,userConfig,locales,name,homepage,id,currentVersion,installStatus,internal,status,icons",
6268
6255
  ignoreTemplateFields: "templates",
6269
6256
  ignoreBrickFields: "bricks,processors,providers,editors"
6270
6257
  }, params), {
@@ -7907,7 +7894,8 @@
7907
7894
  username: auth.username,
7908
7895
  userInstanceId: auth.userInstanceId,
7909
7896
  loginFrom: auth.loginFrom,
7910
- accessRule: auth.accessRule
7897
+ accessRule: auth.accessRule,
7898
+ isAdmin: auth.isAdmin
7911
7899
  }, getRuntimeMisc()),
7912
7900
  flags: this.kernel.getFeatureFlags(),
7913
7901
  segues: this.segues,
@@ -8317,7 +8305,7 @@
8317
8305
 
8318
8306
  preCheckPermissions(container, context) {
8319
8307
  return _asyncToGenerator__default["default"](function* () {
8320
- if (isLoggedIn() && container.permissionsPreCheck && Array.isArray(container.permissionsPreCheck)) {
8308
+ if (isLoggedIn() && !getAuth().isAdmin && container.permissionsPreCheck && Array.isArray(container.permissionsPreCheck)) {
8321
8309
  var usedActions = computeRealValue(container.permissionsPreCheck, context, true);
8322
8310
  yield validatePermissions(usedActions);
8323
8311
  }
@@ -9280,6 +9268,8 @@
9280
9268
  var _this3 = this;
9281
9269
 
9282
9270
  return _asyncToGenerator__default["default"](function* () {
9271
+ var _apiAnalyzer$getInsta;
9272
+
9283
9273
  _this3.state = "initial";
9284
9274
  _this3.renderId = lodash.uniqueId("render-id-");
9285
9275
  resetAllInjected();
@@ -9290,7 +9280,10 @@
9290
9280
  }
9291
9281
 
9292
9282
  var history = getHistory();
9293
- history.unblock();
9283
+ history.unblock(); // Create the page tracker before page load.
9284
+ // And the API Analyzer maybe disabled.
9285
+
9286
+ var pageTracker = (_apiAnalyzer$getInsta = easyopsAnalytics.apiAnalyzer.getInstance()) === null || _apiAnalyzer$getInsta === void 0 ? void 0 : _apiAnalyzer$getInsta.pageTracker();
9294
9287
  var locationContext = _this3.locationContext = new LocationContext(_this3.kernel, location);
9295
9288
  var storyboard = locationContext.matchStoryboard(_this3.kernel.bootstrapData.storyboards);
9296
9289
 
@@ -9301,7 +9294,7 @@
9301
9294
 
9302
9295
  brickUtils.restoreDynamicTemplates(storyboard); // 预加载权限信息
9303
9296
 
9304
- if (isLoggedIn()) {
9297
+ if (isLoggedIn() && !getAuth().isAdmin) {
9305
9298
  yield preCheckPermissions(storyboard);
9306
9299
  } // 如果找到匹配的 storyboard,那么根据路由匹配得到的 sub-storyboard 加载它的依赖库。
9307
9300
 
@@ -9378,7 +9371,8 @@
9378
9371
  mountRoutesResult.main = [{
9379
9372
  type: brickPageError,
9380
9373
  properties: {
9381
- error: httpErrorToString(error)
9374
+ error: httpErrorToString(error),
9375
+ code: error instanceof brickHttp.HttpResponseError ? error.response.status : null
9382
9376
  },
9383
9377
  events: {}
9384
9378
  }];
@@ -9486,8 +9480,6 @@
9486
9480
  });
9487
9481
 
9488
9482
  if (main.length > 0 || portal.length > 0) {
9489
- var _apiAnalyzer$getInsta;
9490
-
9491
9483
  main.length > 0 && mountTree(main, mountPoints.main);
9492
9484
  portal.length > 0 && mountTree(portal, mountPoints.portal);
9493
9485
  afterMountTree(mountPoints.main);
@@ -9506,9 +9498,8 @@
9506
9498
  // See https://github.com/ReactTraining/react-router/blob/master/packages/react-router-dom/docs/guides/scroll-restoration.md
9507
9499
 
9508
9500
 
9509
- window.scrollTo(0, 0); // API Analyzer maybe disabled.
9510
-
9511
- (_apiAnalyzer$getInsta = easyopsAnalytics.apiAnalyzer.getInstance()) === null || _apiAnalyzer$getInsta === void 0 ? void 0 : _apiAnalyzer$getInsta.pageTracker()(locationContext.getCurrentMatch().path); // analytics page_view event
9501
+ window.scrollTo(0, 0);
9502
+ pageTracker === null || pageTracker === void 0 ? void 0 : pageTracker(locationContext.getCurrentMatch().path); // analytics page_view event
9512
9503
 
9513
9504
  easyopsAnalytics.userAnalytics.event("page_view", _objectSpread__default["default"]({
9514
9505
  micro_app_id: _this3.kernel.currentApp.id,
@@ -10805,94 +10796,14 @@
10805
10796
  };
10806
10797
  var defaultLocale = localeValues;
10807
10798
 
10808
- 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); }
10809
-
10810
- var _ref$1 = /*#__PURE__*/React__namespace.createElement("g", {
10811
- fill: "none"
10812
- }, /*#__PURE__*/React__namespace.createElement("path", {
10813
- 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",
10814
- fill: "#C4C4C4"
10815
- }), /*#__PURE__*/React__namespace.createElement("path", {
10816
- 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",
10817
- fill: "#F7F7F7"
10818
- }), /*#__PURE__*/React__namespace.createElement("path", {
10819
- 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",
10820
- fill: "#E5E5E5"
10821
- }), /*#__PURE__*/React__namespace.createElement("path", {
10822
- 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",
10823
- fill: "#CDCDCD"
10824
- }), /*#__PURE__*/React__namespace.createElement("path", {
10825
- 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",
10826
- fill: "#E5E5E5"
10827
- }), /*#__PURE__*/React__namespace.createElement("path", {
10828
- 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",
10829
- fill: "#F5F5F5"
10830
- }), /*#__PURE__*/React__namespace.createElement("path", {
10831
- 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",
10832
- fill: "#E5E5E5"
10833
- }));
10834
-
10835
- function SvgEmptyGreyImage(props) {
10836
- return /*#__PURE__*/React__namespace.createElement("svg", _extends$1({
10837
- width: 86,
10838
- height: 80,
10839
- viewBox: "0 0 86 80",
10840
- xmlns: "http://www.w3.org/2000/svg"
10841
- }, props), _ref$1);
10842
- }
10843
-
10844
- 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); }
10845
-
10846
- var _ref = /*#__PURE__*/React__namespace.createElement("g", {
10847
- fill: "none"
10848
- }, /*#__PURE__*/React__namespace.createElement("path", {
10849
- d: "M15.892 52.3a2.3 2.3 0 0 0-1.594.642L6.1 60.828V74.2a5.08 5.08 0 0 0 1.494 3.606A5.084 5.084 0 0 0 11.2 79.3h54.6a5.08 5.08 0 0 0 3.606-1.494A5.084 5.084 0 0 0 70.9 74.2V60.828l-8.198-7.886c-.517-.498-1.331-.642-46.81-.642z",
10850
- stroke: "#D9D9D9",
10851
- fill: "#FDFDFD"
10852
- }), /*#__PURE__*/React__namespace.createElement("path", {
10853
- 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",
10854
- stroke: "#EEE",
10855
- fill: "#F7F7F7"
10856
- }), /*#__PURE__*/React__namespace.createElement("path", {
10857
- 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",
10858
- fill: "#E5E5E5"
10859
- }), /*#__PURE__*/React__namespace.createElement("path", {
10860
- 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",
10861
- fill: "#CDCDCD"
10862
- }), /*#__PURE__*/React__namespace.createElement("path", {
10863
- 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-.525z",
10864
- fill: "#E5E5E5"
10865
- }), /*#__PURE__*/React__namespace.createElement("path", {
10866
- d: "M17.998 60.7H6.1l.005 16.455c.038.573.287 1.089.669 1.471.389.39.919.632 1.64.674H37.8l30.955-.005a2.293 2.293 0 0 0 1.52-.72c.388-.411.625-.965.625-1.575V60.7l-13.505.009c-1.637.103-3.215 1.012-5.103 2.07-3.338 1.874-7.58 4.243-14.524 4.105l-.537-.015c-7.07-.261-11.352-2.607-14.53-4.352-1.837-1.009-3.277-1.834-4.703-1.817z",
10867
- stroke: "#D9D9D9",
10868
- fill: "#F7F5F5"
10869
- }), /*#__PURE__*/React__namespace.createElement("path", {
10870
- 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",
10871
- fill: "#F5F5F5"
10872
- }), /*#__PURE__*/React__namespace.createElement("path", {
10873
- 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",
10874
- fill: "#E5E5E5"
10875
- }));
10876
-
10877
- function SvgEmptyLightGreyImage(props) {
10878
- return /*#__PURE__*/React__namespace.createElement("svg", _extends({
10879
- width: 86,
10880
- height: 80,
10881
- viewBox: "0 0 86 80",
10882
- xmlns: "http://www.w3.org/2000/svg"
10883
- }, props), _ref);
10884
- }
10799
+ var emptyImage = "../EasyopsEmpty/empty-image.397ff6359f4066d8.png";
10885
10800
 
10886
10801
  /**
10887
10802
  * 用于展示空数据的 React 组件。
10888
10803
  */
10889
10804
  function EasyopsEmpty(props) {
10890
- var _props$background;
10891
-
10892
- var background = (_props$background = props.background) !== null && _props$background !== void 0 ? _props$background : "white";
10893
- var emptyImage = background === "white" ? SvgEmptyGreyImage : SvgEmptyLightGreyImage;
10894
10805
  var illustration = React.useMemo(() => props.illustration && illustrations.getIllustration(props.illustration), [props.illustration]);
10895
- var image = props.illustration ? illustration : /*#__PURE__*/React__default["default"].createElement(emptyImage);
10806
+ var image = props.illustration ? illustration : emptyImage;
10896
10807
  return /*#__PURE__*/React__default["default"].createElement(antd.Empty, {
10897
10808
  image: image,
10898
10809
  imageStyle: props.imageStyle,