special-forms 21.0.2 → 21.1.0
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "special-forms",
|
|
3
|
-
"version": "21.0
|
|
3
|
+
"version": "21.1.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^21",
|
|
6
6
|
"@angular/cdk": "^21",
|
|
@@ -17,14 +17,15 @@
|
|
|
17
17
|
},
|
|
18
18
|
"sideEffects": false,
|
|
19
19
|
"module": "fesm2022/special-forms.mjs",
|
|
20
|
-
"typings": "
|
|
20
|
+
"typings": "types/special-forms.d.ts",
|
|
21
21
|
"exports": {
|
|
22
22
|
"./package.json": {
|
|
23
23
|
"default": "./package.json"
|
|
24
24
|
},
|
|
25
25
|
".": {
|
|
26
|
-
"types": "./
|
|
26
|
+
"types": "./types/special-forms.d.ts",
|
|
27
27
|
"default": "./fesm2022/special-forms.mjs"
|
|
28
28
|
}
|
|
29
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"type": "module"
|
|
30
31
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';
|
|
2
2
|
import { Observable, Subscription } from 'rxjs';
|
|
3
|
-
import { ValidatorFn, AsyncValidatorFn, FormControl,
|
|
3
|
+
import { ValidatorFn, AsyncValidatorFn, FormControl, FormArray, FormGroup, AbstractControl } from '@angular/forms';
|
|
4
4
|
import { InputmaskOptions } from '@ngneat/input-mask';
|
|
5
5
|
import { ThemePalette, ErrorStateMatcher } from '@angular/material/core';
|
|
6
6
|
import * as i0 from '@angular/core';
|
|
@@ -8,6 +8,7 @@ import { OnInit, EventEmitter, ViewContainerRef, PipeTransform } from '@angular/
|
|
|
8
8
|
import * as i2 from '@angular/common';
|
|
9
9
|
import * as i4 from '@angular/material/button';
|
|
10
10
|
import { Editor, Toolbar } from 'ngx-editor';
|
|
11
|
+
import { MatChipInputEvent, MatChipEditedEvent } from '@angular/material/chips';
|
|
11
12
|
|
|
12
13
|
declare enum EControlTypes {
|
|
13
14
|
pkey = "PRIMARY-KEY",
|
|
@@ -20,6 +21,7 @@ declare enum EControlTypes {
|
|
|
20
21
|
upload = "UPLOAD",
|
|
21
22
|
autocomplete = "AUTOCOMPLETE",
|
|
22
23
|
multiple = "MULTIPLE-AUTOCOMPLETE",
|
|
24
|
+
chipInput = "CHIP-INPUT",
|
|
23
25
|
array = "ARRAY",
|
|
24
26
|
form = "FORM",
|
|
25
27
|
label = "LABEL",
|
|
@@ -187,6 +189,16 @@ interface IRichTextField extends IFieldData {
|
|
|
187
189
|
defaultValue: string;
|
|
188
190
|
}
|
|
189
191
|
|
|
192
|
+
type IChipInputSettings = {
|
|
193
|
+
withEditButton?: boolean;
|
|
194
|
+
addOnBlur?: boolean;
|
|
195
|
+
};
|
|
196
|
+
interface IChipInputField extends IFieldData {
|
|
197
|
+
settings: IChipInputSettings;
|
|
198
|
+
type: EControlTypes.chipInput;
|
|
199
|
+
defaultValue: string[];
|
|
200
|
+
}
|
|
201
|
+
|
|
190
202
|
interface IcontrolName {
|
|
191
203
|
name: string;
|
|
192
204
|
}
|
|
@@ -220,7 +232,7 @@ interface IDefaultField extends IFieldData {
|
|
|
220
232
|
type: EControlTypes.default;
|
|
221
233
|
defaultValue: any;
|
|
222
234
|
}
|
|
223
|
-
type TRawFields = IDefaultField | IInputField | IRichTextField | IDropdownField | IArrayField | IFormField | IAutocompleteField | IMultipleAutocompleteField | IDatePickerField | ITextAreaField | IUploadField | ILabelField | IPkeyField | ICheckboxField;
|
|
235
|
+
type TRawFields = IDefaultField | IInputField | IRichTextField | IDropdownField | IArrayField | IFormField | IAutocompleteField | IMultipleAutocompleteField | IChipInputField | IDatePickerField | ITextAreaField | IUploadField | ILabelField | IPkeyField | ICheckboxField;
|
|
224
236
|
type TSpecialInput = IInputField & IcontrolName;
|
|
225
237
|
type TSpecialDefault = IDefaultField & IcontrolName;
|
|
226
238
|
type TSpecialDropdown = IDropdownField & IcontrolName;
|
|
@@ -234,7 +246,8 @@ type ISpecialTextArea = ITextAreaField & IcontrolName;
|
|
|
234
246
|
type ISpecialLabel = ILabelField & IcontrolName;
|
|
235
247
|
type ISpecialUpload = IUploadField & IcontrolName;
|
|
236
248
|
type ISpecialPkey = IPkeyField & IcontrolName;
|
|
237
|
-
type
|
|
249
|
+
type TSpecialChipInput = IChipInputField & IcontrolName;
|
|
250
|
+
type TSpecialFields = TSpecialDefault | TSpecialInput | TSpecialDropdown | TSpecialArray | TSpecialForm | TSpecialRichText | TSpecialAutocomplete | ISpecialCheckbox | ISpecialTextArea | ISpecialUpload | ISpecialLabel | ISpecialPkey | TSpecialChipInput | TSpecialDatepicker;
|
|
238
251
|
interface IFormStructure {
|
|
239
252
|
[name: string]: Partial<TRawFields>;
|
|
240
253
|
}
|
|
@@ -347,11 +360,14 @@ declare class SpecialFormArray extends FormArray implements IFieldBasicData {
|
|
|
347
360
|
declare class SpecialAutocompleteComponent {
|
|
348
361
|
control: SpecialFormControl<IAutocompleteField>;
|
|
349
362
|
subs: Subscription;
|
|
363
|
+
readonly browserAutocompleteName: string;
|
|
364
|
+
preventBrowserAutocomplete: boolean;
|
|
350
365
|
constructor();
|
|
351
366
|
ngOnInit(): void;
|
|
352
367
|
get settings(): IAutocompleteSettings<any>;
|
|
353
368
|
init(): void;
|
|
354
369
|
firstLoad(): void;
|
|
370
|
+
allowInput(): void;
|
|
355
371
|
configValue: (item: any) => any;
|
|
356
372
|
optionSelected(data: MatAutocompleteSelectedEvent): void;
|
|
357
373
|
iconClick(event: Event): void;
|
|
@@ -398,11 +414,14 @@ declare class SpecialMultipleAutocompleteComponent {
|
|
|
398
414
|
control: SpecialFormControl<IMultipleAutocompleteField>;
|
|
399
415
|
subs: Subscription;
|
|
400
416
|
internalControl: FormControl<any>;
|
|
417
|
+
readonly browserAutocompleteName: string;
|
|
418
|
+
preventBrowserAutocomplete: boolean;
|
|
401
419
|
constructor();
|
|
402
420
|
ngOnInit(): void;
|
|
403
421
|
get settings(): IMultipleAutocompleteSettings<any>;
|
|
404
422
|
init(): void;
|
|
405
423
|
firstLoad(): void;
|
|
424
|
+
allowInput(): void;
|
|
406
425
|
optionSelected(data: MatAutocompleteSelectedEvent): void;
|
|
407
426
|
iconClick(event: Event): void;
|
|
408
427
|
remove(value: any[]): void;
|
|
@@ -561,9 +580,24 @@ declare class SpecialRichtextComponent {
|
|
|
561
580
|
static ɵcmp: i0.ɵɵComponentDeclaration<SpecialRichtextComponent, "sp-input", never, { "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
562
581
|
}
|
|
563
582
|
|
|
583
|
+
declare class SpecialChipInputComponent {
|
|
584
|
+
control: SpecialFormControl<IChipInputField>;
|
|
585
|
+
readonly separatorKeysCodes: readonly [13, 188];
|
|
586
|
+
private readonly announcer;
|
|
587
|
+
get settings(): IChipInputSettings;
|
|
588
|
+
get values(): string[];
|
|
589
|
+
add(event: MatChipInputEvent): void;
|
|
590
|
+
remove(index: number): void;
|
|
591
|
+
edit(index: number, event: MatChipEditedEvent): void;
|
|
592
|
+
private canModify;
|
|
593
|
+
private updateValue;
|
|
594
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SpecialChipInputComponent, never>;
|
|
595
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpecialChipInputComponent, "sp-chip-input", never, { "control": { "alias": "control"; "required": false; }; }, {}, never, never, true, never>;
|
|
596
|
+
}
|
|
597
|
+
|
|
564
598
|
declare class SpecialFormModule {
|
|
565
599
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpecialFormModule, never>;
|
|
566
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SpecialFormModule, [typeof SpecialArrayComponent, typeof FormControlsRenderDirective, typeof SpecialFormComponent], [typeof i2.CommonModule, typeof FormControlsListPipe, typeof i4.MatButtonModule, typeof SpecialRichtextComponent, typeof SpecialDropdownComponent, typeof SpecialInputComponent, typeof SpecialAutocompleteComponent, typeof SpecialDatepickerComponent, typeof SpecialLabelComponent, typeof SpecialMultipleAutocompleteComponent, typeof SpecialCheckboxComponent, typeof SpecialTextAreaComponent, typeof SpecialUploadComponent], [typeof SpecialArrayComponent, typeof FormControlsRenderDirective, typeof SpecialFormComponent]>;
|
|
600
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SpecialFormModule, [typeof SpecialArrayComponent, typeof FormControlsRenderDirective, typeof SpecialFormComponent], [typeof i2.CommonModule, typeof FormControlsListPipe, typeof i4.MatButtonModule, typeof SpecialRichtextComponent, typeof SpecialDropdownComponent, typeof SpecialInputComponent, typeof SpecialAutocompleteComponent, typeof SpecialDatepickerComponent, typeof SpecialLabelComponent, typeof SpecialMultipleAutocompleteComponent, typeof SpecialChipInputComponent, typeof SpecialCheckboxComponent, typeof SpecialTextAreaComponent, typeof SpecialUploadComponent], [typeof SpecialArrayComponent, typeof FormControlsRenderDirective, typeof SpecialFormComponent]>;
|
|
567
601
|
static ɵinj: i0.ɵɵInjectorDeclaration<SpecialFormModule>;
|
|
568
602
|
}
|
|
569
603
|
|
|
@@ -591,5 +625,5 @@ declare class TextByFunctionPipe implements PipeTransform {
|
|
|
591
625
|
static ɵpipe: i0.ɵɵPipeDeclaration<TextByFunctionPipe, "textByFunction", true>;
|
|
592
626
|
}
|
|
593
627
|
|
|
594
|
-
export { EControlTypes, ErrorMessagePipe, ErrorStateMatcherService, FormControlsListPipe, FormControlsRenderDirective, ISpecialControl, SpecialArrayComponent, SpecialAutocompleteComponent, SpecialCheckboxComponent, SpecialDatepickerComponent, SpecialDropdownComponent, SpecialFormArray, SpecialFormBuilderService, SpecialFormComponent, SpecialFormControl, SpecialFormGroup, SpecialFormModule, SpecialInputComponent, SpecialLabelComponent, SpecialMultipleAutocompleteComponent, SpecialRichtextComponent, SpecialTextAreaComponent, SpecialUploadComponent, TextByFunctionPipe, currencyInputMask, numberMask };
|
|
595
|
-
export type { IArrayField, IArraySettings, IAutocompleteField, IAutocompleteSettings, ICheckboxField, ICheckboxSettings, IDatePickerField, IDatePickerSettings, IDefaultField, IDropdownField, IDropdownSettings, IFieldBasicData, IFieldData, IFormField, IFormSettings, IFormStructure, IInputField, IInputSettings, ILabelField, ILabelSettings, IMultipleAutocompleteField, IMultipleAutocompleteSettings, IPkeyField, IRichTextField, IRichTextSettings, ISpecialCheckbox, ISpecialLabel, ISpecialPkey, ISpecialTextArea, ISpecialUpload, ITextAreaField, ITextAreaSettings, IUploadField, IUploadSettings, TRawFields, TSpecialArray, TSpecialAutocomplete, TSpecialDatepicker, TSpecialDefault, TSpecialDropdown, TSpecialFields, TSpecialForm, TSpecialInput, TSpecialRichText };
|
|
628
|
+
export { EControlTypes, ErrorMessagePipe, ErrorStateMatcherService, FormControlsListPipe, FormControlsRenderDirective, ISpecialControl, SpecialArrayComponent, SpecialAutocompleteComponent, SpecialCheckboxComponent, SpecialChipInputComponent, SpecialDatepickerComponent, SpecialDropdownComponent, SpecialFormArray, SpecialFormBuilderService, SpecialFormComponent, SpecialFormControl, SpecialFormGroup, SpecialFormModule, SpecialInputComponent, SpecialLabelComponent, SpecialMultipleAutocompleteComponent, SpecialRichtextComponent, SpecialTextAreaComponent, SpecialUploadComponent, TextByFunctionPipe, currencyInputMask, numberMask };
|
|
629
|
+
export type { IArrayField, IArraySettings, IAutocompleteField, IAutocompleteSettings, ICheckboxField, ICheckboxSettings, IChipInputField, IChipInputSettings, IDatePickerField, IDatePickerSettings, IDefaultField, IDropdownField, IDropdownSettings, IFieldBasicData, IFieldData, IFormField, IFormSettings, IFormStructure, IInputField, IInputSettings, ILabelField, ILabelSettings, IMultipleAutocompleteField, IMultipleAutocompleteSettings, IPkeyField, IRichTextField, IRichTextSettings, ISpecialCheckbox, ISpecialLabel, ISpecialPkey, ISpecialTextArea, ISpecialUpload, ITextAreaField, ITextAreaSettings, IUploadField, IUploadSettings, TRawFields, TSpecialArray, TSpecialAutocomplete, TSpecialChipInput, TSpecialDatepicker, TSpecialDefault, TSpecialDropdown, TSpecialFields, TSpecialForm, TSpecialInput, TSpecialRichText };
|