@things-factory/meta-ui 7.0.1-alpha.31 → 7.0.1-alpha.33
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/component/popup/code-input-editor-popup.js +1 -1
- package/client/component/popup/meta-object-selector-popup.js +1 -1
- package/client/utils/meta-ui-util.js +20 -6
- package/dist-client/component/popup/code-input-editor-popup.js +1 -1
- package/dist-client/component/popup/code-input-editor-popup.js.map +1 -1
- package/dist-client/component/popup/meta-object-selector-popup.js +1 -1
- package/dist-client/component/popup/meta-object-selector-popup.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/meta-ui-util.js +17 -6
- package/dist-client/utils/meta-ui-util.js.map +1 -1
- package/package.json +8 -8
|
@@ -159,10 +159,11 @@ export class MetaUiUtil {
|
|
|
159
159
|
* @returns {Object} 메뉴 메타 정보
|
|
160
160
|
*/
|
|
161
161
|
static async getMenuMeta(pageView) {
|
|
162
|
+
// 1. 라우팅 추출 및 메뉴 메타 정보 조회
|
|
162
163
|
let currentRouting = pageView.isPage ? UiUtil.currentRouting() : pageView.route_name;
|
|
163
164
|
pageView.currentRouting = currentRouting;
|
|
164
165
|
let menuMetaData = await MetaUiUtil.findMenuMetaByRouting(pageView, currentRouting);
|
|
165
|
-
// Activity 여부에 따라 버튼 / 검색 삭제
|
|
166
|
+
// 2. Activity 여부에 따라 버튼 / 검색 삭제
|
|
166
167
|
if (pageView.is_activity === true) {
|
|
167
168
|
menuMetaData.grid.option.grid_refresh_when_page_activated = false;
|
|
168
169
|
menuMetaData.grid.option.use_row_checker = false;
|
|
@@ -171,18 +172,18 @@ export class MetaUiUtil {
|
|
|
171
172
|
menuMetaData.grid.button = [];
|
|
172
173
|
menuMetaData.button = menuMetaData.button.filter(x => x.name == 'add');
|
|
173
174
|
}
|
|
174
|
-
// 화면이 읽기 전용인 경우
|
|
175
|
+
// 3. 화면이 읽기 전용인 경우 그리드 Configuration 처리
|
|
175
176
|
if (pageView.is_readonly === true) {
|
|
176
177
|
menuMetaData.grid_column.forEach(x => {
|
|
177
178
|
x.editable = false;
|
|
178
179
|
});
|
|
179
180
|
menuMetaData.button = menuMetaData.button.filter(x => x.name != 'add');
|
|
180
181
|
}
|
|
181
|
-
// 필터 폼 사용 여부 강제 설정
|
|
182
|
+
// 4. 필터 폼 사용 여부 강제 설정
|
|
182
183
|
if (pageView.use_filter_form === false) {
|
|
183
184
|
menuMetaData.grid.use_filter_form = false;
|
|
184
185
|
}
|
|
185
|
-
// 필드 변경 이벤트 처리자 설정
|
|
186
|
+
// 5. 필드 변경 이벤트 처리자 설정
|
|
186
187
|
menuMetaData.grid_column
|
|
187
188
|
.filter(x => x.change_event_handler)
|
|
188
189
|
.forEach(x => {
|
|
@@ -190,7 +191,7 @@ export class MetaUiUtil {
|
|
|
190
191
|
pageView.fieldChangeHandlers = {};
|
|
191
192
|
pageView.fieldChangeHandlers[x.name] = x.change_event_handler;
|
|
192
193
|
});
|
|
193
|
-
// object, resource-object -> meta-object-selector, resource-code-selector -> meta-code-selector
|
|
194
|
+
// 6. 그리드 타입 통합 처리 : object, resource-object -> meta-object-selector, resource-code-selector -> meta-code-selector
|
|
194
195
|
menuMetaData.grid_column.forEach(x => {
|
|
195
196
|
if (['resource-object', 'object'].includes(x.type)) {
|
|
196
197
|
x.type = 'meta-object-selector';
|
|
@@ -199,6 +200,16 @@ export class MetaUiUtil {
|
|
|
199
200
|
x.type = 'meta-code-selector';
|
|
200
201
|
}
|
|
201
202
|
});
|
|
203
|
+
// 7. 검색 필드의 검색 Operator가 in인 경우 디폴트 값을 배열로 변경
|
|
204
|
+
if (menuMetaData.search && menuMetaData.search.length > 0) {
|
|
205
|
+
menuMetaData.search.forEach(c => {
|
|
206
|
+
let value = c.value;
|
|
207
|
+
if (c.operator == 'in' && value.indexOf(',') > 0) {
|
|
208
|
+
c.value = value.split(',');
|
|
209
|
+
}
|
|
210
|
+
});
|
|
211
|
+
}
|
|
212
|
+
// 8. 메뉴 메타 정보 리턴
|
|
202
213
|
return menuMetaData;
|
|
203
214
|
}
|
|
204
215
|
/**
|
|
@@ -848,7 +859,7 @@ export class MetaUiUtil {
|
|
|
848
859
|
col.filter.type = col.type === 'datetime' && config.operator == 'eq' ? 'datetime-local' : col.type;
|
|
849
860
|
let defValue = col.filter.value;
|
|
850
861
|
let dateKeywords = ['today', 'year', 'month', 'date', 'hour', 'min', 'sec'];
|
|
851
|
-
if (defValue && dateKeywords.filter(x => defValue.startsWith(x)).length > 0) {
|
|
862
|
+
if (defValue && typeof defValue == 'string' && dateKeywords.filter(x => defValue.startsWith(x)).length > 0) {
|
|
852
863
|
let defRes = [];
|
|
853
864
|
let dateFormat = { date: 'YYYY-MM-DD', datetime: 'YYYY-MM-DD HH:mm:ss' };
|
|
854
865
|
let durationType = { today: 'day', year: 'year', month: 'month', date: 'day', hour: 'hour', min: 'minute', sec: 'second' };
|