@alfresco/adf-core 8.4.0-18878438842 → 8.4.0-18910406363
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/custom-theme/material-theme.scss +13 -13
- package/custom-theme/theme/custom-palette-creator.scss +23 -25
- package/custom-theme/theme/custom-theme-palettes.scss +7 -7
- package/custom-theme/theme/theme-data.scss +13 -13
- package/custom-theme/theme/typography.scss +5 -5
- package/fesm2022/adf-core.mjs +13 -112
- package/fesm2022/adf-core.mjs.map +1 -1
- package/lib/form/components/widgets/amount/amount.widget.d.ts +4 -38
- package/package.json +3 -3
- package/lib/auth/oidc/front-channel-logout.component.d.ts +0 -24
|
@@ -1,36 +1,36 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
|
-
@
|
|
3
|
+
@use './theme/theme-data' as theme;
|
|
4
4
|
|
|
5
5
|
$custom-theme: mat.m2-define-light-theme(
|
|
6
6
|
(
|
|
7
7
|
color: (
|
|
8
|
-
primary: map.get(
|
|
9
|
-
accent: map.get(
|
|
10
|
-
warn: map.get(
|
|
8
|
+
primary: map.get(theme.$palettes, primary),
|
|
9
|
+
accent: map.get(theme.$palettes, accent),
|
|
10
|
+
warn: map.get(theme.$palettes, warning)
|
|
11
11
|
),
|
|
12
|
-
typography:
|
|
12
|
+
typography: theme.$app-typography
|
|
13
13
|
)
|
|
14
14
|
);
|
|
15
15
|
|
|
16
|
-
@if
|
|
17
|
-
$custom-theme: get-custom-background-color(
|
|
16
|
+
@if theme.$background-color {
|
|
17
|
+
$custom-theme: theme.get-custom-background-color(theme.$background-color, $custom-theme);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
@if
|
|
21
|
-
$custom-theme: get-custom-text-color(
|
|
20
|
+
@if theme.$text-color {
|
|
21
|
+
$custom-theme: theme.get-custom-text-color(theme.$text-color, $custom-theme);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
@if
|
|
24
|
+
@if theme.$base-font-size {
|
|
25
25
|
body,
|
|
26
26
|
html {
|
|
27
|
-
font-size:
|
|
27
|
+
font-size: theme.$base-font-size;
|
|
28
28
|
}
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
@if
|
|
31
|
+
@if theme.$font-family {
|
|
32
32
|
body,
|
|
33
33
|
html {
|
|
34
|
-
font-family:
|
|
34
|
+
font-family: theme.$font-family;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
$colors: (
|
|
16
16
|
red: color.red($color),
|
|
17
17
|
green: color.green($color),
|
|
18
|
-
blue: color.blue($color)
|
|
18
|
+
blue: color.blue($color)
|
|
19
19
|
);
|
|
20
20
|
|
|
21
21
|
@each $name, $value in $colors {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
$colors: map.merge(
|
|
33
33
|
$colors,
|
|
34
34
|
(
|
|
35
|
-
$name: $value
|
|
35
|
+
$name: $value
|
|
36
36
|
)
|
|
37
37
|
);
|
|
38
38
|
}
|
|
@@ -91,10 +91,10 @@
|
|
|
91
91
|
$color900: color.mix($dark, $color, 75%);
|
|
92
92
|
|
|
93
93
|
/* stylelint-disable scss/dollar-variable-pattern */
|
|
94
|
-
$colorA100: color.adjust(
|
|
95
|
-
$colorA200: color.adjust(
|
|
96
|
-
$colorA400: color.adjust(
|
|
97
|
-
$colorA700: color.adjust(
|
|
94
|
+
$colorA100: color.adjust(color.adjust(color.mix($dark, $color, 15%), $saturation: 80%), $lightness: 45.6%);
|
|
95
|
+
$colorA200: color.adjust(color.adjust(color.mix($dark, $color, 15%), $saturation: 80%), $lightness: 35.6%);
|
|
96
|
+
$colorA400: color.adjust(color.adjust(color.mix($dark, $color, 15%), $saturation: 100%), $lightness: 25.6%);
|
|
97
|
+
$colorA700: color.adjust(color.adjust(color.mix($dark, $color, 15%), $saturation: 100%), $lightness: 20.5%);
|
|
98
98
|
/* stylelint-enable scss/dollar-variable-pattern */
|
|
99
99
|
|
|
100
100
|
$contrast50: create-text-color($color50, $colorType);
|
|
@@ -126,30 +126,28 @@
|
|
|
126
126
|
700: $color700,
|
|
127
127
|
800: $color800,
|
|
128
128
|
900: $color900,
|
|
129
|
-
/* stylelint-disable value-keyword-case */
|
|
130
|
-
A100: $colorA100,
|
|
129
|
+
/* stylelint-disable value-keyword-case */ A100: $colorA100,
|
|
131
130
|
A200: $colorA200,
|
|
132
131
|
A400: $colorA400,
|
|
133
132
|
A700: $colorA700,
|
|
134
133
|
/* stylelint-enable value-keyword-case */
|
|
135
134
|
contrast: (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
),
|
|
135
|
+
50: $contrast50,
|
|
136
|
+
100: $contrast100,
|
|
137
|
+
200: $contrast200,
|
|
138
|
+
300: $contrast300,
|
|
139
|
+
400: $contrast400,
|
|
140
|
+
500: $contrast500,
|
|
141
|
+
600: $contrast600,
|
|
142
|
+
700: $contrast700,
|
|
143
|
+
800: $contrast800,
|
|
144
|
+
900: $contrast900,
|
|
145
|
+
/* stylelint-disable value-keyword-case */ A100: $contrastA100,
|
|
146
|
+
A200: $contrastA200,
|
|
147
|
+
A400: $contrastA400,
|
|
148
|
+
A700: $contrastA700,
|
|
149
|
+
/* stylelint-enable value-keyword-case */
|
|
150
|
+
)
|
|
153
151
|
);
|
|
154
152
|
|
|
155
153
|
@return $palette;
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
@use '@angular/material' as mat;
|
|
2
|
-
@
|
|
3
|
-
@
|
|
2
|
+
@use 'default-colors';
|
|
3
|
+
@use 'custom-palette-creator';
|
|
4
4
|
|
|
5
5
|
@function get-mat-palettes($primary-color, $accent-color) {
|
|
6
6
|
$mat-primary-palette: null;
|
|
7
7
|
|
|
8
8
|
@if ($primary-color) {
|
|
9
|
-
$custom-theme-primary-palette: create-color-palette($primary-color, 'primary');
|
|
9
|
+
$custom-theme-primary-palette: custom-palette-creator.create-color-palette($primary-color, 'primary');
|
|
10
10
|
$mat-primary-palette: mat.m2-define-palette($custom-theme-primary-palette, 500);
|
|
11
11
|
} @else {
|
|
12
|
-
$mat-primary-palette: mat.m2-define-palette(
|
|
12
|
+
$mat-primary-palette: mat.m2-define-palette(default-colors.$default-primary, A100);
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
$mat-accent-palette: null;
|
|
16
16
|
|
|
17
17
|
@if ($accent-color) {
|
|
18
|
-
$custom-theme-accent-palette: create-color-palette($accent-color, 'accent');
|
|
18
|
+
$custom-theme-accent-palette: custom-palette-creator.create-color-palette($accent-color, 'accent');
|
|
19
19
|
$mat-accent-palette: mat.m2-define-palette($custom-theme-accent-palette, 500);
|
|
20
20
|
} @else {
|
|
21
|
-
$mat-accent-palette: mat.m2-define-palette(
|
|
21
|
+
$mat-accent-palette: mat.m2-define-palette(default-colors.$default-accent);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
|
-
$mat-warn-palette: mat.m2-define-palette(
|
|
24
|
+
$mat-warn-palette: mat.m2-define-palette(default-colors.$default-warn, A100);
|
|
25
25
|
|
|
26
26
|
@return (primary: $mat-primary-palette, accent: $mat-accent-palette, warning: $mat-warn-palette);
|
|
27
27
|
}
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
2
|
+
@use 'theme-configuration';
|
|
3
|
+
@use 'typography';
|
|
4
|
+
@use 'custom-theme-palettes';
|
|
5
|
+
@use 'custom-background-color';
|
|
6
|
+
@use 'custom-text-color';
|
|
7
7
|
|
|
8
|
-
$primary-color: map.get(
|
|
9
|
-
$accent-color: map.get(
|
|
10
|
-
$background-color: map.get(
|
|
8
|
+
$primary-color: map.get(theme-configuration.$theme-config, 'primaryColor');
|
|
9
|
+
$accent-color: map.get(theme-configuration.$theme-config, 'accentColor');
|
|
10
|
+
$background-color: map.get(theme-configuration.$theme-config, 'backgroundColor');
|
|
11
11
|
|
|
12
|
-
$text-color: map.get(
|
|
13
|
-
$base-font-size: map.get(
|
|
14
|
-
$font-family: map.get(
|
|
12
|
+
$text-color: map.get(theme-configuration.$theme-config, 'textColor');
|
|
13
|
+
$base-font-size: map.get(theme-configuration.$theme-config, 'baseFontSize');
|
|
14
|
+
$font-family: map.get(theme-configuration.$theme-config, 'fontFamily');
|
|
15
15
|
|
|
16
|
-
$app-typography: get-mat-typography($base-font-size, $font-family);
|
|
16
|
+
$app-typography: typography.get-mat-typography($base-font-size, $font-family);
|
|
17
17
|
|
|
18
|
-
$palettes: get-mat-palettes($primary-color, $accent-color);
|
|
18
|
+
$palettes: custom-theme-palettes.get-mat-palettes($primary-color, $accent-color);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
@use 'sass:map';
|
|
2
2
|
@use '@angular/material' as mat;
|
|
3
|
-
@
|
|
3
|
+
@use 'sass:meta';
|
|
4
|
+
@use '../variables/font-family';
|
|
4
5
|
|
|
5
6
|
@function get-mat-typography($base-font-size, $font-family) {
|
|
6
7
|
$custom-typography: mat.m2-define-typography-config(
|
|
@@ -16,8 +17,7 @@
|
|
|
16
17
|
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
|
17
18
|
$body-2: mat.m2-define-typography-level(14px, 20px, 400),
|
|
18
19
|
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
|
19
|
-
$button: mat.m2-define-typography-level(14px, 14px, 500)
|
|
20
|
-
// Line-height must be unit-less fraction of the font-size.
|
|
20
|
+
$button: mat.m2-define-typography-level(14px, 14px, 500) // Line-height must be unit-less fraction of the font-size.
|
|
21
21
|
);
|
|
22
22
|
|
|
23
23
|
@if $base-font-size {
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
$body-2: mat.m2-define-typography-level(1rem, 1.42rem, 400),
|
|
35
35
|
$caption: mat.m2-define-typography-level(0.86rem, 1.42rem, 400),
|
|
36
36
|
$button: mat.m2-define-typography-level(1rem, 1rem, 500),
|
|
37
|
-
$font-family:
|
|
37
|
+
$font-family: font-family.$default-font-family
|
|
38
38
|
);
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
@if $font-family {
|
|
42
42
|
@each $key, $level in $custom-typography {
|
|
43
43
|
/* stylelint-disable-next-line scss/no-global-function-names */
|
|
44
|
-
@if type-of($level) == 'map' {
|
|
44
|
+
@if meta.type-of($level) == 'map' {
|
|
45
45
|
$new-level: map.merge(
|
|
46
46
|
$level,
|
|
47
47
|
(
|
package/fesm2022/adf-core.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
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, DEFAULT_CURRENCY_CODE, SecurityContext, ElementRef, ViewContainerRef, forwardRef, Compiler, Injector } from '@angular/core';
|
|
3
3
|
import * as i1 from '@angular/common';
|
|
4
|
-
import { CommonModule, DOCUMENT, NgIf, NgClass, NgForOf, AsyncPipe, NgTemplateOutlet, NgStyle, DecimalPipe, DatePipe,
|
|
4
|
+
import { CommonModule, DOCUMENT, NgIf, NgClass, NgForOf, AsyncPipe, NgTemplateOutlet, NgStyle, DecimalPipe, DatePipe, NgFor } from '@angular/common';
|
|
5
5
|
import * as i2 from '@angular/material/table';
|
|
6
6
|
import { MatTableModule, MatTableDataSource } from '@angular/material/table';
|
|
7
7
|
import * as i1$1 from '@ngx-translate/core';
|
|
8
8
|
import { TranslatePipe, provideTranslateService, TranslateLoader } from '@ngx-translate/core';
|
|
9
9
|
import * as i1$8 from '@angular/common/http';
|
|
10
10
|
import { HttpClient, HttpHeaders, HttpResponse, provideHttpClient, HTTP_INTERCEPTORS, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
|
|
11
|
-
import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, firstValueFrom, combineLatest, defer, EMPTY, race, forkJoin, merge
|
|
11
|
+
import { ReplaySubject, BehaviorSubject, of, Subject, switchMap as switchMap$1, from, fromEvent, Observable, throwError, firstValueFrom, combineLatest, defer, EMPTY, race, forkJoin, merge } from 'rxjs';
|
|
12
12
|
import { map, distinctUntilChanged, take, switchMap, delay, catchError, skipWhile, filter, first, timeout, shareReplay, mergeMap, tap, retry, takeUntil, debounceTime, share, pairwise, buffer } from 'rxjs/operators';
|
|
13
13
|
import * as i1$4 from '@alfresco/adf-extensions';
|
|
14
14
|
import { ExtensionService, mergeObjects, ExtensionsModule, PreviewExtensionComponent } from '@alfresco/adf-extensions';
|
|
@@ -8782,8 +8782,7 @@ class RedirectAuthService extends AuthService {
|
|
|
8782
8782
|
this.oauthService.configure(config);
|
|
8783
8783
|
this.oauthService.tokenValidationHandler = new JwksValidationHandler();
|
|
8784
8784
|
if (config.sessionChecksEnabled) {
|
|
8785
|
-
|
|
8786
|
-
this.oauthService.events.pipe(filter((event) => sessionErrorTypesToPerformLogout.includes(event.type))).subscribe(() => {
|
|
8785
|
+
this.oauthService.events.pipe(filter((event) => event.type === 'session_terminated')).subscribe(() => {
|
|
8787
8786
|
this.oauthService.logOut();
|
|
8788
8787
|
});
|
|
8789
8788
|
}
|
|
@@ -10607,37 +10606,6 @@ const OidcAuthGuard = async () => {
|
|
|
10607
10606
|
}
|
|
10608
10607
|
};
|
|
10609
10608
|
|
|
10610
|
-
/*!
|
|
10611
|
-
* @license
|
|
10612
|
-
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
10613
|
-
*
|
|
10614
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
10615
|
-
* you may not use this file except in compliance with the License.
|
|
10616
|
-
* You may obtain a copy of the License at
|
|
10617
|
-
*
|
|
10618
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10619
|
-
*
|
|
10620
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10621
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
10622
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
10623
|
-
* See the License for the specific language governing permissions and
|
|
10624
|
-
* limitations under the License.
|
|
10625
|
-
*/
|
|
10626
|
-
class FrontChannelLogoutComponent {
|
|
10627
|
-
constructor() {
|
|
10628
|
-
this.authService = inject(AuthService);
|
|
10629
|
-
}
|
|
10630
|
-
ngOnInit() {
|
|
10631
|
-
this.authService.logout();
|
|
10632
|
-
}
|
|
10633
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrontChannelLogoutComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
10634
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.6", type: FrontChannelLogoutComponent, isStandalone: true, selector: "ng-component", ngImport: i0, template: '', isInline: true }); }
|
|
10635
|
-
}
|
|
10636
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: FrontChannelLogoutComponent, decorators: [{
|
|
10637
|
-
type: Component,
|
|
10638
|
-
args: [{ template: '', standalone: true }]
|
|
10639
|
-
}] });
|
|
10640
|
-
|
|
10641
10609
|
/*!
|
|
10642
10610
|
* @license
|
|
10643
10611
|
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
|
@@ -10655,8 +10623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
10655
10623
|
* limitations under the License.
|
|
10656
10624
|
*/
|
|
10657
10625
|
const AUTH_ROUTES = [
|
|
10658
|
-
{ path: 'view/authentication-confirmation', component: AuthenticationConfirmationComponent, canActivate: [OidcAuthGuard] }
|
|
10659
|
-
{ path: 'oidc/frontchannel_logout', component: FrontChannelLogoutComponent }
|
|
10626
|
+
{ path: 'view/authentication-confirmation', component: AuthenticationConfirmationComponent, canActivate: [OidcAuthGuard] }
|
|
10660
10627
|
];
|
|
10661
10628
|
|
|
10662
10629
|
/*!
|
|
@@ -22621,91 +22588,25 @@ class AmountWidgetComponent extends WidgetComponent {
|
|
|
22621
22588
|
get placeholder() {
|
|
22622
22589
|
return this.showPlaceholder ? this.field.placeholder : '';
|
|
22623
22590
|
}
|
|
22624
|
-
constructor(formService, settings
|
|
22591
|
+
constructor(formService, settings) {
|
|
22625
22592
|
super(formService);
|
|
22626
22593
|
this.formService = formService;
|
|
22627
|
-
this.
|
|
22594
|
+
this.settings = settings;
|
|
22628
22595
|
this.showPlaceholder = true;
|
|
22629
22596
|
this.currency = AmountWidgetComponent.DEFAULT_CURRENCY;
|
|
22630
|
-
this.currencyDisplay = 'symbol';
|
|
22631
|
-
this.notShowDecimalDigits = '1.0-0';
|
|
22632
|
-
this.showDecimalDigits = '1.2-2';
|
|
22633
|
-
if (isObservable(settings)) {
|
|
22634
|
-
settings.pipe(takeUntilDestroyed()).subscribe((data) => {
|
|
22635
|
-
this.updateSettingsBasedProperties(data);
|
|
22636
|
-
});
|
|
22637
|
-
}
|
|
22638
|
-
else {
|
|
22639
|
-
this.updateSettingsBasedProperties(settings);
|
|
22640
|
-
}
|
|
22641
22597
|
}
|
|
22642
22598
|
ngOnInit() {
|
|
22643
22599
|
if (this.field) {
|
|
22644
22600
|
if (this.field.currency) {
|
|
22645
22601
|
this.currency = this.field.currency;
|
|
22646
22602
|
}
|
|
22647
|
-
else {
|
|
22648
|
-
if (this.enableDisplayBasedOnLocale) {
|
|
22649
|
-
this.currency = '';
|
|
22650
|
-
this.currencyDisplay = '';
|
|
22651
|
-
}
|
|
22652
|
-
}
|
|
22653
22603
|
if (this.field.readOnly) {
|
|
22654
|
-
this.showPlaceholder = this.showReadonlyPlaceholder;
|
|
22604
|
+
this.showPlaceholder = this.settings?.showReadonlyPlaceholder;
|
|
22655
22605
|
}
|
|
22656
|
-
this.setInitialValues();
|
|
22657
|
-
}
|
|
22658
|
-
}
|
|
22659
|
-
amountWidgetOnBlur() {
|
|
22660
|
-
if (this.enableDisplayBasedOnLocale) {
|
|
22661
|
-
if (this.amountWidgetValue) {
|
|
22662
|
-
this.valueAsNumber = parseFloat(this.amountWidgetValue);
|
|
22663
|
-
this.amountWidgetValue = this.currencyPipe.transform(this.amountWidgetValue, this.currency, this.currencyDisplay, this.decimalProperty);
|
|
22664
|
-
}
|
|
22665
|
-
else {
|
|
22666
|
-
this.valueAsNumber = null;
|
|
22667
|
-
this.amountWidgetValue = null;
|
|
22668
|
-
}
|
|
22669
|
-
}
|
|
22670
|
-
this.markAsTouched();
|
|
22671
|
-
}
|
|
22672
|
-
amountWidgetOnFocus() {
|
|
22673
|
-
if (this.enableDisplayBasedOnLocale) {
|
|
22674
|
-
const hasValue = this.valueAsNumber === 0 || this.valueAsNumber;
|
|
22675
|
-
this.amountWidgetValue = hasValue ? this.valueAsNumber.toString() : null;
|
|
22676
22606
|
}
|
|
22677
22607
|
}
|
|
22678
|
-
|
|
22679
|
-
|
|
22680
|
-
if (typeof window?.navigator === 'undefined') {
|
|
22681
|
-
return defaultLocale;
|
|
22682
|
-
}
|
|
22683
|
-
const wn = window.navigator;
|
|
22684
|
-
let lang = wn.languages ? wn.languages[0] : defaultLocale;
|
|
22685
|
-
lang = lang || wn.language;
|
|
22686
|
-
return lang;
|
|
22687
|
-
}
|
|
22688
|
-
onFieldChangedAmountWidget() {
|
|
22689
|
-
this.field.value = this.amountWidgetValue;
|
|
22690
|
-
super.onFieldChanged(this.field);
|
|
22691
|
-
}
|
|
22692
|
-
setInitialValues() {
|
|
22693
|
-
if (this.enableDisplayBasedOnLocale) {
|
|
22694
|
-
this.decimalProperty = this.field.enableFractions ? this.showDecimalDigits : this.notShowDecimalDigits;
|
|
22695
|
-
this.locale = this.getLocale();
|
|
22696
|
-
this.valueAsNumber = this.field.value;
|
|
22697
|
-
this.amountWidgetValue = this.currencyPipe.transform(this.field.value, this.currency, this.currencyDisplay, this.decimalProperty, this.locale);
|
|
22698
|
-
}
|
|
22699
|
-
else {
|
|
22700
|
-
this.amountWidgetValue = this.field.value;
|
|
22701
|
-
}
|
|
22702
|
-
}
|
|
22703
|
-
updateSettingsBasedProperties(data) {
|
|
22704
|
-
this.enableDisplayBasedOnLocale = data?.enableDisplayBasedOnLocale ?? false;
|
|
22705
|
-
this.showReadonlyPlaceholder = data?.showReadonlyPlaceholder;
|
|
22706
|
-
}
|
|
22707
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AmountWidgetComponent, deps: [{ token: FormService }, { token: ADF_AMOUNT_SETTINGS, optional: true }, { token: i1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22708
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: AmountWidgetComponent, isStandalone: true, selector: "amount-widget", host: { listeners: { "click": "event($event)", "blur": "event($event)", "change": "event($event)", "focus": "event($event)", "focusin": "event($event)", "focusout": "event($event)", "input": "event($event)", "invalid": "event($event)", "select": "event($event)" } }, providers: [CurrencyPipe], usesInheritance: true, ngImport: i0, template: "<div\n class=\"adf-amount-widget__container adf-amount-widget {{field.className}}\"\n [class.adf-invalid]=\"!field.isValid && isTouched()\"\n [class.adf-readonly]=\"field.readOnly\"\n [class.adf-left-label-input-container]=\"field.leftLabels\"\n>\n <div *ngIf=\"field.leftLabels\">\n <label class=\"adf-label adf-left-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n </div>\n <div class=\"adf-amount-widget-container\">\n <mat-form-field class=\"adf-amount-widget__input adf-form-field-input\" [floatLabel]=\"placeholder ? 'always' : null\">\n @if ( (field.name || field?.required) && !field.leftLabels) { <mat-label class=\"adf-label\" [attr.for]=\"field.id\">{{field.name | translate }}</mat-label> }\n @if(!enableDisplayBasedOnLocale) {\n <span matTextPrefix class=\"adf-amount-widget__prefix-spacing\">{{ currency }} </span>\n }\n <input\n matInput\n [title]=\"field.tooltip\"\n class=\"adf-input\"\n type=\"text\"\n [id]=\"field.id\"\n [required]=\"field.required && field.isVisible\"\n [placeholder]=\"placeholder\"\n [value]=\"amountWidgetValue\"\n [(ngModel)]=\"amountWidgetValue\"\n (ngModelChange)=\"onFieldChangedAmountWidget()\"\n [disabled]=\"field.readOnly\"\n (focus)=\"amountWidgetOnFocus()\"\n (blur)=\"amountWidgetOnBlur()\"\n />\n </mat-form-field>\n <div class=\"adf-error-messages-container\">\n <error-widget [error]=\"field.validationSummary\" />\n <error-widget\n *ngIf=\"isInvalidFieldRequired() && isTouched()\"\n required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\"\n />\n </div>\n </div>\n</div>\n", styles: [".adf-amount-widget{width:100%}.adf-amount-widget .adf-left-label{line-height:36px}.adf-amount-widget-container{display:grid;align-items:flex-start}.adf-amount-widget__input .mat-focused{transition:none}.adf-amount-widget__input .adf-input{margin-top:3px}.adf-amount-widget__input:not(.mat-focused):not(.mat-form-field-invalid) .adf-amount-widget__prefix-spacing{color:var(--adf-theme-foreground-secondary-text-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
22608
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AmountWidgetComponent, deps: [{ token: FormService }, { token: ADF_AMOUNT_SETTINGS, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
22609
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.6", type: AmountWidgetComponent, isStandalone: true, selector: "amount-widget", host: { listeners: { "click": "event($event)", "blur": "event($event)", "change": "event($event)", "focus": "event($event)", "focusin": "event($event)", "focusout": "event($event)", "input": "event($event)", "invalid": "event($event)", "select": "event($event)" } }, usesInheritance: true, ngImport: i0, template: "<div\n class=\"adf-amount-widget__container adf-amount-widget {{field.className}}\"\n [class.adf-invalid]=\"!field.isValid && isTouched()\"\n [class.adf-readonly]=\"field.readOnly\"\n [class.adf-left-label-input-container]=\"field.leftLabels\"\n>\n <div *ngIf=\"field.leftLabels\">\n <label class=\"adf-label adf-left-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n </div>\n <div class=\"adf-amount-widget-container\">\n <mat-form-field class=\"adf-amount-widget__input adf-form-field-input\" [floatLabel]=\"placeholder ? 'always' : null\">\n @if ( (field.name || field?.required) && !field.leftLabels) { <mat-label class=\"adf-label\" [attr.for]=\"field.id\">{{field.name | translate }}</mat-label> }\n <span matTextPrefix class=\"adf-amount-widget__prefix-spacing\">{{ currency }} </span>\n <input\n matInput\n [title]=\"field.tooltip\"\n class=\"adf-input\"\n type=\"text\"\n [id]=\"field.id\"\n [required]=\"field.required && field.isVisible\"\n [placeholder]=\"placeholder\"\n [value]=\"field.value\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onFieldChanged(field)\"\n [disabled]=\"field.readOnly\"\n (blur)=\"markAsTouched()\"\n />\n </mat-form-field>\n <div class=\"adf-error-messages-container\">\n <error-widget [error]=\"field.validationSummary\" />\n <error-widget\n *ngIf=\"isInvalidFieldRequired() && isTouched()\"\n required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\"\n />\n </div>\n </div>\n</div>\n", styles: [".adf-amount-widget{width:100%}.adf-amount-widget .adf-left-label{line-height:36px}.adf-amount-widget-container{display:grid;align-items:flex-start}.adf-amount-widget__input .mat-focused{transition:none}.adf-amount-widget__input .adf-input{margin-top:3px}.adf-amount-widget__input:not(.mat-focused):not(.mat-form-field-invalid) .adf-amount-widget__prefix-spacing{color:var(--adf-theme-foreground-secondary-text-color)}\n"], dependencies: [{ kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2$3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2$3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i3$2.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly", "disabledInteractive"], exportAs: ["matInput"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i4.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i4.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ErrorWidgetComponent, selector: "error-widget", inputs: ["error", "required"] }, { kind: "pipe", type: TranslatePipe, name: "translate" }, { kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
22709
22610
|
}
|
|
22710
22611
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImport: i0, type: AmountWidgetComponent, decorators: [{
|
|
22711
22612
|
type: Component,
|
|
@@ -22719,13 +22620,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.6", ngImpor
|
|
|
22719
22620
|
'(input)': 'event($event)',
|
|
22720
22621
|
'(invalid)': 'event($event)',
|
|
22721
22622
|
'(select)': 'event($event)'
|
|
22722
|
-
}, imports: [MatFormFieldModule, MatInputModule, FormsModule, ErrorWidgetComponent, TranslatePipe, NgIf],
|
|
22623
|
+
}, imports: [MatFormFieldModule, MatInputModule, FormsModule, ErrorWidgetComponent, TranslatePipe, NgIf], encapsulation: ViewEncapsulation.None, template: "<div\n class=\"adf-amount-widget__container adf-amount-widget {{field.className}}\"\n [class.adf-invalid]=\"!field.isValid && isTouched()\"\n [class.adf-readonly]=\"field.readOnly\"\n [class.adf-left-label-input-container]=\"field.leftLabels\"\n>\n <div *ngIf=\"field.leftLabels\">\n <label class=\"adf-label adf-left-label\" [attr.for]=\"field.id\"\n >{{field.name | translate }}<span class=\"adf-asterisk\" [style.visibility]=\"isRequired() ? 'visible' : 'hidden'\">*</span></label\n >\n </div>\n <div class=\"adf-amount-widget-container\">\n <mat-form-field class=\"adf-amount-widget__input adf-form-field-input\" [floatLabel]=\"placeholder ? 'always' : null\">\n @if ( (field.name || field?.required) && !field.leftLabels) { <mat-label class=\"adf-label\" [attr.for]=\"field.id\">{{field.name | translate }}</mat-label> }\n <span matTextPrefix class=\"adf-amount-widget__prefix-spacing\">{{ currency }} </span>\n <input\n matInput\n [title]=\"field.tooltip\"\n class=\"adf-input\"\n type=\"text\"\n [id]=\"field.id\"\n [required]=\"field.required && field.isVisible\"\n [placeholder]=\"placeholder\"\n [value]=\"field.value\"\n [(ngModel)]=\"field.value\"\n (ngModelChange)=\"onFieldChanged(field)\"\n [disabled]=\"field.readOnly\"\n (blur)=\"markAsTouched()\"\n />\n </mat-form-field>\n <div class=\"adf-error-messages-container\">\n <error-widget [error]=\"field.validationSummary\" />\n <error-widget\n *ngIf=\"isInvalidFieldRequired() && isTouched()\"\n required=\"{{ 'FORM.FIELD.REQUIRED' | translate }}\"\n />\n </div>\n </div>\n</div>\n", styles: [".adf-amount-widget{width:100%}.adf-amount-widget .adf-left-label{line-height:36px}.adf-amount-widget-container{display:grid;align-items:flex-start}.adf-amount-widget__input .mat-focused{transition:none}.adf-amount-widget__input .adf-input{margin-top:3px}.adf-amount-widget__input:not(.mat-focused):not(.mat-form-field-invalid) .adf-amount-widget__prefix-spacing{color:var(--adf-theme-foreground-secondary-text-color)}\n"] }]
|
|
22723
22624
|
}], ctorParameters: () => [{ type: FormService }, { type: undefined, decorators: [{
|
|
22724
|
-
type: Optional
|
|
22725
|
-
}, {
|
|
22726
22625
|
type: Inject,
|
|
22727
22626
|
args: [ADF_AMOUNT_SETTINGS]
|
|
22728
|
-
}
|
|
22627
|
+
}, {
|
|
22628
|
+
type: Optional
|
|
22629
|
+
}] }] });
|
|
22729
22630
|
|
|
22730
22631
|
/*!
|
|
22731
22632
|
* @license
|