@things-factory/reference-app 7.0.1-alpha.9 → 7.0.1-alpha.92
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 +5 -2
- package/client/bootstrap.js +29 -27
- package/client/components/camera-capturer.js +9 -7
- package/client/components/ocr-viewpart.js +1 -1
- package/client/editors/id-editor.js +3 -3
- package/client/editors/id-selector.js +8 -16
- package/client/pages/context-menu-page.js +13 -13
- package/client/pages/context-page.js +1 -1
- package/client/pages/data-entry/data-entry-generator-popup.js +2 -2
- package/client/pages/data-set/data-set-importer.js +4 -16
- package/client/pages/data-set/data-set-list-page.js +14 -25
- package/client/pages/direct-print.js +1 -1
- package/client/pages/ghost-print-page.js +1 -1
- package/client/pages/grist-colorizing.js +4 -3
- package/client/pages/grist-filters.ts +5 -6
- package/client/pages/grist-fulltext-search.ts +5 -6
- package/client/pages/grist-mode-page.js +21 -20
- package/client/pages/grist-page.js +3 -3
- package/client/pages/label-scan-page.js +1 -1
- package/client/pages/layout-group-page.js +1 -1
- package/client/pages/main.js +1 -1
- package/client/pages/menu-page.js +2 -2
- package/client/pages/operation/operation-master.js +11 -7
- package/client/pages/product/product-master.js +13 -9
- package/client/pages/report-page.js +2 -2
- package/client/pages/web-editor-editorjs-page.js +1 -1
- package/client/pages/web-editor-jodit-page.js +1 -1
- package/client/pages/web-editor-lexical-page.js +1 -1
- package/client/pages/web-editor-tinymce-page.js +1 -1
- package/client/pages/web-editor-tui-page.js +1 -1
- package/client/themes/app-theme.css +19 -3
- package/client/themes/grist-theme.css +2 -2
- package/client/themes/layout-theme.css +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +36 -35
- package/views/auth-page.html +3 -1
- package/views/public/home.html +4 -2
package/_index.html
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
<!
|
|
1
|
+
<!doctype html>
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="utf-8" />
|
|
@@ -52,6 +52,9 @@
|
|
|
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" />
|
|
56
|
+
<link href="/node_modules/@fontsource/roboto/index.css" rel="stylesheet" />
|
|
57
|
+
<link rel="stylesheet" href="/theme.css" />
|
|
55
58
|
|
|
56
59
|
<!-- Add any global styles for body, document, etc. -->
|
|
57
60
|
<style>
|
|
@@ -80,7 +83,7 @@
|
|
|
80
83
|
</script>
|
|
81
84
|
</head>
|
|
82
85
|
|
|
83
|
-
<body>
|
|
86
|
+
<body class="light">
|
|
84
87
|
<things-app></things-app>
|
|
85
88
|
<noscript> Please enable JavaScript to view this website. </noscript>
|
|
86
89
|
<!-- Load webcomponents-loader.js to check and load any polyfills your browser needs -->
|
package/client/bootstrap.js
CHANGED
|
@@ -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 '@things-factory/barcode-base' /* for <default-label-printer-setting-let> */
|
|
3
3
|
import '@things-factory/notification' /* for notification-badge */
|
|
4
4
|
import '@things-factory/board-ui'
|
|
@@ -12,21 +12,21 @@ import '@things-factory/setting-ui' /* secure-iplist-setting-let */
|
|
|
12
12
|
|
|
13
13
|
import { html } from 'lit-html'
|
|
14
14
|
|
|
15
|
+
import { navigate, store } from '@operato/shell'
|
|
15
16
|
import { OxGristEditorResourceId } from '@operato/app/grist-editor/ox-grist-editor-resource-id.js'
|
|
16
17
|
import { registerDefaultGroups } from '@operato/board/register-default-groups.js'
|
|
17
18
|
import { getEditor, registerEditor, registerRenderer } from '@operato/data-grist'
|
|
18
19
|
import { appendViewpart, toggleOverlay, TOOL_POSITION, VIEWPART_POSITION } from '@operato/layout'
|
|
19
20
|
import { OxPropertyEditor } from '@operato/property-editor'
|
|
20
21
|
import { isMobileDevice } from '@operato/utils'
|
|
21
|
-
import { APPEND_APP_TOOL } from '@things-factory/apptool-base'
|
|
22
|
-
import { setupAppToolPart } from '@things-factory/apptool-ui'
|
|
22
|
+
import { APPEND_APP_TOOL } from '@things-factory/apptool-base/client'
|
|
23
|
+
import { setupAppToolPart } from '@things-factory/apptool-ui/dist-client'
|
|
23
24
|
import { auth, hasPrivilege } from '@things-factory/auth-base/dist-client'
|
|
24
|
-
import { setAuthManagementMenus } from '@things-factory/auth-ui'
|
|
25
|
-
import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu'
|
|
26
|
-
import { setupContextUIPart } from '@things-factory/context-ui'
|
|
27
|
-
import { ADD_MORENDA } from '@things-factory/more-base'
|
|
28
|
-
import { ADD_SETTING } from '@things-factory/setting-base'
|
|
29
|
-
import { navigate, store } from '@things-factory/shell'
|
|
25
|
+
import { setAuthManagementMenus } from '@things-factory/auth-ui/dist-client'
|
|
26
|
+
import { setupMenuPart, updateMenuTemplate } from '@things-factory/lite-menu/dist-client'
|
|
27
|
+
import { setupContextUIPart } from '@things-factory/context-ui/dist-client'
|
|
28
|
+
import { ADD_MORENDA } from '@things-factory/more-base/client'
|
|
29
|
+
import { ADD_SETTING } from '@things-factory/setting-base/dist-client'
|
|
30
30
|
|
|
31
31
|
import { getMenuTemplate } from './menu'
|
|
32
32
|
import { BarcodeRenderer } from './renderers/barcode-renderer'
|
|
@@ -73,7 +73,7 @@ export default async function bootstrap() {
|
|
|
73
73
|
await setupMenuPart({
|
|
74
74
|
hovering: isMobileDevice(),
|
|
75
75
|
position: VIEWPART_POSITION.NAVBAR,
|
|
76
|
-
portraitSlotTemplate: html` <domain-switch slot="tail"></domain-switch> `
|
|
76
|
+
portraitSlotTemplate: html` <domain-switch attrname="description" slot="tail"></domain-switch> `
|
|
77
77
|
})
|
|
78
78
|
updateMenuTemplate(getMenuTemplate())
|
|
79
79
|
|
|
@@ -81,7 +81,7 @@ export default async function bootstrap() {
|
|
|
81
81
|
store.dispatch({
|
|
82
82
|
type: ADD_MORENDA,
|
|
83
83
|
morenda: {
|
|
84
|
-
icon: html` <
|
|
84
|
+
icon: html` <md-icon>settings</md-icon> `,
|
|
85
85
|
name: html` <ox-i18n msgid="label.setting"></ox-i18n> `,
|
|
86
86
|
action: () => {
|
|
87
87
|
navigate('setting')
|
|
@@ -90,11 +90,13 @@ export default async function bootstrap() {
|
|
|
90
90
|
})
|
|
91
91
|
|
|
92
92
|
/* add addon-menu management page morenda */
|
|
93
|
-
if (
|
|
93
|
+
if (
|
|
94
|
+
await hasPrivilege({ privilege: 'mutation', category: 'menu', domainOwnerGranted: true, superUserGranted: true })
|
|
95
|
+
) {
|
|
94
96
|
store.dispatch({
|
|
95
97
|
type: ADD_MORENDA,
|
|
96
98
|
morenda: {
|
|
97
|
-
icon: html` <
|
|
99
|
+
icon: html` <md-icon>view_list</md-icon> `,
|
|
98
100
|
name: html` <ox-i18n msgid="text.addon-menu management"></ox-i18n> `,
|
|
99
101
|
action: () => {
|
|
100
102
|
navigate('addon-menu-setting')
|
|
@@ -110,7 +112,7 @@ export default async function bootstrap() {
|
|
|
110
112
|
store.dispatch({
|
|
111
113
|
type: ADD_MORENDA,
|
|
112
114
|
morenda: {
|
|
113
|
-
icon: html` <
|
|
115
|
+
icon: html` <md-icon>vpn_key</md-icon> `,
|
|
114
116
|
name: html` <ox-i18n msgid="text.oauth2-clients"></ox-i18n> `,
|
|
115
117
|
action: () => {
|
|
116
118
|
navigate('oauth2-clients')
|
|
@@ -123,7 +125,7 @@ export default async function bootstrap() {
|
|
|
123
125
|
store.dispatch({
|
|
124
126
|
type: ADD_MORENDA,
|
|
125
127
|
morenda: {
|
|
126
|
-
icon: html` <
|
|
128
|
+
icon: html` <md-icon>font_download</md-icon> `,
|
|
127
129
|
name: html` <ox-i18n msgid="menu.fonts"></ox-i18n> `,
|
|
128
130
|
action: () => {
|
|
129
131
|
navigate('font-list')
|
|
@@ -134,7 +136,7 @@ export default async function bootstrap() {
|
|
|
134
136
|
store.dispatch({
|
|
135
137
|
type: ADD_MORENDA,
|
|
136
138
|
morenda: {
|
|
137
|
-
icon: html` <
|
|
139
|
+
icon: html` <md-icon>attachment</md-icon> `,
|
|
138
140
|
name: html` <ox-i18n msgid="menu.attachments"></ox-i18n> `,
|
|
139
141
|
action: () => {
|
|
140
142
|
navigate('attachment-list')
|
|
@@ -145,7 +147,7 @@ export default async function bootstrap() {
|
|
|
145
147
|
store.dispatch({
|
|
146
148
|
type: ADD_MORENDA,
|
|
147
149
|
morenda: {
|
|
148
|
-
icon: html` <
|
|
150
|
+
icon: html` <md-icon>dvr</md-icon> `,
|
|
149
151
|
name: html` <ox-i18n msgid="menu.board-list"></ox-i18n> `,
|
|
150
152
|
action: () => {
|
|
151
153
|
navigate('board-list')
|
|
@@ -156,7 +158,7 @@ export default async function bootstrap() {
|
|
|
156
158
|
store.dispatch({
|
|
157
159
|
type: ADD_MORENDA,
|
|
158
160
|
morenda: {
|
|
159
|
-
icon: html` <
|
|
161
|
+
icon: html` <md-icon>airplay</md-icon> `,
|
|
160
162
|
name: html` <ox-i18n msgid="menu.play-groups"></ox-i18n> `,
|
|
161
163
|
action: () => {
|
|
162
164
|
navigate('play-list')
|
|
@@ -169,7 +171,7 @@ export default async function bootstrap() {
|
|
|
169
171
|
store.dispatch({
|
|
170
172
|
type: ADD_MORENDA,
|
|
171
173
|
morenda: {
|
|
172
|
-
icon: html` <
|
|
174
|
+
icon: html` <md-icon>device_hub</md-icon> `,
|
|
173
175
|
name: html` <ox-i18n msgid="text.connection"></ox-i18n> `,
|
|
174
176
|
action: () => {
|
|
175
177
|
navigate('connection')
|
|
@@ -180,7 +182,7 @@ export default async function bootstrap() {
|
|
|
180
182
|
store.dispatch({
|
|
181
183
|
type: ADD_MORENDA,
|
|
182
184
|
morenda: {
|
|
183
|
-
icon: html` <
|
|
185
|
+
icon: html` <md-icon>format_list_numbered</md-icon> `,
|
|
184
186
|
name: html` <ox-i18n msgid="text.scenario"></ox-i18n> `,
|
|
185
187
|
action: () => {
|
|
186
188
|
navigate('scenario')
|
|
@@ -191,7 +193,7 @@ export default async function bootstrap() {
|
|
|
191
193
|
store.dispatch({
|
|
192
194
|
type: ADD_MORENDA,
|
|
193
195
|
morenda: {
|
|
194
|
-
icon: html` <
|
|
196
|
+
icon: html` <md-icon>hub</md-icon> `,
|
|
195
197
|
name: html` <ox-i18n msgid="text.integration analysis"></ox-i18n> (beta)`,
|
|
196
198
|
action: () => {
|
|
197
199
|
navigate('integration-analysis')
|
|
@@ -204,7 +206,7 @@ export default async function bootstrap() {
|
|
|
204
206
|
store.dispatch({
|
|
205
207
|
type: ADD_MORENDA,
|
|
206
208
|
morenda: {
|
|
207
|
-
icon: html` <
|
|
209
|
+
icon: html` <md-icon>app_registration</md-icon> `,
|
|
208
210
|
name: html` <ox-i18n msgid="title.state-register"></ox-i18n> `,
|
|
209
211
|
action: () => {
|
|
210
212
|
navigate('state-register-page')
|
|
@@ -218,7 +220,7 @@ export default async function bootstrap() {
|
|
|
218
220
|
store.dispatch({
|
|
219
221
|
type: ADD_MORENDA,
|
|
220
222
|
morenda: {
|
|
221
|
-
icon: html` <
|
|
223
|
+
icon: html` <md-icon>pending_actions</md-icon> `,
|
|
222
224
|
name: html` <ox-i18n msgid="title.work-shift"></ox-i18n> `,
|
|
223
225
|
action: () => {
|
|
224
226
|
navigate('work-shift')
|
|
@@ -230,7 +232,7 @@ export default async function bootstrap() {
|
|
|
230
232
|
store.dispatch({
|
|
231
233
|
type: ADD_MORENDA,
|
|
232
234
|
morenda: {
|
|
233
|
-
icon: html` <
|
|
235
|
+
icon: html` <md-icon>extension</md-icon> `,
|
|
234
236
|
name: html` <ox-i18n msgid="text.api-sandbox"></ox-i18n> `,
|
|
235
237
|
action: () => {
|
|
236
238
|
navigate('api-swagger')
|
|
@@ -241,7 +243,7 @@ export default async function bootstrap() {
|
|
|
241
243
|
// store.dispatch({
|
|
242
244
|
// type: ADD_MORENDA,
|
|
243
245
|
// morenda: {
|
|
244
|
-
// icon: html` <
|
|
246
|
+
// icon: html` <md-icon>help</md-icon> `,
|
|
245
247
|
// name: html` <ox-i18n msgid="text.help"></ox-i18n> `,
|
|
246
248
|
// action: () => {
|
|
247
249
|
// navigate('help')
|
|
@@ -272,14 +274,14 @@ export default async function bootstrap() {
|
|
|
272
274
|
tool: {
|
|
273
275
|
name: 'ocr-toggler',
|
|
274
276
|
template: html`
|
|
275
|
-
<
|
|
277
|
+
<md-icon
|
|
276
278
|
@click=${e => {
|
|
277
279
|
toggleOverlay('ocr-viewpart', {
|
|
278
280
|
backdrop: false
|
|
279
281
|
})
|
|
280
282
|
}}
|
|
281
283
|
>camera_enhance
|
|
282
|
-
</
|
|
284
|
+
</md-icon>
|
|
283
285
|
`,
|
|
284
286
|
position: TOOL_POSITION.REAR
|
|
285
287
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
|
+
|
|
1
3
|
import { css, html, LitElement } from 'lit'
|
|
2
4
|
|
|
3
5
|
import { FileDropHelper } from '@things-factory/utils'
|
|
@@ -19,7 +21,7 @@ export class CameraCapturer extends LitElement {
|
|
|
19
21
|
font: var(--file-uploader-font) !important;
|
|
20
22
|
color: var(--file-uploader-color);
|
|
21
23
|
}
|
|
22
|
-
:host >
|
|
24
|
+
:host > md-icon {
|
|
23
25
|
color: var(--file-uploader-icon-color);
|
|
24
26
|
}
|
|
25
27
|
|
|
@@ -55,14 +57,14 @@ export class CameraCapturer extends LitElement {
|
|
|
55
57
|
padding: var(--file-uploader-li-padding);
|
|
56
58
|
border-bottom: var(--file-uploader-li-border-bottom);
|
|
57
59
|
}
|
|
58
|
-
li
|
|
60
|
+
li md-icon {
|
|
59
61
|
float: right;
|
|
60
62
|
cursor: pointer;
|
|
61
63
|
font: var(--file-uploader-li-icon-font);
|
|
62
64
|
margin: var(--file-uploader-li-icon-margin);
|
|
63
65
|
}
|
|
64
|
-
li
|
|
65
|
-
li
|
|
66
|
+
li md-icon:hover,
|
|
67
|
+
li md-icon:active {
|
|
66
68
|
color: var(--file-uploader-li-icon-focus-color);
|
|
67
69
|
}
|
|
68
70
|
`
|
|
@@ -82,7 +84,7 @@ export class CameraCapturer extends LitElement {
|
|
|
82
84
|
var files = this._files || []
|
|
83
85
|
|
|
84
86
|
return html`
|
|
85
|
-
<
|
|
87
|
+
<md-icon>camera</md-icon>
|
|
86
88
|
<span>Capture image<br />or drop files here!</span>
|
|
87
89
|
<input
|
|
88
90
|
id="input-file"
|
|
@@ -117,7 +119,7 @@ export class CameraCapturer extends LitElement {
|
|
|
117
119
|
file => html`
|
|
118
120
|
<li>
|
|
119
121
|
- ${file.name}
|
|
120
|
-
<
|
|
122
|
+
<md-icon
|
|
121
123
|
@click=${e => {
|
|
122
124
|
this._files = [...this._files.splice(this._files.indexOf(file), 1)]
|
|
123
125
|
this.dispatchEvent(
|
|
@@ -130,7 +132,7 @@ export class CameraCapturer extends LitElement {
|
|
|
130
132
|
})
|
|
131
133
|
)
|
|
132
134
|
}}
|
|
133
|
-
>delete_outline</
|
|
135
|
+
>delete_outline</md-icon
|
|
134
136
|
>
|
|
135
137
|
</li>
|
|
136
138
|
`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import './id-selector'
|
|
3
3
|
|
|
4
4
|
import { css, html, LitElement } from 'lit'
|
|
@@ -44,7 +44,7 @@ export class IdEditor extends LitElement {
|
|
|
44
44
|
justify-content: inherit;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
md-icon {
|
|
48
48
|
width: 20px;
|
|
49
49
|
font-size: 1.5em;
|
|
50
50
|
margin-left: auto;
|
|
@@ -58,7 +58,7 @@ export class IdEditor extends LitElement {
|
|
|
58
58
|
|
|
59
59
|
return html`
|
|
60
60
|
${!value ? html`` : html` <span>${value[nameField]} (${value[descriptionField]})</span> `}
|
|
61
|
-
<
|
|
61
|
+
<md-icon>arrow_drop_down</md-icon>
|
|
62
62
|
`
|
|
63
63
|
}
|
|
64
64
|
|
|
@@ -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,11 +1,11 @@
|
|
|
1
|
-
import '@material/
|
|
1
|
+
import '@material/web/icon/icon.js'
|
|
2
2
|
import '@operato/popup/ox-popup-menu.js'
|
|
3
3
|
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
5
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
6
6
|
|
|
7
7
|
import { OxPopupMenu } from '@operato/popup/ox-popup-menu.js'
|
|
8
|
-
import { PageView, store } from '@
|
|
8
|
+
import { PageView, store } from '@operato/shell'
|
|
9
9
|
|
|
10
10
|
import { ReferencePageStyles } from './reference-page-styles'
|
|
11
11
|
|
|
@@ -55,11 +55,11 @@ class ContextMenuPage extends connect(store)(PageView) {
|
|
|
55
55
|
console.log('first level article selected')
|
|
56
56
|
}}
|
|
57
57
|
>
|
|
58
|
-
<
|
|
58
|
+
<md-icon slot="icon">article</md-icon>
|
|
59
59
|
</ox-popup-menuitem>
|
|
60
60
|
|
|
61
61
|
<ox-popup-menuitem label="home">
|
|
62
|
-
<
|
|
62
|
+
<md-icon slot="icon">home</md-icon>
|
|
63
63
|
</ox-popup-menuitem>
|
|
64
64
|
|
|
65
65
|
<ox-popup-menuitem label="empty"> </ox-popup-menuitem>
|
|
@@ -67,16 +67,16 @@ class ContextMenuPage extends connect(store)(PageView) {
|
|
|
67
67
|
<ox-popup-menuitem
|
|
68
68
|
label="click me to toggle"
|
|
69
69
|
@selected=${function (e) {
|
|
70
|
-
const icon = this.querySelector('
|
|
70
|
+
const icon = this.querySelector('md-icon')
|
|
71
71
|
icon.innerHTML = icon.innerHTML == 'check' ? '' : 'check'
|
|
72
72
|
}}
|
|
73
73
|
alive-on-select
|
|
74
74
|
>
|
|
75
|
-
<
|
|
75
|
+
<md-icon slot="icon" style="width: 20px;height: 20px;"></md-icon>
|
|
76
76
|
</ox-popup-menuitem>
|
|
77
77
|
|
|
78
78
|
<ox-popup-menuitem label="verified" @selected=${e => console.log('selected verified')}>
|
|
79
|
-
<
|
|
79
|
+
<md-icon slot="icon">verified</md-icon>
|
|
80
80
|
<ox-popup-menu>
|
|
81
81
|
<ox-popup-menuitem
|
|
82
82
|
label="article"
|
|
@@ -85,26 +85,26 @@ class ContextMenuPage extends connect(store)(PageView) {
|
|
|
85
85
|
}}
|
|
86
86
|
alive-on-select
|
|
87
87
|
>
|
|
88
|
-
<
|
|
88
|
+
<md-icon slot="icon">article</md-icon>
|
|
89
89
|
</ox-popup-menuitem>
|
|
90
90
|
|
|
91
91
|
<ox-popup-menuitem label="home">
|
|
92
|
-
<
|
|
92
|
+
<md-icon slot="icon">home</md-icon>
|
|
93
93
|
</ox-popup-menuitem>
|
|
94
94
|
|
|
95
95
|
<ox-popup-menuitem label="verified">
|
|
96
|
-
<
|
|
96
|
+
<md-icon slot="icon">verified</md-icon>
|
|
97
97
|
<ox-popup-menu>
|
|
98
98
|
<ox-popup-menuitem label="article">
|
|
99
|
-
<
|
|
99
|
+
<md-icon slot="icon">article</md-icon>
|
|
100
100
|
</ox-popup-menuitem>
|
|
101
101
|
|
|
102
102
|
<ox-popup-menuitem label="home">
|
|
103
|
-
<
|
|
103
|
+
<md-icon slot="icon">home</md-icon>
|
|
104
104
|
</ox-popup-menuitem>
|
|
105
105
|
|
|
106
106
|
<ox-popup-menuitem label="verified">
|
|
107
|
-
<
|
|
107
|
+
<md-icon slot="icon">verified</md-icon>
|
|
108
108
|
</ox-popup-menuitem>
|
|
109
109
|
|
|
110
110
|
<ox-popup-menuitem label="checkbox">
|
|
@@ -6,7 +6,7 @@ import { css, html } from 'lit'
|
|
|
6
6
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { openImportPopUp } from '@things-factory/import-ui'
|
|
9
|
-
import { PageView, store } from '@
|
|
9
|
+
import { PageView, store } from '@operato/shell'
|
|
10
10
|
import { CommonButtonStyles } from '@things-factory/styles'
|
|
11
11
|
import { sleep } from '@things-factory/utils'
|
|
12
12
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SingleColumnFormStyles } from '@things-factory/form-ui'
|
|
2
|
-
import { i18next, localize } from '@
|
|
3
|
-
import { client } from '@
|
|
2
|
+
import { i18next, localize } from '@operato/i18n'
|
|
3
|
+
import { client } from '@operato/graphql'
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html, LitElement } from 'lit'
|
|
6
6
|
|
|
@@ -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
|
}
|
|
@@ -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
|
-
<
|
|
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
|
}
|
|
@@ -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 '@
|
|
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 '@
|
|
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 {
|
|
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) {
|