@valtimo/dashboard 4.15.2-next-main.8

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.
@@ -0,0 +1,214 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@ngx-translate/core'), require('@valtimo/context'), require('@angular/router'), require('@valtimo/task'), require('moment'), require('rxjs/operators'), require('rxjs'), require('@angular/common'), require('@ngx-translate/http-loader'), require('@valtimo/security'), require('@valtimo/contract'), require('@valtimo/components'), require('@angular/common/http')) :
3
+ typeof define === 'function' && define.amd ? define('@valtimo/dashboard', ['exports', '@angular/core', '@ngx-translate/core', '@valtimo/context', '@angular/router', '@valtimo/task', 'moment', 'rxjs/operators', 'rxjs', '@angular/common', '@ngx-translate/http-loader', '@valtimo/security', '@valtimo/contract', '@valtimo/components', '@angular/common/http'], factory) :
4
+ (global = global || self, factory((global.valtimo = global.valtimo || {}, global.valtimo.dashboard = {}), global.ng.core, global.core$1, global.context, global.ng.router, global.task, global.moment, global.rxjs.operators, global.rxjs, global.ng.common, global.httpLoader, global.security, global.contract, global.components, global.ng.common.http));
5
+ }(this, (function (exports, core, core$1, context, router, task, moment_, operators, rxjs, common, httpLoader, security, contract, components, http) { 'use strict';
6
+
7
+ /*
8
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
9
+ *
10
+ * Licensed under EUPL, Version 1.2 (the "License");
11
+ * you may not use this file except in compliance with the License.
12
+ * You may obtain a copy of the License at
13
+ *
14
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
15
+ *
16
+ * Unless required by applicable law or agreed to in writing, software
17
+ * distributed under the License is distributed on an "AS IS" basis,
18
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ * See the License for the specific language governing permissions and
20
+ * limitations under the License.
21
+ */
22
+ var moment = moment_;
23
+ moment.locale(localStorage.getItem('langKey') || '');
24
+ moment.defaultFormat = 'DD MMM YYYY HH:mm';
25
+ var DashboardComponent = /** @class */ (function () {
26
+ function DashboardComponent(router, contextService, taskService, route, translate) {
27
+ this.router = router;
28
+ this.contextService = contextService;
29
+ this.taskService = taskService;
30
+ this.route = route;
31
+ this.translate = translate;
32
+ this.openTaskFields = [
33
+ {
34
+ key: 'created',
35
+ label: 'Created'
36
+ },
37
+ {
38
+ key: 'name',
39
+ label: 'Name'
40
+ },
41
+ {
42
+ key: 'valtimoAssignee.fullName',
43
+ label: 'Assignee'
44
+ }
45
+ ];
46
+ this.loading$ = new rxjs.BehaviorSubject(true);
47
+ }
48
+ DashboardComponent.prototype.ngOnInit = function () {
49
+ this.getOpenTasks();
50
+ };
51
+ DashboardComponent.prototype.getOpenTasks = function () {
52
+ var _this = this;
53
+ this.taskService.getTasks().subscribe(function (response) {
54
+ _this.openTasks = response;
55
+ _this.openTasks.map(function (task) {
56
+ task.created = moment(task.created).format('DD MMM YYYY HH:mm');
57
+ });
58
+ _this.checkRouteForTaskId(response);
59
+ _this.loading$.next(false);
60
+ });
61
+ };
62
+ DashboardComponent.prototype.rowOpenTaskClick = function (task) {
63
+ if (!task.endTime) {
64
+ this.taskDetail.openTaskDetails(task);
65
+ }
66
+ };
67
+ DashboardComponent.prototype.checkRouteForTaskId = function (tasks) {
68
+ var _this = this;
69
+ this.route.queryParams.pipe(operators.take(1))
70
+ .subscribe(function (params) {
71
+ var taskId = params === null || params === void 0 ? void 0 : params.taskId;
72
+ var findTaskFromId = tasks.find(function (task) { return task.id === taskId; });
73
+ if (findTaskFromId) {
74
+ _this.rowOpenTaskClick(findTaskFromId);
75
+ }
76
+ });
77
+ };
78
+ return DashboardComponent;
79
+ }());
80
+ DashboardComponent.decorators = [
81
+ { type: core.Component, args: [{
82
+ selector: 'valtimo-dashboard',
83
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"px-3\">\n <div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{ openTasks?.length }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
84
+ styles: [""]
85
+ },] }
86
+ ];
87
+ DashboardComponent.ctorParameters = function () { return [
88
+ { type: router.Router },
89
+ { type: context.ContextService },
90
+ { type: task.TaskService },
91
+ { type: router.ActivatedRoute },
92
+ { type: core$1.TranslateService }
93
+ ]; };
94
+ DashboardComponent.propDecorators = {
95
+ taskDetail: [{ type: core.ViewChild, args: ['taskDetail',] }]
96
+ };
97
+
98
+ /*
99
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
100
+ *
101
+ * Licensed under EUPL, Version 1.2 (the "License");
102
+ * you may not use this file except in compliance with the License.
103
+ * You may obtain a copy of the License at
104
+ *
105
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
106
+ *
107
+ * Unless required by applicable law or agreed to in writing, software
108
+ * distributed under the License is distributed on an "AS IS" basis,
109
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
110
+ * See the License for the specific language governing permissions and
111
+ * limitations under the License.
112
+ */
113
+ var ɵ0 = { title: 'Dashboard', roles: [contract.ROLE_USER] };
114
+ var routes = [
115
+ {
116
+ path: '',
117
+ component: DashboardComponent,
118
+ canActivate: [security.AuthGuardService],
119
+ data: ɵ0
120
+ }
121
+ ];
122
+ var DashboardRoutingModule = /** @class */ (function () {
123
+ function DashboardRoutingModule() {
124
+ }
125
+ return DashboardRoutingModule;
126
+ }());
127
+ DashboardRoutingModule.decorators = [
128
+ { type: core.NgModule, args: [{
129
+ declarations: [],
130
+ imports: [
131
+ common.CommonModule,
132
+ router.RouterModule.forChild(routes)
133
+ ],
134
+ exports: [router.RouterModule]
135
+ },] }
136
+ ];
137
+
138
+ /*
139
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
140
+ *
141
+ * Licensed under EUPL, Version 1.2 (the "License");
142
+ * you may not use this file except in compliance with the License.
143
+ * You may obtain a copy of the License at
144
+ *
145
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
146
+ *
147
+ * Unless required by applicable law or agreed to in writing, software
148
+ * distributed under the License is distributed on an "AS IS" basis,
149
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
150
+ * See the License for the specific language governing permissions and
151
+ * limitations under the License.
152
+ */
153
+ // AoT requires an exported function for factories
154
+ function HttpLoaderFactory(httpClient) {
155
+ return new httpLoader.TranslateHttpLoader(httpClient);
156
+ }
157
+ var DashboardModule = /** @class */ (function () {
158
+ function DashboardModule() {
159
+ }
160
+ return DashboardModule;
161
+ }());
162
+ DashboardModule.decorators = [
163
+ { type: core.NgModule, args: [{
164
+ declarations: [DashboardComponent],
165
+ imports: [
166
+ common.CommonModule,
167
+ DashboardRoutingModule,
168
+ components.WidgetModule,
169
+ components.ListModule,
170
+ components.BpmnJsDiagramModule,
171
+ core$1.TranslateModule.forRoot({
172
+ loader: {
173
+ provide: core$1.TranslateLoader,
174
+ useFactory: HttpLoaderFactory,
175
+ deps: [http.HttpClient]
176
+ }
177
+ }),
178
+ components.AlertModule,
179
+ task.TaskModule,
180
+ components.SpinnerModule
181
+ ],
182
+ exports: [DashboardComponent]
183
+ },] }
184
+ ];
185
+
186
+ /*
187
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
188
+ *
189
+ * Licensed under EUPL, Version 1.2 (the "License");
190
+ * you may not use this file except in compliance with the License.
191
+ * You may obtain a copy of the License at
192
+ *
193
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
194
+ *
195
+ * Unless required by applicable law or agreed to in writing, software
196
+ * distributed under the License is distributed on an "AS IS" basis,
197
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
198
+ * See the License for the specific language governing permissions and
199
+ * limitations under the License.
200
+ */
201
+
202
+ /**
203
+ * Generated bundle index. Do not edit.
204
+ */
205
+
206
+ exports.DashboardComponent = DashboardComponent;
207
+ exports.DashboardModule = DashboardModule;
208
+ exports.HttpLoaderFactory = HttpLoaderFactory;
209
+ exports.ɵa = DashboardRoutingModule;
210
+
211
+ Object.defineProperty(exports, '__esModule', { value: true });
212
+
213
+ })));
214
+ //# sourceMappingURL=valtimo-dashboard.umd.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-dashboard.umd.js","sources":["../../../../projects/valtimo/dashboard/src/lib/dashboard.component.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard-routing.module.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard.module.ts","../../../../projects/valtimo/dashboard/src/public_api.ts","../../../../projects/valtimo/dashboard/src/valtimo-dashboard.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit, ViewChild} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ContextService } from '@valtimo/context';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport { TaskDetailModalComponent, TaskService } from '@valtimo/task';\nimport * as moment_ from 'moment';\nimport {take} from 'rxjs/operators';\nimport {Task} from '@valtimo/contract';\nimport {BehaviorSubject} from 'rxjs';\nimport {NgxSpinnerService} from 'ngx-spinner';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css']\n})\nexport class DashboardComponent implements OnInit {\n public processDefinitions: Array<any>;\n public openTasks: Array<any>;\n public openTaskFields = [\n {\n key: 'created',\n label: 'Created'\n },\n {\n key: 'name',\n label: 'Name'\n },\n {\n key: 'valtimoAssignee.fullName',\n label: 'Assignee'\n }\n ];\n @ViewChild('taskDetail') taskDetail: TaskDetailModalComponent;\n\n loading$ = new BehaviorSubject<boolean>(true);\n\n constructor(\n private router: Router,\n private contextService: ContextService,\n private taskService: TaskService,\n private readonly route: ActivatedRoute,\n public translate: TranslateService,\n ) {\n }\n\n ngOnInit() {\n this.getOpenTasks();\n }\n\n public getOpenTasks() {\n this.taskService.getTasks().subscribe((response) => {\n this.openTasks = response;\n this.openTasks.map((task) => {\n task.created = moment(task.created).format('DD MMM YYYY HH:mm');\n });\n this.checkRouteForTaskId(response);\n this.loading$.next(false);\n });\n }\n\n public rowOpenTaskClick(task) {\n if (!task.endTime) {\n this.taskDetail.openTaskDetails(task);\n }\n }\n\n private checkRouteForTaskId(tasks: Array<Task>): void {\n this.route.queryParams.pipe(take(1))\n .subscribe((params) => {\n const taskId = params?.taskId;\n const findTaskFromId = tasks.find((task) => task.id === taskId);\n\n if (findTaskFromId) {\n this.rowOpenTaskClick(findTaskFromId);\n }\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {DashboardComponent} from './dashboard.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dashboard', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes)\n ],\n exports: [RouterModule]\n})\nexport class DashboardRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {TranslateLoader, TranslateModule} from '@ngx-translate/core';\nimport {TranslateHttpLoader} from '@ngx-translate/http-loader';\nimport {DashboardComponent} from './dashboard.component';\nimport {DashboardRoutingModule} from './dashboard-routing.module';\nimport {AlertModule, BpmnJsDiagramModule, ListModule, SpinnerModule, WidgetModule} from '@valtimo/components';\nimport {HttpClient} from '@angular/common/http';\nimport {TaskModule} from '@valtimo/task';\n\n// AoT requires an exported function for factories\nexport function HttpLoaderFactory(httpClient: HttpClient) {\n return new TranslateHttpLoader(httpClient);\n}\n\n@NgModule({\n declarations: [DashboardComponent],\n imports: [\n CommonModule,\n DashboardRoutingModule,\n WidgetModule,\n ListModule,\n BpmnJsDiagramModule,\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient]\n }\n }),\n AlertModule,\n TaskModule,\n SpinnerModule\n ],\n exports: [DashboardComponent]\n})\nexport class DashboardModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of dashboard\n */\n\nexport * from './lib/dashboard.component';\nexport * from './lib/dashboard.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {DashboardRoutingModule as ɵa} from './lib/dashboard-routing.module';"],"names":["BehaviorSubject","take","Component","Router","ContextService","TaskService","ActivatedRoute","TranslateService","ViewChild","ROLE_USER","AuthGuardService","NgModule","CommonModule","RouterModule","TranslateHttpLoader","WidgetModule","ListModule","BpmnJsDiagramModule","TranslateModule","TranslateLoader","HttpClient","AlertModule","TaskModule","SpinnerModule"],"mappings":";;;;;;IAAA;;;;;;;;;;;;;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E,CAACA,mBAAY,CAAC;iBACxB;;;ICvCD;;;;;;;;;;;;;;;IA0BA;aACgB,iBAAiB,CAAC,UAAsB;QACtD,OAAO,IAAIC,8BAAmB,CAAC,UAAU,CAAC,CAAC;IAC7C,CAAC;;QAuBD;;;;;gBArBCH,aAAQ,SAAC;oBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;oBAChC,OAAO,EAAE;wBACLC,mBAAY;wBACZ,sBAAsB;wBACtBG,uBAAY;wBACZC,qBAAU;wBACVC,8BAAmB;wBACnBC,sBAAe,CAAC,OAAO,CAAC;4BACpB,MAAM,EAAE;gCACJ,OAAO,EAAEC,sBAAe;gCACxB,UAAU,EAAE,iBAAiB;gCAC7B,IAAI,EAAE,CAACC,eAAU,CAAC;6BACrB;yBACJ,CAAC;wBACFC,sBAAW;wBACXC,eAAU;wBACVC,wBAAa;qBAChB;oBACH,OAAO,EAAE,CAAC,kBAAkB,CAAC;iBAC9B;;;ICnDD;;;;;;;;;;;;;;;;ICAA;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@angular/core"),require("@ngx-translate/core"),require("@valtimo/context"),require("@angular/router"),require("@valtimo/task"),require("moment"),require("rxjs/operators"),require("rxjs"),require("@angular/common"),require("@ngx-translate/http-loader"),require("@valtimo/security"),require("@valtimo/contract"),require("@valtimo/components"),require("@angular/common/http")):"function"==typeof define&&define.amd?define("@valtimo/dashboard",["exports","@angular/core","@ngx-translate/core","@valtimo/context","@angular/router","@valtimo/task","moment","rxjs/operators","rxjs","@angular/common","@ngx-translate/http-loader","@valtimo/security","@valtimo/contract","@valtimo/components","@angular/common/http"],t):t(((e=e||self).valtimo=e.valtimo||{},e.valtimo.dashboard={}),e.ng.core,e.core$1,e.context,e.ng.router,e.task,e.moment,e.rxjs.operators,e.rxjs,e.ng.common,e.httpLoader,e.security,e.contract,e.components,e.ng.common.http)}(this,(function(e,t,n,o,a,r,i,s,l,c,u,d,p,m,g){"use strict";var h=i;h.locale(localStorage.getItem("langKey")||""),h.defaultFormat="DD MMM YYYY HH:mm";var v=function(){function e(e,t,n,o,a){this.router=e,this.contextService=t,this.taskService=n,this.route=o,this.translate=a,this.openTaskFields=[{key:"created",label:"Created"},{key:"name",label:"Name"},{key:"valtimoAssignee.fullName",label:"Assignee"}],this.loading$=new l.BehaviorSubject(!0)}return e.prototype.ngOnInit=function(){this.getOpenTasks()},e.prototype.getOpenTasks=function(){var e=this;this.taskService.getTasks().subscribe((function(t){e.openTasks=t,e.openTasks.map((function(e){e.created=h(e.created).format("DD MMM YYYY HH:mm")})),e.checkRouteForTaskId(t),e.loading$.next(!1)}))},e.prototype.rowOpenTaskClick=function(e){e.endTime||this.taskDetail.openTaskDetails(e)},e.prototype.checkRouteForTaskId=function(e){var t=this;this.route.queryParams.pipe(s.take(1)).subscribe((function(n){var o=null==n?void 0:n.taskId,a=e.find((function(e){return e.id===o}));a&&t.rowOpenTaskClick(a)}))},e}();v.decorators=[{type:t.Component,args:[{selector:"valtimo-dashboard",template:'\x3c!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the "License");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an "AS IS" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n --\x3e\n\n<div class="px-3">\n <div class="main-content container-fluid" *ngIf="{loading: loading$ | async} as obs">\n <h4 class="title">\n {{ \'dashboard.openTasks.title\' | translate }}\n <sup *ngIf="obs.loading === false" class="ml-1 badge badge-pill badge-primary">{{ openTasks?.length }}</sup>\n </h4>\n <ng-container *ngIf="obs.loading === false; else loading">\n <valtimo-widget>\n <valtimo-list\n [items]="openTasks"\n [fields]="openTaskFields"\n (rowClicked)="rowOpenTaskClick($event)"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)="getOpenTasks()"\n (assignmentOfTaskChanged)="getOpenTasks()"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n',styles:[""]}]}],v.ctorParameters=function(){return[{type:a.Router},{type:o.ContextService},{type:r.TaskService},{type:a.ActivatedRoute},{type:n.TranslateService}]},v.propDecorators={taskDetail:[{type:t.ViewChild,args:["taskDetail"]}]};var f={title:"Dashboard",roles:[p.ROLE_USER]},k=[{path:"",component:v,canActivate:[d.AuthGuardService],data:f}],y=function(){};function b(e){return new u.TranslateHttpLoader(e)}y.decorators=[{type:t.NgModule,args:[{declarations:[],imports:[c.CommonModule,a.RouterModule.forChild(k)],exports:[a.RouterModule]}]}];var T=function(){};T.decorators=[{type:t.NgModule,args:[{declarations:[v],imports:[c.CommonModule,y,m.WidgetModule,m.ListModule,m.BpmnJsDiagramModule,n.TranslateModule.forRoot({loader:{provide:n.TranslateLoader,useFactory:b,deps:[g.HttpClient]}}),m.AlertModule,r.TaskModule,m.SpinnerModule],exports:[v]}]}],e.DashboardComponent=v,e.DashboardModule=T,e.HttpLoaderFactory=b,e.ɵa=y,Object.defineProperty(e,"__esModule",{value:!0})}));
2
+ //# sourceMappingURL=valtimo-dashboard.umd.min.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../projects/valtimo/dashboard/src/lib/dashboard.component.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard-routing.module.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard.module.ts"],"names":["moment","moment_","locale","localStorage","getItem","defaultFormat","DashboardComponent","router","contextService","taskService","route","translate","this","openTaskFields","key","label","loading$","BehaviorSubject","prototype","ngOnInit","getOpenTasks","_this","getTasks","subscribe","response","openTasks","map","task","created","format","checkRouteForTaskId","next","rowOpenTaskClick","endTime","taskDetail","openTaskDetails","tasks","queryParams","pipe","take","params","taskId","findTaskFromId","find","id","Component","args","selector","template","Router","ContextService","TaskService","ActivatedRoute","TranslateService","ViewChild","title","roles","ROLE_USER","routes","path","component","canActivate","AuthGuardService","data","ɵ0","HttpLoaderFactory","httpClient","TranslateHttpLoader","NgModule","declarations","imports","CommonModule","RouterModule","forChild","exports","DashboardRoutingModule","WidgetModule","ListModule","BpmnJsDiagramModule","TranslateModule","forRoot","loader","provide","TranslateLoader","useFactory","deps","HttpClient","AlertModule","TaskModule","SpinnerModule"],"mappings":"sjCA2BA,IAAMA,EAASC,EACfD,EAAOE,OAAOC,aAAaC,QAAQ,YAAc,IACjDJ,EAAOK,cAAgB,qCA4BrB,SAAAC,EACUC,EACAC,EACAC,EACSC,EACVC,GAJCC,KAAAL,OAAAA,EACAK,KAAAJ,eAAAA,EACAI,KAAAH,YAAAA,EACSG,KAAAF,MAAAA,EACVE,KAAAD,UAAAA,EAvBFC,KAAAC,eAAiB,CACtB,CACEC,IAAK,UACLC,MAAO,WAET,CACED,IAAK,OACLC,MAAO,QAET,CACED,IAAK,2BACLC,MAAO,aAKXH,KAAAI,SAAW,IAAIC,EAAAA,iBAAyB,UAWxCX,EAAAY,UAAAC,SAAA,WACEP,KAAKQ,gBAGAd,EAAAY,UAAAE,aAAA,WAAA,IAAAC,EAAAT,KACLA,KAAKH,YAAYa,WAAWC,WAAU,SAACC,GACrCH,EAAKI,UAAYD,EACjBH,EAAKI,UAAUC,KAAI,SAACC,GAClBA,EAAKC,QAAU5B,EAAO2B,EAAKC,SAASC,OAAO,wBAE7CR,EAAKS,oBAAoBN,GACzBH,EAAKL,SAASe,MAAK,OAIhBzB,EAAAY,UAAAc,iBAAA,SAAiBL,GACjBA,EAAKM,SACRrB,KAAKsB,WAAWC,gBAAgBR,IAI5BrB,EAAAY,UAAAY,oBAAA,SAAoBM,GAApB,IAAAf,EAAAT,KACNA,KAAKF,MAAM2B,YAAYC,KAAKC,EAAAA,KAAK,IAC9BhB,WAAU,SAACiB,GACV,IAAMC,EAASD,MAAAA,OAAM,EAANA,EAAQC,OACjBC,EAAiBN,EAAMO,MAAK,SAAChB,GAAS,OAAAA,EAAKiB,KAAOH,KAEpDC,GACFrB,EAAKW,iBAAiBU,gCA/D/BG,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,oBACVC,SAAA,ukDAdsBC,EAAAA,cADfC,EAAAA,sBAE0BC,EAAAA,mBAD3BC,EAAAA,sBAFCC,EAAAA,wDAoCNC,EAAAA,UAASR,KAAA,CAAC,uBCzBH,CAACS,MAAO,YAAaC,MAAO,CAACC,EAAAA,YALjCC,EAAiB,CACrB,CACEC,KAAM,GACNC,UAAWtD,EACXuD,YAAa,CAACC,EAAAA,kBACdC,KAAIC,MAYR,sBCbgBC,EAAkBC,GAChC,OAAO,IAAIC,EAAAA,oBAAoBD,uBDIhCE,EAAAA,SAAQtB,KAAA,CAAC,CACRuB,aAAc,GACdC,QAAS,CACPC,EAAAA,aACAC,EAAAA,aAAaC,SAASf,IAExBgB,QAAS,CAACF,EAAAA,wBCcZ,iCArBCJ,EAAAA,SAAQtB,KAAA,CAAC,CACRuB,aAAc,CAAC/D,GACbgE,QAAS,CACLC,EAAAA,aACAI,EACAC,EAAAA,aACAC,EAAAA,WACAC,EAAAA,oBACAC,EAAAA,gBAAgBC,QAAQ,CACpBC,OAAQ,CACJC,QAASC,EAAAA,gBACTC,WAAYnB,EACZoB,KAAM,CAACC,EAAAA,eAGfC,EAAAA,YACAC,EAAAA,WACAC,EAAAA,eAENf,QAAS,CAACpE","sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit, ViewChild} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ContextService } from '@valtimo/context';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport { TaskDetailModalComponent, TaskService } from '@valtimo/task';\nimport * as moment_ from 'moment';\nimport {take} from 'rxjs/operators';\nimport {Task} from '@valtimo/contract';\nimport {BehaviorSubject} from 'rxjs';\nimport {NgxSpinnerService} from 'ngx-spinner';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css']\n})\nexport class DashboardComponent implements OnInit {\n public processDefinitions: Array<any>;\n public openTasks: Array<any>;\n public openTaskFields = [\n {\n key: 'created',\n label: 'Created'\n },\n {\n key: 'name',\n label: 'Name'\n },\n {\n key: 'valtimoAssignee.fullName',\n label: 'Assignee'\n }\n ];\n @ViewChild('taskDetail') taskDetail: TaskDetailModalComponent;\n\n loading$ = new BehaviorSubject<boolean>(true);\n\n constructor(\n private router: Router,\n private contextService: ContextService,\n private taskService: TaskService,\n private readonly route: ActivatedRoute,\n public translate: TranslateService,\n ) {\n }\n\n ngOnInit() {\n this.getOpenTasks();\n }\n\n public getOpenTasks() {\n this.taskService.getTasks().subscribe((response) => {\n this.openTasks = response;\n this.openTasks.map((task) => {\n task.created = moment(task.created).format('DD MMM YYYY HH:mm');\n });\n this.checkRouteForTaskId(response);\n this.loading$.next(false);\n });\n }\n\n public rowOpenTaskClick(task) {\n if (!task.endTime) {\n this.taskDetail.openTaskDetails(task);\n }\n }\n\n private checkRouteForTaskId(tasks: Array<Task>): void {\n this.route.queryParams.pipe(take(1))\n .subscribe((params) => {\n const taskId = params?.taskId;\n const findTaskFromId = tasks.find((task) => task.id === taskId);\n\n if (findTaskFromId) {\n this.rowOpenTaskClick(findTaskFromId);\n }\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {DashboardComponent} from './dashboard.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dashboard', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes)\n ],\n exports: [RouterModule]\n})\nexport class DashboardRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {TranslateLoader, TranslateModule} from '@ngx-translate/core';\nimport {TranslateHttpLoader} from '@ngx-translate/http-loader';\nimport {DashboardComponent} from './dashboard.component';\nimport {DashboardRoutingModule} from './dashboard-routing.module';\nimport {AlertModule, BpmnJsDiagramModule, ListModule, SpinnerModule, WidgetModule} from '@valtimo/components';\nimport {HttpClient} from '@angular/common/http';\nimport {TaskModule} from '@valtimo/task';\n\n// AoT requires an exported function for factories\nexport function HttpLoaderFactory(httpClient: HttpClient) {\n return new TranslateHttpLoader(httpClient);\n}\n\n@NgModule({\n declarations: [DashboardComponent],\n imports: [\n CommonModule,\n DashboardRoutingModule,\n WidgetModule,\n ListModule,\n BpmnJsDiagramModule,\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient]\n }\n }),\n AlertModule,\n TaskModule,\n SpinnerModule\n ],\n exports: [DashboardComponent]\n})\nexport class DashboardModule {\n}\n"]}
@@ -0,0 +1,44 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NgModule } from '@angular/core';
17
+ import { RouterModule } from '@angular/router';
18
+ import { CommonModule } from '@angular/common';
19
+ import { AuthGuardService } from '@valtimo/security';
20
+ import { DashboardComponent } from './dashboard.component';
21
+ import { ROLE_USER } from '@valtimo/contract';
22
+ const ɵ0 = { title: 'Dashboard', roles: [ROLE_USER] };
23
+ const routes = [
24
+ {
25
+ path: '',
26
+ component: DashboardComponent,
27
+ canActivate: [AuthGuardService],
28
+ data: ɵ0
29
+ }
30
+ ];
31
+ export class DashboardRoutingModule {
32
+ }
33
+ DashboardRoutingModule.decorators = [
34
+ { type: NgModule, args: [{
35
+ declarations: [],
36
+ imports: [
37
+ CommonModule,
38
+ RouterModule.forChild(routes)
39
+ ],
40
+ exports: [RouterModule]
41
+ },] }
42
+ ];
43
+ export { ɵ0 };
44
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFzaGJvYXJkLXJvdXRpbmcubW9kdWxlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdmFsdGltby9kYXNoYm9hcmQvc3JjL2xpYi9kYXNoYm9hcmQtcm91dGluZy5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7Ozs7O0dBY0c7QUFFSCxPQUFPLEVBQUMsUUFBUSxFQUFDLE1BQU0sZUFBZSxDQUFDO0FBQ3ZDLE9BQU8sRUFBQyxZQUFZLEVBQVMsTUFBTSxpQkFBaUIsQ0FBQztBQUNyRCxPQUFPLEVBQUMsWUFBWSxFQUFDLE1BQU0saUJBQWlCLENBQUM7QUFDN0MsT0FBTyxFQUFDLGdCQUFnQixFQUFDLE1BQU0sbUJBQW1CLENBQUM7QUFDbkQsT0FBTyxFQUFDLGtCQUFrQixFQUFDLE1BQU0sdUJBQXVCLENBQUM7QUFDekQsT0FBTyxFQUFDLFNBQVMsRUFBQyxNQUFNLG1CQUFtQixDQUFDO1dBT2xDLEVBQUMsS0FBSyxFQUFFLFdBQVcsRUFBRSxLQUFLLEVBQUUsQ0FBQyxTQUFTLENBQUMsRUFBQztBQUxsRCxNQUFNLE1BQU0sR0FBVztJQUNyQjtRQUNFLElBQUksRUFBRSxFQUFFO1FBQ1IsU0FBUyxFQUFFLGtCQUFrQjtRQUM3QixXQUFXLEVBQUUsQ0FBQyxnQkFBZ0IsQ0FBQztRQUMvQixJQUFJLElBQTBDO0tBQy9DO0NBQ0YsQ0FBQztBQVVGLE1BQU0sT0FBTyxzQkFBc0I7OztZQVJsQyxR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biAqL1xuXG5pbXBvcnQge05nTW9kdWxlfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7Um91dGVyTW9kdWxlLCBSb3V0ZXN9IGZyb20gJ0Bhbmd1bGFyL3JvdXRlcic7XG5pbXBvcnQge0NvbW1vbk1vZHVsZX0gZnJvbSAnQGFuZ3VsYXIvY29tbW9uJztcbmltcG9ydCB7QXV0aEd1YXJkU2VydmljZX0gZnJvbSAnQHZhbHRpbW8vc2VjdXJpdHknO1xuaW1wb3J0IHtEYXNoYm9hcmRDb21wb25lbnR9IGZyb20gJy4vZGFzaGJvYXJkLmNvbXBvbmVudCc7XG5pbXBvcnQge1JPTEVfVVNFUn0gZnJvbSAnQHZhbHRpbW8vY29udHJhY3QnO1xuXG5jb25zdCByb3V0ZXM6IFJvdXRlcyA9IFtcbiAge1xuICAgIHBhdGg6ICcnLFxuICAgIGNvbXBvbmVudDogRGFzaGJvYXJkQ29tcG9uZW50LFxuICAgIGNhbkFjdGl2YXRlOiBbQXV0aEd1YXJkU2VydmljZV0sXG4gICAgZGF0YToge3RpdGxlOiAnRGFzaGJvYXJkJywgcm9sZXM6IFtST0xFX1VTRVJdfVxuICB9XG5dO1xuXG5ATmdNb2R1bGUoe1xuICBkZWNsYXJhdGlvbnM6IFtdLFxuICBpbXBvcnRzOiBbXG4gICAgQ29tbW9uTW9kdWxlLFxuICAgIFJvdXRlck1vZHVsZS5mb3JDaGlsZChyb3V0ZXMpXG4gIF0sXG4gIGV4cG9ydHM6IFtSb3V0ZXJNb2R1bGVdXG59KVxuZXhwb3J0IGNsYXNzIERhc2hib2FyZFJvdXRpbmdNb2R1bGUge1xufVxuIl19
@@ -0,0 +1,96 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { Component, ViewChild } from '@angular/core';
17
+ import { TranslateService } from '@ngx-translate/core';
18
+ import { ContextService } from '@valtimo/context';
19
+ import { ActivatedRoute, Router } from '@angular/router';
20
+ import { TaskDetailModalComponent, TaskService } from '@valtimo/task';
21
+ import * as moment_ from 'moment';
22
+ import { take } from 'rxjs/operators';
23
+ import { BehaviorSubject } from 'rxjs';
24
+ const moment = moment_;
25
+ moment.locale(localStorage.getItem('langKey') || '');
26
+ moment.defaultFormat = 'DD MMM YYYY HH:mm';
27
+ export class DashboardComponent {
28
+ constructor(router, contextService, taskService, route, translate) {
29
+ this.router = router;
30
+ this.contextService = contextService;
31
+ this.taskService = taskService;
32
+ this.route = route;
33
+ this.translate = translate;
34
+ this.openTaskFields = [
35
+ {
36
+ key: 'created',
37
+ label: 'Created'
38
+ },
39
+ {
40
+ key: 'name',
41
+ label: 'Name'
42
+ },
43
+ {
44
+ key: 'valtimoAssignee.fullName',
45
+ label: 'Assignee'
46
+ }
47
+ ];
48
+ this.loading$ = new BehaviorSubject(true);
49
+ }
50
+ ngOnInit() {
51
+ this.getOpenTasks();
52
+ }
53
+ getOpenTasks() {
54
+ this.taskService.getTasks().subscribe((response) => {
55
+ this.openTasks = response;
56
+ this.openTasks.map((task) => {
57
+ task.created = moment(task.created).format('DD MMM YYYY HH:mm');
58
+ });
59
+ this.checkRouteForTaskId(response);
60
+ this.loading$.next(false);
61
+ });
62
+ }
63
+ rowOpenTaskClick(task) {
64
+ if (!task.endTime) {
65
+ this.taskDetail.openTaskDetails(task);
66
+ }
67
+ }
68
+ checkRouteForTaskId(tasks) {
69
+ this.route.queryParams.pipe(take(1))
70
+ .subscribe((params) => {
71
+ const taskId = params === null || params === void 0 ? void 0 : params.taskId;
72
+ const findTaskFromId = tasks.find((task) => task.id === taskId);
73
+ if (findTaskFromId) {
74
+ this.rowOpenTaskClick(findTaskFromId);
75
+ }
76
+ });
77
+ }
78
+ }
79
+ DashboardComponent.decorators = [
80
+ { type: Component, args: [{
81
+ selector: 'valtimo-dashboard',
82
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"px-3\">\n <div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{ openTasks?.length }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
83
+ styles: [""]
84
+ },] }
85
+ ];
86
+ DashboardComponent.ctorParameters = () => [
87
+ { type: Router },
88
+ { type: ContextService },
89
+ { type: TaskService },
90
+ { type: ActivatedRoute },
91
+ { type: TranslateService }
92
+ ];
93
+ D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yk7XG4gICAgICB9KTtcbiAgICAgIHRoaXMuY2hlY2tSb3V0ZUZvclRhc2tJZChyZXNwb25zZSk7XG4gICAgICB0aGlzLmxvYWRpbmckLm5leHQoZmFsc2UpO1xuICAgIH0pO1xuICB9XG5cbiAgcHVibGljIHJvd09wZW5UYXNrQ2xpY2sodGFzaykge1xuICAgIGlmICghdGFzay5lbmRUaW1lKSB7XG4gICAgICB0aGlzLnRhc2tEZXRhaWwub3BlblRhc2tEZXRhaWxzKHRhc2spO1xuICAgIH1cbiAgfVxuXG4gIHByaXZhdGUgY2hlY2tSb3V0ZUZvclRhc2tJZCh0YXNrczogQXJyYXk8VGFzaz4pOiB2b2lkIHtcbiAgICB0aGlzLnJvdXRlLnF1ZXJ5UGFyYW1zLnBpcGUodGFrZSgxKSlcbiAgICAgIC5zdWJzY3JpYmUoKHBhcmFtcykgPT4ge1xuICAgICAgICBjb25zdCB0YXNrSWQgPSBwYXJhbXM/LnRhc2tJZDtcbiAgICAgICAgY29uc3QgZmluZFRhc2tGcm9tSWQgPSB0YXNrcy5maW5kKCh0YXNrKSA9PiB0YXNrLmlkID09PSB0YXNrSWQpO1xuXG4gICAgICAgIGlmIChmaW5kVGFza0Zyb21JZCkge1xuICAgICAgICAgIHRoaXMucm93T3BlblRhc2tDbGljayhmaW5kVGFza0Zyb21JZCk7XG4gICAgICAgIH1cbiAgICB9KTtcbiAgfVxufVxuIl19
@@ -0,0 +1,54 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { NgModule } from '@angular/core';
17
+ import { CommonModule } from '@angular/common';
18
+ import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
19
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
20
+ import { DashboardComponent } from './dashboard.component';
21
+ import { DashboardRoutingModule } from './dashboard-routing.module';
22
+ import { AlertModule, BpmnJsDiagramModule, ListModule, SpinnerModule, WidgetModule } from '@valtimo/components';
23
+ import { HttpClient } from '@angular/common/http';
24
+ import { TaskModule } from '@valtimo/task';
25
+ // AoT requires an exported function for factories
26
+ export function HttpLoaderFactory(httpClient) {
27
+ return new TranslateHttpLoader(httpClient);
28
+ }
29
+ export class DashboardModule {
30
+ }
31
+ DashboardModule.decorators = [
32
+ { type: NgModule, args: [{
33
+ declarations: [DashboardComponent],
34
+ imports: [
35
+ CommonModule,
36
+ DashboardRoutingModule,
37
+ WidgetModule,
38
+ ListModule,
39
+ BpmnJsDiagramModule,
40
+ TranslateModule.forRoot({
41
+ loader: {
42
+ provide: TranslateLoader,
43
+ useFactory: HttpLoaderFactory,
44
+ deps: [HttpClient]
45
+ }
46
+ }),
47
+ AlertModule,
48
+ TaskModule,
49
+ SpinnerModule
50
+ ],
51
+ exports: [DashboardComponent]
52
+ },] }
53
+ ];
54
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGFzaGJvYXJkLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZGFzaGJvYXJkL3NyYy9saWIvZGFzaGJvYXJkLm1vZHVsZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7Ozs7Ozs7R0FjRztBQUVILE9BQU8sRUFBQyxRQUFRLEVBQUMsTUFBTSxlQUFlLENBQUM7QUFDdkMsT0FBTyxFQUFDLFlBQVksRUFBQyxNQ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ZSxcbiAgICAgICAgQnBtbkpzRGlhZ3JhbU1vZHVsZSxcbiAgICAgICAgVHJhbnNsYXRlTW9kdWxlLmZvclJvb3Qoe1xuICAgICAgICAgICAgbG9hZGVyOiB7XG4gICAgICAgICAgICAgICAgcHJvdmlkZTogVHJhbnNsYXRlTG9hZGVyLFxuICAgICAgICAgICAgICAgIHVzZUZhY3Rvcnk6IEh0dHBMb2FkZXJGYWN0b3J5LFxuICAgICAgICAgICAgICAgIGRlcHM6IFtIdHRwQ2xpZW50XVxuICAgICAgICAgICAgfVxuICAgICAgICB9KSxcbiAgICAgICAgQWxlcnRNb2R1bGUsXG4gICAgICAgIFRhc2tNb2R1bGUsXG4gICAgICAgIFNwaW5uZXJNb2R1bGVcbiAgICBdLFxuICBleHBvcnRzOiBbRGFzaGJvYXJkQ29tcG9uZW50XVxufSlcbmV4cG9ydCBjbGFzcyBEYXNoYm9hcmRNb2R1bGUge1xufVxuIl19
@@ -0,0 +1,21 @@
1
+ /*
2
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
3
+ *
4
+ * Licensed under EUPL, Version 1.2 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" basis,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ /*
17
+ * Public API Surface of dashboard
18
+ */
19
+ export * from './lib/dashboard.component';
20
+ export * from './lib/dashboard.module';
21
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljX2FwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Byb2plY3RzL3ZhbHRpbW8vZGFzaGJvYXJkL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IEFQSSBTdXJmYWNlIG9mIGRhc2hib2FyZFxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2Rhc2hib2FyZC5jb21wb25lbnQnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGFzaGJvYXJkLm1vZHVsZSc7XG4iXX0=
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public_api';
5
+ export { DashboardRoutingModule as ɵa } from './lib/dashboard-routing.module';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsdGltby1kYXNoYm9hcmQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9wcm9qZWN0cy92YWx0aW1vL2Rhc2hib2FyZC9zcmMvdmFsdGltby1kYXNoYm9hcmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQztBQUU3QixPQUFPLEVBQUMsc0JBQXNCLElBQUksRUFBRSxFQUFDLE1BQU0sZ0NBQWdDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vcHVibGljX2FwaSc7XG5cbmV4cG9ydCB7RGFzaGJvYXJkUm91dGluZ01vZHVsZSBhcyDJtWF9IGZyb20gJy4vbGliL2Rhc2hib2FyZC1yb3V0aW5nLm1vZHVsZSc7Il19
@@ -0,0 +1,207 @@
1
+ import { Component, ViewChild, NgModule } from '@angular/core';
2
+ import { TranslateService, TranslateModule, TranslateLoader } from '@ngx-translate/core';
3
+ import { ContextService } from '@valtimo/context';
4
+ import { Router, ActivatedRoute, RouterModule } from '@angular/router';
5
+ import { TaskService, TaskModule } from '@valtimo/task';
6
+ import * as moment_ from 'moment';
7
+ import { take } from 'rxjs/operators';
8
+ import { BehaviorSubject } from 'rxjs';
9
+ import { CommonModule } from '@angular/common';
10
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
11
+ import { AuthGuardService } from '@valtimo/security';
12
+ import { ROLE_USER } from '@valtimo/contract';
13
+ import { WidgetModule, ListModule, BpmnJsDiagramModule, AlertModule, SpinnerModule } from '@valtimo/components';
14
+ import { HttpClient } from '@angular/common/http';
15
+
16
+ /*
17
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
18
+ *
19
+ * Licensed under EUPL, Version 1.2 (the "License");
20
+ * you may not use this file except in compliance with the License.
21
+ * You may obtain a copy of the License at
22
+ *
23
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
24
+ *
25
+ * Unless required by applicable law or agreed to in writing, software
26
+ * distributed under the License is distributed on an "AS IS" basis,
27
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
28
+ * See the License for the specific language governing permissions and
29
+ * limitations under the License.
30
+ */
31
+ const moment = moment_;
32
+ moment.locale(localStorage.getItem('langKey') || '');
33
+ moment.defaultFormat = 'DD MMM YYYY HH:mm';
34
+ class DashboardComponent {
35
+ constructor(router, contextService, taskService, route, translate) {
36
+ this.router = router;
37
+ this.contextService = contextService;
38
+ this.taskService = taskService;
39
+ this.route = route;
40
+ this.translate = translate;
41
+ this.openTaskFields = [
42
+ {
43
+ key: 'created',
44
+ label: 'Created'
45
+ },
46
+ {
47
+ key: 'name',
48
+ label: 'Name'
49
+ },
50
+ {
51
+ key: 'valtimoAssignee.fullName',
52
+ label: 'Assignee'
53
+ }
54
+ ];
55
+ this.loading$ = new BehaviorSubject(true);
56
+ }
57
+ ngOnInit() {
58
+ this.getOpenTasks();
59
+ }
60
+ getOpenTasks() {
61
+ this.taskService.getTasks().subscribe((response) => {
62
+ this.openTasks = response;
63
+ this.openTasks.map((task) => {
64
+ task.created = moment(task.created).format('DD MMM YYYY HH:mm');
65
+ });
66
+ this.checkRouteForTaskId(response);
67
+ this.loading$.next(false);
68
+ });
69
+ }
70
+ rowOpenTaskClick(task) {
71
+ if (!task.endTime) {
72
+ this.taskDetail.openTaskDetails(task);
73
+ }
74
+ }
75
+ checkRouteForTaskId(tasks) {
76
+ this.route.queryParams.pipe(take(1))
77
+ .subscribe((params) => {
78
+ const taskId = params === null || params === void 0 ? void 0 : params.taskId;
79
+ const findTaskFromId = tasks.find((task) => task.id === taskId);
80
+ if (findTaskFromId) {
81
+ this.rowOpenTaskClick(findTaskFromId);
82
+ }
83
+ });
84
+ }
85
+ }
86
+ DashboardComponent.decorators = [
87
+ { type: Component, args: [{
88
+ selector: 'valtimo-dashboard',
89
+ template: "<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"px-3\">\n <div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{ openTasks?.length }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n",
90
+ styles: [""]
91
+ },] }
92
+ ];
93
+ DashboardComponent.ctorParameters = () => [
94
+ { type: Router },
95
+ { type: ContextService },
96
+ { type: TaskService },
97
+ { type: ActivatedRoute },
98
+ { type: TranslateService }
99
+ ];
100
+ DashboardComponent.propDecorators = {
101
+ taskDetail: [{ type: ViewChild, args: ['taskDetail',] }]
102
+ };
103
+
104
+ /*
105
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
106
+ *
107
+ * Licensed under EUPL, Version 1.2 (the "License");
108
+ * you may not use this file except in compliance with the License.
109
+ * You may obtain a copy of the License at
110
+ *
111
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
112
+ *
113
+ * Unless required by applicable law or agreed to in writing, software
114
+ * distributed under the License is distributed on an "AS IS" basis,
115
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
116
+ * See the License for the specific language governing permissions and
117
+ * limitations under the License.
118
+ */
119
+ const ɵ0 = { title: 'Dashboard', roles: [ROLE_USER] };
120
+ const routes = [
121
+ {
122
+ path: '',
123
+ component: DashboardComponent,
124
+ canActivate: [AuthGuardService],
125
+ data: ɵ0
126
+ }
127
+ ];
128
+ class DashboardRoutingModule {
129
+ }
130
+ DashboardRoutingModule.decorators = [
131
+ { type: NgModule, args: [{
132
+ declarations: [],
133
+ imports: [
134
+ CommonModule,
135
+ RouterModule.forChild(routes)
136
+ ],
137
+ exports: [RouterModule]
138
+ },] }
139
+ ];
140
+
141
+ /*
142
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
143
+ *
144
+ * Licensed under EUPL, Version 1.2 (the "License");
145
+ * you may not use this file except in compliance with the License.
146
+ * You may obtain a copy of the License at
147
+ *
148
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
149
+ *
150
+ * Unless required by applicable law or agreed to in writing, software
151
+ * distributed under the License is distributed on an "AS IS" basis,
152
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
153
+ * See the License for the specific language governing permissions and
154
+ * limitations under the License.
155
+ */
156
+ // AoT requires an exported function for factories
157
+ function HttpLoaderFactory(httpClient) {
158
+ return new TranslateHttpLoader(httpClient);
159
+ }
160
+ class DashboardModule {
161
+ }
162
+ DashboardModule.decorators = [
163
+ { type: NgModule, args: [{
164
+ declarations: [DashboardComponent],
165
+ imports: [
166
+ CommonModule,
167
+ DashboardRoutingModule,
168
+ WidgetModule,
169
+ ListModule,
170
+ BpmnJsDiagramModule,
171
+ TranslateModule.forRoot({
172
+ loader: {
173
+ provide: TranslateLoader,
174
+ useFactory: HttpLoaderFactory,
175
+ deps: [HttpClient]
176
+ }
177
+ }),
178
+ AlertModule,
179
+ TaskModule,
180
+ SpinnerModule
181
+ ],
182
+ exports: [DashboardComponent]
183
+ },] }
184
+ ];
185
+
186
+ /*
187
+ * Copyright 2015-2020 Ritense BV, the Netherlands.
188
+ *
189
+ * Licensed under EUPL, Version 1.2 (the "License");
190
+ * you may not use this file except in compliance with the License.
191
+ * You may obtain a copy of the License at
192
+ *
193
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
194
+ *
195
+ * Unless required by applicable law or agreed to in writing, software
196
+ * distributed under the License is distributed on an "AS IS" basis,
197
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
198
+ * See the License for the specific language governing permissions and
199
+ * limitations under the License.
200
+ */
201
+
202
+ /**
203
+ * Generated bundle index. Do not edit.
204
+ */
205
+
206
+ export { DashboardComponent, DashboardModule, HttpLoaderFactory, DashboardRoutingModule as ɵa };
207
+ //# sourceMappingURL=valtimo-dashboard.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-dashboard.js","sources":["../../../../projects/valtimo/dashboard/src/lib/dashboard.component.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard-routing.module.ts","../../../../projects/valtimo/dashboard/src/lib/dashboard.module.ts","../../../../projects/valtimo/dashboard/src/public_api.ts","../../../../projects/valtimo/dashboard/src/valtimo-dashboard.ts"],"sourcesContent":["/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component, OnInit, ViewChild} from '@angular/core';\nimport { TranslateService } from '@ngx-translate/core';\nimport { ContextService } from '@valtimo/context';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport { TaskDetailModalComponent, TaskService } from '@valtimo/task';\nimport * as moment_ from 'moment';\nimport {take} from 'rxjs/operators';\nimport {Task} from '@valtimo/contract';\nimport {BehaviorSubject} from 'rxjs';\nimport {NgxSpinnerService} from 'ngx-spinner';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-dashboard',\n templateUrl: './dashboard.component.html',\n styleUrls: ['./dashboard.component.css']\n})\nexport class DashboardComponent implements OnInit {\n public processDefinitions: Array<any>;\n public openTasks: Array<any>;\n public openTaskFields = [\n {\n key: 'created',\n label: 'Created'\n },\n {\n key: 'name',\n label: 'Name'\n },\n {\n key: 'valtimoAssignee.fullName',\n label: 'Assignee'\n }\n ];\n @ViewChild('taskDetail') taskDetail: TaskDetailModalComponent;\n\n loading$ = new BehaviorSubject<boolean>(true);\n\n constructor(\n private router: Router,\n private contextService: ContextService,\n private taskService: TaskService,\n private readonly route: ActivatedRoute,\n public translate: TranslateService,\n ) {\n }\n\n ngOnInit() {\n this.getOpenTasks();\n }\n\n public getOpenTasks() {\n this.taskService.getTasks().subscribe((response) => {\n this.openTasks = response;\n this.openTasks.map((task) => {\n task.created = moment(task.created).format('DD MMM YYYY HH:mm');\n });\n this.checkRouteForTaskId(response);\n this.loading$.next(false);\n });\n }\n\n public rowOpenTaskClick(task) {\n if (!task.endTime) {\n this.taskDetail.openTaskDetails(task);\n }\n }\n\n private checkRouteForTaskId(tasks: Array<Task>): void {\n this.route.queryParams.pipe(take(1))\n .subscribe((params) => {\n const taskId = params?.taskId;\n const findTaskFromId = tasks.find((task) => task.id === taskId);\n\n if (findTaskFromId) {\n this.rowOpenTaskClick(findTaskFromId);\n }\n });\n }\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {DashboardComponent} from './dashboard.component';\nimport {ROLE_USER} from '@valtimo/contract';\n\nconst routes: Routes = [\n {\n path: '',\n component: DashboardComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dashboard', roles: [ROLE_USER]}\n }\n];\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n RouterModule.forChild(routes)\n ],\n exports: [RouterModule]\n})\nexport class DashboardRoutingModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {TranslateLoader, TranslateModule} from '@ngx-translate/core';\nimport {TranslateHttpLoader} from '@ngx-translate/http-loader';\nimport {DashboardComponent} from './dashboard.component';\nimport {DashboardRoutingModule} from './dashboard-routing.module';\nimport {AlertModule, BpmnJsDiagramModule, ListModule, SpinnerModule, WidgetModule} from '@valtimo/components';\nimport {HttpClient} from '@angular/common/http';\nimport {TaskModule} from '@valtimo/task';\n\n// AoT requires an exported function for factories\nexport function HttpLoaderFactory(httpClient: HttpClient) {\n return new TranslateHttpLoader(httpClient);\n}\n\n@NgModule({\n declarations: [DashboardComponent],\n imports: [\n CommonModule,\n DashboardRoutingModule,\n WidgetModule,\n ListModule,\n BpmnJsDiagramModule,\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient]\n }\n }),\n AlertModule,\n TaskModule,\n SpinnerModule\n ],\n exports: [DashboardComponent]\n})\nexport class DashboardModule {\n}\n","/*\n * Copyright 2015-2020 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of dashboard\n */\n\nexport * from './lib/dashboard.component';\nexport * from './lib/dashboard.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n\nexport {DashboardRoutingModule as ɵa} from './lib/dashboard-routing.module';"],"names":[],"mappings":";;;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,iBAAiB,CAAC,UAAsB;IACtD,OAAO,IAAI,mBAAmB,CAAC,UAAU,CAAC,CAAC;AAC7C,CAAC;MAuBY,eAAe;;;YArB3B,QAAQ,SAAC;gBACR,YAAY,EAAE,CAAC,kBAAkB,CAAC;gBAChC,OAAO,EAAE;oBACL,YAAY;oBACZ,sBAAsB;oBACtB,YAAY;oBACZ,UAAU;oBACV,mBAAmB;oBACnB,eAAe,CAAC,OAAO,CAAC;wBACpB,MAAM,EAAE;4BACJ,OAAO,EAAE,eAAe;4BACxB,UAAU,EAAE,iBAAiB;4BAC7B,IAAI,EAAE,CAAC,UAAU,CAAC;yBACrB;qBACJ,CAAC;oBACF,WAAW;oBACX,UAAU;oBACV,aAAa;iBAChB;gBACH,OAAO,EAAE,CAAC,kBAAkB,CAAC;aAC9B;;;ACnDD;;;;;;;;;;;;;;;;ACAA;;;;;;"}
@@ -0,0 +1,2 @@
1
+ export declare class DashboardRoutingModule {
2
+ }
@@ -0,0 +1,26 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { ContextService } from '@valtimo/context';
4
+ import { ActivatedRoute, Router } from '@angular/router';
5
+ import { TaskDetailModalComponent, TaskService } from '@valtimo/task';
6
+ import { BehaviorSubject } from 'rxjs';
7
+ export declare class DashboardComponent implements OnInit {
8
+ private router;
9
+ private contextService;
10
+ private taskService;
11
+ private readonly route;
12
+ translate: TranslateService;
13
+ processDefinitions: Array<any>;
14
+ openTasks: Array<any>;
15
+ openTaskFields: {
16
+ key: string;
17
+ label: string;
18
+ }[];
19
+ taskDetail: TaskDetailModalComponent;
20
+ loading$: BehaviorSubject<boolean>;
21
+ constructor(router: Router, contextService: ContextService, taskService: TaskService, route: ActivatedRoute, translate: TranslateService);
22
+ ngOnInit(): void;
23
+ getOpenTasks(): void;
24
+ rowOpenTaskClick(task: any): void;
25
+ private checkRouteForTaskId;
26
+ }
@@ -0,0 +1,5 @@
1
+ import { TranslateHttpLoader } from '@ngx-translate/http-loader';
2
+ import { HttpClient } from '@angular/common/http';
3
+ export declare function HttpLoaderFactory(httpClient: HttpClient): TranslateHttpLoader;
4
+ export declare class DashboardModule {
5
+ }
package/package.json ADDED
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "@valtimo/dashboard",
3
+ "version": "4.15.2-next-main.8",
4
+ "peerDependencies": {
5
+ "@angular/common": "^10.0.11",
6
+ "@angular/core": "^10.0.11"
7
+ },
8
+ "publishConfig": {
9
+ "registry": "http://repo.ritense.com/repository/npm-ritense-private/"
10
+ },
11
+ "dependencies": {
12
+ "moment": "2.24.0",
13
+ "d3": "^5.9.2",
14
+ "d3-shape": "^1.3.5",
15
+ "@ngx-translate/core": "^13.0.0",
16
+ "@ngx-translate/http-loader": "6.0.0",
17
+ "tslib": "^2.0.0"
18
+ },
19
+ "main": "bundles/valtimo-dashboard.umd.js",
20
+ "module": "fesm2015/valtimo-dashboard.js",
21
+ "es2015": "fesm2015/valtimo-dashboard.js",
22
+ "esm2015": "esm2015/valtimo-dashboard.js",
23
+ "fesm2015": "fesm2015/valtimo-dashboard.js",
24
+ "typings": "valtimo-dashboard.d.ts",
25
+ "metadata": "valtimo-dashboard.metadata.json",
26
+ "sideEffects": false
27
+ }
@@ -0,0 +1,2 @@
1
+ export * from './lib/dashboard.component';
2
+ export * from './lib/dashboard.module';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public_api';
5
+ export { DashboardRoutingModule as ɵa } from './lib/dashboard-routing.module';
@@ -0,0 +1 @@
1
+ {"__symbolic":"module","version":4,"metadata":{"DashboardComponent":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Component","line":31,"character":1},"arguments":[{"selector":"valtimo-dashboard","template":"<!--\n ~ Copyright 2015-2020 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<div class=\"px-3\">\n <div class=\"main-content container-fluid\" *ngIf=\"{loading: loading$ | async} as obs\">\n <h4 class=\"title\">\n {{ 'dashboard.openTasks.title' | translate }}\n <sup *ngIf=\"obs.loading === false\" class=\"ml-1 badge badge-pill badge-primary\">{{ openTasks?.length }}</sup>\n </h4>\n <ng-container *ngIf=\"obs.loading === false; else loading\">\n <valtimo-widget>\n <valtimo-list\n [items]=\"openTasks\"\n [fields]=\"openTaskFields\"\n (rowClicked)=\"rowOpenTaskClick($event)\"\n ></valtimo-list>\n </valtimo-widget>\n </ng-container>\n <valtimo-task-detail-modal\n #taskDetail\n (formSubmit)=\"getOpenTasks()\"\n (assignmentOfTaskChanged)=\"getOpenTasks()\"\n ></valtimo-task-detail-modal>\n </div>\n</div>\n\n<ng-template #loading>\n <valtimo-spinner></valtimo-spinner>\n</ng-template>\n","styles":[""]}]}],"members":{"taskDetail":[{"__symbolic":"property","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"ViewChild","line":53,"character":3},"arguments":["taskDetail"]}]}],"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/router","name":"Router","line":58,"character":20},{"__symbolic":"reference","module":"@valtimo/context","name":"ContextService","line":59,"character":28},{"__symbolic":"reference","module":"@valtimo/task","name":"TaskService","line":60,"character":25},{"__symbolic":"reference","module":"@angular/router","name":"ActivatedRoute","line":61,"character":28},{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateService","line":62,"character":22}]}],"ngOnInit":[{"__symbolic":"method"}],"getOpenTasks":[{"__symbolic":"method"}],"rowOpenTaskClick":[{"__symbolic":"method"}],"checkRouteForTaskId":[{"__symbolic":"method"}]}},"HttpLoaderFactory":{"__symbolic":"function","parameters":["httpClient"],"value":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@ngx-translate/http-loader","name":"TranslateHttpLoader","line":28,"character":13},"arguments":[{"__symbolic":"reference","name":"httpClient"}]}},"DashboardModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":31,"character":1},"arguments":[{"declarations":[{"__symbolic":"reference","name":"DashboardComponent"}],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":34,"character":8},{"__symbolic":"reference","name":"ɵa"},{"__symbolic":"reference","module":"@valtimo/components","name":"WidgetModule","line":36,"character":8},{"__symbolic":"reference","module":"@valtimo/components","name":"ListModule","line":37,"character":8},{"__symbolic":"reference","module":"@valtimo/components","name":"BpmnJsDiagramModule","line":38,"character":8},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateModule","line":39,"character":8},"member":"forRoot"},"arguments":[{"loader":{"provide":{"__symbolic":"reference","module":"@ngx-translate/core","name":"TranslateLoader","line":41,"character":25},"useFactory":{"__symbolic":"reference","name":"HttpLoaderFactory"},"deps":[{"__symbolic":"reference","module":"@angular/common/http","name":"HttpClient","line":43,"character":23}]}}]},{"__symbolic":"reference","module":"@valtimo/components","name":"AlertModule","line":46,"character":8},{"__symbolic":"reference","module":"@valtimo/task","name":"TaskModule","line":47,"character":8},{"__symbolic":"reference","module":"@valtimo/components","name":"SpinnerModule","line":48,"character":8}],"exports":[{"__symbolic":"reference","name":"DashboardComponent"}]}]}],"members":{}},"ɵa":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule","line":32,"character":1},"arguments":[{"declarations":[],"imports":[{"__symbolic":"reference","module":"@angular/common","name":"CommonModule","line":35,"character":4},{"__symbolic":"call","expression":{"__symbolic":"select","expression":{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":36,"character":4},"member":"forChild"},"arguments":[[{"path":"","component":{"__symbolic":"reference","name":"DashboardComponent"},"canActivate":[{"__symbolic":"reference","module":"@valtimo/security","name":"AuthGuardService","line":27,"character":18}],"data":{"title":"Dashboard","roles":[{"__symbolic":"reference","module":"@valtimo/contract","name":"ROLE_USER","line":28,"character":39}]}}]]}],"exports":[{"__symbolic":"reference","module":"@angular/router","name":"RouterModule","line":38,"character":12}]}]}],"members":{}}},"origins":{"DashboardComponent":"./lib/dashboard.component","HttpLoaderFactory":"./lib/dashboard.module","DashboardModule":"./lib/dashboard.module","ɵa":"./lib/dashboard-routing.module"},"importAs":"@valtimo/dashboard"}