@colijnit/sharedcomponents 254.1.7 → 254.1.9
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/colijnit-sharedcomponents.umd.js +35 -28
- package/bundles/colijnit-sharedcomponents.umd.js.map +1 -1
- package/colijnit-sharedcomponents.metadata.json +1 -1
- package/esm2015/lib/components/activity-list/activity-list.component.js +11 -10
- package/esm2015/lib/components/file-upload/file-upload.component.js +9 -8
- package/fesm2015/colijnit-sharedcomponents.js +17 -16
- package/fesm2015/colijnit-sharedcomponents.js.map +1 -1
- package/index.html +2 -2
- package/lib/components/activity-list/style/_layout.scss +23 -12
- package/lib/components/file-upload/file-upload.component.d.ts +3 -1
- package/lib/components/task-creator/style/_layout.scss +52 -1
- package/{main.77b4740be9a9b2b46cce.js → main.ee0496fcb99f1f54bdf4.js} +1 -1
- package/package.json +2 -2
- package/{styles.d0261e97459fa67ab440.css → styles.fb700ddd14d951bab796.css} +1 -1
|
@@ -10548,10 +10548,11 @@
|
|
|
10548
10548
|
|
|
10549
10549
|
// The GUI part of the files-upload component. Not a standalone component.
|
|
10550
10550
|
var FileUploadComponent = /** @class */ (function () {
|
|
10551
|
-
function FileUploadComponent(_promptService, _fileTypeImgPipe, iconService) {
|
|
10551
|
+
function FileUploadComponent(_promptService, _fileTypeImgPipe, iconService, _sharedService) {
|
|
10552
10552
|
this._promptService = _promptService;
|
|
10553
10553
|
this._fileTypeImgPipe = _fileTypeImgPipe;
|
|
10554
10554
|
this.iconService = iconService;
|
|
10555
|
+
this._sharedService = _sharedService;
|
|
10555
10556
|
this.icons = exports["ɵbv"];
|
|
10556
10557
|
// Element clickable
|
|
10557
10558
|
this.link = false;
|
|
@@ -10622,30 +10623,35 @@
|
|
|
10622
10623
|
};
|
|
10623
10624
|
FileUploadComponent.prototype.onImageClick = function () {
|
|
10624
10625
|
return __awaiter(this, void 0, void 0, function () {
|
|
10626
|
+
var _this = this;
|
|
10625
10627
|
return __generator(this, function (_a) {
|
|
10626
|
-
|
|
10627
|
-
|
|
10628
|
-
|
|
10629
|
-
|
|
10630
|
-
|
|
10631
|
-
|
|
10632
|
-
|
|
10633
|
-
|
|
10634
|
-
|
|
10635
|
-
|
|
10636
|
-
|
|
10637
|
-
|
|
10638
|
-
|
|
10639
|
-
|
|
10640
|
-
|
|
10641
|
-
|
|
10642
|
-
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
|
|
10646
|
-
|
|
10628
|
+
switch (_a.label) {
|
|
10629
|
+
case 0:
|
|
10630
|
+
if (this.isAddingTile) {
|
|
10631
|
+
return [2 /*return*/];
|
|
10632
|
+
}
|
|
10633
|
+
if (this.customImageClick) {
|
|
10634
|
+
this.imageClick.next(this._file);
|
|
10635
|
+
return [2 /*return*/];
|
|
10636
|
+
}
|
|
10637
|
+
if (!!this._file.documentBody) return [3 /*break*/, 2];
|
|
10638
|
+
return [4 /*yield*/, this._sharedService.getDocumentContent(this._file.documentId).then(function (documentBody) { return _this._file.documentBody = documentBody; })];
|
|
10639
|
+
case 1:
|
|
10640
|
+
_a.sent();
|
|
10641
|
+
_a.label = 2;
|
|
10642
|
+
case 2:
|
|
10643
|
+
if (this._file.isImageDocument()) { //preview image
|
|
10644
|
+
this._promptService.showImage(this.file.documentBodyAsDataUri, "Preview");
|
|
10645
|
+
}
|
|
10646
|
+
else { //download document
|
|
10647
|
+
try {
|
|
10648
|
+
//FileUtils.DownloadFromDataUri(this._file.bodyAsDataUri, this._file.fileName);
|
|
10649
|
+
}
|
|
10650
|
+
catch (e) {
|
|
10651
|
+
}
|
|
10652
|
+
}
|
|
10653
|
+
return [2 /*return*/];
|
|
10647
10654
|
}
|
|
10648
|
-
return [2 /*return*/];
|
|
10649
10655
|
});
|
|
10650
10656
|
});
|
|
10651
10657
|
};
|
|
@@ -10683,13 +10689,13 @@
|
|
|
10683
10689
|
}
|
|
10684
10690
|
};
|
|
10685
10691
|
FileUploadComponent.prototype._updatePreviewImage = function () {
|
|
10692
|
+
var _this = this;
|
|
10686
10693
|
if (this._file) {
|
|
10687
10694
|
if (this._file.isImageDocument()) {
|
|
10688
10695
|
this.previewImage = this._file.documentBodyAsDataUri;
|
|
10689
10696
|
if (this.previewImage === "") {
|
|
10690
|
-
|
|
10691
|
-
|
|
10692
|
-
//this.previewImage = this._file.documentBody;
|
|
10697
|
+
this._sharedService.getDocumentContent(this._file.documentId).then(function (documentBody) { return _this._file.documentBody = documentBody; });
|
|
10698
|
+
this.previewImage = this._file.documentBody;
|
|
10693
10699
|
}
|
|
10694
10700
|
}
|
|
10695
10701
|
else {
|
|
@@ -10709,7 +10715,8 @@
|
|
|
10709
10715
|
FileUploadComponent.ctorParameters = function () { return [
|
|
10710
10716
|
{ type: corecomponents_v12.PromptService },
|
|
10711
10717
|
{ type: FileTypeImagePipe },
|
|
10712
|
-
{ type: IconCacheService }
|
|
10718
|
+
{ type: IconCacheService },
|
|
10719
|
+
{ type: SharedService }
|
|
10713
10720
|
]; };
|
|
10714
10721
|
FileUploadComponent.propDecorators = {
|
|
10715
10722
|
form: [{ type: i0.ViewChild, args: [corecomponents_v12.FormComponent,] }],
|
|
@@ -11266,7 +11273,7 @@
|
|
|
11266
11273
|
ActivityListComponent.decorators = [
|
|
11267
11274
|
{ type: i0.Component, args: [{
|
|
11268
11275
|
selector: "co-activity-list",
|
|
11269
|
-
template: "\n <div class=\"activity-list-wrapper\">\n <div class=\"activity-wrapper\" [class.customer-reply-wrapper]=\"(getRelationKind(activity.author) === RelationKind.Customer)\" *ngFor=\"let activity of activities\" >\n <div class=\"activity-display\">\n <div class=\"activity-display-title\">\n <span>{{activity.author && (activity.author.initials || activity.author.familyName) ? (activity.author.initials || '') + ' ' + (activity.author.familyName || '') : ''}}</span>\n <span>{{getDateString(activity.lastActionDateTime)}}</span>\n <co-icon [iconData]=\"iconCacheService.getIcon(getActivityIcon(activity))\"></co-icon>\n </div>\n <div class=\"activity-display-content\" [class.customer-reply-content]=\"(getRelationKind(activity.author) === RelationKind.Customer)\">\n <div class=\"activity-display-body\">\n <span *ngIf=\"activity.activityType !== ActivityType.StateChange\">{{activity.subDescription}}</span>\n <span *ngIf=\"activity.activityType === ActivityType.StateChange\">{{activity.activityTitle}}</span>\n </div>\n <div class=\"activity-display-footer\">\n
|
|
11276
|
+
template: "\n <div class=\"activity-list-wrapper\">\n <div class=\"activity-wrapper\" [class.customer-reply-wrapper]=\"(getRelationKind(activity.author) === RelationKind.Customer)\" *ngFor=\"let activity of activities\" >\n <div class=\"activity-display\">\n <div class=\"activity-display-title\">\n <span>{{activity.author && (activity.author.initials || activity.author.familyName) ? (activity.author.initials || '') + ' ' + (activity.author.familyName || '') : ''}}</span>\n <span>{{getDateString(activity.lastActionDateTime)}}</span>\n <co-icon [iconData]=\"iconCacheService.getIcon(getActivityIcon(activity))\"></co-icon>\n </div>\n <div class=\"activity-display-content\" [class.customer-reply-content]=\"(getRelationKind(activity.author) === RelationKind.Customer)\">\n <div class=\"activity-display-body\">\n <span *ngIf=\"activity.activityType !== ActivityType.StateChange\">{{activity.subDescription}}</span>\n <span *ngIf=\"activity.activityType === ActivityType.StateChange\">{{activity.activityTitle}}</span>\n </div>\n <div class=\"activity-display-footer\">\n <div class=\"activity-fired-triggers\" *ngIf=\"activity.activityType === ActivityType.StateChange && activity.stateChange.firedTriggerNames &&\n activity.stateChange.firedTriggerNames.length > 0\" >\n <div class=\"activity-fired-trigger\" *ngFor=\"let triggerName of activity.stateChange?.firedTriggerNames\">\n <span>{{triggerName}}</span>\n </div>\n </div>\n <div class=\"icon-indicators\">\n <co-icon *ngIf=\"showAttachments(activity)\" [iconData]=\"iconCacheService.getIcon(Icon.PaperclipRegular)\" (click)=\"openActivityPopup(activity)\"></co-icon>\n <span *ngIf=\"showAttachments(activity)\">{{activity.documents.length}}</span>\n <co-icon *ngIf=\"showWorkedTime(activity)\"\n [iconData]=\"iconCacheService.getIcon(Icon.ClockRegular)\"></co-icon>\n <span *ngIf=\"showWorkedTime(activity)\" >\n {{TimeUtils.ConvertToDuration(getWorkedTime(activity))}}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n </div>\n <co-dialog *ngIf=\"showActivityPopup\" (closeClick)=\"showActivityPopup = false\">\n <co-files-upload [canAdd]=\"false\" [documents]=\"currentActivityDocuments\">\n </co-files-upload>\n </co-dialog>\n ",
|
|
11270
11277
|
encapsulation: i0.ViewEncapsulation.None
|
|
11271
11278
|
},] }
|
|
11272
11279
|
];
|