GeezerVison is showing github.com — feat: removed Rax packages, discontinuing support for Rax · liylong/lowcode-engine@31a031c
File treeExpand file treeCollapse file tree Open diff view settings Some content is hiddenLarge Commits have some content hidden by default. Use the searchbox below for content that may be hidden. Dismiss bannerExpand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: docs/docs/guide/appendix/npms.md -2Lines changed: 0 additions & 2 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -12,8 +12,6 @@ sidebar_position: 3 | 12 | 12 | | @alilc/lowcode-engine | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/engine | | 13 | 13 | | @alilc/lowcode-plugin-designer | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/plugin-designer | | 14 | 14 | | @alilc/lowcode-plugin-outline-pane | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/plugin-outline-pane | | 15 | | -| @alilc/lowcode-rax-renderer | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/rax-renderer | | 16 | | -| @alilc/lowcode-rax-simulator-renderer | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/rax-simulator-renderer | | 17 | 15 | | @alilc/lowcode-react-renderer | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/react-renderer | | 18 | 16 | | @alilc/lowcode-react-simulator-renderer | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/react-simulator-renderer | | 19 | 17 | | @alilc/lowcode-renderer-core | [https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) | packages/renderer-core | | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/guide/appendix/repos.md +7-9Lines changed: 7 additions & 9 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -15,15 +15,13 @@ sidebar_position: 2 | 15 | 15 | 5. ignitor | 16 | 16 | 6. plugin-designer | 17 | 17 | 7. plugin-outline-pane | 18 | | -8. rax-renderer | 19 | | -9. rax-simulator-renderer | 20 | | -10. react-renderer | 21 | | -11. react-simulator-renderer | 22 | | -12. renderer-core | 23 | | -13. types | 24 | | -14. utils | 25 | | -15. material-parser | 26 | | -16. code-generator | | 18 | +8. react-renderer | | 19 | +9. react-simulator-renderer | | 20 | +10. renderer-core | | 21 | +11. types | | 22 | +12. utils | | 23 | +13. material-parser | | 24 | +14. code-generator | 27 | 25 |
| 28 | 26 | ## 2. 引擎官方扩展包 | 29 | 27 | 包含了常用的设置器(setter)、跟 setter 绑定的插件等 | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/guide/design/renderer.md -1Lines changed: 0 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -11,7 +11,6 @@ sidebar_position: 4 | 11 | 11 | ## npm 包与仓库信息 | 12 | 12 |
| 13 | 13 | - React 框架渲染 npm 包:@alilc/lowcode-react-renderer | 14 | | -- Rax 框架渲染 npm 包:@alilc/lowcode-rax-renderer | 15 | 14 | - 仓库:[https://github.com/alibaba/lowcode-engine](https://github.com/alibaba/lowcode-engine) 下的 | 16 | 15 | - packages/renderer-core | 17 | 16 | - packages/react-renderer | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/guide/expand/runtime/renderer.md -1Lines changed: 0 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -40,7 +40,6 @@ ReactDOM.render(( | 40 | 40 | ), document.getElementById('root')); | 41 | 41 | ``` | 42 | 42 |
| 43 | | -- rax-renderer:npm 包替换为 @alilc/lowcode-rax-renderer | 44 | 43 | #### | 45 | 44 | ### 项目使用示例 | 46 | 45 | > [设计器 demo](https://lowcode-engine.cn/demo/demo-general/index.html) | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/participate/index.md +1-9Lines changed: 1 addition & 9 deletions - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -47,15 +47,7 @@ npm install && npm run setup | 47 | 47 | [ | 48 | 48 | "https?://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/(.*)/dist/css/react-simulator-renderer.css", | 49 | 49 | "http://localhost:5555/css/ReactSimulatorRenderer.css" | 50 | | - ], | 51 | | - [ | 52 | | - "https?://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/(.*)/dist/js/rax-simulator-renderer.js", | 53 | | - "http://localhost:5555/js/RaxSimulatorRenderer.js" | 54 | | - ], | 55 | | - [ | 56 | | - "https?://uipaas-assets.com/prod/npm/@alilc/lowcode-engine/(.*)/dist/css/rax-simulator-renderer.css", | 57 | | - "http://localhost:5555/css/RaxSimulatorRenderer.css" | 58 | | - ], | | 50 | + ] | 59 | 51 | ] | 60 | 52 | } | 61 | 53 | ``` | |
Collapse file Copy file name to clipboardExpand all lines: docs/docs/specs/lowcode-spec.md -1Lines changed: 0 additions & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -499,7 +499,6 @@ try { | 499 | 499 | - 说明:组件即将从 DOM 中移除 | 500 | 500 | - componentDidCatch(error, info) | 501 | 501 | - 说明:组件捕获到异常 | 502 | | -- Rax:目前没有使用生命周期,使用 hooks 替代生命周期; | 503 | 502 |
| 504 | 503 | 该对象由一系列 key-value 组成,key 为生命周期方法名,value 为 JSFunction 的描述,详见下方示例: | 505 | 504 |
| |
Collapse file Copy file name to clipboardExpand all lines: package.json +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
| 52 | 52 | "yarn": "^1.22.17", | 53 | 53 | "rimraf": "^3.0.2", | 54 | 54 | "@types/react-router": "5.1.18", | 55 | | - "@alilc/build-plugin-lce": "^0.0.3", | | 55 | + "@alilc/build-plugin-lce": "^0.0.4", | 56 | 56 | "babel-jest": "^26.5.2", | 57 | 57 | "@alilc/lowcode-test-mate": "^1.0.1" | 58 | 58 | }, | |
Collapse file Copy file name to clipboardExpand all lines: packages/designer/src/builtin-simulator/host.ts +9-28Lines changed: 9 additions & 28 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -39,6 +39,7 @@ import { | 39 | 39 | isDragAnyObject, | 40 | 40 | isDragNodeObject, | 41 | 41 | isLocationData, | | 42 | + Logger, | 42 | 43 | } from '@alilc/lowcode-utils'; | 43 | 44 | import { | 44 | 45 | isShaken, | @@ -72,6 +73,8 @@ import { IScroller } from '../designer/scroller'; | 72 | 73 | import { isElementNode, isDOMNodeVisible } from '../utils/misc'; | 73 | 74 | import { debounce } from 'lodash'; | 74 | 75 |
| | 76 | +const logger = new Logger({ level: 'warn', bizName: 'designer' }); | | 77 | + | 75 | 78 | export type LibraryItem = IPublicTypePackage & { | 76 | 79 | package: string; | 77 | 80 | library: string; | @@ -122,21 +125,6 @@ const defaultSimulatorUrl = (() => { | 122 | 125 | return urls; | 123 | 126 | })(); | 124 | 127 |
| 125 | | -const defaultRaxSimulatorUrl = (() => { | 126 | | - const publicPath = getPublicPath(); | 127 | | - let urls; | 128 | | - // eslint-disable-next-line @typescript-eslint/no-unused-vars | 129 | | - const [_, prefix = '', dev] = /^(.+?)(\/js)?\/?$/.exec(publicPath) || []; | 130 | | - if (dev) { | 131 | | - urls = [`${prefix}/css/rax-simulator-renderer.css`, `${prefix}/js/rax-simulator-renderer.js`]; | 132 | | - } else if (process.env.NODE_ENV === 'production') { | 133 | | - urls = [`${prefix}/rax-simulator-renderer.css`, `${prefix}/rax-simulator-renderer.js`]; | 134 | | - } else { | 135 | | - urls = [`${prefix}/rax-simulator-renderer.css`, `${prefix}/rax-simulator-renderer.js`]; | 136 | | - } | 137 | | - return urls; | 138 | | -})(); | 139 | | - | 140 | 128 | const defaultEnvironment = [ | 141 | 129 | // https://g.alicdn.com/mylib/??react/16.11.0/umd/react.production.min.js,react-dom/16.8.6/umd/react-dom.production.min.js,prop-types/15.7.2/prop-types.min.js | 142 | 130 | assetItem( | @@ -151,17 +139,6 @@ const defaultEnvironment = [ | 151 | 139 | ), | 152 | 140 | ]; | 153 | 141 |
| 154 | | -const defaultRaxEnvironment = [ | 155 | | - assetItem( | 156 | | - AssetType.JSText, | 157 | | - 'window.Rax=parent.Rax;window.React=parent.React;window.ReactDOM=parent.ReactDOM;window.VisualEngineUtils=parent.VisualEngineUtils;window.VisualEngine=parent.VisualEngine', | 158 | | - ), | 159 | | - assetItem( | 160 | | - AssetType.JSText, | 161 | | - 'window.PropTypes=parent.PropTypes;React.PropTypes=parent.PropTypes; window.__REACT_DEVTOOLS_GLOBAL_HOOK__ = window.parent.__REACT_DEVTOOLS_GLOBAL_HOOK__;', | 162 | | - ), | 163 | | -]; | 164 | | - | 165 | 142 | export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProps> { | 166 | 143 | readonly isSimulator = true; | 167 | 144 |
| @@ -467,11 +444,15 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp | 467 | 444 |
| 468 | 445 | const libraryAsset: AssetList = this.buildLibrary(); | 469 | 446 |
| | 447 | + if (this.renderEnv === 'rax') { | | 448 | + logger.error('After LowcodeEngine v1.3.0, Rax is no longer supported.'); | | 449 | + } | | 450 | + | 470 | 451 | const vendors = [ | 471 | 452 | // required & use once | 472 | 453 | assetBundle( | 473 | 454 | this.get('environment') || | 474 | | - (this.renderEnv === 'rax' ? defaultRaxEnvironment : defaultEnvironment), | | 455 | + defaultEnvironment, | 475 | 456 | AssetLevel.Environment, | 476 | 457 | ), | 477 | 458 | // required & use once | @@ -484,7 +465,7 @@ export class BuiltinSimulatorHost implements ISimulatorHost<BuiltinSimulatorProp | 484 | 465 | // required & use once | 485 | 466 | assetBundle( | 486 | 467 | this.get('simulatorUrl') || | 487 | | - (this.renderEnv === 'rax' ? defaultRaxSimulatorUrl : defaultSimulatorUrl), | | 468 | + defaultSimulatorUrl, | 488 | 469 | AssetLevel.Runtime, | 489 | 470 | ), | 490 | 471 | ]; | |
Collapse file Copy file name to clipboardExpand all lines: packages/designer/src/designer/setting/setting-top-entry.ts +7-8Lines changed: 7 additions & 8 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 1 | | -import { IPublicTypeCustomView, IPublicModelEditor, IPublicModelSettingTopEntry } from '@alilc/lowcode-types'; | | 1 | +import { IPublicTypeCustomView, IPublicModelEditor, IPublicModelSettingTopEntry, IPublicApiSetters } from '@alilc/lowcode-types'; | 2 | 2 | import { isCustomView } from '@alilc/lowcode-utils'; | 3 | 3 | import { computed, IEventBus, createModuleEventBus } from '@alilc/lowcode-editor-core'; | 4 | 4 | import { ISettingEntry } from './setting-entry-type'; | 5 | 5 | import { ISettingField, SettingField } from './setting-field'; | 6 | 6 | import { INode } from '../../document'; | 7 | 7 | import type { IComponentMeta } from '../../component-meta'; | 8 | 8 | import { IDesigner } from '../designer'; | 9 | | -import { Setters } from '@alilc/lowcode-shell'; | 10 | 9 |
| 11 | 10 | function generateSessionId(nodes: INode[]) { | 12 | 11 | return nodes | @@ -19,18 +18,18 @@ export interface ISettingTopEntry extends ISettingEntry, IPublicModelSettingTopE | 19 | 18 | INode, | 20 | 19 | ISettingField | 21 | 20 | > { | 22 | | - purge(): void; | 23 | | - | 24 | | - items: Array<ISettingField | IPublicTypeCustomView>; | 25 | | - | 26 | 21 | readonly top: ISettingTopEntry; | 27 | 22 |
| 28 | 23 | readonly parent: ISettingTopEntry; | 29 | 24 |
| 30 | 25 | readonly path: never[]; | 31 | 26 |
| | 27 | + items: Array<ISettingField | IPublicTypeCustomView>; | | 28 | + | 32 | 29 | componentMeta: IComponentMeta | null; | 33 | 30 |
| | 31 | + purge(): void; | | 32 | + | 34 | 33 | getExtraPropValue(propName: string): void; | 35 | 34 |
| 36 | 35 | setExtraPropValue(propName: string, value: any): void; | @@ -92,7 +91,7 @@ export class SettingTopEntry implements ISettingTopEntry { | 92 | 91 |
| 93 | 92 | readonly designer: IDesigner | undefined; | 94 | 93 |
| 95 | | - readonly setters: Setters; | | 94 | + readonly setters: IPublicApiSetters; | 96 | 95 |
| 97 | 96 | disposeFunctions: any[] = []; | 98 | 97 |
| @@ -103,7 +102,7 @@ export class SettingTopEntry implements ISettingTopEntry { | 103 | 102 | this.id = generateSessionId(nodes); | 104 | 103 | this.first = nodes[0]; | 105 | 104 | this.designer = this.first.document?.designer; | 106 | | - this.setters = editor.get('setters') as Setters; | | 105 | + this.setters = editor.get('setters') as IPublicApiSetters; | 107 | 106 |
| 108 | 107 | // setups | 109 | 108 | this.setupComponentMeta(); | |
Collapse file Copy file name to clipboardExpand all lines: packages/editor-core/src/config.ts +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -44,7 +44,7 @@ const VALID_ENGINE_OPTIONS = { | 44 | 44 | }, | 45 | 45 | renderEnv: { | 46 | 46 | type: 'string', | 47 | | - enum: ['react', 'rax', 'any string value'], | | 47 | + enum: ['react', 'any string value'], | 48 | 48 | default: 'react', | 49 | 49 | description: '渲染器类型', | 50 | 50 | }, | |
|