@steedos-labs/content-compliance 0.0.12 → 0.0.13

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,5 @@
1
+ module.exports = {
2
+ standard_deleteVisible: function (object_name, record_id, record_permissions, record) {
3
+ return record.review_status === 'draft'
4
+ }
5
+ }
@@ -0,0 +1,2 @@
1
+ name: standard_delete
2
+ visible: false
@@ -0,0 +1,5 @@
1
+ module.exports = {
2
+ standard_editVisible: function (object_name, record_id, record_permissions, record) {
3
+ return record.current_step === 'draft' || record.current_step === 'submitter_revisions'
4
+ }
5
+ }
@@ -0,0 +1,2 @@
1
+ name: standard_edit
2
+ visible: false
@@ -0,0 +1,88 @@
1
+ name: kids_approve
2
+ amis_schema: |-
3
+ {
4
+ "type": "service",
5
+ "body": [
6
+ {
7
+ "type": "service",
8
+ "body": [
9
+ {
10
+ "type": "button",
11
+ "label": "核准",
12
+ "id": "u:a772862900fb",
13
+ "editorState": "default",
14
+ "visibleOn": "${kids_reviewer === context.user.user && ARRAYINCLUDES(person_pending_approve, context.user.user) && (current_step == 'departmental_review' || current_step == 'personnel_review')}",
15
+ "actionType": "ajax",
16
+ "confirmText": "确定要核准这个材料审批单吗?",
17
+ "confirmTitle": "材料审批单审核",
18
+ "onEvent": {
19
+ "click": {
20
+ "weight": 0,
21
+ "actions": [
22
+ {
23
+ "actionType": "ajax",
24
+ "ignoreError": false,
25
+ "outputVar": "responseResult",
26
+ "options": {},
27
+ "api": {
28
+ "url": "/api/pepsico-content/approve/kids/submit/${recordId}",
29
+ "method": "post",
30
+ "requestAdaptor": "api.data = {\n approvalStatus: 'approved'\n}",
31
+ "adaptor": "",
32
+ "messages": {}
33
+ }
34
+ },
35
+ {
36
+ "actionType": "broadcast",
37
+ "args": {
38
+ "eventName": "@data.changed.pepsico_material_approval"
39
+ },
40
+ "data": {
41
+ "objectName": "pepsico_material_approval"
42
+ }
43
+ },
44
+ {
45
+ "actionType": "closeDialog",
46
+ "ignoreError": false
47
+ }
48
+ ]
49
+ }
50
+ }
51
+ }
52
+ ],
53
+ "id": "u:66d35eae5b7e",
54
+ "dsType": "api",
55
+ "api": {
56
+ "url": "/api/v1/pepsico_material_approval/${pepsico_material_approval}?fields=[\"current_step\"]",
57
+ "method": "get",
58
+ "requestAdaptor": "",
59
+ "adaptor": "",
60
+ "messages": {}
61
+ }
62
+ }
63
+ ],
64
+ "regions": [
65
+ "body"
66
+ ],
67
+ "data": {
68
+ "context": {},
69
+ "dataComponentId": "",
70
+ "record_id": "",
71
+ "record": {},
72
+ "permissions": {}
73
+ },
74
+ "id": "u:d07c3bc8570b",
75
+ "bodyClassName": "p-0",
76
+ "dsType": "api",
77
+ "asideResizor": false,
78
+ "editorState": "default",
79
+ "pullRefresh": {
80
+ "disabled": true
81
+ }
82
+ }
83
+ is_enable: true
84
+ label: 核准
85
+ locked: false
86
+ 'on': record_only
87
+ type: amis_button
88
+ visible: true
@@ -0,0 +1,83 @@
1
+ name: kids_reject
2
+ amis_schema: |-
3
+ {
4
+ "type": "service",
5
+ "body": [
6
+ {
7
+ "type": "service",
8
+ "id": "u:ba641e4bf9d2",
9
+ "dsType": "api",
10
+ "body": [
11
+ {
12
+ "type": "button",
13
+ "label": "驳回",
14
+ "id": "u:pepsico_material_reject",
15
+ "visibleOn": "${kids_reviewer === context.user.user && ARRAYINCLUDES(person_pending_approve, context.user.user) && (current_step == 'departmental_review' || current_step == 'personnel_review')}",
16
+ "editorState": "default",
17
+ "actionType": "ajax",
18
+ "confirmText": "确定要驳回这个材料审批吗?",
19
+ "confirmTitle": "材料审批审核",
20
+ "onEvent": {
21
+ "click": {
22
+ "weight": 0,
23
+ "actions": [
24
+ {
25
+ "actionType": "ajax",
26
+ "ignoreError": false,
27
+ "outputVar": "responseResult",
28
+ "options": {},
29
+ "api": {
30
+ "url": "/api/pepsico-content/approve/kids/submit/${recordId}",
31
+ "method": "post",
32
+ "requestAdaptor": "api.data = {\n approvalStatus: 'rejected'\n}",
33
+ "adaptor": "",
34
+ "messages": {}
35
+ }
36
+ },
37
+ {
38
+ "actionType": "broadcast",
39
+ "args": {
40
+ "eventName": "@data.changed.pepsico_material_approval"
41
+ },
42
+ "data": {
43
+ "objectName": "pepsico_material_approval"
44
+ }
45
+ },
46
+ {
47
+ "actionType": "closeDialog",
48
+ "ignoreError": false
49
+ }
50
+ ]
51
+ }
52
+ }
53
+ }
54
+ ],
55
+ "api": {
56
+ "url": "/api/v1/pepsico_material_approval/${pepsico_material_approval}?fields=[\"current_step\"]",
57
+ "method": "get",
58
+ "requestAdaptor": "",
59
+ "adaptor": "",
60
+ "messages": {}
61
+ }
62
+ }
63
+ ],
64
+ "regions": [
65
+ "body"
66
+ ],
67
+ "data": {
68
+ "context": {},
69
+ "dataComponentId": "",
70
+ "record_id": "",
71
+ "record": {},
72
+ "permissions": {}
73
+ },
74
+ "id": "u:b733a5081175",
75
+ "bodyClassName": "p-0",
76
+ "dsType": "api"
77
+ }
78
+ is_enable: true
79
+ label: 驳回
80
+ locked: false
81
+ 'on': record_only
82
+ type: amis_button
83
+ visible: true
@@ -0,0 +1,9 @@
1
+ name: approval_type
2
+ type: select
3
+ visible_on: '{{false}}'
4
+ options:
5
+ - label: 固定人员
6
+ value: personnel_review
7
+ - label: 部门并行审核
8
+ value: departmental_review
9
+ label: 固定/部门审核
@@ -4,7 +4,7 @@ amis:
4
4
  description: ''
