@next-core/brick-kit 2.123.3 → 2.123.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 +17 -60
- package/dist/index.bundle.js +30 -31
- package/dist/index.bundle.js.map +1 -1
- package/dist/index.esm.js +33 -34
- package/dist/index.esm.js.map +1 -1
- package/dist/types/providers/CustomApi.d.ts.map +1 -1
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,140 +3,97 @@
|
|
|
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.
|
|
6
|
+
## [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)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
9
8
|
|
|
9
|
+
### Bug Fixes
|
|
10
10
|
|
|
11
|
+
* some optimization ([b50ed9c](https://github.com/easyops-cn/next-core/commit/b50ed9c16925a3fb6849d337efa301aaa6a62c8d))
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
## [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)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
17
15
|
|
|
18
16
|
|
|
17
|
+
## [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)
|
|
19
18
|
|
|
19
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
## [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)
|
|
23
22
|
|
|
24
|
-
**Note:** Version bump only for package @next-core/brick-kit
|
|
25
23
|
|
|
26
24
|
|
|
25
|
+
## [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)
|
|
27
26
|
|
|
27
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
28
28
|
|
|
29
|
+
## [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)
|
|
29
30
|
|
|
30
|
-
|
|
31
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
31
32
|
|
|
33
|
+
## [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)
|
|
32
34
|
|
|
33
|
-
|
|
35
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
## [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)
|
|
36
38
|
|
|
39
|
+
**Note:** Version bump only for package @next-core/brick-kit
|
|
37
40
|
|
|
41
|
+
# [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)
|
|
38
42
|
|
|
43
|
+
### Features
|
|
39
44
|
|
|
45
|
+
- contract support upload type ([c4614f8](https://github.com/easyops-cn/next-core/commit/c4614f8d588bf60c243444e95780b62eb3612371))
|
|
40
46
|
|
|
41
47
|
## [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)
|
|
42
48
|
|
|
43
49
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
44
50
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
51
|
## [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)
|
|
50
52
|
|
|
51
53
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
52
54
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
55
|
## [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)
|
|
58
56
|
|
|
59
57
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
60
58
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
59
|
## [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)
|
|
66
60
|
|
|
67
61
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
68
62
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
63
|
## [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)
|
|
74
64
|
|
|
75
65
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
76
66
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
67
|
## [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)
|
|
82
68
|
|
|
83
69
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
84
70
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
71
|
## [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)
|
|
90
72
|
|
|
91
73
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
92
74
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
75
|
## [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)
|
|
98
76
|
|
|
99
77
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
100
78
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
79
|
## [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)
|
|
106
80
|
|
|
107
81
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
108
82
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
83
|
## [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)
|
|
114
84
|
|
|
115
85
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
116
86
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
87
|
## [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)
|
|
122
88
|
|
|
123
|
-
|
|
124
89
|
### Bug Fixes
|
|
125
90
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
91
|
+
- remove the request to fetch contarcts ([18f80d9](https://github.com/easyops-cn/next-core/commit/18f80d917f588956251621f27cc2d523cb5916fd))
|
|
131
92
|
|
|
132
93
|
## [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)
|
|
133
94
|
|
|
134
95
|
**Note:** Version bump only for package @next-core/brick-kit
|
|
135
96
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
97
|
## [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)
|
|
141
98
|
|
|
142
99
|
### 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);
|
|
@@ -1208,6 +1208,7 @@
|
|
|
1208
1208
|
[K.LOGIN_TIMEOUT_MESSAGE]: "You haven't logged in or your login session has expired. Login right now?",
|
|
1209
1209
|
[K.NETWORK_ERROR]: "Network error, please check your network."
|
|
1210
1210
|
};
|
|
1211
|
+
var en = locale$7;
|
|
1211
1212
|
|
|
1212
1213
|
var locale$6 = {
|
|
1213
1214
|
[K.REQUEST_FAILED]: "请求失败",
|
|
@@ -1217,12 +1218,13 @@
|
|
|
1217
1218
|
[K.LOGIN_TIMEOUT_MESSAGE]: "您还未登录或登录信息已过期,现在重新登录?",
|
|
1218
1219
|
[K.NETWORK_ERROR]: "网络错误,请检查您的网络连接。"
|
|
1219
1220
|
};
|
|
1221
|
+
var zh = locale$6;
|
|
1220
1222
|
|
|
1221
1223
|
/** @internal */
|
|
1222
1224
|
|
|
1223
1225
|
var initI18n = () => {
|
|
1224
|
-
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT,
|
|
1225
|
-
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT,
|
|
1226
|
+
i18next__default["default"].addResourceBundle("en", NS_BRICK_KIT, en);
|
|
1227
|
+
i18next__default["default"].addResourceBundle("zh", NS_BRICK_KIT, zh);
|
|
1226
1228
|
};
|
|
1227
1229
|
/** @internal */
|
|
1228
1230
|
|
|
@@ -6971,19 +6973,29 @@
|
|
|
6971
6973
|
return flag;
|
|
6972
6974
|
}
|
|
6973
6975
|
function transformFormData(data) {
|
|
6976
|
+
if (data instanceof FormData) {
|
|
6977
|
+
return data;
|
|
6978
|
+
}
|
|
6979
|
+
|
|
6974
6980
|
var formData = new FormData();
|
|
6975
6981
|
|
|
6976
|
-
|
|
6982
|
+
var _loop = function (key, value) {
|
|
6977
6983
|
if (Array.isArray(value)) {
|
|
6978
|
-
(
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
+
value.forEach(v => {
|
|
6985
|
+
formData.append(key, v);
|
|
6986
|
+
});
|
|
6987
|
+
} else if (_.isObject(value) && !(value instanceof Blob) && !(value instanceof Date)) {
|
|
6988
|
+
Object.entries(value).forEach(_ref => {
|
|
6989
|
+
var [k, v] = _ref;
|
|
6990
|
+
formData.append("".concat(key, "[").concat(k, "]"), v);
|
|
6991
|
+
});
|
|
6984
6992
|
} else {
|
|
6985
6993
|
formData.append(key, value);
|
|
6986
6994
|
}
|
|
6995
|
+
};
|
|
6996
|
+
|
|
6997
|
+
for (var [key, value] of Object.entries(data)) {
|
|
6998
|
+
_loop(key, value);
|
|
6987
6999
|
}
|
|
6988
7000
|
|
|
6989
7001
|
return formData;
|
|
@@ -6993,14 +7005,14 @@
|
|
|
6993
7005
|
}
|
|
6994
7006
|
|
|
6995
7007
|
function _CustomApi() {
|
|
6996
|
-
_CustomApi = _asyncToGenerator__default["default"](function* (
|
|
7008
|
+
_CustomApi = _asyncToGenerator__default["default"](function* (_ref2) {
|
|
6997
7009
|
var {
|
|
6998
7010
|
url,
|
|
6999
7011
|
method = "GET",
|
|
7000
7012
|
responseWrapper = true,
|
|
7001
7013
|
ext_fields = [],
|
|
7002
7014
|
request
|
|
7003
|
-
} =
|
|
7015
|
+
} = _ref2;
|
|
7004
7016
|
var isSimpleRequest = ["get", "delete", "head"].includes(method.toLowerCase());
|
|
7005
7017
|
var response;
|
|
7006
7018
|
|
|
@@ -7886,19 +7898,6 @@
|
|
|
7886
7898
|
});
|
|
7887
7899
|
presetDarkPalettes[key].primary = presetDarkPalettes[key][5];
|
|
7888
7900
|
});
|
|
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
7901
|
|
|
7903
7902
|
function getStyleByBaseColors(theme, baseColors, backgroundColor) {
|
|
7904
7903
|
return (theme === "dark" ? getDarkStyle : getLightStyle)("".concat(getCssVariableDefinitionsByPalettes(generatePalettes(baseColors, theme, backgroundColor), theme), "\n").concat(getMigratedCssVariableDefinitions(theme, baseColors, backgroundColor)));
|