@klippa/ngx-enhancy-forms 18.23.9 → 18.25.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/esm2022/lib/elements/sortable-grouped-items/sortable-grouped-items.component.mjs +8 -6
- package/esm2022/lib/elements/sortable-items/sortable-items.component.mjs +134 -33
- package/esm2022/lib/form/form.component.mjs +46 -35
- package/fesm2022/klippa-ngx-enhancy-forms.mjs +181 -68
- package/fesm2022/klippa-ngx-enhancy-forms.mjs.map +1 -1
- package/lib/elements/sortable-items/sortable-items.component.d.ts +21 -12
- package/lib/form/form.component.d.ts +5 -3
- package/package.json +2 -4
|
@@ -1,19 +1,28 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { AfterViewInit, ElementRef, NgZone, OnInit, QueryList, TemplateRef } from '@angular/core';
|
|
2
|
+
import { ControlContainer } from '@angular/forms';
|
|
3
3
|
import { ValueAccessorBase } from '../value-accessor-base/value-accessor-base.component';
|
|
4
|
+
import { FormElementComponent } from '../../form/form-element/form-element.component';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class SortableItemsComponent extends ValueAccessorBase<Array<any>> implements OnInit {
|
|
6
|
-
|
|
6
|
+
export declare class SortableItemsComponent extends ValueAccessorBase<Array<any>> implements OnInit, AfterViewInit {
|
|
7
|
+
protected parent: FormElementComponent;
|
|
8
|
+
protected controlContainer: ControlContainer;
|
|
9
|
+
private ngZone;
|
|
10
|
+
template: TemplateRef<any>;
|
|
7
11
|
sortableItemSize: 'sm' | 'lg';
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
dragItems: QueryList<ElementRef>;
|
|
13
|
+
dragSourceIndex: number;
|
|
14
|
+
private currentDragPosition;
|
|
10
15
|
private scrollInterval;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
16
|
+
constructor(parent: FormElementComponent, controlContainer: ControlContainer, ngZone: NgZone);
|
|
17
|
+
ngAfterViewInit(): void;
|
|
18
|
+
private onDragOver;
|
|
19
|
+
private onDragEnter;
|
|
20
|
+
private onDragStart;
|
|
21
|
+
private onDragEnd;
|
|
22
|
+
shouldShoveDown(index: number): boolean;
|
|
23
|
+
shouldShoveUp(index: number): boolean;
|
|
15
24
|
private scrollPage;
|
|
16
25
|
private stopScrolling;
|
|
17
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SortableItemsComponent,
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SortableItemsComponent, "klp-form-sortable-items", never, { "sortableItemSize": { "alias": "sortableItemSize"; "required": false; };
|
|
26
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SortableItemsComponent, [{ optional: true; host: true; }, { optional: true; host: true; }, null]>;
|
|
27
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SortableItemsComponent, "klp-form-sortable-items", never, { "sortableItemSize": { "alias": "sortableItemSize"; "required": false; }; }, {}, ["template"], never, false, never>;
|
|
19
28
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { EventEmitter, OnChanges, OnDestroy, OnInit, SimpleChanges, TemplateRef } from '@angular/core';
|
|
2
|
-
import { AbstractControl, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
|
2
|
+
import { AbstractControl, FormArray, FormGroup, UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms';
|
|
3
3
|
import { FormElementComponent } from './form-element/form-element.component';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare const invalidFieldsSymbol: unique symbol;
|
|
@@ -15,12 +15,14 @@ export declare class FormComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
15
15
|
readOnly: boolean;
|
|
16
16
|
showErrorMessages: boolean;
|
|
17
17
|
errorMessageLocation: 'belowCaption' | 'rightOfCaption';
|
|
18
|
-
formGroup:
|
|
18
|
+
formGroup: FormGroup;
|
|
19
|
+
formArray: FormArray;
|
|
19
20
|
warnings: Map<AbstractControl, string | TemplateRef<any>>;
|
|
20
21
|
errors: Map<AbstractControl, string>;
|
|
21
22
|
patchValueInterceptor: (values: any) => Promise<any>;
|
|
22
23
|
allowSubmitOn: 'buttonAndEnter' | 'buttonOnly';
|
|
23
24
|
onInjected: EventEmitter<Record<string, any>>;
|
|
25
|
+
private topLevelFormControl;
|
|
24
26
|
private activeControls;
|
|
25
27
|
constructor(parent: FormComponent, subFormPlaceholder: SubFormDirective);
|
|
26
28
|
ngOnInit(): void;
|
|
@@ -44,5 +46,5 @@ export declare class FormComponent implements OnInit, OnDestroy, OnChanges {
|
|
|
44
46
|
private getRenderedFieldValuesFormArray;
|
|
45
47
|
private setDisabledStatesForAllControls;
|
|
46
48
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
|
|
47
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "klp-form", never, { "readOnly": { "alias": "readOnly"; "required": false; }; "showErrorMessages": { "alias": "showErrorMessages"; "required": false; }; "errorMessageLocation": { "alias": "errorMessageLocation"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "warnings": { "alias": "warnings"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "patchValueInterceptor": { "alias": "patchValueInterceptor"; "required": false; }; "allowSubmitOn": { "alias": "allowSubmitOn"; "required": false; }; }, { "onInjected": "onInjected"; }, never, ["*"], false, never>;
|
|
49
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "klp-form", never, { "readOnly": { "alias": "readOnly"; "required": false; }; "showErrorMessages": { "alias": "showErrorMessages"; "required": false; }; "errorMessageLocation": { "alias": "errorMessageLocation"; "required": false; }; "formGroup": { "alias": "formGroup"; "required": false; }; "formArray": { "alias": "formArray"; "required": false; }; "warnings": { "alias": "warnings"; "required": false; }; "errors": { "alias": "errors"; "required": false; }; "patchValueInterceptor": { "alias": "patchValueInterceptor"; "required": false; }; "allowSubmitOn": { "alias": "allowSubmitOn"; "required": false; }; }, { "onInjected": "onInjected"; }, never, ["*"], false, never>;
|
|
48
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klippa/ngx-enhancy-forms",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.25.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -10,9 +10,7 @@
|
|
|
10
10
|
"@ng-select/ng-select": ">=13",
|
|
11
11
|
"ngx-mat-datefns-date-adapter": ">=10",
|
|
12
12
|
"date-fns": ">=2.29",
|
|
13
|
-
"lodash-es": ">=4.17"
|
|
14
|
-
"@dustfoundation/ngx-sortablejs": ">=15.0.0",
|
|
15
|
-
"sortablejs": ">=1.15"
|
|
13
|
+
"lodash-es": ">=4.17"
|
|
16
14
|
},
|
|
17
15
|
"dependencies": {
|
|
18
16
|
"tslib": "^2.0.0"
|