@wizishop/angular-components 15.1.68 → 15.1.70
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/angular-components.scss +71 -34
- package/esm2020/lib/components/tabs/tabs.component.mjs +33 -32
- package/esm2020/lib/components/text-area/text-area.component.mjs +5 -3
- package/fesm2015/wizishop-angular-components.mjs +36 -35
- package/fesm2015/wizishop-angular-components.mjs.map +1 -1
- package/fesm2020/wizishop-angular-components.mjs +36 -34
- package/fesm2020/wizishop-angular-components.mjs.map +1 -1
- package/lib/components/tabs/tabs.component.d.ts +15 -10
- package/lib/components/text-area/text-area.component.d.ts +2 -1
- package/package.json +1 -1
- package/wizishop-angular-components-15.1.70.tgz +0 -0
- package/wizishop-angular-components-15.1.68.tgz +0 -0
|
@@ -8,7 +8,7 @@ import * as i2 from '@angular/forms';
|
|
|
8
8
|
import { NG_VALUE_ACCESSOR, FormsModule, FormGroupDirective, ReactiveFormsModule } from '@angular/forms';
|
|
9
9
|
import * as i4 from 'ngx-perfect-scrollbar';
|
|
10
10
|
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
|
|
11
|
-
import { Subject, merge, takeUntil as takeUntil$1, startWith, fromEvent, ReplaySubject,
|
|
11
|
+
import { Subject, merge, takeUntil as takeUntil$1, startWith, fromEvent, ReplaySubject, BehaviorSubject, combineLatest, switchMap, distinctUntilChanged as distinctUntilChanged$1, delay, map as map$1, interval, tap as tap$1 } from 'rxjs';
|
|
12
12
|
import { takeUntil, debounceTime, distinctUntilChanged, tap, filter, map, takeWhile } from 'rxjs/operators';
|
|
13
13
|
import * as i1$1 from '@angular/cdk/overlay';
|
|
14
14
|
import { TAB, DOWN_ARROW, UP_ARROW, LEFT_ARROW, RIGHT_ARROW, A, Z, ZERO, NINE, ENTER, hasModifierKey, ESCAPE } from '@angular/cdk/keycodes';
|
|
@@ -1996,37 +1996,38 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
1996
1996
|
}] } });
|
|
1997
1997
|
|
|
1998
1998
|
class TabsComponent {
|
|
1999
|
-
get selectedIndex() {
|
|
2000
|
-
return this._selectedIndex;
|
|
2001
|
-
}
|
|
2002
|
-
set selectedIndex(selectedIndex) {
|
|
2003
|
-
if (this.disabled) {
|
|
2004
|
-
return;
|
|
2005
|
-
}
|
|
2006
|
-
this.setIndex(null, selectedIndex);
|
|
2007
|
-
}
|
|
2008
1999
|
constructor(changeDetectorRef) {
|
|
2009
2000
|
this.changeDetectorRef = changeDetectorRef;
|
|
2010
|
-
this._selectedIndex = 0;
|
|
2011
2001
|
this.disabled = false;
|
|
2002
|
+
this.index$ = new BehaviorSubject(0);
|
|
2003
|
+
this.tabList$ = new ReplaySubject(1);
|
|
2004
|
+
this.listIsOpen$ = new BehaviorSubject(false);
|
|
2005
|
+
this.onChange = (selectedIndex) => { };
|
|
2006
|
+
this.onTouched = () => { };
|
|
2007
|
+
this.viewModel$ = combineLatest({
|
|
2008
|
+
index: this.index$,
|
|
2009
|
+
tabList: this.tabList$.pipe(switchMap((tabList) => {
|
|
2010
|
+
return tabList.changes.pipe(startWith(tabList));
|
|
2011
|
+
})),
|
|
2012
|
+
listIsOpen: this.listIsOpen$.pipe(distinctUntilChanged$1())
|
|
2013
|
+
}).pipe(delay(0), map$1((data) => {
|
|
2014
|
+
let selected = this.setIndex(data.index, data.tabList);
|
|
2015
|
+
this.changeDetectorRef.markForCheck();
|
|
2016
|
+
return { ...data, selected };
|
|
2017
|
+
}));
|
|
2012
2018
|
this.underline = false;
|
|
2013
2019
|
this.button = false;
|
|
2014
2020
|
this.right = false;
|
|
2015
2021
|
this.marginBottom = '30px';
|
|
2016
|
-
this.listIsOpen = false;
|
|
2017
|
-
this.onTouched = () => { };
|
|
2018
|
-
this.onChange = (selectedIndex) => { };
|
|
2019
2022
|
}
|
|
2020
2023
|
ngAfterViewInit() {
|
|
2021
|
-
|
|
2022
|
-
this.setIndex(null, this._selectedIndex);
|
|
2023
|
-
}, 0);
|
|
2024
|
+
this.tabList$.next(this.tabList);
|
|
2024
2025
|
}
|
|
2025
2026
|
writeValue(selectedIndex) {
|
|
2026
2027
|
if (!selectedIndex) {
|
|
2027
2028
|
return;
|
|
2028
2029
|
}
|
|
2029
|
-
this.selectedIndex
|
|
2030
|
+
this.index$.next(selectedIndex);
|
|
2030
2031
|
}
|
|
2031
2032
|
registerOnChange(onChange) {
|
|
2032
2033
|
this.onChange = onChange;
|
|
@@ -2041,31 +2042,33 @@ class TabsComponent {
|
|
|
2041
2042
|
this.disabled = disabled;
|
|
2042
2043
|
this.changeDetectorRef.markForCheck();
|
|
2043
2044
|
}
|
|
2044
|
-
setIndex(
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
this.tabList?.forEach((tab, index) => {
|
|
2045
|
+
setIndex(currentIndex, tabList) {
|
|
2046
|
+
let selected = null;
|
|
2047
|
+
tabList.forEach((tab, index) => {
|
|
2048
2048
|
tab.selected = currentIndex === index;
|
|
2049
|
-
|
|
2049
|
+
selected = (currentIndex === index ? tab : selected);
|
|
2050
2050
|
});
|
|
2051
|
-
this.
|
|
2052
|
-
|
|
2051
|
+
this.onChange(currentIndex);
|
|
2052
|
+
return selected;
|
|
2053
2053
|
}
|
|
2054
2054
|
openList($event) {
|
|
2055
2055
|
$event?.stopPropagation();
|
|
2056
|
-
this.listIsOpen
|
|
2056
|
+
this.listIsOpen$.next(!this.listIsOpen$.getValue());
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
2059
|
TabsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TabsComponent, deps: [{ token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
2060
2060
|
TabsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: TabsComponent, isStandalone: true, selector: "wac-tabs", inputs: { underline: "underline", button: "button", right: "right", marginBottom: "marginBottom" }, providers: [
|
|
2061
2061
|
{ provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
|
|
2062
|
-
], queries: [{ propertyName: "tabList", predicate: TabComponent }], ngImport: i0, template: "<div class=\"wac-tabs\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen
|
|
2062
|
+
], queries: [{ propertyName: "tabList", predicate: TabComponent }], ngImport: i0, template: "<div class=\"wac-tabs\"\n *ngIf=\"viewModel$ | async as viewModel\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen$.next(false)\"\n [triggerElement]=\"'wac-select__header__selection'\"\n> \n <div *ngIf=\"tabList.length > 1\" class=\"wac-tabs__mobile\" (click)=\"openList($event)\">\n <div>{{ viewModel.selected?.label }}</div><i [class]=\"'fa-solid fa-caret-' + (viewModel.listIsOpen ? 'up' : 'down')\"></i>\n </div>\n <div *ngIf=\"tabList.length > 1\" class=\"wac-tabs__wrapper\" [ngClass]=\"{ 'open' : viewModel.listIsOpen }\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabList; let i = index\"\n class=\"wac-tabs__wrapper__tab\"\n [ngClass]=\"{'wac-tabs__wrapper__tab--selected': i === viewModel.index}\"\n (click)=\"index$.next(i); listIsOpen$.next(false)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n<ng-content></ng-content>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "ngmodule", type: SharedDirectives }, { kind: "directive", type: AutoHideDirective, selector: "[wzAutoHide]", inputs: ["triggerElement", "forceOn"], outputs: ["clickOutside"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
2063
2063
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TabsComponent, decorators: [{
|
|
2064
2064
|
type: Component,
|
|
2065
2065
|
args: [{ selector: 'wac-tabs', encapsulation: ViewEncapsulation.None, standalone: true, imports: [CommonModule, FormsModule, TabComponent, SharedDirectives], providers: [
|
|
2066
2066
|
{ provide: NG_VALUE_ACCESSOR, useExisting: TabsComponent, multi: true },
|
|
2067
|
-
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wac-tabs\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen
|
|
2068
|
-
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: {
|
|
2067
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"wac-tabs\"\n *ngIf=\"viewModel$ | async as viewModel\"\n [ngClass]=\"{'wac-tabs--underline': underline, 'wac-tabs--button' : button, 'wac-tabs--right' : right}\"\n wzAutoHide\n (clickOutside)=\"listIsOpen$.next(false)\"\n [triggerElement]=\"'wac-select__header__selection'\"\n> \n <div *ngIf=\"tabList.length > 1\" class=\"wac-tabs__mobile\" (click)=\"openList($event)\">\n <div>{{ viewModel.selected?.label }}</div><i [class]=\"'fa-solid fa-caret-' + (viewModel.listIsOpen ? 'up' : 'down')\"></i>\n </div>\n <div *ngIf=\"tabList.length > 1\" class=\"wac-tabs__wrapper\" [ngClass]=\"{ 'open' : viewModel.listIsOpen }\" [ngStyle]=\"{'margin-bottom': marginBottom}\">\n <a\n *ngFor=\"let tab of tabList; let i = index\"\n class=\"wac-tabs__wrapper__tab\"\n [ngClass]=\"{'wac-tabs__wrapper__tab--selected': i === viewModel.index}\"\n (click)=\"index$.next(i); listIsOpen$.next(false)\"\n >\n {{ tab.label }}\n </a>\n </div>\n</div>\n<ng-content></ng-content>" }]
|
|
2068
|
+
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }]; }, propDecorators: { tabList: [{
|
|
2069
|
+
type: ContentChildren,
|
|
2070
|
+
args: [TabComponent]
|
|
2071
|
+
}], underline: [{
|
|
2069
2072
|
type: Input
|
|
2070
2073
|
}], button: [{
|
|
2071
2074
|
type: Input
|
|
@@ -2073,9 +2076,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
2073
2076
|
type: Input
|
|
2074
2077
|
}], marginBottom: [{
|
|
2075
2078
|
type: Input
|
|
2076
|
-
}], tabList: [{
|
|
2077
|
-
type: ContentChildren,
|
|
2078
|
-
args: [TabComponent]
|
|
2079
2079
|
}] } });
|
|
2080
2080
|
|
|
2081
2081
|
class ButtonComponent {
|
|
@@ -2960,7 +2960,7 @@ class TextAreaComponent {
|
|
|
2960
2960
|
}
|
|
2961
2961
|
}
|
|
2962
2962
|
TextAreaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TextAreaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
2963
|
-
TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: TextAreaComponent, isStandalone: true, selector: "wac-text-area", inputs: { label: "label", value: "value", placeholder: "placeholder", textInfo: "textInfo", textError: "textError", error: "error", success: "success", size: "size", min: "min", max: "max", dynamicSize: "dynamicSize", progressBar: "progressBar", disabled: "disabled", maxlength: "maxlength", minlength: "minlength", disableResize: "disableResize" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], ngImport: i0, template: "<div class=\"field wac-text-area\" [ngClass]=\"{'dynamic': dynamicSize}\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': (textError || error || success) && !disabled }\">\n <textarea\n [class]=\"'textarea' + (disableResize ? ' no-resize' : '')\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': (textError || error) && !disabled, 'is-empty': value === '', 'is-success': success && !disabled, 'has-help-text': textInfo !== '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n [autosize]=\"dynamicSize\"\n [onlyGrow]=\"true\"\n [maxlength]=\"maxlength ? maxlength : 524288\"\n [minlength]=\"minlength ? minlength : 0\"\n ></textarea>\n <!-- Icon error -->\n <span *ngIf=\"(textError || error) && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <!-- Icon success -->\n <span *ngIf=\"success && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n ><strong>{{ value ? value.length : 0 }}</strong> / {{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ProgressBarComponent, selector: "wac-progress-bar", inputs: ["valueLength", "min", "max"] }, { kind: "ngmodule", type: AutosizeModule }, { kind: "directive", type: i3$1.AutosizeDirective, selector: "[autosize]", inputs: ["minRows", "autosize", "maxRows", "onlyGrow", "useImportant"], outputs: ["resized"] }] });
|
|
2963
|
+
TextAreaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.1.1", type: TextAreaComponent, isStandalone: true, selector: "wac-text-area", inputs: { label: "label", value: "value", placeholder: "placeholder", textInfo: "textInfo", textError: "textError", error: "error", success: "success", size: "size", min: "min", max: "max", minHeight: "minHeight", dynamicSize: "dynamicSize", progressBar: "progressBar", disabled: "disabled", maxlength: "maxlength", minlength: "minlength", disableResize: "disableResize" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], ngImport: i0, template: "<div class=\"field wac-text-area\" [ngClass]=\"{'dynamic': dynamicSize}\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': (textError || error || success) && !disabled }\">\n <textarea\n [class]=\"'textarea' + (disableResize ? ' no-resize' : '')\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': (textError || error) && !disabled, 'is-empty': value === '', 'is-success': success && !disabled, 'has-help-text': textInfo !== '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [style.minHeight]=\"minHeight\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n [autosize]=\"dynamicSize\"\n [onlyGrow]=\"true\"\n [maxlength]=\"maxlength ? maxlength : 524288\"\n [minlength]=\"minlength ? minlength : 0\"\n ></textarea>\n <!-- Icon error -->\n <span *ngIf=\"(textError || error) && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <!-- Icon success -->\n <span *ngIf=\"success && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n ><strong>{{ value ? value.length : 0 }}</strong> / {{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.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: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MinLengthValidator, selector: "[minlength][formControlName],[minlength][formControl],[minlength][ngModel]", inputs: ["minlength"] }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ProgressBarComponent, selector: "wac-progress-bar", inputs: ["valueLength", "min", "max"] }, { kind: "ngmodule", type: AutosizeModule }, { kind: "directive", type: i3$1.AutosizeDirective, selector: "[autosize]", inputs: ["minRows", "autosize", "maxRows", "onlyGrow", "useImportant"], outputs: ["resized"] }] });
|
|
2964
2964
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImport: i0, type: TextAreaComponent, decorators: [{
|
|
2965
2965
|
type: Component,
|
|
2966
2966
|
args: [{ selector: 'wac-text-area', standalone: true, imports: [
|
|
@@ -2968,7 +2968,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
2968
2968
|
FormsModule,
|
|
2969
2969
|
ProgressBarComponent,
|
|
2970
2970
|
AutosizeModule
|
|
2971
|
-
], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], template: "<div class=\"field wac-text-area\" [ngClass]=\"{'dynamic': dynamicSize}\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': (textError || error || success) && !disabled }\">\n <textarea\n [class]=\"'textarea' + (disableResize ? ' no-resize' : '')\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': (textError || error) && !disabled, 'is-empty': value === '', 'is-success': success && !disabled, 'has-help-text': textInfo !== '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n [autosize]=\"dynamicSize\"\n [onlyGrow]=\"true\"\n [maxlength]=\"maxlength ? maxlength : 524288\"\n [minlength]=\"minlength ? minlength : 0\"\n ></textarea>\n <!-- Icon error -->\n <span *ngIf=\"(textError || error) && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <!-- Icon success -->\n <span *ngIf=\"success && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n ><strong>{{ value ? value.length : 0 }}</strong> / {{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n" }]
|
|
2971
|
+
], providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: TextAreaComponent, multi: true }], template: "<div class=\"field wac-text-area\" [ngClass]=\"{'dynamic': dynamicSize}\">\n <div class=\"field-label is-normal has-text-left\">\n <label class=\"label has-text-weight-normal\" [innerHTML]=\"label\" [for]=\"id\"></label>\n </div>\n <div class=\"field-body\">\n <div class=\"field\">\n <p class=\"control\" [ngClass]=\"{ 'has-icons-right': (textError || error || success) && !disabled }\">\n <textarea\n [class]=\"'textarea' + (disableResize ? ' no-resize' : '')\"\n [id]=\"id\"\n [ngClass]=\"{ 'is-danger': (textError || error) && !disabled, 'is-empty': value === '', 'is-success': success && !disabled, 'has-help-text': textInfo !== '' || size }\"\n [placeholder]=\"placeholder\"\n [attr.size]=\"size\"\n [style.minHeight]=\"minHeight\"\n [(ngModel)]=\"value\"\n (ngModelChange)=\"onChange($event)\"\n (blur)=\"onBlur()\"\n [disabled]=\"disabled\"\n [autosize]=\"dynamicSize\"\n [onlyGrow]=\"true\"\n [maxlength]=\"maxlength ? maxlength : 524288\"\n [minlength]=\"minlength ? minlength : 0\"\n ></textarea>\n <!-- Icon error -->\n <span *ngIf=\"(textError || error) && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fal fa-times has-text-danger\"></i>\n </span>\n <!-- Icon success -->\n <span *ngIf=\"success && !disabled\" class=\"icon is-small is-right\">\n <i class=\"fas fa-check has-text-success\"></i>\n </span>\n <span\n *ngIf=\"textInfo && (textError === null || textError === '')\"\n class=\"is-size-7 wac-text-area__info text-info\"\n [innerHtml]=\"textInfo\"\n ></span>\n <span *ngIf=\"textError\" class=\"is-size-7 wac-text-area__error has-text-danger\" [innerHtml]=\"textError\"></span>\n <span\n *ngIf=\"size && !progressBar\"\n class=\"is-size-7 wac-text-area__size\"\n [ngClass]=\"value && value.length > size ? 'has-text-danger' : ''\"\n ><strong>{{ value ? value.length : 0 }}</strong> / {{ size }}</span\n >\n </p>\n <wac-progress-bar *ngIf=\"progressBar && value\" [min]=\"min\" [max]=\"max\" [valueLength]=\"value.length\"></wac-progress-bar>\n </div>\n </div>\n</div>\n" }]
|
|
2972
2972
|
}], propDecorators: { label: [{
|
|
2973
2973
|
type: Input
|
|
2974
2974
|
}], value: [{
|
|
@@ -2989,6 +2989,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.1.1", ngImpor
|
|
|
2989
2989
|
type: Input
|
|
2990
2990
|
}], max: [{
|
|
2991
2991
|
type: Input
|
|
2992
|
+
}], minHeight: [{
|
|
2993
|
+
type: Input
|
|
2992
2994
|
}], dynamicSize: [{
|
|
2993
2995
|
type: Input
|
|
2994
2996
|
}], progressBar: [{
|