@ng-formworks/core 16.5.2 → 16.5.7
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/json-schema-form.module.mjs +3 -3
- package/esm2022/lib/json-schema-form.service.mjs +25 -5
- package/esm2022/lib/widget-library/element-attribute.directive.mjs +33 -0
- package/esm2022/lib/widget-library/index.mjs +5 -4
- package/esm2022/lib/widget-library/input.component.mjs +21 -8
- package/esm2022/lib/widget-library/number.component.mjs +28 -12
- package/esm2022/lib/widget-library/orderable.directive.mjs +10 -1
- package/esm2022/lib/widget-library/root.component.mjs +103 -34
- package/esm2022/lib/widget-library/section.component.mjs +9 -9
- package/esm2022/lib/widget-library/select-framework.component.mjs +7 -7
- package/esm2022/lib/widget-library/select-widget.component.mjs +7 -7
- package/esm2022/lib/widget-library/template.component.mjs +8 -7
- package/esm2022/lib/widget-library/widget-library.module.mjs +23 -8
- package/fesm2022/ng-formworks-core.mjs +462 -292
- package/fesm2022/ng-formworks-core.mjs.map +1 -1
- package/lib/json-schema-form.service.d.ts +7 -1
- package/lib/shared/validator.functions.d.ts +1 -1
- package/lib/widget-library/element-attribute.directive.d.ts +13 -0
- package/lib/widget-library/index.d.ts +5 -4
- package/lib/widget-library/input.component.d.ts +2 -1
- package/lib/widget-library/number.component.d.ts +1 -0
- package/lib/widget-library/orderable.directive.d.ts +2 -0
- package/lib/widget-library/root.component.d.ts +8 -1
- package/lib/widget-library/select-framework.component.d.ts +2 -3
- package/lib/widget-library/select-widget.component.d.ts +2 -3
- package/lib/widget-library/template.component.d.ts +2 -3
- package/lib/widget-library/widget-library.module.d.ts +5 -3
- package/package.json +4 -2
|
@@ -53,6 +53,12 @@ export declare class JsonSchemaFormService implements OnDestroy {
|
|
|
53
53
|
defaultFormOptions: any;
|
|
54
54
|
fcValueChangesSubs: Subscription;
|
|
55
55
|
fcStatusChangesSubs: Subscription;
|
|
56
|
+
private draggableStateSubject;
|
|
57
|
+
draggableState$: import("rxjs").Observable<boolean>;
|
|
58
|
+
setDraggableState(value: boolean): void;
|
|
59
|
+
private sortableOptionsSubject;
|
|
60
|
+
sortableOptions$: import("rxjs").Observable<any>;
|
|
61
|
+
setSortableOptions(value: any): void;
|
|
56
62
|
constructor();
|
|
57
63
|
ngOnDestroy(): void;
|
|
58
64
|
setLanguage(language?: string): void;
|
|
@@ -108,7 +114,7 @@ export declare class JsonSchemaFormService implements OnDestroy {
|
|
|
108
114
|
getLayoutPointer(ctx: any): string;
|
|
109
115
|
isControlBound(ctx: any): boolean;
|
|
110
116
|
addItem(ctx: any, name?: string): boolean;
|
|
111
|
-
moveArrayItem(ctx: any, oldIndex: number, newIndex: number): boolean;
|
|
117
|
+
moveArrayItem(ctx: any, oldIndex: number, newIndex: number, moveLayout?: boolean): boolean;
|
|
112
118
|
removeItem(ctx: any): boolean;
|
|
113
119
|
static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
|
|
114
120
|
static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaFormService>;
|
|
@@ -199,7 +199,7 @@ export declare function isSymbol(item: any): boolean;
|
|
|
199
199
|
* // { any = false } strict - if truthy, also checks JavaScript tyoe
|
|
200
200
|
* // { SchemaType }
|
|
201
201
|
*/
|
|
202
|
-
export declare function getType(value: any, strict?: any): "
|
|
202
|
+
export declare function getType(value: any, strict?: any): "array" | "integer" | "boolean" | "null" | "number" | "object" | "string";
|
|
203
203
|
/**
|
|
204
204
|
* 'isType' function
|
|
205
205
|
*
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ElementRef, Renderer2, SimpleChanges } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ElementAttributeDirective {
|
|
4
|
+
private renderer;
|
|
5
|
+
private elementRef;
|
|
6
|
+
attributes: {
|
|
7
|
+
[key: string]: any;
|
|
8
|
+
};
|
|
9
|
+
constructor(renderer: Renderer2, elementRef: ElementRef);
|
|
10
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElementAttributeDirective, never>;
|
|
12
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ElementAttributeDirective, "[attributes]", never, { "attributes": { "alias": "attributes"; "required": false; }; }, {}, never, never, false, never>;
|
|
13
|
+
}
|
|
@@ -12,33 +12,34 @@ import { OneOfComponent } from './one-of.component';
|
|
|
12
12
|
import { RadiosComponent } from './radios.component';
|
|
13
13
|
import { RootComponent } from './root.component';
|
|
14
14
|
import { SectionComponent } from './section.component';
|
|
15
|
-
import { SelectComponent } from './select.component';
|
|
16
15
|
import { SelectFrameworkComponent } from './select-framework.component';
|
|
17
16
|
import { SelectWidgetComponent } from './select-widget.component';
|
|
17
|
+
import { SelectComponent } from './select.component';
|
|
18
18
|
import { SubmitComponent } from './submit.component';
|
|
19
19
|
import { TabComponent } from './tab.component';
|
|
20
20
|
import { TabsComponent } from './tabs.component';
|
|
21
21
|
import { TemplateComponent } from './template.component';
|
|
22
22
|
import { TextareaComponent } from './textarea.component';
|
|
23
|
-
export declare const BASIC_WIDGETS: (typeof AddReferenceComponent | typeof ButtonComponent | typeof CheckboxComponent | typeof CheckboxesComponent | typeof FileComponent | typeof InputComponent | typeof MessageComponent | typeof NoneComponent | typeof NumberComponent | typeof OneOfComponent | typeof RadiosComponent | typeof RootComponent | typeof SectionComponent | typeof
|
|
23
|
+
export declare const BASIC_WIDGETS: (typeof AddReferenceComponent | typeof ButtonComponent | typeof CheckboxComponent | typeof CheckboxesComponent | typeof FileComponent | typeof HiddenComponent | typeof InputComponent | typeof MessageComponent | typeof NoneComponent | typeof NumberComponent | typeof OneOfComponent | typeof RadiosComponent | typeof RootComponent | typeof SectionComponent | typeof SelectFrameworkComponent | typeof SelectWidgetComponent | typeof SelectComponent | typeof SubmitComponent | typeof TabComponent | typeof TabsComponent | typeof TemplateComponent | typeof TextareaComponent)[];
|
|
24
24
|
export { AddReferenceComponent } from './add-reference.component';
|
|
25
|
-
export { OneOfComponent } from './one-of.component';
|
|
26
25
|
export { ButtonComponent } from './button.component';
|
|
27
26
|
export { CheckboxComponent } from './checkbox.component';
|
|
28
27
|
export { CheckboxesComponent } from './checkboxes.component';
|
|
28
|
+
export { ElementAttributeDirective } from './element-attribute.directive';
|
|
29
29
|
export { FileComponent } from './file.component';
|
|
30
30
|
export { HiddenComponent } from './hidden.component';
|
|
31
31
|
export { InputComponent } from './input.component';
|
|
32
32
|
export { MessageComponent } from './message.component';
|
|
33
33
|
export { NoneComponent } from './none.component';
|
|
34
34
|
export { NumberComponent } from './number.component';
|
|
35
|
+
export { OneOfComponent } from './one-of.component';
|
|
35
36
|
export { OrderableDirective } from './orderable.directive';
|
|
36
37
|
export { RadiosComponent } from './radios.component';
|
|
37
38
|
export { RootComponent } from './root.component';
|
|
38
39
|
export { SectionComponent } from './section.component';
|
|
39
|
-
export { SelectComponent } from './select.component';
|
|
40
40
|
export { SelectFrameworkComponent } from './select-framework.component';
|
|
41
41
|
export { SelectWidgetComponent } from './select-widget.component';
|
|
42
|
+
export { SelectComponent } from './select.component';
|
|
42
43
|
export { SubmitComponent } from './submit.component';
|
|
43
44
|
export { TabComponent } from './tab.component';
|
|
44
45
|
export { TabsComponent } from './tabs.component';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AbstractControl } from '@angular/forms';
|
|
2
1
|
import { OnInit } from '@angular/core';
|
|
2
|
+
import { AbstractControl } from '@angular/forms';
|
|
3
3
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class InputComponent implements OnInit {
|
|
@@ -15,6 +15,7 @@ export declare class InputComponent implements OnInit {
|
|
|
15
15
|
layoutIndex: number[];
|
|
16
16
|
dataIndex: number[];
|
|
17
17
|
constructor(jsf: JsonSchemaFormService);
|
|
18
|
+
get inputAttributes(): any;
|
|
18
19
|
ngOnInit(): void;
|
|
19
20
|
updateValue(event: any): void;
|
|
20
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
|
|
@@ -18,6 +18,7 @@ export declare class NumberComponent implements OnInit {
|
|
|
18
18
|
layoutIndex: number[];
|
|
19
19
|
dataIndex: number[];
|
|
20
20
|
constructor(jsf: JsonSchemaFormService);
|
|
21
|
+
get inputAttributes(): any;
|
|
21
22
|
ngOnInit(): void;
|
|
22
23
|
updateValue(event: any): void;
|
|
23
24
|
static ɵfac: i0.ɵɵFactoryDeclaration<NumberComponent, never>;
|
|
@@ -35,7 +35,9 @@ export declare class OrderableDirective implements OnInit {
|
|
|
35
35
|
layoutIndex: number[];
|
|
36
36
|
dataIndex: number[];
|
|
37
37
|
constructor(elementRef: ElementRef, jsf: JsonSchemaFormService, ngZone: NgZone);
|
|
38
|
+
private draggableStateSubscription;
|
|
38
39
|
ngOnInit(): void;
|
|
40
|
+
ngOnDestroy(): void;
|
|
39
41
|
static ɵfac: i0.ɵɵFactoryDeclaration<OrderableDirective, never>;
|
|
40
42
|
static ɵdir: i0.ɵɵDirectiveDeclaration<OrderableDirective, "[orderable]", never, { "orderable": { "alias": "orderable"; "required": false; }; "layoutNode": { "alias": "layoutNode"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "dataIndex": { "alias": "dataIndex"; "required": false; }; }, {}, never, never, false, never>;
|
|
41
43
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
1
2
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class RootComponent {
|
|
4
|
+
export declare class RootComponent implements OnInit, OnDestroy {
|
|
4
5
|
private jsf;
|
|
5
6
|
options: any;
|
|
6
7
|
dataIndex: number[];
|
|
@@ -9,9 +10,15 @@ export declare class RootComponent {
|
|
|
9
10
|
isOrderable: boolean;
|
|
10
11
|
isFlexItem: boolean;
|
|
11
12
|
constructor(jsf: JsonSchemaFormService);
|
|
13
|
+
sortableObj: any;
|
|
14
|
+
sortableConfig: any;
|
|
15
|
+
private sortableOptionsSubscription;
|
|
16
|
+
sortableInit(sortable: any): void;
|
|
12
17
|
isDraggable(node: any): boolean;
|
|
13
18
|
getFlexAttribute(node: any, attribute: string): any;
|
|
14
19
|
showWidget(layoutNode: any): boolean;
|
|
20
|
+
ngOnInit(): void;
|
|
21
|
+
ngOnDestroy(): void;
|
|
15
22
|
static ɵfac: i0.ɵɵFactoryDeclaration<RootComponent, never>;
|
|
16
23
|
static ɵcmp: i0.ɵɵComponentDeclaration<RootComponent, "root-widget", never, { "dataIndex": { "alias": "dataIndex"; "required": false; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; }; "layout": { "alias": "layout"; "required": false; }; "isOrderable": { "alias": "isOrderable"; "required": false; }; "isFlexItem": { "alias": "isFlexItem"; "required": false; }; }, {}, never, never, false, never>;
|
|
17
24
|
}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SelectFrameworkComponent implements OnChanges, OnInit {
|
|
5
|
-
private componentFactory;
|
|
6
5
|
private jsf;
|
|
7
6
|
newComponent: ComponentRef<any>;
|
|
8
7
|
layoutNode: any;
|
|
9
8
|
layoutIndex: number[];
|
|
10
9
|
dataIndex: number[];
|
|
11
10
|
widgetContainer: ViewContainerRef;
|
|
12
|
-
constructor(
|
|
11
|
+
constructor(jsf: JsonSchemaFormService);
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
ngOnChanges(): void;
|
|
15
14
|
updateComponent(): void;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class SelectWidgetComponent implements OnChanges, OnInit {
|
|
5
|
-
private componentFactory;
|
|
6
5
|
private jsf;
|
|
7
6
|
newComponent: ComponentRef<any>;
|
|
8
7
|
layoutNode: any;
|
|
9
8
|
layoutIndex: number[];
|
|
10
9
|
dataIndex: number[];
|
|
11
10
|
widgetContainer: ViewContainerRef;
|
|
12
|
-
constructor(
|
|
11
|
+
constructor(jsf: JsonSchemaFormService);
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
ngOnChanges(): void;
|
|
15
14
|
updateComponent(): void;
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
2
|
import { JsonSchemaFormService } from '../json-schema-form.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class TemplateComponent implements OnInit, OnChanges {
|
|
5
|
-
private componentFactory;
|
|
6
5
|
private jsf;
|
|
7
6
|
newComponent: ComponentRef<any>;
|
|
8
7
|
layoutNode: any;
|
|
9
8
|
layoutIndex: number[];
|
|
10
9
|
dataIndex: number[];
|
|
11
10
|
widgetContainer: ViewContainerRef;
|
|
12
|
-
constructor(
|
|
11
|
+
constructor(jsf: JsonSchemaFormService);
|
|
13
12
|
ngOnInit(): void;
|
|
14
13
|
ngOnChanges(): void;
|
|
15
14
|
updateComponent(): void;
|
|
@@ -22,10 +22,12 @@ import * as i20 from "./tabs.component";
|
|
|
22
22
|
import * as i21 from "./template.component";
|
|
23
23
|
import * as i22 from "./textarea.component";
|
|
24
24
|
import * as i23 from "./orderable.directive";
|
|
25
|
-
import * as i24 from "
|
|
26
|
-
import * as i25 from "@angular/
|
|
25
|
+
import * as i24 from "./element-attribute.directive";
|
|
26
|
+
import * as i25 from "@angular/common";
|
|
27
|
+
import * as i26 from "@angular/forms";
|
|
28
|
+
import * as i27 from "nxt-sortablejs";
|
|
27
29
|
export declare class WidgetLibraryModule {
|
|
28
30
|
static ɵfac: i0.ɵɵFactoryDeclaration<WidgetLibraryModule, never>;
|
|
29
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetLibraryModule, [typeof i1.AddReferenceComponent, typeof i2.OneOfComponent, typeof i3.ButtonComponent, typeof i4.CheckboxComponent, typeof i5.CheckboxesComponent, typeof i6.FileComponent, typeof i7.HiddenComponent, typeof i8.InputComponent, typeof i9.MessageComponent, typeof i10.NoneComponent, typeof i11.NumberComponent, typeof i12.RadiosComponent, typeof i13.RootComponent, typeof i14.SectionComponent, typeof i15.SelectComponent, typeof i16.SelectFrameworkComponent, typeof i17.SelectWidgetComponent, typeof i18.SubmitComponent, typeof i19.TabComponent, typeof i20.TabsComponent, typeof i21.TemplateComponent, typeof i22.TextareaComponent, typeof i23.OrderableDirective], [typeof
|
|
31
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<WidgetLibraryModule, [typeof i1.AddReferenceComponent, typeof i2.OneOfComponent, typeof i3.ButtonComponent, typeof i4.CheckboxComponent, typeof i5.CheckboxesComponent, typeof i6.FileComponent, typeof i7.HiddenComponent, typeof i8.InputComponent, typeof i9.MessageComponent, typeof i10.NoneComponent, typeof i11.NumberComponent, typeof i12.RadiosComponent, typeof i13.RootComponent, typeof i14.SectionComponent, typeof i15.SelectComponent, typeof i16.SelectFrameworkComponent, typeof i17.SelectWidgetComponent, typeof i18.SubmitComponent, typeof i19.TabComponent, typeof i20.TabsComponent, typeof i21.TemplateComponent, typeof i22.TextareaComponent, typeof i23.OrderableDirective, typeof i24.ElementAttributeDirective], [typeof i25.CommonModule, typeof i26.FormsModule, typeof i26.ReactiveFormsModule, typeof i27.SortablejsModule], [typeof i1.AddReferenceComponent, typeof i2.OneOfComponent, typeof i3.ButtonComponent, typeof i4.CheckboxComponent, typeof i5.CheckboxesComponent, typeof i6.FileComponent, typeof i7.HiddenComponent, typeof i8.InputComponent, typeof i9.MessageComponent, typeof i10.NoneComponent, typeof i11.NumberComponent, typeof i12.RadiosComponent, typeof i13.RootComponent, typeof i14.SectionComponent, typeof i15.SelectComponent, typeof i16.SelectFrameworkComponent, typeof i17.SelectWidgetComponent, typeof i18.SubmitComponent, typeof i19.TabComponent, typeof i20.TabsComponent, typeof i21.TemplateComponent, typeof i22.TextareaComponent, typeof i23.OrderableDirective, typeof i24.ElementAttributeDirective]>;
|
|
30
32
|
static ɵinj: i0.ɵɵInjectorDeclaration<WidgetLibraryModule>;
|
|
31
33
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ng-formworks/core",
|
|
3
|
-
"version": "16.5.
|
|
3
|
+
"version": "16.5.7",
|
|
4
4
|
"description": "Angular ng-formworks - JSON Schema Form builder core",
|
|
5
5
|
"author": "https://github.com/zahmo/ng-formworks/graphs/contributors",
|
|
6
6
|
"keywords": [
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"lodash-es": "~4.17.21",
|
|
41
41
|
"ajv": "^8.12.0",
|
|
42
|
-
"tslib": "^2.0.0"
|
|
42
|
+
"tslib": "^2.0.0",
|
|
43
|
+
"nxt-sortablejs": "^16.2.0",
|
|
44
|
+
"sortablejs": "^1.15.6"
|
|
43
45
|
},
|
|
44
46
|
"peerDependencies": {
|
|
45
47
|
"@angular/common": ">=16.0.0",
|