ngx-techlify-core 11.4.2 → 11.4.5-beta.1
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 +210 -114
- package/bundles/ngx-techlify-core.umd.js.map +1 -1
- package/bundles/ngx-techlify-core.umd.min.js +2 -2
- package/bundles/ngx-techlify-core.umd.min.js.map +1 -1
- package/esm2015/lib/core/error-handler.service.js +13 -4
- package/esm2015/lib/core/techlify-config.model.js +3 -1
- package/esm2015/lib/entity-files/entity-file-form/entity-file-form.component.js +6 -9
- package/esm2015/lib/entity-files/entity-file.service.js +6 -2
- package/esm2015/lib/entity-files/entity-files-view-all.component.js +47 -4
- package/esm2015/lib/import-csv/import-csv.component.js +3 -2
- package/esm2015/lib/import-csv/import-history-list/import-history-list.component.js +3 -2
- package/esm2015/lib/material.module.js +4 -2
- package/esm2015/lib/techlify-feature/techlify-feature.routing.js +2 -2
- package/esm2015/lib/techlify-feature/techlify-feature.service.js +2 -2
- package/esm2015/lib/techlify-update/update-notifier/update-notifier.component.js +2 -2
- package/esm2015/lib/timeline-filter/calculate-timeline.js +62 -50
- package/esm2015/lib/timeline-filter/timeline-filter.component.js +17 -13
- package/esm2015/lib/timeline-filter/timeline.model.js +4 -1
- package/esm2015/ngx-techlify-core.js +10 -11
- package/fesm2015/ngx-techlify-core.js +166 -95
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- package/lib/core/error-handler.service.d.ts +3 -1
- package/lib/core/techlify-config.model.d.ts +1 -0
- package/lib/entity-files/entity-file.service.d.ts +1 -1
- package/lib/entity-files/entity-files-view-all.component.d.ts +6 -0
- package/lib/import-csv/import-csv.component.d.ts +2 -1
- package/lib/import-csv/import-history-list/import-history-list.component.d.ts +2 -1
- package/lib/techlify-feature/techlify-feature.service.d.ts +1 -1
- package/lib/timeline-filter/timeline.model.d.ts +3 -0
- package/ngx-techlify-core.d.ts +9 -10
- package/ngx-techlify-core.metadata.json +1 -1
- package/package.json +3 -2
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/table'), require('@angular/material/sort'), require('@ngneat/until-destroy'), require('@angular/common'), require('@angular/forms'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/material/snack-bar'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/material/form-field'), require('@angular/material/select'), require('@angular/material/icon'), require('@angular/router'), require('@angular/material/tooltip'), require('@angular/material/core'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/input'), require('@angular/material/menu'), require('@angular/material/progress-spinner'), require('@angular/material/card'), require('@angular/material/divider'), require('@angular/material/chips'), require('@angular/material/datepicker'), require('@angular/material/list'), require('@angular/flex-layout'), require('ngx-infinite-scroll'), require('ngx-doc-viewer'), require('ngx-editor'), require('xlsx'), require('@angular/platform-browser'), require('jsondiffpatch'), require('@angular/cdk/keycodes'), require('@angular/material/autocomplete'), require('@angular/material/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('ngx-techlify-core', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/table', '@angular/material/sort', '@ngneat/until-destroy', '@angular/common', '@angular/forms', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/material/snack-bar', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/material/form-field', '@angular/material/select', '@angular/material/icon', '@angular/router', '@angular/material/tooltip', '@angular/material/core', '@angular/material/button', '@angular/material/checkbox', '@angular/material/input', '@angular/material/menu', '@angular/material/progress-spinner', '@angular/material/card', '@angular/material/divider', '@angular/material/chips', '@angular/material/datepicker', '@angular/material/list', '@angular/flex-layout', 'ngx-infinite-scroll', 'ngx-doc-viewer', 'ngx-editor', 'xlsx', '@angular/platform-browser', 'jsondiffpatch', '@angular/cdk/keycodes', '@angular/material/autocomplete', '@angular/material/
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-techlify-core'] = {}, global.ng.core, global.ng.material.dialog, global.ng.material.table, global.ng.material.sort, global['@ngneat/until-destroy'], global.ng.common, global.ng.forms, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.material.snackBar, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.material.formField, global.ng.material.select, global.ng.material.icon, global.ng.router, global.ng.material.tooltip, global.ng.material.core, global.ng.material.button, global.ng.material.checkbox, global.ng.material.input, global.ng.material.menu, global.ng.material.progressSpinner, global.ng.material.card, global.ng.material.divider, global.ng.material.chips, global.ng.material.datepicker, global.ng.material.list, global.ng.flexLayout, global['ngx-infinite-scroll'], global['ngx-doc-viewer'], global['ngx-editor'], global.xlsx, global.ng.platformBrowser, global.jsondiffpatch, global.ng.cdk.keycodes, global.ng.material.autocomplete, global.ng.material.
|
|
5
|
-
}(this, (function (exports, i0, dialog, table, sort, untilDestroy, common, forms, i1$1, rxjs, operators, i1, a11y, coercion, formField, select, icon, i1$2, tooltip, core, button, checkbox, input, menu, progressSpinner, card, divider, chips, datepicker, list, flexLayout, ngxInfiniteScroll, ngxDocViewer, ngxEditor, XLSX, platformBrowser, jsondiffpatch, keycodes, autocomplete,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/table'), require('@angular/material/sort'), require('@ngneat/until-destroy'), require('@angular/common'), require('@angular/forms'), require('@angular/common/http'), require('rxjs'), require('rxjs/operators'), require('@angular/material/snack-bar'), require('@angular/cdk/a11y'), require('@angular/cdk/coercion'), require('@angular/material/form-field'), require('@angular/material/select'), require('moment'), require('@angular/material/icon'), require('@angular/router'), require('@angular/material/tooltip'), require('@angular/material/core'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/input'), require('@angular/material/menu'), require('@angular/material/progress-spinner'), require('@angular/material/card'), require('@angular/material/divider'), require('@angular/material/chips'), require('@angular/material/datepicker'), require('@angular/material/list'), require('@angular/material/button-toggle'), require('@angular/flex-layout'), require('ngx-infinite-scroll'), require('ngx-doc-viewer'), require('ngx-editor'), require('xlsx'), require('@angular/platform-browser'), require('jsondiffpatch'), require('@angular/cdk/keycodes'), require('@angular/material/autocomplete'), require('@angular/material/slide-toggle')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('ngx-techlify-core', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/table', '@angular/material/sort', '@ngneat/until-destroy', '@angular/common', '@angular/forms', '@angular/common/http', 'rxjs', 'rxjs/operators', '@angular/material/snack-bar', '@angular/cdk/a11y', '@angular/cdk/coercion', '@angular/material/form-field', '@angular/material/select', 'moment', '@angular/material/icon', '@angular/router', '@angular/material/tooltip', '@angular/material/core', '@angular/material/button', '@angular/material/checkbox', '@angular/material/input', '@angular/material/menu', '@angular/material/progress-spinner', '@angular/material/card', '@angular/material/divider', '@angular/material/chips', '@angular/material/datepicker', '@angular/material/list', '@angular/material/button-toggle', '@angular/flex-layout', 'ngx-infinite-scroll', 'ngx-doc-viewer', 'ngx-editor', 'xlsx', '@angular/platform-browser', 'jsondiffpatch', '@angular/cdk/keycodes', '@angular/material/autocomplete', '@angular/material/slide-toggle'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global['ngx-techlify-core'] = {}, global.ng.core, global.ng.material.dialog, global.ng.material.table, global.ng.material.sort, global['@ngneat/until-destroy'], global.ng.common, global.ng.forms, global.ng.common.http, global.rxjs, global.rxjs.operators, global.ng.material.snackBar, global.ng.cdk.a11y, global.ng.cdk.coercion, global.ng.material.formField, global.ng.material.select, global.moment, global.ng.material.icon, global.ng.router, global.ng.material.tooltip, global.ng.material.core, global.ng.material.button, global.ng.material.checkbox, global.ng.material.input, global.ng.material.menu, global.ng.material.progressSpinner, global.ng.material.card, global.ng.material.divider, global.ng.material.chips, global.ng.material.datepicker, global.ng.material.list, global.ng.material.buttonToggle, global.ng.flexLayout, global['ngx-infinite-scroll'], global['ngx-doc-viewer'], global['ngx-editor'], global.xlsx, global.ng.platformBrowser, global.jsondiffpatch, global.ng.cdk.keycodes, global.ng.material.autocomplete, global.ng.material.slideToggle));
|
|
5
|
+
}(this, (function (exports, i0, dialog, table, sort, untilDestroy, common, forms, i1$1, rxjs, operators, i1, a11y, coercion, formField, select, moment_, icon, i1$2, tooltip, core, button, checkbox, input, menu, progressSpinner, card, divider, chips, datepicker, list, buttonToggle, flexLayout, ngxInfiniteScroll, ngxDocViewer, ngxEditor, XLSX, platformBrowser, jsondiffpatch, keycodes, autocomplete, slideToggle) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () {
|
|
17
|
+
return e[k];
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
n['default'] = e;
|
|
24
|
+
return Object.freeze(n);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
|
|
6
28
|
|
|
7
29
|
var ActionPopup = /** @class */ (function () {
|
|
8
30
|
function ActionPopup() {
|
|
@@ -725,6 +747,7 @@
|
|
|
725
747
|
this.authClientSecret = '';
|
|
726
748
|
this.authGrantType = '';
|
|
727
749
|
this.apiUrl = '';
|
|
750
|
+
this.isLogoutWhileApiGetsFailed = false;
|
|
728
751
|
this.loadFromMap(data);
|
|
729
752
|
}
|
|
730
753
|
TechlifyConfig.prototype.loadFromMap = function (data) {
|
|
@@ -735,6 +758,7 @@
|
|
|
735
758
|
this.apiUrl = data.apiUrl;
|
|
736
759
|
this.storage = data === null || data === void 0 ? void 0 : data.storage;
|
|
737
760
|
this.rawConfigs = data;
|
|
761
|
+
this.isLogoutWhileApiGetsFailed = data === null || data === void 0 ? void 0 : data.isLogoutWhileApiGetsFailed;
|
|
738
762
|
};
|
|
739
763
|
return TechlifyConfig;
|
|
740
764
|
}());
|
|
@@ -860,8 +884,9 @@
|
|
|
860
884
|
* @since 20171202
|
|
861
885
|
*/
|
|
862
886
|
var ErrorHandlerService = /** @class */ (function () {
|
|
863
|
-
function ErrorHandlerService(alerter) {
|
|
887
|
+
function ErrorHandlerService(alerter, config) {
|
|
864
888
|
this.alerter = alerter;
|
|
889
|
+
this.config = config;
|
|
865
890
|
}
|
|
866
891
|
ErrorHandlerService.prototype.handleError = function (errorResponse, msg) {
|
|
867
892
|
if (msg === void 0) { msg = ''; }
|
|
@@ -889,17 +914,23 @@
|
|
|
889
914
|
}
|
|
890
915
|
var errMessage = errors.length ? errors[0] : msg;
|
|
891
916
|
this.alerter.addAlert("Error: " + errMessage, "warning");
|
|
917
|
+
if (errorResponse.status == 403 && this.config.isLogoutWhileApiGetsFailed) {
|
|
918
|
+
sessionStorage.clear();
|
|
919
|
+
localStorage.clear();
|
|
920
|
+
location.reload();
|
|
921
|
+
}
|
|
892
922
|
};
|
|
893
923
|
return ErrorHandlerService;
|
|
894
924
|
}());
|
|
895
|
-
ErrorHandlerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerService_Factory() { return new ErrorHandlerService(i0.ɵɵinject(AlertService)); }, token: ErrorHandlerService, providedIn: "root" });
|
|
925
|
+
ErrorHandlerService.ɵprov = i0.ɵɵdefineInjectable({ factory: function ErrorHandlerService_Factory() { return new ErrorHandlerService(i0.ɵɵinject(AlertService), i0.ɵɵinject(TechlifyConfig)); }, token: ErrorHandlerService, providedIn: "root" });
|
|
896
926
|
ErrorHandlerService.decorators = [
|
|
897
927
|
{ type: i0.Injectable, args: [{
|
|
898
928
|
providedIn: 'root'
|
|
899
929
|
},] }
|
|
900
930
|
];
|
|
901
931
|
ErrorHandlerService.ctorParameters = function () { return [
|
|
902
|
-
{ type: AlertService }
|
|
932
|
+
{ type: AlertService },
|
|
933
|
+
{ type: TechlifyConfig }
|
|
903
934
|
]; };
|
|
904
935
|
|
|
905
936
|
var log = new Logger('ErrorHandlerInterceptor');
|
|
@@ -1369,9 +1400,13 @@
|
|
|
1369
1400
|
EntityFileService.prototype.deleteEntityFile = function (model) {
|
|
1370
1401
|
return this.http.delete("api/entity-files/" + model.id).toPromise();
|
|
1371
1402
|
};
|
|
1372
|
-
EntityFileService.prototype.uploadEntityFile = function (file) {
|
|
1403
|
+
EntityFileService.prototype.uploadEntityFile = function (file, params) {
|
|
1373
1404
|
var formData = new FormData();
|
|
1374
1405
|
formData.append("fileData", file, file.name);
|
|
1406
|
+
if (params === null || params === void 0 ? void 0 : params.entity_id) {
|
|
1407
|
+
formData.append('entity_id', params.entity_id);
|
|
1408
|
+
formData.append('entity_type', params.entity_type);
|
|
1409
|
+
}
|
|
1375
1410
|
return this.http
|
|
1376
1411
|
.skipHeader()
|
|
1377
1412
|
.post("api/entity-files-upload", formData).toPromise();
|
|
@@ -1437,7 +1472,8 @@
|
|
|
1437
1472
|
entity_type: [''],
|
|
1438
1473
|
entity_id: [],
|
|
1439
1474
|
file: ['', forms.Validators.required],
|
|
1440
|
-
url: ['', forms.Validators.required]
|
|
1475
|
+
url: ['', forms.Validators.required],
|
|
1476
|
+
file_size: ['', forms.Validators.required],
|
|
1441
1477
|
});
|
|
1442
1478
|
};
|
|
1443
1479
|
EntityFileFormComponent.prototype.ngOnInit = function () {
|
|
@@ -1516,12 +1552,8 @@
|
|
|
1516
1552
|
return [4 /*yield*/, this.entityFileService.uploadEntityFile(this.fileList[0])];
|
|
1517
1553
|
case 1:
|
|
1518
1554
|
result = _c.sent();
|
|
1519
|
-
this.entityFileGroup
|
|
1520
|
-
|
|
1521
|
-
.setValue(result.item.file);
|
|
1522
|
-
this.entityFileGroup
|
|
1523
|
-
.get("url")
|
|
1524
|
-
.setValue(result.item.url);
|
|
1555
|
+
this.entityFileGroup.patchValue(result.item);
|
|
1556
|
+
;
|
|
1525
1557
|
this.fileList = [];
|
|
1526
1558
|
_c.label = 2;
|
|
1527
1559
|
case 2: return [2 /*return*/];
|
|
@@ -1560,7 +1592,7 @@
|
|
|
1560
1592
|
EntityFileFormComponent.decorators = [
|
|
1561
1593
|
{ type: i0.Component, args: [{
|
|
1562
1594
|
selector: 'entity-file-form',
|
|
1563
|
-
template: "<form [formGroup]=\"entityFileGroup\" (ngSubmit)=\"submit()\">\n
|
|
1595
|
+
template: "<form [formGroup]=\"entityFileGroup\" (ngSubmit)=\"submit()\">\n <div fxLayout=\"column\" class=\"mat-typography\">\n <div mat-dialog-title class=\"text-center\">\n <div>Entity File</div>\n </div>\n <div mat-dialog-content fxLayout=\"column\" fxLayoutAlign.=\"start\">\n <ng-container *ngIf=\"!hideTitleAndDetails\">\n <mat-form-field>\n <input type=\"text\" matInput formControlName=\"title\" placeholder=\"Title\" autocomplete=\"off\">\n </mat-form-field>\n <mat-form-field>\n <textarea matInput formControlName=\"details\" placeholder=\"Details\" autocomplete=\"off\"></textarea>\n </mat-form-field>\n </ng-container>\n <ng-template #fileUpload>\n <section fxFlex=\"100%\">\n <div>Entity File*</div>\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n <div class=\"text-danger\" *ngIf=\"isFieldValid('url')\">\n {{getErrorMessage(\"url\")}}\n </div>\n </section>\n </ng-template>\n <div fxFlex=\"100%\" class=\"mt-2\" *ngIf=\"entityFileGroup.get('url').value;else fileUpload;\">\n <app-document-viewer [file]=\"entityFileGroup.get('file').value\" [fileUrl]=\"entityFileGroup.get('url').value\"\n [config]=\"this.viewerConfig\" (remove)=\"removeFile()\" [disableEdit]=\"updateMode\">\n </app-document-viewer>\n </div>\n <div class=\"mt-4 mb-2\" fxLayout=\"row\" fxLayoutGap=\"30px\" fxLayoutAlign=\"end\" fxFlex=\"100%\">\n <button mat-raised-button type=\"button\" (click)=\"dialogRef.close()\">\n Cancel\n </button>\n <button mat-raised-button type=\"submit\" color=\"primary\">Save</button>\n </div>\n </div>\n </div>\n</form>\n",
|
|
1564
1596
|
styles: [""]
|
|
1565
1597
|
},] }
|
|
1566
1598
|
];
|
|
@@ -1580,17 +1612,37 @@
|
|
|
1580
1612
|
this.alertService = alertService;
|
|
1581
1613
|
this.dialog = dialog;
|
|
1582
1614
|
this.viewOnly = false;
|
|
1615
|
+
this.title = "File";
|
|
1583
1616
|
this.filters = {};
|
|
1584
1617
|
this.entityFiles = [];
|
|
1585
|
-
this.displayedColumns = [
|
|
1618
|
+
this.displayedColumns = [
|
|
1619
|
+
'index',
|
|
1620
|
+
'title',
|
|
1621
|
+
'details',
|
|
1622
|
+
'file_size',
|
|
1623
|
+
'uploaded_on',
|
|
1624
|
+
];
|
|
1586
1625
|
this.isWorking = false;
|
|
1587
1626
|
this.search = new forms.FormControl('');
|
|
1588
1627
|
this.page = 1;
|
|
1589
1628
|
this.perPage = 25;
|
|
1590
1629
|
this.lastPage = 0;
|
|
1630
|
+
this.fileList = [];
|
|
1591
1631
|
}
|
|
1592
1632
|
EntityFilesViewAllComponent.prototype.ngOnInit = function () {
|
|
1593
1633
|
var _this = this;
|
|
1634
|
+
//File dropper config
|
|
1635
|
+
this.fileConfig = {
|
|
1636
|
+
fileId: "entityDashboardDropper",
|
|
1637
|
+
containerId: "entityDashboardDropperContainer",
|
|
1638
|
+
styles: {
|
|
1639
|
+
height: "500px"
|
|
1640
|
+
},
|
|
1641
|
+
multiple: false,
|
|
1642
|
+
acceptFile: "*",
|
|
1643
|
+
maxSize: 10,
|
|
1644
|
+
acceptFileText: "All Files"
|
|
1645
|
+
};
|
|
1594
1646
|
this.viewerConfig = {
|
|
1595
1647
|
imageStyle: {
|
|
1596
1648
|
height: '200px',
|
|
@@ -1626,6 +1678,7 @@
|
|
|
1626
1678
|
switch (_a.label) {
|
|
1627
1679
|
case 0:
|
|
1628
1680
|
this.filters.page = this.page;
|
|
1681
|
+
this.filters.perPage = this.perPage;
|
|
1629
1682
|
this.isWorking = true;
|
|
1630
1683
|
return [4 /*yield*/, this.entityFileService.getEntityFiles(this.filters)];
|
|
1631
1684
|
case 1:
|
|
@@ -1721,12 +1774,42 @@
|
|
|
1721
1774
|
EntityFilesViewAllComponent.prototype.resetFieldValue = function () {
|
|
1722
1775
|
this.search.setValue("");
|
|
1723
1776
|
};
|
|
1777
|
+
EntityFilesViewAllComponent.prototype.sizeOf = function (bytes) {
|
|
1778
|
+
if (!bytes) {
|
|
1779
|
+
return "0.00 B";
|
|
1780
|
+
}
|
|
1781
|
+
var e = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
1782
|
+
return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
|
|
1783
|
+
};
|
|
1784
|
+
EntityFilesViewAllComponent.prototype.fileChanged = function (event) {
|
|
1785
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1786
|
+
var result;
|
|
1787
|
+
return __generator(this, function (_a) {
|
|
1788
|
+
switch (_a.label) {
|
|
1789
|
+
case 0:
|
|
1790
|
+
this.fileList = event;
|
|
1791
|
+
if (!(this.fileList.length > 0)) return [3 /*break*/, 2];
|
|
1792
|
+
return [4 /*yield*/, this.entityFileService.uploadEntityFile(this.fileList[0], {
|
|
1793
|
+
entity_type: this.entityType,
|
|
1794
|
+
entity_id: this.entityId,
|
|
1795
|
+
})];
|
|
1796
|
+
case 1:
|
|
1797
|
+
result = _a.sent();
|
|
1798
|
+
this.fileList = [];
|
|
1799
|
+
this.alertService.addAlert('Successfull uploaded', 'success');
|
|
1800
|
+
this.reload();
|
|
1801
|
+
_a.label = 2;
|
|
1802
|
+
case 2: return [2 /*return*/];
|
|
1803
|
+
}
|
|
1804
|
+
});
|
|
1805
|
+
});
|
|
1806
|
+
};
|
|
1724
1807
|
return EntityFilesViewAllComponent;
|
|
1725
1808
|
}());
|
|
1726
1809
|
exports.ɵo.decorators = [
|
|
1727
1810
|
{ type: i0.Component, args: [{
|
|
1728
1811
|
selector: 'app-entity-files-view-all',
|
|
1729
|
-
template: "<div
|
|
1812
|
+
template: "<div class=\"mat-typography\" *ngIf=\"!displayMode\">\n <div fxLayout=\"row\" fxLayoutGap=\"1rem\">\n <mat-card fxFlex=\"70%\">\n <mat-card-title fxLayout fxLayoutGap=\"1rem\">\n <h3 class=\"font-weight-bold primary-color\" fxLayout=\"center center\">\n <mat-icon>\n <span class=\"material-icons\">\n description\n </span>\n </mat-icon>\n {{title}}s\n </h3>\n <div>\n <button type=\"button\" class=\"mx-1\" mat-raised-button color=\"primary\" (click)=\"addEntityFile()\"\n *ngIf=\"!viewOnly\">\n <mat-icon>\n <span class=\"material-icons\">\n add_circle_outline\n </span>\n </mat-icon>\n {{title}}\n </button>\n </div>\n <mat-form-field *ngIf=\"!removeSearch\" appearance=\"outline\" style=\"font-size: 10px;\">\n <mat-label>Search</mat-label>\n <input type=\"text\" matInput [formControl]=\"search\" placeholder=\"Search\" name=\"title\" autocomplete=\"off\" />\n <button mat-button *ngIf=\"filters.title\" matSuffix mat-icon-button (click)=\"resetFieldValue()\">\n <mat-icon>close</mat-icon>\n </button>\n </mat-form-field>\n </mat-card-title>\n <mat-card-content class=\"entity-file-card\">\n <table mat-table [dataSource]=\"entityFiles\" class=\"w-100\" matSort multiTemplateDataRows infiniteScroll\n [infiniteScrollDistance]=\"1.5\" [infiniteScrollThrottle]=\"50\" (scrolled)=\"onScroll()\">\n\n <!-- Index Column -->\n <ng-container matColumnDef=\"index\">\n <th mat-header-cell *matHeaderCellDef> # </th>\n <td mat-cell *matCellDef=\"let element; let i = dataIndex\"> {{ i+1 }} </td>\n </ng-container>\n\n <!-- Title Column -->\n <ng-container matColumnDef=\"title\">\n <th mat-header-cell *matHeaderCellDef> Title </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n <span>\n {{element.title}}\n </span>\n <span>\n <a href=\"{{element.url}}\" target=\"_blank\" class=\"text-decoration-none text-muted\">\n <button mat-icon-button type=\"button\">\n <mat-icon>download</mat-icon>\n </button>\n </a>\n </span>\n </div>\n </td>\n </ng-container>\n\n <!-- Details Column -->\n <ng-container matColumnDef=\"details\">\n <th mat-header-cell *matHeaderCellDef> Details </th>\n <td mat-cell *matCellDef=\"let element\"> {{element.details}} </td>\n </ng-container>\n\n <!-- File size Column -->\n <ng-container matColumnDef=\"file_size\">\n <th mat-header-cell *matHeaderCellDef> File Size </th>\n <td mat-cell *matCellDef=\"let element\"> {{ sizeOf(element.file_size)}} </td>\n </ng-container>\n\n <!-- Uploaded On Column -->\n <ng-container matColumnDef=\"uploaded_on\">\n <th mat-header-cell *matHeaderCellDef> Uploaded On </th>\n <td mat-cell *matCellDef=\"let element\">\n <div>\n {{element.created_at | date: 'mediumDate'}}\n </div>\n <div class=\"text-muted\">\n By {{element.creator?.name}}\n </div>\n </td>\n </ng-container>\n\n <!-- Actions Column -->\n <ng-container matColumnDef=\"actions\">\n <th mat-header-cell *matHeaderCellDef> Actions </th>\n <td mat-cell *matCellDef=\"let element\" style=\"min-width:110px\" class=\"text-muted\">\n <button type=\"button\" mat-icon-button (click)=\"editEntityFile(element)\">\n <mat-icon>edit</mat-icon>\n </button>\n <button type=\"button\" mat-icon-button (click)=\"deleteEntityFile(element)\">\n <mat-icon>delete</mat-icon>\n </button>\n </td>\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\"></tr>\n </table>\n </mat-card-content>\n </mat-card>\n <section fxFlex=\"30%\">\n <app-file-dropper [config]=\"fileConfig\" (fileChanged)=\"fileChanged($event)\" [fileArray]=\"fileList\">\n </app-file-dropper>\n </section>\n </div>\n</div>\n\n<div fxLayout=\"row wrap\" fxLayoutGap=\"1rem\" class=\"mat-typography p-4\" *ngIf=\"displayMode\">\n <div *ngFor=\"let efile of entityFiles\">\n <app-document-viewer [file]=\"efile.file\" [fileUrl]=\"efile.url\" [config]=\"this.viewerConfig\" [disableEdit]=\"true\">\n </app-document-viewer>\n <a href=\"{{efile.url}}\" target=\"_blank\">\n <button mat-button type=\"button\">View</button>\n </a>\n </div>\n</div>\n",
|
|
1730
1813
|
styles: [""]
|
|
1731
1814
|
},] }
|
|
1732
1815
|
];
|
|
@@ -1742,7 +1825,8 @@
|
|
|
1742
1825
|
viewOnly: [{ type: i0.Input }],
|
|
1743
1826
|
removeSearch: [{ type: i0.Input }],
|
|
1744
1827
|
hideTitleAndDetails: [{ type: i0.Input }],
|
|
1745
|
-
displayMode: [{ type: i0.Input }]
|
|
1828
|
+
displayMode: [{ type: i0.Input }],
|
|
1829
|
+
title: [{ type: i0.Input }]
|
|
1746
1830
|
};
|
|
1747
1831
|
exports.ɵo = __decorate([
|
|
1748
1832
|
untilDestroy.UntilDestroy()
|
|
@@ -2793,6 +2877,28 @@
|
|
|
2793
2877
|
selectedValue: [{ type: i0.Input }]
|
|
2794
2878
|
};
|
|
2795
2879
|
|
|
2880
|
+
var Timeline = /** @class */ (function () {
|
|
2881
|
+
function Timeline() {
|
|
2882
|
+
}
|
|
2883
|
+
return Timeline;
|
|
2884
|
+
}());
|
|
2885
|
+
Timeline.CUSTOM = 1;
|
|
2886
|
+
Timeline.TODAY = 2;
|
|
2887
|
+
Timeline.YESTERDAY = 3;
|
|
2888
|
+
Timeline.THIS_WEEK = 4;
|
|
2889
|
+
Timeline.LAST_WEEK = 5;
|
|
2890
|
+
Timeline.THIS_MONTH = 6;
|
|
2891
|
+
Timeline.LAST_MONTH = 7;
|
|
2892
|
+
Timeline.THIS_QUARTER = 8;
|
|
2893
|
+
Timeline.LAST_QUARTER = 9;
|
|
2894
|
+
Timeline.THIS_YEAR = 10;
|
|
2895
|
+
Timeline.LAST_YEAR = 11;
|
|
2896
|
+
Timeline.ALL = 12;
|
|
2897
|
+
Timeline.TOMMOROW = 13;
|
|
2898
|
+
Timeline.NEXT_WEEK = 14;
|
|
2899
|
+
Timeline.NEXT_MONTH = 15;
|
|
2900
|
+
|
|
2901
|
+
var moment = moment___namespace;
|
|
2796
2902
|
function calculateTimeline(value) {
|
|
2797
2903
|
var date = new Date();
|
|
2798
2904
|
var data = {
|
|
@@ -2801,77 +2907,86 @@
|
|
|
2801
2907
|
'show_custom_field': false
|
|
2802
2908
|
};
|
|
2803
2909
|
switch (value) {
|
|
2804
|
-
case
|
|
2910
|
+
case Timeline.CUSTOM: { //Custom
|
|
2805
2911
|
data.show_custom_field = true;
|
|
2806
2912
|
break;
|
|
2807
2913
|
}
|
|
2808
|
-
case
|
|
2809
|
-
|
|
2810
|
-
data.
|
|
2914
|
+
case Timeline.TODAY: { // Today
|
|
2915
|
+
var now = moment();
|
|
2916
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2917
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2811
2918
|
break;
|
|
2812
2919
|
}
|
|
2813
|
-
case
|
|
2814
|
-
var
|
|
2815
|
-
|
|
2816
|
-
data.
|
|
2817
|
-
data.date_to = yesterday;
|
|
2920
|
+
case Timeline.YESTERDAY: { // Yesterday
|
|
2921
|
+
var now = moment().subtract(1, 'day');
|
|
2922
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2923
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2818
2924
|
break;
|
|
2819
2925
|
}
|
|
2820
|
-
case
|
|
2821
|
-
var
|
|
2822
|
-
|
|
2823
|
-
data.
|
|
2824
|
-
data.date_to = new Date(date.setDate(last));
|
|
2926
|
+
case Timeline.THIS_WEEK: { // This Week
|
|
2927
|
+
var now = moment();
|
|
2928
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2929
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2825
2930
|
break;
|
|
2826
2931
|
}
|
|
2827
|
-
case
|
|
2828
|
-
var
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
data.date_from = new Date(from);
|
|
2832
|
-
data.date_to = new Date(to);
|
|
2932
|
+
case Timeline.LAST_WEEK: { // Last Week
|
|
2933
|
+
var now = moment().subtract(1, 'week');
|
|
2934
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2935
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2833
2936
|
break;
|
|
2834
2937
|
}
|
|
2835
|
-
case
|
|
2836
|
-
|
|
2837
|
-
data.
|
|
2938
|
+
case Timeline.THIS_MONTH: { //This Month
|
|
2939
|
+
var now = moment();
|
|
2940
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2941
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2838
2942
|
break;
|
|
2839
2943
|
}
|
|
2840
|
-
case
|
|
2841
|
-
var
|
|
2842
|
-
|
|
2843
|
-
|
|
2844
|
-
data.date_from = new Date(date.getFullYear(), date.getMonth() - 1, 1);
|
|
2845
|
-
data.date_to = d;
|
|
2944
|
+
case Timeline.LAST_MONTH: { // Last Month
|
|
2945
|
+
var now = moment().subtract(1, 'month');
|
|
2946
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2947
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2846
2948
|
break;
|
|
2847
2949
|
}
|
|
2848
|
-
case
|
|
2849
|
-
var
|
|
2850
|
-
|
|
2851
|
-
|
|
2852
|
-
data.date_from = startFullQuarter;
|
|
2853
|
-
data.date_to = endFullQuarter;
|
|
2950
|
+
case Timeline.THIS_QUARTER: { // This Quarter
|
|
2951
|
+
var now = moment();
|
|
2952
|
+
data.date_from = now.startOf('quarter').toISOString();
|
|
2953
|
+
data.date_to = now.endOf('quarter').toISOString();
|
|
2854
2954
|
break;
|
|
2855
2955
|
}
|
|
2856
|
-
case
|
|
2857
|
-
var
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
data.date_from = startFullQuarter;
|
|
2861
|
-
data.date_to = endFullQuarter;
|
|
2956
|
+
case Timeline.LAST_QUARTER: { // Last Quarter
|
|
2957
|
+
var now = moment().subtract(1, 'quarter');
|
|
2958
|
+
data.date_from = now.startOf('quarter').toISOString();
|
|
2959
|
+
data.date_to = now.endOf('quarter').toISOString();
|
|
2862
2960
|
break;
|
|
2863
2961
|
}
|
|
2864
|
-
case
|
|
2865
|
-
|
|
2866
|
-
;
|
|
2867
|
-
data.date_to =
|
|
2962
|
+
case Timeline.THIS_YEAR: { // This Year
|
|
2963
|
+
var now = moment();
|
|
2964
|
+
data.date_from = now.startOf('year').toISOString();
|
|
2965
|
+
data.date_to = now.endOf('year').toISOString();
|
|
2868
2966
|
break;
|
|
2869
2967
|
}
|
|
2870
|
-
case
|
|
2871
|
-
|
|
2872
|
-
;
|
|
2873
|
-
data.date_to =
|
|
2968
|
+
case Timeline.LAST_YEAR: { // Last Year
|
|
2969
|
+
var now = moment().subtract(1, 'year');
|
|
2970
|
+
data.date_from = now.startOf('year').toISOString();
|
|
2971
|
+
data.date_to = now.endOf('year').toISOString();
|
|
2874
2972
|
break;
|
|
2973
|
+
}
|
|
2974
|
+
case Timeline.TOMMOROW: {
|
|
2975
|
+
var now = moment().add(1, 'day');
|
|
2976
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2977
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2978
|
+
break;
|
|
2979
|
+
}
|
|
2980
|
+
case Timeline.NEXT_WEEK: {
|
|
2981
|
+
var now = moment().add(1, 'week');
|
|
2982
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2983
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2984
|
+
break;
|
|
2985
|
+
}
|
|
2986
|
+
case Timeline.NEXT_MONTH: {
|
|
2987
|
+
var now = moment().add(1, 'month');
|
|
2988
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2989
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2875
2990
|
break;
|
|
2876
2991
|
}
|
|
2877
2992
|
default: { // All
|
|
@@ -2883,24 +2998,6 @@
|
|
|
2883
2998
|
return data;
|
|
2884
2999
|
}
|
|
2885
3000
|
|
|
2886
|
-
var Timeline = /** @class */ (function () {
|
|
2887
|
-
function Timeline() {
|
|
2888
|
-
}
|
|
2889
|
-
return Timeline;
|
|
2890
|
-
}());
|
|
2891
|
-
Timeline.CUSTOM = 1;
|
|
2892
|
-
Timeline.TODAY = 2;
|
|
2893
|
-
Timeline.YESTERDAY = 3;
|
|
2894
|
-
Timeline.THIS_WEEK = 4;
|
|
2895
|
-
Timeline.LAST_WEEK = 5;
|
|
2896
|
-
Timeline.THIS_MONTH = 6;
|
|
2897
|
-
Timeline.LAST_MONTH = 7;
|
|
2898
|
-
Timeline.THIS_QUARTER = 8;
|
|
2899
|
-
Timeline.LAST_QUARTER = 9;
|
|
2900
|
-
Timeline.THIS_YEAR = 10;
|
|
2901
|
-
Timeline.LAST_YEAR = 11;
|
|
2902
|
-
Timeline.ALL = 12;
|
|
2903
|
-
|
|
2904
3001
|
var TimelineFilterComponent_1;
|
|
2905
3002
|
exports.ɵbb = TimelineFilterComponent_1 = /** @class */ (function () {
|
|
2906
3003
|
function TimelineFilterComponent(formBuilder, ngControl, datePipe) {
|
|
@@ -2908,18 +3005,21 @@
|
|
|
2908
3005
|
this.datePipe = datePipe;
|
|
2909
3006
|
this.timelineValue = new forms.FormControl('');
|
|
2910
3007
|
this.timelines = [
|
|
2911
|
-
{ value:
|
|
2912
|
-
{ value:
|
|
2913
|
-
{ value:
|
|
2914
|
-
{ value:
|
|
2915
|
-
{ value:
|
|
2916
|
-
{ value:
|
|
2917
|
-
{ value:
|
|
2918
|
-
{ value:
|
|
2919
|
-
{ value:
|
|
2920
|
-
{ value:
|
|
2921
|
-
{ value:
|
|
2922
|
-
{ value:
|
|
3008
|
+
{ value: Timeline.CUSTOM, viewValue: 'Custom' },
|
|
3009
|
+
{ value: Timeline.TODAY, viewValue: 'Today' },
|
|
3010
|
+
{ value: Timeline.YESTERDAY, viewValue: 'Yesterday' },
|
|
3011
|
+
{ value: Timeline.TOMMOROW, viewValue: 'Tomorrow' },
|
|
3012
|
+
{ value: Timeline.THIS_WEEK, viewValue: 'This Week' },
|
|
3013
|
+
{ value: Timeline.LAST_WEEK, viewValue: 'Last Week' },
|
|
3014
|
+
{ value: Timeline.NEXT_WEEK, viewValue: 'Next Week' },
|
|
3015
|
+
{ value: Timeline.THIS_MONTH, viewValue: 'This Month' },
|
|
3016
|
+
{ value: Timeline.LAST_MONTH, viewValue: 'Last Month' },
|
|
3017
|
+
{ value: Timeline.NEXT_MONTH, viewValue: 'Next Month' },
|
|
3018
|
+
{ value: Timeline.THIS_QUARTER, viewValue: 'This Quarter' },
|
|
3019
|
+
{ value: Timeline.LAST_QUARTER, viewValue: 'Last Quarter' },
|
|
3020
|
+
{ value: Timeline.THIS_YEAR, viewValue: 'This Year' },
|
|
3021
|
+
{ value: Timeline.LAST_YEAR, viewValue: 'Last Year' },
|
|
3022
|
+
{ value: Timeline.ALL, viewValue: 'All dates' },
|
|
2923
3023
|
];
|
|
2924
3024
|
this.dateFrom = 'date_from';
|
|
2925
3025
|
this.dateTo = 'date_to';
|
|
@@ -3476,7 +3576,8 @@
|
|
|
3476
3576
|
chips.MatChipsModule,
|
|
3477
3577
|
datepicker.MatDatepickerModule,
|
|
3478
3578
|
list.MatListModule,
|
|
3479
|
-
tooltip.MatTooltipModule
|
|
3579
|
+
tooltip.MatTooltipModule,
|
|
3580
|
+
buttonToggle.MatButtonToggleModule
|
|
3480
3581
|
]
|
|
3481
3582
|
},] }
|
|
3482
3583
|
];
|
|
@@ -5524,7 +5625,7 @@
|
|
|
5524
5625
|
return [3 /*break*/, 3];
|
|
5525
5626
|
case 2:
|
|
5526
5627
|
error_1 = _a.sent();
|
|
5527
|
-
|
|
5628
|
+
console.log("Current user updates failed");
|
|
5528
5629
|
return [3 /*break*/, 3];
|
|
5529
5630
|
case 3: return [2 /*return*/];
|
|
5530
5631
|
}
|
|
@@ -8013,21 +8114,16 @@
|
|
|
8013
8114
|
exports.ɵbt = UpdateViewModule;
|
|
8014
8115
|
exports.ɵbu = UpdateViewComponent;
|
|
8015
8116
|
exports.ɵbv = DataManager;
|
|
8016
|
-
exports.ɵbw =
|
|
8017
|
-
exports.ɵbx =
|
|
8018
|
-
exports.ɵby =
|
|
8019
|
-
exports.ɵbz =
|
|
8117
|
+
exports.ɵbw = ErrorHandlerService;
|
|
8118
|
+
exports.ɵbx = FieldMappingComponent;
|
|
8119
|
+
exports.ɵby = FailedItemsListComponent;
|
|
8120
|
+
exports.ɵbz = ImportHistoryListComponent;
|
|
8020
8121
|
exports.ɵc = ErrorSnackComponent;
|
|
8021
|
-
exports.ɵca =
|
|
8022
|
-
exports.ɵcb =
|
|
8023
|
-
exports.ɵcc =
|
|
8024
|
-
exports.ɵcd =
|
|
8025
|
-
exports.ɵce =
|
|
8026
|
-
exports.ɵcf = StorageService;
|
|
8027
|
-
exports.ɵcg = TechlifyFeatureService;
|
|
8028
|
-
exports.ɵch = DataManager;
|
|
8029
|
-
exports.ɵci = AuthenticationGuard;
|
|
8030
|
-
exports.ɵcj = OnOffSwitchComponent;
|
|
8122
|
+
exports.ɵca = ImportSuccessComponent;
|
|
8123
|
+
exports.ɵcb = DataImportComponent;
|
|
8124
|
+
exports.ɵcc = StorageService;
|
|
8125
|
+
exports.ɵcd = TechlifyFeatureService;
|
|
8126
|
+
exports.ɵce = OnOffSwitchComponent;
|
|
8031
8127
|
exports.ɵd = HTTP_DYNAMIC_INTERCEPTORS;
|
|
8032
8128
|
exports.ɵe = HttpService;
|
|
8033
8129
|
exports.ɵf = RouteReusableStrategy;
|