@things-factory/reference-app 7.0.0-y.0 → 7.0.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.
Files changed (77) hide show
  1. package/_index.html +7 -31
  2. package/client/bootstrap.js +38 -51
  3. package/client/components/camera-capturer.js +10 -8
  4. package/client/components/ocr-viewpart.js +1 -1
  5. package/client/editors/id-editor.js +3 -3
  6. package/client/editors/id-selector.js +9 -12
  7. package/client/pages/context-menu-page.js +13 -13
  8. package/client/pages/context-page.js +1 -1
  9. package/client/pages/data-entry/data-entry-generator-popup.js +3 -3
  10. package/client/pages/data-entry/data-entry-mockup-form.js +3 -3
  11. package/client/pages/data-set/data-item-list.js +3 -3
  12. package/client/pages/data-set/data-set-importer.js +4 -12
  13. package/client/pages/data-set/data-set-list-page.js +14 -25
  14. package/client/pages/direct-print.js +1 -1
  15. package/client/pages/ghost-print-page.js +1 -1
  16. package/client/pages/grist-colorizing.js +4 -3
  17. package/client/pages/grist-filters.ts +5 -6
  18. package/client/pages/grist-fulltext-search.ts +5 -6
  19. package/client/pages/grist-mode-page.js +24 -23
  20. package/client/pages/grist-page.js +3 -3
  21. package/client/pages/label-scan-page.js +1 -1
  22. package/client/pages/layout-group-page.js +1 -1
  23. package/client/pages/main.js +1 -1
  24. package/client/pages/menu-page.js +2 -2
  25. package/client/pages/operation/operation-master.js +11 -8
  26. package/client/pages/pending-job-page.js +10 -9
  27. package/client/pages/product/product-master.js +8 -7
  28. package/client/pages/product-combinations-popup.js +2 -2
  29. package/client/pages/product-details-popup.js +1 -1
  30. package/client/pages/reference-page-styles.js +7 -7
  31. package/client/pages/report-page.js +2 -2
  32. package/client/pages/web-editor-editorjs-page.js +1 -1
  33. package/client/pages/web-editor-jodit-page.js +1 -1
  34. package/client/pages/web-editor-lexical-page.js +1 -1
  35. package/client/pages/web-editor-tinymce-page.js +1 -1
  36. package/client/pages/web-editor-tui-page.js +1 -1
  37. package/client/renderers/barcode-renderer.js +1 -1
  38. package/config/config.development.js +0 -3
  39. package/dist-server/constants/index.d.ts +1 -0
  40. package/dist-server/constants/type-constants.d.ts +22 -0
  41. package/dist-server/controllers/create-data-sample-mockup.d.ts +2 -0
  42. package/dist-server/controllers/create-data-sample-mockup.js +1 -2
  43. package/dist-server/controllers/create-data-sample-mockup.js.map +1 -1
  44. package/dist-server/controllers/index.d.ts +1 -0
  45. package/dist-server/index.d.ts +4 -0
  46. package/dist-server/middlewares/index.d.ts +1 -0
  47. package/dist-server/middlewares/index.js +1 -2
  48. package/dist-server/middlewares/index.js.map +1 -1
  49. package/dist-server/migrations/index.d.ts +1 -0
  50. package/dist-server/routes.d.ts +0 -0
  51. package/dist-server/service/data-sample-mockup/data-sample-mockup-mutation.d.ts +4 -0
  52. package/dist-server/service/data-sample-mockup/data-sample-mockup-mutation.js +2 -2
  53. package/dist-server/service/data-sample-mockup/data-sample-mockup-mutation.js.map +1 -1
  54. package/dist-server/service/data-sample-mockup/data-sample-mockup-type.d.ts +4 -0
  55. package/dist-server/service/data-sample-mockup/data-sample-mockup-type.js +2 -2
  56. package/dist-server/service/data-sample-mockup/data-sample-mockup-type.js.map +1 -1
  57. package/dist-server/service/data-sample-mockup/index.d.ts +3 -0
  58. package/dist-server/service/index.d.ts +4 -0
  59. package/dist-server/service/reference/index.d.ts +4 -0
  60. package/dist-server/service/reference/lambda-call.d.ts +1 -0
  61. package/dist-server/service/reference/lambda-call.js +1 -2
  62. package/dist-server/service/reference/lambda-call.js.map +1 -1
  63. package/dist-server/service/reference/reference-mutation.d.ts +5 -0
  64. package/dist-server/service/reference/reference-mutation.js +2 -2
  65. package/dist-server/service/reference/reference-mutation.js.map +1 -1
  66. package/dist-server/service/reference/reference-query.d.ts +7 -0
  67. package/dist-server/service/reference/reference-query.js +2 -2
  68. package/dist-server/service/reference/reference-query.js.map +1 -1
  69. package/dist-server/tsconfig.tsbuildinfo +1 -1
  70. package/package.json +63 -61
  71. package/schema.graphql +86 -24
  72. package/views/auth-page.html +5 -2
  73. package/views/public/home.html +6 -3
  74. package/client/themes/app-theme.css +0 -145
  75. package/client/themes/grist-theme.css +0 -217
  76. package/client/themes/layout-theme.css +0 -92
  77. package/client/themes/report-theme.css +0 -47
