@things-factory/operato-tools 7.0.0-y.0 → 7.0.1-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/index.js +0 -1
- package/client/pages/generator/button-config-tab-mixin.js +336 -2
- package/client/pages/generator/column-config-tab-mixin.js +647 -2
- package/client/pages/generator/etc-config-tab-mixin.js +116 -2
- package/client/pages/generator/form-config-tab-mixin.js +164 -2
- package/client/pages/generator/graphql-config-tab-mixin.js +281 -15
- package/client/pages/generator/grid-config-tab-mixin.js +190 -28
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +295 -6
- package/client/pages/generator/menu-config-tab-mixin.js +94 -8
- package/client/pages/generator/meta-generator-page.js +512 -12
- package/client/pages/generator/search-config-tab-mixin.js +188 -2
- package/client/pages/generator/tab-config-tab-mixin.js +226 -2
- package/client/pages/main.js +30 -7
- package/client/route.js +5 -10
- package/config/config.development.js +1 -1
- package/config/config.production.js +1 -0
- package/{server/errors → dist-server}/index.js +1 -1
- package/dist-server/index.js.map +1 -0
- package/{server → dist-server}/service/index.js +0 -2
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/tool-entity/create-menu.js +321 -0
- package/dist-server/service/tool-entity/create-menu.js.map +1 -0
- package/dist-server/service/tool-entity/create-service.js +1053 -0
- package/dist-server/service/tool-entity/create-service.js.map +1 -0
- package/dist-server/service/tool-entity/index.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +21 -14
- package/server/index.ts +1 -0
- package/server/service/index.ts +15 -0
- package/server/service/tool-entity/create-menu.ts +338 -0
- package/server/service/tool-entity/create-service.ts +1128 -0
- package/server/service/tool-entity/index.ts +4 -0
- package/server/tsconfig.json +9 -0
- package/things-factory.config.js +1 -3
- package/tsconfig.json +9 -0
- package/views/auth-page.html +1 -7
- package/views/public/home.html +1 -6
- package/client/actions/main.js +0 -1
- package/client/bootstrap.js +0 -8
- package/client/reducers/main.js +0 -1
- package/client/themes/grist-theme.css +0 -200
- package/client/themes/layout-theme.css +0 -92
- package/client/themes/report-theme.css +0 -47
- package/schema.graphql +0 -3646
- package/server/constants/error-code.js +0 -1
- package/server/controllers/index.js +0 -1
- package/server/errors/license-error.js +0 -1
- package/server/index.js +0 -8
- package/server/middlewares/index.js +0 -19
- package/server/migrations/index.js +0 -12
- package/server/routes.js +0 -1
- package/server/service/boxtype/boxtype-mutation.js +0 -1
- package/server/service/boxtype/boxtype-query.js +0 -1
- package/server/service/boxtype/boxtype-type.js +0 -1
- package/server/service/boxtype/boxtype.js +0 -1
- package/server/service/boxtype/index.js +0 -9
- package/server/service/tool-entity/create-menu.js +0 -1
- package/server/service/tool-entity/create-service.js +0 -1
- package/server/service/tool-secret/index.js +0 -6
- package/server/service/tool-secret/tool-permission.js +0 -1
- package/server/service/tool-secret/tool-resolver.js +0 -1
- package/translations/ja.json +0 -85
- /package/{server → dist-server}/service/tool-entity/index.js +0 -0
|
@@ -1,4 +1,118 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { html } from 'lit-element'
|
|
2
|
+
|
|
3
|
+
import { MetaApi } from '@things-factory/meta-ui/client/utils/meta-api'
|
|
4
|
+
import { TermsUtil } from '@things-factory/meta-ui/client/utils/terms-util'
|
|
5
|
+
|
|
6
|
+
export const EtcConfigTabMixin = (baseElement) => class extends baseElement {
|
|
7
|
+
setEtcConfigTabValues(data) {
|
|
8
|
+
let id = 1;
|
|
9
|
+
let convData = Object.keys(data || {}).map(x=>{
|
|
10
|
+
let retData = {};
|
|
11
|
+
|
|
12
|
+
retData.id = id * 100;
|
|
13
|
+
retData.key = x;
|
|
14
|
+
retData.value = data[x];
|
|
15
|
+
|
|
16
|
+
id = id + 1;
|
|
17
|
+
|
|
18
|
+
return retData;
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
this.viewEtcData = convData || [];
|
|
22
|
+
this.etcTabGrist?.fetch();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
getEtcConfigTabValues() {
|
|
26
|
+
// 기본 return object
|
|
27
|
+
let retObject = {
|
|
28
|
+
etc: {}
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// grid 에서 데이터 가져오기
|
|
32
|
+
let gridValue = this.getElementValueById('etc-tab-grid');
|
|
33
|
+
|
|
34
|
+
// rank 로 정렬
|
|
35
|
+
gridValue?.forEach(x => {
|
|
36
|
+
var {
|
|
37
|
+
key = undefined,
|
|
38
|
+
value = undefined
|
|
39
|
+
} = x;
|
|
40
|
+
|
|
41
|
+
if (!key) return;
|
|
42
|
+
if (!value) return;
|
|
43
|
+
|
|
44
|
+
retObject.etc[key] = value;
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
return retObject;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
renderEtcConfigTab() {
|
|
51
|
+
return html`
|
|
2
52
|
<ox-grist auto-fetch id="etc-tab-grid" .config=${this.etcTabGridConfig} .mode='GRID'
|
|
3
53
|
.fetchHandler=${this.fetchEtcTabHandler.bind(this)}>
|
|
4
|
-
</ox-grist>`
|
|
54
|
+
</ox-grist>`
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
get etcTabGrist() {
|
|
58
|
+
return this.shadowRoot.querySelector('#etc-tab-grid')
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
async fetchEtcTabHandler() {
|
|
62
|
+
return {
|
|
63
|
+
total: 0,
|
|
64
|
+
records: this.viewEtcData || []
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
async setEtcConfigTabConfig() {
|
|
69
|
+
// 그리드 설정
|
|
70
|
+
this.etcTabGridConfig = {
|
|
71
|
+
rows: MetaApi.getGristSelectableConfig(true),
|
|
72
|
+
pagination: { infinite: true },
|
|
73
|
+
appendable: true,
|
|
74
|
+
columns: [
|
|
75
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
76
|
+
{
|
|
77
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
78
|
+
handlers: {
|
|
79
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
80
|
+
if (record.id) {
|
|
81
|
+
this.deleteRow(this.etcTabGrist, record);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
type: 'string',
|
|
88
|
+
name: 'id',
|
|
89
|
+
hidden: true
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
type: 'string',
|
|
93
|
+
name: 'key',
|
|
94
|
+
header: TermsUtil.tLabel('key'),
|
|
95
|
+
sortable: false,
|
|
96
|
+
width: 225,
|
|
97
|
+
record: {
|
|
98
|
+
align: 'left',
|
|
99
|
+
editable: true,
|
|
100
|
+
mandatory: true
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
type: 'string',
|
|
105
|
+
name: 'value',
|
|
106
|
+
header: TermsUtil.tLabel('value'),
|
|
107
|
+
sortable: false,
|
|
108
|
+
width: 945,
|
|
109
|
+
record: {
|
|
110
|
+
align: 'left',
|
|
111
|
+
editable: true,
|
|
112
|
+
mandatory: true
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
@@ -1,4 +1,166 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { html } from 'lit-element'
|
|
2
|
+
|
|
3
|
+
import { MetaApi } from '@things-factory/meta-ui/client/utils/meta-api'
|
|
4
|
+
import { TermsUtil } from '@things-factory/meta-ui/client/utils/terms-util'
|
|
5
|
+
|
|
6
|
+
export const FormConfigTabMixin = (baseElement) => class extends baseElement {
|
|
7
|
+
setFormConfigTabValues(data) {
|
|
8
|
+
let convData = data?.map((column, index) => {
|
|
9
|
+
let rank = index + 1;
|
|
10
|
+
let retData = {};
|
|
11
|
+
|
|
12
|
+
retData.rank = rank * 10;
|
|
13
|
+
retData.id = rank;
|
|
14
|
+
retData.category = column.category;
|
|
15
|
+
retData.display = column.display;
|
|
16
|
+
retData.column = column.column;
|
|
17
|
+
retData.column_list = column.column_list.join(",");
|
|
18
|
+
|
|
19
|
+
return retData;
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
this.viewFormData = convData || [];
|
|
23
|
+
this.formTabGrist?.fetch();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
getFormConfigTabValues() {
|
|
27
|
+
// 기본 return object
|
|
28
|
+
let retObject = {
|
|
29
|
+
form: []
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
// grid 에서 데이터 가져오기
|
|
33
|
+
let gridValue = this.getElementValueById('form-tab-grid');
|
|
34
|
+
|
|
35
|
+
// rank 로 정렬
|
|
36
|
+
this.sortRecordByRank(gridValue)?.forEach(x => {
|
|
37
|
+
var {
|
|
38
|
+
category = undefined,
|
|
39
|
+
display = undefined,
|
|
40
|
+
column = 1,
|
|
41
|
+
column_list = undefined
|
|
42
|
+
} = x;
|
|
43
|
+
|
|
44
|
+
if (!category) return;
|
|
45
|
+
if (!column_list) return;
|
|
46
|
+
if (!display) display = category;
|
|
47
|
+
column_list = column_list.split(",");
|
|
48
|
+
|
|
49
|
+
retObject.form.push({
|
|
50
|
+
category: category,
|
|
51
|
+
display: display,
|
|
52
|
+
column: column,
|
|
53
|
+
column_list: column_list
|
|
54
|
+
});
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return retObject;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
renderFormConfigTab() {
|
|
63
|
+
return html`
|
|
2
64
|
<ox-grist auto-fetch id="form-tab-grid" .config=${this.formTabGridConfig} .mode='GRID'
|
|
3
65
|
.fetchHandler=${this.fetchFormTabHandler.bind(this)}>
|
|
4
|
-
</ox-grist>`
|
|
66
|
+
</ox-grist>`
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get formTabGrist() {
|
|
70
|
+
return this.shadowRoot.querySelector('#form-tab-grid')
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
async fetchFormTabHandler() {
|
|
74
|
+
return {
|
|
75
|
+
total: 0,
|
|
76
|
+
records: this.viewFormData || []
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async setFormConfigTabConfig() {
|
|
81
|
+
// 그리드 설정
|
|
82
|
+
this.formTabGridConfig = {
|
|
83
|
+
rows: MetaApi.getGristSelectableConfig(true),
|
|
84
|
+
pagination: { infinite: true },
|
|
85
|
+
sorters: [{ name: 'rank', desc: false }],
|
|
86
|
+
appendable: true,
|
|
87
|
+
columns: [
|
|
88
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
89
|
+
{
|
|
90
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
91
|
+
handlers: {
|
|
92
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
93
|
+
if (record.id) {
|
|
94
|
+
this.deleteRow(this.formTabGrist, record);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
},
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
type: 'string',
|
|
101
|
+
name: 'id',
|
|
102
|
+
hidden: true
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
type: 'integer',
|
|
106
|
+
name: 'rank',
|
|
107
|
+
header: TermsUtil.tLabel('rank'),
|
|
108
|
+
sortable: false,
|
|
109
|
+
width: 50,
|
|
110
|
+
record: {
|
|
111
|
+
align: 'right',
|
|
112
|
+
editable: true,
|
|
113
|
+
mandatory: true
|
|
114
|
+
}
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
type: 'string',
|
|
118
|
+
name: 'category',
|
|
119
|
+
header: TermsUtil.tLabel('category'),
|
|
120
|
+
sortable: false,
|
|
121
|
+
width: 155,
|
|
122
|
+
record: {
|
|
123
|
+
align: 'left',
|
|
124
|
+
editable: true,
|
|
125
|
+
mandatory: true
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
type: 'string',
|
|
130
|
+
name: 'display',
|
|
131
|
+
header: TermsUtil.tLabel('display'),
|
|
132
|
+
sortable: false,
|
|
133
|
+
width: 155,
|
|
134
|
+
record: {
|
|
135
|
+
align: 'left',
|
|
136
|
+
editable: true,
|
|
137
|
+
mandatory: true
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
type: 'integer',
|
|
142
|
+
name: 'column',
|
|
143
|
+
header: TermsUtil.tLabel('column_cnt'),
|
|
144
|
+
sortable: true,
|
|
145
|
+
width: 65,
|
|
146
|
+
record: {
|
|
147
|
+
align: 'right',
|
|
148
|
+
editable: true
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
type: 'string',
|
|
153
|
+
name: 'column_list',
|
|
154
|
+
header: TermsUtil.tLabel('grid_column_list'),
|
|
155
|
+
sortable: false,
|
|
156
|
+
width: 735,
|
|
157
|
+
record: {
|
|
158
|
+
align: 'left',
|
|
159
|
+
editable: true,
|
|
160
|
+
mandatory: true
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
}
|
|
@@ -1,29 +1,277 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { html } from 'lit-element'
|
|
2
|
+
|
|
3
|
+
import { TermsUtil } from '@things-factory/meta-ui/client/utils/terms-util'
|
|
4
|
+
import { MetaApi } from '@things-factory/meta-ui/client/utils/meta-api'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export const GraphQlConfigTabMixin = (baseElement) => class extends baseElement {
|
|
8
|
+
|
|
9
|
+
setGraphqlConfigTabValues(data) {
|
|
10
|
+
// 1. 조회 데이터 설정
|
|
11
|
+
if (data) {
|
|
12
|
+
var graphQl = {
|
|
13
|
+
query: data.query || {},
|
|
14
|
+
multiple: data.mutation?.multiple || {},
|
|
15
|
+
delete: data.mutation?.delete || {}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
this.viewGraphqlData = {
|
|
19
|
+
query_list: graphQl.query.list_func || '',
|
|
20
|
+
query_find: graphQl.query.find_one_func || '',
|
|
21
|
+
query_parent_id: graphQl.query.parent_id || '',
|
|
22
|
+
after_set_fields_data: graphQl.query.after_set_fields || [],
|
|
23
|
+
mutation_multiple: graphQl.multiple.func || '',
|
|
24
|
+
mutation_multiple_type: graphQl.multiple.type || '',
|
|
25
|
+
mutation_multiple_parent_id: graphQl.multiple.parent_id || '',
|
|
26
|
+
skip_fields_data: graphQl.multiple.skip_fields || [],
|
|
27
|
+
mutation_delete: graphQl.delete.func || ''
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
let idx = 1;
|
|
31
|
+
this.viewGraphqlData.after_set_fields_data
|
|
32
|
+
= Object.keys(this.viewGraphqlData.after_set_fields_data).map(key => {
|
|
33
|
+
return {
|
|
34
|
+
id: idx++,
|
|
35
|
+
set_field: key,
|
|
36
|
+
get_field: this.viewGraphqlData.after_set_fields_data[key]
|
|
37
|
+
};
|
|
38
|
+
})
|
|
39
|
+
|
|
40
|
+
this.viewGraphqlData.skip_fields_data
|
|
41
|
+
= this.viewGraphqlData.skip_fields_data.map(x => {
|
|
42
|
+
return {
|
|
43
|
+
id: idx++,
|
|
44
|
+
except_field: x
|
|
45
|
+
};
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
this.graphqlTabAfterSetFieldGrist?.fetch();
|
|
50
|
+
this.graphqlTabSkipFieldGrist?.fetch();
|
|
51
|
+
} else {
|
|
52
|
+
this.setGraphqlConfigTabDefaultValues();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
getGraphqlConfigTabValues() {
|
|
58
|
+
let valueSet = {};
|
|
59
|
+
|
|
60
|
+
// 설정 데이터
|
|
61
|
+
let query_list = this.getElementValueById('query_list');
|
|
62
|
+
let query_find = this.getElementValueById('query_find');
|
|
63
|
+
let mutation_multiple = this.getElementValueById('mutation_multiple');
|
|
64
|
+
let mutation_multiple_type = this.getElementValueById('mutation_multiple_type');
|
|
65
|
+
let mutation_delete = this.getElementValueById('mutation_delete');
|
|
66
|
+
let query_parent_id = this.getElementValueById('query_parent_id');
|
|
67
|
+
let mutation_multiple_parent_id = this.getElementValueById('mutation_multiple_parent_id');
|
|
68
|
+
let after_set_fields_data = this.getElementValueById('after-set-fields-grist');
|
|
69
|
+
let skip_fields_data = this.getElementValueById('skip-fields-grist');
|
|
70
|
+
|
|
71
|
+
if (query_list) valueSet.query_list = query_list;
|
|
72
|
+
if (query_find) valueSet.query_find = query_find;
|
|
73
|
+
if (query_parent_id) valueSet.query_parent_id = query_parent_id;
|
|
74
|
+
if (after_set_fields_data) valueSet.query_after_set_fields_data = after_set_fields_data;
|
|
75
|
+
|
|
76
|
+
if (mutation_multiple) valueSet.mutation_multiple = mutation_multiple;
|
|
77
|
+
if (mutation_multiple_type) valueSet.mutation_multiple_type = mutation_multiple_type;
|
|
78
|
+
if (mutation_multiple_parent_id) valueSet.mutation_multiple_parent_id = mutation_multiple_parent_id;
|
|
79
|
+
if (skip_fields_data) valueSet.mutation_multiple_skip_fields_data = skip_fields_data;
|
|
80
|
+
|
|
81
|
+
if (mutation_delete) valueSet.mutation_delete = mutation_delete;
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
// 리턴 오브젝트로 가공
|
|
85
|
+
let retObject = {
|
|
86
|
+
gql: {}
|
|
87
|
+
};
|
|
88
|
+
let valueKeys = Object.keys(valueSet);
|
|
89
|
+
|
|
90
|
+
// query 가 포함 되어 있으면
|
|
91
|
+
if (valueKeys.filter(x => x.startsWith('query'))) {
|
|
92
|
+
retObject.gql.query = {};
|
|
93
|
+
|
|
94
|
+
if (valueSet.query_list) retObject.gql.query.list_func = valueSet.query_list;
|
|
95
|
+
if (valueSet.query_find) retObject.gql.query.find_one_func = valueSet.query_find;
|
|
96
|
+
if (valueSet.query_parent_id) retObject.gql.query.parent_id = valueSet.query_parent_id;
|
|
97
|
+
if (valueSet.query_after_set_fields_data) {
|
|
98
|
+
retObject.gql.query.after_set_fields = {};
|
|
99
|
+
|
|
100
|
+
valueSet.query_after_set_fields_data.forEach(x => {
|
|
101
|
+
retObject.gql.query.after_set_fields[x.set_field] = x.get_field;
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
// mutation 이 포함되어 있으면
|
|
107
|
+
if (valueKeys.filter(x => x.startsWith('mutation'))) {
|
|
108
|
+
retObject.gql.mutation = {};
|
|
109
|
+
|
|
110
|
+
// multiple 이 포함 되어 있으면
|
|
111
|
+
if (valueKeys.filter(x => x.startsWith('mutation_multiple'))) {
|
|
112
|
+
retObject.gql.mutation.multiple = {};
|
|
113
|
+
|
|
114
|
+
if (valueSet.mutation_multiple) retObject.gql.mutation.multiple.func = valueSet.mutation_multiple;
|
|
115
|
+
if (valueSet.mutation_multiple_type) retObject.gql.mutation.multiple.type = valueSet.mutation_multiple_type;
|
|
116
|
+
if (valueSet.mutation_multiple_parent_id) retObject.gql.mutation.multiple.parent_id = valueSet.mutation_multiple_parent_id;
|
|
117
|
+
if (valueSet.mutation_multiple_skip_fields_data) retObject.gql.mutation.multiple.skip_fields = valueSet.mutation_multiple_skip_fields_data.map(x => {
|
|
118
|
+
return x.except_field;
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
// delete 가 포함되어 있으면
|
|
123
|
+
if (valueKeys.filter(x => x.startsWith('mutation_delete'))) {
|
|
124
|
+
retObject.gql.mutation.delete = {};
|
|
125
|
+
|
|
126
|
+
if (valueSet.mutation_delete) retObject.gql.mutation.delete.func = valueSet.mutation_delete;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
return retObject;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
get graphqlTabAfterSetFieldGrist() {
|
|
134
|
+
return this.shadowRoot.querySelector('#after-set-fields-grist')
|
|
135
|
+
}
|
|
136
|
+
get graphqlTabSkipFieldGrist() {
|
|
137
|
+
return this.shadowRoot.querySelector('#skip-fields-grist')
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
setGraphqlConfigTabConfig() {
|
|
142
|
+
|
|
143
|
+
// 1. 조회후 필드 변경 그리드 설정
|
|
144
|
+
this.afterSetFieldsConfig = {
|
|
145
|
+
rows: MetaApi.getGristSelectableConfig(false),
|
|
146
|
+
pagination: { infinite: true },
|
|
147
|
+
appendable: true,
|
|
148
|
+
columns: [
|
|
149
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
150
|
+
{
|
|
151
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
152
|
+
handlers: {
|
|
153
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
154
|
+
if (record.id) {
|
|
155
|
+
this.deleteRow(this.graphqlTabAfterSetFieldGrist, record);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
type: 'string',
|
|
162
|
+
name: 'id',
|
|
163
|
+
hidden: true
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
type: 'string',
|
|
167
|
+
name: 'set_field',
|
|
168
|
+
header: TermsUtil.tLabel('set_field_name'),
|
|
169
|
+
record: {
|
|
170
|
+
align: 'left',
|
|
171
|
+
editable: true,
|
|
172
|
+
mandatory: true
|
|
173
|
+
},
|
|
174
|
+
width: 150
|
|
175
|
+
},
|
|
176
|
+
{
|
|
177
|
+
type: 'string',
|
|
178
|
+
name: 'get_field',
|
|
179
|
+
header: TermsUtil.tLabel('get_field_name'),
|
|
180
|
+
record: {
|
|
181
|
+
align: 'left',
|
|
182
|
+
editable: true,
|
|
183
|
+
mandatory: true
|
|
184
|
+
},
|
|
185
|
+
width: 150
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
// 1. mutation 시 제외 필드 설정
|
|
191
|
+
this.skipFieldsConfig = {
|
|
192
|
+
rows: MetaApi.getGristSelectableConfig(false),
|
|
193
|
+
pagination: { infinite: true },
|
|
194
|
+
appendable: true,
|
|
195
|
+
columns: [
|
|
196
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
197
|
+
{
|
|
198
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
199
|
+
handlers: {
|
|
200
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
201
|
+
if (record.id) {
|
|
202
|
+
this.deleteRow(this.graphqlTabSkipFieldGrist, record);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
type: 'string',
|
|
209
|
+
name: 'id',
|
|
210
|
+
hidden: true
|
|
211
|
+
},
|
|
212
|
+
{
|
|
213
|
+
type: 'string',
|
|
214
|
+
name: 'except_field',
|
|
215
|
+
header: TermsUtil.tLabel('field_name'),
|
|
216
|
+
record: {
|
|
217
|
+
align: 'left',
|
|
218
|
+
editable: true,
|
|
219
|
+
mandatory: true
|
|
220
|
+
},
|
|
221
|
+
width: 250
|
|
222
|
+
}
|
|
223
|
+
]
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
setGraphqlConfigTabDefaultValues() {
|
|
229
|
+
if (!this.viewGraphqlData) {
|
|
230
|
+
this.viewGraphqlData = {
|
|
231
|
+
query_list: '',
|
|
232
|
+
query_find: '',
|
|
233
|
+
mutation_multiple: '',
|
|
234
|
+
mutation_multiple_type: '',
|
|
235
|
+
mutation_delete: '',
|
|
236
|
+
query_parent_id: '',
|
|
237
|
+
mutation_multiple_parent_id: '',
|
|
238
|
+
after_set_fields_data: [],
|
|
239
|
+
skip_fields_data: []
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
// 화면
|
|
246
|
+
renderGraphqlConfigTab() {
|
|
247
|
+
this.setGraphqlConfigTabDefaultValues();
|
|
248
|
+
|
|
249
|
+
let renderHtml = html`
|
|
2
250
|
<div field-2column>
|
|
3
251
|
<div field>
|
|
4
|
-
<label>${TermsUtil.tLabel(
|
|
252
|
+
<label>${TermsUtil.tLabel('query_list_function')}
|
|
5
253
|
<input id="query_list" name="query_list" type="text" value=${this.viewGraphqlData.query_list} />
|
|
6
254
|
</label>
|
|
7
255
|
</div>
|
|
8
256
|
<div field>
|
|
9
|
-
<label>${TermsUtil.tLabel(
|
|
257
|
+
<label>${TermsUtil.tLabel('query_find_function')}
|
|
10
258
|
<input id="query_find" name="query_find" type="text" value=${this.viewGraphqlData.query_find} />
|
|
11
259
|
</label>
|
|
12
260
|
</div>
|
|
13
261
|
<div field>
|
|
14
|
-
<label>${TermsUtil.tLabel(
|
|
262
|
+
<label>${TermsUtil.tLabel('multiple_update_function')}
|
|
15
263
|
<input id="mutation_multiple" name="mutation_multiple" type="text"
|
|
16
264
|
value=${this.viewGraphqlData.mutation_multiple} />
|
|
17
265
|
</label>
|
|
18
266
|
</div>
|
|
19
267
|
<div field>
|
|
20
|
-
<label>${TermsUtil.tLabel(
|
|
268
|
+
<label>${TermsUtil.tLabel('multiple_update_type')}
|
|
21
269
|
<input id="mutation_multiple_type" name="mutation_multiple_type" type="text"
|
|
22
270
|
value=${this.viewGraphqlData.mutation_multiple_type} />
|
|
23
271
|
</label>
|
|
24
272
|
</div>
|
|
25
273
|
<div field>
|
|
26
|
-
<label>${TermsUtil.tLabel(
|
|
274
|
+
<label>${TermsUtil.tLabel('delete_function')}
|
|
27
275
|
<input id="mutation_delete" name="mutation_delete" type="text" value=${this.viewGraphqlData.mutation_delete} />
|
|
28
276
|
</label>
|
|
29
277
|
</div>
|
|
@@ -31,16 +279,16 @@ import{html}from"lit-element";import{TermsUtil}from"@things-factory/meta-ui/clie
|
|
|
31
279
|
</div>
|
|
32
280
|
<div field>
|
|
33
281
|
<h2>
|
|
34
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
282
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('query_option')}
|
|
35
283
|
</h2>
|
|
36
284
|
<div subfield>
|
|
37
|
-
<label>${TermsUtil.tLabel(
|
|
285
|
+
<label>${TermsUtil.tLabel('parent_id')}
|
|
38
286
|
<input id="query_parent_id" name="query_parent_id" type="text" value=${this.viewGraphqlData.query_parent_id} />
|
|
39
287
|
</label>
|
|
40
288
|
|
|
41
|
-
<label>${TermsUtil.tLabel(
|
|
289
|
+
<label>${TermsUtil.tLabel('after_set_fields')}
|
|
42
290
|
<div style="display:flex;height:200px">
|
|
43
|
-
<ox-grist id="after-set-fields-grist" .config=${this.afterSetFieldsConfig} .mode=${
|
|
291
|
+
<ox-grist id="after-set-fields-grist" .config=${this.afterSetFieldsConfig} .mode=${'GRID'} auto-fetch
|
|
44
292
|
.fetchHandler=${this.fetchAfterSetFields.bind(this)}></ox-grist>
|
|
45
293
|
</div>
|
|
46
294
|
</label>
|
|
@@ -48,17 +296,17 @@ import{html}from"lit-element";import{TermsUtil}from"@things-factory/meta-ui/clie
|
|
|
48
296
|
</div>
|
|
49
297
|
<div field>
|
|
50
298
|
<h2>
|
|
51
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
299
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('multiple_update_option')}
|
|
52
300
|
</h2>
|
|
53
301
|
<div subfield>
|
|
54
|
-
<label>${TermsUtil.tLabel(
|
|
302
|
+
<label>${TermsUtil.tLabel('parent_id')}
|
|
55
303
|
<input id="mutation_multiple_parent_id" name="mutation_multiple_parent_id" type="text"
|
|
56
304
|
value=${this.viewGraphqlData.mutation_multiple_parent_id} />
|
|
57
305
|
</label>
|
|
58
306
|
|
|
59
|
-
<label>${TermsUtil.tLabel(
|
|
307
|
+
<label>${TermsUtil.tLabel('skip_fields')}
|
|
60
308
|
<div style="display:flex;height:200px">
|
|
61
|
-
<ox-grist id="skip-fields-grist" .config=${this.skipFieldsConfig} .mode=${
|
|
309
|
+
<ox-grist id="skip-fields-grist" .config=${this.skipFieldsConfig} .mode=${'GRID'} auto-fetch
|
|
62
310
|
.fetchHandler=${this.fetchSkipFields.bind(this)}></ox-grist>
|
|
63
311
|
</div>
|
|
64
312
|
</label>
|
|
@@ -66,4 +314,22 @@ import{html}from"lit-element";import{TermsUtil}from"@things-factory/meta-ui/clie
|
|
|
66
314
|
</div>
|
|
67
315
|
</div>
|
|
68
316
|
|
|
69
|
-
`
|
|
317
|
+
`
|
|
318
|
+
return renderHtml;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
async fetchAfterSetFields() {
|
|
323
|
+
return {
|
|
324
|
+
records: this.viewGraphqlData.after_set_fields_data,
|
|
325
|
+
total: 0
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
async fetchSkipFields() {
|
|
330
|
+
return {
|
|
331
|
+
records: this.viewGraphqlData.skip_fields_data,
|
|
332
|
+
total: 0
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|