@elle96/ng-json-schema-manager 0.1.1 → 0.1.3

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,6 +1,6 @@
1
1
  import { AbstractControl, FormGroup, FormArray, FormControl } from '@angular/forms';
2
2
  import * as i0 from '@angular/core';
3
- import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit } from '@angular/core';
3
+ import { OnChanges, OnDestroy, EventEmitter, SimpleChanges, OnInit, ChangeDetectorRef } from '@angular/core';
4
4
  import { ErrorObject } from 'ajv';
5
5
 
6
6
  type JsonSchemaType = 'string' | 'number' | 'integer' | 'boolean' | 'object' | 'array' | 'null';
@@ -123,6 +123,15 @@ declare class JsonSchemaValidationService {
123
123
  static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaValidationService>;
124
124
  }
125
125
 
126
+ declare class JsonSchemaStylesService {
127
+ private platformId;
128
+ private injected;
129
+ constructor(platformId: object);
130
+ inject(): void;
131
+ static ɵfac: i0.ɵɵFactoryDeclaration<JsonSchemaStylesService, never>;
132
+ static ɵprov: i0.ɵɵInjectableDeclaration<JsonSchemaStylesService>;
133
+ }
134
+
126
135
  declare class JsonSchemaFormComponent implements OnChanges, OnDestroy {
127
136
  private readonly schemaService;
128
137
  private readonly resolver;
@@ -142,7 +151,7 @@ declare class JsonSchemaFormComponent implements OnChanges, OnDestroy {
142
151
  schemaErrorList: SchemaError[];
143
152
  loading: boolean;
144
153
  private valueSub?;
145
- constructor(schemaService: JsonSchemaFormService, resolver: JsonSchemaResolverService, validation: JsonSchemaValidationService);
154
+ constructor(schemaService: JsonSchemaFormService, resolver: JsonSchemaResolverService, validation: JsonSchemaValidationService, stylesService: JsonSchemaStylesService);
146
155
  ngOnChanges(changes: SimpleChanges): void;
147
156
  ngOnDestroy(): void;
148
157
  private buildForm;
@@ -153,9 +162,10 @@ declare class JsonSchemaFormComponent implements OnChanges, OnDestroy {
153
162
  static ɵcmp: i0.ɵɵComponentDeclaration<JsonSchemaFormComponent, "jsm-json-schema-form", never, { "schema": { "alias": "schema"; "required": true; }; "value": { "alias": "value"; "required": false; }; "data": { "alias": "data"; "required": false; }; "allowAdditionalProperties": { "alias": "allowAdditionalProperties"; "required": false; }; }, { "formReady": "formReady"; "valueChange": "valueChange"; "schemaReady": "schemaReady"; "schemaErrors": "schemaErrors"; }, never, never, true, never>;
154
163
  }
155
164
 
156
- declare class JsonSchemaNodeComponent implements OnInit {
165
+ declare class JsonSchemaNodeComponent implements OnInit, OnDestroy {
157
166
  private readonly schemaService;
158
167
  private readonly validation;
168
+ private readonly cdr;
159
169
  schema: JsonSchema;
160
170
  control: AbstractControl;
161
171
  label: string;
@@ -170,15 +180,12 @@ declare class JsonSchemaNodeComponent implements OnInit {
170
180
  selectedAnyOf: Set<number>;
171
181
  newPropertyKey: string;
172
182
  propertyError: string;
173
- constructor(schemaService: JsonSchemaFormService, validation: JsonSchemaValidationService);
183
+ private valueSub?;
184
+ constructor(schemaService: JsonSchemaFormService, validation: JsonSchemaValidationService, cdr: ChangeDetectorRef);
174
185
  ngOnInit(): void;
175
- /**
176
- * Determina se un figlio di un object è "semplice" (primitive/enum/bool),
177
- * quindi può stare in griglia 2-col, oppure "complesso" (object/array/combinator)
178
- * che deve occupare la larghezza piena.
179
- */
186
+ ngOnDestroy(): void;
180
187
  isSimpleChild(key: string): boolean;
181
- badgeClass(badge: string): Record<string, boolean>;
188
+ badgeClass(badge: string): string;
182
189
  get nodeKind(): 'oneOf' | 'anyOf' | 'allOf' | 'object' | 'array' | 'primitive';
183
190
  get resolvedType(): JsonSchema['type'] | 'enum';
184
191
  get inputKind(): 'text' | 'textarea' | 'select' | 'checkbox';
@@ -223,5 +230,5 @@ declare class JsonSchemaFormModule {
223
230
  static ɵinj: i0.ɵɵInjectorDeclaration<JsonSchemaFormModule>;
224
231
  }
225
232
 
226
- export { JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonSchemaNodeComponent, JsonSchemaResolverService, JsonSchemaValidationService };
233
+ export { JsonSchemaFormComponent, JsonSchemaFormModule, JsonSchemaFormService, JsonSchemaNodeComponent, JsonSchemaResolverService, JsonSchemaStylesService, JsonSchemaValidationService };
227
234
  export type { JsonSchema, JsonSchemaArray, JsonSchemaBase, JsonSchemaCombinators, JsonSchemaDraft, JsonSchemaObject, JsonSchemaPrimitive, JsonSchemaType, SchemaError, SchemaFieldContext };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elle96/ng-json-schema-manager",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Angular JSON Schema form renderer with Tailwind styling, external $ref support, and reactive forms.",
5
5
  "homepage": "https://luigiellebalotta.github.io/json-schema-manager/",
6
6
  "repository": {