Skip to content

Commit 251534c

Browse files
liujupingJackLian
authored andcommitted
feat: add worskapces plugins
1 parent 74a5ea0 commit 251534c

33 files changed

Lines changed: 1601 additions & 5 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@
4040
}
4141
},
4242
"devDependencies": {
43-
"lerna": "^4.x",
4443
"f2elint": "^2.0.1",
4544
"husky": "^7.0.4",
45+
"lerna": "^4.x",
4646
"typescript": "^3.2.2"
4747
},
4848
"engines": {

packages/base-monaco-editor/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"version": "1.1.2",
44
"description": "代码编辑组件,monaco-editor 的低代码适配封装",
55
"publishConfig": {
6+
"registry": "https://registry.npmjs.org/",
67
"access": "public"
78
},
89
"files": [

packages/plugin-code-editor/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"build": "build-scripts build --config build.js"
1818
},
1919
"publishConfig": {
20+
"registry": "https://registry.npmjs.org/",
2021
"access": "public"
2122
},
2223
"dependencies": {

packages/plugin-manual/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"pub": "npm publish"
1616
},
1717
"publishConfig": {
18+
"registry": "https://registry.npmjs.org/",
1819
"access": "public"
1920
},
2021
"dependencies": {},
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 1.0.0 / 2022-02-16
2+
3+
* publish stable version
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# @alilc/lowcode-plugin-resource-tabs [![][npm-image]][npm-url]
2+
3+
4+
---
5+
6+
## 使用
7+
8+
### 注册插件
9+
```jsx
10+
import { plugins } from '@alilc/lowcode-engine';
11+
import PluginResourceTabs from '@alilc/lowcode-plugin-resource-tabs';
12+
13+
// 注册到引擎
14+
plugins.register(PluginResourceTabs);
15+
```
16+
17+
### 插件属性 & 方法
18+
19+
#### appKey
20+
- description: '唯一标识,用于缓存应用 Tab'
21+
- type: 'string'
22+
23+
### tabClassName
24+
- description: 'Tab className'
25+
26+
### shape
27+
- type: 'string',
28+
- description: 'Tab shape'
29+
30+
### onSort
31+
- type: 'function',
32+
- description: 'tabs sort function',
33+
34+
### 依赖插件
35+
36+
该插件依赖以下插件:
37+
38+
| 插件名 | 包名 |
39+
| --- | --- |
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"plugins": [
3+
[
4+
"@alilc/build-plugin-alt",
5+
{
6+
"type": "plugin",
7+
"inject": true
8+
}
9+
],
10+
[
11+
"build-plugin-fusion",
12+
{
13+
"themePackage": "@alifd/theme-lowcode-light"
14+
}
15+
],
16+
["build-plugin-moment-locales", {
17+
"locales": ["zh-cn"]
18+
}]
19+
]
20+
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
{
2+
"name": "@alilc/lowcode-plugin-resource-tabs",
3+
"version": "1.0.1",
4+
"description": "alibaba lowcode resource tabs plugin",
5+
"files": [
6+
"es",
7+
"lib"
8+
],
9+
"main": "lib/index.js",
10+
"module": "es/index.js",
11+
"scripts": {
12+
"start": "build-scripts start",
13+
"build": "build-scripts build",
14+
"prepublishOnly": "npm run build"
15+
},
16+
"keywords": [
17+
"lowcode",
18+
"editor"
19+
],
20+
"dependencies": {
21+
"@alilc/lowcode-types": "^1.0.0",
22+
"@alilc/lowcode-utils": "^1.0.0",
23+
"react": "^16.8.1",
24+
"react-dom": "^16.8.1"
25+
},
26+
"devDependencies": {
27+
"@alib/build-scripts": "^0.1.3",
28+
"@alilc/build-plugin-alt": "^1.0.1",
29+
"@alilc/lowcode-engine": "^1.0.0",
30+
"@types/react": "^16.9.13",
31+
"@types/react-dom": "^16.9.4",
32+
"build-plugin-fusion": "^0.1.22",
33+
"build-plugin-moment-locales": "^0.1.0"
34+
},
35+
"publishConfig": {
36+
"registry": "https://registry.npmjs.org/",
37+
"access": "public"
38+
},
39+
"repository": {
40+
"type": "git",
41+
"url": "https://github.com/alibaba/lowcode-plugins.git",
42+
"directory": "packages/plugin-resource-tabs"
43+
}
44+
}
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import React from "react"
2+
3+
export const LockIcon = () => {
4+
return (
5+
<svg className="icon" width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg">
6+
<g id="全局逻辑" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7+
<g id="画板" transform="translate(-396.000000, -124.000000)" fill="#A5B0BF" fill-rule="nonzero">
8+
<g id="编组-2" transform="translate(53.000000, 114.000000)">
9+
<g id="编组" transform="translate(343.000000, 10.000000)">
10+
<rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
11+
<path d="M9.75,5.4375 L8.953125,5.4375 L8.953125,2.8125 C8.953125,1.98398437 8.28164063,1.3125 7.453125,1.3125 L4.546875,1.3125 C3.71835938,1.3125 3.046875,1.98398437 3.046875,2.8125 L3.046875,5.4375 L2.25,5.4375 C2.04257813,5.4375 1.875,5.60507813 1.875,5.8125 L1.875,10.3125 C1.875,10.5199219 2.04257813,10.6875 2.25,10.6875 L9.75,10.6875 C9.95742187,10.6875 10.125,10.5199219 10.125,10.3125 L10.125,5.8125 C10.125,5.60507813 9.95742187,5.4375 9.75,5.4375 Z M3.890625,2.8125 C3.890625,2.45039062 4.18476563,2.15625 4.546875,2.15625 L7.453125,2.15625 C7.81523437,2.15625 8.109375,2.45039062 8.109375,2.8125 L8.109375,5.4375 L3.890625,5.4375 L3.890625,2.8125 Z M9.28125,9.84375 L2.71875,9.84375 L2.71875,6.28125 L9.28125,6.28125 L9.28125,9.84375 Z M5.671875,8.21484375 L5.671875,8.8359375 C5.671875,8.8875 5.7140625,8.9296875 5.765625,8.9296875 L6.234375,8.9296875 C6.2859375,8.9296875 6.328125,8.8875 6.328125,8.8359375 L6.328125,8.21484375 C6.46992188,8.11289062 6.5625,7.94648437 6.5625,7.7578125 C6.5625,7.44726562 6.31054688,7.1953125 6,7.1953125 C5.68945312,7.1953125 5.4375,7.44726562 5.4375,7.7578125 C5.4375,7.94648437 5.53007812,8.11289062 5.671875,8.21484375 Z" id="形状"></path>
12+
</g>
13+
</g>
14+
</g>
15+
</g>
16+
</svg>
17+
)
18+
}
19+
20+
export const CloseIcon = () => {
21+
return (
22+
<svg className="icon" width="12" height="12" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg">
23+
<g id="控件" stroke="none" stroke-width="1" fill="currentColor" fill-rule="evenodd">
24+
<g id="设计器页面Tab栏" fill-rule="nonzero">
25+
<g id="编组">
26+
<rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
27+
<path d="M6.38025,5.85 L9.715125,2.515125 C9.85723958,2.36798292 9.85520714,2.13409321 9.71055697,1.98944303 C9.56590679,1.84479286 9.33201708,1.84276042 9.184875,1.984875 L5.85,5.31975 L2.515125,1.984875 C2.36798292,1.84276042 2.13409321,1.84479286 1.98944303,1.98944303 C1.84479286,2.13409321 1.84276042,2.36798292 1.984875,2.515125 L5.31975,5.85 L1.984875,9.184875 C1.84276042,9.33201708 1.84479286,9.56590679 1.98944303,9.71055697 C2.13409321,9.85520714 2.36798292,9.85723958 2.515125,9.715125 L5.85,6.38025 L9.184875,9.715125 C9.25505067,9.78570346 9.35047139,9.82538807 9.45,9.82538807 C9.54952861,9.82538807 9.64494933,9.78570346 9.715125,9.715125 C9.86151823,9.56868756 9.86151823,9.33131244 9.715125,9.184875 L6.38025,5.85 Z" id="路径"></path>
28+
</g>
29+
</g>
30+
</g>
31+
</svg>
32+
)
33+
}
34+
35+
export const WarnIcon = () => {
36+
return (
37+
<svg className="icon" width="12px" height="12px" viewBox="0 0 12 12" version="1.1" xmlns="http://www.w3.org/2000/svg">
38+
<g id="全局逻辑" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
39+
<g id="画板" transform="translate(-218.000000, -124.000000)" fill="#F3AD13" fill-rule="nonzero">
40+
<g id="编组-2" transform="translate(53.000000, 114.000000)">
41+
<g id="编组" transform="translate(165.000000, 10.000000)">
42+
<rect id="矩形" opacity="0" x="0" y="0" width="12" height="12"></rect>
43+
<path d="M11.184319,9.78270333 L6.48418972,1.64185482 C6.38427751,1.46882851 6.19965139,1.3622428 5.99985011,1.3622428 C5.80004882,1.3622428 5.6154227,1.46882851 5.51551049,1.64185482 L0.806051496,9.79886837 C0.706153196,9.97190719 0.706155703,10.1850961 0.806058072,10.3581326 C0.905960441,10.5311691 1.09058595,10.6377716 1.29039111,10.6377716 L10.7095969,10.6377716 C11.0184715,10.6377716 11.2688617,10.3873814 11.2688617,10.0784948 C11.2688617,9.96987243 11.2379107,9.86849317 11.184319,9.78270333 L11.184319,9.78270333 Z M6.47966878,8.93107673 C6.47966878,9.19600112 6.26490639,9.41075152 5.999994,9.41075152 C5.73506961,9.41075152 5.52031922,9.19600112 5.52031922,8.93107673 L5.52031922,8.91569116 C5.52031922,8.65076678 5.73506961,8.43601638 5.999994,8.43601638 C6.26490639,8.43601638 6.47966878,8.65076678 6.47966878,8.91569116 L6.47966878,8.93107673 Z M6.47966878,7.17836906 C6.47966878,7.44329345 6.26491839,7.65804384 5.999994,7.65804384 C5.73508161,7.65804384 5.52031922,7.44329345 5.52031922,7.17836906 L5.52031922,4.6278663 C5.52031922,4.36294192 5.73508161,4.14819152 5.999994,4.14819152 C6.26491839,4.14819152 6.47966878,4.36294192 6.47966878,4.6278663 L6.47966878,7.17836906 Z" id="形状"></path>
44+
</g>
45+
</g>
46+
</g>
47+
</g>
48+
</svg>
49+
)
50+
}
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
.resource-tabs {
2+
.resource-tab-item {
3+
display: flex;
4+
line-height: 20px;
5+
6+
&:hover {
7+
.resource-tab-item-close-icon {
8+
display: block;
9+
}
10+
11+
.resource-tab-item-others {
12+
display: none;
13+
}
14+
}
15+
16+
&-resource-icon {
17+
position: relative;
18+
top: 2px;
19+
margin-right: 2px;
20+
}
21+
22+
&-changed-icon {
23+
display: block;
24+
width: 5px;
25+
height: 5px;
26+
border-radius: 100%;
27+
background-color: var(--color-brand1-6, #006aff);
28+
margin: 0 auto;
29+
}
30+
31+
&-title {
32+
max-width: 100px;
33+
white-space: nowrap;
34+
overflow: hidden;
35+
text-overflow: ellipsis;
36+
}
37+
38+
&-tips {
39+
margin-left: 2px;
40+
width: 12px;
41+
}
42+
43+
&-close-icon {
44+
position: relative;
45+
top: 2px;
46+
display: none;
47+
}
48+
49+
&-others {
50+
display: block;
51+
52+
.icon {
53+
position: relative;
54+
top: 2px;
55+
}
56+
}
57+
}
58+
}

0 commit comments

Comments
 (0)