@next-core/brick-kit 2.91.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 +11 -0
- package/dist/EasyopsEmpty/empty-image.397ff6359f4066d8.png +0 -0
- package/dist/index.bundle.js +7 -166
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +46 -187
- package/dist/index.esm.js.map +1 -1
- package/dist/types/EasyopsEmpty/EasyopsEmpty.d.ts.map +1 -1
- package/dist/types/core/Router.d.ts.map +1 -1
- package/package.json +2 -2
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
|
|
|
@@ -3109,8 +3108,8 @@ function handleHttpError(error) {
|
|
|
3109
3108
|
}
|
|
3110
3109
|
|
|
3111
3110
|
unauthenticatedConfirmModal = Modal.confirm({
|
|
3112
|
-
icon: /*#__PURE__*/
|
|
3113
|
-
content: /*#__PURE__*/
|
|
3111
|
+
icon: /*#__PURE__*/React.createElement(ExclamationCircleOutlined, null),
|
|
3112
|
+
content: /*#__PURE__*/React.createElement(LoginTimeoutMessage, null),
|
|
3114
3113
|
okText: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.MODAL_OK)),
|
|
3115
3114
|
cancelText: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.MODAL_CANCEL)),
|
|
3116
3115
|
onOk: () => {
|
|
@@ -3128,7 +3127,7 @@ function handleHttpError(error) {
|
|
|
3128
3127
|
|
|
3129
3128
|
return Modal.error({
|
|
3130
3129
|
title: i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.REQUEST_FAILED)),
|
|
3131
|
-
content: /*#__PURE__*/
|
|
3130
|
+
content: /*#__PURE__*/React.createElement("div", {
|
|
3132
3131
|
style: {
|
|
3133
3132
|
whiteSpace: "pre-wrap"
|
|
3134
3133
|
}
|
|
@@ -3137,13 +3136,13 @@ function handleHttpError(error) {
|
|
|
3137
3136
|
});
|
|
3138
3137
|
}
|
|
3139
3138
|
function LoginTimeoutMessage() {
|
|
3140
|
-
|
|
3139
|
+
React.useEffect(() => {
|
|
3141
3140
|
// Unset confirm modal when it's destroyed.
|
|
3142
3141
|
return () => {
|
|
3143
3142
|
unauthenticatedConfirmModal = undefined;
|
|
3144
3143
|
};
|
|
3145
3144
|
}, []);
|
|
3146
|
-
return /*#__PURE__*/
|
|
3145
|
+
return /*#__PURE__*/React.createElement("div", null, i18next.t("".concat(NS_BRICK_KIT, ":").concat(K.LOGIN_TIMEOUT_MESSAGE)));
|
|
3147
3146
|
}
|
|
3148
3147
|
|
|
3149
3148
|
class WebsocketMessageRequest {
|
|
@@ -9373,7 +9372,8 @@ class Router {
|
|
|
9373
9372
|
mountRoutesResult.main = [{
|
|
9374
9373
|
type: brickPageError,
|
|
9375
9374
|
properties: {
|
|
9376
|
-
error: httpErrorToString(error)
|
|
9375
|
+
error: httpErrorToString(error),
|
|
9376
|
+
code: error instanceof HttpResponseError ? error.response.status : null
|
|
9377
9377
|
},
|
|
9378
9378
|
events: {}
|
|
9379
9379
|
}];
|
|
@@ -9631,7 +9631,7 @@ function getRuntime() {
|
|
|
9631
9631
|
}
|
|
9632
9632
|
|
|
9633
9633
|
// Ref https://reactjs.org/docs/error-boundaries.html
|
|
9634
|
-
class LegacyErrorBoundary extends
|
|
9634
|
+
class LegacyErrorBoundary extends React.Component {
|
|
9635
9635
|
constructor(props) {
|
|
9636
9636
|
super(props);
|
|
9637
9637
|
this.state = {
|
|
@@ -9654,9 +9654,9 @@ class LegacyErrorBoundary extends React__default.Component {
|
|
|
9654
9654
|
render() {
|
|
9655
9655
|
if (this.state.error) {
|
|
9656
9656
|
// You can render any custom fallback UI
|
|
9657
|
-
return /*#__PURE__*/
|
|
9657
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
9658
9658
|
"data-testid": "error-boundary"
|
|
9659
|
-
}, /*#__PURE__*/
|
|
9659
|
+
}, /*#__PURE__*/React.createElement("h3", null, this.props.t(K.SOMETHING_WENT_WRONG)), /*#__PURE__*/React.createElement("p", null, httpErrorToString(this.state.error)));
|
|
9660
9660
|
}
|
|
9661
9661
|
|
|
9662
9662
|
return this.props.children;
|
|
@@ -9851,8 +9851,8 @@ function useApplyPageTitle(pageTitle) {
|
|
|
9851
9851
|
/** @internal */
|
|
9852
9852
|
|
|
9853
9853
|
function useRecentApps() {
|
|
9854
|
-
var [recentApps, setRecentApps] =
|
|
9855
|
-
|
|
9854
|
+
var [recentApps, setRecentApps] = React.useState(getRuntime().getRecentApps());
|
|
9855
|
+
React.useEffect(() => {
|
|
9856
9856
|
var listener = event => {
|
|
9857
9857
|
setRecentApps(event.detail);
|
|
9858
9858
|
};
|
|
@@ -9886,8 +9886,8 @@ function useCurrentApp() {
|
|
|
9886
9886
|
|
|
9887
9887
|
function useLocation() {
|
|
9888
9888
|
var history = getHistory();
|
|
9889
|
-
var [location, setLocation] =
|
|
9890
|
-
|
|
9889
|
+
var [location, setLocation] = React.useState(history.location);
|
|
9890
|
+
React.useEffect(() => {
|
|
9891
9891
|
var unlisten = history.listen(location => setLocation(location));
|
|
9892
9892
|
return unlisten;
|
|
9893
9893
|
}, [history]);
|
|
@@ -10038,7 +10038,7 @@ var handleProxyOfParentTemplate = (brick, tplContextId, tplContext) => {
|
|
|
10038
10038
|
* @param props - 属性。
|
|
10039
10039
|
*/
|
|
10040
10040
|
|
|
10041
|
-
var SingleBrickAsComponent = /*#__PURE__*/
|
|
10041
|
+
var SingleBrickAsComponent = /*#__PURE__*/React.memo(function SingleBrickAsComponent(_ref2) {
|
|
10042
10042
|
var {
|
|
10043
10043
|
useBrick,
|
|
10044
10044
|
data,
|
|
@@ -10051,7 +10051,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10051
10051
|
|
|
10052
10052
|
var template;
|
|
10053
10053
|
var brick;
|
|
10054
|
-
var isBrickAvailable =
|
|
10054
|
+
var isBrickAvailable = React.useMemo(() => {
|
|
10055
10055
|
if (isObject(useBrick.if) && !isPreEvaluated(useBrick.if)) {
|
|
10056
10056
|
// eslint-disable-next-line
|
|
10057
10057
|
console.warn("Currently resolvable-if in `useBrick` is not supported.");
|
|
@@ -10065,7 +10065,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10065
10065
|
|
|
10066
10066
|
return true;
|
|
10067
10067
|
}, [useBrick, data]);
|
|
10068
|
-
var runtimeBrick =
|
|
10068
|
+
var runtimeBrick = React.useMemo( /*#__PURE__*/_asyncToGenerator$4(function* () {
|
|
10069
10069
|
if (!isBrickAvailable) {
|
|
10070
10070
|
return null;
|
|
10071
10071
|
} // If the router state is initial, ignore rendering the sub-brick.
|
|
@@ -10104,7 +10104,7 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10104
10104
|
|
|
10105
10105
|
return brick;
|
|
10106
10106
|
}), [useBrick, data, isBrickAvailable]);
|
|
10107
|
-
var innerRefCallback =
|
|
10107
|
+
var innerRefCallback = React.useCallback( /*#__PURE__*/function () {
|
|
10108
10108
|
var _ref5 = _asyncToGenerator$4(function* (element) {
|
|
10109
10109
|
immediatelyRefCallback === null || immediatelyRefCallback === void 0 ? void 0 : immediatelyRefCallback(element);
|
|
10110
10110
|
|
|
@@ -10159,24 +10159,24 @@ var SingleBrickAsComponent = /*#__PURE__*/React__default.memo(function SingleBri
|
|
|
10159
10159
|
}
|
|
10160
10160
|
|
|
10161
10161
|
if (template) {
|
|
10162
|
-
return /*#__PURE__*/
|
|
10162
|
+
return /*#__PURE__*/React.createElement(template.brick, {
|
|
10163
10163
|
ref: innerRefCallback
|
|
10164
10164
|
}, ...slotsToChildren(template.slots).map((item, index) => {
|
|
10165
|
-
return /*#__PURE__*/
|
|
10165
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10166
10166
|
key: index,
|
|
10167
10167
|
useBrick: item,
|
|
10168
10168
|
data: brick.properties
|
|
10169
10169
|
});
|
|
10170
10170
|
}));
|
|
10171
10171
|
} else {
|
|
10172
|
-
return /*#__PURE__*/
|
|
10172
|
+
return /*#__PURE__*/React.createElement(useBrick.brick, {
|
|
10173
10173
|
ref: innerRefCallback
|
|
10174
10174
|
}, ...slotsToChildren(useBrick.slots).map((item, index) => {
|
|
10175
10175
|
if (useBrick[symbolForTplContextId] && !item[symbolForTplContextId]) {
|
|
10176
10176
|
item[symbolForTplContextId] = useBrick[symbolForTplContextId];
|
|
10177
10177
|
}
|
|
10178
10178
|
|
|
10179
|
-
return /*#__PURE__*/
|
|
10179
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10180
10180
|
key: index,
|
|
10181
10181
|
useBrick: item,
|
|
10182
10182
|
data: data
|
|
@@ -10212,7 +10212,7 @@ function BrickAsComponent(_ref6) {
|
|
|
10212
10212
|
} = _ref6;
|
|
10213
10213
|
|
|
10214
10214
|
if (Array.isArray(useBrick)) {
|
|
10215
|
-
return /*#__PURE__*/
|
|
10215
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, useBrick.map((item, index) => /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10216
10216
|
key: index,
|
|
10217
10217
|
useBrick: item,
|
|
10218
10218
|
data: data,
|
|
@@ -10220,7 +10220,7 @@ function BrickAsComponent(_ref6) {
|
|
|
10220
10220
|
})));
|
|
10221
10221
|
}
|
|
10222
10222
|
|
|
10223
|
-
return /*#__PURE__*/
|
|
10223
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10224
10224
|
useBrick: useBrick,
|
|
10225
10225
|
data: data,
|
|
10226
10226
|
parentRefForUseBrickInPortal: parentRefForUseBrickInPortal
|
|
@@ -10253,7 +10253,7 @@ function transformEvents(data, events) {
|
|
|
10253
10253
|
// eslint-disable-next-line react/display-name
|
|
10254
10254
|
|
|
10255
10255
|
|
|
10256
|
-
var ForwardRefSingleBrickAsComponent = /*#__PURE__*/
|
|
10256
|
+
var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React.memo( /*#__PURE__*/forwardRef(function LegacySingleBrickAsComponent(_ref8, ref) {
|
|
10257
10257
|
var {
|
|
10258
10258
|
useBrick,
|
|
10259
10259
|
data,
|
|
@@ -10266,7 +10266,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10266
10266
|
|
|
10267
10267
|
var template;
|
|
10268
10268
|
var brick;
|
|
10269
|
-
var isBrickAvailable =
|
|
10269
|
+
var isBrickAvailable = React.useMemo(() => {
|
|
10270
10270
|
if (isObject(useBrick.if) && !isPreEvaluated(useBrick.if)) {
|
|
10271
10271
|
// eslint-disable-next-line
|
|
10272
10272
|
console.warn("Currently resolvable-if in `useBrick` is not supported.");
|
|
@@ -10283,7 +10283,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10283
10283
|
useImperativeHandle(ref, () => {
|
|
10284
10284
|
return brickRef.current;
|
|
10285
10285
|
});
|
|
10286
|
-
var runtimeBrick =
|
|
10286
|
+
var runtimeBrick = React.useMemo( /*#__PURE__*/_asyncToGenerator$4(function* () {
|
|
10287
10287
|
if (!isBrickAvailable) {
|
|
10288
10288
|
return null;
|
|
10289
10289
|
} // If the router state is initial, ignore rendering the sub-brick.
|
|
@@ -10324,7 +10324,7 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10324
10324
|
listenOnTrackingContext(brick, trackingContextList, runtimeContext);
|
|
10325
10325
|
return brick;
|
|
10326
10326
|
}), [useBrick, data, isBrickAvailable]);
|
|
10327
|
-
var innerRefCallback =
|
|
10327
|
+
var innerRefCallback = React.useCallback( /*#__PURE__*/function () {
|
|
10328
10328
|
var _ref11 = _asyncToGenerator$4(function* (element) {
|
|
10329
10329
|
brickRef.current = element;
|
|
10330
10330
|
|
|
@@ -10379,24 +10379,24 @@ var ForwardRefSingleBrickAsComponent = /*#__PURE__*/React__default.memo( /*#__PU
|
|
|
10379
10379
|
}
|
|
10380
10380
|
|
|
10381
10381
|
if (template) {
|
|
10382
|
-
return /*#__PURE__*/
|
|
10382
|
+
return /*#__PURE__*/React.createElement(template.brick, {
|
|
10383
10383
|
ref: innerRefCallback
|
|
10384
10384
|
}, ...slotsToChildren(template.slots).map((item, index) => {
|
|
10385
|
-
return /*#__PURE__*/
|
|
10385
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10386
10386
|
key: index,
|
|
10387
10387
|
useBrick: item,
|
|
10388
10388
|
data: brick.properties
|
|
10389
10389
|
});
|
|
10390
10390
|
}));
|
|
10391
10391
|
} else {
|
|
10392
|
-
return /*#__PURE__*/
|
|
10392
|
+
return /*#__PURE__*/React.createElement(useBrick.brick, {
|
|
10393
10393
|
ref: innerRefCallback
|
|
10394
10394
|
}, ...slotsToChildren(useBrick.slots).map((item, index) => {
|
|
10395
10395
|
if (useBrick[symbolForTplContextId] && !item[symbolForTplContextId]) {
|
|
10396
10396
|
item[symbolForTplContextId] = useBrick[symbolForTplContextId];
|
|
10397
10397
|
}
|
|
10398
10398
|
|
|
10399
|
-
return /*#__PURE__*/
|
|
10399
|
+
return /*#__PURE__*/React.createElement(SingleBrickAsComponent, {
|
|
10400
10400
|
key: index,
|
|
10401
10401
|
useBrick: item,
|
|
10402
10402
|
data: data
|
|
@@ -10456,7 +10456,7 @@ var locale$4 = {
|
|
|
10456
10456
|
var TimePicker$1 = locale$4;
|
|
10457
10457
|
|
|
10458
10458
|
var locale$3 = {
|
|
10459
|
-
lang: _extends
|
|
10459
|
+
lang: _extends({
|
|
10460
10460
|
placeholder: '请选择日期',
|
|
10461
10461
|
yearPlaceholder: '请选择年份',
|
|
10462
10462
|
quarterPlaceholder: '请选择季度',
|
|
@@ -10467,7 +10467,7 @@ var locale$3 = {
|
|
|
10467
10467
|
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
10468
10468
|
rangeWeekPlaceholder: ['开始周', '结束周']
|
|
10469
10469
|
}, locale$5),
|
|
10470
|
-
timePickerLocale: _extends
|
|
10470
|
+
timePickerLocale: _extends({}, TimePicker$1)
|
|
10471
10471
|
}; // should add whitespace between char in Button
|
|
10472
10472
|
|
|
10473
10473
|
locale$3.lang.ok = '确 定'; // All settings at:
|
|
@@ -10653,7 +10653,7 @@ var locale$1 = {
|
|
|
10653
10653
|
var TimePicker = locale$1;
|
|
10654
10654
|
|
|
10655
10655
|
var locale = {
|
|
10656
|
-
lang: _extends
|
|
10656
|
+
lang: _extends({
|
|
10657
10657
|
placeholder: 'Select date',
|
|
10658
10658
|
yearPlaceholder: 'Select year',
|
|
10659
10659
|
quarterPlaceholder: 'Select quarter',
|
|
@@ -10664,7 +10664,7 @@ var locale = {
|
|
|
10664
10664
|
rangeMonthPlaceholder: ['Start month', 'End month'],
|
|
10665
10665
|
rangeWeekPlaceholder: ['Start week', 'End week']
|
|
10666
10666
|
}, locale$2),
|
|
10667
|
-
timePickerLocale: _extends
|
|
10667
|
+
timePickerLocale: _extends({}, TimePicker)
|
|
10668
10668
|
}; // All settings at:
|
|
10669
10669
|
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
10670
10670
|
|
|
@@ -10797,156 +10797,15 @@ var localeValues = {
|
|
|
10797
10797
|
};
|
|
10798
10798
|
var defaultLocale = localeValues;
|
|
10799
10799
|
|
|
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
|
-
}
|
|
10800
|
+
var emptyImage = "../EasyopsEmpty/empty-image.397ff6359f4066d8.png";
|
|
10941
10801
|
|
|
10942
10802
|
/**
|
|
10943
10803
|
* 用于展示空数据的 React 组件。
|
|
10944
10804
|
*/
|
|
10945
10805
|
function EasyopsEmpty(props) {
|
|
10946
|
-
var emptyImage = SvgEmptyImage;
|
|
10947
10806
|
var illustration = useMemo(() => props.illustration && getIllustration(props.illustration), [props.illustration]);
|
|
10948
|
-
var image = props.illustration ? illustration :
|
|
10949
|
-
return /*#__PURE__*/
|
|
10807
|
+
var image = props.illustration ? illustration : emptyImage;
|
|
10808
|
+
return /*#__PURE__*/React.createElement(Empty, {
|
|
10950
10809
|
image: image,
|
|
10951
10810
|
imageStyle: props.imageStyle,
|
|
10952
10811
|
description: props.description
|
|
@@ -10957,7 +10816,7 @@ function EasyopsEmpty(props) {
|
|
|
10957
10816
|
*/
|
|
10958
10817
|
|
|
10959
10818
|
function renderEasyopsEmpty() {
|
|
10960
|
-
return /*#__PURE__*/
|
|
10819
|
+
return /*#__PURE__*/React.createElement(EasyopsEmpty, null);
|
|
10961
10820
|
}
|
|
10962
10821
|
|
|
10963
10822
|
var FeatureFlagsContext = /*#__PURE__*/createContext(null);
|
|
@@ -11027,7 +10886,7 @@ function useFeatureFlags(name) {
|
|
|
11027
10886
|
|
|
11028
10887
|
function DisplayByFeatureFlags(props) {
|
|
11029
10888
|
var featureFlags = useFeatureFlags(props.name);
|
|
11030
|
-
return featureFlags.every(flag => !!flag) ? /*#__PURE__*/
|
|
10889
|
+
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
10890
|
}
|
|
11032
10891
|
|
|
11033
10892
|
/**
|
|
@@ -11037,15 +10896,15 @@ function BrickWrapper(props) {
|
|
|
11037
10896
|
var locale = i18next.language && i18next.language.split("-")[0] === "en" ? defaultLocale : zhCN; // istanbul ignore next
|
|
11038
10897
|
|
|
11039
10898
|
var featureFlags = process.env.NODE_ENV === "test" ? {} : getRuntime().getFeatureFlags();
|
|
11040
|
-
return /*#__PURE__*/
|
|
10899
|
+
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(FeatureFlagsProvider, {
|
|
11041
10900
|
value: featureFlags
|
|
11042
|
-
}, /*#__PURE__*/
|
|
10901
|
+
}, /*#__PURE__*/React.createElement(ConfigProvider, {
|
|
11043
10902
|
locale: locale,
|
|
11044
10903
|
autoInsertSpaceInButton: false,
|
|
11045
10904
|
renderEmpty: () => {
|
|
11046
10905
|
var _props$wrapperConfig;
|
|
11047
10906
|
|
|
11048
|
-
return /*#__PURE__*/
|
|
10907
|
+
return /*#__PURE__*/React.createElement(EasyopsEmpty, (_props$wrapperConfig = props.wrapperConfig) === null || _props$wrapperConfig === void 0 ? void 0 : _props$wrapperConfig.empty);
|
|
11049
10908
|
}
|
|
11050
10909
|
}, props.children)));
|
|
11051
10910
|
}
|