@things-factory/dataset 8.0.0 → 9.0.0-beta.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (147) hide show
  1. package/dist-client/activities/activity-data-review-edit.d.ts +5 -1
  2. package/dist-client/activities/activity-data-review-edit.js +143 -5
  3. package/dist-client/activities/activity-data-review-edit.js.map +1 -1
  4. package/dist-client/pages/data-entry/data-entry-list-page.js +2 -2
  5. package/dist-client/pages/data-entry/data-entry-list-page.js.map +1 -1
  6. package/dist-client/tsconfig.tsbuildinfo +1 -1
  7. package/dist-server/activities/activity-data-review.js +18 -5
  8. package/dist-server/activities/activity-data-review.js.map +1 -1
  9. package/dist-server/activities/activity-ooc-review.js +13 -52
  10. package/dist-server/activities/activity-ooc-review.js.map +1 -1
  11. package/dist-server/controllers/create-data-ooc.d.ts +4 -0
  12. package/dist-server/controllers/create-data-ooc.js +65 -0
  13. package/dist-server/controllers/create-data-ooc.js.map +1 -0
  14. package/dist-server/controllers/create-data-sample.js +4 -94
  15. package/dist-server/controllers/create-data-sample.js.map +1 -1
  16. package/dist-server/controllers/index.d.ts +3 -0
  17. package/dist-server/controllers/index.js +3 -0
  18. package/dist-server/controllers/index.js.map +1 -1
  19. package/dist-server/controllers/issue-ooc-resolve.d.ts +3 -0
  20. package/dist-server/controllers/issue-ooc-resolve.js +49 -0
  21. package/dist-server/controllers/issue-ooc-resolve.js.map +1 -0
  22. package/dist-server/controllers/issue-ooc-review.d.ts +3 -0
  23. package/dist-server/controllers/issue-ooc-review.js +47 -0
  24. package/dist-server/controllers/issue-ooc-review.js.map +1 -0
  25. package/dist-server/service/data-sample/data-sample-query.d.ts +1 -1
  26. package/dist-server/service/data-sample/data-sample-query.js +3 -3
  27. package/dist-server/service/data-sample/data-sample-query.js.map +1 -1
  28. package/dist-server/service/index.d.ts +1 -1
  29. package/dist-server/tsconfig.tsbuildinfo +1 -1
  30. package/package.json +26 -26
  31. package/translations/en.json +3 -0
  32. package/translations/ja.json +3 -0
  33. package/translations/ko.json +3 -0
  34. package/translations/ms.json +3 -0
  35. package/translations/zh.json +3 -0
  36. package/client/activities/activity-data-collect-edit.ts +0 -105
  37. package/client/activities/activity-data-collect-view.ts +0 -91
  38. package/client/activities/activity-data-review-edit.ts +0 -133
  39. package/client/activities/activity-data-review-view.ts +0 -145
  40. package/client/activities/activity-ooc-resolve-edit.ts +0 -195
  41. package/client/activities/activity-ooc-resolve-view.ts +0 -143
  42. package/client/activities/activity-ooc-review-edit.ts +0 -173
  43. package/client/activities/activity-ooc-review-view.ts +0 -129
  44. package/client/bootstrap.ts +0 -35
  45. package/client/components/data-entry-form.ts +0 -109
  46. package/client/index.ts +0 -1
  47. package/client/pages/data-archive/data-archive-list-page.ts +0 -277
  48. package/client/pages/data-archive/data-archive-request-popup.ts +0 -177
  49. package/client/pages/data-entry/data-entry-list-page.ts +0 -464
  50. package/client/pages/data-key-set/data-key-item-list.ts +0 -183
  51. package/client/pages/data-key-set/data-key-set-importer.ts +0 -89
  52. package/client/pages/data-key-set/data-key-set-list-page.ts +0 -413
  53. package/client/pages/data-ooc/data-ooc-list-page.ts +0 -549
  54. package/client/pages/data-ooc/data-ooc-page.ts +0 -164
  55. package/client/pages/data-ooc/data-ooc-view.ts +0 -236
  56. package/client/pages/data-ooc/data-oocs-page.ts +0 -200
  57. package/client/pages/data-report/data-report-embed-page.ts +0 -108
  58. package/client/pages/data-report/data-report-list-page.ts +0 -454
  59. package/client/pages/data-report/data-report-samples-page.ts +0 -174
  60. package/client/pages/data-report/jasper-report-oocs-page.ts +0 -110
  61. package/client/pages/data-report/jasper-report-samples-crosstab-page.ts +0 -110
  62. package/client/pages/data-report/jasper-report-samples-page.ts +0 -110
  63. package/client/pages/data-sample/data-sample-list-page.ts +0 -442
  64. package/client/pages/data-sample/data-sample-page.ts +0 -55
  65. package/client/pages/data-sample/data-sample-search-page.ts +0 -424
  66. package/client/pages/data-sample/data-sample-view.ts +0 -292
  67. package/client/pages/data-sample/data-samples-page.ts +0 -249
  68. package/client/pages/data-sensor/data-sensor-list-page.ts +0 -456
  69. package/client/pages/data-set/data-item-list.ts +0 -304
  70. package/client/pages/data-set/data-set-importer.ts +0 -89
  71. package/client/pages/data-set/data-set-list-page.ts +0 -1078
  72. package/client/pages/data-summary/data-summary-list-page.ts +0 -363
  73. package/client/pages/data-summary/data-summary-period-page.ts +0 -439
  74. package/client/pages/data-summary/data-summary-search-page.ts +0 -426
  75. package/client/pages/data-summary/data-summary-view.ts +0 -133
  76. package/client/route.ts +0 -91
  77. package/client/tsconfig.json +0 -13
  78. package/server/activities/activity-data-collect.ts +0 -100
  79. package/server/activities/activity-data-review.ts +0 -82
  80. package/server/activities/activity-ooc-resolve.ts +0 -123
  81. package/server/activities/activity-ooc-review.ts +0 -144
  82. package/server/activities/index.ts +0 -11
  83. package/server/controllers/create-data-sample.ts +0 -426
  84. package/server/controllers/data-use-case.ts +0 -98
  85. package/server/controllers/finalize-data-collection.ts +0 -388
  86. package/server/controllers/index.ts +0 -3
  87. package/server/controllers/issue-data-collection-task.ts +0 -70
  88. package/server/controllers/jasper-report.ts +0 -186
  89. package/server/controllers/query-data-summary-by-period.ts +0 -178
  90. package/server/controllers/shiny-report.ts +0 -54
  91. package/server/engine/index.ts +0 -1
  92. package/server/engine/task/create-data-sample.ts +0 -100
  93. package/server/engine/task/index.ts +0 -2
  94. package/server/engine/task/issue-collect-data.ts +0 -45
  95. package/server/index.ts +0 -8
  96. package/server/routes.ts +0 -188
  97. package/server/service/data-archive/data-archive-mutation.ts +0 -273
  98. package/server/service/data-archive/data-archive-query.ts +0 -58
  99. package/server/service/data-archive/data-archive-type.ts +0 -48
  100. package/server/service/data-archive/data-archive.ts +0 -69
  101. package/server/service/data-archive/index.ts +0 -6
  102. package/server/service/data-key-set/data-key-item-type.ts +0 -31
  103. package/server/service/data-key-set/data-key-set-mutation.ts +0 -201
  104. package/server/service/data-key-set/data-key-set-query.ts +0 -68
  105. package/server/service/data-key-set/data-key-set-type.ts +0 -70
  106. package/server/service/data-key-set/data-key-set.ts +0 -86
  107. package/server/service/data-key-set/index.ts +0 -6
  108. package/server/service/data-ooc/data-ooc-mutation.ts +0 -154
  109. package/server/service/data-ooc/data-ooc-query.ts +0 -106
  110. package/server/service/data-ooc/data-ooc-subscription.ts +0 -48
  111. package/server/service/data-ooc/data-ooc-type.ts +0 -71
  112. package/server/service/data-ooc/data-ooc.ts +0 -259
  113. package/server/service/data-ooc/index.ts +0 -7
  114. package/server/service/data-sample/data-sample-mutation.ts +0 -18
  115. package/server/service/data-sample/data-sample-query.ts +0 -215
  116. package/server/service/data-sample/data-sample-type.ts +0 -47
  117. package/server/service/data-sample/data-sample.ts +0 -193
  118. package/server/service/data-sample/index.ts +0 -6
  119. package/server/service/data-sensor/data-sensor-mutation.ts +0 -116
  120. package/server/service/data-sensor/data-sensor-query.ts +0 -76
  121. package/server/service/data-sensor/data-sensor-type.ts +0 -104
  122. package/server/service/data-sensor/data-sensor.ts +0 -126
  123. package/server/service/data-sensor/index.ts +0 -6
  124. package/server/service/data-set/data-item-type.ts +0 -155
  125. package/server/service/data-set/data-set-mutation.ts +0 -552
  126. package/server/service/data-set/data-set-query.ts +0 -461
  127. package/server/service/data-set/data-set-type.ts +0 -204
  128. package/server/service/data-set/data-set.ts +0 -326
  129. package/server/service/data-set/index.ts +0 -6
  130. package/server/service/data-set-history/data-set-history-query.ts +0 -126
  131. package/server/service/data-set-history/data-set-history-type.ts +0 -12
  132. package/server/service/data-set-history/data-set-history.ts +0 -217
  133. package/server/service/data-set-history/event-subscriber.ts +0 -17
  134. package/server/service/data-set-history/index.ts +0 -7
  135. package/server/service/data-spec/data-spec-manager.ts +0 -21
  136. package/server/service/data-spec/data-spec-query.ts +0 -21
  137. package/server/service/data-spec/data-spec.ts +0 -45
  138. package/server/service/data-spec/index.ts +0 -5
  139. package/server/service/data-summary/data-summary-mutation.ts +0 -45
  140. package/server/service/data-summary/data-summary-query.ts +0 -179
  141. package/server/service/data-summary/data-summary-type.ts +0 -86
  142. package/server/service/data-summary/data-summary.ts +0 -170
  143. package/server/service/data-summary/index.ts +0 -7
  144. package/server/service/index.ts +0 -57
  145. package/server/tsconfig.json +0 -10
  146. package/server/utils/config-resolver.ts +0 -29
  147. package/server/utils/index.ts +0 -1
