ngx-techlify-core 11.4.7 → 11.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngx-techlify-core.umd.js +163 -1
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +1 -16
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/base-model/index.js +4 -0
- package/esm2015/lib/base-model/techlify-form-component.class.js +51 -0
- package/esm2015/lib/base-model/techlify-listing-component.class.js +41 -0
- package/esm2015/lib/base-model/techlify-service.class.js +64 -0
- package/esm2015/lib/entity-files/entity-files-view-all.component.js +2 -2
- package/esm2015/public-api.js +2 -1
- package/fesm2015/ngx-techlify-core.js +158 -2
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/base-model/index.d.ts +3 -0
- package/lib/base-model/techlify-form-component.class.d.ts +43 -0
- package/lib/base-model/techlify-listing-component.class.d.ts +47 -0
- package/lib/base-model/techlify-service.class.d.ts +52 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -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/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","isLogoutWhileApiGetsFailed","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","status","sessionStorage","location","reload","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","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","dialog","viewOnly","allowMultipleFiles","entityFiles","displayedColumns","isWorking","search","FormControl","imageStyle","hideRemove","x","entityType","entityId","valueChanges","debounceTime","distinctUntilChanged","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","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,2wBALOC,EAAAA,oBACAC,EAAWC,WAAA,CAAA,CAA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BzS,KAAKqqC,yBAFLrqC,KAAK4oC,eAMHuB,EAAAlqC,UAAA2oC,YAAA,uHAEa,8BAAA,CAAA,EAAM5oC,KAAKgpC,eAAeJ,sBAArCK,EAAW/5B,EAAA3K,WAEf,IAAoBuK,EAAA1J,EAAA6jC,EAASlpC,MAAIiP,EAAAF,EAAAtL,QAAAwL,EAAApL,KAAAoL,EAAAF,EAAAtL,QAAxB+lC,EAAOv6B,EAAA1L,OACDsmC,eAKPL,EAAQK,eAAeC,YACzB7pC,KAAKypC,cAActkC,KAAKokC,EAAQnT,MAL9BmT,EAAQO,oBACV9pC,KAAKypC,cAActkC,KAAKokC,EAAQnT,8GAStCp2B,KAAK+M,QAAQ6F,QAAQ,WAAY5S,KAAKypC,8CAEtCzpC,KAAK0P,aAAahB,YAAY26B,uBAE9BrpC,KAAKqqC,sDAITF,EAAAlqC,UAAAoqC,uBAAA,WACE,IACiBrqC,KAAK+M,QAAQ0F,QAAQ,YACNtI,MAAM,KAEjBs4B,SAASziC,KAAKsqC,gBAC/BtqC,KAAKoqC,GAAG5jB,cAAclK,MAAMiuB,QAAU,OAEtCvqC,KAAKoqC,GAAG5jB,cAAc5b,SAGxB,MAAOlF,GACP1F,KAAK0P,aAAahB,YAAYhJ,+BA7DnC8hB,EAAAA,UAASjnB,KAAA,CAAC,CACTC,SAAU,yEANQ+kB,EAAAA,kBAGXojB,UAFAn6B,UACAwgB,+CAUN3kB,EAAAA,MAAK9J,KAAA,CAAC,oCCeT,kCAdCksB,EAAAA,SAAQlsB,KAAA,CAAC,CACRosB,QAAS,CACPC,EAAAA,aACAmF,GACAD,EAAAA,iBACAiY,GACAS,EAAAA,qBACArY,EAAAA,YACAC,EAAAA,oBACAH,EAAAA,sBAEFvF,aAAc,CAACqc,EAAAA,gCAAiCiB,GAAsBG,IACtEpd,QAAS,CAACgc,EAAAA,gCAAiCoB","sourcesContent":["export class ActionPopup {\r\n name: string;\r\n title: string;\r\n message: string;\r\n}","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { ActionPopup } from './action-popup.model';\r\n\r\n@Component({\r\n selector: 'app-action-popup',\r\n templateUrl: './action-popup.component.html',\r\n styleUrls: ['./action-popup.component.scss']\r\n})\r\nexport class ActionPopupComponent implements OnInit {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<ActionPopupComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: ActionPopup,\r\n ) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n /**Method to close dialog box */\r\n closeDialog() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to close dialog box with the data given from parent component\r\n */\r\n confirm() {\r\n this.dialogRef.close(this.data);\r\n }\r\n\r\n}\r\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 {\r\n Component,\r\n OnInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnChanges,\r\n SimpleChanges,\r\n AfterViewInit,\r\n ViewChild\r\n} from \"@angular/core\";\r\n\r\nimport { SelectionModel } from \"@angular/cdk/collections\";\r\nimport { MatMenuTrigger } from '@angular/material/menu';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { DataTable } from './data-table.model';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: \"app-data-table\",\r\n templateUrl: \"./data-table.component.html\",\r\n styleUrls: [\"./data-table.component.scss\"]\r\n})\r\nexport class DataTableComponent implements OnInit, OnChanges, AfterViewInit {\r\n\r\n trigger: MatMenuTrigger;\r\n\r\n @Input() data: any;\r\n\r\n @Input() config: DataTable;\r\n\r\n dataSource: MatTableDataSource<any> = new MatTableDataSource([]);\r\n\r\n @Input() selection: SelectionModel<any>;\r\n\r\n @Output() action = new EventEmitter();\r\n @Output() selctionChange = new EventEmitter();\r\n @Output() rowClick = new EventEmitter();\r\n @Output() tableScroll = new EventEmitter();\r\n @Output() sortChanged = new EventEmitter();\r\n\r\n page: number;\r\n lastPage: number;\r\n perPage: number;\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n static nextId = 0;\r\n @Input() elementId: string = `data-table-${DataTableComponent.nextId++}`;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n /**Life cycle hook method */\r\n ngAfterViewInit() {\r\n // Assign the data to the data source for the table to render\r\n this.dataSource = new MatTableDataSource(this.data);\r\n\r\n // Emit change in selection\r\n if (this.selection) {\r\n this.selection.changed.pipe().subscribe((change: any) => {\r\n if (this.selection.selected) {\r\n this.selctionChange.emit(this.selection.selected);\r\n }\r\n });\r\n }\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.sortChanged.emit(value);\r\n })\r\n }\r\n }\r\n\r\n /** Whether the number of selected elements matches the total number of rows. */\r\n isAllSelected() {\r\n const numSelected = this.selection.selected.length;\r\n const numRows = this.dataSource.data.length;\r\n return numSelected === numRows;\r\n }\r\n\r\n /** Selects all rows if they are not all selected; otherwise clear selection. */\r\n masterToggle() {\r\n this.isAllSelected()\r\n ? this.clearSelection()\r\n : this.dataSource.data.forEach(row => this.selection.select(row));\r\n }\r\n\r\n /**clear selection*/\r\n clearSelection() {\r\n this.selection.clear();\r\n this.selctionChange.emit(this.selection.selected);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n this.initializeConfig(changes);\r\n if (changes.data && !changes.data.isFirstChange() && this.dataSource) {\r\n // If not first change\r\n this.dataSource.data = changes.data.currentValue;\r\n }\r\n }\r\n\r\n initializeConfig(changes: SimpleChanges) {\r\n if (changes.config && !changes.config.isFirstChange()) {\r\n this.config = changes.config.currentValue;\r\n }\r\n this.page = this.config.page || 1;\r\n this.lastPage = this.config.lastPage || this.page;\r\n this.perPage = this.config.perPage || 20;\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage) {\r\n this.page += 1;\r\n this.tableScroll.emit({ page: this.page, lastPage: this.lastPage, perPage: this.perPage });\r\n }\r\n }\r\n\r\n /**Method invokes when edit action icon is clickes */\r\n editClicked(event: any, element: any) {\r\n this.action.emit({ action: \"edit\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when view action icon is clickes */\r\n viewClicked(event: any, element: any) {\r\n this.action.emit({ action: \"view\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when edit action icon is clickes */\r\n deactivateClicked(event: any, element: any) {\r\n this.action.emit({ action: \"deactivate\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when download action icon is clickes */\r\n downloadClicked(event: any, element: any) {\r\n this.action.emit({ action: \"download\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when print action icon is clickes */\r\n printClicked(event: any, element: any) {\r\n\r\n this.action.emit({ action: 'print', value: element });\r\n event.stopPropagation();\r\n\r\n }\r\n\r\n /**Method invokes when a row is clicked */\r\n rowClicked(event: any, element: any) {\r\n this.rowClick.emit(element);\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when menu action icon is hovered */\r\n actionMenuClick(event: any, element: any, menuValue: string) {\r\n this.action.emit({ action: menuValue, value: element });\r\n this.trigger.closeMenu();\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when menu action icon is hovered and selects for particular action*/\r\n actionMenuTriggerClick(event: any, trigger: MatMenuTrigger) {\r\n this.trigger = trigger;\r\n event.stopPropagation();\r\n }\r\n\r\n checkEdit(ele: any) {\r\n if (this.config.editDisableFunction) {\r\n return this.config.editDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkView(ele: any) {\r\n if (this.config.viewDisableFunction) {\r\n return this.config.viewDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkPrint(ele: any) {\r\n if (this.config.printDisableFunction) {\r\n return this.config.printDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkActions(ele: any) {\r\n if (this.config.actionsMenuFunction) {\r\n return this.config.actionsMenuFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkActionButton(ele: any, value: any) {\r\n if (this.config.actionsMenuButtonFunction) {\r\n return this.config.actionsMenuButtonFunction(ele, value);\r\n }\r\n return true;\r\n }\r\n\r\n getValue(ele: any, keyString: string) {\r\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\r\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\r\n const keyList = keyString.split(\".\");\r\n for (let i = 0, n = keyList.length; i < n; ++i) {\r\n const key = keyList[i];\r\n if (ele && key in ele) {\r\n ele = ele[key];\r\n } else {\r\n return;\r\n }\r\n }\r\n return ele;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until Destroy uses it.\r\n }\r\n}\r\n","export class DataTable {\r\n displayedColumns: string[];\r\n columnsConfig: ColumnConfig[];\r\n actionsConfig?: ActionConfig;\r\n enableRowClick?: boolean;\r\n disableElevation?: boolean;\r\n downloadLink?: string;\r\n actionsMenuFunction?: any;\r\n actionsMenuButtonFunction?: any;\r\n editDisableFunction?: any;\r\n viewDisableFunction?: any;\r\n printDisableFunction?: any;\r\n customActionLabel?: string;\r\n stickyHeader?: boolean;\r\n page?: number;\r\n lastPage?: number;\r\n perPage?: number;\r\n pageSizeOptions?: number[];\r\n style?: any;\r\n}\r\n\r\nclass ColumnConfig {\r\n title: string;\r\n value: string;\r\n sort?: boolean;\r\n dateField?: boolean;\r\n currencyField?: boolean;\r\n format?: string;\r\n}\r\n\r\nclass ActionConfig {\r\n edit?: boolean;\r\n view?: boolean;\r\n download?: boolean;\r\n print?: boolean;\r\n deactivate?: boolean;\r\n actionsMenu?: ActionsMenu[];\r\n}\r\n\r\nclass ActionsMenu {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nexport class PageEvent {\r\n page: number;\r\n lastPage?: number;\r\n perPage: number;\r\n}\r\n","import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\r\nimport { ViewerConfig } from './viewer-config.model';\r\n\r\n@Component({\r\n selector: 'app-document-viewer',\r\n templateUrl: './document-viewer.component.html',\r\n styleUrls: ['./document-viewer.component.css']\r\n})\r\nexport class DocumentViewerComponent implements OnInit {\r\n\r\n\r\n @Input() config!: ViewerConfig;\r\n\r\n @Input() file!: any;\r\n\r\n @Input() fileUrl!: any;\r\n\r\n @Input() disableEdit: boolean;\r\n\r\n @Output() remove = new EventEmitter();\r\n viewerType: any;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n this.initData();\r\n }\r\n\r\n removeFile() {\r\n this.remove.emit();\r\n }\r\n\r\n initData() {\r\n if (this.file) {\r\n var ext = this.getFileExtension(this.file);\r\n if (ext === 'ppt' || ext === 'pptx' || ext === 'doc' || ext === 'docx' || ext === 'xls' || ext === 'xlsx') {\r\n this.viewerType = \"office\";\r\n }\r\n else if (ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif') {\r\n this.viewerType = \"image\";\r\n }\r\n else if (ext === 'pdf') {\r\n this.viewerType = \"pdf\";\r\n }\r\n else {\r\n this.viewerType = null;\r\n }\r\n }\r\n }\r\n\r\n get fileName() {\r\n if (this.file) {\r\n let nameArray = this.file.split('/');\r\n if (nameArray.length === 2) {\r\n return nameArray[1];\r\n }\r\n return nameArray[0];\r\n }\r\n return '';\r\n }\r\n\r\n getFileExtension(file: any) {\r\n return file.split('.').pop();\r\n }\r\n\r\n}\r\n","/**\r\n * Simple logger system with the possibility of registering custom outputs.\r\n *\r\n * 4 different log levels are provided, with corresponding methods:\r\n * - debug : for debug information\r\n * - info : for informative status of the application (success, ...)\r\n * - warning : for non-critical errors that do not prevent normal application behavior\r\n * - error : for critical errors that prevent normal application behavior\r\n *\r\n * Example usage:\r\n * ```\r\n * import { Logger } from 'app/core/logger.service';\r\n *\r\n * const log = new Logger('myFile');\r\n * ...\r\n * log.debug('something happened');\r\n * ```\r\n *\r\n * To disable debug and info logs in production, add this snippet to your root component:\r\n * ```\r\n * export class AppComponent implements OnInit {\r\n * ngOnInit() {\r\n * if (environment.production) {\r\n * Logger.enableProductionMode();\r\n * }\r\n * ...\r\n * }\r\n * }\r\n *\r\n * If you want to process logs through other outputs than console, you can add LogOutput functions to Logger.outputs.\r\n */\r\n\r\n/**\r\n * The possible log levels.\r\n * LogLevel.Off is never emitted and only used with Logger.level property to disable logs.\r\n */\r\nexport enum LogLevel {\r\n Off = 0,\r\n Error,\r\n Warning,\r\n Info,\r\n Debug\r\n}\r\n\r\n/**\r\n * Log output handler function.\r\n */\r\nexport type LogOutput = (source: string | undefined, level: LogLevel, ...objects: any[]) => void;\r\n\r\nexport class Logger {\r\n\r\n /**\r\n * Current logging level.\r\n * Set it to LogLevel.Off to disable logs completely.\r\n */\r\n static level = LogLevel.Debug;\r\n\r\n /**\r\n * Additional log outputs.\r\n */\r\n static outputs: LogOutput[] = [];\r\n\r\n /**\r\n * Enables production mode.\r\n * Sets logging level to LogLevel.Warning.\r\n */\r\n static enableProductionMode() {\r\n Logger.level = LogLevel.Warning;\r\n }\r\n\r\n constructor(private source?: string) { }\r\n\r\n /**\r\n * Logs messages or objects with the debug level.\r\n * Works the same as console.log().\r\n */\r\n debug(...objects: any[]) {\r\n this.log(console.log, LogLevel.Debug, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the info level.\r\n * Works the same as console.log().\r\n */\r\n info(...objects: any[]) {\r\n this.log(console.info, LogLevel.Info, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the warning level.\r\n * Works the same as console.log().\r\n */\r\n warn(...objects: any[]) {\r\n this.log(console.warn, LogLevel.Warning, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the error level.\r\n * Works the same as console.log().\r\n */\r\n error(...objects: any[]) {\r\n this.log(console.error, LogLevel.Error, objects);\r\n }\r\n\r\n private log(func: (...args: any[]) => void, level: LogLevel, objects: any[]) {\r\n if (level <= Logger.level) {\r\n const log = this.source ? ['[' + this.source + ']'].concat(objects) : objects;\r\n func.apply(console, log);\r\n Logger.outputs.forEach(output => output.apply(output, [this.source, level, ...objects]));\r\n }\r\n }\r\n\r\n}\r\n","export class ViewerConfig {\r\n imageStyle?: any;\r\n viewerStyle?: any;\r\n hideRemove?: boolean;\r\n}\r\n","/**\r\n * Class that stores the configuration data\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20180724\r\n */\r\nexport class TechlifyConfig {\r\n projectKey: string = '';\r\n environment: string = '';\r\n authClientSecret: string = '';\r\n authGrantType: string = '';\r\n apiUrl: string = '';\r\n rawConfigs: any;\r\n storage: Storage;\r\n isLogoutWhileApiGetsFailed: boolean = false;\r\n\r\n constructor(data: any) {\r\n this.loadFromMap(data);\r\n }\r\n\r\n loadFromMap(data: any) {\r\n this.projectKey = data.projectKey;\r\n this.environment = data.environment;\r\n this.authClientSecret = data.authClientSecret;\r\n this.authGrantType = data.authGrantType;\r\n this.apiUrl = data.apiUrl;\r\n this.storage = data?.storage;\r\n this.rawConfigs = data;\r\n this.isLogoutWhileApiGetsFailed = data?.isLogoutWhileApiGetsFailed;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { TechlifyConfig } from \"./techlify-config.model\";\r\n\r\n/**\r\n * Service that provides settings for all other services\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20170709\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfigService {\r\n\r\n public static BASE_CREDENTIALS = \"credentials\";\r\n\r\n private config: TechlifyConfig;\r\n\r\n constructor(config: TechlifyConfig) {\r\n this.config = config;\r\n }\r\n\r\n getConfigsRaw() {\r\n return this.config.rawConfigs;\r\n }\r\n\r\n getProjectKey() {\r\n return this.config.projectKey;\r\n }\r\n\r\n getApiUrl() {\r\n return this.config.apiUrl;\r\n }\r\n\r\n getAuthClientSecret() {\r\n return this.config.authClientSecret;\r\n }\r\n\r\n getStorage() {\r\n return this.config.storage ? this.config.storage : localStorage;\r\n }\r\n\r\n getAuthGrantType() {\r\n return this.config.authGrantType;\r\n }\r\n\r\n getCredentialsKey() {\r\n return this.config.projectKey + \"_\" + ConfigService.BASE_CREDENTIALS;\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\r\n\r\n@Component({\r\n selector: 'snack-bar-component-example-snack',\r\n templateUrl: 'success-snack.html',\r\n styleUrls: ['./snack.scss'],\r\n})\r\nexport class SuccessSnackComponent {\r\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\r\n}\r\n@Component({\r\n selector: 'snack-bar-component-example-snack',\r\n templateUrl: 'error-snack.html',\r\n styleUrls: ['./snack.scss'],\r\n})\r\nexport class ErrorSnackComponent {\r\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\r\n}\r\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 { TechlifyConfig } from './techlify-config.model';\r\nimport { 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 private config: TechlifyConfig,\r\n ) {\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 if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n location.reload();\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError } from 'rxjs/operators';\r\nimport { Logger } from './logger.service';\r\nimport { ConfigService } from './config.service';\r\nimport { ErrorHandlerService } from './error-handler.service';\r\n\r\nconst log = new Logger('ErrorHandlerInterceptor');\r\n\r\n/**\r\n * Adds a default error handler to all requests.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ErrorHandlerInterceptor implements HttpInterceptor {\r\n\r\n constructor(private configService: ConfigService, private errorHandler: ErrorHandlerService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n return next.handle(request).pipe(catchError(error => this.handleError(error)));\r\n }\r\n\r\n // Customize the default error handler here if needed\r\n private handleError(error: HttpErrorResponse): Observable<HttpEvent<any>> {\r\n let errorMessage = '';\r\n if (error.error instanceof ErrorEvent) {\r\n // client-side error\r\n errorMessage = `Client Error: ${this.configService?.getProjectKey()}: ${error.error.message}`;\r\n } else {\r\n // server-side error\r\n errorMessage = `Server Error: ${this.configService?.getProjectKey()}`;\r\n try {\r\n this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');\r\n } catch (e) {\r\n console.log(\"Unable to handle server error\", e);\r\n }\r\n }\r\n return throwError(error);\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpResponse } from '@angular/common/http';\r\nimport { ConfigService } from './config.service';\r\nimport { Logger } from './logger.service';\r\n\r\nconst log = new Logger('HttpCacheService');\r\n\r\n\r\nexport interface HttpCacheEntry {\r\n lastUpdated: Date;\r\n data: HttpResponse<any>;\r\n}\r\n\r\n/**\r\n * Provides a cache facility for HTTP requests with configurable persistence policy.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HttpCacheService {\r\n\r\n private cachedData: { [key: string]: HttpCacheEntry; } = {};\r\n private storage: Storage | any | null;\r\n private cachePersistenceKey: String | any;\r\n\r\n constructor(private configService: ConfigService) {\r\n this.storage = this.configService.getStorage();\r\n this.cachePersistenceKey = this.configService.getProjectKey() + '_HTTP_CACHE';\r\n this.loadCacheData();\r\n }\r\n\r\n /**\r\n * Sets the cache data for the specified request.\r\n * @param {!string} url The request URL.\r\n * @param {ResponseOptions} data The received data.\r\n * @param {Date=} lastUpdated The cache last update, current date is used if not specified.\r\n */\r\n setCacheData(url: string, data: HttpResponse<any>, lastUpdated?: Date) {\r\n this.cachedData[url] = {\r\n lastUpdated: lastUpdated || new Date(),\r\n data: data\r\n };\r\n log.debug(`Cache set for key: \"${url}\"`);\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Gets the cached data for the specified request.\r\n * @param {!string} url The request URL.\r\n * @return {?ResponseOptions} The cached data or null if no cached data exists for this request.\r\n */\r\n getCacheData(url: string): HttpResponse<any> | null {\r\n const cacheEntry = this.cachedData[url];\r\n\r\n if (cacheEntry) {\r\n log.debug(`Cache hit for key: \"${url}\"`);\r\n return cacheEntry.data;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets the cached entry for the specified request.\r\n * @param {!string} url The request URL.\r\n * @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.\r\n */\r\n getHttpCacheEntry(url: string): HttpCacheEntry | null {\r\n return this.cachedData[url] || null;\r\n }\r\n\r\n /**\r\n * Clears the cached entry (if exists) for the specified request.\r\n * @param {!string} url The request URL.\r\n */\r\n clearCache(url: string): void {\r\n delete this.cachedData[url];\r\n log.debug(`Cache cleared for key: \"${url}\"`);\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Cleans cache entries older than the specified date.\r\n * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.\r\n */\r\n cleanCache(expirationDate?: Date) {\r\n if (expirationDate) {\r\n Object(this.cachedData).keys.forEach((key: string) => {\r\n if (expirationDate >= this.cachedData[key]?.lastUpdated) {\r\n delete this.cachedData[key];\r\n }\r\n });\r\n } else {\r\n this.cachedData = {};\r\n }\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Sets the cache persistence policy.\r\n * Note that changing the cache persistence will also clear the cache from its previous storage.\r\n * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session\r\n * storage, or if no value is provided it will be only in-memory (default).\r\n */\r\n setPersistence(persistence?: 'local' | 'session') {\r\n this.cleanCache();\r\n this.storage = persistence === 'local' ? localStorage : persistence === 'session' ? sessionStorage : null;\r\n this.loadCacheData();\r\n }\r\n\r\n private saveCacheData() {\r\n if (this.storage) {\r\n this.storage[this.cachePersistenceKey] = JSON.stringify(this.cachedData);\r\n }\r\n }\r\n\r\n private loadCacheData() {\r\n const data = this.storage ? this.storage[this.cachePersistenceKey] : null;\r\n this.cachedData = data ? JSON.parse(data) : {};\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { HttpCacheService } from './http-cache.service';\r\nimport { Observable, Subscriber } from 'rxjs';\r\n\r\n/**\r\n * Caches HTTP requests.\r\n * Use ExtendedHttpClient fluent API to configure caching for each request.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CacheInterceptor implements HttpInterceptor {\r\n\r\n private forceUpdate = false;\r\n\r\n constructor(private httpCacheService: HttpCacheService) { }\r\n\r\n /**\r\n * Configures interceptor options\r\n * @param {{update: boolean}} options If update option is enabled, forces request to be made and updates cache entry.\r\n * @return {CacheInterceptor} The configured instance.\r\n */\r\n configure(options?: { update?: boolean } | null): CacheInterceptor {\r\n const instance = new CacheInterceptor(this.httpCacheService);\r\n if (options && options.update) {\r\n instance.forceUpdate = true;\r\n }\r\n return instance;\r\n }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n if (request.method !== 'GET') {\r\n return next.handle(request);\r\n }\r\n\r\n return new Observable((subscriber: Subscriber<HttpEvent<any>>) => {\r\n const cachedData = this.forceUpdate ? null : this.httpCacheService.getCacheData(request.urlWithParams);\r\n if (cachedData !== null) {\r\n // Create new response to avoid side-effects\r\n subscriber.next(new HttpResponse(cachedData as Object));\r\n subscriber.complete();\r\n } else {\r\n next.handle(request)\r\n .subscribe(\r\n event => {\r\n if (event instanceof HttpResponse) {\r\n this.httpCacheService.setCacheData(request.urlWithParams, event);\r\n }\r\n subscriber.next(event);\r\n },\r\n error => subscriber.error(error),\r\n () => subscriber.complete()\r\n );\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigService } from './config.service';\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ApiPrefixInterceptor implements HttpInterceptor {\r\n\r\n constructor(private configService: ConfigService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n if (!/^(http|https):/i.test(request.url)) {\r\n request = request.clone({ url: this.configService.getApiUrl() + request.url });\r\n }\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ConfigService } from './config.service';\r\n\r\nexport interface Credentials {\r\n // Customize received credentials here\r\n user: any;\r\n token: any;\r\n}\r\n\r\n/**\r\n * Provides storage for authentication credentials.\r\n * The Credentials interface should be replaced with proper implementation.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CredentialsService {\r\n\r\n private _credentials: Credentials | null = null;\r\n\r\n constructor(private configService: ConfigService) {\r\n }\r\n\r\n /**\r\n * Checks is the user is authenticated.\r\n * @return True if the user is authenticated.\r\n */\r\n get isAuthenticated(): boolean {\r\n return !!this.credentials;\r\n }\r\n\r\n /**\r\n * Gets the user credentials.\r\n * @return The user credentials or null if the user is not authenticated.\r\n */\r\n get credentials(): Credentials | null {\r\n if (!this._credentials) {\r\n this._credentials = JSON.parse(sessionStorage.getItem(this.configService.getCredentialsKey()) || localStorage.getItem(this.configService.getCredentialsKey()));\r\n }\r\n return this._credentials;\r\n }\r\n\r\n /**\r\n * Sets the user credentials.\r\n * The credentials may be persisted across sessions by setting the `remember` parameter to true.\r\n * Otherwise, the credentials are only persisted for the current session.\r\n * @param credentials The user credentials.\r\n * @param remember True to remember credentials across sessions.\r\n */\r\n setCredentials(credentials?: Credentials, remember?: boolean) {\r\n this._credentials = credentials || null;\r\n\r\n if (credentials) {\r\n (remember ? localStorage : sessionStorage).setItem(this.configService.getCredentialsKey(), JSON.stringify(credentials));\r\n } else {\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n this._credentials = null;\r\n }\r\n }\r\n\r\n getAccessToken(): string | null {\r\n const expiration = this.credentials?.token?.expires_in || '';\r\n const token = this.credentials?.token?.access_token || '';\r\n\r\n if (!token || !expiration) {\r\n return null;\r\n }\r\n\r\n if (Date.now() > parseInt(expiration)) {\r\n this.setCredentials();\r\n return null;\r\n }\r\n\r\n return token;\r\n }\r\n\r\n getExpiration(): string {\r\n return this.credentials?.token?.expires_in || '';\r\n }\r\n\r\n getRefreshToken(): string {\r\n return this.credentials?.token?.refresh_token || '';\r\n }\r\n\r\n refresh(): CredentialsService {\r\n this._credentials = null;\r\n return this;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { CredentialsService } from './credentials.service';\r\n\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenInterceptor implements HttpInterceptor {\r\n\r\n constructor(private credentials: CredentialsService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n request = request.clone({\r\n setHeaders: {\r\n Authorization: `Bearer ${this.credentials.getAccessToken() || ''}`\r\n }\r\n });\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\n\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HeaderInterceptor implements HttpInterceptor {\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n request = request.clone({\r\n setHeaders: {\r\n 'Content-Type': request.headers.get('Content-Type') || 'application/json',\r\n }\r\n });\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core';\r\nimport { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\n\r\nimport { Observable } from 'rxjs';\r\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\r\nimport { CacheInterceptor } from './cache.interceptor';\r\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\r\nimport { TokenInterceptor } from './token.interceptor';\r\nimport { HeaderInterceptor } from './header.interceptor';\r\n\r\n\r\n// Augment HttpClient with the added configuration methods from HttpService, to allow in-place replacement of\r\n// HttpClient with HttpService using dependency injection\r\nexport interface HttpCustomClient {\r\n\r\n /**\r\n * Enables caching for this request.\r\n * @param {boolean} forceUpdate Forces request to be made and updates cache entry.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n cache(forceUpdate?: boolean): HttpCustomClient;\r\n\r\n /**\r\n * Skips default error handler for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipErrorHandler(): HttpCustomClient;\r\n\r\n /**\r\n * Skips default API Prefix for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipApiPrefix(): HttpCustomClient;\r\n\r\n\r\n /**\r\n * Skips default Token Interceptor for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipToken(): HttpCustomClient;\r\n\r\n /**\r\n* Skips default Header Interceptor for this request.\r\n* @return {HttpCustomClient} The new instance.\r\n*/\r\n skipHeader(): HttpCustomClient;\r\n\r\n}\r\n\r\n\r\n// From @angular/common/http/src/interceptor: allows to chain interceptors\r\nclass HttpInterceptorHandler implements HttpHandler {\r\n\r\n constructor(private next: HttpHandler, private interceptor: HttpInterceptor) { }\r\n\r\n handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {\r\n return this.interceptor.intercept(request, this.next);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * Allows to override default dynamic interceptors that can be disabled with the HttpService extension.\r\n * Except for very specific needs, you should better configure these interceptors directly in the constructor below\r\n * for better readability.\r\n *\r\n * For static interceptors that should always be enabled (like ApiPrefixInterceptor), use the standard\r\n * HTTP_INTERCEPTORS token.\r\n */\r\nexport const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken<HttpInterceptor>('HTTP_DYNAMIC_INTERCEPTORS');\r\n\r\n/**\r\n * Extends HttpClient with per request configuration using dynamic interceptors.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HttpService extends HttpClient implements HttpCustomClient {\r\n\r\n constructor(private httpHandler: HttpHandler,\r\n private injector: Injector,\r\n @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = []) {\r\n super(httpHandler);\r\n\r\n if (!this.interceptors) {\r\n // Configure default interceptors that can be disabled here\r\n this.interceptors = [this.injector.get(ApiPrefixInterceptor), this.injector.get(HeaderInterceptor), this.injector.get(TokenInterceptor), this.injector.get(ErrorHandlerInterceptor)];\r\n }\r\n }\r\n\r\n cache(forceUpdate?: boolean): HttpService {\r\n const cacheInterceptor = this.injector.get(CacheInterceptor).configure({ update: forceUpdate });\r\n return this.addInterceptor(cacheInterceptor);\r\n }\r\n\r\n skipErrorHandler(): HttpService {\r\n return this.removeInterceptor(ErrorHandlerInterceptor);\r\n }\r\n\r\n skipApiPrefix(): HttpService {\r\n return this.removeInterceptor(ApiPrefixInterceptor);\r\n }\r\n\r\n skipToken(): HttpService {\r\n return this.removeInterceptor(TokenInterceptor);\r\n }\r\n\r\n skipHeader(): HttpService {\r\n return this.removeInterceptor(HeaderInterceptor);\r\n }\r\n\r\n // Override the original method to wire interceptors when triggering the request.\r\n request(method?: any, url?: any, options?: any): any {\r\n const handler = this.interceptors.reduceRight(\r\n (next, interceptor) => new HttpInterceptorHandler(next, interceptor),\r\n this.httpHandler\r\n );\r\n return new HttpClient(handler).request(method, url, options);\r\n }\r\n\r\n private removeInterceptor(interceptorType: Function): HttpService {\r\n return new HttpService(\r\n this.httpHandler,\r\n this.injector,\r\n this.interceptors.filter(i => !(i instanceof interceptorType))\r\n );\r\n }\r\n\r\n private addInterceptor(interceptor: HttpInterceptor): HttpService {\r\n return new HttpService(\r\n this.httpHandler,\r\n this.injector,\r\n this.interceptors.concat([interceptor])\r\n );\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EntityFileService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getEntityFiles(filters: any) {\r\n return this.http.get(`api/entity-files`, { params: filters }).toPromise();\r\n }\r\n\r\n createEntityFile(model: any) {\r\n return this.http.post(\"api/entity-files\", model).toPromise();\r\n }\r\n\r\n updateEntityFile(model: any) {\r\n return this.http.put(`api/entity-files/${model.id}`, model).toPromise();\r\n }\r\n\r\n deleteEntityFile(model: any) {\r\n return this.http.delete(`api/entity-files/${model.id}`).toPromise();\r\n }\r\n\r\n uploadEntityFile(file: File, params?: any) {\r\n const formData: FormData = new FormData();\r\n formData.append(\"fileData\", file, file.name);\r\n if (params?.entity_id) {\r\n formData.append('entity_id', params.entity_id);\r\n formData.append('entity_type', params.entity_type);\r\n }\r\n return this.http\r\n .skipHeader()\r\n .post(\r\n \"api/entity-files-upload\",\r\n formData,\r\n ).toPromise();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormValidatorService {\r\n\r\n constructor() { }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string, formGroup: FormGroup | any, firstAttempt?: boolean) {\r\n return (!formGroup.get(field).valid && formGroup.get(field).touched) ||\r\n (!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string, formGroup: FormGroup | any, errorMessages: any, errorField?: string) {\r\n const error = Object.keys(formGroup.get(field).errors);\r\n return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Inject } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\r\nimport { EntityFileService } from '../entity-file.service';\r\nimport { FileDropperConfig } from '../../file-dropper/file-dropper.model';\r\nimport { ViewerConfig } from '../../document-viewer/viewer-config.model';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { AlertService } from \"../../core/alert.service\";\r\n\r\nconst errorMessages: any = {\r\n url: {\r\n required: \"File is required\"\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'entity-file-form',\r\n templateUrl: './entity-file-form.component.html',\r\n styleUrls: ['./entity-file-form.component.css']\r\n})\r\nexport class EntityFileFormComponent implements OnInit {\r\n\r\n entityFileGroup: FormGroup;\r\n assignmentFileFirstAttempt: boolean;\r\n updateMode: boolean;\r\n fileConfig: FileDropperConfig;\r\n fileList: any[] = [];\r\n viewerConfig: ViewerConfig;\r\n hideTitleAndDetails: boolean;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<EntityFileFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private formValidatorService: FormValidatorService,\r\n private fb: FormBuilder,\r\n private entityFileService: EntityFileService,\r\n private alertService: AlertService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.entityFileGroup = this.fb.group({\r\n id: [''],\r\n title: [''],\r\n details: [''],\r\n entity_type: [''],\r\n entity_id: [],\r\n file: ['', Validators.required],\r\n url: ['', Validators.required],\r\n file_size: ['', Validators.required],\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.data.entity) {\r\n this.entityFileGroup.get('entity_type').setValue(this.data.entity.entity_type);\r\n this.entityFileGroup.get('entity_id').setValue(this.data.entity.entity_id);\r\n }\r\n if (this.data.file) {\r\n this.updateMode = true;\r\n this.entityFileGroup.patchValue(this.data.file);\r\n }\r\n\r\n if (this.data?.hideTitleAndDetails) {\r\n this.hideTitleAndDetails = this.data?.hideTitleAndDetails;\r\n }\r\n\r\n //File dropper config\r\n this.fileConfig = {\r\n fileId: \"subjectFile\",\r\n containerId: \"subjectFileContainer\",\r\n styles: {\r\n height: \"200px\"\r\n },\r\n multiple: false,\r\n acceptFile: \"*\",\r\n maxSize: 10,\r\n acceptFileText: \"All Files\"\r\n };\r\n\r\n this.viewerConfig = {\r\n viewerStyle: {\r\n height: '200px',\r\n width: '100%'\r\n }\r\n }\r\n }\r\n\r\n\r\n //Method to trigger submit\r\n async submit() {\r\n this.assignmentFileFirstAttempt = true;\r\n if (!this.entityFileGroup.valid) {\r\n return;\r\n }\r\n const model = this.entityFileGroup.value;\r\n\r\n if (this.hideTitleAndDetails) {\r\n model.title = model.file;\r\n }\r\n\r\n const result: any = this.updateMode\r\n ? await this.entityFileService.updateEntityFile(model)\r\n : await this.entityFileService.createEntityFile(model);\r\n this.dialogRef.close(result.item);\r\n this.alertService.addAlert(\r\n \"File submitted successfully\",\r\n \"success\"\r\n );\r\n\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.fileList = event;\r\n\r\n if (this.fileList.length > 0) {\r\n\r\n const result: any = await this.entityFileService.uploadEntityFile(\r\n this.fileList[0],\r\n );\r\n this.entityFileGroup.patchValue(result.item);;\r\n this.fileList = [];\r\n }\r\n }\r\n\r\n\r\n async removeFile() {\r\n if (this.entityFileGroup.value.file) {\r\n try {\r\n this.entityFileGroup.patchValue({\r\n file: \"\",\r\n url: \"\"\r\n });\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to remove file, try later\", \"warn\");\r\n }\r\n }\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(\r\n field,\r\n this.entityFileGroup,\r\n this.assignmentFileFirstAttempt\r\n );\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(\r\n field,\r\n this.entityFileGroup,\r\n errorMessages\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { Location } from '@angular/common';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\r\nimport { EntityFileService } from './entity-file.service';\r\nimport { ActionPopup } from '../action-popup/action-popup.model';\r\nimport { FormControl } from '@angular/forms';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { ActionPopupComponent } from '../action-popup/action-popup.component';\r\nimport { ViewerConfig } from '../document-viewer/viewer-config.model';\r\nimport { FileDropperConfig } from '../file-dropper';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-entity-files-view-all',\r\n templateUrl: './entity-files-view-all.component.html',\r\n styleUrls: ['./entity-files-view-all.component.css']\r\n})\r\nexport class EntityFilesViewAllComponent implements OnInit {\r\n @Input() entityId: number;\r\n @Input() entityType: string;\r\n @Input() viewOnly: boolean = false;\r\n @Input() removeSearch: boolean;\r\n @Input() hideTitleAndDetails: boolean;\r\n @Input() displayMode: boolean;\r\n @Input() allowMultipleFiles: boolean = false;\r\n viewerConfig: ViewerConfig;\r\n @Input() title: string = \"File\";\r\n filters: any = {};\r\n entityFiles: any[] = [];\r\n displayedColumns = [\r\n 'index',\r\n 'title',\r\n 'details',\r\n 'file_size',\r\n 'uploaded_on',\r\n ];\r\n isWorking: boolean = false;\r\n search: FormControl = new FormControl('');\r\n page: number = 1;\r\n perPage: number = 25;\r\n lastPage: number = 0;\r\n fileConfig: FileDropperConfig;\r\n fileList: any[] = [];\r\n\r\n constructor(\r\n private entityFileService: EntityFileService,\r\n public location: Location,\r\n private alertService: AlertService,\r\n private dialog: MatDialog,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n //File dropper config\r\n this.fileConfig = {\r\n fileId: \"entityDashboardDropper\",\r\n containerId: \"entityDashboardDropperContainer\",\r\n styles: {\r\n height: \"500px\"\r\n },\r\n multiple: this.allowMultipleFiles,\r\n acceptFile: \"*\",\r\n maxSize: 10,\r\n acceptFileText: \"All Files\"\r\n };\r\n\r\n this.viewerConfig = {\r\n imageStyle: {\r\n height: '200px',\r\n width: '200px'\r\n },\r\n viewerStyle: {\r\n height: ' 160px',\r\n width: '200px'\r\n },\r\n hideRemove: true\r\n };\r\n\r\n if (this.hideTitleAndDetails) {\r\n this.displayedColumns = this.displayedColumns.filter(x => (x !== 'details') && (x !== 'title'));\r\n }\r\n\r\n this.filters = {\r\n entity_type: this.entityType,\r\n entity_id: this.entityId,\r\n title: \"\"\r\n };\r\n this.search.valueChanges.pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this)).subscribe(value => {\r\n this.filters.title = value;\r\n this.reload();\r\n })\r\n this.fetchEntityFilesDetails();\r\n if (!this.viewOnly) {\r\n this.displayedColumns.push('actions');\r\n }\r\n }\r\n\r\n async fetchEntityFilesDetails() {\r\n this.filters.page = this.page;\r\n this.filters.perPage = this.perPage;\r\n this.isWorking = true;\r\n const result: any = await this.entityFileService.getEntityFiles(this.filters);\r\n this.lastPage = result.last_page || this.page;\r\n this.entityFiles = this.entityFiles.concat(result.data);\r\n this.isWorking = false;\r\n }\r\n\r\n addEntityFile() {\r\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\r\n width: \"700px\",\r\n data: {\r\n entity: this.filters,\r\n hideTitleAndDetails: this.hideTitleAndDetails\r\n },\r\n autoFocus: false,\r\n restoreFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n const files = [...this.entityFiles];\r\n files.push(result);\r\n this.entityFiles = files;\r\n }\r\n });\r\n }\r\n\r\n editEntityFile(file: any) {\r\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\r\n width: \"700px\",\r\n autoFocus: false,\r\n data: {\r\n file: file,\r\n hideTitleAndDetails: this.hideTitleAndDetails\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEntityFile(file: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: \"Delete File\",\r\n message: `Are you sure to proceed delete the file ${file.title}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n const result = await this.entityFileService.deleteEntityFile(\r\n file\r\n );\r\n this.alertService.addAlert(\r\n \"File successfully deleted\",\r\n \"success\"\r\n );\r\n this.reload();\r\n\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage && !this.isWorking) {\r\n this.page += 1;\r\n this.fetchEntityFilesDetails();\r\n }\r\n }\r\n\r\n reload() {\r\n this.entityFiles = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.fetchEntityFilesDetails();\r\n }\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n resetFieldValue() {\r\n this.search.setValue(\"\");\r\n }\r\n\r\n sizeOf(bytes) {\r\n if (!bytes) { return \"0.00 B\"; }\r\n var e = Math.floor(Math.log(bytes) / Math.log(1024));\r\n return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.fileList = event;\r\n if (this.fileList.length > 0) {\r\n\r\n await this.fileList.forEach(async file => {\r\n const result: any = await this.entityFileService.uploadEntityFile(\r\n file,\r\n {\r\n entity_type: this.entityType,\r\n entity_id: this.entityId,\r\n }\r\n );\r\n });\r\n this.fileList = [];\r\n this.alertService.addAlert('Successfull uploaded', 'success');\r\n this.reload();\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { AlertService } from \"../core/alert.service\";\r\nimport { FileDropperConfig } from './file-dropper.model';\r\n\r\n\r\n@Component({\r\n selector: \"app-file-dropper\",\r\n templateUrl: \"./file-dropper.component.html\",\r\n styleUrls: [\"./file-dropper.component.scss\"]\r\n})\r\nexport class FileDropperComponent implements OnInit {\r\n @Input() fileArray: any[] = [];\r\n\r\n @Input() config: FileDropperConfig;\r\n\r\n @Output() fileChanged: any = new EventEmitter();\r\n\r\n border = \"1px dashed #989898\";\r\n\r\n @Input() styles: any;\r\n\r\n isSingleMode: boolean;\r\n\r\n constructor(private alertService: AlertService) { }\r\n\r\n /**Life cycle hook method */\r\n ngOnInit() {\r\n this.isSingleMode = !Boolean(this.config.multiple);\r\n }\r\n\r\n /**Method for dragging event */\r\n dragEnter(event: any) {\r\n event.target.style.background = this.config.dragColor || \"#c0c0c0\";\r\n\r\n event.target.style.border = \"1px dashed black\";\r\n\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drag over event */\r\n dragOver(event: any) {\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drag leave event */\r\n dragLeave(event: any) {\r\n event.target.style.background = \"\";\r\n event.target.style.border = this.border;\r\n\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drop event */\r\n dropEvent(event: any) {\r\n event.target.style.background = \"\";\r\n event.target.style.border = this.border;\r\n const droppedFiles: FileList = event.dataTransfer.files;\r\n if (droppedFiles.length > 0) {\r\n const fileArray = Array.from(droppedFiles);\r\n this.addFiles(fileArray);\r\n }\r\n event.preventDefault();\r\n }\r\n\r\n /**Method to list files selected */\r\n onFileChange(event: any) {\r\n if (event.target.files && event.target.files.length) {\r\n const fileArray = Array.from(event.target.files);\r\n this.addFiles(fileArray);\r\n const fileInput = document.getElementById(\r\n this.config.fileId\r\n ) as HTMLInputElement;\r\n fileInput.value = \"\";\r\n }\r\n }\r\n\r\n /**Method to add files in the array */\r\n addFiles(fileArray: any) {\r\n if (!this.isSingleMode) {\r\n fileArray.forEach((file: any) => {\r\n this.fileArray = this.fileArray.filter(\r\n (item: any) => item.name !== file.name\r\n );\r\n if (this.fileSizeAllowed(file)) {\r\n this.fileArray.push(file);\r\n }\r\n });\r\n\r\n this.fileArray.sort(this.sortFiles);\r\n this.fileChanged.emit(this.fileArray);\r\n } else {\r\n // Single Mode\r\n if (this.fileArray.length === 0) {\r\n if (this.fileSizeAllowed(fileArray[0])) {\r\n this.fileArray.push(fileArray[0]);\r\n this.fileArray.sort(this.sortFiles);\r\n this.fileChanged.emit(this.fileArray);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**Method to sort the files in asc */\r\n sortFiles(a: any, b: any) {\r\n const nameA = a.name.toUpperCase();\r\n const nameB = b.name.toUpperCase();\r\n if (nameA < nameB) {\r\n return -1;\r\n }\r\n if (nameA > nameB) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n /**Method tp validate the file size */\r\n fileSizeAllowed(file: any): boolean {\r\n if (!Boolean(this.config.maxSize)) {\r\n return true;\r\n } else if (file.size / (1024 * 1024) < this.config.maxSize) {\r\n return true;\r\n } else {\r\n this.alertService.addAlert(\r\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`,\r\n \"warn\"\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n /**Method invokes when the drop box is clicked to upload the file */\r\n clickEvent(event: any) {\r\n if (!(this.isSingleMode && this.fileArray.length > 0)) {\r\n document.getElementById(this.config.fileId).click();\r\n }\r\n event.preventDefault();\r\n }\r\n}\r\n","export class FileDropperConfig {\r\n containerId: string;\r\n fileId: string;\r\n styles?: any;\r\n multiple?: boolean;\r\n dragColor?: boolean;\r\n acceptFile: string; // use '*' to accept all file types.\r\n maxSize?: number; // size in MB\r\n acceptFileText?: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NoteService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getNotes(filterModel: any) {\r\n return this.http.get('api/notes', { params: filterModel }).toPromise();\r\n }\r\n\r\n addNote(note: any) {\r\n return this.http.post('api/notes', note).toPromise();\r\n }\r\n\r\n editNote(note: any) {\r\n return this.http.put(`api/notes/${note.id}`, note).toPromise();\r\n }\r\n\r\n deleteNote(note: any) {\r\n return this.http.delete(`api/notes/${note.id}`).toPromise();\r\n }\r\n}\r\n","import { Component, OnInit, Inject } from \"@angular/core\";\r\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { NoteService } from \"../note.service\";\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { AlertService } from \"../../core/alert.service\";\r\n\r\nconst errorMessages: any = {\r\n note: {\r\n required: \"Note is required\"\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'app-note-form',\r\n templateUrl: './note-form.component.html',\r\n styleUrls: ['./note-form.component.css']\r\n})\r\nexport class NoteFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n noteFormGroup: FormGroup;\r\n noteFormFirstAttempt: boolean;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<NoteFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n private noteService: NoteService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.noteFormGroup = this.fb.group({\r\n id: [\"\"],\r\n note: [\"\", Validators.compose([Validators.required])],\r\n model_type: [\"\"],\r\n related_model_id: [\"\"],\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (this.data.update) {\r\n this.updateMode = true;\r\n }\r\n this.noteFormGroup.patchValue(this.data.note);\r\n }\r\n\r\n //Method to trigger login\r\n async submit() {\r\n this.noteFormFirstAttempt = true;\r\n if (this.noteFormGroup.valid) {\r\n const model = this.noteFormGroup.value;\r\n const result = this.updateMode\r\n ? await this.noteService.editNote(model)\r\n : await this.noteService.addNote(model);\r\n\r\n this.alertService.addAlert(\r\n `${this.data?.labelText} saved successfully`,\r\n \"success\"\r\n );\r\n this.dialogRef.close(result);\r\n }\r\n }\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(\r\n field,\r\n this.noteFormGroup,\r\n this.noteFormFirstAttempt\r\n );\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(\r\n field,\r\n this.noteFormGroup,\r\n errorMessages\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { NoteService } from '../note.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { NoteFormComponent } from '../note-form/note-form.component';\r\nimport { ActionPopupComponent } from '../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../action-popup/action-popup.model';\r\n\r\n@Component({\r\n selector: 'app-note-list',\r\n templateUrl: './note-list.component.html',\r\n styleUrls: ['./note-list.component.css']\r\n})\r\nexport class NoteListComponent implements OnInit {\r\n\r\n @Input() relatedModelId !: any;\r\n @Input() modelType !: any;\r\n @Input() readonly: boolean = false;\r\n @Input() labelText: string = 'Note';\r\n @Input() commentsView: boolean = false;\r\n\r\n notes: any[] = [];\r\n filters: any;\r\n displayedColumns = [\r\n 'index',\r\n 'note',\r\n 'actions'\r\n ];\r\n\r\n page = 1;\r\n lastPage = 1;\r\n\r\n constructor(private noteService: NoteService,\r\n private dialog: MatDialog\r\n ) {\r\n this.filters = {};\r\n this.filters.sort_by = \"created_at|DESC\";\r\n }\r\n\r\n ngOnInit() {\r\n if (this.readonly) {\r\n this.displayedColumns = this.displayedColumns.filter(x => x !== 'actions');\r\n }\r\n this.filters.related_model_id = this.relatedModelId;\r\n this.filters.model_type = this.modelType;\r\n this.loadData();\r\n }\r\n\r\n async loadData() {\r\n\r\n const result: any = await this.noteService.getNotes({ ...this.filters, page: this.page });\r\n this.notes = this.notes.concat(result.data);\r\n this.page = result.current_page;\r\n this.lastPage = result.last_page;\r\n }\r\n\r\n addNote() {\r\n const dialogRef = this.dialog.open(NoteFormComponent, {\r\n width: \"400px\",\r\n data: {\r\n note: { related_model_id: this.relatedModelId, model_type: this.modelType },\r\n labelText: this.labelText,\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.resetScroll();\r\n this.loadData();\r\n }\r\n });\r\n }\r\n\r\n editNote(note: any) {\r\n const dialogRef = this.dialog.open(NoteFormComponent, {\r\n width: \"400px\",\r\n data: {\r\n note: note,\r\n update: true,\r\n labelText: this.labelText\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.resetScroll();\r\n this.loadData();\r\n }\r\n });\r\n }\r\n\r\n async deleteNote(note: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: `Delete ${this.labelText}`,\r\n message: `Are you sure to delete?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n\r\n const result = await this.noteService.deleteNote(note);\r\n this.notes = this.notes.filter((item: any) => item.id !== note.id);\r\n\r\n }\r\n });\r\n }\r\n\r\n resetScroll() {\r\n this.page = 1;\r\n this.lastPage = 1;\r\n this.notes = [];\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n commentAction(event: any) {\r\n if (event.type === \"save\") {\r\n if (event.value.id) {\r\n this.editComment(event.value);\r\n return;\r\n }\r\n this.addComment(event.value);\r\n return;\r\n }\r\n this.deleteNote(event.value);\r\n }\r\n\r\n async editComment(comment: any) {\r\n const result: any = await this.noteService.editNote(comment);\r\n let index = this.notes.findIndex(\r\n (x: any) => x.id === comment.id\r\n );\r\n if (index !== -1) {\r\n this.notes[index] = result.item;\r\n }\r\n }\r\n\r\n async addComment(comment: any) {\r\n comment.related_model_id = this.relatedModelId;\r\n comment.model_type = this.modelType;\r\n const result: any = await this.noteService.addNote(comment);\r\n this.notes.push(result.item);\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnDestroy\r\n} from \"@angular/core\";\r\nimport { FormGroup, FormBuilder } from \"@angular/forms\";\r\nimport { CredentialsService } from \"../../core/credentials.service\";\r\n\r\n@Component({\r\n selector: \"app-comment-form\",\r\n templateUrl: \"./comment-form.component.html\",\r\n styleUrls: [\"./comment-form.component.scss\"]\r\n})\r\nexport class CommentFormComponent implements OnInit, OnDestroy {\r\n commentFormGroup: FormGroup;\r\n view: boolean;\r\n _commentData: any;\r\n\r\n @Input() set commentData(data: any) {\r\n this.view = !!data;\r\n this._commentData = data;\r\n this.commentFormGroup.patchValue(data);\r\n }\r\n\r\n @Output() action = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder,\r\n private credentialService: CredentialsService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n ngOnInit() { }\r\n\r\n get isLoggedIn() {\r\n return this.credentialService.isAuthenticated;\r\n }\r\n\r\n get currentUser() {\r\n return this.credentialService.credentials.user;\r\n }\r\n\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.commentFormGroup = this.fb.group({\r\n id: [\"\"],\r\n note: [\"\"],\r\n model_type: [\"\"],\r\n related_model_id: [\"\"],\r\n });\r\n }\r\n\r\n submit() {\r\n if (this.commentFormGroup.get(\"note\").value) {\r\n if (this._commentData) {\r\n this.view = !this.view;\r\n }\r\n this.action.emit({ type: \"save\", value: this.commentFormGroup.value });\r\n this.commentFormGroup.reset();\r\n } else if (this.commentFormGroup.get(\"id\").value) {\r\n this.deleteComment();\r\n }\r\n }\r\n\r\n hideEdit() {\r\n if (this.commentFormGroup.get(\"id\").value) {\r\n this.view = !this.view;\r\n }\r\n }\r\n\r\n editComment() {\r\n this.view = !this.view;\r\n this.commentFormGroup.patchValue(this._commentData);\r\n }\r\n\r\n deleteComment() {\r\n this.action.emit({ type: \"delete\", value: this.commentFormGroup.value });\r\n }\r\n\r\n ngOnDestroy() { }\r\n}\r\n","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, Input, OnDestroy, OnInit, Optional, Self, Output, EventEmitter, TemplateRef } from '@angular/core';\r\nimport { FormBuilder, FormGroup, ControlValueAccessor, NgControl, Validators } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject, of, from } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged, startWith, switchMap, finalize } from 'rxjs/operators';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ComponentType } from '@angular/cdk/portal';\r\nimport { HttpService } from '../core/http.service';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-searchable-selector',\r\n templateUrl: './searchable-selector.component.html',\r\n styleUrls: ['./searchable-selector.component.scss'],\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n useExisting: SearchableSelectorComponent\r\n }\r\n ]\r\n})\r\nexport class SearchableSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\r\n\r\n @Input() valueField: string = 'id';\r\n @Input() titleField: string = 'title';\r\n @Input() apiUrl!: string;\r\n @Input() multiple: boolean = false;\r\n @Input() selectedValue: any;\r\n @Output() selectedValueChange = new EventEmitter();\r\n @Input() enableSearch: boolean = true;\r\n @Input() add: boolean = false;\r\n @Input() addConfig: any;\r\n @Input() edit: boolean = false;\r\n @Input() editConfig: any;\r\n @Input() sort: boolean = true;\r\n @Input() sortBy: string;\r\n @Input() searchField: string;\r\n @Input() itemComponent: ComponentType<unknown> | TemplateRef<unknown>;\r\n @Input() items: any[] = [];\r\n @Input() apiDataProperty: string = 'data';\r\n @Input() cache: boolean = false;\r\n @Input() perPage: number = 25;\r\n @Input() inDataSearch: boolean = false;\r\n @Output() selectionChange = new EventEmitter();\r\n @Output() itemsChange = new EventEmitter();\r\n\r\n\r\n isLoading: boolean = false;\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n static nextId = 0;\r\n selectorForm: FormGroup;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'searchable-selctor';\r\n id = `searchable-selctor-${SearchableSelectorComponent.nextId++}`;\r\n describedBy = '';\r\n filters: any;\r\n cachedItems: any[] = [];\r\n\r\n\r\n get empty() {\r\n const { value: { select_value } } = this.selectorForm;\r\n return !select_value;\r\n }\r\n\r\n get shouldLabelFloat() { return this.focused || !this.empty; }\r\n\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: boolean) {\r\n this.selectorForm.get('select_value').setValidators(Validators.required);\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean { return this._disabled; }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n @Input()\r\n get value(): any {\r\n if (this.selectorForm.valid) {\r\n return this.selectorForm.value.select_value;\r\n }\r\n return '';\r\n }\r\n set value(data: any) {\r\n this.selectorForm.patchValue({ select_value: data || '' });\r\n this.stateChanges.next();\r\n }\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n private _focusMonitor: FocusMonitor,\r\n private http: HttpService,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private dialog: MatDialog,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n this.selectorForm = formBuilder.group({\r\n select_value: [null],\r\n search: ''\r\n });\r\n\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n openedChange(event: any) {\r\n if (this.dataItems.length === 0 && this.selectorForm.get('search').value) {\r\n this.selectorForm.get('search').setValue('');\r\n }\r\n }\r\n\r\n get dataItems(): any[] {\r\n let items: any[] = [];\r\n if (this.multiple && this.selectedValue && (this.selectedValue.length > 0))\r\n items = [...this.selectedValue, ...this.items];\r\n else if ((!this.multiple) && this.selectedValue)\r\n items = [this.selectedValue, ...this.items];\r\n else\r\n items = this.items;\r\n items = items.filter((v, i, a) => a.findIndex(v => v[this.valueField] === a[i][this.valueField]) === i);\r\n //Emit the items to any child component\r\n this.itemsChange.emit(items);\r\n return items;\r\n }\r\n\r\n ngOnInit() {\r\n this.selectorForm.get('search').valueChanges\r\n .pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n if (this.enableSearch)\r\n this.search(value);\r\n });\r\n\r\n this.filters = {\r\n perPage: this.perPage,\r\n search: '',\r\n page: 1,\r\n lastPage: 1\r\n }\r\n if (this.sort) {\r\n this.filters.sort_by = this.sortBy || `${this.titleField}|asc`;\r\n }\r\n\r\n //Fetch Items only if it is not present, can be used in places where we load many entries.\r\n if (this.items.length === 0) {\r\n this.fetchItemList();\r\n }\r\n }\r\n\r\n fetchItemList() {\r\n this.isLoading = true;\r\n let request = this.http.get(this.apiUrl, { params: this.filters })\r\n if (this.cache) {\r\n request = this.http.cache().get(this.apiUrl, { params: this.filters })\r\n }\r\n of().pipe(\r\n startWith(true),\r\n switchMap((_) => from(request)),\r\n finalize(() => this.isLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.items = this.items.concat(result[this.apiDataProperty]);\r\n if (this.cache) {\r\n this.cachedItems = this.items;\r\n }\r\n this.filters.page = result?.current_page || 1;\r\n this.filters.lastPage = result?.last_page || 1;\r\n });\r\n }\r\n\r\n\r\n setDescribedByIds(ids: string[]) {\r\n this.describedBy = ids.join(' ');\r\n }\r\n\r\n onContainerClick(event: MouseEvent) {\r\n event.stopPropagation();\r\n }\r\n\r\n writeValue(data: any): void {\r\n this.value = data;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n getPropertyValue(ele: any, keyString: string) {\r\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\r\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\r\n const keyList = keyString.split(\".\");\r\n for (let i = 0, n = keyList.length; i < n; ++i) {\r\n const key = keyList[i];\r\n if (ele && key in ele) {\r\n ele = ele[key];\r\n } else {\r\n return;\r\n }\r\n }\r\n return ele;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n if (this.multiple)\r\n this.selectedValue = (this.value as []).map(x => this.dataItems.find(y => y[this.valueField] === x));\r\n else\r\n this.selectedValue = this.dataItems.find(x => x[this.valueField] === this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n get errorState(): boolean {\r\n return (this.ngControl && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty));\r\n }\r\n\r\n static ngAcceptInputType_disabled: boolean | string | null | undefined;\r\n static ngAcceptInputType_required: boolean | string | null | undefined;\r\n\r\n onScroll() {\r\n if (this.filters.lastPage > this.filters.page) {\r\n this.filters.page += 1;\r\n this.fetchItemList();\r\n }\r\n }\r\n\r\n reloadData() {\r\n this.items = [];\r\n this.filters.page = 1;\r\n this.filters.lastPage = 1;\r\n this.fetchItemList();\r\n }\r\n\r\n search(event: any) {\r\n if (this.searchField) {\r\n this.filters[this.searchField] = event;\r\n } else {\r\n this.filters.search = event;\r\n }\r\n // we need search field to search in data\r\n if (this.inDataSearch && this.searchField) {\r\n this.filterItems(event);\r\n } else {\r\n this.reloadData();\r\n }\r\n }\r\n\r\n filterItems(event: string) {\r\n if (event) {\r\n this.items = this.cachedItems.filter((value: any) => {\r\n return (value[this.searchField] as string).toLowerCase().search(event.toLowerCase()) != -1\r\n })\r\n } else {\r\n this.items = this.cachedItems;\r\n }\r\n }\r\n\r\n addItem(event: any) {\r\n const dialogRef = this.dialog.open(this.itemComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {},\r\n ...this.addConfig\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.items.push(result.item);\r\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\r\n this._handleInput();\r\n }\r\n });\r\n event.stopPropagation();\r\n }\r\n\r\n editItem(event: any) {\r\n const dialogRef = this.dialog.open(this.itemComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {\r\n item: this.selectedValue\r\n },\r\n ...this.editConfig\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.items = this.items.filter(x => x[this.valueField] !== this.selectedValue[this.valueField]);\r\n this.items.push(result.item);\r\n this.selectedValue = null;\r\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\r\n this._handleInput();\r\n }\r\n });\r\n event.stopPropagation();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { AfterViewInit, Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { MatSelect, SELECT_ITEM_HEIGHT_EM } from '@angular/material/select';\r\nimport { debounceTime, takeUntil, tap } from 'rxjs/operators';\r\nimport { fromEvent, Subject } from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[msInfiniteScroll]'\r\n})\r\nexport class MatSelectInfiniteScrollDirective implements OnInit, OnDestroy, AfterViewInit {\r\n\r\n @Input() threshold = '15%';\r\n @Input() debounceTime = 150;\r\n @Input() complete: boolean;\r\n @Output() infiniteScroll = new EventEmitter<void>();\r\n\r\n private panel: Element;\r\n private thrPx = 0;\r\n private thrPc = 0;\r\n private singleOptionHeight = SELECT_ITEM_HEIGHT_EM;\r\n\r\n private destroyed$ = new Subject<boolean>();\r\n\r\n constructor(private matSelect: MatSelect, private ngZone: NgZone) {\r\n }\r\n\r\n ngOnInit() {\r\n this.evaluateThreshold();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.matSelect.openedChange.pipe(\r\n takeUntil(this.destroyed$)\r\n ).subscribe((opened) => {\r\n if (opened) {\r\n this.panel = this.matSelect.panel.nativeElement;\r\n this.singleOptionHeight = this.getSelectItemHeightPx();\r\n this.registerScrollListener();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyed$.next(true);\r\n this.destroyed$.complete();\r\n }\r\n\r\n evaluateThreshold() {\r\n if (this.threshold.lastIndexOf('%') > -1) {\r\n this.thrPx = 0;\r\n this.thrPc = (parseFloat(this.threshold) / 100);\r\n\r\n } else {\r\n this.thrPx = parseFloat(this.threshold);\r\n this.thrPc = 0;\r\n }\r\n }\r\n\r\n registerScrollListener() {\r\n fromEvent(this.panel, 'scroll').pipe(\r\n takeUntil(this.destroyed$),\r\n debounceTime(this.debounceTime),\r\n tap((event) => {\r\n this.handleScrollEvent(event);\r\n })\r\n ).subscribe();\r\n }\r\n\r\n handleScrollEvent(event) {\r\n this.ngZone.runOutsideAngular(() => {\r\n if (this.complete) {\r\n return;\r\n }\r\n const countOfRenderedOptions = this.matSelect.options.length;\r\n const infiniteScrollDistance = this.singleOptionHeight * countOfRenderedOptions;\r\n const threshold = this.thrPc !== 0 ? (infiniteScrollDistance * this.thrPc) : this.thrPx;\r\n\r\n const scrolledDistance = this.panel.clientHeight + event.target.scrollTop;\r\n\r\n if ((scrolledDistance + threshold) >= infiniteScrollDistance) {\r\n this.ngZone.run(() => this.infiniteScroll.emit());\r\n }\r\n });\r\n }\r\n\r\n getSelectItemHeightPx(): number {\r\n return parseFloat(getComputedStyle(this.panel).fontSize) * SELECT_ITEM_HEIGHT_EM;\r\n }\r\n\r\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';\r\n\r\n/**\r\n * Service that provides utility functions for dates\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20170726\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DateUtils {\r\n\r\n /**\r\n * Takes in a date object and outputs the string value\r\n */\r\n getYYYYMMDDString(inputDate: Date): string {\r\n var year = inputDate.getFullYear();\r\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\r\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\r\n\r\n return year + \"-\" + month + \"-\" + date;\r\n }\r\n\r\n /**\r\n * Takes in a date object and outputs the year\r\n */\r\n getYYYY(inputDate: Date): number {\r\n var year = inputDate.getFullYear();\r\n return year;\r\n }\r\n\r\n /**\r\n * Takes in a date object and outputs the Month\r\n */\r\n getMM(inputDate: Date): number {\r\n var month = inputDate.getMonth() + 1;\r\n return month;\r\n }\r\n // var n = this.rfidCardUseManualEntry.manual_date.toLocaleTimeString();\r\n\r\n getDateTime(inputDate: Date): string {\r\n var year = inputDate.getFullYear();\r\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\r\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\r\n var time = inputDate.toLocaleTimeString();\r\n\r\n return year + \"-\" + month + \"-\" + date + \" \" + time;\r\n }\r\n\r\n}","import { Component, Input, Output, EventEmitter, OnInit } from \"@angular/core\";\r\n\r\n/**\r\n * Component to generate a number selector\r\n * \r\n * @author Floyd Kissoon\r\n * @since 20180628\r\n */\r\n@Component({\r\n selector: \"number-selector\",\r\n templateUrl: \"./number-selector.html\"\r\n})\r\nexport class NumberSelector implements OnInit {\r\n @Input() start_value: number;\r\n @Input() end_value: number\r\n @Output() selectedValueChange: EventEmitter<number>;\r\n @Input() selectedValue: number;\r\n\r\n items = new Array();\r\n\r\n constructor() {\r\n this.selectedValueChange = new EventEmitter<number>();\r\n }\r\n\r\n /**\r\n * Called when an item has been selected\r\n */\r\n numChanged() {\r\n this.selectedValueChange.emit(this.selectedValue);\r\n }\r\n\r\n\r\n ngOnInit() {\r\n for (var i = this.start_value; i < this.end_value + 1; i++) {\r\n this.items.push(i);\r\n }\r\n }\r\n}\r\n","export class Timeline {\r\n public static CUSTOM: number = 1;\r\n public static TODAY: number = 2;\r\n public static YESTERDAY: number = 3;\r\n public static THIS_WEEK: number = 4;\r\n public static LAST_WEEK: number = 5;\r\n public static THIS_MONTH: number = 6;\r\n public static LAST_MONTH: number = 7;\r\n public static THIS_QUARTER: number = 8;\r\n public static LAST_QUARTER: number = 9;\r\n public static THIS_YEAR: number = 10;\r\n public static LAST_YEAR: number = 11;\r\n public static ALL: number = 12;\r\n public static TOMMOROW: number = 13;\r\n public static NEXT_WEEK: number = 14;\r\n public static NEXT_MONTH: number = 15;\r\n}\r\n","import * as moment_ from 'moment';\r\nconst moment = moment_;\r\nimport { Timeline } from \"./timeline.model\";\r\n\r\n\r\nexport interface TimelineValue {\r\n date_from: Date,\r\n date_to: Date,\r\n show_custom_field: boolean\r\n}\r\nexport function calculateTimeline(value: any) {\r\n const date = new Date();\r\n const data: any = {\r\n 'date_from': date,\r\n 'date_to': date,\r\n 'show_custom_field': false\r\n };\r\n switch (value) {\r\n case Timeline.CUSTOM: { //Custom\r\n data.show_custom_field = true;\r\n break;\r\n }\r\n case Timeline.TODAY: { // Today\r\n let now = moment();\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.YESTERDAY: { // Yesterday\r\n let now = moment().subtract(1, 'day');\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_WEEK: { // This Week\r\n let now = moment();\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_WEEK: { // Last Week\r\n let now = moment().subtract(1, 'week');\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_MONTH: { //This Month\r\n let now = moment();\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_MONTH: { // Last Month\r\n let now = moment().subtract(1, 'month');\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_QUARTER: { // This Quarter\r\n let now = moment();\r\n data.date_from = now.startOf('quarter').toISOString();\r\n data.date_to = now.endOf('quarter').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_QUARTER: { // Last Quarter\r\n let now = moment().subtract(1, 'quarter');\r\n data.date_from = now.startOf('quarter').toISOString();\r\n data.date_to = now.endOf('quarter').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_YEAR: { // This Year\r\n let now = moment();\r\n data.date_from = now.startOf('year').toISOString();\r\n data.date_to = now.endOf('year').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_YEAR: { // Last Year\r\n let now = moment().subtract(1, 'year');\r\n data.date_from = now.startOf('year').toISOString();\r\n data.date_to = now.endOf('year').toISOString();\r\n break;\r\n }\r\n case Timeline.TOMMOROW: {\r\n let now = moment().add(1, 'day');\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.NEXT_WEEK: {\r\n let now = moment().add(1, 'week');\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.NEXT_MONTH: {\r\n let now = moment().add(1, 'month');\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n default: { // All\r\n data.date_from = '';\r\n data.date_to = '';\r\n break;\r\n }\r\n\r\n }\r\n return data;\r\n}\r\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { DatePipe } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Optional, Output, Self, ViewChild } from '@angular/core';\r\nimport { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl, Validators } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\nimport { TimelineValue, calculateTimeline } from './calculate-timeline';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { Timeline } from './timeline.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-timeline-filter',\r\n templateUrl: './timeline-filter.component.html',\r\n styleUrls: ['./timeline-filter.component.scss'],\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n useExisting: TimelineFilterComponent\r\n }\r\n ]\r\n})\r\nexport class TimelineFilterComponent implements OnInit, ControlValueAccessor {\r\n\r\n @ViewChild('picker') picker;\r\n @Input() timelineValue: FormControl = new FormControl('');\r\n @Input() timelines: any[] = [\r\n { value: Timeline.CUSTOM, viewValue: 'Custom' },\r\n { value: Timeline.TODAY, viewValue: 'Today' },\r\n { value: Timeline.YESTERDAY, viewValue: 'Yesterday' },\r\n { value: Timeline.TOMMOROW, viewValue: 'Tomorrow' },\r\n { value: Timeline.THIS_WEEK, viewValue: 'This Week' },\r\n { value: Timeline.LAST_WEEK, viewValue: 'Last Week' },\r\n { value: Timeline.NEXT_WEEK, viewValue: 'Next Week' },\r\n { value: Timeline.THIS_MONTH, viewValue: 'This Month' },\r\n { value: Timeline.LAST_MONTH, viewValue: 'Last Month' },\r\n { value: Timeline.NEXT_MONTH, viewValue: 'Next Month' },\r\n { value: Timeline.THIS_QUARTER, viewValue: 'This Quarter' },\r\n { value: Timeline.LAST_QUARTER, viewValue: 'Last Quarter' },\r\n { value: Timeline.THIS_YEAR, viewValue: 'This Year' },\r\n { value: Timeline.LAST_YEAR, viewValue: 'Last Year' },\r\n { value: Timeline.ALL, viewValue: 'All dates' },\r\n ];\r\n @Input() dateFrom: string = 'date_from';\r\n @Input() dateTo: string = 'date_to';\r\n @Input() appearance: any = \"legacy\"\r\n @Input() showClearbutton: boolean = false;\r\n /**\r\n * @deprecated The form input is deprated\r\n */\r\n @Input() form: FormGroup = null;\r\n @Input() labelText: string = 'Select Timeline';\r\n @Input() selectedValue: any;\r\n @Input() touchUi: boolean = true;\r\n @Output() selectedValueChange = new EventEmitter();\r\n @Output() selectionChange = new EventEmitter();\r\n\r\n selectorForm: FormGroup;\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n controlType = 'timeline-filter';\r\n id = `timeline-filter-${TimelineFilterComponent.nextId++}`;\r\n describedBy = '';\r\n\r\n selectedRange: TimelineValue;\r\n @Input() set defaultValue(value: any) {\r\n this.timelineValue.setValue(value);\r\n this.changeTimeline(value);\r\n }\r\n\r\n showCustomDateFields: boolean = false;\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n @Optional() @Self() public ngControl: NgControl,\r\n private datePipe: DatePipe\r\n ) {\r\n this.selectorForm = formBuilder.group({\r\n select_value: [null],\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: boolean) {\r\n this.selectorForm.get('select_value').setValidators(Validators.required);\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean { return this._disabled; }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n @Input()\r\n get value(): any {\r\n if (this.selectorForm.valid) {\r\n return this.selectorForm.value.select_value;\r\n }\r\n return '';\r\n }\r\n set value(data: any) {\r\n this.selectorForm.patchValue({ select_value: data || '' });\r\n this._handleInput();\r\n this.stateChanges.next();\r\n }\r\n\r\n getDateRangeString() {\r\n let str = \"\";\r\n if (this.selectedRange?.show_custom_field) {\r\n if (this.selectedRange?.date_from.toUTCString() != 'Invalid Date') {\r\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_from?.toUTCString())\r\n }\r\n if (this.selectedRange?.date_to.toUTCString() != 'Invalid Date') {\r\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_to?.toUTCString())\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.form.get(field).setValue('');\r\n }\r\n\r\n\r\n getFieldValue(field: string) {\r\n return this.form.get(field).value;\r\n }\r\n\r\n setFieldValue(field: string, value: any) {\r\n this.form.get(field).setValue(value);\r\n }\r\n\r\n changeTimeline(value: any) {\r\n const timeline = calculateTimeline(value);\r\n if (timeline) {\r\n this.setFieldValue(this.dateFrom, timeline.date_from)\r\n this.setFieldValue(this.dateTo, timeline.date_to)\r\n this.showCustomDateFields = timeline.show_custom_field;\r\n }\r\n }\r\n\r\n _handleInput(): void {\r\n if (this.value == 1) {\r\n this.picker.open();\r\n return;\r\n }\r\n const range: TimelineValue = calculateTimeline(this.value);\r\n this.selectedRange = range;\r\n this.onChange(this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(range);\r\n }\r\n\r\n dateRangeChange(dateRangeStart: HTMLInputElement, dateRangeEnd: HTMLInputElement) {\r\n const range: TimelineValue = {\r\n date_from : new Date(dateRangeStart.value),\r\n date_to: new Date(dateRangeEnd.value),\r\n show_custom_field: true\r\n }\r\n this.selectedRange = range;\r\n this.onChange(this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(range);\r\n }\r\n\r\n onCustomDateChange(event: any) {\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n this.describedBy = ids.join(' ');\r\n }\r\n\r\n onContainerClick(event: MouseEvent) {\r\n event.stopPropagation();\r\n }\r\n\r\n writeValue(data: any): void {\r\n this.value = data;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n ngOnInit(): void {\r\n console.log(this.form);\r\n\r\n this.timelineValue.valueChanges.\r\n pipe(\r\n debounceTime(100),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => this.changeTimeline(value));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-loader',\r\n templateUrl: './loader.component.html',\r\n styleUrls: ['./loader.component.scss']\r\n})\r\nexport class LoaderComponent implements OnInit {\r\n\r\n @Input() isLoading = false;\r\n @Input() size = 0.6;\r\n @Input() message: string | undefined;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { SuccessSnackComponent, ErrorSnackComponent } from './snack.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@NgModule({\r\n declarations: [\r\n SuccessSnackComponent,\r\n ErrorSnackComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatSnackBarModule,\r\n MatIconModule\r\n ],\r\n exports: [\r\n SuccessSnackComponent,\r\n ErrorSnackComponent,\r\n ]\r\n})\r\nexport class SnackModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { CredentialsService } from './credentials.service';\r\nimport { Logger } from './logger.service';\r\n\r\nconst log = new Logger('AuthenticationGuard');\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationGuard implements CanActivate {\r\n\r\n constructor(private router: Router,\r\n private credentialsService: CredentialsService) { }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n return this.isUserAuthenticated(route, state);\r\n }\r\n\r\n canLoad(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n return this.isUserAuthenticated(route, state);\r\n }\r\n\r\n isUserAuthenticated(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n if (this.credentialsService.isAuthenticated) {\r\n return true;\r\n }\r\n\r\n log.debug('Not authenticated, redirecting and adding redirect url...');\r\n this.router.navigate(['/login'], { queryParams: { redirect: state.url }, replaceUrl: true });\r\n return false;\r\n }\r\n\r\n}\r\n","\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, of } from 'rxjs';\r\nimport { concatMap, map } from 'rxjs/operators';\r\nimport { Credentials, CredentialsService } from './credentials.service';\r\nimport { HttpService } from './http.service';\r\n\r\n/**\r\n * Provides a base for authentication workflow.\r\n * The login/logout methods should be replaced with proper implementation.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService {\r\n\r\n constructor(private credentialsService: CredentialsService, private http: HttpService) { }\r\n\r\n /**\r\n * Authenticates the user.\r\n * @param context The login parameters.\r\n * @return The user credentials.\r\n */\r\n login(context: any): Observable<Credentials> {\r\n const data = <Credentials>{};\r\n return this.http\r\n .skipToken()\r\n .post('oauth/token', context)\r\n .pipe(\r\n concatMap(async (tokenInfo: any) => {\r\n tokenInfo.expires_in = Date.now() + (tokenInfo.expires_in * 1000);\r\n data.token = tokenInfo;\r\n data.user = {};\r\n this.credentialsService.setCredentials(data, context.remember);\r\n const userInfo: any = await this.http.get('api/user/current').toPromise();\r\n data.user = userInfo?.user;\r\n this.credentialsService.setCredentials(data, context.remember);\r\n return data;\r\n })\r\n )\r\n }\r\n\r\n /**\r\n * Logs out the user and clear credentials.\r\n * @return True if the user was logged out successfully.\r\n */\r\n logout(): Observable<boolean> {\r\n\r\n this.credentialsService.setCredentials();\r\n return of(true);\r\n }\r\n\r\n}\r\n","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\r\nimport { Injectable } from '@angular/core';\r\n\r\n/**\r\n * A route strategy allowing for explicit route reuse.\r\n * Used as a workaround for https://github.com/angular/angular/issues/18374\r\n * To reuse a given route, add `data: { reuse: true }` to the route definition.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RouteReusableStrategy extends RouteReuseStrategy {\r\n\r\n public shouldDetach(route: ActivatedRouteSnapshot): boolean {\r\n return false;\r\n }\r\n\r\n public store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle | null): void { }\r\n\r\n public shouldAttach(route: ActivatedRouteSnapshot): boolean {\r\n return false;\r\n }\r\n\r\n public retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\r\n return null;\r\n }\r\n\r\n public shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\r\n // Reuse the route if the RouteConfig is the same, or if both routes use the\r\n // same component, because the latter can have different RouteConfigs.\r\n return future.routeConfig === curr.routeConfig ||\r\n Boolean(future.routeConfig?.component &&\r\n future.routeConfig?.component === curr.routeConfig?.component);\r\n }\r\n\r\n}\r\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';\r\n/*\r\n * This module imports and re-exports all Angular Material modules for convenience,\r\n * so only 1 module import is needed in your feature modules.\r\n * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.\r\n *\r\n * To optimize your production builds, you should only import the components used in your app.\r\n */\r\n\r\nimport { NgModule } from \"@angular/core\";\r\nimport {\r\n MatCommonModule,\r\n MatLineModule,\r\n MatNativeDateModule,\r\n MatOptionModule,\r\n MatPseudoCheckboxModule,\r\n MatRippleModule\r\n} from \"@angular/material/core\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatMenuModule } from \"@angular/material/menu\";\r\nimport { MatProgressSpinnerModule } from \"@angular/material/progress-spinner\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatSortModule } from \"@angular/material/sort\";\r\nimport { MatTableModule } from \"@angular/material/table\";\r\nimport { MatCardModule } from \"@angular/material/card\";\r\nimport { MatDividerModule } from \"@angular/material/divider\";\r\nimport { MatChipsModule } from \"@angular/material/chips\";\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatListModule } from '@angular/material/list'\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\n\r\n\r\n@NgModule({\r\n exports: [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatCommonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatLineModule,\r\n MatMenuModule,\r\n MatNativeDateModule,\r\n MatOptionModule,\r\n MatProgressSpinnerModule,\r\n MatPseudoCheckboxModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatSortModule,\r\n MatTableModule,\r\n MatCardModule,\r\n MatDividerModule,\r\n MatChipsModule,\r\n MatDatepickerModule,\r\n MatListModule,\r\n MatTooltipModule,\r\n MatButtonToggleModule\r\n ]\r\n})\r\nexport class MaterialModule { }\r\n","import { NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';\r\nimport { RouteReuseStrategy, RouterModule } from '@angular/router';\r\n\r\nimport { RouteReusableStrategy } from './route-reusable-strategy';\r\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\r\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\r\nimport { HttpService } from './http.service';\r\nimport { TokenInterceptor } from './token.interceptor';\r\nimport { CacheInterceptor } from './cache.interceptor';\r\nimport { SnackModule } from './snack/snack.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n RouterModule,\r\n SnackModule\r\n ],\r\n providers: [\r\n {\r\n provide: HttpClient,\r\n useClass: HttpService\r\n },\r\n {\r\n provide: RouteReuseStrategy,\r\n useClass: RouteReusableStrategy\r\n }\r\n ],\r\n exports: [\r\n SnackModule\r\n ]\r\n})\r\nexport class CoreModule {\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: CoreModule) {\r\n // Import guard\r\n if (parentModule) {\r\n throw new Error(`${parentModule} has already been loaded. Import Core module in the root module only.`);\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupComponent } from './action-popup.component';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n FlexLayoutModule,\r\n CommonModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n ActionPopupComponent\r\n ],\r\n exports: [\r\n ActionPopupComponent\r\n ],\r\n entryComponents: [\r\n ActionPopupComponent\r\n ]\r\n})\r\nexport class ActionPopupModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { DataTableComponent } from './data-table.component';\r\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n FlexLayoutModule,\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n DataTableComponent\r\n ],\r\n exports: [\r\n DataTableComponent\r\n ]\r\n})\r\nexport class DataTableModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { DocumentViewerComponent } from './document-viewer.component';\r\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FlexLayoutModule,\r\n NgxDocViewerModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n DocumentViewerComponent\r\n ],\r\n exports: [\r\n DocumentViewerComponent\r\n ]\r\n})\r\nexport class DocumentViewerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FileDropperComponent } from './file-dropper.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n FileDropperComponent\r\n ],\r\n exports: [FileDropperComponent]\r\n})\r\nexport class FileDropperModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\r\nimport { EntityFilesViewAllComponent } from './entity-files-view-all.component';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FileDropperModule } from '../file-dropper/file-dropper.module';\r\nimport { DocumentViewerModule } from '../document-viewer/document-viewer.module';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EntityFileFormComponent, EntityFilesViewAllComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n FileDropperModule,\r\n DocumentViewerModule,\r\n InfiniteScrollModule,\r\n ActionPopupModule,\r\n MaterialModule\r\n ],\r\n exports: [\r\n EntityFilesViewAllComponent\r\n ],\r\n entryComponents: [EntityFileFormComponent]\r\n})\r\nexport class EntityFilesViewAllModule { }\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-read-more\",\r\n templateUrl: \"./read-more.component.html\",\r\n styleUrls: [\"./read-more.component.scss\"]\r\n})\r\nexport class ReadMoreComponent implements OnInit {\r\n @Input() text: string;\r\n @Input() maxLength: number = 100;\r\n currentText: string;\r\n hideToggle: boolean = true;\r\n\r\n isCollapsed: boolean = true;\r\n\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n this.determineView();\r\n }\r\n\r\n toggleView() {\r\n this.isCollapsed = !this.isCollapsed;\r\n this.determineView();\r\n }\r\n\r\n determineView() {\r\n if (!this.text || this.text.length <= this.maxLength) {\r\n this.currentText = this.text;\r\n this.isCollapsed = false;\r\n this.hideToggle = true;\r\n return;\r\n }\r\n this.hideToggle = false;\r\n if (this.isCollapsed == true) {\r\n this.currentText = this.text.substring(0, this.maxLength) + \"...\";\r\n } else if (this.isCollapsed == false) {\r\n this.currentText = this.text;\r\n }\r\n }\r\n}\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReadMoreComponent } from './read-more.component';\r\n\r\n@NgModule({\r\n declarations: [ReadMoreComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule\r\n ],\r\n exports: [\r\n ReadMoreComponent\r\n ]\r\n})\r\nexport class ReadMoreModule { }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NoteListComponent } from './note-list/note-list.component';\r\nimport { NoteFormComponent } from './note-form/note-form.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\nimport { MaterialModule } from '../material.module';\r\nimport { CommentFormComponent } from './comment-form/comment-form.component';\r\nimport { ReadMoreModule } from '../read-more/read-more.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n NoteListComponent,\r\n NoteFormComponent,\r\n CommentFormComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n ActionPopupModule,\r\n MaterialModule,\r\n ReadMoreModule\r\n ],\r\n exports: [\r\n NoteListComponent\r\n ],\r\n entryComponents: [NoteFormComponent]\r\n})\r\nexport class NoteModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SearchableSelectorComponent } from './searchable-selector.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatSelectInfiniteScrollDirective } from './mat-select-infinite-scroll.directive';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n SearchableSelectorComponent,\r\n MatSelectInfiniteScrollDirective\r\n ],\r\n exports: [\r\n SearchableSelectorComponent,\r\n MatSelectInfiniteScrollDirective\r\n ]\r\n})\r\nexport class SearchableSelectorModule { }\r\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';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TimelineFilterRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { TimelineFilterRoutingModule } from './timeline-filter-routing.module';\r\nimport { TimelineFilterComponent } from './timeline-filter.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [TimelineFilterComponent],\r\n imports: [\r\n CommonModule,\r\n TimelineFilterRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: [TimelineFilterComponent]\r\n})\r\nexport class TimelineFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { LoaderComponent } from './loader.component';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\n\r\n@NgModule({\r\n declarations: [\r\n LoaderComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatProgressSpinnerModule\r\n ],\r\n exports: [\r\n LoaderComponent\r\n ]\r\n})\r\nexport class LoaderModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionRoutingModule } from './email-subscription-routing.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserRoutingModule } from './email-subscription-user-routing.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionUserRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionUserModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserFormRoutingModule { }\r\n","\r\nimport { Component, Inject, OnInit, TemplateRef } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { AlertService } from '../../../core/alert.service';\r\nimport { FormValidatorService } from '../../../core/form-validator.service';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { Logger } from '../../../core/logger.service';\r\n\r\nconst log = new Logger('EmailSubscriptionUser Form');\r\n\r\nconst errorMessages: any = {\r\n user_id: {\r\n required: \"User is required\"\r\n },\r\n email_type_id: {\r\n required: \"Email Type is required\"\r\n },\r\n};\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-form',\r\n templateUrl: './email-subscription-user-form.component.html',\r\n styleUrls: ['./email-subscription-user-form.component.scss']\r\n})\r\nexport class EmailSubscriptionUserFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n esUserFormGroup: FormGroup;\r\n esUserFormFirstAttempt: boolean;\r\n esUser: any;\r\n isSubmitLoading: boolean;\r\n selectedUser: any;\r\n selectedType: any;\r\n\r\n constructor(private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n public dialogRef: MatDialogRef<EmailSubscriptionUserFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.esUserFormGroup = this.fb.group({\r\n id: [''],\r\n user_id: ['', Validators.required],\r\n email_type_id: ['', Validators.required],\r\n });\r\n }\r\n\r\n\r\n ngOnInit() {\r\n if (this.data?.esUser?.id) {\r\n this.esUser = this.data.esUser;\r\n this.updateMode = true;\r\n this.selectedType = this.esUser?.email_type;\r\n this.selectedUser = this.esUser?.user;\r\n this.esUserFormGroup.patchValue(this.esUser);\r\n }\r\n\r\n }\r\n\r\n //Method to trigger login\r\n submit() {\r\n this.esUserFormGroup.markAllAsTouched();\r\n this.esUserFormFirstAttempt = true;\r\n if (this.esUserFormGroup.valid) {\r\n this.isSubmitLoading = true;\r\n const model = this.esUserFormGroup.value;\r\n (\r\n this.updateMode ?\r\n this.http.put(`api/email-subscription-users/${model?.id}`, model) :\r\n this.http.post(`api/email-subscription-users`, model)\r\n )\r\n .pipe(\r\n finalize(() => this.isSubmitLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe(result => {\r\n this.alertService.addAlert(\"Subscription saved successfully\", \"success\");\r\n this.dialogRef.close(result);\r\n });\r\n }\r\n }\r\n\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.esUserFormGroup, this.esUserFormFirstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.esUserFormGroup, errorMessages);\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserFormRoutingModule } from './email-subscription-user-form-routing.module';\r\nimport { EmailSubscriptionUserFormComponent } from './email-subscription-user-form.component';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { LoaderModule } from '../../../loader/loader.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserFormComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionUserFormRoutingModule,\r\n LoaderModule\r\n ],\r\n entryComponents: [EmailSubscriptionUserFormComponent]\r\n})\r\nexport class EmailSubscriptionUserFormModule { }\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\n\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FormControl } from '@angular/forms';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { EmailSubscriptionUserFormComponent } from '../email-subscription-user-form/email-subscription-user-form.component';\r\nimport { Router } from '@angular/router';\r\nimport { Logger } from '../../../core/logger.service';\r\nimport { PageEvent } from '../../../data-table/data-table.model';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\r\n\r\nconst log = new Logger('EmailSubscriptionUser list');\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-list',\r\n templateUrl: './email-subscription-user-list.component.html',\r\n styleUrls: ['./email-subscription-user-list.component.scss']\r\n})\r\nexport class EmailSubscriptionUserListComponent implements OnInit {\r\n\r\n esUserList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n };\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n displayColumns: FormControl = new FormControl(['index', 'user.name', 'email_type.title', 'creator.name', 'created_at', 'actions']);\r\n displayedColumns: any[] = [];\r\n availableDisplayColumns: any[] = [\r\n { order: 1, value: 'index', name: 'Index' },\r\n { order: 2, value: 'user.name', name: 'User' },\r\n { order: 3, value: 'email_type.title', name: 'Email Type' },\r\n { order: 4, value: 'creator.name', name: 'Creator' },\r\n { order: 5, value: 'actions', name: 'Actions' }\r\n ];\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private http: HttpService,\r\n private router: Router,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.displayedColumns = this.displayColumns.value;\r\n this.initializeData();\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n }\r\n\r\n get selectedColumns(): string[] {\r\n return this.availableDisplayColumns\r\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\r\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\r\n .map(col => col.value);\r\n }\r\n\r\n columnsChange() {\r\n this.displayedColumns = this.selectedColumns;\r\n }\r\n\r\n\r\n initializeData() {\r\n this.http.get(`api/email-subscription-users`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.esUserList = this.esUserList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n filterChange(event: any) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event\r\n };\r\n this.reload();\r\n }\r\n\r\n addEmailSubscriptionUser() {\r\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {} // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n log.debug(result);\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n\r\n editEmailSubscriptionUser(event: any, esUser: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {\r\n esUser: esUser\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n log.debug(result);\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEmailSubscriptionUser(event: any, esUser: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: '400px',\r\n data: <ActionPopup>{\r\n title: 'Delete Subscription',\r\n message: `Are you sure to proceed delete the esUser ${esUser.name}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n //Action confirmed\r\n this.http.delete(`api/email-subscription-users/${esUser?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.esUserList = this.esUserList.filter(x => x.id !== esUser.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n reload() {\r\n this.esUserList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\r\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\r\n\r\nexport const esulr = {\r\n title: 'Email Subscription Users',\r\n permissions: {\r\n only: ['app_admin'],\r\n redirectTo: '/'\r\n }\r\n};\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionUserListComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: esulr\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserListRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserListFilterRoutingModule { }\r\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\r\nimport { FormGroup, FormBuilder } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-list-filter',\r\n templateUrl: './email-subscription-user-list-filter.component.html',\r\n styleUrls: ['./email-subscription-user-list-filter.component.scss']\r\n})\r\nexport class EmailSubscriptionUserListFilterComponent implements OnInit {\r\n\r\n esUserFilterForm: FormGroup;\r\n\r\n @Output() valueChange = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder) {\r\n this.createForm();\r\n }\r\n\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.esUserFilterForm = this.fb.group({\r\n user_id: [''],\r\n email_type_id: [''],\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.esUserFilterForm.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n this.valueChange.emit(value);\r\n })\r\n }\r\n\r\n\r\n resetFieldValue(field: string) {\r\n this.esUserFilterForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.esUserFilterForm.get(field).value;\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserListFilterRoutingModule } from './email-subscription-user-list-filter-routing.module';\r\nimport { EmailSubscriptionUserListFilterComponent } from './email-subscription-user-list-filter.component';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserListFilterComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionUserListFilterRoutingModule\r\n ],\r\n exports: [EmailSubscriptionUserListFilterComponent]\r\n})\r\nexport class EmailSubscriptionUserListFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserListRoutingModule } from './email-subscription-user-list-routing.module';\r\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\r\nimport { EmailSubscriptionUserListFilterModule } from '../email-subscription-user-list-filter/email-subscription-user-list-filter.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { EmailSubscriptionUserFormModule } from '../email-subscription-user-form/email-subscription-user-form.module';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserListComponent],\r\n imports: [\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n EmailSubscriptionUserListRoutingModule,\r\n EmailSubscriptionUserFormModule,\r\n EmailSubscriptionUserListFilterModule\r\n ],\r\n exports: [EmailSubscriptionUserListComponent]\r\n})\r\nexport class EmailSubscriptionUserListModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class EmailSubscriptionTypeRoutingModule { }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeRoutingModule } from './email-subscription-type-routing.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionTypeRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionTypeModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionTypeFormRoutingModule { }\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { AlertService } from '../../../core/alert.service';\r\nimport { FormValidatorService } from '../../../core/form-validator.service';\r\nimport { HttpService } from '../../../core/http.service';\r\n\r\nconst errorMessages: any = {\r\n title: {\r\n required: \"Title is required\"\r\n },\r\n code: {\r\n required: \"Code is required\"\r\n },\r\n frequency_id: {\r\n required: \"Frequency is required\"\r\n },\r\n};\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-type-form',\r\n templateUrl: './email-subscription-type-form.component.html',\r\n styleUrls: ['./email-subscription-type-form.component.scss']\r\n})\r\nexport class EmailSubscriptionTypeFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n emailSubscriptionTypeFormGroup: FormGroup;\r\n emailSubscriptionTypeFormFirstAttempt: boolean;\r\n emailSubscriptionType: any;\r\n selectedFrequency: any;\r\n isLoading: boolean;\r\n isSubmitLoading: boolean;\r\n\r\n constructor(private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n public dialogRef: MatDialogRef<EmailSubscriptionTypeFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.emailSubscriptionTypeFormGroup = this.fb.group({\r\n id: [''],\r\n title: ['', Validators.compose([Validators.required])],\r\n code: ['', Validators.compose([Validators.required])],\r\n frequency_id: ['', Validators.required],\r\n description: [''],\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (this.data.emailSubscriptionType?.id) {\r\n this.isLoading = true;\r\n this.emailSubscriptionType = this.data?.emailSubscriptionType;\r\n this.updateMode = true;\r\n this.selectedFrequency = this.emailSubscriptionType?.frequency || {};\r\n this.emailSubscriptionTypeFormGroup.patchValue(this.emailSubscriptionType);\r\n }\r\n }\r\n\r\n //Method to trigger login\r\n submit() {\r\n this.emailSubscriptionTypeFormGroup.markAllAsTouched();\r\n this.emailSubscriptionTypeFormFirstAttempt = true;\r\n if (this.emailSubscriptionTypeFormGroup.valid) {\r\n this.isSubmitLoading = true;\r\n const model = this.emailSubscriptionTypeFormGroup.value;\r\n (\r\n this.updateMode ?\r\n this.http.put(`api/email-subscription-types/${model?.id}`, model) :\r\n this.http.post(`api/email-subscription-types`, model)\r\n )\r\n .pipe(\r\n finalize(() => this.isSubmitLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe(result => {\r\n this.alertService.addAlert(\"Email Type saved successfully\", \"success\");\r\n this.dialogRef.close(result);\r\n });\r\n }\r\n }\r\n\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.emailSubscriptionTypeFormGroup, this.emailSubscriptionTypeFormFirstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.emailSubscriptionTypeFormGroup, errorMessages);\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeFormRoutingModule } from './email-subscription-type-form-routing.module';\r\nimport { EmailSubscriptionTypeFormComponent } from './email-subscription-type-form.component';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { LoaderModule } from '../../../loader/loader.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionTypeFormComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionTypeFormRoutingModule,\r\n LoaderModule\r\n ],\r\n exports: [EmailSubscriptionTypeFormComponent],\r\n entryComponents: [EmailSubscriptionTypeFormComponent]\r\n})\r\nexport class EmailSubscriptionTypeFormModule { }\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FormControl } from '@angular/forms';\r\nimport { distinctUntilChanged, debounceTime } from 'rxjs/operators';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { EmailSubscriptionTypeFormComponent } from '../email-subscription-type-form/email-subscription-type-form.component';\r\nimport { PageEvent } from '../../../data-table/data-table.model';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-type-list',\r\n templateUrl: './email-subscription-type-list.component.html',\r\n styleUrls: ['./email-subscription-type-list.component.scss']\r\n})\r\nexport class EmailSubscriptionTypeListComponent implements OnInit {\r\n\r\n emailSubscriptionTypeList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n isLoadRelations: true,\r\n relations: ['frequency']\r\n };\r\n search: FormControl = new FormControl('');\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n displayColumns: FormControl = new FormControl(['index', 'title', 'frequency.title', 'description', 'actions']);\r\n displayedColumns: any[] = [];\r\n availableDisplayColumns: any[] = [\r\n { order: 1, value: 'index', name: 'Index' },\r\n { order: 2, value: 'title', name: 'Title' },\r\n { order: 3, value: 'code', name: 'Code' },\r\n { order: 4, value: 'frequency.title', name: 'Frequency' },\r\n { order: 5, value: 'description', name: 'Description' },\r\n { order: 6, value: 'actions', name: 'Actions' }\r\n ];\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private http: HttpService,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.displayedColumns = this.displayColumns.value;\r\n this.initializeData();\r\n this.search.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n this.filters.search = value;\r\n this.reload();\r\n });\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n }\r\n\r\n get selectedColumns(): string[] {\r\n return this.availableDisplayColumns\r\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\r\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\r\n .map(col => col.value);\r\n }\r\n\r\n columnsChange() {\r\n this.displayedColumns = this.selectedColumns;\r\n }\r\n\r\n\r\n initializeData() {\r\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n addEmailSubscriptionType() {\r\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {} // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n\r\n editEmailSubscriptionType(event: any, emailSubscriptionType: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {\r\n emailSubscriptionType: emailSubscriptionType\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEmailSubscriptionType(event: any, emailSubscriptionType: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: '400px',\r\n data: <ActionPopup>{\r\n title: 'Delete Email Type',\r\n message: `Are you sure to proceed delete the Email Type ${emailSubscriptionType.title}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n //Action confirmed\r\n this.http.delete(`api/email-subscription-types/${emailSubscriptionType?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.filter(x => x.id !== emailSubscriptionType.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n reload() {\r\n this.emailSubscriptionTypeList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\r\n\r\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\r\n\r\nexport const estlr = {\r\n title: 'Email Subscription Type',\r\n permissions: {\r\n only: ['client_admin'],\r\n redirectTo: '/'\r\n }\r\n};\r\n\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionTypeListComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: estlr\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionTypeListRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeListRoutingModule } from './email-subscription-type-list-routing.module';\r\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\r\nimport { EmailSubscriptionTypeFormModule } from '../email-subscription-type-form/email-subscription-type-form.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionTypeListComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n EmailSubscriptionTypeFormModule,\r\n EmailSubscriptionTypeListRoutingModule\r\n ],\r\n exports: [EmailSubscriptionTypeListComponent]\r\n})\r\nexport class EmailSubscriptionTypeListModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { HttpService } from '../../core/http.service';\r\nimport { PageEvent } from '../../data-table/data-table.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-for-user',\r\n templateUrl: './email-subscription-for-user.component.html',\r\n styleUrls: ['./email-subscription-for-user.component.scss']\r\n})\r\nexport class EmailSubscriptionForUserComponent implements OnInit {\r\n\r\n subscriptions: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n isLoadRelations: true,\r\n relations: 'frequency,currentUserSubscription'\r\n };\r\n\r\n constructor(\r\n private http: HttpService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.fetchSubscriptions();\r\n }\r\n\r\n fetchSubscriptions() {\r\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.subscriptions = this.subscriptions.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.fetchSubscriptions();\r\n }\r\n }\r\n\r\n subscribe(sub: any) {\r\n this.http.post(`api/email-subscription-for-user`, { email_type_id: sub?.id })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n sub.current_user_subscription = result?.item;\r\n });\r\n }\r\n\r\n unsubscribe(sub: any) {\r\n this.http.delete(`api/email-subscription-users/${sub?.current_user_subscription?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((_: any) => {\r\n sub.current_user_subscription = null;\r\n });\r\n }\r\n\r\n\r\n reload() {\r\n this.subscriptions = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.fetchSubscriptions();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../core/authentication.guard';\r\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\r\n\r\nexport const esfur = {\r\n permissions: {\r\n only: ['client_admin']\r\n }\r\n};\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionForUserComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: esfur\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionForUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionForUserRoutingModule } from './email-subscription-for-user-routing.module';\r\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionForUserComponent],\r\n imports: [\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n EmailSubscriptionForUserRoutingModule\r\n ],\r\n exports: [EmailSubscriptionForUserComponent]\r\n})\r\nexport class EmailSubscriptionForUserModule { }\r\n","import { HttpService } from '../core/http.service';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TechlifyUpdateService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getTechlifyUpdates(filters: any) {\r\n return this.http.get(`api/techlify-updates`, { params: filters }).toPromise();\r\n }\r\n\r\n createTechlifyUpdate(techlifyUpdate: any) {\r\n return this.http.post(`api/techlify-updates`, techlifyUpdate).toPromise();\r\n }\r\n\r\n updateTechlifyUpdate(techlifyUpdate: any) {\r\n return this.http.put(`api/techlify-updates/${techlifyUpdate.id}`, techlifyUpdate).toPromise();\r\n }\r\n\r\n deleteTechlifyUpdate(techlifyUpdateId: any) {\r\n return this.http.delete(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\r\n }\r\n\r\n getTechlifyUpdate(techlifyUpdateId: any) {\r\n return this.http.get(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\r\n }\r\n\r\n getNewUpdateForCurrentUser() {\r\n return this.http.get(`api/current-user-techlify-updates`).toPromise();\r\n }\r\n\r\n createUpdateViewRecord(techlifyUpdateView: any) {\r\n return this.http.post(`api/techlify-update-views`, techlifyUpdateView).toPromise();\r\n }\r\n\r\n updateCurrentUserUpdates() {\r\n return this.http.get(`api/techlify-updates/update-view`).toPromise();\r\n }\r\n}\r\n","import { AlertService } from \"../../core/alert.service\";\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, Validators } from '@angular/forms';\r\nimport { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Editor, Toolbar } from 'ngx-editor';\r\n\r\nconst errorMessages: any = {\r\n title: {\r\n required: \"Title is required\",\r\n },\r\n released_on: {\r\n required: \"Released On is required\",\r\n },\r\n version: {\r\n required: \"Version is required\",\r\n },\r\n description: {\r\n required: \"Description is required\",\r\n },\r\n learn_more_link: {\r\n pattern: \"Please enter valid link\",\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'app-techlify-update-form',\r\n templateUrl: './techlify-update-form.component.html',\r\n styleUrls: ['./techlify-update-form.component.scss']\r\n})\r\nexport class TechlifyUpdateFormComponent implements OnInit {\r\n\r\n @Output() onSave = new EventEmitter<any>();\r\n techlifyUpdateForm: FormGroup;\r\n isUpdateMode: boolean = false;\r\n editor: Editor;\r\n toolbar: Toolbar = [\r\n ['bold', 'italic'],\r\n ['bullet_list'],\r\n ];\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<TechlifyUpdateFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n private techlifyUpdateService: TechlifyUpdateService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n private createForm() {\r\n this.techlifyUpdateForm = this.fb.group({\r\n id: new FormControl(''),\r\n title: new FormControl('', Validators.required),\r\n description: new FormControl('', Validators.required),\r\n version: new FormControl('', Validators.required),\r\n released_on: new FormControl('', Validators.required),\r\n learn_more_link: new FormControl('', Validators.compose([Validators.pattern('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?')])),\r\n });\r\n if (this.data.techlifyUpdateDetails) {\r\n this.isUpdateMode = true;\r\n this.techlifyUpdateForm.patchValue(this.data.techlifyUpdateDetails);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.editor = new Editor();\r\n }\r\n\r\n async submit() {\r\n if (this.techlifyUpdateForm.valid) {\r\n let result;\r\n const model = this.techlifyUpdateForm.value;\r\n\r\n try {\r\n result = this.isUpdateMode ? await this.techlifyUpdateService.updateTechlifyUpdate(model)\r\n : await this.techlifyUpdateService.createTechlifyUpdate(model);\r\n this.alertService.addAlert(\r\n \"Techlify app update saved successfully\",\r\n \"success\"\r\n );\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n } finally {\r\n if (result) {\r\n this.dialogRef.close(result);\r\n }\r\n }\r\n }\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.techlifyUpdateForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.techlifyUpdateForm.get(field).value;\r\n }\r\n\r\n /** Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.techlifyUpdateForm, true);\r\n }\r\n /** Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.techlifyUpdateForm, errorMessages);\r\n }\r\n\r\n}\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdateFormComponent } from './techlify-update-form.component';\r\nimport { NgxEditorModule } from 'ngx-editor';\r\n\r\n@NgModule({\r\n declarations: [TechlifyUpdateFormComponent],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n NgxEditorModule,\r\n ],\r\n exports: [\r\n TechlifyUpdateFormComponent\r\n ],\r\n entryComponents: [\r\n TechlifyUpdateFormComponent\r\n ]\r\n})\r\nexport class TechlifyUpdateFormModule { }\r\n","import { UntilDestroy } from '@ngneat/until-destroy';\r\nimport { untilDestroyed } from '@ngneat/until-destroy';\r\nimport { ActionPopup } from './../../action-popup/action-popup.model';\r\nimport { ActionPopupComponent } from './../../action-popup/action-popup.component';\r\nimport { TechlifyUpdateFormComponent } from './../techlify-update-form/techlify-update-form.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, FormBuilder } from '@angular/forms';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AlertService } from '../../core/alert.service';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { debounceTime } from 'rxjs/operators';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-updates-list',\r\n templateUrl: './techlify-updates-list.component.html',\r\n styleUrls: ['./techlify-updates-list.component.scss']\r\n})\r\nexport class TechlifyUpdatesListComponent implements OnInit {\r\n techlifyUpdates: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'title',\r\n 'version',\r\n 'released_on',\r\n 'learn_more_link',\r\n 'description',\r\n 'creator',\r\n 'actions'\r\n ];\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n isWorking: boolean = false;\r\n filterFormGroup: FormGroup;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private alertService: AlertService,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private fb: FormBuilder,\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n search: new FormControl(''),\r\n version: new FormControl(''),\r\n sort_by: new FormControl('released_on|DESC'),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData();\r\n this.listenChanges();\r\n }\r\n\r\n listenChanges() {\r\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe(changes => {\r\n this.reload();\r\n });\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n async loadData() {\r\n try {\r\n this.isWorking = true;\r\n var filters: any = this.filterFormGroup.value;\r\n filters.perPage = this.perPage;\r\n filters.page = this.page;\r\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\r\n filters\r\n );\r\n this.lastPage = result.last_page || this.page;\r\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n reload() {\r\n this.techlifyUpdates = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n modifyTechlifyUpdate(model?: any) {\r\n const dialogRef = this.dialog.open(TechlifyUpdateFormComponent, {\r\n width: \"600px\",\r\n data: {\r\n techlifyUpdateDetails: model,\r\n }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n async deleteTechlifyUpdate(model: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: \"Delete Update\",\r\n message: `Are you sure to delete this update?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n try {\r\n await this.techlifyUpdateService.deleteTechlifyUpdate(model.id);\r\n this.alertService.addAlert(\r\n \"Successfully deleted the update\",\r\n \"success\"\r\n );\r\n this.reload();\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n });\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.filterFormGroup.get(field).setValue(\"\");\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase();\r\n this.assignFilter(event.active, direction);\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'title': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\r\n }\r\n case 'released_on': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\r\n }\r\n case 'version': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\r\n }\r\n default: {\r\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\r\n }\r\n };\r\n }\r\n\r\n}\r\n","import { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: 'all', pathMatch: 'full' },\r\n { path: 'all', component: TechlifyUpdatesListComponent },\r\n\r\n //fallback\r\n {\r\n path: '**',\r\n redirectTo: 'all',\r\n pathMatch: 'full'\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TechlifyUpdateRoutingModule { }\r\n","import { ReadMoreModule } from '../read-more/read-more.module';\r\nimport { TechlifyUpdateFormModule } from './techlify-update-form/techlify-update-form.module';\r\nimport { TechlifyUpdateRoutingModule } from './techlify-update-routing.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\n\r\n@NgModule({\r\n declarations: [TechlifyUpdatesListComponent],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ActionPopupModule,\r\n TechlifyUpdateRoutingModule,\r\n TechlifyUpdateFormModule,\r\n ReadMoreModule,\r\n ]\r\n})\r\nexport class TechlifyUpdateModule { }\r\n","import { Inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { MatDialogRef } from '@angular/material/dialog';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-update-view',\r\n templateUrl: './update-view.component.html',\r\n styleUrls: ['./update-view.component.scss']\r\n})\r\nexport class UpdateViewComponent implements OnInit {\r\n techlifyUpdate: any;\r\n rootNavUrl: any;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<UpdateViewComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.techlifyUpdate = this.data.techlifyUpdate;\r\n this.rootNavUrl = this.data.rootNavUrl;\r\n }\r\n\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n\r\n openUpdateHistory(): void {\r\n this.close();\r\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\r\n }\r\n\r\n}\r\n","import { UntilDestroy } from '@ngneat/until-destroy';\r\nimport { untilDestroyed } from '@ngneat/until-destroy';\r\nimport { AlertService } from './../../core/alert.service';\r\nimport { UpdateViewComponent } from './../update-view/update-view.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, FormBuilder } from '@angular/forms';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { debounceTime } from 'rxjs/operators';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-update-history',\r\n templateUrl: './techlify-update-history.component.html',\r\n styleUrls: ['./techlify-update-history.component.scss']\r\n})\r\nexport class TechlifyUpdateHistoryComponent implements OnInit {\r\n techlifyUpdates: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'title',\r\n 'version',\r\n 'released_on',\r\n 'learn_more_link',\r\n 'description',\r\n 'creator',\r\n 'actions'\r\n ];\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n isWorking: boolean = false;\r\n filterFormGroup: FormGroup;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private fb: FormBuilder,\r\n private alertService: AlertService\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n search: new FormControl(''),\r\n version: new FormControl(''),\r\n sort_by: new FormControl('released_on|DESC'),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData();\r\n this.listenChanges();\r\n this.updateCurrentUserUpdates();\r\n }\r\n\r\n listenChanges() {\r\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe(changes => {\r\n this.reload();\r\n });\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n async loadData() {\r\n try {\r\n this.isWorking = true;\r\n var filters: any = this.filterFormGroup.value;\r\n filters.perPage = this.perPage;\r\n filters.page = this.page;\r\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\r\n filters\r\n );\r\n this.lastPage = result.last_page || this.page;\r\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n reload() {\r\n this.techlifyUpdates = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.filterFormGroup.get(field).setValue(\"\");\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase();\r\n this.assignFilter(event.active, direction);\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'title': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\r\n }\r\n case 'released_on': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\r\n }\r\n case 'version': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\r\n }\r\n default: {\r\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\r\n }\r\n };\r\n }\r\n\r\n openUpdateView(techlifyUpdate: any): void {\r\n const dialogRef = this.dialog.open(UpdateViewComponent, {\r\n width: \"800px\",\r\n autoFocus: false,\r\n data: {\r\n techlifyUpdate: techlifyUpdate,\r\n isFromHistory: true,\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n async updateCurrentUserUpdates() {\r\n try {\r\n await this.techlifyUpdateService.updateCurrentUserUpdates();\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n}\r\n","import { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: 'update-history', pathMatch: 'full' },\r\n { path: 'update-history', component: TechlifyUpdateHistoryComponent },\r\n\r\n //fallback\r\n {\r\n path: '**',\r\n redirectTo: 'all',\r\n pathMatch: 'full'\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TechlifyUpdateHistoryRoutingModule { }\r\n","import { ReactiveFormsModule } from '@angular/forms';\r\nimport { TechlifyUpdateHistoryRoutingModule } from './techlify-update-history-routing.module';\r\nimport { ReadMoreModule } from '../../read-more/read-more.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { MaterialModule } from '../../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../../action-popup/action-popup.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ActionPopupModule,\r\n ReadMoreModule,\r\n TechlifyUpdateHistoryRoutingModule\r\n ],\r\n declarations: [TechlifyUpdateHistoryComponent]\r\n})\r\nexport class TechlifyUpdateHistoryModule { }\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { UpdateViewComponent } from './update-view.component';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [UpdateViewComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule\r\n ],\r\n exports: [\r\n UpdateViewComponent\r\n ],\r\n entryComponents: [\r\n UpdateViewComponent\r\n ]\r\n})\r\nexport class UpdateViewModule { }\r\n","import { AlertService } from './../../../core/alert.service';\r\nimport { TechlifyUpdateService } from './../../techlify-update.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Component, EmbeddedViewRef, Inject, OnInit } from '@angular/core';\r\nimport { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\r\nimport { UpdateViewComponent } from '../../update-view/update-view.component';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-update-notifier-snack',\r\n templateUrl: './update-notifier-snack.component.html',\r\n styleUrls: ['./update-notifier-snack.component.scss']\r\n})\r\nexport class UpdateNotifierSnackComponent implements OnInit {\r\n maxDescriptionLength: any = 70;\r\n descriptionText: any = '';\r\n techlifyUpdate: any;\r\n rootNavUrl: any;\r\n\r\n constructor(\r\n @Inject(MAT_SNACK_BAR_DATA) public data: any,\r\n private snackBarRef: MatSnackBarRef<EmbeddedViewRef<any>>,\r\n private dialog: MatDialog,\r\n private router: Router,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private alertService: AlertService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.techlifyUpdate = this.data.techlifyUpdate;\r\n this.rootNavUrl = this.data.rootNavUrl;\r\n this.determineDescription(this.techlifyUpdate?.description)\r\n }\r\n\r\n close(): void {\r\n this.createUpdateViewRecord();\r\n this.snackBarRef.dismiss();\r\n }\r\n\r\n determineDescription(description: any) {\r\n if (!description || description.length <= this.maxDescriptionLength) {\r\n this.descriptionText = description;\r\n return;\r\n }\r\n this.descriptionText = description.substring(0, this.maxDescriptionLength) + \"...\";\r\n }\r\n\r\n openUpdateView(): void {\r\n this.close();\r\n const dialogRef = this.dialog.open(UpdateViewComponent, {\r\n width: \"800px\",\r\n autoFocus: false,\r\n data: {\r\n techlifyUpdate: this.techlifyUpdate,\r\n rootNavUrl: this.data.rootNavUrl\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n openUpdateHistory(): void {\r\n this.close();\r\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\r\n }\r\n\r\n async createUpdateViewRecord() {\r\n try {\r\n var techlifyUpdateView = {\r\n update_id: this.techlifyUpdate?.id\r\n };\r\n let result: any = await this.techlifyUpdateService.createUpdateViewRecord(techlifyUpdateView);\r\n }\r\n catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n}\r\n","import { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { AlertService } from '../../core/alert.service';\r\n\r\n@Component({\r\n selector: 'app-update-notifier',\r\n templateUrl: './update-notifier.component.html',\r\n styleUrls: ['./update-notifier.component.scss']\r\n})\r\nexport class UpdateNotifierComponent implements OnInit {\r\n techlifyUpdate: any;\r\n @Input() rootNavUrl: string = '/techlify-updates';\r\n\r\n constructor(\r\n private snackBar: MatSnackBar,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private alertService: AlertService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(x => {\r\n this.getNewUpdate();\r\n }, 5000);\r\n }\r\n\r\n async getNewUpdate() {\r\n try {\r\n let result: any = await this.techlifyUpdateService.getNewUpdateForCurrentUser();\r\n this.techlifyUpdate = result.item;\r\n if (this.techlifyUpdate) {\r\n this.showUpdate();\r\n }\r\n }\r\n catch (error) {\r\n console.log(\"Current user updates failed\");\r\n }\r\n }\r\n\r\n showUpdate() {\r\n this.snackBar.openFromComponent(UpdateNotifierSnackComponent, {\r\n data: {\r\n techlifyUpdate: this.techlifyUpdate,\r\n rootNavUrl: this.rootNavUrl\r\n },\r\n horizontalPosition: 'right',\r\n verticalPosition: 'top',\r\n panelClass: ['white-bg']\r\n });\r\n }\r\n\r\n}\r\n","import { ActionPopupModule } from './../../action-popup/action-popup.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { UpdateViewModule } from './../update-view/update-view.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { UpdateNotifierComponent } from './update-notifier.component';\r\nimport { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [UpdateNotifierComponent, UpdateNotifierSnackComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n UpdateViewModule,\r\n FlexLayoutModule,\r\n ActionPopupModule\r\n ],\r\n exports: [\r\n UpdateNotifierComponent,\r\n ],\r\n entryComponents: [\r\n UpdateNotifierSnackComponent\r\n ]\r\n})\r\nexport class UpdateNotifierModule { }\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport * as XLSX from 'xlsx';\r\n\r\n@Component({\r\n selector: 'app-export-excel-button',\r\n templateUrl: './export-excel-button.component.html',\r\n styleUrls: ['./export-excel-button.component.scss']\r\n})\r\nexport class ExportExcelButtonComponent implements OnInit {\r\n\r\n @Input() name: string = 'Export_Data';\r\n @Input() data: any[] = [];\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n exportExcel() {\r\n const fileName = `${this.name}_${new Date().getTime()}.xlsx`;\r\n const ws = XLSX.utils.json_to_sheet(this.data);\r\n /* generate workbook and add the worksheet */\r\n const wb: XLSX.WorkBook = XLSX.utils.book_new();\r\n XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');\r\n\r\n /* save to file */\r\n XLSX.writeFile(wb, fileName);\r\n }\r\n\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ExportExcelButtonComponent } from './export-excel-button/export-excel-button.component';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [ExportExcelButtonComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule\r\n ],\r\n exports: [ExportExcelButtonComponent]\r\n})\r\nexport class ExportExcelModule { }\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { HttpService } from '../../core/http.service';\r\n\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-view',\r\n templateUrl: './audit-log-view-model.component.html',\r\n styleUrls: ['./audit-log-view-model.component.scss']\r\n})\r\nexport class AuditLogViewModelComponent implements OnInit {\r\n\r\n logInfo: any;\r\n showDeltaChanges: boolean = false;\r\n changeList: any[] = [];\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.data) {\r\n this.http.get(`api/recent-log-for-model`, {\r\n params: {\r\n model_type: this.data?.modelType,\r\n model_id: this.data?.modelId\r\n }\r\n }).pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.logInfo = result?.item;\r\n this.getTransformedChanges();\r\n });\r\n }\r\n }\r\n\r\n getTransformedChanges() {\r\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\r\n });\r\n }\r\n\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { filter } from 'rxjs/operators';\r\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-logs-view-model',\r\n templateUrl: './audit-logs-view-model.component.html',\r\n styleUrls: ['./audit-logs-view-model.component.scss']\r\n})\r\nexport class AuditLogsViewModelComponent implements OnInit {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.router.events\r\n .pipe(filter(event => event instanceof NavigationEnd), untilDestroyed(this))\r\n .subscribe(_ => this.dialogRef.close());\r\n }\r\n\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\r\nimport { AuditLogsViewModelComponent } from '../audit-logs-view-model/audit-logs-view-model.component';\r\n\r\n\r\n@Component({\r\n selector: 'app-audit-log-for-model',\r\n templateUrl: './audit-log-for-model.component.html',\r\n styleUrls: ['./audit-log-for-model.component.scss']\r\n})\r\nexport class AuditLogForModelComponent implements OnInit {\r\n\r\n @Input() modelType: string;\r\n @Input() modelId: any;\r\n @Input() logView: 'recent' | 'all' = 'recent';\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n getLogView() {\r\n const dialogRef = this.dialog.open(AuditLogViewModelComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {\r\n modelType: this.modelType,\r\n modelId: this.modelId\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n getLogsView() {\r\n const dialogRef = this.dialog.open(AuditLogsViewModelComponent, {\r\n width: '95%',\r\n maxWidth: 'unset',\r\n autoFocus: false,\r\n data: {\r\n modelType: this.modelType,\r\n modelId: this.modelId\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogForModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogViewModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogViewModelRoutingModule } from './audit-log-view-model-routing.module';\r\nimport { AuditLogViewModelComponent } from './audit-log-view-model.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogViewModelComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogViewModelRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n exports: [AuditLogViewModelComponent]\r\n})\r\nexport class AuditLogViewModelModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogsViewModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogListRoutingModule { }\r\n","import { Component, OnInit, OnDestroy, Input, ViewChild } from '@angular/core';\r\n\r\n\r\nimport { Router } from '@angular/router';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { PageEvent } from '../../data-table/data-table.model';\r\nimport { DataManager } from '../../core/dataManager.service';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-list',\r\n templateUrl: './audit-log-list.component.html',\r\n styleUrls: ['./audit-log-list.component.scss'],\r\n})\r\nexport class AuditLogListComponent implements OnInit, OnDestroy {\r\n\r\n auditLogList: any[] = [];\r\n @Input() objectId: any;\r\n @Input() objectType: any;\r\n @Input() showFilter: boolean = true;\r\n @Input() showExportButtons: boolean = true;\r\n @Input() userId: any;\r\n\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = { sort_by: 'created_at|desc' };\r\n displayedColumns: any[] = ['index', 'id', 'object_type', 'object_id', 'action', 'changes', 'created_at', 'user.email'];\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private router: Router,\r\n public sanitizer: DomSanitizer\r\n ) { }\r\n\r\n ngOnInit() {\r\n\r\n this.initializeData();\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n\r\n }\r\n\r\n get excelData(): any[] {\r\n if (this.auditLogList.length > 0) {\r\n return this.auditLogList.map(item => {\r\n return {\r\n 'Type': item?.object_type,\r\n 'Action': item?.action,\r\n 'Data': JSON.stringify(item?.data || {}),\r\n 'Object': JSON.stringify(item?.object || {}),\r\n 'Pre-Object': JSON.stringify(item?.pre_object || {}),\r\n 'Created At': new Date(item?.created_at).toDateString(),\r\n 'Created By': item?.user?.email\r\n };\r\n });\r\n }\r\n return [];\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n logClicked(log: any) {\r\n this.router.navigate(['/system/audit-logs/log-view', log.id]);\r\n }\r\n\r\n\r\n async initializeData() {\r\n if (this.objectType) {\r\n this.filters = { ...this.filters, object_type: this.objectType }\r\n }\r\n if (this.objectId) {\r\n this.filters = { ...this.filters, object_id: this.objectId }\r\n }\r\n if (this.userId) {\r\n this.filters = { ...this.filters, user_id: this.userId }\r\n }\r\n const result = await this.dataManager.GET(`api/audit-logs`, { ...this.filters, ...this.pageEvent });\r\n this.auditLogList = this.auditLogList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n }\r\n\r\n filterChange(event: any) {\r\n if (this.showFilter) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event,\r\n object_type: this.objectType || event?.object_type || '',\r\n object_id: this.objectId || '',\r\n };\r\n this.reload();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n reload() {\r\n this.auditLogList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n getTransformedChanges(log: any) {\r\n if (log?.data?.changes) {\r\n const changes = Object.keys(log?.data?.changes) || [];\r\n let value = '<div>';\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\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>`;\r\n });\r\n value = `${value} </div>`;\r\n return value;\r\n }\r\n return '';\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogListFilterRoutingModule { }\r\n","import { FormControl } from \"@angular/forms\";\r\n\r\nexport function DateValidator(): any {\r\n return (control: FormControl): { [key: string]: any } => {\r\n\r\n const val: any = new Date(control.value);\r\n if (!!control.value && val == 'Invalid Date') {\r\n return { invalidDate: true };\r\n }\r\n return null;\r\n };\r\n}","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\r\nimport { FormGroup, FormBuilder } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { DateValidator } from '../../date-validator';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-list-filter',\r\n templateUrl: './audit-log-list-filter.component.html',\r\n styleUrls: ['./audit-log-list-filter.component.scss']\r\n})\r\nexport class AuditLogListFilterComponent implements OnInit {\r\n\r\n auditLogFilterForm: FormGroup;\r\n\r\n @Input() objectId: any;\r\n @Input() objectType: any;\r\n\r\n @Output() valueChange = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder, private formValidatorService: FormValidatorService) {\r\n this.createForm();\r\n }\r\n\r\n get showObjectFilter() {\r\n return !(this.objectId || this.objectType);\r\n }\r\n\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.auditLogFilterForm = this.fb.group({\r\n object_type: [''],\r\n action: [''],\r\n data: [''],\r\n date_to: ['', DateValidator()],\r\n date_from: ['', DateValidator()]\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.auditLogFilterForm.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe((value: any) => {\r\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\r\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\r\n this.valueChange.emit(value);\r\n })\r\n }\r\n\r\n\r\n resetFieldValue(field: string) {\r\n this.auditLogFilterForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.auditLogFilterForm.get(field).value;\r\n }\r\n\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.auditLogFilterForm, true);\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogListFilterRoutingModule } from './audit-log-list-filter-routing.module';\r\nimport { AuditLogListFilterComponent } from './audit-log-list-filter.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../../material.module';\r\nimport { SearchableSelectorModule } from '../../searchable-selector/searchable-selector.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogListFilterComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogListFilterRoutingModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n SearchableSelectorModule,\r\n ],\r\n exports: [AuditLogListFilterComponent]\r\n})\r\nexport class AuditLogListFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogListRoutingModule } from './audit-log-list-routing.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { AuditLogListComponent } from './audit-log-list.component';\r\nimport { AuditLogListFilterModule } from '../audit-log-list-filter/audit-log-list-filter.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { ExportExcelModule } from '../../export-excel/export-excel.module';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogListComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogListRoutingModule,\r\n ExportExcelModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n InfiniteScrollModule,\r\n AuditLogListFilterModule\r\n ],\r\n exports: [AuditLogListComponent]\r\n})\r\nexport class AuditLogListModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogsViewModelRoutingModule } from './audit-logs-view-model-routing.module';\r\nimport { AuditLogsViewModelComponent } from './audit-logs-view-model.component';\r\nimport { AuditLogListModule } from '../audit-log-list/audit-log-list.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogsViewModelComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogsViewModelRoutingModule,\r\n FlexLayoutModule,\r\n AuditLogListModule\r\n ],\r\n exports: [AuditLogsViewModelComponent]\r\n})\r\nexport class AuditLogsViewModelModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogForModelRoutingModule } from './audit-log-for-model-routing.module';\r\nimport { AuditLogForModelComponent } from './audit-log-for-model.component';\r\nimport { AuditLogViewModelModule } from '../audit-log-view-model/audit-log-view-model.module';\r\nimport { AuditLogsViewModelModule } from '../audit-logs-view-model/audit-logs-view-model.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogForModelComponent],\r\n imports: [\r\n AuditLogViewModelModule,\r\n AuditLogsViewModelModule,\r\n CommonModule,\r\n AuditLogForModelRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ],\r\n exports: [AuditLogForModelComponent]\r\n})\r\nexport class AuditLogForModelModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport * as jsondiffpatch from \"jsondiffpatch\"\r\nimport { DataManager } from '../../core/dataManager.service';\r\n\r\n@Component({\r\n selector: 'app-audit-log-view',\r\n templateUrl: './audit-log-view.component.html',\r\n styleUrls: ['./audit-log-view.component.scss']\r\n})\r\nexport class AuditLogViewComponent implements OnInit {\r\n\r\n logInfo: any;\r\n showDeltaChanges: boolean = false;\r\n changeList: any[] = [];\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private route: ActivatedRoute,\r\n private location: Location\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.route.paramMap.subscribe(params => {\r\n if (params.get('id')) {\r\n this.fetchLogDetail(params.get('id'));\r\n } else {\r\n this.location.back();\r\n }\r\n });\r\n }\r\n\r\n getTransformedChanges() {\r\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\r\n });\r\n }\r\n\r\n async fetchLogDetail(logId: any) {\r\n const result = await this.dataManager.GET(`api/audit-logs/${logId}`);\r\n this.logInfo = result.item;\r\n this.getTransformedChanges();\r\n this.patchDelta();\r\n }\r\n\r\n patchDelta() {\r\n const delta = jsondiffpatch.diff(this.logInfo?.pre_object, this.logInfo?.object);\r\n document.getElementById('jsondiff').innerHTML = jsondiffpatch.formatters.html.format(delta, this.logInfo?.pre_object);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogViewRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogViewRoutingModule } from './audit-log-view-routing.module';\r\nimport { AuditLogViewComponent } from './audit-log-view.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogViewComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogViewRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n exports: [AuditLogViewComponent]\r\n})\r\nexport class AuditLogViewModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../core/authentication.guard';\r\nimport { AuditLogListComponent } from './audit-log-list/audit-log-list.component';\r\nimport { AuditLogViewComponent } from './audit-log-view/audit-log-view.component';\r\n\r\n\r\nconst routes: Routes = [\r\n { path: 'log-list', component: AuditLogListComponent, canActivate: [AuthenticationGuard] },\r\n { path: 'log-view/:id', component: AuditLogViewComponent, canActivate: [AuthenticationGuard] },\r\n { path: '**', redirectTo: 'log-list', pathMatch: 'full' }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogRoutingModule } from './audit-log-routing.module';\r\nimport { AuditLogListModule } from './audit-log-list/audit-log-list.module';\r\nimport { AuditLogViewModule } from './audit-log-view/audit-log-view.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n CommonModule,\r\n AuditLogRoutingModule,\r\n AuditLogListModule,\r\n AuditLogViewModule\r\n ],\r\n exports: []\r\n})\r\nexport class AuditLogModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\n\r\n@Component({\r\n selector: 'app-import-success',\r\n templateUrl: './import-success.component.html',\r\n styleUrls: ['./import-success.component.scss']\r\n})\r\nexport class ImportSuccessComponent implements OnInit {\r\n @Input() data: any;\r\n @Input() config: ImportCsvConfig;\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { ErrorHandlerService } from './../../core/error-handler.service';\r\nimport { PageEvent } from './../../data-table/data-table.model';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\nimport { HttpService } from '../../core/http.service';\r\n\r\n@Component({\r\n selector: 'app-import-history-list',\r\n templateUrl: './import-history-list.component.html',\r\n styleUrls: ['./import-history-list.component.scss']\r\n})\r\nexport class ImportHistoryListComponent implements OnInit {\r\n\r\n @Input() config: ImportCsvConfig;\r\n histories: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'imported_by',\r\n 'date',\r\n 'no_of_records'\r\n ];\r\n isWorking: boolean = false;\r\n filter: any;\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n\r\n constructor(\r\n private errorHandler: ErrorHandlerService,\r\n private http: HttpService,\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.config.importHistory.isEnabled) {\r\n this.filter = {\r\n model_type: this.config.importHistory.type,\r\n };\r\n }\r\n this.loadData();\r\n }\r\n\r\n loadData() {\r\n try {\r\n this.isWorking = true;\r\n this.http.get(this.config.importHistory.apiUrl, { params: { ...this.filter, ...this.pageEvent } }).subscribe((result: any) => {\r\n this.histories = this.histories.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n reload() {\r\n this.histories = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.loadData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { FormValidatorService } from '../../core/form-validator.service';\r\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\r\nimport { Location } from '@angular/common';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\n\r\nconst errorMessages: any = {\r\n property: {\r\n required: \"Property is required\",\r\n unavailable: \"Duplicate entry\"\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'app-field-mapping',\r\n templateUrl: './field-mapping.component.html',\r\n styleUrls: ['./field-mapping.component.scss']\r\n})\r\nexport class FieldMappingComponent implements OnInit {\r\n\r\n importMappingForm: FormGroup;\r\n @Input() data: any[];\r\n @Input() config: ImportCsvConfig;\r\n firstDataArray: any[] = [];\r\n properties: any[] = [];\r\n @Output() onSave = new EventEmitter();\r\n @Output() onReUpload= new EventEmitter();\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n public location: Location\r\n ) {\r\n this.createImportMappingForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.properties = this.config.properties;;\r\n this.reFectorAttributes(this.data[0]);\r\n }\r\n\r\n createImportMappingForm() {\r\n this.importMappingForm = this.fb.group({\r\n fields: this.fb.array([]),\r\n });\r\n }\r\n\r\n get fieldsArray(): FormArray {\r\n return this.importMappingForm.get('fields') as FormArray;\r\n }\r\n\r\n createField(field: any): FormGroup {\r\n var fieldForm: FormGroup = this.fb.group({\r\n id: new FormControl(field.id),\r\n label: new FormControl(field.label),\r\n value: new FormControl(field.value),\r\n property: new FormControl(field.property,\r\n Validators.compose(\r\n [\r\n Validators.required\r\n ]\r\n )\r\n ),\r\n propertyType: new FormControl(field.propertyType)\r\n });\r\n return fieldForm;\r\n }\r\n\r\n reFectorAttributes(data) {\r\n for (var k in data) {\r\n if (data.hasOwnProperty(k)) {\r\n var dataValue = {\r\n id: '',\r\n label: k,\r\n value: data[k],\r\n property: '',\r\n propertyType: ''\r\n };\r\n this.firstDataArray.push(dataValue);\r\n }\r\n }\r\n this.firstDataArray.forEach((element: any, mainIndex: any) => {\r\n element.id = mainIndex;\r\n this.properties.find((property: any, index: any) => {\r\n if (property.label.toLowerCase().includes(element.label.toLowerCase())) {\r\n element.property = property.value;\r\n element.propertyType = property.type;\r\n return element;\r\n }\r\n });\r\n });\r\n }\r\n\r\n next() {\r\n this.importMappingForm.markAllAsTouched();\r\n if (!this.importMappingForm.valid) {\r\n return;\r\n }\r\n this.onSave.emit(this.importMappingForm.value);\r\n }\r\n\r\n /** Method to evaluate form fields*/\r\n isFieldValid(field: string, form: any) {\r\n return this.formValidatorService.isFieldValid(field, form);\r\n }\r\n\r\n /** Method to find error in form fields*/\r\n getErrorMessage(field: string, form: any) {\r\n return this.formValidatorService.getErrorMessage(field, form, errorMessages);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.\r\n //Add 'implements AfterViewInit' to the class.\r\n setTimeout(x => {\r\n this.firstDataArray.forEach((element: any) => {\r\n this.fieldsArray.push(this.createField(element));\r\n });\r\n this.changeDetectorRef.detectChanges();\r\n }, 500);\r\n }\r\n\r\n updatePropertyType(event: any, index: any): void {\r\n var field = this.properties.find((field: any) => field.value == event.value);\r\n if (field) {\r\n this.fieldsArray.controls[index].get('propertyType').setValue(field.type);\r\n this.uniqueValidator();\r\n }\r\n }\r\n\r\n uniqueValidator() {\r\n this.fieldsArray.value.forEach((field: any, index: any) => {\r\n var control = this.fieldsArray.controls[index].get('property');\r\n const isNameUnique = this.fieldsArray.value.find(propertyData =>\r\n propertyData.property === control.value\r\n && propertyData.id != this.fieldsArray.controls[index].get('id').value\r\n )\r\n ? false\r\n : true;\r\n if (!isNameUnique) {\r\n control.setErrors({ unavailable: true });\r\n }\r\n else {\r\n control.setErrors(null);\r\n }\r\n });\r\n }\r\n\r\n removeField(index: number) {\r\n if (index == -1) {\r\n return;\r\n }\r\n this.fieldsArray.removeAt(index);\r\n }\r\n\r\n reUpload() {\r\n this.onReUpload.emit(true);\r\n }\r\n\r\n}\r\n","import { Location } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-failed-items-list',\r\n templateUrl: './failed-items-list.component.html',\r\n styleUrls: ['./failed-items-list.component.scss']\r\n})\r\nexport class FailedItemsListComponent implements OnInit {\r\n @Input() failedItems: any[];\r\n @Input() selectedFields: any[];\r\n @Output() onReUpload = new EventEmitter();\r\n\r\n constructor(\r\n public location: Location\r\n ) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n isValidDate(d: any): boolean {\r\n var date = new Date(d);\r\n return date instanceof Date && !isNaN(date.getTime());\r\n }\r\n\r\n reUpload() {\r\n this.onReUpload.emit(true);\r\n }\r\n\r\n}\r\n","import { ViewerConfig } from '../document-viewer/viewer-config.model';\r\nimport { FileDropperConfig } from '../file-dropper/file-dropper.model';\r\nimport { HttpService } from '../core/http.service';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport * as XLSX from 'xlsx';\r\nimport { ImportCsvConfig } from './import-csv-config';\r\n@UntilDestroy()\r\n\r\n@Component({\r\n selector: 'app-import-csv',\r\n templateUrl: './import-csv.component.html',\r\n styleUrls: ['./import-csv.component.scss']\r\n})\r\nexport class ImportCsvComponent implements OnInit {\r\n result: any;\r\n @Input() config: ImportCsvConfig;\r\n filesConfig: FileDropperConfig;\r\n filesList: any[] = [];\r\n data: any[] = [];\r\n isUploaded: boolean = false;\r\n isImportTypeSelected: boolean = false;\r\n viewerConfig: ViewerConfig;\r\n fileData: any[] = [];\r\n failedItems: any[] = [];\r\n selectedFields: any[] = [];\r\n importSteps: any = [\r\n {\r\n id: 1,\r\n step: 1,\r\n title: 'Upload',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 2,\r\n step: 2,\r\n title: 'Field Mappings',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 3,\r\n step: 3,\r\n title: 'Data Validation',\r\n progressTitle: 'Data Being Validated',\r\n progressDescription: 'The data is currently being validated and checked for errors, please do not navigate away from this page. '\r\n },\r\n {\r\n id: 4,\r\n step: 3,\r\n title: 'Data Validation & Errors',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 5,\r\n step: 4,\r\n title: 'Data Importing',\r\n progressTitle: 'Data Being Imported',\r\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.'\r\n },\r\n {\r\n id: 6,\r\n step: 5,\r\n title: 'Success Page & Data Preview',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n ];\r\n currentStep: any = 1;\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private errorHandler: ErrorHandlerService,\r\n private http: HttpService,\r\n ) {\r\n this.filesConfig = {\r\n fileId: \"file\",\r\n containerId: \"fileContainer\",\r\n styles: {\r\n height: \"200px\"\r\n },\r\n acceptFile: '.csv',\r\n multiple: false,\r\n maxSize: 10,\r\n acceptFileText: \".csv\"\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n get step() {\r\n return this.importSteps.find(step => step.id == this.currentStep);\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.currentStep = 2;\r\n this.filesList = event;\r\n\r\n let selectedFile = null;\r\n let jsonData = null;\r\n const reader = new FileReader();\r\n const file = this.filesList[0];\r\n reader.onload = (event) => {\r\n const data = reader.result;\r\n selectedFile = XLSX.read(data, {\r\n type: 'binary',\r\n cellDates: true,\r\n });\r\n jsonData = selectedFile.SheetNames.reduce((initial, name) => {\r\n const sheet = selectedFile.Sheets[name];\r\n initial = XLSX.utils.sheet_to_json(sheet, {\r\n header: 0,\r\n defval: \"\",\r\n });\r\n return initial;\r\n }, {});\r\n this.fileData = jsonData;\r\n }\r\n reader.readAsBinaryString(file);\r\n return;\r\n }\r\n\r\n mappingProcessed(event: any) {\r\n this.currentStep = 3;\r\n setTimeout(x => {\r\n this.selectedFields = event.fields;\r\n const tempFileData = JSON.parse(JSON.stringify(this.fileData));\r\n tempFileData.forEach(data => {\r\n for (var key in data) {\r\n var field = event.fields.find((field: any) => field.label == key);\r\n if (field) {\r\n if ((field.propertyType == 'date' || field.propertyType == 'dateTime') && this.isValidDate(new Date(data[field.label]))) {\r\n data[field.property] = (new Date(data[field.label]) as Date).toISOString();\r\n }\r\n else {\r\n data[field.property] = data[field.label];\r\n }\r\n delete data[key];\r\n }\r\n else {\r\n delete data[key];\r\n }\r\n }\r\n });\r\n this.save(tempFileData);\r\n }, 2000);\r\n }\r\n\r\n async save(tempFileData: any) {\r\n try {\r\n this.http.post(this.config.apiUrl, { data: tempFileData })\r\n .pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n\r\n this.failedItems = result.failed_items;\r\n if (this.failedItems.length) {\r\n this.alertService.addAlert(result.msg, 'warn');\r\n }\r\n if (!(this.failedItems.length > 0)) {\r\n this.currentStep = 5;\r\n setTimeout(x => {\r\n this.currentStep = 6;\r\n this.result = result;\r\n }, 2000);\r\n }\r\n else {\r\n this.currentStep = 4;\r\n }\r\n });\r\n } catch (error) {\r\n if ((error.status === 422 || error.status === 400) && error.msg) {\r\n this.alertService.addAlert(error.msg, \"warning\");\r\n }\r\n this.errorHandler.handleError(error);\r\n this.reUpload();\r\n }\r\n }\r\n\r\n isValidDate(d: any) {\r\n return d instanceof Date && !isNaN(d.getTime());\r\n }\r\n\r\n reUpload() {\r\n this.data = [];\r\n this.fileData = [];\r\n this.filesList = [];\r\n this.failedItems = [];\r\n this.selectedFields = [];\r\n this.currentStep = 1;\r\n }\r\n\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-data-import',\r\n templateUrl: './data-import.component.html',\r\n styleUrls: ['./data-import.component.scss']\r\n})\r\nexport class DataImportComponent implements OnInit {\r\n @Input() step: any;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DocumentViewerModule } from './../document-viewer/document-viewer.module';\r\nimport { FileDropperModule } from './../file-dropper/file-dropper.module';\r\nimport { MaterialModule } from './../material.module';\r\nimport { ImportSuccessComponent } from './import-success/import-success.component';\r\nimport { ImportHistoryListComponent } from './import-history-list/import-history-list.component';\r\nimport { FieldMappingComponent } from './field-mapping/field-mapping.component';\r\nimport { FailedItemsListComponent } from './failed-items-list/failed-items-list.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ImportCsvComponent } from './import-csv.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { DataImportComponent } from './data-import/data-import.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n RouterModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n FileDropperModule,\r\n DocumentViewerModule,\r\n InfiniteScrollModule\r\n ],\r\n declarations: [\r\n ImportCsvComponent,\r\n FieldMappingComponent,\r\n FailedItemsListComponent,\r\n ImportHistoryListComponent,\r\n ImportSuccessComponent,\r\n DataImportComponent\r\n ],\r\n providers: [],\r\n exports: [\r\n ImportCsvComponent\r\n ],\r\n})\r\nexport class ImportCsvModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { PageEvent } from '../data-table/data-table.model';\r\nimport { HttpService } from '../core/http.service';\r\nimport { TimelineValue } from '../timeline-filter';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-login-history-for-user',\r\n templateUrl: './login-history-for-user.component.html',\r\n styleUrls: ['./login-history-for-user.component.scss']\r\n})\r\nexport class LoginHistoryForUserComponent implements OnInit {\r\n\r\n loginHistoryList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n };\r\n historyFilterForm: FormGroup;\r\n displayedColumns: any[] = ['index', 'created_at'];\r\n @Input() userId: any;\r\n\r\n constructor(\r\n private http: HttpService,\r\n private fb: FormBuilder,\r\n ) {\r\n this.historyFilterForm = this.fb.group({\r\n 'duration': [''],\r\n 'date_from': [''],\r\n 'date_to': ['']\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.filters.user_id = this.userId;\r\n this.historyFilterForm.valueChanges\r\n .pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\r\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\r\n this.filterChange(value);\r\n });\r\n this.initializeData();\r\n }\r\n\r\n onTimelineChange(range: TimelineValue) {\r\n let date_from = range?.date_from ? new Date(range.date_from) : '';\r\n let date_to = range?.date_to ? new Date(range.date_to) : '';\r\n this.historyFilterForm.patchValue({\r\n date_from,\r\n date_to\r\n });\r\n }\r\n\r\n initializeData() {\r\n this.http.get(`api/user-login-history`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.loginHistoryList = this.loginHistoryList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n filterChange(event: any) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event\r\n };\r\n this.reload();\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n\r\n reload() {\r\n this.loginHistoryList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../core/authentication.guard';\r\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: LoginHistoryForUserComponent,\r\n canActivate: [AuthenticationGuard]\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class LoginHistoryForUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { LoginHistoryForUserRoutingModule } from './login-history-for-user-routing.module';\r\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\nimport { TimelineFilterModule } from '../timeline-filter/timeline-filter.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [LoginHistoryForUserComponent],\r\n imports: [\r\n CommonModule,\r\n LoginHistoryForUserRoutingModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n TimelineFilterModule\r\n ],\r\n exports: [LoginHistoryForUserComponent]\r\n})\r\nexport class LoginHistoryForUserModule { }\r\n","import { COMMA, ENTER } from '@angular/cdk/keycodes';\r\n\r\nexport class TechlifyTaggerTagFormConfigModel {\r\n selectable: boolean;\r\n removable: boolean;\r\n separatorKeysCodes: number[];\r\n placeholder: string;\r\n apiUrl: string;\r\n isCreateable: boolean;\r\n createApiUrl: string;\r\n isCacheTags: boolean;\r\n isSingle: boolean;\r\n\r\n constructor() {\r\n this.selectable = true;\r\n this.removable = true;\r\n this.separatorKeysCodes = [ENTER, COMMA];\r\n this.placeholder = 'New Tag..';\r\n this.apiUrl = 'api/techlify-tagger-tags';\r\n this.createApiUrl = 'api/techlify-tagger-tags';\r\n this.isCreateable = true;\r\n this.isCacheTags = false;\r\n this.isSingle = false;\r\n }\r\n}","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, Inject, Optional, Self, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\r\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\r\nimport { MatChipInputEvent } from '@angular/material/chips';\r\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { HttpService } from '../core/http.service';\r\nimport { TechlifyTaggerTagFormConfigModel } from './techlify-tagger-tag-form-config.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-tagger-tag-form-field',\r\n templateUrl: './techlify-tagger-tag-form-field.component.html',\r\n styleUrls: ['./techlify-tagger-tag-form-field.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }],\r\n})\r\nexport class TechlifyTaggerTagFormFieldComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy, OnChanges {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'techlify-tagger-form-field';\r\n id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent.nextId++}`;\r\n\r\n onChange = (_: any) => { };\r\n onTouched = () => { };\r\n\r\n tagInputCtrl = new FormControl();\r\n filterString: any;\r\n @ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;\r\n\r\n /**Pass the configuration for Techlify Tagger */\r\n @Input() config: TechlifyTaggerTagFormConfigModel = new TechlifyTaggerTagFormConfigModel();\r\n /**Pass the Model Type for Techlify Tagger, Required */\r\n @Input() modelType!: string;\r\n /**Pass the Model ID for Techlify Tagger */\r\n @Input() modelId: string;\r\n\r\n /**Pass the default list of tags */\r\n private _allTags: any[] = [];\r\n @Input()\r\n get allTags() {\r\n return this._allTags;\r\n }\r\n set allTags(value) {\r\n this._allTags = value;\r\n }\r\n\r\n /**Pass the Categories to filter for a model */\r\n @Input() categories: string[] = [];\r\n /**Pass default category to be used for assigning the tags, when we filter by more than one category */\r\n @Input() defaultCreateCategory: string;\r\n\r\n get tags() {\r\n return this.allTags.filter(x => this.value.some(y => y == x.id));\r\n }\r\n\r\n //Default Getter and Setters for a Form Field Implementation\r\n get empty() {\r\n return this.value.length == 0;\r\n }\r\n\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty || this.tagInputCtrl.value;\r\n }\r\n\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.tagInputCtrl.disable() : this.tagInputCtrl.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n\r\n private _value: any[] = [];\r\n @Input()\r\n get value(): any[] {\r\n return this._value;\r\n }\r\n set value(tagIds: any[]) {\r\n this._value = tagIds || [];\r\n this.stateChanges.next();\r\n }\r\n\r\n get errorState(): boolean {\r\n return this.tagInputCtrl.dirty && this.required && (this.value.length == 0);\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string;\r\n\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n\r\n //API to load all tags for the model type\r\n if (this.allTags.length == 0) {\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n perPage: '1000'\r\n }\r\n }).pipe(\r\n debounceTime(500),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.allTags = result.data;\r\n });\r\n }\r\n\r\n //API to load only the selected tags for the model\r\n if (this.modelId && this.value.length == 0) {\r\n //Model Id is passed and no tags are present, so we query db for the avilable tags for the model ID.\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n model_type: this.modelType,\r\n model_id: this.modelId,\r\n perPage: '1000'\r\n }\r\n }).pipe(\r\n debounceTime(500),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.value = (result?.data || []).map((x: any) => x.id);\r\n this._handleInput();\r\n });\r\n }\r\n }\r\n\r\n init() {\r\n if (this.modelId && this.allTags.length == 0) {\r\n //Model Id is passed and no tags are passed, so we query db for the avilable tags for the model ID.\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n model_type: this.modelType,\r\n model_id: this.modelId\r\n }\r\n }).pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.allTags = result.data;\r\n });\r\n }\r\n }\r\n\r\n get filteredTags(): any[] {\r\n return this._filter();\r\n }\r\n\r\n constructor(\r\n private _focusMonitor: FocusMonitor,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private httpService: HttpService,\r\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n this.tagInputCtrl.valueChanges\r\n .subscribe(filterValue => {\r\n this.filterString = filterValue;\r\n });\r\n\r\n //Set Focus Monitor\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n onContainerClick() {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n\r\n async add(event: MatChipInputEvent) {\r\n const value = (event.value || '').trim();\r\n // Add our tag\r\n // Validate for single mode\r\n if (!this.config.isSingle || (this.value.length === 0)) {\r\n if (value && this.config.isCreateable) {\r\n const tags = this.allTags;\r\n let tag = tags.find((item: any) => item.title.toLowerCase() == value.toLowerCase());\r\n if (!tag) {\r\n //No tag present in the list\r\n try {\r\n const result: any = await this.httpService.post(this.config.createApiUrl, {\r\n title: value,\r\n description: value,\r\n category_title: (this.categories.length > 0) ? (this.defaultCreateCategory ? this.defaultCreateCategory : this.categories[0]) : ''\r\n }).toPromise();\r\n tag = result.item;\r\n } catch (error) {\r\n return;\r\n }\r\n this.allTags.push(tag);\r\n } else {\r\n //Optionally clean the existing value, to avoid duplicate\r\n this.remove(tag);\r\n }\r\n this.value.push(tag.id);\r\n this._handleInput();\r\n }\r\n }\r\n\r\n // Clear the input value\r\n event.input.value = '';\r\n\r\n this.tagInputCtrl.setValue(null);\r\n }\r\n\r\n remove(tag: any): void {\r\n this.value = this.value.filter(x => x !== tag.id);\r\n this._handleInput();\r\n }\r\n\r\n selected(event: MatAutocompleteSelectedEvent): void {\r\n // Validate for single mode\r\n if (!this.config.isSingle || (this.value.length === 0)) {\r\n //Clean the existing value, to avoid duplicate\r\n this.remove({ id: event.option.value });\r\n this.value.push(event.option.value);\r\n this._handleInput();\r\n }\r\n this.tagInput.nativeElement.value = '';\r\n this.tagInputCtrl.setValue(null);\r\n }\r\n\r\n private _filter(): any[] {\r\n const filterValue = this.filterString ? this.filterString.toString().toLowerCase() : null;\r\n const availableTags = this.allTags.filter((tag: any) => !this.value.some((item: any) => item == tag.id));\r\n return filterValue ? availableTags.filter((tag: any) => tag.title.toLowerCase().includes(filterValue)) : availableTags;\r\n }\r\n\r\n writeValue(tagIds: any[]): void {\r\n this.value = tagIds || [];\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n }\r\n\r\n static ngAcceptInputType_disabled: BooleanInput;\r\n static ngAcceptInputType_required: BooleanInput;\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyTaggerTagFormFieldComponent } from './techlify-tagger-tag-form-field.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n TechlifyTaggerTagFormFieldComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n MatAutocompleteModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: [TechlifyTaggerTagFormFieldComponent]\r\n})\r\nexport class TechlifyTaggerTagFormFieldModule { }\r\n","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, OnInit, Input, OnDestroy, Inject, Optional, Self } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\r\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-tagger-tag-selector',\r\n templateUrl: './techlify-tagger-tag-selector.component.html',\r\n styleUrls: ['./techlify-tagger-tag-selector.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagSelectorComponent }],\r\n})\r\nexport class TechlifyTaggerTagSelectorComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy {\r\n\r\n /**Pass the Categories to filter for a model */\r\n @Input() categories: string[] = [];\r\n @Input() multiple: boolean = false;\r\n @Input() enableSearch: boolean = true;\r\n tagSelectorCtrl = new FormControl();\r\n @Input() showAllTags: boolean = false;\r\n @Input() useSelectButtonStyle: boolean = false;\r\n\r\n tags: any[] = [];\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'techlify-tagger-selector';\r\n id = `techlify-tagger-selector-${TechlifyTaggerTagSelectorComponent.nextId++}`;\r\n\r\n onChange = (_: any) => { };\r\n onTouched = () => { };\r\n\r\n get apiUrl() {\r\n if (this.showAllTags) {\r\n return 'api/techlify-tagger-tags'\r\n }\r\n else if (this.categories?.length > 0) {\r\n return 'api/techlify-tagger-tags?categories=' + this.categories.join(',');\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n\r\n //Default Getter and Setters for a Form Field Implementation\r\n get empty() {\r\n return this.value.length == 0;\r\n }\r\n\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.tagSelectorCtrl.disable() : this.tagSelectorCtrl.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n\r\n private _value: any;\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(val: any) {\r\n this._value = val;\r\n this.tagSelectorCtrl.setValue(val);\r\n this.stateChanges.next();\r\n }\r\n\r\n get errorState(): boolean {\r\n return this.tagSelectorCtrl.dirty && this.required && (this.value.length == 0);\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string;\r\n\r\n\r\n ngOnInit(): void {\r\n if (this.useSelectButtonStyle) {\r\n this.httpService.get(this.apiUrl)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((res: any) => {\r\n this.tags = res.data;\r\n })\r\n }\r\n }\r\n\r\n selectionChange(value: any) {\r\n this.value = value;\r\n this._handleInput();\r\n }\r\n\r\n constructor(\r\n private _focusMonitor: FocusMonitor,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private httpService: HttpService,\r\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n //Set Focus Monitor\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n onContainerClick() {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n writeValue(val: any): void {\r\n this.value = val;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n }\r\n\r\n static ngAcceptInputType_disabled: BooleanInput;\r\n static ngAcceptInputType_required: BooleanInput;\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyTaggerTagSelectorComponent } from './techlify-tagger-tag-selector.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MaterialModule } from '../material.module';\r\nimport { SearchableSelectorModule } from '../searchable-selector/searchable-selector.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n TechlifyTaggerTagSelectorComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n MatAutocompleteModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n MatButtonToggleModule\r\n ],\r\n exports: [TechlifyTaggerTagSelectorComponent]\r\n})\r\nexport class TechlifyTaggerTagSelectorModule { }\r\n","import { DataManager } from './../core/dataManager.service';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TechlifyFeatureService {\r\n\r\n constructor(private dataManager: DataManager) { }\r\n\r\n getFeatures() {\r\n return this.dataManager.GET(`api/features`);\r\n }\r\n\r\n disableFeature(id: any) {\r\n return this.dataManager.GET(`api/feature/${id}/disable`);\r\n }\r\n\r\n enableFeature(id: any) {\r\n return this.dataManager.GET(`api/feature/${id}/enable`);\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { TechlifyFeatureService } from './techlify-feature.service';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { ActionPopup, ActionPopupComponent } from '../action-popup';\r\nimport { DataManager } from '../core/dataManager.service';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { StorageService } from '../core/storage.service';\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-listing-feature',\r\n templateUrl: './techlify-feature-listing.component.html',\r\n styleUrls: ['./techlify-feature-listing.component.scss']\r\n})\r\nexport class TechlifyFeatureListingComponent implements OnInit {\r\n\r\n features: any[] = []\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'feature',\r\n 'description',\r\n 'actions',\r\n ]\r\n\r\n dataSource = new MatTableDataSource()\r\n\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n\r\n isWorking: boolean = false\r\n filterFormGroup: FormGroup;\r\n featureToggleForm: FormGroup;\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private errorHandler: ErrorHandlerService,\r\n private fb: FormBuilder,\r\n private alertService: AlertService,\r\n private dialog: MatDialog,\r\n private storage: StorageService,\r\n private featureService: TechlifyFeatureService\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n num_items: [\"\"]\r\n })\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData()\r\n this.listenForChanges()\r\n }\r\n\r\n listenForChanges() {\r\n this.filterFormGroup.valueChanges\r\n .pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe((changes) => {\r\n this.reload()\r\n })\r\n }\r\n\r\n async loadData() {\r\n let result;\r\n try {\r\n this.isWorking = true\r\n var filter = this.filterFormGroup.value\r\n filter.page = this.page;\r\n filter.perPage = this.perPage;\r\n result = await this.dataManager.GET(`api/features`, filter);\r\n this.features = this.features.concat(result.data);\r\n this.dataSource = new MatTableDataSource(this.features);\r\n\r\n if (!this.storage.getItem('features')) {\r\n this.setStorage(this.features);\r\n }\r\n\r\n this.isWorking = false\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n async toggeleFeature(element, feature) {\r\n let status = element ? 'Off' : \"On\";\r\n let data;\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: `Turn this feature ${status}?`,\r\n message: `Would you like to turn ${feature.title} feature ${status}`\r\n }\r\n })\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n try {\r\n data = element\r\n ? await this.featureService.disableFeature(feature.id)\r\n : await this.featureService.enableFeature(feature.id);\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.alertService.addAlert(`You have just turned ${status} the feature ${feature.title}`, 'success');\r\n this.reload();\r\n this.storage.removeItem('features');\r\n this.setStorage(this.features);\r\n this.isWorking = false;\r\n }\r\n } else {\r\n this.reload();\r\n }\r\n })\r\n }\r\n\r\n setStorage(features) {\r\n let localFeatures = [];\r\n for (let feature of features) {\r\n if (!feature.client_feature) {\r\n if (feature.is_enabled_default) {\r\n localFeatures.push(feature.code);\r\n }\r\n } else {\r\n if (feature.client_feature.is_enabled) {\r\n localFeatures.push(feature.code);\r\n }\r\n }\r\n\r\n }\r\n this.storage.setItem(\"features\", localFeatures);\r\n }\r\n\r\n reload() {\r\n this.features = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase()\r\n this.assignFilter(event.active, direction)\r\n this.reload()\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'name': {\r\n return this.filterFormGroup\r\n .get('sort_by')\r\n .setValue('first_name|' + direction)\r\n }\r\n case 'added_on': {\r\n return this.filterFormGroup\r\n .get('sort_by')\r\n .setValue('created_at|' + direction)\r\n }\r\n }\r\n }\r\n\r\n}\r\n","import { AuthenticationGuard } from './../core/authentication.guard';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: TechlifyFeatureListingComponent,\r\n canActivate: [AuthenticationGuard]\r\n },\r\n];\r\n\r\nexport const TechlifyFeatureRoutes = RouterModule.forChild(routes);\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'app-on-off-switch',\r\n templateUrl: './on-off-switch.component.html',\r\n styleUrls: ['./on-off-switch.component.scss']\r\n})\r\n\r\nexport class OnOffSwitchComponent implements OnInit {\r\n\r\n @Input() value: boolean;\r\n slideToggle: FormGroup;\r\n\r\n constructor(private fb: FormBuilder) {\r\n this.slideToggle = this.fb.group({\r\n toggle: [\"\"]\r\n })\r\n }\r\n\r\n ngOnInit() {\r\n this.slideToggle.get('toggle').setValue(this.value);\r\n }\r\n\r\n}\r\n","import { Directive, ElementRef, Input } from '@angular/core';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport { StorageService } from '../core/storage.service';\r\nimport { TechlifyFeatureService } from './techlify-feature.service';\r\n\r\n@Directive({\r\n selector: '[techlifyFeatureEnabled]'\r\n})\r\nexport class TechlifyFeatureEnabledDirective {\r\n\r\n features: any;\r\n localFeatures: any[] = [];\r\n @Input('techlifyFeatureEnabled') enabledFeature: any;\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private featureService: TechlifyFeatureService,\r\n private errorHandler: ErrorHandlerService,\r\n private storage: StorageService) {\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.storage.getItem('features')) {\r\n this.getFeatures();\r\n } else {\r\n this.checkForFeatureEnabled();\r\n }\r\n }\r\n\r\n async getFeatures() {\r\n try {\r\n let features = await this.featureService.getFeatures();\r\n\r\n for (let feature of features.data) {\r\n if (!feature.client_feature) {\r\n if (feature.is_enabled_default) {\r\n this.localFeatures.push(feature.code);\r\n }\r\n } else {\r\n if (feature.client_feature.is_enabled) {\r\n this.localFeatures.push(feature.code);\r\n }\r\n }\r\n\r\n }\r\n this.storage.setItem(\"features\", this.localFeatures);\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.checkForFeatureEnabled()\r\n }\r\n }\r\n\r\n checkForFeatureEnabled() {\r\n try {\r\n let features = this.storage.getItem('features');\r\n let features_split = features.split(',');\r\n\r\n if (features_split.includes(this.enabledFeature)) {\r\n this.el.nativeElement.style.display = \"show\";\r\n } else {\r\n this.el.nativeElement.remove();\r\n }\r\n\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\r\n\r\nimport { TechlifyFeatureRoutes } from './techlify-feature.routing';\r\nimport { OnOffSwitchComponent } from './on-off-switch/on-off-switch.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { TechlifyFeatureEnabledDirective } from './techlify-feature-enabled.directive';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n TechlifyFeatureRoutes,\r\n MatSlideToggleModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule\r\n ],\r\n declarations: [TechlifyFeatureListingComponent, OnOffSwitchComponent, TechlifyFeatureEnabledDirective],\r\n exports: [TechlifyFeatureListingComponent, TechlifyFeatureEnabledDirective]\r\n})\r\nexport class TechlifyFeatureModule { }\r\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","../../../projects/ngx-techlify-core/src/lib/base-model/techlify-form-component.class.ts","../../../projects/ngx-techlify-core/src/lib/base-model/techlify-listing-component.class.ts","../../../projects/ngx-techlify-core/src/lib/base-model/techlify-service.class.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","TechlifyFormComponentInterface","formValidatorService","resetFieldValue","event","field","_b","_a","form","get","setValue","getFieldValue","value","isFieldValid","getErrorMessage","errorMessages","TechlifyListingControllerInterface","models","page","perPage","lastPage","isWorking","reload","loadData","onScroll","TechlifyServiceBaseClass","http","baseUrl","index","filters","params","Object","assign","toPromise","store","model","post","show","modelId","update","put","id","delete","extendStatics","d","b","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","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","editClicked","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","isLogoutWhileApiGetsFailed","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","property","_c","_d","errMessage","status","sessionStorage","location","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","JSON","stringify","parse","CacheInterceptor","httpCacheService","forceUpdate","configure","options","instance","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","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","getEntityFiles","createEntityFile","updateEntityFile","deleteEntityFile","uploadEntityFile","formData","FormData","append","name","entity_id","entity_type","FormValidatorService","formGroup","firstAttempt","valid","touched","untouched","errorField","required","EntityFileFormComponent","fb","entityFileService","alertService","fileList","createForm","entityFileGroup","group","title","details","Validators","file_size","entity","updateMode","patchValue","hideTitleAndDetails","fileConfig","fileId","containerId","styles","height","multiple","acceptFile","maxSize","acceptFileText","viewerConfig","viewerStyle","width","submit","assignmentFileFirstAttempt","item","fileChanged","FormBuilder","EntityFilesViewAllComponent","dialog","viewOnly","allowMultipleFiles","entityFiles","displayedColumns","search","FormControl","imageStyle","hideRemove","x","entityType","entityId","valueChanges","debounceTime","distinctUntilChanged","fetchEntityFilesDetails","last_page","addEntityFile","open","autoFocus","restoreFocus","afterClosed","files","editEntityFile","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","current_page","resetScroll","commentAction","editComment","addComment","comment","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","touchUi","showCustomDateFields","changeTimeline","getDateRangeString","str","selectedRange","toUTCString","transform","_e","_g","_f","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","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","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","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,EA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AAA,gCAAiCoB","sourcesContent":["export class ActionPopup {\r\n name: string;\r\n title: string;\r\n message: string;\r\n}","import { Component, OnInit, Inject } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { ActionPopup } from './action-popup.model';\r\n\r\n@Component({\r\n selector: 'app-action-popup',\r\n templateUrl: './action-popup.component.html',\r\n styleUrls: ['./action-popup.component.scss']\r\n})\r\nexport class ActionPopupComponent implements OnInit {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<ActionPopupComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: ActionPopup,\r\n ) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n /**Method to close dialog box */\r\n closeDialog() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to close dialog box with the data given from parent component\r\n */\r\n confirm() {\r\n this.dialogRef.close(this.data);\r\n }\r\n\r\n}\r\n","import { FormGroup } from '@angular/forms';\r\nimport { FormValidatorService } from '../core/form-validator.service';\r\n\r\n/**\r\n * Interface used to ensure we have a consistent structure across our form components\r\n *\r\n * It also provides some abstraction of repeated code to reduce our codebase size\r\n *\r\n * @todo This should be moved to ngx-techlify-core\r\n *\r\n * Advantages of this abstract class\r\n * - Less code, less maintenance, less bugs\r\n * - more consistent code\r\n * - comments on more code\r\n * - save time, save energy\r\n */\r\nexport abstract class TechlifyFormComponentInterface {\r\n\r\n form: FormGroup;\r\n errorMessages: any;\r\n\r\n constructor(protected formValidatorService: FormValidatorService) {\r\n\r\n }\r\n\r\n /**\r\n * Resets the value of a field in the HTML form\r\n *\r\n * @param event\r\n * @param field\r\n */\r\n resetFieldValue(event: any, field: string) {\r\n this.form?.get(field)?.setValue('');\r\n }\r\n\r\n /**\r\n * Retrieves the value of a field from the HTML form\r\n *\r\n * @param field\r\n * @returns\r\n */\r\n getFieldValue(field: string) {\r\n return this.form?.get(field)?.value;\r\n }\r\n\r\n /**\r\n * Method to evaluate form fields\r\n * */\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.form, true);\r\n }\r\n\r\n /**\r\n * Method to find error in form fields\r\n * */\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.form, this.errorMessages);\r\n }\r\n\r\n}\r\n","/**\r\n * Interface used to ensure we have a consistent structure across our listing pages\r\n *\r\n * @todo This should be moved to ngx-techlify-core\r\n *\r\n * Advantages of this abstract class\r\n * - Less code, less maintenance, less bugs\r\n * - more consistent code\r\n * - comments on more code\r\n * - save time, save energy\r\n */\r\nexport abstract class TechlifyListingControllerInterface {\r\n\r\n models: any[] = [];\r\n page: number = 1;\r\n perPage: number = 25;\r\n lastPage: number = 500;\r\n isWorking: boolean = false;\r\n\r\n /**\r\n * Function that listens for any changes in the form group to apply the filters\r\n */\r\n abstract listenForChanges(): void;\r\n\r\n /**\r\n * Function that loads the main models of the application\r\n */\r\n abstract loadData(): void;\r\n\r\n /**\r\n * Reload all data from page 1\r\n */\r\n reload() {\r\n this.models = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n /**\r\n * Can be called when the user is scrolling,\r\n * to trigger loading a new page of data\r\n */\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n\r\n /**\r\n * Function used to pop up the edit form for the model\r\n *\r\n * @param model\r\n */\r\n abstract editForm(model: any): void;\r\n\r\n /**\r\n * Function used to pop up the delete form for the model\r\n *\r\n * @param model\r\n */\r\n abstract deleteForm(model: any): void;\r\n\r\n}\r\n","import { HttpService } from '../core/http.service';\r\n\r\n/**\r\n * Interface used to ensure we have a consistent structure across our listing pages\r\n *\r\n * @todo This should be moved to ngx-techlify-core\r\n *\r\n * Advantages of this abstract class\r\n * - Less code, less maintenance, less bugs\r\n * - more consistent code\r\n * - comments on more code\r\n * - save time, save energy\r\n */\r\nexport class TechlifyServiceBaseClass {\r\n\r\n protected baseUrl = \"you-forgot-to-set-a-base-url\";\r\n\r\n constructor(protected http: HttpService, baseUrl: string) {\r\n this.baseUrl = baseUrl;\r\n }\r\n\r\n /**\r\n * Loads a set of the model this service is for\r\n *\r\n * @param filters Restrictors to filter the set of models\r\n * @returns\r\n */\r\n index(filters: any) {\r\n return this.http.get(`api/${this.baseUrl}`, { params: { ...filters } }).toPromise();\r\n }\r\n\r\n /**\r\n * Add a new record to the database\r\n *\r\n * @param model The data of the model to add\r\n * @returns\r\n */\r\n store(model: any) {\r\n return this.http.post(`api/${this.baseUrl}`, model).toPromise();\r\n }\r\n\r\n /**\r\n * Load a single model record, often with all relations and related data\r\n *\r\n * @param modelId ID of the model to load\r\n * @returns\r\n */\r\n show(modelId: any) {\r\n return this.http.get(`api/${this.baseUrl}/${modelId}`).toPromise();\r\n }\r\n\r\n /**\r\n * Update fields of a single existing model\r\n *\r\n * @param model Model to update\r\n * @returns\r\n */\r\n update(model: any) {\r\n return this.http.put(`api/${this.baseUrl}/${model.id}`, model).toPromise();\r\n }\r\n\r\n /**\r\n * Delete a single model\r\n *\r\n * @param model Model to delete\r\n * @returns\r\n */\r\n delete(model: any) {\r\n return this.http.delete(`api/${this.baseUrl}/${model.id}`).toPromise();\r\n }\r\n\r\n\r\n}\r\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 {\r\n Component,\r\n OnInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnChanges,\r\n SimpleChanges,\r\n AfterViewInit,\r\n ViewChild\r\n} from \"@angular/core\";\r\n\r\nimport { SelectionModel } from \"@angular/cdk/collections\";\r\nimport { MatMenuTrigger } from '@angular/material/menu';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { DataTable } from './data-table.model';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: \"app-data-table\",\r\n templateUrl: \"./data-table.component.html\",\r\n styleUrls: [\"./data-table.component.scss\"]\r\n})\r\nexport class DataTableComponent implements OnInit, OnChanges, AfterViewInit {\r\n\r\n trigger: MatMenuTrigger;\r\n\r\n @Input() data: any;\r\n\r\n @Input() config: DataTable;\r\n\r\n dataSource: MatTableDataSource<any> = new MatTableDataSource([]);\r\n\r\n @Input() selection: SelectionModel<any>;\r\n\r\n @Output() action = new EventEmitter();\r\n @Output() selctionChange = new EventEmitter();\r\n @Output() rowClick = new EventEmitter();\r\n @Output() tableScroll = new EventEmitter();\r\n @Output() sortChanged = new EventEmitter();\r\n\r\n page: number;\r\n lastPage: number;\r\n perPage: number;\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n static nextId = 0;\r\n @Input() elementId: string = `data-table-${DataTableComponent.nextId++}`;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n /**Life cycle hook method */\r\n ngAfterViewInit() {\r\n // Assign the data to the data source for the table to render\r\n this.dataSource = new MatTableDataSource(this.data);\r\n\r\n // Emit change in selection\r\n if (this.selection) {\r\n this.selection.changed.pipe().subscribe((change: any) => {\r\n if (this.selection.selected) {\r\n this.selctionChange.emit(this.selection.selected);\r\n }\r\n });\r\n }\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.sortChanged.emit(value);\r\n })\r\n }\r\n }\r\n\r\n /** Whether the number of selected elements matches the total number of rows. */\r\n isAllSelected() {\r\n const numSelected = this.selection.selected.length;\r\n const numRows = this.dataSource.data.length;\r\n return numSelected === numRows;\r\n }\r\n\r\n /** Selects all rows if they are not all selected; otherwise clear selection. */\r\n masterToggle() {\r\n this.isAllSelected()\r\n ? this.clearSelection()\r\n : this.dataSource.data.forEach(row => this.selection.select(row));\r\n }\r\n\r\n /**clear selection*/\r\n clearSelection() {\r\n this.selection.clear();\r\n this.selctionChange.emit(this.selection.selected);\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n this.initializeConfig(changes);\r\n if (changes.data && !changes.data.isFirstChange() && this.dataSource) {\r\n // If not first change\r\n this.dataSource.data = changes.data.currentValue;\r\n }\r\n }\r\n\r\n initializeConfig(changes: SimpleChanges) {\r\n if (changes.config && !changes.config.isFirstChange()) {\r\n this.config = changes.config.currentValue;\r\n }\r\n this.page = this.config.page || 1;\r\n this.lastPage = this.config.lastPage || this.page;\r\n this.perPage = this.config.perPage || 20;\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage) {\r\n this.page += 1;\r\n this.tableScroll.emit({ page: this.page, lastPage: this.lastPage, perPage: this.perPage });\r\n }\r\n }\r\n\r\n /**Method invokes when edit action icon is clickes */\r\n editClicked(event: any, element: any) {\r\n this.action.emit({ action: \"edit\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when view action icon is clickes */\r\n viewClicked(event: any, element: any) {\r\n this.action.emit({ action: \"view\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when edit action icon is clickes */\r\n deactivateClicked(event: any, element: any) {\r\n this.action.emit({ action: \"deactivate\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when download action icon is clickes */\r\n downloadClicked(event: any, element: any) {\r\n this.action.emit({ action: \"download\", value: element });\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when print action icon is clickes */\r\n printClicked(event: any, element: any) {\r\n\r\n this.action.emit({ action: 'print', value: element });\r\n event.stopPropagation();\r\n\r\n }\r\n\r\n /**Method invokes when a row is clicked */\r\n rowClicked(event: any, element: any) {\r\n this.rowClick.emit(element);\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when menu action icon is hovered */\r\n actionMenuClick(event: any, element: any, menuValue: string) {\r\n this.action.emit({ action: menuValue, value: element });\r\n this.trigger.closeMenu();\r\n event.stopPropagation();\r\n }\r\n\r\n /**Method invokes when menu action icon is hovered and selects for particular action*/\r\n actionMenuTriggerClick(event: any, trigger: MatMenuTrigger) {\r\n this.trigger = trigger;\r\n event.stopPropagation();\r\n }\r\n\r\n checkEdit(ele: any) {\r\n if (this.config.editDisableFunction) {\r\n return this.config.editDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkView(ele: any) {\r\n if (this.config.viewDisableFunction) {\r\n return this.config.viewDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkPrint(ele: any) {\r\n if (this.config.printDisableFunction) {\r\n return this.config.printDisableFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkActions(ele: any) {\r\n if (this.config.actionsMenuFunction) {\r\n return this.config.actionsMenuFunction(ele);\r\n }\r\n\r\n return true;\r\n }\r\n\r\n checkActionButton(ele: any, value: any) {\r\n if (this.config.actionsMenuButtonFunction) {\r\n return this.config.actionsMenuButtonFunction(ele, value);\r\n }\r\n return true;\r\n }\r\n\r\n getValue(ele: any, keyString: string) {\r\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\r\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\r\n const keyList = keyString.split(\".\");\r\n for (let i = 0, n = keyList.length; i < n; ++i) {\r\n const key = keyList[i];\r\n if (ele && key in ele) {\r\n ele = ele[key];\r\n } else {\r\n return;\r\n }\r\n }\r\n return ele;\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until Destroy uses it.\r\n }\r\n}\r\n","export class DataTable {\r\n displayedColumns: string[];\r\n columnsConfig: ColumnConfig[];\r\n actionsConfig?: ActionConfig;\r\n enableRowClick?: boolean;\r\n disableElevation?: boolean;\r\n downloadLink?: string;\r\n actionsMenuFunction?: any;\r\n actionsMenuButtonFunction?: any;\r\n editDisableFunction?: any;\r\n viewDisableFunction?: any;\r\n printDisableFunction?: any;\r\n customActionLabel?: string;\r\n stickyHeader?: boolean;\r\n page?: number;\r\n lastPage?: number;\r\n perPage?: number;\r\n pageSizeOptions?: number[];\r\n style?: any;\r\n}\r\n\r\nclass ColumnConfig {\r\n title: string;\r\n value: string;\r\n sort?: boolean;\r\n dateField?: boolean;\r\n currencyField?: boolean;\r\n format?: string;\r\n}\r\n\r\nclass ActionConfig {\r\n edit?: boolean;\r\n view?: boolean;\r\n download?: boolean;\r\n print?: boolean;\r\n deactivate?: boolean;\r\n actionsMenu?: ActionsMenu[];\r\n}\r\n\r\nclass ActionsMenu {\r\n name: string;\r\n value: string;\r\n}\r\n\r\nexport class PageEvent {\r\n page: number;\r\n lastPage?: number;\r\n perPage: number;\r\n}\r\n","import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core';\r\nimport { ViewerConfig } from './viewer-config.model';\r\n\r\n@Component({\r\n selector: 'app-document-viewer',\r\n templateUrl: './document-viewer.component.html',\r\n styleUrls: ['./document-viewer.component.css']\r\n})\r\nexport class DocumentViewerComponent implements OnInit {\r\n\r\n\r\n @Input() config!: ViewerConfig;\r\n\r\n @Input() file!: any;\r\n\r\n @Input() fileUrl!: any;\r\n\r\n @Input() disableEdit: boolean;\r\n\r\n @Output() remove = new EventEmitter();\r\n viewerType: any;\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n this.initData();\r\n }\r\n\r\n removeFile() {\r\n this.remove.emit();\r\n }\r\n\r\n initData() {\r\n if (this.file) {\r\n var ext = this.getFileExtension(this.file);\r\n if (ext === 'ppt' || ext === 'pptx' || ext === 'doc' || ext === 'docx' || ext === 'xls' || ext === 'xlsx') {\r\n this.viewerType = \"office\";\r\n }\r\n else if (ext === 'jpg' || ext === 'jpeg' || ext === 'png' || ext === 'gif') {\r\n this.viewerType = \"image\";\r\n }\r\n else if (ext === 'pdf') {\r\n this.viewerType = \"pdf\";\r\n }\r\n else {\r\n this.viewerType = null;\r\n }\r\n }\r\n }\r\n\r\n get fileName() {\r\n if (this.file) {\r\n let nameArray = this.file.split('/');\r\n if (nameArray.length === 2) {\r\n return nameArray[1];\r\n }\r\n return nameArray[0];\r\n }\r\n return '';\r\n }\r\n\r\n getFileExtension(file: any) {\r\n return file.split('.').pop();\r\n }\r\n\r\n}\r\n","/**\r\n * Simple logger system with the possibility of registering custom outputs.\r\n *\r\n * 4 different log levels are provided, with corresponding methods:\r\n * - debug : for debug information\r\n * - info : for informative status of the application (success, ...)\r\n * - warning : for non-critical errors that do not prevent normal application behavior\r\n * - error : for critical errors that prevent normal application behavior\r\n *\r\n * Example usage:\r\n * ```\r\n * import { Logger } from 'app/core/logger.service';\r\n *\r\n * const log = new Logger('myFile');\r\n * ...\r\n * log.debug('something happened');\r\n * ```\r\n *\r\n * To disable debug and info logs in production, add this snippet to your root component:\r\n * ```\r\n * export class AppComponent implements OnInit {\r\n * ngOnInit() {\r\n * if (environment.production) {\r\n * Logger.enableProductionMode();\r\n * }\r\n * ...\r\n * }\r\n * }\r\n *\r\n * If you want to process logs through other outputs than console, you can add LogOutput functions to Logger.outputs.\r\n */\r\n\r\n/**\r\n * The possible log levels.\r\n * LogLevel.Off is never emitted and only used with Logger.level property to disable logs.\r\n */\r\nexport enum LogLevel {\r\n Off = 0,\r\n Error,\r\n Warning,\r\n Info,\r\n Debug\r\n}\r\n\r\n/**\r\n * Log output handler function.\r\n */\r\nexport type LogOutput = (source: string | undefined, level: LogLevel, ...objects: any[]) => void;\r\n\r\nexport class Logger {\r\n\r\n /**\r\n * Current logging level.\r\n * Set it to LogLevel.Off to disable logs completely.\r\n */\r\n static level = LogLevel.Debug;\r\n\r\n /**\r\n * Additional log outputs.\r\n */\r\n static outputs: LogOutput[] = [];\r\n\r\n /**\r\n * Enables production mode.\r\n * Sets logging level to LogLevel.Warning.\r\n */\r\n static enableProductionMode() {\r\n Logger.level = LogLevel.Warning;\r\n }\r\n\r\n constructor(private source?: string) { }\r\n\r\n /**\r\n * Logs messages or objects with the debug level.\r\n * Works the same as console.log().\r\n */\r\n debug(...objects: any[]) {\r\n this.log(console.log, LogLevel.Debug, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the info level.\r\n * Works the same as console.log().\r\n */\r\n info(...objects: any[]) {\r\n this.log(console.info, LogLevel.Info, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the warning level.\r\n * Works the same as console.log().\r\n */\r\n warn(...objects: any[]) {\r\n this.log(console.warn, LogLevel.Warning, objects);\r\n }\r\n\r\n /**\r\n * Logs messages or objects with the error level.\r\n * Works the same as console.log().\r\n */\r\n error(...objects: any[]) {\r\n this.log(console.error, LogLevel.Error, objects);\r\n }\r\n\r\n private log(func: (...args: any[]) => void, level: LogLevel, objects: any[]) {\r\n if (level <= Logger.level) {\r\n const log = this.source ? ['[' + this.source + ']'].concat(objects) : objects;\r\n func.apply(console, log);\r\n Logger.outputs.forEach(output => output.apply(output, [this.source, level, ...objects]));\r\n }\r\n }\r\n\r\n}\r\n","export class ViewerConfig {\r\n imageStyle?: any;\r\n viewerStyle?: any;\r\n hideRemove?: boolean;\r\n}\r\n","/**\r\n * Class that stores the configuration data\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20180724\r\n */\r\nexport class TechlifyConfig {\r\n projectKey: string = '';\r\n environment: string = '';\r\n authClientSecret: string = '';\r\n authGrantType: string = '';\r\n apiUrl: string = '';\r\n rawConfigs: any;\r\n storage: Storage;\r\n isLogoutWhileApiGetsFailed: boolean = false;\r\n\r\n constructor(data: any) {\r\n this.loadFromMap(data);\r\n }\r\n\r\n loadFromMap(data: any) {\r\n this.projectKey = data.projectKey;\r\n this.environment = data.environment;\r\n this.authClientSecret = data.authClientSecret;\r\n this.authGrantType = data.authGrantType;\r\n this.apiUrl = data.apiUrl;\r\n this.storage = data?.storage;\r\n this.rawConfigs = data;\r\n this.isLogoutWhileApiGetsFailed = data?.isLogoutWhileApiGetsFailed;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\n\r\nimport { TechlifyConfig } from \"./techlify-config.model\";\r\n\r\n/**\r\n * Service that provides settings for all other services\r\n *\r\n * @author Joshua Kissoon\r\n * @since 20170709\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ConfigService {\r\n\r\n public static BASE_CREDENTIALS = \"credentials\";\r\n\r\n private config: TechlifyConfig;\r\n\r\n constructor(config: TechlifyConfig) {\r\n this.config = config;\r\n }\r\n\r\n getConfigsRaw() {\r\n return this.config.rawConfigs;\r\n }\r\n\r\n getProjectKey() {\r\n return this.config.projectKey;\r\n }\r\n\r\n getApiUrl() {\r\n return this.config.apiUrl;\r\n }\r\n\r\n getAuthClientSecret() {\r\n return this.config.authClientSecret;\r\n }\r\n\r\n getStorage() {\r\n return this.config.storage ? this.config.storage : localStorage;\r\n }\r\n\r\n getAuthGrantType() {\r\n return this.config.authGrantType;\r\n }\r\n\r\n getCredentialsKey() {\r\n return this.config.projectKey + \"_\" + ConfigService.BASE_CREDENTIALS;\r\n }\r\n\r\n}\r\n","import { Component, Inject } from '@angular/core';\r\nimport { MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\r\n\r\n@Component({\r\n selector: 'snack-bar-component-example-snack',\r\n templateUrl: 'success-snack.html',\r\n styleUrls: ['./snack.scss'],\r\n})\r\nexport class SuccessSnackComponent {\r\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\r\n}\r\n@Component({\r\n selector: 'snack-bar-component-example-snack',\r\n templateUrl: 'error-snack.html',\r\n styleUrls: ['./snack.scss'],\r\n})\r\nexport class ErrorSnackComponent {\r\n constructor(@Inject(MAT_SNACK_BAR_DATA) public data: any) { }\r\n}\r\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 { TechlifyConfig } from './techlify-config.model';\r\nimport { 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 private config: TechlifyConfig,\r\n ) {\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 if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n location.reload();\r\n }\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpErrorResponse } from '@angular/common/http';\r\nimport { Observable, throwError } from 'rxjs';\r\nimport { catchError } from 'rxjs/operators';\r\nimport { Logger } from './logger.service';\r\nimport { ConfigService } from './config.service';\r\nimport { ErrorHandlerService } from './error-handler.service';\r\n\r\nconst log = new Logger('ErrorHandlerInterceptor');\r\n\r\n/**\r\n * Adds a default error handler to all requests.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ErrorHandlerInterceptor implements HttpInterceptor {\r\n\r\n constructor(private configService: ConfigService, private errorHandler: ErrorHandlerService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n return next.handle(request).pipe(catchError(error => this.handleError(error)));\r\n }\r\n\r\n // Customize the default error handler here if needed\r\n private handleError(error: HttpErrorResponse): Observable<HttpEvent<any>> {\r\n let errorMessage = '';\r\n if (error.error instanceof ErrorEvent) {\r\n // client-side error\r\n errorMessage = `Client Error: ${this.configService?.getProjectKey()}: ${error.error.message}`;\r\n } else {\r\n // server-side error\r\n errorMessage = `Server Error: ${this.configService?.getProjectKey()}`;\r\n try {\r\n this.errorHandler.handleError(error, 'Unexpected Server Error, try later or contact service team');\r\n } catch (e) {\r\n console.log(\"Unable to handle server error\", e);\r\n }\r\n }\r\n return throwError(error);\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpResponse } from '@angular/common/http';\r\nimport { ConfigService } from './config.service';\r\nimport { Logger } from './logger.service';\r\n\r\nconst log = new Logger('HttpCacheService');\r\n\r\n\r\nexport interface HttpCacheEntry {\r\n lastUpdated: Date;\r\n data: HttpResponse<any>;\r\n}\r\n\r\n/**\r\n * Provides a cache facility for HTTP requests with configurable persistence policy.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HttpCacheService {\r\n\r\n private cachedData: { [key: string]: HttpCacheEntry; } = {};\r\n private storage: Storage | any | null;\r\n private cachePersistenceKey: String | any;\r\n\r\n constructor(private configService: ConfigService) {\r\n this.storage = this.configService.getStorage();\r\n this.cachePersistenceKey = this.configService.getProjectKey() + '_HTTP_CACHE';\r\n this.loadCacheData();\r\n }\r\n\r\n /**\r\n * Sets the cache data for the specified request.\r\n * @param {!string} url The request URL.\r\n * @param {ResponseOptions} data The received data.\r\n * @param {Date=} lastUpdated The cache last update, current date is used if not specified.\r\n */\r\n setCacheData(url: string, data: HttpResponse<any>, lastUpdated?: Date) {\r\n this.cachedData[url] = {\r\n lastUpdated: lastUpdated || new Date(),\r\n data: data\r\n };\r\n log.debug(`Cache set for key: \"${url}\"`);\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Gets the cached data for the specified request.\r\n * @param {!string} url The request URL.\r\n * @return {?ResponseOptions} The cached data or null if no cached data exists for this request.\r\n */\r\n getCacheData(url: string): HttpResponse<any> | null {\r\n const cacheEntry = this.cachedData[url];\r\n\r\n if (cacheEntry) {\r\n log.debug(`Cache hit for key: \"${url}\"`);\r\n return cacheEntry.data;\r\n }\r\n\r\n return null;\r\n }\r\n\r\n /**\r\n * Gets the cached entry for the specified request.\r\n * @param {!string} url The request URL.\r\n * @return {?HttpCacheEntry} The cache entry or null if no cache entry exists for this request.\r\n */\r\n getHttpCacheEntry(url: string): HttpCacheEntry | null {\r\n return this.cachedData[url] || null;\r\n }\r\n\r\n /**\r\n * Clears the cached entry (if exists) for the specified request.\r\n * @param {!string} url The request URL.\r\n */\r\n clearCache(url: string): void {\r\n delete this.cachedData[url];\r\n log.debug(`Cache cleared for key: \"${url}\"`);\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Cleans cache entries older than the specified date.\r\n * @param {date=} expirationDate The cache expiration date. If no date is specified, all cache is cleared.\r\n */\r\n cleanCache(expirationDate?: Date) {\r\n if (expirationDate) {\r\n Object(this.cachedData).keys.forEach((key: string) => {\r\n if (expirationDate >= this.cachedData[key]?.lastUpdated) {\r\n delete this.cachedData[key];\r\n }\r\n });\r\n } else {\r\n this.cachedData = {};\r\n }\r\n this.saveCacheData();\r\n }\r\n\r\n /**\r\n * Sets the cache persistence policy.\r\n * Note that changing the cache persistence will also clear the cache from its previous storage.\r\n * @param {'local'|'session'=} persistence How the cache should be persisted, it can be either local or session\r\n * storage, or if no value is provided it will be only in-memory (default).\r\n */\r\n setPersistence(persistence?: 'local' | 'session') {\r\n this.cleanCache();\r\n this.storage = persistence === 'local' ? localStorage : persistence === 'session' ? sessionStorage : null;\r\n this.loadCacheData();\r\n }\r\n\r\n private saveCacheData() {\r\n if (this.storage) {\r\n this.storage[this.cachePersistenceKey] = JSON.stringify(this.cachedData);\r\n }\r\n }\r\n\r\n private loadCacheData() {\r\n const data = this.storage ? this.storage[this.cachePersistenceKey] : null;\r\n this.cachedData = data ? JSON.parse(data) : {};\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest, HttpResponse } from '@angular/common/http';\r\nimport { HttpCacheService } from './http-cache.service';\r\nimport { Observable, Subscriber } from 'rxjs';\r\n\r\n/**\r\n * Caches HTTP requests.\r\n * Use ExtendedHttpClient fluent API to configure caching for each request.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CacheInterceptor implements HttpInterceptor {\r\n\r\n private forceUpdate = false;\r\n\r\n constructor(private httpCacheService: HttpCacheService) { }\r\n\r\n /**\r\n * Configures interceptor options\r\n * @param {{update: boolean}} options If update option is enabled, forces request to be made and updates cache entry.\r\n * @return {CacheInterceptor} The configured instance.\r\n */\r\n configure(options?: { update?: boolean } | null): CacheInterceptor {\r\n const instance = new CacheInterceptor(this.httpCacheService);\r\n if (options && options.update) {\r\n instance.forceUpdate = true;\r\n }\r\n return instance;\r\n }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n if (request.method !== 'GET') {\r\n return next.handle(request);\r\n }\r\n\r\n return new Observable((subscriber: Subscriber<HttpEvent<any>>) => {\r\n const cachedData = this.forceUpdate ? null : this.httpCacheService.getCacheData(request.urlWithParams);\r\n if (cachedData !== null) {\r\n // Create new response to avoid side-effects\r\n subscriber.next(new HttpResponse(cachedData as Object));\r\n subscriber.complete();\r\n } else {\r\n next.handle(request)\r\n .subscribe(\r\n event => {\r\n if (event instanceof HttpResponse) {\r\n this.httpCacheService.setCacheData(request.urlWithParams, event);\r\n }\r\n subscriber.next(event);\r\n },\r\n error => subscriber.error(error),\r\n () => subscriber.complete()\r\n );\r\n }\r\n });\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { ConfigService } from './config.service';\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class ApiPrefixInterceptor implements HttpInterceptor {\r\n\r\n constructor(private configService: ConfigService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n if (!/^(http|https):/i.test(request.url)) {\r\n request = request.clone({ url: this.configService.getApiUrl() + request.url });\r\n }\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { ConfigService } from './config.service';\r\n\r\nexport interface Credentials {\r\n // Customize received credentials here\r\n user: any;\r\n token: any;\r\n}\r\n\r\n/**\r\n * Provides storage for authentication credentials.\r\n * The Credentials interface should be replaced with proper implementation.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class CredentialsService {\r\n\r\n private _credentials: Credentials | null = null;\r\n\r\n constructor(private configService: ConfigService) {\r\n }\r\n\r\n /**\r\n * Checks is the user is authenticated.\r\n * @return True if the user is authenticated.\r\n */\r\n get isAuthenticated(): boolean {\r\n return !!this.credentials;\r\n }\r\n\r\n /**\r\n * Gets the user credentials.\r\n * @return The user credentials or null if the user is not authenticated.\r\n */\r\n get credentials(): Credentials | null {\r\n if (!this._credentials) {\r\n this._credentials = JSON.parse(sessionStorage.getItem(this.configService.getCredentialsKey()) || localStorage.getItem(this.configService.getCredentialsKey()));\r\n }\r\n return this._credentials;\r\n }\r\n\r\n /**\r\n * Sets the user credentials.\r\n * The credentials may be persisted across sessions by setting the `remember` parameter to true.\r\n * Otherwise, the credentials are only persisted for the current session.\r\n * @param credentials The user credentials.\r\n * @param remember True to remember credentials across sessions.\r\n */\r\n setCredentials(credentials?: Credentials, remember?: boolean) {\r\n this._credentials = credentials || null;\r\n\r\n if (credentials) {\r\n (remember ? localStorage : sessionStorage).setItem(this.configService.getCredentialsKey(), JSON.stringify(credentials));\r\n } else {\r\n sessionStorage.clear();\r\n localStorage.clear();\r\n this._credentials = null;\r\n }\r\n }\r\n\r\n getAccessToken(): string | null {\r\n const expiration = this.credentials?.token?.expires_in || '';\r\n const token = this.credentials?.token?.access_token || '';\r\n\r\n if (!token || !expiration) {\r\n return null;\r\n }\r\n\r\n if (Date.now() > parseInt(expiration)) {\r\n this.setCredentials();\r\n return null;\r\n }\r\n\r\n return token;\r\n }\r\n\r\n getExpiration(): string {\r\n return this.credentials?.token?.expires_in || '';\r\n }\r\n\r\n getRefreshToken(): string {\r\n return this.credentials?.token?.refresh_token || '';\r\n }\r\n\r\n refresh(): CredentialsService {\r\n this._credentials = null;\r\n return this;\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\nimport { CredentialsService } from './credentials.service';\r\n\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TokenInterceptor implements HttpInterceptor {\r\n\r\n constructor(private credentials: CredentialsService) { }\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n request = request.clone({\r\n setHeaders: {\r\n Authorization: `Bearer ${this.credentials.getAccessToken() || ''}`\r\n }\r\n });\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\nimport { Observable } from 'rxjs';\r\n\r\n\r\n/**\r\n * Prefixes all requests not starting with `http[s]` with `environment.serverUrl`.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HeaderInterceptor implements HttpInterceptor {\r\n\r\n intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {\r\n request = request.clone({\r\n setHeaders: {\r\n 'Content-Type': request.headers.get('Content-Type') || 'application/json',\r\n }\r\n });\r\n return next.handle(request);\r\n }\r\n}\r\n","import { Inject, Injectable, InjectionToken, Injector, Optional } from '@angular/core';\r\nimport { HttpClient, HttpEvent, HttpInterceptor, HttpHandler, HttpRequest } from '@angular/common/http';\r\n\r\nimport { Observable } from 'rxjs';\r\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\r\nimport { CacheInterceptor } from './cache.interceptor';\r\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\r\nimport { TokenInterceptor } from './token.interceptor';\r\nimport { HeaderInterceptor } from './header.interceptor';\r\n\r\n\r\n// Augment HttpClient with the added configuration methods from HttpService, to allow in-place replacement of\r\n// HttpClient with HttpService using dependency injection\r\nexport interface HttpCustomClient {\r\n\r\n /**\r\n * Enables caching for this request.\r\n * @param {boolean} forceUpdate Forces request to be made and updates cache entry.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n cache(forceUpdate?: boolean): HttpCustomClient;\r\n\r\n /**\r\n * Skips default error handler for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipErrorHandler(): HttpCustomClient;\r\n\r\n /**\r\n * Skips default API Prefix for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipApiPrefix(): HttpCustomClient;\r\n\r\n\r\n /**\r\n * Skips default Token Interceptor for this request.\r\n * @return {HttpCustomClient} The new instance.\r\n */\r\n skipToken(): HttpCustomClient;\r\n\r\n /**\r\n* Skips default Header Interceptor for this request.\r\n* @return {HttpCustomClient} The new instance.\r\n*/\r\n skipHeader(): HttpCustomClient;\r\n\r\n}\r\n\r\n\r\n// From @angular/common/http/src/interceptor: allows to chain interceptors\r\nclass HttpInterceptorHandler implements HttpHandler {\r\n\r\n constructor(private next: HttpHandler, private interceptor: HttpInterceptor) { }\r\n\r\n handle(request: HttpRequest<any>): Observable<HttpEvent<any>> {\r\n return this.interceptor.intercept(request, this.next);\r\n }\r\n\r\n}\r\n\r\n/**\r\n * Allows to override default dynamic interceptors that can be disabled with the HttpService extension.\r\n * Except for very specific needs, you should better configure these interceptors directly in the constructor below\r\n * for better readability.\r\n *\r\n * For static interceptors that should always be enabled (like ApiPrefixInterceptor), use the standard\r\n * HTTP_INTERCEPTORS token.\r\n */\r\nexport const HTTP_DYNAMIC_INTERCEPTORS = new InjectionToken<HttpInterceptor>('HTTP_DYNAMIC_INTERCEPTORS');\r\n\r\n/**\r\n * Extends HttpClient with per request configuration using dynamic interceptors.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class HttpService extends HttpClient implements HttpCustomClient {\r\n\r\n constructor(private httpHandler: HttpHandler,\r\n private injector: Injector,\r\n @Optional() @Inject(HTTP_DYNAMIC_INTERCEPTORS) private interceptors: HttpInterceptor[] = []) {\r\n super(httpHandler);\r\n\r\n if (!this.interceptors) {\r\n // Configure default interceptors that can be disabled here\r\n this.interceptors = [this.injector.get(ApiPrefixInterceptor), this.injector.get(HeaderInterceptor), this.injector.get(TokenInterceptor), this.injector.get(ErrorHandlerInterceptor)];\r\n }\r\n }\r\n\r\n cache(forceUpdate?: boolean): HttpService {\r\n const cacheInterceptor = this.injector.get(CacheInterceptor).configure({ update: forceUpdate });\r\n return this.addInterceptor(cacheInterceptor);\r\n }\r\n\r\n skipErrorHandler(): HttpService {\r\n return this.removeInterceptor(ErrorHandlerInterceptor);\r\n }\r\n\r\n skipApiPrefix(): HttpService {\r\n return this.removeInterceptor(ApiPrefixInterceptor);\r\n }\r\n\r\n skipToken(): HttpService {\r\n return this.removeInterceptor(TokenInterceptor);\r\n }\r\n\r\n skipHeader(): HttpService {\r\n return this.removeInterceptor(HeaderInterceptor);\r\n }\r\n\r\n // Override the original method to wire interceptors when triggering the request.\r\n request(method?: any, url?: any, options?: any): any {\r\n const handler = this.interceptors.reduceRight(\r\n (next, interceptor) => new HttpInterceptorHandler(next, interceptor),\r\n this.httpHandler\r\n );\r\n return new HttpClient(handler).request(method, url, options);\r\n }\r\n\r\n private removeInterceptor(interceptorType: Function): HttpService {\r\n return new HttpService(\r\n this.httpHandler,\r\n this.injector,\r\n this.interceptors.filter(i => !(i instanceof interceptorType))\r\n );\r\n }\r\n\r\n private addInterceptor(interceptor: HttpInterceptor): HttpService {\r\n return new HttpService(\r\n this.httpHandler,\r\n this.injector,\r\n this.interceptors.concat([interceptor])\r\n );\r\n }\r\n\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class EntityFileService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getEntityFiles(filters: any) {\r\n return this.http.get(`api/entity-files`, { params: filters }).toPromise();\r\n }\r\n\r\n createEntityFile(model: any) {\r\n return this.http.post(\"api/entity-files\", model).toPromise();\r\n }\r\n\r\n updateEntityFile(model: any) {\r\n return this.http.put(`api/entity-files/${model.id}`, model).toPromise();\r\n }\r\n\r\n deleteEntityFile(model: any) {\r\n return this.http.delete(`api/entity-files/${model.id}`).toPromise();\r\n }\r\n\r\n uploadEntityFile(file: File, params?: any) {\r\n const formData: FormData = new FormData();\r\n formData.append(\"fileData\", file, file.name);\r\n if (params?.entity_id) {\r\n formData.append('entity_id', params.entity_id);\r\n formData.append('entity_type', params.entity_type);\r\n }\r\n return this.http\r\n .skipHeader()\r\n .post(\r\n \"api/entity-files-upload\",\r\n formData,\r\n ).toPromise();\r\n }\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { FormGroup } from '@angular/forms';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class FormValidatorService {\r\n\r\n constructor() { }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string, formGroup: FormGroup | any, firstAttempt?: boolean) {\r\n return (!formGroup.get(field).valid && formGroup.get(field).touched) ||\r\n (!formGroup.get(field).valid && formGroup.get(field).untouched && firstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string, formGroup: FormGroup | any, errorMessages: any, errorField?: string) {\r\n const error = Object.keys(formGroup.get(field).errors);\r\n return (error.length > 0) ? (errorMessages[errorField || field][error[0]] ? errorMessages[errorField || field][error[0]] : '') : '';\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Inject } from \"@angular/core\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\r\nimport { EntityFileService } from '../entity-file.service';\r\nimport { FileDropperConfig } from '../../file-dropper/file-dropper.model';\r\nimport { ViewerConfig } from '../../document-viewer/viewer-config.model';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { AlertService } from \"../../core/alert.service\";\r\n\r\nconst errorMessages: any = {\r\n url: {\r\n required: \"File is required\"\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'entity-file-form',\r\n templateUrl: './entity-file-form.component.html',\r\n styleUrls: ['./entity-file-form.component.css']\r\n})\r\nexport class EntityFileFormComponent implements OnInit {\r\n\r\n entityFileGroup: FormGroup;\r\n assignmentFileFirstAttempt: boolean;\r\n updateMode: boolean;\r\n fileConfig: FileDropperConfig;\r\n fileList: any[] = [];\r\n viewerConfig: ViewerConfig;\r\n hideTitleAndDetails: boolean;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<EntityFileFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private formValidatorService: FormValidatorService,\r\n private fb: FormBuilder,\r\n private entityFileService: EntityFileService,\r\n private alertService: AlertService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.entityFileGroup = this.fb.group({\r\n id: [''],\r\n title: [''],\r\n details: [''],\r\n entity_type: [''],\r\n entity_id: [],\r\n file: ['', Validators.required],\r\n url: ['', Validators.required],\r\n file_size: ['', Validators.required],\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n if (this.data.entity) {\r\n this.entityFileGroup.get('entity_type').setValue(this.data.entity.entity_type);\r\n this.entityFileGroup.get('entity_id').setValue(this.data.entity.entity_id);\r\n }\r\n if (this.data.file) {\r\n this.updateMode = true;\r\n this.entityFileGroup.patchValue(this.data.file);\r\n }\r\n\r\n if (this.data?.hideTitleAndDetails) {\r\n this.hideTitleAndDetails = this.data?.hideTitleAndDetails;\r\n }\r\n\r\n //File dropper config\r\n this.fileConfig = {\r\n fileId: \"subjectFile\",\r\n containerId: \"subjectFileContainer\",\r\n styles: {\r\n height: \"200px\"\r\n },\r\n multiple: false,\r\n acceptFile: \"*\",\r\n maxSize: 10,\r\n acceptFileText: \"All Files\"\r\n };\r\n\r\n this.viewerConfig = {\r\n viewerStyle: {\r\n height: '200px',\r\n width: '100%'\r\n }\r\n }\r\n }\r\n\r\n\r\n //Method to trigger submit\r\n async submit() {\r\n this.assignmentFileFirstAttempt = true;\r\n if (!this.entityFileGroup.valid) {\r\n return;\r\n }\r\n const model = this.entityFileGroup.value;\r\n\r\n if (this.hideTitleAndDetails) {\r\n model.title = model.file;\r\n }\r\n\r\n const result: any = this.updateMode\r\n ? await this.entityFileService.updateEntityFile(model)\r\n : await this.entityFileService.createEntityFile(model);\r\n this.dialogRef.close(result.item);\r\n this.alertService.addAlert(\r\n \"File submitted successfully\",\r\n \"success\"\r\n );\r\n\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.fileList = event;\r\n\r\n if (this.fileList.length > 0) {\r\n\r\n const result: any = await this.entityFileService.uploadEntityFile(\r\n this.fileList[0],\r\n );\r\n this.entityFileGroup.patchValue(result.item);;\r\n this.fileList = [];\r\n }\r\n }\r\n\r\n\r\n async removeFile() {\r\n if (this.entityFileGroup.value.file) {\r\n try {\r\n this.entityFileGroup.patchValue({\r\n file: \"\",\r\n url: \"\"\r\n });\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to remove file, try later\", \"warn\");\r\n }\r\n }\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(\r\n field,\r\n this.entityFileGroup,\r\n this.assignmentFileFirstAttempt\r\n );\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(\r\n field,\r\n this.entityFileGroup,\r\n errorMessages\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { Location } from '@angular/common';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\r\nimport { EntityFileService } from './entity-file.service';\r\nimport { ActionPopup } from '../action-popup/action-popup.model';\r\nimport { FormControl } from '@angular/forms';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { ActionPopupComponent } from '../action-popup/action-popup.component';\r\nimport { ViewerConfig } from '../document-viewer/viewer-config.model';\r\nimport { FileDropperConfig } from '../file-dropper';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-entity-files-view-all',\r\n templateUrl: './entity-files-view-all.component.html',\r\n styleUrls: ['./entity-files-view-all.component.css']\r\n})\r\nexport class EntityFilesViewAllComponent implements OnInit {\r\n @Input() entityId: number;\r\n @Input() entityType: string;\r\n @Input() viewOnly: boolean = false;\r\n @Input() removeSearch: boolean;\r\n @Input() hideTitleAndDetails: boolean;\r\n @Input() displayMode: boolean;\r\n @Input() allowMultipleFiles: boolean = false;\r\n viewerConfig: ViewerConfig;\r\n @Input() title: string = \"File\";\r\n filters: any = {};\r\n entityFiles: any[] = [];\r\n displayedColumns = [\r\n 'index',\r\n 'title',\r\n 'details',\r\n 'file_size',\r\n 'uploaded_on',\r\n ];\r\n isWorking: boolean = false;\r\n search: FormControl = new FormControl('');\r\n page: number = 1;\r\n perPage: number = 25;\r\n lastPage: number = 0;\r\n fileConfig: FileDropperConfig;\r\n fileList: any[] = [];\r\n\r\n constructor(\r\n private entityFileService: EntityFileService,\r\n public location: Location,\r\n private alertService: AlertService,\r\n private dialog: MatDialog,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n //File dropper config\r\n this.fileConfig = {\r\n fileId: \"entityDashboardDropper\",\r\n containerId: \"entityDashboardDropperContainer\",\r\n styles: {\r\n height: \"500px\"\r\n },\r\n multiple: this.allowMultipleFiles,\r\n acceptFile: \"*\",\r\n maxSize: 10,\r\n acceptFileText: \"All Files\"\r\n };\r\n\r\n this.viewerConfig = {\r\n imageStyle: {\r\n height: '200px',\r\n width: '200px'\r\n },\r\n viewerStyle: {\r\n height: ' 160px',\r\n width: '200px'\r\n },\r\n hideRemove: true\r\n };\r\n\r\n if (this.hideTitleAndDetails) {\r\n this.displayedColumns = this.displayedColumns.filter(x => (x !== 'details') && (x !== 'title'));\r\n }\r\n\r\n this.filters = {\r\n entity_type: this.entityType,\r\n entity_id: this.entityId,\r\n title: \"\"\r\n };\r\n this.search.valueChanges.pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this)).subscribe(value => {\r\n this.filters.title = value;\r\n this.reload();\r\n })\r\n this.fetchEntityFilesDetails();\r\n if (!this.viewOnly) {\r\n this.displayedColumns.push('actions');\r\n }\r\n }\r\n\r\n async fetchEntityFilesDetails() {\r\n this.filters.page = this.page;\r\n this.filters.perPage = this.perPage;\r\n this.isWorking = true;\r\n const result: any = await this.entityFileService.getEntityFiles(this.filters);\r\n this.lastPage = result.last_page || this.page;\r\n this.entityFiles = this.entityFiles.concat(result.data);\r\n this.isWorking = false;\r\n }\r\n\r\n addEntityFile() {\r\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\r\n width: \"700px\",\r\n data: {\r\n entity: this.filters,\r\n hideTitleAndDetails: this.hideTitleAndDetails\r\n },\r\n autoFocus: false,\r\n restoreFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n const files = [...this.entityFiles];\r\n files.push(result);\r\n this.entityFiles = files;\r\n }\r\n });\r\n }\r\n\r\n editEntityFile(file: any) {\r\n const dialogRef = this.dialog.open(EntityFileFormComponent, {\r\n width: \"700px\",\r\n autoFocus: false,\r\n data: {\r\n file: file,\r\n hideTitleAndDetails: this.hideTitleAndDetails\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEntityFile(file: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: \"Delete File\",\r\n message: `Are you sure to proceed delete the file ${file.title}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n const result = await this.entityFileService.deleteEntityFile(\r\n file\r\n );\r\n this.alertService.addAlert(\r\n \"File successfully deleted\",\r\n \"success\"\r\n );\r\n this.reload();\r\n\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage && !this.isWorking) {\r\n this.page += 1;\r\n this.fetchEntityFilesDetails();\r\n }\r\n }\r\n\r\n reload() {\r\n this.entityFiles = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.fetchEntityFilesDetails();\r\n }\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n resetFieldValue() {\r\n this.search.setValue(\"\");\r\n }\r\n\r\n sizeOf(bytes) {\r\n if (!bytes) { return \"0.00 B\"; }\r\n var e = Math.floor(Math.log(bytes) / Math.log(1024));\r\n return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.fileList = event;\r\n if (this.fileList.length > 0) {\r\n await this.fileList.forEach(async file => {\r\n const result: any = await this.entityFileService.uploadEntityFile(\r\n file,\r\n {\r\n entity_type: this.entityType,\r\n entity_id: this.entityId,\r\n }\r\n );\r\n this.reload();\r\n });\r\n this.fileList = [];\r\n this.alertService.addAlert('Successfull uploaded', 'success');\r\n }\r\n }\r\n}\r\n","import { Component, OnInit, Input, Output, EventEmitter } from \"@angular/core\";\r\nimport { AlertService } from \"../core/alert.service\";\r\nimport { FileDropperConfig } from './file-dropper.model';\r\n\r\n\r\n@Component({\r\n selector: \"app-file-dropper\",\r\n templateUrl: \"./file-dropper.component.html\",\r\n styleUrls: [\"./file-dropper.component.scss\"]\r\n})\r\nexport class FileDropperComponent implements OnInit {\r\n @Input() fileArray: any[] = [];\r\n\r\n @Input() config: FileDropperConfig;\r\n\r\n @Output() fileChanged: any = new EventEmitter();\r\n\r\n border = \"1px dashed #989898\";\r\n\r\n @Input() styles: any;\r\n\r\n isSingleMode: boolean;\r\n\r\n constructor(private alertService: AlertService) { }\r\n\r\n /**Life cycle hook method */\r\n ngOnInit() {\r\n this.isSingleMode = !Boolean(this.config.multiple);\r\n }\r\n\r\n /**Method for dragging event */\r\n dragEnter(event: any) {\r\n event.target.style.background = this.config.dragColor || \"#c0c0c0\";\r\n\r\n event.target.style.border = \"1px dashed black\";\r\n\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drag over event */\r\n dragOver(event: any) {\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drag leave event */\r\n dragLeave(event: any) {\r\n event.target.style.background = \"\";\r\n event.target.style.border = this.border;\r\n\r\n event.preventDefault();\r\n }\r\n\r\n /**Method for drop event */\r\n dropEvent(event: any) {\r\n event.target.style.background = \"\";\r\n event.target.style.border = this.border;\r\n const droppedFiles: FileList = event.dataTransfer.files;\r\n if (droppedFiles.length > 0) {\r\n const fileArray = Array.from(droppedFiles);\r\n this.addFiles(fileArray);\r\n }\r\n event.preventDefault();\r\n }\r\n\r\n /**Method to list files selected */\r\n onFileChange(event: any) {\r\n if (event.target.files && event.target.files.length) {\r\n const fileArray = Array.from(event.target.files);\r\n this.addFiles(fileArray);\r\n const fileInput = document.getElementById(\r\n this.config.fileId\r\n ) as HTMLInputElement;\r\n fileInput.value = \"\";\r\n }\r\n }\r\n\r\n /**Method to add files in the array */\r\n addFiles(fileArray: any) {\r\n if (!this.isSingleMode) {\r\n fileArray.forEach((file: any) => {\r\n this.fileArray = this.fileArray.filter(\r\n (item: any) => item.name !== file.name\r\n );\r\n if (this.fileSizeAllowed(file)) {\r\n this.fileArray.push(file);\r\n }\r\n });\r\n\r\n this.fileArray.sort(this.sortFiles);\r\n this.fileChanged.emit(this.fileArray);\r\n } else {\r\n // Single Mode\r\n if (this.fileArray.length === 0) {\r\n if (this.fileSizeAllowed(fileArray[0])) {\r\n this.fileArray.push(fileArray[0]);\r\n this.fileArray.sort(this.sortFiles);\r\n this.fileChanged.emit(this.fileArray);\r\n }\r\n }\r\n }\r\n }\r\n\r\n /**Method to sort the files in asc */\r\n sortFiles(a: any, b: any) {\r\n const nameA = a.name.toUpperCase();\r\n const nameB = b.name.toUpperCase();\r\n if (nameA < nameB) {\r\n return -1;\r\n }\r\n if (nameA > nameB) {\r\n return 1;\r\n }\r\n\r\n return 0;\r\n }\r\n\r\n /**Method tp validate the file size */\r\n fileSizeAllowed(file: any): boolean {\r\n if (!Boolean(this.config.maxSize)) {\r\n return true;\r\n } else if (file.size / (1024 * 1024) < this.config.maxSize) {\r\n return true;\r\n } else {\r\n this.alertService.addAlert(\r\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`,\r\n \"warn\"\r\n );\r\n return false;\r\n }\r\n }\r\n\r\n /**Method invokes when the drop box is clicked to upload the file */\r\n clickEvent(event: any) {\r\n if (!(this.isSingleMode && this.fileArray.length > 0)) {\r\n document.getElementById(this.config.fileId).click();\r\n }\r\n event.preventDefault();\r\n }\r\n}\r\n","export class FileDropperConfig {\r\n containerId: string;\r\n fileId: string;\r\n styles?: any;\r\n multiple?: boolean;\r\n dragColor?: boolean;\r\n acceptFile: string; // use '*' to accept all file types.\r\n maxSize?: number; // size in MB\r\n acceptFileText?: string;\r\n}\r\n","import { Injectable } from '@angular/core';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class NoteService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getNotes(filterModel: any) {\r\n return this.http.get('api/notes', { params: filterModel }).toPromise();\r\n }\r\n\r\n addNote(note: any) {\r\n return this.http.post('api/notes', note).toPromise();\r\n }\r\n\r\n editNote(note: any) {\r\n return this.http.put(`api/notes/${note.id}`, note).toPromise();\r\n }\r\n\r\n deleteNote(note: any) {\r\n return this.http.delete(`api/notes/${note.id}`).toPromise();\r\n }\r\n}\r\n","import { Component, OnInit, Inject } from \"@angular/core\";\r\nimport { FormGroup, FormBuilder, Validators } from \"@angular/forms\";\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from \"@angular/material/dialog\";\r\nimport { NoteService } from \"../note.service\";\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { AlertService } from \"../../core/alert.service\";\r\n\r\nconst errorMessages: any = {\r\n note: {\r\n required: \"Note is required\"\r\n }\r\n};\r\n\r\n@Component({\r\n selector: 'app-note-form',\r\n templateUrl: './note-form.component.html',\r\n styleUrls: ['./note-form.component.css']\r\n})\r\nexport class NoteFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n noteFormGroup: FormGroup;\r\n noteFormFirstAttempt: boolean;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<NoteFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n private noteService: NoteService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.noteFormGroup = this.fb.group({\r\n id: [\"\"],\r\n note: [\"\", Validators.compose([Validators.required])],\r\n model_type: [\"\"],\r\n related_model_id: [\"\"],\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (this.data.update) {\r\n this.updateMode = true;\r\n }\r\n this.noteFormGroup.patchValue(this.data.note);\r\n }\r\n\r\n //Method to trigger login\r\n async submit() {\r\n this.noteFormFirstAttempt = true;\r\n if (this.noteFormGroup.valid) {\r\n const model = this.noteFormGroup.value;\r\n const result = this.updateMode\r\n ? await this.noteService.editNote(model)\r\n : await this.noteService.addNote(model);\r\n\r\n this.alertService.addAlert(\r\n `${this.data?.labelText} saved successfully`,\r\n \"success\"\r\n );\r\n this.dialogRef.close(result);\r\n }\r\n }\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(\r\n field,\r\n this.noteFormGroup,\r\n this.noteFormFirstAttempt\r\n );\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(\r\n field,\r\n this.noteFormGroup,\r\n errorMessages\r\n );\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport { NoteService } from '../note.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { NoteFormComponent } from '../note-form/note-form.component';\r\nimport { ActionPopupComponent } from '../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../action-popup/action-popup.model';\r\n\r\n@Component({\r\n selector: 'app-note-list',\r\n templateUrl: './note-list.component.html',\r\n styleUrls: ['./note-list.component.css']\r\n})\r\nexport class NoteListComponent implements OnInit {\r\n\r\n @Input() relatedModelId !: any;\r\n @Input() modelType !: any;\r\n @Input() readonly: boolean = false;\r\n @Input() labelText: string = 'Note';\r\n @Input() commentsView: boolean = false;\r\n\r\n notes: any[] = [];\r\n filters: any;\r\n displayedColumns = [\r\n 'index',\r\n 'note',\r\n 'actions'\r\n ];\r\n\r\n page = 1;\r\n lastPage = 1;\r\n\r\n constructor(private noteService: NoteService,\r\n private dialog: MatDialog\r\n ) {\r\n this.filters = {};\r\n this.filters.sort_by = \"created_at|DESC\";\r\n }\r\n\r\n ngOnInit() {\r\n if (this.readonly) {\r\n this.displayedColumns = this.displayedColumns.filter(x => x !== 'actions');\r\n }\r\n this.filters.related_model_id = this.relatedModelId;\r\n this.filters.model_type = this.modelType;\r\n this.loadData();\r\n }\r\n\r\n async loadData() {\r\n\r\n const result: any = await this.noteService.getNotes({ ...this.filters, page: this.page });\r\n this.notes = this.notes.concat(result.data);\r\n this.page = result.current_page;\r\n this.lastPage = result.last_page;\r\n }\r\n\r\n addNote() {\r\n const dialogRef = this.dialog.open(NoteFormComponent, {\r\n width: \"400px\",\r\n data: {\r\n note: { related_model_id: this.relatedModelId, model_type: this.modelType },\r\n labelText: this.labelText,\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.resetScroll();\r\n this.loadData();\r\n }\r\n });\r\n }\r\n\r\n editNote(note: any) {\r\n const dialogRef = this.dialog.open(NoteFormComponent, {\r\n width: \"400px\",\r\n data: {\r\n note: note,\r\n update: true,\r\n labelText: this.labelText\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.resetScroll();\r\n this.loadData();\r\n }\r\n });\r\n }\r\n\r\n async deleteNote(note: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: `Delete ${this.labelText}`,\r\n message: `Are you sure to delete?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n\r\n const result = await this.noteService.deleteNote(note);\r\n this.notes = this.notes.filter((item: any) => item.id !== note.id);\r\n\r\n }\r\n });\r\n }\r\n\r\n resetScroll() {\r\n this.page = 1;\r\n this.lastPage = 1;\r\n this.notes = [];\r\n }\r\n\r\n onScroll() {\r\n if (this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n commentAction(event: any) {\r\n if (event.type === \"save\") {\r\n if (event.value.id) {\r\n this.editComment(event.value);\r\n return;\r\n }\r\n this.addComment(event.value);\r\n return;\r\n }\r\n this.deleteNote(event.value);\r\n }\r\n\r\n async editComment(comment: any) {\r\n const result: any = await this.noteService.editNote(comment);\r\n let index = this.notes.findIndex(\r\n (x: any) => x.id === comment.id\r\n );\r\n if (index !== -1) {\r\n this.notes[index] = result.item;\r\n }\r\n }\r\n\r\n async addComment(comment: any) {\r\n comment.related_model_id = this.relatedModelId;\r\n comment.model_type = this.modelType;\r\n const result: any = await this.noteService.addNote(comment);\r\n this.notes.push(result.item);\r\n }\r\n\r\n}\r\n","import {\r\n Component,\r\n OnInit,\r\n Input,\r\n Output,\r\n EventEmitter,\r\n OnDestroy\r\n} from \"@angular/core\";\r\nimport { FormGroup, FormBuilder } from \"@angular/forms\";\r\nimport { CredentialsService } from \"../../core/credentials.service\";\r\n\r\n@Component({\r\n selector: \"app-comment-form\",\r\n templateUrl: \"./comment-form.component.html\",\r\n styleUrls: [\"./comment-form.component.scss\"]\r\n})\r\nexport class CommentFormComponent implements OnInit, OnDestroy {\r\n commentFormGroup: FormGroup;\r\n view: boolean;\r\n _commentData: any;\r\n\r\n @Input() set commentData(data: any) {\r\n this.view = !!data;\r\n this._commentData = data;\r\n this.commentFormGroup.patchValue(data);\r\n }\r\n\r\n @Output() action = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder,\r\n private credentialService: CredentialsService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n ngOnInit() { }\r\n\r\n get isLoggedIn() {\r\n return this.credentialService.isAuthenticated;\r\n }\r\n\r\n get currentUser() {\r\n return this.credentialService.credentials.user;\r\n }\r\n\r\n private createForm() {\r\n //TODO: Finialize and add more validations.\r\n this.commentFormGroup = this.fb.group({\r\n id: [\"\"],\r\n note: [\"\"],\r\n model_type: [\"\"],\r\n related_model_id: [\"\"],\r\n });\r\n }\r\n\r\n submit() {\r\n if (this.commentFormGroup.get(\"note\").value) {\r\n if (this._commentData) {\r\n this.view = !this.view;\r\n }\r\n this.action.emit({ type: \"save\", value: this.commentFormGroup.value });\r\n this.commentFormGroup.reset();\r\n } else if (this.commentFormGroup.get(\"id\").value) {\r\n this.deleteComment();\r\n }\r\n }\r\n\r\n hideEdit() {\r\n if (this.commentFormGroup.get(\"id\").value) {\r\n this.view = !this.view;\r\n }\r\n }\r\n\r\n editComment() {\r\n this.view = !this.view;\r\n this.commentFormGroup.patchValue(this._commentData);\r\n }\r\n\r\n deleteComment() {\r\n this.action.emit({ type: \"delete\", value: this.commentFormGroup.value });\r\n }\r\n\r\n ngOnDestroy() { }\r\n}\r\n","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, Input, OnDestroy, OnInit, Optional, Self, Output, EventEmitter, TemplateRef } from '@angular/core';\r\nimport { FormBuilder, FormGroup, ControlValueAccessor, NgControl, Validators } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { Subject, of, from } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged, startWith, switchMap, finalize } from 'rxjs/operators';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { ComponentType } from '@angular/cdk/portal';\r\nimport { HttpService } from '../core/http.service';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-searchable-selector',\r\n templateUrl: './searchable-selector.component.html',\r\n styleUrls: ['./searchable-selector.component.scss'],\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n useExisting: SearchableSelectorComponent\r\n }\r\n ]\r\n})\r\nexport class SearchableSelectorComponent implements ControlValueAccessor, OnInit, OnDestroy {\r\n\r\n @Input() valueField: string = 'id';\r\n @Input() titleField: string = 'title';\r\n @Input() apiUrl!: string;\r\n @Input() multiple: boolean = false;\r\n @Input() selectedValue: any;\r\n @Output() selectedValueChange = new EventEmitter();\r\n @Input() enableSearch: boolean = true;\r\n @Input() add: boolean = false;\r\n @Input() addConfig: any;\r\n @Input() edit: boolean = false;\r\n @Input() editConfig: any;\r\n @Input() sort: boolean = true;\r\n @Input() sortBy: string;\r\n @Input() searchField: string;\r\n @Input() itemComponent: ComponentType<unknown> | TemplateRef<unknown>;\r\n @Input() items: any[] = [];\r\n @Input() apiDataProperty: string = 'data';\r\n @Input() cache: boolean = false;\r\n @Input() perPage: number = 25;\r\n @Input() inDataSearch: boolean = false;\r\n @Output() selectionChange = new EventEmitter();\r\n @Output() itemsChange = new EventEmitter();\r\n\r\n\r\n isLoading: boolean = false;\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n static nextId = 0;\r\n selectorForm: FormGroup;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'searchable-selctor';\r\n id = `searchable-selctor-${SearchableSelectorComponent.nextId++}`;\r\n describedBy = '';\r\n filters: any;\r\n cachedItems: any[] = [];\r\n\r\n\r\n get empty() {\r\n const { value: { select_value } } = this.selectorForm;\r\n return !select_value;\r\n }\r\n\r\n get shouldLabelFloat() { return this.focused || !this.empty; }\r\n\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: boolean) {\r\n this.selectorForm.get('select_value').setValidators(Validators.required);\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean { return this._disabled; }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n @Input()\r\n get value(): any {\r\n if (this.selectorForm.valid) {\r\n return this.selectorForm.value.select_value;\r\n }\r\n return '';\r\n }\r\n set value(data: any) {\r\n this.selectorForm.patchValue({ select_value: data || '' });\r\n this.stateChanges.next();\r\n }\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n private _focusMonitor: FocusMonitor,\r\n private http: HttpService,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private dialog: MatDialog,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n this.selectorForm = formBuilder.group({\r\n select_value: [null],\r\n search: ''\r\n });\r\n\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n openedChange(event: any) {\r\n if (this.dataItems.length === 0 && this.selectorForm.get('search').value) {\r\n this.selectorForm.get('search').setValue('');\r\n }\r\n }\r\n\r\n get dataItems(): any[] {\r\n let items: any[] = [];\r\n if (this.multiple && this.selectedValue && (this.selectedValue.length > 0))\r\n items = [...this.selectedValue, ...this.items];\r\n else if ((!this.multiple) && this.selectedValue)\r\n items = [this.selectedValue, ...this.items];\r\n else\r\n items = this.items;\r\n items = items.filter((v, i, a) => a.findIndex(v => v[this.valueField] === a[i][this.valueField]) === i);\r\n //Emit the items to any child component\r\n this.itemsChange.emit(items);\r\n return items;\r\n }\r\n\r\n ngOnInit() {\r\n this.selectorForm.get('search').valueChanges\r\n .pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n if (this.enableSearch)\r\n this.search(value);\r\n });\r\n\r\n this.filters = {\r\n perPage: this.perPage,\r\n search: '',\r\n page: 1,\r\n lastPage: 1\r\n }\r\n if (this.sort) {\r\n this.filters.sort_by = this.sortBy || `${this.titleField}|asc`;\r\n }\r\n\r\n //Fetch Items only if it is not present, can be used in places where we load many entries.\r\n if (this.items.length === 0) {\r\n this.fetchItemList();\r\n }\r\n }\r\n\r\n fetchItemList() {\r\n this.isLoading = true;\r\n let request = this.http.get(this.apiUrl, { params: this.filters })\r\n if (this.cache) {\r\n request = this.http.cache().get(this.apiUrl, { params: this.filters })\r\n }\r\n of().pipe(\r\n startWith(true),\r\n switchMap((_) => from(request)),\r\n finalize(() => this.isLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.items = this.items.concat(result[this.apiDataProperty]);\r\n if (this.cache) {\r\n this.cachedItems = this.items;\r\n }\r\n this.filters.page = result?.current_page || 1;\r\n this.filters.lastPage = result?.last_page || 1;\r\n });\r\n }\r\n\r\n\r\n setDescribedByIds(ids: string[]) {\r\n this.describedBy = ids.join(' ');\r\n }\r\n\r\n onContainerClick(event: MouseEvent) {\r\n event.stopPropagation();\r\n }\r\n\r\n writeValue(data: any): void {\r\n this.value = data;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n getPropertyValue(ele: any, keyString: string) {\r\n keyString = keyString.replace(/\\[(\\w+)\\]/g, \".$1\"); // convert indexes to properties\r\n keyString = keyString.replace(/^\\./, \"\"); // strip a leading dot\r\n const keyList = keyString.split(\".\");\r\n for (let i = 0, n = keyList.length; i < n; ++i) {\r\n const key = keyList[i];\r\n if (ele && key in ele) {\r\n ele = ele[key];\r\n } else {\r\n return;\r\n }\r\n }\r\n return ele;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n if (this.multiple)\r\n this.selectedValue = (this.value as []).map(x => this.dataItems.find(y => y[this.valueField] === x));\r\n else\r\n this.selectedValue = this.dataItems.find(x => x[this.valueField] === this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(this.value);\r\n }\r\n\r\n get errorState(): boolean {\r\n return (this.ngControl && this.ngControl.invalid && (this.ngControl.touched || this.ngControl.dirty));\r\n }\r\n\r\n static ngAcceptInputType_disabled: boolean | string | null | undefined;\r\n static ngAcceptInputType_required: boolean | string | null | undefined;\r\n\r\n onScroll() {\r\n if (this.filters.lastPage > this.filters.page) {\r\n this.filters.page += 1;\r\n this.fetchItemList();\r\n }\r\n }\r\n\r\n reloadData() {\r\n this.items = [];\r\n this.filters.page = 1;\r\n this.filters.lastPage = 1;\r\n this.fetchItemList();\r\n }\r\n\r\n search(event: any) {\r\n if (this.searchField) {\r\n this.filters[this.searchField] = event;\r\n } else {\r\n this.filters.search = event;\r\n }\r\n // we need search field to search in data\r\n if (this.inDataSearch && this.searchField) {\r\n this.filterItems(event);\r\n } else {\r\n this.reloadData();\r\n }\r\n }\r\n\r\n filterItems(event: string) {\r\n if (event) {\r\n this.items = this.cachedItems.filter((value: any) => {\r\n return (value[this.searchField] as string).toLowerCase().search(event.toLowerCase()) != -1\r\n })\r\n } else {\r\n this.items = this.cachedItems;\r\n }\r\n }\r\n\r\n addItem(event: any) {\r\n const dialogRef = this.dialog.open(this.itemComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {},\r\n ...this.addConfig\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.items.push(result.item);\r\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\r\n this._handleInput();\r\n }\r\n });\r\n event.stopPropagation();\r\n }\r\n\r\n editItem(event: any) {\r\n const dialogRef = this.dialog.open(this.itemComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {\r\n item: this.selectedValue\r\n },\r\n ...this.editConfig\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.items = this.items.filter(x => x[this.valueField] !== this.selectedValue[this.valueField]);\r\n this.items.push(result.item);\r\n this.selectedValue = null;\r\n this.selectorForm.get('select_value').setValue(result.item[this.valueField]);\r\n this._handleInput();\r\n }\r\n });\r\n event.stopPropagation();\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { AfterViewInit, Directive, EventEmitter, Input, NgZone, OnDestroy, OnInit, Output } from '@angular/core';\r\nimport { MatSelect, SELECT_ITEM_HEIGHT_EM } from '@angular/material/select';\r\nimport { debounceTime, takeUntil, tap } from 'rxjs/operators';\r\nimport { fromEvent, Subject } from 'rxjs';\r\n\r\n@Directive({\r\n selector: '[msInfiniteScroll]'\r\n})\r\nexport class MatSelectInfiniteScrollDirective implements OnInit, OnDestroy, AfterViewInit {\r\n\r\n @Input() threshold = '15%';\r\n @Input() debounceTime = 150;\r\n @Input() complete: boolean;\r\n @Output() infiniteScroll = new EventEmitter<void>();\r\n\r\n private panel: Element;\r\n private thrPx = 0;\r\n private thrPc = 0;\r\n private singleOptionHeight = SELECT_ITEM_HEIGHT_EM;\r\n\r\n private destroyed$ = new Subject<boolean>();\r\n\r\n constructor(private matSelect: MatSelect, private ngZone: NgZone) {\r\n }\r\n\r\n ngOnInit() {\r\n this.evaluateThreshold();\r\n }\r\n\r\n ngAfterViewInit() {\r\n this.matSelect.openedChange.pipe(\r\n takeUntil(this.destroyed$)\r\n ).subscribe((opened) => {\r\n if (opened) {\r\n this.panel = this.matSelect.panel.nativeElement;\r\n this.singleOptionHeight = this.getSelectItemHeightPx();\r\n this.registerScrollListener();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy() {\r\n this.destroyed$.next(true);\r\n this.destroyed$.complete();\r\n }\r\n\r\n evaluateThreshold() {\r\n if (this.threshold.lastIndexOf('%') > -1) {\r\n this.thrPx = 0;\r\n this.thrPc = (parseFloat(this.threshold) / 100);\r\n\r\n } else {\r\n this.thrPx = parseFloat(this.threshold);\r\n this.thrPc = 0;\r\n }\r\n }\r\n\r\n registerScrollListener() {\r\n fromEvent(this.panel, 'scroll').pipe(\r\n takeUntil(this.destroyed$),\r\n debounceTime(this.debounceTime),\r\n tap((event) => {\r\n this.handleScrollEvent(event);\r\n })\r\n ).subscribe();\r\n }\r\n\r\n handleScrollEvent(event) {\r\n this.ngZone.runOutsideAngular(() => {\r\n if (this.complete) {\r\n return;\r\n }\r\n const countOfRenderedOptions = this.matSelect.options.length;\r\n const infiniteScrollDistance = this.singleOptionHeight * countOfRenderedOptions;\r\n const threshold = this.thrPc !== 0 ? (infiniteScrollDistance * this.thrPc) : this.thrPx;\r\n\r\n const scrolledDistance = this.panel.clientHeight + event.target.scrollTop;\r\n\r\n if ((scrolledDistance + threshold) >= infiniteScrollDistance) {\r\n this.ngZone.run(() => this.infiniteScroll.emit());\r\n }\r\n });\r\n }\r\n\r\n getSelectItemHeightPx(): number {\r\n return parseFloat(getComputedStyle(this.panel).fontSize) * SELECT_ITEM_HEIGHT_EM;\r\n }\r\n\r\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';\r\n\r\n/**\r\n * Service that provides utility functions for dates\r\n * \r\n * @author Joshua Kissoon\r\n * @since 20170726\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class DateUtils {\r\n\r\n /**\r\n * Takes in a date object and outputs the string value\r\n */\r\n getYYYYMMDDString(inputDate: Date): string {\r\n var year = inputDate.getFullYear();\r\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\r\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\r\n\r\n return year + \"-\" + month + \"-\" + date;\r\n }\r\n\r\n /**\r\n * Takes in a date object and outputs the year\r\n */\r\n getYYYY(inputDate: Date): number {\r\n var year = inputDate.getFullYear();\r\n return year;\r\n }\r\n\r\n /**\r\n * Takes in a date object and outputs the Month\r\n */\r\n getMM(inputDate: Date): number {\r\n var month = inputDate.getMonth() + 1;\r\n return month;\r\n }\r\n // var n = this.rfidCardUseManualEntry.manual_date.toLocaleTimeString();\r\n\r\n getDateTime(inputDate: Date): string {\r\n var year = inputDate.getFullYear();\r\n var month = (inputDate.getMonth() + 1) < 10 ? (\"0\" + (inputDate.getMonth() + 1)) : (inputDate.getMonth() + 1);\r\n var date = inputDate.getDate() < 10 ? (\"0\" + inputDate.getDate()) : inputDate.getDate();\r\n var time = inputDate.toLocaleTimeString();\r\n\r\n return year + \"-\" + month + \"-\" + date + \" \" + time;\r\n }\r\n\r\n}","import { Component, Input, Output, EventEmitter, OnInit } from \"@angular/core\";\r\n\r\n/**\r\n * Component to generate a number selector\r\n * \r\n * @author Floyd Kissoon\r\n * @since 20180628\r\n */\r\n@Component({\r\n selector: \"number-selector\",\r\n templateUrl: \"./number-selector.html\"\r\n})\r\nexport class NumberSelector implements OnInit {\r\n @Input() start_value: number;\r\n @Input() end_value: number\r\n @Output() selectedValueChange: EventEmitter<number>;\r\n @Input() selectedValue: number;\r\n\r\n items = new Array();\r\n\r\n constructor() {\r\n this.selectedValueChange = new EventEmitter<number>();\r\n }\r\n\r\n /**\r\n * Called when an item has been selected\r\n */\r\n numChanged() {\r\n this.selectedValueChange.emit(this.selectedValue);\r\n }\r\n\r\n\r\n ngOnInit() {\r\n for (var i = this.start_value; i < this.end_value + 1; i++) {\r\n this.items.push(i);\r\n }\r\n }\r\n}\r\n","export class Timeline {\r\n public static CUSTOM: number = 1;\r\n public static TODAY: number = 2;\r\n public static YESTERDAY: number = 3;\r\n public static THIS_WEEK: number = 4;\r\n public static LAST_WEEK: number = 5;\r\n public static THIS_MONTH: number = 6;\r\n public static LAST_MONTH: number = 7;\r\n public static THIS_QUARTER: number = 8;\r\n public static LAST_QUARTER: number = 9;\r\n public static THIS_YEAR: number = 10;\r\n public static LAST_YEAR: number = 11;\r\n public static ALL: number = 12;\r\n public static TOMMOROW: number = 13;\r\n public static NEXT_WEEK: number = 14;\r\n public static NEXT_MONTH: number = 15;\r\n}\r\n","import * as moment_ from 'moment';\r\nconst moment = moment_;\r\nimport { Timeline } from \"./timeline.model\";\r\n\r\n\r\nexport interface TimelineValue {\r\n date_from: Date,\r\n date_to: Date,\r\n show_custom_field: boolean\r\n}\r\nexport function calculateTimeline(value: any) {\r\n const date = new Date();\r\n const data: any = {\r\n 'date_from': date,\r\n 'date_to': date,\r\n 'show_custom_field': false\r\n };\r\n switch (value) {\r\n case Timeline.CUSTOM: { //Custom\r\n data.show_custom_field = true;\r\n break;\r\n }\r\n case Timeline.TODAY: { // Today\r\n let now = moment();\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.YESTERDAY: { // Yesterday\r\n let now = moment().subtract(1, 'day');\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_WEEK: { // This Week\r\n let now = moment();\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_WEEK: { // Last Week\r\n let now = moment().subtract(1, 'week');\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_MONTH: { //This Month\r\n let now = moment();\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_MONTH: { // Last Month\r\n let now = moment().subtract(1, 'month');\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_QUARTER: { // This Quarter\r\n let now = moment();\r\n data.date_from = now.startOf('quarter').toISOString();\r\n data.date_to = now.endOf('quarter').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_QUARTER: { // Last Quarter\r\n let now = moment().subtract(1, 'quarter');\r\n data.date_from = now.startOf('quarter').toISOString();\r\n data.date_to = now.endOf('quarter').toISOString();\r\n break;\r\n }\r\n case Timeline.THIS_YEAR: { // This Year\r\n let now = moment();\r\n data.date_from = now.startOf('year').toISOString();\r\n data.date_to = now.endOf('year').toISOString();\r\n break;\r\n }\r\n case Timeline.LAST_YEAR: { // Last Year\r\n let now = moment().subtract(1, 'year');\r\n data.date_from = now.startOf('year').toISOString();\r\n data.date_to = now.endOf('year').toISOString();\r\n break;\r\n }\r\n case Timeline.TOMMOROW: {\r\n let now = moment().add(1, 'day');\r\n data.date_from = now.startOf('day').toISOString();\r\n data.date_to = now.endOf('day').toISOString();\r\n break;\r\n }\r\n case Timeline.NEXT_WEEK: {\r\n let now = moment().add(1, 'week');\r\n data.date_from = now.startOf('isoWeek').toISOString();\r\n data.date_to = now.endOf('isoWeek').toISOString();\r\n break;\r\n }\r\n case Timeline.NEXT_MONTH: {\r\n let now = moment().add(1, 'month');\r\n data.date_from = now.startOf('month').toISOString();\r\n data.date_to = now.endOf('month').toISOString();\r\n break;\r\n }\r\n default: { // All\r\n data.date_from = '';\r\n data.date_to = '';\r\n break;\r\n }\r\n\r\n }\r\n return data;\r\n}\r\n","import { coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { DatePipe } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Optional, Output, Self, ViewChild } from '@angular/core';\r\nimport { ControlValueAccessor, FormBuilder, FormControl, FormGroup, NgControl, Validators } from '@angular/forms';\r\nimport { MatFormFieldControl } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from \"@ngneat/until-destroy\";\r\nimport { TimelineValue, calculateTimeline } from './calculate-timeline';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { Timeline } from './timeline.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-timeline-filter',\r\n templateUrl: './timeline-filter.component.html',\r\n styleUrls: ['./timeline-filter.component.scss'],\r\n providers: [\r\n {\r\n provide: MatFormFieldControl,\r\n useExisting: TimelineFilterComponent\r\n }\r\n ]\r\n})\r\nexport class TimelineFilterComponent implements OnInit, ControlValueAccessor {\r\n\r\n @ViewChild('picker') picker;\r\n @Input() timelineValue: FormControl = new FormControl('');\r\n @Input() timelines: any[] = [\r\n { value: Timeline.CUSTOM, viewValue: 'Custom' },\r\n { value: Timeline.TODAY, viewValue: 'Today' },\r\n { value: Timeline.YESTERDAY, viewValue: 'Yesterday' },\r\n { value: Timeline.TOMMOROW, viewValue: 'Tomorrow' },\r\n { value: Timeline.THIS_WEEK, viewValue: 'This Week' },\r\n { value: Timeline.LAST_WEEK, viewValue: 'Last Week' },\r\n { value: Timeline.NEXT_WEEK, viewValue: 'Next Week' },\r\n { value: Timeline.THIS_MONTH, viewValue: 'This Month' },\r\n { value: Timeline.LAST_MONTH, viewValue: 'Last Month' },\r\n { value: Timeline.NEXT_MONTH, viewValue: 'Next Month' },\r\n { value: Timeline.THIS_QUARTER, viewValue: 'This Quarter' },\r\n { value: Timeline.LAST_QUARTER, viewValue: 'Last Quarter' },\r\n { value: Timeline.THIS_YEAR, viewValue: 'This Year' },\r\n { value: Timeline.LAST_YEAR, viewValue: 'Last Year' },\r\n { value: Timeline.ALL, viewValue: 'All dates' },\r\n ];\r\n @Input() dateFrom: string = 'date_from';\r\n @Input() dateTo: string = 'date_to';\r\n @Input() appearance: any = \"legacy\"\r\n @Input() showClearbutton: boolean = false;\r\n /**\r\n * @deprecated The form input is deprated\r\n */\r\n @Input() form: FormGroup = null;\r\n @Input() labelText: string = 'Select Timeline';\r\n @Input() selectedValue: any;\r\n @Input() touchUi: boolean = true;\r\n @Output() selectedValueChange = new EventEmitter();\r\n @Output() selectionChange = new EventEmitter();\r\n\r\n selectorForm: FormGroup;\r\n onChange: any = () => { };\r\n onTouched: any = () => { };\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n controlType = 'timeline-filter';\r\n id = `timeline-filter-${TimelineFilterComponent.nextId++}`;\r\n describedBy = '';\r\n\r\n selectedRange: TimelineValue;\r\n @Input() set defaultValue(value: any) {\r\n this.timelineValue.setValue(value);\r\n this.changeTimeline(value);\r\n }\r\n\r\n showCustomDateFields: boolean = false;\r\n\r\n constructor(\r\n formBuilder: FormBuilder,\r\n @Optional() @Self() public ngControl: NgControl,\r\n private datePipe: DatePipe\r\n ) {\r\n this.selectorForm = formBuilder.group({\r\n select_value: [null],\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n @Input()\r\n get required(): boolean { return this._required; }\r\n set required(value: boolean) {\r\n this.selectorForm.get('select_value').setValidators(Validators.required);\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean { return this._disabled; }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.selectorForm.disable() : this.selectorForm.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n @Input()\r\n get value(): any {\r\n if (this.selectorForm.valid) {\r\n return this.selectorForm.value.select_value;\r\n }\r\n return '';\r\n }\r\n set value(data: any) {\r\n this.selectorForm.patchValue({ select_value: data || '' });\r\n this._handleInput();\r\n this.stateChanges.next();\r\n }\r\n\r\n getDateRangeString() {\r\n let str = \"\";\r\n if (this.selectedRange?.show_custom_field) {\r\n if (this.selectedRange?.date_from.toUTCString() != 'Invalid Date') {\r\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_from?.toUTCString())\r\n }\r\n if (this.selectedRange?.date_to.toUTCString() != 'Invalid Date') {\r\n str += ' - ' + this.datePipe.transform(this.selectedRange?.date_to?.toUTCString())\r\n }\r\n }\r\n return str;\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.form.get(field).setValue('');\r\n }\r\n\r\n\r\n getFieldValue(field: string) {\r\n return this.form.get(field).value;\r\n }\r\n\r\n setFieldValue(field: string, value: any) {\r\n this.form.get(field).setValue(value);\r\n }\r\n\r\n changeTimeline(value: any) {\r\n const timeline = calculateTimeline(value);\r\n if (timeline) {\r\n this.setFieldValue(this.dateFrom, timeline.date_from)\r\n this.setFieldValue(this.dateTo, timeline.date_to)\r\n this.showCustomDateFields = timeline.show_custom_field;\r\n }\r\n }\r\n\r\n _handleInput(): void {\r\n if (this.value == 1) {\r\n this.picker.open();\r\n return;\r\n }\r\n const range: TimelineValue = calculateTimeline(this.value);\r\n this.selectedRange = range;\r\n this.onChange(this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(range);\r\n }\r\n\r\n dateRangeChange(dateRangeStart: HTMLInputElement, dateRangeEnd: HTMLInputElement) {\r\n const range: TimelineValue = {\r\n date_from : new Date(dateRangeStart.value),\r\n date_to: new Date(dateRangeEnd.value),\r\n show_custom_field: true\r\n }\r\n this.selectedRange = range;\r\n this.onChange(this.value);\r\n this.selectedValueChange.emit(this.selectedValue);\r\n this.selectionChange.emit(range);\r\n }\r\n\r\n onCustomDateChange(event: any) {\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n this.describedBy = ids.join(' ');\r\n }\r\n\r\n onContainerClick(event: MouseEvent) {\r\n event.stopPropagation();\r\n }\r\n\r\n writeValue(data: any): void {\r\n this.value = data;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n ngOnInit(): void {\r\n console.log(this.form);\r\n\r\n this.timelineValue.valueChanges.\r\n pipe(\r\n debounceTime(100),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => this.changeTimeline(value));\r\n }\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n }\r\n\r\n}\r\n","import { Component, OnInit, Input } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-loader',\r\n templateUrl: './loader.component.html',\r\n styleUrls: ['./loader.component.scss']\r\n})\r\nexport class LoaderComponent implements OnInit {\r\n\r\n @Input() isLoading = false;\r\n @Input() size = 0.6;\r\n @Input() message: string | undefined;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() { }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { SuccessSnackComponent, ErrorSnackComponent } from './snack.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { MatSnackBarModule } from '@angular/material/snack-bar';\r\nimport { MatIconModule } from '@angular/material/icon';\r\n\r\n@NgModule({\r\n declarations: [\r\n SuccessSnackComponent,\r\n ErrorSnackComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatSnackBarModule,\r\n MatIconModule\r\n ],\r\n exports: [\r\n SuccessSnackComponent,\r\n ErrorSnackComponent,\r\n ]\r\n})\r\nexport class SnackModule { }\r\n","import { Injectable } from '@angular/core';\r\nimport { Router, CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router';\r\nimport { CredentialsService } from './credentials.service';\r\nimport { Logger } from './logger.service';\r\n\r\nconst log = new Logger('AuthenticationGuard');\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationGuard implements CanActivate {\r\n\r\n constructor(private router: Router,\r\n private credentialsService: CredentialsService) { }\r\n\r\n canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n return this.isUserAuthenticated(route, state);\r\n }\r\n\r\n canLoad(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n return this.isUserAuthenticated(route, state);\r\n }\r\n\r\n isUserAuthenticated(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean {\r\n if (this.credentialsService.isAuthenticated) {\r\n return true;\r\n }\r\n\r\n log.debug('Not authenticated, redirecting and adding redirect url...');\r\n this.router.navigate(['/login'], { queryParams: { redirect: state.url }, replaceUrl: true });\r\n return false;\r\n }\r\n\r\n}\r\n","\r\nimport { Injectable } from '@angular/core';\r\nimport { Observable, of } from 'rxjs';\r\nimport { concatMap, map } from 'rxjs/operators';\r\nimport { Credentials, CredentialsService } from './credentials.service';\r\nimport { HttpService } from './http.service';\r\n\r\n/**\r\n * Provides a base for authentication workflow.\r\n * The login/logout methods should be replaced with proper implementation.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class AuthenticationService {\r\n\r\n constructor(private credentialsService: CredentialsService, private http: HttpService) { }\r\n\r\n /**\r\n * Authenticates the user.\r\n * @param context The login parameters.\r\n * @return The user credentials.\r\n */\r\n login(context: any): Observable<Credentials> {\r\n const data = <Credentials>{};\r\n return this.http\r\n .skipToken()\r\n .post('oauth/token', context)\r\n .pipe(\r\n concatMap(async (tokenInfo: any) => {\r\n tokenInfo.expires_in = Date.now() + (tokenInfo.expires_in * 1000);\r\n data.token = tokenInfo;\r\n data.user = {};\r\n this.credentialsService.setCredentials(data, context.remember);\r\n const userInfo: any = await this.http.get('api/user/current').toPromise();\r\n data.user = userInfo?.user;\r\n this.credentialsService.setCredentials(data, context.remember);\r\n return data;\r\n })\r\n )\r\n }\r\n\r\n /**\r\n * Logs out the user and clear credentials.\r\n * @return True if the user was logged out successfully.\r\n */\r\n logout(): Observable<boolean> {\r\n\r\n this.credentialsService.setCredentials();\r\n return of(true);\r\n }\r\n\r\n}\r\n","import { ActivatedRouteSnapshot, DetachedRouteHandle, RouteReuseStrategy } from '@angular/router';\r\nimport { Injectable } from '@angular/core';\r\n\r\n/**\r\n * A route strategy allowing for explicit route reuse.\r\n * Used as a workaround for https://github.com/angular/angular/issues/18374\r\n * To reuse a given route, add `data: { reuse: true }` to the route definition.\r\n */\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class RouteReusableStrategy extends RouteReuseStrategy {\r\n\r\n public shouldDetach(route: ActivatedRouteSnapshot): boolean {\r\n return false;\r\n }\r\n\r\n public store(route: ActivatedRouteSnapshot, detachedTree: DetachedRouteHandle | null): void { }\r\n\r\n public shouldAttach(route: ActivatedRouteSnapshot): boolean {\r\n return false;\r\n }\r\n\r\n public retrieve(route: ActivatedRouteSnapshot): DetachedRouteHandle | null {\r\n return null;\r\n }\r\n\r\n public shouldReuseRoute(future: ActivatedRouteSnapshot, curr: ActivatedRouteSnapshot): boolean {\r\n // Reuse the route if the RouteConfig is the same, or if both routes use the\r\n // same component, because the latter can have different RouteConfigs.\r\n return future.routeConfig === curr.routeConfig ||\r\n Boolean(future.routeConfig?.component &&\r\n future.routeConfig?.component === curr.routeConfig?.component);\r\n }\r\n\r\n}\r\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';\r\n/*\r\n * This module imports and re-exports all Angular Material modules for convenience,\r\n * so only 1 module import is needed in your feature modules.\r\n * See https://material.angular.io/guide/getting-started#step-3-import-the-component-modules.\r\n *\r\n * To optimize your production builds, you should only import the components used in your app.\r\n */\r\n\r\nimport { NgModule } from \"@angular/core\";\r\nimport {\r\n MatCommonModule,\r\n MatLineModule,\r\n MatNativeDateModule,\r\n MatOptionModule,\r\n MatPseudoCheckboxModule,\r\n MatRippleModule\r\n} from \"@angular/material/core\";\r\nimport { MatButtonModule } from \"@angular/material/button\";\r\nimport { MatCheckboxModule } from \"@angular/material/checkbox\";\r\nimport { MatDialogModule } from \"@angular/material/dialog\";\r\nimport { MatFormFieldModule } from \"@angular/material/form-field\";\r\nimport { MatIconModule } from \"@angular/material/icon\";\r\nimport { MatInputModule } from \"@angular/material/input\";\r\nimport { MatMenuModule } from \"@angular/material/menu\";\r\nimport { MatProgressSpinnerModule } from \"@angular/material/progress-spinner\";\r\nimport { MatSelectModule } from \"@angular/material/select\";\r\nimport { MatSortModule } from \"@angular/material/sort\";\r\nimport { MatTableModule } from \"@angular/material/table\";\r\nimport { MatCardModule } from \"@angular/material/card\";\r\nimport { MatDividerModule } from \"@angular/material/divider\";\r\nimport { MatChipsModule } from \"@angular/material/chips\";\r\nimport { MatDatepickerModule } from '@angular/material/datepicker';\r\nimport { MatListModule } from '@angular/material/list'\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\n\r\n\r\n@NgModule({\r\n exports: [\r\n MatButtonModule,\r\n MatCheckboxModule,\r\n MatCommonModule,\r\n MatDialogModule,\r\n MatFormFieldModule,\r\n MatIconModule,\r\n MatInputModule,\r\n MatLineModule,\r\n MatMenuModule,\r\n MatNativeDateModule,\r\n MatOptionModule,\r\n MatProgressSpinnerModule,\r\n MatPseudoCheckboxModule,\r\n MatRippleModule,\r\n MatSelectModule,\r\n MatSortModule,\r\n MatTableModule,\r\n MatCardModule,\r\n MatDividerModule,\r\n MatChipsModule,\r\n MatDatepickerModule,\r\n MatListModule,\r\n MatTooltipModule,\r\n MatButtonToggleModule\r\n ]\r\n})\r\nexport class MaterialModule { }\r\n","import { NgModule, Optional, SkipSelf } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { HTTP_INTERCEPTORS, HttpClientModule, HttpClient } from '@angular/common/http';\r\nimport { RouteReuseStrategy, RouterModule } from '@angular/router';\r\n\r\nimport { RouteReusableStrategy } from './route-reusable-strategy';\r\nimport { ApiPrefixInterceptor } from './api-prefix.interceptor';\r\nimport { ErrorHandlerInterceptor } from './error-handler.interceptor';\r\nimport { HttpService } from './http.service';\r\nimport { TokenInterceptor } from './token.interceptor';\r\nimport { CacheInterceptor } from './cache.interceptor';\r\nimport { SnackModule } from './snack/snack.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n HttpClientModule,\r\n RouterModule,\r\n SnackModule\r\n ],\r\n providers: [\r\n {\r\n provide: HttpClient,\r\n useClass: HttpService\r\n },\r\n {\r\n provide: RouteReuseStrategy,\r\n useClass: RouteReusableStrategy\r\n }\r\n ],\r\n exports: [\r\n SnackModule\r\n ]\r\n})\r\nexport class CoreModule {\r\n\r\n constructor(@Optional() @SkipSelf() parentModule: CoreModule) {\r\n // Import guard\r\n if (parentModule) {\r\n throw new Error(`${parentModule} has already been loaded. Import Core module in the root module only.`);\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupComponent } from './action-popup.component';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n FlexLayoutModule,\r\n CommonModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n ActionPopupComponent\r\n ],\r\n exports: [\r\n ActionPopupComponent\r\n ],\r\n entryComponents: [\r\n ActionPopupComponent\r\n ]\r\n})\r\nexport class ActionPopupModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { DataTableComponent } from './data-table.component';\r\nimport { InfiniteScrollModule } from \"ngx-infinite-scroll\";\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n imports: [\r\n FlexLayoutModule,\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n DataTableComponent\r\n ],\r\n exports: [\r\n DataTableComponent\r\n ]\r\n})\r\nexport class DataTableModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { DocumentViewerComponent } from './document-viewer.component';\r\nimport { NgxDocViewerModule } from 'ngx-doc-viewer';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FlexLayoutModule,\r\n NgxDocViewerModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n DocumentViewerComponent\r\n ],\r\n exports: [\r\n DocumentViewerComponent\r\n ]\r\n})\r\nexport class DocumentViewerModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { FileDropperComponent } from './file-dropper.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n FileDropperComponent\r\n ],\r\n exports: [FileDropperComponent]\r\n})\r\nexport class FileDropperModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { EntityFileFormComponent } from './entity-file-form/entity-file-form.component';\r\nimport { EntityFilesViewAllComponent } from './entity-files-view-all.component';\r\nimport { ReactiveFormsModule, FormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FileDropperModule } from '../file-dropper/file-dropper.module';\r\nimport { DocumentViewerModule } from '../document-viewer/document-viewer.module';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EntityFileFormComponent, EntityFilesViewAllComponent],\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n FileDropperModule,\r\n DocumentViewerModule,\r\n InfiniteScrollModule,\r\n ActionPopupModule,\r\n MaterialModule\r\n ],\r\n exports: [\r\n EntityFilesViewAllComponent\r\n ],\r\n entryComponents: [EntityFileFormComponent]\r\n})\r\nexport class EntityFilesViewAllModule { }\r\n","import { Component, OnInit, Input } from \"@angular/core\";\r\n\r\n@Component({\r\n selector: \"app-read-more\",\r\n templateUrl: \"./read-more.component.html\",\r\n styleUrls: [\"./read-more.component.scss\"]\r\n})\r\nexport class ReadMoreComponent implements OnInit {\r\n @Input() text: string;\r\n @Input() maxLength: number = 100;\r\n currentText: string;\r\n hideToggle: boolean = true;\r\n\r\n isCollapsed: boolean = true;\r\n\r\n constructor() {}\r\n\r\n ngOnInit() {\r\n this.determineView();\r\n }\r\n\r\n toggleView() {\r\n this.isCollapsed = !this.isCollapsed;\r\n this.determineView();\r\n }\r\n\r\n determineView() {\r\n if (!this.text || this.text.length <= this.maxLength) {\r\n this.currentText = this.text;\r\n this.isCollapsed = false;\r\n this.hideToggle = true;\r\n return;\r\n }\r\n this.hideToggle = false;\r\n if (this.isCollapsed == true) {\r\n this.currentText = this.text.substring(0, this.maxLength) + \"...\";\r\n } else if (this.isCollapsed == false) {\r\n this.currentText = this.text;\r\n }\r\n }\r\n}\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ReadMoreComponent } from './read-more.component';\r\n\r\n@NgModule({\r\n declarations: [ReadMoreComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule\r\n ],\r\n exports: [\r\n ReadMoreComponent\r\n ]\r\n})\r\nexport class ReadMoreModule { }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NoteListComponent } from './note-list/note-list.component';\r\nimport { NoteFormComponent } from './note-form/note-form.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\nimport { MaterialModule } from '../material.module';\r\nimport { CommentFormComponent } from './comment-form/comment-form.component';\r\nimport { ReadMoreModule } from '../read-more/read-more.module';\r\n\r\n@NgModule({\r\n declarations: [\r\n NoteListComponent,\r\n NoteFormComponent,\r\n CommentFormComponent,\r\n ],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n ActionPopupModule,\r\n MaterialModule,\r\n ReadMoreModule\r\n ],\r\n exports: [\r\n NoteListComponent\r\n ],\r\n entryComponents: [NoteFormComponent]\r\n})\r\nexport class NoteModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { SearchableSelectorComponent } from './searchable-selector.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatSelectInfiniteScrollDirective } from './mat-select-infinite-scroll.directive';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n declarations: [\r\n SearchableSelectorComponent,\r\n MatSelectInfiniteScrollDirective\r\n ],\r\n exports: [\r\n SearchableSelectorComponent,\r\n MatSelectInfiniteScrollDirective\r\n ]\r\n})\r\nexport class SearchableSelectorModule { }\r\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';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TimelineFilterRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { TimelineFilterRoutingModule } from './timeline-filter-routing.module';\r\nimport { TimelineFilterComponent } from './timeline-filter.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [TimelineFilterComponent],\r\n imports: [\r\n CommonModule,\r\n TimelineFilterRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: [TimelineFilterComponent]\r\n})\r\nexport class TimelineFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { LoaderComponent } from './loader.component';\r\nimport { MatProgressSpinnerModule } from '@angular/material/progress-spinner';\r\n\r\n@NgModule({\r\n declarations: [\r\n LoaderComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MatProgressSpinnerModule\r\n ],\r\n exports: [\r\n LoaderComponent\r\n ]\r\n})\r\nexport class LoaderModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionRoutingModule } from './email-subscription-routing.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserRoutingModule } from './email-subscription-user-routing.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionUserRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionUserModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserFormRoutingModule { }\r\n","\r\nimport { Component, Inject, OnInit, TemplateRef } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { AlertService } from '../../../core/alert.service';\r\nimport { FormValidatorService } from '../../../core/form-validator.service';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { Logger } from '../../../core/logger.service';\r\n\r\nconst log = new Logger('EmailSubscriptionUser Form');\r\n\r\nconst errorMessages: any = {\r\n user_id: {\r\n required: \"User is required\"\r\n },\r\n email_type_id: {\r\n required: \"Email Type is required\"\r\n },\r\n};\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-form',\r\n templateUrl: './email-subscription-user-form.component.html',\r\n styleUrls: ['./email-subscription-user-form.component.scss']\r\n})\r\nexport class EmailSubscriptionUserFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n esUserFormGroup: FormGroup;\r\n esUserFormFirstAttempt: boolean;\r\n esUser: any;\r\n isSubmitLoading: boolean;\r\n selectedUser: any;\r\n selectedType: any;\r\n\r\n constructor(private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n public dialogRef: MatDialogRef<EmailSubscriptionUserFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.esUserFormGroup = this.fb.group({\r\n id: [''],\r\n user_id: ['', Validators.required],\r\n email_type_id: ['', Validators.required],\r\n });\r\n }\r\n\r\n\r\n ngOnInit() {\r\n if (this.data?.esUser?.id) {\r\n this.esUser = this.data.esUser;\r\n this.updateMode = true;\r\n this.selectedType = this.esUser?.email_type;\r\n this.selectedUser = this.esUser?.user;\r\n this.esUserFormGroup.patchValue(this.esUser);\r\n }\r\n\r\n }\r\n\r\n //Method to trigger login\r\n submit() {\r\n this.esUserFormGroup.markAllAsTouched();\r\n this.esUserFormFirstAttempt = true;\r\n if (this.esUserFormGroup.valid) {\r\n this.isSubmitLoading = true;\r\n const model = this.esUserFormGroup.value;\r\n (\r\n this.updateMode ?\r\n this.http.put(`api/email-subscription-users/${model?.id}`, model) :\r\n this.http.post(`api/email-subscription-users`, model)\r\n )\r\n .pipe(\r\n finalize(() => this.isSubmitLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe(result => {\r\n this.alertService.addAlert(\"Subscription saved successfully\", \"success\");\r\n this.dialogRef.close(result);\r\n });\r\n }\r\n }\r\n\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.esUserFormGroup, this.esUserFormFirstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.esUserFormGroup, errorMessages);\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserFormRoutingModule } from './email-subscription-user-form-routing.module';\r\nimport { EmailSubscriptionUserFormComponent } from './email-subscription-user-form.component';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { LoaderModule } from '../../../loader/loader.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserFormComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionUserFormRoutingModule,\r\n LoaderModule\r\n ],\r\n entryComponents: [EmailSubscriptionUserFormComponent]\r\n})\r\nexport class EmailSubscriptionUserFormModule { }\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\n\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FormControl } from '@angular/forms';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { EmailSubscriptionUserFormComponent } from '../email-subscription-user-form/email-subscription-user-form.component';\r\nimport { Router } from '@angular/router';\r\nimport { Logger } from '../../../core/logger.service';\r\nimport { PageEvent } from '../../../data-table/data-table.model';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\r\n\r\nconst log = new Logger('EmailSubscriptionUser list');\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-list',\r\n templateUrl: './email-subscription-user-list.component.html',\r\n styleUrls: ['./email-subscription-user-list.component.scss']\r\n})\r\nexport class EmailSubscriptionUserListComponent implements OnInit {\r\n\r\n esUserList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n };\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n displayColumns: FormControl = new FormControl(['index', 'user.name', 'email_type.title', 'creator.name', 'created_at', 'actions']);\r\n displayedColumns: any[] = [];\r\n availableDisplayColumns: any[] = [\r\n { order: 1, value: 'index', name: 'Index' },\r\n { order: 2, value: 'user.name', name: 'User' },\r\n { order: 3, value: 'email_type.title', name: 'Email Type' },\r\n { order: 4, value: 'creator.name', name: 'Creator' },\r\n { order: 5, value: 'actions', name: 'Actions' }\r\n ];\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private http: HttpService,\r\n private router: Router,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.displayedColumns = this.displayColumns.value;\r\n this.initializeData();\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n }\r\n\r\n get selectedColumns(): string[] {\r\n return this.availableDisplayColumns\r\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\r\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\r\n .map(col => col.value);\r\n }\r\n\r\n columnsChange() {\r\n this.displayedColumns = this.selectedColumns;\r\n }\r\n\r\n\r\n initializeData() {\r\n this.http.get(`api/email-subscription-users`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.esUserList = this.esUserList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n filterChange(event: any) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event\r\n };\r\n this.reload();\r\n }\r\n\r\n addEmailSubscriptionUser() {\r\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {} // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n log.debug(result);\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n\r\n editEmailSubscriptionUser(event: any, esUser: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(EmailSubscriptionUserFormComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {\r\n esUser: esUser\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n log.debug(result);\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEmailSubscriptionUser(event: any, esUser: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: '400px',\r\n data: <ActionPopup>{\r\n title: 'Delete Subscription',\r\n message: `Are you sure to proceed delete the esUser ${esUser.name}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n //Action confirmed\r\n this.http.delete(`api/email-subscription-users/${esUser?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.esUserList = this.esUserList.filter(x => x.id !== esUser.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n reload() {\r\n this.esUserList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\r\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\r\n\r\nexport const esulr = {\r\n title: 'Email Subscription Users',\r\n permissions: {\r\n only: ['app_admin'],\r\n redirectTo: '/'\r\n }\r\n};\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionUserListComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: esulr\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserListRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionUserListFilterRoutingModule { }\r\n","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\r\nimport { FormGroup, FormBuilder } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-user-list-filter',\r\n templateUrl: './email-subscription-user-list-filter.component.html',\r\n styleUrls: ['./email-subscription-user-list-filter.component.scss']\r\n})\r\nexport class EmailSubscriptionUserListFilterComponent implements OnInit {\r\n\r\n esUserFilterForm: FormGroup;\r\n\r\n @Output() valueChange = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder) {\r\n this.createForm();\r\n }\r\n\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.esUserFilterForm = this.fb.group({\r\n user_id: [''],\r\n email_type_id: [''],\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.esUserFilterForm.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n this.valueChange.emit(value);\r\n })\r\n }\r\n\r\n\r\n resetFieldValue(field: string) {\r\n this.esUserFilterForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.esUserFilterForm.get(field).value;\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserListFilterRoutingModule } from './email-subscription-user-list-filter-routing.module';\r\nimport { EmailSubscriptionUserListFilterComponent } from './email-subscription-user-list-filter.component';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserListFilterComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionUserListFilterRoutingModule\r\n ],\r\n exports: [EmailSubscriptionUserListFilterComponent]\r\n})\r\nexport class EmailSubscriptionUserListFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionUserListRoutingModule } from './email-subscription-user-list-routing.module';\r\nimport { EmailSubscriptionUserListComponent } from './email-subscription-user-list.component';\r\nimport { EmailSubscriptionUserListFilterModule } from '../email-subscription-user-list-filter/email-subscription-user-list-filter.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { EmailSubscriptionUserFormModule } from '../email-subscription-user-form/email-subscription-user-form.module';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionUserListComponent],\r\n imports: [\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n EmailSubscriptionUserListRoutingModule,\r\n EmailSubscriptionUserFormModule,\r\n EmailSubscriptionUserListFilterModule\r\n ],\r\n exports: [EmailSubscriptionUserListComponent]\r\n})\r\nexport class EmailSubscriptionUserListModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\n\r\nexport class EmailSubscriptionTypeRoutingModule { }","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeRoutingModule } from './email-subscription-type-routing.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [],\r\n imports: [\r\n CommonModule,\r\n EmailSubscriptionTypeRoutingModule\r\n ]\r\n})\r\nexport class EmailSubscriptionTypeModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionTypeFormRoutingModule { }\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { FormGroup, FormBuilder, Validators } from '@angular/forms';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { finalize } from 'rxjs/operators';\r\nimport { AlertService } from '../../../core/alert.service';\r\nimport { FormValidatorService } from '../../../core/form-validator.service';\r\nimport { HttpService } from '../../../core/http.service';\r\n\r\nconst errorMessages: any = {\r\n title: {\r\n required: \"Title is required\"\r\n },\r\n code: {\r\n required: \"Code is required\"\r\n },\r\n frequency_id: {\r\n required: \"Frequency is required\"\r\n },\r\n};\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-type-form',\r\n templateUrl: './email-subscription-type-form.component.html',\r\n styleUrls: ['./email-subscription-type-form.component.scss']\r\n})\r\nexport class EmailSubscriptionTypeFormComponent implements OnInit {\r\n\r\n updateMode: boolean;\r\n emailSubscriptionTypeFormGroup: FormGroup;\r\n emailSubscriptionTypeFormFirstAttempt: boolean;\r\n emailSubscriptionType: any;\r\n selectedFrequency: any;\r\n isLoading: boolean;\r\n isSubmitLoading: boolean;\r\n\r\n constructor(private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n public dialogRef: MatDialogRef<EmailSubscriptionTypeFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n /** Method to create a form **/\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.emailSubscriptionTypeFormGroup = this.fb.group({\r\n id: [''],\r\n title: ['', Validators.compose([Validators.required])],\r\n code: ['', Validators.compose([Validators.required])],\r\n frequency_id: ['', Validators.required],\r\n description: [''],\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n if (this.data.emailSubscriptionType?.id) {\r\n this.isLoading = true;\r\n this.emailSubscriptionType = this.data?.emailSubscriptionType;\r\n this.updateMode = true;\r\n this.selectedFrequency = this.emailSubscriptionType?.frequency || {};\r\n this.emailSubscriptionTypeFormGroup.patchValue(this.emailSubscriptionType);\r\n }\r\n }\r\n\r\n //Method to trigger login\r\n submit() {\r\n this.emailSubscriptionTypeFormGroup.markAllAsTouched();\r\n this.emailSubscriptionTypeFormFirstAttempt = true;\r\n if (this.emailSubscriptionTypeFormGroup.valid) {\r\n this.isSubmitLoading = true;\r\n const model = this.emailSubscriptionTypeFormGroup.value;\r\n (\r\n this.updateMode ?\r\n this.http.put(`api/email-subscription-types/${model?.id}`, model) :\r\n this.http.post(`api/email-subscription-types`, model)\r\n )\r\n .pipe(\r\n finalize(() => this.isSubmitLoading = false),\r\n untilDestroyed(this)\r\n ).subscribe(result => {\r\n this.alertService.addAlert(\"Email Type saved successfully\", \"success\");\r\n this.dialogRef.close(result);\r\n });\r\n }\r\n }\r\n\r\n\r\n cancel() {\r\n this.dialogRef.close();\r\n }\r\n\r\n\r\n /**Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.emailSubscriptionTypeFormGroup, this.emailSubscriptionTypeFormFirstAttempt);\r\n }\r\n\r\n /**Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.emailSubscriptionTypeFormGroup, errorMessages);\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeFormRoutingModule } from './email-subscription-type-form-routing.module';\r\nimport { EmailSubscriptionTypeFormComponent } from './email-subscription-type-form.component';\r\nimport { SearchableSelectorModule } from '../../../searchable-selector/searchable-selector.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { LoaderModule } from '../../../loader/loader.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionTypeFormComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n EmailSubscriptionTypeFormRoutingModule,\r\n LoaderModule\r\n ],\r\n exports: [EmailSubscriptionTypeFormComponent],\r\n entryComponents: [EmailSubscriptionTypeFormComponent]\r\n})\r\nexport class EmailSubscriptionTypeFormModule { }\r\n","import { Component, OnInit, ViewChild } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { FormControl } from '@angular/forms';\r\nimport { distinctUntilChanged, debounceTime } from 'rxjs/operators';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { EmailSubscriptionTypeFormComponent } from '../email-subscription-type-form/email-subscription-type-form.component';\r\nimport { PageEvent } from '../../../data-table/data-table.model';\r\nimport { HttpService } from '../../../core/http.service';\r\nimport { ActionPopupComponent } from '../../../action-popup/action-popup.component';\r\nimport { ActionPopup } from '../../../action-popup/action-popup.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-type-list',\r\n templateUrl: './email-subscription-type-list.component.html',\r\n styleUrls: ['./email-subscription-type-list.component.scss']\r\n})\r\nexport class EmailSubscriptionTypeListComponent implements OnInit {\r\n\r\n emailSubscriptionTypeList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n isLoadRelations: true,\r\n relations: ['frequency']\r\n };\r\n search: FormControl = new FormControl('');\r\n\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n displayColumns: FormControl = new FormControl(['index', 'title', 'frequency.title', 'description', 'actions']);\r\n displayedColumns: any[] = [];\r\n availableDisplayColumns: any[] = [\r\n { order: 1, value: 'index', name: 'Index' },\r\n { order: 2, value: 'title', name: 'Title' },\r\n { order: 3, value: 'code', name: 'Code' },\r\n { order: 4, value: 'frequency.title', name: 'Frequency' },\r\n { order: 5, value: 'description', name: 'Description' },\r\n { order: 6, value: 'actions', name: 'Actions' }\r\n ];\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private http: HttpService,\r\n ) { }\r\n\r\n ngOnInit() {\r\n this.displayedColumns = this.displayColumns.value;\r\n this.initializeData();\r\n this.search.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe(value => {\r\n this.filters.search = value;\r\n this.reload();\r\n });\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n }\r\n\r\n get selectedColumns(): string[] {\r\n return this.availableDisplayColumns\r\n .filter(col => (this.displayColumns.value as any).some((x: any) => x === col.value))\r\n .sort((a, b) => (a.order > b.order) ? 1 : ((b.order > a.order) ? -1 : 0))\r\n .map(col => col.value);\r\n }\r\n\r\n columnsChange() {\r\n this.displayedColumns = this.selectedColumns;\r\n }\r\n\r\n\r\n initializeData() {\r\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n addEmailSubscriptionType() {\r\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {} // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n\r\n editEmailSubscriptionType(event: any, emailSubscriptionType: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(EmailSubscriptionTypeFormComponent, {\r\n width: '400px',\r\n autoFocus: false,\r\n data: {\r\n emailSubscriptionType: emailSubscriptionType\r\n } // Any data passed here will be injected into the model\r\n });\r\n\r\n dialogRef.afterClosed().subscribe((result: any) => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n deleteEmailSubscriptionType(event: any, emailSubscriptionType: any) {\r\n event.stopPropagation();\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: '400px',\r\n data: <ActionPopup>{\r\n title: 'Delete Email Type',\r\n message: `Are you sure to proceed delete the Email Type ${emailSubscriptionType.title}?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n //Action confirmed\r\n this.http.delete(`api/email-subscription-types/${emailSubscriptionType?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.emailSubscriptionTypeList = this.emailSubscriptionTypeList.filter(x => x.id !== emailSubscriptionType.id);\r\n });\r\n }\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n reload() {\r\n this.emailSubscriptionTypeList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../../core/authentication.guard';\r\n\r\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\r\n\r\nexport const estlr = {\r\n title: 'Email Subscription Type',\r\n permissions: {\r\n only: ['client_admin'],\r\n redirectTo: '/'\r\n }\r\n};\r\n\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionTypeListComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: estlr\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionTypeListRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionTypeListRoutingModule } from './email-subscription-type-list-routing.module';\r\nimport { EmailSubscriptionTypeListComponent } from './email-subscription-type-list.component';\r\nimport { EmailSubscriptionTypeFormModule } from '../email-subscription-type-form/email-subscription-type-form.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../../material.module';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionTypeListComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n EmailSubscriptionTypeFormModule,\r\n EmailSubscriptionTypeListRoutingModule\r\n ],\r\n exports: [EmailSubscriptionTypeListComponent]\r\n})\r\nexport class EmailSubscriptionTypeListModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { HttpService } from '../../core/http.service';\r\nimport { PageEvent } from '../../data-table/data-table.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-email-subscription-for-user',\r\n templateUrl: './email-subscription-for-user.component.html',\r\n styleUrls: ['./email-subscription-for-user.component.scss']\r\n})\r\nexport class EmailSubscriptionForUserComponent implements OnInit {\r\n\r\n subscriptions: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n isLoadRelations: true,\r\n relations: 'frequency,currentUserSubscription'\r\n };\r\n\r\n constructor(\r\n private http: HttpService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.fetchSubscriptions();\r\n }\r\n\r\n fetchSubscriptions() {\r\n this.http.get(`api/email-subscription-types`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.subscriptions = this.subscriptions.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.fetchSubscriptions();\r\n }\r\n }\r\n\r\n subscribe(sub: any) {\r\n this.http.post(`api/email-subscription-for-user`, { email_type_id: sub?.id })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n sub.current_user_subscription = result?.item;\r\n });\r\n }\r\n\r\n unsubscribe(sub: any) {\r\n this.http.delete(`api/email-subscription-users/${sub?.current_user_subscription?.id}`)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((_: any) => {\r\n sub.current_user_subscription = null;\r\n });\r\n }\r\n\r\n\r\n reload() {\r\n this.subscriptions = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.fetchSubscriptions();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../../core/authentication.guard';\r\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\r\n\r\nexport const esfur = {\r\n permissions: {\r\n only: ['client_admin']\r\n }\r\n};\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: EmailSubscriptionForUserComponent,\r\n canActivate: [AuthenticationGuard],\r\n data: esfur\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class EmailSubscriptionForUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { EmailSubscriptionForUserRoutingModule } from './email-subscription-for-user-routing.module';\r\nimport { EmailSubscriptionForUserComponent } from './email-subscription-for-user.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [EmailSubscriptionForUserComponent],\r\n imports: [\r\n CommonModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n EmailSubscriptionForUserRoutingModule\r\n ],\r\n exports: [EmailSubscriptionForUserComponent]\r\n})\r\nexport class EmailSubscriptionForUserModule { }\r\n","import { HttpService } from '../core/http.service';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TechlifyUpdateService {\r\n\r\n constructor(private http: HttpService) { }\r\n\r\n getTechlifyUpdates(filters: any) {\r\n return this.http.get(`api/techlify-updates`, { params: filters }).toPromise();\r\n }\r\n\r\n createTechlifyUpdate(techlifyUpdate: any) {\r\n return this.http.post(`api/techlify-updates`, techlifyUpdate).toPromise();\r\n }\r\n\r\n updateTechlifyUpdate(techlifyUpdate: any) {\r\n return this.http.put(`api/techlify-updates/${techlifyUpdate.id}`, techlifyUpdate).toPromise();\r\n }\r\n\r\n deleteTechlifyUpdate(techlifyUpdateId: any) {\r\n return this.http.delete(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\r\n }\r\n\r\n getTechlifyUpdate(techlifyUpdateId: any) {\r\n return this.http.get(`api/techlify-updates/${techlifyUpdateId}`).toPromise();\r\n }\r\n\r\n getNewUpdateForCurrentUser() {\r\n return this.http.get(`api/current-user-techlify-updates`).toPromise();\r\n }\r\n\r\n createUpdateViewRecord(techlifyUpdateView: any) {\r\n return this.http.post(`api/techlify-update-views`, techlifyUpdateView).toPromise();\r\n }\r\n\r\n updateCurrentUserUpdates() {\r\n return this.http.get(`api/techlify-updates/update-view`).toPromise();\r\n }\r\n}\r\n","import { AlertService } from \"../../core/alert.service\";\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, Validators } from '@angular/forms';\r\nimport { Component, EventEmitter, Inject, OnInit, Output } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { Editor, Toolbar } from 'ngx-editor';\r\n\r\nconst errorMessages: any = {\r\n title: {\r\n required: \"Title is required\",\r\n },\r\n released_on: {\r\n required: \"Released On is required\",\r\n },\r\n version: {\r\n required: \"Version is required\",\r\n },\r\n description: {\r\n required: \"Description is required\",\r\n },\r\n learn_more_link: {\r\n pattern: \"Please enter valid link\",\r\n }\r\n}\r\n\r\n@Component({\r\n selector: 'app-techlify-update-form',\r\n templateUrl: './techlify-update-form.component.html',\r\n styleUrls: ['./techlify-update-form.component.scss']\r\n})\r\nexport class TechlifyUpdateFormComponent implements OnInit {\r\n\r\n @Output() onSave = new EventEmitter<any>();\r\n techlifyUpdateForm: FormGroup;\r\n isUpdateMode: boolean = false;\r\n editor: Editor;\r\n toolbar: Toolbar = [\r\n ['bold', 'italic'],\r\n ['bullet_list'],\r\n ];\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<TechlifyUpdateFormComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private alertService: AlertService,\r\n private techlifyUpdateService: TechlifyUpdateService\r\n ) {\r\n this.createForm();\r\n }\r\n\r\n private createForm() {\r\n this.techlifyUpdateForm = this.fb.group({\r\n id: new FormControl(''),\r\n title: new FormControl('', Validators.required),\r\n description: new FormControl('', Validators.required),\r\n version: new FormControl('', Validators.required),\r\n released_on: new FormControl('', Validators.required),\r\n learn_more_link: new FormControl('', Validators.compose([Validators.pattern('(https?://)?([\\\\da-z.-]+)\\\\.([a-z.]{2,6})[/\\\\w .-]*/?')])),\r\n });\r\n if (this.data.techlifyUpdateDetails) {\r\n this.isUpdateMode = true;\r\n this.techlifyUpdateForm.patchValue(this.data.techlifyUpdateDetails);\r\n }\r\n }\r\n\r\n ngOnInit() {\r\n this.editor = new Editor();\r\n }\r\n\r\n async submit() {\r\n if (this.techlifyUpdateForm.valid) {\r\n let result;\r\n const model = this.techlifyUpdateForm.value;\r\n\r\n try {\r\n result = this.isUpdateMode ? await this.techlifyUpdateService.updateTechlifyUpdate(model)\r\n : await this.techlifyUpdateService.createTechlifyUpdate(model);\r\n this.alertService.addAlert(\r\n \"Techlify app update saved successfully\",\r\n \"success\"\r\n );\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n } finally {\r\n if (result) {\r\n this.dialogRef.close(result);\r\n }\r\n }\r\n }\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.techlifyUpdateForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.techlifyUpdateForm.get(field).value;\r\n }\r\n\r\n /** Method to evaluate form fields*/\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.techlifyUpdateForm, true);\r\n }\r\n /** Method to find error in form fields*/\r\n getErrorMessage(field: string) {\r\n return this.formValidatorService.getErrorMessage(field, this.techlifyUpdateForm, errorMessages);\r\n }\r\n\r\n}\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdateFormComponent } from './techlify-update-form.component';\r\nimport { NgxEditorModule } from 'ngx-editor';\r\n\r\n@NgModule({\r\n declarations: [TechlifyUpdateFormComponent],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n NgxEditorModule,\r\n ],\r\n exports: [\r\n TechlifyUpdateFormComponent\r\n ],\r\n entryComponents: [\r\n TechlifyUpdateFormComponent\r\n ]\r\n})\r\nexport class TechlifyUpdateFormModule { }\r\n","import { UntilDestroy } from '@ngneat/until-destroy';\r\nimport { untilDestroyed } from '@ngneat/until-destroy';\r\nimport { ActionPopup } from './../../action-popup/action-popup.model';\r\nimport { ActionPopupComponent } from './../../action-popup/action-popup.component';\r\nimport { TechlifyUpdateFormComponent } from './../techlify-update-form/techlify-update-form.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, FormBuilder } from '@angular/forms';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AlertService } from '../../core/alert.service';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { debounceTime } from 'rxjs/operators';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-updates-list',\r\n templateUrl: './techlify-updates-list.component.html',\r\n styleUrls: ['./techlify-updates-list.component.scss']\r\n})\r\nexport class TechlifyUpdatesListComponent implements OnInit {\r\n techlifyUpdates: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'title',\r\n 'version',\r\n 'released_on',\r\n 'learn_more_link',\r\n 'description',\r\n 'creator',\r\n 'actions'\r\n ];\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n isWorking: boolean = false;\r\n filterFormGroup: FormGroup;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private alertService: AlertService,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private fb: FormBuilder,\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n search: new FormControl(''),\r\n version: new FormControl(''),\r\n sort_by: new FormControl('released_on|DESC'),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData();\r\n this.listenChanges();\r\n }\r\n\r\n listenChanges() {\r\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe(changes => {\r\n this.reload();\r\n });\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n async loadData() {\r\n try {\r\n this.isWorking = true;\r\n var filters: any = this.filterFormGroup.value;\r\n filters.perPage = this.perPage;\r\n filters.page = this.page;\r\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\r\n filters\r\n );\r\n this.lastPage = result.last_page || this.page;\r\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n reload() {\r\n this.techlifyUpdates = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n modifyTechlifyUpdate(model?: any) {\r\n const dialogRef = this.dialog.open(TechlifyUpdateFormComponent, {\r\n width: \"600px\",\r\n data: {\r\n techlifyUpdateDetails: model,\r\n }\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(result => {\r\n if (result) {\r\n this.reload();\r\n }\r\n });\r\n }\r\n\r\n async deleteTechlifyUpdate(model: any) {\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: \"Delete Update\",\r\n message: `Are you sure to delete this update?`\r\n },\r\n autoFocus: false\r\n });\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n //Action confirmed\r\n try {\r\n await this.techlifyUpdateService.deleteTechlifyUpdate(model.id);\r\n this.alertService.addAlert(\r\n \"Successfully deleted the update\",\r\n \"success\"\r\n );\r\n this.reload();\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n });\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.filterFormGroup.get(field).setValue(\"\");\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase();\r\n this.assignFilter(event.active, direction);\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'title': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\r\n }\r\n case 'released_on': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\r\n }\r\n case 'version': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\r\n }\r\n default: {\r\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\r\n }\r\n };\r\n }\r\n\r\n}\r\n","import { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: 'all', pathMatch: 'full' },\r\n { path: 'all', component: TechlifyUpdatesListComponent },\r\n\r\n //fallback\r\n {\r\n path: '**',\r\n redirectTo: 'all',\r\n pathMatch: 'full'\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TechlifyUpdateRoutingModule { }\r\n","import { ReadMoreModule } from '../read-more/read-more.module';\r\nimport { TechlifyUpdateFormModule } from './techlify-update-form/techlify-update-form.module';\r\nimport { TechlifyUpdateRoutingModule } from './techlify-update-routing.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdatesListComponent } from './techlify-updates-list/techlify-updates-list.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../action-popup/action-popup.module';\r\n\r\n@NgModule({\r\n declarations: [TechlifyUpdatesListComponent],\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ActionPopupModule,\r\n TechlifyUpdateRoutingModule,\r\n TechlifyUpdateFormModule,\r\n ReadMoreModule,\r\n ]\r\n})\r\nexport class TechlifyUpdateModule { }\r\n","import { Inject } from '@angular/core';\r\nimport { MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { MatDialogRef } from '@angular/material/dialog';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-update-view',\r\n templateUrl: './update-view.component.html',\r\n styleUrls: ['./update-view.component.scss']\r\n})\r\nexport class UpdateViewComponent implements OnInit {\r\n techlifyUpdate: any;\r\n rootNavUrl: any;\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<UpdateViewComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.techlifyUpdate = this.data.techlifyUpdate;\r\n this.rootNavUrl = this.data.rootNavUrl;\r\n }\r\n\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n\r\n openUpdateHistory(): void {\r\n this.close();\r\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\r\n }\r\n\r\n}\r\n","import { UntilDestroy } from '@ngneat/until-destroy';\r\nimport { untilDestroyed } from '@ngneat/until-destroy';\r\nimport { AlertService } from './../../core/alert.service';\r\nimport { UpdateViewComponent } from './../update-view/update-view.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { FormControl, FormBuilder } from '@angular/forms';\r\nimport { FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Component, OnInit } from '@angular/core';\r\nimport { debounceTime } from 'rxjs/operators';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-update-history',\r\n templateUrl: './techlify-update-history.component.html',\r\n styleUrls: ['./techlify-update-history.component.scss']\r\n})\r\nexport class TechlifyUpdateHistoryComponent implements OnInit {\r\n techlifyUpdates: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'title',\r\n 'version',\r\n 'released_on',\r\n 'learn_more_link',\r\n 'description',\r\n 'creator',\r\n 'actions'\r\n ];\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n isWorking: boolean = false;\r\n filterFormGroup: FormGroup;\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private fb: FormBuilder,\r\n private alertService: AlertService\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n search: new FormControl(''),\r\n version: new FormControl(''),\r\n sort_by: new FormControl('released_on|DESC'),\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData();\r\n this.listenChanges();\r\n this.updateCurrentUserUpdates();\r\n }\r\n\r\n listenChanges() {\r\n this.filterFormGroup.valueChanges.pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe(changes => {\r\n this.reload();\r\n });\r\n }\r\n\r\n ngOnDestroy() { }\r\n\r\n async loadData() {\r\n try {\r\n this.isWorking = true;\r\n var filters: any = this.filterFormGroup.value;\r\n filters.perPage = this.perPage;\r\n filters.page = this.page;\r\n let result: any = await this.techlifyUpdateService.getTechlifyUpdates(\r\n filters\r\n );\r\n this.lastPage = result.last_page || this.page;\r\n this.techlifyUpdates = this.techlifyUpdates.concat(result.data);\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n reload() {\r\n this.techlifyUpdates = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n resetFieldValue(field: string) {\r\n this.filterFormGroup.get(field).setValue(\"\");\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase();\r\n this.assignFilter(event.active, direction);\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'title': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"title|\" + direction);\r\n }\r\n case 'released_on': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"released_on|\" + direction);\r\n }\r\n case 'version': {\r\n return this.filterFormGroup.get('sort_by').setValue(\"version|\" + direction);\r\n }\r\n default: {\r\n return this.filterFormGroup.get('sort_by').setValue(\"created_at|DESC\");\r\n }\r\n };\r\n }\r\n\r\n openUpdateView(techlifyUpdate: any): void {\r\n const dialogRef = this.dialog.open(UpdateViewComponent, {\r\n width: \"800px\",\r\n autoFocus: false,\r\n data: {\r\n techlifyUpdate: techlifyUpdate,\r\n isFromHistory: true,\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n async updateCurrentUserUpdates() {\r\n try {\r\n await this.techlifyUpdateService.updateCurrentUserUpdates();\r\n } catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n}\r\n","import { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\r\nimport { NgModule } from '@angular/core';\r\nimport { RouterModule, Routes } from '@angular/router';\r\n\r\nconst routes: Routes = [\r\n { path: '', redirectTo: 'update-history', pathMatch: 'full' },\r\n { path: 'update-history', component: TechlifyUpdateHistoryComponent },\r\n\r\n //fallback\r\n {\r\n path: '**',\r\n redirectTo: 'all',\r\n pathMatch: 'full'\r\n }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class TechlifyUpdateHistoryRoutingModule { }\r\n","import { ReactiveFormsModule } from '@angular/forms';\r\nimport { TechlifyUpdateHistoryRoutingModule } from './techlify-update-history-routing.module';\r\nimport { ReadMoreModule } from '../../read-more/read-more.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyUpdateHistoryComponent } from './techlify-update-history.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { MaterialModule } from '../../material.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ActionPopupModule } from '../../action-popup/action-popup.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ActionPopupModule,\r\n ReadMoreModule,\r\n TechlifyUpdateHistoryRoutingModule\r\n ],\r\n declarations: [TechlifyUpdateHistoryComponent]\r\n})\r\nexport class TechlifyUpdateHistoryModule { }\r\n","import { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { UpdateViewComponent } from './update-view.component';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [UpdateViewComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule\r\n ],\r\n exports: [\r\n UpdateViewComponent\r\n ],\r\n entryComponents: [\r\n UpdateViewComponent\r\n ]\r\n})\r\nexport class UpdateViewModule { }\r\n","import { AlertService } from './../../../core/alert.service';\r\nimport { TechlifyUpdateService } from './../../techlify-update.service';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { Component, EmbeddedViewRef, Inject, OnInit } from '@angular/core';\r\nimport { MatSnackBarRef, MAT_SNACK_BAR_DATA } from '@angular/material/snack-bar';\r\nimport { UpdateViewComponent } from '../../update-view/update-view.component';\r\nimport { Router } from '@angular/router';\r\n\r\n@Component({\r\n selector: 'app-update-notifier-snack',\r\n templateUrl: './update-notifier-snack.component.html',\r\n styleUrls: ['./update-notifier-snack.component.scss']\r\n})\r\nexport class UpdateNotifierSnackComponent implements OnInit {\r\n maxDescriptionLength: any = 70;\r\n descriptionText: any = '';\r\n techlifyUpdate: any;\r\n rootNavUrl: any;\r\n\r\n constructor(\r\n @Inject(MAT_SNACK_BAR_DATA) public data: any,\r\n private snackBarRef: MatSnackBarRef<EmbeddedViewRef<any>>,\r\n private dialog: MatDialog,\r\n private router: Router,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private alertService: AlertService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.techlifyUpdate = this.data.techlifyUpdate;\r\n this.rootNavUrl = this.data.rootNavUrl;\r\n this.determineDescription(this.techlifyUpdate?.description)\r\n }\r\n\r\n close(): void {\r\n this.createUpdateViewRecord();\r\n this.snackBarRef.dismiss();\r\n }\r\n\r\n determineDescription(description: any) {\r\n if (!description || description.length <= this.maxDescriptionLength) {\r\n this.descriptionText = description;\r\n return;\r\n }\r\n this.descriptionText = description.substring(0, this.maxDescriptionLength) + \"...\";\r\n }\r\n\r\n openUpdateView(): void {\r\n this.close();\r\n const dialogRef = this.dialog.open(UpdateViewComponent, {\r\n width: \"800px\",\r\n autoFocus: false,\r\n data: {\r\n techlifyUpdate: this.techlifyUpdate,\r\n rootNavUrl: this.data.rootNavUrl\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n openUpdateHistory(): void {\r\n this.close();\r\n this.router.navigate([this.rootNavUrl + \"/update-history\"]);\r\n }\r\n\r\n async createUpdateViewRecord() {\r\n try {\r\n var techlifyUpdateView = {\r\n update_id: this.techlifyUpdate?.id\r\n };\r\n let result: any = await this.techlifyUpdateService.createUpdateViewRecord(techlifyUpdateView);\r\n }\r\n catch (error) {\r\n this.alertService.addAlert(\"Unable to process, try later\", \"warn\");\r\n }\r\n }\r\n}\r\n","import { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\r\nimport { TechlifyUpdateService } from './../techlify-update.service';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { MatSnackBar } from '@angular/material/snack-bar';\r\nimport { AlertService } from '../../core/alert.service';\r\n\r\n@Component({\r\n selector: 'app-update-notifier',\r\n templateUrl: './update-notifier.component.html',\r\n styleUrls: ['./update-notifier.component.scss']\r\n})\r\nexport class UpdateNotifierComponent implements OnInit {\r\n techlifyUpdate: any;\r\n @Input() rootNavUrl: string = '/techlify-updates';\r\n\r\n constructor(\r\n private snackBar: MatSnackBar,\r\n private techlifyUpdateService: TechlifyUpdateService,\r\n private alertService: AlertService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n setTimeout(x => {\r\n this.getNewUpdate();\r\n }, 5000);\r\n }\r\n\r\n async getNewUpdate() {\r\n try {\r\n let result: any = await this.techlifyUpdateService.getNewUpdateForCurrentUser();\r\n this.techlifyUpdate = result.item;\r\n if (this.techlifyUpdate) {\r\n this.showUpdate();\r\n }\r\n }\r\n catch (error) {\r\n console.log(\"Current user updates failed\");\r\n }\r\n }\r\n\r\n showUpdate() {\r\n this.snackBar.openFromComponent(UpdateNotifierSnackComponent, {\r\n data: {\r\n techlifyUpdate: this.techlifyUpdate,\r\n rootNavUrl: this.rootNavUrl\r\n },\r\n horizontalPosition: 'right',\r\n verticalPosition: 'top',\r\n panelClass: ['white-bg']\r\n });\r\n }\r\n\r\n}\r\n","import { ActionPopupModule } from './../../action-popup/action-popup.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from './../../material.module';\r\nimport { UpdateViewModule } from './../update-view/update-view.module';\r\nimport { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { UpdateNotifierComponent } from './update-notifier.component';\r\nimport { UpdateNotifierSnackComponent } from './update-notifier-snack/update-notifier-snack.component';\r\n\r\n\r\n@NgModule({\r\n declarations: [UpdateNotifierComponent, UpdateNotifierSnackComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n UpdateViewModule,\r\n FlexLayoutModule,\r\n ActionPopupModule\r\n ],\r\n exports: [\r\n UpdateNotifierComponent,\r\n ],\r\n entryComponents: [\r\n UpdateNotifierSnackComponent\r\n ]\r\n})\r\nexport class UpdateNotifierModule { }\r\n","import { Component, OnInit, Input } from '@angular/core';\r\nimport * as XLSX from 'xlsx';\r\n\r\n@Component({\r\n selector: 'app-export-excel-button',\r\n templateUrl: './export-excel-button.component.html',\r\n styleUrls: ['./export-excel-button.component.scss']\r\n})\r\nexport class ExportExcelButtonComponent implements OnInit {\r\n\r\n @Input() name: string = 'Export_Data';\r\n @Input() data: any[] = [];\r\n\r\n constructor() { }\r\n\r\n ngOnInit(): void {\r\n }\r\n\r\n exportExcel() {\r\n const fileName = `${this.name}_${new Date().getTime()}.xlsx`;\r\n const ws = XLSX.utils.json_to_sheet(this.data);\r\n /* generate workbook and add the worksheet */\r\n const wb: XLSX.WorkBook = XLSX.utils.book_new();\r\n XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');\r\n\r\n /* save to file */\r\n XLSX.writeFile(wb, fileName);\r\n }\r\n\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { ExportExcelButtonComponent } from './export-excel-button/export-excel-button.component';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [ExportExcelButtonComponent],\r\n imports: [\r\n CommonModule,\r\n MaterialModule\r\n ],\r\n exports: [ExportExcelButtonComponent]\r\n})\r\nexport class ExportExcelModule { }\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { HttpService } from '../../core/http.service';\r\n\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-view',\r\n templateUrl: './audit-log-view-model.component.html',\r\n styleUrls: ['./audit-log-view-model.component.scss']\r\n})\r\nexport class AuditLogViewModelComponent implements OnInit {\r\n\r\n logInfo: any;\r\n showDeltaChanges: boolean = false;\r\n changeList: any[] = [];\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private http: HttpService\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n if (this.data) {\r\n this.http.get(`api/recent-log-for-model`, {\r\n params: {\r\n model_type: this.data?.modelType,\r\n model_id: this.data?.modelId\r\n }\r\n }).pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.logInfo = result?.item;\r\n this.getTransformedChanges();\r\n });\r\n }\r\n }\r\n\r\n getTransformedChanges() {\r\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\r\n });\r\n }\r\n\r\n close() {\r\n this.dialogRef.close();\r\n }\r\n\r\n}\r\n","import { Component, Inject, OnInit } from '@angular/core';\r\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\r\nimport { NavigationEnd, Router } from '@angular/router';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { filter } from 'rxjs/operators';\r\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-logs-view-model',\r\n templateUrl: './audit-logs-view-model.component.html',\r\n styleUrls: ['./audit-logs-view-model.component.scss']\r\n})\r\nexport class AuditLogsViewModelComponent implements OnInit {\r\n\r\n constructor(\r\n public dialogRef: MatDialogRef<AuditLogViewModelComponent>,\r\n @Inject(MAT_DIALOG_DATA) public data: any,\r\n private router: Router\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.router.events\r\n .pipe(filter(event => event instanceof NavigationEnd), untilDestroyed(this))\r\n .subscribe(_ => this.dialogRef.close());\r\n }\r\n\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { AuditLogViewModelComponent } from '../audit-log-view-model/audit-log-view-model.component';\r\nimport { AuditLogsViewModelComponent } from '../audit-logs-view-model/audit-logs-view-model.component';\r\n\r\n\r\n@Component({\r\n selector: 'app-audit-log-for-model',\r\n templateUrl: './audit-log-for-model.component.html',\r\n styleUrls: ['./audit-log-for-model.component.scss']\r\n})\r\nexport class AuditLogForModelComponent implements OnInit {\r\n\r\n @Input() modelType: string;\r\n @Input() modelId: any;\r\n @Input() logView: 'recent' | 'all' = 'recent';\r\n\r\n constructor(\r\n private dialog: MatDialog,\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n getLogView() {\r\n const dialogRef = this.dialog.open(AuditLogViewModelComponent, {\r\n width: '800px',\r\n autoFocus: false,\r\n data: {\r\n modelType: this.modelType,\r\n modelId: this.modelId\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n getLogsView() {\r\n const dialogRef = this.dialog.open(AuditLogsViewModelComponent, {\r\n width: '95%',\r\n maxWidth: 'unset',\r\n autoFocus: false,\r\n data: {\r\n modelType: this.modelType,\r\n modelId: this.modelId\r\n } // Any data passed here will be injected into the model\r\n });\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogForModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogViewModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogViewModelRoutingModule } from './audit-log-view-model-routing.module';\r\nimport { AuditLogViewModelComponent } from './audit-log-view-model.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogViewModelComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogViewModelRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n exports: [AuditLogViewModelComponent]\r\n})\r\nexport class AuditLogViewModelModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogsViewModelRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogListRoutingModule { }\r\n","import { Component, OnInit, OnDestroy, Input, ViewChild } from '@angular/core';\r\n\r\n\r\nimport { Router } from '@angular/router';\r\nimport { MatSort } from '@angular/material/sort';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { PageEvent } from '../../data-table/data-table.model';\r\nimport { DataManager } from '../../core/dataManager.service';\r\nimport { DomSanitizer } from '@angular/platform-browser';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-list',\r\n templateUrl: './audit-log-list.component.html',\r\n styleUrls: ['./audit-log-list.component.scss'],\r\n})\r\nexport class AuditLogListComponent implements OnInit, OnDestroy {\r\n\r\n auditLogList: any[] = [];\r\n @Input() objectId: any;\r\n @Input() objectType: any;\r\n @Input() showFilter: boolean = true;\r\n @Input() showExportButtons: boolean = true;\r\n @Input() userId: any;\r\n\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = { sort_by: 'created_at|desc' };\r\n displayedColumns: any[] = ['index', 'id', 'object_type', 'object_id', 'action', 'changes', 'created_at', 'user.email'];\r\n\r\n @ViewChild(MatSort, { static: true }) sort: MatSort;\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private router: Router,\r\n public sanitizer: DomSanitizer\r\n ) { }\r\n\r\n ngOnInit() {\r\n\r\n this.initializeData();\r\n\r\n if (this.sort) {\r\n this.sort.sortChange.pipe(untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n this.changeSort(value);\r\n })\r\n }\r\n\r\n }\r\n\r\n get excelData(): any[] {\r\n if (this.auditLogList.length > 0) {\r\n return this.auditLogList.map(item => {\r\n return {\r\n 'Type': item?.object_type,\r\n 'Action': item?.action,\r\n 'Data': JSON.stringify(item?.data || {}),\r\n 'Object': JSON.stringify(item?.object || {}),\r\n 'Pre-Object': JSON.stringify(item?.pre_object || {}),\r\n 'Created At': new Date(item?.created_at).toDateString(),\r\n 'Created By': item?.user?.email\r\n };\r\n });\r\n }\r\n return [];\r\n }\r\n\r\n changeSort(event: any) {\r\n if (event.direction) {\r\n this.filters.sort_by = `${event.active}|${event.direction}`;\r\n this.reload();\r\n }\r\n }\r\n\r\n logClicked(log: any) {\r\n this.router.navigate(['/system/audit-logs/log-view', log.id]);\r\n }\r\n\r\n\r\n async initializeData() {\r\n if (this.objectType) {\r\n this.filters = { ...this.filters, object_type: this.objectType }\r\n }\r\n if (this.objectId) {\r\n this.filters = { ...this.filters, object_id: this.objectId }\r\n }\r\n if (this.userId) {\r\n this.filters = { ...this.filters, user_id: this.userId }\r\n }\r\n const result = await this.dataManager.GET(`api/audit-logs`, { ...this.filters, ...this.pageEvent });\r\n this.auditLogList = this.auditLogList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n }\r\n\r\n filterChange(event: any) {\r\n if (this.showFilter) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event,\r\n object_type: this.objectType || event?.object_type || '',\r\n object_id: this.objectId || '',\r\n };\r\n this.reload();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n reload() {\r\n this.auditLogList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n getTransformedChanges(log: any) {\r\n if (log?.data?.changes) {\r\n const changes = Object.keys(log?.data?.changes) || [];\r\n let value = '<div>';\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\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>`;\r\n });\r\n value = `${value} </div>`;\r\n return value;\r\n }\r\n return '';\r\n }\r\n\r\n ngOnDestroy() {\r\n // Needed for automatic unsubscribe with untilDestroyed\r\n }\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogListFilterRoutingModule { }\r\n","import { FormControl } from \"@angular/forms\";\r\n\r\nexport function DateValidator(): any {\r\n return (control: FormControl): { [key: string]: any } => {\r\n\r\n const val: any = new Date(control.value);\r\n if (!!control.value && val == 'Invalid Date') {\r\n return { invalidDate: true };\r\n }\r\n return null;\r\n };\r\n}","import { Component, OnInit, Output, EventEmitter, Input } from '@angular/core';\r\nimport { FormGroup, FormBuilder } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { FormValidatorService } from '../../core/form-validator.service';\r\nimport { DateValidator } from '../../date-validator';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-audit-log-list-filter',\r\n templateUrl: './audit-log-list-filter.component.html',\r\n styleUrls: ['./audit-log-list-filter.component.scss']\r\n})\r\nexport class AuditLogListFilterComponent implements OnInit {\r\n\r\n auditLogFilterForm: FormGroup;\r\n\r\n @Input() objectId: any;\r\n @Input() objectType: any;\r\n\r\n @Output() valueChange = new EventEmitter();\r\n\r\n constructor(private fb: FormBuilder, private formValidatorService: FormValidatorService) {\r\n this.createForm();\r\n }\r\n\r\n get showObjectFilter() {\r\n return !(this.objectId || this.objectType);\r\n }\r\n\r\n private createForm() {\r\n\r\n //TODO: Finialize and add more validations.\r\n this.auditLogFilterForm = this.fb.group({\r\n object_type: [''],\r\n action: [''],\r\n data: [''],\r\n date_to: ['', DateValidator()],\r\n date_from: ['', DateValidator()]\r\n });\r\n }\r\n\r\n ngOnInit(): void {\r\n\r\n this.auditLogFilterForm.valueChanges.pipe(\r\n debounceTime(500),\r\n distinctUntilChanged(),\r\n untilDestroyed(this)\r\n ).subscribe((value: any) => {\r\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\r\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\r\n this.valueChange.emit(value);\r\n })\r\n }\r\n\r\n\r\n resetFieldValue(field: string) {\r\n this.auditLogFilterForm.get(field).setValue('');\r\n }\r\n\r\n getFieldValue(field: string) {\r\n return this.auditLogFilterForm.get(field).value;\r\n }\r\n\r\n isFieldValid(field: string) {\r\n return this.formValidatorService.isFieldValid(field, this.auditLogFilterForm, true);\r\n }\r\n\r\n\r\n ngOnDestroy() {\r\n\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogListFilterRoutingModule } from './audit-log-list-filter-routing.module';\r\nimport { AuditLogListFilterComponent } from './audit-log-list-filter.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../../material.module';\r\nimport { SearchableSelectorModule } from '../../searchable-selector/searchable-selector.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogListFilterComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogListFilterRoutingModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n SearchableSelectorModule,\r\n ],\r\n exports: [AuditLogListFilterComponent]\r\n})\r\nexport class AuditLogListFilterModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogListRoutingModule } from './audit-log-list-routing.module';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { AuditLogListComponent } from './audit-log-list.component';\r\nimport { AuditLogListFilterModule } from '../audit-log-list-filter/audit-log-list-filter.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { ExportExcelModule } from '../../export-excel/export-excel.module';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogListComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogListRoutingModule,\r\n ExportExcelModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n MaterialModule,\r\n InfiniteScrollModule,\r\n AuditLogListFilterModule\r\n ],\r\n exports: [AuditLogListComponent]\r\n})\r\nexport class AuditLogListModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogsViewModelRoutingModule } from './audit-logs-view-model-routing.module';\r\nimport { AuditLogsViewModelComponent } from './audit-logs-view-model.component';\r\nimport { AuditLogListModule } from '../audit-log-list/audit-log-list.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogsViewModelComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogsViewModelRoutingModule,\r\n FlexLayoutModule,\r\n AuditLogListModule\r\n ],\r\n exports: [AuditLogsViewModelComponent]\r\n})\r\nexport class AuditLogsViewModelModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogForModelRoutingModule } from './audit-log-for-model-routing.module';\r\nimport { AuditLogForModelComponent } from './audit-log-for-model.component';\r\nimport { AuditLogViewModelModule } from '../audit-log-view-model/audit-log-view-model.module';\r\nimport { AuditLogsViewModelModule } from '../audit-logs-view-model/audit-logs-view-model.module';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogForModelComponent],\r\n imports: [\r\n AuditLogViewModelModule,\r\n AuditLogsViewModelModule,\r\n CommonModule,\r\n AuditLogForModelRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule,\r\n ],\r\n exports: [AuditLogForModelComponent]\r\n})\r\nexport class AuditLogForModelModule { }\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { ActivatedRoute } from '@angular/router';\r\nimport { Location } from '@angular/common';\r\nimport * as jsondiffpatch from \"jsondiffpatch\"\r\nimport { DataManager } from '../../core/dataManager.service';\r\n\r\n@Component({\r\n selector: 'app-audit-log-view',\r\n templateUrl: './audit-log-view.component.html',\r\n styleUrls: ['./audit-log-view.component.scss']\r\n})\r\nexport class AuditLogViewComponent implements OnInit {\r\n\r\n logInfo: any;\r\n showDeltaChanges: boolean = false;\r\n changeList: any[] = [];\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private route: ActivatedRoute,\r\n private location: Location\r\n ) { }\r\n\r\n ngOnInit(): void {\r\n this.route.paramMap.subscribe(params => {\r\n if (params.get('id')) {\r\n this.fetchLogDetail(params.get('id'));\r\n } else {\r\n this.location.back();\r\n }\r\n });\r\n }\r\n\r\n getTransformedChanges() {\r\n const changes = ((this.logInfo?.action === 'deleted') ? Object.keys(this.logInfo?.object) : Object.keys(this.logInfo?.data?.changes)) || [];\r\n changes.forEach((key: any) => {\r\n const displayAttribute = (key as string).split('_').map(x => x.charAt(0).toUpperCase() + x.slice(1)).join(' ');\r\n this.changeList.push({ displayAttribute: displayAttribute, attribute: key, newValue: (this.logInfo?.action === 'deleted') ? '' : (this.logInfo?.object[key] ?? ''), oldValue: this.logInfo?.pre_object[key] ?? '' });\r\n });\r\n }\r\n\r\n async fetchLogDetail(logId: any) {\r\n const result = await this.dataManager.GET(`api/audit-logs/${logId}`);\r\n this.logInfo = result.item;\r\n this.getTransformedChanges();\r\n this.patchDelta();\r\n }\r\n\r\n patchDelta() {\r\n const delta = jsondiffpatch.diff(this.logInfo?.pre_object, this.logInfo?.object);\r\n document.getElementById('jsondiff').innerHTML = jsondiffpatch.formatters.html.format(delta, this.logInfo?.pre_object);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\n\r\nconst routes: Routes = [];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogViewRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogViewRoutingModule } from './audit-log-view-routing.module';\r\nimport { AuditLogViewComponent } from './audit-log-view.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { MaterialModule } from '../../material.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [AuditLogViewComponent],\r\n imports: [\r\n CommonModule,\r\n AuditLogViewRoutingModule,\r\n FlexLayoutModule,\r\n MaterialModule\r\n ],\r\n exports: [AuditLogViewComponent]\r\n})\r\nexport class AuditLogViewModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../core/authentication.guard';\r\nimport { AuditLogListComponent } from './audit-log-list/audit-log-list.component';\r\nimport { AuditLogViewComponent } from './audit-log-view/audit-log-view.component';\r\n\r\n\r\nconst routes: Routes = [\r\n { path: 'log-list', component: AuditLogListComponent, canActivate: [AuthenticationGuard] },\r\n { path: 'log-view/:id', component: AuditLogViewComponent, canActivate: [AuthenticationGuard] },\r\n { path: '**', redirectTo: 'log-list', pathMatch: 'full' }\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class AuditLogRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { AuditLogRoutingModule } from './audit-log-routing.module';\r\nimport { AuditLogListModule } from './audit-log-list/audit-log-list.module';\r\nimport { AuditLogViewModule } from './audit-log-view/audit-log-view.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n CommonModule,\r\n AuditLogRoutingModule,\r\n AuditLogListModule,\r\n AuditLogViewModule\r\n ],\r\n exports: []\r\n})\r\nexport class AuditLogModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\n\r\n@Component({\r\n selector: 'app-import-success',\r\n templateUrl: './import-success.component.html',\r\n styleUrls: ['./import-success.component.scss']\r\n})\r\nexport class ImportSuccessComponent implements OnInit {\r\n @Input() data: any;\r\n @Input() config: ImportCsvConfig;\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { ErrorHandlerService } from './../../core/error-handler.service';\r\nimport { PageEvent } from './../../data-table/data-table.model';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\nimport { HttpService } from '../../core/http.service';\r\n\r\n@Component({\r\n selector: 'app-import-history-list',\r\n templateUrl: './import-history-list.component.html',\r\n styleUrls: ['./import-history-list.component.scss']\r\n})\r\nexport class ImportHistoryListComponent implements OnInit {\r\n\r\n @Input() config: ImportCsvConfig;\r\n histories: any[] = [];\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'imported_by',\r\n 'date',\r\n 'no_of_records'\r\n ];\r\n isWorking: boolean = false;\r\n filter: any;\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n\r\n constructor(\r\n private errorHandler: ErrorHandlerService,\r\n private http: HttpService,\r\n ) {\r\n }\r\n\r\n ngOnInit() {\r\n if (this.config.importHistory.isEnabled) {\r\n this.filter = {\r\n model_type: this.config.importHistory.type,\r\n };\r\n }\r\n this.loadData();\r\n }\r\n\r\n loadData() {\r\n try {\r\n this.isWorking = true;\r\n this.http.get(this.config.importHistory.apiUrl, { params: { ...this.filter, ...this.pageEvent } }).subscribe((result: any) => {\r\n this.histories = this.histories.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n }\r\n finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n reload() {\r\n this.histories = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.loadData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { FormValidatorService } from '../../core/form-validator.service';\r\nimport { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\nimport { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';\r\nimport { Location } from '@angular/common';\r\nimport { ImportCsvConfig } from '../import-csv-config';\r\n\r\nconst errorMessages: any = {\r\n property: {\r\n required: \"Property is required\",\r\n unavailable: \"Duplicate entry\"\r\n },\r\n};\r\n\r\n@Component({\r\n selector: 'app-field-mapping',\r\n templateUrl: './field-mapping.component.html',\r\n styleUrls: ['./field-mapping.component.scss']\r\n})\r\nexport class FieldMappingComponent implements OnInit {\r\n\r\n importMappingForm: FormGroup;\r\n @Input() data: any[];\r\n @Input() config: ImportCsvConfig;\r\n firstDataArray: any[] = [];\r\n properties: any[] = [];\r\n @Output() onSave = new EventEmitter();\r\n @Output() onReUpload= new EventEmitter();\r\n\r\n constructor(\r\n private fb: FormBuilder,\r\n private formValidatorService: FormValidatorService,\r\n private changeDetectorRef: ChangeDetectorRef,\r\n public location: Location\r\n ) {\r\n this.createImportMappingForm();\r\n }\r\n\r\n ngOnInit() {\r\n this.properties = this.config.properties;;\r\n this.reFectorAttributes(this.data[0]);\r\n }\r\n\r\n createImportMappingForm() {\r\n this.importMappingForm = this.fb.group({\r\n fields: this.fb.array([]),\r\n });\r\n }\r\n\r\n get fieldsArray(): FormArray {\r\n return this.importMappingForm.get('fields') as FormArray;\r\n }\r\n\r\n createField(field: any): FormGroup {\r\n var fieldForm: FormGroup = this.fb.group({\r\n id: new FormControl(field.id),\r\n label: new FormControl(field.label),\r\n value: new FormControl(field.value),\r\n property: new FormControl(field.property,\r\n Validators.compose(\r\n [\r\n Validators.required\r\n ]\r\n )\r\n ),\r\n propertyType: new FormControl(field.propertyType)\r\n });\r\n return fieldForm;\r\n }\r\n\r\n reFectorAttributes(data) {\r\n for (var k in data) {\r\n if (data.hasOwnProperty(k)) {\r\n var dataValue = {\r\n id: '',\r\n label: k,\r\n value: data[k],\r\n property: '',\r\n propertyType: ''\r\n };\r\n this.firstDataArray.push(dataValue);\r\n }\r\n }\r\n this.firstDataArray.forEach((element: any, mainIndex: any) => {\r\n element.id = mainIndex;\r\n this.properties.find((property: any, index: any) => {\r\n if (property.label.toLowerCase().includes(element.label.toLowerCase())) {\r\n element.property = property.value;\r\n element.propertyType = property.type;\r\n return element;\r\n }\r\n });\r\n });\r\n }\r\n\r\n next() {\r\n this.importMappingForm.markAllAsTouched();\r\n if (!this.importMappingForm.valid) {\r\n return;\r\n }\r\n this.onSave.emit(this.importMappingForm.value);\r\n }\r\n\r\n /** Method to evaluate form fields*/\r\n isFieldValid(field: string, form: any) {\r\n return this.formValidatorService.isFieldValid(field, form);\r\n }\r\n\r\n /** Method to find error in form fields*/\r\n getErrorMessage(field: string, form: any) {\r\n return this.formValidatorService.getErrorMessage(field, form, errorMessages);\r\n }\r\n\r\n ngAfterViewInit(): void {\r\n //Called after ngAfterContentInit when the component's view has been initialized. Applies to components only.\r\n //Add 'implements AfterViewInit' to the class.\r\n setTimeout(x => {\r\n this.firstDataArray.forEach((element: any) => {\r\n this.fieldsArray.push(this.createField(element));\r\n });\r\n this.changeDetectorRef.detectChanges();\r\n }, 500);\r\n }\r\n\r\n updatePropertyType(event: any, index: any): void {\r\n var field = this.properties.find((field: any) => field.value == event.value);\r\n if (field) {\r\n this.fieldsArray.controls[index].get('propertyType').setValue(field.type);\r\n this.uniqueValidator();\r\n }\r\n }\r\n\r\n uniqueValidator() {\r\n this.fieldsArray.value.forEach((field: any, index: any) => {\r\n var control = this.fieldsArray.controls[index].get('property');\r\n const isNameUnique = this.fieldsArray.value.find(propertyData =>\r\n propertyData.property === control.value\r\n && propertyData.id != this.fieldsArray.controls[index].get('id').value\r\n )\r\n ? false\r\n : true;\r\n if (!isNameUnique) {\r\n control.setErrors({ unavailable: true });\r\n }\r\n else {\r\n control.setErrors(null);\r\n }\r\n });\r\n }\r\n\r\n removeField(index: number) {\r\n if (index == -1) {\r\n return;\r\n }\r\n this.fieldsArray.removeAt(index);\r\n }\r\n\r\n reUpload() {\r\n this.onReUpload.emit(true);\r\n }\r\n\r\n}\r\n","import { Location } from '@angular/common';\r\nimport { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-failed-items-list',\r\n templateUrl: './failed-items-list.component.html',\r\n styleUrls: ['./failed-items-list.component.scss']\r\n})\r\nexport class FailedItemsListComponent implements OnInit {\r\n @Input() failedItems: any[];\r\n @Input() selectedFields: any[];\r\n @Output() onReUpload = new EventEmitter();\r\n\r\n constructor(\r\n public location: Location\r\n ) { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n isValidDate(d: any): boolean {\r\n var date = new Date(d);\r\n return date instanceof Date && !isNaN(date.getTime());\r\n }\r\n\r\n reUpload() {\r\n this.onReUpload.emit(true);\r\n }\r\n\r\n}\r\n","import { ViewerConfig } from '../document-viewer/viewer-config.model';\r\nimport { FileDropperConfig } from '../file-dropper/file-dropper.model';\r\nimport { HttpService } from '../core/http.service';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Component, Input, OnInit } from '@angular/core';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport * as XLSX from 'xlsx';\r\nimport { ImportCsvConfig } from './import-csv-config';\r\n@UntilDestroy()\r\n\r\n@Component({\r\n selector: 'app-import-csv',\r\n templateUrl: './import-csv.component.html',\r\n styleUrls: ['./import-csv.component.scss']\r\n})\r\nexport class ImportCsvComponent implements OnInit {\r\n result: any;\r\n @Input() config: ImportCsvConfig;\r\n filesConfig: FileDropperConfig;\r\n filesList: any[] = [];\r\n data: any[] = [];\r\n isUploaded: boolean = false;\r\n isImportTypeSelected: boolean = false;\r\n viewerConfig: ViewerConfig;\r\n fileData: any[] = [];\r\n failedItems: any[] = [];\r\n selectedFields: any[] = [];\r\n importSteps: any = [\r\n {\r\n id: 1,\r\n step: 1,\r\n title: 'Upload',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 2,\r\n step: 2,\r\n title: 'Field Mappings',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 3,\r\n step: 3,\r\n title: 'Data Validation',\r\n progressTitle: 'Data Being Validated',\r\n progressDescription: 'The data is currently being validated and checked for errors, please do not navigate away from this page. '\r\n },\r\n {\r\n id: 4,\r\n step: 3,\r\n title: 'Data Validation & Errors',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n {\r\n id: 5,\r\n step: 4,\r\n title: 'Data Importing',\r\n progressTitle: 'Data Being Imported',\r\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.'\r\n },\r\n {\r\n id: 6,\r\n step: 5,\r\n title: 'Success Page & Data Preview',\r\n progressTitle: '',\r\n progressDescription: ''\r\n },\r\n ];\r\n currentStep: any = 1;\r\n\r\n constructor(\r\n private alertService: AlertService,\r\n private errorHandler: ErrorHandlerService,\r\n private http: HttpService,\r\n ) {\r\n this.filesConfig = {\r\n fileId: \"file\",\r\n containerId: \"fileContainer\",\r\n styles: {\r\n height: \"200px\"\r\n },\r\n acceptFile: '.csv',\r\n multiple: false,\r\n maxSize: 10,\r\n acceptFileText: \".csv\"\r\n };\r\n }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n get step() {\r\n return this.importSteps.find(step => step.id == this.currentStep);\r\n }\r\n\r\n async fileChanged(event: any) {\r\n this.currentStep = 2;\r\n this.filesList = event;\r\n\r\n let selectedFile = null;\r\n let jsonData = null;\r\n const reader = new FileReader();\r\n const file = this.filesList[0];\r\n reader.onload = (event) => {\r\n const data = reader.result;\r\n selectedFile = XLSX.read(data, {\r\n type: 'binary',\r\n cellDates: true,\r\n });\r\n jsonData = selectedFile.SheetNames.reduce((initial, name) => {\r\n const sheet = selectedFile.Sheets[name];\r\n initial = XLSX.utils.sheet_to_json(sheet, {\r\n header: 0,\r\n defval: \"\",\r\n });\r\n return initial;\r\n }, {});\r\n this.fileData = jsonData;\r\n }\r\n reader.readAsBinaryString(file);\r\n return;\r\n }\r\n\r\n mappingProcessed(event: any) {\r\n this.currentStep = 3;\r\n setTimeout(x => {\r\n this.selectedFields = event.fields;\r\n const tempFileData = JSON.parse(JSON.stringify(this.fileData));\r\n tempFileData.forEach(data => {\r\n for (var key in data) {\r\n var field = event.fields.find((field: any) => field.label == key);\r\n if (field) {\r\n if ((field.propertyType == 'date' || field.propertyType == 'dateTime') && this.isValidDate(new Date(data[field.label]))) {\r\n data[field.property] = (new Date(data[field.label]) as Date).toISOString();\r\n }\r\n else {\r\n data[field.property] = data[field.label];\r\n }\r\n delete data[key];\r\n }\r\n else {\r\n delete data[key];\r\n }\r\n }\r\n });\r\n this.save(tempFileData);\r\n }, 2000);\r\n }\r\n\r\n async save(tempFileData: any) {\r\n try {\r\n this.http.post(this.config.apiUrl, { data: tempFileData })\r\n .pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n\r\n this.failedItems = result.failed_items;\r\n if (this.failedItems.length) {\r\n this.alertService.addAlert(result.msg, 'warn');\r\n }\r\n if (!(this.failedItems.length > 0)) {\r\n this.currentStep = 5;\r\n setTimeout(x => {\r\n this.currentStep = 6;\r\n this.result = result;\r\n }, 2000);\r\n }\r\n else {\r\n this.currentStep = 4;\r\n }\r\n });\r\n } catch (error) {\r\n if ((error.status === 422 || error.status === 400) && error.msg) {\r\n this.alertService.addAlert(error.msg, \"warning\");\r\n }\r\n this.errorHandler.handleError(error);\r\n this.reUpload();\r\n }\r\n }\r\n\r\n isValidDate(d: any) {\r\n return d instanceof Date && !isNaN(d.getTime());\r\n }\r\n\r\n reUpload() {\r\n this.data = [];\r\n this.fileData = [];\r\n this.filesList = [];\r\n this.failedItems = [];\r\n this.selectedFields = [];\r\n this.currentStep = 1;\r\n }\r\n\r\n}\r\n","import { Component, Input, OnInit } from '@angular/core';\r\n\r\n@Component({\r\n selector: 'app-data-import',\r\n templateUrl: './data-import.component.html',\r\n styleUrls: ['./data-import.component.scss']\r\n})\r\nexport class DataImportComponent implements OnInit {\r\n @Input() step: any;\r\n\r\n constructor() { }\r\n\r\n ngOnInit() {\r\n }\r\n\r\n}\r\n","import { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { DocumentViewerModule } from './../document-viewer/document-viewer.module';\r\nimport { FileDropperModule } from './../file-dropper/file-dropper.module';\r\nimport { MaterialModule } from './../material.module';\r\nimport { ImportSuccessComponent } from './import-success/import-success.component';\r\nimport { ImportHistoryListComponent } from './import-history-list/import-history-list.component';\r\nimport { FieldMappingComponent } from './field-mapping/field-mapping.component';\r\nimport { FailedItemsListComponent } from './failed-items-list/failed-items-list.component';\r\nimport { CommonModule } from '@angular/common';\r\nimport { NgModule } from '@angular/core';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ImportCsvComponent } from './import-csv.component';\r\nimport { RouterModule } from '@angular/router';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { DataImportComponent } from './data-import/data-import.component';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n FlexLayoutModule,\r\n RouterModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n FileDropperModule,\r\n DocumentViewerModule,\r\n InfiniteScrollModule\r\n ],\r\n declarations: [\r\n ImportCsvComponent,\r\n FieldMappingComponent,\r\n FailedItemsListComponent,\r\n ImportHistoryListComponent,\r\n ImportSuccessComponent,\r\n DataImportComponent\r\n ],\r\n providers: [],\r\n exports: [\r\n ImportCsvComponent\r\n ],\r\n})\r\nexport class ImportCsvModule { }\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { debounceTime, distinctUntilChanged } from 'rxjs/operators';\r\nimport { PageEvent } from '../data-table/data-table.model';\r\nimport { HttpService } from '../core/http.service';\r\nimport { TimelineValue } from '../timeline-filter';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-login-history-for-user',\r\n templateUrl: './login-history-for-user.component.html',\r\n styleUrls: ['./login-history-for-user.component.scss']\r\n})\r\nexport class LoginHistoryForUserComponent implements OnInit {\r\n\r\n loginHistoryList: any[] = [];\r\n pageEvent: PageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n filters: any = {\r\n sort_by: 'created_at|desc',\r\n };\r\n historyFilterForm: FormGroup;\r\n displayedColumns: any[] = ['index', 'created_at'];\r\n @Input() userId: any;\r\n\r\n constructor(\r\n private http: HttpService,\r\n private fb: FormBuilder,\r\n ) {\r\n this.historyFilterForm = this.fb.group({\r\n 'duration': [''],\r\n 'date_from': [''],\r\n 'date_to': ['']\r\n });\r\n }\r\n\r\n ngOnInit() {\r\n this.filters.user_id = this.userId;\r\n this.historyFilterForm.valueChanges\r\n .pipe(debounceTime(500), distinctUntilChanged(), untilDestroyed(this))\r\n .subscribe((value: any) => {\r\n value.date_from = value.date_from ? (value.date_from as Date).toISOString() : '';\r\n value.date_to = value.date_to ? (value.date_to as Date).toISOString() : '';\r\n this.filterChange(value);\r\n });\r\n this.initializeData();\r\n }\r\n\r\n onTimelineChange(range: TimelineValue) {\r\n let date_from = range?.date_from ? new Date(range.date_from) : '';\r\n let date_to = range?.date_to ? new Date(range.date_to) : '';\r\n this.historyFilterForm.patchValue({\r\n date_from,\r\n date_to\r\n });\r\n }\r\n\r\n initializeData() {\r\n this.http.get(`api/user-login-history`, { params: { ...this.filters, ...this.pageEvent } })\r\n .pipe(untilDestroyed(this))\r\n .subscribe((result: any) => {\r\n this.loginHistoryList = this.loginHistoryList.concat(result.data);\r\n this.pageEvent.page = result.current_page;\r\n this.pageEvent.lastPage = result.last_page;\r\n });\r\n }\r\n\r\n filterChange(event: any) {\r\n this.filters = {\r\n ...this.filters,\r\n ...event\r\n };\r\n this.reload();\r\n }\r\n\r\n onScroll() {\r\n if (this.pageEvent.lastPage > this.pageEvent.page) {\r\n this.pageEvent.page += 1;\r\n this.initializeData();\r\n }\r\n }\r\n\r\n\r\n reload() {\r\n this.loginHistoryList = [];\r\n this.pageEvent = { page: 1, perPage: 25, lastPage: 1 };\r\n this.initializeData();\r\n }\r\n\r\n ngOnDestroy() {\r\n //Until destroyed uses it\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { AuthenticationGuard } from '../core/authentication.guard';\r\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: LoginHistoryForUserComponent,\r\n canActivate: [AuthenticationGuard]\r\n },\r\n];\r\n\r\n@NgModule({\r\n imports: [RouterModule.forChild(routes)],\r\n exports: [RouterModule]\r\n})\r\nexport class LoginHistoryForUserRoutingModule { }\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\n\r\nimport { LoginHistoryForUserRoutingModule } from './login-history-for-user-routing.module';\r\nimport { LoginHistoryForUserComponent } from './login-history-for-user.component';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\nimport { TimelineFilterModule } from '../timeline-filter/timeline-filter.module';\r\n\r\n\r\n@NgModule({\r\n declarations: [LoginHistoryForUserComponent],\r\n imports: [\r\n CommonModule,\r\n LoginHistoryForUserRoutingModule,\r\n InfiniteScrollModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n ReactiveFormsModule,\r\n TimelineFilterModule\r\n ],\r\n exports: [LoginHistoryForUserComponent]\r\n})\r\nexport class LoginHistoryForUserModule { }\r\n","import { COMMA, ENTER } from '@angular/cdk/keycodes';\r\n\r\nexport class TechlifyTaggerTagFormConfigModel {\r\n selectable: boolean;\r\n removable: boolean;\r\n separatorKeysCodes: number[];\r\n placeholder: string;\r\n apiUrl: string;\r\n isCreateable: boolean;\r\n createApiUrl: string;\r\n isCacheTags: boolean;\r\n isSingle: boolean;\r\n\r\n constructor() {\r\n this.selectable = true;\r\n this.removable = true;\r\n this.separatorKeysCodes = [ENTER, COMMA];\r\n this.placeholder = 'New Tag..';\r\n this.apiUrl = 'api/techlify-tagger-tags';\r\n this.createApiUrl = 'api/techlify-tagger-tags';\r\n this.isCreateable = true;\r\n this.isCacheTags = false;\r\n this.isSingle = false;\r\n }\r\n}","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, ViewChild, OnInit, Input, OnDestroy, Inject, Optional, Self, OnChanges, SimpleChanges } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\r\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\r\nimport { MatChipInputEvent } from '@angular/material/chips';\r\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { HttpService } from '../core/http.service';\r\nimport { TechlifyTaggerTagFormConfigModel } from './techlify-tagger-tag-form-config.model';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-tagger-tag-form-field',\r\n templateUrl: './techlify-tagger-tag-form-field.component.html',\r\n styleUrls: ['./techlify-tagger-tag-form-field.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagFormFieldComponent }],\r\n})\r\nexport class TechlifyTaggerTagFormFieldComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy, OnChanges {\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'techlify-tagger-form-field';\r\n id = `techlify-tagger-form-field-${TechlifyTaggerTagFormFieldComponent.nextId++}`;\r\n\r\n onChange = (_: any) => { };\r\n onTouched = () => { };\r\n\r\n tagInputCtrl = new FormControl();\r\n filterString: any;\r\n @ViewChild('tagInput') tagInput: ElementRef<HTMLInputElement>;\r\n\r\n /**Pass the configuration for Techlify Tagger */\r\n @Input() config: TechlifyTaggerTagFormConfigModel = new TechlifyTaggerTagFormConfigModel();\r\n /**Pass the Model Type for Techlify Tagger, Required */\r\n @Input() modelType!: string;\r\n /**Pass the Model ID for Techlify Tagger */\r\n @Input() modelId: string;\r\n\r\n /**Pass the default list of tags */\r\n private _allTags: any[] = [];\r\n @Input()\r\n get allTags() {\r\n return this._allTags;\r\n }\r\n set allTags(value) {\r\n this._allTags = value;\r\n }\r\n\r\n /**Pass the Categories to filter for a model */\r\n @Input() categories: string[] = [];\r\n /**Pass default category to be used for assigning the tags, when we filter by more than one category */\r\n @Input() defaultCreateCategory: string;\r\n\r\n get tags() {\r\n return this.allTags.filter(x => this.value.some(y => y == x.id));\r\n }\r\n\r\n //Default Getter and Setters for a Form Field Implementation\r\n get empty() {\r\n return this.value.length == 0;\r\n }\r\n\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty || this.tagInputCtrl.value;\r\n }\r\n\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.tagInputCtrl.disable() : this.tagInputCtrl.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n\r\n private _value: any[] = [];\r\n @Input()\r\n get value(): any[] {\r\n return this._value;\r\n }\r\n set value(tagIds: any[]) {\r\n this._value = tagIds || [];\r\n this.stateChanges.next();\r\n }\r\n\r\n get errorState(): boolean {\r\n return this.tagInputCtrl.dirty && this.required && (this.value.length == 0);\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string;\r\n\r\n\r\n ngOnInit(): void {\r\n\r\n }\r\n\r\n ngOnChanges(changes: SimpleChanges) {\r\n\r\n //API to load all tags for the model type\r\n if (this.allTags.length == 0) {\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n perPage: '1000'\r\n }\r\n }).pipe(\r\n debounceTime(500),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.allTags = result.data;\r\n });\r\n }\r\n\r\n //API to load only the selected tags for the model\r\n if (this.modelId && this.value.length == 0) {\r\n //Model Id is passed and no tags are present, so we query db for the avilable tags for the model ID.\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n model_type: this.modelType,\r\n model_id: this.modelId,\r\n perPage: '1000'\r\n }\r\n }).pipe(\r\n debounceTime(500),\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.value = (result?.data || []).map((x: any) => x.id);\r\n this._handleInput();\r\n });\r\n }\r\n }\r\n\r\n init() {\r\n if (this.modelId && this.allTags.length == 0) {\r\n //Model Id is passed and no tags are passed, so we query db for the avilable tags for the model ID.\r\n this.httpService\r\n .cache(!this.config.isCacheTags)\r\n .get(this.config.apiUrl, {\r\n params: {\r\n categories: this.categories.join(','),\r\n model_type: this.modelType,\r\n model_id: this.modelId\r\n }\r\n }).pipe(\r\n untilDestroyed(this)\r\n ).subscribe((result: any) => {\r\n this.allTags = result.data;\r\n });\r\n }\r\n }\r\n\r\n get filteredTags(): any[] {\r\n return this._filter();\r\n }\r\n\r\n constructor(\r\n private _focusMonitor: FocusMonitor,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private httpService: HttpService,\r\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n this.tagInputCtrl.valueChanges\r\n .subscribe(filterValue => {\r\n this.filterString = filterValue;\r\n });\r\n\r\n //Set Focus Monitor\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n onContainerClick() {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n\r\n async add(event: MatChipInputEvent) {\r\n const value = (event.value || '').trim();\r\n // Add our tag\r\n // Validate for single mode\r\n if (!this.config.isSingle || (this.value.length === 0)) {\r\n if (value && this.config.isCreateable) {\r\n const tags = this.allTags;\r\n let tag = tags.find((item: any) => item.title.toLowerCase() == value.toLowerCase());\r\n if (!tag) {\r\n //No tag present in the list\r\n try {\r\n const result: any = await this.httpService.post(this.config.createApiUrl, {\r\n title: value,\r\n description: value,\r\n category_title: (this.categories.length > 0) ? (this.defaultCreateCategory ? this.defaultCreateCategory : this.categories[0]) : ''\r\n }).toPromise();\r\n tag = result.item;\r\n } catch (error) {\r\n return;\r\n }\r\n this.allTags.push(tag);\r\n } else {\r\n //Optionally clean the existing value, to avoid duplicate\r\n this.remove(tag);\r\n }\r\n this.value.push(tag.id);\r\n this._handleInput();\r\n }\r\n }\r\n\r\n // Clear the input value\r\n event.input.value = '';\r\n\r\n this.tagInputCtrl.setValue(null);\r\n }\r\n\r\n remove(tag: any): void {\r\n this.value = this.value.filter(x => x !== tag.id);\r\n this._handleInput();\r\n }\r\n\r\n selected(event: MatAutocompleteSelectedEvent): void {\r\n // Validate for single mode\r\n if (!this.config.isSingle || (this.value.length === 0)) {\r\n //Clean the existing value, to avoid duplicate\r\n this.remove({ id: event.option.value });\r\n this.value.push(event.option.value);\r\n this._handleInput();\r\n }\r\n this.tagInput.nativeElement.value = '';\r\n this.tagInputCtrl.setValue(null);\r\n }\r\n\r\n private _filter(): any[] {\r\n const filterValue = this.filterString ? this.filterString.toString().toLowerCase() : null;\r\n const availableTags = this.allTags.filter((tag: any) => !this.value.some((item: any) => item == tag.id));\r\n return filterValue ? availableTags.filter((tag: any) => tag.title.toLowerCase().includes(filterValue)) : availableTags;\r\n }\r\n\r\n writeValue(tagIds: any[]): void {\r\n this.value = tagIds || [];\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n }\r\n\r\n static ngAcceptInputType_disabled: BooleanInput;\r\n static ngAcceptInputType_required: BooleanInput;\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyTaggerTagFormFieldComponent } from './techlify-tagger-tag-form-field.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n TechlifyTaggerTagFormFieldComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n MatAutocompleteModule,\r\n ReactiveFormsModule\r\n ],\r\n exports: [TechlifyTaggerTagFormFieldComponent]\r\n})\r\nexport class TechlifyTaggerTagFormFieldModule { }\r\n","import { FocusMonitor } from '@angular/cdk/a11y';\r\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\r\nimport { Component, ElementRef, OnInit, Input, OnDestroy, Inject, Optional, Self } from '@angular/core';\r\nimport { ControlValueAccessor, FormControl, NgControl } from '@angular/forms';\r\nimport { MatFormField, MatFormFieldControl, MAT_FORM_FIELD } from '@angular/material/form-field';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { Subject } from 'rxjs';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { HttpService } from '../core/http.service';\r\n\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-tagger-tag-selector',\r\n templateUrl: './techlify-tagger-tag-selector.component.html',\r\n styleUrls: ['./techlify-tagger-tag-selector.component.scss'],\r\n providers: [{ provide: MatFormFieldControl, useExisting: TechlifyTaggerTagSelectorComponent }],\r\n})\r\nexport class TechlifyTaggerTagSelectorComponent implements OnInit, ControlValueAccessor, MatFormFieldControl<any>, OnDestroy {\r\n\r\n /**Pass the Categories to filter for a model */\r\n @Input() categories: string[] = [];\r\n @Input() multiple: boolean = false;\r\n @Input() enableSearch: boolean = true;\r\n tagSelectorCtrl = new FormControl();\r\n @Input() showAllTags: boolean = false;\r\n @Input() useSelectButtonStyle: boolean = false;\r\n\r\n tags: any[] = [];\r\n\r\n static nextId = 0;\r\n stateChanges = new Subject<void>();\r\n focused = false;\r\n controlType = 'techlify-tagger-selector';\r\n id = `techlify-tagger-selector-${TechlifyTaggerTagSelectorComponent.nextId++}`;\r\n\r\n onChange = (_: any) => { };\r\n onTouched = () => { };\r\n\r\n get apiUrl() {\r\n if (this.showAllTags) {\r\n return 'api/techlify-tagger-tags'\r\n }\r\n else if (this.categories?.length > 0) {\r\n return 'api/techlify-tagger-tags?categories=' + this.categories.join(',');\r\n }\r\n else {\r\n return '';\r\n }\r\n }\r\n\r\n //Default Getter and Setters for a Form Field Implementation\r\n get empty() {\r\n return this.value.length == 0;\r\n }\r\n\r\n get shouldLabelFloat() {\r\n return this.focused || !this.empty;\r\n }\r\n\r\n @Input()\r\n get required(): boolean {\r\n return this._required;\r\n }\r\n set required(value: boolean) {\r\n this._required = coerceBooleanProperty(value);\r\n this.stateChanges.next();\r\n }\r\n private _required = false;\r\n\r\n @Input()\r\n get disabled(): boolean {\r\n return this._disabled;\r\n }\r\n set disabled(value: boolean) {\r\n this._disabled = coerceBooleanProperty(value);\r\n this._disabled ? this.tagSelectorCtrl.disable() : this.tagSelectorCtrl.enable();\r\n this.stateChanges.next();\r\n }\r\n private _disabled = false;\r\n\r\n\r\n private _value: any;\r\n @Input()\r\n get value(): any {\r\n return this._value;\r\n }\r\n set value(val: any) {\r\n this._value = val;\r\n this.tagSelectorCtrl.setValue(val);\r\n this.stateChanges.next();\r\n }\r\n\r\n get errorState(): boolean {\r\n return this.tagSelectorCtrl.dirty && this.required && (this.value.length == 0);\r\n }\r\n\r\n @Input()\r\n get placeholder(): string {\r\n return this._placeholder;\r\n }\r\n set placeholder(value: string) {\r\n this._placeholder = value;\r\n this.stateChanges.next();\r\n }\r\n private _placeholder: string;\r\n\r\n\r\n ngOnInit(): void {\r\n if (this.useSelectButtonStyle) {\r\n this.httpService.get(this.apiUrl)\r\n .pipe(untilDestroyed(this))\r\n .subscribe((res: any) => {\r\n this.tags = res.data;\r\n })\r\n }\r\n }\r\n\r\n selectionChange(value: any) {\r\n this.value = value;\r\n this._handleInput();\r\n }\r\n\r\n constructor(\r\n private _focusMonitor: FocusMonitor,\r\n private _elementRef: ElementRef<HTMLElement>,\r\n private httpService: HttpService,\r\n @Optional() @Inject(MAT_FORM_FIELD) public _formField: MatFormField,\r\n @Optional() @Self() public ngControl: NgControl) {\r\n\r\n //Set Focus Monitor\r\n _focusMonitor.monitor(_elementRef, true).subscribe(origin => {\r\n if (this.focused && !origin) {\r\n this.onTouched();\r\n }\r\n this.focused = !!origin;\r\n this.stateChanges.next();\r\n });\r\n\r\n if (this.ngControl != null) {\r\n this.ngControl.valueAccessor = this;\r\n }\r\n }\r\n\r\n setDescribedByIds(ids: string[]) {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n onContainerClick() {\r\n // Just a empty implementation for Mat Form Field Interface\r\n }\r\n\r\n writeValue(val: any): void {\r\n this.value = val;\r\n }\r\n\r\n registerOnChange(fn: any): void {\r\n this.onChange = fn;\r\n }\r\n\r\n registerOnTouched(fn: any): void {\r\n this.onTouched = fn;\r\n }\r\n\r\n setDisabledState(isDisabled: boolean): void {\r\n this.disabled = isDisabled;\r\n }\r\n\r\n _handleInput(): void {\r\n this.onChange(this.value);\r\n }\r\n\r\n static ngAcceptInputType_disabled: BooleanInput;\r\n static ngAcceptInputType_required: BooleanInput;\r\n\r\n ngOnDestroy() {\r\n this.stateChanges.complete();\r\n this._focusMonitor.stopMonitoring(this._elementRef);\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyTaggerTagSelectorComponent } from './techlify-tagger-tag-selector.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { ReactiveFormsModule } from '@angular/forms';\r\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\r\nimport { MatButtonToggleModule } from '@angular/material/button-toggle';\r\nimport { MaterialModule } from '../material.module';\r\nimport { SearchableSelectorModule } from '../searchable-selector/searchable-selector.module';\r\n\r\n\r\n\r\n@NgModule({\r\n declarations: [\r\n TechlifyTaggerTagSelectorComponent\r\n ],\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n MatAutocompleteModule,\r\n ReactiveFormsModule,\r\n SearchableSelectorModule,\r\n MatButtonToggleModule\r\n ],\r\n exports: [TechlifyTaggerTagSelectorComponent]\r\n})\r\nexport class TechlifyTaggerTagSelectorModule { }\r\n","import { DataManager } from './../core/dataManager.service';\r\nimport { Injectable } from '@angular/core';\r\n\r\n@Injectable({\r\n providedIn: 'root'\r\n})\r\nexport class TechlifyFeatureService {\r\n\r\n constructor(private dataManager: DataManager) { }\r\n\r\n getFeatures() {\r\n return this.dataManager.GET(`api/features`);\r\n }\r\n\r\n disableFeature(id: any) {\r\n return this.dataManager.GET(`api/feature/${id}/disable`);\r\n }\r\n\r\n enableFeature(id: any) {\r\n return this.dataManager.GET(`api/feature/${id}/enable`);\r\n }\r\n\r\n}\r\n","import { Component, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\nimport { MatDialog } from '@angular/material/dialog';\r\nimport { MatTableDataSource } from '@angular/material/table';\r\nimport { TechlifyFeatureService } from './techlify-feature.service';\r\nimport { UntilDestroy, untilDestroyed } from '@ngneat/until-destroy';\r\nimport { debounceTime } from 'rxjs/operators';\r\nimport { ActionPopup, ActionPopupComponent } from '../action-popup';\r\nimport { DataManager } from '../core/dataManager.service';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport { AlertService } from '../core/alert.service';\r\nimport { StorageService } from '../core/storage.service';\r\n@UntilDestroy()\r\n@Component({\r\n selector: 'app-techlify-listing-feature',\r\n templateUrl: './techlify-feature-listing.component.html',\r\n styleUrls: ['./techlify-feature-listing.component.scss']\r\n})\r\nexport class TechlifyFeatureListingComponent implements OnInit {\r\n\r\n features: any[] = []\r\n displayedColumns: string[] = [\r\n 'index',\r\n 'feature',\r\n 'description',\r\n 'actions',\r\n ]\r\n\r\n dataSource = new MatTableDataSource()\r\n\r\n page: number = 1;\r\n lastPage: number;\r\n perPage: number = 25;\r\n\r\n isWorking: boolean = false\r\n filterFormGroup: FormGroup;\r\n featureToggleForm: FormGroup;\r\n\r\n constructor(\r\n private dataManager: DataManager,\r\n private errorHandler: ErrorHandlerService,\r\n private fb: FormBuilder,\r\n private alertService: AlertService,\r\n private dialog: MatDialog,\r\n private storage: StorageService,\r\n private featureService: TechlifyFeatureService\r\n ) {\r\n this.filterFormGroup = this.fb.group({\r\n num_items: [\"\"]\r\n })\r\n }\r\n\r\n ngOnInit() {\r\n this.loadData()\r\n this.listenForChanges()\r\n }\r\n\r\n listenForChanges() {\r\n this.filterFormGroup.valueChanges\r\n .pipe(debounceTime(500), untilDestroyed(this))\r\n .subscribe((changes) => {\r\n this.reload()\r\n })\r\n }\r\n\r\n async loadData() {\r\n let result;\r\n try {\r\n this.isWorking = true\r\n var filter = this.filterFormGroup.value\r\n filter.page = this.page;\r\n filter.perPage = this.perPage;\r\n result = await this.dataManager.GET(`api/features`, filter);\r\n this.features = this.features.concat(result.data);\r\n this.dataSource = new MatTableDataSource(this.features);\r\n\r\n if (!this.storage.getItem('features')) {\r\n this.setStorage(this.features);\r\n }\r\n\r\n this.isWorking = false\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.isWorking = false;\r\n }\r\n }\r\n\r\n async toggeleFeature(element, feature) {\r\n let status = element ? 'Off' : \"On\";\r\n let data;\r\n const dialogRef = this.dialog.open(ActionPopupComponent, {\r\n width: \"400px\",\r\n data: <ActionPopup>{\r\n title: `Turn this feature ${status}?`,\r\n message: `Would you like to turn ${feature.title} feature ${status}`\r\n }\r\n })\r\n\r\n dialogRef.afterClosed().subscribe(async result => {\r\n if (result) {\r\n try {\r\n data = element\r\n ? await this.featureService.disableFeature(feature.id)\r\n : await this.featureService.enableFeature(feature.id);\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.alertService.addAlert(`You have just turned ${status} the feature ${feature.title}`, 'success');\r\n this.reload();\r\n this.storage.removeItem('features');\r\n this.setStorage(this.features);\r\n this.isWorking = false;\r\n }\r\n } else {\r\n this.reload();\r\n }\r\n })\r\n }\r\n\r\n setStorage(features) {\r\n let localFeatures = [];\r\n for (let feature of features) {\r\n if (!feature.client_feature) {\r\n if (feature.is_enabled_default) {\r\n localFeatures.push(feature.code);\r\n }\r\n } else {\r\n if (feature.client_feature.is_enabled) {\r\n localFeatures.push(feature.code);\r\n }\r\n }\r\n\r\n }\r\n this.storage.setItem(\"features\", localFeatures);\r\n }\r\n\r\n reload() {\r\n this.features = [];\r\n this.page = 1;\r\n if (!this.isWorking) {\r\n this.loadData();\r\n }\r\n }\r\n\r\n onScroll() {\r\n if (!this.isWorking && this.page < this.lastPage) {\r\n this.page += 1;\r\n this.loadData();\r\n }\r\n }\r\n\r\n sortColumn(event) {\r\n var direction = event.direction.toString().toUpperCase()\r\n this.assignFilter(event.active, direction)\r\n this.reload()\r\n }\r\n\r\n assignFilter(column, direction) {\r\n switch (column) {\r\n case 'name': {\r\n return this.filterFormGroup\r\n .get('sort_by')\r\n .setValue('first_name|' + direction)\r\n }\r\n case 'added_on': {\r\n return this.filterFormGroup\r\n .get('sort_by')\r\n .setValue('created_at|' + direction)\r\n }\r\n }\r\n }\r\n\r\n}\r\n","import { AuthenticationGuard } from './../core/authentication.guard';\r\nimport { Routes, RouterModule } from '@angular/router';\r\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\r\n\r\nconst routes: Routes = [\r\n {\r\n path: '',\r\n component: TechlifyFeatureListingComponent,\r\n canActivate: [AuthenticationGuard]\r\n },\r\n];\r\n\r\nexport const TechlifyFeatureRoutes = RouterModule.forChild(routes);\r\n","import { Component, Input, OnInit } from '@angular/core';\r\nimport { FormBuilder, FormGroup } from '@angular/forms';\r\n\r\n@Component({\r\n selector: 'app-on-off-switch',\r\n templateUrl: './on-off-switch.component.html',\r\n styleUrls: ['./on-off-switch.component.scss']\r\n})\r\n\r\nexport class OnOffSwitchComponent implements OnInit {\r\n\r\n @Input() value: boolean;\r\n slideToggle: FormGroup;\r\n\r\n constructor(private fb: FormBuilder) {\r\n this.slideToggle = this.fb.group({\r\n toggle: [\"\"]\r\n })\r\n }\r\n\r\n ngOnInit() {\r\n this.slideToggle.get('toggle').setValue(this.value);\r\n }\r\n\r\n}\r\n","import { Directive, ElementRef, Input } from '@angular/core';\r\nimport { ErrorHandlerService } from '../core/error-handler.service';\r\nimport { StorageService } from '../core/storage.service';\r\nimport { TechlifyFeatureService } from './techlify-feature.service';\r\n\r\n@Directive({\r\n selector: '[techlifyFeatureEnabled]'\r\n})\r\nexport class TechlifyFeatureEnabledDirective {\r\n\r\n features: any;\r\n localFeatures: any[] = [];\r\n @Input('techlifyFeatureEnabled') enabledFeature: any;\r\n\r\n constructor(\r\n private el: ElementRef,\r\n private featureService: TechlifyFeatureService,\r\n private errorHandler: ErrorHandlerService,\r\n private storage: StorageService) {\r\n\r\n }\r\n\r\n ngOnInit(): void {\r\n if (!this.storage.getItem('features')) {\r\n this.getFeatures();\r\n } else {\r\n this.checkForFeatureEnabled();\r\n }\r\n }\r\n\r\n async getFeatures() {\r\n try {\r\n let features = await this.featureService.getFeatures();\r\n\r\n for (let feature of features.data) {\r\n if (!feature.client_feature) {\r\n if (feature.is_enabled_default) {\r\n this.localFeatures.push(feature.code);\r\n }\r\n } else {\r\n if (feature.client_feature.is_enabled) {\r\n this.localFeatures.push(feature.code);\r\n }\r\n }\r\n\r\n }\r\n this.storage.setItem(\"features\", this.localFeatures);\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n } finally {\r\n this.checkForFeatureEnabled()\r\n }\r\n }\r\n\r\n checkForFeatureEnabled() {\r\n try {\r\n let features = this.storage.getItem('features');\r\n let features_split = features.split(',');\r\n\r\n if (features_split.includes(this.enabledFeature)) {\r\n this.el.nativeElement.style.display = \"show\";\r\n } else {\r\n this.el.nativeElement.remove();\r\n }\r\n\r\n } catch (error) {\r\n this.errorHandler.handleError(error);\r\n }\r\n }\r\n\r\n}\r\n","import { NgModule } from '@angular/core';\r\nimport { CommonModule } from '@angular/common';\r\nimport { TechlifyFeatureListingComponent } from './techlify-feature-listing.component';\r\n\r\nimport { TechlifyFeatureRoutes } from './techlify-feature.routing';\r\nimport { OnOffSwitchComponent } from './on-off-switch/on-off-switch.component';\r\nimport { FlexLayoutModule } from '@angular/flex-layout';\r\nimport { TechlifyFeatureEnabledDirective } from './techlify-feature-enabled.directive';\r\nimport { InfiniteScrollModule } from 'ngx-infinite-scroll';\r\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\r\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\r\nimport { MaterialModule } from '../material.module';\r\n\r\n@NgModule({\r\n imports: [\r\n CommonModule,\r\n MaterialModule,\r\n FlexLayoutModule,\r\n TechlifyFeatureRoutes,\r\n MatSlideToggleModule,\r\n FormsModule,\r\n ReactiveFormsModule,\r\n InfiniteScrollModule\r\n ],\r\n declarations: [TechlifyFeatureListingComponent, OnOffSwitchComponent, TechlifyFeatureEnabledDirective],\r\n exports: [TechlifyFeatureListingComponent, TechlifyFeatureEnabledDirective]\r\n})\r\nexport class TechlifyFeatureModule { }\r\n"]}
|