@steedos/standard-ui 2.7.1-beta.8 → 2.7.1

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.
@@ -0,0 +1,8 @@
1
+ Tracker.autorun(function(e) {
2
+ if (Creator.validated.get()){
3
+ const token = Creator.USER_CONTEXT.user.authToken;
4
+ if (token) {
5
+ localStorage.setItem("steedos:token", token);
6
+ }
7
+ }
8
+ })
@@ -46,6 +46,10 @@ fields:
46
46
  label: Show Left Navigation
47
47
  help:
48
48
  description:
49
+ visible_on:
50
+ label: Visible On
51
+ help:
52
+ description:
49
53
  enable_nav_schema:
50
54
  label: Enable Custom Navigation
51
55
  help:
@@ -46,6 +46,10 @@ fields:
46
46
  label: 显示左侧导航
47
47
  help:
48
48
  description:
49
+ visible_on:
50
+ label: 显示公式
51
+ help: 根据公式判断是否显示应用
52
+ description:
49
53
  enable_nav_schema:
50
54
  label: 启用自定义导航
51
55
  help:
@@ -20,6 +20,7 @@ fields:
20
20
  type: text
21
21
  required: true
22
22
  searchable: true
23
+ filterable: true
23
24
  icon_slds:
24
25
  label: SLDS Icon
25
26
  type: lookup
@@ -49,6 +50,8 @@ fields:
49
50
  label: Description
50
51
  type: textarea
51
52
  is_wide: true
53
+ searchable: true
54
+ filterable: true
52
55
  tabs:
53
56
  label: Tabs
54
57
  type: lookup
@@ -146,17 +149,20 @@ fields:
146
149
  label: Open in IE (Using Steedos Desktop)
147
150
  defaultValue: false
148
151
  group: External Application
152
+ filterable: true
149
153
  is_use_iframe:
150
154
  type: boolean
151
155
  label: Open with iframe
152
156
  defaultValue: false
153
157
  group: External Application
154
158
  visible_on: "{{false}}"
159
+ filterable: true
155
160
  is_new_window:
156
161
  type: boolean
157
162
  label: Open in New Window
158
163
  defaultValue: false
159
164
  group: External Application
165
+ filterable: true
160
166
  on_click:
161
167
  type: textarea
162
168
  label: onClick
@@ -193,6 +199,13 @@ fields:
193
199
  function () {
194
200
  return Steedos.getObjectsOptions()
195
201
  }
202
+ visible_on:
203
+ name: visible_on
204
+ is_wide: true
205
+ label: Visible On
206
+ inlineHelpText: Visible On
207
+ type: textarea
208
+ group: other
196
209
  enable_nav_schema:
197
210
  label: 启用自定义导航
198
211
  type: boolean
@@ -1,6 +1,6 @@
1
1
  name: tabs
2
2
  label: Tabs
3
- icon: apps
3
+ icon: timeslot
4
4
  hidden: true
5
5
  version: 2.0
6
6
  enable_dataloader: false
@@ -12,10 +12,14 @@ fields:
12
12
  type: text
13
13
  is_name: true
14
14
  required: true
15
+ filterable: true
16
+ searchable: true
15
17
  name:
16
18
  label: Api Name
17
19
  type: text
18
20
  required: true
21
+ filterable: true
22
+ searchable: true
19
23
  icon:
20
24
  label: Icon
21
25
  type: lookup
@@ -49,14 +53,17 @@ fields:
49
53
  value: url
50
54
  - label: Page
51
55
  value: page
56
+ filterable: true
52
57
  mobile:
53
58
  label: Display on the Mobile
54
59
  type: boolean
55
60
  defaultValue: true
61
+ filterable: true
56
62
  desktop:
57
63
  label: Display on the Desktop
58
64
  type: boolean
59
65
  defaultValue: true
66
+ filterable: true
60
67
  frame_height:
61
68
  hidden: true
62
69
  inlineHelpText: The height, in pixels of the tab frame. Required for frame and page tabs.
@@ -0,0 +1,37 @@
1
+ {
2
+ "type": "page",
3
+ "title": "PDF View",
4
+ "className": "page-pdf-file",
5
+ "css": {
6
+ ".page-pdf-file .antd-Page-body>div": {
7
+ "height": "100%"
8
+ },
9
+ ".page-pdf-file .react-pdf__Page__canvas": {
10
+ "width": "100% !important"
11
+ }
12
+ },
13
+ "body": [
14
+ {
15
+ "type": "pdf-viewer",
16
+ "id": "pdf-viewer",
17
+ "name": "file",
18
+ "width": 500,
19
+ "source": "src",
20
+ "src": "${context.rootUrl}${fileUrl}"
21
+ }
22
+ ],
23
+ "regions": [
24
+ "body"
25
+ ],
26
+ "data": {
27
+ "initialValues": {},
28
+ "appId": "builder",
29
+ "title": ""
30
+ },
31
+ "id": "u:015f6bd7ecd0",
32
+ "asideResizor": false,
33
+ "editorState": "default",
34
+ "pullRefresh": {
35
+ "disabled": true
36
+ }
37
+ }
@@ -0,0 +1,9 @@
1
+ name: pdf_view
2
+ allow_anonymous: true
3
+ is_active: true
4
+ label: pdf view
5
+ locked: false
6
+ pageAssignments: []
7
+ render_engine: amis
8
+ type: app
9
+ widgets: []
@@ -1,6 +1,6 @@
1
1
  name: admin_audit_records
