@things-factory/dataset 6.2.63 → 6.2.65
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/pages/data-archive/data-archive-list-page.ts +15 -40
- package/client/pages/data-key-set/data-key-item-list.ts +1 -1
- package/client/pages/data-key-set/data-key-set-list-page.ts +20 -40
- package/client/pages/data-ooc/data-ooc-list-page.ts +3 -12
- package/client/pages/data-report/data-report-list-page.ts +20 -24
- package/client/pages/data-sample/data-sample-list-page.ts +13 -37
- package/client/pages/data-sample/data-sample-search-page.ts +13 -37
- package/client/pages/data-sensor/data-sensor-list-page.ts +6 -13
- package/client/pages/data-set/data-item-list.ts +0 -12
- package/client/pages/data-set/data-set-list-page.ts +30 -41
- package/dist-client/pages/data-archive/data-archive-list-page.d.ts +2 -7
- package/dist-client/pages/data-archive/data-archive-list-page.js +18 -33
- package/dist-client/pages/data-archive/data-archive-list-page.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-item-list.js.map +1 -1
- package/dist-client/pages/data-key-set/data-key-set-list-page.d.ts +3 -8
- package/dist-client/pages/data-key-set/data-key-set-list-page.js +27 -33
- package/dist-client/pages/data-key-set/data-key-set-list-page.js.map +1 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +2 -1
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -1
- package/dist-client/pages/data-report/data-report-list-page.d.ts +3 -2
- package/dist-client/pages/data-report/data-report-list-page.js +18 -26
- package/dist-client/pages/data-report/data-report-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-list-page.d.ts +2 -1
- package/dist-client/pages/data-sample/data-sample-list-page.js +12 -31
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -1
- package/dist-client/pages/data-sample/data-sample-search-page.d.ts +2 -1
- package/dist-client/pages/data-sample/data-sample-search-page.js +12 -31
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -1
- package/dist-client/pages/data-sensor/data-sensor-list-page.d.ts +2 -14
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +11 -9
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -1
- package/dist-client/pages/data-set/data-item-list.js +0 -12
- package/dist-client/pages/data-set/data-item-list.js.map +1 -1
- package/dist-client/pages/data-set/data-set-list-page.d.ts +7 -12
- package/dist-client/pages/data-set/data-set-list-page.js +34 -36
- package/dist-client/pages/data-set/data-set-list-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
@@ -1,26 +1,18 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
2
3
|
|
3
4
|
import gql from 'graphql-tag'
|
4
5
|
import { css, html } from 'lit'
|
5
6
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin'
|
7
8
|
|
8
|
-
import {
|
9
|
-
getEditor,
|
10
|
-
getRenderer,
|
11
|
-
ColumnConfig,
|
12
|
-
DataGrist,
|
13
|
-
FetchOption,
|
14
|
-
SortersControl,
|
15
|
-
GristRecord
|
16
|
-
} from '@operato/data-grist'
|
9
|
+
import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
17
10
|
import { client } from '@operato/graphql'
|
18
11
|
import { i18next, localize } from '@operato/i18n'
|
19
|
-
import { openPopup } from '@operato/layout'
|
12
|
+
import { PopupHandle, openPopup } from '@operato/layout'
|
20
13
|
import { PageView, store } from '@operato/shell'
|
21
|
-
import { CommonButtonStyles,
|
14
|
+
import { CommonButtonStyles, CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
22
15
|
import { isMobileDevice } from '@operato/utils'
|
23
|
-
import { OxPopup, PopupHandle } from '@operato/popup'
|
24
16
|
|
25
17
|
import './data-archive-request-popup'
|
26
18
|
|
@@ -28,7 +20,7 @@ import './data-archive-request-popup'
|
|
28
20
|
export class DataArchiveListPage extends connect(store)(localize(i18next)(PageView)) {
|
29
21
|
static styles = [
|
30
22
|
ScrollbarStyles,
|
31
|
-
|
23
|
+
CommonHeaderStyles,
|
32
24
|
css`
|
33
25
|
:host {
|
34
26
|
display: flex;
|
@@ -48,7 +40,6 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
48
40
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
49
41
|
|
50
42
|
@query('ox-grist') private grist!: DataGrist
|
51
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
52
43
|
|
53
44
|
private popup?: PopupHandle
|
54
45
|
|
@@ -69,7 +60,6 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
69
60
|
help: 'dataset/data-archive',
|
70
61
|
actions: [
|
71
62
|
{
|
72
|
-
...CommonButtonStyles.save,
|
73
63
|
title: i18next.t('button.request-archive'),
|
74
64
|
action: this.openArchivePopup.bind(this),
|
75
65
|
icon: 'archive'
|
@@ -78,7 +68,8 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
78
68
|
exportable: {
|
79
69
|
name: i18next.t('title.data-archive list'),
|
80
70
|
data: this._exportableData.bind(this)
|
81
|
-
}
|
71
|
+
},
|
72
|
+
toolbar: false
|
82
73
|
}
|
83
74
|
}
|
84
75
|
|
@@ -92,33 +83,17 @@ export class DataArchiveListPage extends connect(store)(localize(i18next)(PageVi
|
|
92
83
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
93
84
|
?url-params-sensitive=${false /* this.active */}
|
94
85
|
>
|
95
|
-
<div slot="headroom">
|
96
|
-
<div
|
97
|
-
<
|
86
|
+
<div slot="headroom" class="header">
|
87
|
+
<div class="title">
|
88
|
+
<mwc-icon>summarize</mwc-icon>
|
89
|
+
${i18next.t('title.data-archive list')}
|
98
90
|
</div>
|
99
91
|
|
100
|
-
<div
|
101
|
-
|
102
|
-
|
103
|
-
@click=${e => {
|
104
|
-
const target = e.currentTarget
|
105
|
-
this.sortersControl.open({
|
106
|
-
right: 0,
|
107
|
-
top: target.offsetTop + target.offsetHeight
|
108
|
-
})
|
109
|
-
}}
|
110
|
-
>expand_more</mwc-icon
|
111
|
-
>
|
112
|
-
<ox-popup id="sorter-control">
|
113
|
-
<ox-sorters-control> </ox-sorters-control>
|
114
|
-
</ox-popup>
|
115
|
-
</div>
|
92
|
+
<!-- <div class="filters">
|
93
|
+
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
94
|
+
</div> -->
|
116
95
|
|
117
|
-
<
|
118
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
119
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
120
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
121
|
-
</div>
|
96
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
122
97
|
</div>
|
123
98
|
</ox-grist>
|
124
99
|
`
|
@@ -5,7 +5,7 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
5
|
import { client } from '@operato/graphql'
|
6
6
|
import { i18next, localize } from '@operato/i18n'
|
7
7
|
import { isMobileDevice } from '@operato/utils'
|
8
|
-
import {
|
8
|
+
import { DataGrist, FetchOption } from '@operato/data-grist'
|
9
9
|
|
10
10
|
@customElement('data-key-item-list')
|
11
11
|
export class DataKeyItemList extends localize(i18next)(LitElement) {
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
2
3
|
import './data-key-set-importer.js'
|
3
4
|
import './data-key-item-list'
|
4
5
|
|
@@ -7,23 +8,13 @@ import { css, html } from 'lit'
|
|
7
8
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
8
9
|
import { connect } from 'pwa-helpers/connect-mixin'
|
9
10
|
|
10
|
-
import {
|
11
|
-
getEditor,
|
12
|
-
getRenderer,
|
13
|
-
ColumnConfig,
|
14
|
-
DataGrist,
|
15
|
-
FetchOption,
|
16
|
-
SortersControl,
|
17
|
-
GristData,
|
18
|
-
GristRecord
|
19
|
-
} from '@operato/data-grist'
|
11
|
+
import { getEditor, getRenderer, DataGrist, FetchOption } from '@operato/data-grist'
|
20
12
|
import { client } from '@operato/graphql'
|
21
13
|
import { i18next, localize } from '@operato/i18n'
|
22
14
|
import { notify, openPopup } from '@operato/layout'
|
23
15
|
import { navigate, PageView, store } from '@operato/shell'
|
24
|
-
import {
|
16
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
25
17
|
import { isMobileDevice, encodeUrlParams } from '@operato/utils'
|
26
|
-
import { OxPopup } from '@operato/popup'
|
27
18
|
|
28
19
|
const REPORT_TYPES = [
|
29
20
|
{
|
@@ -64,7 +55,7 @@ const REPORT_TYPES = [
|
|
64
55
|
export class DataKeySetListPage extends connect(store)(localize(i18next)(PageView)) {
|
65
56
|
static styles = [
|
66
57
|
ScrollbarStyles,
|
67
|
-
|
58
|
+
CommonHeaderStyles,
|
68
59
|
css`
|
69
60
|
:host {
|
70
61
|
display: flex;
|
@@ -74,6 +65,11 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
74
65
|
--grid-record-emphasized-background-color: red;
|
75
66
|
--grid-record-emphasized-color: yellow;
|
76
67
|
}
|
68
|
+
|
69
|
+
ox-grist {
|
70
|
+
overflow-y: auto;
|
71
|
+
flex: 1;
|
72
|
+
}
|
77
73
|
`
|
78
74
|
]
|
79
75
|
|
@@ -81,7 +77,6 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
81
77
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
82
78
|
|
83
79
|
@query('ox-grist') private grist!: DataGrist
|
84
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
85
80
|
|
86
81
|
get context() {
|
87
82
|
return {
|
@@ -102,12 +97,12 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
102
97
|
{
|
103
98
|
title: i18next.t('button.save'),
|
104
99
|
action: this._updateDataKeySet.bind(this),
|
105
|
-
|
100
|
+
icon: 'save'
|
106
101
|
},
|
107
102
|
{
|
108
103
|
title: i18next.t('button.delete'),
|
109
104
|
action: this._deleteDataKeySet.bind(this),
|
110
|
-
|
105
|
+
icon: 'delete'
|
111
106
|
}
|
112
107
|
],
|
113
108
|
exportable: {
|
@@ -116,7 +111,8 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
116
111
|
},
|
117
112
|
importable: {
|
118
113
|
handler: this.importHandler.bind(this)
|
119
|
-
}
|
114
|
+
},
|
115
|
+
toolbar: false
|
120
116
|
}
|
121
117
|
}
|
122
118
|
|
@@ -125,33 +121,17 @@ export class DataKeySetListPage extends connect(store)(localize(i18next)(PageVie
|
|
125
121
|
|
126
122
|
return html`
|
127
123
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
128
|
-
<div slot="headroom">
|
129
|
-
<div
|
130
|
-
<
|
124
|
+
<div slot="headroom" class="header">
|
125
|
+
<div class="title">
|
126
|
+
<mwc-icon>summarize</mwc-icon>
|
127
|
+
${i18next.t('title.data-key-set list')}
|
131
128
|
</div>
|
132
129
|
|
133
|
-
<div
|
134
|
-
|
135
|
-
<mwc-icon
|
136
|
-
@click=${e => {
|
137
|
-
const target = e.currentTarget
|
138
|
-
this.sortersControl.open({
|
139
|
-
right: 0,
|
140
|
-
top: target.offsetTop + target.offsetHeight
|
141
|
-
})
|
142
|
-
}}
|
143
|
-
>expand_more</mwc-icon
|
144
|
-
>
|
145
|
-
<ox-popup id="sorter-control">
|
146
|
-
<ox-sorters-control> </ox-sorters-control>
|
147
|
-
</ox-popup>
|
130
|
+
<div class="filters">
|
131
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
148
132
|
</div>
|
149
133
|
|
150
|
-
<
|
151
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
152
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
153
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
154
|
-
</div>
|
134
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}> </ox-context-page-toolbar>
|
155
135
|
</div>
|
156
136
|
</ox-grist>
|
157
137
|
`
|
@@ -25,23 +25,13 @@ function getOocStatus() {
|
|
25
25
|
]
|
26
26
|
}
|
27
27
|
|
28
|
-
import {
|
29
|
-
getEditor,
|
30
|
-
getRenderer,
|
31
|
-
ColumnConfig,
|
32
|
-
DataGrist,
|
33
|
-
FetchOption,
|
34
|
-
SortersControl,
|
35
|
-
GristData,
|
36
|
-
GristRecord
|
37
|
-
} from '@operato/data-grist'
|
28
|
+
import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
38
29
|
import { client } from '@operato/graphql'
|
39
30
|
import { i18next, localize } from '@operato/i18n'
|
40
31
|
import { openPopup } from '@operato/layout'
|
41
32
|
import { PageView, store } from '@operato/shell'
|
42
33
|
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
43
34
|
import { isMobileDevice, adjustFilters } from '@operato/utils'
|
44
|
-
import { OxPopup } from '@operato/popup'
|
45
35
|
|
46
36
|
@customElement('data-ooc-list-page')
|
47
37
|
export class DataOocListPage extends connect(store)(localize(i18next)(PageView)) {
|
@@ -217,7 +207,8 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
217
207
|
label: true,
|
218
208
|
header: i18next.t('field.corrective-action'),
|
219
209
|
record: {
|
220
|
-
editable: true
|
210
|
+
editable: true,
|
211
|
+
language: 'text'
|
221
212
|
},
|
222
213
|
width: 150,
|
223
214
|
imex: true
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
2
3
|
import '@operato/board/ox-board-viewer.js'
|
3
4
|
|
4
5
|
import gql from 'graphql-tag'
|
@@ -6,14 +7,13 @@ import { css, html } from 'lit'
|
|
6
7
|
import { customElement, property, query, state } from 'lit/decorators.js'
|
7
8
|
import { connect } from 'pwa-helpers/connect-mixin'
|
8
9
|
|
9
|
-
import {
|
10
|
+
import { getRenderer, DataGrist, FetchOption } from '@operato/data-grist'
|
10
11
|
import { OxDataUseCase } from '@operato/dataset'
|
11
12
|
import { client } from '@operato/graphql'
|
12
13
|
import { i18next, localize } from '@operato/i18n'
|
13
14
|
import { openPopup } from '@operato/layout'
|
14
15
|
import { navigate, PageView, store } from '@operato/shell'
|
15
|
-
import {
|
16
|
-
import { OxPopup } from '@operato/popup'
|
16
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
17
17
|
import { encodeUrlParams } from '@operato/utils'
|
18
18
|
|
19
19
|
import { provider } from '@things-factory/board-ui'
|
@@ -120,7 +120,7 @@ const showReportView = (columns, data, column, record, rowIndex) => {
|
|
120
120
|
export class DataReportListPage extends connect(store)(localize(i18next)(PageView)) {
|
121
121
|
static styles = [
|
122
122
|
ScrollbarStyles,
|
123
|
-
|
123
|
+
CommonHeaderStyles,
|
124
124
|
css`
|
125
125
|
:host {
|
126
126
|
display: flex;
|
@@ -130,17 +130,23 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
130
130
|
--grid-record-emphasized-background-color: red;
|
131
131
|
--grid-record-emphasized-color: yellow;
|
132
132
|
}
|
133
|
+
|
134
|
+
ox-grist {
|
135
|
+
overflow-y: auto;
|
136
|
+
flex: 1;
|
137
|
+
}
|
133
138
|
`
|
134
139
|
]
|
135
140
|
|
136
141
|
@state() gristConfig: any
|
137
142
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = 'CARD'
|
143
|
+
|
138
144
|
@query('ox-grist') private grist!: DataGrist
|
139
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
140
145
|
|
141
146
|
get context() {
|
142
147
|
return {
|
143
148
|
title: i18next.t('title.data-report list'),
|
149
|
+
help: 'dataset/data-report-list',
|
144
150
|
search: {
|
145
151
|
handler: (search: string) => {
|
146
152
|
this.grist.searchText = search
|
@@ -152,7 +158,7 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
152
158
|
this.grist.toggleHeadroom()
|
153
159
|
}
|
154
160
|
},
|
155
|
-
|
161
|
+
toolbar: false
|
156
162
|
}
|
157
163
|
}
|
158
164
|
|
@@ -166,27 +172,17 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
166
172
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
167
173
|
?url-params-sensitive=${this.active}
|
168
174
|
>
|
169
|
-
<div slot="headroom">
|
170
|
-
<div
|
171
|
-
<
|
175
|
+
<div slot="headroom" class="header">
|
176
|
+
<div class="title">
|
177
|
+
<mwc-icon>summarize</mwc-icon>
|
178
|
+
${i18next.t('title.data-report list')}
|
172
179
|
</div>
|
173
180
|
|
174
|
-
<div
|
175
|
-
|
176
|
-
<mwc-icon
|
177
|
-
@click=${e => {
|
178
|
-
const target = e.currentTarget
|
179
|
-
this.sortersControl.open({
|
180
|
-
right: 0,
|
181
|
-
top: target.offsetTop + target.offsetHeight
|
182
|
-
})
|
183
|
-
}}
|
184
|
-
>expand_more</mwc-icon
|
185
|
-
>
|
186
|
-
<ox-popup id="sorter-control">
|
187
|
-
<ox-sorters-control> </ox-sorters-control>
|
188
|
-
</ox-popup>
|
181
|
+
<div class="filters">
|
182
|
+
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
189
183
|
</div>
|
184
|
+
|
185
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
190
186
|
</div>
|
191
187
|
</ox-grist>
|
192
188
|
`
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
2
3
|
import './data-sample-view.js'
|
3
4
|
|
4
5
|
import gql from 'graphql-tag'
|
@@ -7,28 +8,19 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import { connect } from 'pwa-helpers/connect-mixin'
|
8
9
|
import moment from 'moment-timezone'
|
9
10
|
|
10
|
-
import {
|
11
|
-
getEditor,
|
12
|
-
getRenderer,
|
13
|
-
ColumnConfig,
|
14
|
-
DataGrist,
|
15
|
-
FetchOption,
|
16
|
-
SortersControl,
|
17
|
-
GristRecord
|
18
|
-
} from '@operato/data-grist'
|
11
|
+
import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
19
12
|
import { client } from '@operato/graphql'
|
20
13
|
import { i18next, localize } from '@operato/i18n'
|
21
14
|
import { openPopup } from '@operato/layout'
|
22
15
|
import { PageView, store } from '@operato/shell'
|
23
|
-
import {
|
16
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
24
17
|
import { isMobileDevice } from '@operato/utils'
|
25
|
-
import { OxPopup } from '@operato/popup'
|
26
18
|
|
27
19
|
@customElement('data-sample-list-page')
|
28
20
|
export class DataSampleListPage extends connect(store)(localize(i18next)(PageView)) {
|
29
21
|
static styles = [
|
30
22
|
ScrollbarStyles,
|
31
|
-
|
23
|
+
CommonHeaderStyles,
|
32
24
|
css`
|
33
25
|
:host {
|
34
26
|
display: flex;
|
@@ -48,7 +40,6 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
48
40
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
49
41
|
|
50
42
|
@query('ox-grist') private grist!: DataGrist
|
51
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
52
43
|
|
53
44
|
get context() {
|
54
45
|
return {
|
@@ -69,7 +60,8 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
69
60
|
exportable: {
|
70
61
|
name: i18next.t('title.data-sample list'),
|
71
62
|
data: this._exportableData.bind(this)
|
72
|
-
}
|
63
|
+
},
|
64
|
+
toolbar: false
|
73
65
|
}
|
74
66
|
}
|
75
67
|
|
@@ -83,33 +75,17 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
83
75
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
84
76
|
?url-params-sensitive=${false /* this.active */}
|
85
77
|
>
|
86
|
-
<div slot="headroom">
|
87
|
-
<div
|
88
|
-
<
|
78
|
+
<div slot="headroom" class="header">
|
79
|
+
<div class="title">
|
80
|
+
<mwc-icon>summarize</mwc-icon>
|
81
|
+
${i18next.t('title.data-sample list')}
|
89
82
|
</div>
|
90
83
|
|
91
|
-
<div
|
92
|
-
|
93
|
-
<mwc-icon
|
94
|
-
@click=${e => {
|
95
|
-
const target = e.currentTarget
|
96
|
-
this.sortersControl.open({
|
97
|
-
right: 0,
|
98
|
-
top: target.offsetTop + target.offsetHeight
|
99
|
-
})
|
100
|
-
}}
|
101
|
-
>expand_more</mwc-icon
|
102
|
-
>
|
103
|
-
<ox-popup id="sorter-control">
|
104
|
-
<ox-sorters-control> </ox-sorters-control>
|
105
|
-
</ox-popup>
|
84
|
+
<div class="filters">
|
85
|
+
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
106
86
|
</div>
|
107
87
|
|
108
|
-
<
|
109
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
110
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
111
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
112
|
-
</div>
|
88
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
113
89
|
</div>
|
114
90
|
</ox-grist>
|
115
91
|
`
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import '@operato/data-grist'
|
2
|
+
import '@operato/context/ox-context-page-toolbar.js'
|
2
3
|
import './data-sample-view.js'
|
3
4
|
|
4
5
|
import gql from 'graphql-tag'
|
@@ -7,28 +8,19 @@ import { customElement, property, query, state } from 'lit/decorators.js'
|
|
7
8
|
import { connect } from 'pwa-helpers/connect-mixin'
|
8
9
|
import moment from 'moment-timezone'
|
9
10
|
|
10
|
-
import {
|
11
|
-
getEditor,
|
12
|
-
getRenderer,
|
13
|
-
ColumnConfig,
|
14
|
-
DataGrist,
|
15
|
-
FetchOption,
|
16
|
-
SortersControl,
|
17
|
-
GristRecord
|
18
|
-
} from '@operato/data-grist'
|
11
|
+
import { DataGrist, FetchOption, GristRecord } from '@operato/data-grist'
|
19
12
|
import { client } from '@operato/graphql'
|
20
13
|
import { i18next, localize } from '@operato/i18n'
|
21
14
|
import { openPopup } from '@operato/layout'
|
22
15
|
import { PageView, store } from '@operato/shell'
|
23
|
-
import {
|
16
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
24
17
|
import { isMobileDevice } from '@operato/utils'
|
25
|
-
import { OxPopup } from '@operato/popup'
|
26
18
|
|
27
19
|
@customElement('data-sample-search-page')
|
28
20
|
export class DataSampleSearchPage extends connect(store)(localize(i18next)(PageView)) {
|
29
21
|
static styles = [
|
30
22
|
ScrollbarStyles,
|
31
|
-
|
23
|
+
CommonHeaderStyles,
|
32
24
|
css`
|
33
25
|
:host {
|
34
26
|
display: flex;
|
@@ -52,7 +44,6 @@ export class DataSampleSearchPage extends connect(store)(localize(i18next)(PageV
|
|
52
44
|
@state() mode: 'CARD' | 'GRID' | 'LIST' = isMobileDevice() ? 'CARD' : 'GRID'
|
53
45
|
|
54
46
|
@query('ox-grist') private grist!: DataGrist
|
55
|
-
@query('#sorter-control') private sortersControl!: OxPopup
|
56
47
|
|
57
48
|
get context() {
|
58
49
|
return {
|
@@ -73,7 +64,8 @@ export class DataSampleSearchPage extends connect(store)(localize(i18next)(PageV
|
|
73
64
|
exportable: {
|
74
65
|
name: i18next.t('title.data-sample search'),
|
75
66
|
data: this._exportableData.bind(this)
|
76
|
-
}
|
67
|
+
},
|
68
|
+
toolbar: false
|
77
69
|
}
|
78
70
|
}
|
79
71
|
|
@@ -82,33 +74,17 @@ export class DataSampleSearchPage extends connect(store)(localize(i18next)(PageV
|
|
82
74
|
|
83
75
|
return html`
|
84
76
|
<ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
|
85
|
-
<div slot="headroom">
|
86
|
-
<div
|
87
|
-
<
|
77
|
+
<div slot="headroom" class="header">
|
78
|
+
<div class="title">
|
79
|
+
<mwc-icon>summarize</mwc-icon>
|
80
|
+
${i18next.t('title.data-sample search')}
|
88
81
|
</div>
|
89
82
|
|
90
|
-
<div
|
91
|
-
|
92
|
-
<mwc-icon
|
93
|
-
@click=${e => {
|
94
|
-
const target = e.currentTarget
|
95
|
-
this.sortersControl.open({
|
96
|
-
right: 0,
|
97
|
-
top: target.offsetTop + target.offsetHeight
|
98
|
-
})
|
99
|
-
}}
|
100
|
-
>expand_more</mwc-icon
|
101
|
-
>
|
102
|
-
<ox-popup id="sorter-control">
|
103
|
-
<ox-sorters-control> </ox-sorters-control>
|
104
|
-
</ox-popup>
|
83
|
+
<div class="filters">
|
84
|
+
<ox-filters-form class="filter" autofocus without-search></ox-filters-form>
|
105
85
|
</div>
|
106
86
|
|
107
|
-
<
|
108
|
-
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
109
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
110
|
-
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
111
|
-
</div>
|
87
|
+
<ox-context-page-toolbar class="actions" .context=${this.context}></ox-context-page-toolbar>
|
112
88
|
</div>
|
113
89
|
</ox-grist>
|
114
90
|
`
|
@@ -11,10 +11,9 @@ import { client } from '@operato/graphql'
|
|
11
11
|
import { i18next, localize } from '@operato/i18n'
|
12
12
|
import { notify } from '@operato/layout'
|
13
13
|
import { PageView, store } from '@operato/shell'
|
14
|
-
import {
|
14
|
+
import { CommonHeaderStyles, ScrollbarStyles } from '@operato/styles'
|
15
15
|
import { isMobileDevice } from '@operato/utils'
|
16
|
-
import {
|
17
|
-
import { OxPopup } from '@operato/popup'
|
16
|
+
import { DataGrist, FetchOption } from '@operato/data-grist'
|
18
17
|
import { OxPrompt } from '@operato/popup/ox-prompt.js'
|
19
18
|
|
20
19
|
@customElement('data-sensor-list-page')
|
@@ -68,25 +67,19 @@ export class DataSensorListPage extends connect(store)(localize(i18next)(PageVie
|
|
68
67
|
help: 'dataset/data-sensor',
|
69
68
|
actions: [
|
70
69
|
{
|
71
|
-
|
72
|
-
// icon: 'copy',
|
70
|
+
icon: 'content_copy',
|
73
71
|
title: i18next.t('button.copy'),
|
74
|
-
action: this._copyDataSensor.bind(this)
|
75
|
-
...CommonButtonStyles.copy
|
72
|
+
action: this._copyDataSensor.bind(this)
|
76
73
|
},
|
77
74
|
{
|
78
|
-
type: 'icon',
|
79
75
|
icon: 'save',
|
80
76
|
title: i18next.t('button.save'),
|
81
77
|
action: this._updateDataSensor.bind(this)
|
82
|
-
// ...CommonButtonStyles.save
|
83
78
|
},
|
84
79
|
{
|
85
|
-
|
86
|
-
// icon: 'delete',
|
80
|
+
icon: 'delete',
|
87
81
|
title: i18next.t('button.delete'),
|
88
|
-
action: this._deleteDataSensor.bind(this)
|
89
|
-
...CommonButtonStyles.delete
|
82
|
+
action: this._deleteDataSensor.bind(this)
|
90
83
|
}
|
91
84
|
],
|
92
85
|
toolbar: false
|
@@ -8,18 +8,6 @@ import { i18next, localize } from '@operato/i18n'
|
|
8
8
|
import { isMobileDevice } from '@operato/utils'
|
9
9
|
import { ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
10
10
|
|
11
|
-
enum DataItemStatType {
|
12
|
-
sum = 'sum',
|
13
|
-
mean = 'mean',
|
14
|
-
stddev = 'stddev',
|
15
|
-
variance = 'variance',
|
16
|
-
min = 'min',
|
17
|
-
max = 'max',
|
18
|
-
range = 'range',
|
19
|
-
median = 'median',
|
20
|
-
mode = 'mode'
|
21
|
-
}
|
22
|
-
|
23
11
|
const DataItemStats = ['sum', 'mean', 'stddev', 'variance', 'min', 'max', 'range', 'median', 'mode']
|
24
12
|
|
25
13
|
@customElement('data-item-list')
|