ngx-json-schema-viewer
Version:
<h1 align="center">ngx-json-schema-viewer</h1>
1 lines • 243 kB
Source Map (JSON)
{"version":3,"file":"ngx-json-schema-viewer.mjs","sources":["../../../projects/ngx-json-schema-viewer/src/lib/services/jsv-options.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/Deprecated/deprecated-label.component.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/Deprecated/deprecated-label.component.html","../../../projects/ngx-json-schema-viewer/src/lib/labels/ReadOnly/read-only-label.component.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/ReadOnly/read-only-label.component.html","../../../projects/ngx-json-schema-viewer/src/lib/labels/Required/required-label.component.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/Required/required-label.component.html","../../../projects/ngx-json-schema-viewer/src/lib/labels/WriteOnly/write-only-label.component.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/WriteOnly/write-only-label.component.html","../../../projects/ngx-json-schema-viewer/src/lib/labels/and-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/or-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/xor-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/if-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/else-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/then-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/not-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/error-occurred.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/loading-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/type-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/array-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/boolean-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/true-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/false-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/integer-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/null-labels.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/number-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/object-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/string-label.ts","../../../projects/ngx-json-schema-viewer/src/lib/labels/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/detectTypes.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/type-label-switch.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/FriendlyNames/friendly-name.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/FriendlyNames/friendly-name-fallback.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/FriendlyNames/customized-name.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/FriendlyNames/customized-array.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/print-schema-type.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/constant.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/default-value.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/enum.ts","../../../projects/ngx-json-schema-viewer/src/lib/pipes/examples-list.pipe.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/examples.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/readOnly.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/writeOnly.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/array-unique-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/deprecated.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/nullable.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/string-length.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/object-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/no-extra-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/array-number-of-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/array-contains-number.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/no-extra-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/number-bounds.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/pattern.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/number-multiple-of.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/content-encoding.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/content-media.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/content-schema.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/QualifierMessages/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/qualifier-messages.ts","../../../projects/ngx-json-schema-viewer/src/lib/utils/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/create-nodes.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaComposition/all-of.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaComposition/any-of.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaComposition/not.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaComposition/one-of.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaComposition/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaConditional/if-else-then.ts","../../../projects/ngx-json-schema-viewer/src/lib/pipes/dependent-required.pipe.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaConditional/dependent-required.ts","../../../projects/ngx-json-schema-viewer/src/lib/pipes/dependent-schemas.pipe.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaConditional/dependent-schemas.ts","../../../projects/ngx-json-schema-viewer/src/lib/pipes/dependancies-to-dependent-required.pipe.ts","../../../projects/ngx-json-schema-viewer/src/lib/pipes/dependancies-to-dependent-schemas.pipe.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaConditional/dependencies.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/schemaConditional/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/unlisted-required-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/pattern-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/property-names.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/additional-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/unevaluated-properties.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/object/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/prefix-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/items.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/additional-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/unevaluated-items.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/contains.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/array/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-string.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-boolean.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-number.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-integer.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-null.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-always-valid.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-always-invalid.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/create-description.ts","../../../projects/ngx-json-schema-viewer/src/lib/JSONSchemaElements/index.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/create-valid-or-invalid.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/render-provided-type.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/render-multiple-types.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/create-types.ts","../../../projects/ngx-json-schema-viewer/src/lib/common/create-edge.ts","../../../projects/ngx-json-schema-viewer/src/lib/services/schema-resolver.ts","../../../projects/ngx-json-schema-viewer/src/lib/ngx-json-schema-viewer.component.ts","../../../projects/ngx-json-schema-viewer/src/public-api.ts","../../../projects/ngx-json-schema-viewer/src/ngx-json-schema-viewer.ts"],"sourcesContent":["import { Inject, Injectable, InjectionToken } from '@angular/core';\n\nexport type CheckKey =\n | \"nullable\"\n | \"deprecated\"\n | \"readOnly\"\n | \"writeOnly\"\n | \"enum\"\n | \"stringLength\"\n | \"objectProperties\"\n | \"no-extra-properties\"\n | \"arrayItems\"\n | \"arrayContains\"\n | \"no-extra-items\"\n | \"number-range\"\n | \"pattern\"\n | \"multipleOf\"\n | \"uniqueItems\"\n | \"default\"\n | \"const\"\n | \"examples\"\n | \"contentMediaType\"\n | \"contentEncoding\"\n | \"contentSchema\"\n\nexport type JSVOptions = {\n /**\n * Should we display \"examples\" ?\n * @default false\n */\n showExamples: boolean\n /**\n * To overwrite the order to display qualifier messages\n * @default [\"nullable\",\"deprecated\",\"readOnly\",\"writeOnly\",\"enum\",\"stringLength\",\"objectProperties\",\"no-extra-properties\",\"arrayItems\",\"arrayContains\",\"no-extra-items\",\"number-range\",\"pattern\",\"multipleOf\",\"uniqueItems\",\"contentEncoding\",\"contentMediaType\",\"contentSchema\",\"default\",\"const\",\"examples\"]\n */\n qualifierMessagesOrder: CheckKey[]\n}\n\n// Define an InjectionToken for JSVOptions\nexport const JSV_OPTIONS = new InjectionToken<Partial<JSVOptions>>('JSVOptions');\n\n@Injectable({\n providedIn: \"root\"\n})\nexport class JSVOptionsService {\n\n private options: JSVOptions;\n\n constructor(@Inject(JSV_OPTIONS) userOptions: Partial<JSVOptions>) {\n // Set default options\n this.options = {\n showExamples: false,\n qualifierMessagesOrder: [\n \"nullable\",\n \"deprecated\",\n \"readOnly\",\n \"writeOnly\",\n \"enum\",\n \"stringLength\",\n \"objectProperties\",\n \"no-extra-properties\",\n \"arrayItems\",\n \"arrayContains\",\n \"no-extra-items\",\n \"number-range\",\n \"pattern\",\n \"multipleOf\",\n \"uniqueItems\",\n \"contentEncoding\",\n \"contentMediaType\",\n \"contentSchema\",\n \"default\",\n \"const\",\n \"examples\"\n ]\n }\n // Apply user provided options\n this.setOptions(userOptions);\n }\n\n setOptions(userOptions?: Partial<JSVOptions>) {\n this.options = {\n ...this.options,\n ...userOptions\n }\n }\n\n getOptions(): JSVOptions {\n return this.options;\n }\n\n}","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-deprecated',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './deprecated-label.component.html',\n styleUrls: ['./deprecated-label.component.css']\n})\nexport class DeprecatedLabelComponent { }","<strong class=\"deprecated\">\n deprecated\n</strong> ","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-read-only',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './read-only-label.component.html',\n styleUrls: ['./read-only-label.component.css']\n})\nexport class ReadOnlyLabelComponent { }","<strong class=\"readOnly\">\n readOnly\n</strong>\n ","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-required',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './required-label.component.html',\n styleUrls: ['./required-label.component.css']\n})\nexport class RequiredLabelComponent { }\n","<strong class=\"required\">\n required\n</strong> ","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-write-only',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templateUrl: './write-only-label.component.html',\n styleUrls: ['./write-only-label.component.css']\n})\nexport class WriteOnlyLabelComponent { }","<strong class=\"writeOnly\">\n writeOnly\n</strong>\n ","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-and',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n <strong>AND</strong>\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n\n <ng-template #spaceTemplate>\n \n </ng-template>\n `,\n})\nexport class AndLabelComponent {}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-or',\n standalone: true,\n imports: [NgTemplateOutlet],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n <strong>OR</strong>\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n\n <ng-template #spaceTemplate>\n \n </ng-template>\n `,\n})\nexport class OrLabelComponent {}\n","import { NgTemplateOutlet } from '@angular/common';\nimport { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-xor',\n standalone: true,\n imports: [\n NgTemplateOutlet\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n <strong>XOR</strong>\n <ng-container *ngTemplateOutlet=\"spaceTemplate\"></ng-container>\n\n <ng-template #spaceTemplate>\n \n </ng-template>\n `,\n})\nexport class XorLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-if',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <strong>\n If\n </strong>\n `,\n})\nexport class IfLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-else',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <strong>\n Else\n </strong>\n `,\n})\nexport class ElseLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-then',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <strong>\n Then\n </strong>\n `,\n})\nexport class ThenLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-not',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <strong>\n NOT\n </strong>\n `,\n})\nexport class NotLabelComponent {}\n","\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n@Component({\n selector: 'labels-error-occurred',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (error) {\n <strong>Something bad happens : </strong> {{ error.message }}\n }\n `,\n})\nexport class ErrorOccurredLabelComponent {\n @Input({ required: true }) error!: Error;\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-loading',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n Loading ....\n </div>\n `,\n})\nexport class LoadingLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-type',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <strong>\n type\n </strong>\n `,\n})\nexport class TypeLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-array',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n array\n </span>\n `,\n})\nexport class ArrayLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-boolean',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n boolean\n </span>\n `,\n})\nexport class BooleanLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-true',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n any\n </span>\n `,\n})\nexport class TrueLabelComponent {}","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-false',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n none\n </span>\n `,\n})\nexport class FalseLabelComponent {}","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-integer',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n integer\n </span>\n `,\n})\nexport class IntegerLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-null',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n null\n </span>\n `,\n})\nexport class NullLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-number',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n number\n </span>\n `,\n})\nexport class NumberLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-object',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n object\n </span>\n `,\n})\nexport class ObjectLabelComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'labels-string',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <span style=\"opacity: 0.6\">\n string\n </span>\n `,\n})\nexport class StringLabelComponent {}\n","// Re-export labels\nexport { DeprecatedLabelComponent } from \"./Deprecated/deprecated-label.component\";\nexport { ReadOnlyLabelComponent } from \"./ReadOnly/read-only-label.component\";\nexport { RequiredLabelComponent } from \"./Required/required-label.component\";\nexport { WriteOnlyLabelComponent } from \"./WriteOnly/write-only-label.component\";\nexport { AndLabelComponent } from \"./and-label\";\nexport { OrLabelComponent } from \"./or-label\";\nexport { XorLabelComponent } from \"./xor-label\";\nexport { IfLabelComponent } from \"./if-label\";\nexport { ElseLabelComponent } from \"./else-label\";\nexport { ThenLabelComponent } from \"./then-label\";\nexport { NotLabelComponent } from \"./not-label\";\nexport { ErrorOccurredLabelComponent } from \"./error-occurred\";\nexport { LoadingLabelComponent } from \"./loading-label\";\nexport { TypeLabelComponent } from \"./type-label\";\nexport { ArrayLabelComponent } from \"./array-label\";\nexport { BooleanLabelComponent } from \"./boolean-label\";\nexport { TrueLabelComponent } from \"./true-label\";\nexport { FalseLabelComponent } from \"./false-label\";\nexport { IntegerLabelComponent } from \"./integer-label\";\nexport { NullLabelComponent } from \"./null-labels\";\nexport { NumberLabelComponent } from \"./number-label\";\nexport { ObjectLabelComponent } from \"./object-label\";\nexport { StringLabelComponent } from \"./string-label\";","import type {\n JSONSchema,\n JSONSchemaNS,\n TypeValues,\n } from \"../types\"\n \n // Utility functions to know which case we have\n export const isObjectType = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"object\" ||\n schema.properties !== undefined ||\n schema.additionalProperties !== undefined ||\n schema.patternProperties !== undefined ||\n schema.propertyNames !== undefined ||\n schema.minProperties !== undefined ||\n schema.maxProperties !== undefined ||\n schema.required !== undefined ||\n (schema as JSONSchemaNS.Object).unevaluatedProperties !== undefined)\n \n export const isArrayType = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"array\" ||\n schema.items !== undefined ||\n schema.minItems !== undefined ||\n schema.maxItems !== undefined ||\n schema.additionalItems !== undefined ||\n schema.contains !== undefined ||\n (schema as JSONSchemaNS.Array).minContains !== undefined ||\n (schema as JSONSchemaNS.Array).maxContains !== undefined ||\n (schema as JSONSchemaNS.Array).prefixItems !== undefined ||\n (schema as JSONSchemaNS.Array).unevaluatedItems !== undefined ||\n Array.isArray(schema.const) ||\n schema.enum?.some((s) => Array.isArray(s)))\n \n export const isStringType = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"string\" ||\n schema.minLength !== undefined ||\n schema.maxLength !== undefined ||\n schema.pattern !== undefined ||\n schema.enum?.some((val) => typeof val === \"string\") ||\n typeof schema.const === \"string\")\n \n export const isNumeric = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"number\" ||\n schema.multipleOf !== undefined ||\n schema.minimum !== undefined ||\n schema.exclusiveMinimum !== undefined ||\n schema.maximum !== undefined ||\n schema.exclusiveMaximum !== undefined ||\n schema.enum?.some((val) => typeof val === \"number\") ||\n typeof schema.const === \"number\")\n \n // To detect integer, which is a subtype of \"number\"\n export const isInteger = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"integer\" ||\n schema.multipleOf === 1 ||\n schema.enum?.some((val) => typeof val === \"bigint\") ||\n typeof schema.const === \"bigint\")\n \n export const isSchemaComposition = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.allOf !== undefined ||\n schema.anyOf !== undefined ||\n schema.oneOf !== undefined ||\n schema.not !== undefined)\n \n export const isSchemaConditional = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.if !== undefined ||\n schema.dependencies !== undefined ||\n (schema as JSONSchemaNS.Object).dependentRequired !== undefined ||\n (schema as JSONSchemaNS.Object).dependentSchemas !== undefined)\n \n export const isBoolean = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"boolean\" ||\n schema.enum?.some((val) => typeof val === \"boolean\") ||\n typeof schema.const === \"boolean\")\n \n export const isNull = (schema: JSONSchema) =>\n typeof schema !== \"boolean\" &&\n (schema.type === \"null\" ||\n schema.enum?.some((val) => val === null) ||\n schema.const === null)\n \n // Detect types in schema\n // Zero, One or multiple types can match\n function* foundUndeclaredTypes(\n schema: Exclude<JSONSchema, true | false>,\n ): Generator<TypeValues, void> {\n if (isNull(schema)) {\n yield \"null\"\n }\n \n if (isObjectType(schema)) {\n yield \"object\"\n }\n \n if (isArrayType(schema)) {\n yield \"array\"\n }\n \n if (isStringType(schema)) {\n yield \"string\"\n }\n \n if (isBoolean(schema)) {\n yield \"boolean\"\n }\n \n if (isInteger(schema)) {\n yield \"integer\"\n }\n \n if (!isInteger(schema) && isNumeric(schema)) {\n yield \"number\"\n }\n \n // Job finished\n return undefined\n }\n \n // Return unique types provided by user or detected by this library\n export function detectedTypes(\n schema: Exclude<JSONSchema, true | false>,\n ): TypeValues[] {\n // Find declarated type(s) provided by user\n const declaredTypes: TypeValues[] = Array.isArray(schema.type)\n ? schema.type\n : schema.type !== undefined\n ? [schema.type]\n : []\n \n // If not empty, return it as it\n if (declaredTypes.length !== 0) {\n return [...new Set(declaredTypes)]\n }\n \n // Find undeclared type(s)\n // If array is empty, it could mean that it is either \"any\" or \"nothing\"\n return [...foundUndeclaredTypes(schema)]\n }","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n\nimport {\n StringLabelComponent,\n NumberLabelComponent,\n BooleanLabelComponent,\n ObjectLabelComponent,\n ArrayLabelComponent,\n IntegerLabelComponent,\n NullLabelComponent,\n TrueLabelComponent,\n FalseLabelComponent\n} from \"../labels/index\";\n\nimport type { TypeValues } from \"../types\"\n\n@Component({\n selector: 'jsv-type-label-switch',\n standalone: true,\n imports: [\n StringLabelComponent,\n NumberLabelComponent,\n BooleanLabelComponent,\n ObjectLabelComponent,\n ArrayLabelComponent,\n IntegerLabelComponent,\n NullLabelComponent,\n TrueLabelComponent,\n FalseLabelComponent\n],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n@switch (type) {\n @case ('string') {\n <labels-string />\n }\n @case ('number') {\n <labels-number />\n }\n @case ('boolean') {\n <labels-boolean />\n }\n @case ('object') {\n <labels-object />\n }\n @case ('array') {\n <labels-array />\n }\n @case ('integer') {\n <labels-integer />\n }\n @case ('null') {\n <labels-null />\n }\n @case (true) {\n <labels-true />\n }\n @case (false) {\n <labels-false />\n }\n @default {\n <span style=\"opacity: 0.6\">{{ type }}</span>\n }\n}\n`,\n})\nexport class TypeLabelSwitchComponent {\n @Input({ required: true }) type!: TypeValues | true | false | string;\n}\n","import { ChangeDetectionStrategy, Component, Input, forwardRef } from '@angular/core';\nimport { CommonModule } from '@angular/common';\n\nimport {\n OrLabelComponent,\n} from \"../../labels/index\"\n\nimport {\n detectedTypes\n} from \"../detectTypes\";\n\nimport {\n TypeLabelSwitchComponent\n} from \"../type-label-switch\";\n\nimport {\n GenerateFriendlyNameFallbackComponent,\n GenerateFriendlyNameCustomComponent\n} from \"./index\";\n\nimport type { JSONSchema, TypeValues } from \"../../types\";\n\ntype renderTemplates = \"booleanSchema\" | \"schemaTitle\" | \"schemaTypes\" | \"schemaFallback\";\n\n@Component({\n selector: 'jsv-friendly-name',\n standalone: true,\n imports: [\n CommonModule,\n OrLabelComponent,\n TypeLabelSwitchComponent,\n forwardRef( () => GenerateFriendlyNameFallbackComponent),\n forwardRef( () => GenerateFriendlyNameCustomComponent)\n ],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <!-- Final rendered friendly name -->\n @switch (selectTemplate) {\n @case ('booleanSchema') {\n <ng-container *ngTemplateOutlet=\"booleanSchema\"></ng-container>\n }\n @case ('schemaTitle') {\n <ng-container *ngTemplateOutlet=\"schemaTitle\"></ng-container>\n }\n @case ('schemaTypes') {\n <ng-container *ngTemplateOutlet=\"schemaTypes\"></ng-container>\n }\n @default {\n <ng-container *ngTemplateOutlet=\"schemaFallback\"></ng-container>\n }\n }\n \n <!-- Templates -->\n \n <!-- In case the schema is always valid or not -->\n <ng-template #booleanSchema>\n <jsv-type-label-switch [type]=\"typedBoolean\" />\n </ng-template>\n \n <!-- Some people maintaining schemas provide a friendly name by themself -->\n <ng-template #schemaTitle>\n {{ typedSchema.title! }}\n </ng-template>\n \n <!-- Default strategy, when types are known -->\n <ng-template #schemaTypes>\n @for (type of foundTypes; track type; let isLast = $last) {\n <jsv-friendly-name-custom [schema]=\"typedSchema\" [type]=\"type\"/>\n @if (!isLast) {\n <labels-or />\n }\n }\n </ng-template>\n \n <!-- Fallback, when none of the previous rules matched -->\n <ng-template #schemaFallback>\n <jsv-friendly-name-fallback [schema]=\"typedSchema\" />\n </ng-template>\n `,\n})\nexport class GenerateFriendlyNameComponent {\n @Input({ required: true }) schema!: JSONSchema;\n\n get foundTypes(): TypeValues[] {\n return (typeof this.schema !== \"boolean\") ? detectedTypes(this.schema) : [];\n }\n\n get isBoolean(): boolean {\n return typeof this.schema === 'boolean';\n }\n\n get typedBoolean(): boolean {\n return this.schema as boolean;\n }\n\n get typedSchema(): Exclude<JSONSchema, true | false> {\n return this.schema as Exclude<JSONSchema, true | false>;\n }\n\n // To know which template to render\n get selectTemplate(): renderTemplates {\n if (this.isBoolean) {\n return \"booleanSchema\";\n } else {\n let castSchema = this.typedSchema;\n \n if (castSchema.title !== undefined) {\n return \"schemaTitle\";\n }\n\n if (this.foundTypes.length !== 0) {\n return \"schemaTypes\";\n }\n\n return \"schemaFallback\";\n }\n }\n\n}\n\n","import { ChangeDetectionStrategy, Component, Input, forwardRef } from '@angular/core';\n\n\nimport {\n AndLabelComponent,\n NotLabelComponent,\n OrLabelComponent,\n XorLabelComponent\n} from \"../../labels/index\";\n\nimport {\n GenerateFriendlyNameComponent\n} from \"./index\";\n\nimport {\n TypeLabelSwitchComponent\n} from \"../index\";\n\nimport type { JSONSchema } from \"../../types\";\n\ntype LinkType = \"AND\" | \"OR\" | \"XOR\";\n\n@Component({\n selector: 'jsv-friendly-name-fallback',\n standalone: true,\n imports: [\n NotLabelComponent,\n AndLabelComponent,\n XorLabelComponent,\n OrLabelComponent,\n forwardRef(() => GenerateFriendlyNameComponent),\n TypeLabelSwitchComponent\n],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <!-- 1. we have a Schema Composition case (not, allOf, ...) -->\n \n <!-- 1A) the \"not\" case -->\n @if (hasNotKeyword) {\n <labels-not />\n {{ ' (' }}\n <jsv-friendly-name [schema]=\"schema.not!\" />\n {{ ' ) ' }}\n }\n \n <!-- 1B) the \"allOf\" / \"oneOf\" / \"anyOf\" -->\n @if (hasOfKeyword) {\n @for (elem of elementsOf; track elem; let isLast = $last) {\n <jsv-friendly-name [schema]=\"elem\" />\n @if (!isLast) {\n @switch (linkword) {\n @case ('OR') {\n <labels-or />\n }\n @case ('XOR') {\n <labels-xor />\n }\n @case ('AND') {\n <labels-and />\n }\n }\n }\n }\n } @else {\n <jsv-type-label-switch [type]=\"true\" />\n }\n \n <!-- 2. Assume it is \"any\" by default -->\n `\n})\nexport class GenerateFriendlyNameFallbackComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>\n\n // has a \"...Of\" keyword ?\n get hasOfKeyword(): boolean {\n return this.schema.allOf !== undefined || this.schema.anyOf !== undefined || this.schema.oneOf !== undefined;\n }\n\n // has a \"not\" keyword ?\n get hasNotKeyword(): boolean {\n return this.schema.not !== undefined;\n }\n\n // Kind of operators to use ?\n get linkword(): LinkType {\n return this.schema.anyOf ? \"OR\" : this.schema.oneOf ? \"XOR\" : \"AND\";\n }\n\n // allOf / anyOf / oneOf\n get elementsOf() : JSONSchema[] {\n return (this.schema.allOf || this.schema.anyOf || this.schema.oneOf || []) as JSONSchema[];\n }\n}","import { ChangeDetectionStrategy, Component, Input, forwardRef } from '@angular/core';\n\n\nimport {\n TypeLabelSwitchComponent,\n} from \"../index\"\n\nimport {\n GenerateFriendlyNameCustomArrayComponent\n} from \"./index\";\n\nimport type { JSONSchema, JSONSchemaNS, TypeValues } from \"../../types\";\n\n@Component({\n selector: 'jsv-friendly-name-custom',\n standalone: true,\n imports: [\n TypeLabelSwitchComponent,\n forwardRef(() => GenerateFriendlyNameCustomArrayComponent)\n],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n@switch (type) {\n @case ('string') {\n <jsv-type-label-switch [type]=\"stringOrFormat\" />\n }\n @case ('array') {\n <jsv-friendly-name-custom-array [schema]=\"asTypedArray\" />\n }\n @default {\n <jsv-type-label-switch [type]=\"type\" />\n }\n}\n`\n})\nexport class GenerateFriendlyNameCustomComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n @Input() type!: TypeValues | string;\n\n get asTypedArray() {\n return this.schema as JSONSchemaNS.Array;\n }\n\n get stringOrFormat() {\n return this.schema.format ? this.schema.format : \"string\";\n }\n}","import { ChangeDetectionStrategy, Component, Input, forwardRef } from '@angular/core';\n\n\nimport {\n TypeLabelSwitchComponent,\n GenerateFriendlyNameComponent\n} from \"../index\";\n\nimport type { JSONSchemaNS, JSONSchema } from \"../../types\";\n\n@Component({\n selector: 'jsv-friendly-name-custom-array',\n standalone: true,\n imports: [\n TypeLabelSwitchComponent,\n forwardRef(() => GenerateFriendlyNameComponent)\n],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <!-- KISS return the generic type when specs are messy -->\n @if (noClearSpecs) {\n <jsv-type-label-switch [type]=\"'array'\" />\n } @else {\n <!-- 1) \"prefixItems\" -->\n @if (isPrefixItemsArray) {\n @for (subSchema of typedPrefixItemsArray; track subSchema; let isLast = $last) {\n <jsv-friendly-name [schema]=\"subSchema\" />\n {{ !isLast ? ',' : '' }}\n }\n }\n <!-- Separator -->\n @if (firstSeparator) {\n {{ ',' }}\n }\n <!-- 2A) \"items\" -->\n @if (hasItems) {\n @for (subSchema of itemsAsArray; track subSchema; let isLast = $last) {\n <jsv-friendly-name [schema]=\"subSchema\" />\n {{ !isLast ? ',' : '' }}\n }\n }\n <!-- Separator -->\n @if (secondSeparator) {\n {{ ',' }}\n }\n <!-- 2B) \"additionalItems\" (to cover cases for specs below the draft-2020-12 version) -->\n @if (hasAdditionalItems) {\n <jsv-friendly-name [schema]=\"schema.additionalItems!\" />\n }\n <!-- Separator -->\n @if (thirdSeparator) {\n {{ ',' }}\n }\n <!-- 2C) \"unevaluatedItems\" (to cover cases specs >= draft-2020-12 version) -->\n @if (hasUnevaluatedItems) {\n <jsv-friendly-name [schema]=\"schema.unevaluatedItems!\" />\n }\n <!-- Separator -->\n @if (fourSeparator) {\n {{ ',' }}\n }\n <!-- 3) \"contains\" -->\n @if (hasContains) {\n {{ '...' }}\n {{ ',' }}\n <jsv-friendly-name [schema]=\"schema.contains!\" />\n }\n <!-- Separator -->\n @if (fithSeparator) {\n {{ ',' }}\n }\n <!-- 4) Is it a open tuple ? -->\n @if (isOpenTuple) {\n {{ '...' }}\n }\n }\n \n `\n})\nexport class GenerateFriendlyNameCustomArrayComponent {\n @Input({ required: true }) schema!: JSONSchemaNS.Array;\n\n // For separators\n get firstSeparator() : boolean {\n return this.isPrefixItemsArray && this.hasItems;\n }\n\n get secondSeparator() : boolean {\n return this.hasItems && this.hasAdditionalItems;\n }\n\n get thirdSeparator() : boolean {\n return this.hasAdditionalItems && this.hasUnevaluatedItems;\n }\n\n get fourSeparator() : boolean {\n return this.hasUnevaluatedItems && this.hasContains;\n }\n\n get fithSeparator() : boolean {\n return this.hasContains && this.isOpenTuple;\n }\n\n // No clear specifications about the contents of the array ?\n get noClearSpecs(): boolean {\n return [undefined, false].includes(this.schema.items as any) &&\n [undefined, false].includes(this.schema.prefixItems as any) &&\n this.schema.contains === undefined;\n }\n\n get isPrefixItemsArray(): boolean {\n return Array.isArray(this.schema.prefixItems);\n }\n\n get typedPrefixItemsArray() {\n return this.schema.prefixItems as JSONSchema[];\n }\n\n get hasItems() : boolean {\n return this.schema.items !== undefined && typeof this.schema.items !== \"boolean\";\n }\n\n get itemsAsArray() : JSONSchema[] {\n return (Array.isArray(this.schema.items) ? this.schema.items : [this.schema.items]) as JSONSchema[];\n }\n\n get hasAdditionalItems(): boolean {\n return this.schema.additionalItems !== undefined && typeof this.schema.additionalItems !== \"boolean\";\n }\n\n get hasUnevaluatedItems(): boolean {\n return this.schema.unevaluatedItems !== undefined && typeof this.schema.unevaluatedItems !== \"boolean\";\n }\n\n get hasContains(): boolean {\n return this.schema.contains !== undefined;\n }\n\n get isOpenTuple(): boolean {\n return !(\n (this.schema as JSONSchemaNS.Array).unevaluatedItems === false ||\n this.schema.items === false ||\n this.schema.additionalItems === false\n );\n }\n}","\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { Highlight } from 'ngx-highlightjs';\n\n@Component({\n selector: 'lib-print-schema-type',\n template: `\n @if (isSimpleType) {\n <code>{{ value }}</code>\n } @else {\n <pre><code [highlight]=\"jsonCode\" [language]=\"language\"></code></pre>\n }\n `,\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [\n Highlight\n]\n})\nexport class PrintSchemaTypeComponent {\n @Input({ required: true }) obj!: unknown;\n\n get isSimpleType(): boolean {\n return ['string', 'number', 'bigint', 'boolean'].includes(typeof this.obj);\n }\n\n get jsonCode(): string {\n return JSON.stringify(this.obj, null, \"\\t\");\n }\n\n get value(): string {\n return this.obj!.toString();\n }\n\n get language(): string {\n return \"json\";\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { PrintSchemaTypeComponent } from './print-schema-type';\n\nimport type { JSONSchema } from '../../types';\n\n@Component({\n selector: 'qm-constant',\n standalone: true,\n imports: [PrintSchemaTypeComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>Constant value :</strong>\n \n <lib-print-schema-type [obj]=\"constValue\" />\n </div>\n `\n})\nexport class ConstantComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n\n get constValue(): any {\n return this.schema.const;\n }\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { PrintSchemaTypeComponent } from './print-schema-type';\n\nimport type { JSONSchema } from '../../types';\n\n@Component({\n selector: 'qm-default-value',\n standalone: true,\n imports: [PrintSchemaTypeComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>{{ defaultLabel }}</strong>\n \n <lib-print-schema-type [obj]=\"schema.default\" />\n </div>\n `,\n})\nexport class DefaultValueComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n\n defaultLabel = 'Default value :';\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { PrintSchemaTypeComponent } from './print-schema-type';\n\nimport type { JSONSchema } from '../../types';\n\n@Component({\n selector: 'qm-enum',\n standalone: true,\n imports: [PrintSchemaTypeComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>{{ enumLabel }}</strong>\n \n <lib-print-schema-type [obj]=\"enumValue\" />\n </div>\n `,\n})\nexport class EnumComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n\n enumLabel = 'Possible values :';\n\n get enumValue(): unknown {\n return this.schema.enum;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\nimport type { JSONSchema } from \"../types\";\n\ntype itemsType = { id: number; value: unknown; label: string }\n\ntype ValueType = Exclude<JSONSchema, true | false>;\ntype OutputType = itemsType[];\n\n@Pipe({ \n name: 'examplesList',\n standalone: true \n})\nexport class ExamplesListPipe implements PipeTransform {\n transform(schema: ValueType) : OutputType {\n return (schema.examples || [])\n .map((val, idx) => ({\n id: idx,\n value: val,\n label: `Example ${idx}`,\n }));\n }\n}","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport {MatTabsModule} from '@angular/material/tabs';\nimport { PrintSchemaTypeComponent } from './print-schema-type';\n\nimport type { JSONSchema } from '../../types';\nimport { ExamplesListPipe } from \"../../pipes/examples-list.pipe\";\n\ntype itemsType = { id: number; value: unknown; label: string }[]\n\n@Component({\n selector: 'qm-examples',\n standalone: true,\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n @if (schema | examplesList; as items) {\n <div>\n <strong>{{ examplesLabel }}</strong>\n <mat-tab-group>\n @for (item of items; track item) {\n <mat-tab>\n <ng-template mat-tab-label>\n {{ item.label }}\n </ng-template>\n <lib-print-schema-type [obj]=\"item.value\" />\n </mat-tab>\n }\n </mat-tab-group>\n </div>\n }\n `,\n imports: [\n MatTabsModule,\n PrintSchemaTypeComponent,\n ExamplesListPipe\n]\n})\nexport class ExamplesComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n\n examplesLabel = 'Example values :';\n\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-read-only',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n 🚨 \n <strong>{{ readOnlyLabel }}</strong>\n </div>\n `,\n})\nexport class ReadOnlyComponent {\n readOnlyLabel = 'read only';\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-write-only',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n 🚨 \n <strong>{{ writeOnlyLabel }}</strong>\n </div>\n `,\n})\nexport class WriteOnlyComponent {\n writeOnlyLabel = 'write only';\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-array-unique-items',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>Unique items :</strong>\n \n <code>yes</code>\n </div>\n `\n})\nexport class ArrayUniqueItemsComponent {}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-deprecated',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <span>🚨 </span>\n <ng-container>Deprecated</ng-container>\n </div>\n `,\n})\nexport class DeprecatedComponent {}","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-nullable',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <span>❓ </span>\n <ng-container>Nullable</ng-container>\n </div>\n `,\n})\nexport class NullableComponent {}","\nimport { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\nimport type { JSONSchema } from '../../types';\n\n@Component({\n selector: 'qm-string-length',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>{{ lengthLabel }}</strong> \n @if (schema.minLength !== undefined) {\n <code>{{ '>= ' + schema.minLength + ' character(s)' }}</code>\n }\n @if (minAndMaxLength) {\n <span> & </span>\n }\n @if (schema.maxLength !== undefined) {\n <code>{{ '<= ' + schema.maxLength + ' character(s)' }}</code>\n }\n </div>\n `,\n})\nexport class StringLengthComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n\n lengthLabel = 'Length :';\n \n get minAndMaxLength(): boolean {\n return this.schema.minLength !== undefined && this.schema.maxLength !== undefined;\n }\n\n}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n\nimport type { JSONSchema } from '../../types';\n\n@Component({\n selector: 'qm-object-properties',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <strong>{{ lengthLabel }}</strong> \n @if (schema.minProperties !== undefined) {\n <code>\n {{ '>= ' + schema.minProperties + ' propertie(s)' }}\n </code>\n }\n @if (minAndMax) {\n <span> & </span>\n }\n @if (schema.maxProperties !== undefined) {\n <code>\n {{ '<= ' + schema.maxProperties + ' propertie(s)' }}\n </code>\n }\n </div>\n `,\n})\nexport class ObjectPropertiesComponent {\n @Input({ required: true }) schema!: Exclude<JSONSchema, true | false>;\n lengthLabel = 'Length :';\n\n get minAndMax(): boolean {\n return this.schema.minProperties !== undefined && this.schema.maxProperties !== undefined; \n }\n\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n selector: 'qm-no-extra-properties',\n standalone: true,\n imports: [],\n changeDetection: ChangeDetectionStrategy.OnPush,\n template: `\n <div>\n <span>🚨 </span>\n <ng-container>No extra propertie(s) are authorized in this object</ng-container>\n </div>\n `,\n})\nexport class NoExtraPropertiesComponent {}\n","import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\n\n\nimport { AndLabelComponent } from \"../../labels/and-label\";\n\nimport type { JSONSchemaNS, JSONSchema } from '../../types';\ntype typedJSONArraySchema = JSONSchemaNS.Array;\n\n@Component({\n selector: 'qm-array-number-of-items',\n standalone: true,\n imports: [AndLabelComponent],\n changeDetection: ChangeDetectionStrategy.OnPush,\n templa