@@ -1,110 +0,0 @@
1
- import '@operato/data-grist'
2
- import '@operato/form'
3
-
4
- import { css, html } from 'lit'
5
- import { customElement, property, query, state } from 'lit/decorators.js'
6
-
7
- import { PageView } from '@operato/shell'
8
- import { i18next, localize } from '@operato/i18n'
9
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
10
-
11
- @customElement('jasper-report-oocs-page')
12
- class JasperReportOocsPage extends localize(i18next)(PageView) {
13
- static styles = [
14
- ScrollbarStyles,
15
- css`
16
- :host {
17
- display: flex;
18
- flex-direction: column;
19
- padding: 0;
20
- }
21
-
22
- #container {
23
- flex: 1;
24
- padding: 0;
25
- margin: 0;
26
- border: 0;
27
- }
28
- `
29
- ]
30
-
31
- @query('iframe') container!: HTMLIFrameElement
32
-
33
- get context() {
34
- const filters = [
35
- {
36
- name: 'workDateRange',
37
- type: 'date',
38
- label: 'date',
39
- operator: 'between'
40
- }
41
- ]
42
- var actions = [
43
- {
44
- title: i18next.t('button.print'),
45
- action: () => {
46
- this.container.contentWindow?.print()
47
- },
48
- ...CommonButtonStyles.print
49
- }
50
- ]
51
- return {
52
- title: 'jasper-report',
53
- actions,
54
- filters
55
- }
56
- }
57
-
58
- render() {
59
- return html`
60
- <ox-filters-form-base
61
- .filters=${this.context.filters}
62
- @filters-change=${e => {
63
- console.log('filters changed', e.detail)
64
- this._reportTemplate(e.detail.filters)
65
- }}
66
- ?url-params-sensitive=${this.active}
67
- ></ox-filters-form-base>
68
- <iframe id="container"></iframe>
69
- `
70
- }
71
-
72
- async pageUpdated(changes, lifecycle) {
73
- if (this.active) {
74
- this.updateContext()
75
- }
76
- }
77
-
78
- async _reportTemplate(filters) {
79
- const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
80
- Object.assign(params, this.lifecycle.params)
81
-
82
- const { workDateRange, workShift, template } = params
83
-
84
- /** ignoring date conditions */
85
- if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
86
- return
87
- }
88
-
89
- /** urlencoded params including test values */
90
- const urlParams = {
91
- table: 'ooc',
92
- dataSetId: this.lifecycle.resourceId,
93
- fromWorkDate: workDateRange[0],
94
- toWorkDate: workDateRange[1],
95
- workShift,
96
- template,
97
- templateType: 'normal'
98
- }
99
-
100
- const encodedUrlParams = Object.keys(urlParams)
101
- .filter(key => {
102
- // ignore empty
103
- return !!urlParams[key]
104
- })
105
- .map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
106
- .join('&')
107
-
108
- this.container.src = `/data-report/jasper?${encodedUrlParams}`
109
- }
110
- }
@@ -1,110 +0,0 @@
1
- import '@operato/data-grist'
2
- import '@operato/form'
3
-
4
- import { css, html } from 'lit'
5
- import { customElement, property, query, state } from 'lit/decorators.js'
6
-
7
- import { PageView } from '@operato/shell'
8
- import { i18next, localize } from '@operato/i18n'
9
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
10
-
11
- @customElement('jasper-report-samples-crosstab-page')
12
- class JasperReportSamplesCrosstabPage extends localize(i18next)(PageView) {
13
- static styles = [
14
- ScrollbarStyles,
15
- css`
16
- :host {
17
- display: flex;
18
- flex-direction: column;
19
- padding: 0;
20
- }
21
-
22
- #container {
23
- flex: 1;
24
- padding: 0;
25
- margin: 0;
26
- border: 0;
27
- }
28
- `
29
- ]
30
-
31
- @query('iframe') container!: HTMLIFrameElement
32
-
33
- get context() {
34
- const filters = [
35
- {
36
- name: 'workDateRange',
37
- type: 'date',
38
- label: 'date',
39
- operator: 'between'
40
- }
41
- ]
42
- var actions = [
43
- {
44
- title: i18next.t('button.print'),
45
- action: () => {
46
- this.container.contentWindow?.print()
47
- },
48
- ...CommonButtonStyles.print
49
- }
50
- ]
51
- return {
52
- title: 'jasper-report',
53
- actions,
54
- filters
55
- }
56
- }
57
-
58
- render() {
59
- return html`
60
- <ox-filters-form-base
61
- .filters=${this.context.filters}
62
- @filters-change=${e => {
63
- console.log('filters changed', e.detail)
64
- this._reportTemplate(e.detail.filters)
65
- }}
66
- ?url-params-sensitive=${this.active}
67
- ></ox-filters-form-base>
68
- <iframe id="container"></iframe>
69
- `
70
- }
71
-
72
- async pageUpdated(changes, lifecycle) {
73
- if (this.active) {
74
- this.updateContext()
75
- }
76
- }
77
-
78
- async _reportTemplate(filters) {
79
- const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
80
- Object.assign(params, this.lifecycle.params)
81
-
82
- const { workDateRange, workShift, template } = params
83
-
84
- /** ignoring date conditions */
85
- if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
86
- return
87
- }
88
-
89
- /** urlencoded params including test values */
90
- const urlParams = {
91
- table: 'samples',
92
- dataSetId: this.lifecycle.resourceId,
93
- fromWorkDate: workDateRange[0],
94
- toWorkDate: workDateRange[1],
95
- workShift,
96
- template,
97
- templateType: 'crosstab'
98
- }
99
-
100
- const encodedUrlParams = Object.keys(urlParams)
101
- .filter(key => {
102
- // ignore empty
103
- return !!urlParams[key]
104
- })
105
- .map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
106
- .join('&')
107
-
108
- this.container.src = `/data-report/jasper?${encodedUrlParams}`
109
- }
110
- }
@@ -1,110 +0,0 @@
1
- import '@operato/data-grist'
2
- import '@operato/form'
3
-
4
- import { css, html } from 'lit'
5
- import { customElement, property, query, state } from 'lit/decorators.js'
6
-
7
- import { PageView } from '@operato/shell'
8
- import { i18next, localize } from '@operato/i18n'
9
- import { CommonButtonStyles, ScrollbarStyles } from '@operato/styles'
10
-
11
- @customElement('jasper-report-samples-page')
12
- class JasperReportSamplesPage extends localize(i18next)(PageView) {
13
- static styles = [
14
- ScrollbarStyles,
15
- css`
16
- :host {
17
- display: flex;
18
- flex-direction: column;
19
- padding: 0;
20
- }
21
-
22
- #container {
23
- flex: 1;
24
- padding: 0;
25
- margin: 0;
26
- border: 0;
27
- }
28
- `
29
- ]
30
-
31
- @query('iframe') container!: HTMLIFrameElement
32
-
33
- get context() {
34
- const filters = [
35
- {
36
- name: 'workDateRange',
37
- type: 'date',
38
- label: 'date',
39
- operator: 'between'
40
- }
41
- ]
42
- var actions = [
43
- {
44
- title: i18next.t('button.print'),
45
- action: () => {
46
- this.container.contentWindow?.print()
47
- },
48
- ...CommonButtonStyles.print
49
- }
50
- ]
51
- return {
52
- title: 'jasper-report',
53
- actions,
54
- filters
55
- }
56
- }
57
-
58
- render() {
59
- return html`
60
- <ox-filters-form-base
61
- .filters=${this.context.filters}
62
- @filters-change=${e => {
63
- console.log('filters changed', e.detail)
64
- this._reportTemplate(e.detail.filters)
65
- }}
66
- ?url-params-sensitive=${this.active}
67
- ></ox-filters-form-base>
68
- <iframe id="container"></iframe>
69
- `
70
- }
71
-
72
- async pageUpdated(changes, lifecycle) {
73
- if (this.active) {
74
- this.updateContext()
75
- }
76
- }
77
-
78
- async _reportTemplate(filters) {
79
- const params = filters.reduce((acc, curr) => ((acc[curr.name] = curr.value), acc), {})
80
- Object.assign(params, this.lifecycle.params)
81
-
82
- const { workDateRange, workShift, template } = params
83
-
84
- /** ignoring date conditions */
85
- if (!workDateRange[0] || !workDateRange[1] || workDateRange[0] > workDateRange[1]) {
86
- return
87
- }
88
-
89
- /** urlencoded params including test values */
90
- const urlParams = {
91
- table: 'samples',
92
- dataSetId: this.lifecycle.resourceId,
93
- fromWorkDate: workDateRange[0],
94
- toWorkDate: workDateRange[1],
95
- workShift,
96
- template,
97
- templateType: 'normal'
98
- }
99
-
100
- const encodedUrlParams = Object.keys(urlParams)
101
- .filter(key => {
102
- // ignore empty
103
- return !!urlParams[key]
104
- })
105
- .map(key => `${key}=${encodeURIComponent(urlParams[key])}`)
106
- .join('&')
107
-
108
- this.container.src = `/data-report/jasper?${encodedUrlParams}`
109
- }
110
- }