@vaadin/hilla-generator-plugin-model 24.5.0-alpha13 → 24.5.0-alpha14

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.
@@ -1 +1 @@
1
- {"version":3,"file":"EntityModelProcessor.d.ts","sourceRoot":"","sources":["src/EntityModelProcessor.ts"],"names":[],"mappings":"AAEA,OAAO,EAWL,KAAK,MAAM,EACZ,MAAM,wCAAwC,CAAC;AAMhD,OAAO,iBAAiB,MAAM,iEAAiE,CAAC;AAEhG,OAAW,EACT,KAAK,gBAAgB,EAErB,KAAK,UAAU,EACf,KAAK,UAAU,EAEhB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAA0B,KAAK,OAAO,EAAsD,MAAM,YAAY,CAAC;AAEtH,MAAM,MAAM,cAAc,GAAG,QAAQ,CAAC;IACpC,EAAE,EAAE,UAAU,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;CACd,CAAC,CAAC;AAEH,QAAA,MAAM,aAAa,eAAW,CAAC;AAC/B,QAAA,MAAM,OAAO,eAAW,CAAC;AACzB,QAAA,MAAM,mBAAmB,eAAW,CAAC;AACrC,QAAA,MAAM,MAAM,eAAW,CAAC;AACxB,QAAA,MAAM,mBAAmB,eAAW,CAAC;AAErC,8BAAsB,oBAAoB;;IACxC,MAAM,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,UAAU;IAY7E,SAAS,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IACtD,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACjD,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IAG5C,SAAS,aAAa,IAAI,EAAE,MAAM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AS,CAAC,QAAQ,CAAC,CAAC,aAAa,CAAC,EAAE,iBAAiB,CAAC;IACtD,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,EAAE,cAAc,CAAC;IAC7C,SAAS,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IACjD,SAAS,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,EAAE,cAAc,CAAC;IAG5C,SAAS,aAAa,IAAI,EAAE,MAAM,EAAE,wBAAwB,EAAE,OAAO;IAuBrE,OAAO,IAAI,UAAU;IAarB,SAAS,CAAC,QAAQ,CAAC,CAAC,mBAAmB,CAAC,IAAI,gBAAgB,GAAG,SAAS;CACzE;AAED,qBAAa,yBAA0B,SAAQ,oBAAoB;;gBAOrD,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO;IAc7D,SAAS,CAAC,CAAC,mBAAmB,CAAC,IAAI,gBAAgB,GAAG,SAAS;CAyGhE;AAED,qBAAa,wBAAyB,SAAQ,oBAAoB;gBACpD,IAAI,EAAE,MAAM;IAIxB,SAAS,CAAC,CAAC,mBAAmB,CAAC,IAAI,gBAAgB;CA+BpD"}
@@ -4,7 +4,6 @@ import {
4
4
  convertReferenceSchemaToSpecifier,
5
5
  decomposeSchema,
6
6
  isComposedSchema,
7
- isEmptyObject,
8
7
  isEnumSchema,
9
8
  isObjectSchema,
10
9
  isReferenceSchema
@@ -145,9 +144,6 @@ class EntityClassModelProcessor extends EntityModelProcessor {
145
144
  logger.debug(schema, `Component is not an object: ${this.#fullyQualifiedName}`);
146
145
  return void 0;
147
146
  }
148
- if (isEmptyObject(schema)) {
149
- logger.warn(`Component has no properties: ${this.#fullyQualifiedName}`);
150
- }
151
147
  const typeT = ts.factory.createIdentifier("T");
152
148
  const modelTypeParameters = ts.factory.createTypeParameterDeclaration(
153
149
  void 0,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["src/EntityModelProcessor.ts"],
4
- "sourcesContent": ["/* eslint-disable symbol-description */\nimport { dirname } from 'path/posix';\nimport {\n convertReferenceSchemaToPath,\n convertReferenceSchemaToSpecifier,\n decomposeSchema,\n isComposedSchema,\n isEmptyObject,\n isEnumSchema,\n isObjectSchema,\n isReferenceSchema,\n type ObjectSchema,\n type ReferenceSchema,\n type Schema,\n} from '@vaadin/hilla-generator-core/Schema.js';\nimport {\n convertFullyQualifiedNameToRelativePath,\n simplifyFullyQualifiedName,\n} from '@vaadin/hilla-generator-core/utils.js';\nimport createSourceFile from '@vaadin/hilla-generator-utils/createSourceFile.js';\nimport DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport PathManager from '@vaadin/hilla-generator-utils/dependencies/PathManager.js';\nimport ts, {\n type ClassDeclaration,\n type ClassElement,\n type Identifier,\n type SourceFile,\n type Statement,\n} from 'typescript';\nimport { ModelSchemaExpressionProcessor, ModelSchemaTypeProcessor } from './ModelSchemaProcessor.js';\nimport { importBuiltInFormModel, type Context, createModelBuildingCallback, createEmptyValueMaker } from './utils.js';\n\nexport type DependencyData = Readonly<{\n id: Identifier;\n path: string;\n}>;\n\nconst $dependencies = Symbol();\nconst $entity = Symbol();\nconst $fullyQualifiedName = Symbol();\nconst $model = Symbol();\nconst $processDeclaration = Symbol();\n\nexport abstract class EntityModelProcessor {\n static process(name: string, component: Schema, context: Context): SourceFile {\n context.owner.logger.debug(`Processing model for entity: ${name}`);\n\n const schema = isComposedSchema(component) ? decomposeSchema(component)[0] : component;\n\n return isEnumSchema(schema)\n ? // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new EntityEnumModelProcessor(name).process() // eslint-disable-line no-use-before-define\n : // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new EntityClassModelProcessor(name, component, context).process(); // eslint-disable-line no-use-before-define\n }\n\n protected readonly [$dependencies]: DependencyManager;\n protected readonly [$entity]: DependencyData;\n protected readonly [$fullyQualifiedName]: string;\n protected readonly [$model]: DependencyData;\n readonly #outputPathManager = new PathManager({ extension: 'ts' });\n\n protected constructor(name: string, shouldImportEntityAsType: boolean) {\n this[$fullyQualifiedName] = name;\n\n const entityName = simplifyFullyQualifiedName(name);\n const entityPath = convertFullyQualifiedNameToRelativePath(name);\n\n const modelName = `${entityName}Model`;\n const modelPath = `${entityPath}Model`;\n this[$dependencies] = new DependencyManager(new PathManager({ extension: '.js', relativeTo: dirname(modelPath) }));\n\n const { exports, imports, paths } = this[$dependencies];\n\n this[$model] = {\n id: exports.default.set(modelName),\n path: modelPath,\n };\n\n this[$entity] = {\n id: imports.default.add(paths.createRelativePath(entityPath), entityName, shouldImportEntityAsType),\n path: entityPath,\n };\n }\n\n process(): SourceFile {\n const declaration = this[$processDeclaration]();\n\n const { exports, imports } = this[$dependencies];\n const importStatements = imports.toCode();\n const exportStatement = exports.toCode();\n\n return createSourceFile(\n [...importStatements, declaration, ...exportStatement].filter(Boolean) as readonly Statement[],\n this.#outputPathManager.createRelativePath(this[$model].path),\n );\n }\n\n protected abstract [$processDeclaration](): ClassDeclaration | undefined;\n}\n\nexport class EntityClassModelProcessor extends EntityModelProcessor {\n readonly #component: Schema;\n readonly #context: Context;\n readonly #fullyQualifiedName: string;\n readonly #getPropertyModelSymbol: Identifier;\n readonly #makeObjectEmptyValueCreator: Identifier;\n\n constructor(name: string, component: Schema, context: Context) {\n super(name, true);\n\n this.#component = component;\n this.#context = context;\n this.#fullyQualifiedName = name;\n\n this.#getPropertyModelSymbol = this[$dependencies].imports.named.add('@vaadin/hilla-lit-form', '_getPropertyModel');\n this.#makeObjectEmptyValueCreator = this[$dependencies].imports.named.add(\n '@vaadin/hilla-lit-form',\n 'makeObjectEmptyValueCreator',\n );\n }\n\n protected [$processDeclaration](): ClassDeclaration | undefined {\n const { logger } = this.#context.owner;\n\n let entitySchema = this.#component;\n let parent;\n\n if (isComposedSchema(this.#component)) {\n const decomposed = decomposeSchema(this.#component);\n\n if (decomposed.length > 2) {\n logger.debug(\n this.#component,\n `The schema for a class component ${this.#fullyQualifiedName} has more than two components. This plugin will ignore it.`,\n );\n return undefined;\n }\n\n const [parentSchema, childSchema] = decomposed;\n\n if (!isReferenceSchema(parentSchema)) {\n logger.debug(parentSchema, 'Only reference schema allowed for parent class');\n return undefined;\n }\n\n entitySchema = childSchema;\n parent = this.#processParentClass(parentSchema);\n } else {\n parent = importBuiltInFormModel('ObjectModel', this[$dependencies]);\n }\n\n return this.#processModelClass(entitySchema, this[$entity].id, parent);\n }\n\n #processClassElements({ properties }: ObjectSchema): readonly ClassElement[] {\n if (!properties) {\n return [];\n }\n\n return Object.entries(properties).map(([name, schema]) => {\n const type = new ModelSchemaTypeProcessor(schema, this[$dependencies]).process();\n const args = new ModelSchemaExpressionProcessor(schema, this[$dependencies]).process();\n\n return ts.factory.createGetAccessorDeclaration(\n undefined,\n ts.factory.createIdentifier(name),\n [],\n type,\n ts.factory.createBlock(\n [\n ts.factory.createReturnStatement(\n ts.factory.createCallExpression(\n ts.factory.createElementAccessExpression(ts.factory.createThis(), this.#getPropertyModelSymbol),\n undefined,\n [ts.factory.createStringLiteral(name), createModelBuildingCallback(type.typeName as Identifier, args)],\n ),\n ),\n ],\n true,\n ),\n );\n });\n }\n\n #processModelClass(schema: Schema, entity: Identifier, parent: Identifier): ClassDeclaration | undefined {\n const { logger } = this.#context.owner;\n\n if (!isObjectSchema(schema)) {\n logger.debug(schema, `Component is not an object: ${this.#fullyQualifiedName}`);\n return undefined;\n }\n\n if (isEmptyObject(schema)) {\n logger.warn(`Component has no properties: ${this.#fullyQualifiedName}`);\n }\n\n const typeT = ts.factory.createIdentifier('T');\n const modelTypeParameters = ts.factory.createTypeParameterDeclaration(\n undefined,\n typeT,\n ts.factory.createTypeReferenceNode(entity),\n ts.factory.createTypeReferenceNode(entity),\n );\n\n return ts.factory.createClassDeclaration(\n undefined,\n this[$model].id,\n [modelTypeParameters],\n [\n ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n ts.factory.createExpressionWithTypeArguments(parent, [ts.factory.createTypeReferenceNode(typeT)]),\n ]),\n ],\n [\n createEmptyValueMaker(this.#makeObjectEmptyValueCreator, this[$model].id),\n ...this.#processClassElements(schema),\n ],\n );\n }\n\n #processParentClass(schema: ReferenceSchema): Identifier {\n const { imports, paths } = this[$dependencies];\n\n const specifier = convertReferenceSchemaToSpecifier(schema);\n const path = convertReferenceSchemaToPath(schema);\n const modelPath = paths.createRelativePath(`${path}Model`);\n const modelSpecifier = `${specifier}Model`;\n\n return imports.default.add(modelPath, modelSpecifier, false);\n }\n}\n\nexport class EntityEnumModelProcessor extends EntityModelProcessor {\n constructor(name: string) {\n super(name, false);\n }\n\n protected [$processDeclaration](): ClassDeclaration {\n const enumModel = importBuiltInFormModel('EnumModel', this[$dependencies]);\n const enumPropertySymbol = this[$dependencies].imports.named.add('@vaadin/hilla-lit-form', '_enum');\n const makeEnumEmptyValueCreator = this[$dependencies].imports.named.add(\n '@vaadin/hilla-lit-form',\n 'makeEnumEmptyValueCreator',\n );\n\n return ts.factory.createClassDeclaration(\n undefined,\n this[$model].id,\n undefined,\n [\n ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n ts.factory.createExpressionWithTypeArguments(enumModel, [\n ts.factory.createTypeQueryNode(this[$entity].id, undefined),\n ]),\n ]),\n ],\n [\n createEmptyValueMaker(makeEnumEmptyValueCreator, this[$model].id),\n ts.factory.createPropertyDeclaration(\n [ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)],\n ts.factory.createComputedPropertyName(enumPropertySymbol),\n undefined,\n undefined,\n this[$entity].id,\n ),\n ],\n );\n }\n}\n"],
5
- "mappings": "AACA,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,OAAO,sBAAsB;AAC7B,OAAO,uBAAuB;A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AClG,UAAM,4BAA4B,KAAK,aAAa,EAAE,QAAQ,MAAM;AAAA,MAClE;AAAA,MACA;AAAA,IACF;AAEA,WAAO,GAAG,QAAQ;AAAA,MAChB;AAAA,MACA,KAAK,MAAM,EAAE;AAAA,MACb;AAAA,MACA;AAAA,QACE,GAAG,QAAQ,qBAAqB,GAAG,WAAW,gBAAgB;AAAA,UAC5D,GAAG,QAAQ,kCAAkC,WAAW;AAAA,YACtD,GAAG,QAAQ,oBAAoB,KAAK,OAAO,EAAE,IAAI,MAAS;AAAA,UAC5D,CAAC;AAAA,QACH,CAAC;AAAA,MACH;AAAA,MACA;AAAA,QACE,sBAAsB,2BAA2B,KAAK,MAAM,EAAE,EAAE;AAAA,QAChE,GAAG,QAAQ;AAAA,UACT,CAAC,GAAG,QAAQ,eAAe,GAAG,WAAW,eAAe,CAAC;AAAA,UACzD,GAAG,QAAQ,2BAA2B,kBAAkB;AAAA,UACxD;AAAA,UACA;AAAA,UACA,KAAK,OAAO,EAAE;AAAA,QAChB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;",
4
+ "sourcesContent": ["/* eslint-disable symbol-description */\nimport { dirname } from 'path/posix';\nimport {\n convertReferenceSchemaToPath,\n convertReferenceSchemaToSpecifier,\n decomposeSchema,\n isComposedSchema,\n isEnumSchema,\n isObjectSchema,\n isReferenceSchema,\n type ObjectSchema,\n type ReferenceSchema,\n type Schema,\n} from '@vaadin/hilla-generator-core/Schema.js';\nimport {\n convertFullyQualifiedNameToRelativePath,\n simplifyFullyQualifiedName,\n} from '@vaadin/hilla-generator-core/utils.js';\nimport createSourceFile from '@vaadin/hilla-generator-utils/createSourceFile.js';\nimport DependencyManager from '@vaadin/hilla-generator-utils/dependencies/DependencyManager.js';\nimport PathManager from '@vaadin/hilla-generator-utils/dependencies/PathManager.js';\nimport ts, {\n type ClassDeclaration,\n type ClassElement,\n type Identifier,\n type SourceFile,\n type Statement,\n} from 'typescript';\nimport { ModelSchemaExpressionProcessor, ModelSchemaTypeProcessor } from './ModelSchemaProcessor.js';\nimport { importBuiltInFormModel, type Context, createModelBuildingCallback, createEmptyValueMaker } from './utils.js';\n\nexport type DependencyData = Readonly<{\n id: Identifier;\n path: string;\n}>;\n\nconst $dependencies = Symbol();\nconst $entity = Symbol();\nconst $fullyQualifiedName = Symbol();\nconst $model = Symbol();\nconst $processDeclaration = Symbol();\n\nexport abstract class EntityModelProcessor {\n static process(name: string, component: Schema, context: Context): SourceFile {\n context.owner.logger.debug(`Processing model for entity: ${name}`);\n\n const schema = isComposedSchema(component) ? decomposeSchema(component)[0] : component;\n\n return isEnumSchema(schema)\n ? // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new EntityEnumModelProcessor(name).process() // eslint-disable-line no-use-before-define\n : // eslint-disable-next-line @typescript-eslint/no-use-before-define\n new EntityClassModelProcessor(name, component, context).process(); // eslint-disable-line no-use-before-define\n }\n\n protected readonly [$dependencies]: DependencyManager;\n protected readonly [$entity]: DependencyData;\n protected readonly [$fullyQualifiedName]: string;\n protected readonly [$model]: DependencyData;\n readonly #outputPathManager = new PathManager({ extension: 'ts' });\n\n protected constructor(name: string, shouldImportEntityAsType: boolean) {\n this[$fullyQualifiedName] = name;\n\n const entityName = simplifyFullyQualifiedName(name);\n const entityPath = convertFullyQualifiedNameToRelativePath(name);\n\n const modelName = `${entityName}Model`;\n const modelPath = `${entityPath}Model`;\n this[$dependencies] = new DependencyManager(new PathManager({ extension: '.js', relativeTo: dirname(modelPath) }));\n\n const { exports, imports, paths } = this[$dependencies];\n\n this[$model] = {\n id: exports.default.set(modelName),\n path: modelPath,\n };\n\n this[$entity] = {\n id: imports.default.add(paths.createRelativePath(entityPath), entityName, shouldImportEntityAsType),\n path: entityPath,\n };\n }\n\n process(): SourceFile {\n const declaration = this[$processDeclaration]();\n\n const { exports, imports } = this[$dependencies];\n const importStatements = imports.toCode();\n const exportStatement = exports.toCode();\n\n return createSourceFile(\n [...importStatements, declaration, ...exportStatement].filter(Boolean) as readonly Statement[],\n this.#outputPathManager.createRelativePath(this[$model].path),\n );\n }\n\n protected abstract [$processDeclaration](): ClassDeclaration | undefined;\n}\n\nexport class EntityClassModelProcessor extends EntityModelProcessor {\n readonly #component: Schema;\n readonly #context: Context;\n readonly #fullyQualifiedName: string;\n readonly #getPropertyModelSymbol: Identifier;\n readonly #makeObjectEmptyValueCreator: Identifier;\n\n constructor(name: string, component: Schema, context: Context) {\n super(name, true);\n\n this.#component = component;\n this.#context = context;\n this.#fullyQualifiedName = name;\n\n this.#getPropertyModelSymbol = this[$dependencies].imports.named.add('@vaadin/hilla-lit-form', '_getPropertyModel');\n this.#makeObjectEmptyValueCreator = this[$dependencies].imports.named.add(\n '@vaadin/hilla-lit-form',\n 'makeObjectEmptyValueCreator',\n );\n }\n\n protected [$processDeclaration](): ClassDeclaration | undefined {\n const { logger } = this.#context.owner;\n\n let entitySchema = this.#component;\n let parent;\n\n if (isComposedSchema(this.#component)) {\n const decomposed = decomposeSchema(this.#component);\n\n if (decomposed.length > 2) {\n logger.debug(\n this.#component,\n `The schema for a class component ${this.#fullyQualifiedName} has more than two components. This plugin will ignore it.`,\n );\n return undefined;\n }\n\n const [parentSchema, childSchema] = decomposed;\n\n if (!isReferenceSchema(parentSchema)) {\n logger.debug(parentSchema, 'Only reference schema allowed for parent class');\n return undefined;\n }\n\n entitySchema = childSchema;\n parent = this.#processParentClass(parentSchema);\n } else {\n parent = importBuiltInFormModel('ObjectModel', this[$dependencies]);\n }\n\n return this.#processModelClass(entitySchema, this[$entity].id, parent);\n }\n\n #processClassElements({ properties }: ObjectSchema): readonly ClassElement[] {\n if (!properties) {\n return [];\n }\n\n return Object.entries(properties).map(([name, schema]) => {\n const type = new ModelSchemaTypeProcessor(schema, this[$dependencies]).process();\n const args = new ModelSchemaExpressionProcessor(schema, this[$dependencies]).process();\n\n return ts.factory.createGetAccessorDeclaration(\n undefined,\n ts.factory.createIdentifier(name),\n [],\n type,\n ts.factory.createBlock(\n [\n ts.factory.createReturnStatement(\n ts.factory.createCallExpression(\n ts.factory.createElementAccessExpression(ts.factory.createThis(), this.#getPropertyModelSymbol),\n undefined,\n [ts.factory.createStringLiteral(name), createModelBuildingCallback(type.typeName as Identifier, args)],\n ),\n ),\n ],\n true,\n ),\n );\n });\n }\n\n #processModelClass(schema: Schema, entity: Identifier, parent: Identifier): ClassDeclaration | undefined {\n const { logger } = this.#context.owner;\n\n if (!isObjectSchema(schema)) {\n logger.debug(schema, `Component is not an object: ${this.#fullyQualifiedName}`);\n return undefined;\n }\n\n const typeT = ts.factory.createIdentifier('T');\n const modelTypeParameters = ts.factory.createTypeParameterDeclaration(\n undefined,\n typeT,\n ts.factory.createTypeReferenceNode(entity),\n ts.factory.createTypeReferenceNode(entity),\n );\n\n return ts.factory.createClassDeclaration(\n undefined,\n this[$model].id,\n [modelTypeParameters],\n [\n ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n ts.factory.createExpressionWithTypeArguments(parent, [ts.factory.createTypeReferenceNode(typeT)]),\n ]),\n ],\n [\n createEmptyValueMaker(this.#makeObjectEmptyValueCreator, this[$model].id),\n ...this.#processClassElements(schema),\n ],\n );\n }\n\n #processParentClass(schema: ReferenceSchema): Identifier {\n const { imports, paths } = this[$dependencies];\n\n const specifier = convertReferenceSchemaToSpecifier(schema);\n const path = convertReferenceSchemaToPath(schema);\n const modelPath = paths.createRelativePath(`${path}Model`);\n const modelSpecifier = `${specifier}Model`;\n\n return imports.default.add(modelPath, modelSpecifier, false);\n }\n}\n\nexport class EntityEnumModelProcessor extends EntityModelProcessor {\n constructor(name: string) {\n super(name, false);\n }\n\n protected [$processDeclaration](): ClassDeclaration {\n const enumModel = importBuiltInFormModel('EnumModel', this[$dependencies]);\n const enumPropertySymbol = this[$dependencies].imports.named.add('@vaadin/hilla-lit-form', '_enum');\n const makeEnumEmptyValueCreator = this[$dependencies].imports.named.add(\n '@vaadin/hilla-lit-form',\n 'makeEnumEmptyValueCreator',\n );\n\n return ts.factory.createClassDeclaration(\n undefined,\n this[$model].id,\n undefined,\n [\n ts.factory.createHeritageClause(ts.SyntaxKind.ExtendsKeyword, [\n ts.factory.createExpressionWithTypeArguments(enumModel, [\n ts.factory.createTypeQueryNode(this[$entity].id, undefined),\n ]),\n ]),\n ],\n [\n createEmptyValueMaker(makeEnumEmptyValueCreator, this[$model].id),\n ts.factory.createPropertyDeclaration(\n [ts.factory.createModifier(ts.SyntaxKind.ReadonlyKeyword)],\n ts.factory.createComputedPropertyName(enumPropertySymbol),\n undefined,\n undefined,\n this[$entity].id,\n ),\n ],\n );\n }\n}\n"],
5
+ "mappings": "AACA,SAAS,eAAe;AACxB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,OACK;AACP,OAAO,sBAAsB;AAC7B,OAAO,uBAAuB;AAC9B,OAAO,iBAAiB;AACxB,OAAO;AAAA,OAMA;AACP,SAAS,gCAAgC,gCAAgC;AACzE,SAAS,wBAAsC,6BAA6B,6BAA6B;AAOzG,MAAM,gBAAgB,OAAO;AAC7B,MAAM,UAAU,OAAO;AACvB,MAAM,sBAAsB,OAAO;AACnC,MAAM,SAAS,OAAO;AACtB,MAAM,sBAAsB,OAAO;AAE5B,MAAe,qBAAqB;AAAA,EACzC,OAAO,QAAQ,MAAc,WAAmB,SAA8B;AAC5E,YAAQ,MAAM,OAAO,MAAM,gCAAgC,IAAI,EAAE;AAEjE,UAAM,SAAS,iBAAiB,SAAS,IAAI,gBAAgB,SAAS,EAAE,CAAC,IAAI;AAE7E,WAAO,aAAa,MAAM;AAAA;AAAA,MAEtB,IAAI,yBAAyB,IAAI,EAAE,QAAQ;AAAA;AAAA;AAAA,MAE3C,IAAI,0BAA0B,MAAM,WAAW,OAAO,EAAE,QAAQ;AAAA;AAAA,EACtE;AAAA,EAEA,CAAoB,aAAa;AAAA,EACjC,CAAoB,OAAO;AAAA,EAC3B,CAAoB,m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in-model",
3
- "version": "24.5.0-alpha13",
3
+ "version": "24.5.0-alpha14",
4
4
  "description": "A Hilla TypeScript Generator plugin to generate form models",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -51,10 +51,10 @@
51
51
  "access": "public"
52
52
  },
53
53
  "dependencies": {
54
- "@vaadin/hilla-generator-core": "24.5.0-alpha13",
55
- "@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha13",
56
- "@vaadin/hilla-generator-utils": "24.5.0-alpha13",
57
- "@vaadin/hilla-lit-form": "24.5.0-alpha13",
54
+ "@vaadin/hilla-generator-core": "24.5.0-alpha14",
55
+ "@vaadin/hilla-generator-plugin-backbone": "24.5.0-alpha14",
56
+ "@vaadin/hilla-generator-utils": "24.5.0-alpha14",
57
+ "@vaadin/hilla-lit-form": "24.5.0-alpha14",
58
58
  "fast-deep-equal": "^3.1.3",
59
59
  "openapi-types": "^12.1.3",
60
60
  "typescript": "5.5.2"
@@ -65,8 +65,8 @@
65
65
  "@types/node": "^20.7.1",
66
66
  "@types/sinon": "^10.0.17",
67
67
  "@types/sinon-chai": "^3.2.10",
68
- "@vaadin/hilla-generator-core": "24.5.0-alpha13",
69
- "@vaadin/hilla-generator-plugin-client": "24.5.0-alpha13",
68
+ "@vaadin/hilla-generator-core": "24.5.0-alpha14",
69
+ "@vaadin/hilla-generator-plugin-client": "24.5.0-alpha14",
70
70
  "c8": "^10.1.2",
71
71
  "chai": "^4.3.10",
72
72
  "concurrently": "^8.2.1",