@things-factory/worklist 5.0.0-zeta.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/LICENSE.md +21 -0
  3. package/client/bootstrap.js +1 -0
  4. package/client/index.js +0 -0
  5. package/client/pages/activity/activity-list-page.js +374 -0
  6. package/client/pages/activity-instance/activity-instance-list-page.js +184 -0
  7. package/client/pages/todo/assigned-list-page.js +231 -0
  8. package/client/pages/todo/starter-list-page.js +239 -0
  9. package/client/pages/todo/todo-list-page.js +247 -0
  10. package/client/pages/worklist-home.js +20 -0
  11. package/client/route.js +27 -0
  12. package/dist-server/controllers/index.js +1 -0
  13. package/dist-server/controllers/index.js.map +1 -0
  14. package/dist-server/index.js +21 -0
  15. package/dist-server/index.js.map +1 -0
  16. package/dist-server/middlewares/index.js +8 -0
  17. package/dist-server/middlewares/index.js.map +1 -0
  18. package/dist-server/migrations/index.js +12 -0
  19. package/dist-server/migrations/index.js.map +1 -0
  20. package/dist-server/routes.js +25 -0
  21. package/dist-server/routes.js.map +1 -0
  22. package/dist-server/service/activity/activity-mutation.js +136 -0
  23. package/dist-server/service/activity/activity-mutation.js.map +1 -0
  24. package/dist-server/service/activity/activity-query.js +137 -0
  25. package/dist-server/service/activity/activity-query.js.map +1 -0
  26. package/dist-server/service/activity/activity-type.js +151 -0
  27. package/dist-server/service/activity/activity-type.js.map +1 -0
  28. package/dist-server/service/activity/activity.js +175 -0
  29. package/dist-server/service/activity/activity.js.map +1 -0
  30. package/dist-server/service/activity/index.js +9 -0
  31. package/dist-server/service/activity/index.js.map +1 -0
  32. package/dist-server/service/activity-instance/activity-instance-mutation.js +189 -0
  33. package/dist-server/service/activity-instance/activity-instance-mutation.js.map +1 -0
  34. package/dist-server/service/activity-instance/activity-instance-query.js +135 -0
  35. package/dist-server/service/activity-instance/activity-instance-query.js.map +1 -0
  36. package/dist-server/service/activity-instance/activity-instance-type.js +87 -0
  37. package/dist-server/service/activity-instance/activity-instance-type.js.map +1 -0
  38. package/dist-server/service/activity-instance/activity-instance.js +135 -0
  39. package/dist-server/service/activity-instance/activity-instance.js.map +1 -0
  40. package/dist-server/service/activity-instance/index.js +9 -0
  41. package/dist-server/service/activity-instance/index.js.map +1 -0
  42. package/dist-server/service/index.js +36 -0
  43. package/dist-server/service/index.js.map +1 -0
  44. package/package.json +33 -0
  45. package/server/controllers/index.ts +0 -0
  46. package/server/index.ts +5 -0
  47. package/server/middlewares/index.ts +3 -0
  48. package/server/migrations/index.ts +9 -0
  49. package/server/routes.ts +28 -0
  50. package/server/service/activity/activity-mutation.ts +129 -0
  51. package/server/service/activity/activity-query.ts +91 -0
  52. package/server/service/activity/activity-type.ts +101 -0
  53. package/server/service/activity/activity.ts +148 -0
  54. package/server/service/activity/index.ts +6 -0
  55. package/server/service/activity-instance/activity-instance-mutation.ts +208 -0
  56. package/server/service/activity-instance/activity-instance-query.ts +88 -0
  57. package/server/service/activity-instance/activity-instance-type.ts +53 -0
  58. package/server/service/activity-instance/activity-instance.ts +114 -0
  59. package/server/service/activity-instance/index.ts +6 -0
  60. package/server/service/index.ts +22 -0
  61. package/things-factory.config.js +14 -0
  62. package/translations/en.json +17 -0
  63. package/translations/ko.json +17 -0
  64. package/translations/ms.json +17 -0
  65. package/translations/zh.json +17 -0
  66. package/tsconfig.json +9 -0
