@dataclouder/ngx-agent-cards 0.1.44 → 0.1.45

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.
@@ -5345,14 +5345,15 @@ class AgentCardUI {
5345
5345
  this.showOptions = input(true, ...(ngDevMode ? [{ debugName: "showOptions" }] : []));
5346
5346
  this.onAction = output();
5347
5347
  this.agentCardsMasterStateService = inject(AGENT_CARDS_STATE_SERVICE);
5348
+ effect(() => {
5349
+ this.getTaken();
5350
+ });
5348
5351
  }
5349
5352
  ngOnInit() {
5350
5353
  const description = this.card()?.characterCard?.data?.description;
5351
5354
  if (description) {
5352
5355
  // this.card()?.characterCard?.data?.description = description?.replace(/{{char}}/g, name);
5353
5356
  }
5354
- this.userService.isAdmin();
5355
- this.getTaken();
5356
5357
  }
5357
5358
  eventCard(eventType) {
5358
5359
  this.onAction.emit({ action: eventType, item: this.card() });
@@ -5371,7 +5372,7 @@ class AgentCardUI {
5371
5372
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.6", ngImport: i0, type: AgentCardUI, decorators: [{
5372
5373
  type: Component,
5373
5374
  args: [{ selector: 'dc-agent-card-ui', imports: [PopoverModule, TruncatePipe, ButtonModule, SpeedDialModule, CardModule, TagModule], changeDetection: ChangeDetectionStrategy.OnPush, template: "<p-card class=\"card-image\">\n @if(showOptions()) {\n <div style=\"position: absolute; top: 5px; right: 5px; z-index: 1000\">\n <p-speeddial\n [model]=\"speedDialModel\"\n [radius]=\"70\"\n type=\"quarter-circle\"\n direction=\"down-left\"\n [tooltipOptions]=\"{ tooltipPosition: 'top' }\"\n [buttonProps]=\"{ severity: 'primary', rounded: true, outlined: true, raised: true }\" />\n </div>\n }\n\n <img [src]=\"card()?.assets?.image?.url || 'assets/defaults/images/default_conversation_card.webp'\" alt=\"\" />\n\n <div (click)=\"eventCard(eventType.Select)\" class=\"content\">\n <p class=\"text-xl font-bold text-shadow-lg/30\">{{ card()?.name || card()?.title }}</p>\n\n <p style=\"margin-top: 40px\">\n <span class=\"title text-shadow-lg/30\" [innerHTML]=\"card().description || card().characterCard?.data?.creator_notes | truncate : 200\"></span>\n </p>\n\n <div style=\"position: absolute; bottom: 10px; left: 10px\">\n @if(isTaken()){\n <p-tag icon=\"pi pi-check-circle\" severity=\"success\" value=\"Tomada\" [rounded]=\"true\" />\n } @if(userService.isAdmin()){\n\n <p-tag icon=\"pi pi-eye\" severity=\"secondary\" [value]=\"card()?.manageable?.status || 'Sin estado'\" [rounded]=\"true\" />\n }\n </div>\n\n <p-button\n (click)=\"eventCard(eventType.Select); $event.stopPropagation()\"\n [style]=\"{ position: 'absolute', bottom: '10px', right: '10px' }\"\n icon=\"pi pi-comment\"\n [rounded]=\"true\"\n severity=\"info\"\n [outlined]=\"true\"\n [raised]=\"true\" />\n </div>\n</p-card>\n", styles: [":host{display:block}:host ::ng-deep .p-card{height:100%}:host ::ng-deep .p-card-body{height:100%;padding:0!important}.card-image{width:280px;height:380px;position:relative;align-items:center;display:block;padding:-10px}.card-image img{position:absolute;z-index:3;width:100%;height:100%;opacity:.75;object-fit:cover;transition:opacity .5s}.content{position:absolute;inset:0;z-index:4;padding:1rem;color:#fff;background:linear-gradient(to bottom,#0003,#0000001a);height:100%;display:flex;flex-direction:column;justify-content:space-between}.content:hover{background:linear-gradient(to bottom,color-mix(in srgb,var(--p-primary-color) 20%,transparent),color-mix(in srgb,black 10%,transparent));cursor:pointer}\n"] }]
5374
- }] });
5375
+ }], ctorParameters: () => [] });
5375
5376
 
5376
5377
  // This component contains a really avanced strategy to dinamically render Conversation Cards Details so every app can implement it with their own Style and Behavior
5377
5378
  // The trick is use NGFOR with ngComponentOutlet and pass input, problem is, is not possible to get Outpus events, Option one is use injector with ngComponentOutlet and pass context function to handle , but somehow it inject html and due to sanity im not able to see popups