@ng-formworks/core 19.5.3 → 19.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.
@@ -64,6 +64,12 @@ export declare class JsonSchemaFormService implements OnDestroy {
64
64
  defaultFormOptions: any;
65
65
  fcValueChangesSubs: Subscription;
66
66
  fcStatusChangesSubs: Subscription;
67
+ private draggableStateSubject;
68
+ draggableState$: import("rxjs").Observable<boolean>;
69
+ setDraggableState(value: boolean): void;
70
+ private sortableOptionsSubject;
71
+ sortableOptions$: import("rxjs").Observable<any>;
72
+ setSortableOptions(value: any): void;
67
73
  constructor();
68
74
  ngOnDestroy(): void;
69
75
  setLanguage(language?: string): void;
@@ -119,7 +125,7 @@ export declare class JsonSchemaFormService implements OnDestroy {
119
125
  getLayoutPointer(ctx: WidgetContext): string;
120
126
  isControlBound(ctx: WidgetContext): boolean;
121
127
  addItem(ctx: WidgetContext, name?: string): boolean;
122
- moveArrayItem(ctx: WidgetContext, oldIndex: number, newIndex: number): boolean;
128
+ moveArrayItem(ctx: WidgetContext, oldIndex: number, newIndex: number, moveLayout?: boolean): boolean;
123
129
  removeItem(ctx: WidgetContext): boolean;
124
130
  static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
125
131
  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): "string" | "number" | "integer" | "boolean" | "null" | "object" | "array";
202
+ export declare function getType(value: any, strict?: any): "boolean" | "array" | "string" | "number" | "integer" | "null" | "object";
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
+ }
@@ -2,23 +2,24 @@ import { NoneComponent } from './none.component';
2
2
  import { RootComponent } from './root.component';
3
3
  export declare const BASIC_WIDGETS: (typeof NoneComponent | typeof RootComponent)[];
4
4
  export { AddReferenceComponent } from './add-reference.component';
5
- export { OneOfComponent } from './one-of.component';
6
5
  export { ButtonComponent } from './button.component';
7
6
  export { CheckboxComponent } from './checkbox.component';
8
7
  export { CheckboxesComponent } from './checkboxes.component';
8
+ export { ElementAttributeDirective } from './element-attribute.directive';
9
9
  export { FileComponent } from './file.component';
10
10
  export { HiddenComponent } from './hidden.component';
11
11
  export { InputComponent } from './input.component';
12
12
  export { MessageComponent } from './message.component';
13
13
  export { NoneComponent } from './none.component';
14
14
  export { NumberComponent } from './number.component';
15
+ export { OneOfComponent } from './one-of.component';
15
16
  export { OrderableDirective } from './orderable.directive';
16
17
  export { RadiosComponent } from './radios.component';
17
18
  export { RootComponent } from './root.component';
18
19
  export { SectionComponent } from './section.component';
19
- export { SelectComponent } from './select.component';
20
20
  export { SelectFrameworkComponent } from './select-framework.component';
21
21
  export { SelectWidgetComponent } from './select-widget.component';
22
+ export { SelectComponent } from './select.component';
22
23
  export { SubmitComponent } from './submit.component';
23
24
  export { TabComponent } from './tab.component';
24
25
  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 * as i0 from "@angular/core";
