@ng-formworks/core 18.5.6 → 18.5.8

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>;
@@ -1,6 +1,6 @@
1
1
  import { NoneComponent } from './none.component';
2
2
  import { RootComponent } from './root.component';
3
- export declare const BASIC_WIDGETS: (typeof NoneComponent | typeof RootComponent)[];
3
+ export declare const BASIC_WIDGETS: (typeof RootComponent | typeof NoneComponent)[];
4
4
  export { AddReferenceComponent } from './add-reference.component';
5
5
  export { ButtonComponent } from './button.component';
6
6
  export { CheckboxComponent } from './checkbox.component';
@@ -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
  }
@@ -25,8 +25,9 @@ import * as i23 from "./orderable.directive";
25
25
  import * as i24 from "./element-attribute.directive";
26
26
  import * as i25 from "@angular/common";
27
27
  import * as i26 from "@angular/forms";
28
+ import * as i27 from "nxt-sortablejs";
28
29
  export declare class WidgetLibraryModule {
29
30
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetLibraryModule, never>;
30
- 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 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]>;
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]>;
31
32
  static ɵinj: i0.ɵɵInjectorDeclaration<WidgetLibraryModule>;
32
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-formworks/core",
3
- "version": "18.5.6",
3
+ "version": "18.5.8",
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": [
@@ -41,7 +41,9 @@
41
41
  "dependencies": {
42
42
  "lodash-es": "~4.17.21",
43
43
  "ajv": "^8.12.0",
44
- "tslib": "^2.7.0"
44
+ "tslib": "^2.7.0",
45
+ "nxt-sortablejs": "^18.0.0",
46
+ "sortablejs": "^1.15.6"
45
47
  },
46
48
  "peerDependencies": {
47
49
  "@angular/common": ">=18.0.0",