@things-factory/operato-tools 7.0.0-alpha.9 → 7.0.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/_index.html +5 -2
- package/client/index.js +0 -1
- package/client/pages/generator/button-config-tab-mixin.js +395 -4
- package/client/pages/generator/column-config-tab-mixin.js +652 -4
- package/client/pages/generator/etc-config-tab-mixin.js +115 -4
- package/client/pages/generator/form-config-tab-mixin.js +160 -4
- package/client/pages/generator/graphql-config-tab-mixin.js +332 -62
- package/client/pages/generator/grid-config-tab-mixin.js +188 -27
- package/client/pages/generator/grid-emphasized-config-tab-mixin.js +307 -18
- package/client/pages/generator/menu-config-tab-mixin.js +109 -29
- package/client/pages/generator/meta-generator-page.js +537 -51
- package/client/pages/generator/search-config-tab-mixin.js +182 -4
- package/client/pages/generator/tab-config-tab-mixin.js +228 -4
- package/client/pages/main.js +32 -9
- package/client/route.js +5 -10
- package/config/config.development.js +1 -1
- package/config/config.production.js +1 -0
- package/dist-server/index.d.ts +1 -0
- package/{server/errors → dist-server}/index.js +1 -1
- package/dist-server/index.js.map +1 -0
- package/dist-server/service/index.d.ts +4 -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.d.ts +36 -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.d.ts +81 -0
- package/dist-server/service/tool-entity/create-service.js +1057 -0
- package/dist-server/service/tool-entity/create-service.js.map +1 -0
- package/dist-server/service/tool-entity/index.d.ts +3 -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 +1150 -0
- package/server/service/tool-entity/index.ts +4 -0
- package/server/tsconfig.json +9 -0
- package/things-factory.config.js +1 -3
- package/translations/en.json +69 -67
- package/translations/ja.json +84 -77
- package/translations/ko.json +69 -67
- package/translations/ms.json +91 -89
- package/translations/zh.json +90 -88
- package/tsconfig.json +9 -0
- package/views/auth-page.html +4 -8
- package/views/public/home.html +5 -8
- package/client/actions/main.js +0 -1
- package/client/bootstrap.js +0 -8
- package/client/reducers/main.js +0 -1
- package/client/themes/app-theme.css +0 -145
- 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/{server → dist-server}/service/tool-entity/index.js +0 -0
package/_index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -51,6 +51,9 @@
|
|
|
51
51
|
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
52
52
|
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
53
53
|
<link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
|
|
54
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
55
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
56
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
54
57
|
|
|
55
58
|
<!-- Add any global styles for body, document, etc. -->
|
|
56
59
|
<style>
|
|
@@ -75,7 +78,7 @@
|
|
|
75
78
|
</script>
|
|
76
79
|
</head>
|
|
77
80
|
|
|
78
|
-
<body>
|
|
81
|
+
<body class="light">
|
|
79
82
|
<things-app></things-app>
|
|
80
83
|
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
81
84
|
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
package/client/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './actions/main'
|
|
@@ -1,5 +1,396 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { html } from 'lit'
|
|
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
|
+
import { getRenderer } from '@operato/data-grist'
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* @license
|
|
9
|
+
* Copyright © HatioLab Inc. All rights reserved.
|
|
10
|
+
* @author Shortstop shortstop@hatiolab.com
|
|
11
|
+
* @description 메뉴 상세 화면 - 버튼 설정 탭 믹스인
|
|
12
|
+
*/
|
|
13
|
+
export const ButtonConfigTabMixin = baseElement =>
|
|
14
|
+
class extends baseElement {
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @description 버튼 설정 탭 설정 값을 화면 오브젝트에 설정
|
|
18
|
+
*************************************************
|
|
19
|
+
* @param {Object} 버튼 설정 데이터
|
|
20
|
+
*/
|
|
21
|
+
setButtonConfigTabValues(data) {
|
|
22
|
+
data?.forEach((column, index) => {
|
|
23
|
+
let rank = index + 1
|
|
24
|
+
column.rank = rank * 10
|
|
25
|
+
column.id = rank
|
|
26
|
+
|
|
27
|
+
if (column.logic && !column.logic.logic) {
|
|
28
|
+
let logicString = JSON.stringify(column.logic, null, 2)
|
|
29
|
+
column.logic = {}
|
|
30
|
+
column.logic.logic = logicString
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
if (column.style && Array.isArray(column.style)) {
|
|
34
|
+
column.style = JSON.stringify(column.style, null, 2)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
this.viewButtonData = data
|
|
39
|
+
this.buttonTabGrist?.fetch()
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @description 버튼 설정 탭 설정 값 리턴
|
|
44
|
+
************************************
|
|
45
|
+
* @return {Object} 버튼 설정 데이터 리턴
|
|
46
|
+
*/
|
|
47
|
+
getButtonConfigTabValues() {
|
|
48
|
+
// 기본 return object
|
|
49
|
+
let retObject = {
|
|
50
|
+
button: [],
|
|
51
|
+
grid: {
|
|
52
|
+
button: []
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// grid 에서 데이터 가져오기
|
|
57
|
+
let gridValue = this.getElementValueById('button-tab-grid')
|
|
58
|
+
|
|
59
|
+
// rank 로 정렬
|
|
60
|
+
this.sortRecordByRank(gridValue)?.forEach(x => {
|
|
61
|
+
var { name = undefined, label = undefined, style = undefined, type = 'basic', logic = undefined, auth = undefined } = x
|
|
62
|
+
|
|
63
|
+
if (!name) return
|
|
64
|
+
|
|
65
|
+
// 그리드, 일반 버튼 동일
|
|
66
|
+
let button = {
|
|
67
|
+
name: name,
|
|
68
|
+
type: type.replaceAll('grid-', ''),
|
|
69
|
+
label: label ? label : name,
|
|
70
|
+
auth: auth
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
// logic 이 있으면 반영
|
|
74
|
+
if (logic) {
|
|
75
|
+
if (typeof logic === 'string') {
|
|
76
|
+
logic = JSON.parse(logic)
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (logic.logic) {
|
|
80
|
+
button.logic = JSON.parse(logic.logic)
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
// grid 버튼은 icon / 일반 버튼은 style
|
|
85
|
+
if (type.startsWith('grid')) {
|
|
86
|
+
if (style) {
|
|
87
|
+
style = style.trim()
|
|
88
|
+
if (style.startsWith('[')) {
|
|
89
|
+
style = JSON.parse(style)
|
|
90
|
+
}
|
|
91
|
+
button.icon = style
|
|
92
|
+
}
|
|
93
|
+
retObject.grid.button.push(button)
|
|
94
|
+
} else {
|
|
95
|
+
if (style) button.style = style
|
|
96
|
+
retObject.button.push(button)
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
|
|
100
|
+
return retObject
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* @description 렌더링
|
|
105
|
+
***********************
|
|
106
|
+
*/
|
|
107
|
+
renderButtonConfigTab() {
|
|
108
|
+
return html`
|
|
109
|
+
<ox-grist auto-fetch id="button-tab-grid" .config=${this.buttonTabGridConfig} .mode="GRID" .fetchHandler=${this.fetchButtonConfigTabHandler.bind(this)}>
|
|
4
110
|
</ox-grist>
|
|
5
|
-
|
|
111
|
+
`
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* @description 버튼 탭 그리드 오브젝트 리턴
|
|
116
|
+
**************************************
|
|
117
|
+
*/
|
|
118
|
+
get buttonTabGrist() {
|
|
119
|
+
return this.shadowRoot.querySelector('#button-tab-grid')
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* @description 버튼 설정 탭 화면 관련 정보 추출
|
|
124
|
+
*****************************************
|
|
125
|
+
*/
|
|
126
|
+
async fetchButtonConfigTabHandler() {
|
|
127
|
+
return {
|
|
128
|
+
total: 0,
|
|
129
|
+
records: this.viewButtonData || []
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* @description 버튼 설정 탭 화면 관련 정보 설정
|
|
135
|
+
*****************************************
|
|
136
|
+
*/
|
|
137
|
+
setButtonConfigTabConfig() {
|
|
138
|
+
// 그리드 설정
|
|
139
|
+
this.buttonTabGridConfig = {
|
|
140
|
+
rows: MetaApi.getGristSelectableConfig(true),
|
|
141
|
+
pagination: { infinite: true },
|
|
142
|
+
sorters: [{ name: 'rank', desc: false }],
|
|
143
|
+
appendable: true,
|
|
144
|
+
columns: [
|
|
145
|
+
...MetaApi.getGristGuttersConfig(false, false),
|
|
146
|
+
{
|
|
147
|
+
type: 'gutter',
|
|
148
|
+
gutterName: 'button',
|
|
149
|
+
icon: 'delete',
|
|
150
|
+
handlers: {
|
|
151
|
+
click: (_columns, _data, _column, record, _rowIndex) => {
|
|
152
|
+
if (record.id) {
|
|
153
|
+
this.deleteRow(this.buttonTabGrist, record)
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
type: 'string',
|
|
160
|
+
name: 'id',
|
|
161
|
+
hidden: true
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
type: 'integer',
|
|
165
|
+
name: 'rank',
|
|
166
|
+
header: TermsUtil.tLabel('rank'),
|
|
167
|
+
sortable: false,
|
|
168
|
+
width: 55,
|
|
169
|
+
record: {
|
|
170
|
+
align: 'right',
|
|
171
|
+
editable: true,
|
|
172
|
+
mandatory: true
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
type: 'string',
|
|
177
|
+
name: 'name',
|
|
178
|
+
header: TermsUtil.tLabel('name'),
|
|
179
|
+
sortable: false,
|
|
180
|
+
width: 150,
|
|
181
|
+
record: {
|
|
182
|
+
align: 'left',
|
|
183
|
+
editable: true,
|
|
184
|
+
mandatory: true
|
|
185
|
+
}
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
type: 'string',
|
|
189
|
+
name: 'label',
|
|
190
|
+
header: TermsUtil.tLabel('label'),
|
|
191
|
+
sortable: false,
|
|
192
|
+
width: 150,
|
|
193
|
+
record: {
|
|
194
|
+
align: 'left',
|
|
195
|
+
editable: true,
|
|
196
|
+
mandatory: true
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
type: 'string',
|
|
201
|
+
name: 'display',
|
|
202
|
+
header: TermsUtil.tLabel('display'),
|
|
203
|
+
sortable: false,
|
|
204
|
+
width: 150,
|
|
205
|
+
record: {
|
|
206
|
+
align: 'left',
|
|
207
|
+
editable: false,
|
|
208
|
+
mandatory: false,
|
|
209
|
+
renderer: (value, column, record, rowIndex, field) => {
|
|
210
|
+
let tLabel = record.label ? record.label : record.name
|
|
211
|
+
return TermsUtil.tButton(tLabel)
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
type: 'select',
|
|
217
|
+
name: 'type',
|
|
218
|
+
header: TermsUtil.tLabel('type'),
|
|
219
|
+
sortable: false,
|
|
220
|
+
width: 100,
|
|
221
|
+
record: {
|
|
222
|
+
align: 'left',
|
|
223
|
+
editable: true,
|
|
224
|
+
mandatory: true,
|
|
225
|
+
options: ['', 'basic', 'custom', 'grid-basic', 'grid-custom']
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
type: 'string',
|
|
230
|
+
name: 'style',
|
|
231
|
+
header: TermsUtil.tLabel('style'),
|
|
232
|
+
sortable: false,
|
|
233
|
+
width: 100,
|
|
234
|
+
record: {
|
|
235
|
+
align: 'left',
|
|
236
|
+
editable: true,
|
|
237
|
+
mandatory: false
|
|
238
|
+
}
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
type: 'select',
|
|
242
|
+
name: 'auth',
|
|
243
|
+
header: TermsUtil.tLabel('auth'),
|
|
244
|
+
sortable: false,
|
|
245
|
+
width: 80,
|
|
246
|
+
record: {
|
|
247
|
+
align: 'left',
|
|
248
|
+
editable: true,
|
|
249
|
+
mandatory: true,
|
|
250
|
+
options: [
|
|
251
|
+
{ value: '', display: '' },
|
|
252
|
+
{ value: 'R', display: 'SELECT' },
|
|
253
|
+
{ value: 'C', display: 'CREATE' },
|
|
254
|
+
{ value: 'U', display: 'UPDATE' },
|
|
255
|
+
{ value: 'D', display: 'DELETE' }
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
type: 'parameters',
|
|
261
|
+
name: 'logic',
|
|
262
|
+
header: TermsUtil.tLabel('logic'),
|
|
263
|
+
sortable: false,
|
|
264
|
+
width: 390,
|
|
265
|
+
record: {
|
|
266
|
+
align: 'left',
|
|
267
|
+
editable: true,
|
|
268
|
+
mandatory: false,
|
|
269
|
+
renderer: (value, column, record, rowIndex, field) => {
|
|
270
|
+
if (!record.logic) {
|
|
271
|
+
if (record.type === 'basic') {
|
|
272
|
+
delete record.logic
|
|
273
|
+
} else if (record.type === 'custom') {
|
|
274
|
+
let guide = {
|
|
275
|
+
logic: JSON.stringify(
|
|
276
|
+
{
|
|
277
|
+
open_popup: {
|
|
278
|
+
title: 'menu.variables',
|
|
279
|
+
title_detail: 'name',
|
|
280
|
+
type: 'popup',
|
|
281
|
+
menu: 'menu-routing',
|
|
282
|
+
tagname: 'meta-grist-element',
|
|
283
|
+
location: 'pages/meta-grist-element.js',
|
|
284
|
+
size: 'large',
|
|
285
|
+
popup_field: 'param_field',
|
|
286
|
+
parent_field: 'id',
|
|
287
|
+
param: ['filter', 'grist_one', 'grist_selected', 'grist_changed']
|
|
288
|
+
},
|
|
289
|
+
graphql: {
|
|
290
|
+
"type": "graphql",
|
|
291
|
+
"graphql_type": "mutation",
|
|
292
|
+
"mutation_name": "updateDocTemplate",
|
|
293
|
+
"mutation_type": "id-data",
|
|
294
|
+
"id_field": "id",
|
|
295
|
+
"param_type": "DocTemplatePatch",
|
|
296
|
+
"param_name": "patch",
|
|
297
|
+
"return_fields": "id",
|
|
298
|
+
"param": ["grist_one"],
|
|
299
|
+
"data": {
|
|
300
|
+
"id": "$id",
|
|
301
|
+
"name": "$name",
|
|
302
|
+
"description": "$description",
|
|
303
|
+
"cuFlag": "M"
|
|
304
|
+
},
|
|
305
|
+
"after": "fetch"
|
|
306
|
+
},
|
|
307
|
+
call_scenario: {
|
|
308
|
+
type: 'scenario',
|
|
309
|
+
name: 'testScenario',
|
|
310
|
+
after: 'fetch',
|
|
311
|
+
param: ['filter', 'grist_all', 'grist_selected']
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
null,
|
|
315
|
+
2
|
|
316
|
+
)
|
|
317
|
+
}
|
|
318
|
+
record.logic = guide
|
|
319
|
+
} else if (record.type === 'grid-basic') {
|
|
320
|
+
let guide = {
|
|
321
|
+
logic: '"record-view"'
|
|
322
|
+
}
|
|
323
|
+
record.logic = guide
|
|
324
|
+
} else if (record.type === 'grid-custom') {
|
|
325
|
+
let guide = {
|
|
326
|
+
logic: JSON.stringify(
|
|
327
|
+
{
|
|
328
|
+
open_popup: {
|
|
329
|
+
title: 'menu.variables',
|
|
330
|
+
title_detail: 'name',
|
|
331
|
+
type: 'popup',
|
|
332
|
+
menu: 'menu-routing',
|
|
333
|
+
tagname: 'meta-grist-element',
|
|
334
|
+
location: 'pages/meta-grist-element.js',
|
|
335
|
+
size: 'large',
|
|
336
|
+
popup_field: 'param_field',
|
|
337
|
+
parent_field: 'id'
|
|
338
|
+
},
|
|
339
|
+
open_form_popup: {
|
|
340
|
+
type: 'form',
|
|
341
|
+
title: 'title.detail',
|
|
342
|
+
title_detail: 'name',
|
|
343
|
+
size: 'large',
|
|
344
|
+
menu: 'operation-master'
|
|
345
|
+
},
|
|
346
|
+
graphql: {
|
|
347
|
+
"type": "graphql",
|
|
348
|
+
"graphql_type": "mutation",
|
|
349
|
+
"mutation_name": "updateDocTemplate",
|
|
350
|
+
"mutation_type": "id-data",
|
|
351
|
+
"id_field": "id",
|
|
352
|
+
"param_type": "DocTemplatePatch",
|
|
353
|
+
"param_name": "patch",
|
|
354
|
+
"return_fields": "id",
|
|
355
|
+
"param": ["grist_one"],
|
|
356
|
+
"data": {
|
|
357
|
+
"id": "$id",
|
|
358
|
+
"name": "$name",
|
|
359
|
+
"description": "$description",
|
|
360
|
+
"cuFlag": "M"
|
|
361
|
+
},
|
|
362
|
+
"after": "fetch"
|
|
363
|
+
},
|
|
364
|
+
call_scenario: {
|
|
365
|
+
type: 'scenario',
|
|
366
|
+
name: 'testScenario',
|
|
367
|
+
after: 'fetch'
|
|
368
|
+
}
|
|
369
|
+
},
|
|
370
|
+
null,
|
|
371
|
+
2
|
|
372
|
+
)
|
|
373
|
+
}
|
|
374
|
+
record.logic = guide
|
|
375
|
+
} else {
|
|
376
|
+
record.logic = undefined
|
|
377
|
+
}
|
|
378
|
+
} else {
|
|
379
|
+
if (record.type === 'basic') {
|
|
380
|
+
record.logic = undefined
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
return getRenderer('json5')(value, column, record, rowIndex, field)
|
|
384
|
+
},
|
|
385
|
+
options: (value, column, record, row, field) => {
|
|
386
|
+
var { name, help } = { name: TermsUtil.tLabel('logic'), help: '' }
|
|
387
|
+
let spec = [{ label: 'script', name: 'logic', type: 'textarea' }]
|
|
388
|
+
const context = this.buttonTabGrist
|
|
389
|
+
return { name, spec, help, context }
|
|
390
|
+
}
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
]
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|