4
4
  export declare class InputComponent implements OnInit {
5
5
  private jsf;
@@ -13,6 +13,7 @@ export declare class InputComponent implements OnInit {
13
13
  readonly layoutNode: import("@angular/core").InputSignal<any>;
14
14
  readonly layoutIndex: import("@angular/core").InputSignal<number[]>;
15
15
  readonly dataIndex: import("@angular/core").InputSignal<number[]>;
16
+ get inputAttributes(): any;
16
17
  ngOnInit(): void;
17
18
  updateValue(event: any): void;
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<InputComponent, never>;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { ElementRef, OnInit } from '@angular/core';
2
2
  import { AbstractControl } from '@angular/forms';
3
3
  import * as i0 from "@angular/core";
4
4
  export declare class NumberComponent implements OnInit {
@@ -16,6 +16,9 @@ export declare class NumberComponent implements OnInit {
16
16
  readonly layoutNode: import("@angular/core").InputSignal<any>;
17
17
  readonly layoutIndex: import("@angular/core").InputSignal<number[]>;
18
18
  readonly dataIndex: import("@angular/core").InputSignal<number[]>;
19
+ get inputAttributes(): any;
20
+ inputControl: ElementRef;
21
+ div: ElementRef;
19
22
  ngOnInit(): void;
20
23
  updateValue(event: any): void;
21
24
  static ɵfac: i0.ɵɵFactoryDeclaration<NumberComponent, never>;
@@ -1,4 +1,4 @@
1
- import { OnInit } from '@angular/core';
1
+ import { OnDestroy, OnInit } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  /**
4
4
  * OrderableDirective
@@ -21,7 +21,7 @@ import * as i0 from "@angular/core";
21
21
  * - dragleave: remove 'drag-target-...' classes from element
22
22
  * - drop: remove 'drag-target-...' classes from element, move dropped array item
23
23
  */
24
- export declare class OrderableDirective implements OnInit {
24
+ export declare class OrderableDirective implements OnInit, OnDestroy {
25
25
  private elementRef;
26
26
  private jsf;
27
27
  private ngZone;
@@ -33,7 +33,9 @@ export declare class OrderableDirective implements OnInit {
33
33
  readonly layoutNode: import("@angular/core").InputSignal<any>;
34
34
  readonly layoutIndex: import("@angular/core").InputSignal<number[]>;
35
35
  readonly dataIndex: import("@angular/core").InputSignal<number[]>;
36
+ private draggableStateSubscription;
36
37
  ngOnInit(): void;
38
+ ngOnDestroy(): void;
37
39
  static ɵfac: i0.ɵɵFactoryDeclaration<OrderableDirective, never>;
38
40
  static ɵdir: i0.ɵɵDirectiveDeclaration<OrderableDirective, "[orderable]", never, { "orderable": { "alias": "orderable"; "required": false; "isSignal": true; }; "layoutNode": { "alias": "layoutNode"; "required": false; "isSignal": true; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; "isSignal": true; }; "dataIndex": { "alias": "dataIndex"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
39
41
  }
@@ -1,5 +1,6 @@
1
+ import { OnDestroy, OnInit } from '@angular/core';
1
2
  import * as i0 from "@angular/core";
2
- export declare class RootComponent {
3
+ export declare class RootComponent implements OnInit, OnDestroy {
3
4
  private jsf;
4
5
  options: any;
5
6
  readonly dataIndex: import("@angular/core").InputSignal<number[]>;
@@ -7,9 +8,15 @@ export declare class RootComponent {
7
8
  readonly layout: import("@angular/core").InputSignal<any[]>;
8
9
  readonly isOrderable: import("@angular/core").InputSignal<boolean>;
9
10
  readonly isFlexItem: import("@angular/core").InputSignal<boolean>;
11
+ sortableObj: any;
12
+ sortableConfig: any;
13
+ private sortableOptionsSubscription;
14
+ sortableInit(sortable: any): void;
10
15
  isDraggable(node: any): boolean;
11
16
  getFlexAttribute(node: any, attribute: string): any;
12
17
  showWidget(layoutNode: any): boolean;
18
+ ngOnInit(): void;
19
+ ngOnDestroy(): void;
13
20
  static ɵfac: i0.ɵɵFactoryDeclaration<RootComponent, never>;
14
21
  static ɵcmp: i0.ɵɵComponentDeclaration<RootComponent, "root-widget", never, { "dataIndex": { "alias": "dataIndex"; "required": false; "isSignal": true; }; "layoutIndex": { "alias": "layoutIndex"; "required": false; "isSignal": true; }; "layout": { "alias": "layout"; "required": false; "isSignal": true; }; "isOrderable": { "alias": "isOrderable"; "required": false; "isSignal": true; }; "isFlexItem": { "alias": "isFlexItem"; "required": false; "isSignal": true; }; }, {}, never, never, false, never>;
15
22
  }
@@ -1,7 +1,6 @@
1
1
  import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class SelectFrameworkComponent implements OnChanges, OnInit {
4
- private componentFactory;
5
4
  private jsf;
6
5
  newComponent: ComponentRef<any>;
7
6
  readonly layoutNode: import("@angular/core").InputSignal<any>;
@@ -1,7 +1,6 @@
1
1
  import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class SelectWidgetComponent implements OnChanges, OnInit {
4
- private componentFactory;
5
4
  private jsf;
6
5
  newComponent: ComponentRef<any>;
7
6
  readonly layoutNode: import("@angular/core").InputSignal<any>;
@@ -1,7 +1,6 @@
1
1
  import { ComponentRef, OnChanges, OnInit, ViewContainerRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
3
  export declare class TemplateComponent implements OnInit, OnChanges {
4
- private componentFactory;
5
4
  private jsf;
6
5
  newComponent: ComponentRef<any>;
7
6
  readonly layoutNode: import("@angular/core").InputSignal<any>;
@@ -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 "@angular/common";
26
- import * as i25 from "@angular/forms";
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 i24.CommonModule, typeof i25.FormsModule, typeof i25.ReactiveFormsModule], [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]>;
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": "19.5.3",
3
+ "version": "19.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": [
@@ -43,7 +43,9 @@
43
43
  "dependencies": {
44
44
  "lodash-es": "~4.17.21",
45
45
  "ajv": "^8.12.0",
46
- "tslib": "^2.7.0"
46
+ "tslib": "^2.7.0",
47
+ "nxt-sortablejs": "^19.0.4",
48
+ "sortablejs": "^1.15.6"
47
49
  },
48
50
  "peerDependencies": {
49
51
  "@angular/common": ">=19.0.0",