@steedos/service-package-registry 2.6.1-beta.7 → 2.6.2-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.
- package/main/default/client/project_nodes.client.js +2 -2
- package/main/default/manager/loader.js +136 -40
- package/main/default/manager/packages.js +29 -6
- package/main/default/manager/registry.js +28 -2
- package/main/default/objectTranslations/steedos_packages.en/steedos_packages.en.objectTranslation.yml +4 -0
- package/main/default/objects/steedos_packages/fields/dependencies.field.yml +4 -0
- package/main/default/objects/steedos_packages/fields/description.field.yml +1 -1
- package/main/default/objects/steedos_packages/fields/homepage.field.yml +4 -0
- package/main/default/objects/steedos_packages/fields/icon.field.yml +3 -0
- package/main/default/objects/steedos_packages/fields/instance_id.field.yml +1 -0
- package/main/default/objects/steedos_packages/fields/metadata.$.type.field.yml +1 -1
- package/main/default/objects/steedos_packages/fields/metadata.field.yml +2 -1
- package/main/default/objects/steedos_packages/fields/node_id.field.yml +1 -0
- package/main/default/objects/steedos_packages/fields/readme.field.yml +4 -0
- package/main/default/objects/steedos_packages/fields/service_name.field.yml +1 -0
- package/main/default/objects/steedos_packages/fields/static.field.yml +4 -0
- package/main/default/objects/steedos_packages/listviews/all.listview.yml +6 -5
- package/main/default/objects/steedos_packages/listviews/custom.listview.yml +8 -0
- package/main/default/objects/steedos_packages/listviews/system.listview.yml +8 -0
- package/main/default/pages/steedos_package_detail.page.amis.json +144 -0
- package/main/default/pages/steedos_package_detail.page.yml +12 -0
- package/main/default/pages/steedos_packages_list.page.amis.json +146 -0
- package/main/default/pages/steedos_packages_list.page.yml +12 -0
- package/package.json +7 -7
- package/project.package.service.js +183 -220
- package/main/default/routes/nodes.router.js +0 -226
- package/main/default/routes/registry.router.js +0 -21
|
@@ -0,0 +1,144 @@
|
|
|
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: '\\${!record}', body: [{className: 'w-9 h-9 rounded', type:'steedos-icon',name: '\\${record.icon || \"default\"}', colorVariant:'base', hiddenOn: '\\${!record}', height:'2.25rem', width:'2.25rem'}]};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
|
+
"className": "p-0"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
"title": "详细信息",
|
|
60
|
+
"body": [
|
|
61
|
+
{
|
|
62
|
+
"type": "steedos-object-form",
|
|
63
|
+
"label": "对象表单",
|
|
64
|
+
"objectApiName": "${objectName}",
|
|
65
|
+
"recordId": "${recordId}",
|
|
66
|
+
"appId": "${appId}",
|
|
67
|
+
"id": "u:fec578db3278",
|
|
68
|
+
"mode": "read",
|
|
69
|
+
"className": "mb-4",
|
|
70
|
+
"excludedFields": [
|
|
71
|
+
"metadata",
|
|
72
|
+
"dependencies"
|
|
73
|
+
]
|
|
74
|
+
}
|
|
75
|
+
],
|
|
76
|
+
"className": "p-0",
|
|
77
|
+
"id": "u:5d4e7e3f6ecc"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"title": "依赖服务",
|
|
81
|
+
"body": [
|
|
82
|
+
{
|
|
83
|
+
"type": "steedos-object-form",
|
|
84
|
+
"label": "对象表单",
|
|
85
|
+
"objectApiName": "${objectName}",
|
|
86
|
+
"recordId": "${recordId}",
|
|
87
|
+
"appId": "${appId}",
|
|
88
|
+
"id": "u:fec578db3278",
|
|
89
|
+
"mode": "read",
|
|
90
|
+
"className": "mb-4",
|
|
91
|
+
"fields": [
|
|
92
|
+
"dependencies"
|
|
93
|
+
],
|
|
94
|
+
"fieldsExtend": {
|
|
95
|
+
"dependencies": {
|
|
96
|
+
"label": false,
|
|
97
|
+
"amis": {
|
|
98
|
+
"type": "tpl",
|
|
99
|
+
"tpl": "${dependencies | join: }"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
],
|
|
105
|
+
"className": "p-0",
|
|
106
|
+
"id": "u:5d4e7e3f6ecc"
|
|
107
|
+
}
|
|
108
|
+
],
|
|
109
|
+
"id": "u:148cf8e840eb"
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"type": "steedos-object-form",
|
|
113
|
+
"label": "对象表单",
|
|
114
|
+
"objectApiName": "${objectName}",
|
|
115
|
+
"recordId": "${recordId}",
|
|
116
|
+
"appId": "${appId}",
|
|
117
|
+
"id": "u:fec578db3278",
|
|
118
|
+
"className": "hidden"
|
|
119
|
+
}
|
|
120
|
+
],
|
|
121
|
+
"regions": [
|
|
122
|
+
"body"
|
|
123
|
+
],
|
|
124
|
+
"id": "page_steedos_packages_record_detail",
|
|
125
|
+
"name": "page_steedos_packages_record_detail",
|
|
126
|
+
"objectApiName": "${objectName}",
|
|
127
|
+
"bodyClassName": "",
|
|
128
|
+
"className": "object-detail-page"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"regions": [
|
|
132
|
+
"body"
|
|
133
|
+
],
|
|
134
|
+
"data": {
|
|
135
|
+
"context": {}
|
|
136
|
+
},
|
|
137
|
+
"id": "u:81b404eac916",
|
|
138
|
+
"bodyClassName": "p-0",
|
|
139
|
+
"css": {
|
|
140
|
+
".antd-Tag--prev": {
|
|
141
|
+
"display": "inline-block"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"type": "page",
|
|
3
|
+
"body": [
|
|
4
|
+
{
|
|
5
|
+
"type": "steedos-object-listview",
|
|
6
|
+
"label": "列表视图",
|
|
7
|
+
"objectApiName": "${objectName}",
|
|
8
|
+
"listName": "all",
|
|
9
|
+
"showHeader": true,
|
|
10
|
+
"className": "sm:border sm:rounded sm:border-gray-300 mb-4",
|
|
11
|
+
"id": "u:70d5861033de",
|
|
12
|
+
"crudMode": "cards",
|
|
13
|
+
"crud": {
|
|
14
|
+
"columnsCount": 4,
|
|
15
|
+
"id": "u:553974f9435b",
|
|
16
|
+
"mode": "cards",
|
|
17
|
+
"footerToolbar": [],
|
|
18
|
+
"switchPerPage": false,
|
|
19
|
+
"bulkActions": [],
|
|
20
|
+
"card": {
|
|
21
|
+
"itemAction": {
|
|
22
|
+
"actionType": "link",
|
|
23
|
+
"link": "/app/admin/steedos_packages/view/${_id}"
|
|
24
|
+
},
|
|
25
|
+
"useCardLabel": false,
|
|
26
|
+
"body": [
|
|
27
|
+
{
|
|
28
|
+
"type": "tpl",
|
|
29
|
+
"tpl": "<div class='antd-Card-heading bg-white'><span class='antd-Card-avtar pull-left thumb-md m-r slds-icon slds-icon_container slds-icon-${iconCategory}-${iconName} ${display === \"split\" && 'hidden'}'><img class='antd-Card-img'src='${icon}' /></span><div class='antd-Card-meta'><div class='antd-Card-title'><span class='antd-TplField' title='${label}'><span>${label}</span></span></div><div class='antd-Card-subTitle'><span class='antd-TplField' title='${description}'><span>${description}</span></span></div><div class='antd-Card-desc'><span class='antd-TplField'><span><span class='bg-${status === 'enable' ? 'green': 'gray'}-300 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></span></span></div></div></div>"
|
|
30
|
+
}
|
|
31
|
+
],
|
|
32
|
+
"actions": [
|
|
33
|
+
{
|
|
34
|
+
"label": "${uiSchema.actions.enable.label}",
|
|
35
|
+
"disabledOn": "${status === 'enable' || window:Meteor.settings.public.enable_saas}",
|
|
36
|
+
"className": "mr-4",
|
|
37
|
+
"onEvent": {
|
|
38
|
+
"click": {
|
|
39
|
+
"actions": [
|
|
40
|
+
{
|
|
41
|
+
"actionType": "custom",
|
|
42
|
+
"script": "let todo = event.data.uiSchema.actions.enable.todo;\nlet objectName = event.data.objectName;\nlet _id = event.data._id;\n\nif (todo) {\n (new Function(\"(\" + todo + \")(\" + \"'\" + objectName + \"'\" + \",'\" + _id + \"')\"))();\n}\n"
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
"id": "u:553d77aa3872"
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"label": "${uiSchema.actions.disable.label}",
|
|
51
|
+
"disabledOn": "${status !== 'enable' || window:Meteor.settings.public.enable_saas}",
|
|
52
|
+
"onEvent": {
|
|
53
|
+
"click": {
|
|
54
|
+
"actions": [
|
|
55
|
+
{
|
|
56
|
+
"actionType": "custom",
|
|
57
|
+
"script": "let todo = event.data.uiSchema.actions.disable.todo;\nlet objectName = event.data.objectName;\nlet _id = event.data._id;\n\nif (todo) {\n (new Function(\"(\" + todo + \")(\" + \"'\" + objectName + \"'\" + \",'\" + _id + \"')\"))();\n}\n"
|
|
58
|
+
}
|
|
59
|
+
]
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"id": "u:7e1db04924da",
|
|
63
|
+
"className": "mr-4"
|
|
64
|
+
}
|
|
65
|
+
],
|
|
66
|
+
"type": "card",
|
|
67
|
+
"id": "u:2bb7748ac402"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"adaptor": "if (payload.data.rows.length) {\n var unpkgUrl = window.Builder && window.Builder.settings.unpkgUrl || \"\";\n payload.data.rows.forEach(function (row) {\n if (!row.icon) {\n row.icon = \"standard.default\";\n }\n if (row.icon) {\n if (!/^http(s?):\\/\\//.test(row.icon) && !row.icon.endsWith('.jpg') && !row.icon.endsWith('.png')) {\n var iconCategory = \"standard\";\n var iconName = row.icon;\n var tags = row.icon.split(\".\");\n if (tags.length > 1) {\n iconCategory = tags[0];\n iconName = tags[1];\n }\n row.iconCategory = iconCategory;\n row.iconName = iconName.replace(\"_\", \"-\");\n row.icon = unpkgUrl + \"/@salesforce-ux/design-system@2.22.0/assets/icons/\" + iconCategory + \"/\" + iconName.replace(\"-\", \"_\") + \"_120.png\";\n }\n }\n });\n}\nreturn payload;"
|
|
71
|
+
}
|
|
72
|
+
],
|
|
73
|
+
"regions": [
|
|
74
|
+
"body"
|
|
75
|
+
],
|
|
76
|
+
"data": {
|
|
77
|
+
"objectName": "steedos_packages",
|
|
78
|
+
"context": {}
|
|
79
|
+
},
|
|
80
|
+
"id": "u:2775cd701d6a",
|
|
81
|
+
"name": "page_test__c_list",
|
|
82
|
+
"bodyClassName": "p-0",
|
|
83
|
+
"cssVars": {
|
|
84
|
+
"--text--muted-color": "#bebfc4"
|
|
85
|
+
},
|
|
86
|
+
"css": {
|
|
87
|
+
".antd-Wrapper.steedos-object-table > .antd-Service": {
|
|
88
|
+
"flex-grow": "1"
|
|
89
|
+
},
|
|
90
|
+
".antd-Service.steedos-object-table .antd-Crud .antd-Cards": {
|
|
91
|
+
"height": "100%"
|
|
92
|
+
},
|
|
93
|
+
".antd-Service.steedos-object-table .antd-Crud .antd-Cards .antd-Cards-toolbar": {
|
|
94
|
+
"padding-top": "0.5rem",
|
|
95
|
+
"padding-bottom": "0.5rem",
|
|
96
|
+
"padding-left": "1rem",
|
|
97
|
+
"padding-right": "1rem",
|
|
98
|
+
"--tw-bg-opacity": "1",
|
|
99
|
+
"background-color": "rgb(243 244 246 / var(--tw-bg-opacity))",
|
|
100
|
+
"--tw-border-opacity": "1",
|
|
101
|
+
"border-color": "rgb(209 213 219 / var(--tw-border-opacity))",
|
|
102
|
+
"border-style": "solid",
|
|
103
|
+
"border-bottom-width": "1px"
|
|
104
|
+
},
|
|
105
|
+
".antd-Service.steedos-object-table .antd-Crud .antd-Cards .antd-Cards-body": {
|
|
106
|
+
"margin": "0.25rem"
|
|
107
|
+
},
|
|
108
|
+
".antd-Card-toolbar .ant-ribbon-wrapper": {
|
|
109
|
+
"position": "absolute",
|
|
110
|
+
"top": "-14px",
|
|
111
|
+
"right": "0"
|
|
112
|
+
},
|
|
113
|
+
".antd-Crud .antd-Cards .antd-Card .antd-Card-heading .antd-Card-avtar, .antd-Crud .antd-Cards .antd-Card .antd-Card-heading .antd-Card-avtarText": {
|
|
114
|
+
"min-width": "50px",
|
|
115
|
+
"min-height": "50px",
|
|
116
|
+
"border-radius": "6px",
|
|
117
|
+
"width": "50px",
|
|
118
|
+
"height": "50px"
|
|
119
|
+
},
|
|
120
|
+
".antd-Crud .antd-Cards .antd-Card .antd-Card-meta": {
|
|
121
|
+
"overflow": "hidden"
|
|
122
|
+
},
|
|
123
|
+
".antd-Crud .antd-Cards .antd-Card .antd-Card-meta .antd-Card-subTitle": {
|
|
124
|
+
"-webkit-line-clamp": "1",
|
|
125
|
+
"max-height": "calc(var(--fontSizeBase) * var(--lineHeightBase) * 1)",
|
|
126
|
+
"min-height": "calc(var(--fontSizeBase) * var(--lineHeightBase) * 1)"
|
|
127
|
+
},
|
|
128
|
+
".steedos-object-table.steedos-crud-mode-cards .antd-Crud .antd-Cards .antd-Cards-body .antd-Card .antd-Card-body": {
|
|
129
|
+
"padding-left": "0px",
|
|
130
|
+
"padding-right": "0px",
|
|
131
|
+
"padding-top": "0px",
|
|
132
|
+
"margin-top": "0px",
|
|
133
|
+
"padding-bottom": "0px"
|
|
134
|
+
},
|
|
135
|
+
".steedos-object-table.steedos-crud-mode-cards .antd-Crud .antd-Cards .antd-Cards-body .antd-Card": {
|
|
136
|
+
"padding-top": "2px"
|
|
137
|
+
},
|
|
138
|
+
".antd-Card-actions a[disabled]": {
|
|
139
|
+
"box-shadow": "none",
|
|
140
|
+
"cursor": "not-allowed"
|
|
141
|
+
},
|
|
142
|
+
".antd-Card-actions a[disabled]:hover": {
|
|
143
|
+
"color": "rgba(0,0,0,.25)"
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-package-registry",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2-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.6.
|
|
13
|
-
"@steedos/core": "2.6.
|
|
14
|
-
"@steedos/metadata-core": "2.6.
|
|
15
|
-
"@steedos/objectql": "2.6.
|
|
16
|
-
"@steedos/service-package-loader": "2.6.
|
|
12
|
+
"@steedos/auth": "2.6.2-beta.3",
|
|
13
|
+
"@steedos/core": "2.6.2-beta.3",
|
|
14
|
+
"@steedos/metadata-core": "2.6.2-beta.3",
|
|
15
|
+
"@steedos/objectql": "2.6.2-beta.3",
|
|
16
|
+
"@steedos/service-package-loader": "2.6.2-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": "
|
|
34
|
+
"gitHead": "7842aa5d3023622c0e140009cfdd081180563bdd"
|
|
35
35
|
}
|