@ng-formworks/core 19.6.8 → 19.6.9

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.
@@ -114,7 +114,7 @@ export declare class JsonSchemaFormComponent implements ControlValueAccessor, On
114
114
  registerOnTouched(fn: Function): void;
115
115
  setDisabledState(isDisabled: boolean): void;
116
116
  updateForm(): void;
117
- setFormValues(formValues: any, resetFirst?: boolean): void;
117
+ setFormValues(formValues: any, resetFirst?: boolean, emitFormEvent?: boolean, usePatch?: boolean): void;
118
118
  submitForm(): void;
119
119
  /**
120
120
  * 'initializeForm' function
@@ -142,6 +142,7 @@ export declare class JsonSchemaFormService implements OnDestroy {
142
142
  addItem(ctx: WidgetContext, name?: string): boolean;
143
143
  moveArrayItem(ctx: WidgetContext, oldIndex: number, newIndex: number, moveLayout?: boolean): boolean;
144
144
  removeItem(ctx: WidgetContext): boolean;
145
+ adjustLayout(layout: any, newData: any, currLayoutIndex?: number[], currDataIndex?: any[]): void;
145
146
  static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
146
147
  static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaFormService>;
147
148
  }
@@ -21,6 +21,7 @@ import { TitleMapItem } from '../json-schema-form.service';
21
21
  */
22
22
  export declare function buildLayout_original(jsf: any, widgetLibrary: any): any[];
23
23
  export declare function buildLayout(jsf: any, widgetLibrary: any): any[];
24
+ export declare function fixNestedArrayLayout(options: any): any;
24
25
  /**
25
26
  * 'buildLayoutFromSchema' function
26
27
  *
@@ -178,3 +178,18 @@ export declare function toTitleCase(input: string, forceWords?: string | string[
178
178
  * console.log(hasNonNullValue(testObj2)); // Output: true
179
179
  */
180
180
  export declare function hasNonNullValue(obj: Record<string, any>): boolean;
181
+ /**
182
+ * Recursively compares array sizes of nested arrays
183
+ *
184
+ * @param obj1 - The object to check.
185
+ * @param obj2 - The object to check.
186
+ * @returns `false` if at least one nested array size mismatches`.
187
+ *
188
+ * @example
189
+ * const obj1 = { a: ['a','aa'], b:{c:[1,11,11]} };
190
+ * const obj2 = { a: ['ee','dd'], b:{c:[2]} };
191
+ *
192
+ * console.log(compareObjectArraySizes(obj1,obj1)); // Output: false
193
+ * mismatch will be on path b/c
194
+ */
195
+ export declare function compareObjectArraySizes(obj1: any, obj2: any, comparePath?: string): boolean;
@@ -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): "null" | "number" | "string" | "integer" | "boolean" | "object" | "array";
203
203
  /**
204
204
  * 'isType' function
205
205
  *
@@ -1,6 +1,7 @@
1
+ import { ItemTitleComponent } from './item-title.component';
1
2
  import { NoneComponent } from './none.component';
2
3
  import { RootComponent } from './root.component';
3
- export declare const BASIC_WIDGETS: (typeof NoneComponent | typeof RootComponent)[];
4
+ export declare const BASIC_WIDGETS: (typeof ItemTitleComponent | typeof NoneComponent | typeof RootComponent)[];
4
5
  export { AddReferenceComponent } from './add-reference.component';
5
6
  export { ButtonComponent } from './button.component';
6
7
  export { CheckboxComponent } from './checkbox.component';
@@ -9,6 +10,7 @@ export { ElementAttributeDirective } from './element-attribute.directive';
9
10
  export { FileComponent } from './file.component';
10
11
  export { HiddenComponent } from './hidden.component';
11
12
  export { InputComponent } from './input.component';
13
+ export { ItemTitleComponent } from './item-title.component';
12
14
  export { MessageComponent } from './message.component';
13
15
  export { NoneComponent } from './none.component';
14
16
  export { NumberComponent } from './number.component';
@@ -0,0 +1,19 @@
1
+ import { OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
2
+ import { Subscription } from 'rxjs';
3
+ import { JsonSchemaFormService } from '../json-schema-form.service';
4
+ import * as i0 from "@angular/core";
5
+ export declare class ItemTitleComponent implements OnInit, OnChanges, OnDestroy {
6
+ private jsf;
7
+ item: any;
8
+ index: number;
9
+ ctx: any;
10
+ title: string;
11
+ dataChangesSubs: Subscription;
12
+ constructor(jsf: JsonSchemaFormService);
13
+ ngOnChanges(changes: SimpleChanges): void;
14
+ ngOnInit(): void;
15
+ updateTitle(): void;
16
+ ngOnDestroy(): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ItemTitleComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<ItemTitleComponent, "item-title", never, { "item": { "alias": "item"; "required": false; }; "index": { "alias": "index"; "required": false; }; "ctx": { "alias": "ctx"; "required": false; }; }, {}, never, never, false, never>;
19
+ }
@@ -22,14 +22,15 @@ 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 "./selectcheckbox.component";
25
- import * as i24 from "./orderable.directive";
26
- import * as i25 from "./element-attribute.directive";
27
- import * as i26 from "./stop-propagation.directive";
28
- import * as i27 from "@angular/common";
29
- import * as i28 from "@angular/forms";
30
- import * as i29 from "@angular/cdk/drag-drop";
25
+ import * as i24 from "./item-title.component";
26
+ import * as i25 from "./orderable.directive";
27
+ import * as i26 from "./element-attribute.directive";
28
+ import * as i27 from "./stop-propagation.directive";
29
+ import * as i28 from "@angular/common";
30
+ import * as i29 from "@angular/forms";
31
+ import * as i30 from "@angular/cdk/drag-drop";
31
32
  export declare class WidgetLibraryModule {
32
33
  static ɵfac: i0.ɵɵFactoryDeclaration<WidgetLibraryModule, never>;
33
- 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.SelectCheckboxComponent, typeof i24.OrderableDirective, typeof i25.ElementAttributeDirective, typeof i26.StopPropagationDirective], [typeof i27.CommonModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.DragDropModule], [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.SelectCheckboxComponent, typeof i24.OrderableDirective, typeof i25.ElementAttributeDirective, typeof i26.StopPropagationDirective]>;
34
+ 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.SelectCheckboxComponent, typeof i24.ItemTitleComponent, typeof i25.OrderableDirective, typeof i26.ElementAttributeDirective, typeof i27.StopPropagationDirective], [typeof i28.CommonModule, typeof i29.FormsModule, typeof i29.ReactiveFormsModule, typeof i30.DragDropModule], [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.SelectCheckboxComponent, typeof i24.ItemTitleComponent, typeof i25.OrderableDirective, typeof i26.ElementAttributeDirective, typeof i27.StopPropagationDirective]>;
34
35
  static ɵinj: i0.ɵɵInjectorDeclaration<WidgetLibraryModule>;
35
36
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-formworks/core",
3
- "version": "19.6.8",
3
+ "version": "19.6.9",
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": [