@@ -0,0 +1,231 @@
1
+ import '@operato/data-grist'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html } from 'lit'
5
+ import { connect } from 'pwa-helpers/connect-mixin'
6
+
7
+ import { getRenderer } from '@operato/data-grist'
8
+ import { client } from '@operato/graphql'
9
+ import { i18next, localize } from '@operato/i18n'
10
+ import { PageView, store } from '@operato/shell'
11
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
12
+ import { isMobileDevice } from '@operato/utils'
13
+
14
+ export class AssignedListPage extends connect(store)(localize(i18next)(PageView)) {
15
+ static get properties() {
16
+ return {
17
+ gristConfig: Object,
18
+ mode: String
19
+ }
20
+ }
21
+
22
+ static get styles() {
23
+ return [
24
+ ScrollbarStyles,
25
+ CommonGristStyles,
26
+ css`
27
+ :host {
28
+ display: flex;
29
+
30
+ width: 100%;
31
+
32
+ --grid-record-emphasized-background-color: red;
33
+ --grid-record-emphasized-color: yellow;
34
+ }
35
+ `
36
+ ]
37
+ }
38
+
39
+ get context() {
40
+ return {
41
+ title: i18next.t('title.assigned list'),
42
+ help: 'worklist/assigned-list',
43
+ actions: []
44
+ }
45
+ }
46
+
47
+ render() {
48
+ const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
49
+
50
+ return html`
51
+ <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
52
+ <div slot="headroom">
53
+ <div id="filters">
54
+ <ox-filters-form></ox-filters-form>
55
+ </div>
56
+
57
+ <div id="sorters">
58
+ Sort
59
+ <mwc-icon
60
+ @click=${e => {
61
+ const target = e.currentTarget
62
+ this.renderRoot.querySelector('#sorter-control').open({
63
+ right: 0,
64
+ top: target.offsetTop + target.offsetHeight
65
+ })
66
+ }}
67
+ >expand_more</mwc-icon
68
+ >
69
+ <ox-popup id="sorter-control">
70
+ <ox-sorters-control> </ox-sorters-control>
71
+ </ox-popup>
72
+ </div>
73
+
74
+ <div id="modes">
75
+ <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
76
+ <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
77
+ <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
78
+ </div>
79
+ </div>
80
+ </ox-grist>
81
+ `
82
+ }
83
+
84
+ get grist() {
85
+ return this.renderRoot.querySelector('ox-grist')
86
+ }
87
+
88
+ async pageInitialized(lifecycle) {
89
+ this.gristConfig = {
90
+ list: {
91
+ thumbnail: 'uiSource',
92
+ fields: ['name', 'description'],
93
+ details: ['createdAt', 'due']
94
+ },
95
+ columns: [
96
+ { type: 'gutter', gutterName: 'sequence' },
97
+ {
98
+ type: 'string',
99
+ name: 'name',
100
+ header: i18next.t('field.name'),
101
+ record: {
102
+ editable: false
103
+ },
104
+ filter: 'search',
105
+ sortable: true,
106
+ width: 150
107
+ },
108
+ {
109
+ type: 'string',
110
+ name: 'description',
111
+ header: i18next.t('field.description'),
112
+ record: {
113
+ editable: false
114
+ },
115
+ filter: 'search',
116
+ width: 200
117
+ },
118
+ {
119
+ type: 'string',
120
+ name: 'uiSource',
121
+ header: i18next.t('field.ui-source'),
122
+ record: {
123
+ editable: false,
124
+ renderer: function (value, column, record, rowIndex, field) {
125
+ const { uiType, uiSource } = record.activity || {}
126
+ var type = uiType !== 'board' ? 'string' : 'board'
127
+ return getRenderer(type)(uiSource, column, record, rowIndex, field)
128
+ }
129
+ },
130
+ width: 140,
131
+ hidden: true
132
+ },
133
+ {
134
+ type: 'resource-object',
135
+ name: 'creator',
136
+ header: i18next.t('field.creator'),
137
+ record: {
138
+ editable: false
139
+ },
140
+ sortable: true,
141
+ width: 120
142
+ },
143
+ {
144
+ type: 'datetime',
145
+ name: 'dueAt',
146
+ header: i18next.t('field.due-at'),
147
+ record: {
148
+ editable: false
149
+ },
150
+ sortable: true,
151
+ filter: {
152
+ type: 'date',
153
+ operator: 'between'
154
+ },
155
+ width: 180
156
+ },
157
+ {
158
+ type: 'datetime',
159
+ name: 'updatedAt',
160
+ header: i18next.t('field.updated_at'),
161
+ record: {
162
+ editable: false
163
+ },
164
+ sortable: true,
165
+ width: 180
166
+ },
167
+ {
168
+ type: 'datetime',
169
+ name: 'createdAt',
170
+ header: i18next.t('field.created_at'),
171
+ record: {
172
+ editable: false
173
+ },
174
+ sortable: true,
175
+ filter: 'between',
176
+ width: 180
177
+ }
178
+ ],
179
+ rows: {
180
+ appendable: false
181
+ },
182
+ sorters: [
183
+ {
184
+ name: 'name'
185
+ }
186
+ ]
187
+ }
188
+ }
189
+
190
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
191
+ const response = await client.query({
192
+ query: gql`
193
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
194
+ responses: activityInstances(filters: $filters, pagination: $pagination, sortings: $sortings) {
195
+ items {
196
+ id
197
+ name
198
+ description
199
+ input
200
+ activity {
201
+ activityType
202
+ uiType
203
+ uiSource
204
+ }
205
+ dueAt
206
+ updatedAt
207
+ createdAt
208
+ creator {
209
+ id
210
+ name
211
+ }
212
+ }
213
+ total
214
+ }
215
+ }
216
+ `,
217
+ variables: {
218
+ filters,
219
+ pagination: { page, limit },
220
+ sortings
221
+ }
222
+ })
223
+
224
+ return {
225
+ total: response.data.responses.total || 0,
226
+ records: response.data.responses.items || []
227
+ }
228
+ }
229
+ }
230
+
231
+ window.customElements.define('assigned-list-page', AssignedListPage)
@@ -0,0 +1,239 @@
1
+ import '@operato/data-grist'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html } from 'lit'
5
+ import { connect } from 'pwa-helpers/connect-mixin'
6
+
7
+ import { client } from '@operato/graphql'
8
+ import { i18next, localize } from '@operato/i18n'
9
+ import { PageView, store } from '@operato/shell'
10
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
11
+ import { isMobileDevice } from '@operato/utils'
12
+
13
+ const ActivityUITypes = [
14
+ { display: '', value: '' },
15
+ { display: 'Generated', value: 'generated' },
16
+ { display: 'Board', value: 'board' },
17
+ { display: 'Page', value: 'page' },
18
+ { display: 'External URL', value: 'external' }
19
+ ]
20
+
21
+ const ActivityTypes = [
22
+ { display: '', value: '' },
23
+ { display: 'Task', value: 'task' },
24
+ { display: 'Service', value: 'service' },
25
+ { display: 'Send', value: 'send' },
26
+ { display: 'Receive', value: 'receive' },
27
+ { display: 'User', value: 'user' },
28
+ { display: 'Manual', value: 'manual' },
29
+ { display: 'BusinessRule', value: 'business-rule' },
30
+ { display: 'Script', value: 'script' },
31
+ { display: 'Subprocess', value: 'sub-process' },
32
+ { display: 'Call', value: 'call' }
33
+ ]
34
+
35
+ export class StarterListPage extends connect(store)(localize(i18next)(PageView)) {
36
+ static get properties() {
37
+ return {
38
+ gristConfig: Object,
39
+ mode: String
40
+ }
41
+ }
42
+
43
+ static get styles() {
44
+ return [
45
+ ScrollbarStyles,
46
+ CommonGristStyles,
47
+ css`
48
+ :host {
49
+ display: flex;
50
+
51
+ width: 100%;
52
+
53
+ --grid-record-emphasized-background-color: red;
54
+ --grid-record-emphasized-color: yellow;
55
+ }
56
+ `
57
+ ]
58
+ }
59
+
60
+ get context() {
61
+ return {
62
+ title: i18next.t('title.starter list'),
63
+ help: 'worklist/starter-list'
64
+ }
65
+ }
66
+
67
+ render() {
68
+ const mode = this.mode || (isMobileDevice() ? 'CARD' : 'GRID')
69
+
70
+ return html`
71
+ <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
72
+ <div slot="headroom">
73
+ <div id="filters">
74
+ <ox-filters-form></ox-filters-form>
75
+ </div>
76
+
77
+ <div id="sorters">
78
+ Sort
79
+ <mwc-icon
80
+ @click=${e => {
81
+ const target = e.currentTarget
82
+ this.renderRoot.querySelector('#sorter-control').open({
83
+ right: 0,
84
+ top: target.offsetTop + target.offsetHeight
85
+ })
86
+ }}
87
+ >expand_more</mwc-icon
88
+ >
89
+ <ox-popup id="sorter-control">
90
+ <ox-sorters-control> </ox-sorters-control>
91
+ </ox-popup>
92
+ </div>
93
+
94
+ <div id="modes">
95
+ <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
96
+ <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
97
+ <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
98
+ </div>
99
+ </div>
100
+ </ox-grist>
101
+ `
102
+ }
103
+
104
+ get grist() {
105
+ return this.renderRoot.querySelector('ox-grist')
106
+ }
107
+
108
+ async pageInitialized(lifecycle) {
109
+ this.gristConfig = {
110
+ list: {
111
+ thumbnail: 'uiSource',
112
+ fields: ['name', 'description'],
113
+ details: ['updatedAt']
114
+ },
115
+ columns: [
116
+ { type: 'gutter', gutterName: 'sequence' },
117
+ {
118
+ type: 'gutter',
119
+ gutterName: 'button',
120
+ name: 'start',
121
+ icon: 'play_arrow',
122
+ handlers: {
123
+ click: (columns, data, column, record, rowIndex) => {
124
+ const { id } = record
125
+ this.startActivityInstance(record.id, null)
126
+ }
127
+ }
128
+ },
129
+ {
130
+ type: 'string',
131
+ name: 'name',
132
+ header: i18next.t('field.name'),
133
+ filter: 'search',
134
+ sortable: true,
135
+ width: 150
136
+ },
137
+ {
138
+ type: 'string',
139
+ name: 'description',
140
+ header: i18next.t('field.description'),
141
+ filter: 'search',
142
+ width: 240
143
+ },
144
+ {
145
+ type: 'string',
146
+ name: 'activityType',
147
+ label: true,
148
+ header: i18next.t('field.activity-type'),
149
+ sortable: true,
150
+ filter: {
151
+ type: 'select',
152
+ options: ActivityTypes
153
+ },
154
+ width: 100
155
+ },
156
+ {
157
+ type: 'resource-object',
158
+ name: 'updater',
159
+ header: i18next.t('field.updater'),
160
+ sortable: true,
161
+ width: 120
162
+ },
163
+ {
164
+ type: 'datetime',
165
+ name: 'updatedAt',
166
+ header: i18next.t('field.updated_at'),
167
+ sortable: true,
168
+ width: 180
169
+ }
170
+ ],
171
+ rows: {
172
+ appendable: false
173
+ },
174
+ sorters: [
175
+ {
176
+ name: 'name'
177
+ }
178
+ ]
179
+ }
180
+ }
181
+
182
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
183
+ const response = await client.query({
184
+ query: gql`
185
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
186
+ responses: startableActivities(filters: $filters, pagination: $pagination, sortings: $sortings) {
187
+ items {
188
+ id
189
+ name
190
+ description
191
+ activityType
192
+ model
193
+ uiType
194
+ uiSource
195
+ updater {
196
+ id
197
+ name
198
+ }
199
+ updatedAt
200
+ }
201
+ total
202
+ }
203
+ }
204
+ `,
205
+ variables: {
206
+ filters,
207
+ pagination: { page, limit },
208
+ sortings
209
+ }
210
+ })
211
+
212
+ return {
213
+ total: response.data.responses.total || 0,
214
+ records: response.data.responses.items || []
215
+ }
216
+ }
217
+
218
+ async startActivityInstance(activityId, input) {
219
+ const response = await client.mutate({
220
+ mutation: gql`
221
+ mutation ($activityId: String!, $input: Object) {
222
+ startActivityInstance(activityId: $activityId, input: $input) {
223
+ name
224
+ }
225
+ }
226
+ `,
227
+ variables: {
228
+ activityId: activityId,
229
+ input: input
230
+ }
231
+ })
232
+
233
+ if (!response.errors) {
234
+ this.grist.fetch()
235
+ }
236
+ }
237
+ }
238
+
239
+ window.customElements.define('starter-list-page', StarterListPage)
@@ -0,0 +1,247 @@
1
+ import '@operato/data-grist'
2
+
3
+ import gql from 'graphql-tag'
4
+ import { css, html } from 'lit'
5
+ import { connect } from 'pwa-helpers/connect-mixin'
6
+
7
+ import { getRenderer } from '@operato/data-grist'
8
+ import { client } from '@operato/graphql'
9
+ import { i18next, localize } from '@operato/i18n'
10
+ import { PageView, store } from '@operato/shell'
11
+ import { CommonGristStyles, ScrollbarStyles } from '@operato/styles'
12
+ import { isMobileDevice } from '@operato/utils'
13
+
14
+ export class TodoListPage extends connect(store)(localize(i18next)(PageView)) {
15
+ static get properties() {
16
+ return {
17
+ gristConfig: Object,
18
+ mode: String
19
+ }
20
+ }
21
+
22
+ static get styles() {
23
+ return [
24
+ ScrollbarStyles,
25
+ CommonGristStyles,
26
+ css`
27
+ :host {
28
+ display: flex;
29
+
30
+ width: 100%;
31
+
32
+ --grid-record-emphasized-background-color: red;
33
+ --grid-record-emphasized-color: yellow;
34
+ }
35
+ `
36
+ ]
37
+ }
38
+
39
+ get context() {
40
+ return {
41
+ title: i18next.t('title.todo list'),
42
+ help: 'worklist/todo-list',
43
+ actions: []
44
+ }
45
+ }
46
+
47
+ render() {
48
+ const mode = this.mode || (isMobileDevice() ? 'LIST' : 'GRID')
49
+
50
+ return html`
51
+ <ox-grist .mode=${mode} .config=${this.gristConfig} .fetchHandler=${this.fetchHandler.bind(this)}>
52
+ <div slot="headroom">
53
+ <div id="filters">
54
+ <ox-filters-form></ox-filters-form>
55
+ </div>
56
+
57
+ <div id="sorters">
58
+ Sort
59
+ <mwc-icon
60
+ @click=${e => {
61
+ const target = e.currentTarget
62
+ this.renderRoot.querySelector('#sorter-control').open({
63
+ right: 0,
64
+ top: target.offsetTop + target.offsetHeight
65
+ })
66
+ }}
67
+ >expand_more</mwc-icon
68
+ >
69
+ <ox-popup id="sorter-control">
70
+ <ox-sorters-control> </ox-sorters-control>
71
+ </ox-popup>
72
+ </div>
73
+
74
+ <div id="modes">
75
+ <mwc-icon @click=${() => (this.mode = 'GRID')} ?active=${mode == 'GRID'}>grid_on</mwc-icon>
76
+ <mwc-icon @click=${() => (this.mode = 'LIST')} ?active=${mode == 'LIST'}>format_list_bulleted</mwc-icon>
77
+ <mwc-icon @click=${() => (this.mode = 'CARD')} ?active=${mode == 'CARD'}>apps</mwc-icon>
78
+ </div>
79
+ </div>
80
+ </ox-grist>
81
+ `
82
+ }
83
+
84
+ get grist() {
85
+ return this.renderRoot.querySelector('ox-grist')
86
+ }
87
+
88
+ async pageInitialized(lifecycle) {
89
+ this.gristConfig = {
90
+ list: {
91
+ thumbnail: 'uiSource',
92
+ fields: ['name', 'description'],
93
+ details: ['createdAt', 'due']
94
+ },
95
+ columns: [
96
+ { type: 'gutter', gutterName: 'sequence' },
97
+ {
98
+ type: 'gutter',
99
+ gutterName: 'button',
100
+ name: 'start',
101
+ icon: 'play_arrow',
102
+ handlers: {
103
+ click: (columns, data, column, record, rowIndex) => {
104
+ const { id } = record
105
+ this.openActivityInstance(record)
106
+ }
107
+ }
108
+ },
109
+ {
110
+ type: 'string',
111
+ name: 'name',
112
+ header: i18next.t('field.name'),
113
+ record: {
114
+ editable: false
115
+ },
116
+ filter: 'search',
117
+ sortable: true,
118
+ width: 150
119
+ },
120
+ {
121
+ type: 'string',
122
+ name: 'description',
123
+ header: i18next.t('field.description'),
124
+ record: {
125
+ editable: false
126
+ },
127
+ filter: 'search',
128
+ width: 200
129
+ },
130
+ {
131
+ type: 'string',
132
+ name: 'uiSource',
133
+ header: i18next.t('field.ui-source'),
134
+ record: {
135
+ editable: false,
136
+ renderer: function (value, column, record, rowIndex, field) {
137
+ const { uiType, uiSource } = record.activity || {}
138
+ var type = uiType !== 'board' ? 'string' : 'board'
139
+ return getRenderer(type)(uiSource, column, record, rowIndex, field)
140
+ }
141
+ },
142
+ width: 140,
143
+ hidden: true
144
+ },
145
+ {
146
+ type: 'resource-object',
147
+ name: 'creator',
148
+ header: i18next.t('field.creator'),
149
+ record: {
150
+ editable: false
151
+ },
152
+ sortable: true,
153
+ width: 120
154
+ },
155
+ {
156
+ type: 'datetime',
157
+ name: 'dueAt',
158
+ header: i18next.t('field.due-at'),
159
+ record: {
160
+ editable: false
161
+ },
162
+ sortable: true,
163
+ filter: {
164
+ type: 'date',
165
+ operator: 'between'
166
+ },
167
+ width: 180
168
+ },
169
+ {
170
+ type: 'datetime',
171
+ name: 'updatedAt',
172
+ header: i18next.t('field.updated_at'),
173
+ record: {
174
+ editable: false
175
+ },
176
+ sortable: true,
177
+ width: 180
178
+ },
179
+ {
180
+ type: 'datetime',
181
+ name: 'createdAt',
182
+ header: i18next.t('field.created_at'),
183
+ record: {
184
+ editable: false
185
+ },
186
+ sortable: true,
187
+ filter: 'between',
188
+ width: 180
189
+ }
190
+ ],
191
+ rows: {
192
+ appendable: false
193
+ },
194
+ sorters: [
195
+ {
196
+ name: 'name'
197
+ }
198
+ ]
199
+ }
200
+ }
201
+
202
+ async fetchHandler({ page, limit, sortings = [], filters = [] }) {
203
+ const response = await client.query({
204
+ query: gql`
205
+ query ($filters: [Filter!], $pagination: Pagination, $sortings: [Sorting!]) {
206
+ responses: activityInstances(filters: $filters, pagination: $pagination, sortings: $sortings) {
207
+ items {
208
+ id
209
+ name
210
+ description
211
+ input
212
+ activity {
213
+ activityType
214
+ uiType
215
+ uiSource
216
+ }
217
+ dueAt
218
+ updatedAt
219
+ createdAt
220
+ creator {
221
+ id
222
+ name
223
+ }
224
+ }
225
+ total
226
+ }
227
+ }
228
+ `,
229
+ variables: {
230
+ filters,
231
+ pagination: { page, limit },
232
+ sortings
233
+ }
234
+ })
235
+
236
+ return {
237
+ total: response.data.responses.total || 0,
238
+ records: response.data.responses.items || []
239
+ }
240
+ }
241
+
242
+ openActivityInstance(activityInstance) {
243
+ console.log('openActivityInstance', activityInstance)
244
+ }
245
+ }
246
+
247
+ window.customElements.define('todo-list-page', TodoListPage)