Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v2.2.0 merge #1085

Merged
merged 23 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e32b9b3
v2.2.0-beta.0
chilingling Jan 16, 2025
33a42f8
fix: remove pnpm cache for release workflow
chilingling Jan 16, 2025
d2fc9b1
v2.2.0-beta.1
chilingling Jan 16, 2025
bacd299
fix: fix the error of routing bar caused by invalid pageid (#1045)
gene9831 Jan 16, 2025
61aa180
fix(chore): output build log to tmp directory
chilingling Jan 17, 2025
97efa2a
v2.2.0-beta.2
chilingling Jan 17, 2025
9d0af81
fix: update template bundle (#1048)
yy-wow Jan 17, 2025
e0e657b
fix: Release github action syntax issue
chilingling Jan 17, 2025
04459f3
v2.2.0-beta.3
chilingling Jan 17, 2025
dd8ae42
v2.2.0-rc.0
chilingling Jan 17, 2025
4b9a681
fix: mock utils axios cdn link
yy-wow Jan 23, 2025
5162ab4
fix(plugins/materials): fix new app with no page should not set url p…
rhlin Jan 23, 2025
fe04e1b
fix(canvas/render): fix edited page not refresh on children page, fix…
rhlin Jan 23, 2025
d8c78bd
fix: AI chat request error (#1059)
gene9831 Jan 23, 2025
48f25c6
fix: Delete prompt box (#1068)
xuanlid Jan 24, 2025
2d47b79
fix: parent form field in page settings do not display (#1069)
gene9831 Jan 25, 2025
b5789c5
v2.2.0-rc.1 (#1077)
hexqi Jan 26, 2025
bfc9fea
fix(block): fix block not refresh when curd & block deploy bugs (#1080)
betterdancing Jan 26, 2025
c04ec56
fix: preview failure (#1079)
lichunn Jan 26, 2025
07509fd
fix:Optimize JS page style (#1081)
SonyLeo Jan 26, 2025
8e6896e
fix: fix data source type display exception (#1082)
SonyLeo Jan 26, 2025
3452517
v2.2.0 (#1084)
hexqi Jan 26, 2025
1edcfad
Merge branch 'refactor/develop' into release-v2.2.0-merge
hexqi Jan 26, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/Release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,19 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: pnpm install

- name: Run Build
run: pnpm run build:plugin && pnpm run build:alpha > build-alpha.log 2>&1
run: pnpm run build:plugin && pnpm run build:alpha > /tmp/build-alpha.log 2>&1

- name: Upload build logs
uses: actions/upload-artifact@v4
with:
name: build-alpha-log
path: build-alpha.log
path: /tmp/build-alpha.log

- name: Parse Publish tag
id: parse_tag
Expand Down Expand Up @@ -74,4 +73,4 @@ jobs:
- name: Publish package to npm
run: pnpm lerna publish from-package --dist-tag ${{steps.parse_tag.outputs.dist_tag}} --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion designer-demo/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "designer-demo",
"private": true,
"version": "2.1.0",
"version": "2.2.0",
"type": "module",
"scripts": {
"dev": "cross-env VITE_THEME=light vite",
Expand Down
2 changes: 1 addition & 1 deletion mockServer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-mock",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion mockServer/src/mock/get/app-center/v1/apps/schema/918.json
Original file line number Diff line number Diff line change
Expand Up @@ -2093,7 +2093,7 @@
"package": "axios",
"destructuring": false,
"exportName": "axios",
"cdnLink": "https://unpkg.com/browse/[email protected]/dist/esm/axios.min.js"
"cdnLink": "https://unpkg.com/[email protected]/dist/esm/axios.min.js"
}
},
{
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
"pub:prerelease": "pnpm run build:plugin && pnpm run build:alpha && pnpm lerna version prerelease --preid beta --no-push --yes && lerna publish from-package --pre-dist-tag beta --yes",
"setup": "node ./scripts/setup.js",
"splitMaterials": "node ./scripts/splitMaterials.mjs",
"buildMaterials": "node ./scripts/buildMaterials.mjs"
"buildMaterials": "node ./scripts/buildMaterials.mjs",
"updateTemplate": "node ./scripts/updateTemplate.mjs"
},
"devDependencies": {
"@babel/eslint-parser": "^7.21.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/block-compiler/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-block-compiler",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/blockToWebComponentTemplate/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-block-build",
"version": "2.1.0",
"version": "2.2.0",
"description": "translate block to webcomponent template",
"main": "./dist/web-components.es.js",
"type": "module",
Expand Down
2 changes: 1 addition & 1 deletion packages/build/vite-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-vite-config",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"type": "module",
"main": "./index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/build/vite-plugin-meta-comments/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-vite-plugin-meta-comments",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"type": "module",
"main": "dist/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/builtinComponent/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-builtin-component",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"main": "dist/index.mjs",
"module": "dist/index.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/canvas/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-canvas",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ function defaultRenderer(schema, refreshKey, entry, active, isPage = true) {
const rootChildrenSchema = {
id: 0,
componentName: 'div',
componentType: 'PageSection',
// 手动添加一个唯一的属性,后续在画布选中此节点时方便处理额外的逻辑。由于没有修改schema,不会影响出码
props: { ...schema.props, 'data-id': 'root-container', 'data-page-active': active },
children: schema.children
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import postcss from 'postcss'
import scopedPlugin from './scope-css-plugin'

export function handleScopedCss(id: string, content: string) {
return postcss([scopedPlugin(id)]).process(content)
return postcss([scopedPlugin(id)]).process(content, { from: undefined })
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export const wrapPageComponent = (pageId: string) => {
() => active.value,
(activeValue) => {
if (!activeValue) {
asyncData.value = null
updateSchema()
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/canvas/render/src/render.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const checkGroup = (componentName) => configure[componentName]?.nestingRule?.chi
const clickCapture = (componentName) => configure[componentName]?.clickCapture !== false

const getBindProps = (schema, scope, context, pageContext) => {
const { id, componentName } = schema
const { id, componentName, componentType } = schema
const invalidity = configure[componentName]?.invalidity || []

if (componentName === 'CanvasPlaceholder') {
Expand Down Expand Up @@ -120,7 +120,7 @@ const getBindProps = (schema, scope, context, pageContext) => {
delete bindProps.className

// 使画布中元素可拖拽
if (active) {
if (active && !['PageStart', 'PageSection'].includes(componentType)) {
bindProps.draggable = true
}

Expand Down
24 changes: 14 additions & 10 deletions packages/canvas/route-bar/src/CanvasRouteBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,20 @@ watch(
}
const ancestors = (await getAncestors(value, true)) || []

routes.value = ancestors.concat(value).map((id) => {
const { route, isPage } = pageSettingState.treeDataMapping[id]
return {
id,
route: route
.replace(/\/+/g, '/') // 替换连续的 '/' 为单个 '/'
.replace(/^\/|\/$/g, ''), // 去掉开头和结尾的 '/'
isPage
}
})
routes.value = ancestors
.concat(value)
.map((id) => pageSettingState.treeDataMapping[id])
.filter((item) => Boolean(item))
.map((pageData) => {
const { id, route, isPage } = pageData
return {
id,
route: route
.replace(/\/+/g, '/') // 替换连续的 '/' 为单个 '/'
.replace(/^\/|\/$/g, ''), // 去掉开头和结尾的 '/'
isPage
}
})
},
{ immediate: true }
)
Expand Down
2 changes: 1 addition & 1 deletion packages/common/component/BlockHistoryList.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<tiny-grid v-if="history.length" :data="history" height="300">
<tiny-grid v-if="history.length" :data="history" row-id="id" height="300">
<tiny-grid-column v-if="isBlockManage" field="version" title="版本号">
<template v-slot="data">
{{ data.row.version }}
Expand Down
12 changes: 9 additions & 3 deletions packages/common/component/SvgButton.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<span class="svg-button" :class="{ 'svg-button-hover': hoverBgColor }" @click="$emit('click', $event)">
<span class="svg-button" :class="{ 'svg-button-hover': hoverBgColor }" @click="handleClick($event)">
<tiny-tooltip effect="light" :content="tips" :placement="placement">
<component :is="name" v-if="isTinyIcon" />
<svg-icon v-else :name="name"></svg-icon>
Expand Down Expand Up @@ -34,11 +34,17 @@ export default {
}
},
emits: ['click'],
setup(props) {
setup(props, { emit }) {
const isTinyIcon = computed(() => props.name.toLowerCase().indexOf('icon') === 0)

const handleClick = (event) => {
event.target.blur()
emit('click', event)
}

return {
isTinyIcon
isTinyIcon,
handleClick
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-common",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/configurator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-configurator",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,10 @@ export default {
}
</script>

<style lang="less" scoped></style>
<style lang="less" scoped>
.meta-radio-group-container {
:deep(.tiny-radio-button__inner.tiny-radio-button__inner.tiny-radio-button__inner) {
padding: 5px 16px;
}
}
</style>
4 changes: 2 additions & 2 deletions packages/design-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine",
"version": "2.1.0",
"version": "2.2.0",
"type": "module",
"description": "TinyEngine enables developers to customize low-code platforms, build low-bit platforms online in real time, and support secondary development or integration of low-bit platform capabilities.",
"homepage": "https://opentiny.design/tiny-engine",
Expand Down Expand Up @@ -76,7 +76,6 @@
"@opentiny/tiny-engine-toolbar-fullscreen": "workspace:*",
"@opentiny/tiny-engine-toolbar-generate-code": "workspace:*",
"@opentiny/tiny-engine-toolbar-lang": "workspace:*",
"@opentiny/tiny-engine-toolbar-view-setting": "workspace:*",
"@opentiny/tiny-engine-toolbar-layout": "workspace:*",
"@opentiny/tiny-engine-toolbar-lock": "workspace:*",
"@opentiny/tiny-engine-toolbar-logo": "workspace:*",
Expand All @@ -87,6 +86,7 @@
"@opentiny/tiny-engine-toolbar-refresh": "workspace:*",
"@opentiny/tiny-engine-toolbar-save": "workspace:*",
"@opentiny/tiny-engine-toolbar-setting": "workspace:*",
"@opentiny/tiny-engine-toolbar-view-setting": "workspace:*",
"@opentiny/tiny-engine-utils": "workspace:*",
"@opentiny/tiny-engine-vite-plugin-meta-comments": "workspace:*",
"@opentiny/tiny-engine-webcomponent-core": "workspace:*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"axios": "${VITE_CDN_DOMAIN}/[email protected]/dist/esm/axios.js",
"@opentiny/tiny-engine-webcomponent-core": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-webcomponent-core@1/dist/tiny-engine-webcomponent-core.es.js",
"@opentiny/tiny-engine-i18n-host": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-i18n-host@1/dist/lowcode-design-i18n-host.es.js",
"@opentiny/tiny-engine-builtin-component": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-builtin-component@^2.0.0/dist/index.js",
"@opentiny/tiny-engine-builtin-component": "${VITE_CDN_DOMAIN}/@opentiny/tiny-engine-builtin-component@^2.0.0/dist/index.mjs",
"vue-demi": "${VITE_CDN_DOMAIN}/[email protected]/lib/index.mjs",
"pinia": "${VITE_CDN_DOMAIN}/[email protected]/dist/pinia.esm-browser.js",
"@opentiny/vue": "${VITE_CDN_DOMAIN}/@opentiny/vue-runtime@${opentinyVueVersion}/dist3/tiny-vue-pc.mjs",
Expand Down
2 changes: 1 addition & 1 deletion packages/engine-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-cli",
"version": "2.1.0",
"version": "2.2.0",
"description": "",
"main": "dist/index.js",
"scripts": {
Expand Down
24 changes: 12 additions & 12 deletions packages/engine-cli/template/designer/package.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"name": "designer-demo-template",
"name": "designer-demo",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "concurrently 'pnpm:serve:mock' 'pnpm:serve:frontend'",
"serve:frontend": "cross-env VITE_THEME=light vite",
"serve:mock": "node node_modules/@opentiny/tiny-engine-mock/dist/app.js",
"build:alpha": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode alpha",
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode prod"
"build": "cross-env NODE_OPTIONS=--max-old-space-size=8192 VITE_THEME=light vite build --mode prod",
"serve:frontend": "cross-env VITE_THEME=light vite",
"serve:mock": "node node_modules/@opentiny/tiny-engine-mock/dist/app.js"
},
"dependencies": {
"@opentiny/tiny-engine": "^2.1.0",
"@opentiny/tiny-engine-theme-dark": "^2.1.0",
"@opentiny/tiny-engine-theme-light": "^2.1.0",
"@opentiny/tiny-engine-utils": "^2.1.0",
"@opentiny/tiny-engine": "2.2.0",
"@opentiny/tiny-engine-theme-dark": "2.2.0",
"@opentiny/tiny-engine-theme-light": "2.2.0",
"@opentiny/tiny-engine-utils": "2.2.0",
"@opentiny/vue": "~3.20.0",
"@opentiny/vue-design-smb": "~3.20.0",
"@opentiny/vue-icon": "~3.20.0",
Expand All @@ -25,11 +25,11 @@
"vue": "^3.4.21"
},
"devDependencies": {
"@opentiny/tiny-engine-mock": "^2.1.0",
"@opentiny/tiny-engine-vite-config": "^2.1.0",
"@opentiny/tiny-engine-mock": "2.2.0",
"@opentiny/tiny-engine-vite-config": "2.2.0",
"@vitejs/plugin-vue": "^5.1.2",
"cross-env": "^7.0.3",
"concurrently": "^8.2.0",
"vite": "^5.4.2"
"vite": "^5.4.2",
"concurrently": "^8.2.0"
}
}
15 changes: 14 additions & 1 deletion packages/engine-cli/template/designer/registry.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,20 @@ export default {
Lang,
ViewSetting
],
plugins: [Materials, Tree, Page, Block, Datasource, Bridge, I18n, Script, State, Schema, Help, Robot],
plugins: [
Materials,
Tree,
Page,
[Block, { options: { ...Block.options, mergeCategoriesAndGroups: true } }],
Datasource,
Bridge,
I18n,
Script,
State,
Schema,
Help,
Robot
],
dsls: [{ id: 'engine.dsls.dslvue' }],
settings: [Props, Styles, Events],
canvas: Canvas
Expand Down
1 change: 1 addition & 0 deletions packages/engine-cli/template/designer/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default defineConfig((configEnv) => {
viteConfigEnv: configEnv,
root: __dirname,
iconDirs: [path.resolve(__dirname, './node_modules/@opentiny/tiny-engine/assets/')],
useSourceAlias: false,
envDir: './env'
})

Expand Down
2 changes: 1 addition & 1 deletion packages/i18n/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-i18n-host",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-layout",
"version": "2.1.0",
"version": "2.2.0",
"scripts": {
"build": "vite build"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/block/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@opentiny/tiny-engine-plugin-block",
"version": "2.1.0",
"version": "2.2.0",
"publishConfig": {
"access": "public"
},
Expand Down
Loading
Loading