@things-factory/dataset 5.0.0-alpha.47 → 5.0.0-alpha.48
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-ooc/data-ooc-list-page.js +1 -1
- package/client/pages/data-report/data-report-embed-page.js +9 -9
- package/client/pages/data-report/jasper-report-oocs-page.js +15 -13
- package/client/pages/data-report/jasper-report-samples-crosstab-page.js +15 -13
- package/client/pages/data-report/jasper-report-samples-page.js +15 -13
- package/client/pages/data-sample/data-sample-list-page.js +1 -1
- package/client/pages/data-sensor/data-sensor-list-page.js +1 -1
- package/client/pages/data-set/data-set-list-page.js +2 -5
- package/package.json +17 -17
- package/yarn-error.log +0 -23244
@@ -67,7 +67,7 @@ export class DataOocListPage extends connect(store)(localize(i18next)(PageView))
|
|
67
67
|
.mode=${mode}
|
68
68
|
.config=${this.gristConfig}
|
69
69
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
70
|
-
url-params-sensitive
|
70
|
+
?url-params-sensitive=${this.active}
|
71
71
|
>
|
72
72
|
<div slot="headroom">
|
73
73
|
<div id="filters">
|
@@ -1,11 +1,12 @@
|
|
1
|
-
import { css, html } from 'lit'
|
2
1
|
import '@operato/data-grist'
|
3
2
|
import '@things-factory/form-ui'
|
4
3
|
|
4
|
+
import { css, html } from 'lit'
|
5
|
+
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
6
7
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
7
8
|
import { PageView } from '@things-factory/shell'
|
8
|
-
import {
|
9
|
+
import { encodeFormParams, getCookie } from '@things-factory/utils'
|
9
10
|
|
10
11
|
class DataReportEmbedPage extends localize(i18next)(PageView) {
|
11
12
|
static get properties() {
|
@@ -69,7 +70,7 @@ class DataReportEmbedPage extends localize(i18next)(PageView) {
|
|
69
70
|
console.log('filters changed', e.detail)
|
70
71
|
this._reportTemplate(e.detail.filters)
|
71
72
|
}}
|
72
|
-
url-params-sensitive
|
73
|
+
?url-params-sensitive=${this.active}
|
73
74
|
></ox-filters-form-base>
|
74
75
|
<iframe id="container" frameborder="0" style="border:0"></iframe>
|
75
76
|
`
|
@@ -82,18 +83,17 @@ class DataReportEmbedPage extends localize(i18next)(PageView) {
|
|
82
83
|
}
|
83
84
|
|
84
85
|
async _reportTemplate(filters) {
|
85
|
-
|
86
86
|
// convert filters array to object
|
87
|
-
const params = filters.reduce((acc,curr) => (acc[curr.name] = curr.value, acc), {})
|
87
|
+
const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
|
88
88
|
Object.assign(params, this.lifecycle.params)
|
89
89
|
|
90
90
|
const { workDateRange, workShift, reportView } = params
|
91
91
|
|
92
92
|
/** ignoring date conditions */
|
93
|
-
if (!workDateRange[0] || !workDateRange[1] ||
|
93
|
+
if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
|
94
94
|
return
|
95
95
|
}
|
96
|
-
|
96
|
+
|
97
97
|
/** urlencoded params including test values */
|
98
98
|
const urlParams = {
|
99
99
|
table: 'samples',
|
@@ -103,11 +103,11 @@ class DataReportEmbedPage extends localize(i18next)(PageView) {
|
|
103
103
|
token: getCookie('access_token'),
|
104
104
|
workShift
|
105
105
|
}
|
106
|
-
|
106
|
+
|
107
107
|
const encodedUrlParams = encodeFormParams(urlParams)
|
108
108
|
|
109
109
|
this.shadowRoot.querySelector('#container').src = `${reportView}?params=${encodedUrlParams}`
|
110
110
|
}
|
111
111
|
}
|
112
112
|
|
113
|
-
window.customElements.define('data-report-embed-page', DataReportEmbedPage)
|
113
|
+
window.customElements.define('data-report-embed-page', DataReportEmbedPage)
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { css, html } from 'lit'
|
2
1
|
import '@operato/data-grist'
|
3
2
|
import '@operato/form'
|
4
3
|
|
4
|
+
import { css, html } from 'lit'
|
5
|
+
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
6
7
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
7
8
|
import { PageView } from '@things-factory/shell'
|
@@ -69,7 +70,7 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
69
70
|
console.log('filters changed', e.detail)
|
70
71
|
this._reportTemplate(e.detail.filters)
|
71
72
|
}}
|
72
|
-
url-params-sensitive
|
73
|
+
?url-params-sensitive=${this.active}
|
73
74
|
></ox-filters-form-base>
|
74
75
|
<iframe id="container"></iframe>
|
75
76
|
`
|
@@ -85,16 +86,16 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
85
86
|
}
|
86
87
|
|
87
88
|
async _reportTemplate(filters) {
|
88
|
-
const params = filters.reduce((acc,curr) => (acc[curr.name] = curr.value, acc), {})
|
89
|
+
const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
|
89
90
|
Object.assign(params, this.lifecycle.params)
|
90
91
|
|
91
92
|
const { workDateRange, workShift, template } = params
|
92
93
|
|
93
94
|
/** ignoring date conditions */
|
94
|
-
if (!workDateRange[0] || !workDateRange[1] ||
|
95
|
+
if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
|
95
96
|
return
|
96
97
|
}
|
97
|
-
|
98
|
+
|
98
99
|
/** urlencoded params including test values */
|
99
100
|
const urlParams = {
|
100
101
|
table: 'ooc',
|
@@ -105,16 +106,17 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
105
106
|
template,
|
106
107
|
templateType: 'normal'
|
107
108
|
}
|
108
|
-
|
109
|
-
const encodedUrlParams = Object.keys(urlParams)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
109
|
+
|
110
|
+
const encodedUrlParams = Object.keys(urlParams)
|
111
|
+
.filter(key => {
|
112
|
+
// ignore empty
|
113
|
+
return !!urlParams[key]
|
114
|
+
})
|
115
|
+
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
116
|
+
.join('&')
|
115
117
|
|
116
118
|
this.shadowRoot.querySelector('#container').src = `/data-report/jasper?${encodedUrlParams}`
|
117
119
|
}
|
118
120
|
}
|
119
121
|
|
120
|
-
window.customElements.define('jasper-report-oocs-page', JasperReportOocsPage)
|
122
|
+
window.customElements.define('jasper-report-oocs-page', JasperReportOocsPage)
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { css, html } from 'lit'
|
2
1
|
import '@operato/data-grist'
|
3
2
|
import '@operato/form'
|
4
3
|
|
4
|
+
import { css, html } from 'lit'
|
5
|
+
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
6
7
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
7
8
|
import { PageView } from '@things-factory/shell'
|
@@ -69,7 +70,7 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
69
70
|
console.log('filters changed', e.detail)
|
70
71
|
this._reportTemplate(e.detail.filters)
|
71
72
|
}}
|
72
|
-
url-params-sensitive
|
73
|
+
?url-params-sensitive=${this.active}
|
73
74
|
></ox-filters-form-base>
|
74
75
|
<iframe id="container"></iframe>
|
75
76
|
`
|
@@ -85,16 +86,16 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
85
86
|
}
|
86
87
|
|
87
88
|
async _reportTemplate(filters) {
|
88
|
-
const params = filters.reduce((acc,curr) => (acc[curr.name] = curr.value, acc), {})
|
89
|
+
const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
|
89
90
|
Object.assign(params, this.lifecycle.params)
|
90
91
|
|
91
92
|
const { workDateRange, workShift, template } = params
|
92
93
|
|
93
94
|
/** ignoring date conditions */
|
94
|
-
if (!workDateRange[0] || !workDateRange[1] ||
|
95
|
+
if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
|
95
96
|
return
|
96
97
|
}
|
97
|
-
|
98
|
+
|
98
99
|
/** urlencoded params including test values */
|
99
100
|
const urlParams = {
|
100
101
|
table: 'samples',
|
@@ -105,16 +106,17 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
105
106
|
template,
|
106
107
|
templateType: 'crosstab'
|
107
108
|
}
|
108
|
-
|
109
|
-
const encodedUrlParams = Object.keys(urlParams)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
109
|
+
|
110
|
+
const encodedUrlParams = Object.keys(urlParams)
|
111
|
+
.filter(key => {
|
112
|
+
// ignore empty
|
113
|
+
return !!urlParams[key]
|
114
|
+
})
|
115
|
+
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
116
|
+
.join('&')
|
115
117
|
|
116
118
|
this.shadowRoot.querySelector('#container').src = `/data-report/jasper?${encodedUrlParams}`
|
117
119
|
}
|
118
120
|
}
|
119
121
|
|
120
|
-
window.customElements.define('jasper-report-samples-crosstab-page', JasperReportSamplesCrosstabPage)
|
122
|
+
window.customElements.define('jasper-report-samples-crosstab-page', JasperReportSamplesCrosstabPage)
|
@@ -1,7 +1,8 @@
|
|
1
|
-
import { css, html } from 'lit'
|
2
1
|
import '@operato/data-grist'
|
3
2
|
import '@operato/form'
|
4
3
|
|
4
|
+
import { css, html } from 'lit'
|
5
|
+
|
5
6
|
import { i18next, localize } from '@operato/i18n'
|
6
7
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
7
8
|
import { PageView } from '@things-factory/shell'
|
@@ -69,7 +70,7 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
69
70
|
console.log('filters changed', e.detail)
|
70
71
|
this._reportTemplate(e.detail.filters)
|
71
72
|
}}
|
72
|
-
url-params-sensitive
|
73
|
+
?url-params-sensitive=${this.active}
|
73
74
|
></ox-filters-form-base>
|
74
75
|
<iframe id="container"></iframe>
|
75
76
|
`
|
@@ -85,16 +86,16 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
85
86
|
}
|
86
87
|
|
87
88
|
async _reportTemplate(filters) {
|
88
|
-
const params = filters.reduce((acc,curr) => (acc[curr.name] = curr.value, acc), {})
|
89
|
+
const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
|
89
90
|
Object.assign(params, this.lifecycle.params)
|
90
91
|
|
91
92
|
const { workDateRange, workShift, template } = params
|
92
93
|
|
93
94
|
/** ignoring date conditions */
|
94
|
-
if (!workDateRange[0] || !workDateRange[1] ||
|
95
|
+
if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
|
95
96
|
return
|
96
97
|
}
|
97
|
-
|
98
|
+
|
98
99
|
/** urlencoded params including test values */
|
99
100
|
const urlParams = {
|
100
101
|
table: 'samples',
|
@@ -105,16 +106,17 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
105
106
|
template,
|
106
107
|
templateType: 'normal'
|
107
108
|
}
|
108
|
-
|
109
|
-
const encodedUrlParams = Object.keys(urlParams)
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
109
|
+
|
110
|
+
const encodedUrlParams = Object.keys(urlParams)
|
111
|
+
.filter(key => {
|
112
|
+
// ignore empty
|
113
|
+
return !!urlParams[key]
|
114
|
+
})
|
115
|
+
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
116
|
+
.join('&')
|
115
117
|
|
116
118
|
this.shadowRoot.querySelector('#container').src = `/data-report/jasper?${encodedUrlParams}`
|
117
119
|
}
|
118
120
|
}
|
119
121
|
|
120
|
-
window.customElements.define('jasper-report-samples-page', JasperReportSamplesPage)
|
122
|
+
window.customElements.define('jasper-report-samples-page', JasperReportSamplesPage)
|
@@ -61,7 +61,7 @@ export class DataSampleListPage extends connect(store)(localize(i18next)(PageVie
|
|
61
61
|
.mode=${mode}
|
62
62
|
.config=${this.gristConfig}
|
63
63
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
64
|
-
url-params-sensitive
|
64
|
+
?url-params-sensitive=${this.active}
|
65
65
|
>
|
66
66
|
<div slot="headroom">
|
67
67
|
<div id="filters">
|
@@ -72,7 +72,7 @@ export class DataSensorListPage extends connect(store)(localize(i18next)(PageVie
|
|
72
72
|
.mode=${mode}
|
73
73
|
.config=${this.gristConfig}
|
74
74
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
75
|
-
url-params-sensitive
|
75
|
+
?url-params-sensitive=${this.active}
|
76
76
|
>
|
77
77
|
<div slot="headroom">
|
78
78
|
<div id="filters">
|
@@ -16,7 +16,6 @@ import { notify, openPopup } from '@operato/layout'
|
|
16
16
|
import { PageView, store } from '@operato/shell'
|
17
17
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
18
18
|
import { isMobileDevice } from '@operato/utils'
|
19
|
-
import { FileSelector } from '@things-factory/attachment-ui'
|
20
19
|
|
21
20
|
const DEFAULT_TZ = Intl.DateTimeFormat().resolvedOptions().timeZone
|
22
21
|
const TIMEZONE_OPTIONS = ['', DEFAULT_TZ, ...moment.tz.names().filter(tz => tz !== DEFAULT_TZ)]
|
@@ -101,7 +100,6 @@ const USECASE_OPTIONS = () => {
|
|
101
100
|
export class DataSetListPage extends connect(store)(localize(i18next)(PageView)) {
|
102
101
|
static get properties() {
|
103
102
|
return {
|
104
|
-
active: String,
|
105
103
|
gristConfig: Object,
|
106
104
|
mode: String
|
107
105
|
}
|
@@ -163,7 +161,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
163
161
|
.mode=${mode}
|
164
162
|
.config=${this.gristConfig}
|
165
163
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
166
|
-
url-params-sensitive
|
164
|
+
?url-params-sensitive=${this.active}
|
167
165
|
>
|
168
166
|
<div slot="headroom">
|
169
167
|
<div id="filters">
|
@@ -202,7 +200,6 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
202
200
|
}
|
203
201
|
|
204
202
|
async pageInitialized(lifecycle) {
|
205
|
-
const fileSelector = new FileSelector()
|
206
203
|
this.gristConfig = {
|
207
204
|
list: {
|
208
205
|
fields: ['name', 'description'],
|
@@ -708,7 +705,7 @@ export class DataSetListPage extends connect(store)(localize(i18next)(PageView))
|
|
708
705
|
return column.imex
|
709
706
|
})
|
710
707
|
|
711
|
-
let records = this.grist.data.records
|
708
|
+
let records = this.grist.data.records
|
712
709
|
|
713
710
|
var data = records.map(item => {
|
714
711
|
return {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@things-factory/dataset",
|
3
|
-
"version": "5.0.0-alpha.
|
3
|
+
"version": "5.0.0-alpha.48",
|
4
4
|
"main": "dist-server/index.js",
|
5
5
|
"browser": "client/index.js",
|
6
6
|
"things-factory": true,
|
@@ -24,23 +24,23 @@
|
|
24
24
|
"migration:create": "node ../../node_modules/typeorm/cli.js migration:create -d ./server/migrations"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@operato/app": "1.0.0-beta.
|
28
|
-
"@operato/data-grist": "1.0.0-beta.
|
29
|
-
"@operato/dataset": "1.0.0-beta.
|
30
|
-
"@operato/graphql": "1.0.0-beta.
|
31
|
-
"@operato/i18n": "1.0.0-beta.
|
32
|
-
"@operato/layout": "1.0.0-beta.
|
33
|
-
"@operato/shell": "1.0.0-beta.
|
34
|
-
"@operato/styles": "1.0.0-beta.
|
35
|
-
"@operato/utils": "1.0.0-beta.
|
36
|
-
"@things-factory/auth-base": "^5.0.0-alpha.
|
37
|
-
"@things-factory/aws-base": "^5.0.0-alpha.
|
38
|
-
"@things-factory/board-service": "^5.0.0-alpha.
|
39
|
-
"@things-factory/env": "^5.0.0-alpha.
|
40
|
-
"@things-factory/shell": "^5.0.0-alpha.
|
41
|
-
"@things-factory/work-shift": "^5.0.0-alpha.
|
27
|
+
"@operato/app": "1.0.0-beta.18",
|
28
|
+
"@operato/data-grist": "1.0.0-beta.18",
|
29
|
+
"@operato/dataset": "1.0.0-beta.18",
|
30
|
+
"@operato/graphql": "1.0.0-beta.18",
|
31
|
+
"@operato/i18n": "1.0.0-beta.18",
|
32
|
+
"@operato/layout": "1.0.0-beta.18",
|
33
|
+
"@operato/shell": "1.0.0-beta.18",
|
34
|
+
"@operato/styles": "1.0.0-beta.18",
|
35
|
+
"@operato/utils": "1.0.0-beta.18",
|
36
|
+
"@things-factory/auth-base": "^5.0.0-alpha.48",
|
37
|
+
"@things-factory/aws-base": "^5.0.0-alpha.48",
|
38
|
+
"@things-factory/board-service": "^5.0.0-alpha.48",
|
39
|
+
"@things-factory/env": "^5.0.0-alpha.48",
|
40
|
+
"@things-factory/shell": "^5.0.0-alpha.48",
|
41
|
+
"@things-factory/work-shift": "^5.0.0-alpha.48",
|
42
42
|
"cron-parser": "^4.3.0",
|
43
43
|
"moment-timezone": "^0.5.34"
|
44
44
|
},
|
45
|
-
"gitHead": "
|
45
|
+
"gitHead": "0fa9b26abce176fa96d820fb50cc5565760d50c9"
|
46
46
|
}
|