@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
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import '@operato/data-grist';
|
|
2
|
+
import gql from 'graphql-tag';
|
|
3
|
+
import { css, html, LitElement } from 'lit';
|
|
4
|
+
import { client } from '@operato/graphql';
|
|
5
|
+
import { i18next } from '@operato/i18n';
|
|
6
|
+
import { isMobileDevice } from '@operato/utils';
|
|
7
|
+
export class ActivityTemplateImporter extends LitElement {
|
|
8
|
+
static get properties() {
|
|
9
|
+
return {
|
|
10
|
+
columns: Object,
|
|
11
|
+
activityTemplates: Array
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
constructor() {
|
|
15
|
+
super();
|
|
16
|
+
this.columns = {
|
|
17
|
+
list: { fields: ['name', 'description'] },
|
|
18
|
+
pagination: { infinite: true },
|
|
19
|
+
columns: [
|
|
20
|
+
{
|
|
21
|
+
type: 'string',
|
|
22
|
+
name: 'name',
|
|
23
|
+
header: i18next.t('field.name'),
|
|
24
|
+
width: 150
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
type: 'string',
|
|
28
|
+
name: 'description',
|
|
29
|
+
header: i18next.t('field.description'),
|
|
30
|
+
width: 200
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
type: 'checkbox',
|
|
34
|
+
name: 'active',
|
|
35
|
+
header: i18next.t('field.active'),
|
|
36
|
+
width: 60
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
static get styles() {
|
|
42
|
+
return [
|
|
43
|
+
css `
|
|
44
|
+
:host {
|
|
45
|
+
display: flex;
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
|
|
48
|
+
background-color: #fff;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
ox-grist {
|
|
52
|
+
flex: 1;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.button-container {
|
|
56
|
+
display: flex;
|
|
57
|
+
margin-left: auto;
|
|
58
|
+
padding: var(--padding-default);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
mwc-button {
|
|
62
|
+
margin-left: var(--margin-default);
|
|
63
|
+
}
|
|
64
|
+
`
|
|
65
|
+
];
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return html `
|
|
69
|
+
<ox-grist
|
|
70
|
+
.mode=${isMobileDevice() ? 'LIST' : 'GRID'}
|
|
71
|
+
.config=${this.columns}
|
|
72
|
+
.data=${{
|
|
73
|
+
records: this.activityTemplates
|
|
74
|
+
}}
|
|
75
|
+
></ox-grist>
|
|
76
|
+
|
|
77
|
+
<div class="button-container">
|
|
78
|
+
<mwc-button raised @click="${this.save.bind(this)}">${i18next.t('button.save')}</mwc-button>
|
|
79
|
+
</div>
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
async save() {
|
|
83
|
+
var _a;
|
|
84
|
+
const response = await client.mutate({
|
|
85
|
+
mutation: gql `
|
|
86
|
+
mutation importActivityTemplates($activityTemplates: [ActivityTemplatePatch!]!) {
|
|
87
|
+
importActivityTemplates(activityTemplates: $activityTemplates)
|
|
88
|
+
}
|
|
89
|
+
`,
|
|
90
|
+
variables: { activityTemplates: this.activityTemplates }
|
|
91
|
+
});
|
|
92
|
+
if ((_a = response.error) === null || _a === void 0 ? void 0 : _a.length)
|
|
93
|
+
return;
|
|
94
|
+
this.dispatchEvent(new CustomEvent('imported'));
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
window.customElements.define('activity-template-importer', ActivityTemplateImporter);
|
|
98
|
+
//# sourceMappingURL=activity-template-importer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity-template-importer.js","sourceRoot":"","sources":["../../../client/pages/activity-template/activity-template-importer.js"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAA;AAE5B,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,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE/C,MAAM,OAAO,wBAAyB,SAAQ,UAAU;IACtD,MAAM,KAAK,UAAU;QACnB,OAAO;YACL,OAAO,EAAE,MAAM;YACf,iBAAiB,EAAE,KAAK;SACzB,CAAA;IACH,CAAC;IAED;QACE,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,OAAO,GAAG;YACb,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,MAAM,EAAE,aAAa,CAAC,EAAE;YACzC,UAAU,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;YAC9B,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,MAAM;oBACZ,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC;oBAC/B,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,QAAQ;oBACd,IAAI,EAAE,aAAa;oBACnB,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC;oBACtC,KAAK,EAAE,GAAG;iBACX;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,IAAI,EAAE,QAAQ;oBACd,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,cAAc,CAAC;oBACjC,KAAK,EAAE,EAAE;iBACV;aACF;SACF,CAAA;IACH,CAAC;IAED,MAAM,KAAK,MAAM;QACf,OAAO;YACL,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;OAqBF;SACF,CAAA;IACH,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;gBAEC,cAAc,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;kBAChC,IAAI,CAAC,OAAO;gBAEpB;YACE,OAAO,EAAE,IAAI,CAAC,iBAAiB;SAEnC;;;;qCAI6B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC;;KAEjF,CAAA;IACH,CAAC;IAED,KAAK,CAAC,IAAI;;QACR,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC;YACnC,QAAQ,EAAE,GAAG,CAAA;;;;OAIZ;YACD,SAAS,EAAE,EAAE,iBAAiB,EAAE,IAAI,CAAC,iBAAiB,EAAE;SACzD,CAAC,CAAA;QAEF,IAAI,MAAA,QAAQ,CAAC,KAAK,0CAAE,MAAM;YAAE,OAAM;QAElC,IAAI,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,CAAC,CAAA;IACjD,CAAC;CACF;AAED,MAAM,CAAC,cAAc,CAAC,MAAM,CAAC,4BAA4B,EAAE,wBAAwB,CAAC,CAAA","sourcesContent":["import '@operato/data-grist'\n\nimport gql from 'graphql-tag'\nimport { css, html, LitElement } from 'lit'\n\nimport { client } from '@operato/graphql'\nimport { i18next } from '@operato/i18n'\nimport { isMobileDevice } from '@operato/utils'\n\nexport class ActivityTemplateImporter extends LitElement {\n static get properties() {\n return {\n columns: Object,\n activityTemplates: Array\n }\n }\n\n constructor() {\n super()\n this.columns = {\n list: { fields: ['name', 'description'] },\n pagination: { infinite: true },\n columns: [\n {\n type: 'string',\n name: 'name',\n header: i18next.t('field.name'),\n width: 150\n },\n {\n type: 'string',\n name: 'description',\n header: i18next.t('field.description'),\n width: 200\n },\n {\n type: 'checkbox',\n name: 'active',\n header: i18next.t('field.active'),\n width: 60\n }\n ]\n }\n }\n\n static get styles() {\n return [\n css`\n :host {\n display: flex;\n flex-direction: column;\n\n background-color: #fff;\n }\n\n ox-grist {\n flex: 1;\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\n render() {\n return html`\n <ox-grist\n .mode=${isMobileDevice() ? 'LIST' : 'GRID'}\n .config=${this.columns}\n .data=${\n { \n records: this.activityTemplates \n }\n }\n ></ox-grist>\n\n <div class=\"button-container\">\n <mwc-button raised @click=\"${this.save.bind(this)}\">${i18next.t('button.save')}</mwc-button>\n </div>\n `\n }\n\n async save() {\n const response = await client.mutate({\n mutation: gql`\n mutation importActivityTemplates($activityTemplates: [ActivityTemplatePatch!]!) {\n importActivityTemplates(activityTemplates: $activityTemplates)\n }\n `,\n variables: { activityTemplates: this.activityTemplates }\n })\n\n if (response.error?.length) return\n\n this.dispatchEvent(new CustomEvent('imported'))\n }\n}\n\nwindow.customElements.define('activity-template-importer', ActivityTemplateImporter)\n"]}
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
declare const ActivityTemplateListPage_base: (new (...args: any[]) => {
|
|
2
|
+
_storeUnsubscribe: import("redux").Unsubscribe;
|
|
3
|
+
connectedCallback(): void;
|
|
4
|
+
disconnectedCallback(): void;
|
|
5
|
+
stateChanged(_state: unknown): void;
|
|
6
|
+
readonly isConnected: boolean;
|
|
7
|
+
}) & (new (...args: any[]) => import("lit").LitElement) & typeof PageView;
|
|
8
|
+
export class ActivityTemplateListPage extends ActivityTemplateListPage_base {
|
|
9
|
+
static get properties(): {
|
|
10
|
+
gristConfig: ObjectConstructor;
|
|
11
|
+
mode: StringConstructor;
|
|
12
|
+
};
|
|
13
|
+
static get styles(): import("lit").CSSResult[];
|
|
14
|
+
get context(): {
|
|
15
|
+
title: string;
|
|
16
|
+
help: string;
|
|
17
|
+
actions: {
|
|
18
|
+
icon: string;
|
|
19
|
+
emphasis: {
|
|
20
|
+
raised: boolean;
|
|
21
|
+
outlined: boolean;
|
|
22
|
+
dense: boolean;
|
|
23
|
+
danger: boolean;
|
|
24
|
+
};
|
|
25
|
+
title: string;
|
|
26
|
+
action: () => Promise<void>;
|
|
27
|
+
}[];
|
|
28
|
+
exportable: {
|
|
29
|
+
name: string;
|
|
30
|
+
data: () => Promise<any>;
|
|
31
|
+
};
|
|
32
|
+
importable: {
|
|
33
|
+
handler: (records: any) => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
};
|
|
36
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
37
|
+
mode: string | undefined;
|
|
38
|
+
get grist(): Element | null;
|
|
39
|
+
pageInitialized(lifecycle: any): Promise<void>;
|
|
40
|
+
gristConfig: {
|
|
41
|
+
list: {
|
|
42
|
+
thumbnail: string;
|
|
43
|
+
fields: string[];
|
|
44
|
+
details: string[];
|
|
45
|
+
};
|
|
46
|
+
columns: ({
|
|
47
|
+
type: string;
|
|
48
|
+
gutterName: string;
|
|
49
|
+
multiple?: undefined;
|
|
50
|
+
icon?: undefined;
|
|
51
|
+
handlers?: undefined;
|
|
52
|
+
name?: undefined;
|
|
53
|
+
header?: undefined;
|
|
54
|
+
record?: undefined;
|
|
55
|
+
filter?: undefined;
|
|
56
|
+
sortable?: undefined;
|
|
57
|
+
width?: undefined;
|
|
58
|
+
label?: undefined;
|
|
59
|
+
} | {
|
|
60
|
+
type: string;
|
|
61
|
+
gutterName: string;
|
|
62
|
+
multiple: boolean;
|
|
63
|
+
icon?: undefined;
|
|
64
|
+
handlers?: undefined;
|
|
65
|
+
name?: undefined;
|
|
66
|
+
header?: undefined;
|
|
67
|
+
record?: undefined;
|
|
68
|
+
filter?: undefined;
|
|
69
|
+
sortable?: undefined;
|
|
70
|
+
width?: undefined;
|
|
71
|
+
label?: undefined;
|
|
72
|
+
} | {
|
|
73
|
+
type: string;
|
|
74
|
+
gutterName: string;
|
|
75
|
+
icon: string;
|
|
76
|
+
handlers: {
|
|
77
|
+
click: (columns: any, data: any, column: any, record: any, rowIndex: any) => void;
|
|
78
|
+
};
|
|
79
|
+
multiple?: undefined;
|
|
80
|
+
name?: undefined;
|
|
81
|
+
header?: undefined;
|
|
82
|
+
record?: undefined;
|
|
83
|
+
filter?: undefined;
|
|
84
|
+
sortable?: undefined;
|
|
85
|
+
width?: undefined;
|
|
86
|
+
label?: undefined;
|
|
87
|
+
} | {
|
|
88
|
+
type: string;
|
|
89
|
+
name: string;
|
|
90
|
+
header: string;
|
|
91
|
+
record: {
|
|
92
|
+
editable: boolean;
|
|
93
|
+
options?: undefined;
|
|
94
|
+
editor?: undefined;
|
|
95
|
+
renderer?: undefined;
|
|
96
|
+
};
|
|
97
|
+
filter: string;
|
|
98
|
+
sortable: boolean;
|
|
99
|
+
width: number;
|
|
100
|
+
gutterName?: undefined;
|
|
101
|
+
multiple?: undefined;
|
|
102
|
+
icon?: undefined;
|
|
103
|
+
handlers?: undefined;
|
|
104
|
+
label?: undefined;
|
|
105
|
+
} | {
|
|
106
|
+
type: string;
|
|
107
|
+
name: string;
|
|
108
|
+
header: string;
|
|
109
|
+
record: {
|
|
110
|
+
editable: boolean;
|
|
111
|
+
options?: undefined;
|
|
112
|
+
editor?: undefined;
|
|
113
|
+
renderer?: undefined;
|
|
114
|
+
};
|
|
115
|
+
filter: string;
|
|
116
|
+
width: number;
|
|
117
|
+
gutterName?: undefined;
|
|
118
|
+
multiple?: undefined;
|
|
119
|
+
icon?: undefined;
|
|
120
|
+
handlers?: undefined;
|
|
121
|
+
sortable?: undefined;
|
|
122
|
+
label?: undefined;
|
|
123
|
+
} | {
|
|
124
|
+
type: string;
|
|
125
|
+
name: string;
|
|
126
|
+
label: boolean;
|
|
127
|
+
header: string;
|
|
128
|
+
record: {
|
|
129
|
+
editable: boolean;
|
|
130
|
+
options: {
|
|
131
|
+
display: string;
|
|
132
|
+
value: string;
|
|
133
|
+
}[];
|
|
134
|
+
editor?: undefined;
|
|
135
|
+
renderer?: undefined;
|
|
136
|
+
};
|
|
137
|
+
sortable: boolean;
|
|
138
|
+
width: number;
|
|
139
|
+
gutterName?: undefined;
|
|
140
|
+
multiple?: undefined;
|
|
141
|
+
icon?: undefined;
|
|
142
|
+
handlers?: undefined;
|
|
143
|
+
filter?: undefined;
|
|
144
|
+
} | {
|
|
145
|
+
type: string;
|
|
146
|
+
name: string;
|
|
147
|
+
header: string;
|
|
148
|
+
record: {
|
|
149
|
+
editable: boolean;
|
|
150
|
+
options?: undefined;
|
|
151
|
+
editor?: undefined;
|
|
152
|
+
renderer?: undefined;
|
|
153
|
+
};
|
|
154
|
+
width: number;
|
|
155
|
+
gutterName?: undefined;
|
|
156
|
+
multiple?: undefined;
|
|
157
|
+
icon?: undefined;
|
|
158
|
+
handlers?: undefined;
|
|
159
|
+
filter?: undefined;
|
|
160
|
+
sortable?: undefined;
|
|
161
|
+
label?: undefined;
|
|
162
|
+
} | {
|
|
163
|
+
type: string;
|
|
164
|
+
name: string;
|
|
165
|
+
label: boolean;
|
|
166
|
+
header: string;
|
|
167
|
+
record: {
|
|
168
|
+
editable: boolean;
|
|
169
|
+
options: {
|
|
170
|
+
display: string;
|
|
171
|
+
value: string;
|
|
172
|
+
}[];
|
|
173
|
+
editor?: undefined;
|
|
174
|
+
renderer?: undefined;
|
|
175
|
+
};
|
|
176
|
+
width: number;
|
|
177
|
+
gutterName?: undefined;
|
|
178
|
+
multiple?: undefined;
|
|
179
|
+
icon?: undefined;
|
|
180
|
+
handlers?: undefined;
|
|
181
|
+
filter?: undefined;
|
|
182
|
+
sortable?: undefined;
|
|
183
|
+
} | {
|
|
184
|
+
type: string;
|
|
185
|
+
name: string;
|
|
186
|
+
header: string;
|
|
187
|
+
record: {
|
|
188
|
+
editable: boolean;
|
|
189
|
+
editor: (value: any, column: any, record: any, rowIndex: any, field: any) => import("@operato/data-grist").OxGristEditor;
|
|
190
|
+
renderer: (value: any, column: any, record: any, rowIndex: any, field: any) => string | void | import("lit-html").TemplateResult<1 | 2> | import("@operato/data-grist/dist/src/renderers/ox-grist-renderer.js").OxGristRenderer;
|
|
191
|
+
options?: undefined;
|
|
192
|
+
};
|
|
193
|
+
width: number;
|
|
194
|
+
gutterName?: undefined;
|
|
195
|
+
multiple?: undefined;
|
|
196
|
+
icon?: undefined;
|
|
197
|
+
handlers?: undefined;
|
|
198
|
+
filter?: undefined;
|
|
199
|
+
sortable?: undefined;
|
|
200
|
+
label?: undefined;
|
|
201
|
+
} | {
|
|
202
|
+
type: string;
|
|
203
|
+
name: string;
|
|
204
|
+
label: boolean;
|
|
205
|
+
header: string;
|
|
206
|
+
record: {
|
|
207
|
+
editable: boolean;
|
|
208
|
+
options?: undefined;
|
|
209
|
+
editor?: undefined;
|
|
210
|
+
renderer?: undefined;
|
|
211
|
+
};
|
|
212
|
+
sortable: boolean;
|
|
213
|
+
width: number;
|
|
214
|
+
gutterName?: undefined;
|
|
215
|
+
multiple?: undefined;
|
|
216
|
+
icon?: undefined;
|
|
217
|
+
handlers?: undefined;
|
|
218
|
+
filter?: undefined;
|
|
219
|
+
} | {
|
|
220
|
+
type: string;
|
|
221
|
+
name: string;
|
|
222
|
+
header: string;
|
|
223
|
+
record: {
|
|
224
|
+
editable: boolean;
|
|
225
|
+
options?: undefined;
|
|
226
|
+
editor?: undefined;
|
|
227
|
+
renderer?: undefined;
|
|
228
|
+
};
|
|
229
|
+
sortable: boolean;
|
|
230
|
+
width: number;
|
|
231
|
+
gutterName?: undefined;
|
|
232
|
+
multiple?: undefined;
|
|
233
|
+
icon?: undefined;
|
|
234
|
+
handlers?: undefined;
|
|
235
|
+
filter?: undefined;
|
|
236
|
+
label?: undefined;
|
|
237
|
+
})[];
|
|
238
|
+
rows: {
|
|
239
|
+
selectable: {
|
|
240
|
+
multiple: boolean;
|
|
241
|
+
};
|
|
242
|
+
};
|
|
243
|
+
sorters: {
|
|
244
|
+
name: string;
|
|
245
|
+
}[];
|
|
246
|
+
} | undefined;
|
|
247
|
+
pageUpdated(changes: any, lifecycle: any): Promise<void>;
|
|
248
|
+
fetchHandler({ page, limit, sortings, filters }: {
|
|
249
|
+
page: any;
|
|
250
|
+
limit: any;
|
|
251
|
+
sortings?: any[] | undefined;
|
|
252
|
+
filters?: any[] | undefined;
|
|
253
|
+
}): Promise<{
|
|
254
|
+
total: any;
|
|
255
|
+
records: any;
|
|
256
|
+
}>;
|
|
257
|
+
_deleteActivityTemplate(): Promise<void>;
|
|
258
|
+
_updateActivityTemplate(): Promise<void>;
|
|
259
|
+
exportHandler(): Promise<any>;
|
|
260
|
+
importHandler(records: any): Promise<void>;
|
|
261
|
+
}
|
|
262
|
+
import { PageView } from "@operato/shell/page-view.js";
|
|
263
|
+
export {};
|