@next-core/brick-kit 2.118.5 → 2.118.6
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 +50 -253
- package/dist/index.bundle.js +18 -30
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +20 -32
- package/dist/index.esm.js.map +1 -1
- package/package.json +10 -10
package/dist/index.esm.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { parsePath, createBrowserHistory, locationsAreEqual, createPath } from 'history';
|
|
2
|
-
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
3
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
4
1
|
import _asyncToGenerator$4 from '@babel/runtime/helpers/asyncToGenerator';
|
|
5
2
|
import _defineProperty$1 from '@babel/runtime/helpers/defineProperty';
|
|
6
|
-
import
|
|
3
|
+
import _objectSpread from '@babel/runtime/helpers/objectSpread2';
|
|
4
|
+
import { Modal, message, Empty, ConfigProvider } from 'antd';
|
|
5
|
+
import { userAnalytics, apiAnalyzer } from '@next-core/easyops-analytics';
|
|
6
|
+
import React, { useState, useEffect, useRef, forwardRef, useImperativeHandle, useMemo, createContext, useContext, useReducer, useCallback } from 'react';
|
|
7
|
+
import { http, HttpResponseError, HttpFetchError } from '@next-core/brick-http';
|
|
8
|
+
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
9
|
+
import i18next, { getFixedT } from 'i18next';
|
|
10
|
+
import { parsePath, createBrowserHistory, locationsAreEqual, createPath } from 'history';
|
|
11
|
+
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
7
12
|
import { JsonStorage, toPath, computeRealRoutePath, hasOwnProperty, isObject, isEvaluable, transformAndInject, transform, trackContext, trackState, scanPermissionActionsInStoryboard, precookFunction, cook, resolveContextConcurrently, syncResolveContextConcurrently, shouldAllowRecursiveEvaluations, preevaluate, inject, deepFreeze, createProviderClass, loadScript, getTemplateDepsOfStoryboard, getDllAndDepsOfStoryboard, asyncProcessStoryboard, getDllAndDepsByResource, scanRouteAliasInStoryboard, prefetchScript, scanBricksInBrickConf, scanProcessorsInAny, matchPath, scanAppGetMenuInAny, asyncProcessBrick, restoreDynamicTemplates, mapCustomApisToNameAndNamespace, scanCustomApisInStoryboard } from '@next-core/brick-utils';
|
|
8
13
|
import lodash, { set, get, difference, identity, uniqueId, cloneDeep, clamp, isNil, sortBy, merge, pick, orderBy, omit, findLastIndex, noop, isObject as isObject$1, isString } from 'lodash';
|
|
9
|
-
import { http, HttpResponseError, HttpFetchError } from '@next-core/brick-http';
|
|
10
14
|
import moment from 'moment';
|
|
11
15
|
import { pipes } from '@next-core/pipes';
|
|
12
|
-
import i18next, { getFixedT } from 'i18next';
|
|
13
|
-
import { userAnalytics, apiAnalyzer } from '@next-core/easyops-analytics';
|
|
14
|
-
import { Modal, message, Empty, ConfigProvider } from 'antd';
|
|
15
|
-
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
16
16
|
import yaml from 'js-yaml';
|
|
17
17
|
import { withTranslation } from 'react-i18next';
|
|
18
18
|
import _extends from '@babel/runtime/helpers/esm/extends';
|
|
@@ -1224,7 +1224,6 @@ var locale$7 = {
|
|
|
1224
1224
|
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1225
1225
|
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1226
1226
|
};
|
|
1227
|
-
var en = locale$7;
|
|
1228
1227
|
|
|
1229
1228
|
var locale$6 = {
|
|
1230
1229
|
[K.REQUEST_FAILED]: "请求失败",
|
|
@@ -1234,13 +1233,12 @@ var locale$6 = {
|
|
|
1234
1233
|
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1235
1234
|
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1236
1235
|
};
|
|
1237
|
-
var zh = locale$6;
|
|
1238
1236
|
|
|
1239
1237
|
/** @internal */
|
|
1240
1238
|
|
|
1241
1239
|
var initI18n = () => {
|
|
1242
|
-
i18next.addResourceBundle("en", NS_BRICK_KIT,
|
|
1243
|
-
i18next.addResourceBundle("zh", NS_BRICK_KIT,
|
|
1240
|
+
i18next.addResourceBundle("en", NS_BRICK_KIT, locale$7);
|
|
1241
|
+
i18next.addResourceBundle("zh", NS_BRICK_KIT, locale$6);
|
|
1244
1242
|
};
|
|
1245
1243
|
/** @internal */
|
|
1246
1244
|
|
|
@@ -12030,7 +12028,6 @@ var locale$4 = {
|
|
|
12030
12028
|
placeholder: '请选择时间',
|
|
12031
12029
|
rangePlaceholder: ['开始时间', '结束时间']
|
|
12032
12030
|
};
|
|
12033
|
-
var TimePicker$1 = locale$4;
|
|
12034
12031
|
|
|
12035
12032
|
var locale$3 = {
|
|
12036
12033
|
lang: _extends({
|
|
@@ -12044,22 +12041,19 @@ var locale$3 = {
|
|
|
12044
12041
|
rangeMonthPlaceholder: ['开始月份', '结束月份'],
|
|
12045
12042
|
rangeWeekPlaceholder: ['开始周', '结束周']
|
|
12046
12043
|
}, locale$5),
|
|
12047
|
-
timePickerLocale: _extends({},
|
|
12044
|
+
timePickerLocale: _extends({}, locale$4)
|
|
12048
12045
|
}; // should add whitespace between char in Button
|
|
12049
12046
|
|
|
12050
12047
|
locale$3.lang.ok = '确 定'; // All settings at:
|
|
12051
|
-
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
12052
|
-
|
|
12053
|
-
var DatePicker$1 = locale$3;
|
|
12054
12048
|
|
|
12055
12049
|
/* eslint-disable no-template-curly-in-string */
|
|
12056
12050
|
var typeTemplate$1 = '${label}不是一个有效的${type}';
|
|
12057
12051
|
var localeValues$1 = {
|
|
12058
12052
|
locale: 'zh-cn',
|
|
12059
12053
|
Pagination: Pagination$1,
|
|
12060
|
-
DatePicker:
|
|
12061
|
-
TimePicker:
|
|
12062
|
-
Calendar:
|
|
12054
|
+
DatePicker: locale$3,
|
|
12055
|
+
TimePicker: locale$4,
|
|
12056
|
+
Calendar: locale$3,
|
|
12063
12057
|
// locales for all components
|
|
12064
12058
|
global: {
|
|
12065
12059
|
placeholder: '请选择'
|
|
@@ -12176,7 +12170,6 @@ var localeValues$1 = {
|
|
|
12176
12170
|
preview: '预览'
|
|
12177
12171
|
}
|
|
12178
12172
|
};
|
|
12179
|
-
var zhCN = localeValues$1;
|
|
12180
12173
|
|
|
12181
12174
|
var Pagination = {
|
|
12182
12175
|
// Options.jsx
|
|
@@ -12227,7 +12220,6 @@ var locale$1 = {
|
|
|
12227
12220
|
placeholder: 'Select time',
|
|
12228
12221
|
rangePlaceholder: ['Start time', 'End time']
|
|
12229
12222
|
};
|
|
12230
|
-
var TimePicker = locale$1;
|
|
12231
12223
|
|
|
12232
12224
|
var locale = {
|
|
12233
12225
|
lang: _extends({
|
|
@@ -12241,20 +12233,17 @@ var locale = {
|
|
|
12241
12233
|
rangeMonthPlaceholder: ['Start month', 'End month'],
|
|
12242
12234
|
rangeWeekPlaceholder: ['Start week', 'End week']
|
|
12243
12235
|
}, locale$2),
|
|
12244
|
-
timePickerLocale: _extends({},
|
|
12236
|
+
timePickerLocale: _extends({}, locale$1)
|
|
12245
12237
|
}; // All settings at:
|
|
12246
|
-
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
|
|
12247
|
-
|
|
12248
|
-
var DatePicker = locale;
|
|
12249
12238
|
|
|
12250
12239
|
/* eslint-disable no-template-curly-in-string */
|
|
12251
12240
|
var typeTemplate = '${label} is not a valid ${type}';
|
|
12252
12241
|
var localeValues = {
|
|
12253
12242
|
locale: 'en',
|
|
12254
12243
|
Pagination: Pagination,
|
|
12255
|
-
DatePicker:
|
|
12256
|
-
TimePicker:
|
|
12257
|
-
Calendar:
|
|
12244
|
+
DatePicker: locale,
|
|
12245
|
+
TimePicker: locale$1,
|
|
12246
|
+
Calendar: locale,
|
|
12258
12247
|
global: {
|
|
12259
12248
|
placeholder: 'Please select'
|
|
12260
12249
|
},
|
|
@@ -12372,7 +12361,6 @@ var localeValues = {
|
|
|
12372
12361
|
preview: 'Preview'
|
|
12373
12362
|
}
|
|
12374
12363
|
};
|
|
12375
|
-
var defaultLocale = localeValues;
|
|
12376
12364
|
|
|
12377
12365
|
/* eslint-disable react/jsx-key */
|
|
12378
12366
|
function EmptySvg(props) {
|
|
@@ -13087,7 +13075,7 @@ function DisplayByFeatureFlags(props) {
|
|
|
13087
13075
|
* 构件的 React 组件包装器,包含 ErrorBoundary, ConfigProvider, FeatureFlagsProvider。
|
|
13088
13076
|
*/
|
|
13089
13077
|
function BrickWrapper(props) {
|
|
13090
|
-
var locale = i18next.language && i18next.language.split("-")[0] === "en" ?
|
|
13078
|
+
var locale = i18next.language && i18next.language.split("-")[0] === "en" ? localeValues : localeValues$1; // istanbul ignore next
|
|
13091
13079
|
|
|
13092
13080
|
var featureFlags = process.env.NODE_ENV === "test" ? {} : getRuntime().getFeatureFlags();
|
|
13093
13081
|
return /*#__PURE__*/React.createElement(ErrorBoundary, null, /*#__PURE__*/React.createElement(FeatureFlagsProvider, {
|