@ng-formworks/core 20.6.8 → 21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ng-formworks/core",
3
- "version": "20.6.8",
3
+ "version": "21.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": [
@@ -18,6 +18,8 @@
18
18
  "Angular 19",
19
19
  "Angular20",
20
20
  "Angular 20",
21
+ "Angular21",
22
+ "Angular 21",
21
23
  "ng15",
22
24
  "ng16",
23
25
  "ng17",
@@ -51,21 +53,21 @@
51
53
  "tslib": "^2.7.0"
52
54
  },
53
55
  "peerDependencies": {
54
- "@angular/cdk": ">=20.0.0",
55
- "@angular/common": ">=20.0.0",
56
- "@angular/core": ">=20.0.0",
57
- "@angular/forms": ">=20.0.0",
58
- "@angular/platform-browser": ">=20.0.0",
56
+ "@angular/cdk": ">=21.0.0",
57
+ "@angular/common": ">=21.0.0",
58
+ "@angular/core": ">=21.0.0",
59
+ "@angular/forms": ">=21.0.0",
60
+ "@angular/platform-browser": ">=21.0.0",
59
61
  "rxjs": "^7.0.0"
60
62
  },
61
63
  "module": "fesm2022/ng-formworks-core.mjs",
62
- "typings": "index.d.ts",
64
+ "typings": "types/ng-formworks-core.d.ts",
63
65
  "exports": {
64
66
  "./package.json": {
65
67
  "default": "./package.json"
66
68
  },
67
69
  ".": {
68
- "types": "./index.d.ts",
70
+ "types": "./types/ng-formworks-core.d.ts",
69
71
  "default": "./fesm2022/ng-formworks-core.mjs"
70
72
  }
71
73
  },
@@ -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
@@ -840,7 +841,7 @@ declare function isSet(item: any): boolean;
840
841
  * // { any = false } strict - if truthy, also checks JavaScript tyoe
841
842
  * // { SchemaType }
842
843
  */
843
- declare function getType(value: any, strict?: any): "string" | "number" | "integer" | "boolean" | "null" | "object" | "array";
844
+ declare function getType(value: any, strict?: any): "null" | "number" | "string" | "integer" | "boolean" | "object" | "array";
844
845
  /**
845
846
  * 'isType' function
846
847
  *
@@ -2609,6 +2610,22 @@ declare class SelectCheckboxComponent implements OnInit, OnDestroy {
2609
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>;
2610
2611
  }
2611
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
+
2612
2629
  /**
2613
2630
  * OrderableDirective
2614
2631
  *
@@ -2675,7 +2692,7 @@ declare class StopPropagationDirective implements OnInit, OnDestroy {
2675
2692
 
2676
2693
  declare class WidgetLibraryModule {
2677
2694
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<WidgetLibraryModule, never>;
2678
- 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]>;
2679
2696
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<WidgetLibraryModule>;
2680
2697
  }
2681
2698
 
@@ -2695,7 +2712,7 @@ declare class NoFrameworkModule {
2695
2712
 
2696
2713
  declare class JsonSchemaFormModule {
2697
2714
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<JsonSchemaFormModule, never>;
2698
- 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]>;
2699
2716
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<JsonSchemaFormModule>;
2700
2717
  }
2701
2718
 
@@ -2799,7 +2816,7 @@ declare class WidgetLibraryService {
2799
2816
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<WidgetLibraryService>;
2800
2817
  }
2801
2818
 
2802
- declare const BASIC_WIDGETS: (typeof NoneComponent | typeof RootComponent)[];
2819
+ declare const BASIC_WIDGETS: (typeof ItemTitleComponent | typeof NoneComponent | typeof RootComponent)[];
2803
2820
 
2804
- 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 };
2805
2822
  export type { AsyncIValidatorFn, ErrorMessages, IValidatorFn, JavaScriptPrimitiveType, JavaScriptType, PlainObject, Pointer, PrimitiveValue, SchemaPrimitiveType, SchemaType, TitleMapItem };