@alfresco/adf-core 8.4.0-20231887566 → 8.4.0-20234340352
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/fesm2022/adf-core.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, Injectable, TemplateRef, ContentChild, Directive, ContentChildren, RendererFactory2, effect, Optional, Inject, NgModule, HostBinding, Pipe, InjectionToken, provideAppInitializer, EventEmitter, HostListener, ViewChild, Output, ViewChildren, DestroyRef, QueryList, Self, signal, computed, DEFAULT_CURRENCY_CODE, SecurityContext,
|
|
2
|
+
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, Injectable, TemplateRef, ContentChild, Directive, ContentChildren, RendererFactory2, effect, Optional, Inject, NgModule, HostBinding, Pipe, InjectionToken, provideAppInitializer, EventEmitter, HostListener, ViewChild, Output, ViewChildren, ElementRef, DestroyRef, QueryList, Self, signal, computed, DEFAULT_CURRENCY_CODE, SecurityContext, forwardRef, ViewContainerRef, Compiler, ChangeDetectorRef, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
4
|
import { CommonModule, DOCUMENT, NgIf, NgClass, NgForOf, AsyncPipe, NgTemplateOutlet, NgStyle, DecimalPipe, DatePipe, CurrencyPipe, NgFor } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/material/table';
|
|
@@ -5902,6 +5902,7 @@ const DEFAULT_ICON_VALUE = 'settings';
|
|
|
5902
5902
|
class IconComponent {
|
|
5903
5903
|
constructor() {
|
|
5904
5904
|
this.ALIAS_MAP = inject(ICON_ALIAS_MAP_TOKEN, { optional: true });
|
|
5905
|
+
this.elementRef = inject(ElementRef);
|
|
5905
5906
|
this._value = DEFAULT_ICON_VALUE;
|
|
5906
5907
|
this._isSvg = false;
|
|
5907
5908
|
}
|
|
@@ -5920,18 +5921,28 @@ class IconComponent {
|
|
|
5920
5921
|
set isSvg(isSvg) {
|
|
5921
5922
|
this._isSvg = isSvg;
|
|
5922
5923
|
}
|
|
5924
|
+
ngAfterContentInit() {
|
|
5925
|
+
const textNode = this.getTextNode();
|
|
5926
|
+
if (textNode) {
|
|
5927
|
+
this.value = textNode.textContent.trim();
|
|
5928
|
+
textNode.remove();
|
|
5929
|
+
}
|
|
5930
|
+
}
|
|
5923
5931
|
hasMappedAlias(value) {
|
|
5924
5932
|
return !!this.ALIAS_MAP?.[value];
|
|
5925
5933
|
}
|
|
5926
5934
|
isCustom(value) {
|
|
5927
5935
|
return value.includes(':');
|
|
5928
5936
|
}
|
|
5937
|
+
getTextNode() {
|
|
5938
|
+
return Array.from(this.elementRef.nativeElement.childNodes).find((node) => node.nodeType === Node.TEXT_NODE && node.textContent?.trim());
|
|
5939
|
+
}
|
|
5929
5940
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
5930
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: IconComponent, isStandalone: true, selector: "adf-icon", inputs: { color: "color", fontSet: "fontSet", value: "value", isSvg: "isSvg" }, host: { classAttribute: "adf-icon" }, ngImport: i0, template: "@if (isSvg) {\n <mat-icon [color]=\"color\" [svgIcon]=\"value\" aria-hidden=\"true\" />\n} @else {\n <mat-icon [fontSet]=\"fontSet\" [color]=\"color\" aria-hidden=\"true\">{{ value }}</mat-icon>\n}\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5941
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: IconComponent, isStandalone: true, selector: "adf-icon", inputs: { color: "color", fontSet: "fontSet", value: "value", isSvg: "isSvg" }, host: { classAttribute: "adf-icon" }, ngImport: i0, template: "<ng-content />\n\n@if (isSvg) {\n <mat-icon [color]=\"color\" [svgIcon]=\"value\" aria-hidden=\"true\" />\n} @else {\n <mat-icon [fontSet]=\"fontSet\" [color]=\"color\" aria-hidden=\"true\">{{ value }}</mat-icon>\n}\n", dependencies: [{ kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i1$3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
5931
5942
|
}
|
|
5932
5943
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: IconComponent, decorators: [{
|
|
5933
5944
|
type: Component,
|
|
5934
|
-
args: [{ selector: 'adf-icon', imports: [MatIconModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'adf-icon' }, template: "@if (isSvg) {\n <mat-icon [color]=\"color\" [svgIcon]=\"value\" aria-hidden=\"true\" />\n} @else {\n <mat-icon [fontSet]=\"fontSet\" [color]=\"color\" aria-hidden=\"true\">{{ value }}</mat-icon>\n}\n" }]
|
|
5945
|
+
args: [{ selector: 'adf-icon', imports: [MatIconModule], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: { class: 'adf-icon' }, template: "<ng-content />\n\n@if (isSvg) {\n <mat-icon [color]=\"color\" [svgIcon]=\"value\" aria-hidden=\"true\" />\n} @else {\n <mat-icon [fontSet]=\"fontSet\" [color]=\"color\" aria-hidden=\"true\">{{ value }}</mat-icon>\n}\n" }]
|
|
5935
5946
|
}], propDecorators: { color: [{
|
|
5936
5947
|
type: Input
|
|
5937
5948
|
}], fontSet: [{
|
|
@@ -13738,7 +13749,8 @@ class DataTableCellComponent {
|
|
|
13738
13749
|
this.latestValue = null;
|
|
13739
13750
|
// Listen to locale changes and re-compute the title with the latest value
|
|
13740
13751
|
effect(() => {
|
|
13741
|
-
|
|
13752
|
+
// Read the signal value to track changes
|
|
13753
|
+
this.userPreferencesService.localeSignal?.();
|
|
13742
13754
|
// When locale changes, re-compute title using the stored latest value
|
|
13743
13755
|
this.recomputeTitle();
|
|
13744
13756
|
});
|