coer-elements 2.0.40 → 2.0.41
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/components/lib/coer-button/coer-button.component.d.ts +1 -1
- package/components/lib/coer-secretbox/coer-secretbox.component.d.ts +1 -1
- package/components/lib/coer-selectbox/coer-selectbox.component.d.ts +0 -1
- package/components/lib/coer-textarea/coer-textarea.component.d.ts +9 -8
- package/fesm2022/coer-elements-components.mjs +109 -103
- package/fesm2022/coer-elements-components.mjs.map +1 -1
- package/package.json +1 -1
@@ -6,7 +6,7 @@ export declare class CoerButton implements AfterViewInit {
|
|
6
6
|
protected _innerButton: HTMLElement;
|
7
7
|
protected _innerButtonIcon: HTMLElement;
|
8
8
|
id: import("@angular/core").InputSignal<string>;
|
9
|
-
color: import("@angular/core").InputSignal<"default" | "primary" | "secondary" | "success" | "warning" | "danger" | "navigation" | "
|
9
|
+
color: import("@angular/core").InputSignal<"default" | "primary" | "secondary" | "success" | "warning" | "danger" | "navigation" | "dark" | "light" | "information">;
|
10
10
|
type: import("@angular/core").InputSignal<"filled" | "outline" | "icon" | "icon-outline" | "icon-no-border">;
|
11
11
|
typeBreakpoint: import("@angular/core").InputSignal<IButtonType>;
|
12
12
|
icon: import("@angular/core").InputSignal<string | null | undefined>;
|
@@ -43,7 +43,7 @@ export declare class CoerSecretBox extends ControlValue implements AfterViewInit
|
|
43
43
|
protected get _passwordType(): boolean;
|
44
44
|
protected _isEnable: import("@angular/core").Signal<boolean>;
|
45
45
|
protected _floatLabel: import("@angular/core").Signal<"auto" | "always">;
|
46
|
-
protected _paddingRight: import("@angular/core").Signal<"0px" | "
|
46
|
+
protected _paddingRight: import("@angular/core").Signal<"0px" | "45px" | "18px">;
|
47
47
|
/** */
|
48
48
|
Focus(select?: boolean, delay?: number): void;
|
49
49
|
/** */
|
@@ -16,7 +16,6 @@ export declare class CoerSelectbox<T> extends ControlValue implements AfterViewI
|
|
16
16
|
protected readonly _effect: EffectRef;
|
17
17
|
protected _textbox: HTMLInputElement;
|
18
18
|
protected _dropDownMenu: HTMLElement;
|
19
|
-
protected _container: HTMLElement;
|
20
19
|
id: import("@angular/core").InputSignal<string>;
|
21
20
|
value: import("@angular/core").InputSignal<T | null | undefined>;
|
22
21
|
label: import("@angular/core").InputSignal<string>;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
import { ElementRef, AfterViewInit } from '@angular/core';
|
1
|
+
import { ElementRef, AfterViewInit, EffectRef, OnDestroy } from '@angular/core';
|
2
2
|
import { ControlValue } from 'coer-elements/tools';
|
3
3
|
import * as i0 from "@angular/core";
|
4
|
-
export declare class CoerTextarea extends ControlValue implements AfterViewInit {
|
4
|
+
export declare class CoerTextarea extends ControlValue implements AfterViewInit, OnDestroy {
|
5
5
|
protected _coerTextBox: import("@angular/core").Signal<ElementRef<any>>;
|
6
6
|
protected _value: string | number;
|
7
|
-
protected
|
8
|
-
protected
|
7
|
+
protected readonly _effect: EffectRef;
|
8
|
+
protected readonly _id: string;
|
9
|
+
protected readonly _isLoadingEvent: import("@angular/core").WritableSignal<boolean>;
|
9
10
|
protected _htmlElement: HTMLInputElement;
|
10
11
|
id: import("@angular/core").InputSignal<string>;
|
12
|
+
value: import("@angular/core").InputSignal<string | number | null | undefined>;
|
11
13
|
label: import("@angular/core").InputSignal<string>;
|
12
14
|
placeholder: import("@angular/core").InputSignal<string>;
|
13
15
|
textPosition: import("@angular/core").InputSignal<"center" | "left" | "right">;
|
@@ -29,21 +31,20 @@ export declare class CoerTextarea extends ControlValue implements AfterViewInit
|
|
29
31
|
marginRight: import("@angular/core").InputSignal<string>;
|
30
32
|
marginBottom: import("@angular/core").InputSignal<string>;
|
31
33
|
marginLeft: import("@angular/core").InputSignal<string>;
|
32
|
-
set value(value: string | number | null | undefined);
|
33
34
|
onInput: import("@angular/core").OutputEmitterRef<string>;
|
35
|
+
constructor();
|
34
36
|
ngAfterViewInit(): void;
|
37
|
+
ngOnDestroy(): void;
|
35
38
|
protected get footer(): string;
|
36
39
|
protected _isEnable: import("@angular/core").Signal<boolean>;
|
37
40
|
protected _floatLabel: import("@angular/core").Signal<"auto" | "always">;
|
38
41
|
protected _paddingRight: import("@angular/core").Signal<"0px" | "18px">;
|
39
42
|
/** */
|
40
|
-
private _SetEvents;
|
41
|
-
/** */
|
42
43
|
Focus(select?: boolean, delay?: number): void;
|
43
44
|
/** */
|
44
45
|
Blur(): void;
|
45
46
|
/** */
|
46
47
|
Clear(delay?: number): void;
|
47
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<CoerTextarea, never>;
|
48
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CoerTextarea, "coer-textarea", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "textPosition": { "alias": "textPosition"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "isInvalid": { "alias": "isInvalid"; "required": false; "isSignal": true; }; "isValid": { "alias": "isValid"; "required": false; "isSignal": true; }; "resize": { "alias": "resize"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isReadonly": { "alias": "isReadonly"; "required": false; "isSignal": true; }; "isInvisible": { "alias": "isInvisible"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "marginTop": { "alias": "marginTop"; "required": false; "isSignal": true; }; "marginRight": { "alias": "marginRight"; "required": false; "isSignal": true; }; "marginBottom": { "alias": "marginBottom"; "required": false; "isSignal": true; }; "marginLeft": { "alias": "marginLeft"; "required": false; "isSignal": true; };
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CoerTextarea, "coer-textarea", never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; "label": { "alias": "label"; "required": false; "isSignal": true; }; "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "textPosition": { "alias": "textPosition"; "required": false; "isSignal": true; }; "minLength": { "alias": "minLength"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": false; "isSignal": true; }; "isInvalid": { "alias": "isInvalid"; "required": false; "isSignal": true; }; "isValid": { "alias": "isValid"; "required": false; "isSignal": true; }; "resize": { "alias": "resize"; "required": false; "isSignal": true; }; "showFooter": { "alias": "showFooter"; "required": false; "isSignal": true; }; "isLoading": { "alias": "isLoading"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; "isSignal": true; }; "isReadonly": { "alias": "isReadonly"; "required": false; "isSignal": true; }; "isInvisible": { "alias": "isInvisible"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "minWidth": { "alias": "minWidth"; "required": false; "isSignal": true; }; "maxWidth": { "alias": "maxWidth"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "marginTop": { "alias": "marginTop"; "required": false; "isSignal": true; }; "marginRight": { "alias": "marginRight"; "required": false; "isSignal": true; }; "marginBottom": { "alias": "marginBottom"; "required": false; "isSignal": true; }; "marginLeft": { "alias": "marginLeft"; "required": false; "isSignal": true; }; }, { "onInput": "onInput"; }, never, never, false, never>;
|
49
50
|
}
|
@@ -1289,90 +1289,96 @@ class CoerSelectbox extends ControlValue {
|
|
1289
1289
|
ngAfterViewInit() {
|
1290
1290
|
Tools.Sleep().then(_ => {
|
1291
1291
|
//Container
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1292
|
+
const container = document.getElementById(`${this._id}-container`);
|
1293
|
+
if (container) {
|
1294
|
+
container.addEventListener('mouseenter', () => {
|
1295
|
+
this._isOverMenu.set(true);
|
1296
|
+
});
|
1297
|
+
container.addEventListener('mouseleave', () => {
|
1298
|
+
this._isOverMenu.set(false);
|
1299
|
+
});
|
1300
|
+
}
|
1299
1301
|
//DropDown
|
1300
1302
|
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
1301
|
-
this._dropDownMenu
|
1302
|
-
this.
|
1303
|
-
|
1304
|
-
|
1305
|
-
this.
|
1306
|
-
|
1303
|
+
if (this._dropDownMenu) {
|
1304
|
+
this._dropDownMenu.addEventListener('mouseenter', () => {
|
1305
|
+
this._isOverMenu.set(true);
|
1306
|
+
});
|
1307
|
+
this._dropDownMenu.addEventListener('mouseleave', () => {
|
1308
|
+
this._isOverMenu.set(false);
|
1309
|
+
});
|
1310
|
+
}
|
1307
1311
|
//TextBox
|
1308
1312
|
this._textbox = document.getElementById(this._id);
|
1309
|
-
this._textbox
|
1310
|
-
|
1311
|
-
this.
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
if (
|
1319
|
-
|
1320
|
-
|
1321
|
-
this._index
|
1322
|
-
|
1323
|
-
this.
|
1324
|
-
|
1313
|
+
if (this._textbox) {
|
1314
|
+
this._textbox.addEventListener('focus', () => {
|
1315
|
+
if (this._isEnable())
|
1316
|
+
this.Focus();
|
1317
|
+
else
|
1318
|
+
this.Blur();
|
1319
|
+
});
|
1320
|
+
this._textbox.addEventListener('keyup', (event) => {
|
1321
|
+
const { key } = event;
|
1322
|
+
if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) {
|
1323
|
+
if (key === 'ArrowUp') {
|
1324
|
+
const firstIndex = (this._dataSource().length <= 0) ? -1 : 0;
|
1325
|
+
if ((this._index() - 1) >= firstIndex) {
|
1326
|
+
this._index.update(index => index - 1);
|
1327
|
+
if (this._index() >= 3)
|
1328
|
+
this._scroll.update(scroll => scroll -= this._scrollByRow);
|
1329
|
+
else
|
1330
|
+
this._scroll.set(0);
|
1331
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1332
|
+
}
|
1333
|
+
else {
|
1325
1334
|
this._scroll.set(0);
|
1335
|
+
this._index.set(-1);
|
1336
|
+
this._textbox.focus();
|
1337
|
+
this._textbox.select();
|
1338
|
+
}
|
1326
1339
|
this._dropDownMenu.scrollTo(0, this._scroll());
|
1327
1340
|
}
|
1328
|
-
else {
|
1329
|
-
this.
|
1330
|
-
this._index
|
1331
|
-
|
1332
|
-
|
1341
|
+
else if (key === 'ArrowDown') {
|
1342
|
+
const lastIndex = (this._dataSource().length - 1);
|
1343
|
+
if ((this._index() + 1) <= lastIndex) {
|
1344
|
+
this._index.update(index => index + 1);
|
1345
|
+
if (this._index() >= 3)
|
1346
|
+
this._scroll.update(scroll => scroll += this._scrollByRow);
|
1347
|
+
}
|
1348
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1333
1349
|
}
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
this._scroll.update(scroll => scroll += this._scrollByRow);
|
1350
|
+
else if (['ArrowLeft', 'ArrowRight'].includes(key)) {
|
1351
|
+
if (Tools.IsNotNull(this._value) && !this._isDirty()) {
|
1352
|
+
this._scroll.set(0);
|
1353
|
+
this._dropDownMenu.scrollTo(0, this._scroll());
|
1354
|
+
this._Search(this._displayed);
|
1355
|
+
}
|
1356
|
+
this._isDirty.set(true);
|
1342
1357
|
}
|
1343
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1344
1358
|
}
|
1345
|
-
else
|
1346
|
-
if (
|
1347
|
-
this.
|
1348
|
-
this._dropDownMenu.scrollTo(0, this._scroll());
|
1349
|
-
this._Search(this._displayed);
|
1359
|
+
else {
|
1360
|
+
if (key == 'Delete' && this._search() == '') {
|
1361
|
+
this.Unselect();
|
1350
1362
|
}
|
1351
1363
|
this._isDirty.set(true);
|
1352
1364
|
}
|
1353
|
-
}
|
1354
|
-
else {
|
1355
|
-
if (key == 'Delete' && this._search() == '') {
|
1356
|
-
this.Unselect();
|
1357
|
-
}
|
1358
|
-
this._isDirty.set(true);
|
1359
|
-
}
|
1360
|
-
});
|
1361
|
-
this._textbox.addEventListener('keydown', () => {
|
1362
|
-
if (!this._isOpen())
|
1363
|
-
this._Open();
|
1364
|
-
});
|
1365
|
-
this._textbox.addEventListener('mouseenter', () => {
|
1366
|
-
this._isOverMenu.set(true);
|
1367
|
-
});
|
1368
|
-
this._textbox.addEventListener('mouseleave', () => {
|
1369
|
-
this._isOverMenu.set(false);
|
1370
|
-
});
|
1371
|
-
this._textbox.addEventListener('paste', () => {
|
1372
|
-
Tools.Sleep().then(_ => {
|
1373
|
-
this._search.update(search => search = search.toString().trim());
|
1374
1365
|
});
|
1375
|
-
|
1366
|
+
this._textbox.addEventListener('keydown', () => {
|
1367
|
+
if (!this._isOpen())
|
1368
|
+
this._Open();
|
1369
|
+
});
|
1370
|
+
this._textbox.addEventListener('mouseenter', () => {
|
1371
|
+
this._isOverMenu.set(true);
|
1372
|
+
});
|
1373
|
+
this._textbox.addEventListener('mouseleave', () => {
|
1374
|
+
this._isOverMenu.set(false);
|
1375
|
+
});
|
1376
|
+
this._textbox.addEventListener('paste', () => {
|
1377
|
+
Tools.Sleep().then(_ => {
|
1378
|
+
this._search.update(search => search = search.toString().trim());
|
1379
|
+
});
|
1380
|
+
});
|
1381
|
+
}
|
1376
1382
|
//Document
|
1377
1383
|
document.addEventListener('click', () => {
|
1378
1384
|
if (!this._isOverMenu())
|
@@ -3695,20 +3701,22 @@ class CoerDropdown extends ControlValue {
|
|
3695
3701
|
Tools.Sleep().then(() => {
|
3696
3702
|
//Container
|
3697
3703
|
this._container = document.getElementById(`${this._id}-container`);
|
3698
|
-
this._container
|
3699
|
-
this.
|
3700
|
-
|
3701
|
-
|
3702
|
-
this.
|
3703
|
-
|
3704
|
-
|
3705
|
-
|
3706
|
-
|
3707
|
-
this.
|
3708
|
-
|
3709
|
-
|
3710
|
-
this.
|
3711
|
-
|
3704
|
+
if (this._container) {
|
3705
|
+
this._container.addEventListener('mouseenter', () => {
|
3706
|
+
this._isOverMenu.set(true);
|
3707
|
+
});
|
3708
|
+
this._container.addEventListener('mouseleave', () => {
|
3709
|
+
this._isOverMenu.set(false);
|
3710
|
+
});
|
3711
|
+
//DropDown
|
3712
|
+
this._dropDownMenu = document.getElementById(`${this._id}-dropdown-menu`);
|
3713
|
+
this._dropDownMenu.addEventListener('mouseenter', () => {
|
3714
|
+
this._isOverMenu.set(true);
|
3715
|
+
});
|
3716
|
+
this._dropDownMenu.addEventListener('mouseleave', () => {
|
3717
|
+
this._isOverMenu.set(false);
|
3718
|
+
});
|
3719
|
+
}
|
3712
3720
|
//Document
|
3713
3721
|
document.addEventListener('click', () => {
|
3714
3722
|
if (!this._isOverMenu())
|
@@ -3906,8 +3914,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImpor
|
|
3906
3914
|
}], ctorParameters: () => [] });
|
3907
3915
|
|
3908
3916
|
class CoerTextarea extends ControlValue {
|
3917
|
+
//Constructor
|
3909
3918
|
constructor() {
|
3910
|
-
super(
|
3919
|
+
super();
|
3911
3920
|
//Elements
|
3912
3921
|
this._coerTextBox = viewChild.required('coerTextArea');
|
3913
3922
|
//Variables
|
@@ -3916,6 +3925,7 @@ class CoerTextarea extends ControlValue {
|
|
3916
3925
|
this._isLoadingEvent = signal(false);
|
3917
3926
|
//Inputs
|
3918
3927
|
this.id = input('');
|
3928
|
+
this.value = input(null);
|
3919
3929
|
this.label = input('');
|
3920
3930
|
this.placeholder = input('');
|
3921
3931
|
this.textPosition = input('left');
|
@@ -3952,22 +3962,12 @@ class CoerTextarea extends ControlValue {
|
|
3952
3962
|
return this.isInvalid() || this.isValid()
|
3953
3963
|
? '18px' : '0px';
|
3954
3964
|
});
|
3955
|
-
|
3956
|
-
|
3957
|
-
|
3958
|
-
value = '';
|
3959
|
-
this.SetValue(value);
|
3965
|
+
this._effect = effect(() => {
|
3966
|
+
this.SetValue(Tools.IsNotNull(this.value()) ? this.value() : '');
|
3967
|
+
});
|
3960
3968
|
}
|
3961
3969
|
//AfterViewInit
|
3962
3970
|
ngAfterViewInit() {
|
3963
|
-
this._SetEvents();
|
3964
|
-
}
|
3965
|
-
//getter
|
3966
|
-
get footer() {
|
3967
|
-
return `${Tools.IsNotNull(this._value) ? String(this._value).length : '0'} / ${this.maxLength()}`;
|
3968
|
-
}
|
3969
|
-
/** */
|
3970
|
-
_SetEvents() {
|
3971
3971
|
Tools.Sleep().then(() => {
|
3972
3972
|
this._htmlElement = document.getElementById(this._id);
|
3973
3973
|
if (this._htmlElement) {
|
@@ -3991,6 +3991,14 @@ class CoerTextarea extends ControlValue {
|
|
3991
3991
|
}
|
3992
3992
|
});
|
3993
3993
|
}
|
3994
|
+
//OnDestroy
|
3995
|
+
ngOnDestroy() {
|
3996
|
+
this._effect?.destroy();
|
3997
|
+
}
|
3998
|
+
//getter
|
3999
|
+
get footer() {
|
4000
|
+
return `${Tools.IsNotNull(this._value) ? String(this._value).length : '0'} / ${this.maxLength()}`;
|
4001
|
+
}
|
3994
4002
|
/** */
|
3995
4003
|
Focus(select = false, delay = 0) {
|
3996
4004
|
if (this._isLoadingEvent())
|
@@ -4029,15 +4037,13 @@ class CoerTextarea extends ControlValue {
|
|
4029
4037
|
this.SetValue('');
|
4030
4038
|
this.Focus(false, delay);
|
4031
4039
|
}
|
4032
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextarea, deps:
|
4033
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextarea, isStandalone: false, selector: "coer-textarea", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null }
|
4040
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextarea, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
4041
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.1", type: CoerTextarea, isStandalone: false, selector: "coer-textarea", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, placeholder: { classPropertyName: "placeholder", publicName: "placeholder", isSignal: true, isRequired: false, transformFunction: null }, textPosition: { classPropertyName: "textPosition", publicName: "textPosition", isSignal: true, isRequired: false, transformFunction: null }, minLength: { classPropertyName: "minLength", publicName: "minLength", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: false, transformFunction: null }, isInvalid: { classPropertyName: "isInvalid", publicName: "isInvalid", isSignal: true, isRequired: false, transformFunction: null }, isValid: { classPropertyName: "isValid", publicName: "isValid", isSignal: true, isRequired: false, transformFunction: null }, resize: { classPropertyName: "resize", publicName: "resize", isSignal: true, isRequired: false, transformFunction: null }, showFooter: { classPropertyName: "showFooter", publicName: "showFooter", isSignal: true, isRequired: false, transformFunction: null }, isLoading: { classPropertyName: "isLoading", publicName: "isLoading", isSignal: true, isRequired: false, transformFunction: null }, isDisabled: { classPropertyName: "isDisabled", publicName: "isDisabled", isSignal: true, isRequired: false, transformFunction: null }, isReadonly: { classPropertyName: "isReadonly", publicName: "isReadonly", isSignal: true, isRequired: false, transformFunction: null }, isInvisible: { classPropertyName: "isInvisible", publicName: "isInvisible", isSignal: true, isRequired: false, transformFunction: null }, width: { classPropertyName: "width", publicName: "width", isSignal: true, isRequired: false, transformFunction: null }, minWidth: { classPropertyName: "minWidth", publicName: "minWidth", isSignal: true, isRequired: false, transformFunction: null }, maxWidth: { classPropertyName: "maxWidth", publicName: "maxWidth", isSignal: true, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, marginTop: { classPropertyName: "marginTop", publicName: "marginTop", isSignal: true, isRequired: false, transformFunction: null }, marginRight: { classPropertyName: "marginRight", publicName: "marginRight", isSignal: true, isRequired: false, transformFunction: null }, marginBottom: { classPropertyName: "marginBottom", publicName: "marginBottom", isSignal: true, isRequired: false, transformFunction: null }, marginLeft: { classPropertyName: "marginLeft", publicName: "marginLeft", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { onInput: "onInput" }, providers: [CONTROL_VALUE(CoerTextarea)], viewQueries: [{ propertyName: "_coerTextBox", first: true, predicate: ["coerTextArea"], descendants: true, isSignal: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <textarea #coerTextArea matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextArea.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'default',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition(),\r\n 'resize' : (!resize() || !_isEnable()) ? 'none' : '',\r\n 'height' : height()\r\n }\"></textarea>\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(showFooter()) {\r\n <footer> {{ footer }} </footer>\r\n }\r\n</div>", styles: ["div.coer-textarea mat-form-field{position:relative!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;padding:0!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix textarea{font-weight:400!important;font-size:17px!important;color:var(--black)!important;min-height:80px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-textarea mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-textarea mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-textarea mat-form-field span.icon-container i{font-size:20px!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-textarea mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-textarea mat-form-field .placeholder,div.coer-textarea mat-form-field .placeholder *,div.coer-textarea mat-form-field .placeholder-glow,div.coer-textarea mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-textarea footer{padding-top:2px;text-align:right;font-size:10px;color:var(--gray)}div.coer-textarea mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: i2$4.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2$4.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3$3.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"] }] }); }
|
4034
4042
|
}
|
4035
4043
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.1", ngImport: i0, type: CoerTextarea, decorators: [{
|
4036
4044
|
type: Component,
|
4037
4045
|
args: [{ selector: 'coer-textarea', providers: [CONTROL_VALUE(CoerTextarea)], standalone: false, template: "<div class=\"coer-textarea\">\r\n <mat-form-field\r\n [id]=\"_id + '-container'\"\r\n [floatLabel]=\"_floatLabel()\"\r\n [ngClass]=\"{\r\n 'readonly': isReadonly() && !isLoading()\r\n }\"\r\n [style]=\"{\r\n 'width': width(),\r\n 'min-width': minWidth(),\r\n 'max-width': maxWidth(),\r\n 'margin-top': marginTop(),\r\n 'margin-right': marginRight(),\r\n 'margin-bottom': marginBottom(),\r\n 'margin-left': marginLeft()\r\n }\">\r\n <mat-label>{{ label() }}</mat-label>\r\n\r\n <textarea #coerTextArea matInput\r\n [id]=\"_id\"\r\n type=\"text\"\r\n [placeholder]=\"placeholder()\"\r\n [minLength]=\"minLength()\"\r\n [maxLength]=\"maxLength()\"\r\n [disabled]=\"!_isEnable()\"\r\n [value]=\"_value\"\r\n (input)=\"SetValue(coerTextArea.value)\"\r\n (blur)=\"SetTouched(true)\"\r\n [style]=\"{\r\n 'cursor' : isLoading() ? 'wait' : 'default',\r\n 'margin-top' : (_floatLabel() == 'auto') ? '15px' : '9px',\r\n 'padding-right': _paddingRight(),\r\n 'text-align' : textPosition(),\r\n 'resize' : (!resize() || !_isEnable()) ? 'none' : '',\r\n 'height' : height()\r\n }\"></textarea>\r\n\r\n @if(isLoading()) {\r\n <div class=\"placeholder-glow\">\r\n <span class=\"placeholder\"></span>\r\n </div>\r\n }\r\n\r\n <span ngClass=\"icon-container\">\r\n @if(isInvalid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-exclamation\"></i>\r\n }\r\n\r\n @else if(isValid() && !isDisabled() && !isLoading()) {\r\n <i class=\"fa-solid fa-circle-check text-green\"></i>\r\n }\r\n </span>\r\n </mat-form-field>\r\n\r\n @if(showFooter()) {\r\n <footer> {{ footer }} </footer>\r\n }\r\n</div>", styles: ["div.coer-textarea mat-form-field{position:relative!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix{width:100%!important;padding:0!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label{overflow:visible!important;position:absolute!important;top:20px!important}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix label.mdc-floating-label--float-above mat-label{color:var(--primary-inner);font-weight:700;position:relative;left:-10px;top:2px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mat-mdc-form-field-flex div.mat-mdc-form-field-infix textarea{font-weight:400!important;font-size:17px!important;color:var(--black)!important;min-height:80px}div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:before,div.coer-textarea mat-form-field div.mat-mdc-text-field-wrapper.mdc-text-field div.mdc-line-ripple.mdc-line-ripple--active:after{border-bottom-color:var(--primary-inner)!important}div.coer-textarea mat-form-field div.mat-mdc-form-field-subscript-wrapper.mat-mdc-form-field-bottom-align{height:0px!important}div.coer-textarea mat-form-field span.icon-container{position:absolute!important;top:1px!important;right:-14px!important;z-index:5!important;width:30px;height:40px;display:flex;align-items:center;justify-content:center}div.coer-textarea mat-form-field span.icon-container i{font-size:20px!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass{color:#caced1!important;cursor:pointer!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-xmark:hover,div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-magnifying-glass:hover{color:#6c757d!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-check{color:var(--green)!important}div.coer-textarea mat-form-field span.icon-container i.fa-solid.fa-circle-exclamation{color:var(--red)!important}div.coer-textarea mat-form-field span.placeholder{width:calc(100% + 32px)!important;height:100%!important;position:absolute!important;z-index:1!important;top:0!important;left:-16px!important;cursor:wait!important}div.coer-textarea mat-form-field .placeholder,div.coer-textarea mat-form-field .placeholder *,div.coer-textarea mat-form-field .placeholder-glow,div.coer-textarea mat-form-field .placeholder-glow *{cursor:wait!important}div.coer-textarea footer{padding-top:2px;text-align:right;font-size:10px;color:var(--gray)}div.coer-textarea mat-form-field.readonly div.mat-mdc-text-field-wrapper.mdc-text-field{background-color:#bbbbbb83!important}\n"] }]
|
4038
|
-
}],
|
4039
|
-
type: Input
|
4040
|
-
}] } });
|
4046
|
+
}], ctorParameters: () => [] });
|
4041
4047
|
|
4042
4048
|
class CoerToolbar {
|
4043
4049
|
constructor() {
|