5
5
  filters: []
6
6
  group: 审核人员
7
- hidden: true
7
+ hidden: false
8
8
  is_wide: true
9
9
  label: 已审核人员
10
10
  multiple: true
@@ -12,4 +12,4 @@ reference_to: users
12
12
  required: false
13
13
  sort_no: 1950
14
14
  type: lookup
15
- visible_on: ''
15
+ visible_on: '{{false}}'
@@ -4,7 +4,7 @@ amis:
4
4
  description: ''
5
5
  filters: []
6
6
  group: 审核人员
7
- hidden: true
7
+ hidden: false
8
8
  is_wide: false
9
9
  label: 待审核人员
10
10
  multiple: true
@@ -13,4 +13,4 @@ reference_to: users
13
13
  required: false
14
14
  sort_no: 1850
15
15
  type: lookup
16
- visible_on: ''
16
+ visible_on: '{{false}}'
@@ -4,7 +4,7 @@ amis:
4
4
  description: ''
5
5
  filters: []
6
6
  group: 审核人员
7
- hidden: true
7
+ hidden: false
8
8
  is_wide: false
9
9
  label: 查看人员
10
10
  multiple: true
@@ -12,4 +12,4 @@ reference_to: users
12
12
  required: false
13
13
  sort_no: 1900
14
14
  type: lookup
15
- visible_on: ''
15
+ visible_on: '{{false}}'
@@ -10,221 +10,63 @@
10
10
  "id": "u:80e7e5512598"
