@things-factory/worklist 5.0.7 → 5.0.13
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/{bootstrap.js → bootstrap.ts} +0 -0
- package/client/components/activity-/bowner-view.js +0 -1
- package/client/components/activity-instance-preview.js +1 -2
- package/client/components/{activity-intro-view.js → activity-intro-view.ts} +29 -42
- package/client/components/activity-reporter-view.js +0 -1
- package/client/components/activity-starter-form.js +2 -3
- package/client/{index.js → index.ts} +0 -0
- package/client/pages/activity/{activity-list-page.js → activity-list-page.ts} +26 -36
- package/client/pages/activity/activity-model-item-list.js +4 -1
- package/client/pages/activity/activity-page.js +2 -3
- package/client/pages/activity/starter-list-page.js +1 -1
- package/client/pages/activity-instance/activity-instance-list-page.js +1 -1
- package/client/pages/activity-instance/activity-instance-page.js +2 -2
- package/client/pages/activity-store/activity-store-page.js +1 -1
- package/client/pages/activity-supervisor/reporter-list-page.js +1 -1
- package/client/pages/activity-template/activity-template-list-page.js +1 -1
- package/client/pages/activity-thread/activity-thread-list-page.js +1 -1
- package/client/pages/activity-thread/activity-thread-page.js +2 -2
- package/client/pages/todo/assigned-list-page.js +1 -1
- package/client/pages/todo/draft-list-page.js +4 -2
- package/client/pages/todo/pickable-list-page.js +2 -2
- package/client/pages/todo/todo-list-page.js +2 -2
- package/client/pages/{worklist-home.js → worklist-home.ts} +2 -6
- package/client/{route.js → route.ts} +1 -1
- package/client/tsconfig.json +11 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +12 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/activity-/bowner-view.d.ts +1 -0
- package/dist-client/components/activity-/bowner-view.js +96 -0
- package/dist-client/components/activity-/bowner-view.js.map +1 -0
- package/dist-client/components/activity-instance-preview.d.ts +1 -0
- package/dist-client/components/activity-instance-preview.js +180 -0
- package/dist-client/components/activity-instance-preview.js.map +1 -0
- package/dist-client/components/activity-intro-view.d.ts +1 -0
- package/dist-client/components/activity-intro-view.js +104 -0
- package/dist-client/components/activity-intro-view.js.map +1 -0
- package/dist-client/components/activity-reporter-view.d.ts +1 -0
- package/dist-client/components/activity-reporter-view.js +96 -0
- package/dist-client/components/activity-reporter-view.js.map +1 -0
- package/dist-client/components/activity-starter-form.d.ts +1 -0
- package/dist-client/components/activity-starter-form.js +293 -0
- package/dist-client/components/activity-starter-form.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/activity/activity-list-page.d.ts +47 -0
- package/dist-client/pages/activity/activity-list-page.js +479 -0
- package/dist-client/pages/activity/activity-list-page.js.map +1 -0
- package/dist-client/pages/activity/activity-model-item-list.d.ts +194 -0
- package/dist-client/pages/activity/activity-model-item-list.js +288 -0
- package/dist-client/pages/activity/activity-model-item-list.js.map +1 -0
- package/dist-client/pages/activity/activity-page.d.ts +49 -0
- package/dist-client/pages/activity/activity-page.js +367 -0
- package/dist-client/pages/activity/activity-page.js.map +1 -0
- package/dist-client/pages/activity/starter-list-page.d.ts +143 -0
- package/dist-client/pages/activity/starter-list-page.js +209 -0
- package/dist-client/pages/activity/starter-list-page.js.map +1 -0
- package/dist-client/pages/activity-instance/activity-instance-list-page.d.ts +137 -0
- package/dist-client/pages/activity-instance/activity-instance-list-page.js +202 -0
- package/dist-client/pages/activity-instance/activity-instance-list-page.js.map +1 -0
- package/dist-client/pages/activity-instance/activity-instance-page.d.ts +49 -0
- package/dist-client/pages/activity-instance/activity-instance-page.js +365 -0
- package/dist-client/pages/activity-instance/activity-instance-page.js.map +1 -0
- package/dist-client/pages/activity-store/activity-store-page.d.ts +174 -0
- package/dist-client/pages/activity-store/activity-store-page.js +211 -0
- package/dist-client/pages/activity-store/activity-store-page.js.map +1 -0
- package/dist-client/pages/activity-supervisor/reporter-list-page.d.ts +143 -0
- package/dist-client/pages/activity-supervisor/reporter-list-page.js +209 -0
- package/dist-client/pages/activity-supervisor/reporter-list-page.js.map +1 -0
- package/dist-client/pages/activity-template/activity-template-importer.d.ts +24 -0
- package/dist-client/pages/activity-template/activity-template-importer.js +98 -0
- package/dist-client/pages/activity-template/activity-template-importer.js.map +1 -0
- package/dist-client/pages/activity-template/activity-template-list-page.d.ts +263 -0
- package/dist-client/pages/activity-template/activity-template-list-page.js +402 -0
- package/dist-client/pages/activity-template/activity-template-list-page.js.map +1 -0
- package/dist-client/pages/activity-template/activity-template-model-item-list.d.ts +1 -0
- package/dist-client/pages/activity-template/activity-template-model-item-list.js +36 -0
- package/dist-client/pages/activity-template/activity-template-model-item-list.js.map +1 -0
- package/dist-client/pages/activity-thread/activity-thread-importer.d.ts +24 -0
- package/dist-client/pages/activity-thread/activity-thread-importer.js +98 -0
- package/dist-client/pages/activity-thread/activity-thread-importer.js.map +1 -0
- package/dist-client/pages/activity-thread/activity-thread-list-page.d.ts +145 -0
- package/dist-client/pages/activity-thread/activity-thread-list-page.js +284 -0
- package/dist-client/pages/activity-thread/activity-thread-list-page.js.map +1 -0
- package/dist-client/pages/activity-thread/activity-thread-page.d.ts +46 -0
- package/dist-client/pages/activity-thread/activity-thread-page.js +331 -0
- package/dist-client/pages/activity-thread/activity-thread-page.js.map +1 -0
- package/dist-client/pages/dashboard/dashboard-home.d.ts +1 -0
- package/dist-client/pages/dashboard/dashboard-home.js +17 -0
- package/dist-client/pages/dashboard/dashboard-home.js.map +1 -0
- package/dist-client/pages/todo/assigned-list-page.d.ts +124 -0
- package/dist-client/pages/todo/assigned-list-page.js +233 -0
- package/dist-client/pages/todo/assigned-list-page.js.map +1 -0
- package/dist-client/pages/todo/draft-list-page.d.ts +198 -0
- package/dist-client/pages/todo/draft-list-page.js +312 -0
- package/dist-client/pages/todo/draft-list-page.js.map +1 -0
- package/dist-client/pages/todo/pickable-list-page.d.ts +150 -0
- package/dist-client/pages/todo/pickable-list-page.js +260 -0
- package/dist-client/pages/todo/pickable-list-page.js.map +1 -0
- package/dist-client/pages/todo/todo-list-page.d.ts +232 -0
- package/dist-client/pages/todo/todo-list-page.js +333 -0
- package/dist-client/pages/todo/todo-list-page.js.map +1 -0
- package/dist-client/pages/worklist-home.d.ts +1 -0
- package/dist-client/pages/worklist-home.js +18 -0
- package/dist-client/pages/worklist-home.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +53 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/types.d.ts +19 -0
- package/dist-client/types.js +37 -0
- package/dist-client/types.js.map +1 -0
- package/dist-server/controllers/activity-extension-controller.js.map +1 -1
- package/dist-server/controllers/activity-instance/abort.js +4 -5
- package/dist-server/controllers/activity-instance/abort.js.map +1 -1
- package/dist-server/controllers/activity-instance/adjust.js +3 -2
- package/dist-server/controllers/activity-instance/adjust.js.map +1 -1
- package/dist-server/controllers/activity-instance/assign.js +9 -25
- package/dist-server/controllers/activity-instance/assign.js.map +1 -1
- package/dist-server/controllers/activity-instance/delegate.js +5 -6
- package/dist-server/controllers/activity-instance/delegate.js.map +1 -1
- package/dist-server/controllers/activity-instance/draft.js +6 -7
- package/dist-server/controllers/activity-instance/draft.js.map +1 -1
- package/dist-server/controllers/activity-instance/end.js +5 -6
- package/dist-server/controllers/activity-instance/end.js.map +1 -1
- package/dist-server/controllers/activity-instance/index.js +11 -24
- package/dist-server/controllers/activity-instance/index.js.map +1 -1
- package/dist-server/controllers/activity-instance/pick.js +6 -6
- package/dist-server/controllers/activity-instance/pick.js.map +1 -1
- package/dist-server/controllers/activity-instance/post.js +10 -6
- package/dist-server/controllers/activity-instance/post.js.map +1 -1
- package/dist-server/controllers/activity-instance/start.js +3 -2
- package/dist-server/controllers/activity-instance/start.js.map +1 -1
- package/dist-server/controllers/activity-instance/terminate.js +5 -6
- package/dist-server/controllers/activity-instance/terminate.js.map +1 -1
- package/dist-server/controllers/activity-thread/abort.js +3 -4
- 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 -5
- package/dist-server/controllers/activity-thread/delegate.js.map +1 -1
- package/dist-server/controllers/activity-thread/end.js +4 -5
- package/dist-server/controllers/activity-thread/end.js.map +1 -1
- package/dist-server/controllers/activity-thread/index.js +8 -21
- package/dist-server/controllers/activity-thread/index.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 +4 -5
- package/dist-server/controllers/activity-thread/start.js.map +1 -1
- package/dist-server/controllers/activity-thread/terminate.js +3 -4
- package/dist-server/controllers/activity-thread/terminate.js.map +1 -1
- package/dist-server/controllers/common.js +23 -6
- package/dist-server/controllers/common.js.map +1 -1
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/index.js +4 -17
- package/dist-server/index.js.map +1 -1
- package/dist-server/middlewares/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/routes.js +0 -1
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/activity/activity-history.js +68 -76
- package/dist-server/service/activity/activity-history.js.map +1 -1
- package/dist-server/service/activity/activity-model-type.js +51 -60
- package/dist-server/service/activity/activity-model-type.js.map +1 -1
- package/dist-server/service/activity/activity-mutation.js +39 -50
- package/dist-server/service/activity/activity-mutation.js.map +1 -1
- package/dist-server/service/activity/activity-query.js +61 -72
- package/dist-server/service/activity/activity-query.js.map +1 -1
- package/dist-server/service/activity/activity-type.js +91 -102
- package/dist-server/service/activity/activity-type.js.map +1 -1
- package/dist-server/service/activity/activity.js +68 -76
- package/dist-server/service/activity/activity.js.map +1 -1
- package/dist-server/service/activity/event-subscriber.js +2 -7
- package/dist-server/service/activity/event-subscriber.js.map +1 -1
- package/dist-server/service/activity/index.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-history.js +81 -89
- package/dist-server/service/activity-instance/activity-instance-history.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-mutation.js +71 -85
- package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-query.js +67 -78
- package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-subscription.js +8 -21
- package/dist-server/service/activity-instance/activity-instance-subscription.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance-type.js +106 -106
- package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -1
- package/dist-server/service/activity-instance/activity-instance.js +85 -93
- package/dist-server/service/activity-instance/activity-instance.js.map +1 -1
- package/dist-server/service/activity-instance/event-subscriber.js +3 -8
- package/dist-server/service/activity-instance/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-instance/index.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-history.js +50 -58
- package/dist-server/service/activity-template/activity-template-history.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-mutation.js +39 -50
- package/dist-server/service/activity-template/activity-template-mutation.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-query.js +48 -45
- package/dist-server/service/activity-template/activity-template-query.js.map +1 -1
- package/dist-server/service/activity-template/activity-template-type.js +65 -76
- package/dist-server/service/activity-template/activity-template-type.js.map +1 -1
- package/dist-server/service/activity-template/activity-template.js +48 -56
- package/dist-server/service/activity-template/activity-template.js.map +1 -1
- package/dist-server/service/activity-template/event-subscriber.js +2 -7
- package/dist-server/service/activity-template/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-template/index.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-mutation.js +84 -95
- package/dist-server/service/activity-thread/activity-thread-mutation.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-query.js +45 -56
- package/dist-server/service/activity-thread/activity-thread-query.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-subscription.js +7 -20
- package/dist-server/service/activity-thread/activity-thread-subscription.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread-type.js +25 -34
- package/dist-server/service/activity-thread/activity-thread-type.js.map +1 -1
- package/dist-server/service/activity-thread/activity-thread.js +43 -51
- package/dist-server/service/activity-thread/activity-thread.js.map +1 -1
- package/dist-server/service/activity-thread/event-subscriber.js +5 -10
- package/dist-server/service/activity-thread/event-subscriber.js.map +1 -1
- package/dist-server/service/activity-thread/index.js.map +1 -1
- package/dist-server/service/index.js +5 -18
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +13 -11
- package/server/controllers/activity-instance/abort.ts +5 -10
- package/server/controllers/activity-instance/adjust.ts +5 -7
- package/server/controllers/activity-instance/assign.ts +13 -45
- package/server/controllers/activity-instance/delegate.ts +6 -8
- package/server/controllers/activity-instance/draft.ts +7 -13
- package/server/controllers/activity-instance/end.ts +6 -9
- package/server/controllers/activity-instance/pick.ts +12 -9
- package/server/controllers/activity-instance/post.ts +14 -12
- package/server/controllers/activity-instance/start.ts +5 -3
- package/server/controllers/activity-instance/terminate.ts +6 -8
- package/server/controllers/activity-thread/abort.ts +3 -9
- package/server/controllers/activity-thread/adjust.ts +3 -6
- package/server/controllers/activity-thread/delegate.ts +4 -7
- package/server/controllers/activity-thread/end.ts +4 -7
- package/server/controllers/activity-thread/save.ts +3 -6
- package/server/controllers/activity-thread/start.ts +4 -11
- package/server/controllers/activity-thread/terminate.ts +3 -7
- package/server/controllers/common.ts +33 -14
- package/server/routes.ts +0 -2
- package/server/service/activity/activity-model-type.ts +4 -4
- package/server/service/activity-instance/activity-instance-history.ts +2 -2
- package/server/service/activity-instance/activity-instance-mutation.ts +11 -15
- package/server/service/activity-instance/activity-instance-subscription.ts +1 -5
- package/server/service/activity-instance/activity-instance-type.ts +17 -11
- package/server/service/activity-instance/activity-instance.ts +2 -2
- package/server/service/activity-template/activity-template-query.ts +10 -0
- package/server/service/activity-thread/activity-thread-mutation.ts +7 -7
- package/server/service/activity-thread/activity-thread-subscription.ts +0 -4
- package/server/service/activity-thread/activity-thread-type.ts +1 -1
- package/server/service/activity-thread/activity-thread.ts +1 -1
- package/server/service/activity-thread/event-subscriber.ts +3 -3
- package/server/tsconfig.json +10 -0
- package/things-factory.config.js +2 -2
- package/tsconfig.json +0 -9
|
File without changes
|
|
@@ -106,8 +106,7 @@ class ActivityInstancePreview extends localize(i18next)(LitElement) {
|
|
|
106
106
|
<ox-properties-dynamic-view
|
|
107
107
|
.props=${inputSpec}
|
|
108
108
|
.value=${input}
|
|
109
|
-
@change=${e => {
|
|
110
|
-
/* TODO remove this comment, after solving the problem of sometimes not saving. */
|
|
109
|
+
@property-change=${e => {
|
|
111
110
|
this.activityInstance.input = e.currentTarget.value
|
|
112
111
|
console.log('activity-instance', this.activityInstance.input)
|
|
113
112
|
}}
|
|
@@ -1,54 +1,43 @@
|
|
|
1
1
|
import '@material/mwc-button'
|
|
2
|
-
import '@operato/property-editor/ox-properties-dynamic-view.js'
|
|
3
2
|
|
|
4
3
|
import gql from 'graphql-tag'
|
|
5
4
|
import { css, html, LitElement } from 'lit'
|
|
5
|
+
import { customElement, property } from 'lit/decorators.js'
|
|
6
6
|
|
|
7
7
|
import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
9
9
|
import { ScrollbarStyles } from '@operato/styles'
|
|
10
10
|
|
|
11
|
+
@customElement('activity-intro-view')
|
|
11
12
|
class ActivityIntroView extends localize(i18next)(LitElement) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: column;
|
|
27
|
-
|
|
28
|
-
background-color: #fff;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
content {
|
|
32
|
-
flex: 1;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-direction: column;
|
|
35
|
-
padding: var(--padding-default);
|
|
36
|
-
overflow: auto;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
section {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
}
|
|
43
|
-
`
|
|
44
|
-
]
|
|
45
|
-
}
|
|
13
|
+
@property({ type: String }) activityTemplateId: string = ''
|
|
14
|
+
@property({ type: Object }) activityTemplate: any
|
|
15
|
+
@property({ type: Object }) activityInstance: any = {}
|
|
16
|
+
|
|
17
|
+
static styles = [
|
|
18
|
+
ScrollbarStyles,
|
|
19
|
+
css`
|
|
20
|
+
:host {
|
|
21
|
+
display: flex;
|
|
22
|
+
flex-direction: column;
|
|
23
|
+
|
|
24
|
+
background-color: #fff;
|
|
25
|
+
}
|
|
46
26
|
|
|
47
|
-
|
|
48
|
-
|
|
27
|
+
content {
|
|
28
|
+
flex: 1;
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
padding: var(--padding-default);
|
|
32
|
+
overflow: auto;
|
|
33
|
+
}
|
|
49
34
|
|
|
50
|
-
|
|
51
|
-
|
|
35
|
+
section {
|
|
36
|
+
display: flex;
|
|
37
|
+
flex-direction: column;
|
|
38
|
+
}
|
|
39
|
+
`
|
|
40
|
+
]
|
|
52
41
|
|
|
53
42
|
render() {
|
|
54
43
|
const { name, description, thumbnail } = this.activityTemplate || {}
|
|
@@ -71,7 +60,7 @@ class ActivityIntroView extends localize(i18next)(LitElement) {
|
|
|
71
60
|
this.fetchActivity(this.activityTemplateId)
|
|
72
61
|
}
|
|
73
62
|
|
|
74
|
-
async fetchActivity(id) {
|
|
63
|
+
async fetchActivity(id: string) {
|
|
75
64
|
const response = await client.query({
|
|
76
65
|
query: gql`
|
|
77
66
|
query activityTemplate($id: String!) {
|
|
@@ -104,5 +93,3 @@ class ActivityIntroView extends localize(i18next)(LitElement) {
|
|
|
104
93
|
this.activityTemplate = response.data.activityTemplate
|
|
105
94
|
}
|
|
106
95
|
}
|
|
107
|
-
|
|
108
|
-
window.customElements.define('activity-intro-view', ActivityIntroView)
|
|
@@ -134,8 +134,7 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
134
134
|
<ox-properties-dynamic-view
|
|
135
135
|
.props=${inputSpec}
|
|
136
136
|
.value=${input}
|
|
137
|
-
@change=${e => {
|
|
138
|
-
/* TODO remove this comment, after solving the problem of sometimes not saving. */
|
|
137
|
+
@property-change=${e => {
|
|
139
138
|
this.activityInstance.input = e.currentTarget.value
|
|
140
139
|
console.log('activity-instance', this.activityInstance.input)
|
|
141
140
|
}}
|
|
@@ -279,7 +278,7 @@ class ActivityStarterForm extends localize(i18next)(LitElement) {
|
|
|
279
278
|
this.activityInstance = response.data.updateActivityInstance
|
|
280
279
|
notify({
|
|
281
280
|
message: i18next.t('text.info_x_successfully', {
|
|
282
|
-
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.
|
|
281
|
+
x: `${i18next.t('label.activity-instance')} ${i18next.t('text.save')}`
|
|
283
282
|
})
|
|
284
283
|
})
|
|
285
284
|
}
|
|
File without changes
|
|
@@ -3,7 +3,8 @@ import './activity-model-item-list.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
-
import {
|
|
6
|
+
import { customElement, property, query } from 'lit/decorators.js'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
8
|
|
|
8
9
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
9
10
|
import { client } from '@operato/graphql'
|
|
@@ -13,32 +14,29 @@ import { PageView, store } from '@operato/shell'
|
|
|
13
14
|
import { CommonButtonStyles, CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
15
|
import { isMobileDevice } from '@operato/utils'
|
|
15
16
|
|
|
16
|
-
import { ActivityTypes, ActivityUITypes } from '../../types'
|
|
17
|
+
import { ActivityTypes, ActivityUITypes } from '../../types.js'
|
|
17
18
|
|
|
19
|
+
@customElement('activity-list-page')
|
|
18
20
|
export class ActivityListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
19
|
-
static
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
21
|
+
static styles = [
|
|
22
|
+
ScrollbarStyles,
|
|
23
|
+
CommonGristStyles,
|
|
24
|
+
css`
|
|
25
|
+
:host {
|
|
26
|
+
display: flex;
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
return [
|
|
28
|
-
ScrollbarStyles,
|
|
29
|
-
CommonGristStyles,
|
|
30
|
-
css`
|
|
31
|
-
:host {
|
|
32
|
-
display: flex;
|
|
28
|
+
width: 100%;
|
|
33
29
|
|
|
34
|
-
|
|
30
|
+
--grid-record-emphasized-background-color: red;
|
|
31
|
+
--grid-record-emphasized-color: yellow;
|
|
32
|
+
}
|
|
33
|
+
`
|
|
34
|
+
]
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
]
|
|
41
|
-
}
|
|
36
|
+
@property({ type: Object }) gristConfig?: any
|
|
37
|
+
@property({ type: String }) mode: 'CARD' | 'GRID' = 'CARD'
|
|
38
|
+
|
|
39
|
+
@query('ox-grist') grist?: HTMLElement & { fetch: any; dirtyRecords: any }
|
|
42
40
|
|
|
43
41
|
get context() {
|
|
44
42
|
return {
|
|
@@ -69,7 +67,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
69
67
|
<mwc-icon
|
|
70
68
|
@click=${e => {
|
|
71
69
|
const target = e.currentTarget
|
|
72
|
-
this.renderRoot.querySelector('#sorter-control')
|
|
70
|
+
;(this.renderRoot.querySelector('#sorter-control') as any)?.open({
|
|
73
71
|
right: 0,
|
|
74
72
|
top: target.offsetTop + target.offsetHeight
|
|
75
73
|
})
|
|
@@ -83,7 +81,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
83
81
|
|
|
84
82
|
<div id="modes">
|
|
85
83
|
<mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
|
|
86
|
-
<mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
|
|
87
84
|
<mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
|
|
88
85
|
</div>
|
|
89
86
|
</div>
|
|
@@ -91,10 +88,6 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
91
88
|
`
|
|
92
89
|
}
|
|
93
90
|
|
|
94
|
-
get grist() {
|
|
95
|
-
return this.renderRoot.querySelector('ox-grist')
|
|
96
|
-
}
|
|
97
|
-
|
|
98
91
|
async pageInitialized(lifecycle) {
|
|
99
92
|
this.gristConfig = {
|
|
100
93
|
list: {
|
|
@@ -122,7 +115,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
122
115
|
}
|
|
123
116
|
)
|
|
124
117
|
popup.onclosed = () => {
|
|
125
|
-
this.grist
|
|
118
|
+
this.grist?.fetch()
|
|
126
119
|
}
|
|
127
120
|
}
|
|
128
121
|
}
|
|
@@ -201,8 +194,7 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
201
194
|
objectified: true
|
|
202
195
|
}
|
|
203
196
|
},
|
|
204
|
-
width: 80
|
|
205
|
-
label: true
|
|
197
|
+
width: 80
|
|
206
198
|
},
|
|
207
199
|
{
|
|
208
200
|
type: 'image',
|
|
@@ -451,10 +443,10 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
451
443
|
}
|
|
452
444
|
|
|
453
445
|
async _updateActivity() {
|
|
454
|
-
let patches = this.grist
|
|
446
|
+
let patches = this.grist?.dirtyRecords
|
|
455
447
|
if (patches && patches.length) {
|
|
456
448
|
patches = patches.map(patch => {
|
|
457
|
-
let patchField = patch.id ? { id: patch.id } : {}
|
|
449
|
+
let patchField: any = patch.id ? { id: patch.id } : {}
|
|
458
450
|
const dirtyFields = patch.__dirtyfields__
|
|
459
451
|
for (let key in dirtyFields) {
|
|
460
452
|
patchField[key] = dirtyFields[key].after
|
|
@@ -481,10 +473,8 @@ export class ActivityListPage extends connect(store)(localize(i18next)(PageView)
|
|
|
481
473
|
})
|
|
482
474
|
|
|
483
475
|
if (!response.errors) {
|
|
484
|
-
this.grist
|
|
476
|
+
this.grist?.fetch()
|
|
485
477
|
}
|
|
486
478
|
}
|
|
487
479
|
}
|
|
488
480
|
}
|
|
489
|
-
|
|
490
|
-
window.customElements.define('activity-list-page', ActivityListPage)
|
|
@@ -101,7 +101,10 @@ export class ActivityModelItemList extends localize(i18next)(LitElement) {
|
|
|
101
101
|
record: {
|
|
102
102
|
editable: true
|
|
103
103
|
},
|
|
104
|
-
width: 140
|
|
104
|
+
width: 140,
|
|
105
|
+
validation: (after, before, record, column) => {
|
|
106
|
+
return after
|
|
107
|
+
}
|
|
105
108
|
},
|
|
106
109
|
{
|
|
107
110
|
type: 'string',
|
|
@@ -4,7 +4,7 @@ import '@operato/board/ox-board-viewer.js'
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'
|
|
7
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
8
|
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
10
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -25,7 +25,6 @@ export const ActivityInstanceStatus = {
|
|
|
25
25
|
Aborted: 'aborted'
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
-
// TODO activity editing..
|
|
29
28
|
export class ActivityPage extends connect(store)(localize(i18next)(PageView)) {
|
|
30
29
|
static get properties() {
|
|
31
30
|
return {
|
|
@@ -189,7 +188,7 @@ export class ActivityPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
189
188
|
data-name="output"
|
|
190
189
|
.props=${outputSpec}
|
|
191
190
|
.value=${output}
|
|
192
|
-
@change=${e => (this.activityInstance.output = e.currentTarget.value)}
|
|
191
|
+
@property-change=${e => (this.activityInstance.output = e.currentTarget.value)}
|
|
193
192
|
></ox-properties-dynamic-view>
|
|
194
193
|
</fieldset>
|
|
195
194
|
`
|
|
@@ -3,7 +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 { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -2,7 +2,7 @@ import '@operato/data-grist'
|
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
5
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
6
6
|
|
|
7
7
|
import { client } from '@operato/graphql'
|
|
8
8
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -4,7 +4,7 @@ import '@operato/board/ox-board-viewer.js'
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'
|
|
7
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
8
|
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
10
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -177,7 +177,7 @@ export class ActivityInstancePage extends connect(store)(localize(i18next)(PageV
|
|
|
177
177
|
data-name="output"
|
|
178
178
|
.props=${outputSpec}
|
|
179
179
|
.value=${output}
|
|
180
|
-
@change=${e => (this.activityInstance.output = e.currentTarget.value)}
|
|
180
|
+
@property-change=${e => (this.activityInstance.output = e.currentTarget.value)}
|
|
181
181
|
></ox-properties-dynamic-view>
|
|
182
182
|
</fieldset>
|
|
183
183
|
`
|
|
@@ -3,7 +3,7 @@ import '../../components/activity-intro-view'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -3,7 +3,7 @@ import '../../components/activity-reporter-view.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -4,7 +4,7 @@ import './activity-template-model-item-list.js'
|
|
|
4
4
|
|
|
5
5
|
import gql from 'graphql-tag'
|
|
6
6
|
import { css, html } from 'lit'
|
|
7
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
8
|
|
|
9
9
|
import { getEditor, getRenderer } from '@operato/data-grist'
|
|
10
10
|
import { client } from '@operato/graphql'
|
|
@@ -3,7 +3,7 @@ import './activity-thread-importer.js'
|
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
9
9
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -4,7 +4,7 @@ import '@operato/board/ox-board-viewer.js'
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
6
|
import { unsafeHTML } from 'lit-html/directives/unsafe-html.js'
|
|
7
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
7
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
8
8
|
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
10
10
|
import { i18next, localize } from '@operato/i18n'
|
|
@@ -227,7 +227,7 @@ export class ActivityThreadPage extends connect(store)(localize(i18next)(PageVie
|
|
|
227
227
|
data-name="output"
|
|
228
228
|
.props=${outputSpec}
|
|
229
229
|
.value=${output}
|
|
230
|
-
@change=${e => (this.activityThread.output = e.currentTarget.value)}
|
|
230
|
+
@property-change=${e => (this.activityThread.output = e.currentTarget.value)}
|
|
231
231
|
></ox-properties-dynamic-view>
|
|
232
232
|
</fieldset>
|
|
233
233
|
`
|
|
@@ -2,7 +2,7 @@ import '@operato/data-grist'
|
|
|
2
2
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
5
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
6
6
|
|
|
7
7
|
import { getRenderer } from '@operato/data-grist'
|
|
8
8
|
import { client } from '@operato/graphql'
|
|
@@ -3,7 +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 { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { getRenderer } from '@operato/data-grist'
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
@@ -13,7 +13,7 @@ import { PageView, store } from '@operato/shell'
|
|
|
13
13
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
14
14
|
import { isMobileDevice } from '@operato/utils'
|
|
15
15
|
|
|
16
|
-
import { ActivityInstanceStatus, Priorities } from '../../types'
|
|
16
|
+
import { ActivityInstanceStatus, Priorities } from '../../types.js'
|
|
17
17
|
|
|
18
18
|
const MIN = 60
|
|
19
19
|
const HOUR = 60 * MIN
|
|
@@ -295,6 +295,8 @@ export class DraftListPage extends connect(store)(localize(i18next)(PageView)) {
|
|
|
295
295
|
id
|
|
296
296
|
}
|
|
297
297
|
activityType
|
|
298
|
+
threadsMin
|
|
299
|
+
threadsMax
|
|
298
300
|
uiType
|
|
299
301
|
uiSource
|
|
300
302
|
dueAt
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import '@operato/data-grist'
|
|
2
|
-
import '../../components/activity-instance-preview'
|
|
2
|
+
import '../../components/activity-instance-preview.js'
|
|
3
3
|
|
|
4
4
|
import gql from 'graphql-tag'
|
|
5
5
|
import { css, html } from 'lit'
|
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { getRenderer } from '@operato/data-grist'
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
@@ -3,7 +3,7 @@ import '@operato/data-grist'
|
|
|
3
3
|
import gql from 'graphql-tag'
|
|
4
4
|
import { css, html } from 'lit'
|
|
5
5
|
import { asyncReplace } from 'lit/directives/async-replace.js'
|
|
6
|
-
import { connect } from 'pwa-helpers/connect-mixin'
|
|
6
|
+
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
7
7
|
|
|
8
8
|
import { getRenderer } from '@operato/data-grist'
|
|
9
9
|
import { client } from '@operato/graphql'
|
|
@@ -12,7 +12,7 @@ import { navigate, PageView, store } from '@operato/shell'
|
|
|
12
12
|
import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
|
|
13
13
|
import { isMobileDevice, sleep } from '@operato/utils'
|
|
14
14
|
|
|
15
|
-
import { ActivityInstanceStatus, Priorities } from '../../types'
|
|
15
|
+
import { ActivityInstanceStatus, Priorities } from '../../types.js'
|
|
16
16
|
|
|
17
17
|
const MIN = 60
|
|
18
18
|
const HOUR = 60 * MIN
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import { html } from 'lit-element'
|
|
2
|
+
import { customElement } from 'lit/decorators.js'
|
|
2
3
|
import { connect } from 'pwa-helpers/connect-mixin.js'
|
|
3
4
|
|
|
4
5
|
import { PageView, store } from '@operato/shell'
|
|
5
6
|
|
|
7
|
+
@customElement('worklist-home')
|
|
6
8
|
class WorklistMain extends connect(store)(PageView) {
|
|
7
|
-
static get properties() {
|
|
8
|
-
return {}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
9
|
render() {
|
|
12
10
|
return html`
|
|
13
11
|
<section>
|
|
@@ -16,5 +14,3 @@ class WorklistMain extends connect(store)(PageView) {
|
|
|
16
14
|
`
|
|
17
15
|
}
|
|
18
16
|
}
|
|
19
|
-
|
|
20
|
-
window.customElements.define('worklist-home', WorklistMain)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function bootstrap(): void;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist';
|
|
2
|
+
import { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js';
|
|
3
|
+
import { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js';
|
|
4
|
+
import { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js';
|
|
5
|
+
import { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js';
|
|
6
|
+
export default function bootstrap() {
|
|
7
|
+
registerGristEditor('duration', OxGristEditorDuration);
|
|
8
|
+
registerGristRenderer('duration', OxGristRendererDuration);
|
|
9
|
+
registerGristEditor('quantifier', OxGristEditorQuantifier);
|
|
10
|
+
registerGristRenderer('quantifier', OxGristRendererQuantifier);
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=bootstrap.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bootstrap.js","sourceRoot":"","sources":["../client/bootstrap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,IAAI,mBAAmB,EAAE,gBAAgB,IAAI,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACtH,OAAO,EAAE,qBAAqB,EAAE,MAAM,mDAAmD,CAAA;AACzF,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,qDAAqD,CAAA;AAC7F,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAA;AAEjG,MAAM,CAAC,OAAO,UAAU,SAAS;IAC/B,mBAAmB,CAAC,UAAU,EAAE,qBAAqB,CAAC,CAAA;IACtD,qBAAqB,CAAC,UAAU,EAAE,uBAAuB,CAAC,CAAA;IAC1D,mBAAmB,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAAA;IAC1D,qBAAqB,CAAC,YAAY,EAAE,yBAAyB,CAAC,CAAA;AAChE,CAAC","sourcesContent":["import { registerEditor as registerGristEditor, registerRenderer as registerGristRenderer } from '@operato/data-grist'\nimport { OxGristEditorDuration } from '@operato/grist-editor/ox-grist-editor-duration.js'\nimport { OxGristEditorQuantifier } from '@operato/grist-editor/ox-grist-editor-quantifier.js'\nimport { OxGristRendererDuration } from '@operato/grist-editor/ox-grist-renderer-duration.js'\nimport { OxGristRendererQuantifier } from '@operato/grist-editor/ox-grist-renderer-quantifier.js'\n\nexport default function bootstrap() {\n registerGristEditor('duration', OxGristEditorDuration)\n registerGristRenderer('duration', OxGristRendererDuration)\n registerGristEditor('quantifier', OxGristEditorQuantifier)\n registerGristRenderer('quantifier', OxGristRendererQuantifier)\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import '@material/mwc-button';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { client } from '@operato/graphql';
|
|
5
|
+
import { i18next, localize } from '@operato/i18n';
|
|
6
|
+
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
|
+
}
|
|
41
|
+
constructor() {
|
|
42
|
+
super();
|
|
43
|
+
this.activityInstance = {};
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
const { name, description, thumbnail } = this.activity || {};
|
|
47
|
+
return html `
|
|
48
|
+
<content>
|
|
49
|
+
<section>
|
|
50
|
+
<div>name: ${name}</div>
|
|
51
|
+
<div>description: ${description}</div>
|
|
52
|
+
</section>
|
|
53
|
+
|
|
54
|
+
<section>
|
|
55
|
+
<img src=${thumbnail} />
|
|
56
|
+
</section>
|
|
57
|
+
</content>
|
|
58
|
+
`;
|
|
59
|
+
}
|
|
60
|
+
firstUpdated() {
|
|
61
|
+
this.fetchActivity(this.activityId);
|
|
62
|
+
}
|
|
63
|
+
async fetchActivity(id) {
|
|
64
|
+
const response = await client.query({
|
|
65
|
+
query: gql `
|
|
66
|
+
query activity($id: String!) {
|
|
67
|
+
activity(id: $id) {
|
|
68
|
+
id
|
|
69
|
+
name
|
|
70
|
+
description
|
|
71
|
+
state
|
|
72
|
+
thumbnail
|
|
73
|
+
model {
|
|
74
|
+
name
|
|
75
|
+
description
|
|
76
|
+
active
|
|
77
|
+
tag
|
|
78
|
+
inout
|
|
79
|
+
type
|
|
80
|
+
unit
|
|
81
|
+
options
|
|
82
|
+
quantifier
|
|
83
|
+
spec
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
`,
|
|
88
|
+
variables: {
|
|
89
|
+
id
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
this.activity = response.data.activity;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
window.customElements.define('activity-owner-view', ActivityOwnerView);
|
|
96
|
+
//# sourceMappingURL=activity-%08owner-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-\bowner-view.js","sourceRoot":"","sources":["../../client/components/activity-\bowner-view.js"],"names":[],"mappings":"AAAA,OAAO,sBAAsB,CAAA;AAE7B,OAAO,GAAG,MAAM,aAAa,CAAA;AAC7B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAE3C,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAA;AACzC,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,iBAAkB,SAAQ,QAAQ,CAAC,OAAO,CAAC,CAAC,UAAU,CAAC;IAC3D,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,UAAU,EAAE,MAAM;YAClB,QAAQ,EAAE,MAAM;YAChB,gBAAgB,EAAE,MAAM;SACzB,CAAA;IACH,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,eAAe;YACf,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;OAoBF;SACF,CAAA;IACH,CAAC;IAED;QACE,KAAK,EAAE,CAAA;QAEP,IAAI,CAAC,gBAAgB,GAAG,EAAE,CAAA;IAC5B,CAAC;IAED,MAAM;QACJ,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,CAAA;QAE5D,OAAO,IAAI,CAAA;;;uBAGQ,IAAI;8BACG,WAAW;;;;qBAIpB,SAAS;;;KAGzB,CAAA;IACH,CAAC;IAED,YAAY;QACV,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,UAAU,CAAC,CAAA;IACrC,CAAC;IAED,KAAK,CAAC,aAAa,CAAC,EAAE;QACpB,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAC;YAClC,KAAK,EAAE,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;OAsBT;YACD,SAAS,EAAE;gBACT,EAAE;aACH;SACF,CAAC,CAAA;QAEF,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAA;IACxC,CAAC;CACF;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,qBAAqB,EAAE,iBAAiB,CAAC,CAAA","sourcesContent":["import '@material/mwc-button'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\n\nimport { client } from '@operato/graphql'\nimport { i18next, localize } from '@operato/i18n'\nimport { ScrollbarStyles } from '@operato/styles'\n\nclass ActivityOwnerView extends localize(i18next)(LitElement) {\n static get properties() {\n return {\n activityId: String,\n activity: Object,\n activityInstance: Object\n }\n }\n\n static get styles() {\n return [\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 }\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\nwindow.customElements.define('activity-owner-view', ActivityOwnerView)\n"]}
|