@steedos/service-package-registry 2.5.16-beta.1 → 2.5.16-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,11 @@ const getPackageYmlData = (packagePath)=>{
16
16
  if(fs.existsSync(path.join(packagePath, 'steedos.package.yml'))){
17
17
  packageYmlData = metaDataCore.loadFile(path.join(packagePath, 'steedos.package.yml'));
18
18
  }
19
+ if(fs.existsSync(path.join(packagePath, 'README.md'))){
20
+ packageYmlData.readme = metaDataCore.loadFile(path.join(packagePath, 'README.md'));
21
+ }else if(fs.existsSync(path.join(packagePath, 'readme.md'))){
22
+ packageYmlData.readme = metaDataCore.loadFile(path.join(packagePath, 'readme.md'));
23
+ }
19
24
  return packageYmlData;
20
25
  }
21
26
 
@@ -0,0 +1,3 @@
1
+ name: icon
2
+ type: text
3
+ visible_on: "{{false}}"
@@ -0,0 +1,4 @@
1
+ name: readme
2
+ type: markdown
3
+ is_wide: true
4
+ visible_on: "{{false}}"
@@ -8,9 +8,27 @@ columns:
8
8
  wrap: false
9
9
  - field: status
10
10
  - field: static
11
+ - field: icon
11
12
  filter_scope: space
12
13
  label: 所有软件包
13
14
  scrolling_mode: standard
14
15
  shared: true
15
16
  show_count: false
16
17
  type: grid
18
+ adaptor: |
19
+ if(payload.data.rows.length){
20
+ payload.data.rows.forEach(function(row){
21
+ if(row.icon){
22
+ if(!/^http(s?):\/\//.test(row.icon)){
23
+ var iconCategory = "standard";
24
+ var iconName = row.icon;
25
+ var tags = row.icon.split(".");
26
+ if(tags.length > 1){
27
+ iconCategory = tags[0];
28
+ iconName = tags[1];
29
+ }
30
+ row.icon = "https://unpkg.steedos.cn/@salesforce-ux/design-system@2.22.0/assets/icons/" + iconCategory + "/" + iconName + "_120.png";
31
+ }
32
+ }
33
+ });
34
+ }
@@ -1,13 +1,4 @@
1
1
  name: custom
2
- columns:
3
- - field: label
4
- wrap: false
5
- - field: description
6
- wrap: false
7
- - field: version
8
- wrap: false
9
- - field: status
10
- - field: static
11
2
  filter_scope: space
12
3
  label: 自定义软件包
13
4
  scrolling_mode: standard
@@ -15,3 +6,20 @@ shared: true
15
6
  show_count: false
16
7
  type: grid
17
8
  filters: [["static","!=", true]]
9
+ adaptor: |
10
+ if(payload.data.rows.length){
11
+ payload.data.rows.forEach(function(row){
12
+ if(row.icon){
13
+ if(!/^http(s?):\/\//.test(row.icon)){
14
+ var iconCategory = "standard";
15
+ var iconName = row.icon;
16
+ var tags = row.icon.split(".");
17
+ if(tags.length > 1){
18
+ iconCategory = tags[0];
19
+ iconName = tags[1];
20
+ }
21
+ row.icon = "https://unpkg.steedos.cn/@salesforce-ux/design-system@2.22.0/assets/icons/" + iconCategory + "/" + iconName + "_120.png";
22
+ }
23
+ }
24
+ });
25
+ }
@@ -1,13 +1,4 @@
1
1
  name: system
2
- columns:
3
- - field: label
4
- wrap: false
5
- - field: description
6
- wrap: false
7
- - field: version
8
- wrap: false
9
- - field: status
10
- - field: static
11
2
  filter_scope: space
12
3
  label: 系统软件包
13
4
  scrolling_mode: standard
@@ -15,3 +6,20 @@ shared: true
15
6
  show_count: false
16
7
  type: grid
17
8
  filters: [["static","=", true]]
