@next-core/brick-kit 2.123.4 → 2.123.7
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 +21 -61
- package/dist/index.bundle.js +39 -33
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +42 -36
- package/dist/index.esm.js.map +1 -1
- package/dist/types/internal/devtools.d.ts.map +1 -1
- package/dist/types/providers/CustomApi.d.ts.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,31 +3,29 @@
|
|
|
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.123.
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
6
|
+
## [2.123.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.6...@next-core/brick-kit@2.123.7) (2022-07-22)
|
|
9
7
|
|
|
10
8
|
|
|
9
|
+
### Bug Fixes
|
|
11
10
|
|
|
11
|
+
* **devtools:** try to emit only in idle time ([0bf3c47](https://github.com/easyops-cn/next-core/commit/0bf3c475cfc41d8badeb24480fc9d441d0dc1003))
|
|
12
12
|
|
|
13
13
|
|
|
14
|
-
## [2.123.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.2...@next-core/brick-kit@2.123.3) (2022-07-19)
|
|
15
14
|
|
|
16
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
17
15
|
|
|
18
16
|
|
|
17
|
+
## [2.123.6](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.5...@next-core/brick-kit@2.123.6) (2022-07-21)
|
|
19
18
|
|
|
20
19
|
|
|
20
|
+
### Bug Fixes
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
* some optimization ([b50ed9c](https://github.com/easyops-cn/next-core/commit/b50ed9c16925a3fb6849d337efa301aaa6a62c8d))
|
|
23
23
|
|
|
24
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
|
|
28
27
|
|
|
29
|
-
|
|
30
|
-
## [2.123.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.0...@next-core/brick-kit@2.123.1) (2022-07-18)
|
|
28
|
+
## [2.123.5](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.4...@next-core/brick-kit@2.123.5) (2022-07-20)
|
|
31
29
|
|
|
32
30
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
33
31
|
|
|
@@ -35,116 +33,78 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
|
|
|
35
33
|
|
|
36
34
|
|
|
37
35
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
### Features
|
|
36
|
+
## [2.123.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.3...@next-core/brick-kit@2.123.4) (2022-07-20)
|
|
42
37
|
|
|
43
|
-
|
|
38
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
44
39
|
|
|
40
|
+
## [2.123.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.2...@next-core/brick-kit@2.123.3) (2022-07-19)
|
|
45
41
|
|
|
42
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
46
43
|
|
|
44
|
+
## [2.123.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.1...@next-core/brick-kit@2.123.2) (2022-07-19)
|
|
47
45
|
|
|
46
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
48
47
|
|
|
49
|
-
## [2.
|
|
48
|
+
## [2.123.1](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.123.0...@next-core/brick-kit@2.123.1) (2022-07-18)
|
|
50
49
|
|
|
51
50
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
52
51
|
|
|
52
|
+
# [2.123.0](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.14...@next-core/brick-kit@2.123.0) (2022-07-18)
|
|
53
53
|
|
|
54
|
+
### Features
|
|
54
55
|
|
|
56
|
+
- contract support upload type ([c4614f8](https://github.com/easyops-cn/next-core/commit/c4614f8d588bf60c243444e95780b62eb3612371))
|
|
55
57
|
|
|
56
|
-
|
|
57
|
-
## [2.122.13](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.12...@next-core/brick-kit@2.122.13) (2022-07-15)
|
|
58
|
+
## [2.122.14](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.13...@next-core/brick-kit@2.122.14) (2022-07-15)
|
|
58
59
|
|
|
59
60
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
60
61
|
|
|
62
|
+
## [2.122.13](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.12...@next-core/brick-kit@2.122.13) (2022-07-15)
|
|
61
63
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
64
65
|
|
|
65
66
|
## [2.122.12](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.11...@next-core/brick-kit@2.122.12) (2022-07-14)
|
|
66
67
|
|
|
67
68
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
68
69
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
70
|
## [2.122.11](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.10...@next-core/brick-kit@2.122.11) (2022-07-14)
|
|
74
71
|
|
|
75
72
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
76
73
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
74
|
## [2.122.10](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.9...@next-core/brick-kit@2.122.10) (2022-07-12)
|
|
82
75
|
|
|
83
76
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
84
77
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
78
|
## [2.122.9](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.8...@next-core/brick-kit@2.122.9) (2022-07-12)
|
|
90
79
|
|
|
91
80
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
92
81
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
82
|
## [2.122.8](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.7...@next-core/brick-kit@2.122.8) (2022-07-12)
|
|
98
83
|
|
|
99
84
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
100
85
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
86
|
## [2.122.7](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.6...@next-core/brick-kit@2.122.7) (2022-07-07)
|
|
106
87
|
|
|
107
88
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
108
89
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
90
|
## [2.122.6](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.5...@next-core/brick-kit@2.122.6) (2022-07-05)
|
|
114
91
|
|
|
115
92
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
116
93
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
94
|
## [2.122.5](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.4...@next-core/brick-kit@2.122.5) (2022-07-04)
|
|
122
95
|
|
|
123
96
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
124
97
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
98
|
## [2.122.4](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.3...@next-core/brick-kit@2.122.4) (2022-06-27)
|
|
130
99
|
|
|
131
|
-
|
|
132
100
|
### Bug Fixes
|
|
133
101
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
102
|
+
- remove the request to fetch contarcts ([18f80d9](https://github.com/easyops-cn/next-core/commit/18f80d917f588956251621f27cc2d523cb5916fd))
|
|
139
103
|
|
|
140
104
|
## [2.122.3](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.2...@next-core/brick-kit@2.122.3) (2022-06-24)
|
|
141
105
|
|
|
142
106
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
143
107
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
108
|
## [2.122.2](https://github.com/easyops-cn/next-core/compare/@next-core/brick-kit@2.122.1...@next-core/brick-kit@2.122.2) (2022-06-24)
|
|
149
109
|
|
|
150
110
|
### Bug Fixes
|
package/dist/index.bundle.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@babel/runtime/helpers/
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@babel/runtime/helpers/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.BrickKit = {}, global.
|
|
5
|
-
})(this, (function (exports,
|
|
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('@next-core/brick-utils'), require('lodash'), require('@next-core/brick-http'), require('moment'), require('@next-core/pipes'), require('i18next'), require('@next-core/easyops-analytics'), require('antd'), require('@ant-design/icons'), require('js-yaml'), require('react-i18next'), require('@babel/runtime/helpers/esm/extends'), require('@next-core/illustrations'), require('@babel/runtime/helpers/decorate')) :
|
|
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', '@next-core/brick-utils', 'lodash', '@next-core/brick-http', 'moment', '@next-core/pipes', 'i18next', '@next-core/easyops-analytics', 'antd', '@ant-design/icons', 'js-yaml', '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.brickUtils, global._, global.brickHttp, global.moment, global.pipes, global.i18next, global.easyopsAnalytics, global.antd, global.icons, global.yaml, global.reactI18next, global._extends, global.illustrations, global._decorate));
|
|
5
|
+
})(this, (function (exports, history$1, _objectSpread, _objectWithoutProperties, _asyncToGenerator$4, _defineProperty$1, React, brickUtils, _, brickHttp, moment, pipes, i18next, easyopsAnalytics, antd, icons, yaml, 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
|
+
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
10
|
+
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
9
11
|
var _asyncToGenerator__default = /*#__PURE__*/_interopDefaultLegacy(_asyncToGenerator$4);
|
|
10
12
|
var _defineProperty__default = /*#__PURE__*/_interopDefaultLegacy(_defineProperty$1);
|
|
11
|
-
var _objectSpread__default = /*#__PURE__*/_interopDefaultLegacy(_objectSpread);
|
|
12
13
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
13
|
-
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
14
|
-
var _objectWithoutProperties__default = /*#__PURE__*/_interopDefaultLegacy(_objectWithoutProperties);
|
|
15
14
|
var ___default = /*#__PURE__*/_interopDefaultLegacy(_);
|
|
16
15
|
var moment__default = /*#__PURE__*/_interopDefaultLegacy(moment);
|
|
16
|
+
var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
|
|
17
17
|
var yaml__default = /*#__PURE__*/_interopDefaultLegacy(yaml);
|
|
18
18
|
var _extends__default = /*#__PURE__*/_interopDefaultLegacy(_extends);
|
|
19
19
|
var _decorate__default = /*#__PURE__*/_interopDefaultLegacy(_decorate);
|
|
@@ -1136,14 +1136,21 @@
|
|
|
1136
1136
|
|
|
1137
1137
|
/* istanbul ignore next */
|
|
1138
1138
|
function devtoolsHookEmit(type, payload) {
|
|
1139
|
-
|
|
1139
|
+
var emit = () => {
|
|
1140
1140
|
var _getDevHook, _getDevHook$emit;
|
|
1141
1141
|
|
|
1142
1142
|
(_getDevHook = getDevHook()) === null || _getDevHook === void 0 ? void 0 : (_getDevHook$emit = _getDevHook.emit) === null || _getDevHook$emit === void 0 ? void 0 : _getDevHook$emit.call(_getDevHook, {
|
|
1143
1143
|
type,
|
|
1144
1144
|
payload
|
|
1145
1145
|
});
|
|
1146
|
-
}
|
|
1146
|
+
}; // Try to emit only in idle time.
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
if (typeof window.requestIdleCallback === "function") {
|
|
1150
|
+
window.requestIdleCallback(emit);
|
|
1151
|
+
} else {
|
|
1152
|
+
setTimeout(emit, 0);
|
|
1153
|
+
}
|
|
1147
1154
|
}
|
|
1148
1155
|
function listenDevtools() {
|
|
1149
1156
|
window.addEventListener("message", event => {
|
|
@@ -1208,6 +1215,7 @@
|
|
|
1208
1215
|
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1209
1216
|
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1210
1217
|
};
|
|
1218
|
+
var en = locale$7;
|
|
1211
1219
|
|
|
1212
1220
|
var locale$6 = {
|
|
1213
1221
|
[K.REQUEST_FAILED]: "请求失败",
|
|
@@ -1217,12 +1225,13 @@
|
|
|
1217
1225
|
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1218
1226
|
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1219
1227
|
};
|
|
1228
|
+
var zh = locale$6;
|
|
1220
1229
|
|
|
1221
1230
|
/** @internal */
|
|
1222
1231
|
|
|
1223
1232
|
var initI18n = () => {
|
|
1224
|
-
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT,
|
|
1225
|
-
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT,
|
|
1233
|
+
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT, en);
|
|
1234
|
+
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT, zh);
|
|
1226
1235
|
};
|
|
1227
1236
|
/** @internal */
|
|
1228
1237
|
|
|
@@ -6971,19 +6980,29 @@
|
|
|
6971
6980
|
return flag;
|
|
6972
6981
|
}
|
|
6973
6982
|
function transformFormData(data) {
|
|
6983
|
+
if (data instanceof FormData) {
|
|
6984
|
+
return data;
|
|
6985
|
+
}
|
|
6986
|
+
|
|
6974
6987
|
var formData = new FormData();
|
|
6975
6988
|
|
|
6976
|
-
|
|
6989
|
+
var _loop = function (key, value) {
|
|
6977
6990
|
if (Array.isArray(value)) {
|
|
6978
|
-
(
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6991
|
+
value.forEach(v => {
|
|
6992
|
+
formData.append(key, v);
|
|
6993
|
+
});
|
|
6994
|
+
} else if (_.isObject(value) && !(value instanceof Blob) && !(value instanceof Date)) {
|
|
6995
|
+
Object.entries(value).forEach(_ref => {
|
|
6996
|
+
var [k, v] = _ref;
|
|
6997
|
+
formData.append("".concat(key, "[").concat(k, "]"), v);
|
|
6998
|
+
});
|
|
6984
6999
|
} else {
|
|
6985
7000
|
formData.append(key, value);
|
|
6986
7001
|
}
|
|
7002
|
+
};
|
|
7003
|
+
|
|
7004
|
+
for (var [key, value] of Object.entries(data)) {
|
|
7005
|
+
_loop(key, value);
|
|
6987
7006
|
}
|
|
6988
7007
|
|
|
6989
7008
|
return formData;
|
|
@@ -6993,14 +7012,14 @@
|
|
|
6993
7012
|
}
|
|
6994
7013
|
|
|
6995
7014
|
function _CustomApi() {
|
|
6996
|
-
_CustomApi = _asyncToGenerator__default["default"](function* (
|
|
7015
|
+
_CustomApi = _asyncToGenerator__default["default"](function* (_ref2) {
|
|
6997
7016
|
var {
|
|
6998
7017
|
url,
|
|
6999
7018
|
method = "GET",
|
|
7000
7019
|
responseWrapper = true,
|
|
7001
7020
|
ext_fields = [],
|
|
7002
7021
|
request
|
|
7003
|
-
} =
|
|
7022
|
+
} = _ref2;
|
|
7004
7023
|
var isSimpleRequest = ["get", "delete", "head"].includes(method.toLowerCase());
|
|
7005
7024
|
var response;
|
|
7006
7025
|
|
|
@@ -7886,19 +7905,6 @@
|
|
|
7886
7905
|
});
|
|
7887
7906
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
7888
7907
|
});
|
|
7889
|
-
presetPalettes.red;
|
|
7890
|
-
presetPalettes.volcano;
|
|
7891
|
-
presetPalettes.gold;
|
|
7892
|
-
presetPalettes.orange;
|
|
7893
|
-
presetPalettes.yellow;
|
|
7894
|
-
presetPalettes.lime;
|
|
7895
|
-
presetPalettes.green;
|
|
7896
|
-
presetPalettes.cyan;
|
|
7897
|
-
presetPalettes.blue;
|
|
7898
|
-
presetPalettes.geekblue;
|
|
7899
|
-
presetPalettes.purple;
|
|
7900
|
-
presetPalettes.magenta;
|
|
7901
|
-
presetPalettes.grey;
|
|
7902
7908
|
|
|
7903
7909
|
function getStyleByBaseColors(theme, baseColors, backgroundColor) {
|
|
7904
7910
|
return (theme === "dark" ? getDarkStyle : getLightStyle)("".concat(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor), theme), "\n").concat(getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor)));
|