@things-factory/reference-app 4.0.36 → 4.0.40
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { css, html, LitElement } from 'lit-element'
|
|
4
4
|
|
|
5
5
|
import { MultiColumnFormStyles } from '@things-factory/form-ui'
|
|
6
6
|
import { i18next } from '@things-factory/i18n-base'
|
|
@@ -37,18 +37,19 @@ export class IdSelector extends LitElement {
|
|
|
37
37
|
flex: 1;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
|
|
40
|
+
#filters {
|
|
41
41
|
display: flex;
|
|
42
|
-
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
justify-content: space-between;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
#filters > * {
|
|
47
|
+
padding: var(--padding-default) var(--padding-wide);
|
|
47
48
|
}
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
.button-container {
|
|
51
|
+
display: flex;
|
|
52
|
+
margin-left: auto;
|
|
52
53
|
}
|
|
53
54
|
`
|
|
54
55
|
]
|
|
@@ -62,38 +63,16 @@ export class IdSelector extends LitElement {
|
|
|
62
63
|
|
|
63
64
|
render() {
|
|
64
65
|
return html`
|
|
65
|
-
<form
|
|
66
|
-
class="multi-column-form"
|
|
67
|
-
id="search-form"
|
|
68
|
-
@keypress=${async e => {
|
|
69
|
-
if (e.keyCode === 13) {
|
|
70
|
-
this.data = await this.getData()
|
|
71
|
-
}
|
|
72
|
-
}}
|
|
73
|
-
>
|
|
74
|
-
<fieldset>
|
|
75
|
-
<label>${i18next.t('field.name')}</label>
|
|
76
|
-
<input name="name" />
|
|
77
|
-
|
|
78
|
-
<label>${i18next.t('field.description')}</label>
|
|
79
|
-
<input name="description" />
|
|
80
|
-
</fieldset>
|
|
81
|
-
|
|
82
|
-
<mwc-icon
|
|
83
|
-
search
|
|
84
|
-
@click="${async () => {
|
|
85
|
-
this.data = await this.getData()
|
|
86
|
-
}}}"
|
|
87
|
-
>search</mwc-icon
|
|
88
|
-
>
|
|
89
|
-
</form>
|
|
90
|
-
|
|
91
66
|
<ox-grist
|
|
92
67
|
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
93
68
|
.config=${this.config}
|
|
94
69
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
95
70
|
.selectedRecords=${this.selectedRecords}
|
|
96
|
-
|
|
71
|
+
>
|
|
72
|
+
<div id="filters" slot="headless">
|
|
73
|
+
<ox-filters-form @change=${e => this.grist.fetch()}></ox-filters-form>
|
|
74
|
+
</div>
|
|
75
|
+
</ox-grist>
|
|
97
76
|
|
|
98
77
|
<div class="button-container">
|
|
99
78
|
<mwc-button @click=${this.oncancel.bind(this)}>${i18next.t('button.cancel')}</mwc-button>
|
|
@@ -136,6 +115,7 @@ export class IdSelector extends LitElement {
|
|
|
136
115
|
record: {
|
|
137
116
|
align: 'left'
|
|
138
117
|
},
|
|
118
|
+
filter: 'search',
|
|
139
119
|
sortable: true,
|
|
140
120
|
width: 160
|
|
141
121
|
},
|
|
@@ -146,6 +126,7 @@ export class IdSelector extends LitElement {
|
|
|
146
126
|
record: {
|
|
147
127
|
align: 'left'
|
|
148
128
|
},
|
|
129
|
+
filter: 'search',
|
|
149
130
|
sortable: true,
|
|
150
131
|
width: 300
|
|
151
132
|
}
|
|
@@ -168,22 +149,30 @@ export class IdSelector extends LitElement {
|
|
|
168
149
|
/* TODO config가 설정될 때, fetch() 가 동작하므로, fetch 완료 이벤트를 받아서, selected를 설정해주는 것이 좋겠다.
|
|
169
150
|
현재는 fetch() 가 두번 일어난다.
|
|
170
151
|
*/
|
|
171
|
-
|
|
172
|
-
await grist.fetch()
|
|
152
|
+
await this.grist.fetch()
|
|
173
153
|
|
|
174
|
-
var selected = grist.data.records.find(item => this.value == item.id)
|
|
154
|
+
var selected = this.grist.data.records.find(item => this.value == item.id)
|
|
175
155
|
if (selected) {
|
|
176
156
|
this.selectedRecords = [selected]
|
|
177
157
|
}
|
|
178
158
|
/* TODO config가 설정될 때, fetch() 가 동작하므로, fetch 완료 이벤트를 받아서, selected를 설정해주는 것이 좋겠다. */
|
|
179
159
|
|
|
180
160
|
await this.updateComplete
|
|
181
|
-
grist.focus()
|
|
161
|
+
this.grist.focus()
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
get grist() {
|
|
165
|
+
return this.renderRoot.querySelector('ox-grist')
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
get filtersForm() {
|
|
169
|
+
return this.renderRoot.querySelector('ox-filters-form')
|
|
182
170
|
}
|
|
183
171
|
|
|
184
172
|
async fetchHandler({ page, limit, sorters = [] }) {
|
|
185
173
|
var total = 3401
|
|
186
174
|
var start = (page - 1) * limit
|
|
175
|
+
// const filter = await this.filtersForm.getQueryFilters()
|
|
187
176
|
|
|
188
177
|
return {
|
|
189
178
|
total,
|
|
@@ -210,7 +199,7 @@ export class IdSelector extends LitElement {
|
|
|
210
199
|
}
|
|
211
200
|
|
|
212
201
|
serializeFormData() {
|
|
213
|
-
const searchInputs = Array.from(this.
|
|
202
|
+
const searchInputs = Array.from(this.renderRoot.querySelectorAll('#search-form > input'))
|
|
214
203
|
return searchInputs
|
|
215
204
|
.filter(input => input.value)
|
|
216
205
|
.map(input => {
|
|
@@ -219,7 +208,7 @@ export class IdSelector extends LitElement {
|
|
|
219
208
|
}
|
|
220
209
|
|
|
221
210
|
get selected() {
|
|
222
|
-
var grist = this.
|
|
211
|
+
var grist = this.renderRoot.querySelector('ox-grist')
|
|
223
212
|
|
|
224
213
|
var selected = grist.selected
|
|
225
214
|
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { css, html } from 'lit-element'
|
|
2
|
+
|
|
2
3
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
3
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
|
-
|
|
5
5
|
import { PageView } from '@things-factory/shell'
|
|
6
6
|
import { isMobileDevice } from '@things-factory/utils'
|
|
7
|
+
|
|
7
8
|
import { referencePageStyles } from './reference-page-styles'
|
|
8
9
|
|
|
9
10
|
class GristColorizing extends localize(i18next)(PageView) {
|
|
@@ -48,7 +49,7 @@ class GristColorizing extends localize(i18next)(PageView) {
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
get grist() {
|
|
51
|
-
return this.
|
|
52
|
+
return this.renderRoot.querySelector('ox-grist')
|
|
52
53
|
}
|
|
53
54
|
|
|
54
55
|
render() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { css, html } from 'lit-element'
|
|
2
|
+
|
|
2
3
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
3
4
|
import { i18next, localize } from '@things-factory/i18n-base'
|
|
4
|
-
|
|
5
5
|
import { PageView } from '@things-factory/shell'
|
|
6
6
|
import { isMobileDevice } from '@things-factory/utils'
|
|
7
7
|
|
|
@@ -39,7 +39,7 @@ class GristPage extends localize(i18next)(PageView) {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
get grist() {
|
|
42
|
-
return this.
|
|
42
|
+
return this.renderRoot.querySelector('ox-grist')
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
render() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/reference-app",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.40",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"browser": "client/index.js",
|
|
6
6
|
"things-factory": true,
|
|
@@ -37,51 +37,51 @@
|
|
|
37
37
|
"docker:run": "docker run -it -p 4000:3000 hatiolab/reference-app:latest"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@hatiolab/things-scene": "^2.7.
|
|
40
|
+
"@hatiolab/things-scene": "^2.7.33",
|
|
41
41
|
"@material/mwc-checkbox": "^0.25.3",
|
|
42
|
-
"@operato/data-grist": "^0.3.
|
|
43
|
-
"@operato/ghost-print": "^0.3.
|
|
44
|
-
"@operato/input": "^0.3.
|
|
45
|
-
"@operato/ocr": "^0.3.
|
|
46
|
-
"@operato/popup": "^0.3.
|
|
47
|
-
"@operato/pull-to-refresh": "^0.3.
|
|
48
|
-
"@operato/scene-chartjs": "^0.1.
|
|
49
|
-
"@operato/scene-clock": "^0.1.
|
|
50
|
-
"@operato/scene-gauge": "^0.1.
|
|
51
|
-
"@operato/scene-indoor-map": "^0.1.
|
|
52
|
-
"@operato/scene-progressbar": "^0.1.
|
|
53
|
-
"@operato/scene-random": "^0.1.
|
|
54
|
-
"@operato/scene-switch": "^0.1.
|
|
55
|
-
"@operato/scene-tab": "^0.1.
|
|
56
|
-
"@things-factory/api": "^4.0.
|
|
57
|
-
"@things-factory/apptool-ui": "^4.0.
|
|
58
|
-
"@things-factory/auth-ui": "^4.0.
|
|
59
|
-
"@things-factory/board-service": "^4.0.
|
|
60
|
-
"@things-factory/board-ui": "^4.0.
|
|
61
|
-
"@things-factory/context-ui": "^4.0.
|
|
62
|
-
"@things-factory/dashboard": "^4.0.
|
|
63
|
-
"@things-factory/export-ui": "^4.0.
|
|
64
|
-
"@things-factory/export-ui-excel": "^4.0.
|
|
65
|
-
"@things-factory/grist-ui": "^4.0.
|
|
66
|
-
"@things-factory/help": "^4.0.
|
|
67
|
-
"@things-factory/i18n-ui": "^4.0.
|
|
68
|
-
"@things-factory/integration-ui": "^4.0.
|
|
69
|
-
"@things-factory/lite-menu": "^4.0.
|
|
70
|
-
"@things-factory/more-ui": "^4.0.
|
|
71
|
-
"@things-factory/notification": "^4.0.
|
|
72
|
-
"@things-factory/oauth2-client": "^4.0.
|
|
73
|
-
"@things-factory/print-ui": "^4.0.
|
|
74
|
-
"@things-factory/resource-ui": "^4.0.
|
|
75
|
-
"@things-factory/scene-form": "^4.0.
|
|
42
|
+
"@operato/data-grist": "^0.3.20",
|
|
43
|
+
"@operato/ghost-print": "^0.3.20",
|
|
44
|
+
"@operato/input": "^0.3.20",
|
|
45
|
+
"@operato/ocr": "^0.3.20",
|
|
46
|
+
"@operato/popup": "^0.3.20",
|
|
47
|
+
"@operato/pull-to-refresh": "^0.3.20",
|
|
48
|
+
"@operato/scene-chartjs": "^0.1.3",
|
|
49
|
+
"@operato/scene-clock": "^0.1.3",
|
|
50
|
+
"@operato/scene-gauge": "^0.1.3",
|
|
51
|
+
"@operato/scene-indoor-map": "^0.1.3",
|
|
52
|
+
"@operato/scene-progressbar": "^0.1.3",
|
|
53
|
+
"@operato/scene-random": "^0.1.3",
|
|
54
|
+
"@operato/scene-switch": "^0.1.3",
|
|
55
|
+
"@operato/scene-tab": "^0.1.3",
|
|
56
|
+
"@things-factory/api": "^4.0.40",
|
|
57
|
+
"@things-factory/apptool-ui": "^4.0.40",
|
|
58
|
+
"@things-factory/auth-ui": "^4.0.40",
|
|
59
|
+
"@things-factory/board-service": "^4.0.40",
|
|
60
|
+
"@things-factory/board-ui": "^4.0.40",
|
|
61
|
+
"@things-factory/context-ui": "^4.0.40",
|
|
62
|
+
"@things-factory/dashboard": "^4.0.40",
|
|
63
|
+
"@things-factory/export-ui": "^4.0.40",
|
|
64
|
+
"@things-factory/export-ui-excel": "^4.0.40",
|
|
65
|
+
"@things-factory/grist-ui": "^4.0.40",
|
|
66
|
+
"@things-factory/help": "^4.0.40",
|
|
67
|
+
"@things-factory/i18n-ui": "^4.0.40",
|
|
68
|
+
"@things-factory/integration-ui": "^4.0.40",
|
|
69
|
+
"@things-factory/lite-menu": "^4.0.40",
|
|
70
|
+
"@things-factory/more-ui": "^4.0.40",
|
|
71
|
+
"@things-factory/notification": "^4.0.40",
|
|
72
|
+
"@things-factory/oauth2-client": "^4.0.40",
|
|
73
|
+
"@things-factory/print-ui": "^4.0.40",
|
|
74
|
+
"@things-factory/resource-ui": "^4.0.40",
|
|
75
|
+
"@things-factory/scene-form": "^4.0.40",
|
|
76
76
|
"@things-factory/scene-half-roundrect": "^4.0.9",
|
|
77
|
-
"@things-factory/scene-news-ticker": "^4.0.
|
|
78
|
-
"@things-factory/setting-base": "^4.0.
|
|
79
|
-
"@things-factory/setting-ui": "^4.0.
|
|
80
|
-
"@things-factory/shell": "^4.0.
|
|
81
|
-
"@things-factory/system-ui": "^4.0.
|
|
77
|
+
"@things-factory/scene-news-ticker": "^4.0.40",
|
|
78
|
+
"@things-factory/setting-base": "^4.0.40",
|
|
79
|
+
"@things-factory/setting-ui": "^4.0.40",
|
|
80
|
+
"@things-factory/shell": "^4.0.40",
|
|
81
|
+
"@things-factory/system-ui": "^4.0.40"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
|
-
"@things-factory/builder": "^4.0.
|
|
84
|
+
"@things-factory/builder": "^4.0.40"
|
|
85
85
|
},
|
|
86
|
-
"gitHead": "
|
|
86
|
+
"gitHead": "f0697b5ab411e4aa1a52de19a6c135f39686eca1"
|
|
87
87
|
}
|