@@ -5,7 +5,7 @@ import '../data-entry/data-entry-mockup-form.js'
5
5
 
6
6
  import gql from 'graphql-tag'
7
7
  import { css, html } from 'lit'
8
- import moment from 'moment-timezone'
8
+ import moment from '@operato/moment-timezone-es'
9
9
  import { connect } from 'pwa-helpers/connect-mixin'
10
10
 
11
11
  import { getEditor, getRenderer } from '@operato/data-grist'
@@ -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
- <mwc-icon
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</mwc-icon
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
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
210
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
211
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
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
- html`
260
- <data-entry-mockup-form .dataSet=${record} style="background-color: white;"></data-entry-mockup-form>
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
  }
@@ -2,7 +2,7 @@ import { css, html } from 'lit'
2
2
  import { connect } from 'pwa-helpers/connect-mixin.js'
3
3
 
4
4
  import { DirectPrinter } from '@things-factory/barcode-base'
5
- import { PageView, store } from '@things-factory/shell'
5
+ import { PageView, store } from '@operato/shell'
6
6
  import { CommonButtonStyles } from '@things-factory/styles'
7
7
 
8
8
  import { ReferencePageStyles } from './reference-page-styles'
@@ -2,7 +2,7 @@ import { css, html } from 'lit'
2
2
  import { connect } from 'pwa-helpers/connect-mixin.js'
3
3
 
4
4
  import { GhostPrint } from '@operato/ghost-print'
5
- import { PageView, store } from '@things-factory/shell'
5
+ import { PageView, store } from '@operato/shell'
6
6
  import { CommonButtonStyles } from '@things-factory/styles'
7
7
 
8
8
  import { ReferencePageStyles } from './reference-page-styles'
@@ -1,9 +1,10 @@
1
1
  import { css, html } from 'lit'
2
+
3
+ import { PageView } from '@operato/shell'
4
+ import { i18next, localize } from '@operato/i18n'
2
5
  import { getEditor, getRenderer } from '@operato/data-grist'
3
- import { i18next, localize } from '@things-factory/i18n-base'
6
+ import { isMobileDevice } from '@operato/utils'
4
7
 
5
- import { PageView } from '@things-factory/shell'
6
- import { isMobileDevice } from '@things-factory/utils'
7
8
  import { ReferencePageStyles } from './reference-page-styles'
8
9
 
9
10
  class GristColorizing extends localize(i18next)(PageView) {
@@ -67,7 +67,7 @@ class GristFilters extends localize(i18next)(PageView) {
67
67
 
68
68
  <div id="sorters">
69
69
  Sort
70
- <mwc-icon
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</mwc-icon
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
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
87
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
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
- <mwc-icon
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</mwc-icon
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
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
318
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
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
  }
@@ -1,10 +1,11 @@
1
+ import '@material/web/icon/icon.js'
1
2
  import '@operato/popup/ox-popup-list.js'
2
3
  import '@operato/data-grist'
3
4
 
4
5
  import { css, html } from 'lit'
5
6
 
6
- import { i18next, localize } from '@things-factory/i18n-base'
7
- import { PageView } from '@things-factory/shell'
7
+ import { i18next, localize } from '@operato/i18n'
8
+ import { PageView } from '@operato/shell'
8
9
 
9
10
  class GristModePage extends localize(i18next)(PageView) {
10
11
  static get styles() {
@@ -29,20 +30,20 @@ class GristModePage extends localize(i18next)(PageView) {
29
30
  #headroom {
30
31
  display: flex;
31
32
  flex-direction: column;
32
- background-color: var(--primary-color);
33
+ background-color: var(--md-sys-color-primary);
33
34
  height: 200px;
34
35
  align-items: center;
35
36
  justify-content: center;
36
- color: var(--theme-white-color);
37
+ color: var(--md-sys-color-on-primary);
37
38
  }
38
39
 
39
40
  #modes > * {
40
- padding: var(--padding-narrow);
41
+ padding: var(--spacing-small);
41
42
  font-size: 1.5em;
42
43
  opacity: 0.7;
43
44
  }
44
45
 
45
- #modes > mwc-icon[active] {
46
+ #modes > md-icon[active] {
46
47
  border: 1px solid var(--status-warning-color);
47
48
  border-radius: 9px;
48
49
  background-color: rgba(0, 0, 0, 0.3);
@@ -85,9 +86,9 @@ class GristModePage extends localize(i18next)(PageView) {
85
86
  <div slot="headroom" id="headroom">
86
87
  <h1>HEAD ROOM AREA</h1>
87
88
  <div id="modes">
88
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</mwc-icon>
89
- <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</mwc-icon>
90
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
89
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>view_list</md-icon>
90
+ <md-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>menu</md-icon>
91
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
91
92
  </div>
92
93
  <div id="tailer">
93
94
  <span
@@ -108,7 +109,7 @@ class GristModePage extends localize(i18next)(PageView) {
108
109
  </div>
109
110
 
110
111
  <div id="filters">
111
- <mwc-icon
112
+ <md-icon
112
113
  @click=${e => {
113
114
  const target = e.currentTarget
114
115
  this.renderRoot.querySelector('ox-popup-list').open({
@@ -116,9 +117,9 @@ class GristModePage extends localize(i18next)(PageView) {
116
117
  top: target.offsetTop + target.offsetHeight
117
118
  })
118
119
  }}
119
- >sort</mwc-icon
120
+ >sort</md-icon
120
121
  >
121
- <mwc-icon
122
+ <md-icon
122
123
  @click=${e => {
123
124
  const target = e.currentTarget
124
125
  this.renderRoot.querySelector('ox-popup-list').open({
@@ -126,9 +127,9 @@ class GristModePage extends localize(i18next)(PageView) {
126
127
  top: target.offsetTop + target.offsetHeight
127
128
  })
128
129
  }}
129
- >more_horiz</mwc-icon
130
+ >more_horiz</md-icon
130
131
  >
131
- <mwc-icon
132
+ <md-icon
132
133
  @click=${e => {
133
134
  const target = e.currentTarget
134
135
  this.renderRoot.querySelector('ox-popup-list').open({
@@ -136,28 +137,28 @@ class GristModePage extends localize(i18next)(PageView) {
136
137
  top: target.offsetTop + target.offsetHeight
137
138
  })
138
139
  }}
139
- >sort</mwc-icon
140
+ >sort</md-icon
140
141
  >
141
142
 
142
143
  <ox-popup-list alive-on-select>
143
144
  <div
144
145
  option
145
146
  @click=${function (e) {
146
- const icon = e.currentTarget.querySelector('mwc-icon')
147
+ const icon = e.currentTarget.querySelector('md-icon')
147
148
  icon.innerHTML = icon.innerHTML == 'check' ? '' : 'check'
148
149
  }}
149
150
  >
150
- <mwc-icon slot="icon" style="width: 20px;height: 20px;"></mwc-icon>
151
+ <md-icon slot="icon" style="width: 20px;height: 20px;"></md-icon>
151
152
  <span>click me to toggle</span>
152
153
  </div>
153
154
  <div
154
155
  option
155
156
  @click=${function (e) {
156
- const icon = e.currentTarget.querySelector('mwc-icon')
157
+ const icon = e.currentTarget.querySelector('md-icon')
157
158
  icon.innerHTML = icon.innerHTML == 'check' ? '' : 'check'
158
159
  }}
159
160
  >
160
- <mwc-icon slot="icon" style="width: 20px;height: 20px;"></mwc-icon>
161
+ <md-icon slot="icon" style="width: 20px;height: 20px;"></md-icon>
161
162
  <span>click me to toggle</span>
162
163
  </div>
163
164
  </ox-popup-list>
@@ -201,10 +202,10 @@ class GristModePage extends localize(i18next)(PageView) {
201
202
  idx % 4 === 0
202
203
  ? '' /* no source */
203
204
  : idx % 4 === 1
204
- ? `http://www.hatiolab.com/assets/img/operato-biz3.png`
205
- : idx % 4 === 2
206
- ? `http://www.hatiolab.com/assets/img/thingsboard-30.png`
207
- : `http://www.hatiolab.com/wrong-url.png` /* wrong source */,
205
+ ? `http://www.hatiolab.com/assets/img/operato-biz3.png`
206
+ : idx % 4 === 2
207
+ ? `http://www.hatiolab.com/assets/img/thingsboard-30.png`
208
+ : `http://www.hatiolab.com/wrong-url.png` /* wrong source */,
208
209
  role: ['admin', 'worker', 'tester'][idx % 3],
