@steedos/service-plugin-amis 2.5.17 → 2.5.18-beta.2
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.
|
@@ -170,6 +170,18 @@
|
|
|
170
170
|
},
|
|
171
171
|
"id": "u:25a6ee957503"
|
|
172
172
|
},
|
|
173
|
+
{
|
|
174
|
+
"name": "is_enable",
|
|
175
|
+
"label": "启用",
|
|
176
|
+
"type": "switch",
|
|
177
|
+
"precision": 0,
|
|
178
|
+
"className": "m-0",
|
|
179
|
+
"labelClassName": "text-left",
|
|
180
|
+
"en-US": {
|
|
181
|
+
"label": "Sort NO."
|
|
182
|
+
},
|
|
183
|
+
"id": "u:25a6ee957503"
|
|
184
|
+
},
|
|
173
185
|
{
|
|
174
186
|
"label": "显示模式",
|
|
175
187
|
"name": "crud_mode",
|
|
@@ -562,11 +574,11 @@
|
|
|
562
574
|
"method": "post",
|
|
563
575
|
"url": "${context.rootUrl}/graphql?rf=1653731141728",
|
|
564
576
|
"cache": 100,
|
|
565
|
-
"adaptor": "const recordId = api.body.recordId;\nvar data;\nif (recordId) {\n data = payload.data.data[0] || { _filters_type_controller: 'conditions' };\n //数据格式转换\n if (data) {\n data.columns = lodash.map(data.columns, 'field');\n data.sort = lodash.map(data.sort, (item) => {\n return `${item.field_name}:${item.order || 'asc'}`\n });\n data.mobile_columns = lodash.map(data.mobile_columns, 'field');\n data.searchable_fields = lodash.map(data.searchable_fields, 'field');\n\n if (data.filters && lodash.isString(data.filters)) {\n try {\n data.filters = JSON.parse(data.filters);\n } catch (e) { }\n }\n\n if (data.filters && lodash.isString(data.filters)) {\n data._filters_type_controller = 'function';\n } else {\n data._filters_type_controller = 'conditions'\n }\n\n if (data._filters_type_controller === 'conditions') {\n data._filters_conditions = window.amisConvert.filtersToConditions(data.filters || []);\n } else {\n data._filters_function = data.filters;\n }\n }\n} else {\n const defaultData = api.body.defaultData;\n let defaultValues = {};\n // TODO:字段默认值后期添加\n if(defaultData && _.isObject(defaultData) && !_.isArray(defaultData)){\n data = Object.assign({}, defaultValues, defaultData)\n }\n}\nfor (key in data) {\n if (data[key] === null) {\n delete data[key];\n }\n}\npayload.data = data;\ndelete payload.extensions;\nreturn payload;",
|
|
577
|
+
"adaptor": "const recordId = api.body.recordId;\nvar data;\nif (recordId) {\n data = payload.data.data[0] || { _filters_type_controller: 'conditions' };\n //数据格式转换\n if (data) {\n data.columns = lodash.map(data.columns, 'field');\n data.sort = lodash.map(data.sort, (item) => {\n return `${item.field_name}:${item.order || 'asc'}`\n });\n data.mobile_columns = lodash.map(data.mobile_columns, 'field');\n data.searchable_fields = lodash.map(data.searchable_fields, 'field');\n\n if (data.filters && lodash.isString(data.filters)) {\n try {\n data.filters = JSON.parse(data.filters);\n } catch (e) { }\n }\n\n if (data.filters && lodash.isString(data.filters)) {\n data._filters_type_controller = 'function';\n } else {\n data._filters_type_controller = 'conditions'\n }\n\n if (data._filters_type_controller === 'conditions') {\n data._filters_conditions = window.amisConvert.filtersToConditions(data.filters || []);\n } else {\n data._filters_function = data.filters;\n }\n }\n} else {\n const defaultData = api.body.defaultData;\n let defaultValues = {};\n // TODO:字段默认值后期添加\n if(defaultData && _.isObject(defaultData) && !_.isArray(defaultData)){\n data = Object.assign({}, defaultValues, defaultData)\n }\n}\nfor (key in data) {\n if (data[key] === null) {\n delete data[key];\n }\n}\npayload.data = data;\ndelete payload.extensions; if(data.is_enable != false){data.is_enable=true;};\nreturn payload;",
|
|
566
578
|
"data": {
|
|
567
579
|
"recordId": "${recordId}",
|
|
568
580
|
"defaultData": "${defaultData}",
|
|
569
|
-
"query": "{data:object_listviews(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,label,name,object_name,requestAdaptor,adaptor,filter_scope,
|
|
581
|
+
"query": "{data:object_listviews(filters:[\"_id\", \"=\", \"${recordId}\"]){_id,label,name,object_name,requestAdaptor,adaptor,filter_scope,shared,show_count,columns,filter_fields,sort,is_enable,crud_mode,filters,filter_logic,mobile_columns,searchable_fields,sort_no,created,created_by:created_by__expand{_id,name},modified,modified_by:modified_by__expand{_id,name},enable_amis_schema,amis_schema,_display{shared,show_count,created,modified}}}"
|
|
570
582
|
},
|
|
571
583
|
"replaceData": false,
|
|
572
584
|
"responseData": {
|
|
@@ -2,66 +2,87 @@
|
|
|
2
2
|
"type": "page",
|
|
3
3
|
"body": [
|
|
4
4
|
{
|
|
5
|
-
"type": "
|
|
6
|
-
"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
"
|
|
5
|
+
"type": "service",
|
|
6
|
+
"body":[
|
|
7
|
+
{
|
|
8
|
+
"type": "steedos-object-form",
|
|
9
|
+
"mode": "edit",
|
|
10
|
+
"initFetch": true,
|
|
11
|
+
"className": "bg-white",
|
|
12
|
+
"id": "u:bb8612f5bbef",
|
|
13
|
+
"onEvent": {
|
|
14
|
+
"inited": {
|
|
15
|
+
"actions": [
|
|
16
|
+
{
|
|
17
|
+
"actionType": "custom",
|
|
18
|
+
"script": "// 新建页面布局时初始化buttons默认值,字段值是CRUD表格控件渲染,新建页面布局时,不会自动填充到form中,需要手动填充\nconst initDefaultButtons = function (input) {\n const superValues = input.__super.__super || {};\n if (superValues.recordId) {\n // 编辑记录本来就会初始化相关字段值,不需要再初始化\n return;\n }\n return {\n buttons: input.buttons,\n }\n}\n\nconst eventData = event.data;\ndoAction({\n actionType: 'setValue',\n componentId: \"object-layout-form\",\n args: {\n value: initDefaultButtons(eventData)\n }\n});\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"actionType": "custom",
|
|
22
|
+
"script": "// 新建页面布局时初始化fields默认值,字段值是CRUD表格控件渲染,新建页面布局时,不会自动填充到form中,需要手动填充\nconst initDefaultFields = function (input) {\n const superValues = input.__super.__super || {};\n if (superValues.recordId) {\n // 编辑记录本来就会初始化相关字段值,不需要再初始化\n return;\n }\n return {\n fields: input.fields,\n }\n}\n\nconst eventData = event.data;\ndoAction({\n actionType: 'setValue',\n componentId: \"object-layout-form\",\n args: {\n value: initDefaultFields(eventData)\n }\n});\n"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"actionType": "custom",
|
|
26
|
+
"script": "// 新建页面布局时初始化related_lists默认值,字段值是CRUD表格控件渲染,新建页面布局时,不会自动填充到form中,需要手动填充\nconst initDefaultRelatedLists = function (input, rowValue, prop_name) {\n const superValues = input.__super.__super || {};\n if (superValues.recordId) {\n // 编辑记录本来就会初始化相关字段值,不需要再初始化\n return;\n }\n return {\n related_lists: input.related_lists,\n }\n}\n\nconst eventData = event.data;\ndoAction({\n actionType: 'setValue',\n componentId: \"object-layout-form\",\n args: {\n value: initDefaultRelatedLists(eventData)\n }\n});\n"
|
|
27
|
+
}
|
|
28
|
+
]
|
|
16
29
|
},
|
|
17
|
-
{
|
|
18
|
-
"
|
|
19
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
"submitSucc": {
|
|
31
|
+
"weight": 0,
|
|
32
|
+
"actions": [
|
|
33
|
+
{
|
|
34
|
+
"actionType": "broadcast",
|
|
35
|
+
"args": {
|
|
36
|
+
"eventName": "@data.changed.object_layouts"
|
|
37
|
+
},
|
|
38
|
+
"data": {
|
|
39
|
+
"objectName": "object_layouts"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
]
|
|
24
43
|
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
"actionType": "broadcast",
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
44
|
+
},
|
|
45
|
+
"label": "对象表单",
|
|
46
|
+
"objectApiName": "object_layouts",
|
|
47
|
+
"recordId": "${recordId}",
|
|
48
|
+
"enableTabs": true,
|
|
49
|
+
"debug": false,
|
|
50
|
+
"fieldsExtend": "{\n \"profiles\":{\n \"amis\":{\n \"type\": \"select\",\n \"name\": \"profiles\",\n \"required\": true,\n \"joinValues\": false,\n \"extractValue\": true,\n \"labelField\": \"label\",\n \"multiple\": true,\n \"labelClassName\": \"text-left\",\n \"checkAll\": true,\n \"source\": {\n \"method\": \"post\",\n \"url\": \"\\${context.rootUrl}/graphql\",\n \"data\": {\n \"query\": \"{options:permission_set(filters: [\\\"type\\\", \\\"=\\\", \\\"profile\\\"]){name,label}}\"\n },\n \"requestAdaptor\": \"\",\n \"adaptor\": \"\",\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"valueField\": \"name\",\n \"searchable\": true,\n \"id\": \"u:3c65447a8a6e\",\n \"defaultCheckAll\": false,\n \"checkAllLabel\": \"全选\",\n \"autoComplete\":\"\",\n \"menuTpl\":\"\"\n }\n },\n \"buttons\": {\n \"amis\": {\n \"type\":\"service\",\n \"body\":[\n {\n \"type\": \"crud\",\n \"name\": \"buttons\",\n \"label\": \"按钮\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": false,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"button_name_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.button_name_label' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${buttons_options|filter:value:equals:button_name|pick:label}\",\n \"id\": \"u:302f8fadccd3\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"className\": \"w-6/12\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForButton = function (input, prop_name) { let currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const button_name = rowValue.button_name; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newButtons = formValue.buttons.map(function (item) { if (item.button_name == button_name) { return Object.assign({}, item, rowValue); } else { return item; } }); return { buttons: newButtons }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForButton(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"name\": \"visible_on\",\n \"id\": \"u:daa771bd34b9\",\n \"mode\": \"popOver\"\n },\n \"id\": \"u:3c35211aa1a0\",\n \"placeholder\": \"-\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"footable\": false,\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.button_set' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_buttons\",\n \"sortable\": true,\n \"source\": \"\\${buttons_options}\",\n \"value\": \"\\${buttons|pick:button_name}\",\n \"searchable\": true,\n \"id\": \"u:d6e067c40e83\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const clearButtons = function (input) { return { buttons: [] }};const convertDataForButtons = function (input) { let pickedButtons = input.picked_buttons || []; const superButtons = _.keyBy(input.__super.buttons, 'button_name'); if (typeof pickedButtons === \\\"string\\\") { pickedButtons = pickedButtons.split(\\\",\\\"); }; const convertedButtons = pickedButtons.map(function (key) { return superButtons[key] || { button_name: key } }); return { buttons: convertedButtons }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearButtons() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForButtons(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"id\": \"u:a0027ac6f8c1\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true,\n \"size\": \"md\"\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.button_set' | t}\",\n \"id\": \"u:1ac8afc8a9bb\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"source\": \"\\${buttons}\",\n \"id\": \"u:a5d43b752494\",\n \"perPageAvailable\": [\n 10\n ],\n \"messages\": {},\n \"onEvent\": {\n \"rowClick\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForButton = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const button_name = rowValue.button_name;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForButton(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n }\n }\n ],\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/actions/options\",\n \"adaptor\": \"let data = payload.data;data.buttons_options = data.options;delete data.options;payload.data = data;return payload;\",\n \"sendOn\": \"!!this.object_name\",\n \"headers\": {\n \"Authorization\": \"Bearer ${context.tenantId},${context.authToken}\"\n }\n }\n \n }\n },\n \"fields\":{\n \"amis\":{\n \"type\": \"service\",\n \"body\": [\n {\n \"name\": \"fields\",\n \"required\": true,\n \"type\": \"crud\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": false,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"field_name_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.fields' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${fields_options|filter:value:equals:field_name|pick:label}\",\n \"id\": \"u:b95c69a1cd84\"\n },\n {\n \"name\": \"is_readonly\",\n \"label\": \"\\${'object_layouts.object_layouts_form.readonly' | t}\",\n \"quickEdit\": {\n \"type\": \"checkbox\",\n \"tpl\": null,\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"mode\": \"inline\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"is_readonly\\\") }});\"\n }\n ]\n }\n },\n \"id\": \"u:8cb44f3db16c\",\n \"name\": \"is_readonly\"\n },\n \"id\": \"u:5081e6e1af55\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"is_required\",\n \"label\": \"\\${'object_layouts.object_layouts_form.required' | t}\",\n \"quickEdit\": {\n \"mode\": \"inline\",\n \"type\": \"checkbox\",\n \"className\": \"m-0\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"is_required\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": null,\n \"labelClassName\": \"text-left\",\n \"id\": \"u:bbd1c15b6504\",\n \"name\": \"is_required\"\n },\n \"id\": \"u:e54afb5cc05c\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"group\",\n \"label\": \"\\${'object_layouts.object_layouts_form.grouping' | t}\",\n \"quickEdit\": {\n \"type\": \"select\",\n \"className\": \"m-0\",\n \"source\": \"\\${field_groups|pick:group_name}\",\n \"checkAll\": false,\n \"selectFirst\": false,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\"; const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); }; }; const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields } }; const eventData = event.data; const clearFields = function (input) { return { fields: [] } };doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"group\\\") } });}, 300);\"\n }\n ]\n }\n },\n \"searchable\": true,\n \"clearable\": true,\n \"name\": \"group\",\n \"id\": \"u:f75ddc45d296\",\n \"multiple\": false,\n \"mode\": \"popOver\"\n },\n \"id\": \"u:e532b1949676\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { let currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"visible_on\",\n \"id\": \"u:624913811ecc\",\n \"minRows\": 3,\n \"maxRows\": 20,\n \"mode\": \"popOver\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:e3618b8b4c52\",\n \"placeholder\": \"-\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"source\": \"\\${fields}\",\n \"footable\": false,\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.field_set' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_fields\",\n \"sortable\": true,\n \"source\": \"\\${fields_options}\",\n \"value\": \"\\${fields|pick:field_name}\",\n \"searchable\": true,\n \"id\": \"u:502c4ecd81b6\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; }; return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const clearFields = function (input) { return { fields: [] }};const convertDataForFields = function (input) { let pickedFields = input.picked_fields || []; const superFields = _.keyBy(input.__super.fields, 'field_name'); if (typeof pickedFields === \\\"string\\\") { pickedFields = pickedFields.split(\\\",\\\"); }; const fieldOptions = lodash.keyBy(input.__super.__super.__super.__super.__super.fields_options, \\\"value\\\"); const convertedFields = pickedFields.map(function (field_name) { const superField = superFields[field_name]; if (superField) { return superField; } else { const fieldOption = fieldOptions[field_name]; return { field_name: field_name, is_readonly: fieldOption.readonly, is_required: fieldOption.required, group: fieldOption.group } } }); const fieldGroups = input.__super.__super.__super.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); convertedFields.sort(getFieldsSortFun(groupNames)); return { fields: convertedFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForFields(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"size\": \"md\",\n \"id\": \"u:c405734543e0\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.field_set' | t}\",\n \"id\": \"u:853b890ab524\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.grouping_set' | t}\",\n \"size\": \"lg\",\n \"body\": [\n {\n \"type\": \"input-table\",\n \"name\": \"setting_groups\",\n \"addable\": true,\n \"draggable\": true,\n \"editable\": true,\n \"columns\": [\n {\n \"name\": \"group_name\",\n \"label\": \"\\${'object_layouts.object_layouts_form.group_name' | t}\",\n \"id\": \"u:ee2fb813a3e7\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visible_on' | t}\"\n }\n ],\n \"value\": \"\\${field_groups}\",\n \"removable\": true,\n \"id\": \"u:e9f43ef94d08\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"args\": {},\n \"componentId\": \"\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; }; return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const clearFields = function (input) { return { fields: [] }};const convertDataForGroups = function (input) { const settingGroups = input.setting_groups || []; const convertedGroups = lodash.uniqBy(settingGroups.map(function (item) { return { group_name: item.group_name, visible_on: item.visible_on } }), \\\"group_name\\\"); const groupNames = lodash.compact(lodash.map(convertedGroups, \\\"group_name\\\")); const fields = input.__super.__super.items; fields.sort(getFieldsSortFun(groupNames)); return { field_groups: convertedGroups, fields: fields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForGroups(eventData) }});\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"id\": \"u:e02c8f59216e\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.grouping_set' | t}\",\n \"id\": \"u:ec9931ea883c\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"id\": \"u:22121edc42b1\"\n }\n ],\n \"id\": \"u:ac5b7818b88f\",\n \"affixFooter\": false,\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/fields/layout_options\",\n \"adaptor\": \"let data = payload.data;data.fields_options = data.options;data.field_groups_options = lodash.uniq(lodash.compact(lodash.map(data.options, \\\"group\\\"))) || [];delete data.options;payload.data = data; return payload;\",\n \"sendOn\": \"!!this.object_name\",\n \"data\": null,\n \"headers\": {\n \"Authorization\": \"Bearer ${context.tenantId},${context.authToken}\"\n }\n },\n \"className\": \"col-span-2 m-0\",\n \"placeholder\": \"-\",\n \"onEvent\": {\n \"fetchInited\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const mixingGroupsFromFields = function (input, formData) { const groupsOptions = input.field_groups_options; const groups = formData.field_groups || []; const object_field_groups = formData.object_field_groups || []; const groupsForMixing = groupsOptions.map(function (item) { return { group_name: item } }); const mixedGroups = lodash.unionBy(groups, groupsForMixing, object_field_groups, \\\"group_name\\\"); return { field_groups: mixedGroups }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: mixingGroupsFromFields(eventData, context.props.data) }});\"\n }\n ]\n }\n },\n \"messages\": {}\n }\n },\n \"related_lists\":{\n \"amis\":{\n \"type\": \"service\",\n \"id\": \"u:dbadaff47153\",\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/relatedLists/options\",\n \"sendOn\": \"!!this.object_name\",\n \"adaptor\": \"let data = payload.data;data.related_lists_options = data.options;delete data.options;payload.data = data;return payload;\",\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"className\": \"col-span-2 m-0\",\n \"affixFooter\": false,\n \"body\": [\n {\n \"name\": \"related_lists\",\n \"type\": \"crud\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": true,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"related_field_fullname_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.related_list_name' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${related_lists_options|filter:value:equals:related_field_fullname|pick:label}\",\n \"id\": \"u:5204fc0fbe1c\"\n },\n {\n \"name\": \"label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.related_list_label' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); }; return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, \\\"label\\\") }});\"\n }\n ]\n }\n },\n \"labelRemark\": \"\\${'object_layouts.object_layouts_form.related_list_label_remark' | t}\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"id\": \"u:5b30f2a71830\",\n \"name\": \"label\",\n \"mode\":\"popOver\"\n },\n \"id\": \"u:1267e4351d66\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"field_names\",\n \"label\": \"\\${'object_layouts.object_layouts_form.field_names' | t}\",\n \"quickEdit\": {\n \"type\": \"transfer-picker\",\n \"source\": {\n \"method\": \"get\",\n \"url\": \"/service/api/amis-metadata-objects/objects/\\${related_field_fullname|split:.|first}/fields/options\",\n \"cache\": 60000,\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"searchable\": true,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"field_names\\\") }});\"\n }\n ]\n }\n },\n \"joinValues\": false,\n \"extractValue\": true,\n \"mode\": \"inline\",\n \"id\": \"u:a85f62af394f\",\n \"name\": \"field_names\"\n },\n \"type\": \"tpl\",\n \"tpl\": \"<%= data.related_object_fields_options && data.related_object_fields_options[data.related_field_fullname] ? data.related_object_fields_options[data.related_field_fullname].filter(function(item){ return data.field_names && data.field_names.indexOf(item.value) > -1;}).map(function(item){return item.label}) : data.field_names%>\",\n \"id\": \"u:ce65d4020107\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"sort_field_name\",\n \"label\": \"\\${'object_layouts.object_layouts_form.sort_field_name' | t}\",\n \"quickEdit\": {\n \"type\": \"transfer-picker\",\n \"joinValues\": false,\n \"extractValue\": true,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"sort_field_name\\\") }});\"\n }\n ]\n }\n },\n \"source\": {\n \"method\": \"get\",\n \"url\": \"/service/api/amis-metadata-objects/objects/\\${related_field_fullname|split:.|first}/fields/options\",\n \"cache\": 60000,\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"searchable\": true,\n \"name\": \"sort_field_name\",\n \"id\": \"u:c1e3daddf92c\",\n \"mode\": \"inline\"\n },\n \"tpl\": \"<%= data.related_object_fields_options && data.related_object_fields_options[data.related_field_fullname] ? data.related_object_fields_options[data.related_field_fullname].filter(function(item){ return data.sort_field_name && data.sort_field_name.indexOf(item.value) > -1;}).map(function(item){return item.label}) : data.sort_field_name%>\",\n \"id\": \"u:3dbee6a855c4\"\n },\n {\n \"name\": \"sort_order\",\n \"label\": \"\\${'object_layouts.object_layouts_form.sort_order' | t}\",\n \"quickEdit\": {\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"sort_order\\\") }});\"\n }\n ]\n }\n },\n \"joinValues\": false,\n \"extractValue\": true,\n \"clearable\": true,\n \"labelField\": \"label\",\n \"valueField\": \"value\",\n \"mode\": \"popOver\",\n \"source\": \"\\${sort_order_options}\",\n \"type\": \"select\",\n \"name\": \"sort_order\",\n \"id\": \"u:951e05ace916\",\n \"multiple\": false\n },\n \"breakpoint\": \"*\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${sort_order_options|filter:value:equals:sort_order|pick:label}\",\n \"id\": \"u:13cb3d304615\"\n },\n {\n \"name\": \"filters\",\n \"label\": \"\\${'object_layouts.object_layouts_form.filters_rule' | t}\",\n \"quickEdit\": {\n \"type\": \"editor\",\n \"language\": \"javascript\",\n \"description\": \"\\${'object_layouts.object_layouts_form.filters_rule_description' | t}\",\n \"tpl\": \"<b><%=data.filters%></b>\",\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"filters\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"filters\",\n \"id\": \"u:0436e626f06a\",\n \"minRows\": 3,\n \"maxRows\": 20\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:e4c367804b67\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { let currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"name\": \"visible_on\",\n \"id\": \"u:3106cc0f9cc7\",\n \"minRows\": 3,\n \"maxRows\": 20,\n \"mode\": \"popOver\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:1e1dc52d7c33\"\n },\n {\n \"name\": \"page_size\",\n \"label\": \"\\${'object_layouts.object_layouts_form.page_size' | t}\",\n \"quickEdit\": {\n \"type\": \"input-number\",\n \"precision\": 0,\n \"className\": \"m-0\",\n \"labelClassName\": \"text-number\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"page_size\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"page_size\",\n \"mode\": \"popOver\",\n \"id\": \"u:0e261f265511\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:f9bbd9567bbd\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.set_related_list' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_related_lists\",\n \"sortable\": true,\n \"source\": \"\\${related_lists_options}\",\n \"value\": \"\\${related_lists|pick:related_field_fullname}\",\n \"searchable\": true,\n \"id\": \"u:ab6a6c9c8677\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const clearRelatedLists = function (input) { return { related_lists: [] }};const convertDataForRelatedLists = function (input) { let pickedRelateds = input.picked_related_lists || []; const superRelateds = _.keyBy(input.__super.related_lists, 'related_field_fullname'); if (typeof pickedRelateds === \\\"string\\\") { pickedRelateds = pickedRelateds.split(\\\",\\\"); } const convertedRelateds = pickedRelateds.map(function (key) { return superRelateds[key] || { related_field_fullname: key, sort_order: \\\"asc\\\" } }); return { related_lists: convertedRelateds }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearRelatedLists() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForRelatedLists(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"size\": \"md\",\n \"id\": \"u:3663990f226a\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.set_related_list' | t}\",\n \"id\": \"u:b9a5d3b611d7\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"source\": \"\\${related_lists}\",\n \"footable\": false,\n \"columnsTogglable\": false,\n \"messages\": {},\n \"tableClassName\": \"min-w-max\",\n \"id\": \"u:95aea10231d3\"\n }\n ],\n \"messages\": {}\n }\n },\n \"field_groups\":{\n \"hidden\": true\n }\n}",
|
|
51
|
+
"form": {
|
|
52
|
+
"id": "object-layout-form",
|
|
53
|
+
"data": {
|
|
54
|
+
"sort_order_options": [
|
|
55
|
+
{
|
|
56
|
+
"label": "${'object_layouts.object_layouts_form.positive_order' | t}",
|
|
57
|
+
"value": "asc"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"label": "${'object_layouts.object_layouts_form.reverse_order' | t}",
|
|
61
|
+
"value": "desc"
|
|
62
|
+
}
|
|
63
|
+
]
|
|
38
64
|
}
|
|
39
|
-
|
|
65
|
+
},
|
|
66
|
+
"apiRequestAdaptor": "delete formData.created;\ndelete formData.created_by;\ndelete formData.modified;\ndelete formData.modified_by;\ndelete formData._display;\ndelete formData.sort_order_options;\ndelete formData.buttons_options;\ndelete formData.fields_options;\ndelete formData.field_groups_options;\ndelete formData.related_lists_options;\ndelete formData.related_object_fields_options;\ndelete formData.isLookup;\nquery = `mutation{record: object_layouts__insert(doc: {__saveData}){_id}}`;\nif (formData.recordId) {\n query = `mutation{record: object_layouts__update(id: \"` + formData.recordId + `\", doc: {__saveData}){_id}}`;\n};\ndelete formData._id;\n__saveData = JSON.stringify(JSON.stringify(formData));\n\napi.data = { query: query.replace('{__saveData}', __saveData) };\nreturn api;",
|
|
67
|
+
"tabsMode": "line"
|
|
40
68
|
}
|
|
41
|
-
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
"fieldsExtend": "{\n \"profiles\":{\n \"amis\":{\n \"type\": \"select\",\n \"name\": \"profiles\",\n \"required\": true,\n \"joinValues\": false,\n \"extractValue\": true,\n \"labelField\": \"label\",\n \"multiple\": true,\n \"labelClassName\": \"text-left\",\n \"checkAll\": true,\n \"source\": {\n \"method\": \"post\",\n \"url\": \"\\${context.rootUrl}/graphql\",\n \"data\": {\n \"query\": \"{options:permission_set(filters: [\\\"type\\\", \\\"=\\\", \\\"profile\\\"]){name,label}}\"\n },\n \"requestAdaptor\": \"\",\n \"adaptor\": \"\",\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"valueField\": \"name\",\n \"searchable\": true,\n \"id\": \"u:3c65447a8a6e\",\n \"defaultCheckAll\": false,\n \"checkAllLabel\": \"全选\",\n \"autoComplete\":\"\",\n \"menuTpl\":\"\"\n }\n },\n \"buttons\": {\n \"amis\": {\n \"type\":\"service\",\n \"body\":[\n {\n \"type\": \"crud\",\n \"name\": \"buttons\",\n \"label\": \"按钮\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": false,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"button_name_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.button_name_label' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${buttons_options|filter:value:equals:button_name|pick:label}\",\n \"id\": \"u:302f8fadccd3\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"className\": \"w-6/12\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForButton = function (input, prop_name) { let currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const button_name = rowValue.button_name; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newButtons = formValue.buttons.map(function (item) { if (item.button_name == button_name) { return Object.assign({}, item, rowValue); } else { return item; } }); return { buttons: newButtons }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForButton(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"name\": \"visible_on\",\n \"id\": \"u:daa771bd34b9\",\n \"mode\": \"popOver\"\n },\n \"id\": \"u:3c35211aa1a0\",\n \"placeholder\": \"-\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"footable\": false,\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.button_set' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_buttons\",\n \"sortable\": true,\n \"source\": \"\\${buttons_options}\",\n \"value\": \"\\${buttons|pick:button_name}\",\n \"searchable\": true,\n \"id\": \"u:d6e067c40e83\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const clearButtons = function (input) { return { buttons: [] }};const convertDataForButtons = function (input) { let pickedButtons = input.picked_buttons || []; const superButtons = _.keyBy(input.__super.buttons, 'button_name'); if (typeof pickedButtons === \\\"string\\\") { pickedButtons = pickedButtons.split(\\\",\\\"); }; const convertedButtons = pickedButtons.map(function (key) { return superButtons[key] || { button_name: key } }); return { buttons: convertedButtons }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearButtons() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForButtons(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"id\": \"u:a0027ac6f8c1\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true,\n \"size\": \"md\"\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.button_set' | t}\",\n \"id\": \"u:1ac8afc8a9bb\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"source\": \"\\${buttons}\",\n \"id\": \"u:a5d43b752494\",\n \"perPageAvailable\": [\n 10\n ],\n \"messages\": {},\n \"onEvent\": {\n \"rowClick\": {\n \"weight\": 0,\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForButton = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const button_name = rowValue.button_name;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForButton(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n }\n }\n ],\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/actions/options\",\n \"adaptor\": \"let data = payload.data;data.buttons_options = data.options;delete data.options;payload.data = data;return payload;\",\n \"sendOn\": \"!!this.object_name\",\n \"headers\": {\n \"Authorization\": \"Bearer ${context.tenantId},${context.authToken}\"\n }\n }\n \n }\n },\n \"fields\":{\n \"amis\":{\n \"type\": \"service\",\n \"body\": [\n {\n \"name\": \"fields\",\n \"required\": true,\n \"type\": \"crud\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": false,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"field_name_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.fields' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${fields_options|filter:value:equals:field_name|pick:label}\",\n \"id\": \"u:b95c69a1cd84\"\n },\n {\n \"name\": \"is_readonly\",\n \"label\": \"\\${'object_layouts.object_layouts_form.readonly' | t}\",\n \"quickEdit\": {\n \"type\": \"checkbox\",\n \"tpl\": null,\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"mode\": \"inline\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"is_readonly\\\") }});\"\n }\n ]\n }\n },\n \"id\": \"u:8cb44f3db16c\",\n \"name\": \"is_readonly\"\n },\n \"id\": \"u:5081e6e1af55\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"is_required\",\n \"label\": \"\\${'object_layouts.object_layouts_form.required' | t}\",\n \"quickEdit\": {\n \"mode\": \"inline\",\n \"type\": \"checkbox\",\n \"className\": \"m-0\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"is_required\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": null,\n \"labelClassName\": \"text-left\",\n \"id\": \"u:bbd1c15b6504\",\n \"name\": \"is_required\"\n },\n \"id\": \"u:e54afb5cc05c\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"group\",\n \"label\": \"\\${'object_layouts.object_layouts_form.grouping' | t}\",\n \"quickEdit\": {\n \"type\": \"select\",\n \"className\": \"m-0\",\n \"source\": \"\\${field_groups|pick:group_name}\",\n \"checkAll\": false,\n \"selectFirst\": false,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\"; const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); }; }; const quickEidtSaveForField = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields } }; const eventData = event.data; const clearFields = function (input) { return { fields: [] } };doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"group\\\") } });}, 300);\"\n }\n ]\n }\n },\n \"searchable\": true,\n \"clearable\": true,\n \"name\": \"group\",\n \"id\": \"u:f75ddc45d296\",\n \"multiple\": false,\n \"mode\": \"popOver\"\n },\n \"id\": \"u:e532b1949676\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; } return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const quickEidtSaveForField = function (input, prop_name) { let currentPropValue = input.value; const rowValue = input.__super; const formValue = input.__super.__super.__super; const field_name = rowValue.field_name; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newFields = formValue.fields.map(function (item) { if (item.field_name == field_name) { return Object.assign({}, item, rowValue); } else { return item; } }); const fieldGroups = input.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); newFields.sort(getFieldsSortFun(groupNames)); return { fields: newFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForField(eventData, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"visible_on\",\n \"id\": \"u:624913811ecc\",\n \"minRows\": 3,\n \"maxRows\": 20,\n \"mode\": \"popOver\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:e3618b8b4c52\",\n \"placeholder\": \"-\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"source\": \"\\${fields}\",\n \"footable\": false,\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.field_set' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_fields\",\n \"sortable\": true,\n \"source\": \"\\${fields_options}\",\n \"value\": \"\\${fields|pick:field_name}\",\n \"searchable\": true,\n \"id\": \"u:502c4ecd81b6\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; }; return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const clearFields = function (input) { return { fields: [] }};const convertDataForFields = function (input) { let pickedFields = input.picked_fields || []; const superFields = _.keyBy(input.__super.fields, 'field_name'); if (typeof pickedFields === \\\"string\\\") { pickedFields = pickedFields.split(\\\",\\\"); }; const fieldOptions = lodash.keyBy(input.__super.__super.__super.__super.__super.fields_options, \\\"value\\\"); const convertedFields = pickedFields.map(function (field_name) { const superField = superFields[field_name]; if (superField) { return superField; } else { const fieldOption = fieldOptions[field_name]; return { field_name: field_name, is_readonly: fieldOption.readonly, is_required: fieldOption.required, group: fieldOption.group } } }); const fieldGroups = input.__super.__super.__super.__super.__super.field_groups; const groupNames = lodash.compact(lodash.map(fieldGroups, \\\"group_name\\\")); convertedFields.sort(getFieldsSortFun(groupNames)); return { fields: convertedFields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForFields(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"size\": \"md\",\n \"id\": \"u:c405734543e0\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.field_set' | t}\",\n \"id\": \"u:853b890ab524\"\n },\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.grouping_set' | t}\",\n \"size\": \"lg\",\n \"body\": [\n {\n \"type\": \"input-table\",\n \"name\": \"setting_groups\",\n \"addable\": true,\n \"draggable\": true,\n \"editable\": true,\n \"columns\": [\n {\n \"name\": \"group_name\",\n \"label\": \"\\${'object_layouts.object_layouts_form.group_name' | t}\",\n \"id\": \"u:ee2fb813a3e7\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visible_on' | t}\"\n }\n ],\n \"value\": \"\\${field_groups}\",\n \"removable\": true,\n \"id\": \"u:e9f43ef94d08\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"args\": {},\n \"componentId\": \"\",\n \"script\": \"const fieldGroupKey = \\\"group\\\";const getFieldsSortFun = function (groupNames) { return function (m, n) { var tempM = !!m[fieldGroupKey] ? 1 : 0; var tempN = !!n[fieldGroupKey] ? 1 : 0; if (!m[fieldGroupKey] || !n[fieldGroupKey]) { return tempM - tempN; }; return groupNames.indexOf(m[fieldGroupKey]) - groupNames.indexOf(n[fieldGroupKey]); };};const clearFields = function (input) { return { fields: [] }};const convertDataForGroups = function (input) { const settingGroups = input.setting_groups || []; const convertedGroups = lodash.uniqBy(settingGroups.map(function (item) { return { group_name: item.group_name, visible_on: item.visible_on } }), \\\"group_name\\\"); const groupNames = lodash.compact(lodash.map(convertedGroups, \\\"group_name\\\")); const fields = input.__super.__super.items; fields.sort(getFieldsSortFun(groupNames)); return { field_groups: convertedGroups, fields: fields }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearFields() }});doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForGroups(eventData) }});\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"id\": \"u:e02c8f59216e\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.grouping_set' | t}\",\n \"id\": \"u:ec9931ea883c\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"id\": \"u:22121edc42b1\"\n }\n ],\n \"id\": \"u:ac5b7818b88f\",\n \"affixFooter\": false,\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/fields/layout_options\",\n \"adaptor\": \"let data = payload.data;data.fields_options = data.options;data.field_groups_options = lodash.uniq(lodash.compact(lodash.map(data.options, \\\"group\\\"))) || [];delete data.options;payload.data = data; return payload;\",\n \"sendOn\": \"!!this.object_name\",\n \"data\": null,\n \"headers\": {\n \"Authorization\": \"Bearer ${context.tenantId},${context.authToken}\"\n }\n },\n \"className\": \"col-span-2 m-0\",\n \"placeholder\": \"-\",\n \"onEvent\": {\n \"fetchInited\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const mixingGroupsFromFields = function (input, formData) { const groupsOptions = input.field_groups_options; const groups = formData.field_groups || []; const groupsForMixing = groupsOptions.map(function (item) { return { group_name: item } }); const mixedGroups = lodash.unionBy(groups, groupsForMixing, \\\"group_name\\\"); return { field_groups: mixedGroups }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: mixingGroupsFromFields(eventData, context.props.data) }});\"\n }\n ]\n }\n },\n \"messages\": {}\n }\n },\n \"related_lists\":{\n \"amis\":{\n \"type\": \"service\",\n \"id\": \"u:dbadaff47153\",\n \"api\": {\n \"method\": \"get\",\n \"url\": \"\\${context.rootUrl}/service/api/amis-metadata-objects/objects/\\${object_name}/relatedLists/options\",\n \"sendOn\": \"!!this.object_name\",\n \"adaptor\": \"let data = payload.data;data.related_lists_options = data.options;delete data.options;payload.data = data;return payload;\",\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"className\": \"col-span-2 m-0\",\n \"affixFooter\": false,\n \"body\": [\n {\n \"name\": \"related_lists\",\n \"type\": \"crud\",\n \"strictMode\": true,\n \"affixHeader\": false,\n \"editable\": true,\n \"addable\": true,\n \"removable\": true,\n \"draggable\": false,\n \"columns\": [\n {\n \"name\": \"related_field_fullname_label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.related_list_name' | t}\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${related_lists_options|filter:value:equals:related_field_fullname|pick:label}\",\n \"id\": \"u:5204fc0fbe1c\"\n },\n {\n \"name\": \"label\",\n \"label\": \"\\${'object_layouts.object_layouts_form.related_list_label' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, prop_name) { const currentPropValue = input.value; const rowValue = input; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); }; return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, \\\"label\\\") }});\"\n }\n ]\n }\n },\n \"labelRemark\": \"\\${'object_layouts.object_layouts_form.related_list_label_remark' | t}\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"id\": \"u:5b30f2a71830\",\n \"name\": \"label\",\n \"mode\":\"popOver\"\n },\n \"id\": \"u:1267e4351d66\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"field_names\",\n \"label\": \"\\${'object_layouts.object_layouts_form.field_names' | t}\",\n \"quickEdit\": {\n \"type\": \"transfer-picker\",\n \"source\": {\n \"method\": \"get\",\n \"url\": \"/service/api/amis-metadata-objects/objects/\\${related_field_fullname|split:.|first}/fields/options\",\n \"cache\": 60000,\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"searchable\": true,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"field_names\\\") }});\"\n }\n ]\n }\n },\n \"joinValues\": false,\n \"extractValue\": true,\n \"mode\": \"inline\",\n \"id\": \"u:a85f62af394f\",\n \"name\": \"field_names\"\n },\n \"type\": \"tpl\",\n \"tpl\": \"<%= data.related_object_fields_options && data.related_object_fields_options[data.related_field_fullname] ? data.related_object_fields_options[data.related_field_fullname].filter(function(item){ return data.field_names && data.field_names.indexOf(item.value) > -1;}).map(function(item){return item.label}) : data.field_names%>\",\n \"id\": \"u:ce65d4020107\",\n \"placeholder\": \"-\"\n },\n {\n \"name\": \"sort_field_name\",\n \"label\": \"\\${'object_layouts.object_layouts_form.sort_field_name' | t}\",\n \"quickEdit\": {\n \"type\": \"transfer-picker\",\n \"joinValues\": false,\n \"extractValue\": true,\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"sort_field_name\\\") }});\"\n }\n ]\n }\n },\n \"source\": {\n \"method\": \"get\",\n \"url\": \"/service/api/amis-metadata-objects/objects/\\${related_field_fullname|split:.|first}/fields/options\",\n \"cache\": 60000,\n \"headers\": {\n \"Authorization\": \"Bearer \\${context.tenantId},\\${context.authToken}\"\n }\n },\n \"searchable\": true,\n \"name\": \"sort_field_name\",\n \"id\": \"u:c1e3daddf92c\",\n \"mode\": \"inline\"\n },\n \"tpl\": \"<%= data.related_object_fields_options && data.related_object_fields_options[data.related_field_fullname] ? data.related_object_fields_options[data.related_field_fullname].filter(function(item){ return data.sort_field_name && data.sort_field_name.indexOf(item.value) > -1;}).map(function(item){return item.label}) : data.sort_field_name%>\",\n \"id\": \"u:3dbee6a855c4\"\n },\n {\n \"name\": \"sort_order\",\n \"label\": \"\\${'object_layouts.object_layouts_form.sort_order' | t}\",\n \"quickEdit\": {\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"sort_order\\\") }});\"\n }\n ]\n }\n },\n \"joinValues\": false,\n \"extractValue\": true,\n \"clearable\": true,\n \"labelField\": \"label\",\n \"valueField\": \"value\",\n \"mode\": \"popOver\",\n \"source\": \"\\${sort_order_options}\",\n \"type\": \"select\",\n \"name\": \"sort_order\",\n \"id\": \"u:951e05ace916\",\n \"multiple\": false\n },\n \"breakpoint\": \"*\",\n \"type\": \"tpl\",\n \"tpl\": \"\\${sort_order_options|filter:value:equals:sort_order|pick:label}\",\n \"id\": \"u:13cb3d304615\"\n },\n {\n \"name\": \"filters\",\n \"label\": \"\\${'object_layouts.object_layouts_form.filters_rule' | t}\",\n \"quickEdit\": {\n \"type\": \"editor\",\n \"language\": \"javascript\",\n \"description\": \"\\${'object_layouts.object_layouts_form.filters_rule_description' | t}\",\n \"tpl\": \"<b><%=data.filters%></b>\",\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"filters\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"filters\",\n \"id\": \"u:0436e626f06a\",\n \"minRows\": 3,\n \"maxRows\": 20\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:e4c367804b67\"\n },\n {\n \"name\": \"visible_on\",\n \"label\": \"\\${'object_layouts.object_layouts_form.visibile_on' | t}\",\n \"quickEdit\": {\n \"type\": \"input-text\",\n \"className\": \"m-0\",\n \"labelClassName\": \"text-left\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { let currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; if (currentPropValue.startsWith(\\\"\\\\$\\\\{\\\")) { currentPropValue = \\\"\\\\\\\\\\\" + currentPropValue }; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"visible_on\\\") }});\"\n }\n ]\n }\n },\n \"tpl\": \"<b><%=data.visible_on%></b>\",\n \"name\": \"visible_on\",\n \"id\": \"u:3106cc0f9cc7\",\n \"minRows\": 3,\n \"maxRows\": 20,\n \"mode\": \"popOver\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:1e1dc52d7c33\"\n },\n {\n \"name\": \"page_size\",\n \"label\": \"\\${'object_layouts.object_layouts_form.page_size' | t}\",\n \"quickEdit\": {\n \"type\": \"input-number\",\n \"precision\": 0,\n \"className\": \"m-0\",\n \"labelClassName\": \"text-number\",\n \"onEvent\": {\n \"change\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const quickEidtSaveForRelatedList = function (input, rowValue, prop_name) { const currentPropValue = input.value; delete rowValue.event; const formValue = rowValue.__super.__super; const related_field_fullname = rowValue.related_field_fullname; rowValue[prop_name] = currentPropValue; let newRelatedLists = formValue.related_lists.map(function (item) { if (item.related_field_fullname == related_field_fullname) { if (prop_name === \\\"related_field_fullname\\\") { return { related_field_fullname: currentPropValue, sort_order: \\\"asc\\\" } } else { return Object.assign({}, item, rowValue); } } else { return item; } }); const newFormDoc = { related_lists: newRelatedLists }; if (prop_name === \\\"field_names\\\" || prop_name === \\\"sort_field_name\\\") { const currentOptions = {}; currentOptions[related_field_fullname] = input.options; newFormDoc.related_object_fields_options = Object.assign({}, formValue.related_object_fields_options, currentOptions); } return newFormDoc;};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: quickEidtSaveForRelatedList(eventData, context.props.data, \\\"page_size\\\") }});\"\n }\n ]\n }\n },\n \"name\": \"page_size\",\n \"mode\": \"popOver\",\n \"id\": \"u:0e261f265511\"\n },\n \"breakpoint\": \"*\",\n \"id\": \"u:f9bbd9567bbd\"\n }\n ],\n \"className\": \"col-span-2 m-0\",\n \"labelClassName\": \"text-left\",\n \"headerToolbar\": [\n {\n \"type\": \"button\",\n \"actionType\": \"dialog\",\n \"dialog\": {\n \"title\": \"\\${'object_layouts.object_layouts_form.set_related_list' | t}\",\n \"body\": [\n {\n \"type\": \"transfer\",\n \"name\": \"picked_related_lists\",\n \"sortable\": true,\n \"source\": \"\\${related_lists_options}\",\n \"value\": \"\\${related_lists|pick:related_field_fullname}\",\n \"searchable\": true,\n \"id\": \"u:ab6a6c9c8677\"\n }\n ],\n \"onEvent\": {\n \"confirm\": {\n \"actions\": [\n {\n \"actionType\": \"custom\",\n \"script\": \"const clearRelatedLists = function (input) { return { related_lists: [] }};const convertDataForRelatedLists = function (input) { let pickedRelateds = input.picked_related_lists || []; const superRelateds = _.keyBy(input.__super.related_lists, 'related_field_fullname'); if (typeof pickedRelateds === \\\"string\\\") { pickedRelateds = pickedRelateds.split(\\\",\\\"); } const convertedRelateds = pickedRelateds.map(function (key) { return superRelateds[key] || { related_field_fullname: key, sort_order: \\\"asc\\\" } }); return { related_lists: convertedRelateds }};const eventData = event.data;doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: clearRelatedLists() }});setTimeout(function () { doAction({ actionType: 'setValue', componentId: \\\"object-layout-form\\\", args: { value: convertDataForRelatedLists(eventData) } });}, 300);\"\n }\n ]\n }\n },\n \"type\": \"dialog\",\n \"size\": \"md\",\n \"id\": \"u:3663990f226a\",\n \"closeOnEsc\": false,\n \"closeOnOutside\": false,\n \"showCloseButton\": true\n },\n \"label\": \"\\${'object_layouts.object_layouts_form.set_related_list' | t}\",\n \"id\": \"u:b9a5d3b611d7\"\n }\n ],\n \"headerToolbarClassName\": \"px-1 pb-3\",\n \"source\": \"\\${related_lists}\",\n \"footable\": false,\n \"columnsTogglable\": false,\n \"messages\": {},\n \"tableClassName\": \"min-w-max\",\n \"id\": \"u:95aea10231d3\"\n }\n ],\n \"messages\": {}\n }\n },\n \"field_groups\":{\n \"hidden\": true\n }\n}",
|
|
48
|
-
|
|
49
|
-
|
|
69
|
+
],
|
|
70
|
+
"id": "u:306afc3d4713",
|
|
71
|
+
"api": {
|
|
72
|
+
"method": "post",
|
|
73
|
+
"url": "${context.rootUrl}/graphql",
|
|
74
|
+
"dataType": "json",
|
|
75
|
+
"headers": {
|
|
76
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
77
|
+
},
|
|
50
78
|
"data": {
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
{
|
|
57
|
-
"label": "${'object_layouts.object_layouts_form.reverse_order' | t}",
|
|
58
|
-
"value": "desc"
|
|
59
|
-
}
|
|
60
|
-
]
|
|
79
|
+
"query": "{object_field_groups:objects(filters: [[\"name\",\"=\",\"${_master.record.name}\"]]){_id,name,field_groups}}"
|
|
80
|
+
},
|
|
81
|
+
"requestAdaptor": "",
|
|
82
|
+
"adaptor": "return payload = {\n data: {\n object_field_groups: payload.data.object_field_groups[0].field_groups\n }\n}",
|
|
83
|
+
"messages": {
|
|
61
84
|
}
|
|
62
|
-
}
|
|
63
|
-
"apiRequestAdaptor": "delete formData.created;\ndelete formData.created_by;\ndelete formData.modified;\ndelete formData.modified_by;\ndelete formData._display;\ndelete formData.sort_order_options;\ndelete formData.buttons_options;\ndelete formData.fields_options;\ndelete formData.field_groups_options;\ndelete formData.related_lists_options;\ndelete formData.related_object_fields_options;\ndelete formData.isLookup;\nquery = `mutation{record: object_layouts__insert(doc: {__saveData}){_id}}`;\nif (formData.recordId) {\n query = `mutation{record: object_layouts__update(id: \"` + formData.recordId + `\", doc: {__saveData}){_id}}`;\n};\ndelete formData._id;\n__saveData = JSON.stringify(JSON.stringify(formData));\n\napi.data = { query: query.replace('{__saveData}', __saveData) };\nreturn api;",
|
|
64
|
-
"tabsMode": "line"
|
|
85
|
+
}
|
|
65
86
|
}
|
|
66
87
|
],
|
|
67
88
|
"regions": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/service-plugin-amis",
|
|
3
|
-
"version": "2.5.
|
|
3
|
+
"version": "2.5.18-beta.2",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "yarn build:tailwind-base && yarn build:tailwind",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"publishConfig": {
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "0f48957d39df17d699a5177f473401362a9916bf",
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"tailwindcss": "3.2.4"
|
|
19
19
|
}
|
|
@@ -89,6 +89,10 @@
|
|
|
89
89
|
margin: -2rem
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
+
.m-auto {
|
|
93
|
+
margin: auto
|
|
94
|
+
}
|
|
95
|
+
|
|
92
96
|
.mx-4 {
|
|
93
97
|
margin-left: 1rem;
|
|
94
98
|
margin-right: 1rem
|
|
@@ -104,6 +108,11 @@
|
|
|
104
108
|
margin-right: -2.75rem
|
|
105
109
|
}
|
|
106
110
|
|
|
111
|
+
.mx-3 {
|
|
112
|
+
margin-left: 0.75rem;
|
|
113
|
+
margin-right: 0.75rem
|
|
114
|
+
}
|
|
115
|
+
|
|
107
116
|
.mb-4 {
|
|
108
117
|
margin-bottom: 1rem
|
|
109
118
|
}
|
|
@@ -205,10 +214,18 @@
|
|
|
205
214
|
min-width: 240px
|
|
206
215
|
}
|
|
207
216
|
|
|
217
|
+
.\!min-w-\[160px\] {
|
|
218
|
+
min-width: 160px !important
|
|
219
|
+
}
|
|
220
|
+
|
|
208
221
|
.min-w-\[200px\] {
|
|
209
222
|
min-width: 200px
|
|
210
223
|
}
|
|
211
224
|
|
|
225
|
+
.max-w-xl {
|
|
226
|
+
max-width: 36rem
|
|
227
|
+
}
|
|
228
|
+
|
|
212
229
|
.flex-1 {
|
|
213
230
|
flex: 1 1 0%
|
|
214
231
|
}
|
|
@@ -274,6 +291,10 @@
|
|
|
274
291
|
border-width: 1px
|
|
275
292
|
}
|
|
276
293
|
|
|
294
|
+
.border-0 {
|
|
295
|
+
border-width: 0px
|
|
296
|
+
}
|
|
297
|
+
|
|
277
298
|
.border-b {
|
|
278
299
|
border-bottom-width: 1px
|
|
279
300
|
}
|
|
@@ -306,11 +327,20 @@
|
|
|
306
327
|
background-color: rgb(134 239 172 / var(--tw-bg-opacity))
|
|
307
328
|
}
|
|
308
329
|
|
|
330
|
+
.bg-gray-50 {
|
|
331
|
+
--tw-bg-opacity: 1;
|
|
332
|
+
background-color: rgb(249 250 251 / var(--tw-bg-opacity))
|
|
333
|
+
}
|
|
334
|
+
|
|
309
335
|
.bg-gray-100 {
|
|
310
336
|
--tw-bg-opacity: 1;
|
|
311
337
|
background-color: rgb(243 244 246 / var(--tw-bg-opacity))
|
|
312
338
|
}
|
|
313
339
|
|
|
340
|
+
.bg-none {
|
|
341
|
+
background-image: none
|
|
342
|
+
}
|
|
343
|
+
|
|
314
344
|
.p-0 {
|
|
315
345
|
padding: 0px
|
|
316
346
|
}
|
|
@@ -323,6 +353,10 @@
|
|
|
323
353
|
padding: 0.5rem
|
|
324
354
|
}
|
|
325
355
|
|
|
356
|
+
.p-1 {
|
|
357
|
+
padding: 0.25rem
|
|
358
|
+
}
|
|
359
|
+
|
|
326
360
|
.px-2 {
|
|
327
361
|
padding-left: 0.5rem;
|
|
328
362
|
padding-right: 0.5rem
|
|
@@ -420,6 +454,12 @@
|
|
|
420
454
|
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
|
|
421
455
|
}
|
|
422
456
|
|
|
457
|
+
.shadow {
|
|
458
|
+
--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
|
|
459
|
+
--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);
|
|
460
|
+
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow)
|
|
461
|
+
}
|
|
462
|
+
|
|
423
463
|
.filter {
|
|
424
464
|
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)
|
|
425
465
|
}
|