@things-factory/reference-app 7.0.1-alpha.4 → 7.0.1-alpha.41
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 +1 -0
- package/client/bootstrap.js +17 -40
- package/client/editors/id-selector.js +8 -16
- package/client/pages/data-set/data-set-importer.js +4 -16
- package/client/pages/data-set/data-set-list-page.js +13 -24
- package/client/pages/grist-filters.ts +5 -6
- package/client/pages/grist-fulltext-search.ts +5 -6
- package/client/pages/grist-mode-page.js +5 -7
- package/client/pages/operation/operation-master.js +8 -9
- package/client/pages/pending-job-page.js +10 -9
- package/client/pages/product/product-master.js +9 -12
- package/client/themes/app-theme.css +19 -3
- package/client/themes/grist-theme.css +2 -2
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -35
- package/schema.graphql +86 -24
- package/views/auth-page.html +1 -0
- package/views/public/home.html +1 -0
package/_index.html
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
<!-- Performance tip: hint to the browser to start the handshake for the fonts site -->
|
|
53
53
|
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin />
|
|
54
54
|
<link href="/node_modules/@material-design-icons/font/index.css" rel="stylesheet" />
|
|
55
|
+
<link href="/node_modules/material-symbols/index.css" rel="stylesheet" />
|
|
55
56
|
|
|
56
57
|
<!-- Add any global styles for body, document, etc. -->
|
|
57
58
|
<style>
|
package/client/bootstrap.js
CHANGED
|
@@ -77,32 +77,11 @@ export default async function bootstrap() {
|
|
|
77
77
|
})
|
|
78
78
|
updateMenuTemplate(getMenuTemplate())
|
|
79
79
|
|
|
80
|
-
/* add top-menu app-tool */
|
|
81
|
-
// store.dispatch({
|
|
82
|
-
// type: APPEND_APP_TOOL,
|
|
83
|
-
// replace: 'title-bar',
|
|
84
|
-
// tool: {
|
|
85
|
-
// name: 'top-menu-bar',
|
|
86
|
-
// template: html` <top-menu-bar></top-menu-bar> `,
|
|
87
|
-
// position: TOOL_POSITION.CENTER
|
|
88
|
-
// }
|
|
89
|
-
// })
|
|
90
|
-
|
|
91
|
-
/* add top-menu app-tool */
|
|
92
|
-
// store.dispatch({
|
|
93
|
-
// type: APPEND_APP_TOOL,
|
|
94
|
-
// tool: {
|
|
95
|
-
// name: 'domain-switch',
|
|
96
|
-
// template: html` <domain-switch rounded-corner dark></domain-switch> `,
|
|
97
|
-
// position: TOOL_POSITION.REAR
|
|
98
|
-
// }
|
|
99
|
-
// })
|
|
100
|
-
|
|
101
80
|
/* add setting morenda */
|
|
102
81
|
store.dispatch({
|
|
103
82
|
type: ADD_MORENDA,
|
|
104
83
|
morenda: {
|
|
105
|
-
icon: html` <
|
|
84
|
+
icon: html` <md-icon>settings</md-icon> `,
|
|
106
85
|
name: html` <ox-i18n msgid="label.setting"></ox-i18n> `,
|
|
107
86
|
action: () => {
|
|
108
87
|
navigate('setting')
|
|
@@ -111,13 +90,11 @@ export default async function bootstrap() {
|
|
|
111
90
|
})
|
|
112
91
|
|
|
113
92
|
/* add addon-menu management page morenda */
|
|
114
|
-
if (
|
|
115
|
-
await hasPrivilege({ privilege: 'mutation', category: 'menu', domainOwnerGranted: true, superUserGranted: true })
|
|
116
|
-
) {
|
|
93
|
+
if (await hasPrivilege({ privilege: 'mutation', category: 'menu', domainOwnerGranted: true, superUserGranted: true })) {
|
|
117
94
|
store.dispatch({
|
|
118
95
|
type: ADD_MORENDA,
|
|
119
96
|
morenda: {
|
|
120
|
-
icon: html` <
|
|
97
|
+
icon: html` <md-icon>view_list</md-icon> `,
|
|
121
98
|
name: html` <ox-i18n msgid="text.addon-menu management"></ox-i18n> `,
|
|
122
99
|
action: () => {
|
|
123
100
|
navigate('addon-menu-setting')
|
|
@@ -133,7 +110,7 @@ export default async function bootstrap() {
|
|
|
133
110
|
store.dispatch({
|
|
134
111
|
type: ADD_MORENDA,
|
|
135
112
|
morenda: {
|
|
136
|
-
icon: html` <
|
|
113
|
+
icon: html` <md-icon>vpn_key</md-icon> `,
|
|
137
114
|
name: html` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
138
115
|
action: () => {
|
|
139
116
|
navigate('oauth2-clients')
|
|
@@ -146,7 +123,7 @@ export default async function bootstrap() {
|
|
|
146
123
|
store.dispatch({
|
|
147
124
|
type: ADD_MORENDA,
|
|
148
125
|
morenda: {
|
|
149
|
-
icon: html` <
|
|
126
|
+
icon: html` <md-icon>font_download</md-icon> `,
|
|
150
127
|
name: html` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
|
|
151
128
|
action: () => {
|
|
152
129
|
navigate('font-list')
|
|
@@ -157,7 +134,7 @@ export default async function bootstrap() {
|
|
|
157
134
|
store.dispatch({
|
|
158
135
|
type: ADD_MORENDA,
|
|
159
136
|
morenda: {
|
|
160
|
-
icon: html` <
|
|
137
|
+
icon: html` <md-icon>attachment</md-icon> `,
|
|
161
138
|
name: html` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
|
|
162
139
|
action: () => {
|
|
163
140
|
navigate('attachment-list')
|
|
@@ -168,7 +145,7 @@ export default async function bootstrap() {
|
|
|
168
145
|
store.dispatch({
|
|
169
146
|
type: ADD_MORENDA,
|
|
170
147
|
morenda: {
|
|
171
|
-
icon: html` <
|
|
148
|
+
icon: html` <md-icon>dvr</md-icon> `,
|
|
172
149
|
name: html` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
|
|
173
150
|
action: () => {
|
|
174
151
|
navigate('board-list')
|
|
@@ -179,7 +156,7 @@ export default async function bootstrap() {
|
|
|
179
156
|
store.dispatch({
|
|
180
157
|
type: ADD_MORENDA,
|
|
181
158
|
morenda: {
|
|
182
|
-
icon: html` <
|
|
159
|
+
icon: html` <md-icon>airplay</md-icon> `,
|
|
183
160
|
name: html` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
|
|
184
161
|
action: () => {
|
|
185
162
|
navigate('play-list')
|
|
@@ -192,7 +169,7 @@ export default async function bootstrap() {
|
|
|
192
169
|
store.dispatch({
|
|
193
170
|
type: ADD_MORENDA,
|
|
194
171
|
morenda: {
|
|
195
|
-
icon: html` <
|
|
172
|
+
icon: html` <md-icon>device_hub</md-icon> `,
|
|
196
173
|
name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
197
174
|
action: () => {
|
|
198
175
|
navigate('connection')
|
|
@@ -203,7 +180,7 @@ export default async function bootstrap() {
|
|
|
203
180
|
store.dispatch({
|
|
204
181
|
type: ADD_MORENDA,
|
|
205
182
|
morenda: {
|
|
206
|
-
icon: html` <
|
|
183
|
+
icon: html` <md-icon>format_list_numbered</md-icon> `,
|
|
207
184
|
name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
208
185
|
action: () => {
|
|
209
186
|
navigate('scenario')
|
|
@@ -214,7 +191,7 @@ export default async function bootstrap() {
|
|
|
214
191
|
store.dispatch({
|
|
215
192
|
type: ADD_MORENDA,
|
|
216
193
|
morenda: {
|
|
217
|
-
icon: html` <
|
|
194
|
+
icon: html` <md-icon>hub</md-icon> `,
|
|
218
195
|
name: html` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
219
196
|
action: () => {
|
|
220
197
|
navigate('integration-analysis')
|
|
@@ -227,7 +204,7 @@ export default async function bootstrap() {
|
|
|
227
204
|
store.dispatch({
|
|
228
205
|
type: ADD_MORENDA,
|
|
229
206
|
morenda: {
|
|
230
|
-
icon: html` <
|
|
207
|
+
icon: html` <md-icon>app_registration</md-icon> `,
|
|
231
208
|
name: html` <ox-i18n msgid="title.state-register"></ox-i18n> `,
|
|
232
209
|
action: () => {
|
|
233
210
|
navigate('state-register-page')
|
|
@@ -241,7 +218,7 @@ export default async function bootstrap() {
|
|
|
241
218
|
store.dispatch({
|
|
242
219
|
type: ADD_MORENDA,
|
|
243
220
|
morenda: {
|
|
244
|
-
icon: html` <
|
|
221
|
+
icon: html` <md-icon>pending_actions</md-icon> `,
|
|
245
222
|
name: html` <ox-i18n msgid="title.work-shift"></ox-i18n> `,
|
|
246
223
|
action: () => {
|
|
247
224
|
navigate('work-shift')
|
|
@@ -253,7 +230,7 @@ export default async function bootstrap() {
|
|
|
253
230
|
store.dispatch({
|
|
254
231
|
type: ADD_MORENDA,
|
|
255
232
|
morenda: {
|
|
256
|
-
icon: html` <
|
|
233
|
+
icon: html` <md-icon>extension</md-icon> `,
|
|
257
234
|
name: html` <ox-i18n msgid="text.api-sandbox"></ox-i18n> `,
|
|
258
235
|
action: () => {
|
|
259
236
|
navigate('api-swagger')
|
|
@@ -264,7 +241,7 @@ export default async function bootstrap() {
|
|
|
264
241
|
// store.dispatch({
|
|
265
242
|
// type: ADD_MORENDA,
|
|
266
243
|
// morenda: {
|
|
267
|
-
// icon: html` <
|
|
244
|
+
// icon: html` <md-icon>help</md-icon> `,
|
|
268
245
|
// name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
|
|
269
246
|
// action: () => {
|
|
270
247
|
// navigate('help')
|
|
@@ -295,14 +272,14 @@ export default async function bootstrap() {
|
|
|
295
272
|
tool: {
|
|
296
273
|
name: 'ocr-toggler',
|
|
297
274
|
template: html`
|
|
298
|
-
<
|
|
275
|
+
<md-icon
|
|
299
276
|
@click=${e => {
|
|
300
277
|
toggleOverlay('ocr-viewpart', {
|
|
301
278
|
backdrop: false
|
|
302
279
|
})
|
|
303
280
|
}}
|
|
304
281
|
>camera_enhance
|
|
305
|
-
</
|
|
282
|
+
</md-icon>
|
|
306
283
|
`,
|
|
307
284
|
position: TOOL_POSITION.REAR
|
|
308
285
|
}
|
|
@@ -2,9 +2,10 @@ import '@operato/data-grist'
|
|
|
2
2
|
|
|
3
3
|
import { css, html, LitElement } from 'lit'
|
|
4
4
|
|
|
5
|
-
import { MultiColumnFormStyles } from '@
|
|
6
|
-
import { i18next } from '@
|
|
7
|
-
import { isMobileDevice } from '@
|
|
5
|
+
import { MultiColumnFormStyles } from '@operato/form'
|
|
6
|
+
import { i18next } from '@operato/i18n'
|
|
7
|
+
import { isMobileDevice } from '@operato/utils'
|
|
8
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
8
9
|
|
|
9
10
|
export class IdSelector extends LitElement {
|
|
10
11
|
static get properties() {
|
|
@@ -21,6 +22,7 @@ export class IdSelector extends LitElement {
|
|
|
21
22
|
|
|
22
23
|
static get styles() {
|
|
23
24
|
return [
|
|
25
|
+
ButtonContainerStyles,
|
|
24
26
|
MultiColumnFormStyles,
|
|
25
27
|
css`
|
|
26
28
|
:host {
|
|
@@ -46,11 +48,6 @@ export class IdSelector extends LitElement {
|
|
|
46
48
|
#filters > * {
|
|
47
49
|
padding: var(--padding-default) var(--padding-wide);
|
|
48
50
|
}
|
|
49
|
-
|
|
50
|
-
.button-container {
|
|
51
|
-
display: flex;
|
|
52
|
-
margin-left: auto;
|
|
53
|
-
}
|
|
54
51
|
`
|
|
55
52
|
]
|
|
56
53
|
}
|
|
@@ -63,20 +60,15 @@ export class IdSelector extends LitElement {
|
|
|
63
60
|
|
|
64
61
|
render() {
|
|
65
62
|
return html`
|
|
66
|
-
<ox-grist
|
|
67
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
68
|
-
.config=${this.config}
|
|
69
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
70
|
-
.selectedRecords=${this.selectedRecords}
|
|
71
|
-
>
|
|
63
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.config} .fetchHandler=${this.fetchHandler.bind(this)} .selectedRecords=${this.selectedRecords}>
|
|
72
64
|
<div id="filters" slot="headroom">
|
|
73
65
|
<ox-filters-form autofocus></ox-filters-form>
|
|
74
66
|
</div>
|
|
75
67
|
</ox-grist>
|
|
76
68
|
|
|
77
69
|
<div class="button-container">
|
|
78
|
-
<
|
|
79
|
-
<
|
|
70
|
+
<button @click=${this.oncancel.bind(this)}><md-icon>cancel</md-icon>${i18next.t('button.cancel')}</button>
|
|
71
|
+
<button @click=${this.onconfirm.bind(this)}><md-icon>check</md-icon>${i18next.t('button.confirm')}</button>
|
|
80
72
|
</div>
|
|
81
73
|
`
|
|
82
74
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
1
2
|
import '@operato/data-grist'
|
|
2
3
|
|
|
3
4
|
import gql from 'graphql-tag'
|
|
@@ -6,6 +7,7 @@ import { css, html, LitElement } from 'lit'
|
|
|
6
7
|
import { client } from '@operato/graphql'
|
|
7
8
|
import { i18next } from '@operato/i18n'
|
|
8
9
|
import { isMobileDevice } from '@operato/utils'
|
|
10
|
+
import { ButtonContainerStyles } from '@operato/styles'
|
|
9
11
|
|
|
10
12
|
export class DataSetImporter extends LitElement {
|
|
11
13
|
static get properties() {
|
|
@@ -56,30 +58,16 @@ export class DataSetImporter extends LitElement {
|
|
|
56
58
|
ox-grist {
|
|
57
59
|
flex: 1;
|
|
58
60
|
}
|
|
59
|
-
|
|
60
|
-
.button-container {
|
|
61
|
-
display: flex;
|
|
62
|
-
margin-left: auto;
|
|
63
|
-
padding: var(--padding-default);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
mwc-button {
|
|
67
|
-
margin-left: var(--margin-default);
|
|
68
|
-
}
|
|
69
61
|
`
|
|
70
62
|
]
|
|
71
63
|
}
|
|
72
64
|
|
|
73
65
|
render() {
|
|
74
66
|
return html`
|
|
75
|
-
<ox-grist
|
|
76
|
-
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
77
|
-
.config=${this.columns}
|
|
78
|
-
.data="${{ records: this.scenarios }}"
|
|
79
|
-
></ox-grist>
|
|
67
|
+
<ox-grist .mode=${isMobileDevice() ? 'LIST' : 'GRID'} .config=${this.columns} .data="${{ records: this.scenarios }}"></ox-grist>
|
|
80
68
|
|
|
81
69
|
<div class="button-container">
|
|
82
|
-
<
|
|
70
|
+
<button @click="${this.save.bind(this)}"><md-icon>save</md-icon>${i18next.t('button.save')}</button>
|
|
83
71
|
</div>
|
|
84
72
|
`
|
|
85
73
|
}
|
|
@@ -177,12 +177,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
177
177
|
const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
|
|
178
178
|
|
|
179
179
|
return html`
|
|
180
|
-
<ox-grist
|
|
181
|
-
.mode=${mode}
|
|
182
|
-
.config=${this.gristConfig}
|
|
183
|
-
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
184
|
-
?url-params-sensitive=${this.active}
|
|
185
|
-
>
|
|
180
|
+
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)} ?url-params-sensitive=${this.active}>
|
|
186
181
|
<div slot="headroom">
|
|
187
182
|
<div id="filters">
|
|
188
183
|
<ox-filters-form autofocus></ox-filters-form>
|
|
@@ -190,7 +185,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
190
185
|
|
|
191
186
|
<div id="sorters">
|
|
192
187
|
Sort
|
|
193
|
-
<
|
|
188
|
+
<md-icon
|
|
194
189
|
@click=${e => {
|
|
195
190
|
const target = e.currentTarget
|
|
196
191
|
this.renderRoot.querySelector('#sorter-control').open({
|
|
@@ -198,7 +193,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
198
193
|
top: target.offsetTop + target.offsetHeight
|
|
199
194
|
})
|
|
200
195
|
}}
|
|
201
|
-
>expand_more</
|
|
196
|
+
>expand_more</md-icon
|
|
202
197
|
>
|
|
203
198
|
<ox-popup id="sorter-control">
|
|
204
199
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -206,9 +201,10 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
206
201
|
</div>
|
|
207
202
|
|
|
208
203
|
<div id="modes">
|
|
209
|
-
<
|
|
210
|
-
<
|
|
211
|
-
<
|
|
204
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
205
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</md-icon>
|
|
206
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
207
|
+
</div>
|
|
212
208
|
</div>
|
|
213
209
|
</div>
|
|
214
210
|
</ox-grist>
|
|
@@ -255,16 +251,11 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
255
251
|
title: 'data entry mockup form',
|
|
256
252
|
handlers: {
|
|
257
253
|
click: (columns, data, column, record, rowIndex) => {
|
|
258
|
-
openPopup(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
backdrop: true,
|
|
264
|
-
size: 'large',
|
|
265
|
-
title: i18next.t('title.data-entry-form')
|
|
266
|
-
}
|
|
267
|
-
)
|
|
254
|
+
openPopup(html` <data-entry-mockup-form .dataSet=${record} style="background-color: white;"></data-entry-mockup-form> `, {
|
|
255
|
+
backdrop: true,
|
|
256
|
+
size: 'large',
|
|
257
|
+
title: i18next.t('title.data-entry-form')
|
|
258
|
+
})
|
|
268
259
|
}
|
|
269
260
|
}
|
|
270
261
|
},
|
|
@@ -745,9 +736,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
|
745
736
|
...this.grist._config.columns
|
|
746
737
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
747
738
|
.reduce((record, column) => {
|
|
748
|
-
record[column.imex.key] = column.imex.key
|
|
749
|
-
.split('.')
|
|
750
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
739
|
+
record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
751
740
|
return record
|
|
752
741
|
}, {})
|
|
753
742
|
}
|
|
@@ -67,7 +67,7 @@ class GristFilters extends localize(i18next)(PageView) {
|
|
|
67
67
|
|
|
68
68
|
<div id="sorters">
|
|
69
69
|
Sort
|
|
70
|
-
<
|
|
70
|
+
<md-icon
|
|
71
71
|
@click=${e => {
|
|
72
72
|
const target = e.currentTarget
|
|
73
73
|
this.sorterControl.open({
|
|
@@ -75,7 +75,7 @@ class GristFilters extends localize(i18next)(PageView) {
|
|
|
75
75
|
top: target.offsetTop + target.offsetHeight
|
|
76
76
|
})
|
|
77
77
|
}}
|
|
78
|
-
>expand_more</
|
|
78
|
+
>expand_more</md-icon
|
|
79
79
|
>
|
|
80
80
|
<ox-popup id="sorter-control">
|
|
81
81
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -83,8 +83,8 @@ class GristFilters extends localize(i18next)(PageView) {
|
|
|
83
83
|
</div>
|
|
84
84
|
|
|
85
85
|
<div id="modes">
|
|
86
|
-
<
|
|
87
|
-
<
|
|
86
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
87
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
88
88
|
</div>
|
|
89
89
|
</div>
|
|
90
90
|
</ox-grist>
|
|
@@ -126,8 +126,7 @@ class GristFilters extends localize(i18next)(PageView) {
|
|
|
126
126
|
rate: Math.round(Math.random() * 100),
|
|
127
127
|
dynamicType: ['text', 'email', 'checkbox', 'color', 'progress', 'barcode'][idx % 5],
|
|
128
128
|
dynamicValue: ['abcdefghijkl', 'heartyoh@hatiolab.com', 'true', 'orange', '50', '1234567890'][idx % 5],
|
|
129
|
-
homepage:
|
|
130
|
-
idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
129
|
+
homepage: idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
131
130
|
createdAt: Date.now(),
|
|
132
131
|
updatedAt: Date.now()
|
|
133
132
|
}
|
|
@@ -298,7 +298,7 @@ class GristFulltextSearch extends localize(i18next)(PageView) {
|
|
|
298
298
|
|
|
299
299
|
<div id="sorters">
|
|
300
300
|
Sort
|
|
301
|
-
<
|
|
301
|
+
<md-icon
|
|
302
302
|
@click=${e => {
|
|
303
303
|
const target = e.currentTarget
|
|
304
304
|
this.sorterControl.open({
|
|
@@ -306,7 +306,7 @@ class GristFulltextSearch extends localize(i18next)(PageView) {
|
|
|
306
306
|
top: target.offsetTop + target.offsetHeight
|
|
307
307
|
})
|
|
308
308
|
}}
|
|
309
|
-
>expand_more</
|
|
309
|
+
>expand_more</md-icon
|
|
310
310
|
>
|
|
311
311
|
<ox-popup id="sorter-control">
|
|
312
312
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -314,8 +314,8 @@ class GristFulltextSearch extends localize(i18next)(PageView) {
|
|
|
314
314
|
</div>
|
|
315
315
|
|
|
316
316
|
<div id="modes">
|
|
317
|
-
<
|
|
318
|
-
<
|
|
317
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
318
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
319
319
|
</div>
|
|
320
320
|
</div>
|
|
321
321
|
</ox-grist>
|
|
@@ -357,8 +357,7 @@ class GristFulltextSearch extends localize(i18next)(PageView) {
|
|
|
357
357
|
rate: Math.round(Math.random() * 100),
|
|
358
358
|
dynamicType: ['text', 'email', 'checkbox', 'color', 'progress', 'barcode'][idx % 5],
|
|
359
359
|
dynamicValue: ['abcdefghijkl', 'heartyoh@hatiolab.com', 'true', 'orange', '50', '1234567890'][idx % 5],
|
|
360
|
-
homepage:
|
|
361
|
-
idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
360
|
+
homepage: idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
362
361
|
createdAt: Date.now(),
|
|
363
362
|
updatedAt: Date.now()
|
|
364
363
|
}
|
|
@@ -85,9 +85,9 @@ class GristModePage extends localize(i18next)(PageView) {
|
|
|
85
85
|
<div slot="headroom" id="headroom">
|
|
86
86
|
<h1>HEAD ROOM AREA</h1>
|
|
87
87
|
<div id="modes">
|
|
88
|
-
<
|
|
89
|
-
<
|
|
90
|
-
<
|
|
88
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
|
|
89
|
+
<md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
|
|
90
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
91
91
|
</div>
|
|
92
92
|
<div id="tailer">
|
|
93
93
|
<span
|
|
@@ -210,8 +210,7 @@ class GristModePage extends localize(i18next)(PageView) {
|
|
|
210
210
|
rate: Math.round(Math.random() * 100),
|
|
211
211
|
dynamicType: ['text', 'email', 'checkbox', 'color', 'progress', 'barcode'][idx % 5],
|
|
212
212
|
dynamicValue: ['abcdefghijkl', 'heartyoh@hatiolab.com', 'true', 'orange', '50', '1234567890'][idx % 5],
|
|
213
|
-
homepage:
|
|
214
|
-
idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
213
|
+
homepage: idx % 2 ? `http://hatiolab.com/${start + idx + 1}` : `http://deadpool.hatiolab.com/${start + idx + 1}`,
|
|
215
214
|
json5: {
|
|
216
215
|
abc: 'abc',
|
|
217
216
|
value: 123
|
|
@@ -419,8 +418,7 @@ class GristModePage extends localize(i18next)(PageView) {
|
|
|
419
418
|
},
|
|
420
419
|
classifier: function (record, rowIndex) {
|
|
421
420
|
const rate = record['rate']
|
|
422
|
-
const emphasized =
|
|
423
|
-
rate < 10 ? ['black', 'white'] : rate < 25 ? ['yellow', 'blue'] : rate < 40 ? ['cyan', 'red'] : undefined
|
|
421
|
+
const emphasized = rate < 10 ? ['black', 'white'] : rate < 25 ? ['yellow', 'blue'] : rate < 40 ? ['cyan', 'red'] : undefined
|
|
424
422
|
return {
|
|
425
423
|
emphasized
|
|
426
424
|
}
|
|
@@ -11,7 +11,7 @@ import { i18next, localize } from '@operato/i18n'
|
|
|
11
11
|
import { openPopup } from '@operato/layout'
|
|
12
12
|
import { CommonButtonStyles, CommonGristStyles } from '@operato/styles'
|
|
13
13
|
import { isMobileDevice } from '@operato/utils'
|
|
14
|
-
import { CustomAlert, PageView } from '@
|
|
14
|
+
import { CustomAlert, PageView } from '@operato/shell'
|
|
15
15
|
|
|
16
16
|
import { createOperation, deleteOperations, fetchOperations, saveOperations } from './operation-api'
|
|
17
17
|
|
|
@@ -46,6 +46,7 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
46
46
|
constructor() {
|
|
47
47
|
super()
|
|
48
48
|
this.mode = isMobileDevice() ? 'CARD' : 'GRID'
|
|
49
|
+
this.importHandler = this.defaultImportHandler
|
|
49
50
|
}
|
|
50
51
|
|
|
51
52
|
render() {
|
|
@@ -60,7 +61,7 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
60
61
|
|
|
61
62
|
<div id="sorters">
|
|
62
63
|
Sort
|
|
63
|
-
<
|
|
64
|
+
<md-icon
|
|
64
65
|
@click=${e => {
|
|
65
66
|
const target = e.currentTarget
|
|
66
67
|
this.renderRoot.querySelector('#sorter-control').open({
|
|
@@ -68,7 +69,7 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
68
69
|
top: target.offsetTop + target.offsetHeight
|
|
69
70
|
})
|
|
70
71
|
}}
|
|
71
|
-
>expand_more</
|
|
72
|
+
>expand_more</md-icon
|
|
72
73
|
>
|
|
73
74
|
<ox-popup id="sorter-control">
|
|
74
75
|
<ox-sorters-control> </ox-sorters-control>
|
|
@@ -76,8 +77,8 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
76
77
|
</div>
|
|
77
78
|
|
|
78
79
|
<div id="modes">
|
|
79
|
-
<
|
|
80
|
-
<
|
|
80
|
+
<md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
|
|
81
|
+
<md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
|
|
81
82
|
</div>
|
|
82
83
|
|
|
83
84
|
<ox-record-creator id="add" .callback=${this.operationCreationCallback.bind(this)}>
|
|
@@ -292,7 +293,7 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
|
|
295
|
-
async
|
|
296
|
+
async defaultImportHandler(patches) {
|
|
296
297
|
const response = await saveOperations(patches)
|
|
297
298
|
|
|
298
299
|
if (!response.errors) {
|
|
@@ -417,9 +418,7 @@ class OperationMaster extends localize(i18next)(PageView) {
|
|
|
417
418
|
...this._columns
|
|
418
419
|
.filter(column => column.type !== 'gutter' && column.record !== undefined && column.imex !== undefined)
|
|
419
420
|
.reduce((record, column) => {
|
|
420
|
-
record[column.imex.key] = column.imex.key
|
|
421
|
-
.split('.')
|
|
422
|
-
.reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
421
|
+
record[column.imex.key] = column.imex.key.split('.').reduce((obj, key) => (obj && obj[key] !== 'undefined' ? obj[key] : undefined), item)
|
|
423
422
|
return record
|
|
424
423
|
}, {})
|
|
425
424
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '@material/mwc-linear-progress'
|
|
2
2
|
import '@operato/help/ox-help-icon.js'
|
|
3
|
+
import '@operato/oops/ox-oops-progress.js'
|
|
3
4
|
|
|
4
5
|
import gql from 'graphql-tag'
|
|
5
6
|
import { css, html } from 'lit'
|
|
@@ -48,19 +49,19 @@ class PendingJobPage extends connect(store)(PageView) {
|
|
|
48
49
|
|
|
49
50
|
return html`
|
|
50
51
|
<p>
|
|
51
|
-
오래걸리는 서버작업을 수행할 때는 진행과정을 표현해주는 것이 사용자 경험에 도움을 준다. 이를 위해 Things Factory
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
오래걸리는 서버작업을 수행할 때는 진행과정을 표현해주는 것이 사용자 경험에 도움을 준다. 이를 위해 Things Factory 프레임워크에서는 ox-oops-progress<ox-help-icon
|
|
53
|
+
topic="components/ox-oops-progress"
|
|
54
|
+
></ox-help-icon>
|
|
55
|
+
라는 컴포넌트를 제공한다.
|
|
54
56
|
</p>
|
|
55
57
|
<p>
|
|
56
|
-
아래 'Start' 버튼을 클릭하면, 서버에 작업을 요청하고 그 진행율이 화면에 표현된다. 진행중에는 버튼은 'Stop'
|
|
57
|
-
|
|
58
|
-
주의할 점은, 'Stop' 버튼으로 서버의 작업을 변경하는 것은 아니고, 진행율 구독만을 정지한다는 것이다. 서버
|
|
58
|
+
아래 'Start' 버튼을 클릭하면, 서버에 작업을 요청하고 그 진행율이 화면에 표현된다. 진행중에는 버튼은 'Stop' 버튼으로 변경되면, 진행중에 버튼을 누르면 진행율 표현이
|
|
59
|
+
멈추게 된다. 진행이 완료되면, 'Start' 버튼으로 변경된다. 주의할 점은, 'Stop' 버튼으로 서버의 작업을 변경하는 것은 아니고, 진행율 구독만을 정지한다는 것이다. 서버
|
|
59
60
|
작업까지 정지하고자하면, 별도의 mutation을 구현해서 Stop시에 호출해주어야 한다.
|
|
60
61
|
</p>
|
|
61
62
|
|
|
62
63
|
<section>
|
|
63
|
-
<oops-progress
|
|
64
|
+
<ox-oops-progress
|
|
64
65
|
@progress=${e => {
|
|
65
66
|
this.progress = e.detail
|
|
66
67
|
}}
|
|
@@ -73,14 +74,14 @@ class PendingJobPage extends connect(store)(PageView) {
|
|
|
73
74
|
<mwc-linear-progress .progress=${progress / 100}></mwc-linear-progress>
|
|
74
75
|
<span>Progress : ${progress} % (${message})</span>
|
|
75
76
|
</div>
|
|
76
|
-
</oops-progress>
|
|
77
|
+
</ox-oops-progress>
|
|
77
78
|
<div id="result"></div>
|
|
78
79
|
</section>
|
|
79
80
|
`
|
|
80
81
|
}
|
|
81
82
|
|
|
82
83
|
get oopsProgress() {
|
|
83
|
-
return this.shadowRoot.querySelector('oops-progress')
|
|
84
|
+
return this.shadowRoot.querySelector('ox-oops-progress')
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
updated(changes) {
|