@gerandon/ngx-widgets 18.0.8 → 19.0.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +2 -2
- package/fesm2022/gerandon-ngx-widgets.mjs +60 -82
- package/fesm2022/gerandon-ngx-widgets.mjs.map +1 -1
- package/gerandon-ngx-widgets-19.0.0.tgz +0 -0
- package/lib/basic-chips/basic-chips.component.d.ts +2 -2
- package/lib/basic-input/basic-input.component.d.ts +2 -2
- package/lib/core/base-input.d.ts +9 -9
- package/lib/core/base-text-input.d.ts +3 -3
- package/lib/core/base-value-accessor.d.ts +2 -2
- package/lib/select/select.component.d.ts +3 -3
- package/lib/textarea-input/textarea-input.component.d.ts +2 -2
- package/package.json +4 -6
- package/esm2022/gerandon-ngx-widgets.mjs +0 -5
- package/esm2022/lib/basic-chips/basic-chips.component.mjs +0 -80
- package/esm2022/lib/basic-input/basic-input.component.mjs +0 -43
- package/esm2022/lib/core/base-input.mjs +0 -81
- package/esm2022/lib/core/base-text-input.mjs +0 -20
- package/esm2022/lib/core/base-value-accessor.mjs +0 -63
- package/esm2022/lib/core/component-unsubscribe.mjs +0 -54
- package/esm2022/lib/select/select.component.mjs +0 -61
- package/esm2022/lib/textarea-input/textarea-input.component.mjs +0 -39
- package/esm2022/public-api.mjs +0 -12
- package/gerandon-ngx-widgets-18.0.8.tgz +0 -0
@@ -1,81 +0,0 @@
|
|
1
|
-
import { Directive, Inject, InjectionToken, Input, Optional, } from '@angular/core';
|
2
|
-
import { BaseValueAccessor } from './base-value-accessor';
|
3
|
-
import { isEmpty, keys } from 'lodash-es';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export const NGX_WIDGETS_VALIDATION_TRANSLATIONS = new InjectionToken('NGX_WIDGETS_VALIDATION_TRANSLATIONS');
|
6
|
-
export class BaseInput extends BaseValueAccessor {
|
7
|
-
constructor(validationTranslations = {}) {
|
8
|
-
super();
|
9
|
-
this.validationTranslations = validationTranslations;
|
10
|
-
this.isDisabled = false;
|
11
|
-
this.floatLabel = 'auto';
|
12
|
-
this.subscriptSizing = 'fixed';
|
13
|
-
this.hintLabel = '';
|
14
|
-
this.validatorMessagesArray = [];
|
15
|
-
}
|
16
|
-
ngOnInit() {
|
17
|
-
this.placeholder = this.placeholder === undefined ? this.label : this.placeholder;
|
18
|
-
if (!this.name) {
|
19
|
-
this.name = this.formControlName;
|
20
|
-
/*
|
21
|
-
console.warn(`name attribute is not defined for ${this.formControlName}! Please beware, that using this control multiple
|
22
|
-
times with the same control name could result in wrong focus, clicking on the label!`);
|
23
|
-
*/
|
24
|
-
}
|
25
|
-
// *ngIf seems like does not re-render component when label is used with dynamic value (e.g.: translate pipe). Strange
|
26
|
-
this.label = this.label || ' ';
|
27
|
-
}
|
28
|
-
ngOnChanges(changes) {
|
29
|
-
if (changes['validatorMessages']) {
|
30
|
-
if (!isEmpty(this.validatorMessages)) {
|
31
|
-
this.validatorMessagesArray = keys(this.validatorMessages).map((key) => ({
|
32
|
-
key,
|
33
|
-
value: this.validatorMessages[key],
|
34
|
-
}));
|
35
|
-
}
|
36
|
-
}
|
37
|
-
}
|
38
|
-
ngAfterViewInit() {
|
39
|
-
super.ngAfterViewInit();
|
40
|
-
this.cdr.detectChanges();
|
41
|
-
}
|
42
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseInput, deps: [{ token: NGX_WIDGETS_VALIDATION_TRANSLATIONS, optional: true }], target: i0.ɵɵFactoryTarget.Directive }); }
|
43
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: BaseInput, inputs: { id: "id", name: "name", label: "label", translateParams: "translateParams", placeholder: "placeholder", isDisabled: "isDisabled", floatLabel: "floatLabel", prefixIcon: "prefixIcon", suffixIcon: "suffixIcon", suffix: "suffix", formControlName: "formControlName", validatorMessages: "validatorMessages", subscriptSizing: "subscriptSizing", hintLabel: "hintLabel" }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); }
|
44
|
-
}
|
45
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseInput, decorators: [{
|
46
|
-
type: Directive
|
47
|
-
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
48
|
-
type: Optional
|
49
|
-
}, {
|
50
|
-
type: Inject,
|
51
|
-
args: [NGX_WIDGETS_VALIDATION_TRANSLATIONS]
|
52
|
-
}] }], propDecorators: { id: [{
|
53
|
-
type: Input
|
54
|
-
}], name: [{
|
55
|
-
type: Input
|
56
|
-
}], label: [{
|
57
|
-
type: Input
|
58
|
-
}], translateParams: [{
|
59
|
-
type: Input
|
60
|
-
}], placeholder: [{
|
61
|
-
type: Input
|
62
|
-
}], isDisabled: [{
|
63
|
-
type: Input
|
64
|
-
}], floatLabel: [{
|
65
|
-
type: Input
|
66
|
-
}], prefixIcon: [{
|
67
|
-
type: Input
|
68
|
-
}], suffixIcon: [{
|
69
|
-
type: Input
|
70
|
-
}], suffix: [{
|
71
|
-
type: Input
|
72
|
-
}], formControlName: [{
|
73
|
-
type: Input
|
74
|
-
}], validatorMessages: [{
|
75
|
-
type: Input
|
76
|
-
}], subscriptSizing: [{
|
77
|
-
type: Input
|
78
|
-
}], hintLabel: [{
|
79
|
-
type: Input
|
80
|
-
}] } });
|
81
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC13aWRnZXRzL3NyYy9saWIvY29yZS9iYXNlLWlucHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxTQUFTLEVBQUUsTUFBTSxFQUFVLGNBQWMsRUFDekMsS0FBSyxFQUNHLFFBQVEsR0FDakIsTUFBTSxlQUFlLENBQUM7QUFHdkIsT0FBTyxFQUFFLGlCQUFpQ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G4gICAgICAgIHRoaXMudmFsaWRhdG9yTWVzc2FnZXNBcnJheSA9IGtleXModGhpcy52YWxpZGF0b3JNZXNzYWdlcykubWFwKChrZXkpID0+ICh7XHJcbiAgICAgICAgICBrZXksXHJcbiAgICAgICAgICB2YWx1ZTogdGhpcy52YWxpZGF0b3JNZXNzYWdlcyFba2V5XSxcclxuICAgICAgICB9KSk7XHJcbiAgICAgIH1cclxuICAgIH1cclxuICB9XHJcblxyXG4gIG92ZXJyaWRlIG5nQWZ0ZXJWaWV3SW5pdCgpIHtcclxuICAgIHN1cGVyLm5nQWZ0ZXJWaWV3SW5pdCgpO1xyXG4gICAgdGhpcy5jZHIuZGV0ZWN0Q2hhbmdlcygpO1xyXG4gIH1cclxufVxyXG4iXX0=
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { Directive, Input, } from '@angular/core';
|
2
|
-
import { BaseInput } from './base-input';
|
3
|
-
import * as i0 from "@angular/core";
|
4
|
-
export class BaseTextInput extends BaseInput {
|
5
|
-
constructor() {
|
6
|
-
super(...arguments);
|
7
|
-
this.type = 'text';
|
8
|
-
this.maxLength = 512;
|
9
|
-
}
|
10
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseTextInput, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
11
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: BaseTextInput, inputs: { type: "type", maxLength: "maxLength" }, usesInheritance: true, ngImport: i0 }); }
|
12
|
-
}
|
13
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseTextInput, decorators: [{
|
14
|
-
type: Directive
|
15
|
-
}], propDecorators: { type: [{
|
16
|
-
type: Input
|
17
|
-
}], maxLength: [{
|
18
|
-
type: Input
|
19
|
-
}] } });
|
20
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9u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
1
|
-
import { ChangeDetectorRef, Directive, inject, Injector, Input, ViewChild, } from '@angular/core';
|
2
|
-
import { FormControl, NgControl, } from '@angular/forms';
|
3
|
-
import { of, Subject } from 'rxjs';
|
4
|
-
import * as i0 from "@angular/core";
|
5
|
-
export class BaseValueAccessor {
|
6
|
-
constructor() {
|
7
|
-
this.validator = of({});
|
8
|
-
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
9
|
-
this.onChange = (value) => {
|
10
|
-
};
|
11
|
-
this.onTouched = () => {
|
12
|
-
};
|
13
|
-
this.injector = inject(Injector);
|
14
|
-
this.cdr = inject(ChangeDetectorRef);
|
15
|
-
this._defaultValidate = () => null;
|
16
|
-
this.destroy$ = new Subject();
|
17
|
-
this._validate = this._defaultValidate;
|
18
|
-
// Temporarily, AfterViewInit will handle the correct setting
|
19
|
-
this.control = new FormControl();
|
20
|
-
}
|
21
|
-
validate(control) {
|
22
|
-
control.setErrors({ ...control.errors, pending: true });
|
23
|
-
return this.validator;
|
24
|
-
}
|
25
|
-
ngAfterViewInit() {
|
26
|
-
this.controlDir = this.injector.get(NgControl);
|
27
|
-
this.control = this.controlDir.control;
|
28
|
-
// For ng-valid expression changed error workaround purposes
|
29
|
-
this.cdr.detectChanges();
|
30
|
-
}
|
31
|
-
writeValue(obj) {
|
32
|
-
this.valueAccessor?.writeValue(obj);
|
33
|
-
}
|
34
|
-
registerOnChange(fn) {
|
35
|
-
this.onChange = fn;
|
36
|
-
this.valueAccessor?.registerOnChange(fn);
|
37
|
-
}
|
38
|
-
registerOnTouched(fn) {
|
39
|
-
this.onTouched = fn;
|
40
|
-
this.valueAccessor?.registerOnTouched(fn);
|
41
|
-
}
|
42
|
-
get valueAccessor() {
|
43
|
-
return this.input ? this.input.valueAccessor : null;
|
44
|
-
}
|
45
|
-
ngOnDestroy() {
|
46
|
-
this.destroy$.next();
|
47
|
-
this.destroy$.complete();
|
48
|
-
}
|
49
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
50
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.0.6", type: BaseValueAccessor, inputs: { validator: "validator" }, viewQueries: [{ propertyName: "inputElement", first: true, predicate: ["inputElement"], descendants: true }, { propertyName: "input", first: true, predicate: ["input"], descendants: true }], ngImport: i0 }); }
|
51
|
-
}
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: BaseValueAccessor, decorators: [{
|
53
|
-
type: Directive
|
54
|
-
}], ctorParameters: () => [], propDecorators: { validator: [{
|
55
|
-
type: Input
|
56
|
-
}], inputElement: [{
|
57
|
-
type: ViewChild,
|
58
|
-
args: ['inputElement']
|
59
|
-
}], input: [{
|
60
|
-
type: ViewChild,
|
61
|
-
args: ['input']
|
62
|
-
}] } });
|
63
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS12YWx1ZS1hY2Nlc3Nvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC13aWRnZXRzL3NyYy9saWIvY29yZS9iYXNlLXZhbHVlLWFjY2Vzc29yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxpQkFBaUIsRUFBRSxTQUFTLEVBQ2hCLE1BQU0sRUFDbEIsUUFBUSxFQUFFLEtBQUssRUFDZixTQUFTLEdBQ1YsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUVpQixXQUFXLEVBQ2pDLFNBQVMsR0FHVixNQUFNLGdCQUFnQixDQUFDO0FBRXhCLE9BQU8sRUFBYSxFQUFFLEVBQUUsT0FBTyxFQUFDLE1BQU0sTUFBTSxDQUFDOztBQUc3QyxNQUFNLE9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xuIl19
|
@@ -1,54 +0,0 @@
|
|
1
|
-
import { isDevMode } from '@angular/core';
|
2
|
-
import { Observable, Subject, takeUntil } from 'rxjs';
|
3
|
-
import { SafeSubscriber } from 'rxjs/internal/Subscriber';
|
4
|
-
/**
|
5
|
-
* Automatically unsubscribe from an Observable when the view is destroyed
|
6
|
-
* Tested with checking the "complete" event of a subscribe method
|
7
|
-
* @description
|
8
|
-
* An Annotation that should be used with an Observable typed variable to handle its subscriptions
|
9
|
-
* @author gergo.asztalos
|
10
|
-
*/
|
11
|
-
export function UnsubscribeOnDestroy() {
|
12
|
-
return function (target, propertyKey) {
|
13
|
-
const ngOnDestroy = target.ngOnDestroy;
|
14
|
-
const secretKey = `_${propertyKey}$`;
|
15
|
-
// Probably with function we could use own context
|
16
|
-
const destroyKey = (_this) => _this.hasOwnProperty('destroy$') ? 'destroy$' : `${_this.constructor.name}_destroy$`;
|
17
|
-
Object.defineProperty(target, secretKey, { enumerable: false, writable: true });
|
18
|
-
Object.defineProperty(target, propertyKey, {
|
19
|
-
configurable: true,
|
20
|
-
enumerable: true,
|
21
|
-
get: function () {
|
22
|
-
return this[secretKey];
|
23
|
-
},
|
24
|
-
set: function (newValue) {
|
25
|
-
if (!this[destroyKey(this)]) {
|
26
|
-
this[destroyKey(this)] = new Subject();
|
27
|
-
}
|
28
|
-
if (newValue instanceof Observable) {
|
29
|
-
this[secretKey] = newValue.pipe(takeUntil(this[destroyKey(this)]));
|
30
|
-
}
|
31
|
-
else {
|
32
|
-
this[secretKey] = newValue;
|
33
|
-
}
|
34
|
-
},
|
35
|
-
});
|
36
|
-
target.ngOnDestroy = function () {
|
37
|
-
if (this[propertyKey] instanceof SafeSubscriber) {
|
38
|
-
this[propertyKey].unsubscribe();
|
39
|
-
this[secretKey].unsubscribe();
|
40
|
-
}
|
41
|
-
else if (this.hasOwnProperty(destroyKey(this))) {
|
42
|
-
this[destroyKey(this)].next();
|
43
|
-
this[destroyKey(this)].complete();
|
44
|
-
}
|
45
|
-
delete this[secretKey];
|
46
|
-
if (isDevMode()) {
|
47
|
-
// eslint-disable-next-line no-console,max-len
|
48
|
-
console.debug(`<UnsubscribeOnDestroy> - Observable/Subscription <${propertyKey}> completed in class: ${this.constructor.name}`);
|
49
|
-
}
|
50
|
-
ngOnDestroy && ngOnDestroy.call(this);
|
51
|
-
};
|
52
|
-
};
|
53
|
-
}
|
54
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LXVuc3Vic2NyaWJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2xpYi9jb3JlL2NvbXBvbmVudC11bnN1YnNjcmliZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFDLE9BQU8sRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFMUQ7Ozs7OztHQU1HO0FBQ0gsTUFBTSxVQUFVLG9CQUFvQjtJQUNsQyxPQUFPLFVBQVUsTUFBVyxFQUFFLFdBQTRCO1FBQ3hELE1BQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxXQUFXLENBQUM7UUFFdkMsTUFBTSxTQUFTLEdBQUcsSUFBWSxXQUFXLEdBQUcsQ0FBQztRQUM3QyxrREFBa0Q7UUFDbEQsTUFBTSxVQUFVLEdBQUcsQ0FBQyxLQUFVLEVBQUUsRUFBRSxDQUNoQyxLQUFLLENBQUMsY0FBYyxDQUFDLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLEdBQUcsS0FBSyxDQUF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lzW2Rlc3Ryb3lLZXkodGhpcyldLm5leHQoKTtcbiAgICAgICAgdGhpc1tkZXN0cm95S2V5KHRoaXMpXS5jb21wbGV0ZSgpO1xuICAgICAgfVxuICAgICAgZGVsZXRlIHRoaXNbc2VjcmV0S2V5XTtcbiAgICAgIGlmIChpc0Rldk1vZGUoKSkge1xuICAgICAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmUgbm8tY29uc29sZSxtYXgtbGVuXG4gICAgICAgIGNvbnNvbGUuZGVidWcoYDxVbnN1YnNjcmliZU9uRGVzdHJveT4gLSBPYnNlcnZhYmxlL1N1YnNjcmlwdGlvbiA8JHs8c3RyaW5nPnByb3BlcnR5S2V5fT4gY29tcGxldGVkIGluIGNsYXNzOiAke3RoaXMuY29uc3RydWN0b3IubmFtZX1gKTtcbiAgICAgIH1cbiAgICAgIG5nT25EZXN0cm95ICYmIG5nT25EZXN0cm95LmNhbGwodGhpcyk7XG4gICAgfTtcbiAgfTtcbn1cbiJdfQ==
|
@@ -1,61 +0,0 @@
|
|
1
|
-
import { Component, forwardRef, Input, ViewChildren, ViewEncapsulation, } from '@angular/core';
|
2
|
-
import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
3
|
-
import { MatInputModule } from '@angular/material/input';
|
4
|
-
import { MatSelectModule } from '@angular/material/select';
|
5
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
6
|
-
import { BaseInput } from '../core/base-input';
|
7
|
-
import { isEqual } from 'lodash-es';
|
8
|
-
import { takeUntil } from 'rxjs/operators';
|
9
|
-
import * as i0 from "@angular/core";
|
10
|
-
import * as i1 from "@angular/material/form-field";
|
11
|
-
import * as i2 from "@angular/material/select";
|
12
|
-
import * as i3 from "@angular/material/core";
|
13
|
-
import * as i4 from "@angular/forms";
|
14
|
-
export class SelectComponent extends BaseInput {
|
15
|
-
constructor() {
|
16
|
-
super(...arguments);
|
17
|
-
/**
|
18
|
-
* Angular Material - Select component comparsion is only '===', does not work with Array values
|
19
|
-
* https://github.com/angular/components/blob/a07c0758a5ec2eb4de1bb822354be08178c66aa4/src/lib/select/select.ts#L242C48-L242C58
|
20
|
-
*/
|
21
|
-
this._isEqual = isEqual;
|
22
|
-
}
|
23
|
-
ngOnInit() {
|
24
|
-
this.placeholder = !this.placeholder ? (this.validationTranslations.selectGlobalPlaceholder || this.label) : this.placeholder;
|
25
|
-
super.ngOnInit();
|
26
|
-
this.id = this.id || this.formControlName || this.name;
|
27
|
-
if (this.asyncOptions) {
|
28
|
-
this.asyncOptions.pipe(takeUntil(this.destroy$)).subscribe((resp) => {
|
29
|
-
this.options = resp;
|
30
|
-
this.cdr.detectChanges();
|
31
|
-
});
|
32
|
-
}
|
33
|
-
}
|
34
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: SelectComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
35
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: SelectComponent, isStandalone: true, selector: "gerandon-select", inputs: { emptyOptionLabel: "emptyOptionLabel", multiple: "multiple", options: "options", asyncOptions: "asyncOptions" }, providers: [
|
36
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }
|
37
|
-
], viewQueries: [{ propertyName: "optionElements", predicate: ["optionElements"], descendants: true }], usesInheritance: true, ngImport: i0, template: "<mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label>{{ label }}</mat-label>\r\n }\r\n <mat-select #inputElement\r\n #input=\"ngForm\"\r\n [multiple]=\"multiple\"\r\n [placeholder]=\"!floatLabel ? label : placeholder\"\r\n [formControl]=\"control\"\r\n [id]=\"id\"\r\n [class.input-disabled]=\"isDisabled || control.disabled\"\r\n [compareWith]=\"_isEqual\"\r\n [attr.disabled]=\"isDisabled || control.disabled ? '' : null\">\r\n @if (emptyOptionLabel) {\r\n <mat-option (click)=\"control.reset()\">\r\n {{ emptyOptionLabel }}\r\n </mat-option>\r\n }\r\n @for(option of options; track option) {\r\n <mat-option [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n @if (suffix) {\r\n <span matSuffix>{{suffix}}</span>\r\n }\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required'] && validationTranslations.required) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n } @else {\r\n @for (error of validatorMessagesArray; track error) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n</mat-form-field>\r\n", styles: ["gerandon-select mat-form-field{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: MatInputModule }, { kind: "component", type: i1.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i1.MatLabel, selector: "mat-label" }, { kind: "directive", type: i1.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i1.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatSelectModule }, { kind: "component", type: i2.MatSelect, selector: "mat-select", inputs: ["aria-describedby", "panelClass", "disabled", "disableRipple", "tabIndex", "hideSingleSelectionIndicator", "placeholder", "required", "multiple", "disableOptionCentering", "compareWith", "value", "aria-label", "aria-labelledby", "errorStateMatcher", "typeaheadDebounceInterval", "sortComparator", "id", "panelWidth"], outputs: ["openedChange", "opened", "closed", "selectionChange", "valueChange"], exportAs: ["matSelect"] }, { kind: "component", type: i3.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i4.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i4.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatTooltipModule }], encapsulation: i0.ViewEncapsulation.None }); }
|
38
|
-
}
|
39
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: SelectComponent, decorators: [{
|
40
|
-
type: Component,
|
41
|
-
args: [{ selector: 'gerandon-select', encapsulation: ViewEncapsulation.None, standalone: true, providers: [
|
42
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => SelectComponent), multi: true }
|
43
|
-
], imports: [
|
44
|
-
MatInputModule,
|
45
|
-
MatSelectModule,
|
46
|
-
ReactiveFormsModule,
|
47
|
-
MatTooltipModule,
|
48
|
-
], template: "<mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label>{{ label }}</mat-label>\r\n }\r\n <mat-select #inputElement\r\n #input=\"ngForm\"\r\n [multiple]=\"multiple\"\r\n [placeholder]=\"!floatLabel ? label : placeholder\"\r\n [formControl]=\"control\"\r\n [id]=\"id\"\r\n [class.input-disabled]=\"isDisabled || control.disabled\"\r\n [compareWith]=\"_isEqual\"\r\n [attr.disabled]=\"isDisabled || control.disabled ? '' : null\">\r\n @if (emptyOptionLabel) {\r\n <mat-option (click)=\"control.reset()\">\r\n {{ emptyOptionLabel }}\r\n </mat-option>\r\n }\r\n @for(option of options; track option) {\r\n <mat-option [value]=\"option.value\">\r\n {{ option.label }}\r\n </mat-option>\r\n }\r\n </mat-select>\r\n @if (suffix) {\r\n <span matSuffix>{{suffix}}</span>\r\n }\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required'] && validationTranslations.required) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n } @else {\r\n @for (error of validatorMessagesArray; track error) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n</mat-form-field>\r\n", styles: ["gerandon-select mat-form-field{width:100%}\n"] }]
|
49
|
-
}], propDecorators: { emptyOptionLabel: [{
|
50
|
-
type: Input
|
51
|
-
}], multiple: [{
|
52
|
-
type: Input
|
53
|
-
}], options: [{
|
54
|
-
type: Input
|
55
|
-
}], asyncOptions: [{
|
56
|
-
type: Input
|
57
|
-
}], optionElements: [{
|
58
|
-
type: ViewChildren,
|
59
|
-
args: ['optionElements']
|
60
|
-
}] } });
|
61
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VsZWN0LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC13aWRnZXRzL3NyYy9saWIvc2VsZWN0L3NlbGVjdC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtd2lkZ2V0cy9zcmMvbGliL3NlbGVjdC9zZWxlY3QuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFNBQVMsRUFFVCxVQUFVLEVBQ1YsS0FBSyxFQUdMLFlBQVksRUFDWixpQkFBaUIsR0FDbEIsTUFBTSxlQUFlLENBQUM7QUFDdkIsT0FBTyxFQUFFLGlCQUFpQixFQUFFLG1CQUFtQixFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDeEUsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBQ3pELE9BQU8sRUFBRSxlQUFlLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUMzRCxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUU3RCxPQU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xuICB9XHJcbiAgQGlmIChjb250cm9sLmVycm9ycz8uWydzZXJ2ZXInXSkge1xyXG4gICAgPG1hdC1lcnJvcj57eyBjb250cm9sLmVycm9ycz8uWydzZXJ2ZXInXSB9fTwvbWF0LWVycm9yPlxyXG4gIH0gQGVsc2UgaWYgKGNvbnRyb2wuZXJyb3JzPy5bJ3JlcXVpcmVkJ10gJiYgdmFsaWRhdGlvblRyYW5zbGF0aW9ucy5yZXF1aXJlZCkge1xyXG4gICAgPG1hdC1lcnJvcj57eyB2YWxpZGF0aW9uVHJhbnNsYXRpb25zLnJlcXVpcmVkIH19PC9tYXQtZXJyb3I+XHJcbiAgfSBAZWxzZSB7XHJcbiAgICBAZm9yIChlcnJvciBvZiB2YWxpZGF0b3JNZXNzYWdlc0FycmF5OyB0cmFjayBlcnJvcikge1xyXG4gICAgICA8bWF0LWVycm9yPnt7IGVycm9yLnZhbHVlIH19PC9tYXQtZXJyb3I+XHJcbiAgICB9XHJcbiAgfVxyXG48L21hdC1mb3JtLWZpZWxkPlxyXG4iXX0=
|
@@ -1,39 +0,0 @@
|
|
1
|
-
import { Component, forwardRef, Input, ViewEncapsulation } from '@angular/core';
|
2
|
-
import { FormsModule, NG_ASYNC_VALIDATORS, NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
|
3
|
-
import { MatFormFieldModule } from '@angular/material/form-field';
|
4
|
-
import { MatIconModule } from '@angular/material/icon';
|
5
|
-
import { MatInputModule } from '@angular/material/input';
|
6
|
-
import { BaseTextInput } from "../core/base-text-input";
|
7
|
-
import * as i0 from "@angular/core";
|
8
|
-
import * as i1 from "@angular/forms";
|
9
|
-
import * as i2 from "@angular/material/form-field";
|
10
|
-
import * as i3 from "@angular/material/icon";
|
11
|
-
import * as i4 from "@angular/material/input";
|
12
|
-
import * as i5 from "@angular/cdk/text-field";
|
13
|
-
export class TextareaInputComponent extends BaseTextInput {
|
14
|
-
constructor() {
|
15
|
-
super(...arguments);
|
16
|
-
this.rows = 10;
|
17
|
-
}
|
18
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: TextareaInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
19
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.0.6", type: TextareaInputComponent, isStandalone: true, selector: "gerandon-textarea-input", inputs: { rows: "rows" }, providers: [
|
20
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
|
21
|
-
{ provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
|
22
|
-
], usesInheritance: true, ngImport: i0, template: "<div class=\"textarea-input cva-input\">\r\n <mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label [class.disabled]=\"isDisabled\">{{ label }}</mat-label>\r\n }\r\n <textarea\r\n [id]=\"id\"\r\n #inputElement\r\n #input=\"ngForm\"\r\n #autosize=\"cdkTextareaAutosize\"\r\n matInput\r\n cdkTextareaAutosize\r\n [cdkAutosizeMinRows]=\"rows\"\r\n class=\"w-100 cva-control\"\r\n [attr.disabled]=\"isDisabled || control.disabled ? '' : null\"\r\n [readonly]=\"isDisabled\"\r\n [placeholder]=\"placeholder\"\r\n [formControl]=\"control\"\r\n [maxLength]=\"maxLength\"\r\n [name]=\"name\">\r\n </textarea>\r\n <span class=\"counter\">{{control.value?.length || 0}} / {{ maxLength }}</span>\r\n @if (prefixIcon) {\r\n <mat-icon matPrefix color=\"accent\">\r\n {{prefixIcon}}\r\n </mat-icon>\r\n }\r\n @if (suffixIcon) {\r\n <mat-icon matSuffix color=\"accent\">\r\n {{suffixIcon}}\r\n </mat-icon>\r\n }\r\n @if (suffix) {\r\n <span matSuffix>{{suffix}}</span>\r\n }\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required'] && validationTranslations.required) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n } @else {\r\n @for (error of validatorMessagesArray; track error) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n </mat-form-field>\r\n</div>\r\n", styles: ["gerandon-textarea-input{display:block}gerandon-textarea-input .counter{right:20px;bottom:0;position:absolute;font-size:10px}gerandon-textarea-input .textarea-input .disabled{color:#ced4da}gerandon-textarea-input .textarea-input mat-form-field{width:100%}gerandon-textarea-input .textarea-input mat-form-field textarea{padding-top:10px}gerandon-textarea-input .textarea-input mat-form-field textarea::placeholder{color:#adb5bd;font-style:italic}gerandon-textarea-input .textarea-input mat-form-field textarea:disabled{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatInputModule }, { kind: "directive", type: i4.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i5.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
23
|
-
}
|
24
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.0.6", ngImport: i0, type: TextareaInputComponent, decorators: [{
|
25
|
-
type: Component,
|
26
|
-
args: [{ selector: 'gerandon-textarea-input', standalone: true, encapsulation: ViewEncapsulation.None, imports: [
|
27
|
-
FormsModule,
|
28
|
-
MatFormFieldModule,
|
29
|
-
MatIconModule,
|
30
|
-
MatInputModule,
|
31
|
-
ReactiveFormsModule,
|
32
|
-
], providers: [
|
33
|
-
{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
|
34
|
-
{ provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
|
35
|
-
], template: "<div class=\"textarea-input cva-input\">\r\n <mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label [class.disabled]=\"isDisabled\">{{ label }}</mat-label>\r\n }\r\n <textarea\r\n [id]=\"id\"\r\n #inputElement\r\n #input=\"ngForm\"\r\n #autosize=\"cdkTextareaAutosize\"\r\n matInput\r\n cdkTextareaAutosize\r\n [cdkAutosizeMinRows]=\"rows\"\r\n class=\"w-100 cva-control\"\r\n [attr.disabled]=\"isDisabled || control.disabled ? '' : null\"\r\n [readonly]=\"isDisabled\"\r\n [placeholder]=\"placeholder\"\r\n [formControl]=\"control\"\r\n [maxLength]=\"maxLength\"\r\n [name]=\"name\">\r\n </textarea>\r\n <span class=\"counter\">{{control.value?.length || 0}} / {{ maxLength }}</span>\r\n @if (prefixIcon) {\r\n <mat-icon matPrefix color=\"accent\">\r\n {{prefixIcon}}\r\n </mat-icon>\r\n }\r\n @if (suffixIcon) {\r\n <mat-icon matSuffix color=\"accent\">\r\n {{suffixIcon}}\r\n </mat-icon>\r\n }\r\n @if (suffix) {\r\n <span matSuffix>{{suffix}}</span>\r\n }\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required'] && validationTranslations.required) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n } @else {\r\n @for (error of validatorMessagesArray; track error) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n </mat-form-field>\r\n</div>\r\n", styles: ["gerandon-textarea-input{display:block}gerandon-textarea-input .counter{right:20px;bottom:0;position:absolute;font-size:10px}gerandon-textarea-input .textarea-input .disabled{color:#ced4da}gerandon-textarea-input .textarea-input mat-form-field{width:100%}gerandon-textarea-input .textarea-input mat-form-field textarea{padding-top:10px}gerandon-textarea-input .textarea-input mat-form-field textarea::placeholder{color:#adb5bd;font-style:italic}gerandon-textarea-input .textarea-input mat-form-field textarea:disabled{cursor:not-allowed}\n"] }]
|
36
|
-
}], propDecorators: { rows: [{
|
37
|
-
type: Input
|
38
|
-
}] } });
|
39
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGV4dGFyZWEtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2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ycm9yPnt7IGVycm9yLnZhbHVlIH19PC9tYXQtZXJyb3I+XHJcbiAgICAgIH1cclxuICAgIH1cclxuICA8L21hdC1mb3JtLWZpZWxkPlxyXG48L2Rpdj5cclxuIl19
|
package/esm2022/public-api.mjs
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Public API Surface of ngx-widgets
|
3
|
-
*/
|
4
|
-
export * from './lib/core/base-value-accessor';
|
5
|
-
export * from './lib/core/base-input';
|
6
|
-
export * from './lib/core/base-text-input';
|
7
|
-
export * from './lib/core/component-unsubscribe';
|
8
|
-
export * from './lib/basic-input/basic-input.component';
|
9
|
-
export * from './lib/select/select.component';
|
10
|
-
export * from './lib/textarea-input/textarea-input.component';
|
11
|
-
export * from './lib/basic-chips/basic-chips.component';
|
12
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL25neC13aWRnZXRzL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxnQ0FBZ0MsQ0FBQztBQUMvQyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsNEJBQTRCLENBQUM7QUFDM0MsY0FBYyxrQ0FBa0MsQ0FBQztBQUVqRCxjQUFjLHlDQUF5QyxDQUFDO0FBQ3hELGNBQWMsK0JBQStCLENBQUM7QUFDOUMsY0FBYywrQ0FBK0MsQ0FBQztBQUM5RCxjQUFjLHlDQUF5QyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLypcbiAqIFB1YmxpYyBBUEkgU3VyZmFjZSBvZiBuZ3gtd2lkZ2V0c1xuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vbGliL2NvcmUvYmFzZS12YWx1ZS1hY2Nlc3Nvcic7XG5le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