@things-factory/dataset 6.0.25 → 6.0.28
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/README.md +26 -11
- package/assets/images/data-collect.png +0 -0
- package/assets/images/ooc.png +0 -0
- package/assets/images/oos.png +0 -0
- package/client/{bootstrap.js → bootstrap.ts} +5 -1
- package/client/components/data-collect-activity-view.ts +100 -0
- package/client/components/{data-entry-form.js → data-entry-form.ts} +30 -33
- package/client/components/ooc-resolve-activity-view.ts +174 -0
- package/client/components/ooc-review-activity-view.ts +153 -0
- package/client/pages/data-archive/{data-archive-list-page.js → data-archive-list-page.ts} +67 -53
- package/client/pages/data-archive/{data-archive-request-popup.js → data-archive-request-popup.ts} +41 -39
- package/client/pages/data-entry/{data-entry-list-page.js → data-entry-list-page.ts} +41 -38
- package/client/pages/data-key-set/{data-key-item-list.js → data-key-item-list.ts} +31 -39
- package/client/pages/data-key-set/data-key-set-importer.ts +95 -0
- package/client/pages/data-key-set/{data-key-set-list-page.js → data-key-set-list-page.ts} +54 -35
- package/client/pages/data-ooc/{data-ooc-list-page.js → data-ooc-list-page.ts} +56 -36
- package/client/pages/data-ooc/data-ooc-view-page.ts +115 -0
- package/client/pages/data-ooc/data-ooc-view.ts +124 -0
- package/client/pages/data-report/{data-report-embed-page.js → data-report-embed-page.ts} +25 -34
- package/client/pages/data-report/{data-report-list-page.js → data-report-list-page.ts} +49 -43
- package/client/pages/data-report/{data-report-samples-page.js → data-report-samples-page.ts} +29 -43
- package/client/pages/data-report/{jasper-report-oocs-page.js → jasper-report-oocs-page.ts} +22 -34
- package/client/pages/data-report/{jasper-report-samples-crosstab-page.js → jasper-report-samples-crosstab-page.ts} +22 -34
- package/client/pages/data-report/{jasper-report-samples-page.js → jasper-report-samples-page.ts} +22 -34
- package/client/pages/data-sample/{data-sample-list-page.js → data-sample-list-page.ts} +49 -36
- package/client/pages/data-sample/{data-sample-search-page.js → data-sample-search-page.ts} +53 -39
- package/client/pages/data-sample/{data-sample-view.js → data-sample-view.ts} +29 -33
- package/client/pages/data-sensor/{data-sensor-list-page.js → data-sensor-list-page.ts} +41 -35
- package/client/pages/data-set/{data-item-list.js → data-item-list.ts} +31 -37
- package/client/pages/data-set/data-set-importer.ts +96 -0
- package/client/pages/data-set/{data-set-list-page.js → data-set-list-page.ts} +173 -40
- package/client/{route.js → route.ts} +5 -1
- package/client/tsconfig.json +11 -0
- package/config/config.development.js +30 -30
- package/config/config.production.js +31 -31
- package/dist-client/bootstrap.d.ts +5 -0
- package/dist-client/bootstrap.js +16 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/data-collect-activity-view.d.ts +19 -0
- package/dist-client/components/data-collect-activity-view.js +101 -0
- package/dist-client/components/data-collect-activity-view.js.map +1 -0
- package/dist-client/components/data-entry-form.d.ts +15 -0
- package/dist-client/components/data-entry-form.js +83 -0
- package/dist-client/components/data-entry-form.js.map +1 -0
- package/dist-client/components/data-ooc-activity-view.d.ts +1 -0
- package/dist-client/components/data-ooc-activity-view.js +154 -0
- package/dist-client/components/data-ooc-activity-view.js.map +1 -0
- package/dist-client/components/ooc-resolve-activity-view.d.ts +1 -0
- package/dist-client/components/ooc-resolve-activity-view.js +175 -0
- package/dist-client/components/ooc-resolve-activity-view.js.map +1 -0
- package/dist-client/components/ooc-review-activity-view.d.ts +1 -0
- package/dist-client/components/ooc-review-activity-view.js +155 -0
- package/dist-client/components/ooc-review-activity-view.js.map +1 -0
- package/dist-client/index.d.ts +1 -0
- package/dist-client/index.js +2 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/data-archive/data-archive-list-page.d.ts +71 -0
- package/dist-client/pages/data-archive/data-archive-list-page.js +287 -0
- package/dist-client/pages/data-archive/data-archive-list-page.js.map +1 -0
- package/dist-client/pages/data-archive/data-archive-request-popup.d.ts +1 -0
- package/dist-client/pages/data-archive/data-archive-request-popup.js +161 -0
- package/dist-client/pages/data-archive/data-archive-request-popup.js.map +1 -0
- package/dist-client/pages/data-entry/data-entry-list-page.d.ts +36 -0
- package/dist-client/pages/data-entry/data-entry-list-page.js +383 -0
- package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -0
- package/dist-client/pages/data-key-set/data-key-item-list.d.ts +18 -0
- package/dist-client/pages/data-key-set/data-key-item-list.js +188 -0
- package/dist-client/pages/data-key-set/data-key-item-list.js.map +1 -0
- package/dist-client/pages/data-key-set/data-key-set-importer.d.ts +9 -0
- package/dist-client/pages/data-key-set/data-key-set-importer.js +100 -0
- package/dist-client/pages/data-key-set/data-key-set-importer.js.map +1 -0
- package/dist-client/pages/data-key-set/data-key-set-list-page.d.ts +60 -0
- package/dist-client/pages/data-key-set/data-key-set-list-page.js +450 -0
- package/dist-client/pages/data-key-set/data-key-set-list-page.js.map +1 -0
- package/dist-client/pages/data-ooc/data-ooc-list-page.d.ts +58 -0
- package/dist-client/pages/data-ooc/data-ooc-list-page.js +479 -0
- package/dist-client/pages/data-ooc/data-ooc-list-page.js.map +1 -0
- package/dist-client/pages/data-ooc/data-ooc-view-page.d.ts +18 -0
- package/dist-client/pages/data-ooc/data-ooc-view-page.js +114 -0
- package/dist-client/pages/data-ooc/data-ooc-view-page.js.map +1 -0
- package/dist-client/pages/data-ooc/data-ooc-view.d.ts +15 -0
- package/dist-client/pages/data-ooc/data-ooc-view.js +130 -0
- package/dist-client/pages/data-ooc/data-ooc-view.js.map +1 -0
- package/dist-client/pages/data-report/data-report-embed-page.d.ts +36 -0
- package/dist-client/pages/data-report/data-report-embed-page.js +101 -0
- package/dist-client/pages/data-report/data-report-embed-page.js.map +1 -0
- package/dist-client/pages/data-report/data-report-list-page.d.ts +36 -0
- package/dist-client/pages/data-report/data-report-list-page.js +431 -0
- package/dist-client/pages/data-report/data-report-list-page.js.map +1 -0
- package/dist-client/pages/data-report/data-report-samples-page.d.ts +32 -0
- package/dist-client/pages/data-report/data-report-samples-page.js +164 -0
- package/dist-client/pages/data-report/data-report-samples-page.js.map +1 -0
- package/dist-client/pages/data-report/jasper-report-oocs-page.d.ts +2 -0
- package/dist-client/pages/data-report/jasper-report-oocs-page.js +101 -0
- package/dist-client/pages/data-report/jasper-report-oocs-page.js.map +1 -0
- package/dist-client/pages/data-report/jasper-report-samples-crosstab-page.d.ts +2 -0
- package/dist-client/pages/data-report/jasper-report-samples-crosstab-page.js +101 -0
- package/dist-client/pages/data-report/jasper-report-samples-crosstab-page.js.map +1 -0
- package/dist-client/pages/data-report/jasper-report-samples-page.d.ts +2 -0
- package/dist-client/pages/data-report/jasper-report-samples-page.js +101 -0
- package/dist-client/pages/data-report/jasper-report-samples-page.js.map +1 -0
- package/dist-client/pages/data-sample/data-sample-list-page.d.ts +58 -0
- package/dist-client/pages/data-sample/data-sample-list-page.js +412 -0
- package/dist-client/pages/data-sample/data-sample-list-page.js.map +1 -0
- package/dist-client/pages/data-sample/data-sample-search-page.d.ts +63 -0
- package/dist-client/pages/data-sample/data-sample-search-page.js +413 -0
- package/dist-client/pages/data-sample/data-sample-search-page.js.map +1 -0
- package/dist-client/pages/data-sample/data-sample-view.d.ts +1 -0
- package/dist-client/pages/data-sample/data-sample-view.js +109 -0
- package/dist-client/pages/data-sample/data-sample-view.js.map +1 -0
- package/dist-client/pages/data-sensor/data-sensor-list-page.d.ts +49 -0
- package/dist-client/pages/data-sensor/data-sensor-list-page.js +419 -0
- package/dist-client/pages/data-sensor/data-sensor-list-page.js.map +1 -0
- package/dist-client/pages/data-set/data-item-list.d.ts +1 -0
- package/dist-client/pages/data-set/data-item-list.js +267 -0
- package/dist-client/pages/data-set/data-item-list.js.map +1 -0
- package/dist-client/pages/data-set/data-set-importer.d.ts +10 -0
- package/dist-client/pages/data-set/data-set-importer.js +103 -0
- package/dist-client/pages/data-set/data-set-importer.js.map +1 -0
- package/dist-client/pages/data-set/data-set-list-page.d.ts +73 -0
- package/dist-client/pages/data-set/data-set-list-page.js +861 -0
- package/dist-client/pages/data-set/data-set-list-page.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +50 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-server/controllers/activity-template/activity-data-collect.js +82 -0
- package/dist-server/controllers/activity-template/activity-data-collect.js.map +1 -0
- package/dist-server/controllers/activity-template/activity-ooc-resolve.js +100 -0
- package/dist-server/controllers/activity-template/activity-ooc-resolve.js.map +1 -0
- package/dist-server/controllers/activity-template/activity-ooc-review.js +107 -0
- package/dist-server/controllers/activity-template/activity-ooc-review.js.map +1 -0
- package/dist-server/controllers/activity-template/activity-ooc.js +59 -0
- package/dist-server/controllers/activity-template/activity-ooc.js.map +1 -0
- package/dist-server/controllers/create-data-sample.js +53 -14
- package/dist-server/controllers/create-data-sample.js.map +1 -1
- package/dist-server/controllers/data-use-case.js +1 -1
- package/dist-server/controllers/data-use-case.js.map +1 -1
- package/dist-server/controllers/index.js +7 -0
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +1 -2
- package/dist-server/index.js.map +1 -1
- package/dist-server/routes.js +47 -3
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc-query.js +22 -2
- package/dist-server/service/data-ooc/data-ooc-query.js.map +1 -1
- package/dist-server/service/data-ooc/data-ooc.js +26 -0
- package/dist-server/service/data-ooc/data-ooc.js.map +1 -1
- package/dist-server/service/data-set/data-set-mutation.js +88 -0
- package/dist-server/service/data-set/data-set-mutation.js.map +1 -1
- package/dist-server/service/data-set/data-set-query.js +38 -4
- package/dist-server/service/data-set/data-set-query.js.map +1 -1
- package/dist-server/service/data-set/data-set-type.js +16 -0
- package/dist-server/service/data-set/data-set-type.js.map +1 -1
- package/dist-server/service/data-set/data-set.js +55 -3
- package/dist-server/service/data-set/data-set.js.map +1 -1
- package/dist-server/service/data-set-history/data-set-history-query.js +4 -3
- package/dist-server/service/data-set-history/data-set-history-query.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/helps/dataset/data-ooc.md +5 -4
- package/package.json +17 -12
- package/server/controllers/activity-template/activity-data-collect.ts +84 -0
- package/server/controllers/activity-template/activity-ooc-resolve.ts +114 -0
- package/server/controllers/activity-template/activity-ooc-review.ts +118 -0
- package/server/controllers/create-data-sample.ts +61 -21
- package/server/controllers/data-use-case.ts +1 -1
- package/server/controllers/index.ts +11 -0
- package/server/index.ts +1 -2
- package/server/routes.ts +62 -5
- package/server/service/data-ooc/data-ooc-query.ts +12 -2
- package/server/service/data-ooc/data-ooc.ts +23 -0
- package/server/service/data-set/data-set-mutation.ts +99 -0
- package/server/service/data-set/data-set-query.ts +39 -5
- package/server/service/data-set/data-set-type.ts +14 -0
- package/server/service/data-set/data-set.ts +43 -2
- package/server/service/data-set-history/data-set-history-query.ts +4 -3
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +6 -2
- package/translations/en.json +3 -1
- package/translations/ko.json +3 -1
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
- package/client/pages/data-key-set/data-key-set-importer.js +0 -105
- package/client/pages/data-ooc/data-ooc-view.js +0 -188
- package/client/pages/data-set/data-set-importer.js +0 -103
- package/server/middlewares/index.ts +0 -3
- package/server/migrations/index.ts +0 -9
- package/tsconfig.json +0 -9
- /package/assets/{data-report.jpg → images/data-report.jpg} +0 -0
- /package/assets/{data-samples.jpg → images/data-samples.jpg} +0 -0
- /package/assets/{diagram.jpg → images/dataset-diagram.jpg} +0 -0
- /package/assets/{glue-table-indices.png → images/glue-table-indices-for-dataset.png} +0 -0
- /package/client/{index.js → index.ts} +0 -0
|
@@ -3,17 +3,20 @@ import '@operato/board/ox-board-viewer.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
8
|
|
|
8
|
-
import { getRenderer } from '@operato/data-grist'
|
|
9
|
+
import { getEditor, getRenderer, ColumnConfig, DataGrist, FetchOption, SortersControl } from '@operato/data-grist'
|
|
9
10
|
import { OxDataUseCase } from '@operato/dataset'
|
|
10
11
|
import { client } from '@operato/graphql'
|
|
11
12
|
import { i18next, localize } from '@operato/i18n'
|
|
12
13
|
import { openPopup } from '@operato/layout'
|
|
13
14
|
import { navigate, PageView, store } from '@operato/shell'
|
|
14
15
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
16
|
+
import { OxPopup } from '@operato/popup'
|
|
17
|
+
import { encodeUrlParams } from '@operato/utils'
|
|
18
|
+
|
|
15
19
|
import { provider } from '@things-factory/board-ui'
|
|
16
|
-
import { encodeUrlParams } from '@things-factory/utils'
|
|
17
20
|
|
|
18
21
|
const USECASE_OPTIONS = () => {
|
|
19
22
|
return ['', ...OxDataUseCase.getUseCaseNames()].map(name => {
|
|
@@ -62,6 +65,9 @@ const showMonitorView = (columns, data, column, record, rowIndex) => {
|
|
|
62
65
|
// navigate(`board-viewer/${monitorView}?interactive=true&title=${title}`)
|
|
63
66
|
break
|
|
64
67
|
|
|
68
|
+
case 'custom-element':
|
|
69
|
+
break
|
|
70
|
+
|
|
65
71
|
case 'page':
|
|
66
72
|
navigate(monitorView)
|
|
67
73
|
break
|
|
@@ -73,8 +79,8 @@ const showMonitorView = (columns, data, column, record, rowIndex) => {
|
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
const showReportView = (columns, data, column, record, rowIndex) => {
|
|
76
|
-
const { id:datasetId, dataKeySet, name, reportType, reportView, reportTemplate } = record
|
|
77
|
-
const { id:dataKeySetId } = dataKeySet || { id: '' }
|
|
82
|
+
const { id: datasetId, dataKeySet, name, reportType, reportView, reportTemplate } = record
|
|
83
|
+
const { id: dataKeySetId } = dataKeySet || { id: '' }
|
|
78
84
|
const title = `${name} - ${i18next.t('title.data-report-view')}`
|
|
79
85
|
|
|
80
86
|
switch (reportType) {
|
|
@@ -89,55 +95,63 @@ const showReportView = (columns, data, column, record, rowIndex) => {
|
|
|
89
95
|
case 'embed':
|
|
90
96
|
break
|
|
91
97
|
|
|
98
|
+
case 'custom-element':
|
|
99
|
+
break
|
|
100
|
+
|
|
92
101
|
case 'page':
|
|
93
102
|
break
|
|
94
103
|
|
|
95
104
|
case 'external':
|
|
96
105
|
window.open(reportView, '_blank')
|
|
97
106
|
break
|
|
98
|
-
|
|
107
|
+
|
|
99
108
|
case 'jasper':
|
|
100
109
|
case 'shiny':
|
|
101
110
|
const encodedUrlParams = encodeUrlParams({ datasetId, dataKeySetId, reportType, reportView, reportTemplate })
|
|
102
111
|
navigate(`/data-report-samples/?${encodedUrlParams}`)
|
|
103
112
|
break
|
|
104
|
-
|
|
113
|
+
|
|
105
114
|
default:
|
|
106
115
|
break
|
|
107
116
|
}
|
|
108
117
|
}
|
|
109
118
|
|
|
119
|
+
@customElement('data-report-list-page')
|
|
110
120
|
export class DataReportListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
111
|
-
static
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
mode: String
|
|
118
|
-
}
|
|
119
|
-
}
|
|
121
|
+
static styles = [
|
|
122
|
+
ScrollbarStyles,
|
|
123
|
+
CommonGristStyles,
|
|
124
|
+
css`
|
|
125
|
+
:host {
|
|
126
|
+
display: flex;
|
|
120
127
|
|
|
121
|
-
|
|
122
|
-
return [
|
|
123
|
-
ScrollbarStyles,
|
|
124
|
-
CommonGristStyles,
|
|
125
|
-
css`
|
|
126
|
-
:host {
|
|
127
|
-
display: flex;
|
|
128
|
+
width: 100%;
|
|
128
129
|
|
|
129
|
-
|
|
130
|
+
--grid-record-emphasized-background-color: red;
|
|
131
|
+
--grid-record-emphasized-color: yellow;
|
|
132
|
+
}
|
|
133
|
+
`
|
|
134
|
+
]
|
|
130
135
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
]
|
|
136
|
-
}
|
|
136
|
+
@state() gristConfig: any
|
|
137
|
+
@state() mode: 'CARD' | 'GRID' | 'LIST' = 'CARD'
|
|
138
|
+
@query('ox-grist') private grist!: DataGrist
|
|
139
|
+
@query('#sorter-control') private sortersControl!: OxPopup
|
|
137
140
|
|
|
138
141
|
get context() {
|
|
139
142
|
return {
|
|
140
|
-
|
|
143
|
+
search: {
|
|
144
|
+
handler: (search: string) => {
|
|
145
|
+
this.grist.searchText = search
|
|
146
|
+
},
|
|
147
|
+
placeholder: i18next.t('title.data-report list'),
|
|
148
|
+
value: this.grist.searchText
|
|
149
|
+
},
|
|
150
|
+
filter: {
|
|
151
|
+
handler: () => {
|
|
152
|
+
this.grist.toggleHeadroom()
|
|
153
|
+
}
|
|
154
|
+
},
|
|
141
155
|
help: 'dataset/data-report-list'
|
|
142
156
|
}
|
|
143
157
|
}
|
|
@@ -149,13 +163,12 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
149
163
|
<ox-grist
|
|
150
164
|
.mode=${mode}
|
|
151
165
|
.config=${this.gristConfig}
|
|
152
|
-
.filters=${this.filters}
|
|
153
|
-
.orders=${this.orders}
|
|
154
166
|
.fetchHandler=${this.fetchHandler.bind(this)}
|
|
167
|
+
?url-params-sensitive=${this.active}
|
|
155
168
|
>
|
|
156
169
|
<div slot="headroom">
|
|
157
170
|
<div id="filters">
|
|
158
|
-
<ox-filters-form autofocus></ox-filters-form>
|
|
171
|
+
<ox-filters-form autofocus without-search></ox-filters-form>
|
|
159
172
|
</div>
|
|
160
173
|
|
|
161
174
|
<div id="sorters">
|
|
@@ -163,7 +176,7 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
163
176
|
<mwc-icon
|
|
164
177
|
@click=${e => {
|
|
165
178
|
const target = e.currentTarget
|
|
166
|
-
this.
|
|
179
|
+
this.sortersControl.open({
|
|
167
180
|
right: 0,
|
|
168
181
|
top: target.offsetTop + target.offsetHeight
|
|
169
182
|
})
|
|
@@ -179,10 +192,6 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
179
192
|
`
|
|
180
193
|
}
|
|
181
194
|
|
|
182
|
-
get grist() {
|
|
183
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
184
|
-
}
|
|
185
|
-
|
|
186
195
|
async pageInitialized(lifecycle) {
|
|
187
196
|
this.gristConfig = {
|
|
188
197
|
list: {
|
|
@@ -275,8 +284,7 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
275
284
|
record: {
|
|
276
285
|
editable: false
|
|
277
286
|
},
|
|
278
|
-
width: 80
|
|
279
|
-
label: true
|
|
287
|
+
width: 80
|
|
280
288
|
},
|
|
281
289
|
{
|
|
282
290
|
type: 'resource-object',
|
|
@@ -358,7 +366,7 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
358
366
|
}
|
|
359
367
|
}
|
|
360
368
|
|
|
361
|
-
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
369
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {
|
|
362
370
|
const response = await client.query({
|
|
363
371
|
query: gql`
|
|
364
372
|
query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
|
|
@@ -430,5 +438,3 @@ export class DataReportListPage extends connect(store)(localize(i18next)(PageVie
|
|
|
430
438
|
}
|
|
431
439
|
}
|
|
432
440
|
}
|
|
433
|
-
|
|
434
|
-
window.customElements.define('data-report-list-page', DataReportListPage)
|
package/client/pages/data-report/{data-report-samples-page.js → data-report-samples-page.ts}
RENAMED
|
@@ -6,46 +6,41 @@ import '@operato/data-grist'
|
|
|
6
6
|
|
|
7
7
|
import gql from 'graphql-tag'
|
|
8
8
|
import { css, html } from 'lit'
|
|
9
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
9
10
|
import { connect } from 'pwa-helpers/connect-mixin'
|
|
10
11
|
|
|
11
12
|
import { client } from '@operato/graphql'
|
|
12
13
|
import { i18next, localize } from '@operato/i18n'
|
|
13
14
|
import { PageView, store } from '@operato/shell'
|
|
14
15
|
import { ScrollbarStyles } from '@operato/styles'
|
|
16
|
+
import { encodeUrlParams } from '@operato/utils'
|
|
17
|
+
import { FetchOption } from '@operato/data-grist'
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
@customElement('data-report-samples-page')
|
|
18
20
|
export class DataReportSamplesPage extends connect(store)(localize(i18next)(PageView)) {
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
static styles = [
|
|
22
|
+
ScrollbarStyles,
|
|
23
|
+
css`
|
|
24
|
+
:host {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
padding: 0;
|
|
28
|
+
}
|
|
26
29
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
30
|
+
#container {
|
|
31
|
+
flex: 1;
|
|
32
|
+
padding: 0;
|
|
33
|
+
margin: 0;
|
|
34
|
+
border: 0;
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
]
|
|
36
38
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
margin: 0;
|
|
41
|
-
border: 0;
|
|
42
|
-
}
|
|
43
|
-
`
|
|
44
|
-
]
|
|
45
|
-
}
|
|
39
|
+
@state() dataKeySetId?: string
|
|
40
|
+
@state() dataKeySet: any
|
|
41
|
+
@query('iframe') container!: HTMLIFrameElement
|
|
46
42
|
|
|
47
43
|
get context() {
|
|
48
|
-
|
|
49
44
|
const today = new Date().toISOString().split('T')[0]
|
|
50
45
|
|
|
51
46
|
const filters = [
|
|
@@ -82,12 +77,7 @@ export class DataReportSamplesPage extends connect(store)(localize(i18next)(Page
|
|
|
82
77
|
|
|
83
78
|
render() {
|
|
84
79
|
// clear if pre-loaded
|
|
85
|
-
|
|
86
|
-
if (container) {
|
|
87
|
-
container.src = ""
|
|
88
|
-
// @TODO: Clear filters
|
|
89
|
-
/** */
|
|
90
|
-
}
|
|
80
|
+
this.container.src = ''
|
|
91
81
|
|
|
92
82
|
return html`
|
|
93
83
|
<ox-filters-form-base
|
|
@@ -98,7 +88,8 @@ export class DataReportSamplesPage extends connect(store)(localize(i18next)(Page
|
|
|
98
88
|
}}
|
|
99
89
|
?url-params-sensitive=${this.active}
|
|
100
90
|
></ox-filters-form-base>
|
|
101
|
-
|
|
91
|
+
|
|
92
|
+
<iframe></iframe>
|
|
102
93
|
`
|
|
103
94
|
}
|
|
104
95
|
|
|
@@ -132,7 +123,7 @@ export class DataReportSamplesPage extends connect(store)(localize(i18next)(Page
|
|
|
132
123
|
const encodedUrlParams = encodeUrlParams(urlParams)
|
|
133
124
|
|
|
134
125
|
const reportUrl = `/data-report/${urlParams.reportType}/`
|
|
135
|
-
this.
|
|
126
|
+
this.container.src = `${reportUrl}?${encodedUrlParams}`
|
|
136
127
|
}
|
|
137
128
|
|
|
138
129
|
pageUpdated(changes, lifecycle) {
|
|
@@ -143,14 +134,12 @@ export class DataReportSamplesPage extends connect(store)(localize(i18next)(Page
|
|
|
143
134
|
}
|
|
144
135
|
}
|
|
145
136
|
|
|
146
|
-
async fetchHandler({ page, limit, sortings = [], filters = [] }) {
|
|
147
|
-
|
|
148
|
-
}
|
|
137
|
+
async fetchHandler({ page, limit, sortings = [], filters = [] }: FetchOption) {}
|
|
149
138
|
|
|
150
139
|
async updated(changes) {
|
|
151
140
|
if (changes.has('dataKeySetId')) {
|
|
152
141
|
if (!this.dataKeySetId) {
|
|
153
|
-
this.dataKeySet
|
|
142
|
+
this.dataKeySet = null
|
|
154
143
|
return
|
|
155
144
|
}
|
|
156
145
|
|
|
@@ -180,7 +169,4 @@ export class DataReportSamplesPage extends connect(store)(localize(i18next)(Page
|
|
|
180
169
|
this.dataKeySet = response.data.dataKeySet
|
|
181
170
|
}
|
|
182
171
|
}
|
|
183
|
-
|
|
184
172
|
}
|
|
185
|
-
|
|
186
|
-
window.customElements.define('data-report-samples-page', DataReportSamplesPage)
|
|
@@ -2,40 +2,33 @@ import '@operato/data-grist'
|
|
|
2
2
|
import '@operato/form'
|
|
3
3
|
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
6
|
|
|
7
|
+
import { PageView } from '@operato/shell'
|
|
6
8
|
import { i18next, localize } from '@operato/i18n'
|
|
7
9
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
8
|
-
import { PageView } from '@things-factory/shell'
|
|
9
10
|
|
|
11
|
+
@customElement('jasper-report-oocs-page')
|
|
10
12
|
class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
static styles = [
|
|
14
|
+
ScrollbarStyles,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
#container {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
border: 0;
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
]
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
flex: 1;
|
|
32
|
-
padding: 0;
|
|
33
|
-
margin: 0;
|
|
34
|
-
border: 0;
|
|
35
|
-
}
|
|
36
|
-
`
|
|
37
|
-
]
|
|
38
|
-
}
|
|
31
|
+
@query('iframe') container!: HTMLIFrameElement
|
|
39
32
|
|
|
40
33
|
get context() {
|
|
41
34
|
const filters = [
|
|
@@ -50,7 +43,7 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
|
50
43
|
{
|
|
51
44
|
title: i18next.t('button.print'),
|
|
52
45
|
action: () => {
|
|
53
|
-
this.
|
|
46
|
+
this.container.contentWindow?.print()
|
|
54
47
|
},
|
|
55
48
|
...CommonButtonStyles.print
|
|
56
49
|
}
|
|
@@ -76,9 +69,6 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
|
76
69
|
`
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
get searchForm() {
|
|
80
|
-
return this.renderRoot.querySelector('ox-filters-form-base')
|
|
81
|
-
}
|
|
82
72
|
async pageUpdated(changes, lifecycle) {
|
|
83
73
|
if (this.active) {
|
|
84
74
|
this.updateContext()
|
|
@@ -115,8 +105,6 @@ class JasperReportOocsPage extends localize(i18next)(PageView) {
|
|
|
115
105
|
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
|
116
106
|
.join('&')
|
|
117
107
|
|
|
118
|
-
this.
|
|
108
|
+
this.container.src = `/data-report/jasper?${encodedUrlParams}`
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
|
-
|
|
122
|
-
window.customElements.define('jasper-report-oocs-page', JasperReportOocsPage)
|
|
@@ -2,40 +2,33 @@ import '@operato/data-grist'
|
|
|
2
2
|
import '@operato/form'
|
|
3
3
|
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
6
|
|
|
7
|
+
import { PageView } from '@operato/shell'
|
|
6
8
|
import { i18next, localize } from '@operato/i18n'
|
|
7
9
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
8
|
-
import { PageView } from '@things-factory/shell'
|
|
9
10
|
|
|
11
|
+
@customElement('jasper-report-samples-crosstab-page')
|
|
10
12
|
class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
static styles = [
|
|
14
|
+
ScrollbarStyles,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
#container {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
border: 0;
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
]
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
flex: 1;
|
|
32
|
-
padding: 0;
|
|
33
|
-
margin: 0;
|
|
34
|
-
border: 0;
|
|
35
|
-
}
|
|
36
|
-
`
|
|
37
|
-
]
|
|
38
|
-
}
|
|
31
|
+
@query('iframe') container!: HTMLIFrameElement
|
|
39
32
|
|
|
40
33
|
get context() {
|
|
41
34
|
const filters = [
|
|
@@ -50,7 +43,7 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
|
50
43
|
{
|
|
51
44
|
title: i18next.t('button.print'),
|
|
52
45
|
action: () => {
|
|
53
|
-
this.
|
|
46
|
+
this.container.contentWindow?.print()
|
|
54
47
|
},
|
|
55
48
|
...CommonButtonStyles.print
|
|
56
49
|
}
|
|
@@ -76,9 +69,6 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
|
76
69
|
`
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
get searchForm() {
|
|
80
|
-
return this.renderRoot.querySelector('ox-filters-form-base')
|
|
81
|
-
}
|
|
82
72
|
async pageUpdated(changes, lifecycle) {
|
|
83
73
|
if (this.active) {
|
|
84
74
|
this.updateContext()
|
|
@@ -115,8 +105,6 @@ class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
|
|
|
115
105
|
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
|
116
106
|
.join('&')
|
|
117
107
|
|
|
118
|
-
this.
|
|
108
|
+
this.container.src = `/data-report/jasper?${encodedUrlParams}`
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
|
-
|
|
122
|
-
window.customElements.define('jasper-report-samples-crosstab-page', JasperReportSamplesCrosstabPage)
|
package/client/pages/data-report/{jasper-report-samples-page.js → jasper-report-samples-page.ts}
RENAMED
|
@@ -2,40 +2,33 @@ import '@operato/data-grist'
|
|
|
2
2
|
import '@operato/form'
|
|
3
3
|
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
+
import { customElement, property, query, state } from 'lit/decorators.js'
|
|
5
6
|
|
|
7
|
+
import { PageView } from '@operato/shell'
|
|
6
8
|
import { i18next, localize } from '@operato/i18n'
|
|
7
9
|
import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
|
|
8
|
-
import { PageView } from '@things-factory/shell'
|
|
9
10
|
|
|
11
|
+
@customElement('jasper-report-samples-page')
|
|
10
12
|
class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
11
|
-
static
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
static styles = [
|
|
14
|
+
ScrollbarStyles,
|
|
15
|
+
css`
|
|
16
|
+
:host {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
padding: 0;
|
|
20
|
+
}
|
|
19
21
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}
|
|
22
|
+
#container {
|
|
23
|
+
flex: 1;
|
|
24
|
+
padding: 0;
|
|
25
|
+
margin: 0;
|
|
26
|
+
border: 0;
|
|
27
|
+
}
|
|
28
|
+
`
|
|
29
|
+
]
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
flex: 1;
|
|
32
|
-
padding: 0;
|
|
33
|
-
margin: 0;
|
|
34
|
-
border: 0;
|
|
35
|
-
}
|
|
36
|
-
`
|
|
37
|
-
]
|
|
38
|
-
}
|
|
31
|
+
@query('iframe') container!: HTMLIFrameElement
|
|
39
32
|
|
|
40
33
|
get context() {
|
|
41
34
|
const filters = [
|
|
@@ -50,7 +43,7 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
|
50
43
|
{
|
|
51
44
|
title: i18next.t('button.print'),
|
|
52
45
|
action: () => {
|
|
53
|
-
this.
|
|
46
|
+
this.container.contentWindow?.print()
|
|
54
47
|
},
|
|
55
48
|
...CommonButtonStyles.print
|
|
56
49
|
}
|
|
@@ -76,9 +69,6 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
|
76
69
|
`
|
|
77
70
|
}
|
|
78
71
|
|
|
79
|
-
get searchForm() {
|
|
80
|
-
return this.renderRoot.querySelector('ox-filters-form-base')
|
|
81
|
-
}
|
|
82
72
|
async pageUpdated(changes, lifecycle) {
|
|
83
73
|
if (this.active) {
|
|
84
74
|
this.updateContext()
|
|
@@ -115,8 +105,6 @@ class JasperReportSamplesPage extends localize(i18next)(PageView) {
|
|
|
115
105
|
.map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
|
|
116
106
|
.join('&')
|
|
117
107
|
|
|
118
|
-
this.
|
|
108
|
+
this.container.src = `/data-report/jasper?${encodedUrlParams}`
|
|
119
109
|
}
|
|
120
110
|
}
|
|
121
|
-
|
|
122
|
-
window.customElements.define('jasper-report-samples-page', JasperReportSamplesPage)
|