@next-core/brick-kit 2.91.2 → 2.93.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 +37 -83
- package/dist/assets/empty-image.397ff6359f4066d8.png +0 -0
- package/dist/index.bundle.js +20 -168
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +59 -189
- package/dist/index.esm.js.map +1 -1
- package/dist/types/BrickAsComponent.d.ts.map +1 -1
- package/dist/types/EasyopsEmpty/EasyopsEmpty.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/dist/types/internal/evaluate.d.ts.map +1 -1
- package/package.json +11 -11
package/dist/index.esm.js
CHANGED
|
@@ -3,8 +3,7 @@ import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
|
3
3
|
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
4
|
import _asyncToGenerator$4 from '@babel/runtime/helpers/asyncToGenerator';
|
|
5
5
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
6
|
-
import
|
|
7
|
-
import React__default, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, useContext, createContext } from 'react';
|
|
6
|
+
import React, { useState, useEffect, forwardRef, useRef, useImperativeHandle, useMemo, useContext, createContext } from 'react';
|
|
8
7
|
import lodash, { set, get, difference, identity, cloneDeep, isNil, sortBy, merge, clamp, uniqueId, orderBy, omit, isEmpty } from 'lodash';
|
|
9
8
|
import { toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, scanPermissionActionsInStoryboard, precookFunction, cook, shouldAllowRecursiveEvaluations, preevaluate, inject, deepFreeze, createProviderClass, scanRouteAliasInStoryboard, loadScript, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, getDllAndDepsByResource, resolveContextConcurrently, matchPath, asyncProcessBrick, restoreDynamicTemplates, mapCustomApisToNameAndNamespace, scanCustomApisInStoryboard } from '@next-core/brick-utils';
|
|
10
9
|
import { http, HttpResponseError, HttpFetchError } from '@next-core/brick-http';
|
|
@@ -16,7 +15,7 @@ import yaml from 'js-yaml';
|
|
|
16
15
|
import { Modal, message, Empty, ConfigProvider } from 'antd';
|
|
17
16
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
18
17
|
import { withTranslation } from 'react-i18next';
|
|
19
|
-
import _extends
|
|
18
|
+
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
20
19
|
import { getIllustration } from '@next-core/illustrations';
|
|
21
20
|
import _decorate from '@babel/runtime/helpers/decorate';
|
|
22
21
|
|
|
@@ -1850,6 +1849,10 @@ function evaluate(raw) {
|
|
|
1850
1849
|
globalVariables.MISC = getRuntime().getMiscSettings();
|
|
1851
1850
|
}
|
|
1852
1851
|
|
|
1852
|
+
if (attemptToVisitGlobals.has("BASE_URL")) {
|
|
1853
|
+
globalVariables.BASE_URL = getBasePath().replace(/\/$/, "");
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1853
1856
|
try {
|
|
1854
1857
|
var result = cook(precooked.expression, precooked.source, {
|
|
1855
1858
|
globalVariables: supply(precooked.attemptToVisitGlobals, globalVariables)
|
|
@@ -3109,8 +3112,8 @@ function handleHttpError(error) {
|
|
|
3109
3112
|
}
|
|
3110
3113
|
|
|
3111
3114
|
unauthenticatedConfirmModal = Modal.confirm({
|
|
3112
|
-
icon: /*#__PURE__*/
|
|
3113
|
-
content: /*#__PURE__*/
|
|
3115
|
+
icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
|
|
3116
|
+
content: /*#__PURE__*/React.createElement(LoginTimeoutMessage, null),
|
|
3114
3117
|
okText: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.MODAL_OK)),
|
|
3115
3118
|
cancelText: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.MODAL_CANCEL)),
|
|
3116
3119
|
onOk: () => {
|
|
@@ -3128,7 +3131,7 @@ function handleHttpError(error) {
|
|
|
3128
3131
|
|
|
3129
3132
|
return Modal.error({
|
|
3130
3133
|
title: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.REQUEST_FAILED)),
|
|
3131
|
-
content: /*#__PURE__*/
|
|
3134
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
3132
3135
|
style: {
|
|
3133
3136
|
whiteSpace: "pre-wrap"
|
|
3134
3137
|
}
|
|
@@ -3137,13 +3140,13 @@ function handleHttpError(error) {
|
|
|
3137
3140
|
});
|
|
3138
3141
|
}
|
|
3139
3142
|
function LoginTimeoutMessage() {
|
|
3140
|
-
|
|
3143
|
+
React.useEffect(() => {
|
|
3141
3144
|
// Unset confirm modal when it's destroyed.
|
|
3142
3145
|
return () => {
|
|
3143
3146
|
unauthenticatedConfirmModal = undefined;
|
|
3144
3147
|
};
|
|
3145
3148
|
}, []);
|
|
3146
|
-
return /*#__PURE__*/
|
|
3149
|
+
return /*#__PURE__*/React.createElement("div", null, i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.LOGIN_TIMEOUT_MESSAGE)));
|
|
3147
3150
|
}
|
|
3148
3151
|
|
|
3149
3152
|
class WebsocketMessageRequest {
|
|
@@ -9373,7 +9376,8 @@ class Router {
|
|
|
9373
9376
|
mountRoutesResult.main = [{
|
|
9374
9377
|
type: brickPageError,
|
|
9375
9378
|
properties: {
|
|
9376
|
-
error: httpErrorToString(error)
|
|
9379
|
+
error: httpErrorToString(error),
|
|
9380
|
+
code: error instanceof HttpResponseError ? error.response.status : null
|
|
9377
9381
|
},
|
|
9378
9382
|
events: {}
|
|
9379
9383
|
}];
|
|
@@ -9631,7 +9635,7 @@ function getRuntime() {
|
|
|
9631
9635
|
}
|
|
9632
9636
|
|
|
9633
9637
|
// Ref https://reactjs.org/docs/error-boundaries.html
|
|
9634
|
-
class LegacyErrorBoundary extends
|
|
9638
|
+
class LegacyErrorBoundary extends React.Component {
|
|
9635
9639
|
constructor(props) {
|
|
9636
9640
|
super(props);
|
|
9637
9641
|
this.state = {
|
|
@@ -9654,9 +9658,9 @@ class LegacyErrorBoundary extends React__default.Component {
|
|
|
9654
9658
|
render() {
|
|
9655
9659
|
if (this.state.error) {
|
|
9656
9660
|
// You can render any custom fallback UI
|
|
9657
|
-
return /*#__PURE__*/
|
|
9661
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9658
9662
|
"data-testid": "error-boundary"
|
|
9659
|
-
}, /*#__PURE__*/
|
|
9663
|
+
}, /*#__PURE__*/React.createElement("h3", null, this.props.t(K.SOMETHING_WENT_WRONG)), /*#__PURE__*/React.createElement("p", null, httpErrorToString(this.state.error)));
|
|
9660
9664
|
}
|
|
9661
9665
|
|
|
9662
9666
|
return this.props.children;
|
|
@@ -9851,8 +9855,8 @@ function useApplyPageTitle(pageTitle) {
|
|
|
9851
9855
|
/** @internal */
|
|
9852
9856
|
|
|
9853
9857
|
function useRecentApps() {
|
|
9854
|
-
var [recentApps, setRecentApps] =
|
|
9855
|
-
|
|
9858
|
+
var [recentApps, setRecentApps] = React.useState(getRuntime().getRecentApps());
|
|
9859
|
+
React.useEffect(() => {
|
|
9856
9860
|
var listener = event => {
|
|
9857
9861
|
setRecentApps(event.detail);
|
|
9858
9862
|
};
|
|
@@ -9886,8 +9890,8 @@ function useCurrentApp() {
|
|
|
9886
9890
|
|
|
9887
9891
|
function useLocation() {
|
|
9888
9892
|
var history = getHistory();
|
|
9889
|
-
var [location, setLocation] =
|
|
9890
|
-
|
|
9893
|
+
var [location, setLocation] = React.useState(history.location);
|
|
9894
|
+
React.useEffect(() => {
|
|
9891
9895
|
var unlisten = history.listen(location => setLocation(location));
|
|
9892
9896
|
return unlisten;
|
|
9893
9897
|
}, [history]);
|
|
@@ -10038,7 +10042,7 @@ var handleProxyOfParentTemplate = (brick, tplContextId, tplContext) => {
|
|
|
10038
10042
|
* @param props - 属性。
|
|
10039
10043
|
*/
|
|
10040
10044
|
|
|
10041
|
-
var SingleBrickAsComponent = /*#__PURE__*/
|
|
10045
|
+
var SingleBrickAsComponent = /*#__PURE__*/React.memo(function SingleBrickAsComponent(_ref2) {
|
|
10042
10046
|
var {
|
|
10043
10047
|
useBrick,
|
|
10044
10048
|
data,
|
|
@@ -10051,7 +10055,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10051
10055
|
|
|
10052
10056
|
var template;
|
|
10053
10057
|
var brick;
|
|
10054
|
-
var isBrickAvailable =
|
|
10058
|
+
var isBrickAvailable = React.useMemo(() => {
|
|
10055
10059
|
if (isObject(useBrick.if) && !isPreEvaluated(useBrick.if)) {
|
|
10056
10060
|
// eslint-disable-next-line
|
|
10057
10061
|
console.warn("Currently resolvable-if in `useBrick` is not supported.");
|
|
@@ -10065,7 +10069,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10065
10069
|
|
|
10066
10070
|
return true;
|
|
10067
10071
|
}, [useBrick, data]);
|
|
10068
|
-
var runtimeBrick =
|
|
10072
|
+
var runtimeBrick = React.useMemo( /*#__PURE__*/_asyncToGenerator$4(function* () {
|
|
10069
10073
|
if (!isBrickAvailable) {
|
|
10070
10074
|
return null;
|
|
10071
10075
|
} // If the router state is initial, ignore rendering the sub-brick.
|
|
@@ -10104,7 +10108,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10104
10108
|
|
|
10105
10109
|
return brick;
|
|
10106
10110
|
}), [useBrick, data, isBrickAvailable]);
|
|
10107
|
-
var innerRefCallback =
|
|
10111
|
+
var innerRefCallback = React.useCallback( /*#__PURE__*/function () {
|
|
10108
10112
|
var _ref5 = _asyncToGenerator$4(function* (element) {
|
|
10109
10113
|
immediatelyRefCallback === null || immediatelyRefCallback === void 0 ? void 0 : immediatelyRefCallback(element);
|
|
10110
10114
|
|
|
@@ -10159,24 +10163,24 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10159
10163
|
}
|
|
10160
10164
|
|
|
10161
10165
|
if (template) {
|
|
10162
|
-
return /*#__PURE__*/
|
|
10166
|
+
return /*#__PURE__*/React.createElement(template.brick, {
|
|
10163
10167
|
ref: innerRefCallback
|
|
10164
10168
|
}, ...slotsToChildren(template.slots).map((item, index) => {
|
|
10165
|
-
return /*#__PURE__*/
|
|
10169
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10166
10170
|
key: index,
|
|
10167
10171
|
useBrick: item,
|
|
10168
|
-
data:
|
|
10172
|
+
data: data
|
|
10169
10173
|
});
|
|
10170
10174
|
}));
|
|
10171
10175
|
} else {
|
|
10172
|
-
return /*#__PURE__*/
|
|
10176
|
+
return /*#__PURE__*/React.createElement(useBrick.brick, {
|
|
10173
10177
|
ref: innerRefCallback
|
|
10174
10178
|
}, ...slotsToChildren(useBrick.slots).map((item, index) => {
|
|
10175
10179
|
if (useBrick[symbolForTplContextId] && !item[symbolForTplContextId]) {
|
|
10176
10180
|
item[symbolForTplContextId] = useBrick[symbolForTplContextId];
|
|
10177
10181
|
}
|
|
10178
10182
|
|
|
10179
|
-
return /*#__PURE__*/
|
|
10183
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10180
10184
|
key: index,
|
|
10181
10185
|
useBrick: item,
|
|
10182
10186
|
data: data
|
|
@@ -10212,7 +10216,7 @@ function BrickAsComponent(_ref6) {
|
|
|
10212
10216
|
} = _ref6;
|
|
10213
10217
|
|
|
10214
10218
|
if (Array.isArray(useBrick)) {
|
|
10215
|
-
return /*#__PURE__*/
|
|
10219
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10216
10220
|
key: index,
|
|
10217
10221
|
useBrick: item,
|
|
10218
10222
|
data: data,
|
|
@@ -10220,7 +10224,7 @@ function BrickAsComponent(_ref6) {
|
|
|
10220
10224
|
})));
|
|
10221
10225
|
}
|
|
10222
10226
|
|
|
10223
|
-
return /*#__PURE__*/
|
|
10227
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10224
10228
|
useBrick: useBrick,
|
|
10225
10229
|
data: data,
|
|
10226
10230
|
parentRefForUseBrickInPortal: parentRefForUseBrickInPortal
|
|
@@ -10253,7 +10257,7 @@ function transformEvents(data, events) {
|
|
|
10253
10257
|
// eslint-disable-next-line react/display-name
|
|
10254
10258
|
|
|
10255
10259
|
|
|
10256
|
-
var ForwardRefSingleBrickAsComponent = /*#__PURE__*/
|
|
10260
|
+
var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function LegacySingleBrickAsComponent(_ref8, ref) {
|
|
10257
10261
|
var {
|
|
10258
10262
|
useBrick,
|
|
10259
10263
|
data,
|
|
@@ -10266,7 +10270,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10266
10270
|
|
|
10267
10271
|
var template;
|
|
10268
10272
|
var brick;
|
|
10269
|
-
var isBrickAvailable =
|
|
10273
|
+
var isBrickAvailable = React.useMemo(() => {
|
|
10270
10274
|
if (isObject(useBrick.if) && !isPreEvaluated(useBrick.if)) {
|
|
10271
10275
|
// eslint-disable-next-line
|
|
10272
10276
|
console.warn("Currently resolvable-if in `useBrick` is not supported.");
|
|
@@ -10283,7 +10287,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10283
10287
|
useImperativeHandle(ref, () => {
|
|
10284
10288
|
return brickRef.current;
|
|
10285
10289
|
});
|
|
10286
|
-
var runtimeBrick =
|
|
10290
|
+
var runtimeBrick = React.useMemo( /*#__PURE__*/_asyncToGenerator$4(function* () {
|
|
10287
10291
|
if (!isBrickAvailable) {
|
|
10288
10292
|
return null;
|
|
10289
10293
|
} // If the router state is initial, ignore rendering the sub-brick.
|
|
@@ -10324,7 +10328,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10324
10328
|
listenOnTrackingContext(brick, trackingContextList, runtimeContext);
|
|
10325
10329
|
return brick;
|
|
10326
10330
|
}), [useBrick, data, isBrickAvailable]);
|
|
10327
|
-
var innerRefCallback =
|
|
10331
|
+
var innerRefCallback = React.useCallback( /*#__PURE__*/function () {
|
|
10328
10332
|
var _ref11 = _asyncToGenerator$4(function* (element) {
|
|
10329
10333
|
brickRef.current = element;
|
|
10330
10334
|
|
|
@@ -10379,24 +10383,24 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10379
10383
|
}
|
|
10380
10384
|
|
|
10381
10385
|
if (template) {
|
|
10382
|
-
return /*#__PURE__*/
|
|
10386
|
+
return /*#__PURE__*/React.createElement(template.brick, {
|
|
10383
10387
|
ref: innerRefCallback
|
|
10384
10388
|
}, ...slotsToChildren(template.slots).map((item, index) => {
|
|
10385
|
-
return /*#__PURE__*/
|
|
10389
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10386
10390
|
key: index,
|
|
10387
10391
|
useBrick: item,
|
|
10388
|
-
data:
|
|
10392
|
+
data: data
|
|
10389
10393
|
});
|
|
10390
10394
|
}));
|
|
10391
10395
|
} else {
|
|
10392
|
-
return /*#__PURE__*/
|
|
10396
|
+
return /*#__PURE__*/React.createElement(useBrick.brick, {
|
|
10393
10397
|
ref: innerRefCallback
|
|
10394
10398
|
}, ...slotsToChildren(useBrick.slots).map((item, index) => {
|
|
10395
10399
|
if (useBrick[symbolForTplContextId] && !item[symbolForTplContextId]) {
|
|
10396
10400
|
item[symbolForTplContextId] = useBrick[symbolForTplContextId];
|
|
10397
10401
|
}
|
|
10398
10402
|
|
|
10399
|
-
return /*#__PURE__*/
|
|
10403
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10400
10404
|
key: index,
|
|
10401
10405
|
useBrick: item,
|
|
10402
10406
|
data: data
|
|
@@ -10456,7 +10460,7 @@ var locale$4 = {
|
|
|
10456
10460
|
var TimePicker$1 = locale$4;
|
|
10457
10461
|
|
|
10458
10462
|
var locale$3 = {
|
|
10459
|
-
lang: _extends
|
|
10463
|
+
lang: _extends({
|
|
10460
10464
|
placeholder: '请选择日期',
|
|
10461
10465
|
yearPlaceholder: '请选择年份',
|
|
10462
10466
|
quarterPlaceholder: '请选择季度',
|
|
@@ -10467,7 +10471,7 @@ var locale$3 = {
|
|
|
10467
10471
|
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
10468
10472
|
rangeWeekPlaceholder: ['开始周', '结束周']
|
|
10469
10473
|
}, locale$5),
|
|
10470
|
-
timePickerLocale: _extends
|
|
10474
|
+
timePickerLocale: _extends({}, TimePicker$1)
|
|
10471
10475
|
}; // should add whitespace between char in Button
|
|
10472
10476
|
|
|
10473
10477
|
locale$3.lang.ok = '确 定'; // All settings at:
|
|
@@ -10653,7 +10657,7 @@ var locale$1 = {
|
|
|
10653
10657
|
var TimePicker = locale$1;
|
|
10654
10658
|
|
|
10655
10659
|
var locale = {
|
|
10656
|
-
lang: _extends
|
|
10660
|
+
lang: _extends({
|
|
10657
10661
|
placeholder: 'Select date',
|
|
10658
10662
|
yearPlaceholder: 'Select year',
|
|
10659
10663
|
quarterPlaceholder: 'Select quarter',
|
|
@@ -10664,7 +10668,7 @@ var locale = {
|
|
|
10664
10668
|
rangeMonthPlaceholder: ['Start month', 'End month'],
|
|
10665
10669
|
rangeWeekPlaceholder: ['Start week', 'End week']
|
|
10666
10670
|
}, locale$2),
|
|
10667
|
-
timePickerLocale: _extends
|
|
10671
|
+
timePickerLocale: _extends({}, TimePicker)
|
|
10668
10672
|
}; // All settings at:
|
|
10669
10673
|
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
10670
10674
|
|
|
@@ -10797,167 +10801,33 @@ var localeValues = {
|
|
|
10797
10801
|
};
|
|
10798
10802
|
var defaultLocale = localeValues;
|
|
10799
10803
|
|
|
10800
|
-
|
|
10801
|
-
|
|
10802
|
-
var _ref = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
10803
|
-
x1: "5.718%",
|
|
10804
|
-
y1: "4.311%",
|
|
10805
|
-
x2: "83.05%",
|
|
10806
|
-
y2: "88.915%",
|
|
10807
|
-
id: "empty-image_svg__a"
|
|
10808
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
10809
|
-
stopColor: "#D4D8E4",
|
|
10810
|
-
offset: "0%"
|
|
10811
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
10812
|
-
stopColor: "#A9B0C4",
|
|
10813
|
-
offset: "100%"
|
|
10814
|
-
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
10815
|
-
x1: "0%",
|
|
10816
|
-
y1: "11.08%",
|
|
10817
|
-
x2: "80.548%",
|
|
10818
|
-
y2: "107.704%",
|
|
10819
|
-
id: "empty-image_svg__d"
|
|
10820
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
10821
|
-
stopColor: "#C2C7DA",
|
|
10822
|
-
offset: "0%"
|
|
10823
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
10824
|
-
stopColor: "#8F96B3",
|
|
10825
|
-
offset: "100%"
|
|
10826
|
-
})), /*#__PURE__*/React.createElement("path", {
|
|
10827
|
-
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",
|
|
10828
|
-
id: "empty-image_svg__c"
|
|
10829
|
-
}), /*#__PURE__*/React.createElement("filter", {
|
|
10830
|
-
x: "-37.5%",
|
|
10831
|
-
y: "-31.3%",
|
|
10832
|
-
width: "187.5%",
|
|
10833
|
-
height: "187.5%",
|
|
10834
|
-
filterUnits: "objectBoundingBox",
|
|
10835
|
-
id: "empty-image_svg__b"
|
|
10836
|
-
}, /*#__PURE__*/React.createElement("feOffset", {
|
|
10837
|
-
dx: 1,
|
|
10838
|
-
dy: 2,
|
|
10839
|
-
in: "SourceAlpha",
|
|
10840
|
-
result: "shadowOffsetOuter1"
|
|
10841
|
-
}), /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
10842
|
-
stdDeviation: 2,
|
|
10843
|
-
in: "shadowOffsetOuter1",
|
|
10844
|
-
result: "shadowBlurOuter1"
|
|
10845
|
-
}), /*#__PURE__*/React.createElement("feComposite", {
|
|
10846
|
-
in: "shadowBlurOuter1",
|
|
10847
|
-
in2: "SourceAlpha",
|
|
10848
|
-
operator: "out",
|
|
10849
|
-
result: "shadowBlurOuter1"
|
|
10850
|
-
}), /*#__PURE__*/React.createElement("feColorMatrix", {
|
|
10851
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.22 0",
|
|
10852
|
-
in: "shadowBlurOuter1"
|
|
10853
|
-
})), /*#__PURE__*/React.createElement("linearGradient", {
|
|
10854
|
-
x1: "41.823%",
|
|
10855
|
-
y1: "24.795%",
|
|
10856
|
-
x2: "8.813%",
|
|
10857
|
-
y2: "86.427%",
|
|
10858
|
-
id: "empty-image_svg__g"
|
|
10859
|
-
}, /*#__PURE__*/React.createElement("stop", {
|
|
10860
|
-
stopColor: "#CCD0DD",
|
|
10861
|
-
offset: "0%"
|
|
10862
|
-
}), /*#__PURE__*/React.createElement("stop", {
|
|
10863
|
-
stopColor: "#9DA3B9",
|
|
10864
|
-
offset: "100%"
|
|
10865
|
-
})), /*#__PURE__*/React.createElement("path", {
|
|
10866
|
-
d: "M59 19a4 4 0 0 1 4 4v7.314L51.686 19H59z",
|
|
10867
|
-
id: "empty-image_svg__f"
|
|
10868
|
-
}), /*#__PURE__*/React.createElement("filter", {
|
|
10869
|
-
x: "-61.9%",
|
|
10870
|
-
y: "-79.5%",
|
|
10871
|
-
width: "223.7%",
|
|
10872
|
-
height: "223.7%",
|
|
10873
|
-
filterUnits: "objectBoundingBox",
|
|
10874
|
-
id: "empty-image_svg__e"
|
|
10875
|
-
}, /*#__PURE__*/React.createElement("feOffset", {
|
|
10876
|
-
dy: -2,
|
|
10877
|
-
in: "SourceAlpha",
|
|
10878
|
-
result: "shadowOffsetOuter1"
|
|
10879
|
-
}), /*#__PURE__*/React.createElement("feGaussianBlur", {
|
|
10880
|
-
stdDeviation: 2,
|
|
10881
|
-
in: "shadowOffsetOuter1",
|
|
10882
|
-
result: "shadowBlurOuter1"
|
|
10883
|
-
}), /*#__PURE__*/React.createElement("feColorMatrix", {
|
|
10884
|
-
values: "0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0",
|
|
10885
|
-
in: "shadowBlurOuter1"
|
|
10886
|
-
})));
|
|
10887
|
-
|
|
10888
|
-
var _ref2 = /*#__PURE__*/React.createElement("g", {
|
|
10889
|
-
fill: "none",
|
|
10890
|
-
fillRule: "evenodd"
|
|
10891
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
10892
|
-
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",
|
|
10893
|
-
fill: "#A6AAC3"
|
|
10894
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
10895
|
-
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",
|
|
10896
|
-
fill: "url(#empty-image_svg__a)"
|
|
10897
|
-
}), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("use", {
|
|
10898
|
-
fill: "#000",
|
|
10899
|
-
filter: "url(#empty-image_svg__b)",
|
|
10900
|
-
xlinkHref: "#empty-image_svg__c"
|
|
10901
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
10902
|
-
stroke: "#FFF",
|
|
10903
|
-
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",
|
|
10904
|
-
strokeLinejoin: "square",
|
|
10905
|
-
fill: "url(#empty-image_svg__d)"
|
|
10906
|
-
})), /*#__PURE__*/React.createElement("g", {
|
|
10907
|
-
transform: "rotate(180 57.343 24.657)"
|
|
10908
|
-
}, /*#__PURE__*/React.createElement("use", {
|
|
10909
|
-
fill: "#000",
|
|
10910
|
-
filter: "url(#empty-image_svg__e)",
|
|
10911
|
-
xlinkHref: "#empty-image_svg__f"
|
|
10912
|
-
}), /*#__PURE__*/React.createElement("use", {
|
|
10913
|
-
fill: "url(#empty-image_svg__g)",
|
|
10914
|
-
xlinkHref: "#empty-image_svg__f"
|
|
10915
|
-
})), /*#__PURE__*/React.createElement("path", {
|
|
10916
|
-
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",
|
|
10917
|
-
fill: "#D6D8E4",
|
|
10918
|
-
opacity: 0.3
|
|
10919
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
10920
|
-
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",
|
|
10921
|
-
fill: "#D6D8E4"
|
|
10922
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
10923
|
-
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",
|
|
10924
|
-
fill: "#D6D8E4",
|
|
10925
|
-
opacity: 0.5
|
|
10926
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
10927
|
-
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",
|
|
10928
|
-
fill: "#D6D8E4",
|
|
10929
|
-
opacity: 0.8
|
|
10930
|
-
}));
|
|
10931
|
-
|
|
10932
|
-
function SvgEmptyImage(props) {
|
|
10933
|
-
return /*#__PURE__*/React.createElement("svg", _extends({
|
|
10934
|
-
width: 86,
|
|
10935
|
-
height: 80,
|
|
10936
|
-
viewBox: "0 0 86 80",
|
|
10937
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
10938
|
-
xmlnsXlink: "http://www.w3.org/1999/xlink"
|
|
10939
|
-
}, props), _ref, _ref2);
|
|
10940
|
-
}
|
|
10804
|
+
var emptyImage = "empty-image.397ff6359f4066d8.png";
|
|
10941
10805
|
|
|
10942
10806
|
/**
|
|
10943
10807
|
* 用于展示空数据的 React 组件。
|
|
10944
10808
|
*/
|
|
10945
10809
|
function EasyopsEmpty(props) {
|
|
10946
|
-
var emptyImage = SvgEmptyImage;
|
|
10947
10810
|
var illustration = useMemo(() => props.illustration && getIllustration(props.illustration), [props.illustration]);
|
|
10948
|
-
var image = props.illustration ? illustration :
|
|
10949
|
-
return /*#__PURE__*/
|
|
10811
|
+
var image = props.illustration ? illustration : getImageUrl(emptyImage);
|
|
10812
|
+
return /*#__PURE__*/React.createElement(Empty, {
|
|
10950
10813
|
image: image,
|
|
10951
10814
|
imageStyle: props.imageStyle,
|
|
10952
10815
|
description: props.description
|
|
10953
10816
|
});
|
|
10954
10817
|
}
|
|
10818
|
+
|
|
10819
|
+
function getImageUrl(url) {
|
|
10820
|
+
var _window$CORE_ROOT;
|
|
10821
|
+
|
|
10822
|
+
return "".concat((_window$CORE_ROOT = window.CORE_ROOT) !== null && _window$CORE_ROOT !== void 0 ? _window$CORE_ROOT : "", "assets/").concat(url);
|
|
10823
|
+
}
|
|
10955
10824
|
/**
|
|
10956
10825
|
* 调用后获得一个默认的展示空数据的 React 组件。
|
|
10957
10826
|
*/
|
|
10958
10827
|
|
|
10828
|
+
|
|
10959
10829
|
function renderEasyopsEmpty() {
|
|
10960
|
-
return /*#__PURE__*/
|
|
10830
|
+
return /*#__PURE__*/React.createElement(EasyopsEmpty, null);
|
|
10961
10831
|
}
|
|
10962
10832
|
|
|
10963
10833
|
var FeatureFlagsContext = /*#__PURE__*/createContext(null);
|
|
@@ -11027,7 +10897,7 @@ function useFeatureFlags(name) {
|
|
|
11027
10897
|
|
|
11028
10898
|
function DisplayByFeatureFlags(props) {
|
|
11029
10899
|
var featureFlags = useFeatureFlags(props.name);
|
|
11030
|
-
return featureFlags.every(flag => !!flag) ? /*#__PURE__*/
|
|
10900
|
+
return featureFlags.every(flag => !!flag) ? /*#__PURE__*/React.createElement(React.Fragment, null, props.children) : props !== null && props !== void 0 && props.fallback ? /*#__PURE__*/React.createElement(React.Fragment, null, props === null || props === void 0 ? void 0 : props.fallback) : null;
|
|
11031
10901
|
}
|
|
11032
10902
|
|
|
11033
10903
|
/**
|
|
@@ -11037,15 +10907,15 @@ function BrickWrapper(props) {
|
|
|
11037
10907
|
var locale = i18next.language && i18next.language.split("-")[0] === "en" ? defaultLocale : zhCN; // istanbul ignore next
|
|
11038
10908
|
|
|
11039
10909
|
var featureFlags = process.env.NODE_ENV === "test" ? {} : getRuntime().getFeatureFlags();
|
|
11040
|
-
return /*#__PURE__*/
|
|
10910
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(FeatureFlagsProvider, {
|
|
11041
10911
|
value: featureFlags
|
|
11042
|
-
}, /*#__PURE__*/
|
|
10912
|
+
}, /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
11043
10913
|
locale: locale,
|
|
11044
10914
|
autoInsertSpaceInButton: false,
|
|
11045
10915
|
renderEmpty: () => {
|
|
11046
10916
|
var _props$wrapperConfig;
|
|
11047
10917
|
|
|
11048
|
-
return /*#__PURE__*/
|
|
10918
|
+
return /*#__PURE__*/React.createElement(EasyopsEmpty, (_props$wrapperConfig = props.wrapperConfig) === null || _props$wrapperConfig === void 0 ? void 0 : _props$wrapperConfig.empty);
|
|
11049
10919
|
}
|
|
11050
10920
|
}, props.children)));
|
|
11051
10921
|
}
|