@esfaenza/core 19.2.96 → 19.2.98

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.
@@ -2,7 +2,7 @@ import { MessageService, UtilityService } from "@esfaenza/extensions";
2
2
  import { HTTPService } from "@esfaenza/httpservice";
3
3
  import { TokenService } from "@esfaenza/core/services";
4
4
  import { EsModalComponent } from "../es-modal/es-modal.component";
5
- import { CreateUpdateFeedDto, Feed } from "@esfaenza/core/domain";
5
+ import { CreateUpdateFeedDto, EntityFeedsWidgetConfiguration, Feed } from "@esfaenza/core/domain";
6
6
  import { DropdownOption } from "@esfaenza/utility-components";
7
7
  import { AppFile } from "@esfaenza/forms-and-validations";
8
8
  import { Subject } from "rxjs";
@@ -28,7 +28,9 @@ export declare class EntityFeedsWidgetComponent {
28
28
  AllowUserTags: boolean;
29
29
  AllowReactions: boolean;
30
30
  AllowAttachments: boolean;
31
+ AllowComments: boolean;
31
32
  DebugMode: boolean;
33
+ ModuleConfig: EntityFeedsWidgetConfiguration;
32
34
  FLAG_RefreshingFeeds: boolean;
33
35
  Feeds: Feed[];
34
36
  LoggedUser: string;
@@ -58,5 +60,5 @@ export declare class EntityFeedsWidgetComponent {
58
60
  CreateUpdateOptions: DropdownOption[];
59
61
  onSelectFeed(item: Feed): boolean;
60
62
  static ɵfac: i0.ɵɵFactoryDeclaration<EntityFeedsWidgetComponent, never>;
61
- static ɵcmp: i0.ɵɵComponentDeclaration<EntityFeedsWidgetComponent, "entity-feeds-widget", never, { "EntityType": { "alias": "EntityType"; "required": false; }; "EntityId": { "alias": "EntityId"; "required": false; }; "RefreshSubject": { "alias": "RefreshSubject"; "required": false; }; "GetFeedsAPI": { "alias": "GetFeedsAPI"; "required": false; }; "CreateFeedAPI": { "alias": "CreateFeedAPI"; "required": false; }; "UpdateFeedAPI": { "alias": "UpdateFeedAPI"; "required": false; }; "DeleteFeedAPI": { "alias": "DeleteFeedAPI"; "required": false; }; "ReactToFeedAPI": { "alias": "ReactToFeedAPI"; "required": false; }; "GetUserTagsAPI": { "alias": "GetUserTagsAPI"; "required": false; }; "GetFeedAttachmentAPI": { "alias": "GetFeedAttachmentAPI"; "required": false; }; "WidgetTitle": { "alias": "WidgetTitle"; "required": false; }; "MaxHeight": { "alias": "MaxHeight"; "required": false; }; "Readonly": { "alias": "Readonly"; "required": false; }; "AllowUserTags": { "alias": "AllowUserTags"; "required": false; }; "AllowReactions": { "alias": "AllowReactions"; "required": false; }; "AllowAttachments": { "alias": "AllowAttachments"; "required": false; }; "DebugMode": { "alias": "DebugMode"; "required": false; }; }, {}, never, never, true, never>;
63
+ static ɵcmp: i0.ɵɵComponentDeclaration<EntityFeedsWidgetComponent, "entity-feeds-widget", never, { "EntityType": { "alias": "EntityType"; "required": false; }; "EntityId": { "alias": "EntityId"; "required": false; }; "RefreshSubject": { "alias": "RefreshSubject"; "required": false; }; "GetFeedsAPI": { "alias": "GetFeedsAPI"; "required": false; }; "CreateFeedAPI": { "alias": "CreateFeedAPI"; "required": false; }; "UpdateFeedAPI": { "alias": "UpdateFeedAPI"; "required": false; }; "DeleteFeedAPI": { "alias": "DeleteFeedAPI"; "required": false; }; "ReactToFeedAPI": { "alias": "ReactToFeedAPI"; "required": false; }; "GetUserTagsAPI": { "alias": "GetUserTagsAPI"; "required": false; }; "GetFeedAttachmentAPI": { "alias": "GetFeedAttachmentAPI"; "required": false; }; "WidgetTitle": { "alias": "WidgetTitle"; "required": false; }; "MaxHeight": { "alias": "MaxHeight"; "required": false; }; "Readonly": { "alias": "Readonly"; "required": false; }; "AllowUserTags": { "alias": "AllowUserTags"; "required": false; }; "AllowReactions": { "alias": "AllowReactions"; "required": false; }; "AllowAttachments": { "alias": "AllowAttachments"; "required": false; }; "AllowComments": { "alias": "AllowComments"; "required": false; }; "DebugMode": { "alias": "DebugMode"; "required": false; }; "ModuleConfig": { "alias": "ModuleConfig"; "required": false; }; }, {}, never, never, true, never>;
62
64
  }
@@ -0,0 +1,13 @@
1
+ export declare class EntityFeedsWidgetConfiguration {
2
+ GetFeedsAPI: string;
3
+ AllowUserTags: boolean;
4
+ GetUserTagsAPI: string;
5
+ AllowReactions: boolean;
6
+ ReactToFeedAPI: string;
7
+ AllowAttachments: boolean;
8
+ GetFeedAttachmentAPI: string;
9
+ AllowComments: boolean;
10
+ CreateFeedAPI: string;
11
+ UpdateFeedAPI: string;
12
+ DeleteFeedAPI: string;
13
+ }
@@ -21,4 +21,5 @@ export * from './models/user/UpdateProfilePictureDto';
21
21
  export * from './models/user/UserAccount';
22
22
  export * from './models/feeds/Feed';
23
23
  export * from './models/feeds/CreateUpdateFeedDto';
24
+ export * from './models/feeds/EntityFeedsWidgetConfiguration';
24
25
  export * from './tokens';
@@ -1372,6 +1372,7 @@ class EntityFeedsWidgetComponent {
1372
1372
  this.AllowUserTags = false;
1373
1373
  this.AllowReactions = false;
1374
1374
  this.AllowAttachments = false;
1375
+ this.AllowComments = false;
1375
1376
  this.DebugMode = false;
1376
1377
  // Props
1377
1378
  this.Feeds = [];
@@ -1388,6 +1389,23 @@ class EntityFeedsWidgetComponent {
1388
1389
  ];
1389
1390
  }
1390
1391
  ngOnInit() {
1392
+ if (this.ModuleConfig) {
1393
+ this.GetFeedsAPI = this.GetFeedsAPI ?? this.ModuleConfig.GetFeedsAPI;
1394
+ // User Tags
1395
+ this.AllowUserTags = this.AllowUserTags ?? this.ModuleConfig.AllowUserTags;
1396
+ this.GetUserTagsAPI = this.GetUserTagsAPI ?? this.ModuleConfig.GetUserTagsAPI;
1397
+ // Reactions
1398
+ this.AllowReactions = this.AllowReactions ?? this.ModuleConfig.AllowReactions;
1399
+ this.ReactToFeedAPI = this.ReactToFeedAPI ?? this.ModuleConfig.ReactToFeedAPI;
1400
+ // Attachments
1401
+ this.AllowAttachments = this.AllowAttachments ?? this.ModuleConfig.AllowAttachments;
1402
+ this.GetFeedAttachmentAPI = this.GetFeedAttachmentAPI ?? this.ModuleConfig.GetFeedAttachmentAPI;
1403
+ // Comments
1404
+ this.AllowComments = this.AllowComments ?? this.ModuleConfig.AllowComments;
1405
+ this.CreateFeedAPI = this.CreateFeedAPI ?? this.ModuleConfig.CreateFeedAPI;
1406
+ this.UpdateFeedAPI = this.UpdateFeedAPI ?? this.ModuleConfig.UpdateFeedAPI;
1407
+ this.DeleteFeedAPI = this.DeleteFeedAPI ?? this.ModuleConfig.DeleteFeedAPI;
1408
+ }
1391
1409
  if (this.DebugMode)
1392
1410
  console.warn("Componente Feeds: Modalita debug attivata.");
1393
1411
  else {
@@ -1550,7 +1568,7 @@ class EntityFeedsWidgetComponent {
1550
1568
  return true;
1551
1569
  }
1552
1570
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EntityFeedsWidgetComponent, deps: [{ token: i3$1.HTTPService }, { token: i2$1.UtilityService }, { token: i2$1.MessageService }, { token: i1.TokenService }], target: i0.ɵɵFactoryTarget.Component }); }
1553
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EntityFeedsWidgetComponent, isStandalone: true, selector: "entity-feeds-widget", inputs: { EntityType: "EntityType", EntityId: "EntityId", RefreshSubject: "RefreshSubject", GetFeedsAPI: "GetFeedsAPI", CreateFeedAPI: "CreateFeedAPI", UpdateFeedAPI: "UpdateFeedAPI", DeleteFeedAPI: "DeleteFeedAPI", ReactToFeedAPI: "ReactToFeedAPI", GetUserTagsAPI: "GetUserTagsAPI", GetFeedAttachmentAPI: "GetFeedAttachmentAPI", WidgetTitle: "WidgetTitle", MaxHeight: "MaxHeight", Readonly: "Readonly", AllowUserTags: "AllowUserTags", AllowReactions: "AllowReactions", AllowAttachments: "AllowAttachments", DebugMode: "DebugMode" }, viewQueries: [{ propertyName: "dlgCreateUpdateFeed", first: true, predicate: ["dlgCreateUpdateFeed"], descendants: true }, { propertyName: "dlgFeedContentDetails", first: true, predicate: ["dlgFeedContent"], descendants: true }], ngImport: i0, template: "<h5 class=\"app-bold\">{{WidgetTitle}}</h5>\r\n<div class=\"es-card\">\r\n <div class=\"d-flex\" style=\"margin-bottom: 1rem;\">\r\n <div *ngIf=\"!Readonly\">\r\n <div class=\"feed-create-button app-no-selection app-pointer\" (click)=\"onCreateFeed()\">\r\n <div style=\"margin: auto;\"><i class=\"fa fa-plus\"></i></div>\r\n </div>\r\n </div>\r\n <div style=\"width: 100%;\">\r\n <form-input [Validation]=\"false\" [FormLayout]=\"false\" [(ngModel)]=\"FeedContentFilter\" (keydown.enter)=\"doRefreshFeeds()\" name=\"feedcontentfilter\">\r\n <ng-template #suffix>\r\n <span class=\"fa fa-search\"></span>\r\n </ng-template>\r\n </form-input>\r\n </div>\r\n </div>\r\n <!--Feeds-->\r\n <div style=\"overflow: auto !important;\" [style.max-height]=\"MaxHeight\">\r\n <ng-container *ngFor=\"let item of Feeds\">\r\n <ng-container *ngTemplateOutlet=\"FeedsDisplay; context: { $implicit: item, 'childTemplate': FeedsDisplay ,'isChild': false };\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<!--Grafica di un singolo Feed-->\r\n<ng-template #FeedsDisplay let-item let-childTemplate=\"childTemplate\" let-isChild=\"isChild\">\r\n <div [class.feed-container]=\"!isChild\" [class.feed-child-container]=\"isChild\">\r\n <!--Colonna Sinistra-->\r\n <div class=\"feed-left-col\">\r\n <div class=\"feed-owner-icon\">\r\n <img *ngIf=\"!item.systemgen\" class=\"feed-owner-icon-image\" alt=\"user-img\" src=\"assets/img/users/user_default.jpg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'INFO'\" class=\"feed-owner-icon-image fill-info\" alt=\"info\" src=\"assets/img/users/user_severity.svg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'WARNING'\" class=\"feed-owner-icon-image fill-warning\" alt=\"warning\" src=\"assets/img/users/user_severity.svg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'ERROR'\" class=\"feed-owner-icon-image fill-danger\" alt=\"error\" src=\"assets/img/users/user_severity.svg\">\r\n </div>\r\n <div *ngIf=\"item.childfeeds?.length > 0\" class=\"feed-sideline\"></div>\r\n </div>\r\n <!--Colonna Centrale-->\r\n <div class=\"feed-mid-col\">\r\n <div class=\"feed-mid-col-content\">\r\n <!--Content-->\r\n <div class=\"width-90\">\r\n <!--Intestazione-->\r\n <div>\r\n <span class=\"app-bold\">{{item.systemgen ? 'SISTEMA' : item.user}} </span>\r\n <span class=\"feed-gray-text\">{{item.dateins | loc_date: 'DD/MM/YYYY'}} alle {{item.dateins | loc_date: 'HH:mm'}}</span>\r\n </div>\r\n <!--Allegato-->\r\n <div *ngIf=\"item.filename\">\r\n <div class=\"app-pointer feed-cta\" (click)=\"onDownloadFeedAttachment(item)\">\r\n <span><i class=\"fa fa-file\"></i> {{item.filename}} ({{item.filesize}}KB)</span>\r\n </div>\r\n </div>\r\n <!--Messaggio-->\r\n <div *ngIf=\"!item.systemgen\" class=\"app-markdown\" markdown emoji>{{item.content}}</div>\r\n <div *ngIf=\"item.systemgen\">\r\n <span>{{item.user}}: {{item.title}} <span (click)=\"onShowFeedContent(item.content)\"><i class=\"far fa-up-right-from-square text-info app-pointer\"></i></span></span>\r\n </div>\r\n <!--Operazioni-->\r\n <div class=\"feed-col-operations\">\r\n <div [class.feed-reaction-sel]=\"item.liked\" class=\"app-pointer feed-reaction\" (click)=\"onReactToFeed(item, item.liked ? '' : '0')\"><span><i class=\"fa fa-thumbs-up\"></i> {{item.likes?.length}}</span></div>\r\n <div [class.feed-reaction-sel]=\"item.disliked\" class=\"app-pointer feed-reaction\" (click)=\"onReactToFeed(item, item.disliked ? '' : '1')\"><span><i class=\"fa fa-thumbs-down\"></i> {{item.dislikes?.length}}</span></div>\r\n <div *ngIf=\"!Readonly && !isChild\" class=\"app-pointer feed-cta\" style=\"padding: 0.2rem;\" (click)=\"onSelectFeed(item) && onCreateFeed(true)\">Rispondi</div>\r\n </div>\r\n </div>\r\n <!--Dropdown-->\r\n <div class=\"feed-operation-col\">\r\n <div *ngIf=\"LoggedUser == item.user && !item.systemgen && !Readonly\" class=\"app-pointer feed-cta\" (click)=\"onSelectFeed(item) && CreateUpdateOptionsDropdown.Show($event)\">\r\n <i class=\"fa fa-ellipsis-h\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n <!--Feeds figli-->\r\n <ng-container *ngFor=\"let childItem of item.childfeeds\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: { $implicit: childItem, 'isChild': true };\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<!--Creazione/Aggiornamento Feed-->\r\n<es-modal #dlgCreateUpdateFeed [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgCreateUpdateFeed.hide();\">\r\n <h5 class=\"modal-title pull-left\">Aggiungi Feed</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"CreateUpdateFeedDTO\" #formCreateUpdateFeed=\"ngForm\" (ngSubmit)=\"formCreateUpdateFeed.valid && doCreateUpdateFeed()\">\r\n <div class=\"modal-body\">\r\n <form-checkbox *ac=\"'!R:actor'\" [Label]=\"'Pubblico'\" [LabelInputRatio]=\"'2 10'\" [(ngModel)]=\"CreateUpdateFeedDTO.ispublic\" name=\"ispublic\"></form-checkbox>\r\n <!-- <markup-editor [(ngModel)]=\"CreateUpdateFeedDTO.content\" name=\"markupEditor\"></markup-editor> --> TODO: Markdown editor (Vedi billing)\r\n <form-file [Label]=\"'File Allegato'\" [LabelInputRatio]=\"'4 8'\" [(ngModel)]=\"AllegatoFile\" [Last]=\"true\" name=\"add_file\"></form-file>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgCreateUpdateFeed.hide();\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Contenuto Feed-->\r\n<es-modal #dlgFeedContent [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgFeedContent.hide();\">\r\n <h5 class=\"modal-title pull-left\">Dettaglio Feed di Sistema</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"FeedContentDetails\" class=\"app-markdown\" markdown emoji>{{FeedContentDetails}}</div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgFeedContent.hide();\">Chiudi</button>\r\n </div>\r\n</es-modal>\r\n\r\n<simple-dropdown #CreateUpdateOptionsDropdown [Options]=\"CreateUpdateOptions\"></simple-dropdown>", styles: [".feed-cta{color:#0275d8!important}.feed-container{position:relative;margin-bottom:15px;font-size:.8rem!important;display:flex}.file-icon{background-color:#eee;border-radius:5px;font-size:.8rem;text-align:center}.feed-owner-icon{width:2rem;height:2rem}.feed-owner-icon-image{width:2rem;border-radius:1rem}.feed-sideline{height:calc(100% - 2rem);background-color:#eee;border-radius:1rem;width:.1rem;margin-top:.2rem!important;margin:auto}.feed-reaction{border-radius:5px;padding:.2rem .5rem;margin-right:.5rem;background-color:#eee!important}.feed-reaction-sel{background-color:#5599e5!important;color:#f8f9fa!important}.feed-create-button{border:1px solid #dfdfdf;border-radius:5px;height:39px;width:39px;margin-right:15px;display:flex}.feed-create-button:hover{background-color:#d4d4d4}.app-markdown p{margin-bottom:0!important;white-space:break-spaces!important}.app-ck-height-400{padding-bottom:15px!important}.app-ck-height-400 .ck-editor__editable{max-height:400px;min-height:200px}.feed-left-col{width:2rem}.feed-mid-col-content{display:flex;width:100%}.feed-mid-col{width:100%;padding-left:10px}.feed-operation-col{text-align:center;font-size:1rem;margin-left:auto;margin-right:1rem}.width-90{width:90%}.feed-gray-text{color:gray;font-size:.7rem}.feed-col-operations{display:flex;margin-top:.2rem}.feed-child-container{display:flex;margin-top:10px}.fill-info{filter:invert(69%) sepia(75%) saturate(6042%) hue-rotate(163deg) brightness(97%) contrast(103%)}.fill-warning{filter:invert(63%) sepia(87%) saturate(1749%) hue-rotate(351deg) brightness(103%) contrast(94%)}.fill-danger{filter:invert(15%) sepia(85%) saturate(2826%) hue-rotate(341deg) brightness(100%) contrast(103%)}::-webkit-scrollbar{width:4px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:2px}::-webkit-scrollbar-track{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ExtensionsModule }, { kind: "pipe", type: i2$1.LocDatePipe, name: "loc_date" }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i5$1.EsFormInputComponent, selector: "form-input", inputs: ["minlength", "maxlength", "pattern", "Password"] }, { kind: "component", type: i5$1.EsFormCheckboxComponent, selector: "form-checkbox", inputs: ["SliderMode"] }, { kind: "component", type: i5$1.EsFormFileComponent, selector: "form-file", inputs: ["Multiple", "AllowDownload", "MaxSize", "FancyMode", "ReadFile"] }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }, { kind: "ngmodule", type: UtilityComponentsModule }, { kind: "component", type: i6.SimpleDropdownComponent, selector: "simple-dropdown", inputs: ["Options"] }] }); }
1571
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: EntityFeedsWidgetComponent, isStandalone: true, selector: "entity-feeds-widget", inputs: { EntityType: "EntityType", EntityId: "EntityId", RefreshSubject: "RefreshSubject", GetFeedsAPI: "GetFeedsAPI", CreateFeedAPI: "CreateFeedAPI", UpdateFeedAPI: "UpdateFeedAPI", DeleteFeedAPI: "DeleteFeedAPI", ReactToFeedAPI: "ReactToFeedAPI", GetUserTagsAPI: "GetUserTagsAPI", GetFeedAttachmentAPI: "GetFeedAttachmentAPI", WidgetTitle: "WidgetTitle", MaxHeight: "MaxHeight", Readonly: "Readonly", AllowUserTags: "AllowUserTags", AllowReactions: "AllowReactions", AllowAttachments: "AllowAttachments", AllowComments: "AllowComments", DebugMode: "DebugMode", ModuleConfig: "ModuleConfig" }, viewQueries: [{ propertyName: "dlgCreateUpdateFeed", first: true, predicate: ["dlgCreateUpdateFeed"], descendants: true }, { propertyName: "dlgFeedContentDetails", first: true, predicate: ["dlgFeedContent"], descendants: true }], ngImport: i0, template: "<h5 class=\"app-bold\">{{WidgetTitle}}</h5>\r\n<div class=\"es-card\">\r\n <div class=\"d-flex\" style=\"margin-bottom: 1rem;\">\r\n <div *ngIf=\"!Readonly\">\r\n <div class=\"feed-create-button app-no-selection app-pointer\" (click)=\"onCreateFeed()\">\r\n <div style=\"margin: auto;\"><i class=\"fa fa-plus\"></i></div>\r\n </div>\r\n </div>\r\n <div style=\"width: 100%;\">\r\n <form-input [Validation]=\"false\" [FormLayout]=\"false\" [(ngModel)]=\"FeedContentFilter\" (keydown.enter)=\"doRefreshFeeds()\" name=\"feedcontentfilter\">\r\n <ng-template #suffix>\r\n <span class=\"fa fa-search\"></span>\r\n </ng-template>\r\n </form-input>\r\n </div>\r\n </div>\r\n <!--Feeds-->\r\n <div style=\"overflow: auto !important;\" [style.max-height]=\"MaxHeight\">\r\n <ng-container *ngFor=\"let item of Feeds\">\r\n <ng-container *ngTemplateOutlet=\"FeedsDisplay; context: { $implicit: item, 'childTemplate': FeedsDisplay ,'isChild': false };\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</div>\r\n\r\n<!--Grafica di un singolo Feed-->\r\n<ng-template #FeedsDisplay let-item let-childTemplate=\"childTemplate\" let-isChild=\"isChild\">\r\n <div [class.feed-container]=\"!isChild\" [class.feed-child-container]=\"isChild\">\r\n <!--Colonna Sinistra-->\r\n <div class=\"feed-left-col\">\r\n <div class=\"feed-owner-icon\">\r\n <img *ngIf=\"!item.systemgen\" class=\"feed-owner-icon-image\" alt=\"user-img\" src=\"assets/img/users/user_default.jpg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'INFO'\" class=\"feed-owner-icon-image fill-info\" alt=\"info\" src=\"assets/img/users/user_severity.svg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'WARNING'\" class=\"feed-owner-icon-image fill-warning\" alt=\"warning\" src=\"assets/img/users/user_severity.svg\">\r\n <img *ngIf=\"item.systemgen && item.severityid == 'ERROR'\" class=\"feed-owner-icon-image fill-danger\" alt=\"error\" src=\"assets/img/users/user_severity.svg\">\r\n </div>\r\n <div *ngIf=\"item.childfeeds?.length > 0\" class=\"feed-sideline\"></div>\r\n </div>\r\n <!--Colonna Centrale-->\r\n <div class=\"feed-mid-col\">\r\n <div class=\"feed-mid-col-content\">\r\n <!--Content-->\r\n <div class=\"width-90\">\r\n <!--Intestazione-->\r\n <div>\r\n <span class=\"app-bold\">{{item.systemgen ? 'SISTEMA' : item.user}} </span>\r\n <span class=\"feed-gray-text\">{{item.dateins | loc_date: 'DD/MM/YYYY'}} alle {{item.dateins | loc_date: 'HH:mm'}}</span>\r\n </div>\r\n <!--Allegato-->\r\n <div *ngIf=\"item.filename\">\r\n <div class=\"app-pointer feed-cta\" (click)=\"onDownloadFeedAttachment(item)\">\r\n <span><i class=\"fa fa-file\"></i> {{item.filename}} ({{item.filesize}}KB)</span>\r\n </div>\r\n </div>\r\n <!--Messaggio-->\r\n <div *ngIf=\"!item.systemgen\" class=\"app-markdown\" markdown emoji>{{item.content}}</div>\r\n <div *ngIf=\"item.systemgen\">\r\n <span>{{item.user}}: {{item.title}} <span (click)=\"onShowFeedContent(item.content)\"><i class=\"far fa-up-right-from-square text-info app-pointer\"></i></span></span>\r\n </div>\r\n <!--Operazioni-->\r\n <div class=\"feed-col-operations\">\r\n <div [class.feed-reaction-sel]=\"item.liked\" class=\"app-pointer feed-reaction\" (click)=\"onReactToFeed(item, item.liked ? '' : '0')\"><span><i class=\"fa fa-thumbs-up\"></i> {{item.likes?.length}}</span></div>\r\n <div [class.feed-reaction-sel]=\"item.disliked\" class=\"app-pointer feed-reaction\" (click)=\"onReactToFeed(item, item.disliked ? '' : '1')\"><span><i class=\"fa fa-thumbs-down\"></i> {{item.dislikes?.length}}</span></div>\r\n <div *ngIf=\"!Readonly && !isChild\" class=\"app-pointer feed-cta\" style=\"padding: 0.2rem;\" (click)=\"onSelectFeed(item) && onCreateFeed(true)\">Rispondi</div>\r\n </div>\r\n </div>\r\n <!--Dropdown-->\r\n <div class=\"feed-operation-col\">\r\n <div *ngIf=\"LoggedUser == item.user && !item.systemgen && !Readonly\" class=\"app-pointer feed-cta\" (click)=\"onSelectFeed(item) && CreateUpdateOptionsDropdown.Show($event)\">\r\n <i class=\"fa fa-ellipsis-h\"></i>\r\n </div>\r\n </div>\r\n </div>\r\n <!--Feeds figli-->\r\n <ng-container *ngFor=\"let childItem of item.childfeeds\">\r\n <ng-container *ngTemplateOutlet=\"childTemplate; context: { $implicit: childItem, 'isChild': true };\"></ng-container>\r\n </ng-container>\r\n </div>\r\n </div>\r\n</ng-template>\r\n\r\n<!--Creazione/Aggiornamento Feed-->\r\n<es-modal #dlgCreateUpdateFeed [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgCreateUpdateFeed.hide();\">\r\n <h5 class=\"modal-title pull-left\">Aggiungi Feed</h5>\r\n </es-modal-head>\r\n <form *ngIf=\"CreateUpdateFeedDTO\" #formCreateUpdateFeed=\"ngForm\" (ngSubmit)=\"formCreateUpdateFeed.valid && doCreateUpdateFeed()\">\r\n <div class=\"modal-body\">\r\n <form-checkbox *ac=\"'!R:actor'\" [Label]=\"'Pubblico'\" [LabelInputRatio]=\"'2 10'\" [(ngModel)]=\"CreateUpdateFeedDTO.ispublic\" name=\"ispublic\"></form-checkbox>\r\n <!-- <markup-editor [(ngModel)]=\"CreateUpdateFeedDTO.content\" name=\"markupEditor\"></markup-editor> --> TODO: Markdown editor (Vedi billing)\r\n <form-file [Label]=\"'File Allegato'\" [LabelInputRatio]=\"'4 8'\" [(ngModel)]=\"AllegatoFile\" [Last]=\"true\" name=\"add_file\"></form-file>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgCreateUpdateFeed.hide();\">Annulla</button>\r\n <button type=\"submit\" class=\"btn btn-primary\">Conferma</button>\r\n </div>\r\n </form>\r\n</es-modal>\r\n\r\n<!--Contenuto Feed-->\r\n<es-modal #dlgFeedContent [Size]=\"'L'\">\r\n <es-modal-head (Close)=\"dlgFeedContent.hide();\">\r\n <h5 class=\"modal-title pull-left\">Dettaglio Feed di Sistema</h5>\r\n </es-modal-head>\r\n <div class=\"modal-body\">\r\n <div *ngIf=\"FeedContentDetails\" class=\"app-markdown\" markdown emoji>{{FeedContentDetails}}</div>\r\n </div>\r\n <div class=\"modal-footer\">\r\n <button type=\"button\" class=\"btn btn-secondary app-margin-right-10\" (click)=\"dlgFeedContent.hide();\">Chiudi</button>\r\n </div>\r\n</es-modal>\r\n\r\n<simple-dropdown #CreateUpdateOptionsDropdown [Options]=\"CreateUpdateOptions\"></simple-dropdown>", styles: [".feed-cta{color:#0275d8!important}.feed-container{position:relative;margin-bottom:15px;font-size:.8rem!important;display:flex}.file-icon{background-color:#eee;border-radius:5px;font-size:.8rem;text-align:center}.feed-owner-icon{width:2rem;height:2rem}.feed-owner-icon-image{width:2rem;border-radius:1rem}.feed-sideline{height:calc(100% - 2rem);background-color:#eee;border-radius:1rem;width:.1rem;margin-top:.2rem!important;margin:auto}.feed-reaction{border-radius:5px;padding:.2rem .5rem;margin-right:.5rem;background-color:#eee!important}.feed-reaction-sel{background-color:#5599e5!important;color:#f8f9fa!important}.feed-create-button{border:1px solid #dfdfdf;border-radius:5px;height:39px;width:39px;margin-right:15px;display:flex}.feed-create-button:hover{background-color:#d4d4d4}.app-markdown p{margin-bottom:0!important;white-space:break-spaces!important}.app-ck-height-400{padding-bottom:15px!important}.app-ck-height-400 .ck-editor__editable{max-height:400px;min-height:200px}.feed-left-col{width:2rem}.feed-mid-col-content{display:flex;width:100%}.feed-mid-col{width:100%;padding-left:10px}.feed-operation-col{text-align:center;font-size:1rem;margin-left:auto;margin-right:1rem}.width-90{width:90%}.feed-gray-text{color:gray;font-size:.7rem}.feed-col-operations{display:flex;margin-top:.2rem}.feed-child-container{display:flex;margin-top:10px}.fill-info{filter:invert(69%) sepia(75%) saturate(6042%) hue-rotate(163deg) brightness(97%) contrast(103%)}.fill-warning{filter:invert(63%) sepia(87%) saturate(1749%) hue-rotate(351deg) brightness(103%) contrast(94%)}.fill-danger{filter:invert(15%) sepia(85%) saturate(2826%) hue-rotate(341deg) brightness(100%) contrast(103%)}::-webkit-scrollbar{width:4px;background-color:transparent}::-webkit-scrollbar-thumb{background-color:#ddd;border-radius:2px}::-webkit-scrollbar-track{background-color:transparent}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i4.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: ExtensionsModule }, { kind: "pipe", type: i2$1.LocDatePipe, name: "loc_date" }, { kind: "ngmodule", type: FormsAndValidationsModule }, { kind: "component", type: i5$1.EsFormInputComponent, selector: "form-input", inputs: ["minlength", "maxlength", "pattern", "Password"] }, { kind: "component", type: i5$1.EsFormCheckboxComponent, selector: "form-checkbox", inputs: ["SliderMode"] }, { kind: "component", type: i5$1.EsFormFileComponent, selector: "form-file", inputs: ["Multiple", "AllowDownload", "MaxSize", "FancyMode", "ReadFile"] }, { kind: "component", type: EsModalComponent, selector: "es-modal", inputs: ["Size", "IgnoreBackdrop", "Backdrop", "HasOverlap"], outputs: ["onShow", "onHide"] }, { kind: "component", type: EsModalHeadComponent, selector: "es-modal-head", outputs: ["Close"] }, { kind: "ngmodule", type: UtilityComponentsModule }, { kind: "component", type: i6.SimpleDropdownComponent, selector: "simple-dropdown", inputs: ["Options"] }] }); }
1554
1572
  }
1555
1573
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: EntityFeedsWidgetComponent, decorators: [{
1556
1574
  type: Component,
@@ -1587,8 +1605,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
1587
1605
  type: Input
1588
1606
  }], AllowAttachments: [{
1589
1607
  type: Input
1608
+ }], AllowComments: [{
1609
+ type: Input
1590
1610
  }], DebugMode: [{
1591
1611
  type: Input
1612
+ }], ModuleConfig: [{
1613
+ type: Input
1592
1614
  }], dlgCreateUpdateFeed: [{
1593
1615
  type: ViewChild,
1594
1616
  args: ['dlgCreateUpdateFeed']