9
+ adaptor: |
10
+ if(payload.data.rows.length){
11
+ payload.data.rows.forEach(function(row){
12
+ if(row.icon){
13
+ if(!/^http(s?):\/\//.test(row.icon)){
14
+ var iconCategory = "standard";
15
+ var iconName = row.icon;
16
+ var tags = row.icon.split(".");
17
+ if(tags.length > 1){
18
+ iconCategory = tags[0];
19
+ iconName = tags[1];
20
+ }
21
+ row.icon = "https://unpkg.steedos.cn/@salesforce-ux/design-system@2.22.0/assets/icons/" + iconCategory + "/" + iconName + "_120.png";
22
+ }
23
+ }
24
+ });
25
+ }
@@ -0,0 +1,113 @@
1
+ {
2
+ "type": "page",
3
+ "body": [
4
+ {
5
+ "type": "steedos-record-service",
6
+ "body": [
7
+ {
8
+ "type": "steedos-record-detail-header",
9
+ "label": "标题面板",
10
+ "objectApiName": "${objectName}",
11
+ "recordId": "${recordId}",
12
+ "id": "u:9d9bc707bfd2",
13
+ "schemaFilter": "config.body[0].body[0].columns[0].body[0].columns[1].body[0].tpl='\\${name}'; config.body[0].body[0].columns[0].body[0].columns[0].body[1]={type: 'container', hiddenOn: '\\${!name}', body: [{className: 'w-9 h-9 rounded', type:'steedos-icon',name: '\\${record.icon}', colorVariant:'base', hiddenOn: '\\${!record.icon}', height:'2.25rem', width:'2.25rem'}, {type: 'avatar', className:'w-9 h-9 rounded text-white bg-blue-600', shape: 'square', hiddenOn: '\\${!!record.icon}', text: '\\${name|split:/|last|substring:0:2|upperCase}'}]};config.body[0].body[0].columns[0].body[0].columns[1].body[1] = Object.assign({}, config.body[0].body[0].columns[0].body[0].columns[1].body[1], {type: 'tag', label: '\\${record.version}', displayMode: 'status', color: '\\${record.status == \"enable\" ? \"active\" : record.status == \"starting\" ? \"processing\" : \"inactive\"}',className: 'package-status p-0', style: {background: 'transparent'}}); "
14
+ },
15
+ {
16
+ "type": "tabs",
17
+ "className": "sm:mt-3 bg-white sm:rounded sm:border border-gray-300 p-4",
18
+ "tabs": [
19
+ {
20
+ "title": "摘要",
21
+ "body": [
22
+ {
23
+ "type": "markdown",
24
+ "id": "u:53a87f0b73be",
25
+ "name": "_master.record.readme",
26
+ "options": {
27
+ "html": true
28
+ }
29
+ }
30
+ ],
31
+ "id": "u:8ca26c842ff6"
32
+ },
33
+ {
34
+ "title": "软件包组件",
35
+ "body": [
36
+ {
37
+ "type": "steedos-object-form",
38
+ "label": "对象表单",
39
+ "objectApiName": "${objectName}",
40
+ "recordId": "${recordId}",
41
+ "appId": "${appId}",
42
+ "id": "u:fec578db3278",
43
+ "fields": [
44
+ "metadata",
45
+ "metadata.$.label",
46
+ "metadata.$.api_name",
47
+ "metadata.$.type"
48
+ ],
49
+ "fieldsExtend": {
50
+ "metadata": {
51
+ "label": false
52
+ }
53
+ }
54
+ }
55
+ ]
56
+ },
57
+ {
58
+ "title": "详细信息",
59
+ "body": [
60
+ {
61
+ "type": "steedos-object-form",
62
+ "label": "对象表单",
63
+ "objectApiName": "${objectName}",
64
+ "recordId": "${recordId}",
65
+ "appId": "${appId}",
66
+ "id": "u:fec578db3278",
67
+ "mode": "read",
68
+ "className": "mb-4",
69
+ "excludedFields": [
70
+ "metadata"
71
+ ]
72
+ }
73
+ ],
74
+ "className": "px-0 py-4",
75
+ "id": "u:5d4e7e3f6ecc"
76
+ }
77
+ ],
78
+ "id": "u:148cf8e840eb"
79
+ },
80
+ {
81
+ "type": "steedos-object-form",
82
+ "label": "对象表单",
83
+ "objectApiName": "${objectName}",
84
+ "recordId": "${recordId}",
85
+ "appId": "${appId}",
86
+ "id": "u:fec578db3278",
87
+ "className": "hidden"
88
+ }
89
+ ],
90
+ "regions": [
91
+ "body"
92
+ ],
93
+ "id": "page_steedos_packages_record_detail",
94
+ "name": "page_steedos_packages_record_detail",
95
+ "objectApiName": "${objectName}",
96
+ "bodyClassName": "",
97
+ "className": "object-detail-page"
98
+ }
99
+ ],
100
+ "id": "u:81b404eac916",
101
+ "regions": [
102
+ "body"
103
+ ],
104
+ "data": {
105
+ "context": {}
106
+ },
107
+ "bodyClassName": "p-0",
108
+ "css": {
109
+ ".antd-Tag--prev": {
110
+ "display": "inline-block"
111
+ }
112
+ }
113
+ }
@@ -0,0 +1,12 @@
1
+ name: steedos_package_detail
2
+ is_active: true
3
+ label: 软件包详细页面
4
+ object_name: steedos_packages
5
+ pageAssignments:
6
+ - type: orgDefault
7
+ page: steedos_package_detail
8
+ desktop: true
9
+ mobile: true
10
+ render_engine: amis
11
+ type: record
12
+ widgets: []
@@ -22,22 +22,17 @@
22
22
  "link": "/app/admin/steedos_packages/view/${_id}"
