@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,102 +1,264 @@
|
|
|
1
|
-
import{html}from
|
|
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 GridConfigTabMixin = (baseElement) => class extends baseElement {
|
|
8
|
+
|
|
9
|
+
setGridConfigTabValues(data) {
|
|
10
|
+
// 1. 기존 데이터가 있으면 기존 데이터 사용
|
|
11
|
+
if (data) {
|
|
12
|
+
let {
|
|
13
|
+
mobile_mode = '',
|
|
14
|
+
desk_mode = '',
|
|
15
|
+
pages = [],
|
|
16
|
+
use_row_checker = true,
|
|
17
|
+
view_mode = []
|
|
18
|
+
} = data.option || {};
|
|
19
|
+
|
|
20
|
+
let multiple_select = (data.row || { multiple_select : false }).multiple_select;
|
|
21
|
+
let pageCode = (function() {
|
|
22
|
+
if(pages == 'unlimited') {
|
|
23
|
+
return 'grid_term_unlimited';
|
|
24
|
+
} else if(pages.length == 0) {
|
|
25
|
+
return '';
|
|
26
|
+
} else if (pages[0] == 20) {
|
|
27
|
+
return 'grid_term_default'
|
|
28
|
+
} else {
|
|
29
|
+
return `grid_term_${pages[0]}`
|
|
30
|
+
}
|
|
31
|
+
}())
|
|
32
|
+
|
|
33
|
+
this.viewGridData = {
|
|
34
|
+
mobile_mode: mobile_mode,
|
|
35
|
+
desk_mode: desk_mode,
|
|
36
|
+
use_row_checker: use_row_checker,
|
|
37
|
+
pages: pageCode,
|
|
38
|
+
view_mode: view_mode,
|
|
39
|
+
multiple_select: multiple_select,
|
|
40
|
+
use_filter_form: data.use_filter_form,
|
|
41
|
+
grid_refresh_when_page_activated: data.grid_refresh_when_page_activated
|
|
42
|
+
}
|
|
43
|
+
} else {
|
|
44
|
+
// 3. 기존 데이터가 없으면 기본값 설정
|
|
45
|
+
this.setGridConfigTabDetaultValues();
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
getGridConfigTabValues() {
|
|
50
|
+
// 그리드 기본 옵션
|
|
51
|
+
let retObject = {
|
|
52
|
+
grid: {
|
|
53
|
+
option: {},
|
|
54
|
+
row: {
|
|
55
|
+
click: 'select-row-toggle'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
// input 객체에서 값 가져오기
|
|
61
|
+
let grid_row_check_use = this.getElementValueById('grid_row_check_use');
|
|
62
|
+
let grid_multi_select = this.getElementValueById('grid_multi_select');
|
|
63
|
+
let grid_desk_view = this.getElementValueById('grid_desk_view');
|
|
64
|
+
let grid_mobile_view = this.getElementValueById('grid_mobile_view');
|
|
65
|
+
|
|
66
|
+
let grid_use_filter = this.getElementValueById('grid_use_filter');
|
|
67
|
+
let grid_refresh_when_page_activated = this.getElementValueById('grid_refresh_when_page_activated');
|
|
68
|
+
|
|
69
|
+
let grid_pagination = this.getElementValueById('grid_pagination');
|
|
70
|
+
|
|
71
|
+
let grid_view_use = this.getElementValueById('grid_view_use');
|
|
72
|
+
let list_view_use = this.getElementValueById('list_view_use');
|
|
73
|
+
let card_view_use = this.getElementValueById('card_view_use');
|
|
74
|
+
|
|
75
|
+
// 옵션 설정
|
|
76
|
+
retObject.grid.use_filter_form = grid_use_filter == 'true' ? true : false;
|
|
77
|
+
retObject.grid.grid_refresh_when_page_activated = grid_refresh_when_page_activated == 'true' ? true : false;
|
|
78
|
+
retObject.grid.row.multiple_select = grid_multi_select == 'true' ? true : false;
|
|
79
|
+
|
|
80
|
+
retObject.grid.option.use_row_checker = grid_row_check_use == 'true' ? true : false;
|
|
81
|
+
retObject.grid.option.mobile_mode = grid_mobile_view;
|
|
82
|
+
retObject.grid.option.desk_mode = grid_desk_view;
|
|
83
|
+
|
|
84
|
+
// 페이지 네이션 설정 변환
|
|
85
|
+
if(grid_pagination == 'grid_term_default') {
|
|
86
|
+
retObject.grid.option.pages = [20, 30, 50, 100];
|
|
87
|
+
} else if (grid_pagination == 'grid_term_50') {
|
|
88
|
+
retObject.grid.option.pages = [50, 100, 500, 1000];
|
|
89
|
+
} else if (grid_pagination == 'grid_term_100') {
|
|
90
|
+
retObject.grid.option.pages = [100, 500, 1000, 5000];
|
|
91
|
+
} else if (grid_pagination == 'grid_term_1000') {
|
|
92
|
+
retObject.grid.option.pages = [1000, 5000, 10000, 50000, 100000];
|
|
93
|
+
} else if (grid_pagination == 'grid_term_unlimited') {
|
|
94
|
+
retObject.grid.option.pages = 'unlimited';
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// 그리드 지원 뷰 옵션 설정
|
|
98
|
+
retObject.grid.option.view_mode = [];
|
|
99
|
+
if(grid_view_use == 'true') retObject.grid.option.view_mode.push('GRID');
|
|
100
|
+
if(list_view_use == 'true') retObject.grid.option.view_mode.push('LIST');
|
|
101
|
+
if(card_view_use == 'true') retObject.grid.option.view_mode.push('CARD');
|
|
102
|
+
|
|
103
|
+
return retObject;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* lifecycle
|
|
108
|
+
*/
|
|
109
|
+
async setGridConfigTabConfig() {
|
|
110
|
+
// 1. 코드 조회
|
|
111
|
+
let gridPageOptions = await MetaApi.codeItems('GRID_PAGE_OPTIONS');
|
|
112
|
+
let gridViewModes = await MetaApi.codeItems('GRID_VIEW_MODE');
|
|
113
|
+
|
|
114
|
+
this.gridViewModes = gridViewModes;
|
|
115
|
+
this.gridPageOptions = gridPageOptions;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 기본 값 설정
|
|
120
|
+
*/
|
|
121
|
+
setGridConfigTabDetaultValues() {
|
|
122
|
+
if (!this.viewGridData) {
|
|
123
|
+
this.viewGridData = {
|
|
124
|
+
mobile_mode: this.gridViewModes ? this.gridViewModes[1] : 'LIST',
|
|
125
|
+
desk_mode: this.gridViewModes ? this.gridViewModes[0] : 'GRID',
|
|
126
|
+
use_row_checker: true,
|
|
127
|
+
pages: 'grid_term_default',
|
|
128
|
+
view_mode: [...(this.gridViewModes ? this.gridViewModes : ['GRID', 'LIST', 'CARD'])],
|
|
129
|
+
multiple_select: true,
|
|
130
|
+
use_filter_form: true,
|
|
131
|
+
grid_refresh_when_page_activated: false
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
// 화면
|
|
138
|
+
renderGridConfigTab() {
|
|
139
|
+
this.setGridConfigTabDetaultValues();
|
|
140
|
+
|
|
141
|
+
let renderHtml = html`
|
|
2
142
|
<div field-2column>
|
|
3
143
|
<div field>
|
|
4
144
|
<h2>
|
|
5
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
145
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_use_row_check')}
|
|
6
146
|
</h2>
|
|
7
147
|
<label>
|
|
8
148
|
<span>
|
|
9
149
|
<input type="radio" id="grid_row_check_use" name="grid_row_check_use" value="true"
|
|
10
|
-
?checked=${this.viewGridData.use_row_checker}>${TermsUtil.tLabel(
|
|
150
|
+
?checked=${this.viewGridData.use_row_checker}>${TermsUtil.tLabel('use')}</input>
|
|
11
151
|
<input type="radio" id="grid_row_check_use" name="grid_row_check_use" value="false"
|
|
12
|
-
?checked=${!this.viewGridData.use_row_checker}>${TermsUtil.tLabel(
|
|
152
|
+
?checked=${!this.viewGridData.use_row_checker}>${TermsUtil.tLabel('unuse')}</input>
|
|
13
153
|
</span>
|
|
14
154
|
</label>
|
|
15
155
|
</div>
|
|
16
156
|
<div field>
|
|
17
157
|
<h2>
|
|
18
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
158
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_support_multi_select')}
|
|
19
159
|
</h2>
|
|
20
160
|
<label>
|
|
21
161
|
<span>
|
|
22
162
|
<input type="radio" id="grid_multi_select" name="grid_multi_select" value="true"
|
|
23
|
-
?checked=${this.viewGridData.multiple_select}>${TermsUtil.tLabel(
|
|
163
|
+
?checked=${this.viewGridData.multiple_select}>${TermsUtil.tLabel('support')}</input>
|
|
24
164
|
<input type="radio" id="grid_multi_select" name="grid_multi_select" value="false"
|
|
25
|
-
?checked=${!this.viewGridData.multiple_select}>${TermsUtil.tLabel(
|
|
165
|
+
?checked=${!this.viewGridData.multiple_select}>${TermsUtil.tLabel('unsupport')}</input>
|
|
26
166
|
</span>
|
|
27
167
|
</label>
|
|
28
168
|
</div>
|
|
29
169
|
<div field>
|
|
30
170
|
<h2>
|
|
31
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
171
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_use_filter')}
|
|
32
172
|
</h2>
|
|
33
173
|
<label>
|
|
34
174
|
<span>
|
|
35
175
|
<input type="radio" id="grid_use_filter" name="grid_use_filter" value="true"
|
|
36
|
-
?checked=${this.viewGridData.use_filter_form}>${TermsUtil.tLabel(
|
|
176
|
+
?checked=${this.viewGridData.use_filter_form}>${TermsUtil.tLabel('use')}</input>
|
|
37
177
|
<input type="radio" id="grid_use_filter" name="grid_use_filter" value="false"
|
|
38
|
-
?checked=${!this.viewGridData.use_filter_form}>${TermsUtil.tLabel(
|
|
178
|
+
?checked=${!this.viewGridData.use_filter_form}>${TermsUtil.tLabel('unuse')}</input>
|
|
39
179
|
</span>
|
|
40
180
|
</label>
|
|
41
181
|
</div>
|
|
42
182
|
<div field>
|
|
43
183
|
<h2>
|
|
44
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
184
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_refresh_when_page_activated')}
|
|
45
185
|
</h2>
|
|
46
186
|
<label>
|
|
47
187
|
<span>
|
|
48
188
|
<input type="radio" id="grid_refresh_when_page_activated" name="grid_refresh_when_page_activated" value="true"
|
|
49
|
-
?checked=${this.viewGridData.grid_refresh_when_page_activated}>${TermsUtil.tLabel(
|
|
189
|
+
?checked=${this.viewGridData.grid_refresh_when_page_activated}>${TermsUtil.tLabel('use')}</input>
|
|
50
190
|
<input type="radio" id="grid_refresh_when_page_activated" name="grid_refresh_when_page_activated" value="false"
|
|
51
|
-
?checked=${!this.viewGridData.grid_refresh_when_page_activated}>${TermsUtil.tLabel(
|
|
191
|
+
?checked=${!this.viewGridData.grid_refresh_when_page_activated}>${TermsUtil.tLabel('unuse')}</input>
|
|
52
192
|
</span>
|
|
53
193
|
</label>
|
|
54
194
|
</div>
|
|
55
195
|
<div field>
|
|
56
196
|
<h2>
|
|
57
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
197
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_desk_view')}
|
|
58
198
|
</h2>
|
|
59
199
|
<label>
|
|
60
200
|
<select id="grid_desk_view" name="grid_desk_view">
|
|
61
|
-
${
|
|
201
|
+
${
|
|
202
|
+
this.gridViewModes?.map(x => {
|
|
203
|
+
return html`<option value=${x.name} ?selected=${this.viewGridData.desk_mode == x.name}>${x.description}</option>`
|
|
204
|
+
})
|
|
205
|
+
}
|
|
62
206
|
</select>
|
|
63
207
|
</label>
|
|
64
208
|
</div>
|
|
65
209
|
<div field>
|
|
66
210
|
<h2>
|
|
67
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
211
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_mobile_view')}
|
|
68
212
|
</h2>
|
|
69
213
|
<label>
|
|
70
214
|
<select id="grid_mobile_view" name="grid_mobile_view">
|
|
71
|
-
${
|
|
215
|
+
${
|
|
216
|
+
this.gridViewModes?.map(x => {
|
|
217
|
+
return html`<option value=${x.name} ?selected=${this.viewGridData.mobile_mode == x.name}>${x.description}</option>`
|
|
218
|
+
})
|
|
219
|
+
}
|
|
72
220
|
</select>
|
|
73
221
|
</label>
|
|
74
222
|
</div>
|
|
75
223
|
<div field>
|
|
76
224
|
<h2>
|
|
77
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
225
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_support_view')}
|
|
78
226
|
</h2>
|
|
79
227
|
<label>
|
|
80
|
-
${
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
228
|
+
${
|
|
229
|
+
this.gridViewModes?.map(x => {
|
|
230
|
+
return html`
|
|
231
|
+
<span>${x.name}
|
|
232
|
+
<input type="radio" name=${x.name.toLowerCase() + "_view_use"} id=${x.name.toLowerCase() + "_view_use"} ?checked=${this.viewGridData.view_mode.includes(x.name)} value="true">${TermsUtil.tLabel('use')}</input>
|
|
233
|
+
<input type="radio" name=${x.name.toLowerCase() + "_view_use"} id=${x.name.toLowerCase() + "_view_use"} ?checked=${!this.viewGridData.view_mode.includes(x.name)} value="false">${TermsUtil.tLabel('unuse')}</input>
|
|
84
234
|
</span>
|
|
85
|
-
`
|
|
235
|
+
`
|
|
236
|
+
})
|
|
237
|
+
}
|
|
86
238
|
</label>
|
|
87
239
|
</div>
|
|
88
240
|
<div field>
|
|
89
241
|
<h2>
|
|
90
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
242
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_pagination')}
|
|
91
243
|
</h2>
|
|
92
244
|
<label>
|
|
93
|
-
${
|
|
245
|
+
${
|
|
246
|
+
this.gridPageOptions?.map(x => {
|
|
247
|
+
return html`
|
|
94
248
|
<span>
|
|
95
|
-
<input type="radio" name="grid_pagination" id="grid_pagination" value=${
|
|
249
|
+
<input type="radio" name="grid_pagination" id="grid_pagination" value=${x.name} ?checked=${this.viewGridData.pages==x.name
|
|
250
|
+
}>${TermsUtil.tLabel(x.name)}</input>
|
|
96
251
|
</span>
|
|
97
|
-
`
|
|
252
|
+
`
|
|
253
|
+
})
|
|
254
|
+
}
|
|
98
255
|
</label>
|
|
99
256
|
</div>
|
|
100
257
|
</div>
|
|
101
258
|
</div>
|
|
102
|
-
`
|
|
259
|
+
`
|
|
260
|
+
|
|
261
|
+
return renderHtml;
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
@@ -1,18 +1,307 @@
|
|
|
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 GridEmphasizedConfigTabMixin = (baseElement) => class extends baseElement {
|
|
8
|
+
|
|
9
|
+
setGridEmphasizedConfigTabValues(data) {
|
|
10
|
+
// 1. 조회 데이터 설정
|
|
11
|
+
if (data) {
|
|
12
|
+
this.viewEmphasizedData = {
|
|
13
|
+
rowEmphasizedData: [],
|
|
14
|
+
columnEmphasizedData: [],
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let idx = 1;
|
|
18
|
+
this.viewEmphasizedData.rowEmphasizedData
|
|
19
|
+
= (data.row || []).map(x => {
|
|
20
|
+
return {
|
|
21
|
+
id: idx,
|
|
22
|
+
rank: idx++,
|
|
23
|
+
backgroundColor: x.backgroundColor || '',
|
|
24
|
+
fontColor: x.fontColor || '',
|
|
25
|
+
logic: x.logic || '',
|
|
26
|
+
};
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
idx = 1;
|
|
30
|
+
let columnData = data.column || [];
|
|
31
|
+
Object.keys(columnData).forEach(key => {
|
|
32
|
+
|
|
33
|
+
let columnList = columnData[key] || [];
|
|
34
|
+
let columnIdx = 1;
|
|
35
|
+
|
|
36
|
+
columnList.forEach(x=>{
|
|
37
|
+
this.viewEmphasizedData.columnEmphasizedData.push({
|
|
38
|
+
id: idx++,
|
|
39
|
+
rank: columnIdx++,
|
|
40
|
+
column: key,
|
|
41
|
+
backgroundColor: x.backgroundColor || '',
|
|
42
|
+
fontColor: x.fontColor || '',
|
|
43
|
+
logic: x.logic || '',
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
})
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
this.emphasizedConfigTabColumnEmphasizedGrist?.fetch();
|
|
50
|
+
this.emphasizedConfigTabRowEmphasizedGrist?.fetch();
|
|
51
|
+
} else {
|
|
52
|
+
this.setGridEmphasizedConfigTabDefaultValues();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
getGridEmphasizedConfigTabValues() {
|
|
58
|
+
// 설정 데이터
|
|
59
|
+
let rowGristData = this.getElementValueById('row-emphasized-grist');
|
|
60
|
+
let columnGristData = this.getElementValueById('column-emphasized-grist');
|
|
61
|
+
|
|
62
|
+
let rowEmphasized = [];
|
|
63
|
+
this.sortRecordByRank(rowGristData)?.forEach(x=>{
|
|
64
|
+
rowEmphasized.push({
|
|
65
|
+
backgroundColor: x.backgroundColor,
|
|
66
|
+
fontColor: x.fontColor,
|
|
67
|
+
logic: x.logic
|
|
68
|
+
})
|
|
69
|
+
})
|
|
70
|
+
|
|
71
|
+
let columnEmphasized = {};
|
|
72
|
+
this.sortRecordByRank(columnGristData)?.forEach(x=>{
|
|
73
|
+
if(!columnEmphasized[x.column]){
|
|
74
|
+
columnEmphasized[x.column] = [];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
columnEmphasized[x.column].push({
|
|
78
|
+
backgroundColor: x.backgroundColor,
|
|
79
|
+
fontColor: x.fontColor,
|
|
80
|
+
logic: x.logic
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
|
|
84
|
+
// 리턴 오브젝트로 가공
|
|
85
|
+
let retObject = {
|
|
86
|
+
gridEmphasized: {
|
|
87
|
+
row: rowEmphasized || [],
|
|
88
|
+
column: columnEmphasized || {}
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return retObject;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
get emphasizedConfigTabRowEmphasizedGrist() {
|
|
96
|
+
return this.shadowRoot.querySelector('#row-emphasized-grist')
|
|
97
|
+
}
|
|
98
|
+
get emphasizedConfigTabColumnEmphasizedGrist() {
|
|
99
|
+
return this.shadowRoot.querySelector('#column-emphasized-grist')
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
setGridEmphasizedConfigTabConfig() {
|
|
104
|
+
|
|
105
|
+
// 1. 행 강조 그리드 설정
|
|
106
|
+
this.rowEmphasizedConfig = {
|
|
107
|
+
rows: MetaApi.getGristSelectableConfig(false),
|
|
108
|
+
pagination: { infinite: true },
|
|
109
|
+
appendable: true,
|
|
110
|
+
columns: [
|
|
111
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
112
|
+
{
|
|
113
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
114
|
+
handlers: {
|
|
115
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
116
|
+
if (record.id) {
|
|
117
|
+
this.deleteRow(this.emphasizedConfigTabRowEmphasizedGrist, record);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
type: 'string',
|
|
124
|
+
name: 'id',
|
|
125
|
+
hidden: true
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
type: 'integer',
|
|
129
|
+
name: 'rank',
|
|
130
|
+
header: TermsUtil.tLabel('rank'),
|
|
131
|
+
sortable: false,
|
|
132
|
+
width: 55,
|
|
133
|
+
record: {
|
|
134
|
+
align: 'right',
|
|
135
|
+
editable: true,
|
|
136
|
+
mandatory: true
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
type: 'string',
|
|
141
|
+
name: 'backgroundColor',
|
|
142
|
+
header: TermsUtil.tLabel('background-color'),
|
|
143
|
+
record: {
|
|
144
|
+
align: 'left',
|
|
145
|
+
editable: true,
|
|
146
|
+
mandatory: true
|
|
147
|
+
},
|
|
148
|
+
width: 130
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
type: 'string',
|
|
152
|
+
name: 'fontColor',
|
|
153
|
+
header: TermsUtil.tLabel('font-color'),
|
|
154
|
+
record: {
|
|
155
|
+
align: 'left',
|
|
156
|
+
editable: true,
|
|
157
|
+
mandatory: true
|
|
158
|
+
},
|
|
159
|
+
width: 130
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
type: 'code-input',
|
|
163
|
+
name: 'logic',
|
|
164
|
+
header: TermsUtil.tLabel('logic'),
|
|
165
|
+
record: {
|
|
166
|
+
align: 'left',
|
|
167
|
+
editable: true,
|
|
168
|
+
mandatory: true
|
|
169
|
+
},
|
|
170
|
+
width: 850
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
};
|
|
174
|
+
|
|
175
|
+
// 2. 컬럼 강조 그리드 설정
|
|
176
|
+
this.columnEmphasizedConfig = {
|
|
177
|
+
rows: MetaApi.getGristSelectableConfig(false),
|
|
178
|
+
pagination: { infinite: true },
|
|
179
|
+
appendable: true,
|
|
180
|
+
columns: [
|
|
181
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
182
|
+
{
|
|
183
|
+
type: 'gutter', gutterName: 'button', icon: 'delete',
|
|
184
|
+
handlers: {
|
|
185
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
186
|
+
if (record.id) {
|
|
187
|
+
this.deleteRow(this.emphasizedConfigTabColumnEmphasizedGrist, record);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
},
|
|
192
|
+
{
|
|
193
|
+
type: 'string',
|
|
194
|
+
name: 'id',
|
|
195
|
+
hidden: true
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
type: 'integer',
|
|
199
|
+
name: 'rank',
|
|
200
|
+
header: TermsUtil.tLabel('rank'),
|
|
201
|
+
sortable: false,
|
|
202
|
+
width: 55,
|
|
203
|
+
record: {
|
|
204
|
+
align: 'right',
|
|
205
|
+
editable: true,
|
|
206
|
+
mandatory: true
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
type: 'string',
|
|
211
|
+
name: 'column',
|
|
212
|
+
header: TermsUtil.tLabel('column'),
|
|
213
|
+
record: {
|
|
214
|
+
align: 'left',
|
|
215
|
+
editable: true,
|
|
216
|
+
mandatory: true
|
|
217
|
+
},
|
|
218
|
+
width: 130
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
type: 'string',
|
|
222
|
+
name: 'backgroundColor',
|
|
223
|
+
header: TermsUtil.tLabel('background-color'),
|
|
224
|
+
record: {
|
|
225
|
+
align: 'left',
|
|
226
|
+
editable: true,
|
|
227
|
+
mandatory: true
|
|
228
|
+
},
|
|
229
|
+
width: 130
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
type: 'string',
|
|
233
|
+
name: 'fontColor',
|
|
234
|
+
header: TermsUtil.tLabel('font-color'),
|
|
235
|
+
record: {
|
|
236
|
+
align: 'left',
|
|
237
|
+
editable: true,
|
|
238
|
+
mandatory: true
|
|
239
|
+
},
|
|
240
|
+
width: 130
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
type: 'code-input',
|
|
244
|
+
name: 'logic',
|
|
245
|
+
header: TermsUtil.tLabel('logic'),
|
|
246
|
+
record: {
|
|
247
|
+
align: 'left',
|
|
248
|
+
editable: true,
|
|
249
|
+
mandatory: true
|
|
250
|
+
},
|
|
251
|
+
width: 725
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
setGridEmphasizedConfigTabDefaultValues() {
|
|
259
|
+
if (!this.viewEmphasizedData) {
|
|
260
|
+
this.viewEmphasizedData = {
|
|
261
|
+
rowEmphasizedData: [],
|
|
262
|
+
columnEmphasizedData: []
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
// 화면
|
|
269
|
+
renderGridEmphasizedConfigTab() {
|
|
270
|
+
this.setGridEmphasizedConfigTabDefaultValues();
|
|
271
|
+
|
|
272
|
+
let renderHtml = html`
|
|
2
273
|
<div style='grid-template-rows: 50% 50%;display:grid;flex:1;'>
|
|
3
274
|
<div field >
|
|
4
275
|
<h2>
|
|
5
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
276
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_row_emphasized_config')}
|
|
6
277
|
</h2>
|
|
7
|
-
<ox-grist id="row-emphasized-grist" .config=${this.rowEmphasizedConfig} .mode=${
|
|
278
|
+
<ox-grist id="row-emphasized-grist" .config=${this.rowEmphasizedConfig} .mode=${'GRID'} auto-fetch
|
|
8
279
|
.fetchHandler=${this.fetchRowEmphasized.bind(this)}></ox-grist>
|
|
9
280
|
</div>
|
|
10
281
|
<div field >
|
|
11
282
|
<h2>
|
|
12
|
-
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel(
|
|
283
|
+
<mwc-icon>list_alt</mwc-icon>${TermsUtil.tLabel('grid_column_emphasized_config')}
|
|
13
284
|
</h2>
|
|
14
|
-
<ox-grist id="column-emphasized-grist" .config=${this.columnEmphasizedConfig} .mode=${
|
|
285
|
+
<ox-grist id="column-emphasized-grist" .config=${this.columnEmphasizedConfig} .mode=${'GRID'} auto-fetch
|
|
15
286
|
.fetchHandler=${this.fetchColumnEmphasized.bind(this)}></ox-grist>
|
|
16
287
|
</div>
|
|
17
288
|
</div>
|
|
18
|
-
`
|
|
289
|
+
`
|
|
290
|
+
return renderHtml;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
|
|
294
|
+
async fetchRowEmphasized() {
|
|
295
|
+
return {
|
|
296
|
+
records: this.viewEmphasizedData.rowEmphasizedData,
|
|
297
|
+
total: 0
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
async fetchColumnEmphasized() {
|
|
302
|
+
return {
|
|
303
|
+
records: this.viewEmphasizedData.columnEmphasizedData,
|
|
304
|
+
total: 0
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|