oasys-lib 1.83.0-rc.2 → 1.83.0-rc.4
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/esm2022/lib/components/form/errors/form-errors.component.mjs +5 -16
- package/fesm2022/oasys-lib.mjs +4 -15
- package/fesm2022/oasys-lib.mjs.map +1 -1
- package/lib/components/form/errors/form-errors.component.d.ts +0 -3
- package/lib/components/form/errors/form-errors.component.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/assets/bloomandwild/variables.css +1 -1
- package/src/assets/bloomon/variables.css +1 -1
- package/src/assets/global/scss-breakpoints.scss +1 -1
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { Component, computed,
|
|
1
|
+
import { Component, computed, input } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
4
3
|
import * as i0 from "@angular/core";
|
|
5
4
|
export class FormErrorsComponent {
|
|
6
5
|
constructor() {
|
|
@@ -16,22 +15,12 @@ export class FormErrorsComponent {
|
|
|
16
15
|
const firstErrorKey = errorKeys.length ? errorKeys[0] : undefined;
|
|
17
16
|
return firstErrorKey ? messages[firstErrorKey] : undefined;
|
|
18
17
|
});
|
|
19
|
-
this.liveAnnouncer = inject(LiveAnnouncer);
|
|
20
|
-
this.ngZone = inject(NgZone);
|
|
21
|
-
effect(() => {
|
|
22
|
-
const message = this.errorMessage();
|
|
23
|
-
if (message) {
|
|
24
|
-
this.ngZone.runOutsideAngular(async () => {
|
|
25
|
-
await this.liveAnnouncer.announce(message, 'assertive');
|
|
26
|
-
});
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
18
|
}
|
|
30
19
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
31
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormErrorsComponent, isStandalone: true, selector: "ui-form-errors", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, error_messages: { classPropertyName: "error_messages", publicName: "error_messages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (errorMessage()) {\n
|
|
20
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormErrorsComponent, isStandalone: true, selector: "ui-form-errors", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, error_messages: { classPropertyName: "error_messages", publicName: "error_messages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"form-errors\" aria-live=\"assertive\" role=\"alert\">\n @if (errorMessage()) {\n <ui-box\n box_background=\"none\"\n box_space=\"none\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"near\"\n >\n <p class=\"text-color--error\">{{ errorMessage() }}</p>\n </ui-box>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
32
21
|
}
|
|
33
22
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormErrorsComponent, decorators: [{
|
|
34
23
|
type: Component,
|
|
35
|
-
args: [{ selector: 'ui-form-errors', standalone: true, imports: [CommonModule], template: "@if (errorMessage()) {\n
|
|
36
|
-
}]
|
|
37
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
24
|
+
args: [{ selector: 'ui-form-errors', standalone: true, imports: [CommonModule], template: "<div class=\"form-errors\" aria-live=\"assertive\" role=\"alert\">\n @if (errorMessage()) {\n <ui-box\n box_background=\"none\"\n box_space=\"none\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"near\"\n >\n <p class=\"text-color--error\">{{ errorMessage() }}</p>\n </ui-box>\n }\n</div>\n" }]
|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GVycm9yTWVzc2FnZSgpIH19PC9wPlxuICAgIDwvdWktYm94PlxuICB9XG48L2Rpdj5cbiJdfQ==
|
package/fesm2022/oasys-lib.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, InjectionToken, HostListener, EventEmitter, Output, ViewChild, ContentChild, NgModule, HostBinding, Optional, inject, ElementRef, signal, forwardRef, input, computed,
|
|
2
|
+
import { Directive, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, InjectionToken, HostListener, EventEmitter, Output, ViewChild, ContentChild, NgModule, HostBinding, Optional, inject, ElementRef, signal, forwardRef, input, computed, CUSTOM_ELEMENTS_SCHEMA, ViewChildren, NO_ERRORS_SCHEMA, ContentChildren } from '@angular/core';
|
|
3
3
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
4
4
|
import { takeUntil, take, map } from 'rxjs/operators';
|
|
5
5
|
import * as i1 from '@angular/cdk/layout';
|
|
@@ -8,7 +8,6 @@ import { DOCUMENT, CommonModule, NgStyle, NgClass, NgFor, NgIf } from '@angular/
|
|
|
8
8
|
import { RouterModule } from '@angular/router';
|
|
9
9
|
import * as i4 from '@angular/forms';
|
|
10
10
|
import { NG_VALUE_ACCESSOR, ReactiveFormsModule, FormsModule } from '@angular/forms';
|
|
11
|
-
import { LiveAnnouncer } from '@angular/cdk/a11y';
|
|
12
11
|
import { register } from 'swiper/element/bundle';
|
|
13
12
|
|
|
14
13
|
class OasysAlertCancelDirective {
|
|
@@ -1778,24 +1777,14 @@ class FormErrorsComponent {
|
|
|
1778
1777
|
const firstErrorKey = errorKeys.length ? errorKeys[0] : undefined;
|
|
1779
1778
|
return firstErrorKey ? messages[firstErrorKey] : undefined;
|
|
1780
1779
|
});
|
|
1781
|
-
this.liveAnnouncer = inject(LiveAnnouncer);
|
|
1782
|
-
this.ngZone = inject(NgZone);
|
|
1783
|
-
effect(() => {
|
|
1784
|
-
const message = this.errorMessage();
|
|
1785
|
-
if (message) {
|
|
1786
|
-
this.ngZone.runOutsideAngular(async () => {
|
|
1787
|
-
await this.liveAnnouncer.announce(message, 'assertive');
|
|
1788
|
-
});
|
|
1789
|
-
}
|
|
1790
|
-
});
|
|
1791
1780
|
}
|
|
1792
1781
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1793
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormErrorsComponent, isStandalone: true, selector: "ui-form-errors", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, error_messages: { classPropertyName: "error_messages", publicName: "error_messages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "@if (errorMessage()) {\n
|
|
1782
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: FormErrorsComponent, isStandalone: true, selector: "ui-form-errors", inputs: { errors: { classPropertyName: "errors", publicName: "errors", isSignal: true, isRequired: false, transformFunction: null }, error_messages: { classPropertyName: "error_messages", publicName: "error_messages", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"form-errors\" aria-live=\"assertive\" role=\"alert\">\n @if (errorMessage()) {\n <ui-box\n box_background=\"none\"\n box_space=\"none\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"near\"\n >\n <p class=\"text-color--error\">{{ errorMessage() }}</p>\n </ui-box>\n }\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }] }); }
|
|
1794
1783
|
}
|
|
1795
1784
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: FormErrorsComponent, decorators: [{
|
|
1796
1785
|
type: Component,
|
|
1797
|
-
args: [{ selector: 'ui-form-errors', standalone: true, imports: [CommonModule], template: "@if (errorMessage()) {\n
|
|
1798
|
-
}]
|
|
1786
|
+
args: [{ selector: 'ui-form-errors', standalone: true, imports: [CommonModule], template: "<div class=\"form-errors\" aria-live=\"assertive\" role=\"alert\">\n @if (errorMessage()) {\n <ui-box\n box_background=\"none\"\n box_space=\"none\"\n box_space_left=\"near\"\n box_space_right=\"near\"\n box_space_bottom=\"near\"\n >\n <p class=\"text-color--error\">{{ errorMessage() }}</p>\n </ui-box>\n }\n</div>\n" }]
|
|
1787
|
+
}] });
|
|
1799
1788
|
|
|
1800
1789
|
class OasysFormErrorsModule {
|
|
1801
1790
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: OasysFormErrorsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|