23
23
  },
24
24
  "header": {
25
+ "avatar": "${icon}",
25
26
  "avatarText": "${label|split:/|last|substring:0:2|upperCase}",
27
+ "avatarClassName": "pull-left thumb-md b-3x m-r slds-icon slds-icon_container slds-icon-standard-user",
26
28
  "avatarTextBackground": [
27
- "#FFB900",
28
- "#D83B01",
29
- "#B50E0E",
30
- "#E81123",
31
- "#B4009E",
32
- "#5C2D91",
33
- "#0078D7",
34
- "#00B4FF",
35
- "#008272"
29
+ "#34becd"
36
30
  ],
37
31
  "className": "bg-white",
38
- "title": "${label}@${version}",
39
- "subTitle": "$description",
40
- "description": "<span class=\"bg-${status === 'enable' ? 'green': 'gray'}-300 border rounded-full px-2 py-0.5 mt-2 inline-block\">$_display.status</span>"
32
+ "title": "${label}",
33
+ "subTitle": "${description}",
34
+ "subTitlePlaceholder": "--",
35
+ "description": "<span class=\"bg-${status === 'enable' ? 'green': 'gray'}-300 border rounded-full px-2 py-0.5 mt-2 inline-block\">$_display.status</span><span class='text-gray-600 px-2 py-0.5 mt-2 inline-block float-right'>${version}</span>"
41
36
  },
42
37
  "actions": [
43
38
  {
@@ -122,9 +117,20 @@
122
117
  "top": "-14px",
123
118
  "right": "0"
124
119
  },
125
- ".antd-Crud .antd-Cards .antd-Card .antd-Card-title": {
126
- "white-space": "break-spaces",
127
- "word-break": "break-all"
120
+ ".antd-Crud .antd-Cards .antd-Card .antd-Card-heading .antd-Card-avtar, .antd-Crud .antd-Cards .antd-Card .antd-Card-heading .antd-Card-avtarText": {
121
+ "min-width": "50px",
122
+ "min-height": "50px",
123
+ "border-radius": "6px",
124
+ "width": "50px",
125
+ "height": "50px"
126
+ },
127
+ ".antd-Crud .antd-Cards .antd-Card .antd-Card-meta": {
128
+ "overflow": "hidden"
129
+ },
130
+ ".antd-Crud .antd-Cards .antd-Card .antd-Card-meta .antd-Card-subTitle": {
131
+ "-webkit-line-clamp": "1",
132
+ "max-height": "calc(var(--fontSizeBase) * var(--lineHeightBase) * 1)",
133
+ "min-height": "calc(var(--fontSizeBase) * var(--lineHeightBase) * 1)"
128
134
  }
129
135
  }
130
136
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/service-package-registry",
3
- "version": "2.5.16-beta.1",
3
+ "version": "2.5.16-beta.3",
4
4
  "description": "",
5
5
  "main": "package.service.js",
6
6
  "scripts": {
@@ -9,11 +9,11 @@
9
9
  "author": "",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
- "@steedos/auth": "2.5.16-beta.1",
13
- "@steedos/core": "2.5.16-beta.1",
14
- "@steedos/metadata-core": "2.5.16-beta.1",
15
- "@steedos/objectql": "2.5.16-beta.1",
16
- "@steedos/service-package-loader": "2.5.16-beta.1",
12
+ "@steedos/auth": "2.5.16-beta.3",
13
+ "@steedos/core": "2.5.16-beta.3",
14
+ "@steedos/metadata-core": "2.5.16-beta.3",
15
+ "@steedos/objectql": "2.5.16-beta.3",
16
+ "@steedos/service-package-loader": "2.5.16-beta.3",
17
17
  "fs-extra": "8.1.0",
18
18
  "i18next": "20.3.2",
19
19
  "json-stringify-safe": "5.0.1",
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "a49fccb59a464a337093f027f5d5279d738f5570"
34
+ "gitHead": "d878d9f91acc8b15307f2483cb0dcc4cd5f6e937"
35
35
  }