11
11
  },
12
12
  {
13
- "type": "grid",
14
- "columns": [
15
- {
16
- "body": [
17
- {
18
- "type": "steedos-object-form",
19
- "label": "对象表单",
20
- "objectApiName": "${objectName}",
21
- "recordId": "${recordId}",
22
- "mode": "read",
23
- "enableInitApi": false,
24
- "className": "",
25
- "id": "u:5fd32a65487b",
26
- "fields": [
27
- "ns_reviewer"
28
- ],
29
- "layout": "horizontal",
30
- "fieldsExtend": "{\n \"ns_reviewer\": {\n \"is_wide\": true\n }\n}"
31
- },
32
- {
33
- "type": "steedos-object-form",
34
- "label": "对象表单",
35
- "objectApiName": "${objectName}",
36
- "recordId": "${recordId}",
37
- "mode": "read",
38
- "enableInitApi": false,
39
- "className": "",
40
- "id": "u:096f795888e3",
41
- "fields": [
42
- "ns_materials_quantity"
43
- ],
44
- "layout": "horizontal",
45
- "fieldsExtend": "{\n \"ns_materials_quantity\": {\n \"is_wide\": true\n }\n}"
46
- },
47
- {
48
- "type": "steedos-object-form",
49
- "label": "对象表单",
50
- "objectApiName": "${objectName}",
51
- "recordId": "${recordId}",
52
- "mode": "read",
53
- "enableInitApi": false,
54
- "className": "",
55
- "id": "u:1aeefa748b1c",
56
- "fields": [
57
- "ns_approval_status"
58
- ],
59
- "layout": "horizontal",
60
- "fieldsExtend": "{\n \"ns_approval_status\": {\n \"is_wide\": true\n }\n}"
61
- }
62
- ],
63
- "id": "u:43b052372d85"
64
- },
65
- {
66
- "body": [
67
- {
68
- "type": "steedos-object-form",
69
- "label": "对象表单",
70
- "objectApiName": "${objectName}",
71
- "recordId": "${recordId}",
72
- "mode": "read",
73
- "enableInitApi": false,
74
- "className": "",
75
- "id": "u:85cfa97bd96e",
76
- "fields": [
77
- "legal_reviewer"
78
- ],
79
- "layout": "horizontal",
80
- "fieldsExtend": "{\n \"legal_reviewer\": {\n \"is_wide\": true\n }\n}"
81
- },
82
- {
83
- "type": "steedos-object-form",
84
- "label": "对象表单",
85
- "objectApiName": "${objectName}",
86
- "recordId": "${recordId}",
87
- "mode": "read",
88
- "enableInitApi": false,
89
- "className": "",
90
- "id": "u:7254f0bafe8a",
91
- "fields": [
92
- "legal_materials_quantity"
93
- ],
94
- "layout": "horizontal",
95
- "fieldsExtend": "{\n \"legal_materials_quantity\": {\n \"is_wide\": true\n }\n}"
96
- },
97
- {
98
- "type": "steedos-object-form",
99
- "label": "对象表单",
100
- "objectApiName": "${objectName}",
101
- "recordId": "${recordId}",
102
- "mode": "read",
103
- "enableInitApi": false,
104
- "className": "",
105
- "id": "u:b739b54264c1",
106
- "fields": [
107
- "legal_approval_status"
108
- ],
109
- "layout": "horizontal",
110
- "fieldsExtend": "{\n \"legal_approval_status\": {\n \"is_wide\": true\n }\n}"
111
- }
112
- ],
113
- "id": "u:6fe0cf588ed8"
114
- },
115
- {
116
- "body": [
117
- {
118
- "type": "steedos-object-form",
119
- "label": "对象表单",
120
- "objectApiName": "${objectName}",
121
- "recordId": "${recordId}",
122
- "mode": "read",
123
- "enableInitApi": false,
124
- "className": "",
125
- "id": "u:cb0484b2e9a2",
126
- "fields": [
127
- "sra_reviewer"
128
- ],
129
- "layout": "horizontal",
130
- "fieldsExtend": "{\n \"sra_reviewer\": {\n \"is_wide\": true\n }\n}"
131
- },
132
- {
133
- "type": "steedos-object-form",
134
- "label": "对象表单",
135
- "objectApiName": "${objectName}",
136
- "recordId": "${recordId}",
137
- "mode": "read",
138
- "enableInitApi": false,
139
- "className": "",
140
- "id": "u:f8b0b1c14181",
141
- "fields": [
142
- "sra_materials_quantity"
143
- ],
144
- "layout": "horizontal",
145
- "fieldsExtend": "{\n \"sra_materials_quantity\": {\n \"is_wide\": true\n }\n}"
146
- },
147
- {
148
- "type": "steedos-object-form",
149
- "label": "对象表单",
150
- "objectApiName": "${objectName}",
151
- "recordId": "${recordId}",
152
- "mode": "read",
153
- "enableInitApi": false,
154
- "className": "",
155
- "id": "u:59d845ea4a07",
156
- "fields": [
157
- "sra_approval_status"
158
- ],
159
- "layout": "horizontal",
160
- "fieldsExtend": "{\n \"sra_approval_status\": {\n \"is_wide\": true\n }\n}"
161
- }
162
- ],
163
- "id": "u:4418e8925a67"
164
- },
165
- {
166
- "body": [
167
- {
168
- "type": "steedos-object-form",
169
- "label": "对象表单",
170
- "objectApiName": "${objectName}",
171
- "recordId": "${recordId}",
172
- "mode": "read",
173
- "enableInitApi": false,
174
- "className": "",
175
- "id": "u:6d4c6396137f",
176
- "fields": [
177
- "ca_reviewer"
178
- ],
179
- "excludedFields": [
180
- "ca_approval_status"
181
- ],
182
- "layout": "horizontal",
183
- "fieldsExtend": "{\n \"ca_reviewer\": {\n \"is_wide\": true\n }\n}"
184
- },
185
- {
186
- "type": "steedos-object-form",
187
- "label": "对象表单",
188
- "objectApiName": "${objectName}",
189
- "recordId": "${recordId}",
190
- "mode": "read",
191
- "enableInitApi": false,
192
- "className": "",
193
- "id": "u:623b8d09cb2e",
194
- "fields": [
195
- "ca_materials_quantity"
196
- ],
197
- "layout": "horizontal",
198
- "fieldsExtend": "{\n \"ca_materials_quantity\": {\n \"is_wide\": true\n }\n}"
199
- },
200
- {
201
- "type": "steedos-object-form",
202
- "label": "对象表单",
203
- "objectApiName": "${objectName}",
204
- "recordId": "${recordId}",
205
- "mode": "read",
206
- "enableInitApi": false,
207
- "className": "",
208
- "id": "u:7a2e4cee0366",
209
- "fields": [
210
- "ca_approval_status"
211
- ],
212
- "layout": "horizontal",
213
- "fieldsExtend": "{\n \"ca_approval_status\": {\n \"is_wide\": true\n }\n}"
214
- }
215
- ],
216
- "id": "u:19fc7bf975f3"
217
- }
13
+ "type": "container",
14
+ "body": [
15
+ {
16
+ "type": "tpl",
17
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-pink-600 text-base font-medium text-white\">NS</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-gray-900 hover:text-gray-600\">${_display.ns_reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(ns_approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, ' ')}</p>\n </div>\n </div>\n</li>",
18
+ "inline": true,
19
+ "wrapperComponent": "",
20
+ "id": "u:65eac8efca60",
21
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft'}"
22
+ },
23
+ {
24
+ "type": "tpl",
25
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-purple-600 text-base font-medium text-white\">Legal</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-gray-900 hover:text-gray-600\">${_display.legal_reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(legal_approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, ' ')}</p>\n </div>\n </div>\n</li>",
26
+ "inline": true,
27
+ "wrapperComponent": "",
28
+ "id": "u:1b743b2be88d",
29
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft'}"
30
+ },
31
+ {
32
+ "type": "tpl",
33
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-blue-600 text-base font-medium text-white\">SRA</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-blue-900 hover:text-gray-600\">${_display.sra_reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(sra_approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, ' ')}</p>\n </div>\n </div>\n</li>",
34
+ "inline": true,
35
+ "wrapperComponent": "",
36
+ "id": "u:912d54a43263",
37
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft'}"
38
+ },
39
+ {
40
+ "type": "tpl",
41
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-yellow-600 text-base font-medium text-white\">CA</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-gray-900 hover:text-gray-600\">${_display.ca_reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(ca_approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, ' ')}</p>\n </div>\n </div>\n</li>",
42
+ "inline": true,
43
+ "wrapperComponent": "",
44
+ "id": "u:3dd4613d67ae",
45
+ "visibleOn": "${approval_type === 'departmental_review' && review_status != 'draft'}"
46
+ },
47
+ {
48
+ "type": "tpl",
49
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-indigo-600 text-base font-medium text-white\">固定</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-gray-900 hover:text-gray-600\">${_display.reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, ' ')}</p>\n </div>\n </div>\n</li>",
50
+ "inline": true,
51
+ "wrapperComponent": "",
52
+ "id": "u:ec5fe1e3ac08",
53
+ "visibleOn": "${approval_type === 'personnel_review' && review_status != 'draft'}"
54
+ },
55
+ {
56
+ "type": "tpl",
57
+ "tpl": "<li class=\"col-span-1 flex rounded-md shadow-sm\">\n <div class=\"flex w-16 shrink-0 items-center justify-center rounded-l-md bg-green-600 text-base font-medium text-white\">Kids</div>\n <div class=\"flex flex-1 items-center justify-between truncate rounded-r-md border-b border-r border-t border-gray-200 bg-white\">\n <div class=\"flex-1 truncate px-4 py-2 text-sm\">\n <a href=\"#\" class=\"font-medium text-gray-900 hover:text-gray-600\">${_display.kids_reviewer|pick:label}</a>\n <p class=\"text-gray-500 m-0 h-5\">${IFS(kids_approval_status === true, '<i class=\"fa-solid fa-check\"></i>', ns_approval_status === false, '<i class=\"fa-solid fa-xmark\"></i>', !ns_approval_status, '')}</p>\n </div>\n </div>\n</li>",
58
+ "inline": true,
59
+ "wrapperComponent": "",
60
+ "id": "u:41fda075cc8b",
61
+ "visibleOn": "${child_files === 'yes' && review_status != 'draft'}"
62
+ }
218
63
  ],
219
- "id": "u:0ced89e163c3",
220
- "themeCss": {
221
- "baseControlClassName": {
222
- "padding-and-margin:default": {
223
- "marginLeft": "0.5rem",
224
- "marginRight": "0.5rem"
225
- }
226
- }
227
- }
64
+ "size": "none",
65
+ "wrapperBody": false,
66
+ "id": "u:364038776887",
67
+ "isFixedHeight": false,
68
+ "isFixedWidth": false,
69
+ "className": "mt-3 grid grid-cols-1 gap-5 sm:grid-cols-2 sm:gap-6 lg:grid-cols-5 sm:m-4"
228
70
  },
229
71
  {
230
72
  "type": "tabs",
@@ -191,56 +191,67 @@
191
191
  },
192
192
  {
193
193
  "title": "素材预览",
194
- "disabledOn": "${extension_type === 'doc' || extension_type === 'docx'}",
194
+ "visibleOn": "${extension_type != 'doc' && extension_type != 'docx'}",
195
+ "className": "material-preview",
195
196
  "body": [
196
197
  {
197
- "type": "grid",
198
- "columns": [
198
+ "type": "page",
199
+ "id": "u:25709be82e35",
200
+ "bodyClassName": "p-0",
201
+ "asideResizor": true,
202
+ "asideClassName": "w-8/12 p-2",
203
+ "aside": [
199
204
  {
200
- "body": [
201
- {
202
- "type": "image",
203
- "id": "u:562456f79aca",
204
- "enlargeAble": true,
205
- "editorState": "default",
206
- "imageMode": "original",
207
- "src": "${_display.material.url}",
208
- "visibleOn": "${extension_type === 'jpg' || extension_type === 'jpeg' || extension_type === 'png' || extension_type === 'gif' || extension_type === 'bmp' || extension_type === 'tiff' || extension_type === 'tif' || extension_type === 'svg' || extension_type === 'webp' || extension_type === 'ico' || extension_type === 'heif' || extension_type === 'heic'}",
209
- "maxScale": 200,
210
- "minScale": 50,
211
- "style": {
212
- "display": "inline-block"
213
- }
214
- },
215
- {
216
- "type": "video",
217
- "src": "${_display.material.url}",
218
- "poster": "",
219
- "visibleOn": "${extension_type === 'mp4' || extension_type === 'avi' || extension_type === 'mov' || extension_type === 'wmv' || extension_type === 'flv' || extension_type === 'mkv' || extension_type === 'webm' || extension_type === 'mpeg' || extension_type === 'mpg' || extension_type === '3gp' || extension_type === 'm4v'}",
220
- "id": "u:6e8c9cee221a",
221
- "autoPlay": false,
222
- "aspectRatio": "auto"
223
- }
224
- ],
225
- "id": "u:d9b5e8183df1",
205
+ "type": "image",
206
+ "id": "u:562456f79aca",
207
+ "enlargeAble": true,
226
208
  "editorState": "default",
227
- "md": 8
209
+ "imageMode": "original",
210
+ "src": "${_display.material.url}",
211
+ "visibleOn": "${extension_type === 'jpg' || extension_type === 'jpeg' || extension_type === 'png' || extension_type === 'gif' || extension_type === 'bmp' || extension_type === 'tiff' || extension_type === 'tif' || extension_type === 'svg' || extension_type === 'webp' || extension_type === 'ico' || extension_type === 'heif' || extension_type === 'heic'}",
212
+ "maxScale": 200,
213
+ "minScale": 50,
214
+ "style": {
215
+ "display": "inline-block"
216
+ }
228
217
  },
229
218
  {
230
- "body": [
231
- {
232
- "type": "rooms-comments",
233
- "id": "u:bb3f4d0c23f9",
234
- "roomId": "objects:pepsico_material:${recordId}",
235
- "className": "flex flex-col m-3 gap-3",
236
- "baseUrl": "${context.rootUrl}"
237
- }
238
- ],
239
- "id": "u:cebedf70a519"
219
+ "type": "video",
220
+ "src": "${_display.material.url}",
221
+ "poster": "",
222
+ "visibleOn": "${extension_type === 'mp4' || extension_type === 'avi' || extension_type === 'mov' || extension_type === 'wmv' || extension_type === 'flv' || extension_type === 'mkv' || extension_type === 'webm' || extension_type === 'mpeg' || extension_type === 'mpg' || extension_type === '3gp' || extension_type === 'm4v'}",
223
+ "id": "u:6e8c9cee221a",
224
+ "autoPlay": false,
225
+ "aspectRatio": "auto"
226
+ },
227
+ {
228
+ "type": "iframe",
229
+ "id": "pdf-viewer",
230
+ "src": "${context.rootUrl}/api/page/public/pdf_view?fileUrl=/api/files/files/${_display.material.value}",
231
+ "visibleOn": "${extension_type === 'pdf'}"
240
232
  }
241
233
  ],
242
- "id": "u:67110a222a75",
243
- "editorState": "default"
234
+ "body": [
235
+ {
236
+ "type": "rooms-comments",
237
+ "id": "u:bb3f4d0c23f9",
238
+ "roomId": "objects:pepsico_material:${recordId}",
239
+ "className": "flex flex-col m-3 gap-3",
240
+ "baseUrl": "${context.rootUrl}"
241
+ }
242
+ ],
243
+ "pullRefresh": {
244
+ "disabled": true
245
+ },
246
+ "css": {
247
+ ".material-preview": {
248
+ "height": "calc(100vh - 9.5rem)",
249
+ "overflow-y": "auto"
250
+ },
251
+ ".antd-Page-asideResizor": {
252
+ "display": "none !important"
253
+ }
254
+ }
244
255
  }
245
256
  ],
246
257
  "id": "u:5537e5510029"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@steedos-labs/content-compliance",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "description": "内容审核系统",
5
5
  "main": "package.service.js",
6
6
  "scripts": {