ngx-techlify-core 11.4.1 → 11.4.5-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/ngx-techlify-core.umd.js +203 -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/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/searchable-selector/searchable-selector.component.js +6 -4
- 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 +159 -95
- package/fesm2015/ngx-techlify-core.js.map +1 -1
- 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/searchable-selector/searchable-selector.component.d.ts +1 -0
- 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() {
|
|
@@ -1369,9 +1391,13 @@
|
|
|
1369
1391
|
EntityFileService.prototype.deleteEntityFile = function (model) {
|
|
1370
1392
|
return this.http.delete("api/entity-files/" + model.id).toPromise();
|
|
1371
1393
|
};
|
|
1372
|
-
EntityFileService.prototype.uploadEntityFile = function (file) {
|
|
1394
|
+
EntityFileService.prototype.uploadEntityFile = function (file, params) {
|
|
1373
1395
|
var formData = new FormData();
|
|
1374
1396
|
formData.append("fileData", file, file.name);
|
|
1397
|
+
if (params === null || params === void 0 ? void 0 : params.entity_id) {
|
|
1398
|
+
formData.append('entity_id', params.entity_id);
|
|
1399
|
+
formData.append('entity_type', params.entity_type);
|
|
1400
|
+
}
|
|
1375
1401
|
return this.http
|
|
1376
1402
|
.skipHeader()
|
|
1377
1403
|
.post("api/entity-files-upload", formData).toPromise();
|
|
@@ -1437,7 +1463,8 @@
|
|
|
1437
1463
|
entity_type: [''],
|
|
1438
1464
|
entity_id: [],
|
|
1439
1465
|
file: ['', forms.Validators.required],
|
|
1440
|
-
url: ['', forms.Validators.required]
|
|
1466
|
+
url: ['', forms.Validators.required],
|
|
1467
|
+
file_size: ['', forms.Validators.required],
|
|
1441
1468
|
});
|
|
1442
1469
|
};
|
|
1443
1470
|
EntityFileFormComponent.prototype.ngOnInit = function () {
|
|
@@ -1516,12 +1543,8 @@
|
|
|
1516
1543
|
return [4 /*yield*/, this.entityFileService.uploadEntityFile(this.fileList[0])];
|
|
1517
1544
|
case 1:
|
|
1518
1545
|
result = _c.sent();
|
|
1519
|
-
this.entityFileGroup
|
|
1520
|
-
|
|
1521
|
-
.setValue(result.item.file);
|
|
1522
|
-
this.entityFileGroup
|
|
1523
|
-
.get("url")
|
|
1524
|
-
.setValue(result.item.url);
|
|
1546
|
+
this.entityFileGroup.patchValue(result.item);
|
|
1547
|
+
;
|
|
1525
1548
|
this.fileList = [];
|
|
1526
1549
|
_c.label = 2;
|
|
1527
1550
|
case 2: return [2 /*return*/];
|
|
@@ -1560,7 +1583,7 @@
|
|
|
1560
1583
|
EntityFileFormComponent.decorators = [
|
|
1561
1584
|
{ type: i0.Component, args: [{
|
|
1562
1585
|
selector: 'entity-file-form',
|
|
1563
|
-
template: "<form [formGroup]=\"entityFileGroup\" (ngSubmit)=\"submit()\">\n
|
|
1586
|
+
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
1587
|
styles: [""]
|
|
1565
1588
|
},] }
|
|
1566
1589
|
];
|
|
@@ -1580,17 +1603,37 @@
|
|
|
1580
1603
|
this.alertService = alertService;
|
|
1581
1604
|
this.dialog = dialog;
|
|
1582
1605
|
this.viewOnly = false;
|
|
1606
|
+
this.title = "File";
|
|
1583
1607
|
this.filters = {};
|
|
1584
1608
|
this.entityFiles = [];
|
|
1585
|
-
this.displayedColumns = [
|
|
1609
|
+
this.displayedColumns = [
|
|
1610
|
+
'index',
|
|
1611
|
+
'title',
|
|
1612
|
+
'details',
|
|
1613
|
+
'file_size',
|
|
1614
|
+
'uploaded_on',
|
|
1615
|
+
];
|
|
1586
1616
|
this.isWorking = false;
|
|
1587
1617
|
this.search = new forms.FormControl('');
|
|
1588
1618
|
this.page = 1;
|
|
1589
1619
|
this.perPage = 25;
|
|
1590
1620
|
this.lastPage = 0;
|
|
1621
|
+
this.fileList = [];
|
|
1591
1622
|
}
|
|
1592
1623
|
EntityFilesViewAllComponent.prototype.ngOnInit = function () {
|
|
1593
1624
|
var _this = this;
|
|
1625
|
+
//File dropper config
|
|
1626
|
+
this.fileConfig = {
|
|
1627
|
+
fileId: "entityDashboardDropper",
|
|
1628
|
+
containerId: "entityDashboardDropperContainer",
|
|
1629
|
+
styles: {
|
|
1630
|
+
height: "500px"
|
|
1631
|
+
},
|
|
1632
|
+
multiple: false,
|
|
1633
|
+
acceptFile: "*",
|
|
1634
|
+
maxSize: 10,
|
|
1635
|
+
acceptFileText: "All Files"
|
|
1636
|
+
};
|
|
1594
1637
|
this.viewerConfig = {
|
|
1595
1638
|
imageStyle: {
|
|
1596
1639
|
height: '200px',
|
|
@@ -1626,6 +1669,7 @@
|
|
|
1626
1669
|
switch (_a.label) {
|
|
1627
1670
|
case 0:
|
|
1628
1671
|
this.filters.page = this.page;
|
|
1672
|
+
this.filters.perPage = this.perPage;
|
|
1629
1673
|
this.isWorking = true;
|
|
1630
1674
|
return [4 /*yield*/, this.entityFileService.getEntityFiles(this.filters)];
|
|
1631
1675
|
case 1:
|
|
@@ -1721,12 +1765,42 @@
|
|
|
1721
1765
|
EntityFilesViewAllComponent.prototype.resetFieldValue = function () {
|
|
1722
1766
|
this.search.setValue("");
|
|
1723
1767
|
};
|
|
1768
|
+
EntityFilesViewAllComponent.prototype.sizeOf = function (bytes) {
|
|
1769
|
+
if (!bytes) {
|
|
1770
|
+
return "0.00 B";
|
|
1771
|
+
}
|
|
1772
|
+
var e = Math.floor(Math.log(bytes) / Math.log(1024));
|
|
1773
|
+
return (bytes / Math.pow(1024, e)).toFixed(2) + ' ' + ' KMGTP'.charAt(e) + 'B';
|
|
1774
|
+
};
|
|
1775
|
+
EntityFilesViewAllComponent.prototype.fileChanged = function (event) {
|
|
1776
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
1777
|
+
var result;
|
|
1778
|
+
return __generator(this, function (_a) {
|
|
1779
|
+
switch (_a.label) {
|
|
1780
|
+
case 0:
|
|
1781
|
+
this.fileList = event;
|
|
1782
|
+
if (!(this.fileList.length > 0)) return [3 /*break*/, 2];
|
|
1783
|
+
return [4 /*yield*/, this.entityFileService.uploadEntityFile(this.fileList[0], {
|
|
1784
|
+
entity_type: this.entityType,
|
|
1785
|
+
entity_id: this.entityId,
|
|
1786
|
+
})];
|
|
1787
|
+
case 1:
|
|
1788
|
+
result = _a.sent();
|
|
1789
|
+
this.fileList = [];
|
|
1790
|
+
this.alertService.addAlert('Successfull uploaded', 'success');
|
|
1791
|
+
this.reload();
|
|
1792
|
+
_a.label = 2;
|
|
1793
|
+
case 2: return [2 /*return*/];
|
|
1794
|
+
}
|
|
1795
|
+
});
|
|
1796
|
+
});
|
|
1797
|
+
};
|
|
1724
1798
|
return EntityFilesViewAllComponent;
|
|
1725
1799
|
}());
|
|
1726
1800
|
exports.ɵo.decorators = [
|
|
1727
1801
|
{ type: i0.Component, args: [{
|
|
1728
1802
|
selector: 'app-entity-files-view-all',
|
|
1729
|
-
template: "<div
|
|
1803
|
+
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
1804
|
styles: [""]
|
|
1731
1805
|
},] }
|
|
1732
1806
|
];
|
|
@@ -1742,7 +1816,8 @@
|
|
|
1742
1816
|
viewOnly: [{ type: i0.Input }],
|
|
1743
1817
|
removeSearch: [{ type: i0.Input }],
|
|
1744
1818
|
hideTitleAndDetails: [{ type: i0.Input }],
|
|
1745
|
-
displayMode: [{ type: i0.Input }]
|
|
1819
|
+
displayMode: [{ type: i0.Input }],
|
|
1820
|
+
title: [{ type: i0.Input }]
|
|
1746
1821
|
};
|
|
1747
1822
|
exports.ɵo = __decorate([
|
|
1748
1823
|
untilDestroy.UntilDestroy()
|
|
@@ -2281,6 +2356,7 @@
|
|
|
2281
2356
|
this.edit = false;
|
|
2282
2357
|
this.sort = true;
|
|
2283
2358
|
this.items = [];
|
|
2359
|
+
this.apiDataProperty = 'data';
|
|
2284
2360
|
this.cache = false;
|
|
2285
2361
|
this.perPage = 25;
|
|
2286
2362
|
this.inDataSearch = false;
|
|
@@ -2411,12 +2487,12 @@
|
|
|
2411
2487
|
request = this.http.cache().get(this.apiUrl, { params: this.filters });
|
|
2412
2488
|
}
|
|
2413
2489
|
rxjs.of().pipe(operators.startWith(true), operators.switchMap(function (_) { return rxjs.from(request); }), operators.finalize(function () { return _this.isLoading = false; }), untilDestroy.untilDestroyed(this)).subscribe(function (result) {
|
|
2414
|
-
_this.items = _this.items.concat(result.
|
|
2490
|
+
_this.items = _this.items.concat(result[_this.apiDataProperty]);
|
|
2415
2491
|
if (_this.cache) {
|
|
2416
2492
|
_this.cachedItems = _this.items;
|
|
2417
2493
|
}
|
|
2418
|
-
_this.filters.page = result.current_page;
|
|
2419
|
-
_this.filters.lastPage = result.last_page;
|
|
2494
|
+
_this.filters.page = (result === null || result === void 0 ? void 0 : result.current_page) || 1;
|
|
2495
|
+
_this.filters.lastPage = (result === null || result === void 0 ? void 0 : result.last_page) || 1;
|
|
2420
2496
|
});
|
|
2421
2497
|
};
|
|
2422
2498
|
SearchableSelectorComponent.prototype.setDescribedByIds = function (ids) {
|
|
@@ -2580,6 +2656,7 @@
|
|
|
2580
2656
|
searchField: [{ type: i0.Input }],
|
|
2581
2657
|
itemComponent: [{ type: i0.Input }],
|
|
2582
2658
|
items: [{ type: i0.Input }],
|
|
2659
|
+
apiDataProperty: [{ type: i0.Input }],
|
|
2583
2660
|
cache: [{ type: i0.Input }],
|
|
2584
2661
|
perPage: [{ type: i0.Input }],
|
|
2585
2662
|
inDataSearch: [{ type: i0.Input }],
|
|
@@ -2791,6 +2868,28 @@
|
|
|
2791
2868
|
selectedValue: [{ type: i0.Input }]
|
|
2792
2869
|
};
|
|
2793
2870
|
|
|
2871
|
+
var Timeline = /** @class */ (function () {
|
|
2872
|
+
function Timeline() {
|
|
2873
|
+
}
|
|
2874
|
+
return Timeline;
|
|
2875
|
+
}());
|
|
2876
|
+
Timeline.CUSTOM = 1;
|
|
2877
|
+
Timeline.TODAY = 2;
|
|
2878
|
+
Timeline.YESTERDAY = 3;
|
|
2879
|
+
Timeline.THIS_WEEK = 4;
|
|
2880
|
+
Timeline.LAST_WEEK = 5;
|
|
2881
|
+
Timeline.THIS_MONTH = 6;
|
|
2882
|
+
Timeline.LAST_MONTH = 7;
|
|
2883
|
+
Timeline.THIS_QUARTER = 8;
|
|
2884
|
+
Timeline.LAST_QUARTER = 9;
|
|
2885
|
+
Timeline.THIS_YEAR = 10;
|
|
2886
|
+
Timeline.LAST_YEAR = 11;
|
|
2887
|
+
Timeline.ALL = 12;
|
|
2888
|
+
Timeline.TOMMOROW = 13;
|
|
2889
|
+
Timeline.NEXT_WEEK = 14;
|
|
2890
|
+
Timeline.NEXT_MONTH = 15;
|
|
2891
|
+
|
|
2892
|
+
var moment = moment___namespace;
|
|
2794
2893
|
function calculateTimeline(value) {
|
|
2795
2894
|
var date = new Date();
|
|
2796
2895
|
var data = {
|
|
@@ -2799,77 +2898,86 @@
|
|
|
2799
2898
|
'show_custom_field': false
|
|
2800
2899
|
};
|
|
2801
2900
|
switch (value) {
|
|
2802
|
-
case
|
|
2901
|
+
case Timeline.CUSTOM: { //Custom
|
|
2803
2902
|
data.show_custom_field = true;
|
|
2804
2903
|
break;
|
|
2805
2904
|
}
|
|
2806
|
-
case
|
|
2807
|
-
|
|
2808
|
-
data.
|
|
2905
|
+
case Timeline.TODAY: { // Today
|
|
2906
|
+
var now = moment();
|
|
2907
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2908
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2909
|
+
break;
|
|
2910
|
+
}
|
|
2911
|
+
case Timeline.YESTERDAY: { // Yesterday
|
|
2912
|
+
var now = moment().subtract(1, 'day');
|
|
2913
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2914
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2915
|
+
break;
|
|
2916
|
+
}
|
|
2917
|
+
case Timeline.THIS_WEEK: { // This Week
|
|
2918
|
+
var now = moment();
|
|
2919
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2920
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2809
2921
|
break;
|
|
2810
2922
|
}
|
|
2811
|
-
case
|
|
2812
|
-
var
|
|
2813
|
-
|
|
2814
|
-
data.
|
|
2815
|
-
data.date_to = yesterday;
|
|
2923
|
+
case Timeline.LAST_WEEK: { // Last Week
|
|
2924
|
+
var now = moment().subtract(1, 'week');
|
|
2925
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2926
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2816
2927
|
break;
|
|
2817
2928
|
}
|
|
2818
|
-
case
|
|
2819
|
-
var
|
|
2820
|
-
|
|
2821
|
-
data.
|
|
2822
|
-
data.date_to = new Date(date.setDate(last));
|
|
2929
|
+
case Timeline.THIS_MONTH: { //This Month
|
|
2930
|
+
var now = moment();
|
|
2931
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2932
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2823
2933
|
break;
|
|
2824
2934
|
}
|
|
2825
|
-
case
|
|
2826
|
-
var
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
data.date_from = new Date(from);
|
|
2830
|
-
data.date_to = new Date(to);
|
|
2935
|
+
case Timeline.LAST_MONTH: { // Last Month
|
|
2936
|
+
var now = moment().subtract(1, 'month');
|
|
2937
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2938
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2831
2939
|
break;
|
|
2832
2940
|
}
|
|
2833
|
-
case
|
|
2834
|
-
|
|
2835
|
-
data.
|
|
2941
|
+
case Timeline.THIS_QUARTER: { // This Quarter
|
|
2942
|
+
var now = moment();
|
|
2943
|
+
data.date_from = now.startOf('quarter').toISOString();
|
|
2944
|
+
data.date_to = now.endOf('quarter').toISOString();
|
|
2836
2945
|
break;
|
|
2837
2946
|
}
|
|
2838
|
-
case
|
|
2839
|
-
var
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
data.date_from = new Date(date.getFullYear(), date.getMonth() - 1, 1);
|
|
2843
|
-
data.date_to = d;
|
|
2947
|
+
case Timeline.LAST_QUARTER: { // Last Quarter
|
|
2948
|
+
var now = moment().subtract(1, 'quarter');
|
|
2949
|
+
data.date_from = now.startOf('quarter').toISOString();
|
|
2950
|
+
data.date_to = now.endOf('quarter').toISOString();
|
|
2844
2951
|
break;
|
|
2845
2952
|
}
|
|
2846
|
-
case
|
|
2847
|
-
var
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
-
data.date_from = startFullQuarter;
|
|
2851
|
-
data.date_to = endFullQuarter;
|
|
2953
|
+
case Timeline.THIS_YEAR: { // This Year
|
|
2954
|
+
var now = moment();
|
|
2955
|
+
data.date_from = now.startOf('year').toISOString();
|
|
2956
|
+
data.date_to = now.endOf('year').toISOString();
|
|
2852
2957
|
break;
|
|
2853
2958
|
}
|
|
2854
|
-
case
|
|
2855
|
-
var
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
data.date_from = startFullQuarter;
|
|
2859
|
-
data.date_to = endFullQuarter;
|
|
2959
|
+
case Timeline.LAST_YEAR: { // Last Year
|
|
2960
|
+
var now = moment().subtract(1, 'year');
|
|
2961
|
+
data.date_from = now.startOf('year').toISOString();
|
|
2962
|
+
data.date_to = now.endOf('year').toISOString();
|
|
2860
2963
|
break;
|
|
2861
2964
|
}
|
|
2862
|
-
case
|
|
2863
|
-
|
|
2864
|
-
;
|
|
2865
|
-
data.date_to =
|
|
2965
|
+
case Timeline.TOMMOROW: {
|
|
2966
|
+
var now = moment().add(1, 'day');
|
|
2967
|
+
data.date_from = now.startOf('day').toISOString();
|
|
2968
|
+
data.date_to = now.endOf('day').toISOString();
|
|
2866
2969
|
break;
|
|
2867
2970
|
}
|
|
2868
|
-
case
|
|
2869
|
-
|
|
2870
|
-
;
|
|
2871
|
-
data.date_to =
|
|
2971
|
+
case Timeline.NEXT_WEEK: {
|
|
2972
|
+
var now = moment().add(1, 'week');
|
|
2973
|
+
data.date_from = now.startOf('isoWeek').toISOString();
|
|
2974
|
+
data.date_to = now.endOf('isoWeek').toISOString();
|
|
2872
2975
|
break;
|
|
2976
|
+
}
|
|
2977
|
+
case Timeline.NEXT_MONTH: {
|
|
2978
|
+
var now = moment().add(1, 'month');
|
|
2979
|
+
data.date_from = now.startOf('month').toISOString();
|
|
2980
|
+
data.date_to = now.endOf('month').toISOString();
|
|
2873
2981
|
break;
|
|
2874
2982
|
}
|
|
2875
2983
|
default: { // All
|
|
@@ -2881,24 +2989,6 @@
|
|
|
2881
2989
|
return data;
|
|
2882
2990
|
}
|
|
2883
2991
|
|
|
2884
|
-
var Timeline = /** @class */ (function () {
|
|
2885
|
-
function Timeline() {
|
|
2886
|
-
}
|
|
2887
|
-
return Timeline;
|
|
2888
|
-
}());
|
|
2889
|
-
Timeline.CUSTOM = 1;
|
|
2890
|
-
Timeline.TODAY = 2;
|
|
2891
|
-
Timeline.YESTERDAY = 3;
|
|
2892
|
-
Timeline.THIS_WEEK = 4;
|
|
2893
|
-
Timeline.LAST_WEEK = 5;
|
|
2894
|
-
Timeline.THIS_MONTH = 6;
|
|
2895
|
-
Timeline.LAST_MONTH = 7;
|
|
2896
|
-
Timeline.THIS_QUARTER = 8;
|
|
2897
|
-
Timeline.LAST_QUARTER = 9;
|
|
2898
|
-
Timeline.THIS_YEAR = 10;
|
|
2899
|
-
Timeline.LAST_YEAR = 11;
|
|
2900
|
-
Timeline.ALL = 12;
|
|
2901
|
-
|
|
2902
2992
|
var TimelineFilterComponent_1;
|
|
2903
2993
|
exports.ɵbb = TimelineFilterComponent_1 = /** @class */ (function () {
|
|
2904
2994
|
function TimelineFilterComponent(formBuilder, ngControl, datePipe) {
|
|
@@ -2906,18 +2996,21 @@
|
|
|
2906
2996
|
this.datePipe = datePipe;
|
|
2907
2997
|
this.timelineValue = new forms.FormControl('');
|
|
2908
2998
|
this.timelines = [
|
|
2909
|
-
{ value:
|
|
2910
|
-
{ value:
|
|
2911
|
-
{ value:
|
|
2912
|
-
{ value:
|
|
2913
|
-
{ value:
|
|
2914
|
-
{ value:
|
|
2915
|
-
{ value:
|
|
2916
|
-
{ value:
|
|
2917
|
-
{ value:
|
|
2918
|
-
{ value:
|
|
2919
|
-
{ value:
|
|
2920
|
-
{ value:
|
|
2999
|
+
{ value: Timeline.CUSTOM, viewValue: 'Custom' },
|
|
3000
|
+
{ value: Timeline.TODAY, viewValue: 'Today' },
|
|
3001
|
+
{ value: Timeline.YESTERDAY, viewValue: 'Yesterday' },
|
|
3002
|
+
{ value: Timeline.TOMMOROW, viewValue: 'Tomorrow' },
|
|
3003
|
+
{ value: Timeline.THIS_WEEK, viewValue: 'This Week' },
|
|
3004
|
+
{ value: Timeline.LAST_WEEK, viewValue: 'Last Week' },
|
|
3005
|
+
{ value: Timeline.NEXT_WEEK, viewValue: 'Next Week' },
|
|
3006
|
+
{ value: Timeline.THIS_MONTH, viewValue: 'This Month' },
|
|
3007
|
+
{ value: Timeline.LAST_MONTH, viewValue: 'Last Month' },
|
|
3008
|
+
{ value: Timeline.NEXT_MONTH, viewValue: 'Next Month' },
|
|
3009
|
+
{ value: Timeline.THIS_QUARTER, viewValue: 'This Quarter' },
|
|
3010
|
+
{ value: Timeline.LAST_QUARTER, viewValue: 'Last Quarter' },
|
|
3011
|
+
{ value: Timeline.THIS_YEAR, viewValue: 'This Year' },
|
|
3012
|
+
{ value: Timeline.LAST_YEAR, viewValue: 'Last Year' },
|
|
3013
|
+
{ value: Timeline.ALL, viewValue: 'All dates' },
|
|
2921
3014
|
];
|
|
2922
3015
|
this.dateFrom = 'date_from';
|
|
2923
3016
|
this.dateTo = 'date_to';
|
|
@@ -3474,7 +3567,8 @@
|
|
|
3474
3567
|
chips.MatChipsModule,
|
|
3475
3568
|
datepicker.MatDatepickerModule,
|
|
3476
3569
|
list.MatListModule,
|
|
3477
|
-
tooltip.MatTooltipModule
|
|
3570
|
+
tooltip.MatTooltipModule,
|
|
3571
|
+
buttonToggle.MatButtonToggleModule
|
|
3478
3572
|
]
|
|
3479
3573
|
},] }
|
|
3480
3574
|
];
|
|
@@ -5522,7 +5616,7 @@
|
|
|
5522
5616
|
return [3 /*break*/, 3];
|
|
5523
5617
|
case 2:
|
|
5524
5618
|
error_1 = _a.sent();
|
|
5525
|
-
|
|
5619
|
+
console.log("Current user updates failed");
|
|
5526
5620
|
return [3 /*break*/, 3];
|
|
5527
5621
|
case 3: return [2 /*return*/];
|
|
5528
5622
|
}
|
|
@@ -8011,21 +8105,16 @@
|
|
|
8011
8105
|
exports.ɵbt = UpdateViewModule;
|
|
8012
8106
|
exports.ɵbu = UpdateViewComponent;
|
|
8013
8107
|
exports.ɵbv = DataManager;
|
|
8014
|
-
exports.ɵbw =
|
|
8015
|
-
exports.ɵbx =
|
|
8016
|
-
exports.ɵby =
|
|
8017
|
-
exports.ɵbz =
|
|
8108
|
+
exports.ɵbw = ErrorHandlerService;
|
|
8109
|
+
exports.ɵbx = FieldMappingComponent;
|
|
8110
|
+
exports.ɵby = FailedItemsListComponent;
|
|
8111
|
+
exports.ɵbz = ImportHistoryListComponent;
|
|
8018
8112
|
exports.ɵc = ErrorSnackComponent;
|
|
8019
|
-
exports.ɵca =
|
|
8020
|
-
exports.ɵcb =
|
|
8021
|
-
exports.ɵcc =
|
|
8022
|
-
exports.ɵcd =
|
|
8023
|
-
exports.ɵce =
|
|
8024
|
-
exports.ɵcf = StorageService;
|
|
8025
|
-
exports.ɵcg = TechlifyFeatureService;
|
|
8026
|
-
exports.ɵch = DataManager;
|
|
8027
|
-
exports.ɵci = AuthenticationGuard;
|
|
8028
|
-
exports.ɵcj = OnOffSwitchComponent;
|
|
8113
|
+
exports.ɵca = ImportSuccessComponent;
|
|
8114
|
+
exports.ɵcb = DataImportComponent;
|
|
8115
|
+
exports.ɵcc = StorageService;
|
|
8116
|
+
exports.ɵcd = TechlifyFeatureService;
|
|
8117
|
+
exports.ɵce = OnOffSwitchComponent;
|
|
8029
8118
|
exports.ɵd = HTTP_DYNAMIC_INTERCEPTORS;
|
|
8030
8119
|
exports.ɵe = HttpService;
|
|
8031
8120
|
exports.ɵf = RouteReusableStrategy;
|