@alfresco/adf-core 8.4.0-19463853602 → 8.4.0-19535580979
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/assets/adf-core/i18n/es.json +1 -1
- package/bundles/assets/adf-core/i18n/fr.json +1 -1
- package/bundles/assets/adf-core/i18n/it.json +1 -1
- package/bundles/assets/adf-core/i18n/pt.json +1 -1
- package/fesm2022/adf-core.mjs +102 -55
- package/fesm2022/adf-core.mjs.map +1 -1
- package/lib/datatable/components/datatable-cell/datatable-cell.component.d.ts +11 -2
- package/lib/datatable/components/date-cell/date-cell.component.d.ts +6 -0
- package/lib/datatable/components/filesize-cell/filesize-cell.component.d.ts +2 -0
- package/package.json +3 -3
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"FORM_RENDERER": {
|
|
79
79
|
"NAMELESS_TASK": "Tarea sin nombre",
|
|
80
80
|
"ROW_LABEL": "Fila {{ number }}",
|
|
81
|
-
"DELETE_ROW": "
|
|
81
|
+
"DELETE_ROW": "Eliminar fila",
|
|
82
82
|
"REMOVE_ROW_DIALOG": {
|
|
83
83
|
"TITLE": "Eliminar la fila",
|
|
84
84
|
"MESSAGE": "¿Está seguro de que desea eliminar esta fila?",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"FORM_RENDERER": {
|
|
79
79
|
"NAMELESS_TASK": "Tâche sans nom",
|
|
80
80
|
"ROW_LABEL": "Ligne {{ number }}",
|
|
81
|
-
"DELETE_ROW": "
|
|
81
|
+
"DELETE_ROW": "Supprimer la ligne",
|
|
82
82
|
"REMOVE_ROW_DIALOG": {
|
|
83
83
|
"TITLE": "Supprimer la ligne",
|
|
84
84
|
"MESSAGE": "Voulez-vous vraiment supprimer cette ligne ?",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"FORM_RENDERER": {
|
|
79
79
|
"NAMELESS_TASK": "Compito senza nome",
|
|
80
80
|
"ROW_LABEL": "Riga {{ number }}",
|
|
81
|
-
"DELETE_ROW": "
|
|
81
|
+
"DELETE_ROW": "Elimina riga",
|
|
82
82
|
"REMOVE_ROW_DIALOG": {
|
|
83
83
|
"TITLE": "Elimina la riga",
|
|
84
84
|
"MESSAGE": "Sei sicuro di voler eliminare questa riga?",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"FORM_RENDERER": {
|
|
79
79
|
"NAMELESS_TASK": "Tarefa sem nome",
|
|
80
80
|
"ROW_LABEL": "Linha {{ number }}",
|
|
81
|
-
"DELETE_ROW": "
|
|
81
|
+
"DELETE_ROW": "Excluir linha",
|
|
82
82
|
"REMOVE_ROW_DIALOG": {
|
|
83
83
|
"TITLE": "Excluir linha",
|
|
84
84
|
"MESSAGE": "Tem certeza que deseja excluir esta linha?",
|
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, Optional, Inject, NgModule, HostBinding, Pipe, InjectionToken, provideAppInitializer, EventEmitter, HostListener, ViewChild, Output, ViewChildren, DestroyRef, QueryList, Self, DEFAULT_CURRENCY_CODE, SecurityContext, ElementRef, ViewContainerRef, forwardRef, Compiler,
|
|
2
|
+
import { Input, ChangeDetectionStrategy, ViewEncapsulation, Component, inject, Injectable, TemplateRef, ContentChild, Directive, ContentChildren, RendererFactory2, Optional, Inject, NgModule, HostBinding, Pipe, InjectionToken, provideAppInitializer, EventEmitter, HostListener, ViewChild, Output, ViewChildren, DestroyRef, QueryList, Self, signal, computed, DEFAULT_CURRENCY_CODE, SecurityContext, ElementRef, ChangeDetectorRef, ViewContainerRef, forwardRef, Compiler, 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';
|
|
@@ -20,7 +20,6 @@ import * as i1$2 from '@angular/material/core';
|
|
|
20
20
|
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatLineModule, MatNativeDateModule, MatOptionModule, MatRippleModule } from '@angular/material/core';
|
|
21
21
|
import { Directionality } from '@angular/cdk/bidi';
|
|
22
22
|
import { parseISO, format, parse, isValid, isBefore, isAfter, addHours, addMinutes, differenceInDays, formatDistance, fromUnixTime } from 'date-fns';
|
|
23
|
-
import * as Locales from 'date-fns/locale';
|
|
24
23
|
import { enUS, zhCN, sv, ru, ptBR, pl, nl, nb, ja, it, fr, fi, es, de, da, cs, ar } from 'date-fns/locale';
|
|
25
24
|
import { DateFnsAdapter } from '@angular/material-date-fns-adapter';
|
|
26
25
|
import * as i7$1 from '@mat-datetimepicker/core';
|
|
@@ -12532,19 +12531,21 @@ class TimeAgoPipe {
|
|
|
12532
12531
|
return datePipe.transform(value, this.defaultDateTimeFormat);
|
|
12533
12532
|
}
|
|
12534
12533
|
else {
|
|
12535
|
-
|
|
12534
|
+
const dateFnsLocale = DateFnsUtils.getLocaleFromString(actualLocale);
|
|
12535
|
+
return formatDistance(new Date(value), new Date(), { addSuffix: true, locale: dateFnsLocale });
|
|
12536
12536
|
}
|
|
12537
12537
|
}
|
|
12538
12538
|
return '';
|
|
12539
12539
|
}
|
|
12540
12540
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TimeAgoPipe, deps: [{ token: UserPreferencesService }, { token: AppConfigService }], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
12541
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: TimeAgoPipe, isStandalone: true, name: "adfTimeAgo" }); }
|
|
12541
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.6", ngImport: i0, type: TimeAgoPipe, isStandalone: true, name: "adfTimeAgo", pure: false }); }
|
|
12542
12542
|
}
|
|
12543
12543
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: TimeAgoPipe, decorators: [{
|
|
12544
12544
|
type: Pipe,
|
|
12545
12545
|
args: [{
|
|
12546
12546
|
standalone: true,
|
|
12547
|
-
name: 'adfTimeAgo'
|
|
12547
|
+
name: 'adfTimeAgo',
|
|
12548
|
+
pure: false
|
|
12548
12549
|
}]
|
|
12549
12550
|
}], ctorParameters: () => [{ type: UserPreferencesService }, { type: AppConfigService }] });
|
|
12550
12551
|
|
|
@@ -13704,7 +13705,10 @@ class DataTableCellComponent {
|
|
|
13704
13705
|
this.destroyRef = inject(DestroyRef);
|
|
13705
13706
|
this.dataTableService = inject(DataTableService, { optional: true });
|
|
13706
13707
|
this.value$ = new BehaviorSubject('');
|
|
13707
|
-
|
|
13708
|
+
// Signal to track the raw computed title (without tooltip override)
|
|
13709
|
+
this.rawComputedTitle = signal('');
|
|
13710
|
+
// Computed signal that automatically combines tooltip input with computed title
|
|
13711
|
+
this.title = computed(() => this.tooltip || this.rawComputedTitle());
|
|
13708
13712
|
}
|
|
13709
13713
|
ngOnInit() {
|
|
13710
13714
|
this.updateValue();
|
|
@@ -13714,7 +13718,7 @@ class DataTableCellComponent {
|
|
|
13714
13718
|
if (this.column?.key && this.row && this.data) {
|
|
13715
13719
|
const value = this.data.getValue(this.row, this.column, this.resolverFn);
|
|
13716
13720
|
this.value$.next(value);
|
|
13717
|
-
this.
|
|
13721
|
+
this.rawComputedTitle.set(this.computeTitle(value));
|
|
13718
13722
|
}
|
|
13719
13723
|
}
|
|
13720
13724
|
subscribeToRowUpdates() {
|
|
@@ -13732,10 +13736,15 @@ class DataTableCellComponent {
|
|
|
13732
13736
|
getNestedPropertyValue(obj, path) {
|
|
13733
13737
|
return path.split('.').reduce((source, key) => (source ? source[key] : ''), obj);
|
|
13734
13738
|
}
|
|
13739
|
+
/**
|
|
13740
|
+
* Computes the title/tooltip for the cell based on the value.
|
|
13741
|
+
* Override this in derived classes to provide custom tooltip logic.
|
|
13742
|
+
* Note: The tooltip input always takes precedence (handled by title signal).
|
|
13743
|
+
*
|
|
13744
|
+
* @param value - The cell value to compute the title for
|
|
13745
|
+
* @returns The computed title string, or empty string if no title should be shown
|
|
13746
|
+
*/
|
|
13735
13747
|
computeTitle(value) {
|
|
13736
|
-
if (this.tooltip) {
|
|
13737
|
-
return this.tooltip;
|
|
13738
|
-
}
|
|
13739
13748
|
const rawValue = value;
|
|
13740
13749
|
const max = this.column?.maxTextLength;
|
|
13741
13750
|
if (typeof max === 'number' && max > 0 && rawValue?.length > max) {
|
|
@@ -13744,24 +13753,23 @@ class DataTableCellComponent {
|
|
|
13744
13753
|
return '';
|
|
13745
13754
|
}
|
|
13746
13755
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DataTableCellComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13747
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
13748
|
-
|
|
13756
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: DataTableCellComponent, isStandalone: true, selector: "adf-datatable-cell", inputs: { data: "data", column: "column", row: "row", copyContent: "copyContent", tooltip: "tooltip", resolverFn: "resolverFn" }, host: { classAttribute: "adf-datatable-content-cell" }, ngImport: i0, template: `
|
|
13757
|
+
@let value = value$ | async;
|
|
13758
|
+
@let displayValue = column?.maxTextLength ? (value | truncate: column?.maxTextLength) : value;
|
|
13759
|
+
|
|
13760
|
+
@if (copyContent) {
|
|
13749
13761
|
<span
|
|
13750
|
-
*ngIf="copyContent; else defaultCell"
|
|
13751
13762
|
adf-clipboard="CLIPBOARD.CLICK_TO_COPY"
|
|
13752
13763
|
[clipboard-notification]="'CLIPBOARD.SUCCESS_COPY'"
|
|
13753
|
-
[attr.aria-label]="value
|
|
13754
|
-
[title]="
|
|
13764
|
+
[attr.aria-label]="value"
|
|
13765
|
+
[title]="title()"
|
|
13755
13766
|
class="adf-datatable-cell-value"
|
|
13756
|
-
>{{
|
|
13767
|
+
>{{ displayValue }}</span
|
|
13757
13768
|
>
|
|
13758
|
-
|
|
13759
|
-
|
|
13760
|
-
|
|
13761
|
-
|
|
13762
|
-
}}</span>
|
|
13763
|
-
</ng-template>
|
|
13764
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: ClipboardDirective, selector: "[adf-clipboard]", inputs: ["adf-clipboard", "target", "clipboard-notification"], exportAs: ["adfClipboard"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
13769
|
+
} @else {
|
|
13770
|
+
<span [title]="title()" class="adf-datatable-cell-value">{{ displayValue }}</span>
|
|
13771
|
+
}
|
|
13772
|
+
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "directive", type: ClipboardDirective, selector: "[adf-clipboard]", inputs: ["adf-clipboard", "target", "clipboard-notification"], exportAs: ["adfClipboard"] }, { kind: "pipe", type: TruncatePipe, name: "truncate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
13765
13773
|
}
|
|
13766
13774
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DataTableCellComponent, decorators: [{
|
|
13767
13775
|
type: Component,
|
|
@@ -13770,22 +13778,21 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
13770
13778
|
imports: [CommonModule, ClipboardDirective, TruncatePipe],
|
|
13771
13779
|
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
13772
13780
|
template: `
|
|
13773
|
-
|
|
13781
|
+
@let value = value$ | async;
|
|
13782
|
+
@let displayValue = column?.maxTextLength ? (value | truncate: column?.maxTextLength) : value;
|
|
13783
|
+
|
|
13784
|
+
@if (copyContent) {
|
|
13774
13785
|
<span
|
|
13775
|
-
*ngIf="copyContent; else defaultCell"
|
|
13776
13786
|
adf-clipboard="CLIPBOARD.CLICK_TO_COPY"
|
|
13777
13787
|
[clipboard-notification]="'CLIPBOARD.SUCCESS_COPY'"
|
|
13778
|
-
[attr.aria-label]="value
|
|
13779
|
-
[title]="
|
|
13788
|
+
[attr.aria-label]="value"
|
|
13789
|
+
[title]="title()"
|
|
13780
13790
|
class="adf-datatable-cell-value"
|
|
13781
|
-
>{{
|
|
13791
|
+
>{{ displayValue }}</span
|
|
13782
13792
|
>
|
|
13783
|
-
|
|
13784
|
-
|
|
13785
|
-
|
|
13786
|
-
column?.maxTextLength ? (value$ | async | truncate: column?.maxTextLength) : (value$ | async)
|
|
13787
|
-
}}</span>
|
|
13788
|
-
</ng-template>
|
|
13793
|
+
} @else {
|
|
13794
|
+
<span [title]="title()" class="adf-datatable-cell-value">{{ displayValue }}</span>
|
|
13795
|
+
}
|
|
13789
13796
|
`,
|
|
13790
13797
|
encapsulation: ViewEncapsulation.None,
|
|
13791
13798
|
host: { class: 'adf-datatable-content-cell' }
|
|
@@ -15989,6 +15996,10 @@ class DateCellComponent extends DataTableCellComponent {
|
|
|
15989
15996
|
super(...arguments);
|
|
15990
15997
|
this.config = {};
|
|
15991
15998
|
this.appConfig = inject(AppConfigService);
|
|
15999
|
+
this.localizedDatePipe = inject(LocalizedDatePipe);
|
|
16000
|
+
this.userPreferencesService = inject(UserPreferencesService);
|
|
16001
|
+
this.cdr = inject(ChangeDetectorRef);
|
|
16002
|
+
this.userLocale = 'en';
|
|
15992
16003
|
this.defaultDateConfig = {
|
|
15993
16004
|
format: 'medium',
|
|
15994
16005
|
tooltipFormat: 'medium',
|
|
@@ -15996,8 +16007,24 @@ class DateCellComponent extends DataTableCellComponent {
|
|
|
15996
16007
|
};
|
|
15997
16008
|
}
|
|
15998
16009
|
ngOnInit() {
|
|
15999
|
-
|
|
16010
|
+
// Subscribe to locale changes
|
|
16011
|
+
this.userPreferencesService
|
|
16012
|
+
.select(UserPreferenceValues.Locale)
|
|
16013
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
16014
|
+
.subscribe((locale) => {
|
|
16015
|
+
this.userLocale = locale || 'en';
|
|
16016
|
+
this.setConfig();
|
|
16017
|
+
this.updateValue(); // Recalculate computedTitle with new locale
|
|
16018
|
+
this.cdr.markForCheck();
|
|
16019
|
+
});
|
|
16000
16020
|
this.setConfig();
|
|
16021
|
+
super.ngOnInit();
|
|
16022
|
+
}
|
|
16023
|
+
computeTitle(value) {
|
|
16024
|
+
if (value) {
|
|
16025
|
+
return this.localizedDatePipe.transform(value, this.config.tooltipFormat, this.config.locale) || '';
|
|
16026
|
+
}
|
|
16027
|
+
return '';
|
|
16001
16028
|
}
|
|
16002
16029
|
setConfig() {
|
|
16003
16030
|
if (this.dateConfig) {
|
|
@@ -16010,18 +16037,31 @@ class DateCellComponent extends DataTableCellComponent {
|
|
|
16010
16037
|
setCustomConfig() {
|
|
16011
16038
|
this.config.format = this.dateConfig?.format || this.getDefaultFormat();
|
|
16012
16039
|
this.config.tooltipFormat = this.dateConfig?.tooltipFormat || this.getDefaultTooltipFormat();
|
|
16013
|
-
this.config.locale = this.dateConfig?.locale || this.getDefaultLocale();
|
|
16040
|
+
this.config.locale = this.normalizeLocale(this.dateConfig?.locale || this.getDefaultLocale());
|
|
16014
16041
|
}
|
|
16015
16042
|
setDefaultConfig() {
|
|
16016
16043
|
this.config.format = this.getDefaultFormat();
|
|
16017
16044
|
this.config.tooltipFormat = this.getDefaultTooltipFormat();
|
|
16018
|
-
this.config.locale = this.getDefaultLocale();
|
|
16045
|
+
this.config.locale = this.normalizeLocale(this.getDefaultLocale());
|
|
16046
|
+
}
|
|
16047
|
+
normalizeLocale(locale) {
|
|
16048
|
+
if (!locale) {
|
|
16049
|
+
return locale;
|
|
16050
|
+
}
|
|
16051
|
+
// Extract language code from locale like 'fr-FR' -> 'fr', 'en-US' -> 'en'
|
|
16052
|
+
// but keep special cases like 'pt-BR' and 'zh-CN' intact
|
|
16053
|
+
if (locale === 'pt-BR' || locale === 'zh-CN') {
|
|
16054
|
+
return locale;
|
|
16055
|
+
}
|
|
16056
|
+
return locale.split('-')[0];
|
|
16019
16057
|
}
|
|
16020
16058
|
getDefaultFormat() {
|
|
16021
16059
|
return this.column?.format || this.getAppConfigPropertyValue('dateValues.defaultDateFormat', this.defaultDateConfig.format);
|
|
16022
16060
|
}
|
|
16023
16061
|
getDefaultLocale() {
|
|
16024
|
-
|
|
16062
|
+
// Always use the user locale from UserPreferencesService
|
|
16063
|
+
// This is kept in sync via subscription and reflects the user's current locale choice
|
|
16064
|
+
return this.userLocale;
|
|
16025
16065
|
}
|
|
16026
16066
|
getDefaultTooltipFormat() {
|
|
16027
16067
|
return this.getAppConfigPropertyValue('dateValues.defaultTooltipDateFormat', this.defaultDateConfig.tooltipFormat);
|
|
@@ -16030,11 +16070,11 @@ class DateCellComponent extends DataTableCellComponent {
|
|
|
16030
16070
|
return this.appConfig.get(key, defaultValue);
|
|
16031
16071
|
}
|
|
16032
16072
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
16033
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
16073
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: DateCellComponent, isStandalone: true, selector: "adf-date-cell", inputs: { dateConfig: "dateConfig" }, host: { classAttribute: "adf-datatable-content-cell" }, providers: [LocalizedDatePipe], usesInheritance: true, ngImport: i0, template: "@let date = value$ | async;\n\n@if (date) {\n <span [title]=\"title()\" class=\"adf-datatable-cell-value\">\n @if (config.format === 'timeAgo') {\n @if (config.locale) {\n {{ date | adfTimeAgo: config.locale }}\n } @else {\n {{ date | adfTimeAgo }}\n }\n } @else {\n @if (config.locale) {\n {{ date | adfLocalizedDate: config.format: config.locale }}\n } @else {\n {{ date | adfLocalizedDate: config.format }}\n }\n }\n </span>\n}\n", dependencies: [{ kind: "pipe", type: LocalizedDatePipe, name: "adfLocalizedDate" }, { kind: "pipe", type: TimeAgoPipe, name: "adfTimeAgo" }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
16034
16074
|
}
|
|
16035
16075
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: DateCellComponent, decorators: [{
|
|
16036
16076
|
type: Component,
|
|
16037
|
-
args: [{ imports: [
|
|
16077
|
+
args: [{ imports: [LocalizedDatePipe, TimeAgoPipe, AsyncPipe], selector: 'adf-date-cell', encapsulation: ViewEncapsulation.None, host: { class: 'adf-datatable-content-cell' }, changeDetection: ChangeDetectionStrategy.OnPush, providers: [LocalizedDatePipe], template: "@let date = value$ | async;\n\n@if (date) {\n <span [title]=\"title()\" class=\"adf-datatable-cell-value\">\n @if (config.format === 'timeAgo') {\n @if (config.locale) {\n {{ date | adfTimeAgo: config.locale }}\n } @else {\n {{ date | adfTimeAgo }}\n }\n } @else {\n @if (config.locale) {\n {{ date | adfLocalizedDate: config.format: config.locale }}\n } @else {\n {{ date | adfLocalizedDate: config.format }}\n }\n }\n </span>\n}\n" }]
|
|
16038
16078
|
}], propDecorators: { dateConfig: [{
|
|
16039
16079
|
type: Input
|
|
16040
16080
|
}] } });
|
|
@@ -16118,28 +16158,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
16118
16158
|
* limitations under the License.
|
|
16119
16159
|
*/
|
|
16120
16160
|
class FileSizeCellComponent extends DataTableCellComponent {
|
|
16161
|
+
constructor() {
|
|
16162
|
+
super(...arguments);
|
|
16163
|
+
this.fileSizePipe = inject(FileSizePipe);
|
|
16164
|
+
}
|
|
16121
16165
|
ngOnInit() {
|
|
16122
16166
|
super.ngOnInit();
|
|
16123
16167
|
}
|
|
16168
|
+
computeTitle(value) {
|
|
16169
|
+
if (value != null) {
|
|
16170
|
+
return this.fileSizePipe.transform(value);
|
|
16171
|
+
}
|
|
16172
|
+
return '';
|
|
16173
|
+
}
|
|
16124
16174
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileSizeCellComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
16125
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FileSizeCellComponent, isStandalone: true, selector: "adf-filesize-cell", host: { classAttribute: "adf-filesize-cell" }, usesInheritance: true, ngImport: i0, template: `
|
|
16126
|
-
|
|
16127
|
-
|
|
16128
|
-
|
|
16129
|
-
`, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: FileSizePipe, name: "adfFileSize" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
16175
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FileSizeCellComponent, isStandalone: true, selector: "adf-filesize-cell", host: { classAttribute: "adf-filesize-cell" }, providers: [FileSizePipe], usesInheritance: true, ngImport: i0, template: `
|
|
16176
|
+
@let value = value$ | async;
|
|
16177
|
+
<span [title]="title()" class="adf-datatable-cell-value">{{ value | adfFileSize }}</span>
|
|
16178
|
+
`, isInline: true, dependencies: [{ kind: "pipe", type: FileSizePipe, name: "adfFileSize" }, { kind: "pipe", type: AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
16130
16179
|
}
|
|
16131
16180
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FileSizeCellComponent, decorators: [{
|
|
16132
16181
|
type: Component,
|
|
16133
16182
|
args: [{
|
|
16134
16183
|
selector: 'adf-filesize-cell',
|
|
16135
|
-
imports: [
|
|
16184
|
+
imports: [FileSizePipe, AsyncPipe],
|
|
16136
16185
|
template: `
|
|
16137
|
-
|
|
16138
|
-
|
|
16139
|
-
</ng-container>
|
|
16186
|
+
@let value = value$ | async;
|
|
16187
|
+
<span [title]="title()" class="adf-datatable-cell-value">{{ value | adfFileSize }}</span>
|
|
16140
16188
|
`,
|
|
16141
16189
|
encapsulation: ViewEncapsulation.None,
|
|
16142
|
-
host: { class: 'adf-filesize-cell' }
|
|
16190
|
+
host: { class: 'adf-filesize-cell' },
|
|
16191
|
+
providers: [FileSizePipe]
|
|
16143
16192
|
}]
|
|
16144
16193
|
}] });
|
|
16145
16194
|
|
|
@@ -17805,10 +17854,8 @@ class DataTableModule {
|
|
|
17805
17854
|
AmountCellComponent,
|
|
17806
17855
|
NumberCellComponent,
|
|
17807
17856
|
LocationCellComponent,
|
|
17808
|
-
DateCellComponent,
|
|
17809
17857
|
IconCellComponent,
|
|
17810
17858
|
ColumnsSelectorComponent,
|
|
17811
|
-
FileSizeCellComponent,
|
|
17812
17859
|
JsonCellComponent,
|
|
17813
17860
|
DataTableCellComponent,
|
|
17814
17861
|
DataTableComponent] }); }
|
|
@@ -23907,13 +23954,13 @@ class ButtonWidgetComponent extends WidgetComponent {
|
|
|
23907
23954
|
this.event(event);
|
|
23908
23955
|
}
|
|
23909
23956
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonWidgetComponent, deps: [{ token: FormService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
23910
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonWidgetComponent, isStandalone: true, selector: "button-widget", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<button\n mat-flat-button\n class=\"adf-button-widget__button\"\n [color]=\"'primary'\"\n [matTooltip]=\"field?.tooltip\"\n [matTooltipShowDelay]=\"tooltipShowDelay\"\n [disabled]=\"field?.readOnly ?? false\"\n (click)=\"onClick($event)\"\n>\n {{ field?.name | translate }}\n</button>\n", styles: [".adf-button-widget{display:flex;justify-content:center;align-items:center;height:100%;width:100%;min-height:96px}.adf-button-widget__button{margin-bottom:32px;word-break:break-word;overflow:hidden}\n"], dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }],
|
|
23957
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: ButtonWidgetComponent, isStandalone: true, selector: "button-widget", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<button\n mat-flat-button\n class=\"adf-button-widget__button\"\n [color]=\"'primary'\"\n [matTooltip]=\"field?.tooltip\"\n [matTooltipShowDelay]=\"tooltipShowDelay\"\n [disabled]=\"field?.readOnly ?? false\"\n (click)=\"onClick($event)\"\n>\n {{ field?.name | translate }}\n</button>\n", styles: [".adf-button-widget{display:flex;justify-content:center;align-items:center;height:100%;width:100%;min-height:96px}.adf-button-widget__button{margin-bottom:32px;word-break:break-word;overflow:hidden}\n"], dependencies: [{ kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i2$2.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "ngmodule", type: MatTooltipModule }, { kind: "directive", type: i2$8.MatTooltip, selector: "[matTooltip]", inputs: ["matTooltipPosition", "matTooltipPositionAtOrigin", "matTooltipDisabled", "matTooltipShowDelay", "matTooltipHideDelay", "matTooltipTouchGestures", "matTooltip", "matTooltipClass"], exportAs: ["matTooltip"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
23911
23958
|
}
|
|
23912
23959
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: ButtonWidgetComponent, decorators: [{
|
|
23913
23960
|
type: Component,
|
|
23914
23961
|
args: [{ selector: 'button-widget', host: {
|
|
23915
23962
|
'[class]': 'hostClasses'
|
|
23916
|
-
}, encapsulation: ViewEncapsulation.None,
|
|
23963
|
+
}, encapsulation: ViewEncapsulation.None, imports: [TranslatePipe, MatButtonModule, MatTooltipModule], template: "<button\n mat-flat-button\n class=\"adf-button-widget__button\"\n [color]=\"'primary'\"\n [matTooltip]=\"field?.tooltip\"\n [matTooltipShowDelay]=\"tooltipShowDelay\"\n [disabled]=\"field?.readOnly ?? false\"\n (click)=\"onClick($event)\"\n>\n {{ field?.name | translate }}\n</button>\n", styles: [".adf-button-widget{display:flex;justify-content:center;align-items:center;height:100%;width:100%;min-height:96px}.adf-button-widget__button{margin-bottom:32px;word-break:break-word;overflow:hidden}\n"] }]
|
|
23917
23964
|
}], ctorParameters: () => [{ type: FormService }] });
|
|
23918
23965
|
|
|
23919
23966
|
/*!
|
|
@@ -31677,7 +31724,7 @@ class CoreModule {
|
|
|
31677
31724
|
MaterialModule] }); }
|
|
31678
31725
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: CoreModule, providers: [...CORE_PIPES], imports: [AboutExtensionListComponent, AboutLicenseListComponent, ModuleListComponent, AboutRepositoryInfoComponent, PackageListComponent, AboutStatusListComponent, AboutServerSettingsComponent, AboutComponent, PdfPasswordDialogComponent, ViewerRenderComponent, ImgViewerComponent, PdfViewerComponent, UnknownFormatComponent, ViewerComponent, DownloadPromptDialogComponent, HeaderLayoutComponent, SidebarActionMenuComponent, LayoutContainerComponent, SidenavLayoutComponent, IdentityUserInfoComponent, TooltipCardComponent, PAGINATION_DIRECTIVES, ToolbarComponent, ContextMenuListComponent, CardViewComponent, CardViewBoolItemComponent, CardViewDateItemComponent, CardViewMapItemComponent, CardViewTextItemComponent, CardViewKeyValuePairsItemComponent, CardViewSelectItemComponent, CardViewArrayItemComponent, SelectFilterInputComponent, FormBaseModule,
|
|
31679
31726
|
CommentsComponent,
|
|
31680
|
-
CommentListComponent, LoginComponent, LoginDialogPanelComponent, LANGUAGE_MENU_DIRECTIVES, InfoDrawerLayoutComponent, InfoDrawerComponent, BooleanCellComponent, AmountCellComponent, NumberCellComponent, LocationCellComponent,
|
|
31727
|
+
CommentListComponent, LoginComponent, LoginDialogPanelComponent, LANGUAGE_MENU_DIRECTIVES, InfoDrawerLayoutComponent, InfoDrawerComponent, BooleanCellComponent, AmountCellComponent, NumberCellComponent, LocationCellComponent, IconCellComponent, ColumnsSelectorComponent, JsonCellComponent, DataTableCellComponent, DataTableComponent, TEMPLATE_DIRECTIVES, IconComponent,
|
|
31681
31728
|
SortingPickerComponent, NOTIFICATION_HISTORY_DIRECTIVES, SearchTextInputComponent, UnsavedChangesDialogComponent,
|
|
31682
31729
|
DynamicChipListComponent,
|
|
31683
31730
|
MaterialModule, FormBaseModule,
|