@valtimo/dossier 4.17.0 → 4.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/valtimo-dossier.umd.js +4 -4
- package/bundles/valtimo-dossier.umd.js.map +1 -1
- package/bundles/valtimo-dossier.umd.min.js +1 -1
- package/bundles/valtimo-dossier.umd.min.js.map +1 -1
- package/esm2015/lib/dossier-detail/dossier-detail.component.js +2 -2
- package/esm2015/lib/dossier-detail/tab/audit/audit.component.js +1 -1
- package/esm2015/lib/dossier-detail/tab/contact-moments/contact-moments.component.js +1 -1
- package/esm2015/lib/dossier-detail/tab/documents/documents.component.js +3 -3
- package/esm2015/lib/dossier-detail/tab/progress/progress.component.js +1 -1
- package/esm2015/lib/dossier-detail/tab/summary/summary.component.js +1 -1
- package/esm2015/lib/dossier-detail-tab-enum.js +1 -1
- package/esm2015/lib/dossier-list/dossier-list.component.js +2 -2
- package/esm2015/lib/dossier-process-start-modal/dossier-process-start-modal.component.js +1 -1
- package/esm2015/lib/dossier-routing.module.js +1 -1
- package/esm2015/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.js +1 -1
- package/esm2015/lib/dossier-update/dossier-update.component.js +1 -1
- package/esm2015/lib/dossier.config.js +1 -1
- package/esm2015/lib/dossier.module.js +1 -1
- package/esm2015/lib/dossier.service.js +1 -1
- package/esm2015/lib/models/index.js +1 -1
- package/esm2015/lib/models/tabs.model.js +1 -1
- package/esm2015/lib/tab.service.js +1 -1
- package/esm2015/public_api.js +1 -1
- package/esm2015/valtimo-dossier.js +1 -1
- package/fesm2015/valtimo-dossier.js +4 -4
- package/fesm2015/valtimo-dossier.js.map +1 -1
- package/package.json +1 -1
- package/valtimo-dossier.metadata.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../projects/valtimo/dossier/src/lib/models/tabs.model.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/valtimo/dossier/src/lib/dossier-detail-tab-enum.ts","../../../../projects/valtimo/dossier/src/lib/dossier.service.ts","../../../../projects/valtimo/dossier/src/lib/dossier-list/dossier-list.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/summary/summary.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/progress/progress.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/audit/audit.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/documents/documents.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier.config.ts","../../../../projects/valtimo/dossier/src/lib/tab.service.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/dossier-detail.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/contact-moments/contact-moments.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-update/dossier-update.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-routing.module.ts","../../../../projects/valtimo/dossier/src/lib/dossier-process-start-modal/dossier-process-start-modal.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier.module.ts"],"names":["TabLoaderImpl","tabs","componentFactoryResolver","viewContainerRef","translateService","router","location","this","_tabs","_componentFactoryResolver","_viewContainerRef","_activeComponent","_activeTab","_translateService","_router","_location","prototype","initial","tabName","initialTab","find","tab","name","load","newTab","forEach","deactivate","replaceView","replaceUrlState","setActive","refreshView","componentFactory","resolveComponentFactory","component","clear","destroy","createComponent","urlParts","url","split","splice","length","newUrl","join","replaceState","activate","Object","defineProperty","translateTabName","instant","TabImpl","sequence","_active","_name","_sequence","_component","isActive","create","__values","o","s","Symbol","iterator","m","i","call","next","value","done","TypeError","__read","n","r","e","ar","push","error","DefaultTabs","DossierService","configService","definitions","config","getImplementationEnvironmentDefinitions","dossiers","definition","getDefinitionColumns","definitionNameId","customDefinitionTables","defaultDefinitionTable","getInitialSortState","columns","defaultColumn","column","default","isSorting","state","propertyName","direction","Injectable","args","providedIn","ConfigService","momentImported","locale","localStorage","getItem","DossierListComponent","route","documentService","dossierService","documentDefinitionName","showCreateDocument","items","fields","processDefinitionListFields","processDocumentDefinitions","pagination","collectionSize","page","size","maxPaginationItemSize","sort","undefined","selectedProcessDocumentDefinition","modalListenerAdded","ngOnInit","doInit","routeEvent","ngOnDestroy","routerSubscription","unsubscribe","translationSubscription","paginationSet","getData","_this","events","subscribe","NavigationEnd","snapshot","paramMap","get","initialSortState","openTranslationSubscription","combineLatest","map","stream","translationKey","labels","index","assign","key","label","sortable","viewType","findDocumentDefinition","hasCachedSearchRequest","documentSearchRequest","getCachedSearch","globalSearchFilter","createdBy","findDocuments","doSearch","getAllAssociatedProcessDefinitions","buildDocumentSearchRequest","getDocuments","documents","transformDocuments","content","totalElements","storeSearch","findProcessDocumentDefinitions","filter","processDocumentDefinition","canInitializeDocument","json","JSON","parse","getCachedDocumentSearchRequest","DocumentSearchRequestImpl","definitionName","setItem","getCachedKey","stringify","rowClick","document","navigate","id","summary","startDossier","$","modal","showStartProcessModal","processStart","openModal","selectProcess","on","bind","getDocumentDefinition","schema","documentsContent","others","t","p","hasOwnProperty","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","paginationClicked","sortChanged","sortState","cachedRequest","Component","selector","template","ActivatedRoute","Router","DocumentService","TranslateService","ViewChild","moment","moment_","defaultFormat","DossierDetailTabSummaryComponent","taskService","processService","el","renderer","formService","userProviderService","processDocumentInstances","tasks","formDefinition","roles","documentId","options","FormioOptionsImpl","disableAlerts","init","getDocument","getFormDefinitionByNamePreFilled","getUserSubject","user","loadProcessDocumentInstances","findProcessDocumentInstances","instance","loadProcessInstanceTasks","processInstanceId","getProcessInstanceTasks","task","createdUnix","created","unix","format","isLocked","locked","_b","identityLinks","_c","link","type","groupId","includes","concat","t1","t2","rowTaskClick","taskDetail","openTaskDetails","encapsulation","ViewEncapsulation","None","TaskService","ProcessService","ElementRef","Renderer2","FormService","UserProviderService","DossierDetailTabProgressComponent","selectedProcessInstanceId","loadProcessInstance","DossierDetailTabAuditComponent","spinnerService","EventEmitter","defaultAuditPage","show","getTranslationKey","auditEvent","classNameArray","className","loadAuditPage","pageNumber","getAuditLog","timelineItems","auditRecord","occurredOn","metaData","fromNow","TimelineItemImpl","hide","number","onChangePagination","emit","currentAuditPage","NgxSpinnerService","Output","DossierDetailTabDocumentsComponent","toastrService","uploadProviderService","downloadService","maxFileSize","_a","caseFileSizeUploadLimitMB","refetch$","BehaviorSubject","relatedFiles$","pipe","switchMap","relatedFiles","file","actions","columnName","iconClass","callback","downloadDocument","removeRelatedFile","uploading$","refetchDocuments","fileSelected","uploadFile","resourceFile","assignResource","data","resourceId","success","relatedFile","getResource","fileId","resource","downloadFile","removeResource","ToastrService","UploadProviderService","DownloadService","TAB_MAP","InjectionToken","DEFAULT_TABS","Map","progress","audit","TabService","tabMap","getTabs","decorators","Inject","DossierDetailComponent","tabService","tabLoader","documentDefinitionNameTitle","title","initialTabName","startableByUser","startProcess","supportingProcessStart","ComponentFactoryResolver","Location","read","ViewContainerRef","static","DossierDetailTabContactMomentsComponent","contactMomentService","alertService","refetchContactMoments$","contactMoments$","getContactMoments","contactMoments","contactMoment","registratieDatum","registratiedatum","medewerkerIdentificatie","achternaam","kanaal","tekst","text$","channel$","requestData$","valid$","text","channel","disabled$","textChange","buttonClick","saveNote","disable","take","saveContactMoment","enable","refetchContactMoments","ContactMomentService","AlertService","DossierUpdateComponent","toastr","customDefinitions","taskId","implementationDefinitions","loadDocumentDefinition","loadDocument","getTask","detail","subtitle","reset","back","save","versionBasedOn","version","modifyDocument","result","submit","mergedData","documentData","request","modifyDocumentAndCompleteTask","returnZero","ROLE_USER","parentPath","routes","path","canActivate","AuthGuardService","NgModule","imports","CommonModule","RouterModule","forChild","exports","DossierProcessStartModalComponent","formLinkService","logger","isUserAdmin","loadFormDefinition","getStartEventFormDefinitionByProcessDefinitionKey","processDefinitionKey","formAssociation","formLink","serializeUrl","createUrlTree","window","open","fatal","errors","gotoFormLinkScreen","queryParams","process","processName","documentDefinitionId","setHooks","submission","onSubmit","formioSubmission","formSubmissionResult","form","showErrors","userIdentity","isAdmin","FormLinkService","NGXLogger","DossierSupportingProcessStartModalComponent","formSubmit","noop","params","HttpLoaderFactory","DossierModule","forRoot","tabsFactory","ngModule","providers","provide","useFactory","ANALYZE_FOR_ENTRY_COMPONENTS","useValue","Array","from","values","multi","declarations","DossierRoutingModule","ListModule","WidgetModule","BpmnJsDiagramModule","TimelineModule","CamundaFormModule","ProcessModule","FilterSidebarModule","NgbButtonsModule","DataListModule","FormsModule","FormModule","FormIoModule","ModalModule","SpinnerModule","TranslateModule","loader","TranslateLoader","deps","HttpClient","TaskModule","NgbTooltipModule","UploaderModule","DropzoneModule","NgbPaginationModule","ConfigModule","entryComponents"],"mappings":"ykDAyCE,SAAAA,EACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAfeC,KAAAC,MAAmB,KACnBD,KAAAE,0BAAsD,KACtDF,KAAAG,kBAAsC,KAC/CH,KAAAI,iBAAsC,KACtCJ,KAAAK,WAAsB,KACtBL,KAAAM,kBAAsC,KAY5CN,KAAKC,MAAQP,EACbM,KAAKE,0BAA4BP,EACjCK,KAAKG,kBAAoBP,EACzBI,KAAKM,kBAAoBT,EACzBG,KAAKO,QAAUT,EACfE,KAAKQ,UAAYT,SAGnBN,EAAAgB,UAAAC,QAAA,SAAQC,GACN,IAAIC,EAEFA,EADED,EACWX,KAAKC,MAAMY,MAAK,SAAAC,GAAO,OAAAA,EAAIC,OAASJ,KAEpCX,KAAKC,MAAM,IAAM,KAEhCD,KAAKgB,KAAKJ,IAGZnB,EAAAgB,UAAAO,KAAA,SAAKC,GACCA,IAAWjB,KAAKK,aAClBL,KAAKC,MAAMiB,SAAQ,SAAAJ,GAAO,OAAAA,EAAIK,gBAC9BnB,KAAKoB,YAAYH,GACjBjB,KAAKqB,gBAAgBJ,GACrBjB,KAAKsB,UAAUL,KAInBxB,EAAAgB,UA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,mBAC3BrJ,EAAAA,UAASxH,KAAA,CAAC,8BAA+B,CAAC6Q,QAAQ,wBAElD/D,EAAAA,gBCuCiBqK,EAAAA,gCAqBpB,SAAAC,YACSA,EAAAC,QAAP,SAAeC,GACb,MAAO,CACLC,SAAUH,EACVI,UAAW,CACT7Y,EACAgR,EACA,CACE8H,QAASpI,EACTqI,WAAYJ,GAEd,CACEG,QAASE,EAAAA,6BACTC,SAAUC,MAAMC,KAAKR,IAAcS,UACnCC,OAAO,gCApEhBtD,EAAAA,SAAQ1U,KAAA,CAAC,CACRiY,aAAc,CACZ1X,EACAyP,EACApI,EACAuD,EACAG,EACAyB,EACA+D,EACA+B,EACAmC,EACA+B,GAEFpC,QAAS,CACPC,EAAAA,aACAsD,EACAC,EAAAA,WACAC,EAAAA,aACAC,EAAAA,oBACAC,EAAAA,eACAC,EAAAA,kBACAC,EAAAA,cACAC,EAAAA,oBACAC,EAAAA,iBACAC,EAAAA,eACAC,EAAAA,YACAC,EAAAA,WACAC,EAAAA,aACAC,EAAAA,YACAC,EAAAA,cACAC,EAAAA,gBAAgB5B,QAAQ,CACtB6B,OAAQ,CACNzB,QAAS0B,EAAAA,gBACTzB,WAAU,EACV0B,KAAM,CAACC,EAAAA,eAGXC,EAAAA,WACAP,EAAAA,YACAQ,EAAAA,iBACAC,EAAAA,eACAC,EAAAA,eACAC,EAAAA,oBACAC,EAAAA,cAEF5E,QAAS,CAACxU,EAAsByP,GAChC4J,gBAAiB,CACfhS,EACAuD,EACAG,EACAyB,EACA+D","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 {ComponentFactoryResolver, ComponentRef, ViewContainerRef} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\n\nexport interface TabLoader<T_TAB extends Tab> {\n tabs: T_TAB[];\n\n initial(tabName?: string): void;\n\n load(tabToLoad: T_TAB): void;\n\n translateTabName(tab: T_TAB): string;\n}\n\nexport class TabLoaderImpl implements TabLoader<TabImpl> {\n private readonly _tabs: TabImpl[] = null;\n private readonly _componentFactoryResolver: ComponentFactoryResolver = null;\n private readonly _viewContainerRef: ViewContainerRef = null;\n private _activeComponent: ComponentRef<any> = null;\n private _activeTab: TabImpl = null;\n private _translateService: TranslateService = null;\n private _router: Router;\n private _location: Location;\n\n constructor(\n tabs: TabImpl[],\n componentFactoryResolver: ComponentFactoryResolver,\n viewContainerRef: ViewContainerRef,\n translateService: TranslateService,\n router: Router,\n location: Location\n ) {\n this._tabs = tabs;\n this._componentFactoryResolver = componentFactoryResolver;\n this._viewContainerRef = viewContainerRef;\n this._translateService = translateService;\n this._router = router;\n this._location = location;\n }\n\n initial(tabName?: string): void {\n let initialTab;\n if (tabName) {\n initialTab = this._tabs.find(tab => tab.name === tabName);\n } else {\n initialTab = this._tabs[0] || null;\n }\n this.load(initialTab);\n }\n\n load(newTab: TabImpl): void {\n if (newTab !== this._activeTab) {\n this._tabs.forEach(tab => tab.deactivate());\n this.replaceView(newTab);\n this.replaceUrlState(newTab);\n this.setActive(newTab);\n }\n }\n\n refreshView() {\n this.replaceView(this._activeTab);\n }\n\n private replaceView(tab: TabImpl): void {\n const componentFactory = this._componentFactoryResolver.resolveComponentFactory(tab.component);\n this._viewContainerRef.clear();\n if (this._activeTab !== null) {\n this._activeComponent.destroy();\n }\n this._activeComponent = this._viewContainerRef.createComponent(componentFactory);\n }\n\n private replaceUrlState(tab: TabImpl): void {\n const currentUrl = this._router.url;\n const urlParts = currentUrl.split('/');\n urlParts.splice(urlParts.length - 1, 1, tab.name);\n const newUrl = urlParts.join('/');\n this._location.replaceState(newUrl);\n }\n\n private setActive(tab: TabImpl): void {\n tab.activate();\n this._activeTab = tab;\n }\n\n get tabs(): TabImpl[] {\n return this._tabs;\n }\n\n translateTabName(tab: TabImpl): string {\n return this._translateService.instant('dossier.tabs.' + tab.name);\n }\n}\n\nexport interface Tab {\n name: string;\n sequence: number;\n component: any;\n\n activate(): void;\n\n deactivate(): void;\n\n isActive(): boolean;\n}\n\nexport class TabImpl implements Tab {\n private readonly _name: string;\n private readonly _sequence: number;\n private readonly _component: any;\n private _active = false;\n\n constructor(name: string, sequence: number, component: any) {\n this._name = name;\n this._sequence = sequence;\n this._component = component;\n }\n\n get name(): string {\n return this._name;\n }\n\n get sequence(): number {\n return this._sequence;\n }\n\n get component(): any {\n return this._component;\n }\n\n activate(): void {\n this._active = true;\n }\n\n deactivate(): void {\n this._active = false;\n }\n\n isActive(): boolean {\n return this._active;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\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\nexport enum DefaultTabs {\n summary = 'summary',\n progress = 'progress',\n audit = 'audit',\n documents = 'documents',\n contactMoments = 'contact-moments',\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 {Injectable} from '@angular/core';\nimport {ConfigService, DefinitionColumn} from '@valtimo/config';\nimport {SortState} from '@valtimo/document';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DossierService {\n private readonly definitions: any;\n\n constructor(private readonly configService: ConfigService) {\n this.definitions = configService.config.definitions;\n }\n\n getImplementationEnvironmentDefinitions(name: string) {\n return this.definitions.dossiers.find(definition => definition.name === name);\n }\n\n getDefinitionColumns(definitionNameId: string): Array<DefinitionColumn> {\n const config = this.configService.config;\n const customDefinitionTable = config.customDefinitionTables[definitionNameId];\n return customDefinitionTable || config.defaultDefinitionTable;\n }\n\n getInitialSortState(columns: Array<DefinitionColumn>): SortState {\n const defaultColumn = columns.find(column => column.default);\n return {\n isSorting: false,\n state: {\n name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,\n direction: 'DESC',\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 {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {ActivatedRoute, NavigationEnd, Router} from '@angular/router';\nimport {TranslateService} from '@ngx-translate/core';\nimport {DefinitionColumn} from '@valtimo/config';\nimport {\n DocumentSearchRequest,\n DocumentSearchRequestImpl,\n DocumentService,\n SortState,\n ProcessDocumentDefinition,\n} from '@valtimo/document';\nimport * as momentImported from 'moment';\nimport {combineLatest, Subscription} from 'rxjs';\nimport {DefaultTabs} from '../dossier-detail-tab-enum';\nimport {DossierProcessStartModalComponent} from '../dossier-process-start-modal/dossier-process-start-modal.component';\nimport {DossierService} from '../dossier.service';\n\ndeclare var $;\n\nconst moment = momentImported;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-list',\n templateUrl: './dossier-list.component.html',\n styleUrls: ['./dossier-list.component.css'],\n})\nexport class DossierListComponent implements OnInit, OnDestroy {\n public documentDefinitionName = '';\n public implementationDefinitions: any;\n public showCreateDocument = false;\n public schema: any;\n public documents: any;\n public items: Array<any> = [];\n public fields: Array<any> = [];\n public processDefinitionListFields: Array<any> = [];\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n sort: undefined,\n };\n public globalSearchFilter: string | undefined;\n public sequence: number | undefined;\n public createdBy: string | undefined;\n private selectedProcessDocumentDefinition: ProcessDocumentDefinition | null = null;\n private modalListenerAdded = false;\n @ViewChild('processStartModal') processStart: DossierProcessStartModalComponent;\n\n private routerSubscription: Subscription;\n\n private translationSubscription: Subscription;\n\n initialSortState: SortState;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private documentService: DocumentService,\n private readonly translateService: TranslateService,\n private readonly dossierService: DossierService\n ) {}\n\n ngOnInit(): void {\n this.doInit();\n this.routeEvent(this.router);\n this.modalListenerAdded = false;\n }\n\n ngOnDestroy(): void {\n this.routerSubscription.unsubscribe();\n this.translationSubscription.unsubscribe();\n }\n\n paginationSet() {\n this.getData();\n }\n\n private routeEvent(router: Router) {\n this.routerSubscription = router.events.subscribe(e => {\n if (e instanceof NavigationEnd) {\n this.doInit();\n this.getData();\n }\n });\n }\n\n public doInit() {\n const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';\n const columns: Array<DefinitionColumn> =\n this.dossierService.getDefinitionColumns(documentDefinitionName);\n\n this.documentDefinitionName = documentDefinitionName;\n this.initialSortState = this.dossierService.getInitialSortState(columns);\n\n this.openTranslationSubscription(columns);\n }\n\n private openTranslationSubscription(columns: Array<DefinitionColumn>): void {\n this.translationSubscription = combineLatest(\n columns.map(column => this.translateService.stream(`fieldLabels.${column.translationKey}`))\n ).subscribe(labels => {\n this.fields = columns.map((column, index) => ({\n key: column.propertyName,\n label: labels[index],\n sortable: column.sortable,\n ...(column.viewType && {viewType: column.viewType}),\n }));\n });\n }\n\n public getData() {\n this.findDocumentDefinition(this.documentDefinitionName);\n\n if (this.hasCachedSearchRequest()) {\n const documentSearchRequest = this.getCachedSearch();\n this.globalSearchFilter = documentSearchRequest.globalSearchFilter;\n this.sequence = documentSearchRequest.sequence;\n this.createdBy = documentSearchRequest.createdBy;\n this.findDocuments(documentSearchRequest);\n } else {\n this.doSearch();\n }\n\n this.getAllAssociatedProcessDefinitions();\n }\n\n public doSearch() {\n const documentSearchRequest = this.buildDocumentSearchRequest();\n this.findDocuments(documentSearchRequest);\n }\n\n private findDocuments(documentSearchRequest: DocumentSearchRequest) {\n return this.documentService.getDocuments(documentSearchRequest).subscribe(documents => {\n this.documents = documents;\n this.transformDocuments(this.documents.content);\n this.pagination.collectionSize = this.documents.totalElements;\n this.storeSearch(documentSearchRequest);\n });\n }\n\n public getAllAssociatedProcessDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe(processDocumentDefinitions => {\n this.processDocumentDefinitions = processDocumentDefinitions.filter(\n processDocumentDefinition => processDocumentDefinition.canInitializeDocument\n );\n this.processDefinitionListFields = [\n {\n key: 'processName',\n label: 'Proces',\n },\n ];\n });\n }\n\n public getCachedSearch(): DocumentSearchRequest {\n const json = JSON.parse(this.getCachedDocumentSearchRequest());\n return new DocumentSearchRequestImpl(\n json.definitionName,\n this.pagination.page - 1,\n this.pagination.size,\n json.sequence,\n json.createdBy,\n json.globalSearchFilter,\n json.sort\n );\n }\n\n private buildDocumentSearchRequest(): DocumentSearchRequest {\n return new DocumentSearchRequestImpl(\n this.documentDefinitionName,\n this.pagination.page - 1,\n this.pagination.size,\n this.sequence,\n this.createdBy,\n this.globalSearchFilter,\n this.pagination.sort && this.pagination.sort.isSorting\n ? this.pagination.sort\n : this.initialSortState\n );\n }\n\n private storeSearch(documentSearchRequest: DocumentSearchRequest) {\n localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));\n }\n\n private getCachedDocumentSearchRequest(): string {\n return localStorage.getItem(this.getCachedKey()) || '';\n }\n\n private hasCachedSearchRequest(): boolean {\n return localStorage.getItem(this.getCachedKey()) !== null;\n }\n\n private getCachedKey(): string {\n return 'list-search-' + this.documentDefinitionName;\n }\n\n public rowClick(document: any) {\n this.router.navigate([\n `/dossiers/${this.documentDefinitionName}/document/${document.id}/${DefaultTabs.summary}`,\n ]);\n }\n\n public startDossier() {\n if (this.processDocumentDefinitions.length > 1) {\n $('#startProcess').modal('show');\n } else {\n this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];\n this.showStartProcessModal();\n }\n }\n\n private showStartProcessModal() {\n if (this.selectedProcessDocumentDefinition !== null) {\n this.processStart.openModal(this.selectedProcessDocumentDefinition);\n this.selectedProcessDocumentDefinition = null;\n }\n }\n\n public selectProcess(processDocumentDefinition: ProcessDocumentDefinition) {\n const modal = $('#startProcess');\n if (!this.modalListenerAdded) {\n modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));\n this.modalListenerAdded = true;\n }\n this.selectedProcessDocumentDefinition = processDocumentDefinition;\n modal.modal('hide');\n }\n\n private findDocumentDefinition(documentDefinitionName: string) {\n this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(definition => {\n this.schema = definition.schema;\n });\n }\n\n private transformDocuments(documentsContent: Array<any>) {\n this.items = documentsContent.map(document => {\n const {content, ...others} = document;\n return {...content, ...others};\n });\n }\n\n public paginationClicked(page: number) {\n this.pagination.page = page;\n this.doSearch();\n }\n\n public sortChanged(sortState: SortState) {\n this.pagination.sort = sortState;\n this.doSearch();\n }\n\n public getInitialSortState(): SortState {\n if (this.hasCachedSearchRequest()) {\n const cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());\n return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;\n }\n return this.initialSortState;\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 {\n Component,\n ElementRef,\n OnInit,\n Renderer2,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ProcessService, ProcessInstanceTask} from '@valtimo/process';\nimport {ActivatedRoute, ParamMap, Router} from '@angular/router';\nimport {DocumentService, Document, ProcessDocumentInstance} from '@valtimo/document';\nimport {TaskDetailModalComponent, TaskService} from '@valtimo/task';\nimport {FormService} from '@valtimo/form';\nimport {FormioOptionsImpl, ValtimoFormioOptions} from '@valtimo/components';\n\nimport * as moment_ from 'moment';\nimport {FormioForm} from 'angular-formio';\nimport {UserProviderService} from '@valtimo/security';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-summary',\n templateUrl: './summary.component.html',\n styleUrls: ['./summary.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierDetailTabSummaryComponent implements OnInit {\n public readonly documentDefinitionName: string;\n public document: Document;\n public documentId: string;\n public processDocumentInstances: ProcessDocumentInstance[] = [];\n private snapshot: ParamMap;\n public tasks: ProcessInstanceTask[] = [];\n public moment;\n public formDefinition: FormioForm = null;\n public options: ValtimoFormioOptions;\n public roles: string[] = [];\n @ViewChild('taskDetail') taskDetail: TaskDetailModalComponent;\n\n constructor(\n private router: Router,\n private documentService: DocumentService,\n private taskService: TaskService,\n private processService: ProcessService,\n private el: ElementRef,\n private renderer: Renderer2,\n private route: ActivatedRoute,\n private formService: FormService,\n private userProviderService: UserProviderService\n ) {\n this.snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';\n this.documentId = this.snapshot.get('documentId') || '';\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n }\n\n ngOnInit() {\n this.moment = moment;\n this.init();\n }\n\n init() {\n this.documentService.getDocument(this.documentId).subscribe(document => {\n this.document = document;\n });\n this.formService\n .getFormDefinitionByNamePreFilled(`${this.documentDefinitionName}.summary`, this.documentId)\n .subscribe(formDefinition => {\n this.formDefinition = formDefinition;\n });\n this.userProviderService.getUserSubject().subscribe(user => {\n this.roles = user.roles;\n this.tasks = [];\n this.loadProcessDocumentInstances(this.documentId);\n });\n }\n\n public loadProcessDocumentInstances(documentId: string) {\n this.documentService\n .findProcessDocumentInstances(documentId)\n .subscribe(processDocumentInstances => {\n this.processDocumentInstances = processDocumentInstances;\n this.processDocumentInstances.forEach(instance => {\n this.loadProcessInstanceTasks(instance.id.processInstanceId);\n });\n });\n }\n\n private loadProcessInstanceTasks(processInstanceId: string) {\n this.processService.getProcessInstanceTasks(processInstanceId).subscribe(tasks => {\n tasks.forEach(task => {\n task.createdUnix = this.moment(task.created).unix();\n task.created = this.moment(task.created).format('DD MMM YYYY HH:mm');\n task.isLocked = () => {\n let locked = true;\n for (const link of task.identityLinks) {\n if (link.type === 'candidate' && link.groupId) {\n if (this.roles.includes(link.groupId)) {\n locked = false;\n break;\n }\n }\n }\n return locked;\n };\n });\n this.tasks = this.tasks.concat(tasks);\n this.tasks.sort((t1, t2) => t2.createdUnix - t1.createdUnix);\n });\n }\n\n public rowTaskClick(task: any) {\n this.taskDetail.openTaskDetails(task);\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 {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService} from '@valtimo/document';\nimport {ProcessDocumentInstance} from '@valtimo/document';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.css'],\n})\nexport class DossierDetailTabProgressComponent implements OnInit {\n public processDocumentInstances: ProcessDocumentInstance[];\n public selectedProcessInstanceId: string;\n public readonly documentId: string;\n\n constructor(private route: ActivatedRoute, private documentService: DocumentService) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n }\n\n ngOnInit() {\n this.documentService\n .findProcessDocumentInstances(this.documentId)\n .subscribe(processDocumentInstances => {\n this.processDocumentInstances = processDocumentInstances;\n this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;\n });\n }\n\n public loadProcessInstance(processInstanceId: string) {\n this.selectedProcessInstanceId = processInstanceId;\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 {Component, EventEmitter, OnInit, Output} from '@angular/core';\nimport {TimelineItem, TimelineItemImpl} from '@valtimo/components';\nimport * as moment_ from 'moment';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService, AuditEvent} from '@valtimo/document';\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-dossier-detail-tab-audit',\n templateUrl: './audit.component.html',\n styleUrls: ['./audit.component.css'],\n})\nexport class DossierDetailTabAuditComponent implements OnInit {\n @Output() paginationClicked: EventEmitter<any> = new EventEmitter();\n\n public timelineItems: TimelineItem[];\n private readonly documentId: string;\n public pagination: any;\n private defaultAuditPage = 0;\n private currentAuditPage: number;\n\n constructor(\n private route: ActivatedRoute,\n private documentService: DocumentService,\n private spinnerService: NgxSpinnerService\n ) {\n this.spinnerService.show('auditSpinner');\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n }\n\n private static getTranslationKey(auditEvent: AuditEvent) {\n const classNameArray = auditEvent.className.split('.');\n const eventName = classNameArray[classNameArray.length - 1];\n return 'events.' + eventName;\n }\n\n ngOnInit() {\n this.loadAuditPage(this.defaultAuditPage);\n }\n\n public loadAuditPage(pageNumber: number) {\n this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(page => {\n const timelineItems = [];\n page.content.forEach(auditRecord => {\n const occurredOn = moment(auditRecord.metaData.occurredOn);\n const fromNow = occurredOn.fromNow();\n timelineItems.push(\n new TimelineItemImpl(\n occurredOn.format('DD MMM YYYY'),\n occurredOn.format('HH:mm'),\n auditRecord.metaData.user,\n fromNow,\n DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent),\n auditRecord.auditEvent\n )\n );\n });\n this.timelineItems = timelineItems;\n this.spinnerService.hide('auditSpinner');\n this.pagination = page;\n this.pagination.number += 1;\n });\n }\n\n public onChangePagination(page) {\n this.paginationClicked.emit(page);\n this.currentAuditPage = page - 1;\n this.loadAuditPage(this.currentAuditPage);\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 {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService, RelatedFile} from '@valtimo/document';\nimport {ResourceDto} from '@valtimo/resource';\nimport {ToastrService} from 'ngx-toastr';\nimport {DownloadService, UploadProviderService} from '@valtimo/resource';\nimport {map, switchMap} from 'rxjs/operators';\nimport {BehaviorSubject, combineLatest, Observable} from 'rxjs';\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfigService} from '@valtimo/config';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-documents',\n templateUrl: './documents.component.html',\n styleUrls: ['./documents.component.css'],\n})\nexport class DossierDetailTabDocumentsComponent implements OnInit {\n public readonly documentId: string;\n public readonly documentDefinitionName: string;\n public readonly maxFileSize: number = this.configService?.config?.caseFileSizeUploadLimitMB || 5;\n private readonly refetch$ = new BehaviorSubject<null>(null);\n public relatedFiles$: Observable<Array<RelatedFile>> = this.refetch$.pipe(\n switchMap(() =>\n combineLatest([\n this.documentService.getDocument(this.documentId),\n this.translateService.stream('key'),\n ])\n ),\n map(([document]) => {\n const relatedFiles = document?.relatedFiles || [];\n const translatedFiles = relatedFiles.map(file => {\n return {\n ...file,\n createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),\n };\n });\n\n return translatedFiles || [];\n })\n );\n\n public fields = [\n {key: 'fileName', label: 'File name'},\n {key: 'sizeInBytes', label: 'Size in bytes'},\n {key: 'createdOn', label: 'Created on', viewType: 'date'},\n {key: 'createdBy', label: 'Created by'},\n ];\n public actions = [\n {\n columnName: '',\n iconClass: 'fas fa-external-link-alt',\n callback: this.downloadDocument.bind(this),\n },\n {\n columnName: '',\n iconClass: 'fas fa-trash-alt',\n callback: this.removeRelatedFile.bind(this),\n },\n ];\n\n readonly uploading$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private readonly route: ActivatedRoute,\n private readonly documentService: DocumentService,\n private readonly toastrService: ToastrService,\n private readonly uploadProviderService: UploadProviderService,\n private readonly downloadService: DownloadService,\n private readonly translateService: TranslateService,\n private readonly configService: ConfigService\n ) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';\n }\n\n ngOnInit(): void {\n this.refetchDocuments();\n }\n\n fileSelected(file: File): void {\n this.uploading$.next(true);\n\n this.uploadProviderService\n .uploadFile(file, this.documentDefinitionName)\n .pipe(\n switchMap(resourceFile =>\n this.documentService.assignResource(this.documentId, resourceFile.data.resourceId)\n )\n )\n .subscribe(\n () => {\n this.toastrService.success('Successfully uploaded document to dossier');\n this.refetchDocuments();\n this.uploading$.next(false);\n },\n () => {\n this.toastrService.error('Failed to upload document to dossier');\n this.uploading$.next(false);\n }\n );\n }\n\n downloadDocument(relatedFile: RelatedFile): void {\n this.uploadProviderService\n .getResource(relatedFile.fileId)\n .subscribe((resource: ResourceDto) => {\n this.downloadService.downloadFile(resource.url, resource.resource.name);\n });\n }\n\n removeRelatedFile(relatedFile: RelatedFile): void {\n this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(\n () => {\n this.toastrService.success('Successfully removed document from dossier');\n this.refetchDocuments();\n },\n () => {\n this.toastrService.error('Failed to remove document from dossier');\n }\n );\n }\n\n private refetchDocuments(): void {\n this.refetch$.next(null);\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 {InjectionToken} from '@angular/core';\nimport {DossierDetailTabSummaryComponent} from './dossier-detail/tab/summary/summary.component';\nimport {DossierDetailTabProgressComponent} from './dossier-detail/tab/progress/progress.component';\nimport {DossierDetailTabAuditComponent} from './dossier-detail/tab/audit/audit.component';\nimport {DossierDetailTabDocumentsComponent} from './dossier-detail/tab/documents/documents.component';\nimport {DefaultTabs} from './dossier-detail-tab-enum';\n\nexport const TAB_MAP = new InjectionToken<Map<string, object>>('TabMap');\nexport const DEFAULT_TABS = new Map<string, object>([\n [DefaultTabs.summary, DossierDetailTabSummaryComponent],\n [DefaultTabs.progress, DossierDetailTabProgressComponent],\n [DefaultTabs.audit, DossierDetailTabAuditComponent],\n [DefaultTabs.documents, DossierDetailTabDocumentsComponent],\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 {Inject, Injectable} from '@angular/core';\nimport {TabImpl} from './models';\nimport {DEFAULT_TABS, TAB_MAP} from './dossier.config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TabService {\n private readonly tabMap: Map<string, object>;\n private readonly tabs: TabImpl[] = [];\n\n constructor(@Inject(TAB_MAP) tabMap: Map<string, object> = DEFAULT_TABS) {\n this.tabMap = tabMap;\n let i = 0;\n this.tabMap.forEach((component, name, map) => {\n this.tabs.push(new TabImpl(name, i, component));\n i++;\n });\n }\n\n public getTabs(): TabImpl[] {\n return this.tabs;\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 {\n Component,\n ComponentFactoryResolver,\n OnInit,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {ActivatedRoute, ParamMap, Router} from '@angular/router';\nimport {DocumentService, Document, ProcessDocumentDefinition} from '@valtimo/document';\nimport {TabLoaderImpl} from '../models';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Location} from '@angular/common';\nimport {TabService} from '../tab.service';\nimport {ProcessService} from '@valtimo/process';\nimport {DossierSupportingProcessStartModalComponent} from '../dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component';\n\n@Component({\n selector: 'valtimo-dossier-detail',\n templateUrl: './dossier-detail.component.html',\n styleUrls: ['./dossier-detail.component.css'],\n})\nexport class DossierDetailComponent implements OnInit {\n @ViewChild('tabContainer', {read: ViewContainerRef, static: true})\n viewContainerRef: ViewContainerRef;\n\n public documentDefinitionName: string;\n public documentDefinitionNameTitle: string;\n public documentId: string;\n public document: Document = null;\n public tabLoader: TabLoaderImpl = null;\n private snapshot: ParamMap;\n public processDefinitionListFields: Array<any> = [];\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n private initialTabName: string;\n @ViewChild('supportingProcessStartModal')\n supportingProcessStart: DossierSupportingProcessStartModalComponent;\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private translateService: TranslateService,\n private documentService: DocumentService,\n private processService: ProcessService,\n private route: ActivatedRoute,\n private router: Router,\n private location: Location,\n private tabService: TabService\n ) {\n this.snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';\n this.documentId = this.snapshot.get('documentId') || '';\n }\n\n ngOnInit() {\n this.tabLoader = new TabLoaderImpl(\n this.tabService.getTabs(),\n this.componentFactoryResolver,\n this.viewContainerRef,\n this.translateService,\n this.router,\n this.location\n );\n this.documentService\n .getDocumentDefinition(this.documentDefinitionName)\n .subscribe(definition => {\n this.documentDefinitionNameTitle = definition.schema.title;\n });\n this.initialTabName = this.snapshot.get('tab');\n this.tabLoader.initial(this.initialTabName);\n this.getAllAssociatedProcessDefinitions();\n }\n\n public getAllAssociatedProcessDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe(processDocumentDefinitions => {\n this.processDocumentDefinitions = processDocumentDefinitions.filter(\n processDocumentDefinition => processDocumentDefinition.startableByUser\n );\n this.processDefinitionListFields = [\n {\n key: 'processName',\n label: 'Proces',\n },\n ];\n });\n }\n\n startProcess(processDocumentDefinition: ProcessDocumentDefinition) {\n this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);\n }\n}\n","/*\n * Copyright 2015-2021 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, ViewChild} from '@angular/core';\nimport {ContactMomentService} from '@valtimo/contact-moment';\nimport * as moment_ from 'moment';\nimport {BehaviorSubject, combineLatest, Observable, Subject} from 'rxjs';\nimport {ModalComponent, TimelineItem, TimelineItemImpl} from '@valtimo/components';\nimport {map, switchMap, take} from 'rxjs/operators';\nimport {AlertService} from '@valtimo/components';\nimport {TranslateService} from '@ngx-translate/core';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-contact-moments',\n templateUrl: './contact-moments.component.html',\n styleUrls: ['./contact-moments.component.scss'],\n})\nexport class DossierDetailTabContactMomentsComponent {\n @ViewChild('contactMomentsNoteModal') modal: ModalComponent;\n\n readonly refetchContactMoments$ = new BehaviorSubject('');\n readonly contactMoments$: Observable<Array<TimelineItem>> = this.refetchContactMoments$.pipe(\n switchMap(() => this.contactMomentService.getContactMoments()),\n map(contactMoments =>\n contactMoments.map(contactMoment => {\n const registratieDatum = moment(contactMoment.registratiedatum);\n return new TimelineItemImpl(\n registratieDatum.format('DD MMM YYYY'),\n registratieDatum.format('HH:mm'),\n contactMoment.medewerkerIdentificatie.achternaam,\n contactMoment.kanaal,\n contactMoment.tekst,\n null\n );\n })\n )\n );\n\n readonly text$ = new BehaviorSubject<string>('');\n readonly channel$ = new BehaviorSubject<string>('MAIL');\n readonly requestData$: Observable<Array<string>> = combineLatest([this.text$, this.channel$]);\n readonly valid$: Observable<boolean> = this.requestData$.pipe(\n map(([text, channel]) => !!(text && channel))\n );\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private readonly contactMomentService: ContactMomentService,\n private readonly alertService: AlertService,\n private readonly translateService: TranslateService\n ) {}\n\n textChange(text: string): void {\n this.text$.next(text);\n }\n\n buttonClick(): void {\n this.modal.show();\n }\n\n saveNote(): void {\n this.disable();\n\n this.requestData$.pipe(take(1)).subscribe(([text, channel]) => {\n this.contactMomentService.saveContactMoment({kanaal: channel, tekst: text}).subscribe(\n () => {\n this.alertService.success(\n this.translateService.instant('dossier.contactMoments.saveSuccess')\n );\n this.enable();\n this.clear();\n this.modal.hide();\n this.refetchContactMoments();\n },\n () => {\n this.enable();\n }\n );\n });\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n\n private clear(): void {\n this.text$.next('');\n }\n\n private refetchContactMoments(): void {\n this.refetchContactMoments$.next('');\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 {Component, OnInit} from '@angular/core';\nimport {TaskService} from '@valtimo/task';\nimport {ActivatedRoute} from '@angular/router';\nimport {ToastrService} from 'ngx-toastr';\nimport {Location} from '@angular/common';\nimport * as momentImported from 'moment';\nimport {DocumentService} from '@valtimo/document';\nimport {DossierService} from '../dossier.service';\n\nconst moment = momentImported;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-update',\n templateUrl: './dossier-update.component.html',\n styleUrls: ['./dossier-update.component.css'],\n})\nexport class DossierUpdateComponent implements OnInit {\n public task: any;\n public taskId: string;\n public schema: any;\n public documentId: string;\n public document: any;\n public page: any;\n public documentDefinitionName: string;\n public implementationDefinitions: any;\n public customDefinitions: any = {};\n\n constructor(\n private taskService: TaskService,\n private documentService: DocumentService,\n private route: ActivatedRoute,\n private toastr: ToastrService,\n private location: Location,\n dossierService: DossierService\n ) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';\n this.documentId = snapshot.get('documentId') || '';\n this.taskId = snapshot.get('taskId') || '';\n this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(\n this.documentDefinitionName\n );\n this.loadDocumentDefinition(this.documentDefinitionName);\n this.loadDocument(this.documentId);\n }\n\n ngOnInit() {\n this.getTask(this.taskId);\n if (this.implementationDefinitions.definitions.detail.summary) {\n this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;\n }\n }\n\n private loadDocumentDefinition(name: string) {\n this.documentService.getDocumentDefinition(name).subscribe(definition => {\n this.schema = definition.schema;\n });\n }\n\n private loadDocument(id: string) {\n this.documentService.getDocument(id).subscribe(document => {\n this.document = document;\n });\n }\n\n public getTask(id: string) {\n this.taskService.getTask(id).subscribe(task => {\n this.task = task;\n this.task.task.created = moment(this.task.task.created).format('DD MMM YYYY HH:mm');\n this.page = {\n title: this.task.task.name,\n subtitle: `Created ${moment(this.task.task.created).fromNow()}`,\n };\n });\n }\n\n public reset() {\n this.loadDocument(this.documentId);\n }\n\n public back() {\n this.location.back();\n }\n\n public save() {\n const document = {\n documentId: this.document.id,\n content: this.document.content,\n versionBasedOn: this.document.version,\n };\n this.documentService.modifyDocument(document).subscribe(result => {\n this.document = result.document;\n this.toastr.success('Document aangepast');\n this.location.back();\n });\n }\n\n public submit(data: object) {\n // merge document content with formdata\n const mergedData = Object.assign({}, this.document.content, data);\n const documentData = {\n request: {\n documentId: this.document.id,\n content: mergedData,\n versionBasedOn: this.document.version,\n },\n taskId: this.task.task.id,\n };\n\n this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(result => {\n this.toastr.success(this.task.task.name + ' has successfully been completed');\n this.location.back();\n });\n }\n\n public returnZero() {\n return 0;\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 {DossierListComponent} from './dossier-list/dossier-list.component';\nimport {DossierDetailComponent} from './dossier-detail/dossier-detail.component';\nimport {DossierUpdateComponent} from './dossier-update/dossier-update.component';\nimport {ROLE_USER} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'dossiers/:documentDefinitionName',\n component: DossierListComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', roles: [ROLE_USER]},\n },\n {\n path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',\n component: DossierDetailComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', parentPath: 'dossiers/:documentDefinitionName', roles: [ROLE_USER]},\n },\n {\n path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',\n component: DossierUpdateComponent,\n canActivate: [AuthGuardService],\n data: {\n title: 'Task details',\n parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',\n roles: [ROLE_USER],\n },\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class DossierRoutingModule {}\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 {Component, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {DocumentService, ProcessDocumentDefinition} from '@valtimo/document';\nimport {FormAssociation, FormSubmissionResult} from '@valtimo/form-link';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {ProcessService} from '@valtimo/process';\nimport {\n FormioComponent,\n ModalComponent,\n FormioOptionsImpl,\n FormioSubmission,\n ValtimoFormioOptions,\n} from '@valtimo/components';\nimport {FormioBeforeSubmit} from 'angular-formio/formio.common';\nimport {FormioForm} from 'angular-formio';\nimport {FormLinkService} from '@valtimo/form-link';\nimport {NGXLogger} from 'ngx-logger';\nimport {UserProviderService} from '@valtimo/security';\n\n@Component({\n selector: 'valtimo-dossier-process-start-modal',\n templateUrl: './dossier-process-start-modal.component.html',\n styleUrls: ['./dossier-process-start-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierProcessStartModalComponent implements OnInit {\n public processDefinitionKey: string;\n public documentDefinitionName: string;\n public processName: string;\n public formDefinition: FormioForm;\n public formioSubmission: FormioSubmission;\n private formAssociation: FormAssociation;\n public options: ValtimoFormioOptions;\n public isAdmin: boolean;\n @ViewChild('form', {static: false}) form: FormioComponent;\n @ViewChild('processStartModal', {static: false}) modal: ModalComponent;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private processService: ProcessService,\n private documentService: DocumentService,\n private formLinkService: FormLinkService,\n private userProviderService: UserProviderService,\n private logger: NGXLogger\n ) {}\n\n ngOnInit() {\n this.isUserAdmin();\n }\n\n private loadFormDefinition() {\n this.formDefinition = null;\n this.formLinkService\n .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)\n .subscribe(\n formDefinition => {\n this.formAssociation = formDefinition.formAssociation;\n const className = this.formAssociation.formLink.className.split('.');\n const linkType = className[className.length - 1];\n switch (linkType) {\n case 'BpmnElementFormIdLink':\n this.formDefinition = formDefinition;\n this.modal.show();\n break;\n case 'BpmnElementUrlLink':\n const url = this.router.serializeUrl(\n this.router.createUrlTree([formDefinition.formAssociation.formLink.url])\n );\n window.open(url, '_blank');\n break;\n case 'BpmnElementAngularStateUrlLink':\n this.router.navigate([formDefinition.formAssociation.formLink.url]);\n break;\n default:\n this.logger.fatal('Unsupported class name');\n }\n },\n errors => {\n this.modal.show();\n }\n );\n }\n\n public gotoFormLinkScreen() {\n this.modal.hide();\n this.router.navigate(['form-links'], {queryParams: {process: this.processDefinitionKey}});\n }\n\n public get modalTitle() {\n return `Start - ${this.processName}`;\n }\n\n openModal(processDocumentDefinition: ProcessDocumentDefinition) {\n this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;\n this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;\n this.processName = processDocumentDefinition.processName;\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n const formioBeforeSubmit: FormioBeforeSubmit = function (submission, callback) {\n callback(null, submission);\n };\n this.options.setHooks(formioBeforeSubmit);\n this.loadFormDefinition();\n }\n\n public onSubmit(submission: FormioSubmission) {\n this.formioSubmission = submission;\n this.formLinkService\n .onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)\n .subscribe(\n (formSubmissionResult: FormSubmissionResult) => {\n this.modal.hide();\n this.router.navigate([\n 'dossiers',\n this.documentDefinitionName,\n 'document',\n formSubmissionResult.documentId,\n 'summary',\n ]);\n },\n errors => {\n this.form.showErrors(errors);\n }\n );\n }\n\n public isUserAdmin() {\n this.userProviderService.getUserSubject().subscribe(\n userIdentity => {\n this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');\n },\n error => {\n this.logger.error('Failed to retrieve user identity', error);\n this.isAdmin = false;\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 {Component, EventEmitter, Output, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {FormioBeforeSubmit, FormioForm} from 'angular-formio';\nimport {\n FormioComponent,\n ModalComponent,\n FormioOptionsImpl,\n FormioSubmission,\n ValtimoFormioOptions,\n} from '@valtimo/components';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {ProcessService} from '@valtimo/process';\nimport {DocumentService, ProcessDocumentDefinition} from '@valtimo/document';\nimport {FormLinkService} from '@valtimo/form-link';\nimport {NGXLogger} from 'ngx-logger';\nimport {FormAssociation, FormSubmissionResult} from '@valtimo/form-link';\nimport {noop} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-dossier-supporting-process-start-modal',\n templateUrl: './dossier-supporting-process-start-modal.component.html',\n styleUrls: ['./dossier-supporting-process-start-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierSupportingProcessStartModalComponent {\n public processDefinitionKey: string;\n public documentDefinitionName: string;\n public processName: string;\n public formDefinition: FormioForm;\n public formioSubmission: FormioSubmission;\n private formAssociation: FormAssociation;\n public options: ValtimoFormioOptions;\n public submission: object;\n\n @ViewChild('form', {static: false}) form: FormioComponent;\n @ViewChild('supportingProcessStartModal', {static: false}) modal: ModalComponent;\n private documentId: string;\n @Output() formSubmit = new EventEmitter();\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private processService: ProcessService,\n private documentService: DocumentService,\n private formLinkService: FormLinkService,\n private logger: NGXLogger\n ) {}\n\n private loadFormDefinition() {\n this.formDefinition = null;\n this.formLinkService\n .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)\n .subscribe(\n formDefinition => {\n this.formAssociation = formDefinition.formAssociation;\n const className = this.formAssociation.formLink.className.split('.');\n const linkType = className[className.length - 1];\n switch (linkType) {\n case 'BpmnElementFormIdLink':\n this.formDefinition = formDefinition;\n this.documentService.getDocument(this.documentId).subscribe(\n document => {\n this.submission = {\n data: document.content,\n };\n },\n () => noop()\n );\n this.modal.show();\n break;\n case 'BpmnElementUrlLink':\n const url = this.router.serializeUrl(\n this.router.createUrlTree([formDefinition.formAssociation.formLink.url])\n );\n window.open(url, '_blank');\n break;\n case 'BpmnElementAngularStateUrlLink':\n this.route.params.pipe(take(1)).subscribe(params => {\n const documentId = params?.documentId;\n\n this.router.navigate([formDefinition.formAssociation.formLink.url], {\n state: {...(documentId && {documentId})},\n });\n });\n break;\n default:\n this.logger.fatal('Unsupported class name');\n }\n },\n errors => {\n this.modal.show();\n }\n );\n }\n\n public get modalTitle() {\n return `Start - ${this.processName}`;\n }\n\n openModal(processDocumentDefinition: ProcessDocumentDefinition, documentId: string) {\n this.documentId = documentId;\n this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;\n this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;\n this.processName = processDocumentDefinition.processName;\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n const formioBeforeSubmit: FormioBeforeSubmit = function (submission, callback) {\n callback(null, submission);\n };\n this.options.setHooks(formioBeforeSubmit);\n this.loadFormDefinition();\n }\n\n public onSubmit(submission: FormioSubmission) {\n this.formioSubmission = submission;\n this.formLinkService\n .onSubmit(\n this.processDefinitionKey,\n this.formAssociation.formLink.id,\n submission.data,\n this.documentId\n )\n .subscribe(\n (formSubmissionResult: FormSubmissionResult) => {\n this.modal.hide();\n this.formSubmit.emit();\n },\n errors => {\n this.form.showErrors(errors);\n }\n );\n }\n\n public gotoFormLinkScreen() {\n this.modal.hide();\n this.router.navigate(['form-links'], {queryParams: {process: this.processDefinitionKey}});\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 {ANALYZE_FOR_ENTRY_COMPONENTS, ModuleWithProviders, NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {DossierRoutingModule} from './dossier-routing.module';\nimport {DossierListComponent} from './dossier-list/dossier-list.component';\nimport {DossierService} from './dossier.service';\nimport {TAB_MAP} from './dossier.config';\nimport {HttpLoaderFactory} from '@valtimo/config';\nimport {\n BpmnJsDiagramModule,\n CamundaFormModule,\n DataListModule,\n FilterSidebarModule,\n FormIoModule,\n ListModule,\n ModalModule,\n SpinnerModule,\n TimelineModule,\n UploaderModule,\n WidgetModule,\n DropzoneModule,\n} from '@valtimo/components';\nimport {DossierDetailComponent} from './dossier-detail/dossier-detail.component';\nimport {DossierDetailTabSummaryComponent} from './dossier-detail/tab/summary/summary.component';\nimport {DossierUpdateComponent} from './dossier-update/dossier-update.component';\nimport {DossierDetailTabProgressComponent} from './dossier-detail/tab/progress/progress.component';\nimport {ProcessModule} from '@valtimo/process';\nimport {DossierDetailTabAuditComponent} from './dossier-detail/tab/audit/audit.component';\nimport {DossierDetailTabContactMomentsComponent} from './dossier-detail/tab/contact-moments/contact-moments.component';\nimport {DossierDetailTabDocumentsComponent} from './dossier-detail/tab/documents/documents.component';\nimport {NgbButtonsModule, NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\nimport {DossierProcessStartModalComponent} from './dossier-process-start-modal/dossier-process-start-modal.component';\nimport {FormModule} from '@valtimo/form';\nimport {FormsModule} from '@angular/forms';\nimport {TranslateLoader, TranslateModule} from '@ngx-translate/core';\nimport {HttpClient} from '@angular/common/http';\nimport {TabService} from './tab.service';\nimport {TaskModule} from '@valtimo/task';\nimport {DossierSupportingProcessStartModalComponent} from './dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component';\nimport {NgbPaginationModule} from '@ng-bootstrap/ng-bootstrap';\nimport {ConfigModule} from '@valtimo/config';\n\nexport type TabsFactory = () => Map<string, object>;\n\n@NgModule({\n declarations: [\n DossierListComponent,\n DossierDetailComponent,\n DossierDetailTabSummaryComponent,\n DossierDetailTabProgressComponent,\n DossierDetailTabAuditComponent,\n DossierDetailTabDocumentsComponent,\n DossierDetailTabContactMomentsComponent,\n DossierUpdateComponent,\n DossierProcessStartModalComponent,\n DossierSupportingProcessStartModalComponent,\n ],\n imports: [\n CommonModule,\n DossierRoutingModule,\n ListModule,\n WidgetModule,\n BpmnJsDiagramModule,\n TimelineModule,\n CamundaFormModule,\n ProcessModule,\n FilterSidebarModule,\n NgbButtonsModule,\n DataListModule,\n FormsModule,\n FormModule,\n FormIoModule,\n ModalModule,\n SpinnerModule,\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient],\n },\n }),\n TaskModule,\n ModalModule,\n NgbTooltipModule,\n UploaderModule,\n DropzoneModule,\n NgbPaginationModule,\n ConfigModule,\n ],\n exports: [DossierListComponent, DossierDetailComponent],\n entryComponents: [\n DossierDetailTabSummaryComponent,\n DossierDetailTabProgressComponent,\n DossierDetailTabAuditComponent,\n DossierDetailTabDocumentsComponent,\n DossierDetailTabContactMomentsComponent,\n ],\n})\nexport class DossierModule {\n static forRoot(tabsFactory: TabsFactory): ModuleWithProviders<DossierModule> {\n return {\n ngModule: DossierModule,\n providers: [\n DossierService,\n TabService,\n {\n provide: TAB_MAP,\n useFactory: tabsFactory,\n },\n {\n provide: ANALYZE_FOR_ENTRY_COMPONENTS,\n useValue: Array.from(tabsFactory().values()),\n multi: true,\n },\n ],\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../../../projects/valtimo/dossier/src/lib/models/tabs.model.ts","../../../../node_modules/tslib/tslib.es6.js","../../../../projects/valtimo/dossier/src/lib/dossier-detail-tab-enum.ts","../../../../projects/valtimo/dossier/src/lib/dossier.service.ts","../../../../projects/valtimo/dossier/src/lib/dossier-list/dossier-list.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/summary/summary.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/progress/progress.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/audit/audit.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/documents/documents.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier.config.ts","../../../../projects/valtimo/dossier/src/lib/tab.service.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/dossier-detail.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-detail/tab/contact-moments/contact-moments.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-update/dossier-update.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-routing.module.ts","../../../../projects/valtimo/dossier/src/lib/dossier-process-start-modal/dossier-process-start-modal.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component.ts","../../../../projects/valtimo/dossier/src/lib/dossier.module.ts"],"names":["TabLoaderImpl","tabs","componentFactoryResolver","viewContainerRef","translateService","router","location","this","_tabs","_componentFactoryResolver","_viewContainerRef","_activeComponent","_activeTab","_translateService","_router","_location","prototype","initial","tabName","initialTab","find","tab","name","load","newTab","forEach","deactivate","replaceView","replaceUrlState","setActive","refreshView","componentFactory","resolveComponentFactory","component","clear","destroy","createComponent","urlParts","url","split","splice","length","newUrl","join","replaceState","activate","Object","defineProperty","translateTabName","instant","TabImpl","sequence","_active","_name","_sequence","_component","isActive","create","__values","o","s","Symbol","iterator","m","i","call","next","value","done","TypeError","__read","n","r","e","ar","push","error","DefaultTabs","DossierService","configService","definitions","config","getImplementationEnvironmentDefinitions","dossiers","definition","getDefinitionColumns","definitionNameId","customDefinitionTables","defaultDefinitionTable","getInitialSortState","columns","defaultColumn","column","default","isSorting","state","propertyName","direction","Injectable","args","providedIn","ConfigService","momentImported","locale","localStorage","getItem","DossierListComponent","route","documentService","dossierService","documentDefinitionName","showCreateDocument","items","fields","processDefinitionListFields","processDocumentDefinitions","pagination","collectionSize","page","size","maxPaginationItemSize","sort","undefined","selectedProcessDocumentDefinition","modalListenerAdded","ngOnInit","doInit","routeEvent","ngOnDestroy","routerSubscription","unsubscribe","translationSubscription","paginationSet","getData","_this","events","subscribe","NavigationEnd","snapshot","paramMap","get","initialSortState","openTranslationSubscription","combineLatest","map","stream","translationKey","labels","index","assign","key","label","sortable","viewType","findDocumentDefinition","hasCachedSearchRequest","documentSearchRequest","getCachedSearch","globalSearchFilter","createdBy","findDocuments","doSearch","getAllAssociatedProcessDefinitions","buildDocumentSearchRequest","getDocuments","documents","transformDocuments","content","totalElements","storeSearch","findProcessDocumentDefinitions","filter","processDocumentDefinition","canInitializeDocument","json","JSON","parse","getCachedDocumentSearchRequest","DocumentSearchRequestImpl","definitionName","setItem","getCachedKey","stringify","rowClick","document","navigate","id","summary","startDossier","$","modal","showStartProcessModal","processStart","openModal","selectProcess","on","bind","getDocumentDefinition","schema","documentsContent","others","t","p","hasOwnProperty","indexOf","getOwnPropertySymbols","propertyIsEnumerable","__rest","paginationClicked","sortChanged","sortState","cachedRequest","Component","selector","template","ActivatedRoute","Router","DocumentService","TranslateService","ViewChild","moment","moment_","defaultFormat","DossierDetailTabSummaryComponent","taskService","processService","el","renderer","formService","userProviderService","processDocumentInstances","tasks","formDefinition","roles","documentId","options","FormioOptionsImpl","disableAlerts","init","getDocument","getFormDefinitionByNamePreFilled","getUserSubject","user","loadProcessDocumentInstances","findProcessDocumentInstances","instance","loadProcessInstanceTasks","processInstanceId","getProcessInstanceTasks","task","createdUnix","created","unix","format","isLocked","locked","_b","identityLinks","_c","link","type","groupId","includes","concat","t1","t2","rowTaskClick","taskDetail","openTaskDetails","encapsulation","ViewEncapsulation","None","TaskService","ProcessService","ElementRef","Renderer2","FormService","UserProviderService","DossierDetailTabProgressComponent","selectedProcessInstanceId","loadProcessInstance","DossierDetailTabAuditComponent","spinnerService","EventEmitter","defaultAuditPage","show","getTranslationKey","auditEvent","classNameArray","className","loadAuditPage","pageNumber","getAuditLog","timelineItems","auditRecord","occurredOn","metaData","fromNow","TimelineItemImpl","hide","number","onChangePagination","emit","currentAuditPage","NgxSpinnerService","Output","DossierDetailTabDocumentsComponent","toastrService","uploadProviderService","downloadService","maxFileSize","_a","caseFileSizeUploadLimitMB","refetch$","BehaviorSubject","relatedFiles$","pipe","switchMap","relatedFiles","file","actions","columnName","iconClass","callback","downloadDocument","removeRelatedFile","uploading$","refetchDocuments","fileSelected","uploadFile","resourceFile","assignResource","data","resourceId","success","relatedFile","getResource","fileId","resource","downloadFile","removeResource","ToastrService","UploadProviderService","DownloadService","TAB_MAP","InjectionToken","DEFAULT_TABS","Map","progress","audit","TabService","tabMap","getTabs","decorators","Inject","DossierDetailComponent","tabService","tabLoader","documentDefinitionNameTitle","title","initialTabName","startableByUser","startProcess","supportingProcessStart","ComponentFactoryResolver","Location","read","ViewContainerRef","static","DossierDetailTabContactMomentsComponent","contactMomentService","alertService","refetchContactMoments$","contactMoments$","getContactMoments","contactMoments","contactMoment","registratieDatum","registratiedatum","medewerkerIdentificatie","achternaam","kanaal","tekst","text$","channel$","requestData$","valid$","text","channel","disabled$","textChange","buttonClick","saveNote","disable","take","saveContactMoment","enable","refetchContactMoments","ContactMomentService","AlertService","DossierUpdateComponent","toastr","customDefinitions","taskId","implementationDefinitions","loadDocumentDefinition","loadDocument","getTask","detail","subtitle","reset","back","save","versionBasedOn","version","modifyDocument","result","submit","mergedData","documentData","request","modifyDocumentAndCompleteTask","returnZero","ROLE_USER","parentPath","routes","path","canActivate","AuthGuardService","NgModule","imports","CommonModule","RouterModule","forChild","exports","DossierProcessStartModalComponent","formLinkService","logger","isUserAdmin","loadFormDefinition","getStartEventFormDefinitionByProcessDefinitionKey","processDefinitionKey","formAssociation","formLink","serializeUrl","createUrlTree","window","open","fatal","errors","gotoFormLinkScreen","queryParams","process","processName","documentDefinitionId","setHooks","submission","onSubmit","formioSubmission","formSubmissionResult","form","showErrors","userIdentity","isAdmin","FormLinkService","NGXLogger","DossierSupportingProcessStartModalComponent","formSubmit","noop","params","HttpLoaderFactory","DossierModule","forRoot","tabsFactory","ngModule","providers","provide","useFactory","ANALYZE_FOR_ENTRY_COMPONENTS","useValue","Array","from","values","multi","declarations","DossierRoutingModule","ListModule","WidgetModule","BpmnJsDiagramModule","TimelineModule","CamundaFormModule","ProcessModule","FilterSidebarModule","NgbButtonsModule","DataListModule","FormsModule","FormModule","FormIoModule","ModalModule","SpinnerModule","TranslateModule","loader","TranslateLoader","deps","HttpClient","TaskModule","NgbTooltipModule","UploaderModule","DropzoneModule","NgbPaginationModule","ConfigModule","entryComponents"],"mappings":"ykDAyCE,SAAAA,EACEC,EACAC,EACAC,EACAC,EACAC,EACAC,GAfeC,KAAAC,MAAmB,KACnBD,KAAAE,0BAAsD,KACtDF,KAAAG,kBAAsC,KAC/CH,KAAAI,iBAAsC,KACtCJ,KAAAK,WAAsB,KACtBL,KAAAM,kBAAsC,KAY5C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AS0B,EAAAA,gBACTzB,WAAU,EACV0B,KAAM,CAACC,EAAAA,eAGXC,EAAAA,WACAP,EAAAA,YACAQ,EAAAA,iBACAC,EAAAA,eACAC,EAAAA,eACAC,EAAAA,oBACAC,EAAAA,cAEF5E,QAAS,CAACxU,EAAsByP,GAChC4J,gBAAiB,CACfhS,EACAuD,EACAG,EACAyB,EACA+D","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 {ComponentFactoryResolver, ComponentRef, ViewContainerRef} from '@angular/core';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Router} from '@angular/router';\nimport {Location} from '@angular/common';\n\nexport interface TabLoader<T_TAB extends Tab> {\n tabs: T_TAB[];\n\n initial(tabName?: string): void;\n\n load(tabToLoad: T_TAB): void;\n\n translateTabName(tab: T_TAB): string;\n}\n\nexport class TabLoaderImpl implements TabLoader<TabImpl> {\n private readonly _tabs: TabImpl[] = null;\n private readonly _componentFactoryResolver: ComponentFactoryResolver = null;\n private readonly _viewContainerRef: ViewContainerRef = null;\n private _activeComponent: ComponentRef<any> = null;\n private _activeTab: TabImpl = null;\n private _translateService: TranslateService = null;\n private _router: Router;\n private _location: Location;\n\n constructor(\n tabs: TabImpl[],\n componentFactoryResolver: ComponentFactoryResolver,\n viewContainerRef: ViewContainerRef,\n translateService: TranslateService,\n router: Router,\n location: Location\n ) {\n this._tabs = tabs;\n this._componentFactoryResolver = componentFactoryResolver;\n this._viewContainerRef = viewContainerRef;\n this._translateService = translateService;\n this._router = router;\n this._location = location;\n }\n\n initial(tabName?: string): void {\n let initialTab;\n if (tabName) {\n initialTab = this._tabs.find(tab => tab.name === tabName);\n } else {\n initialTab = this._tabs[0] || null;\n }\n this.load(initialTab);\n }\n\n load(newTab: TabImpl): void {\n if (newTab !== this._activeTab) {\n this._tabs.forEach(tab => tab.deactivate());\n this.replaceView(newTab);\n this.replaceUrlState(newTab);\n this.setActive(newTab);\n }\n }\n\n refreshView() {\n this.replaceView(this._activeTab);\n }\n\n private replaceView(tab: TabImpl): void {\n const componentFactory = this._componentFactoryResolver.resolveComponentFactory(tab.component);\n this._viewContainerRef.clear();\n if (this._activeTab !== null) {\n this._activeComponent.destroy();\n }\n this._activeComponent = this._viewContainerRef.createComponent(componentFactory);\n }\n\n private replaceUrlState(tab: TabImpl): void {\n const currentUrl = this._router.url;\n const urlParts = currentUrl.split('/');\n urlParts.splice(urlParts.length - 1, 1, tab.name);\n const newUrl = urlParts.join('/');\n this._location.replaceState(newUrl);\n }\n\n private setActive(tab: TabImpl): void {\n tab.activate();\n this._activeTab = tab;\n }\n\n get tabs(): TabImpl[] {\n return this._tabs;\n }\n\n translateTabName(tab: TabImpl): string {\n return this._translateService.instant('dossier.tabs.' + tab.name);\n }\n}\n\nexport interface Tab {\n name: string;\n sequence: number;\n component: any;\n\n activate(): void;\n\n deactivate(): void;\n\n isActive(): boolean;\n}\n\nexport class TabImpl implements Tab {\n private readonly _name: string;\n private readonly _sequence: number;\n private readonly _component: any;\n private _active = false;\n\n constructor(name: string, sequence: number, component: any) {\n this._name = name;\n this._sequence = sequence;\n this._component = component;\n }\n\n get name(): string {\n return this._name;\n }\n\n get sequence(): number {\n return this._sequence;\n }\n\n get component(): any {\n return this._component;\n }\n\n activate(): void {\n this._active = true;\n }\n\n deactivate(): void {\n this._active = false;\n }\n\n isActive(): boolean {\n return this._active;\n }\n}\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\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\nexport enum DefaultTabs {\n summary = 'summary',\n progress = 'progress',\n audit = 'audit',\n documents = 'documents',\n contactMoments = 'contact-moments',\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 {Injectable} from '@angular/core';\nimport {ConfigService, DefinitionColumn} from '@valtimo/config';\nimport {SortState} from '@valtimo/document';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class DossierService {\n private readonly definitions: any;\n\n constructor(private readonly configService: ConfigService) {\n this.definitions = configService.config.definitions;\n }\n\n getImplementationEnvironmentDefinitions(name: string) {\n return this.definitions.dossiers.find(definition => definition.name === name);\n }\n\n getDefinitionColumns(definitionNameId: string): Array<DefinitionColumn> {\n const config = this.configService.config;\n const customDefinitionTable = config.customDefinitionTables[definitionNameId];\n return customDefinitionTable || config.defaultDefinitionTable;\n }\n\n getInitialSortState(columns: Array<DefinitionColumn>): SortState {\n const defaultColumn = columns.find(column => column.default);\n return {\n isSorting: false,\n state: {\n name: defaultColumn ? defaultColumn.propertyName : columns[0].propertyName,\n direction: 'DESC',\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 {Component, OnDestroy, OnInit, ViewChild} from '@angular/core';\nimport {ActivatedRoute, NavigationEnd, Router} from '@angular/router';\nimport {TranslateService} from '@ngx-translate/core';\nimport {DefinitionColumn} from '@valtimo/config';\nimport {\n DocumentSearchRequest,\n DocumentSearchRequestImpl,\n DocumentService,\n SortState,\n ProcessDocumentDefinition,\n} from '@valtimo/document';\nimport * as momentImported from 'moment';\nimport {combineLatest, Subscription} from 'rxjs';\nimport {DefaultTabs} from '../dossier-detail-tab-enum';\nimport {DossierProcessStartModalComponent} from '../dossier-process-start-modal/dossier-process-start-modal.component';\nimport {DossierService} from '../dossier.service';\n\ndeclare var $;\n\nconst moment = momentImported;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-list',\n templateUrl: './dossier-list.component.html',\n styleUrls: ['./dossier-list.component.css'],\n})\nexport class DossierListComponent implements OnInit, OnDestroy {\n public documentDefinitionName = '';\n public implementationDefinitions: any;\n public showCreateDocument = false;\n public schema: any;\n public documents: any;\n public items: Array<any> = [];\n public fields: Array<any> = [];\n public processDefinitionListFields: Array<any> = [];\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n public pagination = {\n collectionSize: 0,\n page: 1,\n size: 10,\n maxPaginationItemSize: 5,\n sort: undefined,\n };\n public globalSearchFilter: string | undefined;\n public sequence: number | undefined;\n public createdBy: string | undefined;\n private selectedProcessDocumentDefinition: ProcessDocumentDefinition | null = null;\n private modalListenerAdded = false;\n @ViewChild('processStartModal') processStart: DossierProcessStartModalComponent;\n\n private routerSubscription: Subscription;\n\n private translationSubscription: Subscription;\n\n initialSortState: SortState;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private documentService: DocumentService,\n private readonly translateService: TranslateService,\n private readonly dossierService: DossierService\n ) {}\n\n ngOnInit(): void {\n this.doInit();\n this.routeEvent(this.router);\n this.modalListenerAdded = false;\n }\n\n ngOnDestroy(): void {\n this.routerSubscription.unsubscribe();\n this.translationSubscription.unsubscribe();\n }\n\n paginationSet() {\n this.getData();\n }\n\n private routeEvent(router: Router) {\n this.routerSubscription = router.events.subscribe(e => {\n if (e instanceof NavigationEnd) {\n this.doInit();\n this.getData();\n }\n });\n }\n\n public doInit() {\n const documentDefinitionName = this.route.snapshot.paramMap.get('documentDefinitionName') || '';\n const columns: Array<DefinitionColumn> =\n this.dossierService.getDefinitionColumns(documentDefinitionName);\n\n this.documentDefinitionName = documentDefinitionName;\n this.initialSortState = this.dossierService.getInitialSortState(columns);\n\n this.openTranslationSubscription(columns);\n }\n\n private openTranslationSubscription(columns: Array<DefinitionColumn>): void {\n this.translationSubscription = combineLatest(\n columns.map(column => this.translateService.stream(`fieldLabels.${column.translationKey}`))\n ).subscribe(labels => {\n this.fields = columns.map((column, index) => ({\n key: column.propertyName,\n label: labels[index],\n sortable: column.sortable,\n ...(column.viewType && {viewType: column.viewType}),\n }));\n });\n }\n\n public getData() {\n this.findDocumentDefinition(this.documentDefinitionName);\n\n if (this.hasCachedSearchRequest()) {\n const documentSearchRequest = this.getCachedSearch();\n this.globalSearchFilter = documentSearchRequest.globalSearchFilter;\n this.sequence = documentSearchRequest.sequence;\n this.createdBy = documentSearchRequest.createdBy;\n this.findDocuments(documentSearchRequest);\n } else {\n this.doSearch();\n }\n\n this.getAllAssociatedProcessDefinitions();\n }\n\n public doSearch() {\n const documentSearchRequest = this.buildDocumentSearchRequest();\n this.findDocuments(documentSearchRequest);\n }\n\n private findDocuments(documentSearchRequest: DocumentSearchRequest) {\n return this.documentService.getDocuments(documentSearchRequest).subscribe(documents => {\n this.documents = documents;\n this.transformDocuments(this.documents.content);\n this.pagination.collectionSize = this.documents.totalElements;\n this.storeSearch(documentSearchRequest);\n });\n }\n\n public getAllAssociatedProcessDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe(processDocumentDefinitions => {\n this.processDocumentDefinitions = processDocumentDefinitions.filter(\n processDocumentDefinition => processDocumentDefinition.canInitializeDocument\n );\n this.processDefinitionListFields = [\n {\n key: 'processName',\n label: 'Proces',\n },\n ];\n });\n }\n\n public getCachedSearch(): DocumentSearchRequest {\n const json = JSON.parse(this.getCachedDocumentSearchRequest());\n return new DocumentSearchRequestImpl(\n json.definitionName,\n this.pagination.page - 1,\n this.pagination.size,\n json.sequence,\n json.createdBy,\n json.globalSearchFilter,\n json.sort\n );\n }\n\n private buildDocumentSearchRequest(): DocumentSearchRequest {\n return new DocumentSearchRequestImpl(\n this.documentDefinitionName,\n this.pagination.page - 1,\n this.pagination.size,\n this.sequence,\n this.createdBy,\n this.globalSearchFilter,\n this.pagination.sort && this.pagination.sort.isSorting\n ? this.pagination.sort\n : this.initialSortState\n );\n }\n\n private storeSearch(documentSearchRequest: DocumentSearchRequest) {\n localStorage.setItem(this.getCachedKey(), JSON.stringify(documentSearchRequest));\n }\n\n private getCachedDocumentSearchRequest(): string {\n return localStorage.getItem(this.getCachedKey()) || '';\n }\n\n private hasCachedSearchRequest(): boolean {\n return localStorage.getItem(this.getCachedKey()) !== null;\n }\n\n private getCachedKey(): string {\n return 'list-search-' + this.documentDefinitionName;\n }\n\n public rowClick(document: any) {\n this.router.navigate([\n `/dossiers/${this.documentDefinitionName}/document/${document.id}/${DefaultTabs.summary}`,\n ]);\n }\n\n public startDossier() {\n if (this.processDocumentDefinitions.length > 1) {\n $('#startProcess').modal('show');\n } else {\n this.selectedProcessDocumentDefinition = this.processDocumentDefinitions[0];\n this.showStartProcessModal();\n }\n }\n\n private showStartProcessModal() {\n if (this.selectedProcessDocumentDefinition !== null) {\n this.processStart.openModal(this.selectedProcessDocumentDefinition);\n this.selectedProcessDocumentDefinition = null;\n }\n }\n\n public selectProcess(processDocumentDefinition: ProcessDocumentDefinition) {\n const modal = $('#startProcess');\n if (!this.modalListenerAdded) {\n modal.on('hidden.bs.modal', this.showStartProcessModal.bind(this));\n this.modalListenerAdded = true;\n }\n this.selectedProcessDocumentDefinition = processDocumentDefinition;\n modal.modal('hide');\n }\n\n private findDocumentDefinition(documentDefinitionName: string) {\n this.documentService.getDocumentDefinition(documentDefinitionName).subscribe(definition => {\n this.schema = definition.schema;\n });\n }\n\n private transformDocuments(documentsContent: Array<any>) {\n this.items = documentsContent.map(document => {\n const {content, ...others} = document;\n return {...content, ...others};\n });\n }\n\n public paginationClicked(page: number) {\n this.pagination.page = page;\n this.doSearch();\n }\n\n public sortChanged(sortState: SortState) {\n this.pagination.sort = sortState;\n this.doSearch();\n }\n\n public getInitialSortState(): SortState {\n if (this.hasCachedSearchRequest()) {\n const cachedRequest = JSON.parse(this.getCachedDocumentSearchRequest());\n return cachedRequest.sort ? cachedRequest.sort : this.initialSortState;\n }\n return this.initialSortState;\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 {\n Component,\n ElementRef,\n OnInit,\n Renderer2,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport {ProcessService, ProcessInstanceTask} from '@valtimo/process';\nimport {ActivatedRoute, ParamMap, Router} from '@angular/router';\nimport {DocumentService, Document, ProcessDocumentInstance} from '@valtimo/document';\nimport {TaskDetailModalComponent, TaskService} from '@valtimo/task';\nimport {FormService} from '@valtimo/form';\nimport {FormioOptionsImpl, ValtimoFormioOptions} from '@valtimo/components';\n\nimport * as moment_ from 'moment';\nimport {FormioForm} from 'angular-formio';\nimport {UserProviderService} from '@valtimo/security';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\nmoment.defaultFormat = 'DD MMM YYYY HH:mm';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-summary',\n templateUrl: './summary.component.html',\n styleUrls: ['./summary.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierDetailTabSummaryComponent implements OnInit {\n public readonly documentDefinitionName: string;\n public document: Document;\n public documentId: string;\n public processDocumentInstances: ProcessDocumentInstance[] = [];\n private snapshot: ParamMap;\n public tasks: ProcessInstanceTask[] = [];\n public moment;\n public formDefinition: FormioForm = null;\n public options: ValtimoFormioOptions;\n public roles: string[] = [];\n @ViewChild('taskDetail') taskDetail: TaskDetailModalComponent;\n\n constructor(\n private router: Router,\n private documentService: DocumentService,\n private taskService: TaskService,\n private processService: ProcessService,\n private el: ElementRef,\n private renderer: Renderer2,\n private route: ActivatedRoute,\n private formService: FormService,\n private userProviderService: UserProviderService\n ) {\n this.snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';\n this.documentId = this.snapshot.get('documentId') || '';\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n }\n\n ngOnInit() {\n this.moment = moment;\n this.init();\n }\n\n init() {\n this.documentService.getDocument(this.documentId).subscribe(document => {\n this.document = document;\n });\n this.formService\n .getFormDefinitionByNamePreFilled(`${this.documentDefinitionName}.summary`, this.documentId)\n .subscribe(formDefinition => {\n this.formDefinition = formDefinition;\n });\n this.userProviderService.getUserSubject().subscribe(user => {\n this.roles = user.roles;\n this.tasks = [];\n this.loadProcessDocumentInstances(this.documentId);\n });\n }\n\n public loadProcessDocumentInstances(documentId: string) {\n this.documentService\n .findProcessDocumentInstances(documentId)\n .subscribe(processDocumentInstances => {\n this.processDocumentInstances = processDocumentInstances;\n this.processDocumentInstances.forEach(instance => {\n this.loadProcessInstanceTasks(instance.id.processInstanceId);\n });\n });\n }\n\n private loadProcessInstanceTasks(processInstanceId: string) {\n this.processService.getProcessInstanceTasks(processInstanceId).subscribe(tasks => {\n tasks.forEach(task => {\n task.createdUnix = this.moment(task.created).unix();\n task.created = this.moment(task.created).format('DD MMM YYYY HH:mm');\n task.isLocked = () => {\n let locked = true;\n for (const link of task.identityLinks) {\n if (link.type === 'candidate' && link.groupId) {\n if (this.roles.includes(link.groupId)) {\n locked = false;\n break;\n }\n }\n }\n return locked;\n };\n });\n this.tasks = this.tasks.concat(tasks);\n this.tasks.sort((t1, t2) => t2.createdUnix - t1.createdUnix);\n });\n }\n\n public rowTaskClick(task: any) {\n this.taskDetail.openTaskDetails(task);\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 {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService} from '@valtimo/document';\nimport {ProcessDocumentInstance} from '@valtimo/document';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-progress',\n templateUrl: './progress.component.html',\n styleUrls: ['./progress.component.css'],\n})\nexport class DossierDetailTabProgressComponent implements OnInit {\n public processDocumentInstances: ProcessDocumentInstance[];\n public selectedProcessInstanceId: string;\n public readonly documentId: string;\n\n constructor(private route: ActivatedRoute, private documentService: DocumentService) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n }\n\n ngOnInit() {\n this.documentService\n .findProcessDocumentInstances(this.documentId)\n .subscribe(processDocumentInstances => {\n this.processDocumentInstances = processDocumentInstances;\n this.selectedProcessInstanceId = processDocumentInstances[0].id.processInstanceId;\n });\n }\n\n public loadProcessInstance(processInstanceId: string) {\n this.selectedProcessInstanceId = processInstanceId;\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 {Component, EventEmitter, OnInit, Output} from '@angular/core';\nimport {TimelineItem, TimelineItemImpl} from '@valtimo/components';\nimport * as moment_ from 'moment';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService, AuditEvent} from '@valtimo/document';\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-dossier-detail-tab-audit',\n templateUrl: './audit.component.html',\n styleUrls: ['./audit.component.css'],\n})\nexport class DossierDetailTabAuditComponent implements OnInit {\n @Output() paginationClicked: EventEmitter<any> = new EventEmitter();\n\n public timelineItems: TimelineItem[];\n private readonly documentId: string;\n public pagination: any;\n private defaultAuditPage = 0;\n private currentAuditPage: number;\n\n constructor(\n private route: ActivatedRoute,\n private documentService: DocumentService,\n private spinnerService: NgxSpinnerService\n ) {\n this.spinnerService.show('auditSpinner');\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n }\n\n private static getTranslationKey(auditEvent: AuditEvent) {\n const classNameArray = auditEvent.className.split('.');\n const eventName = classNameArray[classNameArray.length - 1];\n return 'events.' + eventName;\n }\n\n ngOnInit() {\n this.loadAuditPage(this.defaultAuditPage);\n }\n\n public loadAuditPage(pageNumber: number) {\n this.documentService.getAuditLog(this.documentId, pageNumber).subscribe(page => {\n const timelineItems = [];\n page.content.forEach(auditRecord => {\n const occurredOn = moment(auditRecord.metaData.occurredOn);\n const fromNow = occurredOn.fromNow();\n timelineItems.push(\n new TimelineItemImpl(\n occurredOn.format('DD MMM YYYY'),\n occurredOn.format('HH:mm'),\n auditRecord.metaData.user,\n fromNow,\n DossierDetailTabAuditComponent.getTranslationKey(auditRecord.auditEvent),\n auditRecord.auditEvent\n )\n );\n });\n this.timelineItems = timelineItems;\n this.spinnerService.hide('auditSpinner');\n this.pagination = page;\n this.pagination.number += 1;\n });\n }\n\n public onChangePagination(page) {\n this.paginationClicked.emit(page);\n this.currentAuditPage = page - 1;\n this.loadAuditPage(this.currentAuditPage);\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 {Component, OnInit} from '@angular/core';\nimport {ActivatedRoute} from '@angular/router';\nimport {DocumentService, RelatedFile} from '@valtimo/document';\nimport {ResourceDto} from '@valtimo/resource';\nimport {ToastrService} from 'ngx-toastr';\nimport {DownloadService, UploadProviderService} from '@valtimo/resource';\nimport {map, switchMap} from 'rxjs/operators';\nimport {BehaviorSubject, combineLatest, Observable} from 'rxjs';\nimport {TranslateService} from '@ngx-translate/core';\nimport {ConfigService} from '@valtimo/config';\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-documents',\n templateUrl: './documents.component.html',\n styleUrls: ['./documents.component.css'],\n})\nexport class DossierDetailTabDocumentsComponent implements OnInit {\n public readonly documentId: string;\n public readonly documentDefinitionName: string;\n public readonly maxFileSize: number = this.configService?.config?.caseFileSizeUploadLimitMB || 5;\n private readonly refetch$ = new BehaviorSubject<null>(null);\n public relatedFiles$: Observable<Array<RelatedFile>> = this.refetch$.pipe(\n switchMap(() =>\n combineLatest([\n this.documentService.getDocument(this.documentId),\n this.translateService.stream('key'),\n ])\n ),\n map(([document]) => {\n const relatedFiles = document?.relatedFiles || [];\n const translatedFiles = relatedFiles.map(file => {\n return {\n ...file,\n createdBy: file.createdBy || this.translateService.instant('list.automaticallyGenerated'),\n };\n });\n\n return translatedFiles || [];\n })\n );\n\n public fields = [\n {key: 'fileName', label: 'File name'},\n {key: 'sizeInBytes', label: 'Size in bytes'},\n {key: 'createdOn', label: 'Created on', viewType: 'date'},\n {key: 'createdBy', label: 'Created by'},\n ];\n public actions = [\n {\n columnName: '',\n iconClass: 'mdi mdi-open-in-new',\n callback: this.downloadDocument.bind(this),\n },\n {\n columnName: '',\n iconClass: 'mdi mdi-delete',\n callback: this.removeRelatedFile.bind(this),\n },\n ];\n\n readonly uploading$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private readonly route: ActivatedRoute,\n private readonly documentService: DocumentService,\n private readonly toastrService: ToastrService,\n private readonly uploadProviderService: UploadProviderService,\n private readonly downloadService: DownloadService,\n private readonly translateService: TranslateService,\n private readonly configService: ConfigService\n ) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentId = snapshot.get('documentId') || '';\n this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';\n }\n\n ngOnInit(): void {\n this.refetchDocuments();\n }\n\n fileSelected(file: File): void {\n this.uploading$.next(true);\n\n this.uploadProviderService\n .uploadFile(file, this.documentDefinitionName)\n .pipe(\n switchMap(resourceFile =>\n this.documentService.assignResource(this.documentId, resourceFile.data.resourceId)\n )\n )\n .subscribe(\n () => {\n this.toastrService.success('Successfully uploaded document to dossier');\n this.refetchDocuments();\n this.uploading$.next(false);\n },\n () => {\n this.toastrService.error('Failed to upload document to dossier');\n this.uploading$.next(false);\n }\n );\n }\n\n downloadDocument(relatedFile: RelatedFile): void {\n this.uploadProviderService\n .getResource(relatedFile.fileId)\n .subscribe((resource: ResourceDto) => {\n this.downloadService.downloadFile(resource.url, resource.resource.name);\n });\n }\n\n removeRelatedFile(relatedFile: RelatedFile): void {\n this.documentService.removeResource(this.documentId, relatedFile.fileId).subscribe(\n () => {\n this.toastrService.success('Successfully removed document from dossier');\n this.refetchDocuments();\n },\n () => {\n this.toastrService.error('Failed to remove document from dossier');\n }\n );\n }\n\n private refetchDocuments(): void {\n this.refetch$.next(null);\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 {InjectionToken} from '@angular/core';\nimport {DossierDetailTabSummaryComponent} from './dossier-detail/tab/summary/summary.component';\nimport {DossierDetailTabProgressComponent} from './dossier-detail/tab/progress/progress.component';\nimport {DossierDetailTabAuditComponent} from './dossier-detail/tab/audit/audit.component';\nimport {DossierDetailTabDocumentsComponent} from './dossier-detail/tab/documents/documents.component';\nimport {DefaultTabs} from './dossier-detail-tab-enum';\n\nexport const TAB_MAP = new InjectionToken<Map<string, object>>('TabMap');\nexport const DEFAULT_TABS = new Map<string, object>([\n [DefaultTabs.summary, DossierDetailTabSummaryComponent],\n [DefaultTabs.progress, DossierDetailTabProgressComponent],\n [DefaultTabs.audit, DossierDetailTabAuditComponent],\n [DefaultTabs.documents, DossierDetailTabDocumentsComponent],\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 {Inject, Injectable} from '@angular/core';\nimport {TabImpl} from './models';\nimport {DEFAULT_TABS, TAB_MAP} from './dossier.config';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class TabService {\n private readonly tabMap: Map<string, object>;\n private readonly tabs: TabImpl[] = [];\n\n constructor(@Inject(TAB_MAP) tabMap: Map<string, object> = DEFAULT_TABS) {\n this.tabMap = tabMap;\n let i = 0;\n this.tabMap.forEach((component, name, map) => {\n this.tabs.push(new TabImpl(name, i, component));\n i++;\n });\n }\n\n public getTabs(): TabImpl[] {\n return this.tabs;\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 {\n Component,\n ComponentFactoryResolver,\n OnInit,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport {ActivatedRoute, ParamMap, Router} from '@angular/router';\nimport {DocumentService, Document, ProcessDocumentDefinition} from '@valtimo/document';\nimport {TabLoaderImpl} from '../models';\nimport {TranslateService} from '@ngx-translate/core';\nimport {Location} from '@angular/common';\nimport {TabService} from '../tab.service';\nimport {ProcessService} from '@valtimo/process';\nimport {DossierSupportingProcessStartModalComponent} from '../dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component';\n\n@Component({\n selector: 'valtimo-dossier-detail',\n templateUrl: './dossier-detail.component.html',\n styleUrls: ['./dossier-detail.component.css'],\n})\nexport class DossierDetailComponent implements OnInit {\n @ViewChild('tabContainer', {read: ViewContainerRef, static: true})\n viewContainerRef: ViewContainerRef;\n\n public documentDefinitionName: string;\n public documentDefinitionNameTitle: string;\n public documentId: string;\n public document: Document = null;\n public tabLoader: TabLoaderImpl = null;\n private snapshot: ParamMap;\n public processDefinitionListFields: Array<any> = [];\n public processDocumentDefinitions: ProcessDocumentDefinition[] = [];\n private initialTabName: string;\n @ViewChild('supportingProcessStartModal')\n supportingProcessStart: DossierSupportingProcessStartModalComponent;\n\n constructor(\n private componentFactoryResolver: ComponentFactoryResolver,\n private translateService: TranslateService,\n private documentService: DocumentService,\n private processService: ProcessService,\n private route: ActivatedRoute,\n private router: Router,\n private location: Location,\n private tabService: TabService\n ) {\n this.snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = this.snapshot.get('documentDefinitionName') || '';\n this.documentId = this.snapshot.get('documentId') || '';\n }\n\n ngOnInit() {\n this.tabLoader = new TabLoaderImpl(\n this.tabService.getTabs(),\n this.componentFactoryResolver,\n this.viewContainerRef,\n this.translateService,\n this.router,\n this.location\n );\n this.documentService\n .getDocumentDefinition(this.documentDefinitionName)\n .subscribe(definition => {\n this.documentDefinitionNameTitle = definition.schema.title;\n });\n this.initialTabName = this.snapshot.get('tab');\n this.tabLoader.initial(this.initialTabName);\n this.getAllAssociatedProcessDefinitions();\n }\n\n public getAllAssociatedProcessDefinitions() {\n this.documentService\n .findProcessDocumentDefinitions(this.documentDefinitionName)\n .subscribe(processDocumentDefinitions => {\n this.processDocumentDefinitions = processDocumentDefinitions.filter(\n processDocumentDefinition => processDocumentDefinition.startableByUser\n );\n this.processDefinitionListFields = [\n {\n key: 'processName',\n label: 'Proces',\n },\n ];\n });\n }\n\n startProcess(processDocumentDefinition: ProcessDocumentDefinition) {\n this.supportingProcessStart.openModal(processDocumentDefinition, this.documentId);\n }\n}\n","/*\n * Copyright 2015-2021 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, ViewChild} from '@angular/core';\nimport {ContactMomentService} from '@valtimo/contact-moment';\nimport * as moment_ from 'moment';\nimport {BehaviorSubject, combineLatest, Observable, Subject} from 'rxjs';\nimport {ModalComponent, TimelineItem, TimelineItemImpl} from '@valtimo/components';\nimport {map, switchMap, take} from 'rxjs/operators';\nimport {AlertService} from '@valtimo/components';\nimport {TranslateService} from '@ngx-translate/core';\n\nconst moment = moment_;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-detail-tab-contact-moments',\n templateUrl: './contact-moments.component.html',\n styleUrls: ['./contact-moments.component.scss'],\n})\nexport class DossierDetailTabContactMomentsComponent {\n @ViewChild('contactMomentsNoteModal') modal: ModalComponent;\n\n readonly refetchContactMoments$ = new BehaviorSubject('');\n readonly contactMoments$: Observable<Array<TimelineItem>> = this.refetchContactMoments$.pipe(\n switchMap(() => this.contactMomentService.getContactMoments()),\n map(contactMoments =>\n contactMoments.map(contactMoment => {\n const registratieDatum = moment(contactMoment.registratiedatum);\n return new TimelineItemImpl(\n registratieDatum.format('DD MMM YYYY'),\n registratieDatum.format('HH:mm'),\n contactMoment.medewerkerIdentificatie.achternaam,\n contactMoment.kanaal,\n contactMoment.tekst,\n null\n );\n })\n )\n );\n\n readonly text$ = new BehaviorSubject<string>('');\n readonly channel$ = new BehaviorSubject<string>('MAIL');\n readonly requestData$: Observable<Array<string>> = combineLatest([this.text$, this.channel$]);\n readonly valid$: Observable<boolean> = this.requestData$.pipe(\n map(([text, channel]) => !!(text && channel))\n );\n readonly disabled$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private readonly contactMomentService: ContactMomentService,\n private readonly alertService: AlertService,\n private readonly translateService: TranslateService\n ) {}\n\n textChange(text: string): void {\n this.text$.next(text);\n }\n\n buttonClick(): void {\n this.modal.show();\n }\n\n saveNote(): void {\n this.disable();\n\n this.requestData$.pipe(take(1)).subscribe(([text, channel]) => {\n this.contactMomentService.saveContactMoment({kanaal: channel, tekst: text}).subscribe(\n () => {\n this.alertService.success(\n this.translateService.instant('dossier.contactMoments.saveSuccess')\n );\n this.enable();\n this.clear();\n this.modal.hide();\n this.refetchContactMoments();\n },\n () => {\n this.enable();\n }\n );\n });\n }\n\n private disable(): void {\n this.disabled$.next(true);\n }\n\n private enable(): void {\n this.disabled$.next(false);\n }\n\n private clear(): void {\n this.text$.next('');\n }\n\n private refetchContactMoments(): void {\n this.refetchContactMoments$.next('');\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 {Component, OnInit} from '@angular/core';\nimport {TaskService} from '@valtimo/task';\nimport {ActivatedRoute} from '@angular/router';\nimport {ToastrService} from 'ngx-toastr';\nimport {Location} from '@angular/common';\nimport * as momentImported from 'moment';\nimport {DocumentService} from '@valtimo/document';\nimport {DossierService} from '../dossier.service';\n\nconst moment = momentImported;\nmoment.locale(localStorage.getItem('langKey') || '');\n\n@Component({\n selector: 'valtimo-dossier-update',\n templateUrl: './dossier-update.component.html',\n styleUrls: ['./dossier-update.component.css'],\n})\nexport class DossierUpdateComponent implements OnInit {\n public task: any;\n public taskId: string;\n public schema: any;\n public documentId: string;\n public document: any;\n public page: any;\n public documentDefinitionName: string;\n public implementationDefinitions: any;\n public customDefinitions: any = {};\n\n constructor(\n private taskService: TaskService,\n private documentService: DocumentService,\n private route: ActivatedRoute,\n private toastr: ToastrService,\n private location: Location,\n dossierService: DossierService\n ) {\n const snapshot = this.route.snapshot.paramMap;\n this.documentDefinitionName = snapshot.get('documentDefinitionName') || '';\n this.documentId = snapshot.get('documentId') || '';\n this.taskId = snapshot.get('taskId') || '';\n this.implementationDefinitions = dossierService.getImplementationEnvironmentDefinitions(\n this.documentDefinitionName\n );\n this.loadDocumentDefinition(this.documentDefinitionName);\n this.loadDocument(this.documentId);\n }\n\n ngOnInit() {\n this.getTask(this.taskId);\n if (this.implementationDefinitions.definitions.detail.summary) {\n this.customDefinitions = this.implementationDefinitions.definitions.detail.summary;\n }\n }\n\n private loadDocumentDefinition(name: string) {\n this.documentService.getDocumentDefinition(name).subscribe(definition => {\n this.schema = definition.schema;\n });\n }\n\n private loadDocument(id: string) {\n this.documentService.getDocument(id).subscribe(document => {\n this.document = document;\n });\n }\n\n public getTask(id: string) {\n this.taskService.getTask(id).subscribe(task => {\n this.task = task;\n this.task.task.created = moment(this.task.task.created).format('DD MMM YYYY HH:mm');\n this.page = {\n title: this.task.task.name,\n subtitle: `Created ${moment(this.task.task.created).fromNow()}`,\n };\n });\n }\n\n public reset() {\n this.loadDocument(this.documentId);\n }\n\n public back() {\n this.location.back();\n }\n\n public save() {\n const document = {\n documentId: this.document.id,\n content: this.document.content,\n versionBasedOn: this.document.version,\n };\n this.documentService.modifyDocument(document).subscribe(result => {\n this.document = result.document;\n this.toastr.success('Document aangepast');\n this.location.back();\n });\n }\n\n public submit(data: object) {\n // merge document content with formdata\n const mergedData = Object.assign({}, this.document.content, data);\n const documentData = {\n request: {\n documentId: this.document.id,\n content: mergedData,\n versionBasedOn: this.document.version,\n },\n taskId: this.task.task.id,\n };\n\n this.documentService.modifyDocumentAndCompleteTask(documentData).subscribe(result => {\n this.toastr.success(this.task.task.name + ' has successfully been completed');\n this.location.back();\n });\n }\n\n public returnZero() {\n return 0;\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 {DossierListComponent} from './dossier-list/dossier-list.component';\nimport {DossierDetailComponent} from './dossier-detail/dossier-detail.component';\nimport {DossierUpdateComponent} from './dossier-update/dossier-update.component';\nimport {ROLE_USER} from '@valtimo/config';\n\nconst routes: Routes = [\n {\n path: 'dossiers/:documentDefinitionName',\n component: DossierListComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', roles: [ROLE_USER]},\n },\n {\n path: 'dossiers/:documentDefinitionName/document/:documentId/:tab',\n component: DossierDetailComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Dossiers', parentPath: 'dossiers/:documentDefinitionName', roles: [ROLE_USER]},\n },\n {\n path: 'dossiers/:documentDefinitionName/document/:documentId/:tab/tasks/:taskId',\n component: DossierUpdateComponent,\n canActivate: [AuthGuardService],\n data: {\n title: 'Task details',\n parentPath: 'dossiers/:documentDefinitionName/document/:documentId/:tab',\n roles: [ROLE_USER],\n },\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class DossierRoutingModule {}\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 {Component, OnInit, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {DocumentService, ProcessDocumentDefinition} from '@valtimo/document';\nimport {FormAssociation, FormSubmissionResult} from '@valtimo/form-link';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {ProcessService} from '@valtimo/process';\nimport {\n FormioComponent,\n ModalComponent,\n FormioOptionsImpl,\n FormioSubmission,\n ValtimoFormioOptions,\n} from '@valtimo/components';\nimport {FormioBeforeSubmit} from 'angular-formio/formio.common';\nimport {FormioForm} from 'angular-formio';\nimport {FormLinkService} from '@valtimo/form-link';\nimport {NGXLogger} from 'ngx-logger';\nimport {UserProviderService} from '@valtimo/security';\n\n@Component({\n selector: 'valtimo-dossier-process-start-modal',\n templateUrl: './dossier-process-start-modal.component.html',\n styleUrls: ['./dossier-process-start-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierProcessStartModalComponent implements OnInit {\n public processDefinitionKey: string;\n public documentDefinitionName: string;\n public processName: string;\n public formDefinition: FormioForm;\n public formioSubmission: FormioSubmission;\n private formAssociation: FormAssociation;\n public options: ValtimoFormioOptions;\n public isAdmin: boolean;\n @ViewChild('form', {static: false}) form: FormioComponent;\n @ViewChild('processStartModal', {static: false}) modal: ModalComponent;\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private processService: ProcessService,\n private documentService: DocumentService,\n private formLinkService: FormLinkService,\n private userProviderService: UserProviderService,\n private logger: NGXLogger\n ) {}\n\n ngOnInit() {\n this.isUserAdmin();\n }\n\n private loadFormDefinition() {\n this.formDefinition = null;\n this.formLinkService\n .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)\n .subscribe(\n formDefinition => {\n this.formAssociation = formDefinition.formAssociation;\n const className = this.formAssociation.formLink.className.split('.');\n const linkType = className[className.length - 1];\n switch (linkType) {\n case 'BpmnElementFormIdLink':\n this.formDefinition = formDefinition;\n this.modal.show();\n break;\n case 'BpmnElementUrlLink':\n const url = this.router.serializeUrl(\n this.router.createUrlTree([formDefinition.formAssociation.formLink.url])\n );\n window.open(url, '_blank');\n break;\n case 'BpmnElementAngularStateUrlLink':\n this.router.navigate([formDefinition.formAssociation.formLink.url]);\n break;\n default:\n this.logger.fatal('Unsupported class name');\n }\n },\n errors => {\n this.modal.show();\n }\n );\n }\n\n public gotoFormLinkScreen() {\n this.modal.hide();\n this.router.navigate(['form-links'], {queryParams: {process: this.processDefinitionKey}});\n }\n\n public get modalTitle() {\n return `Start - ${this.processName}`;\n }\n\n openModal(processDocumentDefinition: ProcessDocumentDefinition) {\n this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;\n this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;\n this.processName = processDocumentDefinition.processName;\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n const formioBeforeSubmit: FormioBeforeSubmit = function (submission, callback) {\n callback(null, submission);\n };\n this.options.setHooks(formioBeforeSubmit);\n this.loadFormDefinition();\n }\n\n public onSubmit(submission: FormioSubmission) {\n this.formioSubmission = submission;\n this.formLinkService\n .onSubmit(this.processDefinitionKey, this.formAssociation.formLink.id, submission.data)\n .subscribe(\n (formSubmissionResult: FormSubmissionResult) => {\n this.modal.hide();\n this.router.navigate([\n 'dossiers',\n this.documentDefinitionName,\n 'document',\n formSubmissionResult.documentId,\n 'summary',\n ]);\n },\n errors => {\n this.form.showErrors(errors);\n }\n );\n }\n\n public isUserAdmin() {\n this.userProviderService.getUserSubject().subscribe(\n userIdentity => {\n this.isAdmin = userIdentity.roles.includes('ROLE_ADMIN');\n },\n error => {\n this.logger.error('Failed to retrieve user identity', error);\n this.isAdmin = false;\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 {Component, EventEmitter, Output, ViewChild, ViewEncapsulation} from '@angular/core';\nimport {FormioBeforeSubmit, FormioForm} from 'angular-formio';\nimport {\n FormioComponent,\n ModalComponent,\n FormioOptionsImpl,\n FormioSubmission,\n ValtimoFormioOptions,\n} from '@valtimo/components';\nimport {ActivatedRoute, Router} from '@angular/router';\nimport {ProcessService} from '@valtimo/process';\nimport {DocumentService, ProcessDocumentDefinition} from '@valtimo/document';\nimport {FormLinkService} from '@valtimo/form-link';\nimport {NGXLogger} from 'ngx-logger';\nimport {FormAssociation, FormSubmissionResult} from '@valtimo/form-link';\nimport {noop} from 'rxjs';\nimport {take} from 'rxjs/operators';\n\n@Component({\n selector: 'valtimo-dossier-supporting-process-start-modal',\n templateUrl: './dossier-supporting-process-start-modal.component.html',\n styleUrls: ['./dossier-supporting-process-start-modal.component.scss'],\n encapsulation: ViewEncapsulation.None,\n})\nexport class DossierSupportingProcessStartModalComponent {\n public processDefinitionKey: string;\n public documentDefinitionName: string;\n public processName: string;\n public formDefinition: FormioForm;\n public formioSubmission: FormioSubmission;\n private formAssociation: FormAssociation;\n public options: ValtimoFormioOptions;\n public submission: object;\n\n @ViewChild('form', {static: false}) form: FormioComponent;\n @ViewChild('supportingProcessStartModal', {static: false}) modal: ModalComponent;\n private documentId: string;\n @Output() formSubmit = new EventEmitter();\n\n constructor(\n private route: ActivatedRoute,\n private router: Router,\n private processService: ProcessService,\n private documentService: DocumentService,\n private formLinkService: FormLinkService,\n private logger: NGXLogger\n ) {}\n\n private loadFormDefinition() {\n this.formDefinition = null;\n this.formLinkService\n .getStartEventFormDefinitionByProcessDefinitionKey(this.processDefinitionKey)\n .subscribe(\n formDefinition => {\n this.formAssociation = formDefinition.formAssociation;\n const className = this.formAssociation.formLink.className.split('.');\n const linkType = className[className.length - 1];\n switch (linkType) {\n case 'BpmnElementFormIdLink':\n this.formDefinition = formDefinition;\n this.documentService.getDocument(this.documentId).subscribe(\n document => {\n this.submission = {\n data: document.content,\n };\n },\n () => noop()\n );\n this.modal.show();\n break;\n case 'BpmnElementUrlLink':\n const url = this.router.serializeUrl(\n this.router.createUrlTree([formDefinition.formAssociation.formLink.url])\n );\n window.open(url, '_blank');\n break;\n case 'BpmnElementAngularStateUrlLink':\n this.route.params.pipe(take(1)).subscribe(params => {\n const documentId = params?.documentId;\n\n this.router.navigate([formDefinition.formAssociation.formLink.url], {\n state: {...(documentId && {documentId})},\n });\n });\n break;\n default:\n this.logger.fatal('Unsupported class name');\n }\n },\n errors => {\n this.modal.show();\n }\n );\n }\n\n public get modalTitle() {\n return `Start - ${this.processName}`;\n }\n\n openModal(processDocumentDefinition: ProcessDocumentDefinition, documentId: string) {\n this.documentId = documentId;\n this.documentDefinitionName = processDocumentDefinition.id.documentDefinitionId.name;\n this.processDefinitionKey = processDocumentDefinition.id.processDefinitionKey;\n this.processName = processDocumentDefinition.processName;\n this.options = new FormioOptionsImpl();\n this.options.disableAlerts = true;\n const formioBeforeSubmit: FormioBeforeSubmit = function (submission, callback) {\n callback(null, submission);\n };\n this.options.setHooks(formioBeforeSubmit);\n this.loadFormDefinition();\n }\n\n public onSubmit(submission: FormioSubmission) {\n this.formioSubmission = submission;\n this.formLinkService\n .onSubmit(\n this.processDefinitionKey,\n this.formAssociation.formLink.id,\n submission.data,\n this.documentId\n )\n .subscribe(\n (formSubmissionResult: FormSubmissionResult) => {\n this.modal.hide();\n this.formSubmit.emit();\n },\n errors => {\n this.form.showErrors(errors);\n }\n );\n }\n\n public gotoFormLinkScreen() {\n this.modal.hide();\n this.router.navigate(['form-links'], {queryParams: {process: this.processDefinitionKey}});\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 {ANALYZE_FOR_ENTRY_COMPONENTS, ModuleWithProviders, NgModule} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {DossierRoutingModule} from './dossier-routing.module';\nimport {DossierListComponent} from './dossier-list/dossier-list.component';\nimport {DossierService} from './dossier.service';\nimport {TAB_MAP} from './dossier.config';\nimport {HttpLoaderFactory} from '@valtimo/config';\nimport {\n BpmnJsDiagramModule,\n CamundaFormModule,\n DataListModule,\n FilterSidebarModule,\n FormIoModule,\n ListModule,\n ModalModule,\n SpinnerModule,\n TimelineModule,\n UploaderModule,\n WidgetModule,\n DropzoneModule,\n} from '@valtimo/components';\nimport {DossierDetailComponent} from './dossier-detail/dossier-detail.component';\nimport {DossierDetailTabSummaryComponent} from './dossier-detail/tab/summary/summary.component';\nimport {DossierUpdateComponent} from './dossier-update/dossier-update.component';\nimport {DossierDetailTabProgressComponent} from './dossier-detail/tab/progress/progress.component';\nimport {ProcessModule} from '@valtimo/process';\nimport {DossierDetailTabAuditComponent} from './dossier-detail/tab/audit/audit.component';\nimport {DossierDetailTabContactMomentsComponent} from './dossier-detail/tab/contact-moments/contact-moments.component';\nimport {DossierDetailTabDocumentsComponent} from './dossier-detail/tab/documents/documents.component';\nimport {NgbButtonsModule, NgbTooltipModule} from '@ng-bootstrap/ng-bootstrap';\nimport {DossierProcessStartModalComponent} from './dossier-process-start-modal/dossier-process-start-modal.component';\nimport {FormModule} from '@valtimo/form';\nimport {FormsModule} from '@angular/forms';\nimport {TranslateLoader, TranslateModule} from '@ngx-translate/core';\nimport {HttpClient} from '@angular/common/http';\nimport {TabService} from './tab.service';\nimport {TaskModule} from '@valtimo/task';\nimport {DossierSupportingProcessStartModalComponent} from './dossier-supporting-process-start-modal/dossier-supporting-process-start-modal.component';\nimport {NgbPaginationModule} from '@ng-bootstrap/ng-bootstrap';\nimport {ConfigModule} from '@valtimo/config';\n\nexport type TabsFactory = () => Map<string, object>;\n\n@NgModule({\n declarations: [\n DossierListComponent,\n DossierDetailComponent,\n DossierDetailTabSummaryComponent,\n DossierDetailTabProgressComponent,\n DossierDetailTabAuditComponent,\n DossierDetailTabDocumentsComponent,\n DossierDetailTabContactMomentsComponent,\n DossierUpdateComponent,\n DossierProcessStartModalComponent,\n DossierSupportingProcessStartModalComponent,\n ],\n imports: [\n CommonModule,\n DossierRoutingModule,\n ListModule,\n WidgetModule,\n BpmnJsDiagramModule,\n TimelineModule,\n CamundaFormModule,\n ProcessModule,\n FilterSidebarModule,\n NgbButtonsModule,\n DataListModule,\n FormsModule,\n FormModule,\n FormIoModule,\n ModalModule,\n SpinnerModule,\n TranslateModule.forRoot({\n loader: {\n provide: TranslateLoader,\n useFactory: HttpLoaderFactory,\n deps: [HttpClient],\n },\n }),\n TaskModule,\n ModalModule,\n NgbTooltipModule,\n UploaderModule,\n DropzoneModule,\n NgbPaginationModule,\n ConfigModule,\n ],\n exports: [DossierListComponent, DossierDetailComponent],\n entryComponents: [\n DossierDetailTabSummaryComponent,\n DossierDetailTabProgressComponent,\n DossierDetailTabAuditComponent,\n DossierDetailTabDocumentsComponent,\n DossierDetailTabContactMomentsComponent,\n ],\n})\nexport class DossierModule {\n static forRoot(tabsFactory: TabsFactory): ModuleWithProviders<DossierModule> {\n return {\n ngModule: DossierModule,\n providers: [\n DossierService,\n TabService,\n {\n provide: TAB_MAP,\n useFactory: tabsFactory,\n },\n {\n provide: ANALYZE_FOR_ENTRY_COMPONENTS,\n useValue: Array.from(tabsFactory().values()),\n multi: true,\n },\n ],\n };\n }\n}\n"]}
|