2
2
  desktop: true
3
- icon: record
3
+ icon: medication
4
4
  is_new_window: false
5
5
  label: 审计日志
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_developer_graphql
2
2
  desktop: true
3
- icon: entity
3
+ icon: portal
4
4
  is_new_window: true
5
5
  label: Graphql IDE
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_flow_positions
2
2
  desktop: true
3
- icon: queue
3
+ icon: person_account
4
4
  is_new_window: false
5
5
  label: 审批岗位成员
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_flow_roles
2
2
  desktop: true
3
- icon: queue
3
+ icon: messaging_user
4
4
  is_new_window: false
5
5
  label: 审批岗位
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_metadata
2
2
  desktop: true
3
- icon: entity
3
+ icon: discounts
4
4
  is_new_window: false
5
5
  is_use_iframe: false
6
6
  label: 元数据
@@ -1,6 +1,6 @@
1
1
  name: admin_process_delegation_rules
2
2
  desktop: true
3
- icon: metrics
3
+ icon: rtc_presence
4
4
  is_new_window: false
5
5
  label: 流程委托
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_roles
2
2
  desktop: true
3
- icon: groups
3
+ icon: job_family
4
4
  is_new_window: false
5
5
  label: 角色
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_space_info
2
2
  desktop: true
3
- icon: account
3
+ icon: household
4
4
  is_new_window: false
5
5
  label: 公司
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_steedos_packages
2
2
  desktop: true
3
- icon: apex
3
+ icon: all
4
4
  is_new_window: false
5
5
  label: 软件包
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_tabs
2
2
  desktop: true
3
- icon: apps
3
+ icon: timeslot
4
4
  is_new_window: false
5
5
  label: 选项卡
6
6
  mobile: true
@@ -1,6 +1,6 @@
1
1
  name: admin_webhooks
2
2
  desktop: true
3
- icon: output
3
+ icon: sales_cadence
4
4
  is_new_window: false
5
5
  label: 流程触发器
6
6
  mobile: true
@@ -2,13 +2,14 @@
2
2
  * @Author: baozhoutao@steedos.com
3
3
  * @Date: 2022-08-05 14:17:44
4
4
  * @LastEditors: 孙浩林 sunhaolin@steedos.com
5
- * @LastEditTime: 2024-01-29 13:20:07
5
+ * @LastEditTime: 2024-05-11 14:03:14
6
6
  * @Description:
7
7
  */
8
8
  const objectql = require('@steedos/objectql');
9
9
  const register = require('@steedos/metadata-registrar');
10
10
  const auth = require('@steedos/auth');
11
11
  const _ = require('underscore');
12
+ const clone = require('clone');
12
13
  async function getAll(){
13
14
  const schema = objectql.getSteedosSchema();
14
15
  const configs = await register.registerTab.getAll(schema.broker)
@@ -49,34 +50,15 @@ module.exports = {
49
50
  let dataList = await getAll();
50
51
  const values = [];
51
52
  if(dataList){
53
+ const cloneValues = clone(this.data.values, false);
52
54
  dataList.forEach((doc)=>{
53
55
  if(!_.find(this.data.values, (value)=>{
54
56
  return value._id === doc._id
55
57
  })){
56
- this.data.values.push(doc);
58
+ cloneValues.push(doc);
57
59
  }
58
60
  })
59
- const records = objectql.getSteedosSchema().metadataDriver.find(this.data.values, this.query, spaceId);
60
- if(records.length > 0){
61
- this.data.values = records;
62
- }else{
63
- this.data.values.length = 0;
64
- }
65
- }
66
- },
67
- afterAggregate: async function(){
68
- const { spaceId } = this;
69
- let dataList = await getAll();
70
- const values = [];
71
- if(dataList){
72
- dataList.forEach((doc)=>{
73
- if(!_.find(this.data.values, (value)=>{
74
- return value._id === doc._id
75
- })){
76
- this.data.values.push(doc);
77
- };
78
- })
79
- const records = objectql.getSteedosSchema().metadataDriver.find(this.data.values, this.query, spaceId);
61
+ const records = objectql.getSteedosSchema().metadataDriver.find(cloneValues, this.query, spaceId);
80
62
  if(records.length > 0){
81
63
  this.data.values = records;
82
64
  }else{
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos/standard-ui",
3
- "version": "2.7.1-beta.8",
3
+ "version": "2.7.1",
4
4
  "main": "package.service.js",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -12,5 +12,8 @@
12
12
  "description": "steedos package",
13
13
  "repository": {},
14
14
  "license": "MIT",
15
- "gitHead": "6c6d45b547b6f1f511f1d3f8a4bd5b06caf0b113"
15
+ "gitHead": "5485c0bd811776f2ffde988c0a9394d778a2dc90",
16
+ "dependencies": {
17
+ "clone": "^2.1.2"
18
+ }
16
19
  }