Skip to content

Commit

Permalink
[ACS-5601] Add adf dynamic component to custom name column
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalKinas committed Oct 2, 2023
1 parent 3ba2f14 commit 8941c11
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 10 deletions.
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@alfresco/adf-content-services": "6.4.0-6341205853",
"@alfresco/adf-core": "6.4.0-6341205853",
"@alfresco/adf-extensions": "6.4.0-6341205853",
"@alfresco/adf-process-services": "6.4.0-6341205853",
"@alfresco/eslint-plugin-eslint-angular": "6.4.0-6341205853",
"@alfresco/js-api": "7.1.0-1349",
"@angular/animations": "14.1.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@
</div>
<div class="aca-name-column-badges">
<ng-container *ngFor="let badge of badges">
<adf-icon class="adf-datatable-cell-badge" [title]="badge.tooltip | translate" [value]="badge.icon" (click)="onBadgeClick(badge)"></adf-icon>
<adf-dynamic-component *ngIf="badge.component; else iconBadge" [id]="badge.component" [data]="{ node: node }"></adf-dynamic-component>
<ng-template #iconBadge>
<adf-icon class="adf-datatable-cell-badge" [title]="badge.tooltip | translate" [value]="badge.icon" (click)="onBadgeClick(badge)"></adf-icon>
</ng-template>
</ng-container>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
.adf-datatable-content-cell.adf-name-column.aca-custom-name-column {
position: unset;
}

.adf-datatable-list .adf-datatable-link:hover .aca-name-column-badges {
color: var(--adf-theme-foreground-text-color);
}

.aca-custom-name-column {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;

.aca-name-column-badges {
display: flex;
}

.aca-name-column-container {
aca-locked-by {
display: flex;
Expand All @@ -27,3 +23,11 @@
}
}
}

.adf-datatable-content-cell.adf-name-column.aca-custom-name-column {
position: unset;
}

.adf-datatable-list .adf-datatable-link:hover .aca-name-column-badges {
color: var(--adf-theme-foreground-text-color);
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,11 @@ import { LockedByComponent, isLocked, AppExtensionService, Badge } from '@alfres
import { CommonModule } from '@angular/common';
import { TranslateModule } from '@ngx-translate/core';
import { IconModule } from '@alfresco/adf-core';
import { ExtensionsModule } from '@alfresco/adf-extensions';

@Component({
standalone: true,
imports: [CommonModule, TranslateModule, LockedByComponent, ContentPipeModule, IconModule],
imports: [CommonModule, TranslateModule, LockedByComponent, ContentPipeModule, IconModule, ExtensionsModule],
selector: 'aca-custom-name-column',
templateUrl: './name-column.component.html',
styleUrls: ['./name-column.component.scss'],
Expand Down
1 change: 1 addition & 0 deletions projects/aca-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@alfresco/adf-content-services": "^6.4.0-6341205853",
"@alfresco/adf-core": "^6.4.0-6341205853",
"@alfresco/adf-extensions": "^6.4.0-6341205853",
"@alfresco/adf-process-services": "^6.4.0-6341205853",
"@alfresco/js-api": "^7.1.0-1349",
"@angular/animations": "^14.1.3",
"@angular/common": "^14.1.3",
Expand Down

0 comments on commit 8941c11

Please sign in to comment.