@gerandon/ngx-widgets 17.0.0 → 18.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/ng-package.json +7 -0
  2. package/package.json +9 -19
  3. package/src/lib/basic-chips/basic-chips.component.html +39 -0
  4. package/src/lib/basic-chips/basic-chips.component.scss +31 -0
  5. package/src/lib/basic-chips/basic-chips.component.ts +83 -0
  6. package/src/lib/basic-input/basic-input.component.html +44 -0
  7. package/src/lib/basic-input/basic-input.component.scss +26 -0
  8. package/src/lib/basic-input/basic-input.component.ts +41 -0
  9. package/src/lib/core/base-input.ts +69 -0
  10. package/src/lib/core/base-text-input.ts +13 -0
  11. package/src/lib/core/base-value-accessor.ts +80 -0
  12. package/src/lib/core/component-unsubscribe.ts +58 -0
  13. package/src/lib/select/select.component.html +36 -0
  14. package/src/lib/select/select.component.scss +7 -0
  15. package/src/lib/select/select.component.ts +70 -0
  16. package/src/lib/textarea-input/textarea-input.component.html +45 -0
  17. package/src/lib/textarea-input/textarea-input.component.scss +27 -0
  18. package/src/lib/textarea-input/textarea-input.component.ts +30 -0
  19. package/{public-api.d.ts → src/public-api.ts} +5 -0
  20. package/tsconfig.lib.json +14 -0
  21. package/tsconfig.lib.prod.json +10 -0
  22. package/tsconfig.spec.json +14 -0
  23. package/esm2022/gerandon-ngx-widgets.mjs +0 -5
  24. package/esm2022/lib/basic-chips/basic-chips.component.mjs +0 -80
  25. package/esm2022/lib/basic-input/basic-input.component.mjs +0 -41
  26. package/esm2022/lib/core/base-input.mjs +0 -81
  27. package/esm2022/lib/core/base-text-input.mjs +0 -20
  28. package/esm2022/lib/core/base-value-accessor.mjs +0 -63
  29. package/esm2022/lib/core/component-unsubscribe.mjs +0 -54
  30. package/esm2022/lib/select/select.component.mjs +0 -61
  31. package/esm2022/lib/textarea-input/textarea-input.component.mjs +0 -39
  32. package/esm2022/public-api.mjs +0 -12
  33. package/fesm2022/gerandon-ngx-widgets.mjs +0 -409
  34. package/fesm2022/gerandon-ngx-widgets.mjs.map +0 -1
  35. package/index.d.ts +0 -5
  36. package/lib/basic-chips/basic-chips.component.d.ts +0 -17
  37. package/lib/basic-input/basic-input.component.d.ts +0 -9
  38. package/lib/core/base-input.d.ts +0 -38
  39. package/lib/core/base-text-input.d.ts +0 -8
  40. package/lib/core/base-value-accessor.d.ts +0 -28
  41. package/lib/core/component-unsubscribe.d.ts +0 -8
  42. package/lib/select/select.component.d.ts +0 -26
  43. package/lib/textarea-input/textarea-input.component.d.ts +0 -7
