@things-factory/meta-ui 8.0.40 → 9.0.0-9.0.0-beta.59.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/dist-client/bootstrap.d.ts +5 -5
- package/dist-client/bootstrap.js +20 -20
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/service-util.d.ts +2 -2
- package/dist-client/utils/service-util.js +4 -4
- package/dist-client/utils/service-util.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +24 -24
- package/client/bootstrap.ts +0 -170
- package/client/component/filter/filter-form-meta-code-select.ts +0 -102
- package/client/component/filter/filter-form-meta-object-select.ts +0 -107
- package/client/component/filter/filter-grist-meta-code-select.ts +0 -97
- package/client/component/filter/filter-grist-meta-object-select.ts +0 -102
- package/client/component/grist/editor/grist-editor-code-input.js +0 -96
- package/client/component/grist/editor/grist-editor-meta-code-selector.js +0 -157
- package/client/component/grist/editor/grist-editor-meta-object-selector.js +0 -122
- package/client/component/grist/renderer/grist-renderer-code-input.js +0 -20
- package/client/component/grist/renderer/grist-renderer-meta-code-selector.js +0 -28
- package/client/component/grist/renderer/grist-renderer-meta-object-selector.js +0 -25
- package/client/component/popup/code-input-editor-popup.js +0 -111
- package/client/component/popup/file-upload-popup.js +0 -129
- package/client/component/popup/meta-object-selector-popup.ts +0 -356
- package/client/component/popup/record-based-code-editor-popup.ts +0 -141
- package/client/dynamic-menus.ts +0 -38
- package/client/index.ts +0 -18
- package/client/load-components.ts +0 -17
- package/client/mixin/meta-base-mixin.js +0 -323
- package/client/mixin/meta-basic-grist-mixin.js +0 -283
- package/client/mixin/meta-button-mixin.js +0 -116
- package/client/mixin/meta-form-mixin.js +0 -435
- package/client/mixin/meta-grist-tab-mixin.js +0 -335
- package/client/mixin/meta-main-tab-mixin.js +0 -267
- package/client/mixin/meta-master-detail-mixin.js +0 -395
- package/client/mixin/meta-service-mixin.js +0 -306
- package/client/mixin/meta-tab-detail-mixin.js +0 -283
- package/client/mixin/meta-tab-mixin.js +0 -190
- package/client/pages/activity/meta-activity-define-page.js +0 -422
- package/client/pages/activity/meta-activity-list-page.js +0 -262
- package/client/pages/activity/meta-activity-viewer-element.js +0 -35
- package/client/pages/activity/meta-activity-writer-element.js +0 -48
- package/client/pages/activity/meta-activiy-mixin.js +0 -79
- package/client/pages/button-role/button-role-detail.js +0 -50
- package/client/pages/button-role/button-role-page.js +0 -25
- package/client/pages/doc-number/doc-number-page.js +0 -24
- package/client/pages/doc-number/next-doc-number-popup.js +0 -25
- package/client/pages/entity/config-entity.js +0 -955
- package/client/pages/entity/main-menu-selector.js +0 -245
- package/client/pages/history/history-copy-list-popup.js +0 -145
- package/client/pages/history/history-json-list-popup.js +0 -159
- package/client/pages/menu/dynamic-menu-template.js +0 -92
- package/client/pages/menu/dynamic-menu.ts +0 -744
- package/client/pages/menu/export-menu-popup.js +0 -468
- package/client/pages/meta-form-element.js +0 -9
- package/client/pages/meta-grist-element.js +0 -12
- package/client/pages/meta-grist-page.js +0 -16
- package/client/pages/meta-grist-tab-element.js +0 -16
- package/client/pages/meta-grist-tab-page.js +0 -16
- package/client/pages/meta-main-tab-element.js +0 -12
- package/client/pages/meta-main-tab-page.js +0 -16
- package/client/pages/meta-master-detail-element.js +0 -12
- package/client/pages/meta-master-detail-page.js +0 -16
- package/client/pages/meta-tab-detail-element.js +0 -12
- package/client/pages/meta-tab-detail-page.js +0 -16
- package/client/pages/meta-tab-element.js +0 -15
- package/client/pages/printer-device/printer-device-page.js +0 -24
- package/client/pages/template/doc-template-page.js +0 -24
- package/client/pages/template/template-file-page.js +0 -24
- package/client/pages/terms/config-terminology.js +0 -214
- package/client/pages/work-code/work-code-detail-popup.js +0 -16
- package/client/pages/work-code/work-code-page.js +0 -23
- package/client/route.ts +0 -36
- package/client/tsconfig.json +0 -13
- package/client/utils/grist-default-value.js +0 -36
- package/client/utils/meta-api.js +0 -811
- package/client/utils/meta-crypto.js +0 -52
- package/client/utils/meta-ui-util.js +0 -3304
- package/client/utils/rest-service-util.js +0 -328
- package/client/utils/service-util.js +0 -1327
- package/client/utils/terms-util.ts +0 -119
- package/client/utils/ui-util.js +0 -338
- package/client/utils/value-util.js +0 -234
- package/server/activity/CommonActivity.ts +0 -68
- package/server/index.ts +0 -3
- package/server/routes.ts +0 -61
- package/server/service/button-role/button-role-mutation.ts +0 -105
- package/server/service/button-role/button-role-query.ts +0 -53
- package/server/service/button-role/button-role-type.ts +0 -39
- package/server/service/button-role/button-role.ts +0 -61
- package/server/service/button-role/index.ts +0 -7
- package/server/service/dynamic-menu/dynamic-menu-query.ts +0 -270
- package/server/service/dynamic-menu/dynamic-menu-type.ts +0 -74
- package/server/service/dynamic-menu/index.ts +0 -3
- package/server/service/entity-event-subscriber/entity-event-subscriber.ts +0 -80
- package/server/service/entity-event-subscriber/index.ts +0 -3
- package/server/service/index.ts +0 -41
- package/server/service/menu-button-auth/index.ts +0 -7
- package/server/service/menu-button-auth/menu-button-auth-mutation.ts +0 -133
- package/server/service/menu-button-auth/menu-button-auth-query.ts +0 -138
- package/server/service/menu-button-auth/menu-button-auth-type.ts +0 -63
- package/server/service/menu-button-auth/menu-button-auth.ts +0 -92
- package/server/service/meta-activity/index.ts +0 -5
- package/server/service/meta-activity/meta-activity-mutation.ts +0 -191
- package/server/service/meta-activity/meta-activity-query.ts +0 -43
- package/server/service/meta-activity/meta-activity-type.ts +0 -56
- package/server/service/set-translations/index.ts +0 -3
- package/server/service/set-translations/set-translation-resolver.ts +0 -63
- package/server/service/work-code/index.ts +0 -6
- package/server/service/work-code/work-code-mutation.ts +0 -147
- package/server/service/work-code/work-code-query.ts +0 -67
- package/server/service/work-code/work-code-type.ts +0 -60
- package/server/service/work-code/work-code.ts +0 -83
- package/server/service/work-code-detail/index.ts +0 -6
- package/server/service/work-code-detail/work-code-detail-mutation.ts +0 -149
- package/server/service/work-code-detail/work-code-detail-query.ts +0 -59
- package/server/service/work-code-detail/work-code-detail-type.ts +0 -50
- package/server/service/work-code-detail/work-code-detail.ts +0 -82
- package/server/tsconfig.json +0 -9
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
import { MetaApi } from '../utils/meta-api'
|
|
2
|
-
import { MetaUiUtil } from '../utils/meta-ui-util'
|
|
3
|
-
import { ValueUtil } from '../utils/value-util'
|
|
4
|
-
import { TermsUtil } from '../utils/terms-util'
|
|
5
|
-
|
|
6
|
-
import { MetaButtonMixin } from './meta-button-mixin'
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* @license
|
|
10
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
11
|
-
* @author Shortstop shortstop@hatiolab.com
|
|
12
|
-
* @description 메뉴 메타 정보를 기반으로 그리드 탭 구성
|
|
13
|
-
*/
|
|
14
|
-
export const MetaGristTabMixin = baseElement =>
|
|
15
|
-
class extends MetaButtonMixin(baseElement) {
|
|
16
|
-
/**
|
|
17
|
-
* @description 스타일 정의
|
|
18
|
-
**************************
|
|
19
|
-
* @returns {Array} 스타일
|
|
20
|
-
*/
|
|
21
|
-
static get styles() {
|
|
22
|
-
return MetaApi.getBasicGristTabStyles()
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* @description 프로퍼티 정의
|
|
27
|
-
****************************
|
|
28
|
-
* @returns {Object} 프로퍼티
|
|
29
|
-
*/
|
|
30
|
-
static get properties() {
|
|
31
|
-
return {
|
|
32
|
-
/**
|
|
33
|
-
* @description 그리드 구성 정보
|
|
34
|
-
*****************************
|
|
35
|
-
* @type {Object}
|
|
36
|
-
*/
|
|
37
|
-
gridConfig: Object,
|
|
38
|
-
/**
|
|
39
|
-
* @description 그리드 컬럼 구성 정보
|
|
40
|
-
*********************************
|
|
41
|
-
* @type {Array}
|
|
42
|
-
*/
|
|
43
|
-
gridColumnConfig: Array,
|
|
44
|
-
/**
|
|
45
|
-
* @description 검색 폼 구성 정보
|
|
46
|
-
*******************************
|
|
47
|
-
* @type {Array}
|
|
48
|
-
*/
|
|
49
|
-
searchConfig: Array,
|
|
50
|
-
/**
|
|
51
|
-
* @description 화면에서 사용되는 서치 폼 : grist, filter, not
|
|
52
|
-
*********************************************************
|
|
53
|
-
* @type {String}
|
|
54
|
-
*/
|
|
55
|
-
searchFormElement: String,
|
|
56
|
-
/**
|
|
57
|
-
* @description 메뉴 메타 정보로 부터 추출한 후 그리스트를 위해 설정 정보 구성
|
|
58
|
-
*****************************************************************
|
|
59
|
-
* @type {Object}
|
|
60
|
-
*/
|
|
61
|
-
gristConfigSet: Object,
|
|
62
|
-
/**
|
|
63
|
-
* @description 필터 폼 사용 여부
|
|
64
|
-
*****************************
|
|
65
|
-
* @type {Boolean}
|
|
66
|
-
*/
|
|
67
|
-
useFilterForm: Boolean,
|
|
68
|
-
/**
|
|
69
|
-
* @description 모바일 기기에서 그리드 모드 : GRID, LIST, CARD
|
|
70
|
-
*********************************************************
|
|
71
|
-
* @type {String}
|
|
72
|
-
*/
|
|
73
|
-
gridMobileMode: String,
|
|
74
|
-
/**
|
|
75
|
-
* @description 데스크탑에서 그리드 모드 : GRID, LIST, CARD
|
|
76
|
-
******************************************************
|
|
77
|
-
* @type {String}
|
|
78
|
-
*/
|
|
79
|
-
gridDeskMode: String,
|
|
80
|
-
/**
|
|
81
|
-
* @description 그리드 뷰 모드 : GRID, LIST, CARD
|
|
82
|
-
**********************************************
|
|
83
|
-
* @type {Array}
|
|
84
|
-
*/
|
|
85
|
-
gridViewOptions: Array,
|
|
86
|
-
/**
|
|
87
|
-
* @description 현재 그리드 뷰 모드 : GRID, LIST, CARD
|
|
88
|
-
***************************************************
|
|
89
|
-
* @type {String}
|
|
90
|
-
*/
|
|
91
|
-
gridMode: String,
|
|
92
|
-
/**
|
|
93
|
-
* @description Infinity Page 사용 여부
|
|
94
|
-
**************************************
|
|
95
|
-
* @type {Boolean}
|
|
96
|
-
*/
|
|
97
|
-
infinityPage: Boolean,
|
|
98
|
-
/**
|
|
99
|
-
* @description 그리스트 엘리먼트 ID
|
|
100
|
-
***************************
|
|
101
|
-
* @type {String}
|
|
102
|
-
*/
|
|
103
|
-
gristId: String,
|
|
104
|
-
/**
|
|
105
|
-
* @description 필터 폼 엘리먼트 ID
|
|
106
|
-
***************************
|
|
107
|
-
* @type {String}
|
|
108
|
-
*/
|
|
109
|
-
filterFormId: String
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* @description 그리스트
|
|
115
|
-
***********************
|
|
116
|
-
* @returns {HTMLElement}
|
|
117
|
-
*/
|
|
118
|
-
get grist() {
|
|
119
|
-
return this.renderRoot.querySelector(this.gristId)
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* @description 필터 폼
|
|
124
|
-
***********************
|
|
125
|
-
* @returns {HTMLElement}
|
|
126
|
-
*/
|
|
127
|
-
get filterForm() {
|
|
128
|
-
return this.shadowRoot?.querySelector(this.filterFormId)
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* @description 디테일 Element
|
|
133
|
-
*****************************
|
|
134
|
-
* @returns {HTMLElement}
|
|
135
|
-
*/
|
|
136
|
-
get detailElement() {
|
|
137
|
-
return this.shadowRoot.querySelector('#detail')
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* @description 컨텍스트
|
|
142
|
-
***********************
|
|
143
|
-
* @returns {HTMLElement}
|
|
144
|
-
*/
|
|
145
|
-
get context() {
|
|
146
|
-
let ctx = MetaUiUtil.getContextObject(this)
|
|
147
|
-
|
|
148
|
-
if (ctx.actions) delete ctx.actions
|
|
149
|
-
if (ctx.exportable) delete ctx.exportable
|
|
150
|
-
if (ctx.importable) delete ctx.importable
|
|
151
|
-
return ctx
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/******************************************************
|
|
155
|
-
* LifeCycle
|
|
156
|
-
******************************************************/
|
|
157
|
-
|
|
158
|
-
/**
|
|
159
|
-
* @override connectedCallback
|
|
160
|
-
***************************
|
|
161
|
-
*/
|
|
162
|
-
async connectedCallback() {
|
|
163
|
-
// 그리스트, 필터 폼 ID 설정
|
|
164
|
-
this.gristId = 'ox-grist'
|
|
165
|
-
this.filterFormId = 'ox-filters-form-base'
|
|
166
|
-
|
|
167
|
-
// 메뉴 메타 정보 조회 및 기본 파싱
|
|
168
|
-
await this.getAndParseMenuMeta()
|
|
169
|
-
|
|
170
|
-
if (this.isElement) {
|
|
171
|
-
await this.parseGristConfigs()
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
if (this.activityDataSet) {
|
|
175
|
-
this.dataSet = (this.activityDataSet || {}).main
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
if (super.connectedCallback) {
|
|
179
|
-
await super.connectedCallback()
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
|
|
183
|
-
/**
|
|
184
|
-
* @override pageUpdated
|
|
185
|
-
***************************
|
|
186
|
-
* @param {Object} changes
|
|
187
|
-
* @param {Object} lifecycle
|
|
188
|
-
* @param {Object} before
|
|
189
|
-
*/
|
|
190
|
-
async pageUpdated(changes, lifecycle, before) {
|
|
191
|
-
super.pageUpdated(changes, lifecycle, before)
|
|
192
|
-
|
|
193
|
-
if (this.isPage && before.active == false) {
|
|
194
|
-
// TODO 탭이 다른 탭으로 이동하는 경우에 현재 탭의 데이터에 dirty인 것이 있는지 체크해서 있다면 메시지 출력!!!
|
|
195
|
-
console.log('page updated!!!!')
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
async firstUpdated() {
|
|
200
|
-
if (super.firstUpdated) {
|
|
201
|
-
await super.firstUpdated()
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
async pageInitialized() {
|
|
206
|
-
if (this.isPage) {
|
|
207
|
-
await this.parseGristConfigs()
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
if (super.pageInitialized) {
|
|
211
|
-
await super.pageInitialized()
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
render() {
|
|
216
|
-
return MetaApi.getGristTabHtml(this)
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
/**
|
|
220
|
-
* @descrtiption 메뉴 메타에서 기본 그리드 정보 파싱 처리
|
|
221
|
-
************************************************
|
|
222
|
-
* @param {Object} menuMeta 메뉴 메타 정보
|
|
223
|
-
*/
|
|
224
|
-
parseBasicGridConfigs(menuMeta) {
|
|
225
|
-
this.gridConfig = menuMeta.grid
|
|
226
|
-
this.gridColumnConfig = menuMeta.grid_column
|
|
227
|
-
this.searchConfig = menuMeta.search
|
|
228
|
-
this.gridEmphasized = menuMeta.gridEmphasized
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @descrtiption 그리스트 구성 정보 파싱 처리
|
|
233
|
-
***************************************
|
|
234
|
-
*/
|
|
235
|
-
async parseGristConfigs() {
|
|
236
|
-
this.gristConfigSet = await MetaApi.parseGridConfigSet(this)
|
|
237
|
-
this.useMasterFilterForm = this.useFilterForm === true ? true : false
|
|
238
|
-
this.useFilterForm = false
|
|
239
|
-
this.searchFieldValues = []
|
|
240
|
-
this.searchFields = this.gristConfigSet.columns
|
|
241
|
-
.filter(x => x.filter)
|
|
242
|
-
.map(x => {
|
|
243
|
-
let searchField = {
|
|
244
|
-
name: x.name,
|
|
245
|
-
type: x.filter.operator === 'search' ? 'search' : x.type,
|
|
246
|
-
label: x.header,
|
|
247
|
-
operator: x.filter.operator ? x.filter.operator : 'eq'
|
|
248
|
-
}
|
|
249
|
-
|
|
250
|
-
if (x.filter.options) {
|
|
251
|
-
searchField.options = x.filter.options
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
if (x.record.options) {
|
|
255
|
-
searchField.options = x.record.options
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
if (x.filter.value) {
|
|
259
|
-
this.searchFieldValues.push({
|
|
260
|
-
name: searchField.name,
|
|
261
|
-
operator: searchField.operator,
|
|
262
|
-
value: x.filter.value
|
|
263
|
-
})
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
delete x.filter
|
|
267
|
-
return searchField
|
|
268
|
-
})
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
/********************************************************************
|
|
272
|
-
* C R U D Functions
|
|
273
|
-
********************************************************************/
|
|
274
|
-
|
|
275
|
-
async fetch() {
|
|
276
|
-
await this.grist.fetch()
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
async beforeFetch({ page = 0, limit = 0, sortings = [], filters = [] }) {
|
|
280
|
-
let detailContainer = this.renderRoot.querySelector('meta-tab-element')
|
|
281
|
-
await detailContainer.clear()
|
|
282
|
-
|
|
283
|
-
return true
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
async save() {
|
|
287
|
-
let patches = MetaApi.patchesForUpdateMultiple(this.grist)
|
|
288
|
-
let result = ValueUtil.isNotEmpty(patches) ? await this.updateMultiple(patches) : false
|
|
289
|
-
if (result) {
|
|
290
|
-
this.fetch()
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
|
|
294
|
-
async find() {
|
|
295
|
-
let ids = MetaApi.getSelectedIdList(this.grist, true)
|
|
296
|
-
return ValueUtil.isNotEmpty(ids) ? await this.findOne(ids[0]) : {}
|
|
297
|
-
}
|
|
298
|
-
|
|
299
|
-
async delete() {
|
|
300
|
-
let ids = MetaApi.getSelectedIdList(this.grist, true)
|
|
301
|
-
let result = ValueUtil.isNotEmpty(ids) ? await this.deleteByIds(ids) : false
|
|
302
|
-
if (result) {
|
|
303
|
-
this.fetch()
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
async export() {
|
|
308
|
-
let exportTitle = TermsUtil.tTitle(ValueUtil.getParams(this.menuInfo, 'title'))
|
|
309
|
-
return await MetaApi.exportableData(this.isElement, exportTitle, this.grist)
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
async import() {
|
|
313
|
-
// TODO
|
|
314
|
-
}
|
|
315
|
-
|
|
316
|
-
getData() {
|
|
317
|
-
let records = this.grist.___data.records
|
|
318
|
-
records = JSON.parse(JSON.stringify(records))
|
|
319
|
-
|
|
320
|
-
records.forEach(record => {
|
|
321
|
-
let keys = Object.keys(record)
|
|
322
|
-
keys.forEach(x => {
|
|
323
|
-
if (x.startsWith('__')) {
|
|
324
|
-
delete record[x]
|
|
325
|
-
}
|
|
326
|
-
})
|
|
327
|
-
})
|
|
328
|
-
|
|
329
|
-
let tabElement = this.renderRoot.querySelector('meta-tab-element')
|
|
330
|
-
return {
|
|
331
|
-
main: records,
|
|
332
|
-
detail: tabElement.getData()
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
}
|
|
@@ -1,267 +0,0 @@
|
|
|
1
|
-
import { MetaApi } from '../utils/meta-api'
|
|
2
|
-
import { MetaUiUtil } from '../utils/meta-ui-util'
|
|
3
|
-
|
|
4
|
-
import { MetaButtonMixin } from './meta-button-mixin'
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* @license
|
|
8
|
-
* Copyright © HatioLab Inc. All rights reserved.
|
|
9
|
-
* @author Shortstop shortstop@hatiolab.com
|
|
10
|
-
* @description 메뉴 메타 정보를 기반으로 메인 탭 화면을 구성
|
|
11
|
-
*/
|
|
12
|
-
export const MetaMainTabMixin = baseElement =>
|
|
13
|
-
class extends MetaButtonMixin(baseElement) {
|
|
14
|
-
/**
|
|
15
|
-
* @description 스타일 정의
|
|
16
|
-
**************************
|
|
17
|
-
* @returns {Array} 스타일
|
|
18
|
-
*/
|
|
19
|
-
static get styles() {
|
|
20
|
-
return MetaApi.getBasicMainTabStyles()
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* @description 프로퍼티 정의
|
|
25
|
-
***************************
|
|
26
|
-
* @returns {Object} 프로퍼티
|
|
27
|
-
*/
|
|
28
|
-
static get properties() {
|
|
29
|
-
return {
|
|
30
|
-
/**
|
|
31
|
-
* @description 그리드 구성 정보
|
|
32
|
-
*****************************
|
|
33
|
-
* @type {Object}
|
|
34
|
-
*/
|
|
35
|
-
gridConfig: Object,
|
|
36
|
-
/**
|
|
37
|
-
* @description 그리드 컬럼 구성 정보
|
|
38
|
-
*********************************
|
|
39
|
-
* @type {Array}
|
|
40
|
-
*/
|
|
41
|
-
gridColumnConfig: Array,
|
|
42
|
-
/**
|
|
43
|
-
* @description 검색 폼 구성 정보
|
|
44
|
-
*******************************
|
|
45
|
-
* @type {Array}
|
|
46
|
-
*/
|
|
47
|
-
searchConfig: Array,
|
|
48
|
-
/**
|
|
49
|
-
* @description 화면에서 사용되는 서치 폼 : grist, filter, not
|
|
50
|
-
*********************************************************
|
|
51
|
-
* @type {String}
|
|
52
|
-
*/
|
|
53
|
-
searchFormElement: String,
|
|
54
|
-
/**
|
|
55
|
-
* @description 메뉴 메타 정보로 부터 추출한 후 그리스트를 위해 설정 정보 구성
|
|
56
|
-
*****************************************************************
|
|
57
|
-
* @type {Object}
|
|
58
|
-
*/
|
|
59
|
-
gristConfigSet: Object,
|
|
60
|
-
/**
|
|
61
|
-
* @description 필터 폼 사용 여부
|
|
62
|
-
*****************************
|
|
63
|
-
* @type {Boolean}
|
|
64
|
-
*/
|
|
65
|
-
useFilterForm: Boolean,
|
|
66
|
-
/**
|
|
67
|
-
* @description 모바일 기기에서 그리드 모드 : GRID, LIST, CARD
|
|
68
|
-
*********************************************************
|
|
69
|
-
* @type {String}
|
|
70
|
-
*/
|
|
71
|
-
gridMobileMode: String,
|
|
72
|
-
/**
|
|
73
|
-
* @description 데스크탑에서 그리드 모드 : GRID, LIST, CARD
|
|
74
|
-
******************************************************
|
|
75
|
-
* @type {String}
|
|
76
|
-
*/
|
|
77
|
-
gridDeskMode: String,
|
|
78
|
-
/**
|
|
79
|
-
* @description 그리드 뷰 모드 : GRID, LIST, CARD
|
|
80
|
-
**********************************************
|
|
81
|
-
* @type {Array}
|
|
82
|
-
*/
|
|
83
|
-
gridViewOptions: Array,
|
|
84
|
-
/**
|
|
85
|
-
* @description 현재 그리드 뷰 모드 : GRID, LIST, CARD
|
|
86
|
-
***************************************************
|
|
87
|
-
* @type {String}
|
|
88
|
-
*/
|
|
89
|
-
gridMode: String,
|
|
90
|
-
/**
|
|
91
|
-
* @description Infinity Page 사용 여부
|
|
92
|
-
**************************************
|
|
93
|
-
* @type {Boolean}
|
|
94
|
-
*/
|
|
95
|
-
infinityPage: Boolean,
|
|
96
|
-
/**
|
|
97
|
-
* @description 그리스트 엘리먼트 ID
|
|
98
|
-
***************************
|
|
99
|
-
* @type {String}
|
|
100
|
-
*/
|
|
101
|
-
gristId: String,
|
|
102
|
-
/**
|
|
103
|
-
* @description 필터 폼 엘리먼트 ID
|
|
104
|
-
***************************
|
|
105
|
-
* @type {String}
|
|
106
|
-
*/
|
|
107
|
-
filterFormId: String
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
/**
|
|
112
|
-
* @description 그리스트
|
|
113
|
-
***********************
|
|
114
|
-
* @returns {HTMLElement}
|
|
115
|
-
*/
|
|
116
|
-
get grist() {
|
|
117
|
-
return this.masterElement.getMainGrist()
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
/**
|
|
121
|
-
* @description 필터 폼
|
|
122
|
-
***********************
|
|
123
|
-
* @returns {HTMLElement}
|
|
124
|
-
*/
|
|
125
|
-
get filterForm() {
|
|
126
|
-
return this.shadowRoot?.querySelector(this.filterFormId)
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* @description 컨텍스트
|
|
131
|
-
***********************
|
|
132
|
-
* @returns {HTMLElement}
|
|
133
|
-
*/
|
|
134
|
-
get context() {
|
|
135
|
-
let ctx = MetaUiUtil.getContextObject(this)
|
|
136
|
-
|
|
137
|
-
if (ctx.actions) delete ctx.actions
|
|
138
|
-
if (ctx.exportable) delete ctx.exportable
|
|
139
|
-
if (ctx.importable) delete ctx.importable
|
|
140
|
-
return ctx
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
/******************************************************
|
|
144
|
-
* LifeCycle
|
|
145
|
-
******************************************************/
|
|
146
|
-
|
|
147
|
-
async connectedCallback() {
|
|
148
|
-
// 그리스트, 필터 폼 ID 설정
|
|
149
|
-
this.gristId = 'ox-grist'
|
|
150
|
-
this.filterFormId = 'ox-filters-form-base'
|
|
151
|
-
|
|
152
|
-
// 메뉴 메타 정보 조회 및 기본 파싱
|
|
153
|
-
await this.getAndParseMenuMeta()
|
|
154
|
-
|
|
155
|
-
if (this.isElement) {
|
|
156
|
-
await this.parseGristConfigs()
|
|
157
|
-
}
|
|
158
|
-
|
|
159
|
-
if (this.activityDataSet) {
|
|
160
|
-
this.dataSet = (this.activityDataSet || {}).main
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
if (super.connectedCallback) {
|
|
164
|
-
await super.connectedCallback()
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
async firstUpdated() {
|
|
169
|
-
if (super.firstUpdated) {
|
|
170
|
-
await super.firstUpdated()
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
async pageInitialized() {
|
|
175
|
-
if (this.isPage) {
|
|
176
|
-
await this.parseGristConfigs()
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
if (super.pageInitialized) {
|
|
180
|
-
await super.pageInitialized()
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
render() {
|
|
185
|
-
return MetaApi.getMainTabHtml(this)
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
/**
|
|
189
|
-
* @descrtiption 메뉴 메타 정보로 부터 메인 그리드 Configuration
|
|
190
|
-
********************************************************
|
|
191
|
-
* @param {Object} menuMeta 메뉴 메타 정보
|
|
192
|
-
*/
|
|
193
|
-
parseBasicGridConfigs(menuMeta) {
|
|
194
|
-
this.gridConfig = menuMeta.grid
|
|
195
|
-
this.gridColumnConfig = menuMeta.grid_column
|
|
196
|
-
this.searchConfig = menuMeta.search
|
|
197
|
-
this.gridEmphasized = menuMeta.gridEmphasized
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
/**
|
|
201
|
-
* @descrtiption 그리스트 구성 정보로 부터 화면 구성 정보 추출
|
|
202
|
-
****************************************************
|
|
203
|
-
*/
|
|
204
|
-
async parseGristConfigs() {
|
|
205
|
-
this.gristConfigSet = await MetaApi.parseGridConfigSet(this)
|
|
206
|
-
this.useMasterFilterForm = this.useFilterForm === true ? true : false
|
|
207
|
-
this.useFilterForm = false
|
|
208
|
-
this.buttonConfig = undefined
|
|
209
|
-
this.useButtonExport = false
|
|
210
|
-
this.useButtonImport = false
|
|
211
|
-
this.searchFieldValues = []
|
|
212
|
-
|
|
213
|
-
this.searchFields = this.gristConfigSet.columns
|
|
214
|
-
.filter(x => x.filter)
|
|
215
|
-
.map(x => {
|
|
216
|
-
let searchField = {
|
|
217
|
-
name: x.name,
|
|
218
|
-
type: x.filter.operator === 'search' ? 'search' : x.type,
|
|
219
|
-
label: x.header,
|
|
220
|
-
operator: x.filter.operator ? x.filter.operator : 'eq'
|
|
221
|
-
}
|
|
222
|
-
|
|
223
|
-
if (x.filter.options) {
|
|
224
|
-
searchField.options = x.filter.options
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
if (x.record.options) {
|
|
228
|
-
searchField.options = x.record.options
|
|
229
|
-
}
|
|
230
|
-
|
|
231
|
-
if (x.filter.value) {
|
|
232
|
-
this.searchFieldValues.push({
|
|
233
|
-
name: searchField.name,
|
|
234
|
-
operator: searchField.operator,
|
|
235
|
-
value: x.filter.value
|
|
236
|
-
})
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
delete x.filter
|
|
240
|
-
return searchField
|
|
241
|
-
})
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
/********************************************************************
|
|
245
|
-
* C R U D Functions
|
|
246
|
-
********************************************************************/
|
|
247
|
-
|
|
248
|
-
async fetch() {
|
|
249
|
-
await this.grist.fetch()
|
|
250
|
-
}
|
|
251
|
-
|
|
252
|
-
async beforeFetch({ page = 0, limit = 0, sortings = [], filters = [] }) {
|
|
253
|
-
if (this.masterElement) {
|
|
254
|
-
if (this.masterElement.clear) {
|
|
255
|
-
await this.masterElement.clear()
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
|
|
259
|
-
return true
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
getData() {
|
|
263
|
-
return {
|
|
264
|
-
master: this.masterElement.getData()
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|