@ng-formworks/core 20.6.7 → 20.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.
package/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import * as _angular_core from '@angular/core';
2
2
  import { OnDestroy, Signal, OnChanges, OnInit, SimpleChanges, ElementRef, ComponentRef, ViewContainerRef, Renderer2 } from '@angular/core';
3
- import * as i28 from '@angular/forms';
3
+ import * as i29 from '@angular/forms';
4
4
  import { AbstractControl, UntypedFormArray, UntypedFormGroup, ControlValueAccessor, ValidationErrors, ValidatorFn } from '@angular/forms';
5
5
  import * as rxjs from 'rxjs';
6
6
  import { Subject, Subscription, Observable } from 'rxjs';
7
7
  import Ajv2019, { Options, ErrorObject, ValidateFunction } from 'ajv/dist/2019';
8
8
  import * as i2 from '@angular/common';
9
- import * as i29 from '@angular/cdk/drag-drop';
9
+ import * as i30 from '@angular/cdk/drag-drop';
10
10
  import { CdkDragDrop, CdkDrag } from '@angular/cdk/drag-drop';
11
11
 
12
12
  type WidgetContext = {
@@ -148,6 +148,7 @@ declare class JsonSchemaFormService implements OnDestroy {
148
148
  addItem(ctx: WidgetContext, name?: string): boolean;
149
149
  moveArrayItem(ctx: WidgetContext, oldIndex: number, newIndex: number, moveLayout?: boolean): boolean;
150
150
  removeItem(ctx: WidgetContext): boolean;
151
+ adjustLayout(layout: any, newData: any, currLayoutIndex?: number[], currDataIndex?: any[]): void;
151
152
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JsonSchemaFormService, never>;
152
153
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<JsonSchemaFormService>;
153
154
  }
@@ -262,7 +263,7 @@ declare class JsonSchemaFormComponent implements ControlValueAccessor, OnChanges
262
263
  registerOnTouched(fn: Function): void;
263
264
  setDisabledState(isDisabled: boolean): void;
264
265
  updateForm(): void;
265
- setFormValues(formValues: any, resetFirst?: boolean): void;
266
+ setFormValues(formValues: any, resetFirst?: boolean, emitFormEvent?: boolean, usePatch?: boolean): void;
266
267
  submitForm(): void;
267
268
  /**
268
269
  * 'initializeForm' function
@@ -589,6 +590,7 @@ declare class RadiosComponent implements OnInit, OnDestroy {
589
590
 
590
591
  declare class RootComponent implements OnInit, OnDestroy, OnChanges {
591
592
  private jsf;
593
+ private cdr;
592
594
  options: any;
593
595
  readonly dataIndex: _angular_core.InputSignal<number[]>;
594
596
  readonly layoutIndex: _angular_core.InputSignal<number[]>;
@@ -839,7 +841,7 @@ declare function isSet(item: any): boolean;
839
841
  * // { any = false } strict - if truthy, also checks JavaScript tyoe
840
842
  * // { SchemaType }
841
843
  */
842
- declare function getType(value: any, strict?: any): "integer" | "boolean" | "array" | "object" | "string" | "number" | "null";
844
+ declare function getType(value: any, strict?: any): "string" | "number" | "integer" | "boolean" | "null" | "object" | "array";
843
845
  /**
844
846
  * 'isType' function
845
847
  *
@@ -2504,8 +2506,9 @@ declare class TabComponent implements OnInit {
2504
2506
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabComponent, "tab-widget", never, { "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>;
2505
2507
  }
2506
2508
 
2507
- declare class TabsComponent implements OnInit {
2509
+ declare class TabsComponent implements OnInit, OnDestroy {
2508
2510
  private jsf;
2511
+ private cdr;
2509
2512
  options: any;
2510
2513
  itemCount: number;
2511
2514
  selectedItem: number;
@@ -2513,10 +2516,12 @@ declare class TabsComponent implements OnInit {
2513
2516
  readonly layoutNode: _angular_core.InputSignal<any>;
2514
2517
  readonly layoutIndex: _angular_core.InputSignal<number[]>;
2515
2518
  readonly dataIndex: _angular_core.InputSignal<number[]>;
2519
+ dataChangesSubs: Subscription;
2516
2520
  ngOnInit(): void;
2517
2521
  select(index: any): void;
2518
2522
  updateControl(): void;
2519
2523
  setTabTitle(item: any, index: number): string;
2524
+ ngOnDestroy(): void;
2520
2525
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<TabsComponent, never>;
2521
2526
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<TabsComponent, "tabs-widget", never, { "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>;
2522
2527
  }
@@ -2605,6 +2610,22 @@ declare class SelectCheckboxComponent implements OnInit, OnDestroy {
2605
2610
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SelectCheckboxComponent, "selectcheckbox-widget", never, { "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>;
2606
2611
  }
2607
2612
 
2613
+ declare class ItemTitleComponent implements OnInit, OnChanges, OnDestroy {
2614
+ private jsf;
2615
+ item: any;
2616
+ index: number;
2617
+ ctx: any;
2618
+ title: string;
2619
+ dataChangesSubs: Subscription;
2620
+ constructor(jsf: JsonSchemaFormService);
2621
+ ngOnChanges(changes: SimpleChanges): void;
2622
+ ngOnInit(): void;
2623
+ updateTitle(): void;
2624
+ ngOnDestroy(): void;
2625
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<ItemTitleComponent, never>;
2626
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<ItemTitleComponent, "item-title", never, { "item": { "alias": "item"; "required": false; }; "index": { "alias": "index"; "required": false; }; "ctx": { "alias": "ctx"; "required": false; }; }, {}, never, never, false, never>;
2627
+ }
2628
+
2608
2629
  /**
2609
2630
  * OrderableDirective
2610
2631
  *
@@ -2671,7 +2692,7 @@ declare class StopPropagationDirective implements OnInit, OnDestroy {
2671
2692
 
2672
2693
  declare class WidgetLibraryModule {
2673
2694
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetLibraryModule, never>;
2674
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<WidgetLibraryModule, [typeof AddReferenceComponent, typeof OneOfComponent, typeof ButtonComponent, typeof CheckboxComponent, typeof CheckboxesComponent, typeof FileComponent, typeof HiddenComponent, typeof InputComponent, typeof MessageComponent, typeof NoneComponent, typeof NumberComponent, typeof RadiosComponent, typeof RootComponent, typeof SectionComponent, typeof SelectComponent, typeof SelectFrameworkComponent, typeof SelectWidgetComponent, typeof SubmitComponent, typeof TabComponent, typeof TabsComponent, typeof TemplateComponent, typeof TextareaComponent, typeof SelectCheckboxComponent, typeof OrderableDirective, typeof ElementAttributeDirective, typeof StopPropagationDirective], [typeof i2.CommonModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof i29.DragDropModule], [typeof AddReferenceComponent, typeof OneOfComponent, typeof ButtonComponent, typeof CheckboxComponent, typeof CheckboxesComponent, typeof FileComponent, typeof HiddenComponent, typeof InputComponent, typeof MessageComponent, typeof NoneComponent, typeof NumberComponent, typeof RadiosComponent, typeof RootComponent, typeof SectionComponent, typeof SelectComponent, typeof SelectFrameworkComponent, typeof SelectWidgetComponent, typeof SubmitComponent, typeof TabComponent, typeof TabsComponent, typeof TemplateComponent, typeof TextareaComponent, typeof SelectCheckboxComponent, typeof OrderableDirective, typeof ElementAttributeDirective, typeof StopPropagationDirective]>;
2695
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<WidgetLibraryModule, [typeof AddReferenceComponent, typeof OneOfComponent, typeof ButtonComponent, typeof CheckboxComponent, typeof CheckboxesComponent, typeof FileComponent, typeof HiddenComponent, typeof InputComponent, typeof MessageComponent, typeof NoneComponent, typeof NumberComponent, typeof RadiosComponent, typeof RootComponent, typeof SectionComponent, typeof SelectComponent, typeof SelectFrameworkComponent, typeof SelectWidgetComponent, typeof SubmitComponent, typeof TabComponent, typeof TabsComponent, typeof TemplateComponent, typeof TextareaComponent, typeof SelectCheckboxComponent, typeof ItemTitleComponent, typeof OrderableDirective, typeof ElementAttributeDirective, typeof StopPropagationDirective], [typeof i2.CommonModule, typeof i29.FormsModule, typeof i29.ReactiveFormsModule, typeof i30.DragDropModule], [typeof AddReferenceComponent, typeof OneOfComponent, typeof ButtonComponent, typeof CheckboxComponent, typeof CheckboxesComponent, typeof FileComponent, typeof HiddenComponent, typeof InputComponent, typeof MessageComponent, typeof NoneComponent, typeof NumberComponent, typeof RadiosComponent, typeof RootComponent, typeof SectionComponent, typeof SelectComponent, typeof SelectFrameworkComponent, typeof SelectWidgetComponent, typeof SubmitComponent, typeof TabComponent, typeof TabsComponent, typeof TemplateComponent, typeof TextareaComponent, typeof SelectCheckboxComponent, typeof ItemTitleComponent, typeof OrderableDirective, typeof ElementAttributeDirective, typeof StopPropagationDirective]>;
2675
2696
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<WidgetLibraryModule>;
2676
2697
  }
2677
2698
 
@@ -2691,7 +2712,7 @@ declare class NoFrameworkModule {
2691
2712
 
2692
2713
  declare class JsonSchemaFormModule {
2693
2714
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JsonSchemaFormModule, never>;
2694
- static ɵmod: _angular_core.ɵɵNgModuleDeclaration<JsonSchemaFormModule, [typeof JsonSchemaFormComponent], [typeof i2.CommonModule, typeof i28.FormsModule, typeof i28.ReactiveFormsModule, typeof WidgetLibraryModule, typeof NoFrameworkModule], [typeof JsonSchemaFormComponent, typeof WidgetLibraryModule]>;
2715
+ static ɵmod: _angular_core.ɵɵNgModuleDeclaration<JsonSchemaFormModule, [typeof JsonSchemaFormComponent], [typeof i2.CommonModule, typeof i29.FormsModule, typeof i29.ReactiveFormsModule, typeof WidgetLibraryModule, typeof NoFrameworkModule], [typeof JsonSchemaFormComponent, typeof WidgetLibraryModule]>;
2695
2716
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<JsonSchemaFormModule>;
2696
2717
  }
2697
2718
 
@@ -2795,7 +2816,7 @@ declare class WidgetLibraryService {
2795
2816
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<WidgetLibraryService>;
2796
2817
  }
2797
2818
 
2798
- declare const BASIC_WIDGETS: (typeof NoneComponent | typeof RootComponent)[];
2819
+ declare const BASIC_WIDGETS: (typeof ItemTitleComponent | typeof NoneComponent | typeof RootComponent)[];
2799
2820
 
2800
- export { AddReferenceComponent, BASIC_WIDGETS, ButtonComponent, CheckboxComponent, CheckboxesComponent, ElementAttributeDirective, FileComponent, Framework, FrameworkLibraryService, HiddenComponent, InputComponent, JsonPointer, JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonValidators, MessageComponent, NoneComponent, NumberComponent, OneOfComponent, OrderableDirective, RadiosComponent, RootComponent, SectionComponent, SelectCheckboxComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, StopPropagationDirective, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, WidgetLibraryModule, WidgetLibraryService, _executeAsyncValidators, _executeValidators, _mergeErrors, _mergeObjects, _toPromise, addClasses, buildFormGroup, buildFormGroupTemplate, buildLayout, buildLayoutFromSchema, buildSchemaFromData, buildSchemaFromLayout, buildTitleMap, checkInlineType, combineAllOf, commonItems, convertSchemaToDraft6, copy, deValidationMessages, enValidationMessages, esValidationMessages, fixRequiredArrayProperties, fixTitle, forEach, forEachCopy, formatFormData, frValidationMessages, getControl, getControlValidators, getFromSchema, getInputType, getLayoutNode, getSubSchema, getTitleMapFromOneOf, getType, hasNonNullValue, hasOwn, hasValue, inArray, isArray, isBoolean, isDate, isDefined, isEmpty, isFunction, isInputRequired, isInteger, isMap, isNumber, isObject, isObservable, isPrimitive, isPromise, isSet, isString, isType, itValidationMessages, mapLayout, mergeFilteredObject, mergeSchemas, path2ControlKey, ptValidationMessages, removeRecursiveReferences, resolveSchemaReferences, setControl, setRequiredFields, toJavaScriptType, toObservable, toSchemaType, toTitleCase, uniqueItems, updateInputOptions, xor, zhValidationMessages };
2821
+ export { AddReferenceComponent, BASIC_WIDGETS, ButtonComponent, CheckboxComponent, CheckboxesComponent, ElementAttributeDirective, FileComponent, Framework, FrameworkLibraryService, HiddenComponent, InputComponent, ItemTitleComponent, JsonPointer, JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonValidators, MessageComponent, NoneComponent, NumberComponent, OneOfComponent, OrderableDirective, RadiosComponent, RootComponent, SectionComponent, SelectCheckboxComponent, SelectComponent, SelectFrameworkComponent, SelectWidgetComponent, StopPropagationDirective, SubmitComponent, TabComponent, TabsComponent, TemplateComponent, TextareaComponent, WidgetLibraryModule, WidgetLibraryService, _executeAsyncValidators, _executeValidators, _mergeErrors, _mergeObjects, _toPromise, addClasses, buildFormGroup, buildFormGroupTemplate, buildLayout, buildLayoutFromSchema, buildSchemaFromData, buildSchemaFromLayout, buildTitleMap, checkInlineType, combineAllOf, commonItems, convertSchemaToDraft6, copy, deValidationMessages, enValidationMessages, esValidationMessages, fixRequiredArrayProperties, fixTitle, forEach, forEachCopy, formatFormData, frValidationMessages, getControl, getControlValidators, getFromSchema, getInputType, getLayoutNode, getSubSchema, getTitleMapFromOneOf, getType, hasNonNullValue, hasOwn, hasValue, inArray, isArray, isBoolean, isDate, isDefined, isEmpty, isFunction, isInputRequired, isInteger, isMap, isNumber, isObject, isObservable, isPrimitive, isPromise, isSet, isString, isType, itValidationMessages, mapLayout, mergeFilteredObject, mergeSchemas, path2ControlKey, ptValidationMessages, removeRecursiveReferences, resolveSchemaReferences, setControl, setRequiredFields, toJavaScriptType, toObservable, toSchemaType, toTitleCase, uniqueItems, updateInputOptions, xor, zhValidationMessages };
2801
2822
  export type { AsyncIValidatorFn, ErrorMessages, IValidatorFn, JavaScriptPrimitiveType, JavaScriptType, PlainObject, Pointer, PrimitiveValue, SchemaPrimitiveType, SchemaType, TitleMapItem };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-formworks/core",
3
- "version": "20.6.7",
3
+ "version": "20.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": [