209
210
  color: idx % 2 ? `#87f018` : `#180f87`,
210
211
  rate: Math.round(Math.random() * 100),
@@ -1,9 +1,9 @@
1
1
  import { css, html } from 'lit'
2
2
  import { getEditor, getRenderer } from '@operato/data-grist'
3
- import { i18next, localize } from '@things-factory/i18n-base'
3
+ import { i18next, localize } from '@operato/i18n'
4
4
 
5
- import { PageView } from '@things-factory/shell'
6
- import { isMobileDevice } from '@things-factory/utils'
5
+ import { PageView } from '@operato/shell'
6
+ import { isMobileDevice } from '@operato/utils'
7
7
 
8
8
  class GristPage extends localize(i18next)(PageView) {
9
9
  static get styles() {
@@ -5,7 +5,7 @@ import '@operato/barcode/ox-barcode.js'
5
5
  import { css, html } from 'lit'
6
6
  import { connect } from 'pwa-helpers/connect-mixin.js'
7
7
 
8
- import { PageView, store } from '@things-factory/shell'
8
+ import { PageView, store } from '@operato/shell'
9
9
 
10
10
  import { ReferencePageStyles } from './reference-page-styles'
11
11
 
@@ -1,7 +1,7 @@
1
1
  import { css, html } from 'lit'
2
2
  import { connect } from 'pwa-helpers/connect-mixin.js'
3
3
 
4
- import { PageView, store } from '@things-factory/shell'
4
+ import { PageView, store } from '@operato/shell'
5
5
 
6
6
  class LayoutGroupPage extends connect(store)(PageView) {
7
7
  static get styles() {
@@ -1,7 +1,7 @@
1
1
  import { css, html } from 'lit'
2
2
  import { connect } from 'pwa-helpers/connect-mixin.js'
3
3
 
4
- import { PageView, store } from '@things-factory/shell'
4
+ import { PageView, store } from '@operato/shell'
5
5
 
6
6
  import logo from '../../assets/images/hatiolab-logo.png'
7
7
 
@@ -1,4 +1,4 @@
1
- import '@things-factory/auth-ui' /* for domain-switch */
1
+ import '@things-factory/auth-ui/dist-client' /* for domain-switch */
2
2
  import '@material/mwc-checkbox'
3
3
  import '@material/mwc-formfield'
4
4
  import '@operato/help/ox-help-icon.js'
@@ -83,7 +83,7 @@ class MenuPage extends connect(store)(PageView) {
83
83
  setupMenuPart({
84
84
  hovering: hovering.checked,
85
85
  position: landscape.checked ? VIEWPART_POSITION.HEADERBAR : VIEWPART_POSITION.NAVBAR,
86
- portraitSlotTemplate: html` <domain-switch slot="tail"></domain-switch> `
86
+ portraitSlotTemplate: html` <domain-switch attrname="description" slot="tail"></domain-switch> `
87
87
  })
88
88
  }
89
89
  }
@@ -1,4 +1,6 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
+ import '@material/web/button/elevated-button.js'
3
+
2
4
  import '@things-factory/import-ui'
3
5
  import '@operato/data-grist/ox-grist.js'
4
6
  import '@operato/data-grist/ox-filters-form.js'
@@ -11,7 +13,7 @@ import { i18next, localize } from '@operato/i18n'
11
13
  import { openPopup } from '@operato/layout'
12
14
  import { CommonButtonStyles, CommonGristStyles } from '@operato/styles'
13
15
  import { isMobileDevice } from '@operato/utils'
14
- import { CustomAlert, PageView } from '@things-factory/shell'
16
+ import { CustomAlert, PageView } from '@operato/shell'
15
17
 
16
18
  import { createOperation, deleteOperations, fetchOperations, saveOperations } from './operation-api'
17
19
 
@@ -46,6 +48,7 @@ class OperationMaster extends localize(i18next)(PageView) {
46
48
  constructor() {
47
49
  super()
48
50
  this.mode = isMobileDevice() ? 'CARD' : 'GRID'
51
+ this.importHandler = this.defaultImportHandler
49
52
  }
50
53
 
51
54
  render() {
@@ -60,7 +63,7 @@ class OperationMaster extends localize(i18next)(PageView) {
60
63
 
61
64
  <div id="sorters">
62
65
  Sort
63
- <mwc-icon
66
+ <md-icon
64
67
  @click=${e => {
65
68
  const target = e.currentTarget
66
69
  this.renderRoot.querySelector('#sorter-control').open({
@@ -68,7 +71,7 @@ class OperationMaster extends localize(i18next)(PageView) {
68
71
  top: target.offsetTop + target.offsetHeight
69
72
  })
70
73
  }}
71
- >expand_more</mwc-icon
74
+ >expand_more</md-icon
72
75
  >
73
76
  <ox-popup id="sorter-control">
74
77
  <ox-sorters-control> </ox-sorters-control>
@@ -76,12 +79,12 @@ class OperationMaster extends localize(i18next)(PageView) {
76
79
  </div>
77
80
 
78
81
  <div id="modes">
79
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
80
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
82
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
83
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
81
84
  </div>
82
85
 
83
86
  <ox-record-creator id="add" .callback=${this.operationCreationCallback.bind(this)}>
84
- <button><mwc-icon>add</mwc-icon></button>
87
+ <md-elevated-button><md-icon slot="icon">add</md-icon></md-elevated-button>
85
88
  </ox-record-creator>
86
89
  </div>
87
90
  </ox-grist>
@@ -292,7 +295,7 @@ class OperationMaster extends localize(i18next)(PageView) {
292
295
  }
293
296
  }
294
297
 
295
- async importHandler(patches) {
298
+ async defaultImportHandler(patches) {
296
299
  const response = await saveOperations(patches)
297
300
 
298
301
  if (!response.errors) {
@@ -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
- 프레임워크에서는 oops-progress<ox-help-icon topic="components/oops-progress"></ox-help-icon> 라는 컴포넌트를
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
- 버튼으로 변경되면, 진행중에 버튼을 누르면 진행율 표현이 멈추게 된다. 진행이 완료되면, 'Start' 버튼으로 변경된다.
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) {
@@ -1,4 +1,4 @@
1
- import '@material/mwc-icon'
1
+ import '@material/web/icon/icon.js'
2
2
  import '@things-factory/form-ui'
3
3
  import '@things-factory/import-ui'
4
4
  import '@operato/data-grist/ox-grist.js'
@@ -38,6 +38,7 @@ class ProductMaster extends localize(i18next)(PageView) {
38
38
  constructor() {
39
39
  super()
40
40
  this.mode = isMobileDevice() ? 'LIST' : 'GRID'
41
+ this.importHandler = this.defaultImportHandler
41
42
  }
42
43
 
43
44
  static get properties() {
@@ -61,7 +62,7 @@ class ProductMaster extends localize(i18next)(PageView) {
61
62
 
62
63
  <div id="sorters">
63
64
  Sort
64
- <mwc-icon
65
+ <md-icon
65
66
  @click=${e => {
66
67
  const target = e.currentTarget
67
68
  this.renderRoot.querySelector('#sorter-control').open({
@@ -69,7 +70,7 @@ class ProductMaster extends localize(i18next)(PageView) {
69
70
  top: target.offsetTop + target.offsetHeight
70
71
  })
71
72
  }}
72
- >expand_more</mwc-icon
73
+ >expand_more</md-icon
73
74
  >
74
75
  <ox-popup id="sorter-control">
75
76
  <ox-sorters-control> </ox-sorters-control>
@@ -77,12 +78,12 @@ class ProductMaster extends localize(i18next)(PageView) {
77
78
  </div>
78
79
 
79
80
  <div id="modes">
80
- <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
81
- <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
81
+ <md-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</md-icon>
82
+ <md-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</md-icon>
82
83
  </div>
83
84
 
84
85
  <ox-record-creator id="add" .callback=${this.productCreationCallback.bind(this)}>
85
- <button><mwc-icon>add</mwc-icon></button>
86
+ <button><md-icon>add</md-icon></button>
86
87
  </ox-record-creator>
87
88
  </div>
88
89
  </ox-grist>
@@ -725,7 +726,7 @@ class ProductMaster extends localize(i18next)(PageView) {
725
726
  }
726
727
  }
727
728
 
728
- async importHandler(patches) {
729
+ async defaultImportHandler(patches) {
729
730
  const response = await saveProducts(patches)
730
731
 
731
732
  if (!response.errors) {
@@ -30,7 +30,7 @@ class ProductCombinationsPopup extends localize(i18next)(LitElement) {
30
30
  display: flex;
31
31
  flex-direction: column;
32
32
  overflow: hidden;
33
- background-color: white;
33
+ background-color: var(--md-sys-color-surface);
34
34
  }
35
35
  search-form {
36
36
  overflow: visible;
@@ -40,7 +40,7 @@ class ProductCombinationsPopup extends localize(i18next)(LitElement) {
40
40
  flex: 1;
41
41
  }
42
42
  .grist {
43
- background-color: var(--main-section-background-color);
43
+ background-color: var(--md-sys-color-background);
44
44
  display: flex;
45
45
  flex-direction: row;
46
46
  flex: 1;
@@ -23,7 +23,7 @@ export class ProductDetailsPopup extends localize(i18next)(LitElement) {
23
23
  display: flex;
24
24
  flex-direction: column;
25
25
  overflow: hidden;
26
- background-color: white;
26
+ background-color: var(--md-sys-color-surface);
27
27
 
28
28
  --grid-record-emphasized-background-color: #ffdbdb;
29
29
  --grid-record-emphasized-color: #703f3f;
@@ -3,23 +3,23 @@ import { css } from 'lit'
3
3
  export const ReferencePageStyles = css`
4
4
  :host {
5
5
  display: block;
6
- background-color: var(--main-section-background-color);
7
- padding: var(--padding-wide);
6
+ background-color: var(--md-sys-color-background);
7
+ padding: var(--spacing-large);
8
8
  overflow: auto;
9
9
  }
10
10
  p {
11
- color: var(--secondary-color);
11
+ color: var(--md-sys-color-secondary);
12
12
  font-size: 1em;
13
13
  }
14
14
  h2,
15
15
  h3 {
16
- margin-bottom: var(--margin-narrow);
16
+ margin-bottom: var(--spacing-small);
17
17
  color: var(--secondary-text-color);
18
18
  }
19
19
  fieldset {
20
- background-color: var(--theme-white-color);
21
- margin-top: var(--margin-wide);
22
- border: var(--border-dark-color);
20
+ background-color: var(--md-sys-color-surface);
21
+ margin-top: var(--spacing-large);
22
+ border: var(--border-dim-color);
23
23
  }
24
24
  fieldset > * {
25
25
  min-width: 10%;
@@ -1,9 +1,9 @@
1
1
  import '@operato/data-grist'
2
2
 
3
3
  import { css, html } from 'lit'
4
- import { i18next, localize } from '@things-factory/i18n-base'
4
+ import { i18next, localize } from '@operato/i18n'
5
5
 
6
- import { PageView } from '@things-factory/shell'
6
+ import { PageView } from '@operato/shell'
7
7
 
8
8
  class ReportPage extends localize(i18next)(PageView) {
9
9
  static get styles() {