Compare commits

...

7 Commits

Author SHA1 Message Date
wwsun 8fe57333a0 chore(release): publish
- @music163/tango-context@1.1.8
 - @music163/tango-core@1.4.2
 - @music163/tango-designer@1.4.2
 - @music163/tango-sandbox@1.0.11
 - @music163/tango-setting-form@1.2.11
2024-08-06 13:54:27 +08:00
BoBoooooo 269e304d68 fix: view module _nodesTree set init value (#194) 2024-08-06 11:08:42 +08:00
wwsun 8c80255f81 chore: up 2024-08-05 12:31:12 +08:00
wwsun 359aa0b148 chore: update 2024-08-05 12:30:37 +08:00
wwsun 51ca4a72ce chore(release): publish
- @music163/tango-context@1.1.7
 - @music163/tango-core@1.4.1
 - @music163/tango-designer@1.4.1
 - @music163/tango-helpers@1.2.2
 - @music163/tango-sandbox@1.0.10
 - @music163/tango-setting-form@1.2.10
 - @music163/tango-ui@1.4.1
2024-08-05 12:28:43 +08:00
BoBoooooo b83d965955 fix: show right panel when design view select node & optimize editor css (#193) 2024-08-05 11:45:41 +08:00
Wells a1eea02f94 fix: parse template code & update maxRow of TextAreaSetter (#192)
* fix: update templatePattern regex to allow for multiline code wrapping

* fix: update error overlay display to use designer.activeView instead of mode

* fix: update maxRows to 6 in TextAreaSetter
2024-08-05 11:20:41 +08:00
23 changed files with 104 additions and 31 deletions
+1 -1
View File
@@ -166,7 +166,7 @@ import { OutButton } from "../components";
class App extends React.Component { class App extends React.Component {
render() { render() {
return ( return (
<Page title={tango.stores.app.title} subTitle={111}> <Page title={tango.stores.app.title} subTitle={<><Button>hello</Button></>}>
<Section tid="section0" /> <Section tid="section0" />
<Section tid="section1" title="Section Title"> <Section tid="section1" title="Section Title">
your input: <Input tid="input1" defaultValue="hello" /> your input: <Input tid="input1" defaultValue="hello" />
+4 -4
View File
@@ -15,10 +15,10 @@
"test:watch": "jest --watch", "test:watch": "jest --watch",
"eslint": "eslint packages/**/src/*.{ts,tsx} --cache", "eslint": "eslint packages/**/src/*.{ts,tsx} --cache",
"publish": "lerna publish", "publish": "lerna publish",
"ver": "lerna version --no-private", "ver": "lerna version --no-private --conventional-commits",
"release": "yarn eslint && yarn build && lerna version --no-private --conventional-commits && lerna publish from-git", "release": "yarn eslint && yarn build && yarn ver && lerna publish from-git",
"release:npm": "yarn eslint && yarn build && yarn run ver && lerna publish from-git", "release:npm": "yarn eslint && yarn build && yarn ver && lerna publish from-package",
"release:beta": "yarn eslint && yarn build && yarn run ver && lerna publish from-package --dist-tag beta", "release:beta": "yarn eslint && yarn build && yarn ver && lerna publish from-package --dist-tag beta",
"up": "yarn upgrade-interactive --latest", "up": "yarn upgrade-interactive --latest",
"prepare": "husky install" "prepare": "husky install"
}, },
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.1.8](https://github.com/netease/tango/compare/@music163/tango-context@1.1.7...@music163/tango-context@1.1.8) (2024-08-06)
**Note:** Version bump only for package @music163/tango-context
## [1.1.7](https://github.com/netease/tango/compare/@music163/tango-context@1.1.6...@music163/tango-context@1.1.7) (2024-08-05)
**Note:** Version bump only for package @music163/tango-context
## [1.1.6](https://github.com/netease/tango/compare/@music163/tango-context@1.1.5...@music163/tango-context@1.1.6) (2024-08-01) ## [1.1.6](https://github.com/netease/tango/compare/@music163/tango-context@1.1.5...@music163/tango-context@1.1.6) (2024-08-01)
**Note:** Version bump only for package @music163/tango-context **Note:** Version bump only for package @music163/tango-context
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-context", "name": "@music163/tango-context",
"version": "1.1.6", "version": "1.1.8",
"description": "react context for tango-apps", "description": "react context for tango-apps",
"keywords": [ "keywords": [
"react", "react",
@@ -31,8 +31,8 @@
"react": ">= 16.8" "react": ">= 16.8"
}, },
"dependencies": { "dependencies": {
"@music163/tango-core": "^1.4.0", "@music163/tango-core": "^1.4.2",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"mobx-react-lite": "4.0.7" "mobx-react-lite": "4.0.7"
}, },
"publishConfig": { "publishConfig": {
+10
View File
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.2](https://github.com/netease/tango/compare/@music163/tango-core@1.4.1...@music163/tango-core@1.4.2) (2024-08-06)
### Bug Fixes
- view module \_nodesTree set init value ([#194](https://github.com/netease/tango/issues/194)) ([269e304](https://github.com/netease/tango/commit/269e304d685c4fcc80635b9d04220cda333b80c4))
## [1.4.1](https://github.com/netease/tango/compare/@music163/tango-core@1.4.0...@music163/tango-core@1.4.1) (2024-08-05)
**Note:** Version bump only for package @music163/tango-core
# [1.4.0](https://github.com/netease/tango/compare/@music163/tango-core@1.3.3...@music163/tango-core@1.4.0) (2024-08-01) # [1.4.0](https://github.com/netease/tango/compare/@music163/tango-core@1.3.3...@music163/tango-core@1.4.0) (2024-08-01)
### Bug Fixes ### Bug Fixes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-core", "name": "@music163/tango-core",
"version": "1.4.0", "version": "1.4.2",
"description": "tango core", "description": "tango core",
"author": "wwsun <ww.sun@outlook.com>", "author": "wwsun <ww.sun@outlook.com>",
"homepage": "", "homepage": "",
@@ -28,7 +28,7 @@
"@babel/parser": "^7.23.5", "@babel/parser": "^7.23.5",
"@babel/traverse": "^7.23.5", "@babel/traverse": "^7.23.5",
"@babel/types": "^7.23.5", "@babel/types": "^7.23.5",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"@types/babel__generator": "^7.6.7", "@types/babel__generator": "^7.6.7",
"@types/babel__traverse": "^7.20.4", "@types/babel__traverse": "^7.20.4",
"mobx": "6.12.3", "mobx": "6.12.3",
+1 -1
View File
@@ -84,7 +84,7 @@ function nodeListToTreeData(list: ITangoViewNodeData[]) {
*/ */
export class TangoViewModule extends TangoModule implements IViewFile { export class TangoViewModule extends TangoModule implements IViewFile {
// 解析为树结构的 jsxNodes 数组 // 解析为树结构的 jsxNodes 数组
_nodesTree: ITangoViewNodeData[]; _nodesTree: ITangoViewNodeData[] = [];
/** /**
* 通过导入组件名查找组件来自的包 * 通过导入组件名查找组件来自的包
*/ */
+11
View File
@@ -3,6 +3,17 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.2](https://github.com/netease/tango/compare/@music163/tango-designer@1.4.1...@music163/tango-designer@1.4.2) (2024-08-06)
**Note:** Version bump only for package @music163/tango-designer
## [1.4.1](https://github.com/netease/tango/compare/@music163/tango-designer@1.4.0...@music163/tango-designer@1.4.1) (2024-08-05)
### Bug Fixes
- parse template code & update maxRow of TextAreaSetter ([#192](https://github.com/netease/tango/issues/192)) ([a1eea02](https://github.com/netease/tango/commit/a1eea02f9409db73f042c74d7903ad84258f25c2))
- show right panel when design view select node & optimize editor css ([#193](https://github.com/netease/tango/issues/193)) ([b83d965](https://github.com/netease/tango/commit/b83d965955c8d33ed8d37063482c7abe079e62b1))
# [1.4.0](https://github.com/netease/tango/compare/@music163/tango-designer@1.3.3...@music163/tango-designer@1.4.0) (2024-08-01) # [1.4.0](https://github.com/netease/tango/compare/@music163/tango-designer@1.3.3...@music163/tango-designer@1.4.0) (2024-08-01)
### Bug Fixes ### Bug Fixes
+7 -7
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-designer", "name": "@music163/tango-designer",
"version": "1.4.0", "version": "1.4.2",
"description": "lowcode designer", "description": "lowcode designer",
"keywords": [ "keywords": [
"react" "react"
@@ -33,12 +33,12 @@
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.8.0", "@ant-design/icons": "^4.8.0",
"@music163/request": "^0.2.0", "@music163/request": "^0.2.0",
"@music163/tango-context": "^1.1.6", "@music163/tango-context": "^1.1.8",
"@music163/tango-core": "^1.4.0", "@music163/tango-core": "^1.4.2",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"@music163/tango-sandbox": "^1.0.9", "@music163/tango-sandbox": "^1.0.11",
"@music163/tango-setting-form": "^1.2.9", "@music163/tango-setting-form": "^1.2.11",
"@music163/tango-ui": "^1.4.0", "@music163/tango-ui": "^1.4.1",
"antd": "^4.24.2", "antd": "^4.24.2",
"cash-dom": "^8.1.2", "cash-dom": "^8.1.2",
"classnames": "^2.5.1", "classnames": "^2.5.1",
+2
View File
@@ -137,6 +137,8 @@ export function useDnd({
const data = sandboxQuery.getDraggableParentsData(e.target as HTMLElement, true); const data = sandboxQuery.getDraggableParentsData(e.target as HTMLElement, true);
if (data && data.id) { if (data && data.id) {
selectSource.select(data); selectSource.select(data);
// 画布选中节点时,自动唤起 right-panel
designer.toggleRightPanel(true);
} }
}; };
+1
View File
@@ -81,6 +81,7 @@ export const CodeEditor = observer((props: CodeEditorProps) => {
designer.activeView === 'dual' designer.activeView === 'dual'
? { ? {
borderLeft: 'solid 1px var(--tango-colors-line2)', borderLeft: 'solid 1px var(--tango-colors-line2)',
borderRight: 'solid 1px var(--tango-colors-line2)',
} }
: {}; : {};
+1 -1
View File
@@ -31,7 +31,7 @@ export const WorkspaceView = observer((props: WorkspaceViewProps) => {
{children} {children}
{/* 添加组件弹层 */} {/* 添加组件弹层 */}
{display === 'block' && <ComponentsPopover type="inner" isControlled />} {display === 'block' && <ComponentsPopover type="inner" isControlled />}
{mode === 'design' && <FileErrorsOverlay />} {designer.activeView === 'design' && <FileErrorsOverlay />}
</Box> </Box>
); );
}); });
+6
View File
@@ -3,6 +3,12 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.2](https://github.com/netease/tango/compare/@music163/tango-helpers@1.2.1...@music163/tango-helpers@1.2.2) (2024-08-05)
### Bug Fixes
- parse template code & update maxRow of TextAreaSetter ([#192](https://github.com/netease/tango/issues/192)) ([a1eea02](https://github.com/netease/tango/commit/a1eea02f9409db73f042c74d7903ad84258f25c2))
## [1.2.1](https://github.com/netease/tango/compare/@music163/tango-helpers@1.2.0...@music163/tango-helpers@1.2.1) (2024-08-01) ## [1.2.1](https://github.com/netease/tango/compare/@music163/tango-helpers@1.2.0...@music163/tango-helpers@1.2.1) (2024-08-01)
### Bug Fixes ### Bug Fixes
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-helpers", "name": "@music163/tango-helpers",
"version": "1.2.1", "version": "1.2.2",
"description": "Shared types, helpers, and hooks of tango-apps", "description": "Shared types, helpers, and hooks of tango-apps",
"keywords": [ "keywords": [
"shared", "shared",
+1 -1
View File
@@ -32,7 +32,7 @@ export function isValidFunctionCode(str: string) {
} }
} }
const templatePattern = /^{{(.+)}}$/; const templatePattern = /^{{([\s\S]+)}}$/;
/** /**
* 判断给定代码是否被双花括号包裹 * 判断给定代码是否被双花括号包裹
@@ -0,0 +1,13 @@
import { isWrappedCode } from '../src/helpers';
describe('helpers/codeHelper', () => {
it('isWrappedCode', () => {
expect(isWrappedCode('{{[]}}')).toBeTruthy(); // true
expect(isWrappedCode('{{{}}}')).toBeTruthy(); // true
expect(isWrappedCode('{{this.foo}}')).toBeTruthy(); // true
expect(isWrappedCode('{{123}}')).toBeTruthy(); // true
expect(isWrappedCode('{{() => {}}}')).toBeTruthy(); // true
expect(isWrappedCode('{{<Button>button</Button>}}')).toBeTruthy(); // true
expect(isWrappedCode('{{<>\n<Button>hello</Button>\n</>}}')).toBeTruthy(); // true
});
});
+8
View File
@@ -3,6 +3,14 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.0.11](https://github.com/netease/tango/compare/@music163/tango-sandbox@1.0.10...@music163/tango-sandbox@1.0.11) (2024-08-06)
**Note:** Version bump only for package @music163/tango-sandbox
## [1.0.10](https://github.com/netease/tango/compare/@music163/tango-sandbox@1.0.9...@music163/tango-sandbox@1.0.10) (2024-08-05)
**Note:** Version bump only for package @music163/tango-sandbox
## [1.0.9](https://github.com/netease/tango/compare/@music163/tango-sandbox@1.0.8...@music163/tango-sandbox@1.0.9) (2024-08-01) ## [1.0.9](https://github.com/netease/tango/compare/@music163/tango-sandbox@1.0.8...@music163/tango-sandbox@1.0.9) (2024-08-01)
**Note:** Version bump only for package @music163/tango-sandbox **Note:** Version bump only for package @music163/tango-sandbox
+3 -3
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-sandbox", "name": "@music163/tango-sandbox",
"version": "1.0.9", "version": "1.0.11",
"description": "sandbox of tango apps", "description": "sandbox of tango apps",
"author": "wwsun <ww.sun@outlook.com>", "author": "wwsun <ww.sun@outlook.com>",
"homepage": "", "homepage": "",
@@ -29,8 +29,8 @@
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.8.0", "@ant-design/icons": "^4.8.0",
"@music163/tango-core": "^1.4.0", "@music163/tango-core": "^1.4.2",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"crypto-js": "^4.1.1", "crypto-js": "^4.1.1",
"lodash.isequal": "4.5.0", "lodash.isequal": "4.5.0",
"react-frame-component": "^5.2.4" "react-frame-component": "^5.2.4"
+10
View File
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.2.11](https://github.com/netease/tango/compare/@music163/tango-setting-form@1.2.10...@music163/tango-setting-form@1.2.11) (2024-08-06)
**Note:** Version bump only for package @music163/tango-setting-form
## [1.2.10](https://github.com/netease/tango/compare/@music163/tango-setting-form@1.2.9...@music163/tango-setting-form@1.2.10) (2024-08-05)
### Bug Fixes
- parse template code & update maxRow of TextAreaSetter ([#192](https://github.com/netease/tango/issues/192)) ([a1eea02](https://github.com/netease/tango/commit/a1eea02f9409db73f042c74d7903ad84258f25c2))
## [1.2.9](https://github.com/netease/tango/compare/@music163/tango-setting-form@1.2.8...@music163/tango-setting-form@1.2.9) (2024-08-01) ## [1.2.9](https://github.com/netease/tango/compare/@music163/tango-setting-form@1.2.8...@music163/tango-setting-form@1.2.9) (2024-08-01)
### Bug Fixes ### Bug Fixes
+4 -4
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-setting-form", "name": "@music163/tango-setting-form",
"version": "1.2.9", "version": "1.2.11",
"description": "setting form of tango-apps", "description": "setting form of tango-apps",
"author": "wwsun <ww.sun@outlook.com>", "author": "wwsun <ww.sun@outlook.com>",
"homepage": "", "homepage": "",
@@ -28,9 +28,9 @@
}, },
"dependencies": { "dependencies": {
"@ant-design/icons": "^4.8.0", "@ant-design/icons": "^4.8.0",
"@music163/tango-core": "^1.4.0", "@music163/tango-core": "^1.4.2",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"@music163/tango-ui": "^1.4.0", "@music163/tango-ui": "^1.4.1",
"antd": "^4.24.2", "antd": "^4.24.2",
"coral-system": "^1.0.5", "coral-system": "^1.0.5",
"mobx": "6.12.3", "mobx": "6.12.3",
@@ -34,7 +34,7 @@ export function TextSetter({
const autoSize = { const autoSize = {
minRows: 2, minRows: 2,
maxRows: 5, maxRows: 6,
}; };
export function TextAreaSetter({ export function TextAreaSetter({
+4
View File
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [1.4.1](https://github.com/netease/tango/compare/@music163/tango-ui@1.4.0...@music163/tango-ui@1.4.1) (2024-08-05)
**Note:** Version bump only for package @music163/tango-ui
# [1.4.0](https://github.com/netease/tango/compare/@music163/tango-ui@1.3.3...@music163/tango-ui@1.4.0) (2024-08-01) # [1.4.0](https://github.com/netease/tango/compare/@music163/tango-ui@1.3.3...@music163/tango-ui@1.4.0) (2024-08-01)
### Bug Fixes ### Bug Fixes
+2 -2
View File
@@ -1,6 +1,6 @@
{ {
"name": "@music163/tango-ui", "name": "@music163/tango-ui",
"version": "1.4.0", "version": "1.4.1",
"description": "ui widgets of tango", "description": "ui widgets of tango",
"keywords": [ "keywords": [
"react", "react",
@@ -38,7 +38,7 @@
"@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-javascript": "^6.2.2",
"@codemirror/lint": "^6.7.1", "@codemirror/lint": "^6.7.1",
"@codemirror/search": "^6.5.6", "@codemirror/search": "^6.5.6",
"@music163/tango-helpers": "^1.2.1", "@music163/tango-helpers": "^1.2.2",
"@uiw/react-codemirror": "^4.22.0", "@uiw/react-codemirror": "^4.22.0",
"antd": "^4.24.2", "antd": "^4.24.2",
"classnames": "^2.5.1", "classnames": "^2.5.1",