ngx-techlify-core 11.4.1 → 11.4.5-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/bundles/ngx-techlify-core.umd.js +203 -114
  2. package/bundles/ngx-techlify-core.umd.js.map +1 -1
  3. package/bundles/ngx-techlify-core.umd.min.js +2 -2
  4. package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
  5. package/esm2015/lib/entity-files/entity-file-form/entity-file-form.component.js +6 -9
  6. package/esm2015/lib/entity-files/entity-file.service.js +6 -2
  7. package/esm2015/lib/entity-files/entity-files-view-all.component.js +47 -4
  8. package/esm2015/lib/import-csv/import-csv.component.js +3 -2
  9. package/esm2015/lib/import-csv/import-history-list/import-history-list.component.js +3 -2
  10. package/esm2015/lib/material.module.js +4 -2
  11. package/esm2015/lib/searchable-selector/searchable-selector.component.js +6 -4
  12. package/esm2015/lib/techlify-feature/techlify-feature.routing.js +2 -2
  13. package/esm2015/lib/techlify-feature/techlify-feature.service.js +2 -2
  14. package/esm2015/lib/techlify-update/update-notifier/update-notifier.component.js +2 -2
  15. package/esm2015/lib/timeline-filter/calculate-timeline.js +62 -50
  16. package/esm2015/lib/timeline-filter/timeline-filter.component.js +17 -13
  17. package/esm2015/lib/timeline-filter/timeline.model.js +4 -1
  18. package/esm2015/ngx-techlify-core.js +10 -11
  19. package/fesm2015/ngx-techlify-core.js +159 -95
  20. package/fesm2015/ngx-techlify-core.js.map +1 -1
  21. package/lib/entity-files/entity-file.service.d.ts +1 -1
  22. package/lib/entity-files/entity-files-view-all.component.d.ts +6 -0
  23. package/lib/import-csv/import-csv.component.d.ts +2 -1
  24. package/lib/import-csv/import-history-list/import-history-list.component.d.ts +2 -1
  25. package/lib/searchable-selector/searchable-selector.component.d.ts +1 -0
  26. package/lib/techlify-feature/techlify-feature.service.d.ts +1 -1
  27. package/lib/timeline-filter/timeline.model.d.ts +3 -0
  28. package/ngx-techlify-core.d.ts +9 -10
  29. package/ngx-techlify-core.metadata.json +1 -1
  30. package/package.json +3 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.model.ts","../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.component.ts","../../../node_modules/tslib/tslib.es6.js","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.component.ts","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.model.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/document-viewer.component.ts","../../../projects/ngx-techlify-core/src/lib/core/logger.service.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/viewer-config.model.ts","../../../projects/ngx-techlify-core/src/lib/core/techlify-config.model.ts","../../../projects/ngx-techlify-core/src/lib/core/config.service.ts","../../../projects/ngx-techlify-core/src/lib/core/snack/snack.component.ts","../../../projects/ngx-techlify-core/src/lib/core/alert.service.ts","../../../projects/ngx-techlify-core/src/lib/core/error-handler.service.ts","../../../projects/ngx-techlify-core/src/lib/core/error-handler.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/http-cache.service.ts","../../../projects/ngx-techlify-core/src/lib/core/cache.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/api-prefix.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/credentials.service.ts","../../../projects/ngx-techlify-core/src/lib/core/token.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/header.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/http.service.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-file.service.ts","../../../projects/ngx-techlify-core/src/lib/core/form-validator.service.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-file-form/entity-file-form.component.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-files-view-all.component.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.component.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.model.ts","../../../projects/ngx-techlify-core/src/lib/note/note.service.ts","../../../projects/ngx-techlify-core/src/lib/note/note-form/note-form.component.ts","../../../projects/ngx-techlify-core/src/lib/note/note-list/note-list.component.ts","../../../projects/ngx-techlify-core/src/lib/note/comment-form/comment-form.component.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/searchable-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/mat-select-infinite-scroll.directive.ts","../../../projects/ngx-techlify-core/src/lib/utility/num-items-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/utility/date-utils.service.ts","../../../projects/ngx-techlify-core/src/lib/utility/number-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/calculate-timeline.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline.model.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/loader/loader.component.ts","../../../projects/ngx-techlify-core/src/lib/core/snack/snack.module.ts","../../../projects/ngx-techlify-core/src/lib/core/authentication.guard.ts","../../../projects/ngx-techlify-core/src/lib/core/authentication.service.ts","../../../projects/ngx-techlify-core/src/lib/core/route-reusable-strategy.ts","../../../projects/ngx-techlify-core/src/lib/core/storage.service.ts","../../../projects/ngx-techlify-core/src/lib/core/dataManager.service.ts","../../../projects/ngx-techlify-core/src/lib/material.module.ts","../../../projects/ngx-techlify-core/src/lib/core/core.module.ts","../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.module.ts","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.module.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/document-viewer.module.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.module.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-files-view-all.module.ts","../../../projects/ngx-techlify-core/src/lib/read-more/read-more.component.ts","../../../projects/ngx-techlify-core/src/lib/read-more/read-more.module.ts","../../../projects/ngx-techlify-core/src/lib/note/note.module.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/searchable-selector.module.ts","../../../projects/ngx-techlify-core/src/lib/utility/utility.module.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/loader/loader.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update.service.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-form/techlify-update-form.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-form/techlify-update-form.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-view/update-view.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-view/update-view.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier.module.ts","../../../projects/ngx-techlify-core/src/lib/export-excel/export-excel-button/export-excel-button.component.ts","../../../projects/ngx-techlify-core/src/lib/export-excel/export-excel.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/date-validator.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log.module.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-success/import-success.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-history-list/import-history-list.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/field-mapping/field-mapping.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/failed-items-list/failed-items-list.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-csv.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/data-import/data-import.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-csv.module.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user.component.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.service.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature-listing.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.routing.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/on-off-switch/on-off-switch.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature-enabled.directive.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.module.ts"],"names":["ActionPopupComponent","dialogRef","data","this","prototype","ngOnInit","closeDialog","close","confirm","Component","args","selector","template","MatDialogRef","ActionPopup","decorators","type","Inject","MAT_DIALOG_DATA","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","call","__extends","TypeError","String","__","constructor","create","__decorate","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","pop","push","__values","o","s","m","__read","ar","error","__spread","concat","DataTableComponent","DataTableComponent_1","dataSource","MatTableDataSource","action","EventEmitter","selctionChange","rowClick","tableScroll","sortChanged","elementId","nextId","ngAfterViewInit","_this","selection","changed","pipe","subscribe","change","selected","emit","sort","sortChange","untilDestroyed","isAllSelected","masterToggle","clearSelection","forEach","row","select","clear","ngOnChanges","changes","initializeConfig","isFirstChange","currentValue","config","page","lastPage","perPage","onScroll","editClicked","event","element","stopPropagation","viewClicked","deactivateClicked","downloadClicked","printClicked","rowClicked","actionMenuClick","menuValue","trigger","closeMenu","actionMenuTriggerClick","checkEdit","ele","editDisableFunction","checkView","viewDisableFunction","checkPrint","printDisableFunction","checkActions","actionsMenuFunction","checkActionButton","actionsMenuButtonFunction","getValue","keyString","keyList","replace","split","ngOnDestroy","Input","Output","ViewChild","MatSort","static","UntilDestroy","DocumentViewerComponent","remove","initData","removeFile","file","ext","getFileExtension","viewerType","nameArray","LogLevel","Logger","source","enableProductionMode","level","Warning","debug","objects","_i","log","console","Debug","info","Info","warn","Error","func","outputs","output","TechlifyConfig","projectKey","environment","authClientSecret","authGrantType","apiUrl","loadFromMap","storage","rawConfigs","ConfigService","getConfigsRaw","getProjectKey","getApiUrl","getAuthClientSecret","getStorage","localStorage","getAuthGrantType","getCredentialsKey","BASE_CREDENTIALS","Injectable","providedIn","MAT_SNACK_BAR_DATA","AlertService","snackBar","addAlert","message","alertType","duration","openFromComponent","SuccessSnackComponent","ErrorSnackComponent","MatSnackBar","ErrorHandlerService","alerter","handleError","errorResponse","msg","errors","_a","property","_b","_c","_d","errMessage","ErrorHandlerInterceptor","configService","errorHandler","intercept","request","handle","catchError","ErrorEvent","throwError","HttpCacheService","cachedData","cachePersistenceKey","loadCacheData","setCacheData","url","lastUpdated","Date","saveCacheData","getCacheData","cacheEntry","getHttpCacheEntry","clearCache","cleanCache","expirationDate","keys","setPersistence","persistence","sessionStorage","JSON","stringify","parse","CacheInterceptor","httpCacheService","forceUpdate","configure","options","instance","update","method","Observable","subscriber","urlWithParams","HttpResponse","complete","ApiPrefixInterceptor","test","clone","CredentialsService","_credentials","credentials","getItem","setCredentials","remember","setItem","getAccessToken","expiration","token","expires_in","access_token","now","parseInt","getExpiration","getRefreshToken","refresh_token","refresh","TokenInterceptor","setHeaders","Authorization","HeaderInterceptor","Content-Type","headers","get","HttpInterceptorHandler","interceptor","HTTP_DYNAMIC_INTERCEPTORS","InjectionToken","HttpService","httpHandler","injector","interceptors","_super","cache","cacheInterceptor","addInterceptor","skipErrorHandler","removeInterceptor","skipApiPrefix","skipToken","skipHeader","handler","reduceRight","HttpClient","interceptorType","filter","HttpHandler","Injector","Optional","EntityFileService","http","getEntityFiles","filters","params","toPromise","createEntityFile","model","post","updateEntityFile","put","id","deleteEntityFile","delete","uploadEntityFile","formData","FormData","append","name","FormValidatorService","isFieldValid","field","formGroup","firstAttempt","valid","touched","untouched","getErrorMessage","errorMessages","errorField","required","EntityFileFormComponent","formValidatorService","fb","entityFileService","alertService","fileList","createForm","entityFileGroup","group","title","details","entity_type","entity_id","Validators","entity","setValue","updateMode","patchValue","hideTitleAndDetails","fileConfig","fileId","containerId","styles","height","multiple","acceptFile","maxSize","acceptFileText","viewerConfig","viewerStyle","width","submit","assignmentFileFirstAttempt","item","fileChanged","FormBuilder","EntityFilesViewAllComponent","location","dialog","viewOnly","entityFiles","displayedColumns","isWorking","search","FormControl","imageStyle","hideRemove","x","entityType","entityId","valueChanges","debounceTime","distinctUntilChanged","reload","fetchEntityFilesDetails","last_page","addEntityFile","open","autoFocus","restoreFocus","afterClosed","files","editEntityFile","resetFieldValue","Location","MatDialog","FileDropperComponent","fileArray","border","isSingleMode","Boolean","dragEnter","style","background","dragColor","preventDefault","dragOver","dragLeave","dropEvent","droppedFiles","dataTransfer","from","addFiles","onFileChange","document","getElementById","fileSizeAllowed","sortFiles","a","nameA","toUpperCase","nameB","size","clickEvent","click","NoteService","getNotes","filterModel","addNote","note","editNote","deleteNote","NoteFormComponent","noteService","noteFormGroup","compose","model_type","related_model_id","noteFormFirstAttempt","labelText","cancel","NoteListComponent","readonly","commentsView","notes","sort_by","relatedModelId","modelType","loadData","assign","current_page","resetScroll","commentAction","editComment","addComment","comment","index","findIndex","CommentFormComponent","credentialService","view","_commentData","commentFormGroup","isAuthenticated","user","reset","deleteComment","hideEdit","SearchableSelectorComponent","SearchableSelectorComponent_1","formBuilder","_focusMonitor","_elementRef","ngControl","valueField","titleField","selectedValueChange","enableSearch","add","edit","items","inDataSearch","selectionChange","itemsChange","isLoading","onChange","onTouched","stateChanges","Subject","focused","controlType","describedBy","cachedItems","_required","_disabled","selectorForm","select_value","monitor","origin","valueAccessor","empty","setValidators","coerceBooleanProperty","disable","enable","openedChange","dataItems","selectedValue","sortBy","fetchItemList","of","startWith","switchMap","finalize","setDescribedByIds","ids","join","onContainerClick","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","disabled","getPropertyValue","_handleInput","map","find","invalid","dirty","reloadData","searchField","filterItems","toLowerCase","addItem","itemComponent","addConfig","editItem","editConfig","stopMonitoring","providers","provide","MatFormFieldControl","useExisting","FocusMonitor","ElementRef","NgControl","Self","MatSelectInfiniteScrollDirective","matSelect","ngZone","threshold","infiniteScroll","thrPx","thrPc","singleOptionHeight","SELECT_ITEM_HEIGHT_EM","destroyed$","evaluateThreshold","takeUntil","opened","panel","nativeElement","getSelectItemHeightPx","registerScrollListener","lastIndexOf","parseFloat","fromEvent","tap","handleScrollEvent","runOutsideAngular","countOfRenderedOptions","infiniteScrollDistance","clientHeight","scrollTop","run","getComputedStyle","fontSize","Directive","MatSelect","NgZone","NumItemsSelector","numItemsChange","numItemsChanged","numItems","DateUtils","getYYYYMMDDString","inputDate","getFullYear","getMonth","getDate","getYYYY","getMM","getDateTime","toLocaleTimeString","NumberSelector","numChanged","start_value","end_value","calculateTimeline","date","date_from","date_to","show_custom_field","yesterday","setDate","first","getDay","last","to","setTime","getTime","setHours","quarter","Math","floor","startFullQuarter","endFullQuarter","Timeline","CUSTOM","TODAY","YESTERDAY","THIS_WEEK","LAST_WEEK","THIS_MONTH","LAST_MONTH","THIS_QUARTER","LAST_QUARTER","THIS_YEAR","LAST_YEAR","ALL","TimelineFilterComponent","TimelineFilterComponent_1","datePipe","timelineValue","timelines","viewValue","dateFrom","dateTo","appearance","showClearbutton","form","touchUi","showCustomDateFields","changeTimeline","getDateRangeString","str","selectedRange","toUTCString","transform","_e","_g","_f","getFieldValue","setFieldValue","timeline","range","picker","dateRangeChange","dateRangeStart","dateRangeEnd","onCustomDateChange","DatePipe","LoaderComponent","NgModule","declarations","imports","CommonModule","MatSnackBarModule","MatIconModule","exports","AuthenticationGuard","router","credentialsService","canActivate","route","state","isUserAuthenticated","canLoad","navigate","queryParams","redirect","replaceUrl","Router","AuthenticationService","login","context","concatMap","tokenInfo","userInfo","logout","RouteReusableStrategy","shouldDetach","store","detachedTree","shouldAttach","retrieve","shouldReuseRoute","future","curr","routeConfig","component","RouteReuseStrategy","StorageService","storageSub","watch","asObservable","removeItem","DataManager","GET","urlq","POST","object","blank","POSTRAW","PUT","PATCH","patch","DELETE","MatButtonModule","MatCheckboxModule","MatCommonModule","MatDialogModule","MatFormFieldModule","MatInputModule","MatLineModule","MatMenuModule","MatNativeDateModule","MatOptionModule","MatProgressSpinnerModule","MatPseudoCheckboxModule","MatRippleModule","MatSelectModule","MatSortModule","MatTableModule","MatCardModule","MatDividerModule","MatChipsModule","MatDatepickerModule","MatListModule","MatTooltipModule","parentModule","HttpClientModule","RouterModule","SnackModule","useClass","CoreModule","SkipSelf","FlexLayoutModule","MaterialModule","entryComponents","InfiniteScrollModule","NgxDocViewerModule","FormsModule","ReactiveFormsModule","FileDropperModule","DocumentViewerModule","ActionPopupModule","ReadMoreComponent","maxLength","hideToggle","isCollapsed","determineView","toggleView","text","currentText","substring","ReadMoreModule","forChild","TimelineFilterRoutingModule","EmailSubscriptionRoutingModule","EmailSubscriptionUserRoutingModule","user_id","email_type_id","EmailSubscriptionUserFormComponent","esUserFormGroup","esUser","selectedType","email_type","selectedUser","markAllAsTouched","esUserFormFirstAttempt","isSubmitLoading","SearchableSelectorModule","EmailSubscriptionUserFormRoutingModule","LoaderModule","EmailSubscriptionUserListComponent","esUserList","pageEvent","displayColumns","availableDisplayColumns","order","initializeData","changeSort","col","some","columnsChange","selectedColumns","filterChange","addEmailSubscriptionUser","editEmailSubscriptionUser","deleteEmailSubscriptionUser","direction","active","esulr","permissions","only","redirectTo","routes","path","EmailSubscriptionUserListFilterComponent","valueChange","esUserFilterForm","EmailSubscriptionUserListFilterRoutingModule","EmailSubscriptionUserListRoutingModule","EmailSubscriptionUserFormModule","EmailSubscriptionUserListFilterModule","EmailSubscriptionTypeRoutingModule","code","frequency_id","EmailSubscriptionTypeFormComponent","emailSubscriptionTypeFormGroup","description","emailSubscriptionType","selectedFrequency","frequency","emailSubscriptionTypeFormFirstAttempt","EmailSubscriptionTypeFormRoutingModule","EmailSubscriptionTypeListComponent","emailSubscriptionTypeList","isLoadRelations","relations","addEmailSubscriptionType","editEmailSubscriptionType","deleteEmailSubscriptionType","estlr","EmailSubscriptionTypeFormModule","EmailSubscriptionTypeListRoutingModule","EmailSubscriptionForUserComponent","subscriptions","fetchSubscriptions","sub","current_user_subscription","unsubscribe","esfur","EmailSubscriptionForUserRoutingModule","TechlifyUpdateService","getTechlifyUpdates","createTechlifyUpdate","techlifyUpdate","updateTechlifyUpdate","deleteTechlifyUpdate","techlifyUpdateId","getTechlifyUpdate","getNewUpdateForCurrentUser","createUpdateViewRecord","techlifyUpdateView","updateCurrentUserUpdates","released_on","version","learn_more_link","pattern","TechlifyUpdateFormComponent","techlifyUpdateService","onSave","isUpdateMode","toolbar","techlifyUpdateForm","techlifyUpdateDetails","editor","Editor","NgxEditorModule","TechlifyUpdatesListComponent","techlifyUpdates","filterFormGroup","listenChanges","modifyTechlifyUpdate","sortColumn","toString","assignFilter","column","pathMatch","TechlifyUpdateRoutingModule","TechlifyUpdateFormModule","UpdateViewComponent","rootNavUrl","openUpdateHistory","TechlifyUpdateHistoryComponent","openUpdateView","isFromHistory","TechlifyUpdateHistoryRoutingModule","UpdateNotifierSnackComponent","snackBarRef","maxDescriptionLength","descriptionText","determineDescription","dismiss","update_id","MatSnackBarRef","UpdateNotifierComponent","setTimeout","getNewUpdate","showUpdate","horizontalPosition","verticalPosition","panelClass","UpdateViewModule","ExportExcelButtonComponent","exportExcel","fileName","ws","XLSX.utils","json_to_sheet","wb","book_new","book_append_sheet","XLSX.writeFile","AuditLogViewModelComponent","showDeltaChanges","changeList","model_id","modelId","logInfo","getTransformedChanges","displayAttribute","charAt","slice","attribute","newValue","oldValue","pre_object","AuditLogsViewModelComponent","events","NavigationEnd","AuditLogForModelComponent","logView","getLogView","getLogsView","maxWidth","AuditLogViewModelRoutingModule","AuditLogListComponent","dataManager","sanitizer","auditLogList","showFilter","showExportButtons","Type","object_type","Action","Data","Pre-Object","Created At","created_at","toDateString","Created By","email","logClicked","objectType","objectId","object_id","userId","value_1","DomSanitizer","DateValidator","control","val","invalidDate","AuditLogListFilterComponent","auditLogFilterForm","toISOString","AuditLogListFilterRoutingModule","AuditLogListRoutingModule","ExportExcelModule","AuditLogListFilterModule","AuditLogsViewModelRoutingModule","AuditLogListModule","AuditLogViewModelModule","AuditLogsViewModelModule","AuditLogForModelRoutingModule","AuditLogViewComponent","paramMap","fetchLogDetail","back","logId","patchDelta","delta","jsondiffpatch.diff","innerHTML","jsondiffpatch.formatters","html","format","ActivatedRoute","AuditLogViewRoutingModule","AuditLogRoutingModule","AuditLogViewModule","ImportSuccessComponent","ImportHistoryListComponent","histories","importHistory","isEnabled","unavailable","FieldMappingComponent","changeDetectorRef","firstDataArray","properties","onReUpload","createImportMappingForm","reFectorAttributes","importMappingForm","fields","array","createField","propertyType","k","dataValue","mainIndex","includes","fieldsArray","detectChanges","updatePropertyType","controls","uniqueValidator","propertyData","setErrors","removeField","removeAt","reUpload","ChangeDetectorRef","FailedItemsListComponent","isValidDate","isNaN","ImportCsvComponent","filesList","isUploaded","isImportTypeSelected","fileData","failedItems","selectedFields","importSteps","progressTitle","progressDescription","currentStep","filesConfig","selectedFile","jsonData","reader","FileReader","onload","XLSX.read","cellDates","SheetNames","reduce","initial","sheet","Sheets","sheet_to_json","header","defval","readAsBinaryString","mappingProcessed","tempFileData","save","failed_items","status","DataImportComponent","LoginHistoryForUserComponent","loginHistoryList","historyFilterForm","onTimelineChange","LoginHistoryForUserRoutingModule","TimelineFilterModule","selectable","removable","separatorKeysCodes","ENTER","COMMA","placeholder","createApiUrl","isCreateable","isCacheTags","isSingle","TechlifyTaggerTagFormFieldComponent","TechlifyTaggerTagFormFieldComponent_1","httpService","_formField","tagInputCtrl","TechlifyTaggerTagFormConfigModel","_allTags","categories","_value","filterValue","filterString","allTags","tagIds","_placeholder","init","_filter","trim","tags","tag","category_title","defaultCreateCategory","input","option","tagInput","availableTags","MatFormField","MAT_FORM_FIELD","MatAutocompleteModule","TechlifyTaggerTagSelectorComponent","TechlifyTaggerTagSelectorComponent_1","tagSelectorCtrl","showAllTags","useSelectButtonStyle","res","MatButtonToggleModule","TechlifyFeatureService","getFeatures","disableFeature","enableFeature","TechlifyFeatureListingComponent","featureService","features","num_items","listenForChanges","setStorage","error_1","toggeleFeature","feature","error_2","localFeatures","features_1","features_1_1","client_feature","is_enabled","is_enabled_default","TechlifyFeatureRoutes","OnOffSwitchComponent","slideToggle","toggle","TechlifyFeatureEnabledDirective","el","checkForFeatureEnabled","enabledFeature","display","MatSlideToggleModule"],"mappings":"00GAAA,0BCWE,SAAAA,EACSC,EACyBC,GADzBC,KAAAF,UAAAA,EACyBE,KAAAD,KAAAA,SAGlCF,EAAAI,UAAAC,SAAA,aAIAL,EAAAI,UAAAE,YAAA,WACEH,KAAKF,UAAUM,SAKjBP,EAAAI,UAAAI,QAAA,WACEL,KAAKF,UAAUM,MAAMJ,KAAKD,gCAvB7BO,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,mBACVC,SAAA,muBALOC,EAAAA,oBACAC,EAAWC,WAAA,CAAA,CAAAC,KAWfC,EAAAA,OAAMP,KAAA,CAACQ,EAAAA;;;;;;;;;;;;;;;ACGZ,IAAIC,EAAgB,SAASC,EAAGC,GAI5B,OAHAF,EAAgBG,OAAOC,gBAClB,CAAEC,UAAW,cAAgBC,OAAS,SAAUL,EAAGC,GAAKD,EAAEI,UAAYH,IACvE,SAAUD,EAAGC,GAAK,IAAK,IAAIK,KAAKL,EAAOC,OAAOlB,UAAUuB,eAAeC,KAAKP,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,MAC3EN,EAAGC,aAGZQ,EAAUT,EAAGC,GACzB,GAAiB,mBAANA,GAA0B,OAANA,EAC3B,MAAM,IAAIS,UAAU,uBAAyBC,OAAOV,GAAK,iCAE7D,SAASW,IAAO7B,KAAK8B,YAAcb,EADnCD,EAAcC,EAAGC,GAEjBD,EAAEhB,UAAkB,OAANiB,EAAaC,OAAOY,OAAOb,IAAMW,EAAG5B,UAAYiB,EAAEjB,UAAW,IAAI4B,YA0BnEG,EAAWpB,EAAYqB,EAAQC,EAAKC,GAChD,IAA2HlB,EAAvHmB,EAAIC,UAAUC,OAAQC,EAAIH,EAAI,EAAIH,EAAkB,OA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tF,aAAc,CAACuc,EAAAA,gCAAiCiB,GAAsBG,IACtEtd,QAAS,CAACkc,EAAAA,gCAAiCoB","sourcesContent":["export class ActionPopup {\n name: string;\n title: string;\n message: string;\n}","import { Component, OnInit, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { ActionPopup } from './action-popup.model';\n\n@Component({\n selector: 'app-action-popup',\n templateUrl: './action-popup.component.html',\n styleUrls: ['./action-popup.component.scss']\n})\nexport class ActionPopupComponent implements OnInit {\n\n constructor(\n public dialogRef: MatDialogRef<ActionPopupComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ActionPopup,\n ) { }\n\n ngOnInit() {\n }\n\n /**Method to close dialog box */\n closeDialog() {\n this.dialogRef.close();\n }\n\n /**Method to close dialog box with the data given from parent component\n */\n confirm() {\n this.dialogRef.close(this.data);\n }\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) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\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, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n AfterViewInit,\n ViewChild\n} from \"@angular/core\";\n\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatSort } from '@angular/material/sort';\nimport { DataTable } from './data-table.model';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\n\n@UntilDestroy()\n@Component({\n selector: \"app-data-table\",\n templateUrl: \"./data-table.component.html\",\n styleUrls: [\"./data-table.component.scss\"]\n})\nexport class DataTableComponent implements OnInit, OnChanges, AfterViewInit {\n\n trigger: MatMenuTrigger;\n\n @Input() data: any;\n\n @Input() config: DataTable;\n\n dataSource: MatTableDataSource<any> = new MatTableDataSource([]);\n\n @Input() selection: SelectionModel<any>;\n\n @Output() action = new EventEmitter();\n @Output() selctionChange = new EventEmitter();\n @Output() rowClick = new EventEmitter();\n @Output() tableScroll = new EventEmitter();\n @Output() sortChanged = new EventEmitter();\n\n page: number;\n lastPage: number;\n perPage: number;\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n static nextId = 0;\n @Input() elementId: string = `data-table-${DataTableComponent.nextId++}`;\n\n constructor() { }\n\n ngOnInit() { }\n\n /**Life cycle hook method */\n ngAfterViewInit() {\n // Assign the data to the data source for the table to render\n this.dataSource = new MatTableDataSource(this.data);\n\n // Emit change in selection\n if (this.selection) {\n this.selection.changed.pipe().subscribe((change: any) => {\n if (this.selection.selected) {\n this.selctionChange.emit(this.selection.selected);\n }\n });\n }\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.sortChanged.emit(value);\n })\n }\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.clearSelection()\n : this.dataSource.data.forEach(row => this.selection.select(row));\n }\n\n /**clear selection*/\n clearSelection() {\n this.selection.clear();\n this.selctionChange.emit(this.selection.selected);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.initializeConfig(changes);\n if (changes.data && !changes.data.isFirstChange() && this.dataSource) {\n // If not first change\n this.dataSource.data = changes.data.currentValue;\n }\n }\n\n initializeConfig(changes: SimpleChanges) {\n if (changes.config && !changes.config.isFirstChange()) {\n this.config = changes.config.currentValue;\n }\n this.page = this.config.page || 1;\n this.lastPage = this.config.lastPage || this.page;\n this.perPage = this.config.perPage || 20;\n }\n\n onScroll() {\n if (this.page < this.lastPage) {\n this.page += 1;\n this.tableScroll.emit({ page: this.page, lastPage: this.lastPage, perPage: this.perPage });\n }\n }\n\n /**Method invokes when edit action icon is clickes */\n editClicked(event: any, element: any) {\n this.action.emit({ action: \"edit\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when view action icon is clickes */\n viewClicked(event: any, element: any) {\n this.action.emit({ action: \"view\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when edit action icon is clickes */\n deactivateClicked(event: any, element: any) {\n this.action.emit({ action: \"deactivate\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when download action icon is clickes */\n downloadClicked(event: any, element: any) {\n this.action.emit({ action: \"download\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when print action icon is clickes */\n printClicked(event: any, element: any) {\n\n this.action.emit({ action: 'print', value: element });\n event.stopPropagation();\n\n }\n\n /**Method invokes when a row is clicked */\n rowClicked(event: any, element: any) {\n this.rowClick.emit(element);\n event.stopPropagation();\n }\n\n /**Method invokes when menu action icon is hovered */\n actionMenuClick(event: any, element: any, menuValue: string) {\n this.action.emit({ action: menuValue, value: element });\n this.trigger.closeMenu();\n event.stopPropagation();\n }\n\n /**Method invokes when menu action icon is hovered and selects for particular action*/\n actionMenuTriggerClick(event: any, trigger: MatMenuTrigger) {\n this.trigger = trigger;\n event.stopPropagation();\n }\n\n checkEdit(ele: any) {\n if (this.config.editDisableFunction) {\n return this.config.editDisableFunction(ele);\n }\n\n return true;\n }\n\n checkView(ele: any) {\n if (this.config.viewDisableFunction) {\n return this.config.viewDisableFunction(ele);\n }\n\n return true;\n }\n\n checkPrint(ele: any) {\n if (this.config.printDisableFunction) {\n return this.config.printDisableFunction(ele);\n }\n\n return true;\n }\n\n checkActions(ele: any) {\n if (this.config.actionsMenuFunction) {\n return this.config.actionsMenuFunction(ele);\n }\n\n return true;\n }\n\n checkActionButton(ele: any, value: any) {\n if (this.config.actionsMenuButtonFunction) {\n return this.config.actionsMenuButtonFunction(ele, value);\n }\n return true;\n }\n\n getValue(ele: any, keyString: string) {\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\n const keyList = keyString.split(\".\");\n for (let i = 0, n = keyList.length; i < n; ++i) {\n const key = keyList[i];\n if (ele && key in ele) {\n ele = ele[key];\n } else {\n return;\n }\n }\n return ele;\n }\n\n ngOnDestroy() {\n //Until Destroy uses it.\n }\n}\n","export class DataTable {\n displayedColumns: string[];\n columnsConfig: ColumnConfig[];\n actionsConfig?: ActionConfig;\n enableRowClick?: boolean;\n disableElevation?: boolean;\n downloadLink?: string;\n actionsMenuFunction?: any;\n actionsMenuButtonFunction?: any;\n editDisableFunction?: any;\n viewDisableFunction?: any;\n printDisableFunction?: any;\n customActionLabel?: string;\n stickyHeader?: boolean;\n page?: number;\n lastPage?: number;\n perPage?: number;\n pageSizeOptions?: number[];\n style?: any;\n}\n\nclass ColumnConfig {\n title: string;\n value: string;\n sort?: boolean;\n dateField?: boolean;\n currencyField?: boolean;\n format?: string;\n}\n\nclass ActionConfig {\n edit?: boolean;\n view?: boolean;\n download?: boolean;\n print?: boolean;\n deactivate?: boolean;\n actionsMenu?: ActionsMenu[];\n}\n\nclass ActionsMenu {\n name: string;\n value: string;\n}\n\nexport class PageEvent {\n page: number;\n lastPage?: number;\n perPage: number;\n}\n","import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\nimport { ViewerConfig } from './viewer-config.model';\n\n@Component({\n selector: 'app-document-viewer',\n templateUrl: './document-viewer.component.html',\n styleUrls: ['./document-viewer.component.css']\n})\nexport class DocumentViewerComponent implements OnInit {\n\n\n @Input() config!: ViewerConfig;\n\n @Input() file!: any;\n\n @Input() fileUrl!: any;\n\n @Input() disableEdit: boolean;\n\n @Output() remove = new EventEmitter();\n viewerType: any;\n\n constructor() { }\n\n ngOnInit(): void {\n this.initData();\n }\n\n removeFile() {\n this.remove.emit();\n }\n\n initData() {\n if (this.file) {\n var ext = this.getFileExtension(this.file);\n if (ext === 'ppt' || ext === 'pptx' || ext === 'doc' || ext === 'docx' || ext === 'xls' || ext === 'xlsx') {\n this.viewerType = \"office\";\n }\n else if (ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif') {\n this.viewerType = \"image\";\n }\n else if (ext === 'pdf') {\n this.viewerType = \"pdf\";\n }\n else {\n this.viewerType = null;\n }\n }\n }\n\n get fileName() {\n if (this.file) {\n let nameArray = this.file.split('/');\n if (nameArray.length === 2) {\n return nameArray[1];\n }\n return nameArray[0];\n }\n return '';\n }\n\n getFileExtension(file: any) {\n return file.split('.').pop();\n }\n\n}\n","/**\n * Simple logger system with the possibility of registering custom outputs.\n *\n * 4 different log levels are provided, with corresponding methods:\n * - debug : for debug information\n * - info : for informative status of the application (success, ...)\n * - warning : for non-critical errors that do not prevent normal application behavior\n * - error : for critical errors that prevent normal application behavior\n *\n * Example usage:\n * ```\n * import { Logger } from 'app/core/logger.service';\n *\n * const log = new Logger('myFile');\n * ...\n * log.debug('something happened');\n * ```\n *\n * To disable debug and info logs in production, add this snippet to your root component:\n * ```\n * export class AppComponent implements OnInit {\n * ngOnInit() {\n * if (environment.production) {\n * Logger.enableProductionMode();\n * }\n * ...\n * }\n * }\n *\n * If you want to process logs through other outputs than console, you can add LogOutput functions to Logger.outputs.\n */\n\n/**\n * The possible log levels.\n * LogLevel.Off is never emitted and only used with Logger.level property to disable logs.\n */\nexport enum LogLevel {\n Off = 0,\n Error,\n Warning,\n Info,\n Debug\n}\n\n/**\n * Log output handler function.\n */\nexport type LogOutput = (source: string | undefined, level: LogLevel, ...objects: any[]) => void;\n\nexport class Logger {\n\n /**\n * Current logging level.\n * Set it to LogLevel.Off to disable logs completely.\n */\n static level = LogLevel.Debug;\n\n /**\n * Additional log outputs.\n */\n static outputs: LogOutput[] = [];\n\n /**\n * Enables production mode.\n * Sets logging level to LogLevel.Warning.\n */\n static enableProductionMode() {\n Logger.level = LogLevel.Warning;\n }\n\n constructor(private source?: string) { }\n\n /**\n * Logs messages or objects with the debug level.\n * Works the same as console.log().\n */\n debug(...objects: any[]) {\n this.log(console.log, LogLevel.Debug, objects);\n }\n\n /**\n * Logs messages or objects with the info level.\n * Works the same as console.log().\n */\n info(...objects: any[]) {\n this.log(console.info, LogLevel.Info, objects);\n }\n\n /**\n * Logs messages or objects with the warning level.\n * Works the same as console.log().\n */\n warn(...objects: any[]) {\n this.log(console.warn, LogLevel.Warning, objects);\n }\n\n /**\n * Logs messages or objects with the error level.\n * Works the same as console.log().\n */\n error(...objects: any[]) {\n this.log(console.error, LogLevel.Error, objects);\n }\n\n private log(func: (...args: any[]) => void, level: LogLevel, objects: any[]) {\n if (level <= Logger.level) {\n const log = this.source ? ['[' + this.source + ']'].concat(objects) : objects;\n func.apply(console, log);\n Logger.outputs.forEach(output => output.apply(output, [this.source, level, ...objects]));\n }\n }\n\n}\n","export class ViewerConfig {\n imageStyle?: any;\n viewerStyle?: any;\n hideRemove?: boolean;\n}\n","/**\n * Class that stores the configuration data\n *\n * @author Joshua Kissoon\n * @since 20180724\n */\nexport class TechlifyConfig {\n projectKey: string = '';\n environment: string = '';\n authClientSecret: string = '';\n authGrantType: string = '';\n apiUrl: string = '';\n rawConfigs: any;\n storage: Storage;\n\n constructor(data: any) {\n this.loadFromMap(data);\n }\n\n loadFromMap(data: any) {\n this.projectKey = data.projectKey;\n this.environment = data.environment;\n this.authClientSecret = data.authClientSecret;\n this.authGrantType = data.authGrantType;\n this.apiUrl = data.apiUrl;\n this.storage = data?.storage;\n this.rawConfigs = data;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { TechlifyConfig } from \"./techlify-config.model\";\n\n/**\n * Service that provides settings for all other services\n *\n * @author Joshua Kissoon\n * @since 20170709\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigService {\n\n public static BASE_CREDENTIALS = \"credentials\";\n\n private config: TechlifyConfig;\n\n constructor(config: TechlifyConfig) {\n this.config = config;\n }\n\n getConfigsRaw() {\n return this.config.rawConfigs;\n }\n\n getProjectKey() {\n return this.config.projectKey;\n }\n\n getApiUrl() {\n return this.config.apiUrl;\n }\n\n getAuthClientSecret() {\n return this.config.authClientSecret;\n }\n\n getStorage() {\n return this.config.storage ? this.config.storage : localStorage;\n }\n\n getAuthGrantType() {\n return this.config.authGrantType;\n }\n\n getCredentialsKey() {\n return this.config.projectKey + \"_\" + ConfigService.BASE_CREDENTIALS;\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'snack-bar-component-example-snack',\n templateUrl: 'success-snack.html',\n styleUrls: ['./snack.scss'],\n})\nexport class SuccessSnackComponent {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\n}\n@Component({\n selector: 'snack-bar-component-example-snack',\n templateUrl: 'error-snack.html',\n styleUrls: ['./snack.scss'],\n})\nexport class ErrorSnackComponent {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\n}\n","import { Injectable } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { ErrorSnackComponent, SuccessSnackComponent } from './snack/snack.component';\r\n\r\n/**\r\n * Service used to manage alerts in the entire system frontend\r\n * \r\n * @author Gokula Prasanna\r\n * @since 20210131\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AlertService {\r\n\r\n constructor(public snackBar: MatSnackBar) { }\r\n\r\n addAlert(message: string, alertType: string, duration = 3) {\r\n if (alertType == \"success\") {\r\n this.snackBar.openFromComponent(SuccessSnackComponent, {\r\n duration: 1000 * duration,\r\n data: message\r\n });\r\n }\r\n else {\r\n this.snackBar.openFromComponent(ErrorSnackComponent, {\r\n duration: 1000 * duration,\r\n data: message\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { AlertService } from \"./alert.service\";\r\n\r\n\r\n/**\r\n * Service used to handle errors from the request\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20171202\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ErrorHandlerService {\r\n\r\n constructor(private alerter: AlertService) {\r\n }\r\n\r\n handleError(errorResponse: any, msg: string = '') {\r\n // 1 - Create empty array to store errors\r\n const errors = [];\r\n\r\n // 2 - check if the error object is present in the response\r\n if (errorResponse?.error) {\r\n\r\n // 3 - Check for Laravel form validation error messages object\r\n if (errorResponse?.error?.errors) {\r\n\r\n // 4 - For each error property (which is a form field)\r\n for (const property in errorResponse.error.errors) {\r\n\r\n if (errorResponse.error.errors?.hasOwnProperty(property)) {\r\n\r\n // 5 - Extract it's array of errors\r\n const propertyErrors: Array<string> = errorResponse?.error?.errors[property];\r\n\r\n // 6 - Push all errors in the array to the errors array\r\n propertyErrors.forEach(error => errors.push(error));\r\n }\r\n\r\n }\r\n }\r\n\r\n if (errors.length === 0) {\r\n // 7 - Push the main error message to the array of errors if there is no validation error\r\n errors.push(errorResponse.error.message ? errorResponse.error.message : errorResponse.error?.error);\r\n }\r\n }\r\n var errMessage = errors.length ? errors[0] : msg;\r\n this.alerter.addAlert(\"Error: \" + errMessage, \"warning\");\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport { Logger } from './logger.service';\nimport { ConfigService } from './config.service';\nimport { ErrorHandlerService } from './error-handler.service';\n\nconst log = new Logger('ErrorHandlerInterceptor');\n\n/**\n * Adds a default error handler to all requests.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ErrorHandlerInterceptor implements HttpInterceptor {\n\n constructor(private configService: ConfigService, private errorHandler: ErrorHandlerService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return next.handle(request).pipe(catchError(error => this.handleError(error)));\n }\n\n // Customize the default error handler here if needed\n private handleError(error: HttpErrorResponse): Observable<HttpEvent<any>> {\n let errorMessage = '';\n if (error.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Client Error: ${this.configService?.getProjectKey()}: ${error.error.message}`;\n } else {\n // server-side error\n errorMessage = `Server Error: ${this.configService?.getProjectKey()}`;\n try {\n this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');\n } catch (e) {\n console.log(\"Unable to handle server error\", e);\n }\n }\n return throwError(error);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpResponse } from '@angular/common/http';\nimport { ConfigService } from './config.service';\nimport { Logger } from './logger.service';\n\nconst log = new Logger('HttpCacheService');\n\n\nexport interface HttpCacheEntry {\n lastUpdated: Date;\n data: HttpResponse<any>;\n}\n\n/**\n * Provides a cache facility for HTTP requests with configurable persistence policy.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HttpCacheService {\n\n private cachedData: { [key: string]: HttpCacheEntry; } = {};\n private storage: Storage | any | null;\n private cachePersistenceKey: String | any;\n\n constructor(private configService: ConfigService) {\n this.storage = this.configService.getStorage();\n this.cachePersistenceKey = this.configService.getProjectKey() + '_HTTP_CACHE';\n this.loadCacheData();\n }\n\n /**\n * Sets the cache data for the specified request.\n * @param {!string} url The request URL.\n * @param {ResponseOptions} data The received data.\n * @param {Date=} lastUpdated The cache last update, current date is used if not specified.\n */\n setCacheData(url: string, data: HttpResponse<any>, lastUpdated?: Date) {\n this.cachedData[url] = {\n lastUpdated: lastUpdated || new Date(),\n data: data\n };\n log.debug(`Cache set for key: \"${url}\"`);\n this.saveCacheData();\n }\n\n /**\n * Gets the cached data for the specified request.\n * @param {!string} url The request URL.\n * @return {?ResponseOptions} The cached data or null if no cached data exists for this request.\n */\n getCacheData(url: string): HttpResponse<any> | null {\n const cacheEntry = this.cachedData[url];\n\n if (cacheEntry) {\n log.debug(`Cache hit for key: \"${url}\"`);\n return cacheEntry.data;\n }\n\n return null;\n }\n\n /**\n * Gets the cached entry for the specified request.\n * @param {!string} url The request URL.\n * @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.\n */\n getHttpCacheEntry(url: string): HttpCacheEntry | null {\n return this.cachedData[url] || null;\n }\n\n /**\n * Clears the cached entry (if exists) for the specified request.\n * @param {!string} url The request URL.\n */\n clearCache(url: string): void {\n delete this.cachedData[url];\n log.debug(`Cache cleared for key: \"${url}\"`);\n this.saveCacheData();\n }\n\n /**\n * Cleans cache entries older than the specified date.\n * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.\n */\n cleanCache(expirationDate?: Date) {\n if (expirationDate) {\n Object(this.cachedData).keys.forEach((key: string) => {\n if (expirationDate >= this.cachedData[key]?.lastUpdated) {\n delete this.cachedData[key];\n }\n });\n } else {\n this.cachedData = {};\n }\n this.saveCacheData();\n }\n\n /**\n * Sets the cache persistence policy.\n * Note that changing the cache persistence will also clear the cache from its previous storage.\n * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session\n * storage, or if no value is provided it will be only in-memory (default).\n */\n setPersistence(persistence?: 'local' | 'session') {\n this.cleanCache();\n this.storage = persistence === 'local' ? localStorage : persistence === 'session' ? sessionStorage : null;\n this.loadCacheData();\n }\n\n private saveCacheData() {\n if (this.storage) {\n this.storage[this.cachePersistenceKey] = JSON.stringify(this.cachedData);\n }\n }\n\n private loadCacheData() {\n const data = this.storage ? this.storage[this.cachePersistenceKey] : null;\n this.cachedData = data ? JSON.parse(data) : {};\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http';\nimport { HttpCacheService } from './http-cache.service';\nimport { Observable, Subscriber } from 'rxjs';\n\n/**\n * Caches HTTP requests.\n * Use ExtendedHttpClient fluent API to configure caching for each request.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CacheInterceptor implements HttpInterceptor {\n\n private forceUpdate = false;\n\n constructor(private httpCacheService: HttpCacheService) { }\n\n /**\n * Configures interceptor options\n * @param {{update: boolean}} options If update option is enabled, forces request to be made and updates cache entry.\n * @return {CacheInterceptor} The configured instance.\n */\n configure(options?: { update?: boolean } | null): CacheInterceptor {\n const instance = new CacheInterceptor(this.httpCacheService);\n if (options && options.update) {\n instance.forceUpdate = true;\n }\n return instance;\n }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.method !== 'GET') {\n return next.handle(request);\n }\n\n return new Observable((subscriber: Subscriber<HttpEvent<any>>) => {\n const cachedData = this.forceUpdate ? null : this.httpCacheService.getCacheData(request.urlWithParams);\n if (cachedData !== null) {\n // Create new response to avoid side-effects\n subscriber.next(new HttpResponse(cachedData as Object));\n subscriber.complete();\n } else {\n next.handle(request)\n .subscribe(\n event => {\n if (event instanceof HttpResponse) {\n this.httpCacheService.setCacheData(request.urlWithParams, event);\n }\n subscriber.next(event);\n },\n error => subscriber.error(error),\n () => subscriber.complete()\n );\n }\n });\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { ConfigService } from './config.service';\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiPrefixInterceptor implements HttpInterceptor {\n\n constructor(private configService: ConfigService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (!/^(http|https):/i.test(request.url)) {\n request = request.clone({ url: this.configService.getApiUrl() + request.url });\n }\n return next.handle(request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigService } from './config.service';\n\nexport interface Credentials {\n // Customize received credentials here\n user: any;\n token: any;\n}\n\n/**\n * Provides storage for authentication credentials.\n * The Credentials interface should be replaced with proper implementation.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CredentialsService {\n\n private _credentials: Credentials | null = null;\n\n constructor(private configService: ConfigService) {\n }\n\n /**\n * Checks is the user is authenticated.\n * @return True if the user is authenticated.\n */\n get isAuthenticated(): boolean {\n return !!this.credentials;\n }\n\n /**\n * Gets the user credentials.\n * @return The user credentials or null if the user is not authenticated.\n */\n get credentials(): Credentials | null {\n if (!this._credentials) {\n this._credentials = JSON.parse(sessionStorage.getItem(this.configService.getCredentialsKey()) || localStorage.getItem(this.configService.getCredentialsKey()));\n }\n return this._credentials;\n }\n\n /**\n * Sets the user credentials.\n * The credentials may be persisted across sessions by setting the `remember` parameter to true.\n * Otherwise, the credentials are only persisted for the current session.\n * @param credentials The user credentials.\n * @param remember True to remember credentials across sessions.\n */\n setCredentials(credentials?: Credentials, remember?: boolean) {\n this._credentials = credentials || null;\n\n if (credentials) {\n (remember ? localStorage : sessionStorage).setItem(this.configService.getCredentialsKey(), JSON.stringify(credentials));\n } else {\n sessionStorage.clear();\n localStorage.clear();\n this._credentials = null;\n }\n }\n\n getAccessToken(): string | null {\n const expiration = this.credentials?.token?.expires_in || '';\n const token = this.credentials?.token?.access_token || '';\n\n if (!token || !expiration) {\n return null;\n }\n\n if (Date.now() > parseInt(expiration)) {\n this.setCredentials();\n return null;\n }\n\n return token;\n }\n\n getExpiration(): string {\n return this.credentials?.token?.expires_in || '';\n }\n\n getRefreshToken(): string {\n return this.credentials?.token?.refresh_token || '';\n }\n\n refresh(): CredentialsService {\n this._credentials = null;\n return this;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { CredentialsService } from './credentials.service';\n\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class TokenInterceptor implements HttpInterceptor {\n\n constructor(private credentials: CredentialsService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n request = request.clone({\n setHeaders: {\n Authorization: `Bearer ${this.credentials.getAccessToken() || ''}`\n }\n });\n return next.handle(request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HeaderInterceptor implements HttpInterceptor {\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n request = request.clone({\n setHeaders: {\n 'Content-Type': request.headers.get('Content-Type') || 'application/json',\n }\n });\n return next.handle(request);\n }\n}\n","import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core';\nimport { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\nimport { CacheInterceptor } from './cache.interceptor';\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\nimport { TokenInterceptor } from './token.interceptor';\nimport { HeaderInterceptor } from './header.interceptor';\n\n\n// Augment HttpClient with the added configuration methods from HttpService, to allow in-place replacement of\n// HttpClient with HttpService using dependency injection\nexport interface HttpCustomClient {\n\n /**\n * Enables caching for this request.\n * @param {boolean} forceUpdate Forces request to be made and updates cache entry.\n * @return {HttpCustomClient} The new instance.\n */\n cache(forceUpdate?: boolean): HttpCustomClient;\n\n /**\n * Skips default error handler for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipErrorHandler(): HttpCustomClient;\n\n /**\n * Skips default API Prefix for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipApiPrefix(): HttpCustomClient;\n\n\n /**\n * Skips default Token Interceptor for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipToken(): HttpCustomClient;\n\n /**\n* Skips default Header Interceptor for this request.\n* @return {HttpCustomClient} The new instance.\n*/\n skipHeader(): HttpCustomClient;\n\n}\n\n\n// From @angular/common/http/src/interceptor: allows to chain interceptors\nclass HttpInterceptorHandler implements HttpHandler {\n\n constructor(private next: HttpHandler, private interceptor: HttpInterceptor) { }\n\n handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {\n return this.interceptor.intercept(request, this.next);\n }\n\n}\n\n/**\n * Allows to override default dynamic interceptors that can be disabled with the HttpService extension.\n * Except for very specific needs, you should better configure these interceptors directly in the constructor below\n * for better readability.\n *\n * For static interceptors that should always be enabled (like ApiPrefixInterceptor), use the standard\n * HTTP_INTERCEPTORS token.\n */\nexport const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken<HttpInterceptor>('HTTP_DYNAMIC_INTERCEPTORS');\n\n/**\n * Extends HttpClient with per request configuration using dynamic interceptors.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HttpService extends HttpClient implements HttpCustomClient {\n\n constructor(private httpHandler: HttpHandler,\n private injector: Injector,\n @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = []) {\n super(httpHandler);\n\n if (!this.interceptors) {\n // Configure default interceptors that can be disabled here\n this.interceptors = [this.injector.get(ApiPrefixInterceptor), this.injector.get(HeaderInterceptor), this.injector.get(TokenInterceptor), this.injector.get(ErrorHandlerInterceptor)];\n }\n }\n\n cache(forceUpdate?: boolean): HttpService {\n const cacheInterceptor = this.injector.get(CacheInterceptor).configure({ update: forceUpdate });\n return this.addInterceptor(cacheInterceptor);\n }\n\n skipErrorHandler(): HttpService {\n return this.removeInterceptor(ErrorHandlerInterceptor);\n }\n\n skipApiPrefix(): HttpService {\n return this.removeInterceptor(ApiPrefixInterceptor);\n }\n\n skipToken(): HttpService {\n return this.removeInterceptor(TokenInterceptor);\n }\n\n skipHeader(): HttpService {\n return this.removeInterceptor(HeaderInterceptor);\n }\n\n // Override the original method to wire interceptors when triggering the request.\n request(method?: any, url?: any, options?: any): any {\n const handler = this.interceptors.reduceRight(\n (next, interceptor) => new HttpInterceptorHandler(next, interceptor),\n this.httpHandler\n );\n return new HttpClient(handler).request(method, url, options);\n }\n\n private removeInterceptor(interceptorType: Function): HttpService {\n return new HttpService(\n this.httpHandler,\n this.injector,\n this.interceptors.filter(i => !(i instanceof interceptorType))\n );\n }\n\n private addInterceptor(interceptor: HttpInterceptor): HttpService {\n return new HttpService(\n this.httpHandler,\n this.injector,\n this.interceptors.concat([interceptor])\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpService } from '../core/http.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntityFileService {\n\n constructor(private http: HttpService) { }\n\n getEntityFiles(filters: any) {\n return this.http.get(`api/entity-files`, { params: filters }).toPromise();\n }\n\n createEntityFile(model: any) {\n return this.http.post(\"api/entity-files\", model).toPromise();\n }\n\n updateEntityFile(model: any) {\n return this.http.put(`api/entity-files/${model.id}`, model).toPromise();\n }\n\n deleteEntityFile(model: any) {\n return this.http.delete(`api/entity-files/${model.id}`).toPromise();\n }\n\n uploadEntityFile(file: File) {\n const formData: FormData = new FormData();\n formData.append(\"fileData\", file, file.name);\n return this.http\n .skipHeader()\n .post(\n \"api/entity-files-upload\",\n formData,\n ).toPromise();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormValidatorService {\n\n constructor() { }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string, formGroup: FormGroup | any, firstAttempt?: boolean) {\n return (!formGroup.get(field).valid && formGroup.get(field).touched) ||\n (!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string, formGroup: FormGroup | any, errorMessages: any, errorField?: string) {\n const error = Object.keys(formGroup.get(field).errors);\n return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';\n }\n\n}\n","import { Component, OnInit, Inject } from \"@angular/core\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\nimport { EntityFileService } from '../entity-file.service';\nimport { FileDropperConfig } from '../../file-dropper/file-dropper.model';\nimport { ViewerConfig } from '../../document-viewer/viewer-config.model';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { AlertService } from \"../../core/alert.service\";\n\nconst errorMessages: any = {\n url: {\n required: \"File is required\"\n },\n};\n\n@Component({\n selector: 'entity-file-form',\n templateUrl: './entity-file-form.component.html',\n styleUrls: ['./entity-file-form.component.css']\n})\nexport class EntityFileFormComponent implements OnInit {\n\n entityFileGroup: FormGroup;\n assignmentFileFirstAttempt: boolean;\n updateMode: boolean;\n fileConfig: FileDropperConfig;\n fileList: any[] = [];\n viewerConfig: ViewerConfig;\n hideTitleAndDetails: boolean;\n\n constructor(\n public dialogRef: MatDialogRef<EntityFileFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private entityFileService: EntityFileService,\n private alertService: AlertService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n //TODO: Finialize and add more validations.\n this.entityFileGroup = this.fb.group({\n id: [''],\n title: [''],\n details: [''],\n entity_type: [''],\n entity_id: [],\n file: ['', Validators.required],\n url: ['', Validators.required]\n });\n }\n\n ngOnInit(): void {\n if (this.data.entity) {\n this.entityFileGroup.get('entity_type').setValue(this.data.entity.entity_type);\n this.entityFileGroup.get('entity_id').setValue(this.data.entity.entity_id);\n }\n if (this.data.file) {\n this.updateMode = true;\n this.entityFileGroup.patchValue(this.data.file);\n }\n\n if (this.data?.hideTitleAndDetails) {\n this.hideTitleAndDetails = this.data?.hideTitleAndDetails;\n }\n\n //File dropper config\n this.fileConfig = {\n fileId: \"subjectFile\",\n containerId: \"subjectFileContainer\",\n styles: {\n height: \"200px\"\n },\n multiple: false,\n acceptFile: \"*\",\n maxSize: 10,\n acceptFileText: \"All Files\"\n };\n\n this.viewerConfig = {\n viewerStyle: {\n height: '200px',\n width: '100%'\n }\n }\n }\n\n\n //Method to trigger submit\n async submit() {\n this.assignmentFileFirstAttempt = true;\n if (!this.entityFileGroup.valid) {\n return;\n }\n const model = this.entityFileGroup.value;\n\n if (this.hideTitleAndDetails) {\n model.title = model.file;\n }\n\n const result: any = this.updateMode\n ? await this.entityFileService.updateEntityFile(model)\n : await this.entityFileService.createEntityFile(model);\n this.dialogRef.close(result.item);\n this.alertService.addAlert(\n \"File submitted successfully\",\n \"success\"\n );\n\n }\n\n async fileChanged(event: any) {\n this.fileList = event;\n\n if (this.fileList.length > 0) {\n\n const result: any = await this.entityFileService.uploadEntityFile(\n this.fileList[0]\n );\n this.entityFileGroup\n .get(\"file\")\n .setValue(result.item.file);\n this.entityFileGroup\n .get(\"url\")\n .setValue(result.item.url);\n this.fileList = [];\n }\n }\n\n\n async removeFile() {\n if (this.entityFileGroup.value.file) {\n try {\n this.entityFileGroup.patchValue({\n file: \"\",\n url: \"\"\n });\n } catch (error) {\n this.alertService.addAlert(\"Unable to remove file, try later\", \"warn\");\n }\n }\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(\n field,\n this.entityFileGroup,\n this.assignmentFileFirstAttempt\n );\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(\n field,\n this.entityFileGroup,\n errorMessages\n );\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\nimport { EntityFileService } from './entity-file.service';\nimport { ActionPopup } from '../action-popup/action-popup.model';\nimport { FormControl } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { AlertService } from '../core/alert.service';\nimport { ActionPopupComponent } from '../action-popup/action-popup.component';\nimport { ViewerConfig } from '../document-viewer/viewer-config.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-entity-files-view-all',\n templateUrl: './entity-files-view-all.component.html',\n styleUrls: ['./entity-files-view-all.component.css']\n})\nexport class EntityFilesViewAllComponent implements OnInit {\n @Input() entityId: number;\n @Input() entityType: string;\n @Input() viewOnly: boolean = false;\n @Input() removeSearch: boolean;\n @Input() hideTitleAndDetails: boolean;\n @Input() displayMode: boolean;\n viewerConfig: ViewerConfig;\n\n filters: any = {};\n entityFiles: any[] = [];\n displayedColumns = ['index', 'title', 'details', 'file',];\n isWorking: boolean = false;\n search: FormControl = new FormControl('');\n page: number = 1;\n perPage: number = 25;\n lastPage: number = 0;\n\n constructor(\n private entityFileService: EntityFileService,\n public location: Location,\n private alertService: AlertService,\n private dialog: MatDialog,\n ) { }\n\n ngOnInit(): void {\n\n\n this.viewerConfig = {\n imageStyle: {\n height: '200px',\n width: '200px'\n },\n viewerStyle: {\n height: ' 160px',\n width: '200px'\n },\n hideRemove: true\n };\n\n if (this.hideTitleAndDetails) {\n this.displayedColumns = this.displayedColumns.filter(x => (x !== 'details') && (x !== 'title'));\n }\n\n this.filters = {\n entity_type: this.entityType,\n entity_id: this.entityId,\n title: \"\"\n };\n this.search.valueChanges.pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this)).subscribe(value => {\n this.filters.title = value;\n this.reload();\n })\n this.fetchEntityFilesDetails();\n if (!this.viewOnly) {\n this.displayedColumns.push('actions');\n }\n }\n\n async fetchEntityFilesDetails() {\n this.filters.page = this.page;\n this.isWorking = true;\n const result: any = await this.entityFileService.getEntityFiles(this.filters);\n this.lastPage = result.last_page || this.page;\n this.entityFiles = this.entityFiles.concat(result.data);\n this.isWorking = false;\n }\n\n addEntityFile() {\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\n width: \"700px\",\n data: {\n entity: this.filters,\n hideTitleAndDetails: this.hideTitleAndDetails\n },\n autoFocus: false,\n restoreFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n const files = [...this.entityFiles];\n files.push(result);\n this.entityFiles = files;\n }\n });\n }\n\n editEntityFile(file: any) {\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\n width: \"700px\",\n autoFocus: false,\n data: {\n file: file,\n hideTitleAndDetails: this.hideTitleAndDetails\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.reload();\n }\n });\n }\n\n deleteEntityFile(file: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: \"Delete File\",\n message: `Are you sure to proceed delete the file ${file.title}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n const result = await this.entityFileService.deleteEntityFile(\n file\n );\n this.alertService.addAlert(\n \"File successfully deleted\",\n \"success\"\n );\n this.reload();\n\n }\n });\n }\n\n onScroll() {\n if (this.page < this.lastPage && !this.isWorking) {\n this.page += 1;\n this.fetchEntityFilesDetails();\n }\n }\n\n reload() {\n this.entityFiles = [];\n this.page = 1;\n if (!this.isWorking) {\n this.fetchEntityFilesDetails();\n }\n }\n\n ngOnDestroy() { }\n\n resetFieldValue() {\n this.search.setValue(\"\");\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\nimport { AlertService } from \"../core/alert.service\";\nimport { FileDropperConfig } from './file-dropper.model';\n\n\n@Component({\n selector: \"app-file-dropper\",\n templateUrl: \"./file-dropper.component.html\",\n styleUrls: [\"./file-dropper.component.scss\"]\n})\nexport class FileDropperComponent implements OnInit {\n @Input() fileArray: any[] = [];\n\n @Input() config: FileDropperConfig;\n\n @Output() fileChanged: any = new EventEmitter();\n\n border = \"1px dashed #989898\";\n\n @Input() styles: any;\n\n isSingleMode: boolean;\n\n constructor(private alertService: AlertService) { }\n\n /**Life cycle hook method */\n ngOnInit() {\n this.isSingleMode = !Boolean(this.config.multiple);\n }\n\n /**Method for dragging event */\n dragEnter(event: any) {\n event.target.style.background = this.config.dragColor || \"#c0c0c0\";\n\n event.target.style.border = \"1px dashed black\";\n\n event.preventDefault();\n }\n\n /**Method for drag over event */\n dragOver(event: any) {\n event.preventDefault();\n }\n\n /**Method for drag leave event */\n dragLeave(event: any) {\n event.target.style.background = \"\";\n event.target.style.border = this.border;\n\n event.preventDefault();\n }\n\n /**Method for drop event */\n dropEvent(event: any) {\n event.target.style.background = \"\";\n event.target.style.border = this.border;\n const droppedFiles: FileList = event.dataTransfer.files;\n if (droppedFiles.length > 0) {\n const fileArray = Array.from(droppedFiles);\n this.addFiles(fileArray);\n }\n event.preventDefault();\n }\n\n /**Method to list files selected */\n onFileChange(event: any) {\n if (event.target.files && event.target.files.length) {\n const fileArray = Array.from(event.target.files);\n this.addFiles(fileArray);\n const fileInput = document.getElementById(\n this.config.fileId\n ) as HTMLInputElement;\n fileInput.value = \"\";\n }\n }\n\n /**Method to add files in the array */\n addFiles(fileArray: any) {\n if (!this.isSingleMode) {\n fileArray.forEach((file: any) => {\n this.fileArray = this.fileArray.filter(\n (item: any) => item.name !== file.name\n );\n if (this.fileSizeAllowed(file)) {\n this.fileArray.push(file);\n }\n });\n\n this.fileArray.sort(this.sortFiles);\n this.fileChanged.emit(this.fileArray);\n } else {\n // Single Mode\n if (this.fileArray.length === 0) {\n if (this.fileSizeAllowed(fileArray[0])) {\n this.fileArray.push(fileArray[0]);\n this.fileArray.sort(this.sortFiles);\n this.fileChanged.emit(this.fileArray);\n }\n }\n }\n }\n\n /**Method to sort the files in asc */\n sortFiles(a: any, b: any) {\n const nameA = a.name.toUpperCase();\n const nameB = b.name.toUpperCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }\n\n /**Method tp validate the file size */\n fileSizeAllowed(file: any): boolean {\n if (!Boolean(this.config.maxSize)) {\n return true;\n } else if (file.size / (1024 * 1024) < this.config.maxSize) {\n return true;\n } else {\n this.alertService.addAlert(\n `The size of the file exceeds the limit ${this.config.maxSize} MB, kindly upload a file with size ${this.config.maxSize} MB or below`,\n \"warn\"\n );\n return false;\n }\n }\n\n /**Method invokes when the drop box is clicked to upload the file */\n clickEvent(event: any) {\n if (!(this.isSingleMode && this.fileArray.length > 0)) {\n document.getElementById(this.config.fileId).click();\n }\n event.preventDefault();\n }\n}\n","export class FileDropperConfig {\n containerId: string;\n fileId: string;\n styles?: any;\n multiple?: boolean;\n dragColor?: boolean;\n acceptFile: string; // use '*' to accept all file types.\n maxSize?: number; // size in MB\n acceptFileText?: string;\n}\n","import { Injectable } from '@angular/core';\nimport { HttpService } from '../core/http.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NoteService {\n\n constructor(private http: HttpService) { }\n\n getNotes(filterModel: any) {\n return this.http.get('api/notes', { params: filterModel }).toPromise();\n }\n\n addNote(note: any) {\n return this.http.post('api/notes', note).toPromise();\n }\n\n editNote(note: any) {\n return this.http.put(`api/notes/${note.id}`, note).toPromise();\n }\n\n deleteNote(note: any) {\n return this.http.delete(`api/notes/${note.id}`).toPromise();\n }\n}\n","import { Component, OnInit, Inject } from \"@angular/core\";\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { NoteService } from \"../note.service\";\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { AlertService } from \"../../core/alert.service\";\n\nconst errorMessages: any = {\n note: {\n required: \"Note is required\"\n }\n};\n\n@Component({\n selector: 'app-note-form',\n templateUrl: './note-form.component.html',\n styleUrls: ['./note-form.component.css']\n})\nexport class NoteFormComponent implements OnInit {\n\n updateMode: boolean;\n noteFormGroup: FormGroup;\n noteFormFirstAttempt: boolean;\n\n constructor(\n public dialogRef: MatDialogRef<NoteFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n private noteService: NoteService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n //TODO: Finialize and add more validations.\n this.noteFormGroup = this.fb.group({\n id: [\"\"],\n note: [\"\", Validators.compose([Validators.required])],\n model_type: [\"\"],\n related_model_id: [\"\"],\n });\n }\n\n ngOnInit() {\n if (this.data.update) {\n this.updateMode = true;\n }\n this.noteFormGroup.patchValue(this.data.note);\n }\n\n //Method to trigger login\n async submit() {\n this.noteFormFirstAttempt = true;\n if (this.noteFormGroup.valid) {\n const model = this.noteFormGroup.value;\n const result = this.updateMode\n ? await this.noteService.editNote(model)\n : await this.noteService.addNote(model);\n\n this.alertService.addAlert(\n `${this.data?.labelText} saved successfully`,\n \"success\"\n );\n this.dialogRef.close(result);\n }\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(\n field,\n this.noteFormGroup,\n this.noteFormFirstAttempt\n );\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(\n field,\n this.noteFormGroup,\n errorMessages\n );\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { NoteService } from '../note.service';\nimport { MatDialog } from '@angular/material/dialog';\nimport { NoteFormComponent } from '../note-form/note-form.component';\nimport { ActionPopupComponent } from '../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../action-popup/action-popup.model';\n\n@Component({\n selector: 'app-note-list',\n templateUrl: './note-list.component.html',\n styleUrls: ['./note-list.component.css']\n})\nexport class NoteListComponent implements OnInit {\n\n @Input() relatedModelId !: any;\n @Input() modelType !: any;\n @Input() readonly: boolean = false;\n @Input() labelText: string = 'Note';\n @Input() commentsView: boolean = false;\n\n notes: any[] = [];\n filters: any;\n displayedColumns = [\n 'index',\n 'note',\n 'actions'\n ];\n\n page = 1;\n lastPage = 1;\n\n constructor(private noteService: NoteService,\n private dialog: MatDialog\n ) {\n this.filters = {};\n this.filters.sort_by = \"created_at|DESC\";\n }\n\n ngOnInit() {\n if (this.readonly) {\n this.displayedColumns = this.displayedColumns.filter(x => x !== 'actions');\n }\n this.filters.related_model_id = this.relatedModelId;\n this.filters.model_type = this.modelType;\n this.loadData();\n }\n\n async loadData() {\n\n const result: any = await this.noteService.getNotes({ ...this.filters, page: this.page });\n this.notes = this.notes.concat(result.data);\n this.page = result.current_page;\n this.lastPage = result.last_page;\n }\n\n addNote() {\n const dialogRef = this.dialog.open(NoteFormComponent, {\n width: \"400px\",\n data: {\n note: { related_model_id: this.relatedModelId, model_type: this.modelType },\n labelText: this.labelText,\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.resetScroll();\n this.loadData();\n }\n });\n }\n\n editNote(note: any) {\n const dialogRef = this.dialog.open(NoteFormComponent, {\n width: \"400px\",\n data: {\n note: note,\n update: true,\n labelText: this.labelText\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.resetScroll();\n this.loadData();\n }\n });\n }\n\n async deleteNote(note: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: `Delete ${this.labelText}`,\n message: `Are you sure to delete?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n\n const result = await this.noteService.deleteNote(note);\n this.notes = this.notes.filter((item: any) => item.id !== note.id);\n\n }\n });\n }\n\n resetScroll() {\n this.page = 1;\n this.lastPage = 1;\n this.notes = [];\n }\n\n onScroll() {\n if (this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n commentAction(event: any) {\n if (event.type === \"save\") {\n if (event.value.id) {\n this.editComment(event.value);\n return;\n }\n this.addComment(event.value);\n return;\n }\n this.deleteNote(event.value);\n }\n\n async editComment(comment: any) {\n const result: any = await this.noteService.editNote(comment);\n let index = this.notes.findIndex(\n (x: any) => x.id === comment.id\n );\n if (index !== -1) {\n this.notes[index] = result.item;\n }\n }\n\n async addComment(comment: any) {\n comment.related_model_id = this.relatedModelId;\n comment.model_type = this.modelType;\n const result: any = await this.noteService.addNote(comment);\n this.notes.push(result.item);\n }\n\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n OnDestroy\n} from \"@angular/core\";\nimport { FormGroup, FormBuilder } from \"@angular/forms\";\nimport { CredentialsService } from \"../../core/credentials.service\";\n\n@Component({\n selector: \"app-comment-form\",\n templateUrl: \"./comment-form.component.html\",\n styleUrls: [\"./comment-form.component.scss\"]\n})\nexport class CommentFormComponent implements OnInit, OnDestroy {\n commentFormGroup: FormGroup;\n view: boolean;\n _commentData: any;\n\n @Input() set commentData(data: any) {\n this.view = !!data;\n this._commentData = data;\n this.commentFormGroup.patchValue(data);\n }\n\n @Output() action = new EventEmitter();\n\n constructor(private fb: FormBuilder,\n private credentialService: CredentialsService\n ) {\n this.createForm();\n }\n\n ngOnInit() { }\n\n get isLoggedIn() {\n return this.credentialService.isAuthenticated;\n }\n\n get currentUser() {\n return this.credentialService.credentials.user;\n }\n\n private createForm() {\n //TODO: Finialize and add more validations.\n this.commentFormGroup = this.fb.group({\n id: [\"\"],\n note: [\"\"],\n model_type: [\"\"],\n related_model_id: [\"\"],\n });\n }\n\n submit() {\n if (this.commentFormGroup.get(\"note\").value) {\n if (this._commentData) {\n this.view = !this.view;\n }\n this.action.emit({ type: \"save\", value: this.commentFormGroup.value });\n this.commentFormGroup.reset();\n } else if (this.commentFormGroup.get(\"id\").value) {\n this.deleteComment();\n }\n }\n\n hideEdit() {\n if (this.commentFormGroup.get(\"id\").value) {\n this.view = !this.view;\n }\n }\n\n editComment() {\n this.view = !this.view;\n this.commentFormGroup.patchValue(this._commentData);\n }\n\n deleteComment() {\n this.action.emit({ type: \"delete\", value: this.commentFormGroup.value });\n }\n\n ngOnDestroy() { }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, Input, OnDestroy, OnInit, Optional, Self, Output, EventEmitter, TemplateRef } from '@angular/core';\nimport { FormBuilder, FormGroup, ControlValueAccessor, NgControl, Validators } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject, of, from } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, startWith, switchMap, finalize } from 'rxjs/operators';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { HttpService } from '../core/http.service';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\n\n@UntilDestroy()\n@Component({\n selector: 'app-searchable-selector',\n templateUrl: './searchable-selector.component.html',\n styleUrls: ['./searchable-selector.component.scss'],\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: SearchableSelectorComponent\n }\n ]\n})\nexport class SearchableSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\n\n @Input() valueField: string = 'id';\n @Input() titleField: string = 'title';\n @Input() apiUrl!: string;\n @Input() multiple: boolean = false;\n @Input() selectedValue: any;\n @Output() selectedValueChange = new EventEmitter();\n @Input() enableSearch: boolean = true;\n @Input() add: boolean = false;\n @Input() addConfig: any;\n @Input() edit: boolean = false;\n @Input() editConfig: any;\n @Input() sort: boolean = true;\n @Input() sortBy: string;\n @Input() searchField: string;\n @Input() itemComponent: ComponentType<unknown> | TemplateRef<unknown>;\n @Input() items: any[] = [];\n @Input() cache: boolean = false;\n @Input() perPage: number = 25;\n @Input() inDataSearch: boolean = false;\n @Output() selectionChange = new EventEmitter();\n @Output() itemsChange = new EventEmitter();\n\n\n isLoading: boolean = false;\n onChange: any = () => { };\n onTouched: any = () => { };\n static nextId = 0;\n selectorForm: FormGroup;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'searchable-selctor';\n id = `searchable-selctor-${SearchableSelectorComponent.nextId++}`;\n describedBy = '';\n filters: any;\n cachedItems: any[] = [];\n\n\n get empty() {\n const { value: { select_value } } = this.selectorForm;\n return !select_value;\n }\n\n get shouldLabelFloat() { return this.focused || !this.empty; }\n\n\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this.selectorForm.get('select_value').setValidators(Validators.required);\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n @Input()\n get value(): any {\n if (this.selectorForm.valid) {\n return this.selectorForm.value.select_value;\n }\n return '';\n }\n set value(data: any) {\n this.selectorForm.patchValue({ select_value: data || '' });\n this.stateChanges.next();\n }\n\n constructor(\n formBuilder: FormBuilder,\n private _focusMonitor: FocusMonitor,\n private http: HttpService,\n private _elementRef: ElementRef<HTMLElement>,\n private dialog: MatDialog,\n @Optional() @Self() public ngControl: NgControl) {\n\n this.selectorForm = formBuilder.group({\n select_value: [null],\n search: ''\n });\n\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n openedChange(event: any) {\n if (this.dataItems.length === 0 && this.selectorForm.get('search').value) {\n this.selectorForm.get('search').setValue('');\n }\n }\n\n get dataItems(): any[] {\n let items: any[] = [];\n if (this.multiple && this.selectedValue && (this.selectedValue.length > 0))\n items = [...this.selectedValue, ...this.items];\n else if ((!this.multiple) && this.selectedValue)\n items = [this.selectedValue, ...this.items];\n else\n items = this.items;\n items = items.filter((v, i, a) => a.findIndex(v => v[this.valueField] === a[i][this.valueField]) === i);\n //Emit the items to any child component\n this.itemsChange.emit(items);\n return items;\n }\n\n ngOnInit() {\n this.selectorForm.get('search').valueChanges\n .pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n if (this.enableSearch)\n this.search(value);\n });\n\n this.filters = {\n perPage: this.perPage,\n search: '',\n page: 1,\n lastPage: 1\n }\n if (this.sort) {\n this.filters.sort_by = this.sortBy || `${this.titleField}|asc`;\n }\n\n //Fetch Items only if it is not present, can be used in places where we load many entries.\n if (this.items.length === 0) {\n this.fetchItemList();\n }\n }\n\n fetchItemList() {\n this.isLoading = true;\n let request = this.http.get(this.apiUrl, { params: this.filters })\n if (this.cache) {\n request = this.http.cache().get(this.apiUrl, { params: this.filters })\n }\n of().pipe(\n startWith(true),\n switchMap((_) => from(request)),\n finalize(() => this.isLoading = false),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.items = this.items.concat(result.data);\n if (this.cache) {\n this.cachedItems = this.items;\n }\n this.filters.page = result.current_page;\n this.filters.lastPage = result.last_page;\n });\n }\n\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n onContainerClick(event: MouseEvent) {\n event.stopPropagation();\n }\n\n writeValue(data: any): void {\n this.value = data;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getPropertyValue(ele: any, keyString: string) {\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\n const keyList = keyString.split(\".\");\n for (let i = 0, n = keyList.length; i < n; ++i) {\n const key = keyList[i];\n if (ele && key in ele) {\n ele = ele[key];\n } else {\n return;\n }\n }\n return ele;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n if (this.multiple)\n this.selectedValue = (this.value as []).map(x => this.dataItems.find(y => y[this.valueField] === x));\n else\n this.selectedValue = this.dataItems.find(x => x[this.valueField] === this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(this.value);\n }\n\n get errorState(): boolean {\n return (this.ngControl && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty));\n }\n\n static ngAcceptInputType_disabled: boolean | string | null | undefined;\n static ngAcceptInputType_required: boolean | string | null | undefined;\n\n onScroll() {\n if (this.filters.lastPage > this.filters.page) {\n this.filters.page += 1;\n this.fetchItemList();\n }\n }\n\n reloadData() {\n this.items = [];\n this.filters.page = 1;\n this.filters.lastPage = 1;\n this.fetchItemList();\n }\n\n search(event: any) {\n if (this.searchField) {\n this.filters[this.searchField] = event;\n } else {\n this.filters.search = event;\n }\n // we need search field to search in data\n if (this.inDataSearch && this.searchField) {\n this.filterItems(event);\n } else {\n this.reloadData();\n }\n }\n\n filterItems(event: string) {\n if (event) {\n this.items = this.cachedItems.filter((value: any) => {\n return (value[this.searchField] as string).toLowerCase().search(event.toLowerCase()) != -1\n })\n } else {\n this.items = this.cachedItems;\n }\n }\n\n addItem(event: any) {\n const dialogRef = this.dialog.open(this.itemComponent, {\n width: '400px',\n autoFocus: false,\n data: {},\n ...this.addConfig\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.items.push(result.item);\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\n this._handleInput();\n }\n });\n event.stopPropagation();\n }\n\n editItem(event: any) {\n const dialogRef = this.dialog.open(this.itemComponent, {\n width: '400px',\n autoFocus: false,\n data: {\n item: this.selectedValue\n },\n ...this.editConfig\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.items = this.items.filter(x => x[this.valueField] !== this.selectedValue[this.valueField]);\n this.items.push(result.item);\n this.selectedValue = null;\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\n this._handleInput();\n }\n });\n event.stopPropagation();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { AfterViewInit, Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\nimport { MatSelect, SELECT_ITEM_HEIGHT_EM } from '@angular/material/select';\nimport { debounceTime, takeUntil, tap } from 'rxjs/operators';\nimport { fromEvent, Subject } from 'rxjs';\n\n@Directive({\n selector: '[msInfiniteScroll]'\n})\nexport class MatSelectInfiniteScrollDirective implements OnInit, OnDestroy, AfterViewInit {\n\n @Input() threshold = '15%';\n @Input() debounceTime = 150;\n @Input() complete: boolean;\n @Output() infiniteScroll = new EventEmitter<void>();\n\n private panel: Element;\n private thrPx = 0;\n private thrPc = 0;\n private singleOptionHeight = SELECT_ITEM_HEIGHT_EM;\n\n private destroyed$ = new Subject<boolean>();\n\n constructor(private matSelect: MatSelect, private ngZone: NgZone) {\n }\n\n ngOnInit() {\n this.evaluateThreshold();\n }\n\n ngAfterViewInit() {\n this.matSelect.openedChange.pipe(\n takeUntil(this.destroyed$)\n ).subscribe((opened) => {\n if (opened) {\n this.panel = this.matSelect.panel.nativeElement;\n this.singleOptionHeight = this.getSelectItemHeightPx();\n this.registerScrollListener();\n }\n });\n }\n\n ngOnDestroy() {\n this.destroyed$.next(true);\n this.destroyed$.complete();\n }\n\n evaluateThreshold() {\n if (this.threshold.lastIndexOf('%') > -1) {\n this.thrPx = 0;\n this.thrPc = (parseFloat(this.threshold) / 100);\n\n } else {\n this.thrPx = parseFloat(this.threshold);\n this.thrPc = 0;\n }\n }\n\n registerScrollListener() {\n fromEvent(this.panel, 'scroll').pipe(\n takeUntil(this.destroyed$),\n debounceTime(this.debounceTime),\n tap((event) => {\n this.handleScrollEvent(event);\n })\n ).subscribe();\n }\n\n handleScrollEvent(event) {\n this.ngZone.runOutsideAngular(() => {\n if (this.complete) {\n return;\n }\n const countOfRenderedOptions = this.matSelect.options.length;\n const infiniteScrollDistance = this.singleOptionHeight * countOfRenderedOptions;\n const threshold = this.thrPc !== 0 ? (infiniteScrollDistance * this.thrPc) : this.thrPx;\n\n const scrolledDistance = this.panel.clientHeight + event.target.scrollTop;\n\n if ((scrolledDistance + threshold) >= infiniteScrollDistance) {\n this.ngZone.run(() => this.infiniteScroll.emit());\n }\n });\n }\n\n getSelectItemHeightPx(): number {\n return parseFloat(getComputedStyle(this.panel).fontSize) * SELECT_ITEM_HEIGHT_EM;\n }\n\n}","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n/**\r\n * Component to generate a num items selector\r\n * \r\n * @author Floyd Kissoon\r\n * @since 20170817\r\n */\r\n@Component({\r\n selector: \"num-items-selector\",\r\n templateUrl: \"./num-items-selector.html\"\r\n})\r\nexport class NumItemsSelector {\r\n @Input() numItems: number;\r\n @Output() numItemsChange: EventEmitter<number>;\r\n\r\n constructor() {\r\n this.numItemsChange = new EventEmitter<number>();\r\n }\r\n\r\n /**\r\n * Called when an item has been selected\r\n */\r\n numItemsChanged() {\r\n this.numItemsChange.emit(this.numItems);\r\n }\r\n\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\n\n/**\n * Service that provides utility functions for dates\n * \n * @author Joshua Kissoon\n * @since 20170726\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DateUtils {\n\n /**\n * Takes in a date object and outputs the string value\n */\n getYYYYMMDDString(inputDate: Date): string {\n var year = inputDate.getFullYear();\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\n\n return year + \"-\" + month + \"-\" + date;\n }\n\n /**\n * Takes in a date object and outputs the year\n */\n getYYYY(inputDate: Date): number {\n var year = inputDate.getFullYear();\n return year;\n }\n\n /**\n * Takes in a date object and outputs the Month\n */\n getMM(inputDate: Date): number {\n var month = inputDate.getMonth() + 1;\n return month;\n }\n // var n = this.rfidCardUseManualEntry.manual_date.toLocaleTimeString();\n\n getDateTime(inputDate: Date): string {\n var year = inputDate.getFullYear();\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\n var time = inputDate.toLocaleTimeString();\n\n return year + \"-\" + month + \"-\" + date + \" \" + time;\n }\n\n}","import { Component, Input, Output, EventEmitter, OnInit } from \"@angular/core\";\n\n/**\n * Component to generate a number selector\n * \n * @author Floyd Kissoon\n * @since 20180628\n */\n@Component({\n selector: \"number-selector\",\n templateUrl: \"./number-selector.html\"\n})\nexport class NumberSelector implements OnInit {\n @Input() start_value: number;\n @Input() end_value: number\n @Output() selectedValueChange: EventEmitter<number>;\n @Input() selectedValue: number;\n\n items = new Array();\n\n constructor() {\n this.selectedValueChange = new EventEmitter<number>();\n }\n\n /**\n * Called when an item has been selected\n */\n numChanged() {\n this.selectedValueChange.emit(this.selectedValue);\n }\n\n\n ngOnInit() {\n for (var i = this.start_value; i < this.end_value + 1; i++) {\n this.items.push(i);\n }\n }\n}\n","export interface TimelineValue {\n date_from: Date,\n date_to: Date,\n show_custom_field: boolean\n}\nexport function calculateTimeline(value: any) {\n const date = new Date();\n const data: any = {\n 'date_from': date,\n 'date_to': date,\n 'show_custom_field': false\n };\n switch (value) {\n case 1: { //Custom\n data.show_custom_field = true;\n break;\n }\n case 2: { // Today\n data.date_from = date;\n data.date_to = date;\n break;\n }\n case 3: { // Yesterday\n const yesterday = new Date(date)\n yesterday.setDate(yesterday.getDate() - 1)\n data.date_from = yesterday;\n data.date_to = yesterday;\n break;\n }\n case 4: { // This Week\n var first = date.getDate() - date.getDay() + 1; // First day is the day of the month - the day of the week\n var last = first + 6; // last day is the first day + 6\n data.date_from = new Date(date.setDate(first));\n data.date_to = new Date(date.setDate(last));\n break;\n }\n case 5: { // Last Week\n var d = new Date();\n var to = d.setTime(d.getTime() - (d.getDay() ? d.getDay() : 7) * 24 * 60 * 60 * 1000);\n var from = d.setTime(d.getTime() - 6 * 24 * 60 * 60 * 1000);\n data.date_from = new Date(from);\n data.date_to = new Date(to);\n break;\n }\n case 6: { //This Month\n data.date_from = new Date(date.getFullYear(), date.getMonth(), 1);\n data.date_to = new Date(date.getFullYear(), date.getMonth() + 1, 0);\n break;\n }\n case 7: { // Last Month\n var d = new Date(); // current date\n d.setDate(1); // going to 1st of the month\n d.setHours(-1);\n data.date_from = new Date(date.getFullYear(), date.getMonth() - 1, 1);\n data.date_to = d;\n break;\n }\n case 8: { // This Quarter\n const quarter = Math.floor((date.getMonth() / 3));\n const startFullQuarter = new Date(date.getFullYear(), quarter * 3, 1);\n const endFullQuarter = new Date(startFullQuarter.getFullYear(), startFullQuarter.getMonth() + 3, 0);\n data.date_from = startFullQuarter;\n data.date_to = endFullQuarter;\n break;\n }\n case 9: { // Last Quarter\n const quarter = Math.floor((date.getMonth() / 3));\n const startFullQuarter = new Date(date.getFullYear(), quarter * 3 - 3, 1);\n const endFullQuarter = new Date(startFullQuarter.getFullYear(), startFullQuarter.getMonth() + 3, 0)\n data.date_from = startFullQuarter;\n data.date_to = endFullQuarter;\n break;\n }\n case 10: { // This Year\n data.date_from = new Date(\"1/1/\" + (new Date()).getFullYear());;\n data.date_to = new Date(\"12/31/\" + (new Date()).getFullYear());\n break;\n }\n case 11: { // Last Year\n data.date_from = new Date(\"1/1/\" + (new Date().getFullYear() - 1));;\n data.date_to = new Date(\"12/31/\" + (new Date().getFullYear() - 1));\n break;\n break;\n }\n default: { // All\n data.date_from = '';\n data.date_to = '';\n break;\n }\n\n }\n return data;\n}\n","export class Timeline {\n public static CUSTOM: number = 1;\n public static TODAY: number = 2;\n public static YESTERDAY: number = 3;\n public static THIS_WEEK: number = 4;\n public static LAST_WEEK: number = 5;\n public static THIS_MONTH: number = 6;\n public static LAST_MONTH: number = 7;\n public static THIS_QUARTER: number = 8;\n public static LAST_QUARTER: number = 9;\n public static THIS_YEAR: number = 10;\n public static LAST_YEAR: number = 11;\n public static ALL: number = 12;\n}","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DatePipe } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Optional, Output, Self, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl, Validators } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\nimport { TimelineValue, calculateTimeline } from './calculate-timeline';\nimport { Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\n\n@UntilDestroy()\n@Component({\n selector: 'app-timeline-filter',\n templateUrl: './timeline-filter.component.html',\n styleUrls: ['./timeline-filter.component.scss'],\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: TimelineFilterComponent\n }\n ]\n})\nexport class TimelineFilterComponent implements OnInit, ControlValueAccessor {\n\n @ViewChild('picker') picker;\n @Input() timelineValue: FormControl = new FormControl('');\n @Input() timelines: any[] = [\n { value: 1, viewValue: 'Custom' },\n { value: 2, viewValue: 'Today' },\n { value: 3, viewValue: 'Yesterday' },\n { value: 4, viewValue: 'This Week' },\n { value: 5, viewValue: 'Last Week' },\n { value: 6, viewValue: 'This Month' },\n { value: 7, viewValue: 'Last Month' },\n { value: 8, viewValue: 'This Quarter' },\n { value: 9, viewValue: 'Last Quarter' },\n { value: 10, viewValue: 'This Year' },\n { value: 11, viewValue: 'Last Year' },\n { value: 12, viewValue: 'All dates' },\n ];\n @Input() dateFrom: string = 'date_from';\n @Input() dateTo: string = 'date_to';\n @Input() appearance: any = \"legacy\"\n @Input() showClearbutton: boolean = false;\n /**\n * @deprecated The form input is deprated\n */\n @Input() form: FormGroup = null;\n @Input() labelText: string = 'Select Timeline';\n @Input() selectedValue: any;\n @Input() touchUi: boolean = true;\n @Output() selectedValueChange = new EventEmitter();\n @Output() selectionChange = new EventEmitter();\n\n selectorForm: FormGroup;\n onChange: any = () => { };\n onTouched: any = () => { };\n static nextId = 0;\n stateChanges = new Subject<void>();\n controlType = 'timeline-filter';\n id = `timeline-filter-${TimelineFilterComponent.nextId++}`;\n describedBy = '';\n\n selectedRange: TimelineValue;\n @Input() set defaultValue(value: any) {\n this.timelineValue.setValue(value);\n this.changeTimeline(value);\n }\n\n showCustomDateFields: boolean = false;\n\n constructor(\n formBuilder: FormBuilder,\n @Optional() @Self() public ngControl: NgControl,\n private datePipe: DatePipe\n ) {\n this.selectorForm = formBuilder.group({\n select_value: [null],\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this.selectorForm.get('select_value').setValidators(Validators.required);\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n @Input()\n get value(): any {\n if (this.selectorForm.valid) {\n return this.selectorForm.value.select_value;\n }\n return '';\n }\n set value(data: any) {\n this.selectorForm.patchValue({ select_value: data || '' });\n this._handleInput();\n this.stateChanges.next();\n }\n\n getDateRangeString() {\n let str = \"\";\n if (this.selectedRange?.show_custom_field) {\n if (this.selectedRange?.date_from.toUTCString() != 'Invalid Date') {\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_from?.toUTCString())\n }\n if (this.selectedRange?.date_to.toUTCString() != 'Invalid Date') {\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_to?.toUTCString())\n }\n }\n return str;\n }\n\n resetFieldValue(field: string) {\n this.form.get(field).setValue('');\n }\n\n\n getFieldValue(field: string) {\n return this.form.get(field).value;\n }\n\n setFieldValue(field: string, value: any) {\n this.form.get(field).setValue(value);\n }\n\n changeTimeline(value: any) {\n const timeline = calculateTimeline(value);\n if (timeline) {\n this.setFieldValue(this.dateFrom, timeline.date_from)\n this.setFieldValue(this.dateTo, timeline.date_to)\n this.showCustomDateFields = timeline.show_custom_field;\n }\n }\n\n _handleInput(): void {\n if (this.value == 1) {\n this.picker.open();\n return;\n }\n const range: TimelineValue = calculateTimeline(this.value);\n this.selectedRange = range;\n this.onChange(this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(range);\n }\n\n dateRangeChange(dateRangeStart: HTMLInputElement, dateRangeEnd: HTMLInputElement) {\n const range: TimelineValue = {\n date_from : new Date(dateRangeStart.value),\n date_to: new Date(dateRangeEnd.value),\n show_custom_field: true\n }\n this.selectedRange = range;\n this.onChange(this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(range);\n }\n\n onCustomDateChange(event: any) {\n }\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n onContainerClick(event: MouseEvent) {\n event.stopPropagation();\n }\n\n writeValue(data: any): void {\n this.value = data;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n ngOnInit(): void {\n console.log(this.form);\n\n this.timelineValue.valueChanges.\n pipe(\n debounceTime(100),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => this.changeTimeline(value));\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'app-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss']\n})\nexport class LoaderComponent implements OnInit {\n\n @Input() isLoading = false;\n @Input() size = 0.6;\n @Input() message: string | undefined;\n\n constructor() { }\n\n ngOnInit() { }\n\n}\n","import { NgModule } from '@angular/core';\nimport { SuccessSnackComponent, ErrorSnackComponent } from './snack.component';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n declarations: [\n SuccessSnackComponent,\n ErrorSnackComponent\n ],\n imports: [\n CommonModule,\n MatSnackBarModule,\n MatIconModule\n ],\n exports: [\n SuccessSnackComponent,\n ErrorSnackComponent,\n ]\n})\nexport class SnackModule { }\n","import { Injectable } from '@angular/core';\nimport { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { CredentialsService } from './credentials.service';\nimport { Logger } from './logger.service';\n\nconst log = new Logger('AuthenticationGuard');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationGuard implements CanActivate {\n\n constructor(private router: Router,\n private credentialsService: CredentialsService) { }\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.isUserAuthenticated(route, state);\n }\n\n canLoad(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.isUserAuthenticated(route, state);\n }\n\n isUserAuthenticated(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (this.credentialsService.isAuthenticated) {\n return true;\n }\n\n log.debug('Not authenticated, redirecting and adding redirect url...');\n this.router.navigate(['/login'], { queryParams: { redirect: state.url }, replaceUrl: true });\n return false;\n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { concatMap, map } from 'rxjs/operators';\nimport { Credentials, CredentialsService } from './credentials.service';\nimport { HttpService } from './http.service';\n\n/**\n * Provides a base for authentication workflow.\n * The login/logout methods should be replaced with proper implementation.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationService {\n\n constructor(private credentialsService: CredentialsService, private http: HttpService) { }\n\n /**\n * Authenticates the user.\n * @param context The login parameters.\n * @return The user credentials.\n */\n login(context: any): Observable<Credentials> {\n const data = <Credentials>{};\n return this.http\n .skipToken()\n .post('oauth/token', context)\n .pipe(\n concatMap(async (tokenInfo: any) => {\n tokenInfo.expires_in = Date.now() + (tokenInfo.expires_in * 1000);\n data.token = tokenInfo;\n data.user = {};\n this.credentialsService.setCredentials(data, context.remember);\n const userInfo: any = await this.http.get('api/user/current').toPromise();\n data.user = userInfo?.user;\n this.credentialsService.setCredentials(data, context.remember);\n return data;\n })\n )\n }\n\n /**\n * Logs out the user and clear credentials.\n * @return True if the user was logged out successfully.\n */\n logout(): Observable<boolean> {\n\n this.credentialsService.setCredentials();\n return of(true);\n }\n\n}\n","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { Injectable } from '@angular/core';\n\n/**\n * A route strategy allowing for explicit route reuse.\n * Used as a workaround for https://github.com/angular/angular/issues/18374\n * To reuse a given route, add `data: { reuse: true }` to the route definition.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class RouteReusableStrategy extends RouteReuseStrategy {\n\n public shouldDetach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n public store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle | null): void { }\n\n public shouldAttach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n public retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n return null;\n }\n\n public shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n // Reuse the route if the RouteConfig is the same, or if both routes use the\n // same component, because the latter can have different RouteConfigs.\n return future.routeConfig === curr.routeConfig ||\n Boolean(future.routeConfig?.component &&\n future.routeConfig?.component === curr.routeConfig?.component);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\n/**\r\n * Service used to manage Local Storage\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20190623\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class StorageService {\r\n private storageSub = new Subject<any>();\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n watch(): Observable<any> {\r\n return this.storageSub.asObservable();\r\n }\r\n\r\n setItem(key: string, data: any) {\r\n localStorage.setItem(key, data);\r\n this.storageSub.next({ key: key, value: data });\r\n }\r\n\r\n getItem(key: string) {\r\n return localStorage.getItem(key);\r\n }\r\n\r\n removeItem(key: string) {\r\n const data = this.getItem(key);\r\n localStorage.removeItem(key);\r\n this.storageSub.next({ key: key, value: data });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\n\r\n/**\r\n * Service that provides a wrapper for retrieving data from the server\r\n * @deprecated use HttpService Instead\r\n * @author Joshua Kissoon\r\n * @since 20170709\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DataManager {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n /**\r\n * Callback wrapper for the HTTP GET Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n * @updated 20170711 to add parameters\r\n */\r\n GET(urlq: string, params = {}): any {\r\n return this.http\r\n .get(urlq, { params: params })\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP POST Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the POST data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n POST(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .post(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP POST Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the POST data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n POSTRAW(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .skipHeader()\r\n .post(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n\r\n /**\r\n * Callback wrapper for the HTTP PUT Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the PUT data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n PUT(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .put(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP PATCH Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the PUT data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20161107\r\n */\r\n PATCH(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .patch(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP DELETE Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n DELETE(urlq: string): any {\r\n return this.http\r\n .delete(urlq)\r\n .toPromise();\r\n }\r\n\r\n}","import { MatTooltipModule } from '@angular/material/tooltip';\n/*\n * This module imports and re-exports all Angular Material modules for convenience,\n * so only 1 module import is needed in your feature modules.\n * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.\n *\n * To optimize your production builds, you should only import the components used in your app.\n */\n\nimport { NgModule } from \"@angular/core\";\nimport {\n MatCommonModule,\n MatLineModule,\n MatNativeDateModule,\n MatOptionModule,\n MatPseudoCheckboxModule,\n MatRippleModule\n} from \"@angular/material/core\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatMenuModule } from \"@angular/material/menu\";\nimport { MatProgressSpinnerModule } from \"@angular/material/progress-spinner\";\nimport { MatSelectModule } from \"@angular/material/select\";\nimport { MatSortModule } from \"@angular/material/sort\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { MatCardModule } from \"@angular/material/card\";\nimport { MatDividerModule } from \"@angular/material/divider\";\nimport { MatChipsModule } from \"@angular/material/chips\";\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatListModule } from '@angular/material/list'\n\n\n@NgModule({\n exports: [\n MatButtonModule,\n MatCheckboxModule,\n MatCommonModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatLineModule,\n MatMenuModule,\n MatNativeDateModule,\n MatOptionModule,\n MatProgressSpinnerModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n MatSelectModule,\n MatSortModule,\n MatTableModule,\n MatCardModule,\n MatDividerModule,\n MatChipsModule,\n MatDatepickerModule,\n MatListModule,\n MatTooltipModule\n ]\n})\nexport class MaterialModule { }\n","import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';\nimport { RouteReuseStrategy, RouterModule } from '@angular/router';\n\nimport { RouteReusableStrategy } from './route-reusable-strategy';\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\nimport { HttpService } from './http.service';\nimport { TokenInterceptor } from './token.interceptor';\nimport { CacheInterceptor } from './cache.interceptor';\nimport { SnackModule } from './snack/snack.module';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n RouterModule,\n SnackModule\n ],\n providers: [\n {\n provide: HttpClient,\n useClass: HttpService\n },\n {\n provide: RouteReuseStrategy,\n useClass: RouteReusableStrategy\n }\n ],\n exports: [\n SnackModule\n ]\n})\nexport class CoreModule {\n\n constructor(@Optional() @SkipSelf() parentModule: CoreModule) {\n // Import guard\n if (parentModule) {\n throw new Error(`${parentModule} has already been loaded. Import Core module in the root module only.`);\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupComponent } from './action-popup.component';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n FlexLayoutModule,\n CommonModule,\n MaterialModule\n ],\n declarations: [\n ActionPopupComponent\n ],\n exports: [\n ActionPopupComponent\n ],\n entryComponents: [\n ActionPopupComponent\n ]\n})\nexport class ActionPopupModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { DataTableComponent } from './data-table.component';\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n imports: [\n FlexLayoutModule,\n CommonModule,\n InfiniteScrollModule,\n MaterialModule\n ],\n declarations: [\n DataTableComponent\n ],\n exports: [\n DataTableComponent\n ]\n})\nexport class DataTableModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { DocumentViewerComponent } from './document-viewer.component';\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FlexLayoutModule,\n NgxDocViewerModule,\n MaterialModule\n ],\n declarations: [\n DocumentViewerComponent\n ],\n exports: [\n DocumentViewerComponent\n ]\n})\nexport class DocumentViewerModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FileDropperComponent } from './file-dropper.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FlexLayoutModule,\n MaterialModule\n ],\n declarations: [\n FileDropperComponent\n ],\n exports: [FileDropperComponent]\n})\nexport class FileDropperModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\nimport { EntityFilesViewAllComponent } from './entity-files-view-all.component';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FileDropperModule } from '../file-dropper/file-dropper.module';\nimport { DocumentViewerModule } from '../document-viewer/document-viewer.module';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n declarations: [EntityFileFormComponent, EntityFilesViewAllComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n FileDropperModule,\n DocumentViewerModule,\n InfiniteScrollModule,\n ActionPopupModule,\n MaterialModule\n ],\n exports: [\n EntityFilesViewAllComponent\n ],\n entryComponents: [EntityFileFormComponent]\n})\nexport class EntityFilesViewAllModule { }\n","import { Component, OnInit, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-read-more\",\n templateUrl: \"./read-more.component.html\",\n styleUrls: [\"./read-more.component.scss\"]\n})\nexport class ReadMoreComponent implements OnInit {\n @Input() text: string;\n @Input() maxLength: number = 100;\n currentText: string;\n hideToggle: boolean = true;\n\n isCollapsed: boolean = true;\n\n constructor() {}\n\n ngOnInit() {\n this.determineView();\n }\n\n toggleView() {\n this.isCollapsed = !this.isCollapsed;\n this.determineView();\n }\n\n determineView() {\n if (!this.text || this.text.length <= this.maxLength) {\n this.currentText = this.text;\n this.isCollapsed = false;\n this.hideToggle = true;\n return;\n }\n this.hideToggle = false;\n if (this.isCollapsed == true) {\n this.currentText = this.text.substring(0, this.maxLength) + \"...\";\n } else if (this.isCollapsed == false) {\n this.currentText = this.text;\n }\n }\n}\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReadMoreComponent } from './read-more.component';\n\n@NgModule({\n declarations: [ReadMoreComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule\n ],\n exports: [\n ReadMoreComponent\n ]\n})\nexport class ReadMoreModule { }","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NoteListComponent } from './note-list/note-list.component';\nimport { NoteFormComponent } from './note-form/note-form.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\nimport { MaterialModule } from '../material.module';\nimport { CommentFormComponent } from './comment-form/comment-form.component';\nimport { ReadMoreModule } from '../read-more/read-more.module';\n\n@NgModule({\n declarations: [\n NoteListComponent,\n NoteFormComponent,\n CommentFormComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n ActionPopupModule,\n MaterialModule,\n ReadMoreModule\n ],\n exports: [\n NoteListComponent\n ],\n entryComponents: [NoteFormComponent]\n})\nexport class NoteModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SearchableSelectorComponent } from './searchable-selector.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectInfiniteScrollDirective } from './mat-select-infinite-scroll.directive';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n MaterialModule\n ],\n declarations: [\n SearchableSelectorComponent,\n MatSelectInfiniteScrollDirective\n ],\n exports: [\n SearchableSelectorComponent,\n MatSelectInfiniteScrollDirective\n ]\n})\nexport class SearchableSelectorModule { }\n","import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n/* Selectors */\r\nimport { NumItemsSelector } from './num-items-selector.component';\r\nimport { NumberSelector } from './number-selector.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ],\r\n declarations: [\r\n NumItemsSelector, NumberSelector,\r\n ],\r\n exports: [NumItemsSelector, NumberSelector]\r\n})\r\nexport class UtilityModule { }\r\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TimelineFilterRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TimelineFilterRoutingModule } from './timeline-filter-routing.module';\nimport { TimelineFilterComponent } from './timeline-filter.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n declarations: [TimelineFilterComponent],\n imports: [\n CommonModule,\n TimelineFilterRoutingModule,\n FlexLayoutModule,\n MaterialModule,\n ReactiveFormsModule\n ],\n exports: [TimelineFilterComponent]\n})\nexport class TimelineFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LoaderComponent } from './loader.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\n@NgModule({\n declarations: [\n LoaderComponent\n ],\n imports: [\n CommonModule,\n MatProgressSpinnerModule\n ],\n exports: [\n LoaderComponent\n ]\n})\nexport class LoaderModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionRoutingModule } from './email-subscription-routing.module';\n\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionRoutingModule\n ]\n})\nexport class EmailSubscriptionModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserRoutingModule } from './email-subscription-user-routing.module';\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionUserRoutingModule\n ]\n})\nexport class EmailSubscriptionUserModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserFormRoutingModule { }\n","\nimport { Component, Inject, OnInit, TemplateRef } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { finalize } from 'rxjs/operators';\nimport { AlertService } from '../../../core/alert.service';\nimport { FormValidatorService } from '../../../core/form-validator.service';\nimport { HttpService } from '../../../core/http.service';\nimport { Logger } from '../../../core/logger.service';\n\nconst log = new Logger('EmailSubscriptionUser Form');\n\nconst errorMessages: any = {\n user_id: {\n required: \"User is required\"\n },\n email_type_id: {\n required: \"Email Type is required\"\n },\n};\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-form',\n templateUrl: './email-subscription-user-form.component.html',\n styleUrls: ['./email-subscription-user-form.component.scss']\n})\nexport class EmailSubscriptionUserFormComponent implements OnInit {\n\n updateMode: boolean;\n esUserFormGroup: FormGroup;\n esUserFormFirstAttempt: boolean;\n esUser: any;\n isSubmitLoading: boolean;\n selectedUser: any;\n selectedType: any;\n\n constructor(private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n public dialogRef: MatDialogRef<EmailSubscriptionUserFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.esUserFormGroup = this.fb.group({\n id: [''],\n user_id: ['', Validators.required],\n email_type_id: ['', Validators.required],\n });\n }\n\n\n ngOnInit() {\n if (this.data?.esUser?.id) {\n this.esUser = this.data.esUser;\n this.updateMode = true;\n this.selectedType = this.esUser?.email_type;\n this.selectedUser = this.esUser?.user;\n this.esUserFormGroup.patchValue(this.esUser);\n }\n\n }\n\n //Method to trigger login\n submit() {\n this.esUserFormGroup.markAllAsTouched();\n this.esUserFormFirstAttempt = true;\n if (this.esUserFormGroup.valid) {\n this.isSubmitLoading = true;\n const model = this.esUserFormGroup.value;\n (\n this.updateMode ?\n this.http.put(`api/email-subscription-users/${model?.id}`, model) :\n this.http.post(`api/email-subscription-users`, model)\n )\n .pipe(\n finalize(() => this.isSubmitLoading = false),\n untilDestroyed(this)\n ).subscribe(result => {\n this.alertService.addAlert(\"Subscription saved successfully\", \"success\");\n this.dialogRef.close(result);\n });\n }\n }\n\n\n cancel() {\n this.dialogRef.close();\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.esUserFormGroup, this.esUserFormFirstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.esUserFormGroup, errorMessages);\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserFormRoutingModule } from './email-subscription-user-form-routing.module';\nimport { EmailSubscriptionUserFormComponent } from './email-subscription-user-form.component';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { LoaderModule } from '../../../loader/loader.module';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserFormComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionUserFormRoutingModule,\n LoaderModule\n ],\n entryComponents: [EmailSubscriptionUserFormComponent]\n})\nexport class EmailSubscriptionUserFormModule { }\n","import { Component, OnInit, ViewChild } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { EmailSubscriptionUserFormComponent } from '../email-subscription-user-form/email-subscription-user-form.component';\nimport { Router } from '@angular/router';\nimport { Logger } from '../../../core/logger.service';\nimport { PageEvent } from '../../../data-table/data-table.model';\nimport { HttpService } from '../../../core/http.service';\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\n\nconst log = new Logger('EmailSubscriptionUser list');\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-list',\n templateUrl: './email-subscription-user-list.component.html',\n styleUrls: ['./email-subscription-user-list.component.scss']\n})\nexport class EmailSubscriptionUserListComponent implements OnInit {\n\n esUserList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n };\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n displayColumns: FormControl = new FormControl(['index', 'user.name', 'email_type.title', 'creator.name', 'created_at', 'actions']);\n displayedColumns: any[] = [];\n availableDisplayColumns: any[] = [\n { order: 1, value: 'index', name: 'Index' },\n { order: 2, value: 'user.name', name: 'User' },\n { order: 3, value: 'email_type.title', name: 'Email Type' },\n { order: 4, value: 'creator.name', name: 'Creator' },\n { order: 5, value: 'actions', name: 'Actions' }\n ];\n\n constructor(\n private dialog: MatDialog,\n private http: HttpService,\n private router: Router,\n ) { }\n\n ngOnInit() {\n this.displayedColumns = this.displayColumns.value;\n this.initializeData();\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n }\n\n get selectedColumns(): string[] {\n return this.availableDisplayColumns\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\n .map(col => col.value);\n }\n\n columnsChange() {\n this.displayedColumns = this.selectedColumns;\n }\n\n\n initializeData() {\n this.http.get(`api/email-subscription-users`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.esUserList = this.esUserList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n filterChange(event: any) {\n this.filters = {\n ...this.filters,\n ...event\n };\n this.reload();\n }\n\n addEmailSubscriptionUser() {\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\n width: '800px',\n autoFocus: false,\n data: {} // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n log.debug(result);\n this.reload();\n }\n });\n }\n\n\n editEmailSubscriptionUser(event: any, esUser: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\n width: '800px',\n autoFocus: false,\n data: {\n esUser: esUser\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n log.debug(result);\n this.reload();\n }\n });\n }\n\n deleteEmailSubscriptionUser(event: any, esUser: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: '400px',\n data: <ActionPopup>{\n title: 'Delete Subscription',\n message: `Are you sure to proceed delete the esUser ${esUser.name}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n //Action confirmed\n this.http.delete(`api/email-subscription-users/${esUser?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.esUserList = this.esUserList.filter(x => x.id !== esUser.id);\n });\n }\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n reload() {\n this.esUserList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\n\nexport const esulr = {\n title: 'Email Subscription Users',\n permissions: {\n only: ['app_admin'],\n redirectTo: '/'\n }\n};\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionUserListComponent,\n canActivate: [AuthenticationGuard],\n data: esulr\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserListRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserListFilterRoutingModule { }\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-list-filter',\n templateUrl: './email-subscription-user-list-filter.component.html',\n styleUrls: ['./email-subscription-user-list-filter.component.scss']\n})\nexport class EmailSubscriptionUserListFilterComponent implements OnInit {\n\n esUserFilterForm: FormGroup;\n\n @Output() valueChange = new EventEmitter();\n\n constructor(private fb: FormBuilder) {\n this.createForm();\n }\n\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.esUserFilterForm = this.fb.group({\n user_id: [''],\n email_type_id: [''],\n });\n }\n\n ngOnInit(): void {\n\n this.esUserFilterForm.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n this.valueChange.emit(value);\n })\n }\n\n\n resetFieldValue(field: string) {\n this.esUserFilterForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.esUserFilterForm.get(field).value;\n }\n\n\n ngOnDestroy() {\n\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserListFilterRoutingModule } from './email-subscription-user-list-filter-routing.module';\nimport { EmailSubscriptionUserListFilterComponent } from './email-subscription-user-list-filter.component';\nimport { MaterialModule } from '../../../material.module';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserListFilterComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionUserListFilterRoutingModule\n ],\n exports: [EmailSubscriptionUserListFilterComponent]\n})\nexport class EmailSubscriptionUserListFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserListRoutingModule } from './email-subscription-user-list-routing.module';\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\nimport { EmailSubscriptionUserListFilterModule } from '../email-subscription-user-list-filter/email-subscription-user-list-filter.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { EmailSubscriptionUserFormModule } from '../email-subscription-user-form/email-subscription-user-form.module';\nimport { MaterialModule } from '../../../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserListComponent],\n imports: [\n CommonModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n EmailSubscriptionUserListRoutingModule,\n EmailSubscriptionUserFormModule,\n EmailSubscriptionUserListFilterModule\n ],\n exports: [EmailSubscriptionUserListComponent]\n})\nexport class EmailSubscriptionUserListModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\n\nexport class EmailSubscriptionTypeRoutingModule { }","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeRoutingModule } from './email-subscription-type-routing.module';\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionTypeRoutingModule\n ]\n})\nexport class EmailSubscriptionTypeModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionTypeFormRoutingModule { }\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { finalize } from 'rxjs/operators';\nimport { AlertService } from '../../../core/alert.service';\nimport { FormValidatorService } from '../../../core/form-validator.service';\nimport { HttpService } from '../../../core/http.service';\n\nconst errorMessages: any = {\n title: {\n required: \"Title is required\"\n },\n code: {\n required: \"Code is required\"\n },\n frequency_id: {\n required: \"Frequency is required\"\n },\n};\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-type-form',\n templateUrl: './email-subscription-type-form.component.html',\n styleUrls: ['./email-subscription-type-form.component.scss']\n})\nexport class EmailSubscriptionTypeFormComponent implements OnInit {\n\n updateMode: boolean;\n emailSubscriptionTypeFormGroup: FormGroup;\n emailSubscriptionTypeFormFirstAttempt: boolean;\n emailSubscriptionType: any;\n selectedFrequency: any;\n isLoading: boolean;\n isSubmitLoading: boolean;\n\n constructor(private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n public dialogRef: MatDialogRef<EmailSubscriptionTypeFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.emailSubscriptionTypeFormGroup = this.fb.group({\n id: [''],\n title: ['', Validators.compose([Validators.required])],\n code: ['', Validators.compose([Validators.required])],\n frequency_id: ['', Validators.required],\n description: [''],\n });\n }\n\n ngOnInit() {\n if (this.data.emailSubscriptionType?.id) {\n this.isLoading = true;\n this.emailSubscriptionType = this.data?.emailSubscriptionType;\n this.updateMode = true;\n this.selectedFrequency = this.emailSubscriptionType?.frequency || {};\n this.emailSubscriptionTypeFormGroup.patchValue(this.emailSubscriptionType);\n }\n }\n\n //Method to trigger login\n submit() {\n this.emailSubscriptionTypeFormGroup.markAllAsTouched();\n this.emailSubscriptionTypeFormFirstAttempt = true;\n if (this.emailSubscriptionTypeFormGroup.valid) {\n this.isSubmitLoading = true;\n const model = this.emailSubscriptionTypeFormGroup.value;\n (\n this.updateMode ?\n this.http.put(`api/email-subscription-types/${model?.id}`, model) :\n this.http.post(`api/email-subscription-types`, model)\n )\n .pipe(\n finalize(() => this.isSubmitLoading = false),\n untilDestroyed(this)\n ).subscribe(result => {\n this.alertService.addAlert(\"Email Type saved successfully\", \"success\");\n this.dialogRef.close(result);\n });\n }\n }\n\n\n cancel() {\n this.dialogRef.close();\n }\n\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.emailSubscriptionTypeFormGroup, this.emailSubscriptionTypeFormFirstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.emailSubscriptionTypeFormGroup, errorMessages);\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeFormRoutingModule } from './email-subscription-type-form-routing.module';\nimport { EmailSubscriptionTypeFormComponent } from './email-subscription-type-form.component';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { LoaderModule } from '../../../loader/loader.module';\n\n\n\n@NgModule({\n declarations: [EmailSubscriptionTypeFormComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionTypeFormRoutingModule,\n LoaderModule\n ],\n exports: [EmailSubscriptionTypeFormComponent],\n entryComponents: [EmailSubscriptionTypeFormComponent]\n})\nexport class EmailSubscriptionTypeFormModule { }\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\nimport { distinctUntilChanged, debounceTime } from 'rxjs/operators';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { EmailSubscriptionTypeFormComponent } from '../email-subscription-type-form/email-subscription-type-form.component';\nimport { PageEvent } from '../../../data-table/data-table.model';\nimport { HttpService } from '../../../core/http.service';\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-type-list',\n templateUrl: './email-subscription-type-list.component.html',\n styleUrls: ['./email-subscription-type-list.component.scss']\n})\nexport class EmailSubscriptionTypeListComponent implements OnInit {\n\n emailSubscriptionTypeList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n isLoadRelations: true,\n relations: ['frequency']\n };\n search: FormControl = new FormControl('');\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n displayColumns: FormControl = new FormControl(['index', 'title', 'frequency.title', 'description', 'actions']);\n displayedColumns: any[] = [];\n availableDisplayColumns: any[] = [\n { order: 1, value: 'index', name: 'Index' },\n { order: 2, value: 'title', name: 'Title' },\n { order: 3, value: 'code', name: 'Code' },\n { order: 4, value: 'frequency.title', name: 'Frequency' },\n { order: 5, value: 'description', name: 'Description' },\n { order: 6, value: 'actions', name: 'Actions' }\n ];\n\n constructor(\n private dialog: MatDialog,\n private http: HttpService,\n ) { }\n\n ngOnInit() {\n this.displayedColumns = this.displayColumns.value;\n this.initializeData();\n this.search.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n this.filters.search = value;\n this.reload();\n });\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n }\n\n get selectedColumns(): string[] {\n return this.availableDisplayColumns\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\n .map(col => col.value);\n }\n\n columnsChange() {\n this.displayedColumns = this.selectedColumns;\n }\n\n\n initializeData() {\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n addEmailSubscriptionType() {\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\n width: '400px',\n autoFocus: false,\n data: {} // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.reload();\n }\n });\n }\n\n\n editEmailSubscriptionType(event: any, emailSubscriptionType: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\n width: '400px',\n autoFocus: false,\n data: {\n emailSubscriptionType: emailSubscriptionType\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.reload();\n }\n });\n }\n\n deleteEmailSubscriptionType(event: any, emailSubscriptionType: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: '400px',\n data: <ActionPopup>{\n title: 'Delete Email Type',\n message: `Are you sure to proceed delete the Email Type ${emailSubscriptionType.title}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n //Action confirmed\n this.http.delete(`api/email-subscription-types/${emailSubscriptionType?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.filter(x => x.id !== emailSubscriptionType.id);\n });\n }\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n reload() {\n this.emailSubscriptionTypeList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\n\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\n\nexport const estlr = {\n title: 'Email Subscription Type',\n permissions: {\n only: ['client_admin'],\n redirectTo: '/'\n }\n};\n\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionTypeListComponent,\n canActivate: [AuthenticationGuard],\n data: estlr\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionTypeListRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeListRoutingModule } from './email-subscription-type-list-routing.module';\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\nimport { EmailSubscriptionTypeFormModule } from '../email-subscription-type-form/email-subscription-type-form.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionTypeListComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n EmailSubscriptionTypeFormModule,\n EmailSubscriptionTypeListRoutingModule\n ],\n exports: [EmailSubscriptionTypeListComponent]\n})\nexport class EmailSubscriptionTypeListModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { HttpService } from '../../core/http.service';\nimport { PageEvent } from '../../data-table/data-table.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-for-user',\n templateUrl: './email-subscription-for-user.component.html',\n styleUrls: ['./email-subscription-for-user.component.scss']\n})\nexport class EmailSubscriptionForUserComponent implements OnInit {\n\n subscriptions: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n isLoadRelations: true,\n relations: 'frequency,currentUserSubscription'\n };\n\n constructor(\n private http: HttpService\n ) { }\n\n ngOnInit(): void {\n this.fetchSubscriptions();\n }\n\n fetchSubscriptions() {\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.subscriptions = this.subscriptions.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.fetchSubscriptions();\n }\n }\n\n subscribe(sub: any) {\n this.http.post(`api/email-subscription-for-user`, { email_type_id: sub?.id })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n sub.current_user_subscription = result?.item;\n });\n }\n\n unsubscribe(sub: any) {\n this.http.delete(`api/email-subscription-users/${sub?.current_user_subscription?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((_: any) => {\n sub.current_user_subscription = null;\n });\n }\n\n\n reload() {\n this.subscriptions = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.fetchSubscriptions();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../core/authentication.guard';\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\n\nexport const esfur = {\n permissions: {\n only: ['client_admin']\n }\n};\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionForUserComponent,\n canActivate: [AuthenticationGuard],\n data: esfur\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionForUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionForUserRoutingModule } from './email-subscription-for-user-routing.module';\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [EmailSubscriptionForUserComponent],\n imports: [\n CommonModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n EmailSubscriptionForUserRoutingModule\n ],\n exports: [EmailSubscriptionForUserComponent]\n})\nexport class EmailSubscriptionForUserModule { }\n","import { HttpService } from '../core/http.service';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TechlifyUpdateService {\n\n constructor(private http: HttpService) { }\n\n getTechlifyUpdates(filters: any) {\n return this.http.get(`api/techlify-updates`, { params: filters }).toPromise();\n }\n\n createTechlifyUpdate(techlifyUpdate: any) {\n return this.http.post(`api/techlify-updates`, techlifyUpdate).toPromise();\n }\n\n updateTechlifyUpdate(techlifyUpdate: any) {\n return this.http.put(`api/techlify-updates/${techlifyUpdate.id}`, techlifyUpdate).toPromise();\n }\n\n deleteTechlifyUpdate(techlifyUpdateId: any) {\n return this.http.delete(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\n }\n\n getTechlifyUpdate(techlifyUpdateId: any) {\n return this.http.get(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\n }\n\n getNewUpdateForCurrentUser() {\n return this.http.get(`api/current-user-techlify-updates`).toPromise();\n }\n\n createUpdateViewRecord(techlifyUpdateView: any) {\n return this.http.post(`api/techlify-update-views`, techlifyUpdateView).toPromise();\n }\n\n updateCurrentUserUpdates() {\n return this.http.get(`api/techlify-updates/update-view`).toPromise();\n }\n}\n","import { AlertService } from \"../../core/alert.service\";\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, Validators } from '@angular/forms';\nimport { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { Editor, Toolbar } from 'ngx-editor';\n\nconst errorMessages: any = {\n title: {\n required: \"Title is required\",\n },\n released_on: {\n required: \"Released On is required\",\n },\n version: {\n required: \"Version is required\",\n },\n description: {\n required: \"Description is required\",\n },\n learn_more_link: {\n pattern: \"Please enter valid link\",\n }\n}\n\n@Component({\n selector: 'app-techlify-update-form',\n templateUrl: './techlify-update-form.component.html',\n styleUrls: ['./techlify-update-form.component.scss']\n})\nexport class TechlifyUpdateFormComponent implements OnInit {\n\n @Output() onSave = new EventEmitter<any>();\n techlifyUpdateForm: FormGroup;\n isUpdateMode: boolean = false;\n editor: Editor;\n toolbar: Toolbar = [\n ['bold', 'italic'],\n ['bullet_list'],\n ];\n\n constructor(\n public dialogRef: MatDialogRef<TechlifyUpdateFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n private techlifyUpdateService: TechlifyUpdateService\n ) {\n this.createForm();\n }\n\n private createForm() {\n this.techlifyUpdateForm = this.fb.group({\n id: new FormControl(''),\n title: new FormControl('', Validators.required),\n description: new FormControl('', Validators.required),\n version: new FormControl('', Validators.required),\n released_on: new FormControl('', Validators.required),\n learn_more_link: new FormControl('', Validators.compose([Validators.pattern('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?')])),\n });\n if (this.data.techlifyUpdateDetails) {\n this.isUpdateMode = true;\n this.techlifyUpdateForm.patchValue(this.data.techlifyUpdateDetails);\n }\n }\n\n ngOnInit() {\n this.editor = new Editor();\n }\n\n async submit() {\n if (this.techlifyUpdateForm.valid) {\n let result;\n const model = this.techlifyUpdateForm.value;\n\n try {\n result = this.isUpdateMode ? await this.techlifyUpdateService.updateTechlifyUpdate(model)\n : await this.techlifyUpdateService.createTechlifyUpdate(model);\n this.alertService.addAlert(\n \"Techlify app update saved successfully\",\n \"success\"\n );\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n } finally {\n if (result) {\n this.dialogRef.close(result);\n }\n }\n }\n }\n\n resetFieldValue(field: string) {\n this.techlifyUpdateForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.techlifyUpdateForm.get(field).value;\n }\n\n /** Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.techlifyUpdateForm, true);\n }\n /** Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.techlifyUpdateForm, errorMessages);\n }\n\n}\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from './../../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdateFormComponent } from './techlify-update-form.component';\nimport { NgxEditorModule } from 'ngx-editor';\n\n@NgModule({\n declarations: [TechlifyUpdateFormComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MaterialModule,\n FlexLayoutModule,\n NgxEditorModule,\n ],\n exports: [\n TechlifyUpdateFormComponent\n ],\n entryComponents: [\n TechlifyUpdateFormComponent\n ]\n})\nexport class TechlifyUpdateFormModule { }\n","import { UntilDestroy } from '@ngneat/until-destroy';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { ActionPopup } from './../../action-popup/action-popup.model';\nimport { ActionPopupComponent } from './../../action-popup/action-popup.component';\nimport { TechlifyUpdateFormComponent } from './../techlify-update-form/techlify-update-form.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, FormBuilder } from '@angular/forms';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AlertService } from '../../core/alert.service';\nimport { Component, OnInit } from '@angular/core';\nimport { debounceTime } from 'rxjs/operators';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-updates-list',\n templateUrl: './techlify-updates-list.component.html',\n styleUrls: ['./techlify-updates-list.component.scss']\n})\nexport class TechlifyUpdatesListComponent implements OnInit {\n techlifyUpdates: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'title',\n 'version',\n 'released_on',\n 'learn_more_link',\n 'description',\n 'creator',\n 'actions'\n ];\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n isWorking: boolean = false;\n filterFormGroup: FormGroup;\n\n constructor(\n private dialog: MatDialog,\n private alertService: AlertService,\n private techlifyUpdateService: TechlifyUpdateService,\n private fb: FormBuilder,\n ) {\n this.filterFormGroup = this.fb.group({\n search: new FormControl(''),\n version: new FormControl(''),\n sort_by: new FormControl('released_on|DESC'),\n });\n }\n\n ngOnInit() {\n this.loadData();\n this.listenChanges();\n }\n\n listenChanges() {\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\n .subscribe(changes => {\n this.reload();\n });\n }\n\n ngOnDestroy() { }\n\n async loadData() {\n try {\n this.isWorking = true;\n var filters: any = this.filterFormGroup.value;\n filters.perPage = this.perPage;\n filters.page = this.page;\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\n filters\n );\n this.lastPage = result.last_page || this.page;\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n finally {\n this.isWorking = false;\n }\n }\n\n reload() {\n this.techlifyUpdates = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n modifyTechlifyUpdate(model?: any) {\n const dialogRef = this.dialog.open(TechlifyUpdateFormComponent, {\n width: \"600px\",\n data: {\n techlifyUpdateDetails: model,\n }\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.reload();\n }\n });\n }\n\n async deleteTechlifyUpdate(model: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: \"Delete Update\",\n message: `Are you sure to delete this update?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n try {\n await this.techlifyUpdateService.deleteTechlifyUpdate(model.id);\n this.alertService.addAlert(\n \"Successfully deleted the update\",\n \"success\"\n );\n this.reload();\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n });\n }\n\n resetFieldValue(field: string) {\n this.filterFormGroup.get(field).setValue(\"\");\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase();\n this.assignFilter(event.active, direction);\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'title': {\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\n }\n case 'released_on': {\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\n }\n case 'version': {\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\n }\n default: {\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\n }\n };\n }\n\n}\n","import { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'all', pathMatch: 'full' },\n { path: 'all', component: TechlifyUpdatesListComponent },\n\n //fallback\n {\n path: '**',\n redirectTo: 'all',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TechlifyUpdateRoutingModule { }\n","import { ReadMoreModule } from '../read-more/read-more.module';\nimport { TechlifyUpdateFormModule } from './techlify-update-form/techlify-update-form.module';\nimport { TechlifyUpdateRoutingModule } from './techlify-update-routing.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\n\n@NgModule({\n declarations: [TechlifyUpdatesListComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n MaterialModule,\n ActionPopupModule,\n TechlifyUpdateRoutingModule,\n TechlifyUpdateFormModule,\n ReadMoreModule,\n ]\n})\nexport class TechlifyUpdateModule { }\n","import { Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-update-view',\n templateUrl: './update-view.component.html',\n styleUrls: ['./update-view.component.scss']\n})\nexport class UpdateViewComponent implements OnInit {\n techlifyUpdate: any;\n rootNavUrl: any;\n\n constructor(\n public dialogRef: MatDialogRef<UpdateViewComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private router: Router\n ) { }\n\n ngOnInit(): void {\n this.techlifyUpdate = this.data.techlifyUpdate;\n this.rootNavUrl = this.data.rootNavUrl;\n }\n\n close() {\n this.dialogRef.close();\n }\n\n openUpdateHistory(): void {\n this.close();\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\n }\n\n}\n","import { UntilDestroy } from '@ngneat/until-destroy';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { AlertService } from './../../core/alert.service';\nimport { UpdateViewComponent } from './../update-view/update-view.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, FormBuilder } from '@angular/forms';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Component, OnInit } from '@angular/core';\nimport { debounceTime } from 'rxjs/operators';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-update-history',\n templateUrl: './techlify-update-history.component.html',\n styleUrls: ['./techlify-update-history.component.scss']\n})\nexport class TechlifyUpdateHistoryComponent implements OnInit {\n techlifyUpdates: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'title',\n 'version',\n 'released_on',\n 'learn_more_link',\n 'description',\n 'creator',\n 'actions'\n ];\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n isWorking: boolean = false;\n filterFormGroup: FormGroup;\n\n constructor(\n private dialog: MatDialog,\n private techlifyUpdateService: TechlifyUpdateService,\n private fb: FormBuilder,\n private alertService: AlertService\n ) {\n this.filterFormGroup = this.fb.group({\n search: new FormControl(''),\n version: new FormControl(''),\n sort_by: new FormControl('released_on|DESC'),\n });\n }\n\n ngOnInit() {\n this.loadData();\n this.listenChanges();\n this.updateCurrentUserUpdates();\n }\n\n listenChanges() {\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\n .subscribe(changes => {\n this.reload();\n });\n }\n\n ngOnDestroy() { }\n\n async loadData() {\n try {\n this.isWorking = true;\n var filters: any = this.filterFormGroup.value;\n filters.perPage = this.perPage;\n filters.page = this.page;\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\n filters\n );\n this.lastPage = result.last_page || this.page;\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n finally {\n this.isWorking = false;\n }\n }\n\n reload() {\n this.techlifyUpdates = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n resetFieldValue(field: string) {\n this.filterFormGroup.get(field).setValue(\"\");\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase();\n this.assignFilter(event.active, direction);\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'title': {\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\n }\n case 'released_on': {\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\n }\n case 'version': {\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\n }\n default: {\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\n }\n };\n }\n\n openUpdateView(techlifyUpdate: any): void {\n const dialogRef = this.dialog.open(UpdateViewComponent, {\n width: \"800px\",\n autoFocus: false,\n data: {\n techlifyUpdate: techlifyUpdate,\n isFromHistory: true,\n } // Any data passed here will be injected into the model\n });\n }\n\n async updateCurrentUserUpdates() {\n try {\n await this.techlifyUpdateService.updateCurrentUserUpdates();\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n}\n","import { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'update-history', pathMatch: 'full' },\n { path: 'update-history', component: TechlifyUpdateHistoryComponent },\n\n //fallback\n {\n path: '**',\n redirectTo: 'all',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TechlifyUpdateHistoryRoutingModule { }\n","import { ReactiveFormsModule } from '@angular/forms';\nimport { TechlifyUpdateHistoryRoutingModule } from './techlify-update-history-routing.module';\nimport { ReadMoreModule } from '../../read-more/read-more.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MaterialModule } from '../../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../../action-popup/action-popup.module';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n MaterialModule,\n ActionPopupModule,\n ReadMoreModule,\n TechlifyUpdateHistoryRoutingModule\n ],\n declarations: [TechlifyUpdateHistoryComponent]\n})\nexport class TechlifyUpdateHistoryModule { }\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from './../../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdateViewComponent } from './update-view.component';\n\n\n\n@NgModule({\n declarations: [UpdateViewComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule\n ],\n exports: [\n UpdateViewComponent\n ],\n entryComponents: [\n UpdateViewComponent\n ]\n})\nexport class UpdateViewModule { }\n","import { AlertService } from './../../../core/alert.service';\nimport { TechlifyUpdateService } from './../../techlify-update.service';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Component, EmbeddedViewRef, Inject, OnInit } from '@angular/core';\nimport { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\nimport { UpdateViewComponent } from '../../update-view/update-view.component';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-update-notifier-snack',\n templateUrl: './update-notifier-snack.component.html',\n styleUrls: ['./update-notifier-snack.component.scss']\n})\nexport class UpdateNotifierSnackComponent implements OnInit {\n maxDescriptionLength: any = 70;\n descriptionText: any = '';\n techlifyUpdate: any;\n rootNavUrl: any;\n\n constructor(\n @Inject(MAT_SNACK_BAR_DATA) public data: any,\n private snackBarRef: MatSnackBarRef<EmbeddedViewRef<any>>,\n private dialog: MatDialog,\n private router: Router,\n private techlifyUpdateService: TechlifyUpdateService,\n private alertService: AlertService\n ) { }\n\n ngOnInit(): void {\n this.techlifyUpdate = this.data.techlifyUpdate;\n this.rootNavUrl = this.data.rootNavUrl;\n this.determineDescription(this.techlifyUpdate?.description)\n }\n\n close(): void {\n this.createUpdateViewRecord();\n this.snackBarRef.dismiss();\n }\n\n determineDescription(description: any) {\n if (!description || description.length <= this.maxDescriptionLength) {\n this.descriptionText = description;\n return;\n }\n this.descriptionText = description.substring(0, this.maxDescriptionLength) + \"...\";\n }\n\n openUpdateView(): void {\n this.close();\n const dialogRef = this.dialog.open(UpdateViewComponent, {\n width: \"800px\",\n autoFocus: false,\n data: {\n techlifyUpdate: this.techlifyUpdate,\n rootNavUrl: this.data.rootNavUrl\n } // Any data passed here will be injected into the model\n });\n }\n\n openUpdateHistory(): void {\n this.close();\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\n }\n\n async createUpdateViewRecord() {\n try {\n var techlifyUpdateView = {\n update_id: this.techlifyUpdate?.id\n };\n let result: any = await this.techlifyUpdateService.createUpdateViewRecord(techlifyUpdateView);\n }\n catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n}\n","import { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AlertService } from '../../core/alert.service';\n\n@Component({\n selector: 'app-update-notifier',\n templateUrl: './update-notifier.component.html',\n styleUrls: ['./update-notifier.component.scss']\n})\nexport class UpdateNotifierComponent implements OnInit {\n techlifyUpdate: any;\n @Input() rootNavUrl: string = '/techlify-updates';\n\n constructor(\n private snackBar: MatSnackBar,\n private techlifyUpdateService: TechlifyUpdateService,\n private alertService: AlertService\n ) { }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n setTimeout(x => {\n this.getNewUpdate();\n }, 5000);\n }\n\n async getNewUpdate() {\n try {\n let result: any = await this.techlifyUpdateService.getNewUpdateForCurrentUser();\n this.techlifyUpdate = result.item;\n if (this.techlifyUpdate) {\n this.showUpdate();\n }\n }\n catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n\n showUpdate() {\n this.snackBar.openFromComponent(UpdateNotifierSnackComponent, {\n data: {\n techlifyUpdate: this.techlifyUpdate,\n rootNavUrl: this.rootNavUrl\n },\n horizontalPosition: 'right',\n verticalPosition: 'top',\n panelClass: ['white-bg']\n });\n }\n\n}\n","import { ActionPopupModule } from './../../action-popup/action-popup.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from './../../material.module';\nimport { UpdateViewModule } from './../update-view/update-view.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdateNotifierComponent } from './update-notifier.component';\nimport { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\n\n\n@NgModule({\n declarations: [UpdateNotifierComponent, UpdateNotifierSnackComponent],\n imports: [\n CommonModule,\n MaterialModule,\n UpdateViewModule,\n FlexLayoutModule,\n ActionPopupModule\n ],\n exports: [\n UpdateNotifierComponent,\n ],\n entryComponents: [\n UpdateNotifierSnackComponent\n ]\n})\nexport class UpdateNotifierModule { }\n","import { Component, OnInit, Input } from '@angular/core';\nimport * as XLSX from 'xlsx';\n\n@Component({\n selector: 'app-export-excel-button',\n templateUrl: './export-excel-button.component.html',\n styleUrls: ['./export-excel-button.component.scss']\n})\nexport class ExportExcelButtonComponent implements OnInit {\n\n @Input() name: string = 'Export_Data';\n @Input() data: any[] = [];\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n exportExcel() {\n const fileName = `${this.name}_${new Date().getTime()}.xlsx`;\n const ws = XLSX.utils.json_to_sheet(this.data);\n /* generate workbook and add the worksheet */\n const wb: XLSX.WorkBook = XLSX.utils.book_new();\n XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');\n\n /* save to file */\n XLSX.writeFile(wb, fileName);\n }\n\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ExportExcelButtonComponent } from './export-excel-button/export-excel-button.component';\nimport { MaterialModule } from '../material.module';\n\n\n\n@NgModule({\n declarations: [ExportExcelButtonComponent],\n imports: [\n CommonModule,\n MaterialModule\n ],\n exports: [ExportExcelButtonComponent]\n})\nexport class ExportExcelModule { }\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { HttpService } from '../../core/http.service';\n\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-view',\n templateUrl: './audit-log-view-model.component.html',\n styleUrls: ['./audit-log-view-model.component.scss']\n})\nexport class AuditLogViewModelComponent implements OnInit {\n\n logInfo: any;\n showDeltaChanges: boolean = false;\n changeList: any[] = [];\n\n constructor(\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) { }\n\n ngOnInit(): void {\n if (this.data) {\n this.http.get(`api/recent-log-for-model`, {\n params: {\n model_type: this.data?.modelType,\n model_id: this.data?.modelId\n }\n }).pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.logInfo = result?.item;\n this.getTransformedChanges();\n });\n }\n }\n\n getTransformedChanges() {\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\n });\n }\n\n close() {\n this.dialogRef.close();\n }\n\n}\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { filter } from 'rxjs/operators';\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-logs-view-model',\n templateUrl: './audit-logs-view-model.component.html',\n styleUrls: ['./audit-logs-view-model.component.scss']\n})\nexport class AuditLogsViewModelComponent implements OnInit {\n\n constructor(\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private router: Router\n ) { }\n\n ngOnInit(): void {\n this.router.events\n .pipe(filter(event => event instanceof NavigationEnd), untilDestroyed(this))\n .subscribe(_ => this.dialogRef.close());\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\nimport { AuditLogsViewModelComponent } from '../audit-logs-view-model/audit-logs-view-model.component';\n\n\n@Component({\n selector: 'app-audit-log-for-model',\n templateUrl: './audit-log-for-model.component.html',\n styleUrls: ['./audit-log-for-model.component.scss']\n})\nexport class AuditLogForModelComponent implements OnInit {\n\n @Input() modelType: string;\n @Input() modelId: any;\n @Input() logView: 'recent' | 'all' = 'recent';\n\n constructor(\n private dialog: MatDialog,\n ) { }\n\n ngOnInit(): void {\n\n }\n\n getLogView() {\n const dialogRef = this.dialog.open(AuditLogViewModelComponent, {\n width: '800px',\n autoFocus: false,\n data: {\n modelType: this.modelType,\n modelId: this.modelId\n } // Any data passed here will be injected into the model\n });\n }\n\n getLogsView() {\n const dialogRef = this.dialog.open(AuditLogsViewModelComponent, {\n width: '95%',\n maxWidth: 'unset',\n autoFocus: false,\n data: {\n modelType: this.modelType,\n modelId: this.modelId\n } // Any data passed here will be injected into the model\n });\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogForModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogViewModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogViewModelRoutingModule } from './audit-log-view-model-routing.module';\nimport { AuditLogViewModelComponent } from './audit-log-view-model.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogViewModelComponent],\n imports: [\n CommonModule,\n AuditLogViewModelRoutingModule,\n FlexLayoutModule,\n MaterialModule\n ],\n exports: [AuditLogViewModelComponent]\n})\nexport class AuditLogViewModelModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogsViewModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogListRoutingModule { }\n","import { Component, OnInit, OnDestroy, Input, ViewChild } from '@angular/core';\n\n\nimport { Router } from '@angular/router';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PageEvent } from '../../data-table/data-table.model';\nimport { DataManager } from '../../core/dataManager.service';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-list',\n templateUrl: './audit-log-list.component.html',\n styleUrls: ['./audit-log-list.component.scss'],\n})\nexport class AuditLogListComponent implements OnInit, OnDestroy {\n\n auditLogList: any[] = [];\n @Input() objectId: any;\n @Input() objectType: any;\n @Input() showFilter: boolean = true;\n @Input() showExportButtons: boolean = true;\n @Input() userId: any;\n\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = { sort_by: 'created_at|desc' };\n displayedColumns: any[] = ['index', 'id', 'object_type', 'object_id', 'action', 'changes', 'created_at', 'user.email'];\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n constructor(\n private dataManager: DataManager,\n private router: Router,\n public sanitizer: DomSanitizer\n ) { }\n\n ngOnInit() {\n\n this.initializeData();\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n\n }\n\n get excelData(): any[] {\n if (this.auditLogList.length > 0) {\n return this.auditLogList.map(item => {\n return {\n 'Type': item?.object_type,\n 'Action': item?.action,\n 'Data': JSON.stringify(item?.data || {}),\n 'Object': JSON.stringify(item?.object || {}),\n 'Pre-Object': JSON.stringify(item?.pre_object || {}),\n 'Created At': new Date(item?.created_at).toDateString(),\n 'Created By': item?.user?.email\n };\n });\n }\n return [];\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n logClicked(log: any) {\n this.router.navigate(['/system/audit-logs/log-view', log.id]);\n }\n\n\n async initializeData() {\n if (this.objectType) {\n this.filters = { ...this.filters, object_type: this.objectType }\n }\n if (this.objectId) {\n this.filters = { ...this.filters, object_id: this.objectId }\n }\n if (this.userId) {\n this.filters = { ...this.filters, user_id: this.userId }\n }\n const result = await this.dataManager.GET(`api/audit-logs`, { ...this.filters, ...this.pageEvent });\n this.auditLogList = this.auditLogList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n }\n\n filterChange(event: any) {\n if (this.showFilter) {\n this.filters = {\n ...this.filters,\n ...event,\n object_type: this.objectType || event?.object_type || '',\n object_id: this.objectId || '',\n };\n this.reload();\n }\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n reload() {\n this.auditLogList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n getTransformedChanges(log: any) {\n if (log?.data?.changes) {\n const changes = Object.keys(log?.data?.changes) || [];\n let value = '<div>';\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n value = `${value} <div><b>${displayAttribute}:</b> <span id=\"old-value\">${log?.pre_object[key] ?? ''}</span><span id=\"new-value\">${log?.object[key] ?? ''}</span></div>`;\n });\n value = `${value} </div>`;\n return value;\n }\n return '';\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogListFilterRoutingModule { }\n","import { FormControl } from \"@angular/forms\";\n\nexport function DateValidator(): any {\n return (control: FormControl): { [key: string]: any } => {\n\n const val: any = new Date(control.value);\n if (!!control.value && val == 'Invalid Date') {\n return { invalidDate: true };\n }\n return null;\n };\n}","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { DateValidator } from '../../date-validator';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-list-filter',\n templateUrl: './audit-log-list-filter.component.html',\n styleUrls: ['./audit-log-list-filter.component.scss']\n})\nexport class AuditLogListFilterComponent implements OnInit {\n\n auditLogFilterForm: FormGroup;\n\n @Input() objectId: any;\n @Input() objectType: any;\n\n @Output() valueChange = new EventEmitter();\n\n constructor(private fb: FormBuilder, private formValidatorService: FormValidatorService) {\n this.createForm();\n }\n\n get showObjectFilter() {\n return !(this.objectId || this.objectType);\n }\n\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.auditLogFilterForm = this.fb.group({\n object_type: [''],\n action: [''],\n data: [''],\n date_to: ['', DateValidator()],\n date_from: ['', DateValidator()]\n });\n }\n\n ngOnInit(): void {\n\n this.auditLogFilterForm.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe((value: any) => {\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\n this.valueChange.emit(value);\n })\n }\n\n\n resetFieldValue(field: string) {\n this.auditLogFilterForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.auditLogFilterForm.get(field).value;\n }\n\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.auditLogFilterForm, true);\n }\n\n\n ngOnDestroy() {\n\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogListFilterRoutingModule } from './audit-log-list-filter-routing.module';\nimport { AuditLogListFilterComponent } from './audit-log-list-filter.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../material.module';\nimport { SearchableSelectorModule } from '../../searchable-selector/searchable-selector.module';\n\n\n@NgModule({\n declarations: [AuditLogListFilterComponent],\n imports: [\n CommonModule,\n AuditLogListFilterRoutingModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n MaterialModule,\n SearchableSelectorModule,\n ],\n exports: [AuditLogListFilterComponent]\n})\nexport class AuditLogListFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogListRoutingModule } from './audit-log-list-routing.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AuditLogListComponent } from './audit-log-list.component';\nimport { AuditLogListFilterModule } from '../audit-log-list-filter/audit-log-list-filter.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { ExportExcelModule } from '../../export-excel/export-excel.module';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogListComponent],\n imports: [\n CommonModule,\n AuditLogListRoutingModule,\n ExportExcelModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n MaterialModule,\n InfiniteScrollModule,\n AuditLogListFilterModule\n ],\n exports: [AuditLogListComponent]\n})\nexport class AuditLogListModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogsViewModelRoutingModule } from './audit-logs-view-model-routing.module';\nimport { AuditLogsViewModelComponent } from './audit-logs-view-model.component';\nimport { AuditLogListModule } from '../audit-log-list/audit-log-list.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\n\n\n@NgModule({\n declarations: [AuditLogsViewModelComponent],\n imports: [\n CommonModule,\n AuditLogsViewModelRoutingModule,\n FlexLayoutModule,\n AuditLogListModule\n ],\n exports: [AuditLogsViewModelComponent]\n})\nexport class AuditLogsViewModelModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogForModelRoutingModule } from './audit-log-for-model-routing.module';\nimport { AuditLogForModelComponent } from './audit-log-for-model.component';\nimport { AuditLogViewModelModule } from '../audit-log-view-model/audit-log-view-model.module';\nimport { AuditLogsViewModelModule } from '../audit-logs-view-model/audit-logs-view-model.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogForModelComponent],\n imports: [\n AuditLogViewModelModule,\n AuditLogsViewModelModule,\n CommonModule,\n AuditLogForModelRoutingModule,\n FlexLayoutModule,\n MaterialModule,\n ],\n exports: [AuditLogForModelComponent]\n})\nexport class AuditLogForModelModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Location } from '@angular/common';\nimport * as jsondiffpatch from \"jsondiffpatch\"\nimport { DataManager } from '../../core/dataManager.service';\n\n@Component({\n selector: 'app-audit-log-view',\n templateUrl: './audit-log-view.component.html',\n styleUrls: ['./audit-log-view.component.scss']\n})\nexport class AuditLogViewComponent implements OnInit {\n\n logInfo: any;\n showDeltaChanges: boolean = false;\n changeList: any[] = [];\n\n constructor(\n private dataManager: DataManager,\n private route: ActivatedRoute,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n this.route.paramMap.subscribe(params => {\n if (params.get('id')) {\n this.fetchLogDetail(params.get('id'));\n } else {\n this.location.back();\n }\n });\n }\n\n getTransformedChanges() {\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\n });\n }\n\n async fetchLogDetail(logId: any) {\n const result = await this.dataManager.GET(`api/audit-logs/${logId}`);\n this.logInfo = result.item;\n this.getTransformedChanges();\n this.patchDelta();\n }\n\n patchDelta() {\n const delta = jsondiffpatch.diff(this.logInfo?.pre_object, this.logInfo?.object);\n document.getElementById('jsondiff').innerHTML = jsondiffpatch.formatters.html.format(delta, this.logInfo?.pre_object);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogViewRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogViewRoutingModule } from './audit-log-view-routing.module';\nimport { AuditLogViewComponent } from './audit-log-view.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogViewComponent],\n imports: [\n CommonModule,\n AuditLogViewRoutingModule,\n FlexLayoutModule,\n MaterialModule\n ],\n exports: [AuditLogViewComponent]\n})\nexport class AuditLogViewModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../core/authentication.guard';\nimport { AuditLogListComponent } from './audit-log-list/audit-log-list.component';\nimport { AuditLogViewComponent } from './audit-log-view/audit-log-view.component';\n\n\nconst routes: Routes = [\n { path: 'log-list', component: AuditLogListComponent, canActivate: [AuthenticationGuard] },\n { path: 'log-view/:id', component: AuditLogViewComponent, canActivate: [AuthenticationGuard] },\n { path: '**', redirectTo: 'log-list', pathMatch: 'full' }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogRoutingModule } from './audit-log-routing.module';\nimport { AuditLogListModule } from './audit-log-list/audit-log-list.module';\nimport { AuditLogViewModule } from './audit-log-view/audit-log-view.module';\n\n\n@NgModule({\n declarations: [\n ],\n imports: [\n CommonModule,\n AuditLogRoutingModule,\n AuditLogListModule,\n AuditLogViewModule\n ],\n exports: []\n})\nexport class AuditLogModule { }\n","import { Component, Input, OnInit } from '@angular/core';\nimport { ImportCsvConfig } from '../import-csv-config';\n\n@Component({\n selector: 'app-import-success',\n templateUrl: './import-success.component.html',\n styleUrls: ['./import-success.component.scss']\n})\nexport class ImportSuccessComponent implements OnInit {\n @Input() data: any;\n @Input() config: ImportCsvConfig;\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { PageEvent } from './../../data-table/data-table.model';\nimport { ErrorHandlerService, HttpService } from '../../core';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { ImportCsvConfig } from '../import-csv-config';\n\n@Component({\n selector: 'app-import-history-list',\n templateUrl: './import-history-list.component.html',\n styleUrls: ['./import-history-list.component.scss']\n})\nexport class ImportHistoryListComponent implements OnInit {\n\n @Input() config: ImportCsvConfig;\n histories: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'imported_by',\n 'date',\n 'no_of_records'\n ];\n isWorking: boolean = false;\n filter: any;\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n\n constructor(\n private errorHandler: ErrorHandlerService,\n private http: HttpService,\n ) {\n }\n\n ngOnInit() {\n if (this.config.importHistory.isEnabled) {\n this.filter = {\n model_type: this.config.importHistory.type,\n };\n }\n this.loadData();\n }\n\n loadData() {\n try {\n this.isWorking = true;\n this.http.get(this.config.importHistory.apiUrl, { params: { ...this.filter, ...this.pageEvent } }).subscribe((result: any) => {\n this.histories = this.histories.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n } catch (error) {\n this.errorHandler.handleError(error);\n }\n finally {\n this.isWorking = false;\n }\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.loadData();\n }\n }\n\n reload() {\n this.histories = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.loadData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { FormValidatorService } from '../../core/form-validator.service';\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { Location } from '@angular/common';\nimport { ImportCsvConfig } from '../import-csv-config';\n\nconst errorMessages: any = {\n property: {\n required: \"Property is required\",\n unavailable: \"Duplicate entry\"\n },\n};\n\n@Component({\n selector: 'app-field-mapping',\n templateUrl: './field-mapping.component.html',\n styleUrls: ['./field-mapping.component.scss']\n})\nexport class FieldMappingComponent implements OnInit {\n\n importMappingForm: FormGroup;\n @Input() data: any[];\n @Input() config: ImportCsvConfig;\n firstDataArray: any[] = [];\n properties: any[] = [];\n @Output() onSave = new EventEmitter();\n @Output() onReUpload= new EventEmitter();\n\n constructor(\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private changeDetectorRef: ChangeDetectorRef,\n public location: Location\n ) {\n this.createImportMappingForm();\n }\n\n ngOnInit() {\n this.properties = this.config.properties;;\n this.reFectorAttributes(this.data[0]);\n }\n\n createImportMappingForm() {\n this.importMappingForm = this.fb.group({\n fields: this.fb.array([]),\n });\n }\n\n get fieldsArray(): FormArray {\n return this.importMappingForm.get('fields') as FormArray;\n }\n\n createField(field: any): FormGroup {\n var fieldForm: FormGroup = this.fb.group({\n id: new FormControl(field.id),\n label: new FormControl(field.label),\n value: new FormControl(field.value),\n property: new FormControl(field.property,\n Validators.compose(\n [\n Validators.required\n ]\n )\n ),\n propertyType: new FormControl(field.propertyType)\n });\n return fieldForm;\n }\n\n reFectorAttributes(data) {\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var dataValue = {\n id: '',\n label: k,\n value: data[k],\n property: '',\n propertyType: ''\n };\n this.firstDataArray.push(dataValue);\n }\n }\n this.firstDataArray.forEach((element: any, mainIndex: any) => {\n element.id = mainIndex;\n this.properties.find((property: any, index: any) => {\n if (property.label.toLowerCase().includes(element.label.toLowerCase())) {\n element.property = property.value;\n element.propertyType = property.type;\n return element;\n }\n });\n });\n }\n\n next() {\n this.importMappingForm.markAllAsTouched();\n if (!this.importMappingForm.valid) {\n return;\n }\n this.onSave.emit(this.importMappingForm.value);\n }\n\n /** Method to evaluate form fields*/\n isFieldValid(field: string, form: any) {\n return this.formValidatorService.isFieldValid(field, form);\n }\n\n /** Method to find error in form fields*/\n getErrorMessage(field: string, form: any) {\n return this.formValidatorService.getErrorMessage(field, form, errorMessages);\n }\n\n ngAfterViewInit(): void {\n //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.\n //Add 'implements AfterViewInit' to the class.\n setTimeout(x => {\n this.firstDataArray.forEach((element: any) => {\n this.fieldsArray.push(this.createField(element));\n });\n this.changeDetectorRef.detectChanges();\n }, 500);\n }\n\n updatePropertyType(event: any, index: any): void {\n var field = this.properties.find((field: any) => field.value == event.value);\n if (field) {\n this.fieldsArray.controls[index].get('propertyType').setValue(field.type);\n this.uniqueValidator();\n }\n }\n\n uniqueValidator() {\n this.fieldsArray.value.forEach((field: any, index: any) => {\n var control = this.fieldsArray.controls[index].get('property');\n const isNameUnique = this.fieldsArray.value.find(propertyData =>\n propertyData.property === control.value\n && propertyData.id != this.fieldsArray.controls[index].get('id').value\n )\n ? false\n : true;\n if (!isNameUnique) {\n control.setErrors({ unavailable: true });\n }\n else {\n control.setErrors(null);\n }\n });\n }\n\n removeField(index: number) {\n if (index == -1) {\n return;\n }\n this.fieldsArray.removeAt(index);\n }\n\n reUpload() {\n this.onReUpload.emit(true);\n }\n\n}\n","import { Location } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-failed-items-list',\n templateUrl: './failed-items-list.component.html',\n styleUrls: ['./failed-items-list.component.scss']\n})\nexport class FailedItemsListComponent implements OnInit {\n @Input() failedItems: any[];\n @Input() selectedFields: any[];\n @Output() onReUpload = new EventEmitter();\n\n constructor(\n public location: Location\n ) { }\n\n ngOnInit() {\n }\n\n isValidDate(d: any): boolean {\n var date = new Date(d);\n return date instanceof Date && !isNaN(date.getTime());\n }\n\n reUpload() {\n this.onReUpload.emit(true);\n }\n\n}\n","import { ViewerConfig } from '../document-viewer/viewer-config.model';\nimport { FileDropperConfig } from '../file-dropper/file-dropper.model';\nimport { HttpService } from '../core/http.service';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { AlertService, ErrorHandlerService } from '../core';\nimport * as XLSX from 'xlsx';\nimport { ImportCsvConfig } from './import-csv-config';\n@UntilDestroy()\n\n@Component({\n selector: 'app-import-csv',\n templateUrl: './import-csv.component.html',\n styleUrls: ['./import-csv.component.scss']\n})\nexport class ImportCsvComponent implements OnInit {\n result: any;\n @Input() config: ImportCsvConfig;\n filesConfig: FileDropperConfig;\n filesList: any[] = [];\n data: any[] = [];\n isUploaded: boolean = false;\n isImportTypeSelected: boolean = false;\n viewerConfig: ViewerConfig;\n fileData: any[] = [];\n failedItems: any[] = [];\n selectedFields: any[] = [];\n importSteps: any = [\n {\n id: 1,\n step: 1,\n title: 'Upload',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 2,\n step: 2,\n title: 'Field Mappings',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 3,\n step: 3,\n title: 'Data Validation',\n progressTitle: 'Data Being Validated',\n progressDescription: 'The data is currently being validated and checked for errors, please do not navigate away from this page. '\n },\n {\n id: 4,\n step: 3,\n title: 'Data Validation & Errors',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 5,\n step: 4,\n title: 'Data Importing',\n progressTitle: 'Data Being Imported',\n progressDescription: 'The data is currently being imported and saved, please do not navigate away from this page. After the import is completed, you will be redirected to a page with the imported records.'\n },\n {\n id: 6,\n step: 5,\n title: 'Success Page & Data Preview',\n progressTitle: '',\n progressDescription: ''\n },\n ];\n currentStep: any = 1;\n\n constructor(\n private alertService: AlertService,\n private errorHandler: ErrorHandlerService,\n private http: HttpService,\n ) {\n this.filesConfig = {\n fileId: \"file\",\n containerId: \"fileContainer\",\n styles: {\n height: \"200px\"\n },\n acceptFile: '.csv',\n multiple: false,\n maxSize: 10,\n acceptFileText: \".csv\"\n };\n }\n\n ngOnInit() {\n }\n\n get step() {\n return this.importSteps.find(step => step.id == this.currentStep);\n }\n\n async fileChanged(event: any) {\n this.currentStep = 2;\n this.filesList = event;\n\n let selectedFile = null;\n let jsonData = null;\n const reader = new FileReader();\n const file = this.filesList[0];\n reader.onload = (event) => {\n const data = reader.result;\n selectedFile = XLSX.read(data, {\n type: 'binary',\n cellDates: true,\n });\n jsonData = selectedFile.SheetNames.reduce((initial, name) => {\n const sheet = selectedFile.Sheets[name];\n initial = XLSX.utils.sheet_to_json(sheet, {\n header: 0,\n defval: \"\",\n });\n return initial;\n }, {});\n this.fileData = jsonData;\n }\n reader.readAsBinaryString(file);\n return;\n }\n\n mappingProcessed(event: any) {\n this.currentStep = 3;\n setTimeout(x => {\n this.selectedFields = event.fields;\n const tempFileData = JSON.parse(JSON.stringify(this.fileData));\n tempFileData.forEach(data => {\n for (var key in data) {\n var field = event.fields.find((field: any) => field.label == key);\n if (field) {\n if ((field.propertyType == 'date' || field.propertyType == 'dateTime') && this.isValidDate(new Date(data[field.label]))) {\n data[field.property] = (new Date(data[field.label]) as Date).toISOString();\n }\n else {\n data[field.property] = data[field.label];\n }\n delete data[key];\n }\n else {\n delete data[key];\n }\n }\n });\n this.save(tempFileData);\n }, 2000);\n }\n\n async save(tempFileData: any) {\n try {\n this.http.post(this.config.apiUrl, { data: tempFileData })\n .pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n\n this.failedItems = result.failed_items;\n if (this.failedItems.length) {\n this.alertService.addAlert(result.msg, 'warn');\n }\n if (!(this.failedItems.length > 0)) {\n this.currentStep = 5;\n setTimeout(x => {\n this.currentStep = 6;\n this.result = result;\n }, 2000);\n }\n else {\n this.currentStep = 4;\n }\n });\n } catch (error) {\n if ((error.status === 422 || error.status === 400) && error.msg) {\n this.alertService.addAlert(error.msg, \"warning\");\n }\n this.errorHandler.handleError(error);\n this.reUpload();\n }\n }\n\n isValidDate(d: any) {\n return d instanceof Date && !isNaN(d.getTime());\n }\n\n reUpload() {\n this.data = [];\n this.fileData = [];\n this.filesList = [];\n this.failedItems = [];\n this.selectedFields = [];\n this.currentStep = 1;\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-data-import',\n templateUrl: './data-import.component.html',\n styleUrls: ['./data-import.component.scss']\n})\nexport class DataImportComponent implements OnInit {\n @Input() step: any;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DocumentViewerModule } from './../document-viewer/document-viewer.module';\nimport { FileDropperModule } from './../file-dropper/file-dropper.module';\nimport { MaterialModule } from './../material.module';\nimport { ImportSuccessComponent } from './import-success/import-success.component';\nimport { ImportHistoryListComponent } from './import-history-list/import-history-list.component';\nimport { FieldMappingComponent } from './field-mapping/field-mapping.component';\nimport { FailedItemsListComponent } from './failed-items-list/failed-items-list.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ImportCsvComponent } from './import-csv.component';\nimport { RouterModule } from '@angular/router';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { DataImportComponent } from './data-import/data-import.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n RouterModule,\n MaterialModule,\n FlexLayoutModule,\n FileDropperModule,\n DocumentViewerModule,\n InfiniteScrollModule\n ],\n declarations: [\n ImportCsvComponent,\n FieldMappingComponent,\n FailedItemsListComponent,\n ImportHistoryListComponent,\n ImportSuccessComponent,\n DataImportComponent\n ],\n providers: [],\n exports: [\n ImportCsvComponent\n ],\n})\nexport class ImportCsvModule { }\n","import { Component, Input, OnInit } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { PageEvent } from '../data-table/data-table.model';\nimport { HttpService } from '../core/http.service';\nimport { TimelineValue } from '../timeline-filter';\n\n@UntilDestroy()\n@Component({\n selector: 'app-login-history-for-user',\n templateUrl: './login-history-for-user.component.html',\n styleUrls: ['./login-history-for-user.component.scss']\n})\nexport class LoginHistoryForUserComponent implements OnInit {\n\n loginHistoryList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n };\n historyFilterForm: FormGroup;\n displayedColumns: any[] = ['index', 'created_at'];\n @Input() userId: any;\n\n constructor(\n private http: HttpService,\n private fb: FormBuilder,\n ) {\n this.historyFilterForm = this.fb.group({\n 'duration': [''],\n 'date_from': [''],\n 'date_to': ['']\n });\n }\n\n ngOnInit() {\n this.filters.user_id = this.userId;\n this.historyFilterForm.valueChanges\n .pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this))\n .subscribe((value: any) => {\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\n this.filterChange(value);\n });\n this.initializeData();\n }\n\n onTimelineChange(range: TimelineValue) {\n let date_from = range?.date_from ? new Date(range.date_from) : '';\n let date_to = range?.date_to ? new Date(range.date_to) : '';\n this.historyFilterForm.patchValue({\n date_from,\n date_to\n });\n }\n\n initializeData() {\n this.http.get(`api/user-login-history`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.loginHistoryList = this.loginHistoryList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n filterChange(event: any) {\n this.filters = {\n ...this.filters,\n ...event\n };\n this.reload();\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n\n reload() {\n this.loginHistoryList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../core/authentication.guard';\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: LoginHistoryForUserComponent,\n canActivate: [AuthenticationGuard]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class LoginHistoryForUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LoginHistoryForUserRoutingModule } from './login-history-for-user-routing.module';\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { TimelineFilterModule } from '../timeline-filter/timeline-filter.module';\n\n\n@NgModule({\n declarations: [LoginHistoryForUserComponent],\n imports: [\n CommonModule,\n LoginHistoryForUserRoutingModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n TimelineFilterModule\n ],\n exports: [LoginHistoryForUserComponent]\n})\nexport class LoginHistoryForUserModule { }\n","import { COMMA, ENTER } from '@angular/cdk/keycodes';\n\nexport class TechlifyTaggerTagFormConfigModel {\n selectable: boolean;\n removable: boolean;\n separatorKeysCodes: number[];\n placeholder: string;\n apiUrl: string;\n isCreateable: boolean;\n createApiUrl: string;\n isCacheTags: boolean;\n isSingle: boolean;\n\n constructor() {\n this.selectable = true;\n this.removable = true;\n this.separatorKeysCodes = [ENTER, COMMA];\n this.placeholder = 'New Tag..';\n this.apiUrl = 'api/techlify-tagger-tags';\n this.createApiUrl = 'api/techlify-tagger-tags';\n this.isCreateable = true;\n this.isCacheTags = false;\n this.isSingle = false;\n }\n}","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, Inject, Optional, Self, OnChanges, SimpleChanges } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { HttpService } from '../core/http.service';\nimport { TechlifyTaggerTagFormConfigModel } from './techlify-tagger-tag-form-config.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-tagger-tag-form-field',\n templateUrl: './techlify-tagger-tag-form-field.component.html',\n styleUrls: ['./techlify-tagger-tag-form-field.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }],\n})\nexport class TechlifyTaggerTagFormFieldComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy, OnChanges {\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'techlify-tagger-form-field';\n id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent.nextId++}`;\n\n onChange = (_: any) => { };\n onTouched = () => { };\n\n tagInputCtrl = new FormControl();\n filterString: any;\n @ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;\n\n /**Pass the configuration for Techlify Tagger */\n @Input() config: TechlifyTaggerTagFormConfigModel = new TechlifyTaggerTagFormConfigModel();\n /**Pass the Model Type for Techlify Tagger, Required */\n @Input() modelType!: string;\n /**Pass the Model ID for Techlify Tagger */\n @Input() modelId: string;\n\n /**Pass the default list of tags */\n private _allTags: any[] = [];\n @Input()\n get allTags() {\n return this._allTags;\n }\n set allTags(value) {\n this._allTags = value;\n }\n\n /**Pass the Categories to filter for a model */\n @Input() categories: string[] = [];\n /**Pass default category to be used for assigning the tags, when we filter by more than one category */\n @Input() defaultCreateCategory: string;\n\n get tags() {\n return this.allTags.filter(x => this.value.some(y => y == x.id));\n }\n\n //Default Getter and Setters for a Form Field Implementation\n get empty() {\n return this.value.length == 0;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty || this.tagInputCtrl.value;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.tagInputCtrl.disable() : this.tagInputCtrl.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n\n private _value: any[] = [];\n @Input()\n get value(): any[] {\n return this._value;\n }\n set value(tagIds: any[]) {\n this._value = tagIds || [];\n this.stateChanges.next();\n }\n\n get errorState(): boolean {\n return this.tagInputCtrl.dirty && this.required && (this.value.length == 0);\n }\n\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder: string;\n\n\n ngOnInit(): void {\n\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n //API to load all tags for the model type\n if (this.allTags.length == 0) {\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n perPage: '1000'\n }\n }).pipe(\n debounceTime(500),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.allTags = result.data;\n });\n }\n\n //API to load only the selected tags for the model\n if (this.modelId && this.value.length == 0) {\n //Model Id is passed and no tags are present, so we query db for the avilable tags for the model ID.\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n model_type: this.modelType,\n model_id: this.modelId,\n perPage: '1000'\n }\n }).pipe(\n debounceTime(500),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.value = (result?.data || []).map((x: any) => x.id);\n this._handleInput();\n });\n }\n }\n\n init() {\n if (this.modelId && this.allTags.length == 0) {\n //Model Id is passed and no tags are passed, so we query db for the avilable tags for the model ID.\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n model_type: this.modelType,\n model_id: this.modelId\n }\n }).pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.allTags = result.data;\n });\n }\n }\n\n get filteredTags(): any[] {\n return this._filter();\n }\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private httpService: HttpService,\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl) {\n\n this.tagInputCtrl.valueChanges\n .subscribe(filterValue => {\n this.filterString = filterValue;\n });\n\n //Set Focus Monitor\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n setDescribedByIds(ids: string[]) {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n onContainerClick() {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n\n async add(event: MatChipInputEvent) {\n const value = (event.value || '').trim();\n // Add our tag\n // Validate for single mode\n if (!this.config.isSingle || (this.value.length === 0)) {\n if (value && this.config.isCreateable) {\n const tags = this.allTags;\n let tag = tags.find((item: any) => item.title.toLowerCase() == value.toLowerCase());\n if (!tag) {\n //No tag present in the list\n try {\n const result: any = await this.httpService.post(this.config.createApiUrl, {\n title: value,\n description: value,\n category_title: (this.categories.length > 0) ? (this.defaultCreateCategory ? this.defaultCreateCategory : this.categories[0]) : ''\n }).toPromise();\n tag = result.item;\n } catch (error) {\n return;\n }\n this.allTags.push(tag);\n } else {\n //Optionally clean the existing value, to avoid duplicate\n this.remove(tag);\n }\n this.value.push(tag.id);\n this._handleInput();\n }\n }\n\n // Clear the input value\n event.input.value = '';\n\n this.tagInputCtrl.setValue(null);\n }\n\n remove(tag: any): void {\n this.value = this.value.filter(x => x !== tag.id);\n this._handleInput();\n }\n\n selected(event: MatAutocompleteSelectedEvent): void {\n // Validate for single mode\n if (!this.config.isSingle || (this.value.length === 0)) {\n //Clean the existing value, to avoid duplicate\n this.remove({ id: event.option.value });\n this.value.push(event.option.value);\n this._handleInput();\n }\n this.tagInput.nativeElement.value = '';\n this.tagInputCtrl.setValue(null);\n }\n\n private _filter(): any[] {\n const filterValue = this.filterString ? this.filterString.toString().toLowerCase() : null;\n const availableTags = this.allTags.filter((tag: any) => !this.value.some((item: any) => item == tag.id));\n return filterValue ? availableTags.filter((tag: any) => tag.title.toLowerCase().includes(filterValue)) : availableTags;\n }\n\n writeValue(tagIds: any[]): void {\n this.value = tagIds || [];\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyTaggerTagFormFieldComponent } from './techlify-tagger-tag-form-field.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MaterialModule } from '../material.module';\n\n\n\n@NgModule({\n declarations: [\n TechlifyTaggerTagFormFieldComponent\n ],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n MatAutocompleteModule,\n ReactiveFormsModule\n ],\n exports: [TechlifyTaggerTagFormFieldComponent]\n})\nexport class TechlifyTaggerTagFormFieldModule { }\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, OnInit, Input, OnDestroy, Inject, Optional, Self } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { HttpService } from '../core/http.service';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-tagger-tag-selector',\n templateUrl: './techlify-tagger-tag-selector.component.html',\n styleUrls: ['./techlify-tagger-tag-selector.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagSelectorComponent }],\n})\nexport class TechlifyTaggerTagSelectorComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy {\n\n /**Pass the Categories to filter for a model */\n @Input() categories: string[] = [];\n @Input() multiple: boolean = false;\n @Input() enableSearch: boolean = true;\n tagSelectorCtrl = new FormControl();\n @Input() showAllTags: boolean = false;\n @Input() useSelectButtonStyle: boolean = false;\n\n tags: any[] = [];\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'techlify-tagger-selector';\n id = `techlify-tagger-selector-${TechlifyTaggerTagSelectorComponent.nextId++}`;\n\n onChange = (_: any) => { };\n onTouched = () => { };\n\n get apiUrl() {\n if (this.showAllTags) {\n return 'api/techlify-tagger-tags'\n }\n else if (this.categories?.length > 0) {\n return 'api/techlify-tagger-tags?categories=' + this.categories.join(',');\n }\n else {\n return '';\n }\n }\n\n //Default Getter and Setters for a Form Field Implementation\n get empty() {\n return this.value.length == 0;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.tagSelectorCtrl.disable() : this.tagSelectorCtrl.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n\n private _value: any;\n @Input()\n get value(): any {\n return this._value;\n }\n set value(val: any) {\n this._value = val;\n this.tagSelectorCtrl.setValue(val);\n this.stateChanges.next();\n }\n\n get errorState(): boolean {\n return this.tagSelectorCtrl.dirty && this.required && (this.value.length == 0);\n }\n\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder: string;\n\n\n ngOnInit(): void {\n if (this.useSelectButtonStyle) {\n this.httpService.get(this.apiUrl)\n .pipe(untilDestroyed(this))\n .subscribe((res: any) => {\n this.tags = res.data;\n })\n }\n }\n\n selectionChange(value: any) {\n this.value = value;\n this._handleInput();\n }\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private httpService: HttpService,\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl) {\n\n //Set Focus Monitor\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n setDescribedByIds(ids: string[]) {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n onContainerClick() {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n writeValue(val: any): void {\n this.value = val;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyTaggerTagSelectorComponent } from './techlify-tagger-tag-selector.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MaterialModule } from '../material.module';\nimport { SearchableSelectorModule } from '../searchable-selector/searchable-selector.module';\n\n\n\n@NgModule({\n declarations: [\n TechlifyTaggerTagSelectorComponent\n ],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n MatAutocompleteModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n MatButtonToggleModule\n ],\n exports: [TechlifyTaggerTagSelectorComponent]\n})\nexport class TechlifyTaggerTagSelectorModule { }\n","import { Injectable } from '@angular/core';\nimport { DataManager } from '../core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TechlifyFeatureService {\n\n constructor(private dataManager: DataManager) { }\n\n getFeatures() {\n return this.dataManager.GET(`api/features`);\n }\n\n disableFeature(id: any) {\n return this.dataManager.GET(`api/feature/${id}/disable`);\n }\n\n enableFeature(id: any) {\n return this.dataManager.GET(`api/feature/${id}/enable`);\n }\n\n}\n","import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { TechlifyFeatureService } from './techlify-feature.service';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { debounceTime } from 'rxjs/operators';\nimport { ActionPopup, ActionPopupComponent } from '../action-popup';\nimport { DataManager } from '../core/dataManager.service';\nimport { ErrorHandlerService } from '../core/error-handler.service';\nimport { AlertService } from '../core/alert.service';\nimport { StorageService } from '../core/storage.service';\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-listing-feature',\n templateUrl: './techlify-feature-listing.component.html',\n styleUrls: ['./techlify-feature-listing.component.scss']\n})\nexport class TechlifyFeatureListingComponent implements OnInit {\n\n features: any[] = []\n displayedColumns: string[] = [\n 'index',\n 'feature',\n 'description',\n 'actions',\n ]\n\n dataSource = new MatTableDataSource()\n\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n\n isWorking: boolean = false\n filterFormGroup: FormGroup;\n featureToggleForm: FormGroup;\n\n constructor(\n private dataManager: DataManager,\n private errorHandler: ErrorHandlerService,\n private fb: FormBuilder,\n private alertService: AlertService,\n private dialog: MatDialog,\n private storage: StorageService,\n private featureService: TechlifyFeatureService\n ) {\n this.filterFormGroup = this.fb.group({\n num_items: [\"\"]\n })\n }\n\n ngOnInit() {\n this.loadData()\n this.listenForChanges()\n }\n\n listenForChanges() {\n this.filterFormGroup.valueChanges\n .pipe(debounceTime(500), untilDestroyed(this))\n .subscribe((changes) => {\n this.reload()\n })\n }\n\n async loadData() {\n let result;\n try {\n this.isWorking = true\n var filter = this.filterFormGroup.value\n filter.page = this.page;\n filter.perPage = this.perPage;\n result = await this.dataManager.GET(`api/features`, filter);\n this.features = this.features.concat(result.data);\n this.dataSource = new MatTableDataSource(this.features);\n\n if (!this.storage.getItem('features')) {\n this.setStorage(this.features);\n }\n\n this.isWorking = false\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.isWorking = false;\n }\n }\n\n async toggeleFeature(element, feature) {\n let status = element ? 'Off' : \"On\";\n let data;\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: `Turn this feature ${status}?`,\n message: `Would you like to turn ${feature.title} feature ${status}`\n }\n })\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n try {\n data = element\n ? await this.featureService.disableFeature(feature.id)\n : await this.featureService.enableFeature(feature.id);\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.alertService.addAlert(`You have just turned ${status} the feature ${feature.title}`, 'success');\n this.reload();\n this.storage.removeItem('features');\n this.setStorage(this.features);\n this.isWorking = false;\n }\n } else {\n this.reload();\n }\n })\n }\n\n setStorage(features) {\n let localFeatures = [];\n for (let feature of features) {\n if (!feature.client_feature) {\n if (feature.is_enabled_default) {\n localFeatures.push(feature.code);\n }\n } else {\n if (feature.client_feature.is_enabled) {\n localFeatures.push(feature.code);\n }\n }\n\n }\n this.storage.setItem(\"features\", localFeatures);\n }\n\n reload() {\n this.features = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase()\n this.assignFilter(event.active, direction)\n this.reload()\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'name': {\n return this.filterFormGroup\n .get('sort_by')\n .setValue('first_name|' + direction)\n }\n case 'added_on': {\n return this.filterFormGroup\n .get('sort_by')\n .setValue('created_at|' + direction)\n }\n }\n }\n\n}\n","import { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../core';\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: TechlifyFeatureListingComponent,\n canActivate: [AuthenticationGuard]\n },\n];\n\nexport const TechlifyFeatureRoutes = RouterModule.forChild(routes);\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'app-on-off-switch',\n templateUrl: './on-off-switch.component.html',\n styleUrls: ['./on-off-switch.component.scss']\n})\n\nexport class OnOffSwitchComponent implements OnInit {\n\n @Input() value: boolean;\n slideToggle: FormGroup;\n\n constructor(private fb: FormBuilder) {\n this.slideToggle = this.fb.group({\n toggle: [\"\"]\n })\n }\n\n ngOnInit() {\n this.slideToggle.get('toggle').setValue(this.value);\n }\n\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { ErrorHandlerService } from '../core/error-handler.service';\nimport { StorageService } from '../core/storage.service';\nimport { TechlifyFeatureService } from './techlify-feature.service';\n\n@Directive({\n selector: '[techlifyFeatureEnabled]'\n})\nexport class TechlifyFeatureEnabledDirective {\n\n features: any;\n localFeatures: any[] = [];\n @Input('techlifyFeatureEnabled') enabledFeature: any;\n\n constructor(\n private el: ElementRef,\n private featureService: TechlifyFeatureService,\n private errorHandler: ErrorHandlerService,\n private storage: StorageService) {\n\n }\n\n ngOnInit(): void {\n if (!this.storage.getItem('features')) {\n this.getFeatures();\n } else {\n this.checkForFeatureEnabled();\n }\n }\n\n async getFeatures() {\n try {\n let features = await this.featureService.getFeatures();\n\n for (let feature of features.data) {\n if (!feature.client_feature) {\n if (feature.is_enabled_default) {\n this.localFeatures.push(feature.code);\n }\n } else {\n if (feature.client_feature.is_enabled) {\n this.localFeatures.push(feature.code);\n }\n }\n\n }\n this.storage.setItem(\"features\", this.localFeatures);\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.checkForFeatureEnabled()\n }\n }\n\n checkForFeatureEnabled() {\n try {\n let features = this.storage.getItem('features');\n let features_split = features.split(',');\n\n if (features_split.includes(this.enabledFeature)) {\n this.el.nativeElement.style.display = \"show\";\n } else {\n this.el.nativeElement.remove();\n }\n\n } catch (error) {\n this.errorHandler.handleError(error);\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\n\nimport { TechlifyFeatureRoutes } from './techlify-feature.routing';\nimport { OnOffSwitchComponent } from './on-off-switch/on-off-switch.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TechlifyFeatureEnabledDirective } from './techlify-feature-enabled.directive';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n TechlifyFeatureRoutes,\n MatSlideToggleModule,\n FormsModule,\n ReactiveFormsModule,\n InfiniteScrollModule\n ],\n declarations: [TechlifyFeatureListingComponent, OnOffSwitchComponent, TechlifyFeatureEnabledDirective],\n exports: [TechlifyFeatureListingComponent, TechlifyFeatureEnabledDirective]\n})\nexport class TechlifyFeatureModule { }\n"]}
1
+ {"version":3,"sources":["../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.model.ts","../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.component.ts","../../../node_modules/tslib/tslib.es6.js","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.component.ts","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.model.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/document-viewer.component.ts","../../../projects/ngx-techlify-core/src/lib/core/logger.service.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/viewer-config.model.ts","../../../projects/ngx-techlify-core/src/lib/core/techlify-config.model.ts","../../../projects/ngx-techlify-core/src/lib/core/config.service.ts","../../../projects/ngx-techlify-core/src/lib/core/snack/snack.component.ts","../../../projects/ngx-techlify-core/src/lib/core/alert.service.ts","../../../projects/ngx-techlify-core/src/lib/core/error-handler.service.ts","../../../projects/ngx-techlify-core/src/lib/core/error-handler.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/http-cache.service.ts","../../../projects/ngx-techlify-core/src/lib/core/cache.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/api-prefix.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/credentials.service.ts","../../../projects/ngx-techlify-core/src/lib/core/token.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/header.interceptor.ts","../../../projects/ngx-techlify-core/src/lib/core/http.service.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-file.service.ts","../../../projects/ngx-techlify-core/src/lib/core/form-validator.service.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-file-form/entity-file-form.component.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-files-view-all.component.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.component.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.model.ts","../../../projects/ngx-techlify-core/src/lib/note/note.service.ts","../../../projects/ngx-techlify-core/src/lib/note/note-form/note-form.component.ts","../../../projects/ngx-techlify-core/src/lib/note/note-list/note-list.component.ts","../../../projects/ngx-techlify-core/src/lib/note/comment-form/comment-form.component.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/searchable-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/mat-select-infinite-scroll.directive.ts","../../../projects/ngx-techlify-core/src/lib/utility/num-items-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/utility/date-utils.service.ts","../../../projects/ngx-techlify-core/src/lib/utility/number-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline.model.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/calculate-timeline.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/loader/loader.component.ts","../../../projects/ngx-techlify-core/src/lib/core/snack/snack.module.ts","../../../projects/ngx-techlify-core/src/lib/core/authentication.guard.ts","../../../projects/ngx-techlify-core/src/lib/core/authentication.service.ts","../../../projects/ngx-techlify-core/src/lib/core/route-reusable-strategy.ts","../../../projects/ngx-techlify-core/src/lib/core/storage.service.ts","../../../projects/ngx-techlify-core/src/lib/core/dataManager.service.ts","../../../projects/ngx-techlify-core/src/lib/material.module.ts","../../../projects/ngx-techlify-core/src/lib/core/core.module.ts","../../../projects/ngx-techlify-core/src/lib/action-popup/action-popup.module.ts","../../../projects/ngx-techlify-core/src/lib/data-table/data-table.module.ts","../../../projects/ngx-techlify-core/src/lib/document-viewer/document-viewer.module.ts","../../../projects/ngx-techlify-core/src/lib/file-dropper/file-dropper.module.ts","../../../projects/ngx-techlify-core/src/lib/entity-files/entity-files-view-all.module.ts","../../../projects/ngx-techlify-core/src/lib/read-more/read-more.component.ts","../../../projects/ngx-techlify-core/src/lib/read-more/read-more.module.ts","../../../projects/ngx-techlify-core/src/lib/note/note.module.ts","../../../projects/ngx-techlify-core/src/lib/searchable-selector/searchable-selector.module.ts","../../../projects/ngx-techlify-core/src/lib/utility/utility.module.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/timeline-filter/timeline-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/loader/loader.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-form/email-subscription-user-form.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list-filter/email-subscription-user-list-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-user/email-subscription-user-list/email-subscription-user-list.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-form/email-subscription-type-form.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-type/email-subscription-type-list/email-subscription-type-list.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.component.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/email-subscription/email-subscription-for-user/email-subscription-for-user.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update.service.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-form/techlify-update-form.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-form/techlify-update-form.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-updates-list/techlify-updates-list.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-view/update-view.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/techlify-update-history/techlify-update-history.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-view/update-view.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier-snack/update-notifier-snack.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-update/update-notifier/update-notifier.module.ts","../../../projects/ngx-techlify-core/src/lib/export-excel/export-excel-button/export-excel-button.component.ts","../../../projects/ngx-techlify-core/src/lib/export-excel/export-excel.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view-model/audit-log-view-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/date-validator.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list-filter/audit-log-list-filter.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-list/audit-log-list.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-logs-view-model/audit-logs-view-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-for-model/audit-log-for-model.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view.component.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-view/audit-log-view.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/audit-log/audit-log.module.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-success/import-success.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-history-list/import-history-list.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/field-mapping/field-mapping.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/failed-items-list/failed-items-list.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-csv.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/data-import/data-import.component.ts","../../../projects/ngx-techlify-core/src/lib/import-csv/import-csv.module.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user.component.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user-routing.module.ts","../../../projects/ngx-techlify-core/src/lib/login-history-for-user/login-history-for-user.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-config.model.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-form-field/techlify-tagger-tag-form-field.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-tagger-tag-selector/techlify-tagger-tag-selector.module.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.service.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature-listing.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.routing.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/on-off-switch/on-off-switch.component.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature-enabled.directive.ts","../../../projects/ngx-techlify-core/src/lib/techlify-feature/techlify-feature.module.ts"],"names":["ActionPopupComponent","dialogRef","data","this","prototype","ngOnInit","closeDialog","close","confirm","Component","args","selector","template","MatDialogRef","ActionPopup","decorators","type","Inject","MAT_DIALOG_DATA","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","hasOwnProperty","call","__extends","TypeError","String","__","constructor","create","__decorate","target","key","desc","c","arguments","length","r","getOwnPropertyDescriptor","Reflect","decorate","i","defineProperty","__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","__generator","body","f","y","t","g","_","label","sent","trys","ops","verb","throw","return","Symbol","iterator","n","v","op","pop","push","__values","o","s","m","__read","ar","error","__spread","concat","DataTableComponent","DataTableComponent_1","dataSource","MatTableDataSource","action","EventEmitter","selctionChange","rowClick","tableScroll","sortChanged","elementId","nextId","ngAfterViewInit","_this","selection","changed","pipe","subscribe","change","selected","emit","sort","sortChange","untilDestroyed","isAllSelected","masterToggle","clearSelection","forEach","row","select","clear","ngOnChanges","changes","initializeConfig","isFirstChange","currentValue","config","page","lastPage","perPage","onScroll","editClicked","event","element","stopPropagation","viewClicked","deactivateClicked","downloadClicked","printClicked","rowClicked","actionMenuClick","menuValue","trigger","closeMenu","actionMenuTriggerClick","checkEdit","ele","editDisableFunction","checkView","viewDisableFunction","checkPrint","printDisableFunction","checkActions","actionsMenuFunction","checkActionButton","actionsMenuButtonFunction","getValue","keyString","keyList","replace","split","ngOnDestroy","Input","Output","ViewChild","MatSort","static","UntilDestroy","DocumentViewerComponent","remove","initData","removeFile","file","ext","getFileExtension","viewerType","nameArray","LogLevel","Logger","source","enableProductionMode","level","Warning","debug","objects","_i","log","console","Debug","info","Info","warn","Error","func","outputs","output","TechlifyConfig","projectKey","environment","authClientSecret","authGrantType","apiUrl","loadFromMap","storage","rawConfigs","ConfigService","getConfigsRaw","getProjectKey","getApiUrl","getAuthClientSecret","getStorage","localStorage","getAuthGrantType","getCredentialsKey","BASE_CREDENTIALS","Injectable","providedIn","MAT_SNACK_BAR_DATA","AlertService","snackBar","addAlert","message","alertType","duration","openFromComponent","SuccessSnackComponent","ErrorSnackComponent","MatSnackBar","ErrorHandlerService","alerter","handleError","errorResponse","msg","errors","_a","property","_b","_c","_d","errMessage","ErrorHandlerInterceptor","configService","errorHandler","intercept","request","handle","catchError","ErrorEvent","throwError","HttpCacheService","cachedData","cachePersistenceKey","loadCacheData","setCacheData","url","lastUpdated","Date","saveCacheData","getCacheData","cacheEntry","getHttpCacheEntry","clearCache","cleanCache","expirationDate","keys","setPersistence","persistence","sessionStorage","JSON","stringify","parse","CacheInterceptor","httpCacheService","forceUpdate","configure","options","instance","update","method","Observable","subscriber","urlWithParams","HttpResponse","complete","ApiPrefixInterceptor","test","clone","CredentialsService","_credentials","credentials","getItem","setCredentials","remember","setItem","getAccessToken","expiration","token","expires_in","access_token","now","parseInt","getExpiration","getRefreshToken","refresh_token","refresh","TokenInterceptor","setHeaders","Authorization","HeaderInterceptor","Content-Type","headers","get","HttpInterceptorHandler","interceptor","HTTP_DYNAMIC_INTERCEPTORS","InjectionToken","HttpService","httpHandler","injector","interceptors","_super","cache","cacheInterceptor","addInterceptor","skipErrorHandler","removeInterceptor","skipApiPrefix","skipToken","skipHeader","handler","reduceRight","HttpClient","interceptorType","filter","HttpHandler","Injector","Optional","EntityFileService","http","getEntityFiles","filters","params","toPromise","createEntityFile","model","post","updateEntityFile","put","id","deleteEntityFile","delete","uploadEntityFile","formData","FormData","append","name","entity_id","entity_type","FormValidatorService","isFieldValid","field","formGroup","firstAttempt","valid","touched","untouched","getErrorMessage","errorMessages","errorField","required","EntityFileFormComponent","formValidatorService","fb","entityFileService","alertService","fileList","createForm","entityFileGroup","group","title","details","Validators","file_size","entity","setValue","updateMode","patchValue","hideTitleAndDetails","fileConfig","fileId","containerId","styles","height","multiple","acceptFile","maxSize","acceptFileText","viewerConfig","viewerStyle","width","submit","assignmentFileFirstAttempt","item","fileChanged","FormBuilder","EntityFilesViewAllComponent","location","dialog","viewOnly","entityFiles","displayedColumns","isWorking","search","FormControl","imageStyle","hideRemove","x","entityType","entityId","valueChanges","debounceTime","distinctUntilChanged","reload","fetchEntityFilesDetails","last_page","addEntityFile","open","autoFocus","restoreFocus","afterClosed","files","editEntityFile","resetFieldValue","sizeOf","bytes","Math","floor","pow","toFixed","charAt","Location","MatDialog","FileDropperComponent","fileArray","border","isSingleMode","Boolean","dragEnter","style","background","dragColor","preventDefault","dragOver","dragLeave","dropEvent","droppedFiles","dataTransfer","from","addFiles","onFileChange","document","getElementById","fileSizeAllowed","sortFiles","a","nameA","toUpperCase","nameB","size","clickEvent","click","NoteService","getNotes","filterModel","addNote","note","editNote","deleteNote","NoteFormComponent","noteService","noteFormGroup","compose","model_type","related_model_id","noteFormFirstAttempt","labelText","cancel","NoteListComponent","readonly","commentsView","notes","sort_by","relatedModelId","modelType","loadData","assign","current_page","resetScroll","commentAction","editComment","addComment","comment","index","findIndex","CommentFormComponent","credentialService","view","_commentData","commentFormGroup","isAuthenticated","user","reset","deleteComment","hideEdit","SearchableSelectorComponent","SearchableSelectorComponent_1","formBuilder","_focusMonitor","_elementRef","ngControl","valueField","titleField","selectedValueChange","enableSearch","add","edit","items","apiDataProperty","inDataSearch","selectionChange","itemsChange","isLoading","onChange","onTouched","stateChanges","Subject","focused","controlType","describedBy","cachedItems","_required","_disabled","selectorForm","select_value","monitor","origin","valueAccessor","empty","setValidators","coerceBooleanProperty","disable","enable","openedChange","dataItems","selectedValue","sortBy","fetchItemList","of","startWith","switchMap","finalize","setDescribedByIds","ids","join","onContainerClick","writeValue","registerOnChange","fn","registerOnTouched","setDisabledState","isDisabled","disabled","getPropertyValue","_handleInput","map","find","invalid","dirty","reloadData","searchField","filterItems","toLowerCase","addItem","itemComponent","addConfig","editItem","editConfig","stopMonitoring","providers","provide","MatFormFieldControl","useExisting","FocusMonitor","ElementRef","NgControl","Self","MatSelectInfiniteScrollDirective","matSelect","ngZone","threshold","infiniteScroll","thrPx","thrPc","singleOptionHeight","SELECT_ITEM_HEIGHT_EM","destroyed$","evaluateThreshold","takeUntil","opened","panel","nativeElement","getSelectItemHeightPx","registerScrollListener","lastIndexOf","parseFloat","fromEvent","tap","handleScrollEvent","runOutsideAngular","countOfRenderedOptions","infiniteScrollDistance","clientHeight","scrollTop","run","getComputedStyle","fontSize","Directive","MatSelect","NgZone","NumItemsSelector","numItemsChange","numItemsChanged","numItems","DateUtils","getYYYYMMDDString","inputDate","getFullYear","getMonth","getDate","getYYYY","getMM","getDateTime","toLocaleTimeString","NumberSelector","numChanged","start_value","end_value","Timeline","CUSTOM","TODAY","YESTERDAY","THIS_WEEK","LAST_WEEK","THIS_MONTH","LAST_MONTH","THIS_QUARTER","LAST_QUARTER","THIS_YEAR","LAST_YEAR","ALL","TOMMOROW","NEXT_WEEK","NEXT_MONTH","moment","moment_","calculateTimeline","date","date_from","date_to","show_custom_field","startOf","toISOString","endOf","subtract","TimelineFilterComponent","TimelineFilterComponent_1","datePipe","timelineValue","timelines","viewValue","dateFrom","dateTo","appearance","showClearbutton","form","touchUi","showCustomDateFields","changeTimeline","getDateRangeString","str","selectedRange","toUTCString","transform","_e","_g","_f","getFieldValue","setFieldValue","timeline","range","picker","dateRangeChange","dateRangeStart","dateRangeEnd","onCustomDateChange","DatePipe","LoaderComponent","NgModule","declarations","imports","CommonModule","MatSnackBarModule","MatIconModule","exports","AuthenticationGuard","router","credentialsService","canActivate","route","state","isUserAuthenticated","canLoad","navigate","queryParams","redirect","replaceUrl","Router","AuthenticationService","login","context","concatMap","tokenInfo","userInfo","logout","RouteReusableStrategy","shouldDetach","store","detachedTree","shouldAttach","retrieve","shouldReuseRoute","future","curr","routeConfig","component","RouteReuseStrategy","StorageService","storageSub","watch","asObservable","removeItem","DataManager","GET","urlq","POST","object","blank","POSTRAW","PUT","PATCH","patch","DELETE","MatButtonModule","MatCheckboxModule","MatCommonModule","MatDialogModule","MatFormFieldModule","MatInputModule","MatLineModule","MatMenuModule","MatNativeDateModule","MatOptionModule","MatProgressSpinnerModule","MatPseudoCheckboxModule","MatRippleModule","MatSelectModule","MatSortModule","MatTableModule","MatCardModule","MatDividerModule","MatChipsModule","MatDatepickerModule","MatListModule","MatTooltipModule","MatButtonToggleModule","parentModule","HttpClientModule","RouterModule","SnackModule","useClass","CoreModule","SkipSelf","FlexLayoutModule","MaterialModule","entryComponents","InfiniteScrollModule","NgxDocViewerModule","FormsModule","ReactiveFormsModule","FileDropperModule","DocumentViewerModule","ActionPopupModule","ReadMoreComponent","maxLength","hideToggle","isCollapsed","determineView","toggleView","text","currentText","substring","ReadMoreModule","forChild","TimelineFilterRoutingModule","EmailSubscriptionRoutingModule","EmailSubscriptionUserRoutingModule","user_id","email_type_id","EmailSubscriptionUserFormComponent","esUserFormGroup","esUser","selectedType","email_type","selectedUser","markAllAsTouched","esUserFormFirstAttempt","isSubmitLoading","SearchableSelectorModule","EmailSubscriptionUserFormRoutingModule","LoaderModule","EmailSubscriptionUserListComponent","esUserList","pageEvent","displayColumns","availableDisplayColumns","order","initializeData","changeSort","col","some","columnsChange","selectedColumns","filterChange","addEmailSubscriptionUser","editEmailSubscriptionUser","deleteEmailSubscriptionUser","direction","active","esulr","permissions","only","redirectTo","routes","path","EmailSubscriptionUserListFilterComponent","valueChange","esUserFilterForm","EmailSubscriptionUserListFilterRoutingModule","EmailSubscriptionUserListRoutingModule","EmailSubscriptionUserFormModule","EmailSubscriptionUserListFilterModule","EmailSubscriptionTypeRoutingModule","code","frequency_id","EmailSubscriptionTypeFormComponent","emailSubscriptionTypeFormGroup","description","emailSubscriptionType","selectedFrequency","frequency","emailSubscriptionTypeFormFirstAttempt","EmailSubscriptionTypeFormRoutingModule","EmailSubscriptionTypeListComponent","emailSubscriptionTypeList","isLoadRelations","relations","addEmailSubscriptionType","editEmailSubscriptionType","deleteEmailSubscriptionType","estlr","EmailSubscriptionTypeFormModule","EmailSubscriptionTypeListRoutingModule","EmailSubscriptionForUserComponent","subscriptions","fetchSubscriptions","sub","current_user_subscription","unsubscribe","esfur","EmailSubscriptionForUserRoutingModule","TechlifyUpdateService","getTechlifyUpdates","createTechlifyUpdate","techlifyUpdate","updateTechlifyUpdate","deleteTechlifyUpdate","techlifyUpdateId","getTechlifyUpdate","getNewUpdateForCurrentUser","createUpdateViewRecord","techlifyUpdateView","updateCurrentUserUpdates","released_on","version","learn_more_link","pattern","TechlifyUpdateFormComponent","techlifyUpdateService","onSave","isUpdateMode","toolbar","techlifyUpdateForm","techlifyUpdateDetails","editor","Editor","NgxEditorModule","TechlifyUpdatesListComponent","techlifyUpdates","filterFormGroup","listenChanges","modifyTechlifyUpdate","sortColumn","toString","assignFilter","column","pathMatch","TechlifyUpdateRoutingModule","TechlifyUpdateFormModule","UpdateViewComponent","rootNavUrl","openUpdateHistory","TechlifyUpdateHistoryComponent","openUpdateView","isFromHistory","TechlifyUpdateHistoryRoutingModule","UpdateNotifierSnackComponent","snackBarRef","maxDescriptionLength","descriptionText","determineDescription","dismiss","update_id","MatSnackBarRef","UpdateNotifierComponent","setTimeout","getNewUpdate","showUpdate","horizontalPosition","verticalPosition","panelClass","UpdateViewModule","ExportExcelButtonComponent","exportExcel","fileName","getTime","ws","XLSX.utils","json_to_sheet","wb","book_new","book_append_sheet","XLSX.writeFile","AuditLogViewModelComponent","showDeltaChanges","changeList","model_id","modelId","logInfo","getTransformedChanges","displayAttribute","slice","attribute","newValue","oldValue","pre_object","AuditLogsViewModelComponent","events","NavigationEnd","AuditLogForModelComponent","logView","getLogView","getLogsView","maxWidth","AuditLogViewModelRoutingModule","AuditLogListComponent","dataManager","sanitizer","auditLogList","showFilter","showExportButtons","Type","object_type","Action","Data","Pre-Object","Created At","created_at","toDateString","Created By","email","logClicked","objectType","objectId","object_id","userId","value_1","DomSanitizer","DateValidator","control","val","invalidDate","AuditLogListFilterComponent","auditLogFilterForm","AuditLogListFilterRoutingModule","AuditLogListRoutingModule","ExportExcelModule","AuditLogListFilterModule","AuditLogsViewModelRoutingModule","AuditLogListModule","AuditLogViewModelModule","AuditLogsViewModelModule","AuditLogForModelRoutingModule","AuditLogViewComponent","paramMap","fetchLogDetail","back","logId","patchDelta","delta","jsondiffpatch.diff","innerHTML","jsondiffpatch.formatters","html","format","ActivatedRoute","AuditLogViewRoutingModule","AuditLogRoutingModule","AuditLogViewModule","ImportSuccessComponent","ImportHistoryListComponent","histories","importHistory","isEnabled","unavailable","FieldMappingComponent","changeDetectorRef","firstDataArray","properties","onReUpload","createImportMappingForm","reFectorAttributes","importMappingForm","fields","array","createField","propertyType","k","dataValue","mainIndex","includes","fieldsArray","detectChanges","updatePropertyType","controls","uniqueValidator","propertyData","setErrors","removeField","removeAt","reUpload","ChangeDetectorRef","FailedItemsListComponent","isValidDate","isNaN","ImportCsvComponent","filesList","isUploaded","isImportTypeSelected","fileData","failedItems","selectedFields","importSteps","progressTitle","progressDescription","currentStep","filesConfig","selectedFile","jsonData","reader","FileReader","onload","XLSX.read","cellDates","SheetNames","reduce","initial","sheet","Sheets","sheet_to_json","header","defval","readAsBinaryString","mappingProcessed","tempFileData","save","failed_items","status","DataImportComponent","LoginHistoryForUserComponent","loginHistoryList","historyFilterForm","onTimelineChange","LoginHistoryForUserRoutingModule","TimelineFilterModule","selectable","removable","separatorKeysCodes","ENTER","COMMA","placeholder","createApiUrl","isCreateable","isCacheTags","isSingle","TechlifyTaggerTagFormFieldComponent","TechlifyTaggerTagFormFieldComponent_1","httpService","_formField","tagInputCtrl","TechlifyTaggerTagFormConfigModel","_allTags","categories","_value","filterValue","filterString","allTags","tagIds","_placeholder","init","_filter","trim","tags","tag","category_title","defaultCreateCategory","input","option","tagInput","availableTags","MatFormField","MAT_FORM_FIELD","MatAutocompleteModule","TechlifyTaggerTagSelectorComponent","TechlifyTaggerTagSelectorComponent_1","tagSelectorCtrl","showAllTags","useSelectButtonStyle","res","TechlifyFeatureService","getFeatures","disableFeature","enableFeature","TechlifyFeatureListingComponent","featureService","features","num_items","listenForChanges","setStorage","error_1","toggeleFeature","feature","error_2","localFeatures","features_1","features_1_1","client_feature","is_enabled","is_enabled_default","TechlifyFeatureRoutes","OnOffSwitchComponent","slideToggle","toggle","TechlifyFeatureEnabledDirective","el","checkForFeatureEnabled","enabledFeature","display","MatSlideToggleModule"],"mappings":"spHAAA,0BCWE,SAAAA,EACSC,EACyBC,GADzBC,KAAAF,UAAAA,EACyBE,KAAAD,KAAAA,SAGlCF,EAAAI,UAAAC,SAAA,aAIAL,EAAAI,UAAAE,YAAA,WACEH,KAAKF,UAAUM,SAKjBP,EAAAI,UAAAI,QAAA,WACEL,KAAKF,UAAUM,MAAMJ,KAAKD,gCAvB7BO,EAAAA,UAASC,KAAA,CAAC,CACTC,SAAU,mBACVC,SAAA,muBALOC,EAAAA,oBACAC,EAAWC,WAAA,CAAA,CAAAC,KAWfC,EAAAA,OAAM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AQO,oBACV5pC,KAAKupC,cAAcpkC,KAAKkkC,EAAQpT,8GAStCj2B,KAAK8M,QAAQ0F,QAAQ,WAAYxS,KAAKupC,8CAEtCvpC,KAAKqP,aAAaZ,YAAY06B,uBAE9BnpC,KAAKmqC,sDAITF,EAAAhqC,UAAAkqC,uBAAA,WACE,IACiBnqC,KAAK8M,QAAQuF,QAAQ,YACNlI,MAAM,KAEjBm4B,SAAStiC,KAAKoqC,gBAC/BpqC,KAAKkqC,GAAG7jB,cAAclK,MAAMkuB,QAAU,OAEtCrqC,KAAKkqC,GAAG7jB,cAAczb,SAGxB,MAAOlF,GACP1F,KAAKqP,aAAaZ,YAAY/I,+BA7DnC2hB,EAAAA,UAAS9mB,KAAA,CAAC,CACTC,SAAU,yEANQ4kB,EAAAA,kBAGXqjB,UAFAl6B,UACAsgB,+CAUNxkB,EAAAA,MAAK9J,KAAA,CAAC,oCCeT,kCAdC+rB,EAAAA,SAAQ/rB,KAAA,CAAC,CACRisB,QAAS,CACPC,EAAAA,aACAmF,GACAD,EAAAA,iBACAkY,GACAS,EAAAA,qBACAtY,EAAAA,YACAC,EAAAA,oBACAH,EAAAA,sBAEFvF,aAAc,CAACsc,EAAAA,gCAAiCiB,GAAsBG,IACtErd,QAAS,CAACic,EAAAA,gCAAiCoB","sourcesContent":["export class ActionPopup {\n name: string;\n title: string;\n message: string;\n}","import { Component, OnInit, Inject } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { ActionPopup } from './action-popup.model';\n\n@Component({\n selector: 'app-action-popup',\n templateUrl: './action-popup.component.html',\n styleUrls: ['./action-popup.component.scss']\n})\nexport class ActionPopupComponent implements OnInit {\n\n constructor(\n public dialogRef: MatDialogRef<ActionPopupComponent>,\n @Inject(MAT_DIALOG_DATA) public data: ActionPopup,\n ) { }\n\n ngOnInit() {\n }\n\n /**Method to close dialog box */\n closeDialog() {\n this.dialogRef.close();\n }\n\n /**Method to close dialog box with the data given from parent component\n */\n confirm() {\n this.dialogRef.close(this.data);\n }\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) {\r\n for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)\r\n to[j] = from[i];\r\n return to;\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, privateMap) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to get private field on non-instance\");\r\n }\r\n return privateMap.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, privateMap, value) {\r\n if (!privateMap.has(receiver)) {\r\n throw new TypeError(\"attempted to set private field on non-instance\");\r\n }\r\n privateMap.set(receiver, value);\r\n return value;\r\n}\r\n","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n OnChanges,\n SimpleChanges,\n AfterViewInit,\n ViewChild\n} from \"@angular/core\";\n\nimport { SelectionModel } from \"@angular/cdk/collections\";\nimport { MatMenuTrigger } from '@angular/material/menu';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatSort } from '@angular/material/sort';\nimport { DataTable } from './data-table.model';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\n\n@UntilDestroy()\n@Component({\n selector: \"app-data-table\",\n templateUrl: \"./data-table.component.html\",\n styleUrls: [\"./data-table.component.scss\"]\n})\nexport class DataTableComponent implements OnInit, OnChanges, AfterViewInit {\n\n trigger: MatMenuTrigger;\n\n @Input() data: any;\n\n @Input() config: DataTable;\n\n dataSource: MatTableDataSource<any> = new MatTableDataSource([]);\n\n @Input() selection: SelectionModel<any>;\n\n @Output() action = new EventEmitter();\n @Output() selctionChange = new EventEmitter();\n @Output() rowClick = new EventEmitter();\n @Output() tableScroll = new EventEmitter();\n @Output() sortChanged = new EventEmitter();\n\n page: number;\n lastPage: number;\n perPage: number;\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n static nextId = 0;\n @Input() elementId: string = `data-table-${DataTableComponent.nextId++}`;\n\n constructor() { }\n\n ngOnInit() { }\n\n /**Life cycle hook method */\n ngAfterViewInit() {\n // Assign the data to the data source for the table to render\n this.dataSource = new MatTableDataSource(this.data);\n\n // Emit change in selection\n if (this.selection) {\n this.selection.changed.pipe().subscribe((change: any) => {\n if (this.selection.selected) {\n this.selctionChange.emit(this.selection.selected);\n }\n });\n }\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.sortChanged.emit(value);\n })\n }\n }\n\n /** Whether the number of selected elements matches the total number of rows. */\n isAllSelected() {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n\n /** Selects all rows if they are not all selected; otherwise clear selection. */\n masterToggle() {\n this.isAllSelected()\n ? this.clearSelection()\n : this.dataSource.data.forEach(row => this.selection.select(row));\n }\n\n /**clear selection*/\n clearSelection() {\n this.selection.clear();\n this.selctionChange.emit(this.selection.selected);\n }\n\n ngOnChanges(changes: SimpleChanges) {\n this.initializeConfig(changes);\n if (changes.data && !changes.data.isFirstChange() && this.dataSource) {\n // If not first change\n this.dataSource.data = changes.data.currentValue;\n }\n }\n\n initializeConfig(changes: SimpleChanges) {\n if (changes.config && !changes.config.isFirstChange()) {\n this.config = changes.config.currentValue;\n }\n this.page = this.config.page || 1;\n this.lastPage = this.config.lastPage || this.page;\n this.perPage = this.config.perPage || 20;\n }\n\n onScroll() {\n if (this.page < this.lastPage) {\n this.page += 1;\n this.tableScroll.emit({ page: this.page, lastPage: this.lastPage, perPage: this.perPage });\n }\n }\n\n /**Method invokes when edit action icon is clickes */\n editClicked(event: any, element: any) {\n this.action.emit({ action: \"edit\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when view action icon is clickes */\n viewClicked(event: any, element: any) {\n this.action.emit({ action: \"view\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when edit action icon is clickes */\n deactivateClicked(event: any, element: any) {\n this.action.emit({ action: \"deactivate\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when download action icon is clickes */\n downloadClicked(event: any, element: any) {\n this.action.emit({ action: \"download\", value: element });\n event.stopPropagation();\n }\n\n /**Method invokes when print action icon is clickes */\n printClicked(event: any, element: any) {\n\n this.action.emit({ action: 'print', value: element });\n event.stopPropagation();\n\n }\n\n /**Method invokes when a row is clicked */\n rowClicked(event: any, element: any) {\n this.rowClick.emit(element);\n event.stopPropagation();\n }\n\n /**Method invokes when menu action icon is hovered */\n actionMenuClick(event: any, element: any, menuValue: string) {\n this.action.emit({ action: menuValue, value: element });\n this.trigger.closeMenu();\n event.stopPropagation();\n }\n\n /**Method invokes when menu action icon is hovered and selects for particular action*/\n actionMenuTriggerClick(event: any, trigger: MatMenuTrigger) {\n this.trigger = trigger;\n event.stopPropagation();\n }\n\n checkEdit(ele: any) {\n if (this.config.editDisableFunction) {\n return this.config.editDisableFunction(ele);\n }\n\n return true;\n }\n\n checkView(ele: any) {\n if (this.config.viewDisableFunction) {\n return this.config.viewDisableFunction(ele);\n }\n\n return true;\n }\n\n checkPrint(ele: any) {\n if (this.config.printDisableFunction) {\n return this.config.printDisableFunction(ele);\n }\n\n return true;\n }\n\n checkActions(ele: any) {\n if (this.config.actionsMenuFunction) {\n return this.config.actionsMenuFunction(ele);\n }\n\n return true;\n }\n\n checkActionButton(ele: any, value: any) {\n if (this.config.actionsMenuButtonFunction) {\n return this.config.actionsMenuButtonFunction(ele, value);\n }\n return true;\n }\n\n getValue(ele: any, keyString: string) {\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\n const keyList = keyString.split(\".\");\n for (let i = 0, n = keyList.length; i < n; ++i) {\n const key = keyList[i];\n if (ele && key in ele) {\n ele = ele[key];\n } else {\n return;\n }\n }\n return ele;\n }\n\n ngOnDestroy() {\n //Until Destroy uses it.\n }\n}\n","export class DataTable {\n displayedColumns: string[];\n columnsConfig: ColumnConfig[];\n actionsConfig?: ActionConfig;\n enableRowClick?: boolean;\n disableElevation?: boolean;\n downloadLink?: string;\n actionsMenuFunction?: any;\n actionsMenuButtonFunction?: any;\n editDisableFunction?: any;\n viewDisableFunction?: any;\n printDisableFunction?: any;\n customActionLabel?: string;\n stickyHeader?: boolean;\n page?: number;\n lastPage?: number;\n perPage?: number;\n pageSizeOptions?: number[];\n style?: any;\n}\n\nclass ColumnConfig {\n title: string;\n value: string;\n sort?: boolean;\n dateField?: boolean;\n currencyField?: boolean;\n format?: string;\n}\n\nclass ActionConfig {\n edit?: boolean;\n view?: boolean;\n download?: boolean;\n print?: boolean;\n deactivate?: boolean;\n actionsMenu?: ActionsMenu[];\n}\n\nclass ActionsMenu {\n name: string;\n value: string;\n}\n\nexport class PageEvent {\n page: number;\n lastPage?: number;\n perPage: number;\n}\n","import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\nimport { ViewerConfig } from './viewer-config.model';\n\n@Component({\n selector: 'app-document-viewer',\n templateUrl: './document-viewer.component.html',\n styleUrls: ['./document-viewer.component.css']\n})\nexport class DocumentViewerComponent implements OnInit {\n\n\n @Input() config!: ViewerConfig;\n\n @Input() file!: any;\n\n @Input() fileUrl!: any;\n\n @Input() disableEdit: boolean;\n\n @Output() remove = new EventEmitter();\n viewerType: any;\n\n constructor() { }\n\n ngOnInit(): void {\n this.initData();\n }\n\n removeFile() {\n this.remove.emit();\n }\n\n initData() {\n if (this.file) {\n var ext = this.getFileExtension(this.file);\n if (ext === 'ppt' || ext === 'pptx' || ext === 'doc' || ext === 'docx' || ext === 'xls' || ext === 'xlsx') {\n this.viewerType = \"office\";\n }\n else if (ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif') {\n this.viewerType = \"image\";\n }\n else if (ext === 'pdf') {\n this.viewerType = \"pdf\";\n }\n else {\n this.viewerType = null;\n }\n }\n }\n\n get fileName() {\n if (this.file) {\n let nameArray = this.file.split('/');\n if (nameArray.length === 2) {\n return nameArray[1];\n }\n return nameArray[0];\n }\n return '';\n }\n\n getFileExtension(file: any) {\n return file.split('.').pop();\n }\n\n}\n","/**\n * Simple logger system with the possibility of registering custom outputs.\n *\n * 4 different log levels are provided, with corresponding methods:\n * - debug : for debug information\n * - info : for informative status of the application (success, ...)\n * - warning : for non-critical errors that do not prevent normal application behavior\n * - error : for critical errors that prevent normal application behavior\n *\n * Example usage:\n * ```\n * import { Logger } from 'app/core/logger.service';\n *\n * const log = new Logger('myFile');\n * ...\n * log.debug('something happened');\n * ```\n *\n * To disable debug and info logs in production, add this snippet to your root component:\n * ```\n * export class AppComponent implements OnInit {\n * ngOnInit() {\n * if (environment.production) {\n * Logger.enableProductionMode();\n * }\n * ...\n * }\n * }\n *\n * If you want to process logs through other outputs than console, you can add LogOutput functions to Logger.outputs.\n */\n\n/**\n * The possible log levels.\n * LogLevel.Off is never emitted and only used with Logger.level property to disable logs.\n */\nexport enum LogLevel {\n Off = 0,\n Error,\n Warning,\n Info,\n Debug\n}\n\n/**\n * Log output handler function.\n */\nexport type LogOutput = (source: string | undefined, level: LogLevel, ...objects: any[]) => void;\n\nexport class Logger {\n\n /**\n * Current logging level.\n * Set it to LogLevel.Off to disable logs completely.\n */\n static level = LogLevel.Debug;\n\n /**\n * Additional log outputs.\n */\n static outputs: LogOutput[] = [];\n\n /**\n * Enables production mode.\n * Sets logging level to LogLevel.Warning.\n */\n static enableProductionMode() {\n Logger.level = LogLevel.Warning;\n }\n\n constructor(private source?: string) { }\n\n /**\n * Logs messages or objects with the debug level.\n * Works the same as console.log().\n */\n debug(...objects: any[]) {\n this.log(console.log, LogLevel.Debug, objects);\n }\n\n /**\n * Logs messages or objects with the info level.\n * Works the same as console.log().\n */\n info(...objects: any[]) {\n this.log(console.info, LogLevel.Info, objects);\n }\n\n /**\n * Logs messages or objects with the warning level.\n * Works the same as console.log().\n */\n warn(...objects: any[]) {\n this.log(console.warn, LogLevel.Warning, objects);\n }\n\n /**\n * Logs messages or objects with the error level.\n * Works the same as console.log().\n */\n error(...objects: any[]) {\n this.log(console.error, LogLevel.Error, objects);\n }\n\n private log(func: (...args: any[]) => void, level: LogLevel, objects: any[]) {\n if (level <= Logger.level) {\n const log = this.source ? ['[' + this.source + ']'].concat(objects) : objects;\n func.apply(console, log);\n Logger.outputs.forEach(output => output.apply(output, [this.source, level, ...objects]));\n }\n }\n\n}\n","export class ViewerConfig {\n imageStyle?: any;\n viewerStyle?: any;\n hideRemove?: boolean;\n}\n","/**\n * Class that stores the configuration data\n *\n * @author Joshua Kissoon\n * @since 20180724\n */\nexport class TechlifyConfig {\n projectKey: string = '';\n environment: string = '';\n authClientSecret: string = '';\n authGrantType: string = '';\n apiUrl: string = '';\n rawConfigs: any;\n storage: Storage;\n\n constructor(data: any) {\n this.loadFromMap(data);\n }\n\n loadFromMap(data: any) {\n this.projectKey = data.projectKey;\n this.environment = data.environment;\n this.authClientSecret = data.authClientSecret;\n this.authGrantType = data.authGrantType;\n this.apiUrl = data.apiUrl;\n this.storage = data?.storage;\n this.rawConfigs = data;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\nimport { TechlifyConfig } from \"./techlify-config.model\";\n\n/**\n * Service that provides settings for all other services\n *\n * @author Joshua Kissoon\n * @since 20170709\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ConfigService {\n\n public static BASE_CREDENTIALS = \"credentials\";\n\n private config: TechlifyConfig;\n\n constructor(config: TechlifyConfig) {\n this.config = config;\n }\n\n getConfigsRaw() {\n return this.config.rawConfigs;\n }\n\n getProjectKey() {\n return this.config.projectKey;\n }\n\n getApiUrl() {\n return this.config.apiUrl;\n }\n\n getAuthClientSecret() {\n return this.config.authClientSecret;\n }\n\n getStorage() {\n return this.config.storage ? this.config.storage : localStorage;\n }\n\n getAuthGrantType() {\n return this.config.authGrantType;\n }\n\n getCredentialsKey() {\n return this.config.projectKey + \"_\" + ConfigService.BASE_CREDENTIALS;\n }\n\n}\n","import { Component, Inject } from '@angular/core';\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\n\n@Component({\n selector: 'snack-bar-component-example-snack',\n templateUrl: 'success-snack.html',\n styleUrls: ['./snack.scss'],\n})\nexport class SuccessSnackComponent {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\n}\n@Component({\n selector: 'snack-bar-component-example-snack',\n templateUrl: 'error-snack.html',\n styleUrls: ['./snack.scss'],\n})\nexport class ErrorSnackComponent {\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\n}\n","import { Injectable } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { ErrorSnackComponent, SuccessSnackComponent } from './snack/snack.component';\r\n\r\n/**\r\n * Service used to manage alerts in the entire system frontend\r\n * \r\n * @author Gokula Prasanna\r\n * @since 20210131\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AlertService {\r\n\r\n constructor(public snackBar: MatSnackBar) { }\r\n\r\n addAlert(message: string, alertType: string, duration = 3) {\r\n if (alertType == \"success\") {\r\n this.snackBar.openFromComponent(SuccessSnackComponent, {\r\n duration: 1000 * duration,\r\n data: message\r\n });\r\n }\r\n else {\r\n this.snackBar.openFromComponent(ErrorSnackComponent, {\r\n duration: 1000 * duration,\r\n data: message\r\n });\r\n }\r\n }\r\n}\r\n","import { Injectable } from \"@angular/core\";\r\nimport { AlertService } from \"./alert.service\";\r\n\r\n\r\n/**\r\n * Service used to handle errors from the request\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20171202\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ErrorHandlerService {\r\n\r\n constructor(private alerter: AlertService) {\r\n }\r\n\r\n handleError(errorResponse: any, msg: string = '') {\r\n // 1 - Create empty array to store errors\r\n const errors = [];\r\n\r\n // 2 - check if the error object is present in the response\r\n if (errorResponse?.error) {\r\n\r\n // 3 - Check for Laravel form validation error messages object\r\n if (errorResponse?.error?.errors) {\r\n\r\n // 4 - For each error property (which is a form field)\r\n for (const property in errorResponse.error.errors) {\r\n\r\n if (errorResponse.error.errors?.hasOwnProperty(property)) {\r\n\r\n // 5 - Extract it's array of errors\r\n const propertyErrors: Array<string> = errorResponse?.error?.errors[property];\r\n\r\n // 6 - Push all errors in the array to the errors array\r\n propertyErrors.forEach(error => errors.push(error));\r\n }\r\n\r\n }\r\n }\r\n\r\n if (errors.length === 0) {\r\n // 7 - Push the main error message to the array of errors if there is no validation error\r\n errors.push(errorResponse.error.message ? errorResponse.error.message : errorResponse.error?.error);\r\n }\r\n }\r\n var errMessage = errors.length ? errors[0] : msg;\r\n this.alerter.addAlert(\"Error: \" + errMessage, \"warning\");\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http';\nimport { Observable, throwError } from 'rxjs';\nimport { catchError } from 'rxjs/operators';\nimport { Logger } from './logger.service';\nimport { ConfigService } from './config.service';\nimport { ErrorHandlerService } from './error-handler.service';\n\nconst log = new Logger('ErrorHandlerInterceptor');\n\n/**\n * Adds a default error handler to all requests.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ErrorHandlerInterceptor implements HttpInterceptor {\n\n constructor(private configService: ConfigService, private errorHandler: ErrorHandlerService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n return next.handle(request).pipe(catchError(error => this.handleError(error)));\n }\n\n // Customize the default error handler here if needed\n private handleError(error: HttpErrorResponse): Observable<HttpEvent<any>> {\n let errorMessage = '';\n if (error.error instanceof ErrorEvent) {\n // client-side error\n errorMessage = `Client Error: ${this.configService?.getProjectKey()}: ${error.error.message}`;\n } else {\n // server-side error\n errorMessage = `Server Error: ${this.configService?.getProjectKey()}`;\n try {\n this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');\n } catch (e) {\n console.log(\"Unable to handle server error\", e);\n }\n }\n return throwError(error);\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpResponse } from '@angular/common/http';\nimport { ConfigService } from './config.service';\nimport { Logger } from './logger.service';\n\nconst log = new Logger('HttpCacheService');\n\n\nexport interface HttpCacheEntry {\n lastUpdated: Date;\n data: HttpResponse<any>;\n}\n\n/**\n * Provides a cache facility for HTTP requests with configurable persistence policy.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HttpCacheService {\n\n private cachedData: { [key: string]: HttpCacheEntry; } = {};\n private storage: Storage | any | null;\n private cachePersistenceKey: String | any;\n\n constructor(private configService: ConfigService) {\n this.storage = this.configService.getStorage();\n this.cachePersistenceKey = this.configService.getProjectKey() + '_HTTP_CACHE';\n this.loadCacheData();\n }\n\n /**\n * Sets the cache data for the specified request.\n * @param {!string} url The request URL.\n * @param {ResponseOptions} data The received data.\n * @param {Date=} lastUpdated The cache last update, current date is used if not specified.\n */\n setCacheData(url: string, data: HttpResponse<any>, lastUpdated?: Date) {\n this.cachedData[url] = {\n lastUpdated: lastUpdated || new Date(),\n data: data\n };\n log.debug(`Cache set for key: \"${url}\"`);\n this.saveCacheData();\n }\n\n /**\n * Gets the cached data for the specified request.\n * @param {!string} url The request URL.\n * @return {?ResponseOptions} The cached data or null if no cached data exists for this request.\n */\n getCacheData(url: string): HttpResponse<any> | null {\n const cacheEntry = this.cachedData[url];\n\n if (cacheEntry) {\n log.debug(`Cache hit for key: \"${url}\"`);\n return cacheEntry.data;\n }\n\n return null;\n }\n\n /**\n * Gets the cached entry for the specified request.\n * @param {!string} url The request URL.\n * @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.\n */\n getHttpCacheEntry(url: string): HttpCacheEntry | null {\n return this.cachedData[url] || null;\n }\n\n /**\n * Clears the cached entry (if exists) for the specified request.\n * @param {!string} url The request URL.\n */\n clearCache(url: string): void {\n delete this.cachedData[url];\n log.debug(`Cache cleared for key: \"${url}\"`);\n this.saveCacheData();\n }\n\n /**\n * Cleans cache entries older than the specified date.\n * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.\n */\n cleanCache(expirationDate?: Date) {\n if (expirationDate) {\n Object(this.cachedData).keys.forEach((key: string) => {\n if (expirationDate >= this.cachedData[key]?.lastUpdated) {\n delete this.cachedData[key];\n }\n });\n } else {\n this.cachedData = {};\n }\n this.saveCacheData();\n }\n\n /**\n * Sets the cache persistence policy.\n * Note that changing the cache persistence will also clear the cache from its previous storage.\n * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session\n * storage, or if no value is provided it will be only in-memory (default).\n */\n setPersistence(persistence?: 'local' | 'session') {\n this.cleanCache();\n this.storage = persistence === 'local' ? localStorage : persistence === 'session' ? sessionStorage : null;\n this.loadCacheData();\n }\n\n private saveCacheData() {\n if (this.storage) {\n this.storage[this.cachePersistenceKey] = JSON.stringify(this.cachedData);\n }\n }\n\n private loadCacheData() {\n const data = this.storage ? this.storage[this.cachePersistenceKey] : null;\n this.cachedData = data ? JSON.parse(data) : {};\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http';\nimport { HttpCacheService } from './http-cache.service';\nimport { Observable, Subscriber } from 'rxjs';\n\n/**\n * Caches HTTP requests.\n * Use ExtendedHttpClient fluent API to configure caching for each request.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CacheInterceptor implements HttpInterceptor {\n\n private forceUpdate = false;\n\n constructor(private httpCacheService: HttpCacheService) { }\n\n /**\n * Configures interceptor options\n * @param {{update: boolean}} options If update option is enabled, forces request to be made and updates cache entry.\n * @return {CacheInterceptor} The configured instance.\n */\n configure(options?: { update?: boolean } | null): CacheInterceptor {\n const instance = new CacheInterceptor(this.httpCacheService);\n if (options && options.update) {\n instance.forceUpdate = true;\n }\n return instance;\n }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (request.method !== 'GET') {\n return next.handle(request);\n }\n\n return new Observable((subscriber: Subscriber<HttpEvent<any>>) => {\n const cachedData = this.forceUpdate ? null : this.httpCacheService.getCacheData(request.urlWithParams);\n if (cachedData !== null) {\n // Create new response to avoid side-effects\n subscriber.next(new HttpResponse(cachedData as Object));\n subscriber.complete();\n } else {\n next.handle(request)\n .subscribe(\n event => {\n if (event instanceof HttpResponse) {\n this.httpCacheService.setCacheData(request.urlWithParams, event);\n }\n subscriber.next(event);\n },\n error => subscriber.error(error),\n () => subscriber.complete()\n );\n }\n });\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { ConfigService } from './config.service';\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class ApiPrefixInterceptor implements HttpInterceptor {\n\n constructor(private configService: ConfigService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n if (!/^(http|https):/i.test(request.url)) {\n request = request.clone({ url: this.configService.getApiUrl() + request.url });\n }\n return next.handle(request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { ConfigService } from './config.service';\n\nexport interface Credentials {\n // Customize received credentials here\n user: any;\n token: any;\n}\n\n/**\n * Provides storage for authentication credentials.\n * The Credentials interface should be replaced with proper implementation.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class CredentialsService {\n\n private _credentials: Credentials | null = null;\n\n constructor(private configService: ConfigService) {\n }\n\n /**\n * Checks is the user is authenticated.\n * @return True if the user is authenticated.\n */\n get isAuthenticated(): boolean {\n return !!this.credentials;\n }\n\n /**\n * Gets the user credentials.\n * @return The user credentials or null if the user is not authenticated.\n */\n get credentials(): Credentials | null {\n if (!this._credentials) {\n this._credentials = JSON.parse(sessionStorage.getItem(this.configService.getCredentialsKey()) || localStorage.getItem(this.configService.getCredentialsKey()));\n }\n return this._credentials;\n }\n\n /**\n * Sets the user credentials.\n * The credentials may be persisted across sessions by setting the `remember` parameter to true.\n * Otherwise, the credentials are only persisted for the current session.\n * @param credentials The user credentials.\n * @param remember True to remember credentials across sessions.\n */\n setCredentials(credentials?: Credentials, remember?: boolean) {\n this._credentials = credentials || null;\n\n if (credentials) {\n (remember ? localStorage : sessionStorage).setItem(this.configService.getCredentialsKey(), JSON.stringify(credentials));\n } else {\n sessionStorage.clear();\n localStorage.clear();\n this._credentials = null;\n }\n }\n\n getAccessToken(): string | null {\n const expiration = this.credentials?.token?.expires_in || '';\n const token = this.credentials?.token?.access_token || '';\n\n if (!token || !expiration) {\n return null;\n }\n\n if (Date.now() > parseInt(expiration)) {\n this.setCredentials();\n return null;\n }\n\n return token;\n }\n\n getExpiration(): string {\n return this.credentials?.token?.expires_in || '';\n }\n\n getRefreshToken(): string {\n return this.credentials?.token?.refresh_token || '';\n }\n\n refresh(): CredentialsService {\n this._credentials = null;\n return this;\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { CredentialsService } from './credentials.service';\n\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class TokenInterceptor implements HttpInterceptor {\n\n constructor(private credentials: CredentialsService) { }\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n request = request.clone({\n setHeaders: {\n Authorization: `Bearer ${this.credentials.getAccessToken() || ''}`\n }\n });\n return next.handle(request);\n }\n}\n","import { Injectable } from '@angular/core';\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\n\n/**\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HeaderInterceptor implements HttpInterceptor {\n\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\n request = request.clone({\n setHeaders: {\n 'Content-Type': request.headers.get('Content-Type') || 'application/json',\n }\n });\n return next.handle(request);\n }\n}\n","import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core';\nimport { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\n\nimport { Observable } from 'rxjs';\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\nimport { CacheInterceptor } from './cache.interceptor';\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\nimport { TokenInterceptor } from './token.interceptor';\nimport { HeaderInterceptor } from './header.interceptor';\n\n\n// Augment HttpClient with the added configuration methods from HttpService, to allow in-place replacement of\n// HttpClient with HttpService using dependency injection\nexport interface HttpCustomClient {\n\n /**\n * Enables caching for this request.\n * @param {boolean} forceUpdate Forces request to be made and updates cache entry.\n * @return {HttpCustomClient} The new instance.\n */\n cache(forceUpdate?: boolean): HttpCustomClient;\n\n /**\n * Skips default error handler for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipErrorHandler(): HttpCustomClient;\n\n /**\n * Skips default API Prefix for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipApiPrefix(): HttpCustomClient;\n\n\n /**\n * Skips default Token Interceptor for this request.\n * @return {HttpCustomClient} The new instance.\n */\n skipToken(): HttpCustomClient;\n\n /**\n* Skips default Header Interceptor for this request.\n* @return {HttpCustomClient} The new instance.\n*/\n skipHeader(): HttpCustomClient;\n\n}\n\n\n// From @angular/common/http/src/interceptor: allows to chain interceptors\nclass HttpInterceptorHandler implements HttpHandler {\n\n constructor(private next: HttpHandler, private interceptor: HttpInterceptor) { }\n\n handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {\n return this.interceptor.intercept(request, this.next);\n }\n\n}\n\n/**\n * Allows to override default dynamic interceptors that can be disabled with the HttpService extension.\n * Except for very specific needs, you should better configure these interceptors directly in the constructor below\n * for better readability.\n *\n * For static interceptors that should always be enabled (like ApiPrefixInterceptor), use the standard\n * HTTP_INTERCEPTORS token.\n */\nexport const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken<HttpInterceptor>('HTTP_DYNAMIC_INTERCEPTORS');\n\n/**\n * Extends HttpClient with per request configuration using dynamic interceptors.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class HttpService extends HttpClient implements HttpCustomClient {\n\n constructor(private httpHandler: HttpHandler,\n private injector: Injector,\n @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = []) {\n super(httpHandler);\n\n if (!this.interceptors) {\n // Configure default interceptors that can be disabled here\n this.interceptors = [this.injector.get(ApiPrefixInterceptor), this.injector.get(HeaderInterceptor), this.injector.get(TokenInterceptor), this.injector.get(ErrorHandlerInterceptor)];\n }\n }\n\n cache(forceUpdate?: boolean): HttpService {\n const cacheInterceptor = this.injector.get(CacheInterceptor).configure({ update: forceUpdate });\n return this.addInterceptor(cacheInterceptor);\n }\n\n skipErrorHandler(): HttpService {\n return this.removeInterceptor(ErrorHandlerInterceptor);\n }\n\n skipApiPrefix(): HttpService {\n return this.removeInterceptor(ApiPrefixInterceptor);\n }\n\n skipToken(): HttpService {\n return this.removeInterceptor(TokenInterceptor);\n }\n\n skipHeader(): HttpService {\n return this.removeInterceptor(HeaderInterceptor);\n }\n\n // Override the original method to wire interceptors when triggering the request.\n request(method?: any, url?: any, options?: any): any {\n const handler = this.interceptors.reduceRight(\n (next, interceptor) => new HttpInterceptorHandler(next, interceptor),\n this.httpHandler\n );\n return new HttpClient(handler).request(method, url, options);\n }\n\n private removeInterceptor(interceptorType: Function): HttpService {\n return new HttpService(\n this.httpHandler,\n this.injector,\n this.interceptors.filter(i => !(i instanceof interceptorType))\n );\n }\n\n private addInterceptor(interceptor: HttpInterceptor): HttpService {\n return new HttpService(\n this.httpHandler,\n this.injector,\n this.interceptors.concat([interceptor])\n );\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { HttpService } from '../core/http.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class EntityFileService {\n\n constructor(private http: HttpService) { }\n\n getEntityFiles(filters: any) {\n return this.http.get(`api/entity-files`, { params: filters }).toPromise();\n }\n\n createEntityFile(model: any) {\n return this.http.post(\"api/entity-files\", model).toPromise();\n }\n\n updateEntityFile(model: any) {\n return this.http.put(`api/entity-files/${model.id}`, model).toPromise();\n }\n\n deleteEntityFile(model: any) {\n return this.http.delete(`api/entity-files/${model.id}`).toPromise();\n }\n\n uploadEntityFile(file: File, params?: any) {\n const formData: FormData = new FormData();\n formData.append(\"fileData\", file, file.name);\n if (params?.entity_id) {\n formData.append('entity_id', params.entity_id);\n formData.append('entity_type', params.entity_type);\n }\n return this.http\n .skipHeader()\n .post(\n \"api/entity-files-upload\",\n formData,\n ).toPromise();\n }\n}\n","import { Injectable } from '@angular/core';\nimport { FormGroup } from '@angular/forms';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class FormValidatorService {\n\n constructor() { }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string, formGroup: FormGroup | any, firstAttempt?: boolean) {\n return (!formGroup.get(field).valid && formGroup.get(field).touched) ||\n (!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string, formGroup: FormGroup | any, errorMessages: any, errorField?: string) {\n const error = Object.keys(formGroup.get(field).errors);\n return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';\n }\n\n}\n","import { Component, OnInit, Inject } from \"@angular/core\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\nimport { EntityFileService } from '../entity-file.service';\nimport { FileDropperConfig } from '../../file-dropper/file-dropper.model';\nimport { ViewerConfig } from '../../document-viewer/viewer-config.model';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { AlertService } from \"../../core/alert.service\";\n\nconst errorMessages: any = {\n url: {\n required: \"File is required\"\n },\n};\n\n@Component({\n selector: 'entity-file-form',\n templateUrl: './entity-file-form.component.html',\n styleUrls: ['./entity-file-form.component.css']\n})\nexport class EntityFileFormComponent implements OnInit {\n\n entityFileGroup: FormGroup;\n assignmentFileFirstAttempt: boolean;\n updateMode: boolean;\n fileConfig: FileDropperConfig;\n fileList: any[] = [];\n viewerConfig: ViewerConfig;\n hideTitleAndDetails: boolean;\n\n constructor(\n public dialogRef: MatDialogRef<EntityFileFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private formValidatorService: FormValidatorService,\n private fb: FormBuilder,\n private entityFileService: EntityFileService,\n private alertService: AlertService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n //TODO: Finialize and add more validations.\n this.entityFileGroup = this.fb.group({\n id: [''],\n title: [''],\n details: [''],\n entity_type: [''],\n entity_id: [],\n file: ['', Validators.required],\n url: ['', Validators.required],\n file_size: ['', Validators.required],\n });\n }\n\n ngOnInit(): void {\n if (this.data.entity) {\n this.entityFileGroup.get('entity_type').setValue(this.data.entity.entity_type);\n this.entityFileGroup.get('entity_id').setValue(this.data.entity.entity_id);\n }\n if (this.data.file) {\n this.updateMode = true;\n this.entityFileGroup.patchValue(this.data.file);\n }\n\n if (this.data?.hideTitleAndDetails) {\n this.hideTitleAndDetails = this.data?.hideTitleAndDetails;\n }\n\n //File dropper config\n this.fileConfig = {\n fileId: \"subjectFile\",\n containerId: \"subjectFileContainer\",\n styles: {\n height: \"200px\"\n },\n multiple: false,\n acceptFile: \"*\",\n maxSize: 10,\n acceptFileText: \"All Files\"\n };\n\n this.viewerConfig = {\n viewerStyle: {\n height: '200px',\n width: '100%'\n }\n }\n }\n\n\n //Method to trigger submit\n async submit() {\n this.assignmentFileFirstAttempt = true;\n if (!this.entityFileGroup.valid) {\n return;\n }\n const model = this.entityFileGroup.value;\n\n if (this.hideTitleAndDetails) {\n model.title = model.file;\n }\n\n const result: any = this.updateMode\n ? await this.entityFileService.updateEntityFile(model)\n : await this.entityFileService.createEntityFile(model);\n this.dialogRef.close(result.item);\n this.alertService.addAlert(\n \"File submitted successfully\",\n \"success\"\n );\n\n }\n\n async fileChanged(event: any) {\n this.fileList = event;\n\n if (this.fileList.length > 0) {\n\n const result: any = await this.entityFileService.uploadEntityFile(\n this.fileList[0],\n );\n this.entityFileGroup.patchValue(result.item);;\n this.fileList = [];\n }\n }\n\n\n async removeFile() {\n if (this.entityFileGroup.value.file) {\n try {\n this.entityFileGroup.patchValue({\n file: \"\",\n url: \"\"\n });\n } catch (error) {\n this.alertService.addAlert(\"Unable to remove file, try later\", \"warn\");\n }\n }\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(\n field,\n this.entityFileGroup,\n this.assignmentFileFirstAttempt\n );\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(\n field,\n this.entityFileGroup,\n errorMessages\n );\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { MatDialog } from '@angular/material/dialog';\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\nimport { EntityFileService } from './entity-file.service';\nimport { ActionPopup } from '../action-popup/action-popup.model';\nimport { FormControl } from '@angular/forms';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { AlertService } from '../core/alert.service';\nimport { ActionPopupComponent } from '../action-popup/action-popup.component';\nimport { ViewerConfig } from '../document-viewer/viewer-config.model';\nimport { FileDropperConfig } from '../file-dropper';\n\n@UntilDestroy()\n@Component({\n selector: 'app-entity-files-view-all',\n templateUrl: './entity-files-view-all.component.html',\n styleUrls: ['./entity-files-view-all.component.css']\n})\nexport class EntityFilesViewAllComponent implements OnInit {\n @Input() entityId: number;\n @Input() entityType: string;\n @Input() viewOnly: boolean = false;\n @Input() removeSearch: boolean;\n @Input() hideTitleAndDetails: boolean;\n @Input() displayMode: boolean;\n viewerConfig: ViewerConfig;\n @Input() title: string = \"File\";\n filters: any = {};\n entityFiles: any[] = [];\n displayedColumns = [\n 'index',\n 'title',\n 'details',\n 'file_size',\n 'uploaded_on',\n ];\n isWorking: boolean = false;\n search: FormControl = new FormControl('');\n page: number = 1;\n perPage: number = 25;\n lastPage: number = 0;\n fileConfig: FileDropperConfig;\n fileList: any[] = [];\n\n constructor(\n private entityFileService: EntityFileService,\n public location: Location,\n private alertService: AlertService,\n private dialog: MatDialog,\n ) { }\n\n ngOnInit(): void {\n //File dropper config\n this.fileConfig = {\n fileId: \"entityDashboardDropper\",\n containerId: \"entityDashboardDropperContainer\",\n styles: {\n height: \"500px\"\n },\n multiple: false,\n acceptFile: \"*\",\n maxSize: 10,\n acceptFileText: \"All Files\"\n };\n\n this.viewerConfig = {\n imageStyle: {\n height: '200px',\n width: '200px'\n },\n viewerStyle: {\n height: ' 160px',\n width: '200px'\n },\n hideRemove: true\n };\n\n if (this.hideTitleAndDetails) {\n this.displayedColumns = this.displayedColumns.filter(x => (x !== 'details') && (x !== 'title'));\n }\n\n this.filters = {\n entity_type: this.entityType,\n entity_id: this.entityId,\n title: \"\"\n };\n this.search.valueChanges.pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this)).subscribe(value => {\n this.filters.title = value;\n this.reload();\n })\n this.fetchEntityFilesDetails();\n if (!this.viewOnly) {\n this.displayedColumns.push('actions');\n }\n }\n\n async fetchEntityFilesDetails() {\n this.filters.page = this.page;\n this.filters.perPage = this.perPage;\n this.isWorking = true;\n const result: any = await this.entityFileService.getEntityFiles(this.filters);\n this.lastPage = result.last_page || this.page;\n this.entityFiles = this.entityFiles.concat(result.data);\n this.isWorking = false;\n }\n\n addEntityFile() {\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\n width: \"700px\",\n data: {\n entity: this.filters,\n hideTitleAndDetails: this.hideTitleAndDetails\n },\n autoFocus: false,\n restoreFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n const files = [...this.entityFiles];\n files.push(result);\n this.entityFiles = files;\n }\n });\n }\n\n editEntityFile(file: any) {\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\n width: \"700px\",\n autoFocus: false,\n data: {\n file: file,\n hideTitleAndDetails: this.hideTitleAndDetails\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.reload();\n }\n });\n }\n\n deleteEntityFile(file: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: \"Delete File\",\n message: `Are you sure to proceed delete the file ${file.title}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n const result = await this.entityFileService.deleteEntityFile(\n file\n );\n this.alertService.addAlert(\n \"File successfully deleted\",\n \"success\"\n );\n this.reload();\n\n }\n });\n }\n\n onScroll() {\n if (this.page < this.lastPage && !this.isWorking) {\n this.page += 1;\n this.fetchEntityFilesDetails();\n }\n }\n\n reload() {\n this.entityFiles = [];\n this.page = 1;\n if (!this.isWorking) {\n this.fetchEntityFilesDetails();\n }\n }\n\n ngOnDestroy() { }\n\n resetFieldValue() {\n this.search.setValue(\"\");\n }\n\n sizeOf(bytes) {\n if (!bytes) { return \"0.00 B\"; }\n var e = Math.floor(Math.log(bytes) / Math.log(1024));\n return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';\n }\n\n async fileChanged(event: any) {\n this.fileList = event;\n\n if (this.fileList.length > 0) {\n\n const result: any = await this.entityFileService.uploadEntityFile(\n this.fileList[0],\n {\n entity_type: this.entityType,\n entity_id: this.entityId,\n }\n );\n this.fileList = [];\n this.alertService.addAlert('Successfull uploaded', 'success');\n this.reload();\n }\n }\n}\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\nimport { AlertService } from \"../core/alert.service\";\nimport { FileDropperConfig } from './file-dropper.model';\n\n\n@Component({\n selector: \"app-file-dropper\",\n templateUrl: \"./file-dropper.component.html\",\n styleUrls: [\"./file-dropper.component.scss\"]\n})\nexport class FileDropperComponent implements OnInit {\n @Input() fileArray: any[] = [];\n\n @Input() config: FileDropperConfig;\n\n @Output() fileChanged: any = new EventEmitter();\n\n border = \"1px dashed #989898\";\n\n @Input() styles: any;\n\n isSingleMode: boolean;\n\n constructor(private alertService: AlertService) { }\n\n /**Life cycle hook method */\n ngOnInit() {\n this.isSingleMode = !Boolean(this.config.multiple);\n }\n\n /**Method for dragging event */\n dragEnter(event: any) {\n event.target.style.background = this.config.dragColor || \"#c0c0c0\";\n\n event.target.style.border = \"1px dashed black\";\n\n event.preventDefault();\n }\n\n /**Method for drag over event */\n dragOver(event: any) {\n event.preventDefault();\n }\n\n /**Method for drag leave event */\n dragLeave(event: any) {\n event.target.style.background = \"\";\n event.target.style.border = this.border;\n\n event.preventDefault();\n }\n\n /**Method for drop event */\n dropEvent(event: any) {\n event.target.style.background = \"\";\n event.target.style.border = this.border;\n const droppedFiles: FileList = event.dataTransfer.files;\n if (droppedFiles.length > 0) {\n const fileArray = Array.from(droppedFiles);\n this.addFiles(fileArray);\n }\n event.preventDefault();\n }\n\n /**Method to list files selected */\n onFileChange(event: any) {\n if (event.target.files && event.target.files.length) {\n const fileArray = Array.from(event.target.files);\n this.addFiles(fileArray);\n const fileInput = document.getElementById(\n this.config.fileId\n ) as HTMLInputElement;\n fileInput.value = \"\";\n }\n }\n\n /**Method to add files in the array */\n addFiles(fileArray: any) {\n if (!this.isSingleMode) {\n fileArray.forEach((file: any) => {\n this.fileArray = this.fileArray.filter(\n (item: any) => item.name !== file.name\n );\n if (this.fileSizeAllowed(file)) {\n this.fileArray.push(file);\n }\n });\n\n this.fileArray.sort(this.sortFiles);\n this.fileChanged.emit(this.fileArray);\n } else {\n // Single Mode\n if (this.fileArray.length === 0) {\n if (this.fileSizeAllowed(fileArray[0])) {\n this.fileArray.push(fileArray[0]);\n this.fileArray.sort(this.sortFiles);\n this.fileChanged.emit(this.fileArray);\n }\n }\n }\n }\n\n /**Method to sort the files in asc */\n sortFiles(a: any, b: any) {\n const nameA = a.name.toUpperCase();\n const nameB = b.name.toUpperCase();\n if (nameA < nameB) {\n return -1;\n }\n if (nameA > nameB) {\n return 1;\n }\n\n return 0;\n }\n\n /**Method tp validate the file size */\n fileSizeAllowed(file: any): boolean {\n if (!Boolean(this.config.maxSize)) {\n return true;\n } else if (file.size / (1024 * 1024) < this.config.maxSize) {\n return true;\n } else {\n this.alertService.addAlert(\n `The size of the file exceeds the limit ${this.config.maxSize} MB, kindly upload a file with size ${this.config.maxSize} MB or below`,\n \"warn\"\n );\n return false;\n }\n }\n\n /**Method invokes when the drop box is clicked to upload the file */\n clickEvent(event: any) {\n if (!(this.isSingleMode && this.fileArray.length > 0)) {\n document.getElementById(this.config.fileId).click();\n }\n event.preventDefault();\n }\n}\n","export class FileDropperConfig {\n containerId: string;\n fileId: string;\n styles?: any;\n multiple?: boolean;\n dragColor?: boolean;\n acceptFile: string; // use '*' to accept all file types.\n maxSize?: number; // size in MB\n acceptFileText?: string;\n}\n","import { Injectable } from '@angular/core';\nimport { HttpService } from '../core/http.service';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NoteService {\n\n constructor(private http: HttpService) { }\n\n getNotes(filterModel: any) {\n return this.http.get('api/notes', { params: filterModel }).toPromise();\n }\n\n addNote(note: any) {\n return this.http.post('api/notes', note).toPromise();\n }\n\n editNote(note: any) {\n return this.http.put(`api/notes/${note.id}`, note).toPromise();\n }\n\n deleteNote(note: any) {\n return this.http.delete(`api/notes/${note.id}`).toPromise();\n }\n}\n","import { Component, OnInit, Inject } from \"@angular/core\";\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\nimport { NoteService } from \"../note.service\";\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { AlertService } from \"../../core/alert.service\";\n\nconst errorMessages: any = {\n note: {\n required: \"Note is required\"\n }\n};\n\n@Component({\n selector: 'app-note-form',\n templateUrl: './note-form.component.html',\n styleUrls: ['./note-form.component.css']\n})\nexport class NoteFormComponent implements OnInit {\n\n updateMode: boolean;\n noteFormGroup: FormGroup;\n noteFormFirstAttempt: boolean;\n\n constructor(\n public dialogRef: MatDialogRef<NoteFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n private noteService: NoteService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n //TODO: Finialize and add more validations.\n this.noteFormGroup = this.fb.group({\n id: [\"\"],\n note: [\"\", Validators.compose([Validators.required])],\n model_type: [\"\"],\n related_model_id: [\"\"],\n });\n }\n\n ngOnInit() {\n if (this.data.update) {\n this.updateMode = true;\n }\n this.noteFormGroup.patchValue(this.data.note);\n }\n\n //Method to trigger login\n async submit() {\n this.noteFormFirstAttempt = true;\n if (this.noteFormGroup.valid) {\n const model = this.noteFormGroup.value;\n const result = this.updateMode\n ? await this.noteService.editNote(model)\n : await this.noteService.addNote(model);\n\n this.alertService.addAlert(\n `${this.data?.labelText} saved successfully`,\n \"success\"\n );\n this.dialogRef.close(result);\n }\n }\n\n cancel() {\n this.dialogRef.close();\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(\n field,\n this.noteFormGroup,\n this.noteFormFirstAttempt\n );\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(\n field,\n this.noteFormGroup,\n errorMessages\n );\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\nimport { NoteService } from '../note.service';\nimport { MatDialog } from '@angular/material/dialog';\nimport { NoteFormComponent } from '../note-form/note-form.component';\nimport { ActionPopupComponent } from '../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../action-popup/action-popup.model';\n\n@Component({\n selector: 'app-note-list',\n templateUrl: './note-list.component.html',\n styleUrls: ['./note-list.component.css']\n})\nexport class NoteListComponent implements OnInit {\n\n @Input() relatedModelId !: any;\n @Input() modelType !: any;\n @Input() readonly: boolean = false;\n @Input() labelText: string = 'Note';\n @Input() commentsView: boolean = false;\n\n notes: any[] = [];\n filters: any;\n displayedColumns = [\n 'index',\n 'note',\n 'actions'\n ];\n\n page = 1;\n lastPage = 1;\n\n constructor(private noteService: NoteService,\n private dialog: MatDialog\n ) {\n this.filters = {};\n this.filters.sort_by = \"created_at|DESC\";\n }\n\n ngOnInit() {\n if (this.readonly) {\n this.displayedColumns = this.displayedColumns.filter(x => x !== 'actions');\n }\n this.filters.related_model_id = this.relatedModelId;\n this.filters.model_type = this.modelType;\n this.loadData();\n }\n\n async loadData() {\n\n const result: any = await this.noteService.getNotes({ ...this.filters, page: this.page });\n this.notes = this.notes.concat(result.data);\n this.page = result.current_page;\n this.lastPage = result.last_page;\n }\n\n addNote() {\n const dialogRef = this.dialog.open(NoteFormComponent, {\n width: \"400px\",\n data: {\n note: { related_model_id: this.relatedModelId, model_type: this.modelType },\n labelText: this.labelText,\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.resetScroll();\n this.loadData();\n }\n });\n }\n\n editNote(note: any) {\n const dialogRef = this.dialog.open(NoteFormComponent, {\n width: \"400px\",\n data: {\n note: note,\n update: true,\n labelText: this.labelText\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.resetScroll();\n this.loadData();\n }\n });\n }\n\n async deleteNote(note: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: `Delete ${this.labelText}`,\n message: `Are you sure to delete?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n\n const result = await this.noteService.deleteNote(note);\n this.notes = this.notes.filter((item: any) => item.id !== note.id);\n\n }\n });\n }\n\n resetScroll() {\n this.page = 1;\n this.lastPage = 1;\n this.notes = [];\n }\n\n onScroll() {\n if (this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n commentAction(event: any) {\n if (event.type === \"save\") {\n if (event.value.id) {\n this.editComment(event.value);\n return;\n }\n this.addComment(event.value);\n return;\n }\n this.deleteNote(event.value);\n }\n\n async editComment(comment: any) {\n const result: any = await this.noteService.editNote(comment);\n let index = this.notes.findIndex(\n (x: any) => x.id === comment.id\n );\n if (index !== -1) {\n this.notes[index] = result.item;\n }\n }\n\n async addComment(comment: any) {\n comment.related_model_id = this.relatedModelId;\n comment.model_type = this.modelType;\n const result: any = await this.noteService.addNote(comment);\n this.notes.push(result.item);\n }\n\n}\n","import {\n Component,\n OnInit,\n Input,\n Output,\n EventEmitter,\n OnDestroy\n} from \"@angular/core\";\nimport { FormGroup, FormBuilder } from \"@angular/forms\";\nimport { CredentialsService } from \"../../core/credentials.service\";\n\n@Component({\n selector: \"app-comment-form\",\n templateUrl: \"./comment-form.component.html\",\n styleUrls: [\"./comment-form.component.scss\"]\n})\nexport class CommentFormComponent implements OnInit, OnDestroy {\n commentFormGroup: FormGroup;\n view: boolean;\n _commentData: any;\n\n @Input() set commentData(data: any) {\n this.view = !!data;\n this._commentData = data;\n this.commentFormGroup.patchValue(data);\n }\n\n @Output() action = new EventEmitter();\n\n constructor(private fb: FormBuilder,\n private credentialService: CredentialsService\n ) {\n this.createForm();\n }\n\n ngOnInit() { }\n\n get isLoggedIn() {\n return this.credentialService.isAuthenticated;\n }\n\n get currentUser() {\n return this.credentialService.credentials.user;\n }\n\n private createForm() {\n //TODO: Finialize and add more validations.\n this.commentFormGroup = this.fb.group({\n id: [\"\"],\n note: [\"\"],\n model_type: [\"\"],\n related_model_id: [\"\"],\n });\n }\n\n submit() {\n if (this.commentFormGroup.get(\"note\").value) {\n if (this._commentData) {\n this.view = !this.view;\n }\n this.action.emit({ type: \"save\", value: this.commentFormGroup.value });\n this.commentFormGroup.reset();\n } else if (this.commentFormGroup.get(\"id\").value) {\n this.deleteComment();\n }\n }\n\n hideEdit() {\n if (this.commentFormGroup.get(\"id\").value) {\n this.view = !this.view;\n }\n }\n\n editComment() {\n this.view = !this.view;\n this.commentFormGroup.patchValue(this._commentData);\n }\n\n deleteComment() {\n this.action.emit({ type: \"delete\", value: this.commentFormGroup.value });\n }\n\n ngOnDestroy() { }\n}\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, Input, OnDestroy, OnInit, Optional, Self, Output, EventEmitter, TemplateRef } from '@angular/core';\nimport { FormBuilder, FormGroup, ControlValueAccessor, NgControl, Validators } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { Subject, of, from } from 'rxjs';\nimport { debounceTime, distinctUntilChanged, startWith, switchMap, finalize } from 'rxjs/operators';\nimport { MatDialog } from '@angular/material/dialog';\nimport { ComponentType } from '@angular/cdk/portal';\nimport { HttpService } from '../core/http.service';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\n\n@UntilDestroy()\n@Component({\n selector: 'app-searchable-selector',\n templateUrl: './searchable-selector.component.html',\n styleUrls: ['./searchable-selector.component.scss'],\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: SearchableSelectorComponent\n }\n ]\n})\nexport class SearchableSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\n\n @Input() valueField: string = 'id';\n @Input() titleField: string = 'title';\n @Input() apiUrl!: string;\n @Input() multiple: boolean = false;\n @Input() selectedValue: any;\n @Output() selectedValueChange = new EventEmitter();\n @Input() enableSearch: boolean = true;\n @Input() add: boolean = false;\n @Input() addConfig: any;\n @Input() edit: boolean = false;\n @Input() editConfig: any;\n @Input() sort: boolean = true;\n @Input() sortBy: string;\n @Input() searchField: string;\n @Input() itemComponent: ComponentType<unknown> | TemplateRef<unknown>;\n @Input() items: any[] = [];\n @Input() apiDataProperty: string = 'data';\n @Input() cache: boolean = false;\n @Input() perPage: number = 25;\n @Input() inDataSearch: boolean = false;\n @Output() selectionChange = new EventEmitter();\n @Output() itemsChange = new EventEmitter();\n\n\n isLoading: boolean = false;\n onChange: any = () => { };\n onTouched: any = () => { };\n static nextId = 0;\n selectorForm: FormGroup;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'searchable-selctor';\n id = `searchable-selctor-${SearchableSelectorComponent.nextId++}`;\n describedBy = '';\n filters: any;\n cachedItems: any[] = [];\n\n\n get empty() {\n const { value: { select_value } } = this.selectorForm;\n return !select_value;\n }\n\n get shouldLabelFloat() { return this.focused || !this.empty; }\n\n\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this.selectorForm.get('select_value').setValidators(Validators.required);\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n @Input()\n get value(): any {\n if (this.selectorForm.valid) {\n return this.selectorForm.value.select_value;\n }\n return '';\n }\n set value(data: any) {\n this.selectorForm.patchValue({ select_value: data || '' });\n this.stateChanges.next();\n }\n\n constructor(\n formBuilder: FormBuilder,\n private _focusMonitor: FocusMonitor,\n private http: HttpService,\n private _elementRef: ElementRef<HTMLElement>,\n private dialog: MatDialog,\n @Optional() @Self() public ngControl: NgControl) {\n\n this.selectorForm = formBuilder.group({\n select_value: [null],\n search: ''\n });\n\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n openedChange(event: any) {\n if (this.dataItems.length === 0 && this.selectorForm.get('search').value) {\n this.selectorForm.get('search').setValue('');\n }\n }\n\n get dataItems(): any[] {\n let items: any[] = [];\n if (this.multiple && this.selectedValue && (this.selectedValue.length > 0))\n items = [...this.selectedValue, ...this.items];\n else if ((!this.multiple) && this.selectedValue)\n items = [this.selectedValue, ...this.items];\n else\n items = this.items;\n items = items.filter((v, i, a) => a.findIndex(v => v[this.valueField] === a[i][this.valueField]) === i);\n //Emit the items to any child component\n this.itemsChange.emit(items);\n return items;\n }\n\n ngOnInit() {\n this.selectorForm.get('search').valueChanges\n .pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n if (this.enableSearch)\n this.search(value);\n });\n\n this.filters = {\n perPage: this.perPage,\n search: '',\n page: 1,\n lastPage: 1\n }\n if (this.sort) {\n this.filters.sort_by = this.sortBy || `${this.titleField}|asc`;\n }\n\n //Fetch Items only if it is not present, can be used in places where we load many entries.\n if (this.items.length === 0) {\n this.fetchItemList();\n }\n }\n\n fetchItemList() {\n this.isLoading = true;\n let request = this.http.get(this.apiUrl, { params: this.filters })\n if (this.cache) {\n request = this.http.cache().get(this.apiUrl, { params: this.filters })\n }\n of().pipe(\n startWith(true),\n switchMap((_) => from(request)),\n finalize(() => this.isLoading = false),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.items = this.items.concat(result[this.apiDataProperty]);\n if (this.cache) {\n this.cachedItems = this.items;\n }\n this.filters.page = result?.current_page || 1;\n this.filters.lastPage = result?.last_page || 1;\n });\n }\n\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n onContainerClick(event: MouseEvent) {\n event.stopPropagation();\n }\n\n writeValue(data: any): void {\n this.value = data;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n getPropertyValue(ele: any, keyString: string) {\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\n const keyList = keyString.split(\".\");\n for (let i = 0, n = keyList.length; i < n; ++i) {\n const key = keyList[i];\n if (ele && key in ele) {\n ele = ele[key];\n } else {\n return;\n }\n }\n return ele;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n if (this.multiple)\n this.selectedValue = (this.value as []).map(x => this.dataItems.find(y => y[this.valueField] === x));\n else\n this.selectedValue = this.dataItems.find(x => x[this.valueField] === this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(this.value);\n }\n\n get errorState(): boolean {\n return (this.ngControl && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty));\n }\n\n static ngAcceptInputType_disabled: boolean | string | null | undefined;\n static ngAcceptInputType_required: boolean | string | null | undefined;\n\n onScroll() {\n if (this.filters.lastPage > this.filters.page) {\n this.filters.page += 1;\n this.fetchItemList();\n }\n }\n\n reloadData() {\n this.items = [];\n this.filters.page = 1;\n this.filters.lastPage = 1;\n this.fetchItemList();\n }\n\n search(event: any) {\n if (this.searchField) {\n this.filters[this.searchField] = event;\n } else {\n this.filters.search = event;\n }\n // we need search field to search in data\n if (this.inDataSearch && this.searchField) {\n this.filterItems(event);\n } else {\n this.reloadData();\n }\n }\n\n filterItems(event: string) {\n if (event) {\n this.items = this.cachedItems.filter((value: any) => {\n return (value[this.searchField] as string).toLowerCase().search(event.toLowerCase()) != -1\n })\n } else {\n this.items = this.cachedItems;\n }\n }\n\n addItem(event: any) {\n const dialogRef = this.dialog.open(this.itemComponent, {\n width: '400px',\n autoFocus: false,\n data: {},\n ...this.addConfig\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.items.push(result.item);\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\n this._handleInput();\n }\n });\n event.stopPropagation();\n }\n\n editItem(event: any) {\n const dialogRef = this.dialog.open(this.itemComponent, {\n width: '400px',\n autoFocus: false,\n data: {\n item: this.selectedValue\n },\n ...this.editConfig\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.items = this.items.filter(x => x[this.valueField] !== this.selectedValue[this.valueField]);\n this.items.push(result.item);\n this.selectedValue = null;\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\n this._handleInput();\n }\n });\n event.stopPropagation();\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { AfterViewInit, Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\nimport { MatSelect, SELECT_ITEM_HEIGHT_EM } from '@angular/material/select';\nimport { debounceTime, takeUntil, tap } from 'rxjs/operators';\nimport { fromEvent, Subject } from 'rxjs';\n\n@Directive({\n selector: '[msInfiniteScroll]'\n})\nexport class MatSelectInfiniteScrollDirective implements OnInit, OnDestroy, AfterViewInit {\n\n @Input() threshold = '15%';\n @Input() debounceTime = 150;\n @Input() complete: boolean;\n @Output() infiniteScroll = new EventEmitter<void>();\n\n private panel: Element;\n private thrPx = 0;\n private thrPc = 0;\n private singleOptionHeight = SELECT_ITEM_HEIGHT_EM;\n\n private destroyed$ = new Subject<boolean>();\n\n constructor(private matSelect: MatSelect, private ngZone: NgZone) {\n }\n\n ngOnInit() {\n this.evaluateThreshold();\n }\n\n ngAfterViewInit() {\n this.matSelect.openedChange.pipe(\n takeUntil(this.destroyed$)\n ).subscribe((opened) => {\n if (opened) {\n this.panel = this.matSelect.panel.nativeElement;\n this.singleOptionHeight = this.getSelectItemHeightPx();\n this.registerScrollListener();\n }\n });\n }\n\n ngOnDestroy() {\n this.destroyed$.next(true);\n this.destroyed$.complete();\n }\n\n evaluateThreshold() {\n if (this.threshold.lastIndexOf('%') > -1) {\n this.thrPx = 0;\n this.thrPc = (parseFloat(this.threshold) / 100);\n\n } else {\n this.thrPx = parseFloat(this.threshold);\n this.thrPc = 0;\n }\n }\n\n registerScrollListener() {\n fromEvent(this.panel, 'scroll').pipe(\n takeUntil(this.destroyed$),\n debounceTime(this.debounceTime),\n tap((event) => {\n this.handleScrollEvent(event);\n })\n ).subscribe();\n }\n\n handleScrollEvent(event) {\n this.ngZone.runOutsideAngular(() => {\n if (this.complete) {\n return;\n }\n const countOfRenderedOptions = this.matSelect.options.length;\n const infiniteScrollDistance = this.singleOptionHeight * countOfRenderedOptions;\n const threshold = this.thrPc !== 0 ? (infiniteScrollDistance * this.thrPc) : this.thrPx;\n\n const scrolledDistance = this.panel.clientHeight + event.target.scrollTop;\n\n if ((scrolledDistance + threshold) >= infiniteScrollDistance) {\n this.ngZone.run(() => this.infiniteScroll.emit());\n }\n });\n }\n\n getSelectItemHeightPx(): number {\n return parseFloat(getComputedStyle(this.panel).fontSize) * SELECT_ITEM_HEIGHT_EM;\n }\n\n}","import { Component, Input, Output, EventEmitter } from \"@angular/core\";\r\n\r\n/**\r\n * Component to generate a num items selector\r\n * \r\n * @author Floyd Kissoon\r\n * @since 20170817\r\n */\r\n@Component({\r\n selector: \"num-items-selector\",\r\n templateUrl: \"./num-items-selector.html\"\r\n})\r\nexport class NumItemsSelector {\r\n @Input() numItems: number;\r\n @Output() numItemsChange: EventEmitter<number>;\r\n\r\n constructor() {\r\n this.numItemsChange = new EventEmitter<number>();\r\n }\r\n\r\n /**\r\n * Called when an item has been selected\r\n */\r\n numItemsChanged() {\r\n this.numItemsChange.emit(this.numItems);\r\n }\r\n\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\n\n/**\n * Service that provides utility functions for dates\n * \n * @author Joshua Kissoon\n * @since 20170726\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class DateUtils {\n\n /**\n * Takes in a date object and outputs the string value\n */\n getYYYYMMDDString(inputDate: Date): string {\n var year = inputDate.getFullYear();\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\n\n return year + \"-\" + month + \"-\" + date;\n }\n\n /**\n * Takes in a date object and outputs the year\n */\n getYYYY(inputDate: Date): number {\n var year = inputDate.getFullYear();\n return year;\n }\n\n /**\n * Takes in a date object and outputs the Month\n */\n getMM(inputDate: Date): number {\n var month = inputDate.getMonth() + 1;\n return month;\n }\n // var n = this.rfidCardUseManualEntry.manual_date.toLocaleTimeString();\n\n getDateTime(inputDate: Date): string {\n var year = inputDate.getFullYear();\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\n var time = inputDate.toLocaleTimeString();\n\n return year + \"-\" + month + \"-\" + date + \" \" + time;\n }\n\n}","import { Component, Input, Output, EventEmitter, OnInit } from \"@angular/core\";\n\n/**\n * Component to generate a number selector\n * \n * @author Floyd Kissoon\n * @since 20180628\n */\n@Component({\n selector: \"number-selector\",\n templateUrl: \"./number-selector.html\"\n})\nexport class NumberSelector implements OnInit {\n @Input() start_value: number;\n @Input() end_value: number\n @Output() selectedValueChange: EventEmitter<number>;\n @Input() selectedValue: number;\n\n items = new Array();\n\n constructor() {\n this.selectedValueChange = new EventEmitter<number>();\n }\n\n /**\n * Called when an item has been selected\n */\n numChanged() {\n this.selectedValueChange.emit(this.selectedValue);\n }\n\n\n ngOnInit() {\n for (var i = this.start_value; i < this.end_value + 1; i++) {\n this.items.push(i);\n }\n }\n}\n","export class Timeline {\n public static CUSTOM: number = 1;\n public static TODAY: number = 2;\n public static YESTERDAY: number = 3;\n public static THIS_WEEK: number = 4;\n public static LAST_WEEK: number = 5;\n public static THIS_MONTH: number = 6;\n public static LAST_MONTH: number = 7;\n public static THIS_QUARTER: number = 8;\n public static LAST_QUARTER: number = 9;\n public static THIS_YEAR: number = 10;\n public static LAST_YEAR: number = 11;\n public static ALL: number = 12;\n public static TOMMOROW: number = 13;\n public static NEXT_WEEK: number = 14;\n public static NEXT_MONTH: number = 15;\n}\n","import * as moment_ from 'moment';\nconst moment = moment_;\nimport { Timeline } from \"./timeline.model\";\n\n\nexport interface TimelineValue {\n date_from: Date,\n date_to: Date,\n show_custom_field: boolean\n}\nexport function calculateTimeline(value: any) {\n const date = new Date();\n const data: any = {\n 'date_from': date,\n 'date_to': date,\n 'show_custom_field': false\n };\n switch (value) {\n case Timeline.CUSTOM: { //Custom\n data.show_custom_field = true;\n break;\n }\n case Timeline.TODAY: { // Today\n let now = moment();\n data.date_from = now.startOf('day').toISOString();\n data.date_to = now.endOf('day').toISOString();\n break;\n }\n case Timeline.YESTERDAY: { // Yesterday\n let now = moment().subtract(1, 'day');\n data.date_from = now.startOf('day').toISOString();\n data.date_to = now.endOf('day').toISOString();\n break;\n }\n case Timeline.THIS_WEEK: { // This Week\n let now = moment();\n data.date_from = now.startOf('isoWeek').toISOString();\n data.date_to = now.endOf('isoWeek').toISOString();\n break;\n }\n case Timeline.LAST_WEEK: { // Last Week\n let now = moment().subtract(1, 'week');\n data.date_from = now.startOf('isoWeek').toISOString();\n data.date_to = now.endOf('isoWeek').toISOString();\n break;\n }\n case Timeline.THIS_MONTH: { //This Month\n let now = moment();\n data.date_from = now.startOf('month').toISOString();\n data.date_to = now.endOf('month').toISOString();\n break;\n }\n case Timeline.LAST_MONTH: { // Last Month\n let now = moment().subtract(1, 'month');\n data.date_from = now.startOf('month').toISOString();\n data.date_to = now.endOf('month').toISOString();\n break;\n }\n case Timeline.THIS_QUARTER: { // This Quarter\n let now = moment();\n data.date_from = now.startOf('quarter').toISOString();\n data.date_to = now.endOf('quarter').toISOString();\n break;\n }\n case Timeline.LAST_QUARTER: { // Last Quarter\n let now = moment().subtract(1, 'quarter');\n data.date_from = now.startOf('quarter').toISOString();\n data.date_to = now.endOf('quarter').toISOString();\n break;\n }\n case Timeline.THIS_YEAR: { // This Year\n let now = moment();\n data.date_from = now.startOf('year').toISOString();\n data.date_to = now.endOf('year').toISOString();\n break;\n }\n case Timeline.LAST_YEAR: { // Last Year\n let now = moment().subtract(1, 'year');\n data.date_from = now.startOf('year').toISOString();\n data.date_to = now.endOf('year').toISOString();\n break;\n }\n case Timeline.TOMMOROW: {\n let now = moment().add(1, 'day');\n data.date_from = now.startOf('day').toISOString();\n data.date_to = now.endOf('day').toISOString();\n break;\n }\n case Timeline.NEXT_WEEK: {\n let now = moment().add(1, 'week');\n data.date_from = now.startOf('isoWeek').toISOString();\n data.date_to = now.endOf('isoWeek').toISOString();\n break;\n }\n case Timeline.NEXT_MONTH: {\n let now = moment().add(1, 'month');\n data.date_from = now.startOf('month').toISOString();\n data.date_to = now.endOf('month').toISOString();\n break;\n }\n default: { // All\n data.date_from = '';\n data.date_to = '';\n break;\n }\n\n }\n return data;\n}\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { DatePipe } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Optional, Output, Self, ViewChild } from '@angular/core';\nimport { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl, Validators } from '@angular/forms';\nimport { MatFormFieldControl } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\nimport { TimelineValue, calculateTimeline } from './calculate-timeline';\nimport { Subject } from 'rxjs';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { Timeline } from './timeline.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-timeline-filter',\n templateUrl: './timeline-filter.component.html',\n styleUrls: ['./timeline-filter.component.scss'],\n providers: [\n {\n provide: MatFormFieldControl,\n useExisting: TimelineFilterComponent\n }\n ]\n})\nexport class TimelineFilterComponent implements OnInit, ControlValueAccessor {\n\n @ViewChild('picker') picker;\n @Input() timelineValue: FormControl = new FormControl('');\n @Input() timelines: any[] = [\n { value: Timeline.CUSTOM, viewValue: 'Custom' },\n { value: Timeline.TODAY, viewValue: 'Today' },\n { value: Timeline.YESTERDAY, viewValue: 'Yesterday' },\n { value: Timeline.TOMMOROW, viewValue: 'Tomorrow' },\n { value: Timeline.THIS_WEEK, viewValue: 'This Week' },\n { value: Timeline.LAST_WEEK, viewValue: 'Last Week' },\n { value: Timeline.NEXT_WEEK, viewValue: 'Next Week' },\n { value: Timeline.THIS_MONTH, viewValue: 'This Month' },\n { value: Timeline.LAST_MONTH, viewValue: 'Last Month' },\n { value: Timeline.NEXT_MONTH, viewValue: 'Next Month' },\n { value: Timeline.THIS_QUARTER, viewValue: 'This Quarter' },\n { value: Timeline.LAST_QUARTER, viewValue: 'Last Quarter' },\n { value: Timeline.THIS_YEAR, viewValue: 'This Year' },\n { value: Timeline.LAST_YEAR, viewValue: 'Last Year' },\n { value: Timeline.ALL, viewValue: 'All dates' },\n ];\n @Input() dateFrom: string = 'date_from';\n @Input() dateTo: string = 'date_to';\n @Input() appearance: any = \"legacy\"\n @Input() showClearbutton: boolean = false;\n /**\n * @deprecated The form input is deprated\n */\n @Input() form: FormGroup = null;\n @Input() labelText: string = 'Select Timeline';\n @Input() selectedValue: any;\n @Input() touchUi: boolean = true;\n @Output() selectedValueChange = new EventEmitter();\n @Output() selectionChange = new EventEmitter();\n\n selectorForm: FormGroup;\n onChange: any = () => { };\n onTouched: any = () => { };\n static nextId = 0;\n stateChanges = new Subject<void>();\n controlType = 'timeline-filter';\n id = `timeline-filter-${TimelineFilterComponent.nextId++}`;\n describedBy = '';\n\n selectedRange: TimelineValue;\n @Input() set defaultValue(value: any) {\n this.timelineValue.setValue(value);\n this.changeTimeline(value);\n }\n\n showCustomDateFields: boolean = false;\n\n constructor(\n formBuilder: FormBuilder,\n @Optional() @Self() public ngControl: NgControl,\n private datePipe: DatePipe\n ) {\n this.selectorForm = formBuilder.group({\n select_value: [null],\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n @Input()\n get required(): boolean { return this._required; }\n set required(value: boolean) {\n this.selectorForm.get('select_value').setValidators(Validators.required);\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean { return this._disabled; }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n @Input()\n get value(): any {\n if (this.selectorForm.valid) {\n return this.selectorForm.value.select_value;\n }\n return '';\n }\n set value(data: any) {\n this.selectorForm.patchValue({ select_value: data || '' });\n this._handleInput();\n this.stateChanges.next();\n }\n\n getDateRangeString() {\n let str = \"\";\n if (this.selectedRange?.show_custom_field) {\n if (this.selectedRange?.date_from.toUTCString() != 'Invalid Date') {\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_from?.toUTCString())\n }\n if (this.selectedRange?.date_to.toUTCString() != 'Invalid Date') {\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_to?.toUTCString())\n }\n }\n return str;\n }\n\n resetFieldValue(field: string) {\n this.form.get(field).setValue('');\n }\n\n\n getFieldValue(field: string) {\n return this.form.get(field).value;\n }\n\n setFieldValue(field: string, value: any) {\n this.form.get(field).setValue(value);\n }\n\n changeTimeline(value: any) {\n const timeline = calculateTimeline(value);\n if (timeline) {\n this.setFieldValue(this.dateFrom, timeline.date_from)\n this.setFieldValue(this.dateTo, timeline.date_to)\n this.showCustomDateFields = timeline.show_custom_field;\n }\n }\n\n _handleInput(): void {\n if (this.value == 1) {\n this.picker.open();\n return;\n }\n const range: TimelineValue = calculateTimeline(this.value);\n this.selectedRange = range;\n this.onChange(this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(range);\n }\n\n dateRangeChange(dateRangeStart: HTMLInputElement, dateRangeEnd: HTMLInputElement) {\n const range: TimelineValue = {\n date_from : new Date(dateRangeStart.value),\n date_to: new Date(dateRangeEnd.value),\n show_custom_field: true\n }\n this.selectedRange = range;\n this.onChange(this.value);\n this.selectedValueChange.emit(this.selectedValue);\n this.selectionChange.emit(range);\n }\n\n onCustomDateChange(event: any) {\n }\n\n setDescribedByIds(ids: string[]) {\n this.describedBy = ids.join(' ');\n }\n\n onContainerClick(event: MouseEvent) {\n event.stopPropagation();\n }\n\n writeValue(data: any): void {\n this.value = data;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n ngOnInit(): void {\n console.log(this.form);\n\n this.timelineValue.valueChanges.\n pipe(\n debounceTime(100),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => this.changeTimeline(value));\n }\n\n ngOnDestroy() {\n this.stateChanges.complete();\n }\n\n}\n","import { Component, OnInit, Input } from '@angular/core';\n\n@Component({\n selector: 'app-loader',\n templateUrl: './loader.component.html',\n styleUrls: ['./loader.component.scss']\n})\nexport class LoaderComponent implements OnInit {\n\n @Input() isLoading = false;\n @Input() size = 0.6;\n @Input() message: string | undefined;\n\n constructor() { }\n\n ngOnInit() { }\n\n}\n","import { NgModule } from '@angular/core';\nimport { SuccessSnackComponent, ErrorSnackComponent } from './snack.component';\nimport { CommonModule } from '@angular/common';\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n declarations: [\n SuccessSnackComponent,\n ErrorSnackComponent\n ],\n imports: [\n CommonModule,\n MatSnackBarModule,\n MatIconModule\n ],\n exports: [\n SuccessSnackComponent,\n ErrorSnackComponent,\n ]\n})\nexport class SnackModule { }\n","import { Injectable } from '@angular/core';\nimport { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\nimport { CredentialsService } from './credentials.service';\nimport { Logger } from './logger.service';\n\nconst log = new Logger('AuthenticationGuard');\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationGuard implements CanActivate {\n\n constructor(private router: Router,\n private credentialsService: CredentialsService) { }\n\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.isUserAuthenticated(route, state);\n }\n\n canLoad(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n return this.isUserAuthenticated(route, state);\n }\n\n isUserAuthenticated(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\n if (this.credentialsService.isAuthenticated) {\n return true;\n }\n\n log.debug('Not authenticated, redirecting and adding redirect url...');\n this.router.navigate(['/login'], { queryParams: { redirect: state.url }, replaceUrl: true });\n return false;\n }\n\n}\n","\nimport { Injectable } from '@angular/core';\nimport { Observable, of } from 'rxjs';\nimport { concatMap, map } from 'rxjs/operators';\nimport { Credentials, CredentialsService } from './credentials.service';\nimport { HttpService } from './http.service';\n\n/**\n * Provides a base for authentication workflow.\n * The login/logout methods should be replaced with proper implementation.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class AuthenticationService {\n\n constructor(private credentialsService: CredentialsService, private http: HttpService) { }\n\n /**\n * Authenticates the user.\n * @param context The login parameters.\n * @return The user credentials.\n */\n login(context: any): Observable<Credentials> {\n const data = <Credentials>{};\n return this.http\n .skipToken()\n .post('oauth/token', context)\n .pipe(\n concatMap(async (tokenInfo: any) => {\n tokenInfo.expires_in = Date.now() + (tokenInfo.expires_in * 1000);\n data.token = tokenInfo;\n data.user = {};\n this.credentialsService.setCredentials(data, context.remember);\n const userInfo: any = await this.http.get('api/user/current').toPromise();\n data.user = userInfo?.user;\n this.credentialsService.setCredentials(data, context.remember);\n return data;\n })\n )\n }\n\n /**\n * Logs out the user and clear credentials.\n * @return True if the user was logged out successfully.\n */\n logout(): Observable<boolean> {\n\n this.credentialsService.setCredentials();\n return of(true);\n }\n\n}\n","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\nimport { Injectable } from '@angular/core';\n\n/**\n * A route strategy allowing for explicit route reuse.\n * Used as a workaround for https://github.com/angular/angular/issues/18374\n * To reuse a given route, add `data: { reuse: true }` to the route definition.\n */\n@Injectable({\n providedIn: 'root'\n})\nexport class RouteReusableStrategy extends RouteReuseStrategy {\n\n public shouldDetach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n public store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle | null): void { }\n\n public shouldAttach(route: ActivatedRouteSnapshot): boolean {\n return false;\n }\n\n public retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\n return null;\n }\n\n public shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\n // Reuse the route if the RouteConfig is the same, or if both routes use the\n // same component, because the latter can have different RouteConfigs.\n return future.routeConfig === curr.routeConfig ||\n Boolean(future.routeConfig?.component &&\n future.routeConfig?.component === curr.routeConfig?.component);\n }\n\n}\n","import { Injectable } from \"@angular/core\";\r\nimport { Subject, Observable } from 'rxjs';\r\n\r\n/**\r\n * Service used to manage Local Storage\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20190623\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class StorageService {\r\n private storageSub = new Subject<any>();\r\n\r\n constructor() {\r\n\r\n }\r\n\r\n watch(): Observable<any> {\r\n return this.storageSub.asObservable();\r\n }\r\n\r\n setItem(key: string, data: any) {\r\n localStorage.setItem(key, data);\r\n this.storageSub.next({ key: key, value: data });\r\n }\r\n\r\n getItem(key: string) {\r\n return localStorage.getItem(key);\r\n }\r\n\r\n removeItem(key: string) {\r\n const data = this.getItem(key);\r\n localStorage.removeItem(key);\r\n this.storageSub.next({ key: key, value: data });\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from './http.service';\r\n\r\n/**\r\n * Service that provides a wrapper for retrieving data from the server\r\n * @deprecated use HttpService Instead\r\n * @author Joshua Kissoon\r\n * @since 20170709\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DataManager {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n /**\r\n * Callback wrapper for the HTTP GET Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n * @updated 20170711 to add parameters\r\n */\r\n GET(urlq: string, params = {}): any {\r\n return this.http\r\n .get(urlq, { params: params })\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP POST Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the POST data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n POST(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .post(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP POST Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the POST data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n POSTRAW(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .skipHeader()\r\n .post(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n\r\n /**\r\n * Callback wrapper for the HTTP PUT Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the PUT data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n PUT(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .put(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP PATCH Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * @param object The object containing the PUT data to be sent\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20161107\r\n */\r\n PATCH(urlq: string, object: any): any {\r\n if (null == object) {\r\n object = { \"blank\": \"blank\" };\r\n }\r\n\r\n return this.http\r\n .patch(urlq, object)\r\n .toPromise();\r\n }\r\n\r\n /**\r\n * Callback wrapper for the HTTP DELETE Call\r\n * \r\n * @param urlq The query part of the URL to be sent to the server\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20160826\r\n */\r\n DELETE(urlq: string): any {\r\n return this.http\r\n .delete(urlq)\r\n .toPromise();\r\n }\r\n\r\n}","import { MatTooltipModule } from '@angular/material/tooltip';\n/*\n * This module imports and re-exports all Angular Material modules for convenience,\n * so only 1 module import is needed in your feature modules.\n * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.\n *\n * To optimize your production builds, you should only import the components used in your app.\n */\n\nimport { NgModule } from \"@angular/core\";\nimport {\n MatCommonModule,\n MatLineModule,\n MatNativeDateModule,\n MatOptionModule,\n MatPseudoCheckboxModule,\n MatRippleModule\n} from \"@angular/material/core\";\nimport { MatButtonModule } from \"@angular/material/button\";\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\nimport { MatDialogModule } from \"@angular/material/dialog\";\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\nimport { MatIconModule } from \"@angular/material/icon\";\nimport { MatInputModule } from \"@angular/material/input\";\nimport { MatMenuModule } from \"@angular/material/menu\";\nimport { MatProgressSpinnerModule } from \"@angular/material/progress-spinner\";\nimport { MatSelectModule } from \"@angular/material/select\";\nimport { MatSortModule } from \"@angular/material/sort\";\nimport { MatTableModule } from \"@angular/material/table\";\nimport { MatCardModule } from \"@angular/material/card\";\nimport { MatDividerModule } from \"@angular/material/divider\";\nimport { MatChipsModule } from \"@angular/material/chips\";\nimport { MatDatepickerModule } from '@angular/material/datepicker';\nimport { MatListModule } from '@angular/material/list'\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\n\n\n@NgModule({\n exports: [\n MatButtonModule,\n MatCheckboxModule,\n MatCommonModule,\n MatDialogModule,\n MatFormFieldModule,\n MatIconModule,\n MatInputModule,\n MatLineModule,\n MatMenuModule,\n MatNativeDateModule,\n MatOptionModule,\n MatProgressSpinnerModule,\n MatPseudoCheckboxModule,\n MatRippleModule,\n MatSelectModule,\n MatSortModule,\n MatTableModule,\n MatCardModule,\n MatDividerModule,\n MatChipsModule,\n MatDatepickerModule,\n MatListModule,\n MatTooltipModule,\n MatButtonToggleModule\n ]\n})\nexport class MaterialModule { }\n","import { NgModule, Optional, SkipSelf } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';\nimport { RouteReuseStrategy, RouterModule } from '@angular/router';\n\nimport { RouteReusableStrategy } from './route-reusable-strategy';\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\nimport { HttpService } from './http.service';\nimport { TokenInterceptor } from './token.interceptor';\nimport { CacheInterceptor } from './cache.interceptor';\nimport { SnackModule } from './snack/snack.module';\n\n@NgModule({\n imports: [\n CommonModule,\n HttpClientModule,\n RouterModule,\n SnackModule\n ],\n providers: [\n {\n provide: HttpClient,\n useClass: HttpService\n },\n {\n provide: RouteReuseStrategy,\n useClass: RouteReusableStrategy\n }\n ],\n exports: [\n SnackModule\n ]\n})\nexport class CoreModule {\n\n constructor(@Optional() @SkipSelf() parentModule: CoreModule) {\n // Import guard\n if (parentModule) {\n throw new Error(`${parentModule} has already been loaded. Import Core module in the root module only.`);\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupComponent } from './action-popup.component';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n FlexLayoutModule,\n CommonModule,\n MaterialModule\n ],\n declarations: [\n ActionPopupComponent\n ],\n exports: [\n ActionPopupComponent\n ],\n entryComponents: [\n ActionPopupComponent\n ]\n})\nexport class ActionPopupModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { DataTableComponent } from './data-table.component';\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n imports: [\n FlexLayoutModule,\n CommonModule,\n InfiniteScrollModule,\n MaterialModule\n ],\n declarations: [\n DataTableComponent\n ],\n exports: [\n DataTableComponent\n ]\n})\nexport class DataTableModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { DocumentViewerComponent } from './document-viewer.component';\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FlexLayoutModule,\n NgxDocViewerModule,\n MaterialModule\n ],\n declarations: [\n DocumentViewerComponent\n ],\n exports: [\n DocumentViewerComponent\n ]\n})\nexport class DocumentViewerModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FileDropperComponent } from './file-dropper.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n FlexLayoutModule,\n MaterialModule\n ],\n declarations: [\n FileDropperComponent\n ],\n exports: [FileDropperComponent]\n})\nexport class FileDropperModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\nimport { EntityFilesViewAllComponent } from './entity-files-view-all.component';\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FileDropperModule } from '../file-dropper/file-dropper.module';\nimport { DocumentViewerModule } from '../document-viewer/document-viewer.module';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n declarations: [EntityFileFormComponent, EntityFilesViewAllComponent],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n FileDropperModule,\n DocumentViewerModule,\n InfiniteScrollModule,\n ActionPopupModule,\n MaterialModule\n ],\n exports: [\n EntityFilesViewAllComponent\n ],\n entryComponents: [EntityFileFormComponent]\n})\nexport class EntityFilesViewAllModule { }\n","import { Component, OnInit, Input } from \"@angular/core\";\n\n@Component({\n selector: \"app-read-more\",\n templateUrl: \"./read-more.component.html\",\n styleUrls: [\"./read-more.component.scss\"]\n})\nexport class ReadMoreComponent implements OnInit {\n @Input() text: string;\n @Input() maxLength: number = 100;\n currentText: string;\n hideToggle: boolean = true;\n\n isCollapsed: boolean = true;\n\n constructor() {}\n\n ngOnInit() {\n this.determineView();\n }\n\n toggleView() {\n this.isCollapsed = !this.isCollapsed;\n this.determineView();\n }\n\n determineView() {\n if (!this.text || this.text.length <= this.maxLength) {\n this.currentText = this.text;\n this.isCollapsed = false;\n this.hideToggle = true;\n return;\n }\n this.hideToggle = false;\n if (this.isCollapsed == true) {\n this.currentText = this.text.substring(0, this.maxLength) + \"...\";\n } else if (this.isCollapsed == false) {\n this.currentText = this.text;\n }\n }\n}\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ReadMoreComponent } from './read-more.component';\n\n@NgModule({\n declarations: [ReadMoreComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule\n ],\n exports: [\n ReadMoreComponent\n ]\n})\nexport class ReadMoreModule { }","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NoteListComponent } from './note-list/note-list.component';\nimport { NoteFormComponent } from './note-form/note-form.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\nimport { MaterialModule } from '../material.module';\nimport { CommentFormComponent } from './comment-form/comment-form.component';\nimport { ReadMoreModule } from '../read-more/read-more.module';\n\n@NgModule({\n declarations: [\n NoteListComponent,\n NoteFormComponent,\n CommentFormComponent,\n ],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n ActionPopupModule,\n MaterialModule,\n ReadMoreModule\n ],\n exports: [\n NoteListComponent\n ],\n entryComponents: [NoteFormComponent]\n})\nexport class NoteModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { SearchableSelectorComponent } from './searchable-selector.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatSelectInfiniteScrollDirective } from './mat-select-infinite-scroll.directive';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n MaterialModule\n ],\n declarations: [\n SearchableSelectorComponent,\n MatSelectInfiniteScrollDirective\n ],\n exports: [\n SearchableSelectorComponent,\n MatSelectInfiniteScrollDirective\n ]\n})\nexport class SearchableSelectorModule { }\n","import { BrowserAnimationsModule } from '@angular/platform-browser/animations';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FormsModule } from '@angular/forms';\r\n\r\n/* Selectors */\r\nimport { NumItemsSelector } from './num-items-selector.component';\r\nimport { NumberSelector } from './number-selector.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ],\r\n declarations: [\r\n NumItemsSelector, NumberSelector,\r\n ],\r\n exports: [NumItemsSelector, NumberSelector]\r\n})\r\nexport class UtilityModule { }\r\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TimelineFilterRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { TimelineFilterRoutingModule } from './timeline-filter-routing.module';\nimport { TimelineFilterComponent } from './timeline-filter.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n\n@NgModule({\n declarations: [TimelineFilterComponent],\n imports: [\n CommonModule,\n TimelineFilterRoutingModule,\n FlexLayoutModule,\n MaterialModule,\n ReactiveFormsModule\n ],\n exports: [TimelineFilterComponent]\n})\nexport class TimelineFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { LoaderComponent } from './loader.component';\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\n\n@NgModule({\n declarations: [\n LoaderComponent\n ],\n imports: [\n CommonModule,\n MatProgressSpinnerModule\n ],\n exports: [\n LoaderComponent\n ]\n})\nexport class LoaderModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionRoutingModule } from './email-subscription-routing.module';\n\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionRoutingModule\n ]\n})\nexport class EmailSubscriptionModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserRoutingModule } from './email-subscription-user-routing.module';\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionUserRoutingModule\n ]\n})\nexport class EmailSubscriptionUserModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserFormRoutingModule { }\n","\nimport { Component, Inject, OnInit, TemplateRef } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { finalize } from 'rxjs/operators';\nimport { AlertService } from '../../../core/alert.service';\nimport { FormValidatorService } from '../../../core/form-validator.service';\nimport { HttpService } from '../../../core/http.service';\nimport { Logger } from '../../../core/logger.service';\n\nconst log = new Logger('EmailSubscriptionUser Form');\n\nconst errorMessages: any = {\n user_id: {\n required: \"User is required\"\n },\n email_type_id: {\n required: \"Email Type is required\"\n },\n};\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-form',\n templateUrl: './email-subscription-user-form.component.html',\n styleUrls: ['./email-subscription-user-form.component.scss']\n})\nexport class EmailSubscriptionUserFormComponent implements OnInit {\n\n updateMode: boolean;\n esUserFormGroup: FormGroup;\n esUserFormFirstAttempt: boolean;\n esUser: any;\n isSubmitLoading: boolean;\n selectedUser: any;\n selectedType: any;\n\n constructor(private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n public dialogRef: MatDialogRef<EmailSubscriptionUserFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.esUserFormGroup = this.fb.group({\n id: [''],\n user_id: ['', Validators.required],\n email_type_id: ['', Validators.required],\n });\n }\n\n\n ngOnInit() {\n if (this.data?.esUser?.id) {\n this.esUser = this.data.esUser;\n this.updateMode = true;\n this.selectedType = this.esUser?.email_type;\n this.selectedUser = this.esUser?.user;\n this.esUserFormGroup.patchValue(this.esUser);\n }\n\n }\n\n //Method to trigger login\n submit() {\n this.esUserFormGroup.markAllAsTouched();\n this.esUserFormFirstAttempt = true;\n if (this.esUserFormGroup.valid) {\n this.isSubmitLoading = true;\n const model = this.esUserFormGroup.value;\n (\n this.updateMode ?\n this.http.put(`api/email-subscription-users/${model?.id}`, model) :\n this.http.post(`api/email-subscription-users`, model)\n )\n .pipe(\n finalize(() => this.isSubmitLoading = false),\n untilDestroyed(this)\n ).subscribe(result => {\n this.alertService.addAlert(\"Subscription saved successfully\", \"success\");\n this.dialogRef.close(result);\n });\n }\n }\n\n\n cancel() {\n this.dialogRef.close();\n }\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.esUserFormGroup, this.esUserFormFirstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.esUserFormGroup, errorMessages);\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserFormRoutingModule } from './email-subscription-user-form-routing.module';\nimport { EmailSubscriptionUserFormComponent } from './email-subscription-user-form.component';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { LoaderModule } from '../../../loader/loader.module';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserFormComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionUserFormRoutingModule,\n LoaderModule\n ],\n entryComponents: [EmailSubscriptionUserFormComponent]\n})\nexport class EmailSubscriptionUserFormModule { }\n","import { Component, OnInit, ViewChild } from '@angular/core';\n\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { EmailSubscriptionUserFormComponent } from '../email-subscription-user-form/email-subscription-user-form.component';\nimport { Router } from '@angular/router';\nimport { Logger } from '../../../core/logger.service';\nimport { PageEvent } from '../../../data-table/data-table.model';\nimport { HttpService } from '../../../core/http.service';\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\n\nconst log = new Logger('EmailSubscriptionUser list');\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-list',\n templateUrl: './email-subscription-user-list.component.html',\n styleUrls: ['./email-subscription-user-list.component.scss']\n})\nexport class EmailSubscriptionUserListComponent implements OnInit {\n\n esUserList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n };\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n displayColumns: FormControl = new FormControl(['index', 'user.name', 'email_type.title', 'creator.name', 'created_at', 'actions']);\n displayedColumns: any[] = [];\n availableDisplayColumns: any[] = [\n { order: 1, value: 'index', name: 'Index' },\n { order: 2, value: 'user.name', name: 'User' },\n { order: 3, value: 'email_type.title', name: 'Email Type' },\n { order: 4, value: 'creator.name', name: 'Creator' },\n { order: 5, value: 'actions', name: 'Actions' }\n ];\n\n constructor(\n private dialog: MatDialog,\n private http: HttpService,\n private router: Router,\n ) { }\n\n ngOnInit() {\n this.displayedColumns = this.displayColumns.value;\n this.initializeData();\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n }\n\n get selectedColumns(): string[] {\n return this.availableDisplayColumns\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\n .map(col => col.value);\n }\n\n columnsChange() {\n this.displayedColumns = this.selectedColumns;\n }\n\n\n initializeData() {\n this.http.get(`api/email-subscription-users`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.esUserList = this.esUserList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n filterChange(event: any) {\n this.filters = {\n ...this.filters,\n ...event\n };\n this.reload();\n }\n\n addEmailSubscriptionUser() {\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\n width: '800px',\n autoFocus: false,\n data: {} // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n log.debug(result);\n this.reload();\n }\n });\n }\n\n\n editEmailSubscriptionUser(event: any, esUser: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\n width: '800px',\n autoFocus: false,\n data: {\n esUser: esUser\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n log.debug(result);\n this.reload();\n }\n });\n }\n\n deleteEmailSubscriptionUser(event: any, esUser: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: '400px',\n data: <ActionPopup>{\n title: 'Delete Subscription',\n message: `Are you sure to proceed delete the esUser ${esUser.name}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n //Action confirmed\n this.http.delete(`api/email-subscription-users/${esUser?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.esUserList = this.esUserList.filter(x => x.id !== esUser.id);\n });\n }\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n reload() {\n this.esUserList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\n\nexport const esulr = {\n title: 'Email Subscription Users',\n permissions: {\n only: ['app_admin'],\n redirectTo: '/'\n }\n};\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionUserListComponent,\n canActivate: [AuthenticationGuard],\n data: esulr\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserListRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionUserListFilterRoutingModule { }\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-user-list-filter',\n templateUrl: './email-subscription-user-list-filter.component.html',\n styleUrls: ['./email-subscription-user-list-filter.component.scss']\n})\nexport class EmailSubscriptionUserListFilterComponent implements OnInit {\n\n esUserFilterForm: FormGroup;\n\n @Output() valueChange = new EventEmitter();\n\n constructor(private fb: FormBuilder) {\n this.createForm();\n }\n\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.esUserFilterForm = this.fb.group({\n user_id: [''],\n email_type_id: [''],\n });\n }\n\n ngOnInit(): void {\n\n this.esUserFilterForm.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n this.valueChange.emit(value);\n })\n }\n\n\n resetFieldValue(field: string) {\n this.esUserFilterForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.esUserFilterForm.get(field).value;\n }\n\n\n ngOnDestroy() {\n\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserListFilterRoutingModule } from './email-subscription-user-list-filter-routing.module';\nimport { EmailSubscriptionUserListFilterComponent } from './email-subscription-user-list-filter.component';\nimport { MaterialModule } from '../../../material.module';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserListFilterComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionUserListFilterRoutingModule\n ],\n exports: [EmailSubscriptionUserListFilterComponent]\n})\nexport class EmailSubscriptionUserListFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionUserListRoutingModule } from './email-subscription-user-list-routing.module';\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\nimport { EmailSubscriptionUserListFilterModule } from '../email-subscription-user-list-filter/email-subscription-user-list-filter.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { EmailSubscriptionUserFormModule } from '../email-subscription-user-form/email-subscription-user-form.module';\nimport { MaterialModule } from '../../../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionUserListComponent],\n imports: [\n CommonModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n EmailSubscriptionUserListRoutingModule,\n EmailSubscriptionUserFormModule,\n EmailSubscriptionUserListFilterModule\n ],\n exports: [EmailSubscriptionUserListComponent]\n})\nexport class EmailSubscriptionUserListModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\n\nexport class EmailSubscriptionTypeRoutingModule { }","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeRoutingModule } from './email-subscription-type-routing.module';\n\n\n@NgModule({\n declarations: [],\n imports: [\n CommonModule,\n EmailSubscriptionTypeRoutingModule\n ]\n})\nexport class EmailSubscriptionTypeModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionTypeFormRoutingModule { }\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { finalize } from 'rxjs/operators';\nimport { AlertService } from '../../../core/alert.service';\nimport { FormValidatorService } from '../../../core/form-validator.service';\nimport { HttpService } from '../../../core/http.service';\n\nconst errorMessages: any = {\n title: {\n required: \"Title is required\"\n },\n code: {\n required: \"Code is required\"\n },\n frequency_id: {\n required: \"Frequency is required\"\n },\n};\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-type-form',\n templateUrl: './email-subscription-type-form.component.html',\n styleUrls: ['./email-subscription-type-form.component.scss']\n})\nexport class EmailSubscriptionTypeFormComponent implements OnInit {\n\n updateMode: boolean;\n emailSubscriptionTypeFormGroup: FormGroup;\n emailSubscriptionTypeFormFirstAttempt: boolean;\n emailSubscriptionType: any;\n selectedFrequency: any;\n isLoading: boolean;\n isSubmitLoading: boolean;\n\n constructor(private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n public dialogRef: MatDialogRef<EmailSubscriptionTypeFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) {\n this.createForm();\n }\n\n /** Method to create a form **/\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.emailSubscriptionTypeFormGroup = this.fb.group({\n id: [''],\n title: ['', Validators.compose([Validators.required])],\n code: ['', Validators.compose([Validators.required])],\n frequency_id: ['', Validators.required],\n description: [''],\n });\n }\n\n ngOnInit() {\n if (this.data.emailSubscriptionType?.id) {\n this.isLoading = true;\n this.emailSubscriptionType = this.data?.emailSubscriptionType;\n this.updateMode = true;\n this.selectedFrequency = this.emailSubscriptionType?.frequency || {};\n this.emailSubscriptionTypeFormGroup.patchValue(this.emailSubscriptionType);\n }\n }\n\n //Method to trigger login\n submit() {\n this.emailSubscriptionTypeFormGroup.markAllAsTouched();\n this.emailSubscriptionTypeFormFirstAttempt = true;\n if (this.emailSubscriptionTypeFormGroup.valid) {\n this.isSubmitLoading = true;\n const model = this.emailSubscriptionTypeFormGroup.value;\n (\n this.updateMode ?\n this.http.put(`api/email-subscription-types/${model?.id}`, model) :\n this.http.post(`api/email-subscription-types`, model)\n )\n .pipe(\n finalize(() => this.isSubmitLoading = false),\n untilDestroyed(this)\n ).subscribe(result => {\n this.alertService.addAlert(\"Email Type saved successfully\", \"success\");\n this.dialogRef.close(result);\n });\n }\n }\n\n\n cancel() {\n this.dialogRef.close();\n }\n\n\n /**Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.emailSubscriptionTypeFormGroup, this.emailSubscriptionTypeFormFirstAttempt);\n }\n\n /**Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.emailSubscriptionTypeFormGroup, errorMessages);\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeFormRoutingModule } from './email-subscription-type-form-routing.module';\nimport { EmailSubscriptionTypeFormComponent } from './email-subscription-type-form.component';\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { LoaderModule } from '../../../loader/loader.module';\n\n\n\n@NgModule({\n declarations: [EmailSubscriptionTypeFormComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n EmailSubscriptionTypeFormRoutingModule,\n LoaderModule\n ],\n exports: [EmailSubscriptionTypeFormComponent],\n entryComponents: [EmailSubscriptionTypeFormComponent]\n})\nexport class EmailSubscriptionTypeFormModule { }\n","import { Component, OnInit, ViewChild } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { FormControl } from '@angular/forms';\nimport { distinctUntilChanged, debounceTime } from 'rxjs/operators';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { EmailSubscriptionTypeFormComponent } from '../email-subscription-type-form/email-subscription-type-form.component';\nimport { PageEvent } from '../../../data-table/data-table.model';\nimport { HttpService } from '../../../core/http.service';\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-type-list',\n templateUrl: './email-subscription-type-list.component.html',\n styleUrls: ['./email-subscription-type-list.component.scss']\n})\nexport class EmailSubscriptionTypeListComponent implements OnInit {\n\n emailSubscriptionTypeList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n isLoadRelations: true,\n relations: ['frequency']\n };\n search: FormControl = new FormControl('');\n\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n displayColumns: FormControl = new FormControl(['index', 'title', 'frequency.title', 'description', 'actions']);\n displayedColumns: any[] = [];\n availableDisplayColumns: any[] = [\n { order: 1, value: 'index', name: 'Index' },\n { order: 2, value: 'title', name: 'Title' },\n { order: 3, value: 'code', name: 'Code' },\n { order: 4, value: 'frequency.title', name: 'Frequency' },\n { order: 5, value: 'description', name: 'Description' },\n { order: 6, value: 'actions', name: 'Actions' }\n ];\n\n constructor(\n private dialog: MatDialog,\n private http: HttpService,\n ) { }\n\n ngOnInit() {\n this.displayedColumns = this.displayColumns.value;\n this.initializeData();\n this.search.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe(value => {\n this.filters.search = value;\n this.reload();\n });\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n }\n\n get selectedColumns(): string[] {\n return this.availableDisplayColumns\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\n .map(col => col.value);\n }\n\n columnsChange() {\n this.displayedColumns = this.selectedColumns;\n }\n\n\n initializeData() {\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n addEmailSubscriptionType() {\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\n width: '400px',\n autoFocus: false,\n data: {} // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.reload();\n }\n });\n }\n\n\n editEmailSubscriptionType(event: any, emailSubscriptionType: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\n width: '400px',\n autoFocus: false,\n data: {\n emailSubscriptionType: emailSubscriptionType\n } // Any data passed here will be injected into the model\n });\n\n dialogRef.afterClosed().subscribe((result: any) => {\n if (result) {\n this.reload();\n }\n });\n }\n\n deleteEmailSubscriptionType(event: any, emailSubscriptionType: any) {\n event.stopPropagation();\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: '400px',\n data: <ActionPopup>{\n title: 'Delete Email Type',\n message: `Are you sure to proceed delete the Email Type ${emailSubscriptionType.title}?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n //Action confirmed\n this.http.delete(`api/email-subscription-types/${emailSubscriptionType?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.filter(x => x.id !== emailSubscriptionType.id);\n });\n }\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n reload() {\n this.emailSubscriptionTypeList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\n\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\n\nexport const estlr = {\n title: 'Email Subscription Type',\n permissions: {\n only: ['client_admin'],\n redirectTo: '/'\n }\n};\n\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionTypeListComponent,\n canActivate: [AuthenticationGuard],\n data: estlr\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionTypeListRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionTypeListRoutingModule } from './email-subscription-type-list-routing.module';\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\nimport { EmailSubscriptionTypeFormModule } from '../email-subscription-type-form/email-subscription-type-form.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../../material.module';\nimport { ReactiveFormsModule } from '@angular/forms';\n\n\n@NgModule({\n declarations: [EmailSubscriptionTypeListComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n EmailSubscriptionTypeFormModule,\n EmailSubscriptionTypeListRoutingModule\n ],\n exports: [EmailSubscriptionTypeListComponent]\n})\nexport class EmailSubscriptionTypeListModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { HttpService } from '../../core/http.service';\nimport { PageEvent } from '../../data-table/data-table.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-email-subscription-for-user',\n templateUrl: './email-subscription-for-user.component.html',\n styleUrls: ['./email-subscription-for-user.component.scss']\n})\nexport class EmailSubscriptionForUserComponent implements OnInit {\n\n subscriptions: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n isLoadRelations: true,\n relations: 'frequency,currentUserSubscription'\n };\n\n constructor(\n private http: HttpService\n ) { }\n\n ngOnInit(): void {\n this.fetchSubscriptions();\n }\n\n fetchSubscriptions() {\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.subscriptions = this.subscriptions.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.fetchSubscriptions();\n }\n }\n\n subscribe(sub: any) {\n this.http.post(`api/email-subscription-for-user`, { email_type_id: sub?.id })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n sub.current_user_subscription = result?.item;\n });\n }\n\n unsubscribe(sub: any) {\n this.http.delete(`api/email-subscription-users/${sub?.current_user_subscription?.id}`)\n .pipe(untilDestroyed(this))\n .subscribe((_: any) => {\n sub.current_user_subscription = null;\n });\n }\n\n\n reload() {\n this.subscriptions = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.fetchSubscriptions();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../../core/authentication.guard';\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\n\nexport const esfur = {\n permissions: {\n only: ['client_admin']\n }\n};\n\nconst routes: Routes = [\n {\n path: '',\n component: EmailSubscriptionForUserComponent,\n canActivate: [AuthenticationGuard],\n data: esfur\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class EmailSubscriptionForUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { EmailSubscriptionForUserRoutingModule } from './email-subscription-for-user-routing.module';\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [EmailSubscriptionForUserComponent],\n imports: [\n CommonModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n EmailSubscriptionForUserRoutingModule\n ],\n exports: [EmailSubscriptionForUserComponent]\n})\nexport class EmailSubscriptionForUserModule { }\n","import { HttpService } from '../core/http.service';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TechlifyUpdateService {\n\n constructor(private http: HttpService) { }\n\n getTechlifyUpdates(filters: any) {\n return this.http.get(`api/techlify-updates`, { params: filters }).toPromise();\n }\n\n createTechlifyUpdate(techlifyUpdate: any) {\n return this.http.post(`api/techlify-updates`, techlifyUpdate).toPromise();\n }\n\n updateTechlifyUpdate(techlifyUpdate: any) {\n return this.http.put(`api/techlify-updates/${techlifyUpdate.id}`, techlifyUpdate).toPromise();\n }\n\n deleteTechlifyUpdate(techlifyUpdateId: any) {\n return this.http.delete(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\n }\n\n getTechlifyUpdate(techlifyUpdateId: any) {\n return this.http.get(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\n }\n\n getNewUpdateForCurrentUser() {\n return this.http.get(`api/current-user-techlify-updates`).toPromise();\n }\n\n createUpdateViewRecord(techlifyUpdateView: any) {\n return this.http.post(`api/techlify-update-views`, techlifyUpdateView).toPromise();\n }\n\n updateCurrentUserUpdates() {\n return this.http.get(`api/techlify-updates/update-view`).toPromise();\n }\n}\n","import { AlertService } from \"../../core/alert.service\";\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, Validators } from '@angular/forms';\nimport { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { Editor, Toolbar } from 'ngx-editor';\n\nconst errorMessages: any = {\n title: {\n required: \"Title is required\",\n },\n released_on: {\n required: \"Released On is required\",\n },\n version: {\n required: \"Version is required\",\n },\n description: {\n required: \"Description is required\",\n },\n learn_more_link: {\n pattern: \"Please enter valid link\",\n }\n}\n\n@Component({\n selector: 'app-techlify-update-form',\n templateUrl: './techlify-update-form.component.html',\n styleUrls: ['./techlify-update-form.component.scss']\n})\nexport class TechlifyUpdateFormComponent implements OnInit {\n\n @Output() onSave = new EventEmitter<any>();\n techlifyUpdateForm: FormGroup;\n isUpdateMode: boolean = false;\n editor: Editor;\n toolbar: Toolbar = [\n ['bold', 'italic'],\n ['bullet_list'],\n ];\n\n constructor(\n public dialogRef: MatDialogRef<TechlifyUpdateFormComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private alertService: AlertService,\n private techlifyUpdateService: TechlifyUpdateService\n ) {\n this.createForm();\n }\n\n private createForm() {\n this.techlifyUpdateForm = this.fb.group({\n id: new FormControl(''),\n title: new FormControl('', Validators.required),\n description: new FormControl('', Validators.required),\n version: new FormControl('', Validators.required),\n released_on: new FormControl('', Validators.required),\n learn_more_link: new FormControl('', Validators.compose([Validators.pattern('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?')])),\n });\n if (this.data.techlifyUpdateDetails) {\n this.isUpdateMode = true;\n this.techlifyUpdateForm.patchValue(this.data.techlifyUpdateDetails);\n }\n }\n\n ngOnInit() {\n this.editor = new Editor();\n }\n\n async submit() {\n if (this.techlifyUpdateForm.valid) {\n let result;\n const model = this.techlifyUpdateForm.value;\n\n try {\n result = this.isUpdateMode ? await this.techlifyUpdateService.updateTechlifyUpdate(model)\n : await this.techlifyUpdateService.createTechlifyUpdate(model);\n this.alertService.addAlert(\n \"Techlify app update saved successfully\",\n \"success\"\n );\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n } finally {\n if (result) {\n this.dialogRef.close(result);\n }\n }\n }\n }\n\n resetFieldValue(field: string) {\n this.techlifyUpdateForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.techlifyUpdateForm.get(field).value;\n }\n\n /** Method to evaluate form fields*/\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.techlifyUpdateForm, true);\n }\n /** Method to find error in form fields*/\n getErrorMessage(field: string) {\n return this.formValidatorService.getErrorMessage(field, this.techlifyUpdateForm, errorMessages);\n }\n\n}\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from './../../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdateFormComponent } from './techlify-update-form.component';\nimport { NgxEditorModule } from 'ngx-editor';\n\n@NgModule({\n declarations: [TechlifyUpdateFormComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n MaterialModule,\n FlexLayoutModule,\n NgxEditorModule,\n ],\n exports: [\n TechlifyUpdateFormComponent\n ],\n entryComponents: [\n TechlifyUpdateFormComponent\n ]\n})\nexport class TechlifyUpdateFormModule { }\n","import { UntilDestroy } from '@ngneat/until-destroy';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { ActionPopup } from './../../action-popup/action-popup.model';\nimport { ActionPopupComponent } from './../../action-popup/action-popup.component';\nimport { TechlifyUpdateFormComponent } from './../techlify-update-form/techlify-update-form.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, FormBuilder } from '@angular/forms';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AlertService } from '../../core/alert.service';\nimport { Component, OnInit } from '@angular/core';\nimport { debounceTime } from 'rxjs/operators';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-updates-list',\n templateUrl: './techlify-updates-list.component.html',\n styleUrls: ['./techlify-updates-list.component.scss']\n})\nexport class TechlifyUpdatesListComponent implements OnInit {\n techlifyUpdates: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'title',\n 'version',\n 'released_on',\n 'learn_more_link',\n 'description',\n 'creator',\n 'actions'\n ];\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n isWorking: boolean = false;\n filterFormGroup: FormGroup;\n\n constructor(\n private dialog: MatDialog,\n private alertService: AlertService,\n private techlifyUpdateService: TechlifyUpdateService,\n private fb: FormBuilder,\n ) {\n this.filterFormGroup = this.fb.group({\n search: new FormControl(''),\n version: new FormControl(''),\n sort_by: new FormControl('released_on|DESC'),\n });\n }\n\n ngOnInit() {\n this.loadData();\n this.listenChanges();\n }\n\n listenChanges() {\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\n .subscribe(changes => {\n this.reload();\n });\n }\n\n ngOnDestroy() { }\n\n async loadData() {\n try {\n this.isWorking = true;\n var filters: any = this.filterFormGroup.value;\n filters.perPage = this.perPage;\n filters.page = this.page;\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\n filters\n );\n this.lastPage = result.last_page || this.page;\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n finally {\n this.isWorking = false;\n }\n }\n\n reload() {\n this.techlifyUpdates = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n modifyTechlifyUpdate(model?: any) {\n const dialogRef = this.dialog.open(TechlifyUpdateFormComponent, {\n width: \"600px\",\n data: {\n techlifyUpdateDetails: model,\n }\n });\n\n dialogRef.afterClosed().subscribe(result => {\n if (result) {\n this.reload();\n }\n });\n }\n\n async deleteTechlifyUpdate(model: any) {\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: \"Delete Update\",\n message: `Are you sure to delete this update?`\n },\n autoFocus: false\n });\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n //Action confirmed\n try {\n await this.techlifyUpdateService.deleteTechlifyUpdate(model.id);\n this.alertService.addAlert(\n \"Successfully deleted the update\",\n \"success\"\n );\n this.reload();\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n });\n }\n\n resetFieldValue(field: string) {\n this.filterFormGroup.get(field).setValue(\"\");\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase();\n this.assignFilter(event.active, direction);\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'title': {\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\n }\n case 'released_on': {\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\n }\n case 'version': {\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\n }\n default: {\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\n }\n };\n }\n\n}\n","import { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'all', pathMatch: 'full' },\n { path: 'all', component: TechlifyUpdatesListComponent },\n\n //fallback\n {\n path: '**',\n redirectTo: 'all',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TechlifyUpdateRoutingModule { }\n","import { ReadMoreModule } from '../read-more/read-more.module';\nimport { TechlifyUpdateFormModule } from './techlify-update-form/techlify-update-form.module';\nimport { TechlifyUpdateRoutingModule } from './techlify-update-routing.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\n\n@NgModule({\n declarations: [TechlifyUpdatesListComponent],\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n MaterialModule,\n ActionPopupModule,\n TechlifyUpdateRoutingModule,\n TechlifyUpdateFormModule,\n ReadMoreModule,\n ]\n})\nexport class TechlifyUpdateModule { }\n","import { Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Component, OnInit } from '@angular/core';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-update-view',\n templateUrl: './update-view.component.html',\n styleUrls: ['./update-view.component.scss']\n})\nexport class UpdateViewComponent implements OnInit {\n techlifyUpdate: any;\n rootNavUrl: any;\n\n constructor(\n public dialogRef: MatDialogRef<UpdateViewComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private router: Router\n ) { }\n\n ngOnInit(): void {\n this.techlifyUpdate = this.data.techlifyUpdate;\n this.rootNavUrl = this.data.rootNavUrl;\n }\n\n close() {\n this.dialogRef.close();\n }\n\n openUpdateHistory(): void {\n this.close();\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\n }\n\n}\n","import { UntilDestroy } from '@ngneat/until-destroy';\nimport { untilDestroyed } from '@ngneat/until-destroy';\nimport { AlertService } from './../../core/alert.service';\nimport { UpdateViewComponent } from './../update-view/update-view.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { FormControl, FormBuilder } from '@angular/forms';\nimport { FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Component, OnInit } from '@angular/core';\nimport { debounceTime } from 'rxjs/operators';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-update-history',\n templateUrl: './techlify-update-history.component.html',\n styleUrls: ['./techlify-update-history.component.scss']\n})\nexport class TechlifyUpdateHistoryComponent implements OnInit {\n techlifyUpdates: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'title',\n 'version',\n 'released_on',\n 'learn_more_link',\n 'description',\n 'creator',\n 'actions'\n ];\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n isWorking: boolean = false;\n filterFormGroup: FormGroup;\n\n constructor(\n private dialog: MatDialog,\n private techlifyUpdateService: TechlifyUpdateService,\n private fb: FormBuilder,\n private alertService: AlertService\n ) {\n this.filterFormGroup = this.fb.group({\n search: new FormControl(''),\n version: new FormControl(''),\n sort_by: new FormControl('released_on|DESC'),\n });\n }\n\n ngOnInit() {\n this.loadData();\n this.listenChanges();\n this.updateCurrentUserUpdates();\n }\n\n listenChanges() {\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\n .subscribe(changes => {\n this.reload();\n });\n }\n\n ngOnDestroy() { }\n\n async loadData() {\n try {\n this.isWorking = true;\n var filters: any = this.filterFormGroup.value;\n filters.perPage = this.perPage;\n filters.page = this.page;\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\n filters\n );\n this.lastPage = result.last_page || this.page;\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n finally {\n this.isWorking = false;\n }\n }\n\n reload() {\n this.techlifyUpdates = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n resetFieldValue(field: string) {\n this.filterFormGroup.get(field).setValue(\"\");\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase();\n this.assignFilter(event.active, direction);\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'title': {\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\n }\n case 'released_on': {\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\n }\n case 'version': {\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\n }\n default: {\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\n }\n };\n }\n\n openUpdateView(techlifyUpdate: any): void {\n const dialogRef = this.dialog.open(UpdateViewComponent, {\n width: \"800px\",\n autoFocus: false,\n data: {\n techlifyUpdate: techlifyUpdate,\n isFromHistory: true,\n } // Any data passed here will be injected into the model\n });\n }\n\n async updateCurrentUserUpdates() {\n try {\n await this.techlifyUpdateService.updateCurrentUserUpdates();\n } catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n}\n","import { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\nimport { NgModule } from '@angular/core';\nimport { RouterModule, Routes } from '@angular/router';\n\nconst routes: Routes = [\n { path: '', redirectTo: 'update-history', pathMatch: 'full' },\n { path: 'update-history', component: TechlifyUpdateHistoryComponent },\n\n //fallback\n {\n path: '**',\n redirectTo: 'all',\n pathMatch: 'full'\n }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class TechlifyUpdateHistoryRoutingModule { }\n","import { ReactiveFormsModule } from '@angular/forms';\nimport { TechlifyUpdateHistoryRoutingModule } from './techlify-update-history-routing.module';\nimport { ReadMoreModule } from '../../read-more/read-more.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MaterialModule } from '../../material.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ActionPopupModule } from '../../action-popup/action-popup.module';\n\n@NgModule({\n imports: [\n CommonModule,\n ReactiveFormsModule,\n InfiniteScrollModule,\n FlexLayoutModule,\n MaterialModule,\n ActionPopupModule,\n ReadMoreModule,\n TechlifyUpdateHistoryRoutingModule\n ],\n declarations: [TechlifyUpdateHistoryComponent]\n})\nexport class TechlifyUpdateHistoryModule { }\n","import { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from './../../material.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdateViewComponent } from './update-view.component';\n\n\n\n@NgModule({\n declarations: [UpdateViewComponent],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule\n ],\n exports: [\n UpdateViewComponent\n ],\n entryComponents: [\n UpdateViewComponent\n ]\n})\nexport class UpdateViewModule { }\n","import { AlertService } from './../../../core/alert.service';\nimport { TechlifyUpdateService } from './../../techlify-update.service';\nimport { MatDialog } from '@angular/material/dialog';\nimport { Component, EmbeddedViewRef, Inject, OnInit } from '@angular/core';\nimport { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\nimport { UpdateViewComponent } from '../../update-view/update-view.component';\nimport { Router } from '@angular/router';\n\n@Component({\n selector: 'app-update-notifier-snack',\n templateUrl: './update-notifier-snack.component.html',\n styleUrls: ['./update-notifier-snack.component.scss']\n})\nexport class UpdateNotifierSnackComponent implements OnInit {\n maxDescriptionLength: any = 70;\n descriptionText: any = '';\n techlifyUpdate: any;\n rootNavUrl: any;\n\n constructor(\n @Inject(MAT_SNACK_BAR_DATA) public data: any,\n private snackBarRef: MatSnackBarRef<EmbeddedViewRef<any>>,\n private dialog: MatDialog,\n private router: Router,\n private techlifyUpdateService: TechlifyUpdateService,\n private alertService: AlertService\n ) { }\n\n ngOnInit(): void {\n this.techlifyUpdate = this.data.techlifyUpdate;\n this.rootNavUrl = this.data.rootNavUrl;\n this.determineDescription(this.techlifyUpdate?.description)\n }\n\n close(): void {\n this.createUpdateViewRecord();\n this.snackBarRef.dismiss();\n }\n\n determineDescription(description: any) {\n if (!description || description.length <= this.maxDescriptionLength) {\n this.descriptionText = description;\n return;\n }\n this.descriptionText = description.substring(0, this.maxDescriptionLength) + \"...\";\n }\n\n openUpdateView(): void {\n this.close();\n const dialogRef = this.dialog.open(UpdateViewComponent, {\n width: \"800px\",\n autoFocus: false,\n data: {\n techlifyUpdate: this.techlifyUpdate,\n rootNavUrl: this.data.rootNavUrl\n } // Any data passed here will be injected into the model\n });\n }\n\n openUpdateHistory(): void {\n this.close();\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\n }\n\n async createUpdateViewRecord() {\n try {\n var techlifyUpdateView = {\n update_id: this.techlifyUpdate?.id\n };\n let result: any = await this.techlifyUpdateService.createUpdateViewRecord(techlifyUpdateView);\n }\n catch (error) {\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\n }\n }\n}\n","import { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\nimport { TechlifyUpdateService } from './../techlify-update.service';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\nimport { AlertService } from '../../core/alert.service';\n\n@Component({\n selector: 'app-update-notifier',\n templateUrl: './update-notifier.component.html',\n styleUrls: ['./update-notifier.component.scss']\n})\nexport class UpdateNotifierComponent implements OnInit {\n techlifyUpdate: any;\n @Input() rootNavUrl: string = '/techlify-updates';\n\n constructor(\n private snackBar: MatSnackBar,\n private techlifyUpdateService: TechlifyUpdateService,\n private alertService: AlertService\n ) { }\n\n ngOnInit(): void {\n }\n\n ngAfterViewInit(): void {\n setTimeout(x => {\n this.getNewUpdate();\n }, 5000);\n }\n\n async getNewUpdate() {\n try {\n let result: any = await this.techlifyUpdateService.getNewUpdateForCurrentUser();\n this.techlifyUpdate = result.item;\n if (this.techlifyUpdate) {\n this.showUpdate();\n }\n }\n catch (error) {\n console.log(\"Current user updates failed\");\n }\n }\n\n showUpdate() {\n this.snackBar.openFromComponent(UpdateNotifierSnackComponent, {\n data: {\n techlifyUpdate: this.techlifyUpdate,\n rootNavUrl: this.rootNavUrl\n },\n horizontalPosition: 'right',\n verticalPosition: 'top',\n panelClass: ['white-bg']\n });\n }\n\n}\n","import { ActionPopupModule } from './../../action-popup/action-popup.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from './../../material.module';\nimport { UpdateViewModule } from './../update-view/update-view.module';\nimport { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { UpdateNotifierComponent } from './update-notifier.component';\nimport { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\n\n\n@NgModule({\n declarations: [UpdateNotifierComponent, UpdateNotifierSnackComponent],\n imports: [\n CommonModule,\n MaterialModule,\n UpdateViewModule,\n FlexLayoutModule,\n ActionPopupModule\n ],\n exports: [\n UpdateNotifierComponent,\n ],\n entryComponents: [\n UpdateNotifierSnackComponent\n ]\n})\nexport class UpdateNotifierModule { }\n","import { Component, OnInit, Input } from '@angular/core';\nimport * as XLSX from 'xlsx';\n\n@Component({\n selector: 'app-export-excel-button',\n templateUrl: './export-excel-button.component.html',\n styleUrls: ['./export-excel-button.component.scss']\n})\nexport class ExportExcelButtonComponent implements OnInit {\n\n @Input() name: string = 'Export_Data';\n @Input() data: any[] = [];\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n exportExcel() {\n const fileName = `${this.name}_${new Date().getTime()}.xlsx`;\n const ws = XLSX.utils.json_to_sheet(this.data);\n /* generate workbook and add the worksheet */\n const wb: XLSX.WorkBook = XLSX.utils.book_new();\n XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');\n\n /* save to file */\n XLSX.writeFile(wb, fileName);\n }\n\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { ExportExcelButtonComponent } from './export-excel-button/export-excel-button.component';\nimport { MaterialModule } from '../material.module';\n\n\n\n@NgModule({\n declarations: [ExportExcelButtonComponent],\n imports: [\n CommonModule,\n MaterialModule\n ],\n exports: [ExportExcelButtonComponent]\n})\nexport class ExportExcelModule { }\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { HttpService } from '../../core/http.service';\n\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-view',\n templateUrl: './audit-log-view-model.component.html',\n styleUrls: ['./audit-log-view-model.component.scss']\n})\nexport class AuditLogViewModelComponent implements OnInit {\n\n logInfo: any;\n showDeltaChanges: boolean = false;\n changeList: any[] = [];\n\n constructor(\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private http: HttpService\n ) { }\n\n ngOnInit(): void {\n if (this.data) {\n this.http.get(`api/recent-log-for-model`, {\n params: {\n model_type: this.data?.modelType,\n model_id: this.data?.modelId\n }\n }).pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.logInfo = result?.item;\n this.getTransformedChanges();\n });\n }\n }\n\n getTransformedChanges() {\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\n });\n }\n\n close() {\n this.dialogRef.close();\n }\n\n}\n","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { NavigationEnd, Router } from '@angular/router';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { filter } from 'rxjs/operators';\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-logs-view-model',\n templateUrl: './audit-logs-view-model.component.html',\n styleUrls: ['./audit-logs-view-model.component.scss']\n})\nexport class AuditLogsViewModelComponent implements OnInit {\n\n constructor(\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\n @Inject(MAT_DIALOG_DATA) public data: any,\n private router: Router\n ) { }\n\n ngOnInit(): void {\n this.router.events\n .pipe(filter(event => event instanceof NavigationEnd), untilDestroyed(this))\n .subscribe(_ => this.dialogRef.close());\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\nimport { MatDialog } from '@angular/material/dialog';\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\nimport { AuditLogsViewModelComponent } from '../audit-logs-view-model/audit-logs-view-model.component';\n\n\n@Component({\n selector: 'app-audit-log-for-model',\n templateUrl: './audit-log-for-model.component.html',\n styleUrls: ['./audit-log-for-model.component.scss']\n})\nexport class AuditLogForModelComponent implements OnInit {\n\n @Input() modelType: string;\n @Input() modelId: any;\n @Input() logView: 'recent' | 'all' = 'recent';\n\n constructor(\n private dialog: MatDialog,\n ) { }\n\n ngOnInit(): void {\n\n }\n\n getLogView() {\n const dialogRef = this.dialog.open(AuditLogViewModelComponent, {\n width: '800px',\n autoFocus: false,\n data: {\n modelType: this.modelType,\n modelId: this.modelId\n } // Any data passed here will be injected into the model\n });\n }\n\n getLogsView() {\n const dialogRef = this.dialog.open(AuditLogsViewModelComponent, {\n width: '95%',\n maxWidth: 'unset',\n autoFocus: false,\n data: {\n modelType: this.modelType,\n modelId: this.modelId\n } // Any data passed here will be injected into the model\n });\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogForModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogViewModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogViewModelRoutingModule } from './audit-log-view-model-routing.module';\nimport { AuditLogViewModelComponent } from './audit-log-view-model.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogViewModelComponent],\n imports: [\n CommonModule,\n AuditLogViewModelRoutingModule,\n FlexLayoutModule,\n MaterialModule\n ],\n exports: [AuditLogViewModelComponent]\n})\nexport class AuditLogViewModelModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogsViewModelRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogListRoutingModule { }\n","import { Component, OnInit, OnDestroy, Input, ViewChild } from '@angular/core';\n\n\nimport { Router } from '@angular/router';\nimport { MatSort } from '@angular/material/sort';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { PageEvent } from '../../data-table/data-table.model';\nimport { DataManager } from '../../core/dataManager.service';\nimport { DomSanitizer } from '@angular/platform-browser';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-list',\n templateUrl: './audit-log-list.component.html',\n styleUrls: ['./audit-log-list.component.scss'],\n})\nexport class AuditLogListComponent implements OnInit, OnDestroy {\n\n auditLogList: any[] = [];\n @Input() objectId: any;\n @Input() objectType: any;\n @Input() showFilter: boolean = true;\n @Input() showExportButtons: boolean = true;\n @Input() userId: any;\n\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = { sort_by: 'created_at|desc' };\n displayedColumns: any[] = ['index', 'id', 'object_type', 'object_id', 'action', 'changes', 'created_at', 'user.email'];\n\n @ViewChild(MatSort, { static: true }) sort: MatSort;\n\n constructor(\n private dataManager: DataManager,\n private router: Router,\n public sanitizer: DomSanitizer\n ) { }\n\n ngOnInit() {\n\n this.initializeData();\n\n if (this.sort) {\n this.sort.sortChange.pipe(untilDestroyed(this))\n .subscribe((value: any) => {\n this.changeSort(value);\n })\n }\n\n }\n\n get excelData(): any[] {\n if (this.auditLogList.length > 0) {\n return this.auditLogList.map(item => {\n return {\n 'Type': item?.object_type,\n 'Action': item?.action,\n 'Data': JSON.stringify(item?.data || {}),\n 'Object': JSON.stringify(item?.object || {}),\n 'Pre-Object': JSON.stringify(item?.pre_object || {}),\n 'Created At': new Date(item?.created_at).toDateString(),\n 'Created By': item?.user?.email\n };\n });\n }\n return [];\n }\n\n changeSort(event: any) {\n if (event.direction) {\n this.filters.sort_by = `${event.active}|${event.direction}`;\n this.reload();\n }\n }\n\n logClicked(log: any) {\n this.router.navigate(['/system/audit-logs/log-view', log.id]);\n }\n\n\n async initializeData() {\n if (this.objectType) {\n this.filters = { ...this.filters, object_type: this.objectType }\n }\n if (this.objectId) {\n this.filters = { ...this.filters, object_id: this.objectId }\n }\n if (this.userId) {\n this.filters = { ...this.filters, user_id: this.userId }\n }\n const result = await this.dataManager.GET(`api/audit-logs`, { ...this.filters, ...this.pageEvent });\n this.auditLogList = this.auditLogList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n }\n\n filterChange(event: any) {\n if (this.showFilter) {\n this.filters = {\n ...this.filters,\n ...event,\n object_type: this.objectType || event?.object_type || '',\n object_id: this.objectId || '',\n };\n this.reload();\n }\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n reload() {\n this.auditLogList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n getTransformedChanges(log: any) {\n if (log?.data?.changes) {\n const changes = Object.keys(log?.data?.changes) || [];\n let value = '<div>';\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n value = `${value} <div><b>${displayAttribute}:</b> <span id=\"old-value\">${log?.pre_object[key] ?? ''}</span><span id=\"new-value\">${log?.object[key] ?? ''}</span></div>`;\n });\n value = `${value} </div>`;\n return value;\n }\n return '';\n }\n\n ngOnDestroy() {\n // Needed for automatic unsubscribe with untilDestroyed\n }\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogListFilterRoutingModule { }\n","import { FormControl } from \"@angular/forms\";\n\nexport function DateValidator(): any {\n return (control: FormControl): { [key: string]: any } => {\n\n const val: any = new Date(control.value);\n if (!!control.value && val == 'Invalid Date') {\n return { invalidDate: true };\n }\n return null;\n };\n}","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\nimport { FormGroup, FormBuilder } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { FormValidatorService } from '../../core/form-validator.service';\nimport { DateValidator } from '../../date-validator';\n\n@UntilDestroy()\n@Component({\n selector: 'app-audit-log-list-filter',\n templateUrl: './audit-log-list-filter.component.html',\n styleUrls: ['./audit-log-list-filter.component.scss']\n})\nexport class AuditLogListFilterComponent implements OnInit {\n\n auditLogFilterForm: FormGroup;\n\n @Input() objectId: any;\n @Input() objectType: any;\n\n @Output() valueChange = new EventEmitter();\n\n constructor(private fb: FormBuilder, private formValidatorService: FormValidatorService) {\n this.createForm();\n }\n\n get showObjectFilter() {\n return !(this.objectId || this.objectType);\n }\n\n private createForm() {\n\n //TODO: Finialize and add more validations.\n this.auditLogFilterForm = this.fb.group({\n object_type: [''],\n action: [''],\n data: [''],\n date_to: ['', DateValidator()],\n date_from: ['', DateValidator()]\n });\n }\n\n ngOnInit(): void {\n\n this.auditLogFilterForm.valueChanges.pipe(\n debounceTime(500),\n distinctUntilChanged(),\n untilDestroyed(this)\n ).subscribe((value: any) => {\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\n this.valueChange.emit(value);\n })\n }\n\n\n resetFieldValue(field: string) {\n this.auditLogFilterForm.get(field).setValue('');\n }\n\n getFieldValue(field: string) {\n return this.auditLogFilterForm.get(field).value;\n }\n\n isFieldValid(field: string) {\n return this.formValidatorService.isFieldValid(field, this.auditLogFilterForm, true);\n }\n\n\n ngOnDestroy() {\n\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogListFilterRoutingModule } from './audit-log-list-filter-routing.module';\nimport { AuditLogListFilterComponent } from './audit-log-list-filter.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../../material.module';\nimport { SearchableSelectorModule } from '../../searchable-selector/searchable-selector.module';\n\n\n@NgModule({\n declarations: [AuditLogListFilterComponent],\n imports: [\n CommonModule,\n AuditLogListFilterRoutingModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n MaterialModule,\n SearchableSelectorModule,\n ],\n exports: [AuditLogListFilterComponent]\n})\nexport class AuditLogListFilterModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogListRoutingModule } from './audit-log-list-routing.module';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { AuditLogListComponent } from './audit-log-list.component';\nimport { AuditLogListFilterModule } from '../audit-log-list-filter/audit-log-list-filter.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { ExportExcelModule } from '../../export-excel/export-excel.module';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogListComponent],\n imports: [\n CommonModule,\n AuditLogListRoutingModule,\n ExportExcelModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n MaterialModule,\n InfiniteScrollModule,\n AuditLogListFilterModule\n ],\n exports: [AuditLogListComponent]\n})\nexport class AuditLogListModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogsViewModelRoutingModule } from './audit-logs-view-model-routing.module';\nimport { AuditLogsViewModelComponent } from './audit-logs-view-model.component';\nimport { AuditLogListModule } from '../audit-log-list/audit-log-list.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\n\n\n@NgModule({\n declarations: [AuditLogsViewModelComponent],\n imports: [\n CommonModule,\n AuditLogsViewModelRoutingModule,\n FlexLayoutModule,\n AuditLogListModule\n ],\n exports: [AuditLogsViewModelComponent]\n})\nexport class AuditLogsViewModelModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogForModelRoutingModule } from './audit-log-for-model-routing.module';\nimport { AuditLogForModelComponent } from './audit-log-for-model.component';\nimport { AuditLogViewModelModule } from '../audit-log-view-model/audit-log-view-model.module';\nimport { AuditLogsViewModelModule } from '../audit-logs-view-model/audit-logs-view-model.module';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogForModelComponent],\n imports: [\n AuditLogViewModelModule,\n AuditLogsViewModelModule,\n CommonModule,\n AuditLogForModelRoutingModule,\n FlexLayoutModule,\n MaterialModule,\n ],\n exports: [AuditLogForModelComponent]\n})\nexport class AuditLogForModelModule { }\n","import { Component, OnInit } from '@angular/core';\nimport { ActivatedRoute } from '@angular/router';\nimport { Location } from '@angular/common';\nimport * as jsondiffpatch from \"jsondiffpatch\"\nimport { DataManager } from '../../core/dataManager.service';\n\n@Component({\n selector: 'app-audit-log-view',\n templateUrl: './audit-log-view.component.html',\n styleUrls: ['./audit-log-view.component.scss']\n})\nexport class AuditLogViewComponent implements OnInit {\n\n logInfo: any;\n showDeltaChanges: boolean = false;\n changeList: any[] = [];\n\n constructor(\n private dataManager: DataManager,\n private route: ActivatedRoute,\n private location: Location\n ) { }\n\n ngOnInit(): void {\n this.route.paramMap.subscribe(params => {\n if (params.get('id')) {\n this.fetchLogDetail(params.get('id'));\n } else {\n this.location.back();\n }\n });\n }\n\n getTransformedChanges() {\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\n changes.forEach((key: any) => {\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\n });\n }\n\n async fetchLogDetail(logId: any) {\n const result = await this.dataManager.GET(`api/audit-logs/${logId}`);\n this.logInfo = result.item;\n this.getTransformedChanges();\n this.patchDelta();\n }\n\n patchDelta() {\n const delta = jsondiffpatch.diff(this.logInfo?.pre_object, this.logInfo?.object);\n document.getElementById('jsondiff').innerHTML = jsondiffpatch.formatters.html.format(delta, this.logInfo?.pre_object);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\n\nconst routes: Routes = [];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogViewRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogViewRoutingModule } from './audit-log-view-routing.module';\nimport { AuditLogViewComponent } from './audit-log-view.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { MaterialModule } from '../../material.module';\n\n\n@NgModule({\n declarations: [AuditLogViewComponent],\n imports: [\n CommonModule,\n AuditLogViewRoutingModule,\n FlexLayoutModule,\n MaterialModule\n ],\n exports: [AuditLogViewComponent]\n})\nexport class AuditLogViewModule { }\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../core/authentication.guard';\nimport { AuditLogListComponent } from './audit-log-list/audit-log-list.component';\nimport { AuditLogViewComponent } from './audit-log-view/audit-log-view.component';\n\n\nconst routes: Routes = [\n { path: 'log-list', component: AuditLogListComponent, canActivate: [AuthenticationGuard] },\n { path: 'log-view/:id', component: AuditLogViewComponent, canActivate: [AuthenticationGuard] },\n { path: '**', redirectTo: 'log-list', pathMatch: 'full' }\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class AuditLogRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { AuditLogRoutingModule } from './audit-log-routing.module';\nimport { AuditLogListModule } from './audit-log-list/audit-log-list.module';\nimport { AuditLogViewModule } from './audit-log-view/audit-log-view.module';\n\n\n@NgModule({\n declarations: [\n ],\n imports: [\n CommonModule,\n AuditLogRoutingModule,\n AuditLogListModule,\n AuditLogViewModule\n ],\n exports: []\n})\nexport class AuditLogModule { }\n","import { Component, Input, OnInit } from '@angular/core';\nimport { ImportCsvConfig } from '../import-csv-config';\n\n@Component({\n selector: 'app-import-success',\n templateUrl: './import-success.component.html',\n styleUrls: ['./import-success.component.scss']\n})\nexport class ImportSuccessComponent implements OnInit {\n @Input() data: any;\n @Input() config: ImportCsvConfig;\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { ErrorHandlerService } from './../../core/error-handler.service';\nimport { PageEvent } from './../../data-table/data-table.model';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { ImportCsvConfig } from '../import-csv-config';\nimport { HttpService } from '../../core/http.service';\n\n@Component({\n selector: 'app-import-history-list',\n templateUrl: './import-history-list.component.html',\n styleUrls: ['./import-history-list.component.scss']\n})\nexport class ImportHistoryListComponent implements OnInit {\n\n @Input() config: ImportCsvConfig;\n histories: any[] = [];\n displayedColumns: string[] = [\n 'index',\n 'imported_by',\n 'date',\n 'no_of_records'\n ];\n isWorking: boolean = false;\n filter: any;\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n\n constructor(\n private errorHandler: ErrorHandlerService,\n private http: HttpService,\n ) {\n }\n\n ngOnInit() {\n if (this.config.importHistory.isEnabled) {\n this.filter = {\n model_type: this.config.importHistory.type,\n };\n }\n this.loadData();\n }\n\n loadData() {\n try {\n this.isWorking = true;\n this.http.get(this.config.importHistory.apiUrl, { params: { ...this.filter, ...this.pageEvent } }).subscribe((result: any) => {\n this.histories = this.histories.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n } catch (error) {\n this.errorHandler.handleError(error);\n }\n finally {\n this.isWorking = false;\n }\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.loadData();\n }\n }\n\n reload() {\n this.histories = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.loadData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { FormValidatorService } from '../../core/form-validator.service';\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\nimport { Location } from '@angular/common';\nimport { ImportCsvConfig } from '../import-csv-config';\n\nconst errorMessages: any = {\n property: {\n required: \"Property is required\",\n unavailable: \"Duplicate entry\"\n },\n};\n\n@Component({\n selector: 'app-field-mapping',\n templateUrl: './field-mapping.component.html',\n styleUrls: ['./field-mapping.component.scss']\n})\nexport class FieldMappingComponent implements OnInit {\n\n importMappingForm: FormGroup;\n @Input() data: any[];\n @Input() config: ImportCsvConfig;\n firstDataArray: any[] = [];\n properties: any[] = [];\n @Output() onSave = new EventEmitter();\n @Output() onReUpload= new EventEmitter();\n\n constructor(\n private fb: FormBuilder,\n private formValidatorService: FormValidatorService,\n private changeDetectorRef: ChangeDetectorRef,\n public location: Location\n ) {\n this.createImportMappingForm();\n }\n\n ngOnInit() {\n this.properties = this.config.properties;;\n this.reFectorAttributes(this.data[0]);\n }\n\n createImportMappingForm() {\n this.importMappingForm = this.fb.group({\n fields: this.fb.array([]),\n });\n }\n\n get fieldsArray(): FormArray {\n return this.importMappingForm.get('fields') as FormArray;\n }\n\n createField(field: any): FormGroup {\n var fieldForm: FormGroup = this.fb.group({\n id: new FormControl(field.id),\n label: new FormControl(field.label),\n value: new FormControl(field.value),\n property: new FormControl(field.property,\n Validators.compose(\n [\n Validators.required\n ]\n )\n ),\n propertyType: new FormControl(field.propertyType)\n });\n return fieldForm;\n }\n\n reFectorAttributes(data) {\n for (var k in data) {\n if (data.hasOwnProperty(k)) {\n var dataValue = {\n id: '',\n label: k,\n value: data[k],\n property: '',\n propertyType: ''\n };\n this.firstDataArray.push(dataValue);\n }\n }\n this.firstDataArray.forEach((element: any, mainIndex: any) => {\n element.id = mainIndex;\n this.properties.find((property: any, index: any) => {\n if (property.label.toLowerCase().includes(element.label.toLowerCase())) {\n element.property = property.value;\n element.propertyType = property.type;\n return element;\n }\n });\n });\n }\n\n next() {\n this.importMappingForm.markAllAsTouched();\n if (!this.importMappingForm.valid) {\n return;\n }\n this.onSave.emit(this.importMappingForm.value);\n }\n\n /** Method to evaluate form fields*/\n isFieldValid(field: string, form: any) {\n return this.formValidatorService.isFieldValid(field, form);\n }\n\n /** Method to find error in form fields*/\n getErrorMessage(field: string, form: any) {\n return this.formValidatorService.getErrorMessage(field, form, errorMessages);\n }\n\n ngAfterViewInit(): void {\n //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.\n //Add 'implements AfterViewInit' to the class.\n setTimeout(x => {\n this.firstDataArray.forEach((element: any) => {\n this.fieldsArray.push(this.createField(element));\n });\n this.changeDetectorRef.detectChanges();\n }, 500);\n }\n\n updatePropertyType(event: any, index: any): void {\n var field = this.properties.find((field: any) => field.value == event.value);\n if (field) {\n this.fieldsArray.controls[index].get('propertyType').setValue(field.type);\n this.uniqueValidator();\n }\n }\n\n uniqueValidator() {\n this.fieldsArray.value.forEach((field: any, index: any) => {\n var control = this.fieldsArray.controls[index].get('property');\n const isNameUnique = this.fieldsArray.value.find(propertyData =>\n propertyData.property === control.value\n && propertyData.id != this.fieldsArray.controls[index].get('id').value\n )\n ? false\n : true;\n if (!isNameUnique) {\n control.setErrors({ unavailable: true });\n }\n else {\n control.setErrors(null);\n }\n });\n }\n\n removeField(index: number) {\n if (index == -1) {\n return;\n }\n this.fieldsArray.removeAt(index);\n }\n\n reUpload() {\n this.onReUpload.emit(true);\n }\n\n}\n","import { Location } from '@angular/common';\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\n\n@Component({\n selector: 'app-failed-items-list',\n templateUrl: './failed-items-list.component.html',\n styleUrls: ['./failed-items-list.component.scss']\n})\nexport class FailedItemsListComponent implements OnInit {\n @Input() failedItems: any[];\n @Input() selectedFields: any[];\n @Output() onReUpload = new EventEmitter();\n\n constructor(\n public location: Location\n ) { }\n\n ngOnInit() {\n }\n\n isValidDate(d: any): boolean {\n var date = new Date(d);\n return date instanceof Date && !isNaN(date.getTime());\n }\n\n reUpload() {\n this.onReUpload.emit(true);\n }\n\n}\n","import { ViewerConfig } from '../document-viewer/viewer-config.model';\nimport { FileDropperConfig } from '../file-dropper/file-dropper.model';\nimport { HttpService } from '../core/http.service';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { AlertService } from '../core/alert.service';\nimport { ErrorHandlerService } from '../core/error-handler.service';\nimport * as XLSX from 'xlsx';\nimport { ImportCsvConfig } from './import-csv-config';\n@UntilDestroy()\n\n@Component({\n selector: 'app-import-csv',\n templateUrl: './import-csv.component.html',\n styleUrls: ['./import-csv.component.scss']\n})\nexport class ImportCsvComponent implements OnInit {\n result: any;\n @Input() config: ImportCsvConfig;\n filesConfig: FileDropperConfig;\n filesList: any[] = [];\n data: any[] = [];\n isUploaded: boolean = false;\n isImportTypeSelected: boolean = false;\n viewerConfig: ViewerConfig;\n fileData: any[] = [];\n failedItems: any[] = [];\n selectedFields: any[] = [];\n importSteps: any = [\n {\n id: 1,\n step: 1,\n title: 'Upload',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 2,\n step: 2,\n title: 'Field Mappings',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 3,\n step: 3,\n title: 'Data Validation',\n progressTitle: 'Data Being Validated',\n progressDescription: 'The data is currently being validated and checked for errors, please do not navigate away from this page. '\n },\n {\n id: 4,\n step: 3,\n title: 'Data Validation & Errors',\n progressTitle: '',\n progressDescription: ''\n },\n {\n id: 5,\n step: 4,\n title: 'Data Importing',\n progressTitle: 'Data Being Imported',\n progressDescription: 'The data is currently being imported and saved, please do not navigate away from this page. After the import is completed, you will be redirected to a page with the imported records.'\n },\n {\n id: 6,\n step: 5,\n title: 'Success Page & Data Preview',\n progressTitle: '',\n progressDescription: ''\n },\n ];\n currentStep: any = 1;\n\n constructor(\n private alertService: AlertService,\n private errorHandler: ErrorHandlerService,\n private http: HttpService,\n ) {\n this.filesConfig = {\n fileId: \"file\",\n containerId: \"fileContainer\",\n styles: {\n height: \"200px\"\n },\n acceptFile: '.csv',\n multiple: false,\n maxSize: 10,\n acceptFileText: \".csv\"\n };\n }\n\n ngOnInit() {\n }\n\n get step() {\n return this.importSteps.find(step => step.id == this.currentStep);\n }\n\n async fileChanged(event: any) {\n this.currentStep = 2;\n this.filesList = event;\n\n let selectedFile = null;\n let jsonData = null;\n const reader = new FileReader();\n const file = this.filesList[0];\n reader.onload = (event) => {\n const data = reader.result;\n selectedFile = XLSX.read(data, {\n type: 'binary',\n cellDates: true,\n });\n jsonData = selectedFile.SheetNames.reduce((initial, name) => {\n const sheet = selectedFile.Sheets[name];\n initial = XLSX.utils.sheet_to_json(sheet, {\n header: 0,\n defval: \"\",\n });\n return initial;\n }, {});\n this.fileData = jsonData;\n }\n reader.readAsBinaryString(file);\n return;\n }\n\n mappingProcessed(event: any) {\n this.currentStep = 3;\n setTimeout(x => {\n this.selectedFields = event.fields;\n const tempFileData = JSON.parse(JSON.stringify(this.fileData));\n tempFileData.forEach(data => {\n for (var key in data) {\n var field = event.fields.find((field: any) => field.label == key);\n if (field) {\n if ((field.propertyType == 'date' || field.propertyType == 'dateTime') && this.isValidDate(new Date(data[field.label]))) {\n data[field.property] = (new Date(data[field.label]) as Date).toISOString();\n }\n else {\n data[field.property] = data[field.label];\n }\n delete data[key];\n }\n else {\n delete data[key];\n }\n }\n });\n this.save(tempFileData);\n }, 2000);\n }\n\n async save(tempFileData: any) {\n try {\n this.http.post(this.config.apiUrl, { data: tempFileData })\n .pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n\n this.failedItems = result.failed_items;\n if (this.failedItems.length) {\n this.alertService.addAlert(result.msg, 'warn');\n }\n if (!(this.failedItems.length > 0)) {\n this.currentStep = 5;\n setTimeout(x => {\n this.currentStep = 6;\n this.result = result;\n }, 2000);\n }\n else {\n this.currentStep = 4;\n }\n });\n } catch (error) {\n if ((error.status === 422 || error.status === 400) && error.msg) {\n this.alertService.addAlert(error.msg, \"warning\");\n }\n this.errorHandler.handleError(error);\n this.reUpload();\n }\n }\n\n isValidDate(d: any) {\n return d instanceof Date && !isNaN(d.getTime());\n }\n\n reUpload() {\n this.data = [];\n this.fileData = [];\n this.filesList = [];\n this.failedItems = [];\n this.selectedFields = [];\n this.currentStep = 1;\n }\n\n}\n","import { Component, Input, OnInit } from '@angular/core';\n\n@Component({\n selector: 'app-data-import',\n templateUrl: './data-import.component.html',\n styleUrls: ['./data-import.component.scss']\n})\nexport class DataImportComponent implements OnInit {\n @Input() step: any;\n\n constructor() { }\n\n ngOnInit() {\n }\n\n}\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { DocumentViewerModule } from './../document-viewer/document-viewer.module';\nimport { FileDropperModule } from './../file-dropper/file-dropper.module';\nimport { MaterialModule } from './../material.module';\nimport { ImportSuccessComponent } from './import-success/import-success.component';\nimport { ImportHistoryListComponent } from './import-history-list/import-history-list.component';\nimport { FieldMappingComponent } from './field-mapping/field-mapping.component';\nimport { FailedItemsListComponent } from './failed-items-list/failed-items-list.component';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ImportCsvComponent } from './import-csv.component';\nimport { RouterModule } from '@angular/router';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { DataImportComponent } from './data-import/data-import.component';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n FlexLayoutModule,\n RouterModule,\n MaterialModule,\n FlexLayoutModule,\n FileDropperModule,\n DocumentViewerModule,\n InfiniteScrollModule\n ],\n declarations: [\n ImportCsvComponent,\n FieldMappingComponent,\n FailedItemsListComponent,\n ImportHistoryListComponent,\n ImportSuccessComponent,\n DataImportComponent\n ],\n providers: [],\n exports: [\n ImportCsvComponent\n ],\n})\nexport class ImportCsvModule { }\n","import { Component, Input, OnInit } from '@angular/core';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\nimport { PageEvent } from '../data-table/data-table.model';\nimport { HttpService } from '../core/http.service';\nimport { TimelineValue } from '../timeline-filter';\n\n@UntilDestroy()\n@Component({\n selector: 'app-login-history-for-user',\n templateUrl: './login-history-for-user.component.html',\n styleUrls: ['./login-history-for-user.component.scss']\n})\nexport class LoginHistoryForUserComponent implements OnInit {\n\n loginHistoryList: any[] = [];\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\n filters: any = {\n sort_by: 'created_at|desc',\n };\n historyFilterForm: FormGroup;\n displayedColumns: any[] = ['index', 'created_at'];\n @Input() userId: any;\n\n constructor(\n private http: HttpService,\n private fb: FormBuilder,\n ) {\n this.historyFilterForm = this.fb.group({\n 'duration': [''],\n 'date_from': [''],\n 'date_to': ['']\n });\n }\n\n ngOnInit() {\n this.filters.user_id = this.userId;\n this.historyFilterForm.valueChanges\n .pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this))\n .subscribe((value: any) => {\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\n this.filterChange(value);\n });\n this.initializeData();\n }\n\n onTimelineChange(range: TimelineValue) {\n let date_from = range?.date_from ? new Date(range.date_from) : '';\n let date_to = range?.date_to ? new Date(range.date_to) : '';\n this.historyFilterForm.patchValue({\n date_from,\n date_to\n });\n }\n\n initializeData() {\n this.http.get(`api/user-login-history`, { params: { ...this.filters, ...this.pageEvent } })\n .pipe(untilDestroyed(this))\n .subscribe((result: any) => {\n this.loginHistoryList = this.loginHistoryList.concat(result.data);\n this.pageEvent.page = result.current_page;\n this.pageEvent.lastPage = result.last_page;\n });\n }\n\n filterChange(event: any) {\n this.filters = {\n ...this.filters,\n ...event\n };\n this.reload();\n }\n\n onScroll() {\n if (this.pageEvent.lastPage > this.pageEvent.page) {\n this.pageEvent.page += 1;\n this.initializeData();\n }\n }\n\n\n reload() {\n this.loginHistoryList = [];\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\n this.initializeData();\n }\n\n ngOnDestroy() {\n //Until destroyed uses it\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { AuthenticationGuard } from '../core/authentication.guard';\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: LoginHistoryForUserComponent,\n canActivate: [AuthenticationGuard]\n },\n];\n\n@NgModule({\n imports: [RouterModule.forChild(routes)],\n exports: [RouterModule]\n})\nexport class LoginHistoryForUserRoutingModule { }\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport { LoginHistoryForUserRoutingModule } from './login-history-for-user-routing.module';\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\nimport { TimelineFilterModule } from '../timeline-filter/timeline-filter.module';\n\n\n@NgModule({\n declarations: [LoginHistoryForUserComponent],\n imports: [\n CommonModule,\n LoginHistoryForUserRoutingModule,\n InfiniteScrollModule,\n MaterialModule,\n FlexLayoutModule,\n ReactiveFormsModule,\n TimelineFilterModule\n ],\n exports: [LoginHistoryForUserComponent]\n})\nexport class LoginHistoryForUserModule { }\n","import { COMMA, ENTER } from '@angular/cdk/keycodes';\n\nexport class TechlifyTaggerTagFormConfigModel {\n selectable: boolean;\n removable: boolean;\n separatorKeysCodes: number[];\n placeholder: string;\n apiUrl: string;\n isCreateable: boolean;\n createApiUrl: string;\n isCacheTags: boolean;\n isSingle: boolean;\n\n constructor() {\n this.selectable = true;\n this.removable = true;\n this.separatorKeysCodes = [ENTER, COMMA];\n this.placeholder = 'New Tag..';\n this.apiUrl = 'api/techlify-tagger-tags';\n this.createApiUrl = 'api/techlify-tagger-tags';\n this.isCreateable = true;\n this.isCacheTags = false;\n this.isSingle = false;\n }\n}","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, Inject, Optional, Self, OnChanges, SimpleChanges } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { HttpService } from '../core/http.service';\nimport { TechlifyTaggerTagFormConfigModel } from './techlify-tagger-tag-form-config.model';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-tagger-tag-form-field',\n templateUrl: './techlify-tagger-tag-form-field.component.html',\n styleUrls: ['./techlify-tagger-tag-form-field.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }],\n})\nexport class TechlifyTaggerTagFormFieldComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy, OnChanges {\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'techlify-tagger-form-field';\n id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent.nextId++}`;\n\n onChange = (_: any) => { };\n onTouched = () => { };\n\n tagInputCtrl = new FormControl();\n filterString: any;\n @ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;\n\n /**Pass the configuration for Techlify Tagger */\n @Input() config: TechlifyTaggerTagFormConfigModel = new TechlifyTaggerTagFormConfigModel();\n /**Pass the Model Type for Techlify Tagger, Required */\n @Input() modelType!: string;\n /**Pass the Model ID for Techlify Tagger */\n @Input() modelId: string;\n\n /**Pass the default list of tags */\n private _allTags: any[] = [];\n @Input()\n get allTags() {\n return this._allTags;\n }\n set allTags(value) {\n this._allTags = value;\n }\n\n /**Pass the Categories to filter for a model */\n @Input() categories: string[] = [];\n /**Pass default category to be used for assigning the tags, when we filter by more than one category */\n @Input() defaultCreateCategory: string;\n\n get tags() {\n return this.allTags.filter(x => this.value.some(y => y == x.id));\n }\n\n //Default Getter and Setters for a Form Field Implementation\n get empty() {\n return this.value.length == 0;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty || this.tagInputCtrl.value;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.tagInputCtrl.disable() : this.tagInputCtrl.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n\n private _value: any[] = [];\n @Input()\n get value(): any[] {\n return this._value;\n }\n set value(tagIds: any[]) {\n this._value = tagIds || [];\n this.stateChanges.next();\n }\n\n get errorState(): boolean {\n return this.tagInputCtrl.dirty && this.required && (this.value.length == 0);\n }\n\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder: string;\n\n\n ngOnInit(): void {\n\n }\n\n ngOnChanges(changes: SimpleChanges) {\n\n //API to load all tags for the model type\n if (this.allTags.length == 0) {\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n perPage: '1000'\n }\n }).pipe(\n debounceTime(500),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.allTags = result.data;\n });\n }\n\n //API to load only the selected tags for the model\n if (this.modelId && this.value.length == 0) {\n //Model Id is passed and no tags are present, so we query db for the avilable tags for the model ID.\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n model_type: this.modelType,\n model_id: this.modelId,\n perPage: '1000'\n }\n }).pipe(\n debounceTime(500),\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.value = (result?.data || []).map((x: any) => x.id);\n this._handleInput();\n });\n }\n }\n\n init() {\n if (this.modelId && this.allTags.length == 0) {\n //Model Id is passed and no tags are passed, so we query db for the avilable tags for the model ID.\n this.httpService\n .cache(!this.config.isCacheTags)\n .get(this.config.apiUrl, {\n params: {\n categories: this.categories.join(','),\n model_type: this.modelType,\n model_id: this.modelId\n }\n }).pipe(\n untilDestroyed(this)\n ).subscribe((result: any) => {\n this.allTags = result.data;\n });\n }\n }\n\n get filteredTags(): any[] {\n return this._filter();\n }\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private httpService: HttpService,\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl) {\n\n this.tagInputCtrl.valueChanges\n .subscribe(filterValue => {\n this.filterString = filterValue;\n });\n\n //Set Focus Monitor\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n setDescribedByIds(ids: string[]) {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n onContainerClick() {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n\n async add(event: MatChipInputEvent) {\n const value = (event.value || '').trim();\n // Add our tag\n // Validate for single mode\n if (!this.config.isSingle || (this.value.length === 0)) {\n if (value && this.config.isCreateable) {\n const tags = this.allTags;\n let tag = tags.find((item: any) => item.title.toLowerCase() == value.toLowerCase());\n if (!tag) {\n //No tag present in the list\n try {\n const result: any = await this.httpService.post(this.config.createApiUrl, {\n title: value,\n description: value,\n category_title: (this.categories.length > 0) ? (this.defaultCreateCategory ? this.defaultCreateCategory : this.categories[0]) : ''\n }).toPromise();\n tag = result.item;\n } catch (error) {\n return;\n }\n this.allTags.push(tag);\n } else {\n //Optionally clean the existing value, to avoid duplicate\n this.remove(tag);\n }\n this.value.push(tag.id);\n this._handleInput();\n }\n }\n\n // Clear the input value\n event.input.value = '';\n\n this.tagInputCtrl.setValue(null);\n }\n\n remove(tag: any): void {\n this.value = this.value.filter(x => x !== tag.id);\n this._handleInput();\n }\n\n selected(event: MatAutocompleteSelectedEvent): void {\n // Validate for single mode\n if (!this.config.isSingle || (this.value.length === 0)) {\n //Clean the existing value, to avoid duplicate\n this.remove({ id: event.option.value });\n this.value.push(event.option.value);\n this._handleInput();\n }\n this.tagInput.nativeElement.value = '';\n this.tagInputCtrl.setValue(null);\n }\n\n private _filter(): any[] {\n const filterValue = this.filterString ? this.filterString.toString().toLowerCase() : null;\n const availableTags = this.allTags.filter((tag: any) => !this.value.some((item: any) => item == tag.id));\n return filterValue ? availableTags.filter((tag: any) => tag.title.toLowerCase().includes(filterValue)) : availableTags;\n }\n\n writeValue(tagIds: any[]): void {\n this.value = tagIds || [];\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyTaggerTagFormFieldComponent } from './techlify-tagger-tag-form-field.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MaterialModule } from '../material.module';\n\n\n\n@NgModule({\n declarations: [\n TechlifyTaggerTagFormFieldComponent\n ],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n MatAutocompleteModule,\n ReactiveFormsModule\n ],\n exports: [TechlifyTaggerTagFormFieldComponent]\n})\nexport class TechlifyTaggerTagFormFieldModule { }\n","import { FocusMonitor } from '@angular/cdk/a11y';\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport { Component, ElementRef, OnInit, Input, OnDestroy, Inject, Optional, Self } from '@angular/core';\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { Subject } from 'rxjs';\nimport { debounceTime } from 'rxjs/operators';\nimport { HttpService } from '../core/http.service';\n\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-tagger-tag-selector',\n templateUrl: './techlify-tagger-tag-selector.component.html',\n styleUrls: ['./techlify-tagger-tag-selector.component.scss'],\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagSelectorComponent }],\n})\nexport class TechlifyTaggerTagSelectorComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy {\n\n /**Pass the Categories to filter for a model */\n @Input() categories: string[] = [];\n @Input() multiple: boolean = false;\n @Input() enableSearch: boolean = true;\n tagSelectorCtrl = new FormControl();\n @Input() showAllTags: boolean = false;\n @Input() useSelectButtonStyle: boolean = false;\n\n tags: any[] = [];\n\n static nextId = 0;\n stateChanges = new Subject<void>();\n focused = false;\n controlType = 'techlify-tagger-selector';\n id = `techlify-tagger-selector-${TechlifyTaggerTagSelectorComponent.nextId++}`;\n\n onChange = (_: any) => { };\n onTouched = () => { };\n\n get apiUrl() {\n if (this.showAllTags) {\n return 'api/techlify-tagger-tags'\n }\n else if (this.categories?.length > 0) {\n return 'api/techlify-tagger-tags?categories=' + this.categories.join(',');\n }\n else {\n return '';\n }\n }\n\n //Default Getter and Setters for a Form Field Implementation\n get empty() {\n return this.value.length == 0;\n }\n\n get shouldLabelFloat() {\n return this.focused || !this.empty;\n }\n\n @Input()\n get required(): boolean {\n return this._required;\n }\n set required(value: boolean) {\n this._required = coerceBooleanProperty(value);\n this.stateChanges.next();\n }\n private _required = false;\n\n @Input()\n get disabled(): boolean {\n return this._disabled;\n }\n set disabled(value: boolean) {\n this._disabled = coerceBooleanProperty(value);\n this._disabled ? this.tagSelectorCtrl.disable() : this.tagSelectorCtrl.enable();\n this.stateChanges.next();\n }\n private _disabled = false;\n\n\n private _value: any;\n @Input()\n get value(): any {\n return this._value;\n }\n set value(val: any) {\n this._value = val;\n this.tagSelectorCtrl.setValue(val);\n this.stateChanges.next();\n }\n\n get errorState(): boolean {\n return this.tagSelectorCtrl.dirty && this.required && (this.value.length == 0);\n }\n\n @Input()\n get placeholder(): string {\n return this._placeholder;\n }\n set placeholder(value: string) {\n this._placeholder = value;\n this.stateChanges.next();\n }\n private _placeholder: string;\n\n\n ngOnInit(): void {\n if (this.useSelectButtonStyle) {\n this.httpService.get(this.apiUrl)\n .pipe(untilDestroyed(this))\n .subscribe((res: any) => {\n this.tags = res.data;\n })\n }\n }\n\n selectionChange(value: any) {\n this.value = value;\n this._handleInput();\n }\n\n constructor(\n private _focusMonitor: FocusMonitor,\n private _elementRef: ElementRef<HTMLElement>,\n private httpService: HttpService,\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\n @Optional() @Self() public ngControl: NgControl) {\n\n //Set Focus Monitor\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\n if (this.focused && !origin) {\n this.onTouched();\n }\n this.focused = !!origin;\n this.stateChanges.next();\n });\n\n if (this.ngControl != null) {\n this.ngControl.valueAccessor = this;\n }\n }\n\n setDescribedByIds(ids: string[]) {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n onContainerClick() {\n // Just a empty implementation for Mat Form Field Interface\n }\n\n writeValue(val: any): void {\n this.value = val;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n }\n\n _handleInput(): void {\n this.onChange(this.value);\n }\n\n static ngAcceptInputType_disabled: BooleanInput;\n static ngAcceptInputType_required: BooleanInput;\n\n ngOnDestroy() {\n this.stateChanges.complete();\n this._focusMonitor.stopMonitoring(this._elementRef);\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyTaggerTagSelectorComponent } from './techlify-tagger-tag-selector.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { ReactiveFormsModule } from '@angular/forms';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\nimport { MaterialModule } from '../material.module';\nimport { SearchableSelectorModule } from '../searchable-selector/searchable-selector.module';\n\n\n\n@NgModule({\n declarations: [\n TechlifyTaggerTagSelectorComponent\n ],\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n MatAutocompleteModule,\n ReactiveFormsModule,\n SearchableSelectorModule,\n MatButtonToggleModule\n ],\n exports: [TechlifyTaggerTagSelectorComponent]\n})\nexport class TechlifyTaggerTagSelectorModule { }\n","import { DataManager } from './../core/dataManager.service';\nimport { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class TechlifyFeatureService {\n\n constructor(private dataManager: DataManager) { }\n\n getFeatures() {\n return this.dataManager.GET(`api/features`);\n }\n\n disableFeature(id: any) {\n return this.dataManager.GET(`api/feature/${id}/disable`);\n }\n\n enableFeature(id: any) {\n return this.dataManager.GET(`api/feature/${id}/enable`);\n }\n\n}\n","import { Component, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\nimport { MatDialog } from '@angular/material/dialog';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { TechlifyFeatureService } from './techlify-feature.service';\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\nimport { debounceTime } from 'rxjs/operators';\nimport { ActionPopup, ActionPopupComponent } from '../action-popup';\nimport { DataManager } from '../core/dataManager.service';\nimport { ErrorHandlerService } from '../core/error-handler.service';\nimport { AlertService } from '../core/alert.service';\nimport { StorageService } from '../core/storage.service';\n@UntilDestroy()\n@Component({\n selector: 'app-techlify-listing-feature',\n templateUrl: './techlify-feature-listing.component.html',\n styleUrls: ['./techlify-feature-listing.component.scss']\n})\nexport class TechlifyFeatureListingComponent implements OnInit {\n\n features: any[] = []\n displayedColumns: string[] = [\n 'index',\n 'feature',\n 'description',\n 'actions',\n ]\n\n dataSource = new MatTableDataSource()\n\n page: number = 1;\n lastPage: number;\n perPage: number = 25;\n\n isWorking: boolean = false\n filterFormGroup: FormGroup;\n featureToggleForm: FormGroup;\n\n constructor(\n private dataManager: DataManager,\n private errorHandler: ErrorHandlerService,\n private fb: FormBuilder,\n private alertService: AlertService,\n private dialog: MatDialog,\n private storage: StorageService,\n private featureService: TechlifyFeatureService\n ) {\n this.filterFormGroup = this.fb.group({\n num_items: [\"\"]\n })\n }\n\n ngOnInit() {\n this.loadData()\n this.listenForChanges()\n }\n\n listenForChanges() {\n this.filterFormGroup.valueChanges\n .pipe(debounceTime(500), untilDestroyed(this))\n .subscribe((changes) => {\n this.reload()\n })\n }\n\n async loadData() {\n let result;\n try {\n this.isWorking = true\n var filter = this.filterFormGroup.value\n filter.page = this.page;\n filter.perPage = this.perPage;\n result = await this.dataManager.GET(`api/features`, filter);\n this.features = this.features.concat(result.data);\n this.dataSource = new MatTableDataSource(this.features);\n\n if (!this.storage.getItem('features')) {\n this.setStorage(this.features);\n }\n\n this.isWorking = false\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.isWorking = false;\n }\n }\n\n async toggeleFeature(element, feature) {\n let status = element ? 'Off' : \"On\";\n let data;\n const dialogRef = this.dialog.open(ActionPopupComponent, {\n width: \"400px\",\n data: <ActionPopup>{\n title: `Turn this feature ${status}?`,\n message: `Would you like to turn ${feature.title} feature ${status}`\n }\n })\n\n dialogRef.afterClosed().subscribe(async result => {\n if (result) {\n try {\n data = element\n ? await this.featureService.disableFeature(feature.id)\n : await this.featureService.enableFeature(feature.id);\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.alertService.addAlert(`You have just turned ${status} the feature ${feature.title}`, 'success');\n this.reload();\n this.storage.removeItem('features');\n this.setStorage(this.features);\n this.isWorking = false;\n }\n } else {\n this.reload();\n }\n })\n }\n\n setStorage(features) {\n let localFeatures = [];\n for (let feature of features) {\n if (!feature.client_feature) {\n if (feature.is_enabled_default) {\n localFeatures.push(feature.code);\n }\n } else {\n if (feature.client_feature.is_enabled) {\n localFeatures.push(feature.code);\n }\n }\n\n }\n this.storage.setItem(\"features\", localFeatures);\n }\n\n reload() {\n this.features = [];\n this.page = 1;\n if (!this.isWorking) {\n this.loadData();\n }\n }\n\n onScroll() {\n if (!this.isWorking && this.page < this.lastPage) {\n this.page += 1;\n this.loadData();\n }\n }\n\n sortColumn(event) {\n var direction = event.direction.toString().toUpperCase()\n this.assignFilter(event.active, direction)\n this.reload()\n }\n\n assignFilter(column, direction) {\n switch (column) {\n case 'name': {\n return this.filterFormGroup\n .get('sort_by')\n .setValue('first_name|' + direction)\n }\n case 'added_on': {\n return this.filterFormGroup\n .get('sort_by')\n .setValue('created_at|' + direction)\n }\n }\n }\n\n}\n","import { AuthenticationGuard } from './../core/authentication.guard';\nimport { Routes, RouterModule } from '@angular/router';\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: TechlifyFeatureListingComponent,\n canActivate: [AuthenticationGuard]\n },\n];\n\nexport const TechlifyFeatureRoutes = RouterModule.forChild(routes);\n","import { Component, Input, OnInit } from '@angular/core';\nimport { FormBuilder, FormGroup } from '@angular/forms';\n\n@Component({\n selector: 'app-on-off-switch',\n templateUrl: './on-off-switch.component.html',\n styleUrls: ['./on-off-switch.component.scss']\n})\n\nexport class OnOffSwitchComponent implements OnInit {\n\n @Input() value: boolean;\n slideToggle: FormGroup;\n\n constructor(private fb: FormBuilder) {\n this.slideToggle = this.fb.group({\n toggle: [\"\"]\n })\n }\n\n ngOnInit() {\n this.slideToggle.get('toggle').setValue(this.value);\n }\n\n}\n","import { Directive, ElementRef, Input } from '@angular/core';\nimport { ErrorHandlerService } from '../core/error-handler.service';\nimport { StorageService } from '../core/storage.service';\nimport { TechlifyFeatureService } from './techlify-feature.service';\n\n@Directive({\n selector: '[techlifyFeatureEnabled]'\n})\nexport class TechlifyFeatureEnabledDirective {\n\n features: any;\n localFeatures: any[] = [];\n @Input('techlifyFeatureEnabled') enabledFeature: any;\n\n constructor(\n private el: ElementRef,\n private featureService: TechlifyFeatureService,\n private errorHandler: ErrorHandlerService,\n private storage: StorageService) {\n\n }\n\n ngOnInit(): void {\n if (!this.storage.getItem('features')) {\n this.getFeatures();\n } else {\n this.checkForFeatureEnabled();\n }\n }\n\n async getFeatures() {\n try {\n let features = await this.featureService.getFeatures();\n\n for (let feature of features.data) {\n if (!feature.client_feature) {\n if (feature.is_enabled_default) {\n this.localFeatures.push(feature.code);\n }\n } else {\n if (feature.client_feature.is_enabled) {\n this.localFeatures.push(feature.code);\n }\n }\n\n }\n this.storage.setItem(\"features\", this.localFeatures);\n } catch (error) {\n this.errorHandler.handleError(error);\n } finally {\n this.checkForFeatureEnabled()\n }\n }\n\n checkForFeatureEnabled() {\n try {\n let features = this.storage.getItem('features');\n let features_split = features.split(',');\n\n if (features_split.includes(this.enabledFeature)) {\n this.el.nativeElement.style.display = \"show\";\n } else {\n this.el.nativeElement.remove();\n }\n\n } catch (error) {\n this.errorHandler.handleError(error);\n }\n }\n\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\n\nimport { TechlifyFeatureRoutes } from './techlify-feature.routing';\nimport { OnOffSwitchComponent } from './on-off-switch/on-off-switch.component';\nimport { FlexLayoutModule } from '@angular/flex-layout';\nimport { TechlifyFeatureEnabledDirective } from './techlify-feature-enabled.directive';\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\nimport { MaterialModule } from '../material.module';\n\n@NgModule({\n imports: [\n CommonModule,\n MaterialModule,\n FlexLayoutModule,\n TechlifyFeatureRoutes,\n MatSlideToggleModule,\n FormsModule,\n ReactiveFormsModule,\n InfiniteScrollModule\n ],\n declarations: [TechlifyFeatureListingComponent, OnOffSwitchComponent, TechlifyFeatureEnabledDirective],\n exports: [TechlifyFeatureListingComponent, TechlifyFeatureEnabledDirective]\n})\nexport class TechlifyFeatureModule { }\n"]}