Skip to content

Commit 74d1ee8

Browse files
committed
Merge remote-tracking branch 'origin/v3' into next
2 parents 08fe140 + 6f10b4f commit 74d1ee8

File tree

85 files changed

+1306
-212
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1306
-212
lines changed

bricks/e2e/CHANGELOG.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,70 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [0.4.47](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-24)
7+
8+
**Note:** Version bump only for package @next-bricks/e2e
9+
10+
11+
12+
13+
14+
## [0.4.46](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-23)
15+
16+
**Note:** Version bump only for package @next-bricks/e2e
17+
18+
19+
20+
21+
22+
## [0.4.45](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-13)
23+
24+
**Note:** Version bump only for package @next-bricks/e2e
25+
26+
27+
28+
29+
30+
## [0.4.44](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-06)
31+
32+
**Note:** Version bump only for package @next-bricks/e2e
33+
34+
35+
36+
37+
38+
## [0.4.43](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-03)
39+
40+
**Note:** Version bump only for package @next-bricks/e2e
41+
42+
43+
44+
45+
46+
## [0.4.42](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-02)
47+
48+
**Note:** Version bump only for package @next-bricks/e2e
49+
50+
51+
52+
53+
54+
## [0.4.41](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-09-02)
55+
56+
**Note:** Version bump only for package @next-bricks/e2e
57+
58+
59+
60+
61+
62+
## [0.4.40](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-08-27)
63+
64+
**Note:** Version bump only for package @next-bricks/e2e
65+
66+
67+
68+
69+
670
## [0.4.39](https://github.com/easyops-cn/next-core/compare/@next-bricks/[email protected]...@next-bricks/[email protected]) (2024-08-19)
771

872
**Note:** Version bump only for package @next-bricks/e2e

bricks/e2e/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next-bricks/e2e",
3-
"version": "0.4.39",
3+
"version": "0.4.47",
44
"private": true,
55
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/bricks/e2e",
66
"repository": {
@@ -36,17 +36,17 @@
3636
"build": "cross-env NODE_ENV=production build-next-bricks"
3737
},
3838
"dependencies": {
39-
"@next-core/element": "^1.2.11",
40-
"@next-core/i18n": "^1.0.63",
41-
"@next-core/react-element": "^1.0.30",
42-
"@next-core/react-runtime": "^1.6.36",
43-
"@next-core/runtime": "^1.54.13",
44-
"@next-core/types": "^1.12.2",
45-
"@next-core/utils": "^1.7.21",
39+
"@next-core/element": "^1.2.12",
40+
"@next-core/i18n": "^1.0.67",
41+
"@next-core/react-element": "^1.0.31",
42+
"@next-core/react-runtime": "^1.6.43",
43+
"@next-core/runtime": "^1.55.2",
44+
"@next-core/types": "^1.13.0",
45+
"@next-core/utils": "^1.7.25",
4646
"react": "0.0.0-experimental-ee8509801-20230117"
4747
},
4848
"devDependencies": {
49-
"@next-core/build-next-bricks": "^1.23.0",
50-
"@next-core/test-next": "^1.1.5"
49+
"@next-core/build-next-bricks": "^1.23.2",
50+
"@next-core/test-next": "^1.1.6"
5151
}
5252
}

packages/babel-preset-next/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,14 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [1.0.20](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-08-27)
7+
8+
**Note:** Version bump only for package @next-core/babel-preset-next
9+
10+
11+
12+
13+
614
## [1.0.19](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-06-21)
715

816
**Note:** Version bump only for package @next-core/babel-preset-next

packages/babel-preset-next/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next-core/babel-preset-next",
3-
"version": "1.0.19",
3+
"version": "1.0.20",
44
"description": "babel preset for brick-next related packages",
55
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/babel-preset-next",
66
"license": "GPL-3.0",

