@acorex/components 16.18.20 → 16.18.22
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
|
|
1
|
-
import { Component, Input, ChangeDetectionStrategy, ViewEncapsulation, ContentChild, ViewChild, ElementRef, model, signal, afterNextRender, inject, ChangeDetectorRef, } from '@angular/core';
|
2
|
-
import { AXBaseComponent, AXValidatableComponent, } from '../base/element.class';
|
3
1
|
import { AXConfig } from '@acorex/core';
|
2
|
+
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, ContentChild, ElementRef, Input, ViewChild, ViewEncapsulation, afterNextRender, inject, model, signal, } from '@angular/core';
|
3
|
+
import { AXBaseComponent, AXValidatableComponent, } from '../base/element.class';
|
4
4
|
import * as i0 from "@angular/core";
|
5
5
|
import * as i1 from "@angular/common";
|
6
6
|
export class AXFormGroupComponent extends AXBaseComponent {
|
@@ -11,7 +11,7 @@ export class AXFormGroupComponent extends AXBaseComponent {
|
|
11
11
|
required = AXConfig.get('form')?.required || false;
|
12
12
|
labelMode = model(AXConfig.get('form')?.labelMode || 'static');
|
13
13
|
isFloatActive = signal(false);
|
14
|
-
#
|
14
|
+
#nextRender = afterNextRender(() => {
|
15
15
|
this.required = this.component?.validation?.rules?.some((c) => c.type === 'required');
|
16
16
|
this.div.nativeElement.classList.add(this.size);
|
17
17
|
if (this.required) {
|
@@ -19,13 +19,6 @@ export class AXFormGroupComponent extends AXBaseComponent {
|
|
19
19
|
}
|
20
20
|
const input = this.component.ref.nativeElement.querySelector('input');
|
21
21
|
const textArea = this.component.ref.nativeElement.querySelector('textarea');
|
22
|
-
if ((this.component.value ||
|
23
|
-
this.component.selectedItems?.length > 0) &&
|
24
|
-
this.labelMode() === 'float') {
|
25
|
-
this.labelMode.set('over');
|
26
|
-
this.isFloatActive.set(true);
|
27
|
-
this.crd.detectChanges();
|
28
|
-
}
|
29
22
|
if (input) {
|
30
23
|
input.addEventListener('focus', this.handleFocus.bind(this));
|
31
24
|
input.addEventListener('blur', this.handeleBlur.bind(this));
|
@@ -34,6 +27,15 @@ export class AXFormGroupComponent extends AXBaseComponent {
|
|
34
27
|
textArea.addEventListener('focus', this.handleFocus.bind(this));
|
35
28
|
textArea.addEventListener('blur', this.handeleBlur.bind(this));
|
36
29
|
}
|
30
|
+
setTimeout(() => {
|
31
|
+
if ((this.component.value ||
|
32
|
+
this.component.selectedItems?.length > 0) &&
|
33
|
+
this.labelMode() === 'float') {
|
34
|
+
this.labelMode.set('over');
|
35
|
+
this.isFloatActive.set(true);
|
36
|
+
this.crd.detectChanges();
|
37
|
+
}
|
38
|
+
}, 200);
|
37
39
|
});
|
38
40
|
handleFocus() {
|
39
41
|
if (this.labelMode() === 'float') {
|
@@ -73,4 +75,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.7", ngImpor
|
|
73
75
|
type: ContentChild,
|
74
76
|
args: [AXValidatableComponent]
|
75
77
|
}] } });
|
76
|
-
//# sourceMappingURL=data:application/json;base64,
|
78
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZm9ybS1ncm91cC5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvbXBvbmVudHMvc3JjL2xpYi9mb3JtLWdyb3VwL2Zvcm0tZ3JvdXAuY29tcG9uZW50LnRzIiwiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb21wb25lbnRzL3NyYy9saWIvZm9ybS1ncm91cC9mb3JtLWdyb3VwLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxRQUFRLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDeEMsT0FBTyxFQUNMLHVCQUF1QixFQUN2QixpQkFBaUIsRUFDakIsU0FBUyxFQUNULFlBQVksRUFDWixVQUFVLEVBQ1YsS0FBSyxFQUVMLFNBQVMsRUFDVCxpQkFBaU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aXJlZC1zdGF0ZSc6IHJlcXVpcmVkIH1cIlxuICA+XG4gICAgPGRpdiBjbGFzcz1cImF4IGJ1dHRvbnMgc3RhcnQtYnV0dG9uc1wiICNzdGFydEJ1dHRvbnM+XG4gICAgICA8bmctY29udGVudCBzZWxlY3Q9XCJheC1idXR0b25bc3RhcnRdXCI+PC9uZy1jb250ZW50PlxuICAgIDwvZGl2PlxuICAgIDxkaXZcbiAgICAgIFtjbGFzc109XCJsYWJlbE1vZGUoKSA9PT0gJ292ZXInID8gJ2NvbnRlbnQgYXgtb3Zlci1hcHBseScgOiAnY29udGVudCdcIlxuICAgICAgI2NvbnRlbnRcbiAgICA+XG4gICAgICA8bmctY29udGVudD48L25nLWNvbnRlbnQ+XG4gICAgPC9kaXY+XG4gICAgPGRpdiBjbGFzcz1cImF4IGJ1dHRvbnMgZW5kLWJ1dHRvbnNcIiAjZW5kQnV0dG9ucz5cbiAgICAgIDxuZy1jb250ZW50IHNlbGVjdD1cImF4LWJ1dHRvbltlbmRdXCI+PC9uZy1jb250ZW50PlxuICAgICAgPG5nLWNvbnRlbnQgc2VsZWN0PVwiYXgtYnV0dG9uXCI+PC9uZy1jb250ZW50PlxuICAgIDwvZGl2PlxuICA8L2Rpdj5cbjwvZGl2PlxuIl19
|
@@ -6182,7 +6182,7 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6182
6182
|
required = AXConfig.get('form')?.required || false;
|
6183
6183
|
labelMode = model(AXConfig.get('form')?.labelMode || 'static');
|
6184
6184
|
isFloatActive = signal(false);
|
6185
|
-
#
|
6185
|
+
#nextRender = afterNextRender(() => {
|
6186
6186
|
this.required = this.component?.validation?.rules?.some((c) => c.type === 'required');
|
6187
6187
|
this.div.nativeElement.classList.add(this.size);
|
6188
6188
|
if (this.required) {
|
@@ -6190,13 +6190,6 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6190
6190
|
}
|
6191
6191
|
const input = this.component.ref.nativeElement.querySelector('input');
|
6192
6192
|
const textArea = this.component.ref.nativeElement.querySelector('textarea');
|
6193
|
-
if ((this.component.value ||
|
6194
|
-
this.component.selectedItems?.length > 0) &&
|
6195
|
-
this.labelMode() === 'float') {
|
6196
|
-
this.labelMode.set('over');
|
6197
|
-
this.isFloatActive.set(true);
|
6198
|
-
this.crd.detectChanges();
|
6199
|
-
}
|
6200
6193
|
if (input) {
|
6201
6194
|
input.addEventListener('focus', this.handleFocus.bind(this));
|
6202
6195
|
input.addEventListener('blur', this.handeleBlur.bind(this));
|
@@ -6205,6 +6198,15 @@ class AXFormGroupComponent extends AXBaseComponent {
|
|
6205
6198
|
textArea.addEventListener('focus', this.handleFocus.bind(this));
|
6206
6199
|
textArea.addEventListener('blur', this.handeleBlur.bind(this));
|
6207
6200
|
}
|
6201
|
+
setTimeout(() => {
|
6202
|
+
if ((this.component.value ||
|
6203
|
+
this.component.selectedItems?.length > 0) &&
|
6204
|
+
this.labelMode() === 'float') {
|
6205
|
+
this.labelMode.set('over');
|
6206
|
+
this.isFloatActive.set(true);
|
6207
|
+
this.crd.detectChanges();
|
6208
|
+
}
|
6209
|
+
}, 200);
|
6208
6210
|
});
|
6209
6211
|
handleFocus() {
|
6210
6212
|
if (this.labelMode() === 'float') {
|