@things-factory/meta-ui 7.0.1-alpha.1 → 7.0.1-alpha.11
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/actions/main.js +14 -20
- package/client/bootstrap.ts +13 -6
- package/client/component/grist/renderer/grist-renderer-meta-object-selector.js +18 -13
- package/client/pages/entity/config-entity.js +180 -112
- package/client/pages/entity/main-menu-selector.js +85 -84
- package/client/pages/history/history-copy-list-popup.js +33 -45
- package/client/pages/history/history-json-list-popup.js +38 -50
- package/client/pages/menu/dynamic-menu-template.js +1 -1
- package/client/pages/menu/dynamic-menu.js +137 -121
- package/client/pages/menu/export-menu-popup.js +210 -218
- package/client/pages/personalize/personal-column-selector.js +112 -122
- package/client/utils/meta-ui-util.js +0 -4
- package/client/utils/service-util.js +4 -4
- package/client/utils/terms-util.js +41 -42
- package/client/utils/ui-util.js +2 -5
- package/client/viewparts/dynamic-menu-part.js +7 -28
- package/dist-client/actions/main.js +6 -5
- package/dist-client/actions/main.js.map +1 -1
- package/dist-client/bootstrap.d.ts +4 -1
- package/dist-client/bootstrap.js +12 -6
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-code-input.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-code-selector.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.d.ts +1 -1
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js +9 -3
- package/dist-client/component/grist/renderer/grist-renderer-meta-object-selector.js.map +1 -1
- package/dist-client/component/popup/code-input-editor-popup.d.ts +1 -1
- package/dist-client/component/popup/meta-object-selector-popup.d.ts +1 -1
- package/dist-client/component/popup/record-based-code-editor-popup.d.ts +1 -1
- package/dist-client/mixin/meta-basic-grist-mixin.d.ts +1 -1
- package/dist-client/pages/activity/meta-activity-viewer-element.d.ts +1 -1
- package/dist-client/pages/activity/meta-activity-writer-element.d.ts +1 -1
- package/dist-client/pages/button-role/button-role-detail.d.ts +1 -1
- package/dist-client/pages/entity/config-entity.js +131 -62
- package/dist-client/pages/entity/config-entity.js.map +1 -1
- package/dist-client/pages/entity/main-menu-selector.d.ts +1 -1
- package/dist-client/pages/entity/main-menu-selector.js +74 -73
- package/dist-client/pages/entity/main-menu-selector.js.map +1 -1
- package/dist-client/pages/history/history-copy-list-popup.d.ts +1 -1
- package/dist-client/pages/history/history-copy-list-popup.js +14 -26
- package/dist-client/pages/history/history-copy-list-popup.js.map +1 -1
- package/dist-client/pages/history/history-json-list-popup.d.ts +5 -5
- package/dist-client/pages/history/history-json-list-popup.js +19 -31
- package/dist-client/pages/history/history-json-list-popup.js.map +1 -1
- package/dist-client/pages/menu/dynamic-menu-setting-let.d.ts +1 -1
- package/dist-client/pages/menu/dynamic-menu-template.js +1 -1
- package/dist-client/pages/menu/dynamic-menu-template.js.map +1 -1
- package/dist-client/pages/menu/dynamic-menu.js +68 -48
- package/dist-client/pages/menu/dynamic-menu.js.map +1 -1
- package/dist-client/pages/menu/export-menu-popup.d.ts +5 -5
- package/dist-client/pages/menu/export-menu-popup.js +50 -54
- package/dist-client/pages/menu/export-menu-popup.js.map +1 -1
- package/dist-client/pages/meta-grist-element.d.ts +1 -1
- package/dist-client/pages/meta-grist-page.d.ts +1 -1
- package/dist-client/pages/personalize/personal-column-selector.d.ts +1 -1
- package/dist-client/pages/personalize/personal-column-selector.js +76 -84
- package/dist-client/pages/personalize/personal-column-selector.js.map +1 -1
- package/dist-client/pages/work-code/work-code-detail-popup.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/meta-ui-util.js +0 -3
- package/dist-client/utils/meta-ui-util.js.map +1 -1
- package/dist-client/utils/service-util.js +4 -4
- package/dist-client/utils/service-util.js.map +1 -1
- package/dist-client/utils/terms-util.d.ts +13 -13
- package/dist-client/utils/terms-util.js +10 -12
- package/dist-client/utils/terms-util.js.map +1 -1
- package/dist-client/utils/ui-util.js +1 -4
- package/dist-client/utils/ui-util.js.map +1 -1
- package/dist-client/viewparts/dynamic-menu-part.d.ts +1 -1
- package/dist-client/viewparts/dynamic-menu-part.js +7 -26
- package/dist-client/viewparts/dynamic-menu-part.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -8
- package/client/viewparts/dynamic-menu-landscape-styles.js +0 -149
- package/client/viewparts/dynamic-menu-landscape.js +0 -106
- package/client/viewparts/dynamic-menu-portrait-styles.js +0 -130
- package/client/viewparts/dynamic-menu-portrait.js +0 -90
- package/client/viewparts/dynamic-top-menu-bar.js +0 -148
- package/dist-client/viewparts/dynamic-menu-landscape-styles.d.ts +0 -1
- package/dist-client/viewparts/dynamic-menu-landscape-styles.js +0 -149
- package/dist-client/viewparts/dynamic-menu-landscape-styles.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-landscape.d.ts +0 -21
- package/dist-client/viewparts/dynamic-menu-landscape.js +0 -87
- package/dist-client/viewparts/dynamic-menu-landscape.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait-styles.d.ts +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait-styles.js +0 -130
- package/dist-client/viewparts/dynamic-menu-portrait-styles.js.map +0 -1
- package/dist-client/viewparts/dynamic-menu-portrait.d.ts +0 -13
- package/dist-client/viewparts/dynamic-menu-portrait.js +0 -74
- package/dist-client/viewparts/dynamic-menu-portrait.js.map +0 -1
- package/dist-client/viewparts/dynamic-top-menu-bar.d.ts +0 -27
- package/dist-client/viewparts/dynamic-top-menu-bar.js +0 -133
- package/dist-client/viewparts/dynamic-top-menu-bar.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
2
|
|
|
3
3
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
4
|
import { ScrollbarStyles, CommonGristStyles } from '@operato/styles'
|
|
@@ -24,66 +24,67 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
24
24
|
ScrollbarStyles,
|
|
25
25
|
CommonGristStyles,
|
|
26
26
|
css`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
27
|
+
:host {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
}
|
|
32
|
+
.container {
|
|
33
|
+
flex: 1;
|
|
34
|
+
display: grid;
|
|
35
|
+
overflow: hidden;
|
|
36
|
+
}
|
|
37
|
+
.container_detail {
|
|
38
|
+
background-color: var(--main-section-background-color);
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
flex: 1;
|
|
42
|
+
overflow-y: auto;
|
|
43
|
+
}
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
45
|
+
h2 {
|
|
46
|
+
padding: var(--subtitle-padding);
|
|
47
|
+
font: var(--subtitle-font);
|
|
48
|
+
color: var(--subtitle-text-color);
|
|
49
|
+
border-bottom: var(--subtitle-border-bottom);
|
|
50
|
+
}
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
52
|
+
.container_detail h2 {
|
|
53
|
+
margin: var(--grist-title-margin);
|
|
54
|
+
border: var(--grist-title-border);
|
|
55
|
+
font: var(--grist-title-font);
|
|
56
|
+
color: var(--secondary-color);
|
|
57
|
+
}
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
59
|
+
.container_detail h2 mwc-icon {
|
|
60
|
+
vertical-align: middle;
|
|
61
|
+
margin: var(--grist-title-icon-margin);
|
|
62
|
+
font-size: var(--grist-title-icon-size);
|
|
63
|
+
color: var(--grist-title-icon-color);
|
|
64
|
+
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
66
|
+
h2 {
|
|
67
|
+
padding-bottom: var(--grist-title-with-grid-padding);
|
|
68
|
+
}
|
|
69
|
+
ox-grist {
|
|
70
|
+
overflow-y: auto;
|
|
71
|
+
flex: 1;
|
|
72
|
+
}
|
|
73
|
+
search-form {
|
|
74
|
+
overflow: visible;
|
|
75
|
+
}
|
|
76
76
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
77
|
+
.button-container {
|
|
78
|
+
padding: var(--button-container-padding);
|
|
79
|
+
margin: var(--button-container-margin);
|
|
80
|
+
text-align: var(--button-container-align);
|
|
81
|
+
background-color: var(--button-container-background);
|
|
82
|
+
height: var(--button-container-height);
|
|
83
|
+
text-align: right;
|
|
84
|
+
padding-right: 12px;
|
|
85
|
+
}
|
|
86
|
+
`
|
|
87
|
+
]
|
|
87
88
|
return styles
|
|
88
89
|
}
|
|
89
90
|
|
|
@@ -111,7 +112,7 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
111
112
|
total: {
|
|
112
113
|
type: Number
|
|
113
114
|
},
|
|
114
|
-
|
|
115
|
+
|
|
115
116
|
/**
|
|
116
117
|
* @description 메인 메뉴 선택 이후 콜백 함수
|
|
117
118
|
***************************************
|
|
@@ -128,23 +129,23 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
128
129
|
***************************
|
|
129
130
|
*/
|
|
130
131
|
async connectedCallback() {
|
|
131
|
-
// 메뉴 그룹 그리드 설정
|
|
132
|
+
// 메뉴 그룹 그리드 설정
|
|
132
133
|
this.gridConfig = {
|
|
133
134
|
rows: MetaApi.getGristSelectableConfig(false),
|
|
134
|
-
pagination: { pages
|
|
135
|
+
pagination: { pages: [1000] },
|
|
135
136
|
appendable: true,
|
|
136
137
|
columns: [
|
|
137
138
|
...MetaApi.getGristGuttersConfig(true, false),
|
|
138
|
-
{
|
|
139
|
+
{
|
|
139
140
|
name: 'rank',
|
|
140
|
-
header: TermsUtil.tLabel('rank'),
|
|
141
|
-
width
|
|
142
|
-
record
|
|
141
|
+
header: TermsUtil.tLabel('rank'),
|
|
142
|
+
width: 80,
|
|
143
|
+
record: {
|
|
143
144
|
editable: false,
|
|
144
145
|
format: '#,###',
|
|
145
146
|
align: 'left'
|
|
146
147
|
},
|
|
147
|
-
sortable: true
|
|
148
|
+
sortable: true
|
|
148
149
|
},
|
|
149
150
|
MetaApi.getGristColumnConfig('string', 'name', 'left', true, false, 300),
|
|
150
151
|
{
|
|
@@ -161,7 +162,7 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
161
162
|
sortable: false,
|
|
162
163
|
width: 350
|
|
163
164
|
},
|
|
164
|
-
await MetaApi.getGristCodeSelectorColumnConfig('menuType', 'menu_type', 'left', false, 100, true, 'MENU_TYPE')
|
|
165
|
+
await MetaApi.getGristCodeSelectorColumnConfig('menuType', 'menu_type', 'left', false, 100, true, 'MENU_TYPE')
|
|
165
166
|
]
|
|
166
167
|
}
|
|
167
168
|
|
|
@@ -175,22 +176,22 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
175
176
|
***************************
|
|
176
177
|
*/
|
|
177
178
|
render() {
|
|
178
|
-
return html`
|
|
179
|
-
<div
|
|
180
|
-
<
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
</div>
|
|
179
|
+
return html` <div id="container" class="container">
|
|
180
|
+
<div class="container_detail">
|
|
181
|
+
<ox-grist id="ox-grist" .config=${this.gridConfig} .mode=${'GRID'} auto-fetch .fetchHandler=${this.fetchMainMenus.bind(this)}> </ox-grist>
|
|
182
|
+
<div id="button-container" class="button-container">
|
|
183
|
+
<mwc-button
|
|
184
|
+
raised
|
|
185
|
+
hidden
|
|
186
|
+
id="receive"
|
|
187
|
+
label="${TermsUtil.tButton('create-menu')}"
|
|
188
|
+
style="margin-left:7px;margin-top:7px;"
|
|
189
|
+
@click=${this.selectMainMenu.bind(this)}
|
|
190
|
+
>
|
|
191
|
+
</mwc-button>
|
|
192
192
|
</div>
|
|
193
|
-
</div
|
|
193
|
+
</div>
|
|
194
|
+
</div>`
|
|
194
195
|
}
|
|
195
196
|
|
|
196
197
|
/**
|
|
@@ -205,7 +206,7 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
205
206
|
/**
|
|
206
207
|
* @description 메인 메뉴 조회
|
|
207
208
|
***************************
|
|
208
|
-
* @returns
|
|
209
|
+
* @returns
|
|
209
210
|
*/
|
|
210
211
|
async fetchMainMenus() {
|
|
211
212
|
let filters = [{ name: 'parentId', operator: 'is_null', value: '' }]
|
|
@@ -233,9 +234,9 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
233
234
|
if (!records || records.length == 0) {
|
|
234
235
|
UiUtil.showCustomAlert('title.info', 'text.NOTHING_SELECTED', 'info', 'button.confirm')
|
|
235
236
|
} else {
|
|
236
|
-
if(this.selectCallback) {
|
|
237
|
+
if (this.selectCallback) {
|
|
237
238
|
let res = await this.selectCallback(records[0].id)
|
|
238
|
-
if(res.success) {
|
|
239
|
+
if (res.success) {
|
|
239
240
|
history.back()
|
|
240
241
|
}
|
|
241
242
|
}
|
|
@@ -243,4 +244,4 @@ export class MainMenuSelector extends localize(i18next)(LitElement) {
|
|
|
243
244
|
}
|
|
244
245
|
}
|
|
245
246
|
|
|
246
|
-
customElements.define('main-menu-selector', MainMenuSelector)
|
|
247
|
+
customElements.define('main-menu-selector', MainMenuSelector)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
2
|
|
|
3
3
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
4
|
import { ScrollbarStyles, CommonGristStyles } from '@operato/styles'
|
|
@@ -24,17 +24,17 @@ export class HistoryCopyListPopup extends localize(i18next)(LitElement) {
|
|
|
24
24
|
ScrollbarStyles,
|
|
25
25
|
CommonGristStyles,
|
|
26
26
|
css`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
:host {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
}
|
|
32
|
+
ox-grist {
|
|
33
|
+
overflow-y: auto;
|
|
34
|
+
flex: 1;
|
|
35
|
+
}
|
|
36
36
|
`
|
|
37
|
-
]
|
|
37
|
+
]
|
|
38
38
|
return styles
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -54,39 +54,37 @@ export class HistoryCopyListPopup extends localize(i18next)(LitElement) {
|
|
|
54
54
|
***************************
|
|
55
55
|
*/
|
|
56
56
|
async connectedCallback() {
|
|
57
|
-
// 메뉴 그룹 그리드 설정
|
|
58
|
-
let parentGristConfig = this.open_param.gristConfig
|
|
59
|
-
this.gqlFunc = this.open_param.gqlFunc
|
|
57
|
+
// 메뉴 그룹 그리드 설정
|
|
58
|
+
let parentGristConfig = this.open_param.gristConfig
|
|
59
|
+
this.gqlFunc = this.open_param.gqlFunc
|
|
60
60
|
|
|
61
|
-
delete parentGristConfig.list
|
|
62
|
-
delete parentGristConfig.rows
|
|
61
|
+
delete parentGristConfig.list
|
|
62
|
+
delete parentGristConfig.rows
|
|
63
63
|
|
|
64
64
|
parentGristConfig.rows = {
|
|
65
65
|
appendable: false,
|
|
66
66
|
selectable: false
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
parentGristConfig.sorters = [
|
|
70
|
-
{name: 'dataRevisionNo', desc: true}
|
|
71
|
-
]
|
|
69
|
+
parentGristConfig.sorters = [{ name: 'dataRevisionNo', desc: true }]
|
|
72
70
|
|
|
73
|
-
let gristColumns = parentGristConfig.columns.filter(x => x.type!= 'gutter' && x.unusable !== true)
|
|
71
|
+
let gristColumns = parentGristConfig.columns.filter(x => x.type != 'gutter' && x.unusable !== true)
|
|
74
72
|
gristColumns.forEach(x => {
|
|
75
|
-
if(x.filter) delete x.filter
|
|
76
|
-
if(!x.record) x.record = {}
|
|
73
|
+
if (x.filter) delete x.filter
|
|
74
|
+
if (!x.record) x.record = {}
|
|
77
75
|
|
|
78
|
-
x.sortable = false
|
|
79
|
-
x.record.editable = false
|
|
80
|
-
})
|
|
76
|
+
x.sortable = false
|
|
77
|
+
x.record.editable = false
|
|
78
|
+
})
|
|
81
79
|
|
|
82
80
|
parentGristConfig.columns = [
|
|
83
|
-
{type: 'gutter', gutterName: 'dirty'},
|
|
84
|
-
MetaApi.getGristColumnConfig2('integer', 'dataRevisionNo','data_revision_no', 'center', false, true, 90),
|
|
85
|
-
MetaApi.getGristColumnConfig2('string', 'dataRevisionAction','data_revision_action', 'center', false, false, 90),
|
|
81
|
+
{ type: 'gutter', gutterName: 'dirty' },
|
|
82
|
+
MetaApi.getGristColumnConfig2('integer', 'dataRevisionNo', 'data_revision_no', 'center', false, true, 90),
|
|
83
|
+
MetaApi.getGristColumnConfig2('string', 'dataRevisionAction', 'data_revision_action', 'center', false, false, 90),
|
|
86
84
|
...gristColumns
|
|
87
85
|
]
|
|
88
86
|
|
|
89
|
-
this.gridConfig = parentGristConfig
|
|
87
|
+
this.gridConfig = parentGristConfig
|
|
90
88
|
|
|
91
89
|
if (super.connectedCallback) {
|
|
92
90
|
await super.connectedCallback()
|
|
@@ -98,14 +96,7 @@ export class HistoryCopyListPopup extends localize(i18next)(LitElement) {
|
|
|
98
96
|
***************************
|
|
99
97
|
*/
|
|
100
98
|
render() {
|
|
101
|
-
return html`
|
|
102
|
-
<ox-grist
|
|
103
|
-
id="ox-grist"
|
|
104
|
-
.config=${this.gridConfig}
|
|
105
|
-
.mode=${'GRID'} auto-fetch
|
|
106
|
-
.fetchHandler=${this.fetchHandler.bind(this)}>
|
|
107
|
-
</ox-grist>
|
|
108
|
-
`
|
|
99
|
+
return html` <ox-grist id="ox-grist" .config=${this.gridConfig} .mode=${'GRID'} auto-fetch .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist> `
|
|
109
100
|
}
|
|
110
101
|
|
|
111
102
|
/**
|
|
@@ -120,14 +111,11 @@ export class HistoryCopyListPopup extends localize(i18next)(LitElement) {
|
|
|
120
111
|
/**
|
|
121
112
|
* @description 이력 조회
|
|
122
113
|
***************************
|
|
123
|
-
* @returns
|
|
114
|
+
* @returns
|
|
124
115
|
*/
|
|
125
|
-
async fetchHandler({ page = 0, limit = 0, sortings = [], filters = [] }){
|
|
126
|
-
let filter = [
|
|
127
|
-
|
|
128
|
-
...filters
|
|
129
|
-
]
|
|
130
|
-
|
|
116
|
+
async fetchHandler({ page = 0, limit = 0, sortings = [], filters = [] }) {
|
|
117
|
+
let filter = [{ name: 'originalId', operator: 'eq', value: this.parent_id }, ...filters]
|
|
118
|
+
|
|
131
119
|
let selectFields = MetaApi.getSelectColumns(this.gridConfig.columns)
|
|
132
120
|
|
|
133
121
|
let result = await MetaApi.searchByPagination(`${this.gqlFunc}Histories`, filter, sortings, page, limit, selectFields)
|
|
@@ -135,4 +123,4 @@ export class HistoryCopyListPopup extends localize(i18next)(LitElement) {
|
|
|
135
123
|
}
|
|
136
124
|
}
|
|
137
125
|
|
|
138
|
-
customElements.define('history-copy-list-popup', HistoryCopyListPopup)
|
|
126
|
+
customElements.define('history-copy-list-popup', HistoryCopyListPopup)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css, html, LitElement } from 'lit
|
|
1
|
+
import { css, html, LitElement } from 'lit'
|
|
2
2
|
|
|
3
3
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
4
|
import { ScrollbarStyles, CommonGristStyles } from '@operato/styles'
|
|
@@ -14,27 +14,27 @@ import { MetaApi } from '../../utils/meta-api'
|
|
|
14
14
|
* @description 변경 이력 (JSON) 타입 조회 팝업
|
|
15
15
|
*/
|
|
16
16
|
export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
17
|
-
/**
|
|
17
|
+
/**
|
|
18
18
|
* @description 스타일 정의
|
|
19
19
|
***********************************
|
|
20
20
|
* @returns {Object} 화면의 스타일 정의
|
|
21
21
|
*/
|
|
22
|
-
|
|
22
|
+
static get styles() {
|
|
23
23
|
let styles = [
|
|
24
24
|
ScrollbarStyles,
|
|
25
25
|
CommonGristStyles,
|
|
26
26
|
css`
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
27
|
+
:host {
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
overflow-x: auto;
|
|
31
|
+
}
|
|
32
|
+
ox-grist {
|
|
33
|
+
overflow-y: auto;
|
|
34
|
+
flex: 1;
|
|
35
|
+
}
|
|
36
36
|
`
|
|
37
|
-
]
|
|
37
|
+
]
|
|
38
38
|
return styles
|
|
39
39
|
}
|
|
40
40
|
|
|
@@ -54,39 +54,37 @@ export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
|
54
54
|
***************************
|
|
55
55
|
*/
|
|
56
56
|
async connectedCallback() {
|
|
57
|
-
// 메뉴 그룹 그리드 설정
|
|
58
|
-
let parentGristConfig = this.open_param.gristConfig
|
|
59
|
-
this.gqlFunc = this.open_param.gqlFunc
|
|
57
|
+
// 메뉴 그룹 그리드 설정
|
|
58
|
+
let parentGristConfig = this.open_param.gristConfig
|
|
59
|
+
this.gqlFunc = this.open_param.gqlFunc
|
|
60
60
|
|
|
61
|
-
delete parentGristConfig.list
|
|
62
|
-
delete parentGristConfig.rows
|
|
61
|
+
delete parentGristConfig.list
|
|
62
|
+
delete parentGristConfig.rows
|
|
63
63
|
|
|
64
64
|
parentGristConfig.rows = {
|
|
65
65
|
appendable: false,
|
|
66
66
|
selectable: false
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
parentGristConfig.sorters = [
|
|
70
|
-
{name: 'dataRevisionNo', desc:true}
|
|
71
|
-
]
|
|
69
|
+
parentGristConfig.sorters = [{ name: 'dataRevisionNo', desc: true }]
|
|
72
70
|
|
|
73
|
-
let gristColumns = parentGristConfig.columns.filter(x => x.type!= 'gutter' && x.unusable !== true)
|
|
71
|
+
let gristColumns = parentGristConfig.columns.filter(x => x.type != 'gutter' && x.unusable !== true)
|
|
74
72
|
gristColumns.forEach(x => {
|
|
75
|
-
if(x.filter) delete x.filter
|
|
76
|
-
if(!x.record) x.record = {}
|
|
73
|
+
if (x.filter) delete x.filter
|
|
74
|
+
if (!x.record) x.record = {}
|
|
77
75
|
|
|
78
|
-
x.sortable = false
|
|
79
|
-
x.record.editable = false
|
|
80
|
-
})
|
|
76
|
+
x.sortable = false
|
|
77
|
+
x.record.editable = false
|
|
78
|
+
})
|
|
81
79
|
|
|
82
80
|
parentGristConfig.columns = [
|
|
83
|
-
{type: 'gutter', gutterName: 'dirty'},
|
|
84
|
-
MetaApi.getGristColumnConfig2('integer', 'dataRevisionNo','data_revision_no', 'center', false, true, 90),
|
|
85
|
-
MetaApi.getGristColumnConfig2('string', 'dataRevisionAction','data_revision_action', 'center', false, false, 90),
|
|
81
|
+
{ type: 'gutter', gutterName: 'dirty' },
|
|
82
|
+
MetaApi.getGristColumnConfig2('integer', 'dataRevisionNo', 'data_revision_no', 'center', false, true, 90),
|
|
83
|
+
MetaApi.getGristColumnConfig2('string', 'dataRevisionAction', 'data_revision_action', 'center', false, false, 90),
|
|
86
84
|
...gristColumns
|
|
87
85
|
]
|
|
88
86
|
|
|
89
|
-
this.gridConfig = parentGristConfig
|
|
87
|
+
this.gridConfig = parentGristConfig
|
|
90
88
|
|
|
91
89
|
if (super.connectedCallback) {
|
|
92
90
|
await super.connectedCallback()
|
|
@@ -98,14 +96,7 @@ export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
|
98
96
|
***************************
|
|
99
97
|
*/
|
|
100
98
|
render() {
|
|
101
|
-
return html`
|
|
102
|
-
<ox-grist
|
|
103
|
-
id="ox-grist"
|
|
104
|
-
.config=${this.gridConfig}
|
|
105
|
-
.mode=${'GRID'} auto-fetch
|
|
106
|
-
.fetchHandler=${this.fetchHandler.bind(this)}>
|
|
107
|
-
</ox-grist>
|
|
108
|
-
`
|
|
99
|
+
return html` <ox-grist id="ox-grist" .config=${this.gridConfig} .mode=${'GRID'} auto-fetch .fetchHandler=${this.fetchHandler.bind(this)}> </ox-grist> `
|
|
109
100
|
}
|
|
110
101
|
|
|
111
102
|
/**
|
|
@@ -120,14 +111,11 @@ export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
|
120
111
|
/**
|
|
121
112
|
* @description 이력 조회
|
|
122
113
|
***************************
|
|
123
|
-
* @returns
|
|
114
|
+
* @returns
|
|
124
115
|
*/
|
|
125
|
-
async fetchHandler({ page = 0, limit = 0, sortings = [], filters = [] }){
|
|
126
|
-
let filter = [
|
|
127
|
-
|
|
128
|
-
...filters
|
|
129
|
-
]
|
|
130
|
-
|
|
116
|
+
async fetchHandler({ page = 0, limit = 0, sortings = [], filters = [] }) {
|
|
117
|
+
let filter = [{ name: 'originalId', operator: 'eq', value: this.parent_id }, ...filters]
|
|
118
|
+
|
|
131
119
|
let selectFields = `
|
|
132
120
|
id
|
|
133
121
|
originalId
|
|
@@ -136,11 +124,11 @@ export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
|
136
124
|
historyJson
|
|
137
125
|
`
|
|
138
126
|
|
|
139
|
-
let result = await MetaApi.searchByPagination(`${this.gqlFunc}Histories`, filter, sortings, page, limit, selectFields)
|
|
127
|
+
let result = await MetaApi.searchByPagination(`${this.gqlFunc}Histories`, filter, sortings, page, limit, selectFields)
|
|
140
128
|
|
|
141
|
-
result.records = result.records.map(x=>{
|
|
129
|
+
result.records = result.records.map(x => {
|
|
142
130
|
return {
|
|
143
|
-
...
|
|
131
|
+
...JSON.parse(x.historyJson),
|
|
144
132
|
...x
|
|
145
133
|
}
|
|
146
134
|
})
|
|
@@ -148,4 +136,4 @@ export class HistoryJsonListPopup extends localize(i18next)(LitElement) {
|
|
|
148
136
|
}
|
|
149
137
|
}
|
|
150
138
|
|
|
151
|
-
customElements.define('history-json-list-popup', HistoryJsonListPopup)
|
|
139
|
+
customElements.define('history-json-list-popup', HistoryJsonListPopup)
|