packages/brick-container/CHANGELOG.md

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,76 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [3.19.5](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-24)
7+
8+
9+
### Bug Fixes
10+
11+
* refine error display, add a link to reload the page ([d9fa28e](https://github.com/easyops-cn/next-core/commit/d9fa28e86dd7146f14b532153219613c6829b99b))
12+
13+
14+
15+
16+
17+
## [3.19.4](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-23)
18+
19+
**Note:** Version bump only for package @next-core/brick-container
20+
21+
22+
23+
24+
25+
## [3.19.3](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-13)
26+
27+
**Note:** Version bump only for package @next-core/brick-container
28+
29+
30+
31+
32+
33+
## [3.19.2](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-06)
34+
35+
**Note:** Version bump only for package @next-core/brick-container
36+
37+
38+
39+
40+
41+
## [3.19.1](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-03)
42+
43+
**Note:** Version bump only for package @next-core/brick-container
44+
45+
46+
47+
48+
49+
# [3.19.0](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-02)
50+
51+
52+
### Features
53+
54+
* support setting merge method in app user config ([a238d37](https://github.com/easyops-cn/next-core/commit/a238d37c3fc0ca603b5af1a6366a371fb6c690f3))
55+
56+
57+
58+
59+
60+
## [3.18.19](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-09-02)
61+
62+
**Note:** Version bump only for package @next-core/brick-container
63+
64+
65+
66+
67+
68+
## [3.18.18](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-08-27)
69+
70+
**Note:** Version bump only for package @next-core/brick-container
71+
72+
73+
74+
75+
676
## [3.18.17](https://github.com/easyops-cn/next-core/compare/@next-core/[email protected]...@next-core/[email protected]) (2024-08-19)
777

878

packages/brick-container/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@next-core/brick-container",
3-
"version": "3.18.17",
3+
"version": "3.19.5",
44
"description": "Brick Container Server",
55
"homepage": "https://github.com/easyops-cn/next-core/tree/v3/packages/brick-container",
66
"license": "GPL-3.0",
@@ -52,16 +52,16 @@
5252
"devDependencies": {
5353
"@next-api-sdk/api-gateway-sdk": "^1.1.0",
5454
"@next-api-sdk/micro-app-standalone-sdk": "^1.1.0",
55-
"@next-core/build-next-bricks": "^1.23.0",
56-
"@next-core/easyops-runtime": "^0.12.19",
57-
"@next-core/http": "^1.2.6",
58-
"@next-core/i18n": "^1.0.63",
59-
"@next-core/loader": "^1.6.7",
60-
"@next-core/preview": "^0.7.18",
61-
"@next-core/runtime": "^1.54.13",
62-
"@next-core/test-next": "^1.1.5",
55+
"@next-core/build-next-bricks": "^1.23.2",
56+
"@next-core/easyops-runtime": "^0.12.26",
57+
"@next-core/http": "^1.2.7",
58+
"@next-core/i18n": "^1.0.67",
59+
"@next-core/loader": "^1.6.9",
60+
"@next-core/preview": "^0.7.26",
61+
"@next-core/runtime": "^1.55.2",
62+
"@next-core/test-next": "^1.1.6",
6363
"@next-core/theme": "^1.5.4",
64-
"@next-core/types": "^1.12.2",
64+
"@next-core/types": "^1.13.0",
6565
"broadcast-channel": "^7.0.0",
6666
"copy-webpack-plugin": "^12.0.2",
6767
"core-js": "^3.38.1",

packages/brick-container/src/BootstrapError.shadow.css renamed to packages/brick-container/src/DefaultError.shadow.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@
3131
line-height: 1.6;
3232
text-align: center;
3333
}
34+
35+
.actions {
36+
margin-top: 1em;
37+
}
Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// istanbul ignore file
2-
import styleText from "./BootstrapError.shadow.css";
2+
import { escape } from "lodash";
3+
import styleText from "./DefaultError.shadow.css";
34

45
const icon = `<svg viewBox="64 64 896 896" focusable="false" data-icon="close-circle" width="1em" height="1em" fill="currentColor" aria-hidden="true"><path d="M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"></path></svg>`;
56

6-
export class BootstrapError extends HTMLElement {
7+
export class DefaultError extends HTMLElement {
8+
errorTitle: string | undefined;
9+
710
connectedCallback() {
811
if (this.shadowRoot) {
912
return;
@@ -12,8 +15,9 @@ export class BootstrapError extends HTMLElement {
1215
shadowRoot.innerHTML = [
1316
`<style>${styleText}</style>`,
1417
`<div class="icon">${icon}</div>`,
15-
'<div class="title">启动错误</div>',
18+
`<div class="title">${escape(this.errorTitle)}</div>`,
1619
'<div class="description"><slot></slot></div>',
20+
`<div class="actions"><slot name="link"></slot></div>`,
1721
].join("");
1822
}
1923
}

packages/brick-container/src/bootstrap.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,10 @@ import { imagesFactory, widgetImagesFactory } from "./images.js";
2424
import { getSpanId } from "./utils.js";
2525
import { listen } from "./preview/listen.js";
2626
import { getMock } from "./mocks.js";
27-
import { NS, locales } from "./i18n.js";
28-
import { BootstrapError } from "./BootstrapError.js";
27+
import { NS, K, locales } from "./i18n.js";
28+
import { DefaultError } from "./DefaultError.js";
29+
30+
customElements.define("easyops-default-error", DefaultError);
2931

3032
analytics.initialize(
3133
`${getBasePath()}api/gateway/data_exchange.store.ClickHouseInsertData/api/v1/data_exchange/frontend_stat`
@@ -141,9 +143,16 @@ async function main() {
141143
// `.bootstrap-error` makes loading-bar invisible.
142144
document.body.classList.add("bootstrap-error");
143145

144-
customElements.define("easyops-bootstrap-error", BootstrapError);
145-
const errorElement = document.createElement("easyops-bootstrap-error");
146+
const errorElement = document.createElement(
147+
"easyops-default-error"
148+
) as DefaultError;
149+
errorElement.errorTitle = i18n.t(`${NS}:${K.BOOTSTRAP_ERROR}`);
146150
errorElement.textContent = httpErrorToString(error);
151+
const linkElement = document.createElement("a");
152+
linkElement.slot = "link";
153+
linkElement.href = location.href;
154+
linkElement.textContent = i18n.t(`${NS}:${K.RELOAD}`);
155+
errorElement.appendChild(linkElement);
147156

148157
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
149158
document.querySelector("#main-mount-point")!.replaceChildren(errorElement);

packages/brick-container/src/i18n.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,24 @@
11
export enum K {
22
LOGIN_CHANGED = "LOGIN_CHANGED",
33
LOGOUT_APPLIED = "LOGOUT_APPLIED",
4+
BOOTSTRAP_ERROR = "BOOTSTRAP_ERROR",
5+
RELOAD = "RELOAD",
46
}
57

68
const en: Locale = {
79
[K.LOGIN_CHANGED]:
810
"You have logged in as another account, click OK to refresh the page.",
911
[K.LOGOUT_APPLIED]:
1012
"Your account has been logged out, click OK to refresh the page.",
13+
[K.BOOTSTRAP_ERROR]: "Bootstrap Error",
14+
[K.RELOAD]: "Reload",
1115
};
1216

1317
const zh: Locale = {
1418
[K.LOGIN_CHANGED]: "您已经登录另一个账号,点击确定刷新页面。",
1519
[K.LOGOUT_APPLIED]: "您的账号已经登出,点击确定刷新页面。",
20+
[K.BOOTSTRAP_ERROR]: "启动错误",
21+
[K.RELOAD]: "刷新",
1622
};
1723

1824
export const NS = "-/container";

0 commit comments

Comments
 (0)