@@ -1,38 +0,0 @@
1
- import { AfterViewInit, InjectionToken, OnChanges, OnInit, SimpleChanges } from '@angular/core';
2
- import { FloatLabelType, SubscriptSizing } from '@angular/material/form-field';
3
- import { BaseValueAccessor } from './base-value-accessor';
4
- import * as i0 from "@angular/core";
5
- export interface NgxWidgetsValidationErrorTypes {
6
- required?: string;
7
- selectGlobalPlaceholder?: string;
8
- }
9
- export declare const NGX_WIDGETS_VALIDATION_TRANSLATIONS: InjectionToken<NgxWidgetsValidationErrorTypes>;
10
- export declare class BaseInput<T> extends BaseValueAccessor<T> implements OnInit, AfterViewInit, OnChanges {
11
- protected readonly validationTranslations: NgxWidgetsValidationErrorTypes;
12
- id: string;
13
- name: string;
14
- label: string;
15
- translateParams?: unknown;
16
- placeholder: string;
17
- isDisabled?: boolean | undefined;
18
- floatLabel: FloatLabelType;
19
- prefixIcon?: string;
20
- suffixIcon?: string;
21
- suffix?: string;
22
- formControlName?: string;
23
- validatorMessages?: {
24
- [key: string]: string;
25
- };
26
- subscriptSizing: SubscriptSizing;
27
- hintLabel: string;
28
- validatorMessagesArray: {
29
- key: string;
30
- value: unknown;
31
- }[];
32
- constructor(validationTranslations: NgxWidgetsValidationErrorTypes);
33
- ngOnInit(): void;
34
- ngOnChanges(changes: SimpleChanges): void;
35
- ngAfterViewInit(): void;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseInput<any>, [{ optional: true; }]>;
37
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseInput<any>, never, never, { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "label": { "alias": "label"; "required": false; }; "translateParams": { "alias": "translateParams"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "floatLabel": { "alias": "floatLabel"; "required": false; }; "prefixIcon": { "alias": "prefixIcon"; "required": false; }; "suffixIcon": { "alias": "suffixIcon"; "required": false; }; "suffix": { "alias": "suffix"; "required": false; }; "formControlName": { "alias": "formControlName"; "required": false; }; "validatorMessages": { "alias": "validatorMessages"; "required": false; }; "subscriptSizing": { "alias": "subscriptSizing"; "required": false; }; "hintLabel": { "alias": "hintLabel"; "required": false; }; }, {}, never, never, false, never>;
38
- }
@@ -1,8 +0,0 @@
1
- import { BaseInput } from './base-input';
2
- import * as i0 from "@angular/core";
3
- export declare class BaseTextInput<T> extends BaseInput<T> {
4
- type: ('text' | 'password' | 'number' | 'email' | 'tel');
5
- maxLength?: number | undefined;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextInput<any>, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseTextInput<any>, never, never, { "type": { "alias": "type"; "required": false; }; "maxLength": { "alias": "maxLength"; "required": false; }; }, {}, never, never, false, never>;
8
- }
@@ -1,28 +0,0 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef, OnDestroy } from '@angular/core';
2
- import { AbstractControl, ControlValueAccessor, FormControl, NgControl, ValidationErrors, Validator, ValidatorFn } from '@angular/forms';
3
- import { Observable, Subject } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export declare class BaseValueAccessor<T> implements ControlValueAccessor, AfterViewInit, Validator, OnDestroy {
6
- validator: Observable<ValidationErrors>;
7
- inputElement: ElementRef;
8
- input: NgControl;
9
- control: FormControl;
10
- private onChange;
11
- private onTouched;
12
- private readonly injector;
13
- protected controlDir: NgControl;
14
- protected readonly cdr: ChangeDetectorRef;
15
- protected _validate: ValidatorFn;
16
- protected readonly _defaultValidate: ValidatorFn;
17
- protected readonly destroy$: Subject<void>;
18
- constructor();
19
- validate(control: AbstractControl): Observable<ValidationErrors>;
20
- ngAfterViewInit(): void;
21
- writeValue(obj: T): void;
22
- registerOnChange(fn: (value: T) => unknown): void;
23
- registerOnTouched(fn: () => unknown): void;
24
- protected get valueAccessor(): ControlValueAccessor | null;
25
- ngOnDestroy(): void;
26
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseValueAccessor<any>, never>;
27
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseValueAccessor<any>, never, never, { "validator": { "alias": "validator"; "required": false; }; }, {}, never, never, false, never>;
28
- }
@@ -1,8 +0,0 @@
1
- /**
2
- * Automatically unsubscribe from an Observable when the view is destroyed
3
- * Tested with checking the "complete" event of a subscribe method
4
- * @description
5
- * An Annotation that should be used with an Observable typed variable to handle its subscriptions
6
- * @author gergo.asztalos
7
- */
8
- export declare function UnsubscribeOnDestroy<ObservableType>(): PropertyDecorator;
@@ -1,26 +0,0 @@
1
- import { ElementRef, OnInit, QueryList } from '@angular/core';
2
- import { BaseInput } from '../core/base-input';
3
- import { Observable } from 'rxjs';
4
- import * as i0 from "@angular/core";
5
- export interface SelectOptionType {
6
- label: string;
7
- value: string | number | null | unknown;
8
- }
9
- export declare class SelectComponent extends BaseInput<unknown> implements OnInit {
10
- /**
11
- * In this case, an empty option appears that resets the control, to an empty value state
12
- */
13
- emptyOptionLabel?: string;
14
- multiple?: boolean;
15
- options: SelectOptionType[];
16
- asyncOptions: Observable<SelectOptionType[]>;
17
- optionElements: QueryList<ElementRef>;
18
- /**
19
- * Angular Material - Select component comparsion is only '===', does not work with Array values
20
- * https://github.com/angular/components/blob/a07c0758a5ec2eb4de1bb822354be08178c66aa4/src/lib/select/select.ts#L242C48-L242C58
21
- */
22
- readonly _isEqual: (value: any, other: any) => boolean;
23
- ngOnInit(): void;
24
- static ɵfac: i0.ɵɵFactoryDeclaration<SelectComponent, never>;
25
- static ɵcmp: i0.ɵɵComponentDeclaration<SelectComponent, "gerandon-select", never, { "emptyOptionLabel": { "alias": "emptyOptionLabel"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "options": { "alias": "options"; "required": false; }; "asyncOptions": { "alias": "asyncOptions"; "required": false; }; }, {}, never, never, true, never>;
26
- }
@@ -1,7 +0,0 @@
1
- import { BaseTextInput } from "../core/base-text-input";
2
- import * as i0 from "@angular/core";
3
- export declare class TextareaInputComponent extends BaseTextInput<string> {
4
- rows: number;
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TextareaInputComponent, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaInputComponent, "gerandon-textarea-input", never, { "rows": { "alias": "rows"; "required": false; }; }, {}, never, never, true, never>;
7
- }