@things-factory/worklist 5.0.14 → 6.0.0-alpha.0
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/components/activity-/{bowner-view.js → bowner-view.ts} +27 -34
- package/client/components/{activity-instance-preview.js → activity-instance-preview.ts} +38 -50
- package/client/components/{activity-reporter-view.js → activity-reporter-view.ts} +27 -39
- package/client/components/{activity-starter-form.js → activity-starter-form.ts} +53 -68
- package/client/pages/activity/activity-list-page.ts +4 -3
- package/client/pages/activity/{activity-model-item-list.js → activity-model-item-list.ts} +11 -18
- package/client/pages/activity/{activity-page.js → activity-page.ts} +36 -40
- package/client/pages/activity/{starter-list-page.js → starter-list-page.ts} +15 -20
- package/client/pages/activity-instance/{activity-instance-list-page.js → activity-instance-list-page.ts} +22 -30
- package/client/pages/activity-instance/{activity-instance-page.js → activity-instance-page.ts} +36 -41
- package/client/pages/activity-store/{activity-store-page.js → activity-store-page.ts} +22 -29
- package/client/pages/activity-supervisor/{reporter-list-page.js → reporter-list-page.ts} +14 -21
- package/client/pages/activity-template/{activity-template-importer.js → activity-template-importer.ts} +32 -38
- package/client/pages/activity-template/{activity-template-list-page.js → activity-template-list-page.ts} +30 -37
- package/client/pages/activity-template/{activity-template-model-item-list.js → activity-template-model-item-list.ts} +5 -4
- package/client/pages/activity-thread/{activity-thread-importer.js → activity-thread-importer.ts} +32 -37
- package/client/pages/activity-thread/{activity-thread-list-page.js → activity-thread-list-page.ts} +20 -27
- package/client/pages/activity-thread/{activity-thread-page.js → activity-thread-page.ts} +36 -40
- package/client/pages/dashboard/{dashboard-home.js → dashboard-home.ts} +3 -7
- package/client/pages/todo/{assigned-list-page.js → assigned-list-page.ts} +13 -20
- package/client/pages/todo/{draft-list-page.js → draft-list-page.ts} +13 -20
- package/client/pages/todo/{pickable-list-page.js → pickable-list-page.ts} +13 -20
- package/client/pages/todo/{todo-list-page.js → todo-list-page.ts} +12 -19
- package/client/pages/worklist-home.ts +1 -1
- package/dist-client/components/activity-/bowner-view.d.ts +1 -1
- package/dist-client/components/activity-/bowner-view.js +44 -36
- package/dist-client/components/activity-/bowner-view.js.map +1 -1
- package/dist-client/components/activity-instance-preview.d.ts +2 -1
- package/dist-client/components/activity-instance-preview.js +58 -51
- package/dist-client/components/activity-instance-preview.js.map +1 -1
- package/dist-client/components/activity-reporter-view.d.ts +1 -1
- package/dist-client/components/activity-reporter-view.js +44 -37
- package/dist-client/components/activity-reporter-view.js.map +1 -1
- package/dist-client/components/activity-starter-form.d.ts +16 -0
- package/dist-client/components/activity-starter-form.js +68 -67
- package/dist-client/components/activity-starter-form.js.map +1 -1
- package/dist-client/pages/activity/activity-list-page.d.ts +1 -0
- package/dist-client/pages/activity/activity-list-page.js +7 -4
- package/dist-client/pages/activity/activity-list-page.js.map +1 -1
- package/dist-client/pages/activity/activity-model-item-list.d.ts +13 -180
- package/dist-client/pages/activity/activity-model-item-list.js +52 -44
- package/dist-client/pages/activity/activity-model-item-list.js.map +1 -1
- package/dist-client/pages/activity/activity-page.d.ts +29 -22
- package/dist-client/pages/activity/activity-page.js +53 -44
- package/dist-client/pages/activity/activity-page.js.map +1 -1
- package/dist-client/pages/activity/starter-list-page.d.ts +14 -120
- package/dist-client/pages/activity/starter-list-page.js +47 -31
- package/dist-client/pages/activity/starter-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-list-page.d.ts +9 -114
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +40 -30
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -1
- package/dist-client/pages/activity-instance/activity-instance-page.d.ts +22 -22
- package/dist-client/pages/activity-instance/activity-instance-page.js +57 -44
- package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -1
- package/dist-client/pages/activity-store/activity-store-page.d.ts +23 -150
- package/dist-client/pages/activity-store/activity-store-page.js +40 -31
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -1
- package/dist-client/pages/activity-supervisor/reporter-list-page.d.ts +13 -120
- package/dist-client/pages/activity-supervisor/reporter-list-page.js +47 -31
- package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-importer.d.ts +7 -21
- package/dist-client/pages/activity-template/activity-template-importer.js +42 -36
- package/dist-client/pages/activity-template/activity-template-importer.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-list-page.d.ts +17 -218
- package/dist-client/pages/activity-template/activity-template-list-page.js +58 -37
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -1
- package/dist-client/pages/activity-template/activity-template-model-item-list.js +10 -5
- package/dist-client/pages/activity-template/activity-template-model-item-list.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-importer.d.ts +7 -21
- package/dist-client/pages/activity-thread/activity-thread-importer.js +42 -36
- package/dist-client/pages/activity-thread/activity-thread-importer.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-list-page.d.ts +16 -100
- package/dist-client/pages/activity-thread/activity-thread-list-page.js +55 -36
- package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -1
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +26 -19
- package/dist-client/pages/activity-thread/activity-thread-page.js +53 -44
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -1
- package/dist-client/pages/dashboard/dashboard-home.js +8 -7
- package/dist-client/pages/dashboard/dashboard-home.js.map +1 -1
- package/dist-client/pages/todo/assigned-list-page.d.ts +12 -100
- package/dist-client/pages/todo/assigned-list-page.js +45 -30
- package/dist-client/pages/todo/assigned-list-page.js.map +1 -1
- package/dist-client/pages/todo/draft-list-page.d.ts +13 -174
- package/dist-client/pages/todo/draft-list-page.js +46 -30
- package/dist-client/pages/todo/draft-list-page.js.map +1 -1
- package/dist-client/pages/todo/pickable-list-page.d.ts +13 -126
- package/dist-client/pages/todo/pickable-list-page.js +46 -30
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -1
- package/dist-client/pages/todo/todo-list-page.d.ts +12 -206
- package/dist-client/pages/todo/todo-list-page.js +44 -30
- package/dist-client/pages/todo/todo-list-page.js.map +1 -1
- package/dist-client/pages/worklist-home.js +1 -1
- package/dist-client/pages/worklist-home.js.map +1 -1
- package/dist-client/route.d.ts +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/controllers/activity-instance/abort.js +4 -3
- package/dist-server/controllers/activity-instance/abort.js.map +1 -1
- package/dist-server/controllers/activity-instance/adjust.js +2 -1
- package/dist-server/controllers/activity-instance/adjust.js.map +1 -1
- package/dist-server/controllers/activity-instance/assign.js +3 -3
- package/dist-server/controllers/activity-instance/assign.js.map +1 -1
- package/dist-server/controllers/activity-instance/delegate.js +4 -3
- package/dist-server/controllers/activity-instance/delegate.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +3 -3
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/end.js +4 -3
- package/dist-server/controllers/activity-instance/end.js.map +1 -1
- package/dist-server/controllers/activity-instance/pick.js +4 -3
- package/dist-server/controllers/activity-instance/pick.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +17 -3
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/activity-instance/start.js +2 -1
- package/dist-server/controllers/activity-instance/start.js.map +1 -1
- package/dist-server/controllers/activity-instance/terminate.js +4 -3
- package/dist-server/controllers/activity-instance/terminate.js.map +1 -1
- package/dist-server/controllers/activity-thread/abort.js +4 -3
- package/dist-server/controllers/activity-thread/abort.js.map +1 -1
- package/dist-server/controllers/activity-thread/adjust.js +2 -1
- package/dist-server/controllers/activity-thread/adjust.js.map +1 -1
- package/dist-server/controllers/activity-thread/delegate.js +4 -3
- package/dist-server/controllers/activity-thread/delegate.js.map +1 -1
- package/dist-server/controllers/activity-thread/end.js +4 -3
- package/dist-server/controllers/activity-thread/end.js.map +1 -1
- package/dist-server/controllers/activity-thread/save.js +2 -1
- package/dist-server/controllers/activity-thread/save.js.map +1 -1
- package/dist-server/controllers/activity-thread/start.js +2 -1
- package/dist-server/controllers/activity-thread/start.js.map +1 -1
- package/dist-server/controllers/activity-thread/terminate.js +4 -3
- package/dist-server/controllers/activity-thread/terminate.js.map +1 -1
- package/dist-server/controllers/common.js +8 -4
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +6 -7
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-mutation.js +10 -4
- package/dist-server/service/activity/activity-mutation.js.map +1 -1
- package/dist-server/service/activity/activity-query.js +18 -19
- package/dist-server/service/activity/activity-query.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +6 -7
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +6 -7
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +7 -8
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-mutation.js +2 -2
- package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +24 -25
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-subscription.js +1 -2
- package/dist-server/service/activity-instance/activity-instance-subscription.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +4 -5
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +7 -8
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-instance/event-subscriber.js +0 -5
- package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-history.js +3 -4
- package/dist-server/service/activity-template/activity-template-history.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-mutation.js +4 -4
- package/dist-server/service/activity-template/activity-template-mutation.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-query.js +9 -11
- package/dist-server/service/activity-template/activity-template-query.js.map +1 -1
- package/dist-server/service/activity-template/activity-template.js +3 -4
- package/dist-server/service/activity-template/activity-template.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-mutation.js +10 -6
- package/dist-server/service/activity-thread/activity-thread-mutation.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-query.js +11 -13
- package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread.js +4 -5
- package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
- package/dist-server/service/activity-thread/event-subscriber.js +15 -3
- package/dist-server/service/activity-thread/event-subscriber.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/server/controllers/activity-instance/abort.ts +7 -3
- package/server/controllers/activity-instance/adjust.ts +7 -2
- package/server/controllers/activity-instance/assign.ts +3 -3
- package/server/controllers/activity-instance/delegate.ts +3 -2
- package/server/controllers/activity-instance/draft.ts +6 -3
- package/server/controllers/activity-instance/end.ts +3 -2
- package/server/controllers/activity-instance/pick.ts +4 -3
- package/server/controllers/activity-instance/post.ts +21 -4
- package/server/controllers/activity-instance/start.ts +3 -2
- package/server/controllers/activity-instance/terminate.ts +3 -2
- package/server/controllers/activity-thread/abort.ts +7 -3
- package/server/controllers/activity-thread/adjust.ts +7 -2
- package/server/controllers/activity-thread/delegate.ts +3 -2
- package/server/controllers/activity-thread/end.ts +3 -2
- package/server/controllers/activity-thread/save.ts +3 -2
- package/server/controllers/activity-thread/start.ts +8 -2
- package/server/controllers/activity-thread/terminate.ts +3 -2
- package/server/controllers/common.ts +15 -11
- package/server/service/activity/activity-mutation.ts +19 -10
- package/server/service/activity/activity-query.ts +14 -14
- package/server/service/activity-instance/activity-instance-mutation.ts +8 -8
- package/server/service/activity-instance/activity-instance-query.ts +27 -21
- package/server/service/activity-instance/activity-instance-subscription.ts +1 -2
- package/server/service/activity-instance/event-subscriber.ts +0 -6
- package/server/service/activity-template/activity-template-mutation.ts +13 -10
- package/server/service/activity-template/activity-template-query.ts +8 -9
- package/server/service/activity-thread/activity-thread-mutation.ts +22 -15
- package/server/service/activity-thread/activity-thread-query.ts +10 -11
- package/server/service/activity-thread/event-subscriber.ts +15 -3
- package/translations/en.json +3 -0
- package/translations/ko.json +3 -0
- package/translations/ms.json +3 -0
- package/translations/zh.json +3 -0
|
@@ -3,6 +3,7 @@ import '../../components/activity-starter-form.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
8
|
|
|
8
9
|
import { getRenderer } from '@operato/data-grist'
|
|
@@ -19,16 +20,9 @@ const MIN = 60
|
|
|
19
20
|
const HOUR = 60 * MIN
|
|
20
21
|
const DAY = 24 * HOUR
|
|
21
22
|
|
|
23
|
+
@customElement('draft-list-page')
|
|
22
24
|
export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
23
|
-
static
|
|
24
|
-
return {
|
|
25
|
-
gristConfig: Object,
|
|
26
|
-
mode: String
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
static get styles() {
|
|
31
|
-
return [
|
|
25
|
+
static styles = [
|
|
32
26
|
ScrollbarStyles,
|
|
33
27
|
CommonGristStyles,
|
|
34
28
|
css`
|
|
@@ -42,7 +36,9 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
42
36
|
}
|
|
43
37
|
`
|
|
44
38
|
]
|
|
45
|
-
|
|
39
|
+
|
|
40
|
+
@property({ type: Object }) gristConfig?: any
|
|
41
|
+
@property({ type: String }) mode : 'GRID' | 'LIST' | 'CARD' = isMobileDevice() ? 'CARD' : 'GRID'
|
|
46
42
|
|
|
47
43
|
get context() {
|
|
48
44
|
return {
|
|
@@ -52,6 +48,9 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
52
48
|
}
|
|
53
49
|
}
|
|
54
50
|
|
|
51
|
+
@query('#sorter-control') sorterControl?: any
|
|
52
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; }
|
|
53
|
+
|
|
55
54
|
render() {
|
|
56
55
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
57
56
|
|
|
@@ -66,8 +65,8 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
66
65
|
Sort
|
|
67
66
|
<mwc-icon
|
|
68
67
|
@click=${e => {
|
|
69
|
-
const target = e.currentTarget
|
|
70
|
-
|
|
68
|
+
const target = e.currentTarget;
|
|
69
|
+
this.sorterControl.open({
|
|
71
70
|
right: 0,
|
|
72
71
|
top: target.offsetTop + target.offsetHeight
|
|
73
72
|
})
|
|
@@ -89,10 +88,6 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
89
88
|
`
|
|
90
89
|
}
|
|
91
90
|
|
|
92
|
-
get grist() {
|
|
93
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
94
|
-
}
|
|
95
|
-
|
|
96
91
|
async pageInitialized(lifecycle) {
|
|
97
92
|
this.gristConfig = {
|
|
98
93
|
list: {
|
|
@@ -128,7 +123,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
128
123
|
}
|
|
129
124
|
)
|
|
130
125
|
popup.onclosed = () => {
|
|
131
|
-
this.grist
|
|
126
|
+
this.grist?.fetch()
|
|
132
127
|
}
|
|
133
128
|
}
|
|
134
129
|
}
|
|
@@ -273,7 +268,7 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
273
268
|
|
|
274
269
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
275
270
|
if (this.active) {
|
|
276
|
-
this.grist
|
|
271
|
+
this.grist?.fetch()
|
|
277
272
|
}
|
|
278
273
|
}
|
|
279
274
|
|
|
@@ -325,5 +320,3 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
325
320
|
}
|
|
326
321
|
}
|
|
327
322
|
}
|
|
328
|
-
|
|
329
|
-
window.customElements.define('draft-list-page', DraftListPage)
|
|
@@ -3,6 +3,7 @@ import '../../components/activity-instance-preview.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
8
|
|
|
8
9
|
import { getRenderer } from '@operato/data-grist'
|
|
@@ -13,16 +14,9 @@ import { PageView, store } from '@operato/shell'
|
|
|
13
14
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
15
|
import { isMobileDevice } from '@operato/utils'
|
|
15
16
|
|
|
17
|
+
@customElement('pickable-list-page')
|
|
16
18
|
export class PickableListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
17
|
-
static
|
|
18
|
-
return {
|
|
19
|
-
gristConfig: Object,
|
|
20
|
-
mode: String
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
static get styles() {
|
|
25
|
-
return [
|
|
19
|
+
static styles = [
|
|
26
20
|
ScrollbarStyles,
|
|
27
21
|
CommonGristStyles,
|
|
28
22
|
css`
|
|
@@ -36,7 +30,9 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
36
30
|
}
|
|
37
31
|
`
|
|
38
32
|
]
|
|
39
|
-
|
|
33
|
+
|
|
34
|
+
@property({ type: Object }) gristConfig?: any
|
|
35
|
+
@property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = (isMobileDevice() ? 'CARD' : 'GRID')
|
|
40
36
|
|
|
41
37
|
get context() {
|
|
42
38
|
return {
|
|
@@ -46,6 +42,9 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
46
42
|
}
|
|
47
43
|
}
|
|
48
44
|
|
|
45
|
+
@query('#sorter-control') sorterControl?: any
|
|
46
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; }
|
|
47
|
+
|
|
49
48
|
render() {
|
|
50
49
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
51
50
|
|
|
@@ -60,8 +59,8 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
60
59
|
Sort
|
|
61
60
|
<mwc-icon
|
|
62
61
|
@click=${e => {
|
|
63
|
-
const target = e.currentTarget
|
|
64
|
-
|
|
62
|
+
const target = e.currentTarget;
|
|
63
|
+
this.sorterControl.open({
|
|
65
64
|
right: 0,
|
|
66
65
|
top: target.offsetTop + target.offsetHeight
|
|
67
66
|
})
|
|
@@ -83,10 +82,6 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
83
82
|
`
|
|
84
83
|
}
|
|
85
84
|
|
|
86
|
-
get grist() {
|
|
87
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
88
|
-
}
|
|
89
|
-
|
|
90
85
|
async pageInitialized(lifecycle) {
|
|
91
86
|
this.gristConfig = {
|
|
92
87
|
list: {
|
|
@@ -117,7 +112,7 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
117
112
|
}
|
|
118
113
|
)
|
|
119
114
|
popup.onclosed = () => {
|
|
120
|
-
this.grist
|
|
115
|
+
this.grist?.fetch()
|
|
121
116
|
}
|
|
122
117
|
}
|
|
123
118
|
}
|
|
@@ -224,7 +219,7 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
224
219
|
|
|
225
220
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
226
221
|
if (this.active) {
|
|
227
|
-
this.grist
|
|
222
|
+
this.grist?.fetch()
|
|
228
223
|
}
|
|
229
224
|
}
|
|
230
225
|
|
|
@@ -272,5 +267,3 @@ export class PickableListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
272
267
|
}
|
|
273
268
|
}
|
|
274
269
|
}
|
|
275
|
-
|
|
276
|
-
window.customElements.define('pickable-list-page', PickableListPage)
|
|
@@ -2,6 +2,7 @@ import '@operato/data-grist'
|
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
5
6
|
import { asyncReplace } from 'lit/directives/async-replace.js'
|
|
6
7
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
8
|
|
|
@@ -18,16 +19,9 @@ const MIN = 60
|
|
|
18
19
|
const HOUR = 60 * MIN
|
|
19
20
|
const DAY = 24 * HOUR
|
|
20
21
|
|
|
22
|
+
@customElement('todo-list-page')
|
|
21
23
|
export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
22
|
-
static
|
|
23
|
-
return {
|
|
24
|
-
gristConfig: Object,
|
|
25
|
-
mode: String
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
static get styles() {
|
|
30
|
-
return [
|
|
24
|
+
static styles = [
|
|
31
25
|
ScrollbarStyles,
|
|
32
26
|
CommonGristStyles,
|
|
33
27
|
css`
|
|
@@ -41,7 +35,9 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
41
35
|
}
|
|
42
36
|
`
|
|
43
37
|
]
|
|
44
|
-
|
|
38
|
+
|
|
39
|
+
@property({ type: Object }) gristConfig?: any
|
|
40
|
+
@property({ type: String }) mode: 'GRID' | 'LIST' | 'CARD' = (isMobileDevice() ? 'CARD' : 'GRID')
|
|
45
41
|
|
|
46
42
|
get context() {
|
|
47
43
|
return {
|
|
@@ -51,6 +47,9 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
51
47
|
}
|
|
52
48
|
}
|
|
53
49
|
|
|
50
|
+
@query('#sorter-control') sorterControl?: any
|
|
51
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; }
|
|
52
|
+
|
|
54
53
|
render() {
|
|
55
54
|
const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
|
|
56
55
|
|
|
@@ -65,8 +64,8 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
65
64
|
Sort
|
|
66
65
|
<mwc-icon
|
|
67
66
|
@click=${e => {
|
|
68
|
-
const target = e.currentTarget
|
|
69
|
-
this.
|
|
67
|
+
const target = e.currentTarget;
|
|
68
|
+
this.sorterControl.open({
|
|
70
69
|
right: 0,
|
|
71
70
|
top: target.offsetTop + target.offsetHeight
|
|
72
71
|
})
|
|
@@ -88,10 +87,6 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
88
87
|
`
|
|
89
88
|
}
|
|
90
89
|
|
|
91
|
-
get grist() {
|
|
92
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
93
|
-
}
|
|
94
|
-
|
|
95
90
|
async pageInitialized(lifecycle) {
|
|
96
91
|
this.gristConfig = {
|
|
97
92
|
list: {
|
|
@@ -267,7 +262,7 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
267
262
|
|
|
268
263
|
async pageUpdated(changes, lifecycle, changedBefore) {
|
|
269
264
|
if (this.active) {
|
|
270
|
-
this.grist
|
|
265
|
+
this.grist?.fetch()
|
|
271
266
|
}
|
|
272
267
|
}
|
|
273
268
|
|
|
@@ -354,5 +349,3 @@ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
354
349
|
}
|
|
355
350
|
}
|
|
356
351
|
}
|
|
357
|
-
|
|
358
|
-
window.customElements.define('todo-list-page', TodoListPage)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@material/mwc-button';
|
|
@@ -1,43 +1,12 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
1
2
|
import '@material/mwc-button';
|
|
2
3
|
import gql from 'graphql-tag';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
6
|
import { client } from '@operato/graphql';
|
|
5
7
|
import { i18next, localize } from '@operato/i18n';
|
|
6
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
7
|
-
class ActivityOwnerView extends localize(i18next)(LitElement) {
|
|
8
|
-
static get properties() {
|
|
9
|
-
return {
|
|
10
|
-
activityId: String,
|
|
11
|
-
activity: Object,
|
|
12
|
-
activityInstance: Object
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
static get styles() {
|
|
16
|
-
return [
|
|
17
|
-
ScrollbarStyles,
|
|
18
|
-
css `
|
|
19
|
-
:host {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
content {
|
|
27
|
-
flex: 1;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
padding: var(--padding-default);
|
|
31
|
-
overflow: auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
section {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
}
|
|
38
|
-
`
|
|
39
|
-
];
|
|
40
|
-
}
|
|
9
|
+
let ActivityOwnerView = class ActivityOwnerView extends localize(i18next)(LitElement) {
|
|
41
10
|
constructor() {
|
|
42
11
|
super();
|
|
43
12
|
this.activityInstance = {};
|
|
@@ -91,6 +60,45 @@ class ActivityOwnerView extends localize(i18next)(LitElement) {
|
|
|
91
60
|
});
|
|
92
61
|
this.activity = response.data.activity;
|
|
93
62
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
63
|
+
};
|
|
64
|
+
ActivityOwnerView.styles = [
|
|
65
|
+
ScrollbarStyles,
|
|
66
|
+
css `
|
|
67
|
+
:host {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
|
|
71
|
+
background-color: #fff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
content {
|
|
75
|
+
flex: 1;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
padding: var(--padding-default);
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
section {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
`
|
|
87
|
+
];
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], ActivityOwnerView.prototype, "activityId", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Object }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], ActivityOwnerView.prototype, "activity", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
property({ type: Object }),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], ActivityOwnerView.prototype, "activityInstance", void 0);
|
|
100
|
+
ActivityOwnerView = __decorate([
|
|
101
|
+
customElement('activity-owner-view'),
|
|
102
|
+
__metadata("design:paramtypes", [])
|
|
103
|
+
], ActivityOwnerView);
|
|
96
104
|
//# sourceMappingURL=activity-%08owner-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-\bowner-view.js","sourceRoot":"","sources":["../../client/components/activity-\bowner-view.
|
|
1
|
+
{"version":3,"file":"activity-\bowner-view.js","sourceRoot":"","sources":["../../client/components/activity-\bowner-view.ts"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eA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n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-owner-view')\nclass ActivityOwnerView extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n content {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: var(--padding-default);\n overflow: auto;\n }\n\n section {\n display: flex;\n flex-direction: column;\n }\n `\n ]\n @property({ type: String }) activityId?: string\n @property({ type: Object }) activity: any\n @property({ type: Object }) activityInstance: any\n\n constructor() {\n super()\n\n this.activityInstance = {}\n }\n\n render() {\n const { name, description, thumbnail } = this.activity || {}\n\n return html`\n <content>\n <section>\n <div>name: ${name}</div>\n <div>description: ${description}</div>\n </section>\n\n <section>\n <img src=${thumbnail} />\n </section>\n </content>\n `\n }\n\n firstUpdated() {\n this.fetchActivity(this.activityId)\n }\n\n async fetchActivity(id) {\n const response = await client.query({\n query: gql`\n query activity($id: String!) {\n activity(id: $id) {\n id\n name\n description\n state\n thumbnail\n model {\n name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n }\n }\n `,\n variables: {\n id\n }\n })\n\n this.activity = response.data.activity\n }\n}\n"]}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import '@material/mwc-button';
|
|
2
|
+
import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
@@ -1,61 +1,16 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
1
2
|
import '@material/mwc-button';
|
|
2
3
|
import '@operato/property-editor/ox-properties-dynamic-view.js';
|
|
3
4
|
import gql from 'graphql-tag';
|
|
4
5
|
import { css, html, LitElement } from 'lit';
|
|
6
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
5
7
|
import { client } from '@operato/graphql';
|
|
6
8
|
import { i18next, localize } from '@operato/i18n';
|
|
7
9
|
import { notify } from '@operato/layout';
|
|
8
10
|
import { ScrollbarStyles } from '@operato/styles';
|
|
9
|
-
class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
10
|
-
static get properties() {
|
|
11
|
-
return {
|
|
12
|
-
activityInstanceId: String,
|
|
13
|
-
activityInstance: Object,
|
|
14
|
-
activityThreads: Array
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
static get styles() {
|
|
18
|
-
return [
|
|
19
|
-
ScrollbarStyles,
|
|
20
|
-
css `
|
|
21
|
-
:host {
|
|
22
|
-
display: flex;
|
|
23
|
-
flex-direction: column;
|
|
24
|
-
|
|
25
|
-
background-color: #fff;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
content {
|
|
29
|
-
flex: 1;
|
|
30
|
-
display: flex;
|
|
31
|
-
flex-direction: column;
|
|
32
|
-
padding: var(--padding-default);
|
|
33
|
-
overflow: auto;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
section {
|
|
37
|
-
display: flex;
|
|
38
|
-
flex-direction: column;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
#description {
|
|
42
|
-
height: 60px;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.button-container {
|
|
46
|
-
display: flex;
|
|
47
|
-
margin-left: auto;
|
|
48
|
-
padding: var(--padding-default);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
mwc-button {
|
|
52
|
-
margin-left: var(--margin-default);
|
|
53
|
-
}
|
|
54
|
-
`
|
|
55
|
-
];
|
|
56
|
-
}
|
|
11
|
+
let ActivityInstancePreview = class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
57
12
|
constructor() {
|
|
58
|
-
super();
|
|
13
|
+
super(...arguments);
|
|
59
14
|
this.activityInstance = {};
|
|
60
15
|
}
|
|
61
16
|
render() {
|
|
@@ -175,6 +130,58 @@ class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
|
175
130
|
});
|
|
176
131
|
}
|
|
177
132
|
}
|
|
178
|
-
}
|
|
179
|
-
|
|
133
|
+
};
|
|
134
|
+
ActivityInstancePreview.styles = [
|
|
135
|
+
ScrollbarStyles,
|
|
136
|
+
css `
|
|
137
|
+
:host {
|
|
138
|
+
display: flex;
|
|
139
|
+
flex-direction: column;
|
|
140
|
+
|
|
141
|
+
background-color: #fff;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
content {
|
|
145
|
+
flex: 1;
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: column;
|
|
148
|
+
padding: var(--padding-default);
|
|
149
|
+
overflow: auto;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
section {
|
|
153
|
+
display: flex;
|
|
154
|
+
flex-direction: column;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
#description {
|
|
158
|
+
height: 60px;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.button-container {
|
|
162
|
+
display: flex;
|
|
163
|
+
margin-left: auto;
|
|
164
|
+
padding: var(--padding-default);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
mwc-button {
|
|
168
|
+
margin-left: var(--margin-default);
|
|
169
|
+
}
|
|
170
|
+
`
|
|
171
|
+
];
|
|
172
|
+
__decorate([
|
|
173
|
+
property({ type: String }),
|
|
174
|
+
__metadata("design:type", String)
|
|
175
|
+
], ActivityInstancePreview.prototype, "activityInstanceId", void 0);
|
|
176
|
+
__decorate([
|
|
177
|
+
property({ type: Object }),
|
|
178
|
+
__metadata("design:type", Object)
|
|
179
|
+
], ActivityInstancePreview.prototype, "activityInstance", void 0);
|
|
180
|
+
__decorate([
|
|
181
|
+
property({ type: Array }),
|
|
182
|
+
__metadata("design:type", Object)
|
|
183
|
+
], ActivityInstancePreview.prototype, "activityThreads", void 0);
|
|
184
|
+
ActivityInstancePreview = __decorate([
|
|
185
|
+
customElement('activity-instance-preview')
|
|
186
|
+
], ActivityInstancePreview);
|
|
180
187
|
//# sourceMappingURL=activity-instance-preview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"activity-instance-preview.js","sourceRoot":"","sources":["../../client/components/activity-instance-preview.
|
|
1
|
+
{"version":3,"file":"activity-instance-preview.js","sourceRoot":"","sources":["../../client/components/activity-instance-preview.ts"],"names":[],"mappings":";AAAA,OAAO,sBAAsB,CAAA;AAC7B,OAAO,wDAAwD,CAAA;AAE/D,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAGjD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAAnE;;QAyC8B,qBAAgB,GAAQ,EAAE,CAAA;IA2IxD,CAAC;IAxIC,MAAM;;QACJ,MAAM,EACJ,EAAE,EACF,IAAI,EACJ,WAAW,EACX,KAAK,EACL,KAAK,EACL,UAAU,GAAG,CAAC,EACd,UAAU,GAAG,CAAC,EACd,QAAQ,EACT,GAAG,IAAI,CAAC,gBAAgB,IAAI,EAAE,CAAA;QAC/B,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,QAAQ,IAAI,EAAE,CAAA;QAE3C,MAAM,SAAS,GAAG,CAAC,KAAK,IAAI,EAAE,CAAC;aAC5B,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,IAAI,IAAI,IAAI,CA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AC,2BAA2B,CAAC;GACrC,uBAAuB,CAoL5B","sourcesContent":["import '@material/mwc-button'\nimport '@operato/property-editor/ox-properties-dynamic-view.js'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { notify } from '@operato/layout'\nimport { ScrollbarStyles } from '@operato/styles'\n\n@customElement('activity-instance-preview')\nclass ActivityInstancePreview extends localize(i18next)(LitElement) {\n static styles = [\n ScrollbarStyles,\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n content {\n flex: 1;\n display: flex;\n flex-direction: column;\n padding: var(--padding-default);\n overflow: auto;\n }\n\n section {\n display: flex;\n flex-direction: column;\n }\n\n #description {\n height: 60px;\n }\n\n .button-container {\n display: flex;\n margin-left: auto;\n padding: var(--padding-default);\n }\n\n mwc-button {\n margin-left: var(--margin-default);\n }\n `\n ]\n\n @property({ type: String }) activityInstanceId?: string\n @property({ type: Object }) activityInstance: any = {}\n @property({ type: Array }) activityThreads: any\n\n render() {\n const {\n id,\n name,\n description,\n input,\n state,\n threadsMin = 0,\n threadsMax = 0,\n activity\n } = this.activityInstance || {}\n const { model, thumbnail } = activity || {}\n\n const inputSpec = (model || [])\n .filter(item => item.inout === 'in' || item.inout === 'inout')\n .map(item => {\n return {\n ...item,\n label: item.name\n }\n })\n\n const pickable = !(this.activityThreads?.length > 0)\n\n return html`\n <content>\n <section>\n <h2>mission statement</h2>\n <div>title: ${name}</div>\n <div>${description}</div>\n <div>min-max: ${threadsMin} - ${threadsMax}</div>\n <img src=${thumbnail} />\n </section>\n\n <label>Input</label>\n ${!model\n ? html``\n : html`\n <ox-properties-dynamic-view\n .props=${inputSpec}\n .value=${input}\n @property-change=${e => {\n this.activityInstance.input = e.currentTarget.value\n console.log('activity-instance', this.activityInstance.input)\n }}\n ></ox-properties-dynamic-view>\n `}\n </content>\n\n <div class=\"button-container\">\n <mwc-button raised @click=${e => history.back()}>${i18next.t('button.close')}</mwc-button>\n ${pickable\n ? html`<mwc-button raised @click=${this.pickActivityInstance.bind(this)}\n >${i18next.t('button.pick')}</mwc-button\n >`\n : html``}\n </div>\n `\n }\n\n updated(changes) {\n if (changes.has('activityInstanceId')) {\n this.fetchAll(this.activityInstanceId)\n }\n }\n\n async fetchAll(id) {\n const response = await client.query({\n query: gql`\n {\n activityInstance(id: \"${id}\") {\n id\n name\n description\n input\n state\n threadsMin\n threadsMax\n activity {\n id\n name\n description\n state\n thumbnail\n model {\n name\n description\n active\n tag\n inout\n type\n unit\n options\n quantifier\n spec\n }\n }\n }\n\n activityThreads(filters: [{ name: \"activityInstanceId\", operator: \"eq\", value: \"${id}\"}]) {\n items {\n id\n }\n total\n }\n }\n `\n })\n\n this.activityInstance = response.data.activityInstance\n this.activityThreads = response.data.activityThreads.items\n }\n\n async pickActivityInstance() {\n const response = await client.mutate({\n mutation: gql`\n mutation ($id: String!) {\n pickActivityInstance(id: $id) {\n id\n }\n }\n `,\n variables: {\n id: this.activityInstanceId\n }\n })\n\n if (!response.errors) {\n this.activityThreads = [response.data.pickActivityInstance]\n notify({\n message: i18next.t('text.info_x_successfully', {\n x: `${i18next.t('label.activity-instance')} ${i18next.t('text.pick')}`\n })\n })\n }\n }\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
import '@material/mwc-button';
|
|
@@ -1,45 +1,14 @@
|
|
|
1
|
+
import { __decorate, __metadata } from "tslib";
|
|
1
2
|
import '@material/mwc-button';
|
|
2
3
|
import gql from 'graphql-tag';
|
|
3
4
|
import { css, html, LitElement } from 'lit';
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
6
|
import { client } from '@operato/graphql';
|
|
5
7
|
import { i18next, localize } from '@operato/i18n';
|
|
6
8
|
import { ScrollbarStyles } from '@operato/styles';
|
|
7
|
-
class ActivityReporterView extends localize(i18next)(LitElement) {
|
|
8
|
-
static get properties() {
|
|
9
|
-
return {
|
|
10
|
-
activityId: String,
|
|
11
|
-
activity: Object,
|
|
12
|
-
activityInstance: Object
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
static get styles() {
|
|
16
|
-
return [
|
|
17
|
-
ScrollbarStyles,
|
|
18
|
-
css `
|
|
19
|
-
:host {
|
|
20
|
-
display: flex;
|
|
21
|
-
flex-direction: column;
|
|
22
|
-
|
|
23
|
-
background-color: #fff;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
content {
|
|
27
|
-
flex: 1;
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: column;
|
|
30
|
-
padding: var(--padding-default);
|
|
31
|
-
overflow: auto;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
section {
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
}
|
|
38
|
-
`
|
|
39
|
-
];
|
|
40
|
-
}
|
|
9
|
+
let ActivityReporterView = class ActivityReporterView extends localize(i18next)(LitElement) {
|
|
41
10
|
constructor() {
|
|
42
|
-
super();
|
|
11
|
+
super(...arguments);
|
|
43
12
|
this.activityInstance = {};
|
|
44
13
|
}
|
|
45
14
|
render() {
|
|
@@ -91,6 +60,44 @@ class ActivityReporterView extends localize(i18next)(LitElement) {
|
|
|
91
60
|
});
|
|
92
61
|
this.activity = response.data.activity;
|
|
93
62
|
}
|
|
94
|
-
}
|
|
95
|
-
|
|
63
|
+
};
|
|
64
|
+
ActivityReporterView.styles = [
|
|
65
|
+
ScrollbarStyles,
|
|
66
|
+
css `
|
|
67
|
+
:host {
|
|
68
|
+
display: flex;
|
|
69
|
+
flex-direction: column;
|
|
70
|
+
|
|
71
|
+
background-color: #fff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
content {
|
|
75
|
+
flex: 1;
|
|
76
|
+
display: flex;
|
|
77
|
+
flex-direction: column;
|
|
78
|
+
padding: var(--padding-default);
|
|
79
|
+
overflow: auto;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
section {
|
|
83
|
+
display: flex;
|
|
84
|
+
flex-direction: column;
|
|
85
|
+
}
|
|
86
|
+
`
|
|
87
|
+
];
|
|
88
|
+
__decorate([
|
|
89
|
+
property({ type: String }),
|
|
90
|
+
__metadata("design:type", String)
|
|
91
|
+
], ActivityReporterView.prototype, "activityId", void 0);
|
|
92
|
+
__decorate([
|
|
93
|
+
property({ type: Object }),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], ActivityReporterView.prototype, "activity", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
property({ type: Object }),
|
|
98
|
+
__metadata("design:type", Object)
|
|
99
|
+
], ActivityReporterView.prototype, "activityInstance", void 0);
|
|
100
|
+
ActivityReporterView = __decorate([
|
|
101
|
+
customElement('activity-reporter-view')
|
|
102
|
+
], ActivityReporterView);
|
|
96
103
|
//# sourceMappingURL=activity-reporter-view.js.map
|