@gerandon/ngx-widgets 17.0.0 → 18.0.1

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 +42 -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 +47 -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 +39 -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 +48 -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
@@ -0,0 +1,48 @@
1
+ <div class="textarea-input cva-input">
2
+ <mat-form-field appearance="outline" [subscriptSizing]="subscriptSizing" [floatLabel]="floatLabel">
3
+ @if (label) {
4
+ <mat-label [class.disabled]="isDisabled">{{ label }}</mat-label>
5
+ }
6
+ <textarea
7
+ [id]="id"
8
+ #inputElement
9
+ #input="ngForm"
10
+ #autosize="cdkTextareaAutosize"
11
+ matInput
12
+ cdkTextareaAutosize
13
+ [cdkAutosizeMinRows]="rows"
14
+ class="w-100 cva-control"
15
+ [attr.disabled]="isDisabled || control.disabled ? '' : null"
16
+ [readonly]="isDisabled"
17
+ [placeholder]="placeholder"
18
+ [formControl]="control"
19
+ [maxLength]="maxLength"
20
+ [name]="name">
21
+ </textarea>
22
+ <span class="counter">{{control.value?.length || 0}} / {{ maxLength }}</span>
23
+ @if (prefixIcon) {
24
+ <mat-icon matPrefix color="accent">
25
+ {{prefixIcon}}
26
+ </mat-icon>
27
+ }
28
+ @if (suffixIcon) {
29
+ <mat-icon matSuffix color="accent">
30
+ {{suffixIcon}}
31
+ </mat-icon>
32
+ }
33
+ @if (suffix) {
34
+ <span matSuffix>{{suffix}}</span>
35
+ }
36
+ @if (control.errors?.['server']) {
37
+ <mat-error>{{ control.errors?.['server'] }}</mat-error>
38
+ } @else if (control.errors?.['required']) {
39
+ @if (validationTranslations.required) {
40
+ <mat-error>{{ validationTranslations.required }}</mat-error>
41
+ } @else {
42
+ @for (error of validatorMessagesArray; track error) {
43
+ <mat-error>{{ error.value }}</mat-error>
44
+ }
45
+ }
46
+ }
47
+ </mat-form-field>
48
+ </div>
@@ -0,0 +1,27 @@
1
+ gerandon-textarea-input {
2
+ display: block;
3
+ .counter {
4
+ right: 20px;
5
+ bottom: 0;
6
+ position: absolute;
7
+ font-size: 10px;
8
+ }
9
+ .textarea-input {
10
+ .disabled {
11
+ color: #CED4DAFF;
12
+ }
13
+ mat-form-field {
14
+ width: 100%;
15
+ textarea {
16
+ padding-top: 10px;
17
+ &::placeholder {
18
+ color: #ADB5BDFF;
19
+ font-style: italic;
20
+ }
21
+ &:disabled {
22
+ cursor: not-allowed;
23
+ }
24
+ }
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,30 @@
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
+
8
+ @Component({
9
+ selector: 'gerandon-textarea-input',
10
+ templateUrl: 'textarea-input.component.html',
11
+ styleUrls: ['textarea-input.component.scss'],
12
+ standalone: true,
13
+ encapsulation: ViewEncapsulation.None,
14
+ imports: [
15
+ FormsModule,
16
+ MatFormFieldModule,
17
+ MatIconModule,
18
+ MatInputModule,
19
+ ReactiveFormsModule,
20
+ ],
21
+ providers: [
22
+ { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
23
+ { provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => TextareaInputComponent), multi: true },
24
+ ],
25
+ })
26
+ export class TextareaInputComponent extends BaseTextInput<string> {
27
+
28
+ @Input() public rows = 10;
29
+
30
+ }
@@ -1,7 +1,12 @@
1
+ /*
2
+ * Public API Surface of ngx-widgets
3
+ */
4
+
1
5
  export * from './lib/core/base-value-accessor';
2
6
  export * from './lib/core/base-input';
3
7
  export * from './lib/core/base-text-input';
4
8
  export * from './lib/core/component-unsubscribe';
9
+
5
10
  export * from './lib/basic-input/basic-input.component';
6
11
  export * from './lib/select/select.component';
7
12
  export * from './lib/textarea-input/textarea-input.component';
@@ -0,0 +1,14 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "../../tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "../../out-tsc/lib",
6
+ "declaration": true,
7
+ "declarationMap": true,
8
+ "inlineSources": true,
9
+ "types": []
10
+ },
11
+ "exclude": [
12
+ "**/*.spec.ts"
13
+ ]
14
+ }
@@ -0,0 +1,10 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "./tsconfig.lib.json",
4
+ "compilerOptions": {
5
+ "declarationMap": false
6
+ },
7
+ "angularCompilerOptions": {
8
+ "compilationMode": "partial"
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
+ {
3
+ "extends": "../../tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "../../out-tsc/spec",
6
+ "types": [
7
+ "jasmine"
8
+ ]
9
+ },
10
+ "include": [
11
+ "**/*.spec.ts",
12
+ "**/*.d.ts"
13
+ ]
14
+ }
@@ -1,5 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- export * from './public-api';
5
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VyYW5kb24tbmd4LXdpZGdldHMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9uZ3gtd2lkZ2V0cy9zcmMvZ2VyYW5kb24tbmd4LXdpZGdldHMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -1,80 +0,0 @@
1
- import { COMMA, ENTER } from '@angular/cdk/keycodes';
2
- import { AsyncPipe, JsonPipe } from '@angular/common';
3
- import { Component, forwardRef, Input, ViewEncapsulation } from '@angular/core';
4
- import { NG_VALUE_ACCESSOR, ReactiveFormsModule } from '@angular/forms';
5
- import { MatAutocompleteModule } from '@angular/material/autocomplete';
6
- import { MatChipsModule } from '@angular/material/chips';
7
- import { MatIconModule } from '@angular/material/icon';
8
- import { BaseInput } from "../core/base-input";
9
- import { MatError, MatFormField, MatLabel } from "@angular/material/form-field";
10
- import { MatInput } from "@angular/material/input";
11
- import * as i0 from "@angular/core";
12
- import * as i1 from "@angular/material/chips";
13
- import * as i2 from "@angular/material/icon";
14
- import * as i3 from "@angular/forms";
15
- import * as i4 from "@angular/material/autocomplete";
16
- import * as i5 from "@angular/material/core";
17
- export class BasicChipsComponent extends BaseInput {
18
- constructor() {
19
- super(...arguments);
20
- this.separatorKeysCodes = [ENTER, COMMA];
21
- }
22
- remove(item) {
23
- const values = this.control.value;
24
- const index = values.indexOf(item);
25
- if (index >= 0) {
26
- values.splice(index, 1);
27
- this.control.setValue(values);
28
- }
29
- this.mark();
30
- }
31
- add(event) {
32
- const value = (event.value || '').trim();
33
- if (value) {
34
- this.updateValue(value);
35
- }
36
- event.chipInput.clear();
37
- this.mark();
38
- }
39
- selected(event) {
40
- if (!this.control.value?.includes(event.option.value)) {
41
- this.updateValue(event.option.value);
42
- }
43
- this.inputElement.nativeElement.value = '';
44
- this.mark();
45
- }
46
- updateValue(value) {
47
- this.control.setValue([
48
- ...(this.control.value || []),
49
- value,
50
- ]);
51
- }
52
- mark() {
53
- if (!this.control.touched) {
54
- this.control.markAsTouched();
55
- this.control.markAsDirty();
56
- }
57
- }
58
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BasicChipsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
59
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: BasicChipsComponent, isStandalone: true, selector: "gerandon-basic-chips", inputs: { asyncOptions: "asyncOptions", labelProperty: "labelProperty" }, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BasicChipsComponent), multi: true }], usesInheritance: true, ngImport: i0, template: "<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 <mat-chip-grid #chipGrid class=\"w-100\">\r\n @for(item of control.value; track item) {\r\n <mat-chip-row (removed)=\"remove(item)\" color=\"primary\" highlighted>\r\n {{ labelProperty ? item[labelProperty] : item}}\r\n <button matChipRemove [attr.aria-label]=\"(labelProperty ? item[labelProperty] : item) + ' elt\u00E1vol\u00EDt\u00E1sa'\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n <input #inputElement\r\n matInput\r\n [placeholder]=\"placeholder || label\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"!labelProperty && add($event)\"/>\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event)\">\r\n @for (filterItem of asyncOptions | async; track filterItem) {\r\n <mat-option [value]=\"filterItem\">\r\n {{labelProperty ? filterItem[labelProperty] : filterItem}}\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-chip-grid>\r\n <input #input=\"ngForm\" [style.display]=\"'none'\" [formControl]=\"control\" />\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required']) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\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-basic-chips{display:block}gerandon-basic-chips .mat-mdc-standard-chip{height:28px!important}gerandon-basic-chips mat-form-field{width:100%}gerandon-basic-chips mat-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{display:flex;align-items:center;min-height:40px!important;padding:unset!important}gerandon-basic-chips mat-form-field .mat-mdc-text-field-wrapper .mat-mdc-floating-label:not(.mdc-floating-label--float-above){top:1.2rem!important}gerandon-basic-chips mat-form-field mat-chip-row{margin-top:8px!important;margin-bottom:8px!important}gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mdc-evolution-chip__action--primary,gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:hidden!important}\n"], dependencies: [{ kind: "ngmodule", type: MatChipsModule }, { kind: "component", type: i1.MatChipGrid, selector: "mat-chip-grid", inputs: ["disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "directive", type: i1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i1.MatChipRow, selector: "mat-chip-row, [mat-chip-row], mat-basic-chip-row, [mat-basic-chip-row]", inputs: ["editable"], outputs: ["edited"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i3.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: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatAutocompleteModule }, { kind: "component", type: i4.MatAutocomplete, selector: "mat-autocomplete", inputs: ["aria-label", "aria-labelledby", "displayWith", "autoActiveFirstOption", "autoSelectActiveOption", "requireSelection", "panelWidth", "disableRipple", "class", "hideSingleSelectionIndicator"], outputs: ["optionSelected", "opened", "closed", "optionActivated"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i5.MatOption, selector: "mat-option", inputs: ["value", "id", "disabled"], outputs: ["onSelectionChange"], exportAs: ["matOption"] }, { kind: "directive", type: i4.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", inputs: ["matAutocomplete", "matAutocompletePosition", "matAutocompleteConnectedTo", "autocomplete", "matAutocompleteDisabled"], exportAs: ["matAutocompleteTrigger"] }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "component", type: MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: 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: MatLabel, selector: "mat-label" }, { kind: "directive", type: MatError, selector: "mat-error, [matError]", inputs: ["id"] }], encapsulation: i0.ViewEncapsulation.None }); }
60
- }
61
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BasicChipsComponent, decorators: [{
62
- type: Component,
63
- args: [{ selector: 'gerandon-basic-chips', standalone: true, encapsulation: ViewEncapsulation.None, providers: [{ provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BasicChipsComponent), multi: true }], imports: [
64
- MatChipsModule,
65
- MatIconModule,
66
- ReactiveFormsModule,
67
- MatAutocompleteModule,
68
- AsyncPipe,
69
- JsonPipe,
70
- MatFormField,
71
- MatInput,
72
- MatLabel,
73
- MatError,
74
- ], template: "<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 <mat-chip-grid #chipGrid class=\"w-100\">\r\n @for(item of control.value; track item) {\r\n <mat-chip-row (removed)=\"remove(item)\" color=\"primary\" highlighted>\r\n {{ labelProperty ? item[labelProperty] : item}}\r\n <button matChipRemove [attr.aria-label]=\"(labelProperty ? item[labelProperty] : item) + ' elt\u00E1vol\u00EDt\u00E1sa'\">\r\n <mat-icon>cancel</mat-icon>\r\n </button>\r\n </mat-chip-row>\r\n }\r\n <input #inputElement\r\n matInput\r\n [placeholder]=\"placeholder || label\"\r\n [matAutocomplete]=\"auto\"\r\n [matChipInputFor]=\"chipGrid\"\r\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\"\r\n (matChipInputTokenEnd)=\"!labelProperty && add($event)\"/>\r\n <mat-autocomplete #auto=\"matAutocomplete\"\r\n (optionSelected)=\"selected($event)\">\r\n @for (filterItem of asyncOptions | async; track filterItem) {\r\n <mat-option [value]=\"filterItem\">\r\n {{labelProperty ? filterItem[labelProperty] : filterItem}}\r\n </mat-option>\r\n }\r\n </mat-autocomplete>\r\n </mat-chip-grid>\r\n <input #input=\"ngForm\" [style.display]=\"'none'\" [formControl]=\"control\" />\r\n @if (control.errors?.['server']) {\r\n <mat-error>{{ control.errors?.['server'] }}</mat-error>\r\n } @else if (control.errors?.['required']) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\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-basic-chips{display:block}gerandon-basic-chips .mat-mdc-standard-chip{height:28px!important}gerandon-basic-chips mat-form-field{width:100%}gerandon-basic-chips mat-form-field .mat-mdc-text-field-wrapper .mat-mdc-form-field-infix{display:flex;align-items:center;min-height:40px!important;padding:unset!important}gerandon-basic-chips mat-form-field .mat-mdc-text-field-wrapper .mat-mdc-floating-label:not(.mdc-floating-label--float-above){top:1.2rem!important}gerandon-basic-chips mat-form-field mat-chip-row{margin-top:8px!important;margin-bottom:8px!important}gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mdc-evolution-chip__cell--primary,gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mdc-evolution-chip__action--primary,gerandon-basic-chips mat-form-field .mat-mdc-standard-chip .mat-mdc-chip-action-label{overflow:hidden!important}\n"] }]
75
- }], propDecorators: { asyncOptions: [{
76
- type: Input
77
- }], labelProperty: [{
78
- type: Input
79
- }] } });
80
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzaWMtY2hpcHMuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2xpYi9iYXNpYy1jaGlwcy9iYXNpYy1jaGlwcy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtd2lkZ2V0cy9zcmMvbGliL2Jhc2ljLWNoaXBzL2Jhc2ljLWNoaXBzLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU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yBjb250cm9sLmVycm9ycz8uWydzZXJ2ZXInXSB9fTwvbWF0LWVycm9yPlxyXG4gIH0gQGVsc2UgaWYgKGNvbnRyb2wuZXJyb3JzPy5bJ3JlcXVpcmVkJ10pIHtcclxuICAgIDxtYXQtZXJyb3I+e3sgdmFsaWRhdGlvblRyYW5zbGF0aW9ucy5yZXF1aXJlZCB9fTwvbWF0LWVycm9yPlxyXG4gICAgQGZvciAoZXJyb3Igb2YgdmFsaWRhdG9yTWVzc2FnZXNBcnJheTsgdHJhY2sgZXJyb3IpIHtcclxuICAgICAgPG1hdC1lcnJvcj57eyBlcnJvci52YWx1ZSB9fTwvbWF0LWVycm9yPlxyXG4gICAgfVxyXG4gIH1cclxuPC9tYXQtZm9ybS1maWVsZD5cclxuIl19
@@ -1,41 +0,0 @@
1
- import { Component, EventEmitter, forwardRef, Output, ViewEncapsulation, } from '@angular/core';
2
- import { 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/icon";
10
- import * as i3 from "@angular/material/form-field";
11
- import * as i4 from "@angular/material/input";
12
- export class BasicInputComponent extends BaseTextInput {
13
- constructor() {
14
- super(...arguments);
15
- this.iconClick = new EventEmitter();
16
- }
17
- ngOnInit() {
18
- super.ngOnInit();
19
- this.id = this.id || this.name;
20
- }
21
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BasicInputComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
22
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.7", type: BasicInputComponent, isStandalone: true, selector: "gerandon-basic-input", outputs: { iconClick: "iconClick" }, providers: [
23
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BasicInputComponent), multi: true },
24
- { provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => BasicInputComponent), multi: true },
25
- ], usesInheritance: true, ngImport: i0, template: "<div class=\"basic-input cva-input\">\r\n <mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [hintLabel]=\"hintLabel\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label [class.disabled]=\"isDisabled\">{{label}}</mat-label>\r\n }\r\n <input\r\n [id]=\"id\"\r\n #inputElement\r\n #input=\"ngForm\"\r\n matInput\r\n [style.padding-right]=\"(suffix || prefixIcon) && '35px'\"\r\n [type]=\"type\"\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 [required]=\"!!control.errors?.['required']\"/>\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 style=\"margin-right: 10px\">{{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']) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n @for (error of validatorMessagesArray; track error) {\r\n @if (control.errors?.[error.key]) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n }\r\n </mat-form-field>\r\n</div>\r\n", styles: ["gerandon-basic-input{display:block}gerandon-basic-input .basic-input{height:inherit}gerandon-basic-input .basic-input .disabled{color:#ced4da}gerandon-basic-input .basic-input mat-form-field{width:100%}gerandon-basic-input .basic-input mat-form-field .mat-icon{padding:unset;margin-left:10px;margin-right:10px}gerandon-basic-input .basic-input mat-form-field input::placeholder{color:#adb5bd;font-style:italic}gerandon-basic-input .basic-input mat-form-field input:disabled{cursor:not-allowed}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { 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: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: MatIconModule }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "ngmodule", type: MatFormFieldModule }, { kind: "component", type: i3.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i3.MatLabel, selector: "mat-label" }, { kind: "directive", type: i3.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i3.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]", inputs: ["matTextPrefix"] }, { kind: "directive", type: i3.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]", inputs: ["matTextSuffix"] }, { 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"] }], encapsulation: i0.ViewEncapsulation.None }); }
26
- }
27
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", ngImport: i0, type: BasicInputComponent, decorators: [{
28
- type: Component,
29
- args: [{ selector: 'gerandon-basic-input', encapsulation: ViewEncapsulation.None, standalone: true, imports: [
30
- ReactiveFormsModule,
31
- MatIconModule,
32
- MatFormFieldModule,
33
- MatInputModule,
34
- ], providers: [
35
- { provide: NG_VALUE_ACCESSOR, useExisting: forwardRef(() => BasicInputComponent), multi: true },
36
- { provide: NG_ASYNC_VALIDATORS, useExisting: forwardRef(() => BasicInputComponent), multi: true },
37
- ], template: "<div class=\"basic-input cva-input\">\r\n <mat-form-field appearance=\"outline\" [subscriptSizing]=\"subscriptSizing\" [hintLabel]=\"hintLabel\" [floatLabel]=\"floatLabel\">\r\n @if (label) {\r\n <mat-label [class.disabled]=\"isDisabled\">{{label}}</mat-label>\r\n }\r\n <input\r\n [id]=\"id\"\r\n #inputElement\r\n #input=\"ngForm\"\r\n matInput\r\n [style.padding-right]=\"(suffix || prefixIcon) && '35px'\"\r\n [type]=\"type\"\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 [required]=\"!!control.errors?.['required']\"/>\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 style=\"margin-right: 10px\">{{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']) {\r\n <mat-error>{{ validationTranslations.required }}</mat-error>\r\n @for (error of validatorMessagesArray; track error) {\r\n @if (control.errors?.[error.key]) {\r\n <mat-error>{{ error.value }}</mat-error>\r\n }\r\n }\r\n }\r\n </mat-form-field>\r\n</div>\r\n", styles: ["gerandon-basic-input{display:block}gerandon-basic-input .basic-input{height:inherit}gerandon-basic-input .basic-input .disabled{color:#ced4da}gerandon-basic-input .basic-input mat-form-field{width:100%}gerandon-basic-input .basic-input mat-form-field .mat-icon{padding:unset;margin-left:10px;margin-right:10px}gerandon-basic-input .basic-input mat-form-field input::placeholder{color:#adb5bd;font-style:italic}gerandon-basic-input .basic-input mat-form-field input:disabled{cursor:not-allowed}\n"] }]
38
- }], propDecorators: { iconClick: [{
39
- type: Output
40
- }] } });
41
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzaWMtaW5wdXQuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2xpYi9iYXNpYy1pbnB1dC9iYXNpYy1pbnB1dC5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtd2lkZ2V0cy9zcmMvbGliL2Jhc2ljLWlucHV0L2Jhc2ljLWlucHV0LmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFDTCxTQUFTLEVBQ1QsWUFBWSxFQUNaLFVBQVUsRUFFVixNQUFNLEVBQ04saUJBQWlCLEdBQ2xCLE1BQU0sZUFBZSxDQUFDO0FBQ3ZCLE9BQU8sRUFBRSxtQkFBbUIsRUFBRSxpQkFBaUIsRUFBRSxtQkFBbUIsRUFBRSxNQUFNLGdCQUFnQixDQUFDO0FBQzdGLE9BQU8sRUFBRSxrQkFBa0IsRUFBRSxNQUFNLDhCQUE4QixDQUFDO0FBQ2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lxyXG4gICAgICAgIHt7cHJlZml4SWNvbn19XHJcbiAgICAgIDwvbWF0LWljb24+XHJcbiAgICB9XHJcbiAgICBAaWYgKHN1ZmZpeEljb24pIHtcclxuICAgICAgPG1hdC1pY29uIG1hdFN1ZmZpeCBjb2xvcj1cImFjY2VudFwiPlxyXG4gICAgICAgIHt7c3VmZml4SWNvbn19XHJcbiAgICAgIDwvbWF0LWljb24+XHJcbiAgICB9XHJcbiAgICBAaWYgKHN1ZmZpeCkge1xyXG4gICAgICA8c3BhbiBtYXRTdWZmaXggc3R5bGU9XCJtYXJnaW4tcmlnaHQ6IDEwcHhcIj57e3N1ZmZpeH19PC9zcGFuPlxyXG4gICAgfVxyXG4gICAgQGlmIChjb250cm9sLmVycm9ycz8uWydzZXJ2ZXInXSkge1xyXG4gICAgICA8bWF0LWVycm9yPnt7IGNvbnRyb2wuZXJyb3JzPy5bJ3NlcnZlciddIH19PC9tYXQtZXJyb3I+XHJcbiAgICB9IEBlbHNlIGlmIChjb250cm9sLmVycm9ycz8uWydyZXF1aXJlZCddKSB7XHJcbiAgICAgIDxtYXQtZXJyb3I+e3sgdmFsaWRhdGlvblRyYW5zbGF0aW9ucy5yZXF1aXJlZCB9fTwvbWF0LWVycm9yPlxyXG4gICAgICBAZm9yIChlcnJvciBvZiB2YWxpZGF0b3JNZXNzYWdlc0FycmF5OyB0cmFjayBlcnJvcikge1xyXG4gICAgICAgIEBpZiAoY29udHJvbC5lcnJvcnM/LltlcnJvci5rZXldKSB7XHJcbiAgICAgICAgICA8bWF0LWVycm9yPnt7IGVycm9yLnZhbHVlIH19PC9tYXQtZXJyb3I+XHJcbiAgICAgICAgfVxyXG4gICAgICB9XHJcbiAgICB9XHJcbiAgPC9tYXQtZm9ybS1maWVsZD5cclxuPC9kaXY+XHJcbiJdfQ==
@@ -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: "17.3.7", 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: "17.3.7", 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: "17.3.7", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS1pbnB1dC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25neC13aWRnZXRzL3NyYy9saWIvY29yZS9iYXNlLWlucHV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFFTCxTQUFTLEVBQUUsTUFBTSxFQUFVLGNBQWMsRUFDekMsS0FBSyxFQUNHLFFBQVEsR0FDakIsTUFBTSxlQUFlLENBQUM7QUFHdkIsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDMUQsT0FBTyxFQUFFLE9BQU8sRUFBRSxJQUFJLEVBQUUsTUFBTSxXQUFXLENBQUM7O0FBTTFDLE1BQU0sQ0FBQyxNQUFNLG1DQUFtQyxHQUFHLElBQUksY0FBYyxD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zLnZhbGlkYXRvck1lc3NhZ2VzIVtrZXldLFxyXG4gICAgICAgIH0pKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG4gIH1cclxuXHJcbiAgb3ZlcnJpZGUgbmdBZnRlclZpZXdJbml0KCkge1xyXG4gICAgc3VwZXIubmdBZnRlclZpZXdJbml0KCk7XHJcbiAgICB0aGlzLmNkci5kZXRlY3RDaGFuZ2VzKCk7XHJcbiAgfVxyXG59XHJcbiJdfQ==
@@ -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: "17.3.7", ngImport: i0, type: BaseTextInput, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
11
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.7", type: BaseTextInput, inputs: { type: "type", maxLength: "maxLength" }, usesInheritance: true, ngImport: i0 }); }
12
- }
13
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.7", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS10ZXh0LWlucHV0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2xpYi9jb3JlL2Jhc2UtdGV4dC1pbnB1dC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQ0wsU0FBUyxFQUNULEtBQUssR0FDTixNQUFNLGVBQWUsQ0FBQztBQUV2QixPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sY0FBYyxDQUFDOztBQUd6QyxNQUFNLE9BQU8sYUFBaUIsU0FBUSxTQUFZO0lBRGxEOztRQUdrQixTQUFJLEdBQXVELE1BQU0sQ0FBQztRQUNsRSxjQUFTLEdBQUksR0FBRyxDQUFDO0tBQ2xDOzhHQUpZLGFBQWE7a0dBQWIsYUFBYTs7MkZBQWIsYUFBYTtrQkFEekIsU0FBUzs4QkFHUSxJQUFJO3NCQUFuQixLQUFLO2dCQUNVLFNBQVM7c0JBQXhCLEtBQUsiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQge1xyXG4gIERpcmVjdGl2ZSxcclxuICBJbnB1dCxcclxufSBmcm9tICdAYW5ndWxhci9jb3JlJztcclxuXHJcbmltcG9ydCB7IEJhc2VJbnB1dCB9IGZyb20gJy4vYmFzZS1pbnB1dCc7XHJcblxyXG5ARGlyZWN0aXZlKClcclxuZXhwb3J0IGNsYXNzIEJhc2VUZXh0SW5wdXQ8VD4gZXh0ZW5kcyBCYXNlSW5wdXQ8VD4ge1xyXG5cclxuICBASW5wdXQoKSBwdWJsaWMgdHlwZTogKCd0ZXh0JyB8ICdwYXNzd29yZCcgfCAnbnVtYmVyJyB8ICdlbWFpbCcgfCAndGVsJykgPSAndGV4dCc7XHJcbiAgQElucHV0KCkgcHVibGljIG1heExlbmd0aD8gPSA1MTI7XHJcbn1cclxuIl19
@@ -1,63 +0,0 @@
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: "17.3.7", ngImport: i0, type: BaseValueAccessor, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
50
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.7", 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: "17.3.7", 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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS12YWx1ZS1hY2Nlc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mVnaXN0ZXJPblRvdWNoZWQoZm46ICgpID0+IHVua25vd24pIHtcclxuICAgIHRoaXMub25Ub3VjaGVkID0gZm47XHJcbiAgICB0aGlzLnZhbHVlQWNjZXNzb3I/LnJlZ2lzdGVyT25Ub3VjaGVkKGZuKTtcclxuICB9XHJcblxyXG4gIHByb3RlY3RlZCBnZXQgdmFsdWVBY2Nlc3NvcigpOiBDb250cm9sVmFsdWVBY2Nlc3NvciB8IG51bGwge1xyXG4gICAgcmV0dXJuIHRoaXMuaW5wdXQgPyB0aGlzLmlucHV0LnZhbHVlQWNjZXNzb3IgOiBudWxsO1xyXG4gIH1cclxuXHJcbiAgbmdPbkRlc3Ryb3koKSB7XHJcbiAgICB0aGlzLmRlc3Ryb3kkLm5leHQoKTtcclxuICAgIHRoaXMuZGVzdHJveSQuY29tcGxldGUoKTtcclxuICB9XHJcbn1cclxuIl19
@@ -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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tcG9uZW50LXVuc3Vic2NyaWJlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LXdpZGdldHMvc3JjL2xpYi9jb3JlL2NvbXBvbmVudC11bnN1YnNjcmliZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsU0FBUyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBRTFDLE9BQU8sRUFBRSxVQUFVLEVBQUUsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sMEJBQTBCLENBQUM7QUFFMUQ7Ozs7OztHQU1HO0FBQ0gsTUFBTSxVQUFVLG9CQUFvQjtJQUNsQyxPQUFPLFVBQVUsTUFBVyxFQUFFLFdBQTRCO1FBQ3hELE1BQU0sV0FBVyxHQUFHLE1BQU0sQ0FBQyxXQUFXLENBQUM7UUFFdkMsTUFBTSxTQUFTLEdBQUcsSUFBWSxXQUFXLEdBQUcsQ0FBQztRQUM3QyxrRE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