Skip to content

Commit

Permalink
Merge branch 'refactor/develop' of https://github.com/betterdancing/t…
Browse files Browse the repository at this point in the history
…iny-engine into fix/toolbar-collapsed-text
  • Loading branch information
betterdancing committed Sep 29, 2024
2 parents eb54ea5 + 046dca4 commit c9d46de
Show file tree
Hide file tree
Showing 64 changed files with 245 additions and 200 deletions.
4 changes: 2 additions & 2 deletions designer-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"devDependencies": {
"@opentiny/tiny-engine-mock": "workspace:^",
"@opentiny/tiny-engine-vite-config": "workspace:^",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue": "^5.1.2",
"cross-env": "^7.0.3",
"vite": "^5.2.7"
"vite": "^5.4.2"
}
}
6 changes: 3 additions & 3 deletions mockServer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"lint": "eslint --fix ."
},
"dependencies": {
"@babel/runtime": "^7.9.2",
"@opentiny/tiny-engine-dsl-vue": "^2.0.0-alpha.2",
"@seald-io/nedb": "^4.0.2",
"fs-extra": "^11.1.1",
Expand All @@ -49,7 +50,6 @@
"@babel/plugin-transform-runtime": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/register": "^7.9.0",
"@babel/runtime": "^7.9.2",
"babel-core": "^7.0.0-bridge.0",
"babel-eslint": "^10.1.0",
"babel-jest": "^25.3.0",
Expand All @@ -70,7 +70,7 @@
"ncp": "^2.0.0"
},
"engines": {
"node": ">= 7.8.0",
"npm": ">= 4.2.0"
"node": ">= 16",
"npm": ">= 6"
}
}
21 changes: 3 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@
"devDependencies": {
"@babel/eslint-parser": "^7.21.3",
"@types/node": "^18.0.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"assert": "^2.0.0",
"buffer": "^6.0.3",
"chokidar": "^3.5.3",
"concurrently": "^8.2.0",
"cross-env": "^7.0.3",
Expand All @@ -42,30 +38,19 @@
"fs-extra": "^10.1.0",
"husky": "^8.0.0",
"lerna": "^7.2.0",
"less": "^4.1.2",
"lint-staged": "^13.2.0",
"mysql": "^2.18.1",
"path": "^0.12.7",
"picocolors": "^1.0.0",
"rimraf": "^3.0.2",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-visualizer": "^5.8.3",
"svg-sprite-loader": "^6.0.11",
"vite": "^4.3.7",
"vite-plugin-monaco-editor": "^1.0.10",
"vite-plugin-svg-icons": "^2.0.1",
"vue-eslint-parser": "^8.0.1",
"vue-i18n": "^9.9.0"
"vue-eslint-parser": "^8.0.1"
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
],
"engines": {
"node": ">=14",
"pnpm": ">=7"
"node": ">=16",
"pnpm": ">=8"
},
"pnpm": {
"patchedDependencies": {
Expand Down
7 changes: 4 additions & 3 deletions packages/blockToWebComponentTemplate/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"version": "2.0.0-alpha.2",
"description": "translate block to webcomponent template",
"main": "./dist/web-components.es.js",
"type": "module",
"scripts": {
"build:block": "vite build --mode block"
},
Expand Down Expand Up @@ -40,8 +41,8 @@
"vue-i18n": "^9.9.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.5.2",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.3.7"
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"vite": "^5.4.2"
}
}
12 changes: 5 additions & 7 deletions packages/build/vite-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:^",
"@types/node": "^18.0.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"assert": "^2.0.0",
"buffer": "^6.0.3",
"cross-env": "^7.0.3",
Expand All @@ -37,16 +37,14 @@
"less": "^4.1.2",
"lint-staged": "^13.2.0",
"path": "^0.12.7",
"rimraf": "^3.0.2",
"rollup-plugin-polyfill-node": "^0.12.0",
"rollup-plugin-terser": "^7.0.2",
"rollup-plugin-polyfill-node": "^0.13.0",
"rollup-plugin-visualizer": "^5.8.3",
"shelljs": "^0.8.5",
"svg-sprite-loader": "^6.0.11",
"vite": "^4.3.7",
"vite": "^5.4.2",
"vite-plugin-externalize-dependencies": "^1.0.1",
"vite-plugin-monaco-editor": "^1.1.0",
"vite-plugin-static-copy": "^0.16.0",
"vite-plugin-static-copy": "^1.0.6",
"vite-plugin-svg-icons": "^2.0.1",
"vue-eslint-parser": "^8.0.1"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/build/vite-plugin-meta-comments/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
"@babel/parser": "^7.18.13",
"@babel/template": "^7.18.13",
"@babel/traverse": "^7.18.13",
"@vitejs/plugin-vue": "^5.0.4",
"@vitejs/plugin-vue": "^5.1.2",
"@vue/compiler-sfc": "^3.4.21",
"vite": "^5.2.7"
"vite": "^5.4.2"
},
"keywords": [],
"publishConfig": {
Expand Down
7 changes: 4 additions & 3 deletions packages/builtinComponent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "",
"main": "dist/index.js",
"module": "dist/index.js",
"type": "module",
"publishConfig": {
"access": "public"
},
Expand All @@ -23,9 +24,9 @@
"vite-plugin-css-injected-by-js": "^3.3.1"
},
"devDependencies": {
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.5.0"
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"vite": "^5.4.2"
},
"peerDependencies": {
"vue": "^3.4.15"
Expand Down
9 changes: 5 additions & 4 deletions packages/canvas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
"author": "OpenTiny Team",
"license": "MIT",
"homepage": "https://opentiny.design/tiny-engine",
"type": "module",
"dependencies": {
"@babel/core": "7.18.13",
"@opentiny/tiny-engine-builtin-component": "workspace:*",
Expand All @@ -40,10 +41,10 @@
},
"devDependencies": {
"@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:*",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"rollup-plugin-terser": "^7.0.2",
"vite": "^4.3.7"
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"rollup-plugin-polyfill-node": "^0.13.0",
"vite": "^5.4.2"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
Expand Down
23 changes: 14 additions & 9 deletions packages/common/component/PluginBlockList.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<ul
v-if="state.data.length"
v-if="state.data.length || showAddButton"
:class="['block-list', 'lowcode-scrollbar', { 'is-small-list': blockStyle === 'mini' }, { isShortcutPanel }]"
@mouseleave="state.hover = false"
>
Expand All @@ -10,6 +10,7 @@
:draggable="!isBlockManage && showSettingIcon"
:class="['block-item', { 'is-disabled': showBlockDetail }, { 'block-item-small-list': blockStyle === 'mini' }]"
:title="getTitle(item)"
@mousedown.stop.left="blockClick({ item, index })"
@mouseover.stop="openBlockShotPanel(item, $event)"
@mouseleave="handleBlockItemLeave"
>
Expand Down Expand Up @@ -71,7 +72,7 @@
<svg-button class="list-item-svg" name="text-source-setting"> </svg-button>
<span>设置</span>
</li>
<li class="list-item" @mousedown.stop.left="blockClick({ event: $event, item, index })">
<li class="list-item" @mousedown.stop.left="editBlock({ event: $event, item, index })">
<svg-button class="list-item-svg" name="to-edit"> </svg-button><span>编辑</span>
</li>
</ul>
Expand Down Expand Up @@ -132,7 +133,7 @@
</div>
</slot>
</li>
<li v-if="state.showAddButton" class="block-item block-plus" @click="$emit('add')">
<li v-if="showAddButton" class="block-item block-plus" @click="$emit('add')">
<span class="block-plus-icon"><icon-plus></icon-plus></span>
</li>
<div v-if="showBlockShot && state.hover && state.currentBlock.screenshot" class="block-shortcut">
Expand All @@ -149,7 +150,7 @@
</div>
</div>
</ul>
<search-empty :isShow="!state.data.length" />
<search-empty :isShow="!state.data.length && !showAddButton" />
</template>

<script>
Expand Down Expand Up @@ -228,13 +229,12 @@ export default {
default: null
}
},
emits: ['click', 'iconClick', 'add', 'deleteBlock', 'openVersionPanel'],
emits: ['click', 'iconClick', 'add', 'deleteBlock', 'openVersionPanel', 'editBlock'],
setup(props, { emit }) {
const panelState = inject('panelState', {})
const state = reactive({
activeIndex: -1,
data: computed(() => props.data),
showAddButton: computed(() => props.showAddButton),
top: 0,
hover: false,
currentBlock: {},
Expand Down Expand Up @@ -263,12 +263,16 @@ export default {
}
}
const blockClick = ({ event, item, index }) => {
const blockClick = ({ item }) => {
emit('click', item)
}
const editBlock = ({ event, item, index }) => {
if (props.isBlockManage) {
state.activeIndex = index
}
emit('click', item)
emit('editBlock', item)
// 点击区块并不打开设置面板
emit('iconClick', { event, item, index, isOpen: false })
}
Expand Down Expand Up @@ -361,7 +365,8 @@ export default {
defaultImg,
handleBlockItemLeave,
handleSettingMouseOver,
handleShowVersionMenu
handleShowVersionMenu,
editBlock
}
}
}
Expand Down
7 changes: 4 additions & 3 deletions packages/common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"main": "dist/index.js",
"module": "dist/index.js",
"type": "module",
"exports": {
".": "./dist/index.js",
"./js/": "./dist/js/"
Expand Down Expand Up @@ -46,10 +47,10 @@
},
"devDependencies": {
"@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:*",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"glob": "^10.3.4",
"vite": "^4.3.7"
"vite": "^5.4.2"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
Expand Down
4 changes: 3 additions & 1 deletion packages/configurator/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
},
"homepage": "https://opentiny.design/tiny-engine",
"devDependencies": {
"vite": "^4.3.7"
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"vite": "^5.4.2"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
Expand Down
8 changes: 5 additions & 3 deletions packages/design-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,18 @@
"@esbuild-plugins/node-globals-polyfill": "^0.2.3",
"@esbuild-plugins/node-modules-polyfill": "^0.2.2",
"@types/node": "^18.0.0",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"vite": "^5.4.2",
"cross-env": "^7.0.3",
"eslint": "^8.38.0",
"eslint-plugin-vue": "^8.0.0",
"fs-extra": "^10.1.0",
"husky": "^8.0.0",
"lerna": "^7.2.0",
"less": "^4.1.2",
"lint-staged": "^13.2.0"
"lint-staged": "^13.2.0",
"rollup-plugin-polyfill-node": "^0.13.0"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/engine-cli/template/designer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
"@opentiny/vue-theme": "~3.14.0"
},
"devDependencies": {
"@vitejs/plugin-vue": "^5.0.4",
"cross-env": "^7.0.3",
"vite": "^5.2.7",
"@opentiny/tiny-engine-vite-config": "latest",
"@opentiny/tiny-engine-mock": "latest"
"@opentiny/tiny-engine-mock": "latest",
"@vitejs/plugin-vue": "^5.1.2",
"cross-env": "^7.0.3",
"concurrently": "^8.2.0",
"vite": "^5.4.2"
}
}
7 changes: 4 additions & 3 deletions packages/http/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
},
"main": "dist/index.js",
"module": "dist/index.js",
"type": "module",
"files": [
"dist"
],
Expand All @@ -32,9 +33,9 @@
},
"devDependencies": {
"@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:*",
"@vitejs/plugin-vue": "^4.2.3",
"@vitejs/plugin-vue-jsx": "^3.1.0",
"vite": "^4.3.7"
"@vitejs/plugin-vue": "^5.1.2",
"@vitejs/plugin-vue-jsx": "^4.0.1",
"vite": "^5.4.2"
},
"peerDependencies": {
"@opentiny/vue": "^3.14.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/i18n/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"files": [
"dist"
],
"type": "module",
"main": "dist/lowcode-design-i18n-host.umd.js",
"module": "dist/lowcode-design-i18n-host.es.js",
"repository": {
Expand All @@ -32,7 +33,7 @@
"@opentiny/tiny-engine-webcomponent-core": "workspace:*"
},
"devDependencies": {
"@vitejs/plugin-vue": "^2.2.0",
"@vitejs/plugin-vue": "^5.1.2",
"babel-eslint": "^10.1.0",
"eslint": "^7.32.0",
"eslint-plugin-import": "^2.24.2",
Expand All @@ -41,7 +42,7 @@
"eslint-plugin-standard": "^4.0.0",
"eslint-plugin-vue": "^7.17.0",
"prettier": "^2.4.0",
"vite": "^2.9.1"
"vite": "^5.4.2"
},
"peerDependencies": {
"vue": "^3.4.15",
Expand Down
Loading

0 comments on commit c9d46de

Please sign in to comment.