ngx-material-entity 0.1.0 → 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.
Files changed (120) hide show
  1. package/CONTRIBUTING.md +7 -1
  2. package/README.md +3 -2
  3. package/classes/base-builder.class.d.ts +35 -0
  4. package/classes/entity-model.class.d.ts +1 -1
  5. package/classes/entity-service.class.d.ts +27 -17
  6. package/classes/entity-utilities.class.d.ts +96 -46
  7. package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +23 -0
  8. package/components/confirm-dialog/confirm-dialog-data.d.ts +18 -8
  9. package/components/confirm-dialog/confirm-dialog.component.d.ts +15 -5
  10. package/components/get-validation-error-message.function.d.ts +3 -2
  11. package/components/input/add-array-item-dialog-data.builder.d.ts +21 -0
  12. package/components/input/add-array-item-dialog-data.d.ts +20 -0
  13. package/components/input/input.component.d.ts +116 -26
  14. package/components/input/input.module.d.ts +6 -4
  15. package/components/table/create-dialog/create-dialog-data.builder.d.ts +21 -0
  16. package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +22 -0
  17. package/components/table/create-dialog/create-entity-dialog-data.d.ts +2 -2
  18. package/components/table/create-dialog/create-entity-dialog.component.d.ts +19 -5
  19. package/components/table/edit-dialog/edit-dialog-data.builder.d.ts +25 -0
  20. package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +5 -5
  21. package/components/table/edit-dialog/edit-entity-dialog.builder.d.ts +23 -0
  22. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +23 -5
  23. package/components/table/table-data.builder.d.ts +51 -0
  24. package/components/table/table-data.d.ts +40 -24
  25. package/components/table/table.component.d.ts +52 -5
  26. package/components/table/table.module.d.ts +3 -1
  27. package/decorators/array/array-decorator-internal.data.d.ts +45 -0
  28. package/decorators/array/array-decorator.data.d.ts +129 -0
  29. package/decorators/array/array.decorator.d.ts +10 -0
  30. package/decorators/base/base-property.decorator.d.ts +7 -6
  31. package/decorators/base/decorator-types.enum.d.ts +7 -7
  32. package/decorators/base/property-decorator-internal.data.d.ts +24 -0
  33. package/decorators/base/property-decorator.data.d.ts +70 -0
  34. package/decorators/boolean/boolean-decorator-internal.data.d.ts +25 -0
  35. package/decorators/boolean/boolean-decorator.data.d.ts +37 -0
  36. package/decorators/boolean/boolean.decorator.d.ts +8 -0
  37. package/decorators/number/number-decorator-internal.data.d.ts +22 -0
  38. package/decorators/number/number-decorator.data.d.ts +38 -0
  39. package/decorators/number/number.decorator.d.ts +8 -0
  40. package/decorators/object/object-decorator-internal.data.d.ts +11 -0
  41. package/decorators/object/object-decorator.data.d.ts +25 -0
  42. package/decorators/object/object.decorator.d.ts +9 -0
  43. package/decorators/string/string-decorator-internal.data.d.ts +43 -0
  44. package/decorators/string/string-decorator.data.d.ts +79 -0
  45. package/decorators/string/string.decorator.d.ts +8 -0
  46. package/esm2020/classes/base-builder.class.mjs +43 -0
  47. package/esm2020/classes/entity-model.class.mjs +2 -2
  48. package/esm2020/classes/entity-service.class.mjs +20 -14
  49. package/esm2020/classes/entity-utilities.class.mjs +182 -101
  50. package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +44 -0
  51. package/esm2020/components/confirm-dialog/confirm-dialog-data.mjs +1 -1
  52. package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +18 -22
  53. package/esm2020/components/get-validation-error-message.function.mjs +8 -3
  54. package/esm2020/components/input/add-array-item-dialog-data.builder.mjs +30 -0
  55. package/esm2020/components/input/add-array-item-dialog-data.mjs +2 -0
  56. package/esm2020/components/input/input.component.mjs +168 -32
  57. package/esm2020/components/input/input.module.mjs +19 -9
  58. package/esm2020/components/table/create-dialog/create-dialog-data.builder.mjs +32 -0
  59. package/esm2020/components/table/create-dialog/create-entity-dialog-data.builder.mjs +26 -0
  60. package/esm2020/components/table/create-dialog/create-entity-dialog-data.mjs +1 -1
  61. package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +30 -30
  62. package/esm2020/components/table/create-dialog/create-entity-dialog.module.mjs +20 -4
  63. package/esm2020/components/table/edit-dialog/edit-dialog-data.builder.mjs +41 -0
  64. package/esm2020/components/table/edit-dialog/edit-entity-dialog-data.mjs +1 -1
  65. package/esm2020/components/table/edit-dialog/edit-entity-dialog.builder.mjs +27 -0
  66. package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +43 -47
  67. package/esm2020/components/table/table-data.builder.mjs +105 -0
  68. package/esm2020/components/table/table-data.mjs +1 -1
  69. package/esm2020/components/table/table.component.mjs +90 -82
  70. package/esm2020/components/table/table.module.mjs +12 -4
  71. package/esm2020/decorators/array/array-decorator-internal.data.mjs +51 -0
  72. package/esm2020/decorators/array/array-decorator.data.mjs +7 -0
  73. package/esm2020/decorators/array/array.decorator.mjs +24 -0
  74. package/esm2020/decorators/base/base-property.decorator.mjs +6 -5
  75. package/esm2020/decorators/base/decorator-types.enum.mjs +1 -1
  76. package/esm2020/decorators/base/property-decorator-internal.data.mjs +38 -0
  77. package/esm2020/decorators/base/property-decorator.data.mjs +6 -0
  78. package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +33 -0
  79. package/esm2020/decorators/boolean/boolean-decorator.data.mjs +7 -0
  80. package/esm2020/decorators/boolean/boolean.decorator.mjs +21 -0
  81. package/esm2020/decorators/number/number-decorator-internal.data.mjs +23 -0
  82. package/esm2020/decorators/number/number-decorator.data.mjs +7 -0
  83. package/esm2020/decorators/number/number.decorator.mjs +18 -0
  84. package/esm2020/decorators/object/object-decorator-internal.data.mjs +12 -0
  85. package/esm2020/decorators/object/object-decorator.data.mjs +7 -0
  86. package/esm2020/decorators/object/object.decorator.mjs +13 -0
  87. package/esm2020/decorators/string/string-decorator-internal.data.mjs +48 -0
  88. package/esm2020/decorators/string/string-decorator.data.mjs +7 -0
  89. package/esm2020/decorators/string/string.decorator.mjs +24 -0
  90. package/esm2020/public-api.mjs +15 -10
  91. package/fesm2015/ngx-material-entity.mjs +1221 -880
  92. package/fesm2015/ngx-material-entity.mjs.map +1 -1
  93. package/fesm2020/ngx-material-entity.mjs +1225 -877
  94. package/fesm2020/ngx-material-entity.mjs.map +1 -1
  95. package/package.json +2 -1
  96. package/public-api.d.ts +15 -7
  97. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.d.ts +0 -35
  98. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.d.ts +0 -12
  99. package/components/input/array-table/array-table.component.d.ts +0 -34
  100. package/components/input/array-table/array-table.module.d.ts +0 -19
  101. package/components/input/internal-input/internal-input.component.d.ts +0 -57
  102. package/components/input/internal-input/internal-input.module.d.ts +0 -16
  103. package/decorators/array.decorator.d.ts +0 -125
  104. package/decorators/base/property-decorator-config.interface.d.ts +0 -50
  105. package/decorators/boolean.decorator.d.ts +0 -42
  106. package/decorators/number.decorator.d.ts +0 -40
  107. package/decorators/object.decorator.d.ts +0 -27
  108. package/decorators/string.decorator.d.ts +0 -76
  109. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.mjs +0 -43
  110. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.mjs +0 -22
  111. package/esm2020/components/input/array-table/array-table.component.mjs +0 -116
  112. package/esm2020/components/input/array-table/array-table.module.mjs +0 -66
  113. package/esm2020/components/input/internal-input/internal-input.component.mjs +0 -73
  114. package/esm2020/components/input/internal-input/internal-input.module.mjs +0 -54
  115. package/esm2020/decorators/array.decorator.mjs +0 -70
  116. package/esm2020/decorators/base/property-decorator-config.interface.mjs +0 -31
  117. package/esm2020/decorators/boolean.decorator.mjs +0 -44
  118. package/esm2020/decorators/number.decorator.mjs +0 -36
  119. package/esm2020/decorators/object.decorator.mjs +0 -23
  120. package/esm2020/decorators/string.decorator.mjs +0 -61
@@ -1 +1 @@
1
- {"version":3,"file":"ngx-material-entity.mjs","sources":["../../../projects/ngx-material-entity/src/decorators/base/property-decorator-config.interface.ts","../../../projects/ngx-material-entity/src/decorators/base/base-property.decorator.ts","../../../projects/ngx-material-entity/src/decorators/base/decorator-types.enum.ts","../../../projects/ngx-material-entity/src/decorators/string.decorator.ts","../../../projects/ngx-material-entity/src/classes/entity-model.class.ts","../../../projects/ngx-material-entity/src/classes/entity-utilities.class.ts","../../../projects/ngx-material-entity/src/classes/entity-service.class.ts","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.component.ts","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.component.html","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.module.ts","../../../projects/ngx-material-entity/src/components/get-validation-error-message.function.ts","../../../projects/ngx-material-entity/src/components/input/internal-input/internal-input.component.ts","../../../projects/ngx-material-entity/src/components/input/internal-input/internal-input.component.html","../../../projects/ngx-material-entity/src/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.ts","../../../projects/ngx-material-entity/src/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.html","../../../projects/ngx-material-entity/src/components/input/array-table/array-table.component.ts","../../../projects/ngx-material-entity/src/components/input/array-table/array-table.component.html","../../../projects/ngx-material-entity/src/components/input/input.component.ts","../../../projects/ngx-material-entity/src/components/input/input.component.html","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.component.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.component.html","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.component.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.component.html","../../../projects/ngx-material-entity/src/components/table/table.component.ts","../../../projects/ngx-material-entity/src/components/table/table.component.html","../../../projects/ngx-material-entity/src/components/table/table.module.ts","../../../projects/ngx-material-entity/src/components/input/internal-input/internal-input.module.ts","../../../projects/ngx-material-entity/src/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.ts","../../../projects/ngx-material-entity/src/components/input/array-table/array-table.module.ts","../../../projects/ngx-material-entity/src/components/input/input.module.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.module.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.module.ts","../../../projects/ngx-material-entity/src/decorators/array.decorator.ts","../../../projects/ngx-material-entity/src/decorators/boolean.decorator.ts","../../../projects/ngx-material-entity/src/decorators/number.decorator.ts","../../../projects/ngx-material-entity/src/decorators/object.decorator.ts","../../../projects/ngx-material-entity/src/public-api.ts","../../../projects/ngx-material-entity/src/ngx-material-entity.ts"],"sourcesContent":["type cols = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * The base options for all propertyDecorators\n */\nexport abstract class PropertyDecoratorConfig {\n /**\n * Whether or not the Property is displayed at all.\n * @default true\n */\n display?: boolean;\n /**\n * The name of the property used as a label for form fields.\n */\n displayName: string;\n /**\n * Whether or not the Property is required.\n * @default true\n */\n required?: boolean;\n /**\n * Whether or not the property gets omitted when creating new Entities.\n * @default false\n */\n omitForCreate?: boolean;\n /**\n * Whether or not the property gets omitted when updating Entities.\n * @default false\n */\n omitForUpdate?: boolean;\n /**\n * Defines the width of the input property when used inside the default create or edit dialog.\n * Has 3 bootstrap values for different breakpoints for simple responsive design.\n * @var firstValue: col-lg-{{firstValue}}\n * @var secondValue: col-md-{{secondValue}}\n * @var thirdValue: col-sm-{{thirdValue}}\n */\n defaultWidths?: [cols, cols, cols];\n /**\n * Specifies order of the input property when used inside the default create or edit dialog.\n * Ordering is ascending\n * @default -1 (sets this property at the end)\n */\n order?: number;\n\n /**\n * Defines, Whether or not there should be a line break after this input.\n * Is used inside the default create and edit dialogs.\n */\n // lineBreakAfter?: boolean;\n\n constructor(\n displayName: string,\n display: boolean = true,\n required: boolean = true,\n omitForCreate: boolean = false,\n omitForUpdate: boolean = false,\n defaultWidths: [cols, cols, cols] = [6, 6, 12],\n order?: number\n // lineBreakAfter: boolean = false\n ) {\n this.displayName = displayName;\n this.display = display;\n this.required = required;\n this.omitForCreate = omitForCreate;\n this.omitForUpdate = omitForUpdate;\n this.defaultWidths = defaultWidths;\n\n if (order) {\n if (order < 0) {\n throw new Error('order must be at least 0');\n }\n\n this.order = order;\n }\n else {\n this.order = -1;\n }\n // this.lineBreakAfter = lineBreakAfter;\n }\n}","import { DecoratorTypes } from './decorator-types.enum';\nimport { PropertyDecoratorConfig } from './property-decorator-config.interface';\n\n/**\n * The base decorator for setting metadata on properties\n * @param metadata The metadata to define\n * @param type The type of metadata\n * @returns The function that sets the metadata\n */\nexport function baseProperty(metadata: PropertyDecoratorConfig, type: DecoratorTypes) {\n return function (target: object, propertyKey: string) {\n Reflect.defineMetadata('metadata', metadata, target, propertyKey);\n Reflect.defineMetadata('type', type, target, propertyKey);\n };\n}","import { StringChipsArrayDecoratorConfig, EntityArrayDecoratorConfig, AutocompleteStringChipsArrayDecoratorConfig } from '../array.decorator';\nimport { Entity } from '../../classes/entity-model.class';\nimport { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig } from '../boolean.decorator';\nimport { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig } from '../number.decorator';\nimport { DefaultObjectDecoratorConfig } from '../object.decorator';\nimport { DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, AutocompleteStringDecoratorConfig, TextboxStringDecoratorConfig } from '../string.decorator';\n\n/**\n * The enum Values for all the different DecoratorTypes.\n */\nexport enum DecoratorTypes {\n STRING = 'string',\n STRING_DROPDOWN = 'stringDropdown',\n STRING_AUTOCOMPLETE = 'stringAutocomplete',\n STRING_TEXTBOX = 'stringTextbox',\n NUMBER = 'number',\n NUMBER_DROPDOWN = 'numberDropdown',\n BOOLEAN_CHECKBOX = 'boolean',\n BOOLEAN_TOGGLE = 'booleanToggle',\n BOOLEAN_DROPDOWN = 'booleanDropdown',\n OBJECT = 'object',\n ARRAY = 'array',\n ARRAY_STRING_CHIPS = 'arrayStringChips',\n ARRAY_STRING_AUTOCOMPLETE_CHIPS = 'arrayStringAutocompleteChips'\n}\n\n/**\n * Gives the metadata-config Type based ont the DecoratorTypes enum\n */\nexport type DecoratorType<T> =\n T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfig\n : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfig\n : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfig\n : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfig\n : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfig\n : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfig\n : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfig\n : T extends DecoratorTypes.BOOLEAN_TOGGLE ? CheckboxBooleanDecoratorConfig\n : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfig\n : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfig\n : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfig<Entity>\n : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfig\n : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfig\n : never;","import { PropertyDecoratorConfig } from './base/property-decorator-config.interface';\nimport { baseProperty } from './base/base-property.decorator';\nimport { DecoratorTypes } from './base/decorator-types.enum';\n\n/**\n * Decorator for setting and getting string propery metadata\n * @param metadata The metadata of the string property\n */\nexport function string(\n metadata: DropdownStringDecoratorConfig | AutocompleteStringDecoratorConfig\n | DefaultStringDecoratorConfig | TextboxStringDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownStringDecoratorConfig(metadata), DecoratorTypes.STRING_DROPDOWN);\n }\n else if (metadata.displayStyle === 'autocomplete') {\n return baseProperty(new AutocompleteStringDecoratorConfig(metadata), DecoratorTypes.STRING_AUTOCOMPLETE);\n }\n else if (metadata.displayStyle === 'textbox') {\n return baseProperty(new TextboxStringDecoratorConfig(metadata), DecoratorTypes.STRING_TEXTBOX);\n }\n else {\n return baseProperty(new DefaultStringDecoratorConfig(metadata), DecoratorTypes.STRING);\n }\n}\n\n/**\n * Interface definition for the @string metadata\n */\nabstract class StringDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * How to display the string\n */\n displayStyle!: 'line' | 'textbox' | 'autocomplete' | 'dropdown';\n}\n\nexport class DropdownStringDecoratorConfig extends StringDecoratorConfig {\n override displayStyle: 'dropdown';\n /**\n * The values of the dropdown, consisting of a name to display and the actual value\n * Can also receive a function to determine the values\n */\n dropdownValues: { displayName: string, value: string }[];\n\n constructor(metadata: DropdownStringDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.dropdownValues = metadata.dropdownValues;\n }\n}\n\nexport class DefaultStringDecoratorConfig extends StringDecoratorConfig {\n override displayStyle: 'line';\n /**\n * (optional) The minimum required length of the string\n */\n minLength?: number;\n /**\n * (optional) The maximum required length of the string\n */\n maxLength?: number;\n /**\n * (optional) A regex used for validation\n */\n regex?: RegExp;\n\n constructor(metadata: DefaultStringDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.minLength = metadata.minLength;\n this.maxLength = metadata.maxLength;\n this.regex = metadata.regex;\n }\n}\nexport class TextboxStringDecoratorConfig extends StringDecoratorConfig {\n override displayStyle: 'textbox';\n /**\n * (optional) The minimum required length of the string\n */\n minLength?: number;\n /**\n * (optional) The maximum required length of the string\n */\n maxLength?: number;\n\n constructor(metadata: TextboxStringDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.minLength = metadata.minLength;\n this.maxLength = metadata.maxLength;\n }\n}\n\nexport class AutocompleteStringDecoratorConfig extends StringDecoratorConfig {\n override displayStyle: 'autocomplete';\n /**\n * The autocomplete values\n */\n autocompleteValues: string[];\n /**\n * (optional) The minimum required length of the string\n */\n minLength?: number;\n /**\n * (optional) The maximum required length of the string\n */\n maxLength?: number;\n /**\n * (optional) A regex used for validation\n */\n regex?: RegExp;\n\n constructor(metadata: AutocompleteStringDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.autocompleteValues = metadata.autocompleteValues;\n this.minLength = metadata.minLength;\n this.maxLength = metadata.maxLength;\n this.regex = metadata.regex;\n }\n}","import { string } from '../decorators/string.decorator';\n\n/**\n * The base Entity class.\n */\nexport abstract class Entity {\n /**\n * A unique identifier for the Entity\n */\n @string({\n omitForCreate: true,\n omitForUpdate: true,\n display: false,\n displayStyle: 'line',\n displayName: 'ID',\n required: true\n })\n id!: string;\n}","import { isEqual } from 'lodash';\nimport { DecoratorType, DecoratorTypes } from '../decorators/base/decorator-types.enum';\nimport { PropertyDecoratorConfig } from '../decorators/base/property-decorator-config.interface';\nimport { DefaultNumberDecoratorConfig } from '../decorators/number.decorator';\nimport { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, TextboxStringDecoratorConfig } from '../decorators/string.decorator';\nimport { EntityArrayDecoratorConfig } from '../decorators/array.decorator';\nimport { Entity } from './entity-model.class';\n\n/**\n * Contains HelperMethods around handling Entities and their property-metadata\n */\nexport abstract class EntityUtilities {\n /**\n * Gets the properties to omit when updating the entity\n * @returns The properties which should be left out for updating a new Entity\n */\n static getOmitForUpdate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[] {\n const res: (keyof EntityType)[] = [];\n for (const key of Reflect.ownKeys(entity)) {\n const metadata = Reflect.getMetadata('metadata', entity, key) as PropertyDecoratorConfig;\n if (metadata.omitForUpdate) {\n res.push(key as keyof EntityType);\n }\n }\n return res;\n }\n\n /**\n * Gets the properties to omit when creating new entities\n * @returns The properties which should be left out for creating a new Entity\n */\n static getOmitForCreate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[] {\n const res: (keyof EntityType)[] = [];\n for (const key of Reflect.ownKeys(entity)) {\n const metadata = Reflect.getMetadata('metadata', entity, key) as PropertyDecoratorConfig;\n if (metadata.omitForCreate) {\n res.push(key as keyof EntityType);\n }\n }\n return res;\n }\n\n /**\n * Gets the metadata included in an property\n * @param entity The entity with the property to get the metadata from\n * @param propertyKey The property on the given Entity to get the metadata from\n * @param type For secure Typing, defines the returned PropertyConfig\n * @returns The metadata of the property\n */\n static getPropertyMetadata<EntityType extends Entity, T extends DecoratorTypes>(\n entity: EntityType,\n propertyKey: keyof EntityType,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n type: T\n ): DecoratorType<T> {\n try {\n const metadata = Reflect.getMetadata('metadata', entity, propertyKey as string) as DecoratorType<T>;\n if (!metadata) {\n throw new Error(\n `Could not find metadata for property ${String(propertyKey)}\n on the entity ${JSON.stringify(entity)}`\n );\n }\n return metadata ;\n }\n catch (error) {\n throw new Error(\n `Could not find metadata for property ${String(propertyKey)}\n on the entity ${JSON.stringify(entity)}`\n );\n }\n }\n\n /**\n * Gets the type of the property-metadata.\n * @param entity The entity with the property to get the type from\n * @param propertyKey The property on the given Entity to get the type from\n * @returns The type of the metadata\n */\n static getPropertyType<EntityType extends Entity>(\n entity: EntityType, propertyKey: keyof EntityType\n ): DecoratorTypes {\n try {\n const propertyType = Reflect.getMetadata('type', entity, propertyKey as string) as DecoratorTypes;\n if (!propertyType) {\n throw new Error(\n `Could not find type metadata for property ${String(propertyKey)}\n on the entity ${JSON.stringify(entity)}`\n );\n }\n return propertyType;\n }\n catch (error) {\n throw new Error(\n `Could not find type metadata for property ${String(propertyKey)}\n on the entity ${JSON.stringify(entity)}`\n );\n }\n }\n\n /**\n * Sets all property values based on a given entity data-object.\n * @param entity The data object to get the property values from.\n * @param target\n * the target object that needs to be constructed\n * (if called inside a Entity constructor its usually this)\n * @alias new\n * @alias build\n * @alias construct\n */\n static new<EntityType extends Entity>(target: EntityType, entity?: EntityType): void {\n if (entity) {\n for (const key in entity) {\n Reflect.set(target, key, Reflect.get(entity, key));\n }\n }\n }\n // eslint-disable-next-line @typescript-eslint/member-ordering\n static construct = this.new;\n // eslint-disable-next-line @typescript-eslint/member-ordering\n static build = this.new;\n\n /**\n * Checks if the values on an entity are valid.\n * Also checks all the validators given by the metadata (\"required\", \"maxLength\" etc.)\n * @param entity The entity to validate.\n * @param omit Whether to check for creatiung or editing validity\n * @returns Whether or not the entity is valid.\n */\n static isEntityValid<EntityType extends Entity>(entity: EntityType, omit: 'create' | 'edit'): boolean {\n for (const key in entity) {\n if (!this.isPropertyValid(entity, key, omit)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if a single property value is valid\n * @param entity The entity where the property is from\n * @param key The name of the property\n * @returns Whether or not the property value is valid\n */\n private static isPropertyValid<EntityType extends Entity>(entity: EntityType, key: keyof EntityType, omit: 'create' | 'edit'): boolean {\n const type = this.getPropertyType(entity, key);\n const metadata: PropertyDecoratorConfig = this.getPropertyMetadata(entity, key, type);\n const metadataDefaultString = metadata as DefaultStringDecoratorConfig;\n const metadataTextboxString = metadata as TextboxStringDecoratorConfig;\n const metadataAutocompleteString = metadata as AutocompleteStringDecoratorConfig;\n const metadataDefaultNumber = metadata as DefaultNumberDecoratorConfig;\n const objectProperty = entity[key] as unknown as EntityType;\n const metadataEntityArray = metadata as EntityArrayDecoratorConfig<Entity>;\n const arrayItems = entity[key] as unknown as [];\n\n if (metadata.omitForCreate && omit === 'create') {\n return true;\n }\n if (metadata.omitForUpdate && omit === 'edit') {\n return true;\n }\n if (metadata.required && !entity[key]) {\n return false;\n }\n switch (type) {\n case DecoratorTypes.STRING:\n if (\n metadataDefaultString.maxLength\n && (entity[key] as unknown as string).length > metadataDefaultString.maxLength\n ) {\n return false;\n }\n if (\n metadataDefaultString.minLength\n && (entity[key] as unknown as string).length < metadataDefaultString.minLength\n ) {\n return false;\n }\n if (\n metadataDefaultString.regex\n && !(entity[key] as unknown as string).match(metadataDefaultString.regex)\n ) {\n return false;\n }\n break;\n case DecoratorTypes.STRING_AUTOCOMPLETE:\n if (\n metadataAutocompleteString.maxLength\n && (entity[key] as unknown as string).length > metadataAutocompleteString.maxLength\n ) {\n return false;\n }\n if (\n metadataAutocompleteString.minLength\n && (entity[key] as unknown as string).length < metadataAutocompleteString.minLength\n ) {\n return false;\n }\n if (\n metadataAutocompleteString.regex\n && (entity[key] as unknown as string).match(metadataAutocompleteString.regex)\n ) {\n return false;\n }\n break;\n case DecoratorTypes.STRING_TEXTBOX:\n if (\n metadataTextboxString.maxLength\n && (entity[key] as unknown as string).length > metadataTextboxString.maxLength\n ) {\n return false;\n }\n if (\n metadataTextboxString.minLength\n && (entity[key] as unknown as string).length < metadataTextboxString.minLength\n ) {\n return false;\n }\n break;\n case DecoratorTypes.NUMBER:\n if (metadataDefaultNumber.max && (entity[key] as unknown as number) > metadataDefaultNumber.max) {\n return false;\n }\n if (metadataDefaultNumber.min && (entity[key] as unknown as number) > metadataDefaultNumber.min) {\n return false;\n }\n break;\n case DecoratorTypes.OBJECT:\n for (const parameterKey in objectProperty) {\n if (!this.isPropertyValid(objectProperty, parameterKey, omit)) {\n return false;\n }\n }\n break;\n case DecoratorTypes.ARRAY_STRING_CHIPS:\n case DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS:\n case DecoratorTypes.ARRAY:\n if (metadataEntityArray.required && !arrayItems.length) {\n return false;\n }\n break;\n default:\n throw new Error(`Could not validate the input because the DecoratorType ${type} is not known`);\n }\n return true;\n }\n\n /**\n * Checks if an entity is \"dirty\" (if its values have changed)\n * @param entity The entity after all changes\n * @param entityPriorChanges The entity before the changes\n * @returns Whether or not the entity is dirty\n */\n static dirty(entity: Entity, entityPriorChanges: Entity): boolean {\n if (!entityPriorChanges) {\n return false;\n }\n else {\n const diff = this.difference(entity, entityPriorChanges);\n if (JSON.stringify(diff) === '{}') {\n return false;\n }\n else {\n return true;\n }\n }\n }\n\n /**\n * Compares two Entities and returns their difference in an object\n * @param entity The first entity to compare\n * @param entityPriorChanges The second entity to compare\n * @returns The difference between the two Entities in form of a Partial\n */\n static difference<EntityType extends Entity>(\n entity: EntityType,\n entityPriorChanges: EntityType\n ): Partial<EntityType> {\n const res: Partial<EntityType> = {};\n for (const key in entity) {\n if (!isEqual(entity[key], entityPriorChanges[key])) {\n res[key] = entity[key];\n }\n }\n return res;\n }\n\n /**\n * compare function for sorting entity keys by their order value\n * @param a first key of entity\n * @param b second key of entity\n * @param entity current entity (used to get metadata of entity keys)\n */\n static compareOrder<EntityType extends Entity>(a: keyof EntityType, b: keyof EntityType, entity: EntityType): number {\n const metadataA = EntityUtilities.getPropertyMetadata(entity, a, EntityUtilities.getPropertyType(entity, a));\n const metadataB = EntityUtilities.getPropertyMetadata(entity, b, EntityUtilities.getPropertyType(entity, b));\n\n if (metadataA.order === -1) {\n return 1;\n }\n else if (metadataB.order === -1) {\n return 0;\n }\n\n return ((metadataA.order as number) - (metadataB.order as number));\n }\n\n /**\n * gets the bootstrap column values for \"lg\", \"md\", \"sm\"\n * @param entity entity to get the bootstrap column values of the key\n * @param key key of the property to get bootstrap column values from\n * @param type defines for which screensize the column values should be returned\n * @returns bootstrap column value\n */\n static getWidth<EntityType extends Entity>(entity: EntityType, key: keyof EntityType, type: 'lg' | 'md' | 'sm'): number {\n const propertyType = EntityUtilities.getPropertyType(entity, key);\n const metadata = EntityUtilities.getPropertyMetadata(entity, key, propertyType);\n if (metadata.defaultWidths) {\n switch (type) {\n case 'lg':\n return metadata.defaultWidths[0];\n case 'md':\n return metadata.defaultWidths[1];\n case 'sm':\n return metadata.defaultWidths[2];\n default:\n throw new Error('Something went wrong getting the width');\n }\n }\n else {\n throw new Error('Something went wrong getting the width');\n }\n }\n\n /**\n * Resets all changes on an entity\n * @param entity The entity to reset\n * @param entityPriorChanges The entity before any changes\n */\n static resetChangesOnEntity<EntityType extends Entity>(entity: EntityType, entityPriorChanges: EntityType): void {\n for (const key in entityPriorChanges) {\n Reflect.set(entity, key, Reflect.get(entityPriorChanges, key));\n }\n }\n}","import { Entity } from './entity-model.class';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { isNil, omit, omitBy } from 'lodash';\nimport { EntityUtilities } from './entity-utilities.class';\n\n/**\n * A generic EntityService class.\n * Offers basic CRUD-functionality.\n * You should create a service for every Entity you have.\n * If you extend from this you need to make sure that the extended Service can be injected.\n */\nexport abstract class EntityService<EntityType extends Entity> {\n /**\n * The base url used for api requests. If u want to have more control over this,\n * you can override the create, read, update and delete methods.\n * @create Sends a POST-Request to baseUrl\n * @read Sends a GET-Request to baseUrl\n * @update Sends a PATCH-Request to baseUrl/{id}\n * @delete Sends a DEL-Request to baseUrl/{id}\n */\n abstract readonly baseUrl: string;\n\n /**\n * a subject of all the entity values.\n * Can be subscribed to when you want to do a specific thing whenever the entities change.\n */\n readonly entitiesSubject: BehaviorSubject<EntityType[]> = new BehaviorSubject<EntityType[]>([]);\n\n /**\n * gets the entities in an array from the internal entitiesSubject\n */\n get entities(): EntityType[] {\n return this.entitiesSubject.value;\n }\n\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Creates a new Entity and pushes it to the entities array\n * @param entity The data of the entity to create.\n * All values that should be omitted will be removed from it inside this method.\n * @returns A Promise of the created entity\n */\n async create(entity: EntityType): Promise<EntityType> {\n const body = omit(entity, EntityUtilities.getOmitForCreate(entity));\n const e = await firstValueFrom(this.http.post<EntityType>(this.baseUrl, body));\n this.entities.push(e);\n this.entitiesSubject.next(this.entities);\n return e;\n }\n\n /**\n * Gets all existing entities and pushes them to the entites array\n * @returns A Promise of all received Entities\n */\n async read(): Promise<EntityType[]> {\n const e = await firstValueFrom(this.http.get<EntityType[]>(this.baseUrl));\n this.entitiesSubject.next(e);\n return e;\n }\n\n /**\n * Updates a specific Entity\n * @param entity The updated Entity\n * All values that should be omitted will be removed from it inside this method.\n * @param entityPriorChanges The current Entity.\n * It Is used to get changed values and only update them instead of sending the whole entity data\n */\n async update(entity: EntityType, entityPriorChanges: EntityType): Promise<void> {\n const reqBody = omit(\n EntityUtilities.difference(entity, entityPriorChanges),\n EntityUtilities.getOmitForUpdate(entity)\n );\n const updatedEntity = await firstValueFrom(\n this.http.patch<EntityType>(\n `${this.baseUrl}/${entityPriorChanges.id}`,\n omitBy(reqBody, isNil)\n )\n );\n this.entities[this.entities.findIndex((e) => e.id === entityPriorChanges.id)] = updatedEntity;\n this.entitiesSubject.next(this.entities);\n }\n\n /**\n * Method to delete a specific Entity\n * @param id The id of the element to delete\n */\n async delete(id: string): Promise<void> {\n await firstValueFrom(this.http.delete<void>(`${this.baseUrl}/${id}`));\n this.entities.splice(\n this.entities.findIndex((e) => e.id === id), 1\n );\n this.entitiesSubject.next(this.entities);\n }\n}","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { ConfirmDialogData } from './confirm-dialog-data';\n\n@Component({\n selector: 'ngx-mat-entity-confirm-dialog',\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss']\n})\nexport class NgxMatEntityConfirmDialogComponent implements OnInit {\n /**\n * Used for the checkbox to confirm the action\n */\n confirm = false;\n\n constructor(\n private readonly dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA)\n readonly data: ConfirmDialogData\n ) {}\n\n ngOnInit(): void {\n if (this.data.requireConfirmation && !this.data.confirmationText) {\n throw new Error(`\n Missing required Input \"confirmationText\".\n You can only omit this if you dont have \"requireConfirmation\" set`\n );\n }\n if (!this.data.requireConfirmation && this.data.confirmationText) {\n throw new Error(\n 'The \"confirmationText\" will never be shown because \"requireConfirmation\" is not set to true'\n );\n }\n if (this.data.requireConfirmation !== true && this.data.requireConfirmation !== false) {\n this.data.requireConfirmation = false;\n }\n if (this.data.type === 'info-only' && this.data.cancelButtonLabel) {\n throw new Error('The \"cancelButtonLabel\" will never be shown because \"type\" is set to \"info-only\"');\n }\n this.dialogRef.disableClose = true;\n }\n\n confirmAction(): void {\n this.dialogRef.close(1);\n }\n\n cancel(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title *ngIf=\"data.title\">{{data.title}}</h2>\n\n<mat-dialog-content>\n <p *ngFor=\"let paragraph of data.text\">{{paragraph}}</p>\n <div *ngIf=\"data.requireConfirmation\" class=\"checkbox-wrapper\">\n <mat-checkbox [(ngModel)]=\"confirm\" name=\"confirm\">\n {{data.confirmationText}}\n </mat-checkbox>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button *ngIf=\"data.type === 'delete'\" mat-raised-button color=\"warn\" (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel ? data.confirmButtonLabel : 'Delete'}}\n </button>\n <button *ngIf=\"data.type !== 'delete'\" mat-raised-button (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel ? data.confirmButtonLabel : data.type === 'info-only' ? 'Ok' : 'Confirm'}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.cancelButtonLabel ? data.cancelButtonLabel : 'Cancel'}}\n </button>\n</mat-dialog-actions>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { NgxMatEntityConfirmDialogComponent } from './confirm-dialog.component';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n declarations: [NgxMatEntityConfirmDialogComponent],\n imports: [CommonModule, MatDialogModule, FormsModule, MatCheckboxModule, MatButtonModule],\n exports: [NgxMatEntityConfirmDialogComponent]\n})\nexport class NgxMatEntityConfirmDialogModule {}","import { NgModel } from '@angular/forms';\n\n/**\n * Generates a default error message for most validation errors.\n * @param model The ngModel to get the error from\n * @returns The Validation Error Message to display\n */\nexport function getValidationErrorMessage(model: NgModel): string {\n if (model.hasError('matDatepickerParse')) {\n return 'not a valid date';\n }\n else if (model.hasError('email')) {\n return 'not a valid email';\n }\n else if (model.hasError('minlength')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be at least ${model.getError('minlength').requiredLength} characters long`;\n }\n else if (model.hasError('min')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be equal or bigger than ${model.getError('min').min}`;\n }\n else if (model.hasError('max')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be equal or smaller than ${model.getError('max').max}`;\n }\n else if (model.hasError('required')) {\n return 'required';\n }\n else {\n return 'invalid input';\n }\n}","import { Component, Input, OnInit } from '@angular/core';\nimport { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';\nimport { PropertyDecoratorConfig } from '../../../decorators/base/property-decorator-config.interface';\nimport { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig } from '../../../decorators/number.decorator';\nimport { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, TextboxStringDecoratorConfig } from '../../../decorators/string.decorator';\nimport { DropdownBooleanDecoratorConfig } from '../../../decorators/boolean.decorator';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { DefaultObjectDecoratorConfig } from '../../../decorators/object.decorator';\nimport { EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { NgModel } from '@angular/forms';\n\n@Component({\n selector: 'ngx-mat-entity-internal-input',\n templateUrl: './internal-input.component.html',\n styleUrls: ['./internal-input.component.scss']\n})\nexport class NgxMatEntityInternalInputComponent<EntityType extends Entity> implements OnInit {\n /**\n * The entity on which the property exists. Used in conjuction with the \"propertyKey\"\n * to determine the property for which the input should be generated.\n */\n @Input()\n entity!: EntityType;\n\n /**\n * The name of the property to generate the input for. Used in conjuction with the \"entity\".\n */\n @Input()\n propertyKey!: keyof EntityType;\n\n /**\n * Whether to hide a value if it is omitted for creation.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForCreate?: boolean;\n\n /**\n * Whether to hide a value if it is omitted for editing.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForEdit?: boolean;\n\n /**\n * (optional) A custom function to generate the error-message for invalid inputs.\n */\n @Input()\n getValidationErrorMessage!: (model: NgModel) => string;\n\n type!: DecoratorTypes;\n\n metadata!: PropertyDecoratorConfig;\n\n metadataDefaultString!: DefaultStringDecoratorConfig;\n metadataTextboxString!: TextboxStringDecoratorConfig;\n metadataAutocompleteString!: AutocompleteStringDecoratorConfig;\n metadataDropdownString!: DropdownStringDecoratorConfig;\n\n metadataDropdownBoolean!: DropdownBooleanDecoratorConfig;\n\n metadataDefaultNumber!: DefaultNumberDecoratorConfig;\n metadataDropdownNumber!: DropdownNumberDecoratorConfig;\n\n metadataDefaultObject!: DefaultObjectDecoratorConfig;\n objectProperty!: Entity;\n\n readonly DecoratorTypes = DecoratorTypes;\n\n getWidth = EntityUtilities.getWidth;\n\n /**\n * Helper method needed to recursively generate property input components (used eg. with the object)\n */\n trackByFn(index: unknown): unknown {\n return index;\n }\n\n ngOnInit(): void {\n if (!this.entity) {\n throw new Error('Missing required Input data \"entity\"');\n }\n if (!this.propertyKey) {\n throw new Error('Missing required Input data \"propertyKey\"');\n }\n this.type = EntityUtilities.getPropertyType(this.entity, this.propertyKey);\n this.metadata = EntityUtilities.getPropertyMetadata(this.entity, this.propertyKey, this.type);\n\n this.metadataDefaultString = this.metadata as DefaultStringDecoratorConfig;\n this.metadataTextboxString = this.metadata as TextboxStringDecoratorConfig;\n this.metadataAutocompleteString = this.metadata as AutocompleteStringDecoratorConfig;\n this.metadataDropdownString = this.metadata as DropdownStringDecoratorConfig;\n\n this.metadataDropdownBoolean = this.metadata as DropdownBooleanDecoratorConfig;\n\n this.metadataDefaultNumber = this.metadata as DefaultNumberDecoratorConfig;\n this.metadataDropdownNumber = this.metadata as DropdownNumberDecoratorConfig;\n\n this.metadataDefaultObject = this.metadata as DefaultObjectDecoratorConfig;\n this.objectProperty = this.entity[this.propertyKey] as unknown as Entity;\n }\n\n getObjectProperties(): (keyof Entity)[] {\n const res: (keyof Entity)[] = [];\n for (const property in this.objectProperty) {\n const metadata = EntityUtilities.getPropertyMetadata(\n this.objectProperty,\n property as keyof Entity,\n EntityUtilities.getPropertyType(this.objectProperty, property as keyof Entity)\n );\n if (\n !(this.hideOmitForCreate && metadata.omitForCreate)\n && !(this.hideOmitForEdit && metadata.omitForUpdate)\n ) {\n res.push(property as keyof Entity);\n }\n }\n return res.sort((a, b) => EntityUtilities.compareOrder(a, b, this.objectProperty));\n }\n}","<div [ngSwitch]=\"type\" *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [pattern]=\"metadataDefaultString.regex ? metadataDefaultString.regex : '[\\\\s\\\\S]*'\"\n [minlength]=\"metadataDefaultString.minLength ? metadataDefaultString.minLength : null\"\n [maxlength]=\"metadataDefaultString.maxLength ? metadataDefaultString.maxLength : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <textarea\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"10\"\n [minlength]=\"metadataTextboxString.minLength ? metadataTextboxString.minLength : null\"\n [maxlength]=\"metadataTextboxString.maxLength ? metadataTextboxString.maxLength : null\"\n >\n </textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [matAutocomplete]=\"auto\"\n [minlength]=\"metadataAutocompleteString.minLength ? metadataAutocompleteString.minLength : null\"\n [maxlength]=\"metadataAutocompleteString.maxLength ? metadataAutocompleteString.maxLength : null\"\n [pattern]=\"metadataAutocompleteString.regex ? metadataAutocompleteString.regex : '[\\\\s\\\\S]*'\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of metadataAutocompleteString.autocompleteValues\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\">\n <mat-option *ngFor=\"let value of metadataDropdownString.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <mat-form-field>\n <mat-checkbox [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\">\n {{metadata.displayName}}\n </mat-checkbox>\n <!-- hidden input is needed so that the checkbox can be used inside a mat-form-field -->\n <textarea matInput hidden></textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <mat-form-field>\n <mat-slide-toggle [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\">\n {{metadata.displayName}}\n </mat-slide-toggle>\n <!-- hidden input is needed so that the toggle can be used inside a mat-form-field -->\n <textarea matInput hidden></textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\">\n <mat-option [value]=\"undefined\">-</mat-option>\n <mat-option [value]=\"true\">{{metadataDropdownBoolean.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\">{{metadataDropdownBoolean.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n type=\"number\"\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [min]=\"metadataDefaultNumber.min ? metadataDefaultNumber.min : null\"\n [max]=\"metadataDefaultNumber.max ? metadataDefaultNumber.max : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\">\n <mat-option *ngFor=\"let value of metadataDropdownNumber.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <div class=\"row\">\n <!--\n displays another ngx-material-entity with the:\n object as the entity,\n the current key in the loop received by the keyvalue direction as the propertyKey\n and the getValidationErrorMessage of the current component\n -->\n <ngx-mat-entity-internal-input\n *ngFor=\"let key of getObjectProperties(); let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n class=\"col-lg-{{getWidth(objectProperty, key, 'lg')}} col-md-{{getWidth(objectProperty, key, 'md')}} col-sm-{{getWidth(objectProperty, key, 'sm')}}\"\n >\n </ngx-mat-entity-internal-input>\n </div>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}}is not known.</div>\n</div>","import { Component, Inject, OnInit } from '@angular/core';\nimport { NgModel } from '@angular/forms';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { Entity } from '../../../../classes/entity-model.class';\nimport { EntityUtilities } from '../../../../classes/entity-utilities.class';\nimport { CreateDialogData } from '../../../table/table-data';\n\nexport interface AddArrayItemDialogData<EntityType extends Entity> {\n /**\n * An empty entity that is used as the data model.\n */\n entity: EntityType,\n /**\n * The info of the generic create-dialog.\n */\n createDialogData: CreateDialogData,\n /**\n * (optional) A custom function to generate the error-message for invalid inputs.\n */\n getValidationErrorMessage: (model: NgModel) => string\n}\n\n@Component({\n selector: 'ngx-mat-entity-add-array-item-dialog',\n templateUrl: './add-array-item-dialog.component.html',\n styleUrls: ['./add-array-item-dialog.component.scss']\n})\nexport class NgxMatEntityAddArrayItemDialogComponent<EntityType extends Entity> implements OnInit {\n EntityUtilities = EntityUtilities;\n\n entityKeys!: (keyof EntityType)[];\n\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n @Inject(MAT_DIALOG_DATA)\n public data: AddArrayItemDialogData<EntityType>,\n public dialogRef: MatDialogRef<NgxMatEntityAddArrayItemDialogComponent<EntityType>>\n ) { }\n\n ngOnInit(): void {\n this.dialogRef.disableClose = true;\n this.setEntityKeys();\n }\n\n private setEntityKeys(): void {\n this.entityKeys = Reflect.ownKeys(this.data.entity) as (keyof EntityType)[];\n const omitCreateKeys = EntityUtilities.getOmitForCreate(this.data.entity);\n this.entityKeys = this.entityKeys.filter((k) => !omitCreateKeys.includes(k))\n .sort((a, b) => EntityUtilities.compareOrder(a, b, this.data.entity));\n }\n\n create(): void {\n this.dialogRef.close(1);\n }\n\n cancel(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title>{{data.createDialogData.title}}</h2>\n\n<mat-dialog-content>\n <form #form=\"ngForm\" class=\"row\">\n <ngx-mat-entity-internal-input\n *ngFor=\"let key of entityKeys\"\n [entity]=\"data.entity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"data.getValidationErrorMessage\"\n class=\"col-lg-{{getWidth(data.entity, key, 'lg')}} col-md-{{getWidth(data.entity, key, 'md')}} col-sm-{{getWidth(data.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-internal-input>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-raised-button (click)=\"create()\" [disabled]=\"!EntityUtilities.isEntityValid(data.entity, 'create')\">\n {{data.createDialogData.createButtonLabel ? data.createDialogData.createButtonLabel : 'Add'}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.createDialogData.cancelButtonLabel ? data.createDialogData.cancelButtonLabel : 'Cancel'}}\n </button>\n</mat-dialog-actions>\n","import { SelectionModel } from '@angular/cdk/collections';\nimport { Component, Input, OnInit } from '@angular/core';\nimport { EntityArrayDecoratorConfig } from '../../../decorators/array.decorator';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { NgModel } from '@angular/forms';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { MatDialog } from '@angular/material/dialog';\nimport { cloneDeep } from 'lodash';\nimport { firstValueFrom } from 'rxjs';\nimport { AddArrayItemDialogData, NgxMatEntityAddArrayItemDialogComponent } from './add-array-item-dialog/add-array-item-dialog.component';\nimport { CreateDialogData } from '../../table/table-data';\n\n@Component({\n selector: 'ngx-mat-entity-array-table',\n templateUrl: './array-table.component.html',\n styleUrls: ['./array-table.component.scss']\n})\nexport class NgxMatEntityArrayTableComponent<EntityType extends Entity> implements OnInit {\n @Input()\n arrayItems!: EntityType[];\n\n @Input()\n metadata!: EntityArrayDecoratorConfig<EntityType>;\n\n @Input()\n getValidationErrorMessage!: (model: NgModel) => string;\n\n @Input()\n omit!: 'create' | 'edit';\n\n dataSource!: MatTableDataSource<EntityType>;\n\n selection: SelectionModel<EntityType> = new SelectionModel<EntityType>(true, []);\n\n displayedColumns!: string[];\n\n arrayItem!: EntityType;\n\n private arrayItemPriorChanges!: EntityType;\n\n getWidth = EntityUtilities.getWidth;\n\n EntityUtilities = EntityUtilities;\n\n constructor(private readonly dialog: MatDialog) {}\n\n trackByFn(index: unknown): unknown {\n return index;\n }\n\n ngOnInit(): void {\n this.validateInput();\n const givenDisplayColumns = this.metadata.displayColumns.map((v) => v.displayName);\n if (givenDisplayColumns.find((s) => s === 'select')) {\n throw new Error(\n `The name \"select\" for a display column is reserved.\n Please choose a different name.`\n );\n }\n this.displayedColumns = ['select'].concat(givenDisplayColumns);\n this.dataSource = new MatTableDataSource();\n this.dataSource.data = this.arrayItems;\n this.arrayItem = new this.metadata.EntityClass();\n this.arrayItemPriorChanges = cloneDeep(this.arrayItem);\n }\n private validateInput(): void {\n if (!this.metadata.createInline && !this.metadata.createDialogData) {\n throw new Error(\n `Missing required Input data \"createDialogData\".\n You can only omit this value when the creation is inline.`\n );\n }\n }\n\n add(): void {\n if (this.metadata.createInline) {\n this.arrayItems.push(cloneDeep(this.arrayItem));\n this.dataSource.data = this.arrayItems;\n EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);\n }\n else {\n const dialogData: AddArrayItemDialogData<EntityType> = {\n entity: this.arrayItem,\n createDialogData: this.metadata.createDialogData as CreateDialogData,\n getValidationErrorMessage: this.getValidationErrorMessage\n }\n firstValueFrom(\n this.dialog.open(\n NgxMatEntityAddArrayItemDialogComponent,\n {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n }\n ).afterClosed()\n ).then((res: number) => {\n if (res === 1) {\n this.arrayItems.push(cloneDeep(this.arrayItem));\n this.dataSource.data = this.arrayItems;\n }\n EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);\n });\n }\n }\n remove(): void {\n this.selection.selected.forEach(s => {\n this.arrayItems.splice(this.arrayItems.indexOf(s), 1);\n });\n this.dataSource.data = this.arrayItems;\n this.selection.clear();\n }\n\n getObjectProperties(): (keyof EntityType)[] {\n const res: (keyof EntityType)[] = [];\n for (const property in this.arrayItem) {\n const metadata = EntityUtilities.getPropertyMetadata(\n this.arrayItem,\n property as keyof Entity,\n EntityUtilities.getPropertyType(this.arrayItem, property as keyof Entity)\n );\n if (!(metadata.omitForCreate)) {\n res.push(property as keyof Entity);\n }\n }\n return res.sort((a, b) => EntityUtilities.compareOrder(a, b, this.arrayItem));\n }\n\n masterToggle(): void {\n if (this.isAllSelected()) {\n this.selection.clear();\n }\n else {\n this.dataSource.data.forEach((row) => this.selection.select(row));\n }\n }\n\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n}","<div class=\"mat-elevation-z8\" style=\"border-radius: 5px;padding: 15px;margin-bottom: 15px;margin-top: 15px;\">\n\n <div style=\"padding-bottom: 10px\">\n <b>{{metadata.displayName}}</b>\n </div>\n <div class=\"row\" *ngIf=\"metadata.createInline\">\n <ngx-mat-entity-internal-input\n *ngFor=\"let key of getObjectProperties(); let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n class=\"col-lg-{{getWidth(arrayItem, key, 'lg')}} col-md-{{getWidth(arrayItem, key, 'md')}} col-sm-{{getWidth(arrayItem, key, 'sm')}}\"\n >\n </ngx-mat-entity-internal-input>\n </div>\n <div class=\"buttons\">\n <button mat-raised-button\n [disabled]=\"metadata.createInline && !EntityUtilities.isEntityValid(arrayItem, 'create')\"\n (click)=\"add()\">\n Add\n </button>\n <button mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n Remove\n </button>\n </div>\n\n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let module\" class=\"module\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(module) : null\" [checked]=\"selection.isSelected(module)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadata.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell class=\"entity\" *matCellDef=\"let entity\">\n {{dCol.value(entity)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <div class=\"array-error\" *ngIf=\"metadata.required && !dataSource.data.length\">\n {{metadata.missingErrorMessage ? metadata.missingErrorMessage : 'Needs to have at least one value'}}\n </div>\n</div>","import { Component, Input, OnInit } from '@angular/core';\nimport { NgModel } from '@angular/forms';\nimport { EntityUtilities } from '../../classes/entity-utilities.class';\nimport { Entity } from '../../classes/entity-model.class';\nimport { DecoratorTypes } from '../../decorators/base/decorator-types.enum';\nimport { PropertyDecoratorConfig } from '../../decorators/base/property-decorator-config.interface';\nimport { getValidationErrorMessage } from '../get-validation-error-message.function';\nimport { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, TextboxStringDecoratorConfig } from '../../decorators/string.decorator';\nimport { DropdownBooleanDecoratorConfig } from '../../decorators/boolean.decorator';\nimport { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig } from '../../decorators/number.decorator';\nimport { DefaultObjectDecoratorConfig } from '../../decorators/object.decorator';\nimport { AutocompleteStringChipsArrayDecoratorConfig, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from '../../decorators/array.decorator';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { cloneDeep } from 'lodash';\n\n@Component({\n selector: 'ngx-mat-entity-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss']\n})\nexport class NgxMatEntityInputComponent<EntityType extends Entity> implements OnInit {\n /**\n * The entity on which the property exists. Used in conjuction with the \"propertyKey\"\n * to determine the property for which the input should be generated.\n */\n @Input()\n entity!: EntityType;\n\n /**\n * The name of the property to generate the input for. Used in conjuction with the \"entity\".\n */\n @Input()\n propertyKey!: keyof EntityType;\n\n /**\n * (optional) A custom function to generate the error-message for invalid inputs.\n */\n @Input()\n getValidationErrorMessage!: (model: NgModel) => string;\n\n /**\n * Whether to hide a value if it is omitted for creation.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForCreate?: boolean;\n\n /**\n * Whether to hide a value if it is omitted for editing.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForEdit?: boolean;\n\n type!: DecoratorTypes;\n\n metadata!: PropertyDecoratorConfig;\n\n metadataDefaultString!: DefaultStringDecoratorConfig;\n metadataTextboxString!: TextboxStringDecoratorConfig;\n metadataAutocompleteString!: AutocompleteStringDecoratorConfig;\n autocompleteStrings!: string[];\n filteredAutocompleteStrings!: string[];\n metadataDropdownString!: DropdownStringDecoratorConfig;\n\n metadataDropdownBoolean!: DropdownBooleanDecoratorConfig;\n\n metadataDefaultNumber!: DefaultNumberDecoratorConfig;\n metadataDropdownNumber!: DropdownNumberDecoratorConfig;\n\n metadataDefaultObject!: DefaultObjectDecoratorConfig;\n objectProperty!: Entity;\n\n metadataEntityArray!: EntityArrayDecoratorConfig<Entity>;\n entityArrayValues!: Entity[];\n metadataStringChipsArray!: StringChipsArrayDecoratorConfig;\n stringChipsArrayValues!: string[];\n chipsInput: string = '';\n\n metadataAutocompleteStringChipsArray!: AutocompleteStringChipsArrayDecoratorConfig;\n\n readonly DecoratorTypes = DecoratorTypes;\n\n getWidth = EntityUtilities.getWidth;\n\n constructor() {}\n\n /**\n * Helper method needed to recursively generate property input components (used eg. with the object)\n */\n trackByFn(index: unknown): unknown {\n return index;\n }\n\n ngOnInit(): void {\n if (!this.entity) {\n throw new Error('Missing required Input data \"entity\"');\n }\n if (!this.propertyKey) {\n throw new Error('Missing required Input data \"propertyKey\"');\n }\n this.type = EntityUtilities.getPropertyType(this.entity, this.propertyKey);\n this.metadata = EntityUtilities.getPropertyMetadata(this.entity, this.propertyKey, this.type);\n\n this.metadataDefaultString = this.metadata as DefaultStringDecoratorConfig;\n this.metadataTextboxString = this.metadata as TextboxStringDecoratorConfig;\n\n this.metadataAutocompleteString = this.metadata as AutocompleteStringDecoratorConfig;\n this.autocompleteStrings = this.metadataAutocompleteString.autocompleteValues;\n this.filteredAutocompleteStrings = cloneDeep(this.autocompleteStrings);\n\n this.metadataDropdownString = this.metadata as DropdownStringDecoratorConfig;\n\n this.metadataDropdownBoolean = this.metadata as DropdownBooleanDecoratorConfig;\n\n this.metadataDefaultNumber = this.metadata as DefaultNumberDecoratorConfig;\n this.metadataDropdownNumber = this.metadata as DropdownNumberDecoratorConfig;\n\n this.metadataDefaultObject = this.metadata as DefaultObjectDecoratorConfig;\n this.objectProperty = this.entity[this.propertyKey] as unknown as Entity;\n\n this.metadataEntityArray = this.metadata as EntityArrayDecoratorConfig<Entity>;\n if (this.metadataEntityArray.EntityClass) {\n if (!this.entity[this.propertyKey]) {\n (this.entity[this.propertyKey] as unknown as Entity[]) = [];\n }\n this.entityArrayValues = this.entity[this.propertyKey] as unknown as Entity[];\n if (this.metadataEntityArray.createInline === undefined) {\n this.metadataEntityArray.createInline = true;\n }\n if (!this.metadataEntityArray.createInline && !this.metadataEntityArray.createDialogData) {\n this.metadataEntityArray.createDialogData = {\n title: 'Add'\n }\n }\n }\n\n this.metadataStringChipsArray = this.metadata as StringChipsArrayDecoratorConfig;\n if (\n this.metadataStringChipsArray.itemType\n && (this.entity[this.propertyKey] as unknown as string[])?.length\n ) {\n this.stringChipsArrayValues = (this.entity[this.propertyKey] as unknown as string[]);\n }\n\n this.metadataAutocompleteStringChipsArray = this.metadata as AutocompleteStringChipsArrayDecoratorConfig;\n\n if (!this.getValidationErrorMessage) {\n this.getValidationErrorMessage = getValidationErrorMessage;\n }\n }\n\n getObjectProperties(): (keyof Entity)[] {\n const res: (keyof Entity)[] = [];\n for (const property in this.objectProperty) {\n const metadata = EntityUtilities.getPropertyMetadata(\n this.objectProperty,\n property as keyof Entity,\n EntityUtilities.getPropertyType(this.objectProperty, property as keyof Entity)\n );\n if (\n !(this.hideOmitForCreate && metadata.omitForCreate)\n && !(this.hideOmitForEdit && metadata.omitForUpdate)\n ) {\n res.push(property as keyof Entity);\n }\n }\n return res.sort((a, b) => EntityUtilities.compareOrder(a, b, this.objectProperty));\n }\n\n addStringChipArrayValue(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n if (value) {\n if (this.metadataStringChipsArray.minLength && value.length < this.metadataStringChipsArray.minLength) {\n return;\n }\n if (this.metadataStringChipsArray.maxLength && value.length > this.metadataStringChipsArray.maxLength) {\n return;\n }\n if (this.metadataStringChipsArray.regex && !value.match(this.metadataStringChipsArray.regex)) {\n return;\n }\n if (!this.stringChipsArrayValues) {\n if (!this.entity[this.propertyKey] as unknown as string[]) {\n (this.entity[this.propertyKey] as unknown as string[]) = [];\n }\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n this.stringChipsArrayValues.push(value);\n }\n event.chipInput!.clear();\n }\n\n removeStringChipArrayValue(value: string): void {\n this.stringChipsArrayValues.splice(this.stringChipsArrayValues.indexOf(value), 1);\n if (!this.stringChipsArrayValues.length) {\n (this.entity[this.propertyKey] as unknown) = undefined;\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n }\n\n selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void {\n const value = (event.option.viewValue || '').trim();\n if (this.metadataStringChipsArray.minLength && value.length < this.metadataStringChipsArray.minLength) {\n return;\n }\n if (this.metadataStringChipsArray.maxLength && value.length > this.metadataStringChipsArray.maxLength) {\n return;\n }\n if (this.metadataStringChipsArray.regex && !value.match(this.metadataStringChipsArray.regex)) {\n return;\n }\n if (!this.stringChipsArrayValues) {\n if (!this.entity[this.propertyKey] as unknown as string[]) {\n (this.entity[this.propertyKey] as unknown as string[]) = [];\n }\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n this.stringChipsArrayValues.push(value);\n chipsInput.value = '';\n }\n\n filterAutocompleteStrings(input: unknown): void {\n const filterValue = (input as string).toLowerCase();\n this.filteredAutocompleteStrings = this.autocompleteStrings.filter(s => s.toLowerCase().includes(filterValue));\n }\n}","<div [ngSwitch]=\"type\" *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required ? metadata.required : false\"\n [pattern]=\"metadataDefaultString.regex ? metadataDefaultString.regex : '[\\\\s\\\\S]*'\"\n [minlength]=\"metadataDefaultString.minLength ? metadataDefaultString.minLength : null\"\n [maxlength]=\"metadataDefaultString.maxLength ? metadataDefaultString.maxLength : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <textarea\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"10\"\n [required]=\"metadata.required ? metadata.required : false\"\n [minlength]=\"metadataTextboxString.minLength ? metadataTextboxString.minLength : null\"\n [maxlength]=\"metadataTextboxString.maxLength ? metadataTextboxString.maxLength : null\"\n >\n </textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [matAutocomplete]=\"auto\"\n (keyup)=\"filterAutocompleteStrings(entity[propertyKey])\"\n [required]=\"metadata.required ? metadata.required : false\"\n [minlength]=\"metadataAutocompleteString.minLength ? metadataAutocompleteString.minLength : null\"\n [maxlength]=\"metadataAutocompleteString.maxLength ? metadataAutocompleteString.maxLength : null\"\n [pattern]=\"metadataAutocompleteString.regex ? metadataAutocompleteString.regex : '[\\\\s\\\\S]*'\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required ? metadata.required : false\">\n <mat-option *ngFor=\"let value of metadataDropdownString.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <mat-form-field>\n <mat-checkbox [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required ? metadata.required : false\">\n {{metadata.displayName}}\n </mat-checkbox>\n <!-- hidden input is needed so that the checkbox can be used inside a mat-form-field -->\n <textarea matInput hidden></textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <mat-form-field>\n <mat-slide-toggle [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required ? metadata.required : false\">\n {{metadata.displayName}}\n </mat-slide-toggle>\n <!-- hidden input is needed so that the toggle can be used inside a mat-form-field -->\n <textarea matInput hidden></textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required ? metadata.required : false\">\n <mat-option [value]=\"undefined\">-</mat-option>\n <mat-option [value]=\"true\">{{metadataDropdownBoolean.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\">{{metadataDropdownBoolean.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n type=\"number\"\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required ? metadata.required : false\"\n [min]=\"metadataDefaultNumber.min ? metadataDefaultNumber.min : null\"\n [max]=\"metadataDefaultNumber.max ? metadataDefaultNumber.max : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required ? metadata.required : false\">\n <mat-option *ngFor=\"let value of metadataDropdownNumber.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n <div class=\"row\">\n <!--\n displays another ngx-material-entity with the:\n object as the entity,\n the current key in the loop received by the keyvalue direction as the propertyKey\n and the getValidationErrorMessage of the current component\n -->\n <ngx-mat-entity-input\n *ngFor=\"let key of getObjectProperties(); let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n class=\"col-lg-{{getWidth(objectProperty, key, 'lg')}} col-md-{{getWidth(objectProperty, key, 'md')}} col-sm-{{getWidth(objectProperty, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY\">\n <ngx-mat-entity-array-table\n [arrayItems]=\"entityArrayValues\"\n [metadata]=\"metadataEntityArray\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [omit]=\"hideOmitForCreate ? 'create' : 'edit'\"\n >\n </ngx-mat-entity-array-table>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-list #chipList\n [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\"\n [required]=\"metadata.required ? metadata.required : false\"\n >\n <mat-chip *ngFor=\"let value of stringChipsArrayValues\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button matChipRemove *ngIf=\"metadataStringChipsArray.deleteHtml\" [innerHtml]=\"metadataStringChipsArray.deleteHtml\">\n </button>\n <button matChipRemove *ngIf=\"!metadataStringChipsArray.deleteHtml\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n <input matInput\n [matChipInputFor]=\"chipList\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event)\"\n [(ngModel)]=\"chipsInput\" [name]=\"propertyKey.toString()\" #chipsModel=\"ngModel\"\n [minlength]='metadataStringChipsArray.minLength ? metadataStringChipsArray.minLength : null'\n [maxlength]='metadataStringChipsArray.maxLength ? metadataStringChipsArray.maxLength : null'\n [pattern]=\"metadataStringChipsArray.regex ? metadataStringChipsArray.regex : '[\\\\s\\\\S]*'\"\n >\n <mat-error *ngIf=\"chipsModel.errors\">{{getValidationErrorMessage(chipsModel)}}</mat-error>\n </mat-chip-list>\n <mat-error *ngIf=\"!chipsModel.errors\">{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-list #chipList\n [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\"\n [required]=\"metadata.required ? metadata.required : false\"\n >\n <mat-chip *ngFor=\"let value of stringChipsArrayValues\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button matChipRemove *ngIf=\"metadataStringChipsArray.deleteHtml\" [innerHtml]=\"metadataStringChipsArray.deleteHtml\">\n </button>\n <button matChipRemove *ngIf=\"!metadataStringChipsArray.deleteHtml\">\n <mat-icon>cancel</mat-icon>\n </button>\n </mat-chip>\n <input matInput\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event)\"\n (keyup)=\"filterAutocompleteStrings(chipsInput)\"\n [(ngModel)]=\"chipsInput\" [name]=\"propertyKey.toString()\" #chipsModel=\"ngModel\"\n #chipsElement\n [minlength]='metadataStringChipsArray.minLength ? metadataStringChipsArray.minLength : null'\n [maxlength]='metadataStringChipsArray.maxLength ? metadataStringChipsArray.maxLength : null'\n [pattern]=\"metadataStringChipsArray.regex ? metadataStringChipsArray.regex : '[\\\\s\\\\S]*'\"\n >\n <mat-error *ngIf=\"chipsModel.errors\">{{getValidationErrorMessage(chipsModel)}}</mat-error>\n </mat-chip-list>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event, chipsElement)\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf=\"!chipsModel.errors\">{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}}is not known.</div>\n</div>","import { Component, Inject, Injector, OnInit } from '@angular/core';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { CreateEntityDialogData } from './create-entity-dialog-data';\nimport { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';\nimport { NgxMatEntityConfirmDialogComponent } from '../../confirm-dialog/confirm-dialog.component';\n\n@Component({\n selector: 'ngx-mat-entity-create-dialog',\n templateUrl: './create-entity-dialog.component.html',\n styleUrls: ['./create-entity-dialog.component.scss']\n})\nexport class NgxMatEntityCreateDialogComponent<EntityType extends Entity> implements OnInit {\n EntityUtilities = EntityUtilities;\n\n entityKeys!: (keyof EntityType)[];\n\n entityService!: EntityService<EntityType>;\n\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n @Inject(MAT_DIALOG_DATA)\n public data: CreateEntityDialogData<EntityType>,\n public dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>,\n private readonly injector: Injector,\n private readonly dialog: MatDialog\n ) { }\n\n ngOnInit(): void {\n this.dialogRef.disableClose = true;\n this.setEntityKeys();\n this.entityService = this.injector.get(this.data.EntityServiceClass) as EntityService<EntityType>;\n }\n\n private setEntityKeys(): void {\n this.entityKeys = Reflect.ownKeys(this.data.entity) as (keyof EntityType)[];\n const omitCreateKeys = EntityUtilities.getOmitForCreate(this.data.entity);\n this.entityKeys = this.entityKeys.filter((k) => !omitCreateKeys.includes(k))\n .sort((a, b) => EntityUtilities.compareOrder(a, b, this.data.entity));\n }\n\n create(): void {\n if (this.data.createDialogData.createRequiresConfirmDialog === false) {\n return this.confirmCreate();\n }\n const dialogData: ConfirmDialogData = {\n // eslint-disable-next-line max-len\n text: this.data.createDialogData.confirmCreateDialogData?.text ? this.data.createDialogData.confirmCreateDialogData?.text : ['Do you really want to create this entity?'],\n type: 'default',\n // eslint-disable-next-line max-len\n confirmButtonLabel: this.data.createDialogData.confirmCreateDialogData?.confirmButtonLabel ? this.data.createDialogData.confirmCreateDialogData?.confirmButtonLabel : 'Create',\n // eslint-disable-next-line max-len\n cancelButtonLabel: this.data.createDialogData.confirmCreateDialogData?.cancelButtonLabel ? this.data.createDialogData.confirmCreateDialogData?.cancelButtonLabel : 'Cancel',\n // eslint-disable-next-line max-len\n title: this.data.createDialogData.confirmCreateDialogData?.title ? this.data.createDialogData.confirmCreateDialogData?.title : 'Create',\n // eslint-disable-next-line max-len\n requireConfirmation: this.data.createDialogData.confirmCreateDialogData?.requireConfirmation ? this.data.createDialogData.confirmCreateDialogData?.requireConfirmation : false,\n // eslint-disable-next-line max-len\n confirmationText: this.data.createDialogData.confirmCreateDialogData?.confirmationText ? this.data.createDialogData.confirmCreateDialogData?.confirmationText : undefined,\n };\n const dialogref = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogref.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmCreate();\n }\n });\n }\n private confirmCreate(): void {\n this.entityService.create(this.data.entity).then(() => this.dialogRef.close());\n }\n\n cancel(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title>{{data.createDialogData.title}}</h2>\n\n<mat-dialog-content>\n <form #form=\"ngForm\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of entityKeys\"\n [entity]=\"data.entity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n class=\"col-lg-{{getWidth(data.entity, key, 'lg')}} col-md-{{getWidth(data.entity, key, 'md')}} col-sm-{{getWidth(data.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-raised-button (click)=\"create()\" [disabled]=\"!EntityUtilities.isEntityValid(data.entity, 'create')\">\n {{data.createDialogData.createButtonLabel ? data.createDialogData.createButtonLabel : 'Create'}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.createDialogData.cancelButtonLabel ? data.createDialogData.cancelButtonLabel : 'Cancel'}}\n </button>\n</mat-dialog-actions>\n","import { Component, Inject, Injector, OnInit } from '@angular/core';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { cloneDeep } from 'lodash';\nimport { EditEntityDialogData } from './edit-entity-dialog-data';\nimport { NgxMatEntityConfirmDialogComponent } from '../../confirm-dialog/confirm-dialog.component';\nimport { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';\n\n@Component({\n selector: 'ngx-mat-entity-edit-dialog',\n templateUrl: './edit-entity-dialog.component.html',\n styleUrls: ['./edit-entity-dialog.component.scss']\n})\nexport class NgxMatEntityEditDialogComponent<EntityType extends Entity> implements OnInit {\n EntityUtilities = EntityUtilities;\n\n entityKeys!: (keyof EntityType)[];\n\n entityService!: EntityService<EntityType>;\n\n entityPriorChanges!: EntityType;\n\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n @Inject(MAT_DIALOG_DATA)\n public data: EditEntityDialogData<EntityType>,\n public dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>,\n private readonly injector: Injector,\n private readonly dialog: MatDialog\n ) { }\n\n ngOnInit(): void {\n this.dialogRef.disableClose = true;\n this.setEntityKeys();\n this.entityService = this.injector.get(this.data.EntityServiceClass) as EntityService<EntityType>;\n this.entityPriorChanges = cloneDeep(this.data.entity);\n }\n\n private setEntityKeys(): void {\n this.entityKeys = Reflect.ownKeys(this.data.entity) as (keyof EntityType)[];\n const omitUpdateKeys = EntityUtilities.getOmitForUpdate(this.data.entity);\n this.entityKeys = this.entityKeys.filter((k) => !omitUpdateKeys.includes(k))\n .sort((a, b) => EntityUtilities.compareOrder(a, b, this.data.entity));\n }\n\n edit(): void {\n if (this.data.editDialogData.editRequiresConfirmDialog === false) {\n return this.confirmEdit();\n }\n const dialogData: ConfirmDialogData = {\n // eslint-disable-next-line max-len\n text: this.data.editDialogData.confirmEditDialogData?.text ? this.data.editDialogData.confirmEditDialogData?.text : ['Do you really want to save all changes?'],\n type: 'default',\n // eslint-disable-next-line max-len\n confirmButtonLabel: this.data.editDialogData.confirmEditDialogData?.confirmButtonLabel ? this.data.editDialogData.confirmEditDialogData?.confirmButtonLabel : 'Confirm',\n // eslint-disable-next-line max-len\n cancelButtonLabel: this.data.editDialogData.confirmEditDialogData?.cancelButtonLabel ? this.data.editDialogData.confirmEditDialogData?.cancelButtonLabel : 'Cancel',\n title: this.data.editDialogData.confirmEditDialogData?.title ? this.data.editDialogData.confirmEditDialogData?.title : 'Edit',\n // eslint-disable-next-line max-len\n requireConfirmation: this.data.editDialogData.confirmEditDialogData?.requireConfirmation ? this.data.editDialogData.confirmEditDialogData?.requireConfirmation : false,\n // eslint-disable-next-line max-len\n confirmationText: this.data.editDialogData.confirmEditDialogData?.confirmationText ? this.data.editDialogData.confirmEditDialogData?.confirmationText : undefined,\n };\n const dialogref = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogref.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmEdit();\n }\n });\n }\n private confirmEdit(): void {\n this.entityService.update(this.data.entity, this.entityPriorChanges).then(() => this.dialogRef.close(1));\n }\n\n delete(): void {\n if (this.data.editDialogData.deleteRequiresConfirmDialog === false) {\n return this.confirmDelete();\n }\n const dialogData: ConfirmDialogData = {\n // eslint-disable-next-line max-len\n text: this.data.editDialogData.confirmDeleteDialogData?.text ? this.data.editDialogData.confirmDeleteDialogData?.text : ['Do you really want to delete this entity?'],\n type: 'delete',\n // eslint-disable-next-line max-len\n confirmButtonLabel: this.data.editDialogData.confirmDeleteDialogData?.confirmButtonLabel ? this.data.editDialogData.confirmDeleteDialogData?.confirmButtonLabel : 'Delete',\n // eslint-disable-next-line max-len\n cancelButtonLabel: this.data.editDialogData.confirmDeleteDialogData?.cancelButtonLabel ? this.data.editDialogData.confirmDeleteDialogData?.cancelButtonLabel : 'Cancel',\n // eslint-disable-next-line max-len\n title: this.data.editDialogData.confirmDeleteDialogData?.title ? this.data.editDialogData.confirmDeleteDialogData?.title : 'Delete',\n // eslint-disable-next-line max-len\n requireConfirmation: this.data.editDialogData.confirmDeleteDialogData?.requireConfirmation ? this.data.editDialogData.confirmDeleteDialogData?.requireConfirmation : false,\n // eslint-disable-next-line max-len\n confirmationText: this.data.editDialogData.confirmDeleteDialogData?.confirmationText ? this.data.editDialogData.confirmDeleteDialogData?.confirmationText : undefined,\n };\n const dialogref = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogref.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmDelete();\n }\n });\n }\n private confirmDelete(): void {\n this.entityService.delete(this.entityPriorChanges.id).then(() => this.dialogRef.close(2));\n }\n\n cancel(): void {\n EntityUtilities.resetChangesOnEntity(this.data.entity, this.entityPriorChanges);\n this.dialogRef.close(0);\n }\n}","<h2 mat-dialog-title>\n {{data.editDialogData.title(data.entity)}}\n <button *ngIf=\"data.allowDelete(data.entity)\" mat-raised-button (click)=\"delete()\" color=\"warn\" class=\"delete-button\" tabindex=\"-1\">\n {{data.editDialogData.deleteButtonLabel ? data.editDialogData.deleteButtonLabel : 'Delete'}}\n </button>\n</h2>\n\n<mat-dialog-content>\n <form #form=\"ngForm\" class=\"row\">\n <ngx-mat-entity-input\n *ngFor=\"let key of entityKeys\"\n [entity]=\"data.entity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n class=\"col-lg-{{getWidth(data.entity, key, 'lg')}} col-md-{{getWidth(data.entity, key, 'md')}} col-sm-{{getWidth(data.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-raised-button (click)=\"edit()\" [disabled]=\"!EntityUtilities.isEntityValid(data.entity, 'edit') || !EntityUtilities.dirty(data.entity, entityPriorChanges)\">\n {{data.editDialogData.confirmButtonLabel ? data.editDialogData.confirmButtonLabel : 'Save'}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.editDialogData.cancelButtonLabel ? data.editDialogData.cancelButtonLabel : 'Cancel'}}\n </button>\n</mat-dialog-actions>\n","import { Component, Injector, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { EntityService } from '../../classes/entity-service.class';\nimport { firstValueFrom, Subject, takeUntil } from 'rxjs';\nimport { Entity } from '../../classes/entity-model.class';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { MatDialog } from '@angular/material/dialog';\nimport { NgxMatEntityCreateDialogComponent } from './create-dialog/create-entity-dialog.component';\nimport { CreateEntityDialogData } from './create-dialog/create-entity-dialog-data';\nimport { NgxMatEntityEditDialogComponent } from './edit-dialog/edit-entity-dialog.component';\nimport { EditEntityDialogData } from './edit-dialog/edit-entity-dialog-data';\nimport { MultiSelectAction, EntitiesData, CreateDialogData, EditDialogData } from './table-data';\nimport { NgxMatEntityConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component';\nimport { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';\n\n@Component({\n selector: 'ngx-mat-entity-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss']\n})\nexport class NgxMatEntityTableComponent<EntityType extends Entity> implements OnInit, OnDestroy {\n\n /**\n * The configuration for the entities-component\n */\n @Input()\n entitiesData!: EntitiesData<EntityType>;\n\n private entityService!: EntityService<EntityType>;\n private readonly onDestroy = new Subject<void>();\n @ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator;\n @ViewChild(MatSort, { static: true }) sort!: MatSort;\n @ViewChild('filter', { static: true }) filter!: string;\n displayedColumns!: string[];\n dataSource: MatTableDataSource<EntityType> = new MatTableDataSource();\n selection: SelectionModel<EntityType> = new SelectionModel<EntityType>(true, []);\n\n constructor(private readonly dialog: MatDialog, private readonly injector: Injector) {}\n\n ngOnInit(): void {\n this.validateInput();\n\n this.entityService = this.injector.get(this.entitiesData.baseData.EntityServiceClass) as EntityService<EntityType>;\n\n const givenDisplayColumns = this.entitiesData.baseData.displayColumns.map((v) => v.displayName);\n if (this.entitiesData.baseData.multiSelectActions?.length) {\n if (givenDisplayColumns.find((s) => s === 'select')) {\n throw new Error(\n `The name \"select\" for a display column is reserved for the multi-select action functionality.\n Please choose a different name.`\n );\n }\n this.displayedColumns = ['select'].concat(givenDisplayColumns);\n }\n else {\n this.displayedColumns = givenDisplayColumns;\n }\n\n this.dataSource.sortingDataAccessor = (entity: EntityType, header: string) => {\n return this.entitiesData.baseData.displayColumns.find((dp) => dp.displayName === header)?.value(entity) as string;\n };\n this.dataSource.sort = this.sort;\n if (this.entitiesData.baseData.searchString) {\n this.dataSource.filterPredicate = (entity: EntityType, filter: string) => {\n const searchStr = this.entitiesData.baseData.searchString?.(entity) as string;\n const formattedSearchString = searchStr.toLowerCase();\n const formattedFilterString = filter.toLowerCase();\n return formattedSearchString.includes(formattedFilterString);\n };\n }\n this.dataSource.filter = this.filter;\n this.dataSource.paginator = this.paginator;\n\n this.entityService.entitiesSubject.pipe(takeUntil(this.onDestroy)).subscribe((entities) => {\n this.dataSource.data = entities;\n this.selection.clear();\n });\n this.entityService.read();\n }\n\n private validateInput(): void {\n if (!this.entitiesData.baseData.displayColumns) {\n throw new Error('Missing required Input data \"displayColumns\"');\n }\n if (!this.entitiesData.baseData.title) {\n throw new Error('Missing required Input data \"title\"');\n }\n if (!this.entitiesData.baseData.EntityServiceClass) {\n throw new Error('Missing required Input data \"EntityServiceClass\"');\n }\n if (this.entitiesData.baseData.allowCreate === undefined) {\n this.entitiesData.baseData.allowCreate = true;\n }\n if (this.entitiesData.baseData.allowEdit === undefined) {\n this.entitiesData.baseData.allowEdit = () => true;\n }\n if (this.entitiesData.baseData.allowDelete === undefined) {\n this.entitiesData.baseData.allowDelete = () => true;\n }\n if (\n (\n this.entitiesData.baseData.allowEdit !== (() => false)\n || this.entitiesData.baseData.allowDelete !== (() => false)\n || this.entitiesData.baseData.allowCreate\n )\n && !this.entitiesData.baseData.EntityClass\n ) {\n throw new Error(`\n Missing required Input data \"EntityClass\".\n You can only omit this value if you can neither create or update entities.`\n );\n }\n if (this.entitiesData.baseData.allowCreate && !this.entitiesData.baseData.create && !this.entitiesData.createDialogData) {\n throw new Error(\n `Missing required Input data \"createDialogData\".\n You can only omit this value when creation is disallowed or done with a custom create method.`\n );\n }\n if (\n (\n this.entitiesData.baseData.allowEdit !== (() => false)\n || this.entitiesData.baseData.allowDelete !== (() => false)\n )\n && !this.entitiesData.baseData.edit\n && !this.entitiesData.editDialogData\n ) {\n throw new Error(\n `Missing required Input data \"editDialogData\".\n You can only omit this value when editing and deleting is disallowed or done with a custom edit method.`\n );\n }\n }\n\n editEntity(entity: EntityType): void {\n if (this.entitiesData.baseData.allowEdit?.(entity)) {\n if (this.entitiesData.baseData.edit) {\n this.entitiesData.baseData.edit(new this.entitiesData.baseData.EntityClass(entity));\n }\n else {\n this.editDefault(new this.entitiesData.baseData.EntityClass(entity));\n }\n }\n }\n private editDefault(entity: EntityType): void {\n const dialogData: EditEntityDialogData<EntityType> = {\n entity: entity,\n EntityServiceClass: this.entitiesData.baseData.EntityServiceClass,\n allowDelete: this.entitiesData.baseData.allowDelete as (entity: EntityType) => boolean,\n editDialogData: this.entitiesData.editDialogData as EditDialogData<EntityType>\n };\n firstValueFrom(\n this.dialog.open( NgxMatEntityEditDialogComponent, {\n data: dialogData,\n minWidth: '60%',\n autoFocus: false,\n restoreFocus: false\n }).afterClosed()\n ).then((res: number) => {\n if (res === 0) {\n const data = this.dataSource.data;\n data[this.dataSource.data.findIndex((e) => e.id === entity.id)] = entity;\n this.dataSource.data = data;\n this.selection.clear();\n }\n });\n }\n\n createEntity(): void {\n if (this.entitiesData.baseData.allowCreate) {\n if (this.entitiesData.baseData.create) {\n this.entitiesData.baseData.create(new this.entitiesData.baseData.EntityClass());\n }\n else {\n this.createDefault(new this.entitiesData.baseData.EntityClass());\n }\n }\n }\n private createDefault(entity: EntityType): void {\n const dialogData: CreateEntityDialogData<EntityType> = {\n entity: entity,\n EntityServiceClass: this.entitiesData.baseData.EntityServiceClass,\n createDialogData: this.entitiesData.createDialogData as CreateDialogData\n };\n this.dialog.open(NgxMatEntityCreateDialogComponent, {\n data: dialogData,\n minWidth: '60%',\n autoFocus: false,\n restoreFocus: false\n });\n }\n\n runMultiAction(action: MultiSelectAction<EntityType>): void {\n if (!action.requireConfirmDialog || !action.requireConfirmDialog(this.selection.selected)) {\n return this.confirmRunMultiAction(action);\n }\n const dialogData: ConfirmDialogData = {\n // eslint-disable-next-line max-len\n text: action.confirmDialogData?.text ? action.confirmDialogData?.text : [`Do you really want to run this action on ${this.selection.selected.length} entries?`],\n type: 'default',\n confirmButtonLabel: action.confirmDialogData?.confirmButtonLabel ? action.confirmDialogData?.confirmButtonLabel : 'Confirm',\n cancelButtonLabel: action.confirmDialogData?.cancelButtonLabel ? action.confirmDialogData?.cancelButtonLabel : 'Cancel',\n title: action.confirmDialogData?.title ? action.confirmDialogData?.title : action.displayName,\n requireConfirmation: action.confirmDialogData?.requireConfirmation ? action.confirmDialogData?.requireConfirmation : false,\n confirmationText: action.confirmDialogData?.confirmationText ? action.confirmDialogData?.confirmationText : undefined\n };\n const dialogref = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogref.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmRunMultiAction(action);\n }\n });\n }\n private confirmRunMultiAction(action: MultiSelectAction<EntityType>): void {\n action.action(this.selection.selected);\n }\n\n multiActionDisabled(action: MultiSelectAction<EntityType>): boolean {\n if (!this.selection.selected.length) {\n return true;\n }\n if (action.enabled?.(this.selection.selected) === false) {\n return true;\n }\n return false;\n }\n\n masterToggle(): void {\n if (this.isAllSelected()) {\n this.selection.clear();\n }\n else {\n this.dataSource.data.forEach((row) => this.selection.select(row));\n }\n }\n\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n\n ngOnDestroy(): void {\n this.onDestroy.next(undefined);\n this.onDestroy.complete();\n }\n\n applyFilter(event: Event): void {\n const filterValue = (event.target as HTMLInputElement).value;\n this.dataSource.filter = filterValue.trim().toLowerCase();\n }\n}","<h1 class=\"title\">{{entitiesData.baseData.title}}</h1>\n\n<div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{entitiesData.baseData.searchLabel ? entitiesData.baseData.searchLabel : 'Search'}}</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\" />\n </mat-form-field>\n <div\n *ngIf=\"entitiesData.baseData.multiSelectActions?.length\"\n [class.col-lg-2]=\"entitiesData.baseData.allowCreate\"\n [class.col-lg-4]=\"!entitiesData.baseData.allowCreate\"\n [class.col-md-3]=\"entitiesData.baseData.allowCreate\"\n [class.col-md-6]=\"!entitiesData.baseData.allowCreate\"\n [class.col-sm-6]=\"entitiesData.baseData.allowCreate\"\n [class.col-sm-12]=\"!entitiesData.baseData.allowCreate\"\n >\n <button class=\"actions-button\" [matMenuTriggerFor]=\"menu\" mat-raised-button>\n {{entitiesData.baseData.multiSelectLabel ? entitiesData.baseData.multiSelectLabel : 'Actions'}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of entitiesData.baseData.multiSelectActions\" [disabled]=\"multiActionDisabled(action)\" (click)=\"runMultiAction(action)\" mat-menu-item>\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"entitiesData.baseData.allowCreate\"\n [class.col-lg-2]=\"entitiesData.baseData.multiSelectActions?.length\"\n [class.col-lg-4]=\"!entitiesData.baseData.multiSelectActions?.length\"\n [class.col-md-3]=\"entitiesData.baseData.multiSelectActions?.length\"\n [class.col-md-6]=\"!entitiesData.baseData.multiSelectActions?.length\"\n [class.col-sm-6]=\"entitiesData.baseData.multiSelectActions?.length\"\n [class.col-sm-12]=\"!entitiesData.baseData.multiSelectActions?.length\"\n >\n <button class=\"create-button\" (click)=\"createEntity()\" mat-raised-button>\n {{entitiesData.baseData.createButtonLabel ? entitiesData.baseData.createButtonLabel : 'Create'}}\n </button>\n </div>\n</div>\n\n<div class=\"mat-elevation-z8\">\n <mat-table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" matSort>\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let module\" class=\"module\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(module) : null\" [checked]=\"selection.isSelected(module)\"> </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of entitiesData.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell class=\"entity\" [class.enabled]=\"entitiesData.baseData.allowEdit?.(entity)\" (click)=\"editEntity(entity)\" *matCellDef=\"let entity\">\n {{dCol.value(entity)}}\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <mat-paginator *ngIf=\"dataSource\" id=\"paginator\" [length]=\"dataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"> </mat-paginator>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityTableComponent } from './table.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDialogModule } from '@angular/material/dialog';\n\n@NgModule({\n declarations: [NgxMatEntityTableComponent],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatTableModule,\n MatPaginatorModule,\n MatButtonModule,\n MatMenuModule,\n MatDialogModule\n ],\n exports: [NgxMatEntityTableComponent]\n})\nexport class NgxMatEntityTableModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTableModule } from '@angular/material/table';\nimport { NgxMatEntityInternalInputComponent } from './internal-input.component';\n\n@NgModule({\n declarations: [NgxMatEntityInternalInputComponent],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatAutocompleteModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatTableModule\n ],\n exports: [NgxMatEntityInternalInputComponent]\n})\nexport class NgxMatEntityInternalInputModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityAddArrayItemDialogComponent } from './add-array-item-dialog.component';\nimport { NgxMatEntityInternalInputModule } from '../../internal-input/internal-input.module';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n declarations: [NgxMatEntityAddArrayItemDialogComponent],\n imports: [CommonModule, NgxMatEntityInternalInputModule, MatDialogModule, FormsModule, MatButtonModule],\n exports: [NgxMatEntityAddArrayItemDialogComponent]\n})\nexport class NgxMatEntityAddArrayItemDialogModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatTableModule } from '@angular/material/table';\nimport { NgxMatEntityArrayTableComponent } from './array-table.component';\nimport { NgxMatEntityInternalInputModule } from '../internal-input/internal-input.module';\nimport { MatButtonModule } from '@angular/material/button';\nimport { NgxMatEntityAddArrayItemDialogModule } from './add-array-item-dialog/add-array-item-dialog.module';\n\n@NgModule({\n declarations: [NgxMatEntityArrayTableComponent],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatAutocompleteModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatTableModule,\n NgxMatEntityInternalInputModule,\n MatButtonModule,\n NgxMatEntityAddArrayItemDialogModule\n ],\n exports: [NgxMatEntityArrayTableComponent]\n})\nexport class NgxMatEntityArrayTableModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityInputComponent } from './input.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { NgxMatEntityArrayTableModule } from './array-table/array-table.module';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\n\n@NgModule({\n declarations: [NgxMatEntityInputComponent],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatAutocompleteModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n NgxMatEntityArrayTableModule,\n MatChipsModule,\n MatIconModule\n ],\n exports: [NgxMatEntityInputComponent]\n})\nexport class NgxMatEntityInputModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityCreateDialogComponent } from './create-entity-dialog.component';\nimport { NgxMatEntityInputModule } from '../../input/input.module';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n declarations: [NgxMatEntityCreateDialogComponent],\n imports: [CommonModule, NgxMatEntityInputModule, MatDialogModule, FormsModule, MatButtonModule],\n exports: [NgxMatEntityCreateDialogComponent]\n})\nexport class NgxMatEntityCreateDialogModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityEditDialogComponent } from './edit-entity-dialog.component';\nimport { NgxMatEntityInputModule } from '../../input/input.module';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { NgxMatEntityConfirmDialogModule } from '../../confirm-dialog/confirm-dialog.module';\n\n@NgModule({\n declarations: [ NgxMatEntityEditDialogComponent],\n imports: [\n CommonModule,\n NgxMatEntityInputModule,\n MatDialogModule,\n FormsModule,\n MatButtonModule,\n NgxMatEntityConfirmDialogModule\n ],\n exports: [ NgxMatEntityEditDialogComponent]\n})\nexport class NgxMatEntityEditDialogModule {}","import { Entity } from '../classes/entity-model.class';\nimport { CreateDialogData } from '../components/table/table-data';\nimport { baseProperty } from './base/base-property.decorator';\nimport { DecoratorTypes } from './base/decorator-types.enum';\nimport { PropertyDecoratorConfig } from './base/property-decorator-config.interface';\n\n/**\n * Decorator for setting and getting array propery metadata\n * @param metadata The metadata of the array property\n */\nexport function array<EntityType extends Entity>(\n metadata: EntityArrayDecoratorConfig<EntityType> | StringChipsArrayDecoratorConfig | AutocompleteStringChipsArrayDecoratorConfig\n): (target: object, propertyKey: string) => void {\n switch (metadata.itemType) {\n case DecoratorTypes.OBJECT:\n return baseProperty(new EntityArrayDecoratorConfig(metadata), DecoratorTypes.ARRAY);\n case DecoratorTypes.STRING:\n return baseProperty(new StringChipsArrayDecoratorConfig(metadata), DecoratorTypes.ARRAY_STRING_CHIPS);\n case DecoratorTypes.STRING_AUTOCOMPLETE:\n return baseProperty(new AutocompleteStringChipsArrayDecoratorConfig(metadata), DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS);\n default:\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n throw new Error(`Unknown itemType ${(metadata as any).itemType}`);\n }\n}\n\nexport interface ArrayTableDisplayColumn<EntityType extends Entity> {\n /**\n * The name inside the header.\n */\n displayName: string,\n /**\n * A method to get the value inside an row\n */\n value: (entity: EntityType) => string\n}\n\n/**\n * Interface definition for the @array metadata\n */\nabstract class ArrayDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * How to display the string\n */\n displayStyle!: 'table' | 'chips';\n\n /**\n * The type of the items inside the array\n */\n itemType!: DecoratorTypes;\n\n /**\n * The error-message to display when the array is required but contains no values\n */\n missingErrorMessage?: string;\n}\n\n/**\n * Definition for an array of Entities\n */\nexport class EntityArrayDecoratorConfig<EntityType extends Entity> extends ArrayDecoratorConfig {\n override itemType: DecoratorTypes.OBJECT;\n override displayStyle: 'table';\n\n /**\n * The EntityClass used for generating the create inputs\n */\n EntityClass!: new (entity?: EntityType) => EntityType;\n\n /**\n * The definition of the columns to display. Consists of the displayName to show in the header of the row\n * and the value, which is a function that generates the value to display inside a column\n */\n displayColumns: ArrayTableDisplayColumn<EntityType>[];\n\n /**\n * The data for the add-item-dialog.\n * Can be omitted when adding items inline.\n */\n createDialogData?: CreateDialogData\n\n /**\n * Whether or not the form for adding items to the array\n * should be displayed inline.\n * @default true\n */\n createInline?: boolean\n\n constructor(metadata: EntityArrayDecoratorConfig<EntityType>) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.itemType = metadata.itemType;\n this.displayStyle = metadata.displayStyle;\n this.EntityClass = metadata.EntityClass;\n this.createDialogData = metadata.createDialogData;\n this.missingErrorMessage = metadata.missingErrorMessage;\n this.createInline = metadata.createInline;\n this.displayColumns = metadata.displayColumns\n }\n}\n\n/**\n * Definition for an array of strings displayed as a chips list\n */\nexport class StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {\n override itemType: DecoratorTypes.STRING;\n override displayStyle: 'chips';\n\n /**\n * The html inside the delete-button.\n * Please note that custom tags such as <mat-icon></mat-icon>\n * need to be defined as known elements, otherwise the sanitizer will remove them.\n * You can however work around this by using `<span class=\"material-icons\"></span>`\n * @default <mat-icon>cancel</mat-icon>\n */\n deleteHtml?: string\n /**\n * (optional) The minimum required length of the string\n */\n minLength?: number;\n /**\n * (optional) The maximum required length of the string\n */\n maxLength?: number;\n /**\n * (optional) A regex used for validation\n */\n regex?: RegExp;\n\n constructor(metadata: StringChipsArrayDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.itemType = metadata.itemType;\n this.displayStyle = metadata.displayStyle;\n this.deleteHtml = metadata.deleteHtml;\n this.minLength = metadata.minLength;\n this.maxLength = metadata.maxLength;\n this.regex = metadata.regex;\n }\n}\n\n/**\n * Definition for an array of autocomplete strings displayed as a chips list\n */\nexport class AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {\n override itemType: DecoratorTypes.STRING_AUTOCOMPLETE;\n override displayStyle: 'chips';\n\n /**\n * The html inside the delete-button.\n * Please note that custom tags such as <mat-icon></mat-icon>\n * need to be defined as known elements, otherwise the sanitizer will remove them.\n * You can however work around this by using `<span class=\"material-icons\"></span>`\n * @default <mat-icon>cancel</mat-icon>\n */\n deleteHtml?: string;\n /**\n * The autocomplete values\n */\n autocompleteValues: string[];\n /**\n * (optional) The minimum required length of the string\n */\n minLength?: number;\n /**\n * (optional) The maximum required length of the string\n */\n maxLength?: number;\n /**\n * (optional) A regex used for validation\n */\n regex?: RegExp;\n\n constructor(metadata: AutocompleteStringChipsArrayDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.itemType = metadata.itemType;\n this.displayStyle = metadata.displayStyle;\n this.deleteHtml = metadata.deleteHtml;\n this.autocompleteValues = metadata.autocompleteValues;\n this.minLength = metadata.minLength;\n this.maxLength = metadata.maxLength;\n this.regex = metadata.regex;\n }\n}","import { PropertyDecoratorConfig } from './base/property-decorator-config.interface';\nimport { baseProperty } from './base/base-property.decorator';\nimport { DecoratorTypes } from './base/decorator-types.enum';\n\n/**\n * Decorator for setting and getting string propery metadata\n * @param metadata The metadata of the string property\n */\nexport function boolean(\n metadata: CheckboxBooleanDecoratorConfig | ToggleBooleanDecoratorConfig | DropdownBooleanDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownBooleanDecoratorConfig(metadata), DecoratorTypes.BOOLEAN_DROPDOWN);\n }\n else if (metadata.displayStyle === 'checkbox') {\n return baseProperty(new CheckboxBooleanDecoratorConfig(metadata), DecoratorTypes.BOOLEAN_CHECKBOX);\n }\n else {\n return baseProperty(new ToggleBooleanDecoratorConfig(metadata), DecoratorTypes.BOOLEAN_TOGGLE);\n }\n}\n\n/**\n * The Definition for the @boolean metadata\n */\nabstract class BooleanDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * Whether to display the booleans as a checkbox, a toggle button or as a dropdown\n */\n displayStyle!: 'checkbox' | 'dropdown' | 'toggle';\n}\n\nexport class DropdownBooleanDecoratorConfig extends BooleanDecoratorConfig {\n override displayStyle: 'dropdown';\n /**\n * The name of the true value if displayStyle dropdown is used.\n * Can also receive a function to determine the name.\n */\n dropdownTrue: string | { (args: unknown): string };\n /**\n * The name of the false value if displayStyle dropdown is used.\n * Can also receive a function to determine the name,\n */\n dropdownFalse: string | { (args: unknown): string };\n\n constructor(metadata: DropdownBooleanDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.dropdownTrue = metadata.dropdownTrue;\n this.dropdownFalse = metadata.dropdownFalse;\n }\n}\n\nexport class CheckboxBooleanDecoratorConfig extends BooleanDecoratorConfig {\n override displayStyle: 'checkbox';\n\n constructor(metadata: CheckboxBooleanDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n }\n}\nexport class ToggleBooleanDecoratorConfig extends BooleanDecoratorConfig {\n override displayStyle: 'toggle';\n\n constructor(metadata: ToggleBooleanDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n }\n}","import { PropertyDecoratorConfig } from './base/property-decorator-config.interface';\nimport { baseProperty } from './base/base-property.decorator';\nimport { DecoratorTypes } from './base/decorator-types.enum';\n\n/**\n * Decorator for setting and getting string propery metadata\n * @param metadata The metadata of the string property\n */\nexport function number(\n metadata: DefaultNumberDecoratorConfig | DropdownNumberDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownNumberDecoratorConfig(metadata), DecoratorTypes.NUMBER_DROPDOWN);\n }\n else {\n return baseProperty(new DefaultNumberDecoratorConfig(metadata), DecoratorTypes.NUMBER);\n }\n}\n\n/**\n * Interface definition for the @number metadata\n */\nabstract class NumberDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * Whether to display the number in a single line or as a dropdown\n */\n displayStyle!: 'line' | 'dropdown';\n}\n\nexport class DefaultNumberDecoratorConfig extends NumberDecoratorConfig {\n override displayStyle: 'line';\n /**\n * (optional) The minimum value of the number\n */\n min?: number;\n /**\n * (optional) The maximum value of the number\n */\n max?: number;\n\n constructor(metadata: DefaultNumberDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.min = metadata.min;\n this.max = metadata.max;\n }\n}\nexport class DropdownNumberDecoratorConfig extends NumberDecoratorConfig {\n override displayStyle: 'dropdown';\n /**\n * The values of the dropdown, consisting of a name to display and the actual value\n * Can also receive a function to determine the values\n */\n dropdownValues?: { displayName: string, value: number }[];\n\n constructor(metadata: DropdownNumberDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.dropdownValues = metadata.dropdownValues;\n }\n}","import { PropertyDecoratorConfig } from './base/property-decorator-config.interface';\nimport { baseProperty } from './base/base-property.decorator';\nimport { Entity } from '../classes/entity-model.class';\nimport { DecoratorTypes } from './base/decorator-types.enum';\n\n/**\n * Decorator for setting and getting object propery metadata.\n * @param metadata The metadata of the object property\n */\nexport function object(metadata: DefaultObjectDecoratorConfig): (target: object, propertyKey: string) => void {\n return baseProperty(new DefaultObjectDecoratorConfig(metadata), DecoratorTypes.OBJECT);\n}\n\n/**\n * Interface definition for the @object metadata\n */\nabstract class ObjectDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * The entity type of the object\n */\n type!: typeof Entity;\n\n /**\n * How to display the object.\n * @inline The objects properties are added as input fields in an section of the entity.\n * Useful if the object only contains a few properties (e.g. a address on a user).\n */\n displayStyle!: 'inline';\n}\n\nexport class DefaultObjectDecoratorConfig extends ObjectDecoratorConfig {\n override displayStyle: 'inline';\n\n constructor(metadata: DefaultObjectDecoratorConfig) {\n super(\n metadata.displayName,\n metadata.display,\n metadata.required,\n metadata.omitForCreate,\n metadata.omitForUpdate,\n metadata.defaultWidths,\n metadata.order\n );\n this.displayStyle = metadata.displayStyle;\n this.type = metadata.type;\n }\n}","/*\n * Public API Surface of ngx-material-entity\n */\n\nimport 'reflect-metadata';\n\n// classes\nexport * from './classes/entity-model.class';\nexport * from './classes/entity-service.class';\nexport * from './classes/entity-utilities.class';\n\n// components\nexport * from './components/confirm-dialog/confirm-dialog-data';\nexport * from './components/confirm-dialog/confirm-dialog.component';\nexport * from './components/confirm-dialog/confirm-dialog.module';\n\nexport * from './components/table/table-data';\nexport * from './components/table/table.component';\nexport * from './components/table/table.module';\n\nexport * from './components/table/create-dialog/create-entity-dialog-data';\nexport * from './components/table/create-dialog/create-entity-dialog.module';\nexport * from './components/table/create-dialog/create-entity-dialog.component';\n\nexport * from './components/table/edit-dialog/edit-entity-dialog-data';\nexport * from './components/table/edit-dialog/edit-entity-dialog.module';\nexport * from './components/table/edit-dialog/edit-entity-dialog.component';\n\nexport * from './components/input/input.module';\nexport * from './components/input/input.component';\n\nexport * from './components/get-validation-error-message.function';\n\n// decorators\nexport * from './decorators/base/decorator-types.enum';\nexport * from './decorators/array.decorator';\nexport * from './decorators/boolean.decorator';\nexport * from './decorators/number.decorator';\nexport * from './decorators/object.decorator';\nexport * from './decorators/string.decorator';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4","i5","i1","i3","i9","i2.NgxMatEntityInternalInputComponent","i6","i7.NgxMatEntityArrayTableComponent","i8","i10","i11","i13","i2.NgxMatEntityInputComponent","i3.NgxMatEntityInputComponent","i7"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;;AAEG;MACmB,uBAAuB,CAAA;AAwCzC;;;AAGG;;AAGH,IAAA,WAAA,CACI,WAAmB,EACnB,OAAmB,GAAA,IAAI,EACvB,QAAoB,GAAA,IAAI,EACxB,aAAA,GAAyB,KAAK,EAC9B,gBAAyB,KAAK,EAC9B,aAAoC,GAAA,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,EAC9C,KAAc;;;AAGd,QAAA,IAAI,CAAC,WAAW,GAAG,WAAW,CAAC;AAC/B,QAAA,IAAI,CAAC,OAAO,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,CAAC,aAAa,EACtB,QAAQ,CAAC,KAAK,CACjB,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1C,QAAA,IAAI,CAAC,cAAc,GAAG,QAAQ,CAAC,cAAc,CAAC;KACjD;AACJ;;ACvED;;;AAGG;AACG,SAAU,MAAM,CAAC,QAAsC,EAAA;AACzD,IAAA,OAAO,YAAY,CAAC,IAAI,4BAA4B,CAAC,QAAQ,CAAC,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;AAC3F,CAAC;AAED;;AAEG;AACH,MAAe,8BAA8B,uBAAuB,CAAA;AAYnE,CAAA;AAEK,MAAO,4BAA6B,SAAQ,qBAAqB,CAAA;AAGnE,IAAA,WAAA,CAAY,QAAsC,EAAA;AAC9C,QAAA,KAAK,CACD,QAAQ,CAAC,WAAW,EACpB,QAAQ,CAAC,OAAO,EAChB,QAAQ,CAAC,QAAQ,EACjB,QAAQ,CAAC,aAAa,EACtB,QAAQ,CAAC,aAAa,EACtB,QAAQ,CAAC,aAAa,EACtB,QAAQ,CAAC,KAAK,CACjB,CAAC;AACF,QAAA,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,YAAY,CAAC;AAC1C,QAAA,IAAI,CAAC,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;KAC7B;AACJ;;AC9CD;;AAEG;;ACFH;;AAEG;;;;"}
1
+ {"version":3,"file":"ngx-material-entity.mjs","sources":["../../../projects/ngx-material-entity/src/decorators/base/base-property.decorator.ts","../../../projects/ngx-material-entity/src/decorators/base/decorator-types.enum.ts","../../../projects/ngx-material-entity/src/decorators/base/property-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/string/string-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/string/string.decorator.ts","../../../projects/ngx-material-entity/src/classes/entity-model.class.ts","../../../projects/ngx-material-entity/src/classes/entity-utilities.class.ts","../../../projects/ngx-material-entity/src/classes/entity-service.class.ts","../../../projects/ngx-material-entity/src/classes/base-builder.class.ts","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog-data.builder.ts","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.component.ts","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.component.html","../../../projects/ngx-material-entity/src/components/confirm-dialog/confirm-dialog.module.ts","../../../projects/ngx-material-entity/src/components/get-validation-error-message.function.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-dialog-data.builder.ts","../../../projects/ngx-material-entity/src/components/input/add-array-item-dialog-data.builder.ts","../../../projects/ngx-material-entity/src/components/input/input.component.ts","../../../projects/ngx-material-entity/src/components/input/input.component.html","../../../projects/ngx-material-entity/src/components/input/input.module.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog-data.builder.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.component.ts","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.component.html","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-dialog-data.builder.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.builder.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.component.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.component.html","../../../projects/ngx-material-entity/src/components/table/table-data.builder.ts","../../../projects/ngx-material-entity/src/components/table/table.component.ts","../../../projects/ngx-material-entity/src/components/table/table.component.html","../../../projects/ngx-material-entity/src/components/table/create-dialog/create-entity-dialog.module.ts","../../../projects/ngx-material-entity/src/components/table/edit-dialog/edit-entity-dialog.module.ts","../../../projects/ngx-material-entity/src/components/table/table.module.ts","../../../projects/ngx-material-entity/src/decorators/array/array-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/array/array.decorator.ts","../../../projects/ngx-material-entity/src/decorators/base/property-decorator.data.ts","../../../projects/ngx-material-entity/src/decorators/array/array-decorator.data.ts","../../../projects/ngx-material-entity/src/decorators/boolean/boolean-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/boolean/boolean.decorator.ts","../../../projects/ngx-material-entity/src/decorators/boolean/boolean-decorator.data.ts","../../../projects/ngx-material-entity/src/decorators/number/number-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/number/number.decorator.ts","../../../projects/ngx-material-entity/src/decorators/number/number-decorator.data.ts","../../../projects/ngx-material-entity/src/decorators/object/object-decorator-internal.data.ts","../../../projects/ngx-material-entity/src/decorators/object/object.decorator.ts","../../../projects/ngx-material-entity/src/decorators/object/object-decorator.data.ts","../../../projects/ngx-material-entity/src/decorators/string/string-decorator.data.ts","../../../projects/ngx-material-entity/src/public-api.ts","../../../projects/ngx-material-entity/src/ngx-material-entity.ts"],"sourcesContent":["import { DecoratorTypes } from './decorator-types.enum';\nimport { PropertyDecoratorConfigInternal } from './property-decorator-internal.data';\n\n/**\n * The base decorator for setting metadata on properties.\n *\n * @param metadata - The metadata to define.\n * @param type - The type of metadata.\n * @returns The method that sets the metadata.\n */\nexport function baseProperty(metadata: PropertyDecoratorConfigInternal, type: DecoratorTypes) {\n return function (target: object, propertyKey: string) {\n Reflect.defineMetadata('metadata', metadata, target, propertyKey);\n Reflect.defineMetadata('type', type, target, propertyKey);\n };\n}","import { Entity } from '../../classes/entity-model.class';\nimport { AutocompleteStringChipsArrayDecoratorConfigInternal, EntityArrayDecoratorConfigInternal, StringChipsArrayDecoratorConfigInternal } from '../array/array-decorator-internal.data';\nimport { CheckboxBooleanDecoratorConfigInternal, DropdownBooleanDecoratorConfigInternal, ToggleBooleanDecoratorConfigInternal } from '../boolean/boolean-decorator-internal.data';\nimport { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from '../number/number-decorator-internal.data';\nimport { DefaultObjectDecoratorConfigInternal } from '../object/object-decorator-internal.data';\nimport { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../string/string-decorator-internal.data';\n\n/**\n * The enum Values for all the different DecoratorTypes.\n */\nexport enum DecoratorTypes {\n STRING = 'string',\n STRING_DROPDOWN = 'stringDropdown',\n STRING_AUTOCOMPLETE = 'stringAutocomplete',\n STRING_TEXTBOX = 'stringTextbox',\n NUMBER = 'number',\n NUMBER_DROPDOWN = 'numberDropdown',\n BOOLEAN_CHECKBOX = 'boolean',\n BOOLEAN_TOGGLE = 'booleanToggle',\n BOOLEAN_DROPDOWN = 'booleanDropdown',\n OBJECT = 'object',\n ARRAY = 'array',\n ARRAY_STRING_CHIPS = 'arrayStringChips',\n ARRAY_STRING_AUTOCOMPLETE_CHIPS = 'arrayStringAutocompleteChips'\n}\n\n/**\n * Gives the metadata-config Type based on the DecoratorTypes enum.\n */\nexport type DecoratorType<T> =\n T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal\n : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal\n : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal\n : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal\n : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal\n : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal\n : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal\n : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal\n : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal\n : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<Entity>\n : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<Entity>\n : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal\n : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal\n : never;","import { Col, Position, PropertyDecoratorConfig } from './property-decorator.data';\n\n/**\n * The internal Position. Sets default values and validates user input.\n */\nclass PositionInternal implements Position {\n // eslint-disable-next-line jsdoc/require-jsdoc\n row: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n order: number;\n\n constructor(data?: Position) {\n this.validateInput(data);\n this.row = data?.row ? data.row : -1;\n this.order = data?.order ? data.order : -1;\n }\n\n private validateInput(data?: Position): void {\n if (data?.order) {\n if (data.order < 1) {\n throw new Error('order must be at least 1');\n }\n if (data.order > 12) {\n throw new Error('order cannot be bigger than 12 (the minimum value for a bootstrap column)');\n }\n }\n if (data?.row && (data.row < 1)) {\n throw new Error('row must be at least 1');\n }\n }\n}\n\n/**\n * The internal PropertyDecoratorConfig. Sets default values.\n */\nexport abstract class PropertyDecoratorConfigInternal implements PropertyDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n display: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayName: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n required: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n omitForCreate: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n omitForUpdate: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n defaultWidths: [Col, Col, Col];\n // eslint-disable-next-line jsdoc/require-jsdoc\n position: PositionInternal\n\n constructor(data: PropertyDecoratorConfig) {\n this.display = data.display != undefined ? data.display : true;\n this.displayName = data.displayName;\n this.required = data.required != undefined ? data.required : true;\n this.omitForCreate = data.omitForCreate != undefined ? data.omitForCreate : false;\n this.omitForUpdate = data.omitForUpdate != undefined ? data.omitForUpdate : false;\n this.defaultWidths = data.defaultWidths ? data.defaultWidths : [6, 6, 12];\n this.position = new PositionInternal(data.position);\n }\n}","import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';\nimport { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, TextboxStringDecoratorConfig } from './string-decorator.data';\n\n/**\n * The internal DropdownStringDecoratorConfig. Sets default values.\n */\nexport class DropdownStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownStringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown';\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownValues: { displayName: string, value: string }[];\n\n constructor(data: DropdownStringDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.dropdownValues = data.dropdownValues;\n }\n}\n\n/**\n * The internal DefaultStringDecoratorConfig. Sets default values.\n */\nexport class DefaultStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultStringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'line';\n // eslint-disable-next-line jsdoc/require-jsdoc\n minLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n maxLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n regex?: RegExp;\n\n constructor(data: DefaultStringDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.minLength = data.minLength;\n this.maxLength = data.maxLength;\n this.regex = data.regex;\n }\n}\n\n/**\n * The internal TextboxStringDecoratorConfig. Sets default values.\n */\nexport class TextboxStringDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements TextboxStringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'textbox';\n // eslint-disable-next-line jsdoc/require-jsdoc\n minLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n maxLength?: number;\n\n constructor(data: TextboxStringDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.minLength = data.minLength;\n this.maxLength = data.maxLength;\n }\n}\n\n/**\n * The internal AutocompleteStringDecoratorConfig. Sets default values.\n */\nexport class AutocompleteStringDecoratorConfigInternal\n extends PropertyDecoratorConfigInternal implements AutocompleteStringDecoratorConfig {\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'autocomplete';\n // eslint-disable-next-line jsdoc/require-jsdoc\n autocompleteValues: string[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n minLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n maxLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n regex?: RegExp;\n\n constructor(data: AutocompleteStringDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.autocompleteValues = data.autocompleteValues;\n this.minLength = data.minLength;\n this.maxLength = data.maxLength;\n this.regex = data.regex;\n }\n}","import { baseProperty } from '../base/base-property.decorator';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from './string-decorator-internal.data';\nimport { AutocompleteStringDecoratorConfig, DefaultStringDecoratorConfig, DropdownStringDecoratorConfig, TextboxStringDecoratorConfig } from './string-decorator.data';\n\n/**\n * Decorator for setting and getting string Property metadata.\n *\n * @param metadata - The metadata of the string property.\n * @returns The method that defines the metadata.\n */\nexport function string(\n metadata: DropdownStringDecoratorConfig | AutocompleteStringDecoratorConfig\n | DefaultStringDecoratorConfig | TextboxStringDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_DROPDOWN);\n }\n else if (metadata.displayStyle === 'autocomplete') {\n return baseProperty(new AutocompleteStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_AUTOCOMPLETE);\n }\n else if (metadata.displayStyle === 'textbox') {\n return baseProperty(new TextboxStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING_TEXTBOX);\n }\n else {\n return baseProperty(new DefaultStringDecoratorConfigInternal(metadata), DecoratorTypes.STRING);\n }\n}","import { string } from '../decorators/string/string.decorator';\n\n/**\n * The base Entity class.\n */\nexport abstract class Entity {\n /**\n * A unique identifier for the Entity.\n */\n @string({\n omitForCreate: true,\n omitForUpdate: true,\n display: false,\n displayStyle: 'line',\n displayName: 'ID',\n required: true\n })\n id!: string;\n}","import { isEqual } from 'lodash';\nimport { DecoratorType, DecoratorTypes } from '../decorators/base/decorator-types.enum';\nimport { Entity } from './entity-model.class';\nimport { PropertyDecoratorConfigInternal } from '../decorators/base/property-decorator-internal.data';\nimport { EntityArrayDecoratorConfigInternal } from '../decorators/array/array-decorator-internal.data';\nimport { DefaultStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../decorators/string/string-decorator-internal.data';\nimport { DefaultNumberDecoratorConfigInternal } from '../decorators/number/number-decorator-internal.data';\n\n/**\n * Contains HelperMethods around handling Entities and their property-metadata.\n */\nexport abstract class EntityUtilities {\n\n /**\n * Gets the properties to omit when updating the entity.\n *\n * @param entity - The entity to get the properties which should be left out for updating from.\n * @returns The properties which should be left out for updating an Entity.\n */\n static getOmitForUpdate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[] {\n const res: (keyof EntityType)[] = [];\n for (const key of EntityUtilities.keysOf(entity)) {\n const metadata = EntityUtilities.getPropertyMetadata(entity, key);\n if (metadata.omitForUpdate) {\n res.push(key);\n }\n }\n return res;\n }\n\n /**\n * Gets the properties to omit when creating new entities.\n *\n * @param entity - The entity to get the properties which should be left out for creating from.\n * @returns The properties which should be left out for creating a new Entity.\n */\n static getOmitForCreate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[] {\n const res: (keyof EntityType)[] = [];\n for (const key of EntityUtilities.keysOf(entity)) {\n const metadata = EntityUtilities.getPropertyMetadata(entity, key);\n if (metadata.omitForCreate) {\n res.push(key);\n }\n }\n return res;\n }\n\n /**\n * Gets the metadata included in an property.\n *\n * @param entity - The entity with the property to get the metadata from.\n * @param propertyKey - The property on the given Entity to get the metadata from.\n * @param type - For secure Typing, defines the returned PropertyConfig.\n * @returns The metadata of the property.\n * @throws When no metadata can be found for the given property.\n */\n static getPropertyMetadata<EntityType extends Entity, T extends DecoratorTypes>(\n entity: EntityType,\n propertyKey: keyof EntityType,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n type?: T\n ): DecoratorType<T> {\n try {\n const metadata = Reflect.getMetadata('metadata', entity, propertyKey as string) as DecoratorType<T>;\n if (!metadata) {\n throw new Error(\n `Could not find metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`\n );\n }\n return metadata;\n }\n catch (error) {\n throw new Error(\n `Could not find metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`\n );\n }\n }\n\n /**\n * Gets the type of the property-metadata.\n *\n * @param entity - The entity with the property to get the type from.\n * @param propertyKey - The property on the given Entity to get the type from.\n * @returns The type of the metadata.\n * @throws Will throw an error if no metadata can be found for the given property.\n */\n static getPropertyType<EntityType extends Entity>(\n entity: EntityType, propertyKey: keyof EntityType\n ): DecoratorTypes {\n try {\n const propertyType = Reflect.getMetadata('type', entity, propertyKey as string) as DecoratorTypes;\n if (!propertyType) {\n throw new Error(\n `Could not find type metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`\n );\n }\n return propertyType;\n }\n catch (error) {\n throw new Error(\n `Could not find type metadata for property ${String(propertyKey)} on the entity ${JSON.stringify(entity)}`\n );\n }\n }\n\n /**\n * Sets all property values based on a given entity data-object.\n *\n * @param target - The target object that needs to be constructed (if called inside an Entity constructor its usually this).\n * @param entity - The data object to get the property values from.\n * @alias new\n * @alias build\n * @alias construct\n */\n static new<EntityType extends Entity>(target: EntityType, entity?: EntityType): void {\n for (const key in target) {\n const type = EntityUtilities.getPropertyType(target, key);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n let value = entity ? Reflect.get(entity, key) : undefined;\n switch (type) {\n case DecoratorTypes.OBJECT:\n const objectMetadata = EntityUtilities.getPropertyMetadata(target, key, DecoratorTypes.OBJECT);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n value = new objectMetadata.type(value) as EntityType;\n break;\n case DecoratorTypes.ARRAY:\n const inputArray: EntityType[] = value as EntityType[];\n const resArray: EntityType[] = [];\n if (inputArray) {\n const arrayMetadata = EntityUtilities.getPropertyMetadata(target, key, DecoratorTypes.ARRAY);\n for (const item of inputArray) {\n const itemWithMetadata = new arrayMetadata.EntityClass(item) as EntityType;\n resArray.push(itemWithMetadata);\n }\n }\n value = resArray;\n break;\n default:\n break;\n }\n Reflect.set(target, key, value);\n }\n }\n // eslint-disable-next-line @typescript-eslint/member-ordering, jsdoc/require-jsdoc\n static construct = this.new;\n // eslint-disable-next-line @typescript-eslint/member-ordering, jsdoc/require-jsdoc\n static build = this.new;\n\n /**\n * Checks if the values on an entity are valid.\n * Also checks all the validators given by the metadata (\"required\", \"maxLength\" etc.).\n *\n * @param entity - The entity to validate.\n * @param omit - Whether to check for creating or editing validity.\n * @returns Whether or not the entity is valid.\n */\n static isEntityValid<EntityType extends Entity>(entity: EntityType, omit: 'create' | 'update'): boolean {\n for (const key in entity) {\n if (!this.isPropertyValid(entity, key, omit)) {\n return false;\n }\n }\n return true;\n }\n /**\n * Checks if a single property value is valid.\n *\n * @param entity - The entity where the property is from.\n * @param key - The name of the property.\n * @param omit - Whether to check if the given entity is valid for creation or updating.\n * @returns Whether or not the property value is valid.\n * @throws Throws when it extracts an unknown metadata type.\n */\n private static isPropertyValid<EntityType extends Entity>(\n entity: EntityType,\n key: keyof EntityType,\n omit: 'create' | 'update'\n ): boolean {\n const type = this.getPropertyType(entity, key);\n const metadata: PropertyDecoratorConfigInternal = this.getPropertyMetadata(entity, key, type);\n const metadataDefaultString = metadata as DefaultStringDecoratorConfigInternal;\n const metadataTextboxString = metadata as TextboxStringDecoratorConfigInternal;\n const metadataDefaultNumber = metadata as DefaultNumberDecoratorConfigInternal;\n const objectProperty = entity[key] as unknown as EntityType;\n const metadataEntityArray = metadata as EntityArrayDecoratorConfigInternal<Entity>;\n const arrayItems = entity[key] as unknown as [];\n\n if (metadata.omitForCreate && omit === 'create') {\n return true;\n }\n if (metadata.omitForUpdate && omit === 'update') {\n return true;\n }\n if (metadata.required && !entity[key]) {\n return false;\n }\n switch (type) {\n case DecoratorTypes.BOOLEAN_DROPDOWN:\n case DecoratorTypes.BOOLEAN_CHECKBOX:\n case DecoratorTypes.BOOLEAN_TOGGLE:\n return true;\n case DecoratorTypes.STRING_DROPDOWN:\n return true;\n case DecoratorTypes.STRING:\n case DecoratorTypes.STRING_AUTOCOMPLETE:\n if (\n metadataDefaultString.maxLength\n && (entity[key] as unknown as string).length > metadataDefaultString.maxLength\n ) {\n return false;\n }\n if (\n metadataDefaultString.minLength\n && (entity[key] as unknown as string).length < metadataDefaultString.minLength\n ) {\n return false;\n }\n if (\n metadataDefaultString.regex\n && !(entity[key] as unknown as string).match(metadataDefaultString.regex)\n ) {\n return false;\n }\n break;\n case DecoratorTypes.STRING_TEXTBOX:\n if (\n metadataTextboxString.maxLength\n && (entity[key] as unknown as string).length > metadataTextboxString.maxLength\n ) {\n return false;\n }\n if (\n metadataTextboxString.minLength\n && (entity[key] as unknown as string).length < metadataTextboxString.minLength\n ) {\n return false;\n }\n break;\n case DecoratorTypes.NUMBER_DROPDOWN:\n return true;\n case DecoratorTypes.NUMBER:\n if (metadataDefaultNumber.max && (entity[key] as unknown as number) > metadataDefaultNumber.max) {\n return false;\n }\n if (metadataDefaultNumber.min && (entity[key] as unknown as number) < metadataDefaultNumber.min) {\n return false;\n }\n break;\n case DecoratorTypes.OBJECT:\n for (const parameterKey in objectProperty) {\n if (!this.isPropertyValid(objectProperty, parameterKey, omit)) {\n return false;\n }\n }\n break;\n case DecoratorTypes.ARRAY_STRING_CHIPS:\n case DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS:\n case DecoratorTypes.ARRAY:\n if (metadataEntityArray.required && !arrayItems.length) {\n return false;\n }\n break;\n default:\n throw new Error(`Could not validate the input because the DecoratorType ${type} is not known`);\n }\n return true;\n }\n\n /**\n * Checks if an entity is \"dirty\" (if its values have changed).\n *\n * @param entity - The entity after all changes.\n * @param entityPriorChanges - The entity before the changes.\n * @returns Whether or not the entity is dirty.\n */\n static dirty(entity: Entity, entityPriorChanges: Entity): boolean {\n if (!entityPriorChanges) {\n return false;\n }\n else {\n const diff = this.difference(entity, entityPriorChanges);\n if (JSON.stringify(diff) === '{}') {\n return false;\n }\n else {\n return true;\n }\n }\n }\n\n /**\n * Compares two Entities and returns their difference in an object.\n *\n * @param entity - The first entity to compare.\n * @param entityPriorChanges - The second entity to compare.\n * @returns The difference between the two Entities in form of a Partial.\n */\n static difference<EntityType extends Entity>(\n entity: EntityType,\n entityPriorChanges: EntityType\n ): Partial<EntityType> {\n const res: Partial<EntityType> = {};\n for (const key in entity) {\n if (!isEqual(entity[key], entityPriorChanges[key])) {\n res[key] = entity[key];\n }\n }\n return res;\n }\n\n //TODO X Y\n /**\n * Compare function for sorting entity keys by their order value.\n *\n * @param a - First key of entity.\n * @param b - Second key of entity.\n * @param entity - Current entity (used to get metadata of entity keys).\n * @returns 0 if both values have the same order, a negative value if X, a positive value if Y.\n */\n static compareOrder<EntityType extends Entity>(a: keyof EntityType, b: keyof EntityType, entity: EntityType): number {\n const metadataA = EntityUtilities.getPropertyMetadata(entity, a);\n const metadataB = EntityUtilities.getPropertyMetadata(entity, b);\n\n if (metadataA.position.order === -1) {\n if (metadataB.position.order === -1) {\n return 0;\n }\n return 1;\n }\n else if (metadataB.position.order === -1) {\n return -1;\n }\n\n return ((metadataA.position.order ) - (metadataB.position.order ));\n }\n\n /**\n * Gets the bootstrap column values for \"lg\", \"md\", \"sm\".\n *\n * @param entity - Entity to get the bootstrap column values of the key.\n * @param key - Key of the property to get bootstrap column values from.\n * @param type - Defines for which screen size the column values should be returned.\n * @returns Bootstrap column value.\n */\n static getWidth<EntityType extends Entity>(entity: EntityType, key: keyof EntityType, type: 'lg' | 'md' | 'sm'): number {\n const metadata = EntityUtilities.getPropertyMetadata(entity, key);\n switch (type) {\n case 'lg':\n return metadata.defaultWidths[0];\n case 'md':\n return metadata.defaultWidths[1];\n case 'sm':\n return metadata.defaultWidths[2];\n }\n }\n\n /**\n * Resets all changes on an entity.\n *\n * @param entity - The entity to reset.\n * @param entityPriorChanges - The entity before any changes.\n */\n static resetChangesOnEntity<EntityType extends Entity>(entity: EntityType, entityPriorChanges: EntityType): void {\n for (const key in entityPriorChanges) {\n Reflect.set(entity, key, Reflect.get(entityPriorChanges, key));\n }\n }\n\n /**\n * Gets the rows that are used to display the given entity.\n *\n * @param entity - The entity to get the rows from.\n * @param hideOmitForCreate - Whether or not keys with the metadata omitForCreate should be filtered out.\n * @param hideOmitForEdit - Whether or not keys with the metadata omitForUpdate should be filtered out.\n * @returns The sorted Rows containing the row number and the keys to display in that row.\n */\n static getEntityRows<EntityType extends Entity>(\n entity: EntityType,\n hideOmitForCreate: boolean = false,\n hideOmitForEdit: boolean = false\n ): EntityRow<EntityType>[] {\n const res: EntityRow<EntityType>[] = [];\n\n const keys: (keyof EntityType)[] = EntityUtilities.keysOf(entity, hideOmitForCreate, hideOmitForEdit);\n const numberOfRows: number = EntityUtilities.getNumberOfRows<EntityType>(keys, entity);\n for (let i = 1; i <= numberOfRows; i++) {\n const row: EntityRow<EntityType> = {\n row: i,\n keys: EntityUtilities.getKeysForRow<EntityType>(keys, entity, i)\n };\n res.push(row);\n }\n const lastRow: EntityRow<EntityType> = {\n row: numberOfRows + 1,\n keys: EntityUtilities.getKeysForRow<EntityType>(keys, entity, -1)\n };\n res.push(lastRow);\n return res;\n }\n\n private static getKeysForRow<EntityType extends Entity>(\n keys: (keyof EntityType)[],\n entity: EntityType,\n i: number\n ): (keyof EntityType)[] {\n return keys\n .filter(k => EntityUtilities.getPropertyMetadata(entity, k).position.row === i)\n .sort((a, b) => EntityUtilities.compareOrder(a, b, entity));\n }\n\n private static getNumberOfRows<EntityType extends Entity>(keys: (keyof EntityType)[], entity: EntityType): number {\n return keys\n .map(k => EntityUtilities.getPropertyMetadata(entity, k).position.row)\n .sort((a, b) => (a > b ? -1 : 1))[0];\n }\n\n /**\n * Gets the keys of the provided entity correctly typed.\n *\n * @param entity - The entity to get the keys of.\n * @param hideOmitForCreate - Whether or not keys with the metadata omitForCreate should be filtered out.\n * @param hideOmitForEdit - Whether or not keys with the metadata omitForUpdate should be filtered out.\n * @returns An array of keys of the entity.\n */\n static keysOf<EntityType extends Entity>(\n entity: EntityType,\n hideOmitForCreate: boolean = false,\n hideOmitForEdit: boolean = false\n ): (keyof EntityType)[] {\n let keys: (keyof EntityType)[] = Reflect.ownKeys(entity) as (keyof EntityType)[];\n if (hideOmitForCreate) {\n const omitForCreateKeys: (keyof EntityType)[] = EntityUtilities.getOmitForCreate(entity);\n keys = keys.filter(k => !omitForCreateKeys.includes(k));\n }\n if (hideOmitForEdit) {\n const omitForUpdateKeys: (keyof EntityType)[] = EntityUtilities.getOmitForUpdate(entity);\n keys = keys.filter(k => !omitForUpdateKeys.includes(k));\n }\n return keys;\n }\n}\n\n/**\n * A row that contains all the information about how to display an entity.\n */\nexport interface EntityRow<EntityType extends Entity> {\n /**\n * The row in which this should be displayed.\n */\n row: number,\n /**\n * The keys of the values that should be displayed in that row.\n */\n keys: (keyof EntityType)[]\n}","import { Entity } from './entity-model.class';\nimport { HttpClient } from '@angular/common/http';\nimport { BehaviorSubject, firstValueFrom } from 'rxjs';\nimport { isNil, omit, omitBy } from 'lodash';\nimport { EntityUtilities } from './entity-utilities.class';\n\n/**\n * A generic EntityService class.\n * Offers basic CRUD-functionality.\n * You should create a service for every Entity you have.\n * If you extend from this you need to make sure that the extended Service can be injected.\n */\nexport abstract class EntityService<EntityType extends Entity> {\n /**\n * The base url used for api requests. If u want to have more control over this,\n * you can override the create, read, update and delete methods.\n *\n * Create Sends a POST-Request to baseUrl.\n *\n * Read Sends a GET-Request to baseUrl.\n *\n * Update Sends a PATCH-Request to baseUrl/{id}.\n *\n * Delete Sends a DEL-Request to baseUrl/{id}.\n */\n abstract readonly baseUrl: string;\n\n /**\n * A subject of all the entity values.\n * Can be subscribed to when you want to do a specific thing whenever the entities change.\n */\n readonly entitiesSubject: BehaviorSubject<EntityType[]> = new BehaviorSubject<EntityType[]>([]);\n\n /**\n * Gets the entities in an array from the internal entitiesSubject.\n *\n * @returns The current entities in form of an array.\n */\n get entities(): EntityType[] {\n return this.entitiesSubject.value;\n }\n\n constructor(private readonly http: HttpClient) {}\n\n /**\n * Creates a new Entity and pushes it to the entities array.\n *\n * @param entity - The data of the entity to create.\n * All values that should be omitted will be removed from it inside this method.\n * @returns A Promise of the created entity.\n */\n async create(entity: EntityType): Promise<EntityType> {\n const body = omit(entity, EntityUtilities.getOmitForCreate(entity));\n const e = await firstValueFrom(this.http.post<EntityType>(this.baseUrl, body));\n this.entities.push(e);\n this.entitiesSubject.next(this.entities);\n return e;\n }\n\n /**\n * Gets all existing entities and pushes them to the entities array.\n *\n * @returns A Promise of all received Entities.\n */\n async read(): Promise<EntityType[]> {\n const e = await firstValueFrom(this.http.get<EntityType[]>(this.baseUrl));\n this.entitiesSubject.next(e);\n return e;\n }\n\n /**\n * Updates a specific Entity.\n *\n * @param entity - The updated Entity\n * All values that should be omitted will be removed from it inside this method.\n * @param entityPriorChanges - The current Entity.\n * It Is used to get changed values and only update them instead of sending the whole entity data.\n */\n async update(entity: EntityType, entityPriorChanges: EntityType): Promise<void> {\n const reqBody = omit(\n EntityUtilities.difference(entity, entityPriorChanges),\n EntityUtilities.getOmitForUpdate(entity)\n );\n const updatedEntity = await firstValueFrom(\n this.http.patch<EntityType>(\n `${this.baseUrl}/${entityPriorChanges.id}`,\n omitBy(reqBody, isNil)\n )\n );\n this.entities[this.entities.findIndex((e) => e.id === entityPriorChanges.id)] = updatedEntity;\n this.entitiesSubject.next(this.entities);\n }\n\n /**\n * Deletes a specific Entity.\n *\n * @param id - The id of the element to delete.\n */\n async delete(id: string): Promise<void> {\n await firstValueFrom(this.http.delete<void>(`${this.baseUrl}/${id}`));\n this.entities.splice(\n this.entities.findIndex((e) => e.id === id), 1\n );\n this.entitiesSubject.next(this.entities);\n }\n}","\n/**\n * The abstract BaseBuilder class.\n */\nexport abstract class BaseBuilder<InternalType extends InputType, InputType extends object> {\n\n private readonly data: InternalType;\n private readonly inputData?: InputType;\n\n protected constructor(data?: InputType) {\n this.validateInput(data);\n this.inputData = data;\n this.data = this.generateBaseData(data);\n return this;\n }\n\n /**\n * Generates the internal data from the given user inputs.\n *\n * @param data - The input from the user.\n * @returns The internal data.\n */\n protected abstract generateBaseData(data?: InputType): InternalType;\n\n /**\n * Used to validate the user input in the constructor.\n *\n * @param data - The user input.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected validateInput(data?: InputType): void {\n // By default, no validation is done\n };\n\n /**\n * Sets the value for the given key if no user value was provided.\n *\n * @param key - The key to set the default value for.\n * @param value - The value to set when nothing was provided.\n * @returns The Builder.\n */\n withDefault(key: keyof InputType, value: Omit<InternalType[keyof InputType], 'undefined'>): BaseBuilder<InternalType, InputType> {\n if (!this.inputData || !this.inputData[key]) {\n this.data[key] = value as InternalType[keyof InputType];\n }\n return this;\n }\n\n /**\n * Method used to get the final build value after applying all chaining.\n *\n * @returns The build value.\n */\n getResult(): InternalType {\n return this.data;\n }\n}","import { BaseBuilder } from '../../classes/base-builder.class';\nimport { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';\n\n/**\n * The internal ConfirmDialogData. Requires all default values the user can leave out.\n */\nexport class ConfirmDialogDataInternal implements ConfirmDialogData {\n // eslint-disable-next-line jsdoc/require-jsdoc\n text: string[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n type: ConfirmDialogTypes;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n cancelButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n title: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n requireConfirmation: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmationText?: string;\n\n constructor(\n text: string[],\n type: ConfirmDialogTypes,\n confirmButtonLabel: string,\n cancelButtonLabel: string,\n title: string,\n requireConfirmation: boolean,\n confirmationText?: string\n ) {\n this.text = text;\n this.type = type;\n this.confirmButtonLabel = confirmButtonLabel;\n this.cancelButtonLabel = cancelButtonLabel;\n this.title = title;\n this.requireConfirmation = requireConfirmation;\n this.confirmationText = confirmationText;\n }\n}\n\n/**\n * The Builder for the ConfirmDialogData. Sets default values.\n */\nexport class ConfirmDialogDataBuilder extends BaseBuilder<ConfirmDialogDataInternal, ConfirmDialogData> {\n\n constructor(data?: ConfirmDialogData) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected override generateBaseData(data?: ConfirmDialogData): ConfirmDialogDataInternal {\n return new ConfirmDialogDataInternal(\n data?.text ? data.text : ['Do you really want to do this?'],\n data?.type ? data.type : 'default',\n data?.confirmButtonLabel ? data.confirmButtonLabel : 'Confirm',\n data?.cancelButtonLabel ? data.cancelButtonLabel : 'Cancel',\n data?.title ? data.title : 'Confirmation',\n data?.requireConfirmation ? data.requireConfirmation : false,\n data?.confirmationText\n );\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected override validateInput(data?: ConfirmDialogData): void {\n if (!data) {\n return;\n }\n if (data.requireConfirmation && !data.confirmationText) {\n throw new Error(`Missing required Input data \"confirmationText\".\n You can only omit this value when \"requireConfirmation\" is false.`);\n }\n if (!data.requireConfirmation && data.confirmationText) {\n throw new Error('The \"confirmationText\" will never be shown because \"requireConfirmation\" is not set to true');\n }\n if (data.type === 'info-only' && data.cancelButtonLabel) {\n throw new Error('The \"cancelButtonLabel\" will never be shown because \"type\" is set to \"info-only\"');\n }\n }\n}","import { Component, Inject, OnInit } from '@angular/core';\nimport { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { ConfirmDialogData } from './confirm-dialog-data';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from './confirm-dialog-data.builder';\n\n/**\n * The Dialog used whenever confirmation by the user is required (e.g. When the user tries to delete an entity).\n *\n * Can be customized with the MAT_DIALOG_DATA \"inputData\". Customization options are defined in \"ConfirmDialogData\".\n */\n@Component({\n selector: 'ngx-mat-entity-confirm-dialog',\n templateUrl: './confirm-dialog.component.html',\n styleUrls: ['./confirm-dialog.component.scss']\n})\nexport class NgxMatEntityConfirmDialogComponent implements OnInit {\n\n confirm = false;\n\n data!: ConfirmDialogDataInternal;\n\n constructor(\n private readonly dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>,\n @Inject(MAT_DIALOG_DATA)\n private readonly inputData: ConfirmDialogData\n ) {}\n\n ngOnInit(): void {\n this.data = new ConfirmDialogDataBuilder(this.inputData).getResult();\n this.dialogRef.disableClose = true;\n }\n\n /**\n * Closes the dialog with value 1 to signal that the action should be run.\n */\n confirmAction(): void {\n this.dialogRef.close(1);\n }\n\n /**\n * Closes the dialog.\n */\n cancel(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title *ngIf=\"data.title\">{{data.title}}</h2>\n\n<mat-dialog-content>\n <p *ngFor=\"let paragraph of data.text\">{{paragraph}}</p>\n <div *ngIf=\"data.requireConfirmation\" class=\"checkbox-wrapper\">\n <mat-checkbox [(ngModel)]=\"confirm\" name=\"confirm\">\n {{data.confirmationText}}\n </mat-checkbox>\n </div>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button *ngIf=\"data.type === 'delete'\" mat-raised-button color=\"warn\" (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel}}\n </button>\n <button *ngIf=\"data.type !== 'delete'\" mat-raised-button (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.cancelButtonLabel}}\n </button>\n</mat-dialog-actions>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { NgxMatEntityConfirmDialogComponent } from './confirm-dialog.component';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\n\n@NgModule({\n declarations: [NgxMatEntityConfirmDialogComponent],\n imports: [CommonModule, MatDialogModule, FormsModule, MatCheckboxModule, MatButtonModule],\n exports: [NgxMatEntityConfirmDialogComponent]\n})\nexport class NgxMatEntityConfirmDialogModule {}","import { NgModel } from '@angular/forms';\n\n/**\n * Generates a default error message for most validation errors.\n *\n * @param model - The ngModel to get the error from.\n * @returns The Validation Error Message to display.\n */\nexport function getValidationErrorMessage(model: NgModel): string {\n if (model.hasError('matDatepickerParse')) {\n return 'not a valid date';\n }\n else if (model.hasError('email')) {\n return 'not a valid email';\n }\n else if (model.hasError('minlength')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be at least ${model.getError('minlength').requiredLength} characters long`;\n }\n else if (model.hasError('min')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be equal or bigger than ${model.getError('min').min}`;\n }\n else if (model.hasError('max')) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return `needs to be equal or smaller than ${model.getError('max').max}`;\n }\n else if (model.hasError('required')) {\n return 'required';\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n else if (model.hasError('pattern') && model.getError('pattern').requiredPattern === '^true$') {\n return 'needs to be selected';\n }\n else {\n return 'invalid input';\n }\n}","import { BaseBuilder } from '../../../classes/base-builder.class';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';\nimport { CreateDialogData } from '../table-data';\n\n/**\n * The internal CreateDialogData. Requires all default values the user can leave out.\n */\nexport class CreateDialogDataInternal implements CreateDialogData {\n // eslint-disable-next-line jsdoc/require-jsdoc\n title: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n cancelButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createRequiresConfirmDialog: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmCreateDialogData: ConfirmDialogDataInternal;\n\n constructor(\n title: string,\n createButtonLabel: string,\n cancelButtonLabel: string,\n createRequiresConfirmDialog: boolean,\n confirmCreateDialogData: ConfirmDialogDataInternal\n ) {\n this.title = title;\n this.createButtonLabel = createButtonLabel;\n this.cancelButtonLabel = cancelButtonLabel;\n this.createRequiresConfirmDialog = createRequiresConfirmDialog;\n this.confirmCreateDialogData = confirmCreateDialogData;\n }\n}\n\n/**\n * The Builder for the CreateDialogData. Sets default values.\n */\nexport class CreateDialogDataBuilder extends BaseBuilder<CreateDialogDataInternal, CreateDialogData> {\n\n constructor(data?: CreateDialogData) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data?: CreateDialogData): CreateDialogDataInternal {\n const confirmCreateDialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(data?.confirmCreateDialogData)\n .withDefault('confirmButtonLabel', 'create')\n .withDefault('text', ['Do you really want to create this entity?'])\n .withDefault('title', 'Create')\n .getResult();\n return new CreateDialogDataInternal(\n data?.title ? data.title : 'Create',\n data?.createButtonLabel ? data.createButtonLabel : 'Create',\n data?.cancelButtonLabel ? data.cancelButtonLabel : 'Cancel',\n data?.createRequiresConfirmDialog ? data.createRequiresConfirmDialog : false,\n confirmCreateDialogData\n );\n }\n}","import { NgModel } from '@angular/forms';\nimport { BaseBuilder } from '../../classes/base-builder.class';\nimport { Entity } from '../../classes/entity-model.class';\nimport { getValidationErrorMessage } from '../get-validation-error-message.function';\nimport { CreateDialogDataBuilder, CreateDialogDataInternal } from '../table/create-dialog/create-dialog-data.builder';\nimport { AddArrayItemDialogData } from './add-array-item-dialog-data';\n\n/**\n * The internal AddArrayItemDialogData. Requires all default values the user can leave out.\n */\nexport class AddArrayItemDialogDataInternal<EntityType extends Entity> implements AddArrayItemDialogData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n entity: EntityType;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createDialogData: CreateDialogDataInternal;\n // eslint-disable-next-line jsdoc/require-jsdoc\n getValidationErrorMessage: (model: NgModel) => string;\n\n constructor(\n entity: EntityType,\n createDialogData: CreateDialogDataInternal,\n getValidationErrorMessage: (model: NgModel) => string\n ) {\n this.entity = entity;\n this.createDialogData = createDialogData;\n this.getValidationErrorMessage = getValidationErrorMessage;\n }\n}\n\n/**\n * The Builder for the AddArrayItemDialogData. Sets default values.\n */\nexport class AddArrayItemDialogDataBuilder<EntityType extends Entity>\n extends BaseBuilder<AddArrayItemDialogDataInternal<EntityType>, AddArrayItemDialogData<EntityType>> {\n\n constructor(data: AddArrayItemDialogData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data: AddArrayItemDialogData<EntityType>): AddArrayItemDialogDataInternal<EntityType> {\n const createDialogData = new CreateDialogDataBuilder(data.createDialogData)\n .withDefault('createButtonLabel', 'Add')\n .withDefault('title', 'Add to array')\n .getResult();\n return new AddArrayItemDialogDataInternal(\n data.entity,\n createDialogData,\n data.getValidationErrorMessage ? data.getValidationErrorMessage : getValidationErrorMessage,\n );\n }\n}","import { Component, Input, OnInit, TemplateRef, ViewChild } from '@angular/core';\nimport { NgModel } from '@angular/forms';\nimport { EntityRow, EntityUtilities } from '../../classes/entity-utilities.class';\nimport { Entity } from '../../classes/entity-model.class';\nimport { DecoratorTypes } from '../../decorators/base/decorator-types.enum';\nimport { getValidationErrorMessage } from '../get-validation-error-message.function';\nimport { MatChipInputEvent } from '@angular/material/chips';\nimport { MatAutocompleteSelectedEvent } from '@angular/material/autocomplete';\nimport { cloneDeep } from 'lodash';\nimport { AutocompleteStringChipsArrayDecoratorConfigInternal, EntityArrayDecoratorConfigInternal, StringChipsArrayDecoratorConfigInternal } from '../../decorators/array/array-decorator-internal.data';\nimport { DropdownBooleanDecoratorConfigInternal } from '../../decorators/boolean/boolean-decorator-internal.data';\nimport { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from '../../decorators/number/number-decorator-internal.data';\nimport { DefaultObjectDecoratorConfigInternal } from '../../decorators/object/object-decorator-internal.data';\nimport { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../../decorators/string/string-decorator-internal.data';\nimport { PropertyDecoratorConfigInternal } from '../../decorators/base/property-decorator-internal.data';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { AddArrayItemDialogDataBuilder, AddArrayItemDialogDataInternal } from './add-array-item-dialog-data.builder';\nimport { AddArrayItemDialogData } from './add-array-item-dialog-data';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\n\n/**\n * The default input component. It gets the metadata of the property from the given @Input \"entity\" and @Input \"propertyKey\"\n * and displays the input field accordingly.\n *\n * You can also define a method that generates error-messages and if the input should be hidden when its metadata says\n * that it should be omitted for creating or updating.\n * The last part being mostly relevant if you want to use this component inside an ngFor.\n */\n@Component({\n selector: 'ngx-mat-entity-input',\n templateUrl: './input.component.html',\n styleUrls: ['./input.component.scss']\n})\nexport class NgxMatEntityInputComponent<EntityType extends Entity> implements OnInit {\n /**\n * The entity on which the property exists. Used in conjunction with the \"propertyKey\"\n * to determine the property for which the input should be generated.\n */\n @Input()\n entity!: EntityType;\n\n /**\n * The name of the property to generate the input for. Used in conjunction with the \"entity\".\n */\n @Input()\n propertyKey!: keyof EntityType;\n\n /**\n * (optional) A custom function to generate the error-message for invalid inputs.\n */\n @Input()\n getValidationErrorMessage!: (model: NgModel) => string;\n\n /**\n * Whether to hide a value if it is omitted for creation.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForCreate?: boolean;\n\n /**\n * Whether to hide a value if it is omitted for editing.\n * Is used internally for the object property.\n */\n @Input()\n hideOmitForEdit?: boolean;\n\n @ViewChild('addArrayItemDialog')\n addArrayItemDialog!: TemplateRef<unknown>;\n addArrayItemDialogRef!: MatDialogRef<unknown>;\n\n type!: DecoratorTypes;\n\n metadata!: PropertyDecoratorConfigInternal;\n\n metadataDefaultString!: DefaultStringDecoratorConfigInternal;\n metadataTextboxString!: TextboxStringDecoratorConfigInternal;\n metadataAutocompleteString!: AutocompleteStringDecoratorConfigInternal;\n autocompleteStrings!: string[];\n filteredAutocompleteStrings!: string[];\n metadataDropdownString!: DropdownStringDecoratorConfigInternal;\n\n metadataDropdownBoolean!: DropdownBooleanDecoratorConfigInternal;\n\n metadataDefaultNumber!: DefaultNumberDecoratorConfigInternal;\n metadataDropdownNumber!: DropdownNumberDecoratorConfigInternal;\n\n metadataDefaultObject!: DefaultObjectDecoratorConfigInternal<EntityType>;\n objectProperty!: Entity;\n objectPropertyRows!: EntityRow<Entity>[];\n\n metadataEntityArray!: EntityArrayDecoratorConfigInternal<Entity>;\n entityArrayValues!: EntityType[];\n metadataStringChipsArray!: StringChipsArrayDecoratorConfigInternal;\n stringChipsArrayValues!: string[];\n chipsInput: string = '';\n\n metadataAutocompleteStringChipsArray!: AutocompleteStringChipsArrayDecoratorConfigInternal;\n\n arrayItem!: EntityType;\n private arrayItemPriorChanges!: EntityType;\n arrayItemInlineRows!: EntityRow<EntityType>[];\n dataSource!: MatTableDataSource<EntityType>;\n selection: SelectionModel<EntityType> = new SelectionModel<EntityType>(true, []);\n displayedColumns!: string[];\n\n dialogInputData!: AddArrayItemDialogData<EntityType>;\n dialogData!: AddArrayItemDialogDataInternal<EntityType>;\n arrayItemDialogRows!: EntityRow<EntityType>[];\n\n readonly DecoratorTypes = DecoratorTypes;\n\n EntityUtilities = EntityUtilities;\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n private readonly dialog: MatDialog\n ) {}\n\n /**\n * This is needed for the inputs to work inside an ngFor.\n *\n * @param index - The index of the element in the ngFor.\n * @returns The index.\n */\n trackByFn(index: unknown): unknown {\n return index;\n }\n\n ngOnInit(): void {\n if (!this.entity) {\n throw new Error('Missing required Input data \"entity\"');\n }\n if (!this.propertyKey) {\n throw new Error('Missing required Input data \"propertyKey\"');\n }\n this.type = EntityUtilities.getPropertyType(this.entity, this.propertyKey);\n this.metadata = EntityUtilities.getPropertyMetadata(this.entity, this.propertyKey, this.type);\n\n this.metadataDefaultString = this.metadata as DefaultStringDecoratorConfigInternal;\n this.metadataTextboxString = this.metadata as TextboxStringDecoratorConfigInternal;\n\n this.metadataAutocompleteString = this.metadata as AutocompleteStringDecoratorConfigInternal;\n this.autocompleteStrings = this.metadataAutocompleteString.autocompleteValues;\n this.filteredAutocompleteStrings = cloneDeep(this.autocompleteStrings);\n\n this.metadataDropdownString = this.metadata as DropdownStringDecoratorConfigInternal;\n\n this.metadataDropdownBoolean = this.metadata as DropdownBooleanDecoratorConfigInternal;\n if (\n (this.type === DecoratorTypes.BOOLEAN_CHECKBOX || this.type === DecoratorTypes.BOOLEAN_TOGGLE)\n && this.entity[this.propertyKey] === undefined\n ) {\n (this.entity[this.propertyKey] as unknown as boolean) = false;\n }\n\n this.metadataDefaultNumber = this.metadata as DefaultNumberDecoratorConfigInternal;\n this.metadataDropdownNumber = this.metadata as DropdownNumberDecoratorConfigInternal;\n\n this.metadataDefaultObject = this.metadata as DefaultObjectDecoratorConfigInternal<EntityType>;\n this.objectProperty = this.entity[this.propertyKey] as unknown as EntityType;\n if (this.type === DecoratorTypes.OBJECT) {\n this.objectPropertyRows = EntityUtilities.getEntityRows(this.objectProperty, this.hideOmitForCreate, this.hideOmitForEdit);\n }\n\n this.metadataEntityArray = this.metadata as EntityArrayDecoratorConfigInternal<Entity>;\n if (this.type === DecoratorTypes.ARRAY) {\n if (!this.entity[this.propertyKey]) {\n (this.entity[this.propertyKey] as unknown as EntityType[]) = [];\n }\n this.entityArrayValues = this.entity[this.propertyKey] as unknown as EntityType[];\n if (this.metadataEntityArray.createInline === undefined) {\n this.metadataEntityArray.createInline = true;\n }\n if (!this.metadataEntityArray.createInline && !this.metadataEntityArray.createDialogData) {\n this.metadataEntityArray.createDialogData = {\n title: 'Add'\n }\n }\n // TODO\n const givenDisplayColumns: string[] = this.metadataEntityArray.displayColumns.map((v) => v.displayName);\n if (givenDisplayColumns.find((s) => s === 'select')) {\n throw new Error(\n `The name \"select\" for a display column is reserved.\n Please choose a different name.`\n );\n }\n this.displayedColumns = ['select'].concat(givenDisplayColumns);\n this.dataSource = new MatTableDataSource();\n this.dataSource.data = this.entityArrayValues;\n this.arrayItem = new this.metadataEntityArray.EntityClass() as EntityType;\n this.arrayItemInlineRows = EntityUtilities.getEntityRows(\n this.arrayItem,\n this.hideOmitForCreate === false ? false : true,\n this.hideOmitForEdit ? true : false\n );\n this.arrayItemPriorChanges = cloneDeep(this.arrayItem);\n\n this.dialogInputData = {\n entity: this.arrayItem,\n createDialogData: this.metadataEntityArray.createDialogData,\n getValidationErrorMessage: this.getValidationErrorMessage\n }\n this.dialogData = new AddArrayItemDialogDataBuilder(this.dialogInputData).getResult();\n this.arrayItemDialogRows = EntityUtilities.getEntityRows(this.dialogData.entity, true);\n }\n\n this.metadataStringChipsArray = this.metadata as StringChipsArrayDecoratorConfigInternal;\n if (\n (this.type === DecoratorTypes.ARRAY_STRING_CHIPS || this.type === DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS)\n && (this.entity[this.propertyKey] as unknown as string[])?.length\n ) {\n this.stringChipsArrayValues = (this.entity[this.propertyKey] as unknown as string[]);\n }\n\n this.metadataAutocompleteStringChipsArray = this.metadata as AutocompleteStringChipsArrayDecoratorConfigInternal;\n\n if (!this.getValidationErrorMessage) {\n this.getValidationErrorMessage = getValidationErrorMessage;\n }\n }\n\n /**\n * Tries to add an item to the array.\n * Does this either inline if the \"createInline\"-metadata is set to true\n * or in a separate dialog if it is set to false.\n */\n add(): void {\n if (this.metadataEntityArray.createInline) {\n this.entityArrayValues.push(cloneDeep(this.arrayItem));\n this.dataSource.data = this.entityArrayValues;\n EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);\n }\n else {\n this.addArrayItemDialogRef = this.dialog.open(\n this.addArrayItemDialog,\n {\n data: this.dialogData,\n autoFocus: false,\n restoreFocus: false\n }\n )\n }\n }\n\n /**\n * Adds the array item defined in the dialog.\n */\n addArrayItem(): void {\n this.addArrayItemDialogRef.close();\n this.entityArrayValues.push(cloneDeep(this.arrayItem));\n this.dataSource.data = this.entityArrayValues;\n EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);\n }\n\n /**\n * Cancels adding the array item defined in the dialog.\n */\n cancelAddArrayItem(): void {\n this.addArrayItemDialogRef.close();\n EntityUtilities.resetChangesOnEntity(this.arrayItem, this.arrayItemPriorChanges);\n }\n\n /**\n * Removes all selected entries from the array.\n */\n remove(): void {\n this.selection.selected.forEach(s => {\n this.entityArrayValues.splice(this.entityArrayValues.indexOf(s), 1);\n });\n this.dataSource.data = this.entityArrayValues;\n this.selection.clear();\n }\n\n /**\n * Toggles all array-items in the table.\n */\n masterToggle(): void {\n if (this.isAllSelected()) {\n this.selection.clear();\n }\n else {\n this.dataSource.data.forEach((row) => this.selection.select(row));\n }\n }\n\n /**\n * Checks if all array-items in the table have been selected.\n * This is needed to display the \"masterToggle\"-checkbox correctly.\n *\n * @returns Whether or not all array-items in the table have been selected.\n */\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n\n /**\n * Handles adding strings to the chipsArray.\n * Checks validation and also creates a new array if it is undefined.\n * This is needed because two things are validated: The array itself\n * and the contents of the array. And we need a way to display an\n * mat-error. As the only validation for the array is whether or not\n * it contains values, we can set it to undefined when the last element is removed\n * (removeStringChipArrayValue). That way we can use the \"required\" validator.\n *\n * @param event - The event that fires when a new chip is completed.\n */\n addStringChipArrayValue(event: MatChipInputEvent): void {\n const value = (event.value || '').trim();\n if (value) {\n if (this.metadataStringChipsArray.minLength && value.length < this.metadataStringChipsArray.minLength) {\n return;\n }\n if (this.metadataStringChipsArray.maxLength && value.length > this.metadataStringChipsArray.maxLength) {\n return;\n }\n if (this.metadataStringChipsArray.regex && !value.match(this.metadataStringChipsArray.regex)) {\n return;\n }\n if (!this.stringChipsArrayValues) {\n if (!this.entity[this.propertyKey] as unknown as string[]) {\n (this.entity[this.propertyKey] as unknown as string[]) = [];\n }\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n this.stringChipsArrayValues.push(value);\n }\n event.chipInput!.clear();\n }\n\n /**\n * Removes the given value from the array.\n * Sets the array to undefined if it is now empty.\n * This is needed because two things are validated: The array itself\n * and the contents of the array. And we need a way to display an\n * mat-error. As the only validation for the array is whether or not\n * it is empty, setting it to undefined here enables us to use the \"required\" validator.\n *\n * @param value - The string to remove from the array.\n */\n removeStringChipArrayValue(value: string): void {\n this.stringChipsArrayValues.splice(this.stringChipsArrayValues.indexOf(value), 1);\n if (!this.stringChipsArrayValues.length) {\n (this.entity[this.propertyKey] as unknown) = undefined;\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n }\n\n /**\n * Handles adding a string to the array when an autocomplete value has been selected.\n *\n * @param event - The autocomplete selected event.\n * @param chipsInput - The element where the user typed the value.\n */\n selected(event: MatAutocompleteSelectedEvent, chipsInput: HTMLInputElement): void {\n const value = (event.option.viewValue || '').trim();\n if (this.metadataStringChipsArray.minLength && value.length < this.metadataStringChipsArray.minLength) {\n return;\n }\n if (this.metadataStringChipsArray.maxLength && value.length > this.metadataStringChipsArray.maxLength) {\n return;\n }\n if (this.metadataStringChipsArray.regex && !value.match(this.metadataStringChipsArray.regex)) {\n return;\n }\n if (!this.stringChipsArrayValues) {\n if (!this.entity[this.propertyKey] as unknown as string[]) {\n (this.entity[this.propertyKey] as unknown as string[]) = [];\n }\n this.stringChipsArrayValues = this.entity[this.propertyKey] as unknown as string[];\n }\n this.stringChipsArrayValues.push(value);\n chipsInput.value = '';\n }\n\n /**\n * Dynamically filters the Autocomplete options when the user inputs something.\n *\n * @param input - The input of the user.\n */\n filterAutocompleteStrings(input: unknown): void {\n const filterValue = (input as string).toLowerCase();\n this.filteredAutocompleteStrings = this.autocompleteStrings.filter(s => s.toLowerCase().includes(filterValue));\n }\n}","<div [ngSwitch]=\"type\" *ngIf=\"!(hideOmitForCreate && metadata.omitForCreate) && !(hideOmitForEdit && metadata.omitForUpdate)\">\n <!-------------------------------------------->\n <!-----------------Strings-------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.STRING\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [pattern]=\"metadataDefaultString.regex ? metadataDefaultString.regex : '[\\\\s\\\\S]*'\"\n [minlength]=\"metadataDefaultString.minLength ? metadataDefaultString.minLength : null\"\n [maxlength]=\"metadataDefaultString.maxLength ? metadataDefaultString.maxLength : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_TEXTBOX\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <textarea\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n cdkTextareaAutosize\n cdkAutosizeMinRows=\"10\"\n [required]=\"metadata.required\"\n [minlength]=\"metadataTextboxString.minLength ? metadataTextboxString.minLength : null\"\n [maxlength]=\"metadataTextboxString.maxLength ? metadataTextboxString.maxLength : null\"\n >\n </textarea>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_AUTOCOMPLETE\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [matAutocomplete]=\"auto\"\n (keyup)=\"filterAutocompleteStrings(entity[propertyKey])\"\n [required]=\"metadata.required\"\n [minlength]=\"metadataAutocompleteString.minLength ? metadataAutocompleteString.minLength : null\"\n [maxlength]=\"metadataAutocompleteString.maxLength ? metadataAutocompleteString.maxLength : null\"\n [pattern]=\"metadataAutocompleteString.regex ? metadataAutocompleteString.regex : '[\\\\s\\\\S]*'\"\n />\n <mat-autocomplete #auto=\"matAutocomplete\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.STRING_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required\">\n <mat-option *ngFor=\"let value of metadataDropdownString.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-----------------Booleans------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_CHECKBOX\">\n <mat-form-field class=\"hideUnderline\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-checkbox (click)=\"model.control.markAsTouched()\" [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\"></mat-checkbox>\n <!-- hidden input is needed so that the checkbox can be used inside a mat-form-field -->\n <input matInput hidden\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString() + 'Helper'\"\n #model=\"ngModel\"\n [pattern]=\"metadata.required ? 'true' : '[\\\\s\\\\S]*'\"\n [required]=\"metadata.required\">\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_TOGGLE\">\n <mat-form-field class=\"hideUnderline\">\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-slide-toggle (click)=\"model.control.markAsTouched()\" [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\"></mat-slide-toggle>\n <!-- hidden input is needed so that the toggle can be used inside a mat-form-field -->\n <input matInput hidden\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString() + 'Helper'\"\n #model=\"ngModel\"\n [pattern]=\"metadata.required ? 'true' : '[\\\\s\\\\S]*'\"\n [required]=\"metadata.required\">\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.BOOLEAN_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required\">\n <mat-option [value]=\"undefined\">-</mat-option>\n <mat-option [value]=\"true\">{{metadataDropdownBoolean.dropdownTrue}}</mat-option>\n <mat-option [value]=\"false\">{{metadataDropdownBoolean.dropdownFalse}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!------------------Numbers------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <input\n matInput\n type=\"number\"\n [(ngModel)]=\"entity[propertyKey]\"\n [name]=\"propertyKey.toString()\"\n #model=\"ngModel\"\n [required]=\"metadata.required\"\n [min]=\"metadataDefaultNumber.min ? metadataDefaultNumber.min : null\"\n [max]=\"metadataDefaultNumber.max ? metadataDefaultNumber.max : null\"\n />\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.NUMBER_DROPDOWN\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-select [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\" [required]=\"metadata.required\">\n <mat-option *ngFor=\"let value of metadataDropdownNumber.dropdownValues\" [value]=\"value.value\">{{value.displayName}}</mat-option>\n </mat-select>\n <mat-error>{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Object------------------->\n <!-------------------------------------------->\n <div *ngSwitchCase=\"DecoratorTypes.OBJECT\">\n <b>{{metadataDefaultObject.displayName}}</b>\n <!-- iterates over the object properties -->\n\n <div class=\"row\" *ngFor=\"let row of objectPropertyRows\">\n <!--\n displays another ngx-material-entity with the:\n object as the entity,\n the current key in the loop received by the keyvalue direction as the propertyKey\n and the getValidationErrorMessage of the current component\n -->\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"objectProperty\"\n [propertyKey]=\"key\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n [hideOmitForCreate]=\"hideOmitForCreate\"\n [hideOmitForEdit]=\"hideOmitForEdit\"\n class=\"col-lg-{{getWidth(objectProperty, key, 'lg')}} col-md-{{getWidth(objectProperty, key, 'md')}} col-sm-{{getWidth(objectProperty, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n\n <!-------------------------------------------->\n <!-------------------Array-------------------->\n <!-------------------------------------------->\n <div class=\"entityArray\" *ngSwitchCase=\"DecoratorTypes.ARRAY\">\n <div class=\"mat-elevation-z8\" style=\"border-radius: 5px;padding: 15px;margin-bottom: 15px;margin-top: 15px;\">\n\n <div style=\"padding-bottom: 10px\">\n <b>{{metadataEntityArray.displayName}}</b>\n </div>\n <div *ngIf=\"metadataEntityArray.createInline\">\n <div class=\"row\" *ngFor=\"let row of arrayItemInlineRows\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys; let i = index; trackBy: trackByFn\"\n [entity]=\"arrayItem\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"getValidationErrorMessage\"\n class=\"col-lg-{{getWidth(arrayItem, key, 'lg')}} col-md-{{getWidth(arrayItem, key, 'md')}} col-sm-{{getWidth(arrayItem, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </div>\n \n <div class=\"buttons\">\n <button mat-raised-button\n [disabled]=\"metadataEntityArray.createInline && !EntityUtilities.isEntityValid(arrayItem, 'create')\"\n (click)=\"add()\">\n {{metadataEntityArray.addButtonLabel}}\n </button>\n <button mat-raised-button\n [disabled]=\"!selection.selected.length\"\n (click)=\"remove()\">\n {{metadataEntityArray.removeButtonLabel}}\n </button>\n </div>\n \n <mat-table [dataSource]=\"dataSource\">\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox [disabled]=\"!dataSource.data.length\" (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"></mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let module\" class=\"module\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(module) : null\" [checked]=\"selection.isSelected(module)\"></mat-checkbox>\n </mat-cell>\n </ng-container>\n \n <ng-container *ngFor=\"let dCol of metadataEntityArray.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell class=\"entity\" *matCellDef=\"let entity\">\n {{dCol.value(entity)}}\n </mat-cell>\n </ng-container>\n \n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n \n <div class=\"array-error\" *ngIf=\"metadataEntityArray.required && !dataSource.data.length\">\n {{metadataEntityArray.missingErrorMessage}}\n </div>\n </div>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_CHIPS\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-list #chipList\n [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\"\n [required]=\"metadata.required\"\n >\n <mat-chip *ngFor=\"let value of stringChipsArrayValues\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button matChipRemove>\n <i class=\"{{metadataStringChipsArray.deleteIcon}}\"></i>\n </button>\n </mat-chip>\n <input matInput\n [matChipInputFor]=\"chipList\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event)\"\n [(ngModel)]=\"chipsInput\" [name]=\"propertyKey.toString()\" #chipsModel=\"ngModel\"\n [minlength]='metadataStringChipsArray.minLength ? metadataStringChipsArray.minLength : null'\n [maxlength]='metadataStringChipsArray.maxLength ? metadataStringChipsArray.maxLength : null'\n [pattern]=\"metadataStringChipsArray.regex ? metadataStringChipsArray.regex : '[\\\\s\\\\S]*'\"\n >\n <mat-error *ngIf=\"chipsModel.errors\">{{getValidationErrorMessage(chipsModel)}}</mat-error>\n </mat-chip-list>\n <mat-error *ngIf=\"!chipsModel.errors\">{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchCase=\"DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\">\n <mat-form-field>\n <mat-label>{{metadata.displayName}}</mat-label>\n <mat-chip-list #chipList\n [(ngModel)]=\"entity[propertyKey]\" [name]=\"propertyKey.toString()\" #model=\"ngModel\"\n [required]=\"metadata.required\"\n >\n <mat-chip *ngFor=\"let value of stringChipsArrayValues\" (removed)=\"removeStringChipArrayValue(value)\">\n {{value}}\n <button matChipRemove>\n <i class=\"{{metadataStringChipsArray.deleteIcon}}\"></i>\n </button>\n </mat-chip>\n <input matInput\n [matChipInputFor]=\"chipList\"\n [matAutocomplete]=\"auto\"\n [matChipInputAddOnBlur]=\"true\"\n (matChipInputTokenEnd)=\"addStringChipArrayValue($event)\"\n (keyup)=\"filterAutocompleteStrings(chipsInput)\"\n [(ngModel)]=\"chipsInput\" [name]=\"propertyKey.toString()\" #chipsModel=\"ngModel\"\n #chipsElement\n [minlength]='metadataStringChipsArray.minLength ? metadataStringChipsArray.minLength : null'\n [maxlength]='metadataStringChipsArray.maxLength ? metadataStringChipsArray.maxLength : null'\n [pattern]=\"metadataStringChipsArray.regex ? metadataStringChipsArray.regex : '[\\\\s\\\\S]*'\"\n >\n <mat-error *ngIf=\"chipsModel.errors\">{{getValidationErrorMessage(chipsModel)}}</mat-error>\n </mat-chip-list>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"selected($event, chipsElement)\">\n <mat-option *ngFor=\"let value of filteredAutocompleteStrings\" [value]=\"value\">\n {{value}}\n </mat-option>\n </mat-autocomplete>\n <mat-error *ngIf=\"!chipsModel.errors\">{{getValidationErrorMessage(model)}}</mat-error>\n </mat-form-field>\n </div>\n\n <div *ngSwitchDefault>ERROR: The type {{type}} is not known.</div>\n</div>\n\n<!--------------------------------------------------------->\n<!--------------------Add Array Item Dialog---------------->\n<!--------------------------------------------------------->\n<ng-template #addArrayItemDialog>\n <h2 mat-dialog-title>{{dialogData.createDialogData.title}}</h2>\n\n <mat-dialog-content>\n <form #form=\"ngForm\" class=\"row\">\n <div class=\"row\" *ngFor=\"let row of arrayItemDialogRows\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"dialogData.entity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n [getValidationErrorMessage]=\"dialogData.getValidationErrorMessage\"\n class=\"col-lg-{{getWidth(dialogData.entity, key, 'lg')}} col-md-{{getWidth(dialogData.entity, key, 'md')}} col-sm-{{getWidth(dialogData.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </form>\n </mat-dialog-content>\n\n <mat-dialog-actions>\n <button mat-raised-button (click)=\"addArrayItem()\" [disabled]=\"!EntityUtilities.isEntityValid(dialogData.entity, 'create')\">\n {{dialogData.createDialogData.createButtonLabel}}\n </button>\n <button mat-raised-button (click)=\"cancelAddArrayItem()\" class=\"cancel-button\">\n {{dialogData.createDialogData.cancelButtonLabel}}\n </button>\n </mat-dialog-actions>\n\n</ng-template>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityInputComponent } from './input.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatSelectModule } from '@angular/material/select';\nimport { MatAutocompleteModule } from '@angular/material/autocomplete';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatSlideToggleModule } from '@angular/material/slide-toggle';\nimport { MatChipsModule } from '@angular/material/chips';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n declarations: [\n NgxMatEntityInputComponent,\n ],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatSelectModule,\n MatAutocompleteModule,\n MatCheckboxModule,\n MatSlideToggleModule,\n MatChipsModule,\n MatIconModule,\n MatTableModule,\n MatDialogModule,\n MatButtonModule\n ],\n exports: [NgxMatEntityInputComponent]\n})\nexport class NgxMatEntityInputModule {}","import { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class'\nimport { CreateEntityDialogData } from './create-entity-dialog-data'\nimport { HttpClient } from '@angular/common/http';\nimport { CreateDialogDataBuilder, CreateDialogDataInternal } from './create-dialog-data.builder';\nimport { BaseBuilder } from '../../../classes/base-builder.class';\n\n/**\n * The internal CreateEntityDialogData. Requires all default values the user can leave out.\n */\nexport class CreateEntityDialogDataInternal<EntityType extends Entity> implements CreateEntityDialogData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n entity: EntityType;\n // eslint-disable-next-line jsdoc/require-jsdoc\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createDialogData: CreateDialogDataInternal;\n\n constructor(\n entity: EntityType,\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>,\n createDialogData: CreateDialogDataInternal\n ) {\n this.entity = entity;\n this.EntityServiceClass = EntityServiceClass;\n this.createDialogData = createDialogData;\n }\n}\n\n/**\n * The Builder for the CreateEntityDialogData. Sets default values.\n */\nexport class CreateEntityDialogDataBuilder<EntityType extends Entity>\n extends BaseBuilder<CreateEntityDialogDataInternal<EntityType>, CreateEntityDialogData<EntityType>> {\n\n constructor(data: CreateEntityDialogData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data: CreateEntityDialogData<EntityType>): CreateEntityDialogDataInternal<EntityType> {\n const createDialogData: CreateDialogDataInternal = new CreateDialogDataBuilder(data.createDialogData).getResult();\n return new CreateEntityDialogDataInternal<EntityType>(\n data.entity,\n data.EntityServiceClass,\n createDialogData\n );\n }\n}","import { Component, Inject, Injector, OnInit } from '@angular/core';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { EntityRow, EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { NgxMatEntityConfirmDialogComponent } from '../../confirm-dialog/confirm-dialog.component';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';\nimport { CreateEntityDialogDataBuilder, CreateEntityDialogDataInternal } from './create-entity-dialog-data.builder';\nimport { CreateEntityDialogData } from './create-entity-dialog-data';\n\n/**\n * The default dialog used to create new entities based on the configuration passed in the MAT_DIALOG_DATA \"inputData\".\n * Used by the ngx-mat-entity-table.\n *\n * It offers a lot of customization options which can be found in \"CreateEntityDialogData\".\n */\n@Component({\n selector: 'ngx-mat-entity-create-dialog',\n templateUrl: './create-entity-dialog.component.html',\n styleUrls: ['./create-entity-dialog.component.scss']\n})\nexport class NgxMatEntityCreateDialogComponent<EntityType extends Entity> implements OnInit {\n EntityUtilities = EntityUtilities;\n\n entityRows!: EntityRow<EntityType>[];\n\n entityService!: EntityService<EntityType>;\n\n data!: CreateEntityDialogDataInternal<EntityType>;\n\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n @Inject(MAT_DIALOG_DATA)\n private readonly inputData: CreateEntityDialogData<EntityType>,\n public dialogRef: MatDialogRef<NgxMatEntityCreateDialogComponent<EntityType>>,\n private readonly injector: Injector,\n private readonly dialog: MatDialog\n ) {}\n\n ngOnInit(): void {\n this.data = new CreateEntityDialogDataBuilder(this.inputData).getResult();\n this.dialogRef.disableClose = true;\n this.entityRows = EntityUtilities.getEntityRows(this.data.entity, true);\n this.entityService = this.injector.get(this.data.EntityServiceClass) as EntityService<EntityType>;\n }\n\n /**\n * Tries add the new entity and close the dialog afterwards.\n * Also handles the confirmation if required.\n */\n create(): void {\n if (!this.data.createDialogData?.createRequiresConfirmDialog) {\n return this.confirmCreate();\n }\n const dialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(this.data.createDialogData?.confirmCreateDialogData)\n .withDefault('text', ['Do you really want to create this entity?'])\n .withDefault('confirmButtonLabel', 'Create')\n .withDefault('title', 'Create')\n .getResult();\n const dialogRef = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogRef.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmCreate();\n }\n });\n }\n private confirmCreate(): void {\n this.entityService.create(this.data.entity).then(() => this.dialogRef.close());\n }\n\n /**\n * Closes the dialog.\n */\n cancel(): void {\n this.dialogRef.close();\n }\n}","<h2 mat-dialog-title>{{data.createDialogData.title}}</h2>\n\n<mat-dialog-content>\n <form #form=\"ngForm\">\n <div class=\"row\" *ngFor=\"let row of entityRows\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"data.entity\"\n [propertyKey]=\"key\"\n [hideOmitForCreate]=\"true\"\n class=\"col-lg-{{getWidth(data.entity, key, 'lg')}} col-md-{{getWidth(data.entity, key, 'md')}} col-sm-{{getWidth(data.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-raised-button (click)=\"create()\" [disabled]=\"!EntityUtilities.isEntityValid(data.entity, 'create')\">\n {{data.createDialogData.createButtonLabel}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.createDialogData.cancelButtonLabel}}\n </button>\n</mat-dialog-actions>\n","import { BaseBuilder } from '../../../classes/base-builder.class';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { ConfirmDialogData } from '../../confirm-dialog/confirm-dialog-data';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';\nimport { EditDialogData } from '../table-data';\n\n/**\n * The internal EditDialogData. Requires all default values the user can leave out.\n */\nexport class EditDialogDataInternal<EntityType extends Entity> implements EditDialogData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n title: (entity: EntityType) => string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n deleteButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n cancelButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n deleteRequiresConfirmDialog: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n editRequiresConfirmDialog: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmDeleteDialogData: ConfirmDialogData;\n // eslint-disable-next-line jsdoc/require-jsdoc\n confirmEditDialogData: ConfirmDialogData;\n\n constructor(\n title: (entity: EntityType) => string,\n confirmButtonLabel: string,\n deleteButtonLabel: string,\n cancelButtonLabel: string,\n deleteRequiresConfirmDialog: boolean,\n editRequiresConfirmDialog: boolean,\n confirmDeleteDialogData: ConfirmDialogData,\n confirmEditDialogData: ConfirmDialogData\n ) {\n this.title = title;\n this.confirmButtonLabel = confirmButtonLabel;\n this.deleteButtonLabel = deleteButtonLabel;\n this.cancelButtonLabel = cancelButtonLabel;\n this.deleteRequiresConfirmDialog = deleteRequiresConfirmDialog;\n this.editRequiresConfirmDialog = editRequiresConfirmDialog;\n this.confirmDeleteDialogData = confirmDeleteDialogData;\n this.confirmEditDialogData = confirmEditDialogData;\n }\n}\n\n/**\n * The Builder for the EditDialogData. Sets default values.\n */\nexport class EditDialogDataBuilder<EntityType extends Entity>\n extends BaseBuilder<EditDialogDataInternal<EntityType>, EditDialogData<EntityType>> {\n\n constructor(data?: EditDialogData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data?: EditDialogData<EntityType>): EditDialogDataInternal<EntityType> {\n const confirmEditDialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(data?.confirmEditDialogData)\n .withDefault('confirmButtonLabel', 'Save')\n .withDefault('text', ['Do you really want to save all changes?'])\n .withDefault('title', 'Edit')\n .getResult();\n\n const confirmDeleteDialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(data?.confirmDeleteDialogData)\n .withDefault('confirmButtonLabel', 'Delete')\n .withDefault('type', 'delete')\n .withDefault('text', ['Do you really want to delete this entity?'])\n .withDefault('title', 'Delete')\n .getResult();\n\n return new EditDialogDataInternal(\n data?.title ? data.title : () => 'Edit',\n data?.confirmButtonLabel ? data.confirmButtonLabel : 'Save',\n data?.deleteButtonLabel ? data.deleteButtonLabel : 'Delete',\n data?.cancelButtonLabel ? data.cancelButtonLabel : 'Cancel',\n data?.deleteRequiresConfirmDialog ? data.deleteRequiresConfirmDialog : true,\n data?.editRequiresConfirmDialog ? data.editRequiresConfirmDialog : false,\n confirmDeleteDialogData,\n confirmEditDialogData\n );\n }\n}","import { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class'\nimport { HttpClient } from '@angular/common/http';\nimport { EditEntityDialogData } from './edit-entity-dialog-data';\nimport { EditDialogDataBuilder, EditDialogDataInternal } from './edit-dialog-data.builder';\nimport { BaseBuilder } from '../../../classes/base-builder.class';\n\n/**\n * The internal EditEntityDialogData. Requires all default values the user can leave out.\n */\nexport class EditEntityDialogDataInternal<EntityType extends Entity> implements EditEntityDialogData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n entity: EntityType;\n // eslint-disable-next-line jsdoc/require-jsdoc\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>;\n // eslint-disable-next-line jsdoc/require-jsdoc\n editDialogData: EditDialogDataInternal<EntityType>;\n // eslint-disable-next-line jsdoc/require-jsdoc\n allowDelete: (entity: EntityType) => boolean;\n\n constructor(\n entity: EntityType,\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>,\n editDialogData: EditDialogDataInternal<EntityType>,\n allowDelete: (entity: EntityType) => boolean\n ) {\n this.entity = entity;\n this.EntityServiceClass = EntityServiceClass;\n this.editDialogData = editDialogData;\n this.allowDelete = allowDelete;\n }\n}\n\n/**\n * The Builder for the EditEntityDialogData. Sets default values.\n */\nexport class EditEntityDialogDataBuilder<EntityType extends Entity>\n extends BaseBuilder<EditEntityDialogDataInternal<EntityType>, EditEntityDialogData<EntityType>> {\n\n constructor(data: EditEntityDialogData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data: EditEntityDialogData<EntityType>): EditEntityDialogDataInternal<EntityType> {\n const editDialogData: EditDialogDataInternal<EntityType> = new EditDialogDataBuilder(data.editDialogData).getResult();\n return new EditEntityDialogDataInternal<EntityType>(\n data.entity,\n data.EntityServiceClass,\n editDialogData,\n data.allowDelete ? data.allowDelete : () => true\n );\n }\n}","import { Component, Inject, Injector, OnInit } from '@angular/core';\nimport { MatDialog, MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';\nimport { EntityService } from '../../../classes/entity-service.class';\nimport { Entity } from '../../../classes/entity-model.class';\nimport { EntityRow, EntityUtilities } from '../../../classes/entity-utilities.class';\nimport { cloneDeep } from 'lodash';\nimport { EditEntityDialogData } from './edit-entity-dialog-data';\nimport { NgxMatEntityConfirmDialogComponent } from '../../confirm-dialog/confirm-dialog.component';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from '../../confirm-dialog/confirm-dialog-data.builder';\nimport { EditEntityDialogDataBuilder, EditEntityDialogDataInternal } from './edit-entity-dialog.builder';\n\n/**\n * The default dialog used to edit an existing entity based on the configuration passed in the MAT_DIALOG_DATA \"inputData\".\n * Used by the ngx-mat-entity-table.\n *\n * It offers a lot of customization options which can be found in \"EditEntityDialogData\".\n */\n@Component({\n selector: 'ngx-mat-entity-edit-dialog',\n templateUrl: './edit-entity-dialog.component.html',\n styleUrls: ['./edit-entity-dialog.component.scss']\n})\nexport class NgxMatEntityEditDialogComponent<EntityType extends Entity> implements OnInit {\n EntityUtilities = EntityUtilities;\n\n entityRows!: EntityRow<EntityType>[];\n\n entityService!: EntityService<EntityType>;\n\n entityPriorChanges!: EntityType;\n\n data!: EditEntityDialogDataInternal<EntityType>;\n\n getWidth = EntityUtilities.getWidth;\n\n constructor(\n @Inject(MAT_DIALOG_DATA)\n private readonly inputData: EditEntityDialogData<EntityType>,\n public dialogRef: MatDialogRef<NgxMatEntityEditDialogComponent<EntityType>>,\n private readonly injector: Injector,\n private readonly dialog: MatDialog\n ) {}\n\n ngOnInit(): void {\n this.data = new EditEntityDialogDataBuilder(this.inputData).getResult();\n this.dialogRef.disableClose = true;\n this.entityRows = EntityUtilities.getEntityRows(this.data.entity, false, true);\n this.entityService = this.injector.get(this.data.EntityServiceClass) as EntityService<EntityType>;\n this.entityPriorChanges = cloneDeep(this.data.entity);\n }\n\n /**\n * Tries to save the changes and close the dialog afterwards.\n * Also handles the confirmation if required.\n */\n edit(): void {\n if (!this.data.editDialogData.editRequiresConfirmDialog) {\n return this.confirmEdit();\n }\n const dialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(this.data.editDialogData.confirmEditDialogData)\n .withDefault('text', ['Do you really want to save all changes?'])\n .withDefault('confirmButtonLabel', 'Save')\n .withDefault('title', 'Edit')\n .getResult();\n const dialogRef = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogRef.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmEdit();\n }\n });\n }\n\n private confirmEdit(): void {\n this.entityService.update(this.data.entity, this.entityPriorChanges).then(() => this.dialogRef.close(1));\n }\n\n /**\n * Tries to delete the entity and close the dialog afterwards.\n * Also handles the confirmation if required.\n */\n delete(): void {\n if (!this.data.editDialogData.deleteRequiresConfirmDialog) {\n return this.confirmDelete();\n }\n const dialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(this.data.editDialogData.confirmDeleteDialogData)\n .withDefault('text', ['Do you really want to delete this entity?'])\n .withDefault('type', 'delete')\n .withDefault('confirmButtonLabel', 'Delete')\n .withDefault('title', 'Delete')\n .getResult();\n const dialogRef = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogRef.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmDelete();\n }\n });\n }\n\n private confirmDelete(): void {\n this.entityService.delete(this.entityPriorChanges.id).then(() => this.dialogRef.close(2));\n }\n\n /**\n * Reverts all changes made and closes the dialog.\n */\n cancel(): void {\n EntityUtilities.resetChangesOnEntity(this.data.entity, this.entityPriorChanges);\n this.dialogRef.close(0);\n }\n}","<h2 mat-dialog-title>\n {{data.editDialogData.title(data.entity)}}\n <button *ngIf=\"data.allowDelete(data.entity)\" mat-raised-button (click)=\"delete()\" color=\"warn\" class=\"delete-button\" tabindex=\"-1\">\n {{data.editDialogData.deleteButtonLabel}}\n </button>\n</h2>\n\n<mat-dialog-content>\n <form #form=\"ngForm\" class=\"row\">\n <div class=\"row\" *ngFor=\"let row of entityRows\">\n <ngx-mat-entity-input\n *ngFor=\"let key of row.keys\"\n [entity]=\"data.entity\"\n [propertyKey]=\"key\"\n [hideOmitForEdit]=\"true\"\n class=\"col-lg-{{getWidth(data.entity, key, 'lg')}} col-md-{{getWidth(data.entity, key, 'md')}} col-sm-{{getWidth(data.entity, key, 'sm')}}\"\n >\n </ngx-mat-entity-input>\n </div>\n </form>\n</mat-dialog-content>\n\n<mat-dialog-actions>\n <button mat-raised-button (click)=\"edit()\" [disabled]=\"!EntityUtilities.isEntityValid(data.entity, 'update') || !EntityUtilities.dirty(data.entity, entityPriorChanges)\">\n {{data.editDialogData.confirmButtonLabel}}\n </button>\n <button mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.editDialogData.cancelButtonLabel}}\n </button>\n</mat-dialog-actions>\n","import { EntityService } from '../../classes/entity-service.class';\nimport { Entity } from '../../classes/entity-model.class';\nimport { CreateDialogDataBuilder, CreateDialogDataInternal } from './create-dialog/create-dialog-data.builder';\nimport { EditDialogDataBuilder, EditDialogDataInternal } from './edit-dialog/edit-dialog-data.builder';\nimport { BaseData, DisplayColumn, MultiSelectAction, TableData } from './table-data';\nimport { HttpClient } from '@angular/common/http';\nimport { BaseBuilder } from '../../classes/base-builder.class';\n\n/**\n * The internal TableData. Requires all default values the user can leave out.\n */\nexport class TableDataInternal<EntityType extends Entity> implements TableData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n baseData: BaseDataInternal<EntityType>;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createDialogData: CreateDialogDataInternal;\n // eslint-disable-next-line jsdoc/require-jsdoc\n editDialogData: EditDialogDataInternal<EntityType>;\n\n constructor(\n baseData: BaseDataInternal<EntityType>,\n createDialogData: CreateDialogDataInternal,\n editDialogData: EditDialogDataInternal<EntityType>\n ) {\n this.baseData = baseData;\n this.createDialogData = createDialogData;\n this.editDialogData = editDialogData;\n }\n}\n\n/**\n * The Builder for the table BaseData. Sets default values.\n */\nexport class BaseDataBuilder<EntityType extends Entity> extends BaseBuilder<BaseDataInternal<EntityType>, BaseData<EntityType>> {\n\n constructor(data: BaseData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data: BaseData<EntityType>): BaseDataInternal<EntityType> {\n return new BaseDataInternal<EntityType>(\n data.title,\n data.displayColumns,\n data.EntityServiceClass,\n data.searchLabel ? data.searchLabel : 'Search',\n data.createButtonLabel ? data.createButtonLabel : 'Create',\n data.searchString ? data.searchString : defaultSearchFunction,\n data.allowCreate === false ? data.allowCreate : true,\n data.allowEdit ? data.allowEdit : () => true,\n data.allowDelete ? data.allowDelete : () => true,\n data.multiSelectActions ? data.multiSelectActions : [],\n data.multiSelectLabel ? data.multiSelectLabel : 'Actions',\n data.EntityClass,\n data.edit,\n data.create\n );\n }\n}\n\n/**\n * The internal TableData. Requires all default values the user can leave out.\n */\nexport class BaseDataInternal<EntityType extends Entity> implements BaseData<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n title: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayColumns: DisplayColumn<EntityType>[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>;\n // eslint-disable-next-line jsdoc/require-jsdoc\n searchLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n searchString: (entity: EntityType) => string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n allowCreate: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n allowEdit: (entity: EntityType) => boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n allowDelete: (entity: EntityType) => boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n multiSelectActions: MultiSelectAction<EntityType>[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n multiSelectLabel: string\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n EntityClass?: new (entity?: EntityType) => EntityType;\n // eslint-disable-next-line jsdoc/require-jsdoc\n edit?: (entity: EntityType) => unknown;\n // eslint-disable-next-line jsdoc/require-jsdoc\n create?: (entity: EntityType) => unknown;\n\n constructor(\n title: string,\n displayColumns: DisplayColumn<EntityType>[],\n EntityServiceClass: new (httpClient: HttpClient) => EntityService<EntityType>,\n searchLabel: string,\n createButtonLabel: string,\n searchString: (entity: EntityType) => string,\n allowCreate: boolean,\n allowEdit: (entity: EntityType) => boolean,\n allowDelete: (entity: EntityType) => boolean,\n multiSelectActions: MultiSelectAction<EntityType>[],\n multiSelectLabel: string,\n\n EntityClass?: new (entity?: EntityType) => EntityType,\n edit?: (entity: EntityType) => unknown,\n create?: (entity: EntityType) => unknown,\n ) {\n this.title = title;\n this.displayColumns = displayColumns;\n this.EntityServiceClass = EntityServiceClass;\n this.EntityClass = EntityClass;\n this.searchLabel = searchLabel;\n this.createButtonLabel = createButtonLabel;\n this.searchString = searchString;\n this.allowCreate = allowCreate;\n this.allowEdit = allowEdit;\n this.allowDelete = allowDelete;\n this.multiSelectActions = multiSelectActions;\n this.multiSelectLabel = multiSelectLabel;\n this.edit = edit;\n this.create = create;\n }\n}\n\n/**\n * The Builder for the complete TableData. Sets default values and validates user input.\n */\nexport class TableDataBuilder<EntityType extends Entity> extends BaseBuilder<TableDataInternal<EntityType>, TableData<EntityType>> {\n\n constructor(data: TableData<EntityType>) {\n super(data);\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected generateBaseData(data: TableData<EntityType>): TableDataInternal<EntityType> {\n const createDialogData: CreateDialogDataInternal = new CreateDialogDataBuilder(data.createDialogData).getResult();\n const editDialogData: EditDialogDataInternal<EntityType> = new EditDialogDataBuilder(data.editDialogData).getResult();\n const baseData: BaseDataInternal<EntityType> = new BaseDataBuilder(data.baseData).getResult();\n return new TableDataInternal<EntityType>(\n baseData,\n createDialogData,\n editDialogData\n );\n }\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n protected override validateInput(data: TableData<EntityType>): void {\n if (data.baseData.multiSelectActions?.length && data.baseData.displayColumns.find(dp => dp.displayName === 'select')) {\n throw new Error(\n `The name \"select\" for a display column is reserved for the multi-select action functionality.\n Please choose a different name.`\n );\n }\n if (\n (\n data.baseData.allowEdit && data.baseData.allowEdit !== (() => false)\n || data.baseData.allowDelete && data.baseData.allowDelete !== (() => false)\n || data.baseData.allowCreate\n )\n && !data.baseData.EntityClass\n ) {\n throw new Error(`\n Missing required Input data \"EntityClass\".\n You can only omit this value if you can neither create or update entities.`\n );\n }\n if (data.baseData.allowCreate !== false && !data.baseData.create && !data.createDialogData) {\n throw new Error(\n `Missing required Input data \"createDialogData\".\n You can only omit this value when creation is disallowed or done with a custom create method.`\n );\n }\n if (\n (\n data.baseData.allowEdit !== (() => false)\n || data.baseData.allowDelete !== (() => false)\n )\n && !data.baseData.edit\n && !data.editDialogData\n ) {\n throw new Error(\n `Missing required Input data \"editDialogData\".\n You can only omit this value when editing and deleting is disallowed or done with a custom edit method.`\n );\n }\n }\n}\n\n/**\n * The default search function taken from googles mat table.\n * This will be used if no custom search function is provided by the configuration.\n *\n * It generates a string from an entity which is then used to compare it to the search input.\n *\n * @param entity - An entity that is in the search.\n * @returns The generated string of the given entity used for comparison with the search input.\n */\nfunction defaultSearchFunction<EntityType extends Entity>(entity: EntityType): string {\n const searchString = Object.keys(entity as unknown as Record<string, unknown>)\n .reduce((currentTerm: string, key: string) => {\n return `${currentTerm}${(entity as unknown as Record<string, unknown>)[key]}◬`;\n }, '')\n .toLowerCase();\n return searchString;\n}","import { Component, Injector, Input, OnDestroy, OnInit, ViewChild } from '@angular/core';\nimport { MatPaginator } from '@angular/material/paginator';\nimport { MatSort } from '@angular/material/sort';\nimport { MatTableDataSource } from '@angular/material/table';\nimport { EntityService } from '../../classes/entity-service.class';\nimport { firstValueFrom, Subject, takeUntil } from 'rxjs';\nimport { Entity } from '../../classes/entity-model.class';\nimport { SelectionModel } from '@angular/cdk/collections';\nimport { MatDialog } from '@angular/material/dialog';\nimport { NgxMatEntityCreateDialogComponent } from './create-dialog/create-entity-dialog.component';\nimport { NgxMatEntityEditDialogComponent } from './edit-dialog/edit-entity-dialog.component';\nimport { EditEntityDialogData } from './edit-dialog/edit-entity-dialog-data';\nimport { MultiSelectAction, TableData } from './table-data';\nimport { NgxMatEntityConfirmDialogComponent } from '../confirm-dialog/confirm-dialog.component';\nimport { ConfirmDialogDataBuilder, ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';\nimport { CreateEntityDialogDataBuilder, CreateEntityDialogDataInternal } from './create-dialog/create-entity-dialog-data.builder';\nimport { TableDataBuilder, TableDataInternal } from './table-data.builder';\nimport { EditEntityDialogDataBuilder, EditEntityDialogDataInternal } from '../table/edit-dialog/edit-entity-dialog.builder';\n\n/**\n * Generates a fully functional table for displaying, creating, updating and deleting entities\n * based on the configuration passed in the @Input \"tableData\".\n *\n * It offers a lot of customization options which can be found in \"TableData\".\n */\n@Component({\n selector: 'ngx-mat-entity-table',\n templateUrl: './table.component.html',\n styleUrls: ['./table.component.scss']\n})\nexport class NgxMatEntityTableComponent<EntityType extends Entity> implements OnInit, OnDestroy {\n\n /**\n * The configuration for the component.\n */\n @Input()\n tableData!: TableData<EntityType>;\n\n data!: TableDataInternal<EntityType>;\n\n private entityService!: EntityService<EntityType>;\n private readonly onDestroy = new Subject<void>();\n @ViewChild(MatPaginator, { static: true }) paginator!: MatPaginator;\n @ViewChild(MatSort, { static: true }) sort!: MatSort;\n @ViewChild('filter', { static: true }) filter!: string;\n displayedColumns!: string[];\n dataSource: MatTableDataSource<EntityType> = new MatTableDataSource();\n selection: SelectionModel<EntityType> = new SelectionModel<EntityType>(true, []);\n\n constructor(private readonly dialog: MatDialog, private readonly injector: Injector) {}\n\n /**\n * Sets up all the configuration for the table and the EntityService.\n */\n ngOnInit(): void {\n this.data = new TableDataBuilder(this.tableData).getResult();\n\n this.entityService = this.injector.get(this.data.baseData.EntityServiceClass) as EntityService<EntityType>;\n\n const givenDisplayColumns = this.data.baseData.displayColumns.map((v) => v.displayName);\n if (this.data.baseData.multiSelectActions.length) {\n this.displayedColumns = ['select'].concat(givenDisplayColumns);\n }\n else {\n this.displayedColumns = givenDisplayColumns;\n }\n\n this.dataSource.sortingDataAccessor = (entity: EntityType, header: string) => {\n return this.data.baseData.displayColumns.find((dp) => dp.displayName === header)?.value(entity) as string;\n };\n this.dataSource.sort = this.sort;\n if (this.data.baseData.searchString) {\n this.dataSource.filterPredicate = (entity: EntityType, filter: string) => {\n const searchStr = this.data.baseData.searchString(entity) ;\n const formattedSearchString = searchStr.toLowerCase();\n const formattedFilterString = filter.toLowerCase();\n return formattedSearchString.includes(formattedFilterString);\n };\n }\n this.dataSource.filter = this.filter;\n this.dataSource.paginator = this.paginator;\n\n this.entityService.entitiesSubject.pipe(takeUntil(this.onDestroy)).subscribe((entities) => {\n this.dataSource.data = entities;\n this.selection.clear();\n });\n this.entityService.read();\n }\n\n /**\n * Edits an entity. This either calls the edit-Method provided by the user or uses a default edit-dialog.\n *\n * @param entity - The entity that should be updated.\n * @throws When no EntityClass was provided, as a new call is needed to initialize metadata.\n */\n editEntity(entity: EntityType): void {\n if (this.data.baseData.allowEdit(entity)) {\n if (!this.data.baseData.EntityClass) {\n throw new Error('No \"EntityClass\" specified for this table');\n }\n if (this.data.baseData.edit) {\n this.data.baseData.edit(new this.data.baseData.EntityClass(entity));\n }\n else {\n this.editDefault(new this.data.baseData.EntityClass(entity));\n }\n }\n }\n\n private editDefault(entity: EntityType): void {\n const inputDialogData: EditEntityDialogData<EntityType> = {\n entity: entity,\n EntityServiceClass: this.data.baseData.EntityServiceClass,\n allowDelete: this.data.baseData.allowDelete,\n editDialogData: this.data.editDialogData\n }\n const dialogData: EditEntityDialogDataInternal<EntityType> = new EditEntityDialogDataBuilder(inputDialogData).getResult();\n firstValueFrom(\n this.dialog.open(NgxMatEntityEditDialogComponent, {\n data: dialogData,\n minWidth: '60%',\n autoFocus: false,\n restoreFocus: false\n }).afterClosed()\n ).then((res: number) => {\n if (res === 0) {\n const data = this.dataSource.data;\n data[this.dataSource.data.findIndex((e) => e.id === entity.id)] = entity;\n this.dataSource.data = data;\n this.selection.clear();\n }\n });\n }\n\n /**\n * Creates a new Entity. This either calls the create-Method provided by the user or uses a default create-dialog.\n *\n * @throws When no EntityClass was provided, as a new call is needed to initialize metadata.\n */\n createEntity(): void {\n if (this.data.baseData.allowCreate) {\n if (!this.data.baseData.EntityClass) {\n throw new Error('No \"EntityClass\" specified for this table');\n }\n if (this.data.baseData.create) {\n this.data.baseData.create(new this.data.baseData.EntityClass());\n }\n else {\n this.createDefault(new this.data.baseData.EntityClass());\n }\n }\n }\n\n private createDefault(entity: EntityType): void {\n const dialogData: CreateEntityDialogDataInternal<EntityType> = new CreateEntityDialogDataBuilder(\n {\n entity: entity,\n EntityServiceClass: this.data.baseData.EntityServiceClass,\n createDialogData: this.data.createDialogData\n }\n ).getResult();\n this.dialog.open(NgxMatEntityCreateDialogComponent, {\n data: dialogData,\n minWidth: '60%',\n autoFocus: false,\n restoreFocus: false\n });\n }\n\n /**\n * Runs the MultiAction for all selected entries.\n * Also handles confirmation with an additional dialog if configured.\n *\n * @param action - The MultiAction to run.\n */\n runMultiAction(action: MultiSelectAction<EntityType>): void {\n if (!action.requireConfirmDialog || !action.requireConfirmDialog(this.selection.selected)) {\n return this.confirmRunMultiAction(action);\n }\n const dialogData: ConfirmDialogDataInternal = new ConfirmDialogDataBuilder(action.confirmDialogData)\n .withDefault('text', [`Do you really want to run this action on ${this.selection.selected.length} entries?`])\n .withDefault('title', action.displayName)\n .getResult();\n const dialogRef = this.dialog.open(NgxMatEntityConfirmDialogComponent, {\n data: dialogData,\n autoFocus: false,\n restoreFocus: false\n });\n dialogRef.afterClosed().subscribe((res: number) => {\n if (res === 1) {\n this.confirmRunMultiAction(action);\n }\n });\n }\n\n private confirmRunMultiAction(action: MultiSelectAction<EntityType>): void {\n action.action(this.selection.selected);\n }\n\n /**\n * Checks if an MultiAction is disabled (e.g. Because no entries have been selected).\n *\n * @param action - The MultiAction to check.\n * @returns Whether or not the Action can be used.\n */\n multiActionDisabled(action: MultiSelectAction<EntityType>): boolean {\n if (!this.selection.selected.length) {\n return true;\n }\n if (action.enabled?.(this.selection.selected) === false) {\n return true;\n }\n return false;\n }\n\n /**\n * Toggles all entries in the table.\n */\n masterToggle(): void {\n if (this.isAllSelected()) {\n this.selection.clear();\n }\n else {\n this.dataSource.data.forEach((row) => this.selection.select(row));\n }\n }\n\n /**\n * Checks if all entries in the table have been selected.\n * This is needed to display the \"masterToggle\"-checkbox correctly.\n *\n * @returns Whether or not all entries in the table have been selected.\n */\n isAllSelected(): boolean {\n const numSelected = this.selection.selected.length;\n const numRows = this.dataSource.data.length;\n return numSelected === numRows;\n }\n\n ngOnDestroy(): void {\n this.onDestroy.next(undefined);\n this.onDestroy.complete();\n }\n\n /**\n * Applies the search input to filter the table entries.\n *\n * @param event - The keyup-event which contains the search-string of the user.\n */\n applyFilter(event: Event): void {\n const filterValue = (event.target as HTMLInputElement).value;\n this.dataSource.filter = filterValue.trim().toLowerCase();\n }\n}","<h1 class=\"title\">{{data.baseData.title}}</h1>\n\n<div class=\"row\">\n <mat-form-field class=\"col-lg-8 col-md-6 col-sm-12\">\n <mat-label>{{data.baseData.searchLabel}}</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\" />\n </mat-form-field>\n <div\n *ngIf=\"data.baseData.multiSelectActions.length\"\n [class.col-lg-2]=\"data.baseData.allowCreate\"\n [class.col-lg-4]=\"!data.baseData.allowCreate\"\n [class.col-md-3]=\"data.baseData.allowCreate\"\n [class.col-md-6]=\"!data.baseData.allowCreate\"\n [class.col-sm-6]=\"data.baseData.allowCreate\"\n [class.col-sm-12]=\"!data.baseData.allowCreate\"\n >\n <button class=\"actions-button\" [matMenuTriggerFor]=\"menu\" mat-raised-button>\n {{data.baseData.multiSelectLabel}}\n </button>\n </div>\n <mat-menu #menu=\"matMenu\">\n <button *ngFor=\"let action of data.baseData.multiSelectActions\" [disabled]=\"multiActionDisabled(action)\" (click)=\"runMultiAction(action)\" mat-menu-item>\n {{action.displayName}}\n </button>\n </mat-menu>\n\n <div\n *ngIf=\"data.baseData.allowCreate\"\n [class.col-lg-2]=\"data.baseData.multiSelectActions.length\"\n [class.col-lg-4]=\"!data.baseData.multiSelectActions.length\"\n [class.col-md-3]=\"data.baseData.multiSelectActions.length\"\n [class.col-md-6]=\"!data.baseData.multiSelectActions.length\"\n [class.col-sm-6]=\"data.baseData.multiSelectActions.length\"\n [class.col-sm-12]=\"!data.baseData.multiSelectActions.length\"\n >\n <button class=\"create-button\" (click)=\"createEntity()\" mat-raised-button>\n {{data.baseData.createButtonLabel}}\n </button>\n </div>\n</div>\n\n<div class=\"mat-elevation-z8\">\n <mat-table *ngIf=\"dataSource\" [dataSource]=\"dataSource\" matSort>\n <!-- select Column -->\n <ng-container matColumnDef=\"select\">\n <mat-header-cell *matHeaderCellDef>\n <mat-checkbox (change)=\"$event ? masterToggle() : null\" [checked]=\"selection.hasValue() && isAllSelected()\" [indeterminate]=\"selection.hasValue() && !isAllSelected()\"> </mat-checkbox>\n </mat-header-cell>\n <mat-cell *matCellDef=\"let module\" class=\"module\">\n <mat-checkbox (click)=\"$event.stopPropagation()\" (change)=\"$event ? selection.toggle(module) : null\" [checked]=\"selection.isSelected(module)\"> </mat-checkbox>\n </mat-cell>\n </ng-container>\n\n <ng-container *ngFor=\"let dCol of data.baseData.displayColumns\" [matColumnDef]=\"dCol.displayName\">\n <mat-header-cell *matHeaderCellDef mat-sort-header>\n {{dCol.displayName}}\n </mat-header-cell>\n <mat-cell class=\"entity\" [class.enabled]=\"data.baseData.allowEdit(entity)\" (click)=\"editEntity(entity)\" *matCellDef=\"let entity\">\n {{dCol.value(entity)}}\n </mat-cell>\n </ng-container>\n\n <mat-header-row *matHeaderRowDef=\"displayedColumns\"></mat-header-row>\n <mat-row *matRowDef=\"let row; columns: displayedColumns\"></mat-row>\n </mat-table>\n\n <mat-paginator *ngIf=\"dataSource\" id=\"paginator\" [length]=\"dataSource.filteredData.length\" [pageIndex]=\"0\" [pageSize]=\"10\" [pageSizeOptions]=\"[5, 10, 25, 50]\"> </mat-paginator>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityCreateDialogComponent } from './create-entity-dialog.component';\nimport { NgxMatEntityInputModule } from '../../input/input.module';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\n\n@NgModule({\n declarations: [NgxMatEntityCreateDialogComponent],\n imports: [\n CommonModule,\n NgxMatEntityInputModule,\n MatDialogModule,\n FormsModule,\n MatButtonModule\n ],\n exports: [NgxMatEntityCreateDialogComponent]\n})\nexport class NgxMatEntityCreateDialogModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityEditDialogComponent } from './edit-entity-dialog.component';\nimport { NgxMatEntityInputModule } from '../../input/input.module';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { FormsModule } from '@angular/forms';\nimport { MatButtonModule } from '@angular/material/button';\nimport { NgxMatEntityConfirmDialogModule } from '../../confirm-dialog/confirm-dialog.module';\n\n@NgModule({\n declarations: [ NgxMatEntityEditDialogComponent],\n imports: [\n CommonModule,\n NgxMatEntityInputModule,\n MatDialogModule,\n FormsModule,\n MatButtonModule,\n NgxMatEntityConfirmDialogModule\n ],\n exports: [ NgxMatEntityEditDialogComponent]\n})\nexport class NgxMatEntityEditDialogModule {}","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { NgxMatEntityTableComponent } from './table.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { FormsModule } from '@angular/forms';\nimport { MatFormFieldModule } from '@angular/material/form-field';\nimport { MatCheckboxModule } from '@angular/material/checkbox';\nimport { MatTableModule } from '@angular/material/table';\nimport { MatPaginatorModule } from '@angular/material/paginator';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatMenuModule } from '@angular/material/menu';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { NgxMatEntityCreateDialogModule } from './create-dialog/create-entity-dialog.module';\nimport { NgxMatEntityEditDialogModule } from './edit-dialog/edit-entity-dialog.module';\n\n@NgModule({\n declarations: [NgxMatEntityTableComponent],\n imports: [\n CommonModule,\n MatInputModule,\n FormsModule,\n MatFormFieldModule,\n MatCheckboxModule,\n MatTableModule,\n MatPaginatorModule,\n MatButtonModule,\n MatMenuModule,\n MatDialogModule,\n NgxMatEntityCreateDialogModule,\n NgxMatEntityEditDialogModule,\n ],\n exports: [NgxMatEntityTableComponent]\n})\nexport class NgxMatEntityTableModule {}","import { Entity } from '../../classes/entity-model.class';\nimport { CreateDialogData } from '../../components/table/table-data';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';\nimport { ArrayTableDisplayColumn, AutocompleteStringChipsArrayDecoratorConfig, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';\n\n/**\n * The internal EntityArrayDecoratorConfig. Sets default values.\n */\nexport class EntityArrayDecoratorConfigInternal<EntityType extends Entity>\n extends PropertyDecoratorConfigInternal implements EntityArrayDecoratorConfig<EntityType> {\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.OBJECT;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'table';\n // eslint-disable-next-line jsdoc/require-jsdoc\n EntityClass: new (entity?: EntityType) => EntityType;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayColumns: ArrayTableDisplayColumn<EntityType>[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n createDialogData?: CreateDialogData;\n // eslint-disable-next-line jsdoc/require-jsdoc\n createInline: boolean;\n // eslint-disable-next-line jsdoc/require-jsdoc\n missingErrorMessage: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n addButtonLabel: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n removeButtonLabel: string;\n\n constructor(data: EntityArrayDecoratorConfig<EntityType>) {\n super(data);\n this.createInline = data.createInline != undefined ? data.createInline : true;\n this.displayStyle = data.displayStyle;\n this.itemType = data.itemType;\n this.EntityClass = data.EntityClass;\n this.displayColumns = data.displayColumns;\n this.createInline = data.createInline != undefined ? data.createInline : true;\n this.missingErrorMessage = data.missingErrorMessage ? data.missingErrorMessage : 'Needs to contain at least one value';\n this.defaultWidths = data.defaultWidths ? data.defaultWidths : [12, 12, 12];\n this.addButtonLabel = data.addButtonLabel ? data.addButtonLabel: 'Add'\n this.removeButtonLabel = data.removeButtonLabel ? data.removeButtonLabel: 'Remove'\n }\n}\n\n/**\n * The internal StringChipsArrayDecoratorConfig. Sets default values.\n */\nexport class StringChipsArrayDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements StringChipsArrayDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.STRING;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'chips';\n // eslint-disable-next-line jsdoc/require-jsdoc\n deleteIcon: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n minLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n maxLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n regex?: RegExp;\n\n constructor(data: StringChipsArrayDecoratorConfig) {\n super(data);\n this.deleteIcon = data.deleteIcon ? data.deleteIcon : 'fas fa-circle-minus';\n this.displayStyle = data.displayStyle;\n this.itemType = data.itemType;\n this.maxLength = data.maxLength;\n this.minLength = data.minLength;\n this.regex = data.regex;\n this.defaultWidths = data.defaultWidths ? data.defaultWidths : [6, 12, 12];\n }\n}\n\n/**\n * The internal AutocompleteStringChipsArrayDecoratorConfig. Sets default values.\n */\nexport class AutocompleteStringChipsArrayDecoratorConfigInternal\n extends PropertyDecoratorConfigInternal implements AutocompleteStringChipsArrayDecoratorConfig {\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n autocompleteValues: string[];\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.STRING_AUTOCOMPLETE;\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'chips';\n // eslint-disable-next-line jsdoc/require-jsdoc\n deleteIcon: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n minLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n maxLength?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n regex?: RegExp;\n\n constructor(data: AutocompleteStringChipsArrayDecoratorConfig) {\n super(data);\n this.autocompleteValues = data.autocompleteValues;\n this.deleteIcon = data.deleteIcon ? data.deleteIcon : 'fas fa-circle-minus'\n this.displayStyle = data.displayStyle;\n this.itemType = data.itemType;\n this.maxLength = data.maxLength;\n this.minLength = data.minLength;\n this.regex = data.regex;\n this.defaultWidths = data.defaultWidths ? data.defaultWidths : [6, 12, 12];\n }\n}","import { Entity } from '../../classes/entity-model.class';\nimport { baseProperty } from '../base/base-property.decorator';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { AutocompleteStringChipsArrayDecoratorConfigInternal, EntityArrayDecoratorConfigInternal, StringChipsArrayDecoratorConfigInternal } from './array-decorator-internal.data';\nimport { AutocompleteStringChipsArrayDecoratorConfig, EntityArrayDecoratorConfig, StringChipsArrayDecoratorConfig } from './array-decorator.data';\n\n/**\n * Decorator for setting and getting array property metadata.\n *\n * @param metadata - The metadata of the array property.\n * @returns The method that defines the metadata.\n * @throws When the given type of the array-items is unknown.\n */\nexport function array<EntityType extends Entity>(\n metadata: EntityArrayDecoratorConfig<EntityType> | StringChipsArrayDecoratorConfig | AutocompleteStringChipsArrayDecoratorConfig\n): (target: object, propertyKey: string) => void {\n switch (metadata.itemType) {\n case DecoratorTypes.OBJECT:\n return baseProperty(new EntityArrayDecoratorConfigInternal(metadata), DecoratorTypes.ARRAY);\n case DecoratorTypes.STRING:\n return baseProperty(new StringChipsArrayDecoratorConfigInternal(metadata), DecoratorTypes.ARRAY_STRING_CHIPS);\n case DecoratorTypes.STRING_AUTOCOMPLETE:\n return baseProperty(\n new AutocompleteStringChipsArrayDecoratorConfigInternal(metadata),\n DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS\n );\n default:\n // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unsafe-member-access\n throw new Error(`Unknown itemType ${(metadata as any).itemType}`);\n }\n}","/**\n * A bootstrap column value (a range from 1 - 12).\n */\nexport type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\n/**\n * The base options for all propertyDecorators.\n */\nexport abstract class PropertyDecoratorConfig {\n /**\n * Whether or not the Property is displayed at all.\n *\n * @default true\n */\n display?: boolean;\n /**\n * The name of the property used as a label for form fields.\n */\n displayName!: string;\n /**\n * Whether or not the Property is required.\n *\n * @default true\n */\n required?: boolean;\n /**\n * Whether or not the property gets omitted when creating new Entities.\n *\n * @default false\n */\n omitForCreate?: boolean;\n /**\n * Whether or not the property gets omitted when updating Entities.\n *\n * @default false\n */\n omitForUpdate?: boolean;\n /**\n * Defines the width of the input property when used inside the default create or edit dialog.\n * Has 3 bootstrap values for different breakpoints for simple responsive design.\n * The first value sets the columns for the screen size lg, the second for md and the third for sm.\n *\n * @default [6, 6, 12]\n */\n defaultWidths?: [Col, Col, Col];\n /**\n * Specifies the how to position this property when using default create/edit dialogs.\n *\n * @default { row: -1, order: -1} (Adds the property at the end)\n */\n position?: Position\n}\n\n/**\n * The options for positioning a property when using default create/edit dialogs.\n */\nexport interface Position {\n /**\n * Specifies the (bootstrap)-row in which this property is displayed.\n * Ordering is ascending.\n *\n * @default -1 (sets this property after the last row)\n */\n row?: number,\n /**\n * Specifies order of the input property inside the specified row.\n * Ordering is ascending.\n *\n * @default -1 (sets this property at the end of the row)\n */\n order?: number\n}","import { Entity } from '../../classes/entity-model.class';\nimport { CreateDialogData } from '../../components/table/table-data';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { PropertyDecoratorConfig } from '../base/property-decorator.data';\n\n/**\n * The configuration options for an array property displayed as a table.\n */\nexport interface ArrayTableDisplayColumn<EntityType extends Entity> {\n /**\n * The name inside the header.\n */\n displayName: string,\n /**\n * A method to get the value inside an row.\n */\n value: (entity: EntityType) => string\n}\n\n/**\n * Interface definition for the @array metadata.\n */\nabstract class ArrayDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * How to display the string.\n */\n displayStyle!: 'table' | 'chips';\n\n /**\n * The type of the items inside the array.\n */\n itemType!: DecoratorTypes;\n}\n\n/**\n * Definition for an array of Entities.\n */\nexport interface EntityArrayDecoratorConfig<EntityType extends Entity> extends ArrayDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.OBJECT,\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'table',\n\n /**\n * The EntityClass used for generating the create inputs.\n */\n EntityClass: new (entity?: EntityType) => EntityType,\n\n /**\n * The definition of the columns to display. Consists of the displayName to show in the header of the row\n * and the value, which is a function that generates the value to display inside a column.\n */\n displayColumns: ArrayTableDisplayColumn<EntityType>[],\n\n /**\n * The data for the add-item-dialog.\n * Can be omitted when adding items inline.\n */\n createDialogData?: CreateDialogData,\n\n /**\n * Whether or not the form for adding items to the array\n * should be displayed inline.\n *\n * @default true\n */\n createInline?: boolean,\n\n /**\n * The label for the add button when createInline is true.\n *\n * @default 'Add'\n */\n addButtonLabel?: string,\n\n /**\n * The label for the remove button when createInline is true.\n *\n * @default 'Remove'\n */\n removeButtonLabel?: string,\n\n /**\n * The error-message to display when the array is required but contains no values.\n */\n missingErrorMessage?: string\n}\n\n/**\n * Definition for an array of strings displayed as a chips list.\n */\nexport interface StringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.STRING,\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'chips',\n\n /**\n * The class for the <i> tag used to remove an entry from the array.\n *\n * @default 'fas fa-circle-minus'\n */\n deleteIcon?: string,\n /**\n * The minimum required length of the string.\n */\n minLength?: number,\n /**\n * The maximum required length of the string.\n */\n maxLength?: number,\n /**\n * A regex used for validation.\n */\n regex?: RegExp\n}\n\n/**\n * Definition for an array of autocomplete strings displayed as a chips list.\n */\nexport interface AutocompleteStringChipsArrayDecoratorConfig extends ArrayDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n itemType: DecoratorTypes.STRING_AUTOCOMPLETE,\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'chips',\n\n /**\n * The class for the <i> tag used to remove an entry from the array.\n *\n * @default 'fas fa-circle-minus'\n */\n deleteIcon?: string,\n /**\n * The autocomplete values.\n */\n autocompleteValues: string[],\n /**\n * The minimum required length of the string.\n */\n minLength?: number,\n /**\n * The maximum required length of the string.\n */\n maxLength?: number,\n /**\n * A regex used for validation.\n */\n regex?: RegExp\n}","import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';\nimport { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';\n\n/**\n * The internal DropdownBooleanDecoratorConfig. Sets default values.\n */\nexport class DropdownBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownBooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown';\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownTrue: string;\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownFalse: string;\n\n constructor(data: DropdownBooleanDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.dropdownTrue = data.dropdownTrue;\n this.dropdownFalse = data.dropdownFalse;\n }\n}\n\n/**\n * The internal CheckboxBooleanDecoratorConfig. Sets default values.\n */\nexport class CheckboxBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements CheckboxBooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'checkbox';\n\n constructor(data: CheckboxBooleanDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.required = data.required === undefined ? false : data.required;\n }\n}\n\n/**\n * The internal ToggleBooleanDecoratorConfig. Sets default values.\n */\nexport class ToggleBooleanDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements ToggleBooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'toggle';\n\n constructor(data: ToggleBooleanDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.required = data.required === undefined ? false : data.required;\n }\n}","import { baseProperty } from '../base/base-property.decorator';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { CheckboxBooleanDecoratorConfigInternal, DropdownBooleanDecoratorConfigInternal, ToggleBooleanDecoratorConfigInternal } from './boolean-decorator-internal.data';\nimport { CheckboxBooleanDecoratorConfig, DropdownBooleanDecoratorConfig, ToggleBooleanDecoratorConfig } from './boolean-decorator.data';\n\n/**\n * Decorator for setting and getting boolean property metadata.\n *\n * @param metadata - The metadata of the boolean property.\n * @returns The method that defines the metadata.\n */\nexport function boolean(\n metadata: CheckboxBooleanDecoratorConfig | ToggleBooleanDecoratorConfig | DropdownBooleanDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownBooleanDecoratorConfigInternal(metadata), DecoratorTypes.BOOLEAN_DROPDOWN);\n }\n else if (metadata.displayStyle === 'checkbox') {\n return baseProperty(new CheckboxBooleanDecoratorConfigInternal(metadata), DecoratorTypes.BOOLEAN_CHECKBOX);\n }\n else {\n return baseProperty(new ToggleBooleanDecoratorConfigInternal(metadata), DecoratorTypes.BOOLEAN_TOGGLE);\n }\n}","import { PropertyDecoratorConfig } from '../base/property-decorator.data';\n\n/**\n * The Definition for the @boolean metadata.\n */\nabstract class BooleanDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * Whether to display the booleans as a checkbox, a toggle button or as a dropdown.\n */\n displayStyle!: 'checkbox' | 'dropdown' | 'toggle';\n}\n\n/**\n * The configuration options for a boolean property displayed in a dropdown.\n */\nexport interface DropdownBooleanDecoratorConfig extends BooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown',\n /**\n * The name of the true value if displayStyle dropdown is used.\n */\n dropdownTrue: string,\n /**\n * The name of the false value if displayStyle dropdown is used.\n */\n dropdownFalse: string\n}\n\n/**\n * The configuration options for a boolean property displayed as a checkbox.\n */\nexport interface CheckboxBooleanDecoratorConfig extends BooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'checkbox'\n}\n/**\n * The configuration options for a boolean property displayed as a mat-toggle.\n */\nexport interface ToggleBooleanDecoratorConfig extends BooleanDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'toggle'\n}","import { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';\nimport { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig } from './number-decorator.data';\n\n/**\n * The internal DefaultNumberDecoratorConfig. Sets default values.\n */\nexport class DefaultNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DefaultNumberDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'line';\n // eslint-disable-next-line jsdoc/require-jsdoc\n min?: number;\n // eslint-disable-next-line jsdoc/require-jsdoc\n max?: number;\n\n constructor(data: DefaultNumberDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.max = data.max;\n this.min = data.min;\n }\n}\n\n/**\n * The internal DropdownNumberDecoratorConfig. Sets default values.\n */\nexport class DropdownNumberDecoratorConfigInternal extends PropertyDecoratorConfigInternal implements DropdownNumberDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown';\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownValues: { displayName: string, value: number }[];\n\n constructor(data: DropdownNumberDecoratorConfig) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.dropdownValues = data.dropdownValues;\n }\n}","import { baseProperty } from '../base/base-property.decorator';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { DefaultNumberDecoratorConfig, DropdownNumberDecoratorConfig } from './number-decorator.data';\nimport { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from './number-decorator-internal.data';\n\n/**\n * Decorator for setting and getting string property metadata.\n *\n * @param metadata - The metadata of the string property.\n * @returns The method that defines the metadata.\n */\nexport function number(\n metadata: DefaultNumberDecoratorConfig | DropdownNumberDecoratorConfig\n): (target: object, propertyKey: string) => void {\n if (metadata.displayStyle === 'dropdown') {\n return baseProperty(new DropdownNumberDecoratorConfigInternal(metadata), DecoratorTypes.NUMBER_DROPDOWN);\n }\n else {\n return baseProperty(new DefaultNumberDecoratorConfigInternal(metadata), DecoratorTypes.NUMBER);\n }\n}","import { PropertyDecoratorConfig } from '../base/property-decorator.data';\n\n/**\n * Definition for the @number metadata.\n */\nabstract class NumberDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * Whether to display the number in a single line or as a dropdown.\n */\n displayStyle!: 'line' | 'dropdown';\n}\n\n/**\n * The configuration options for a number property displayed in a default number input.\n */\nexport interface DefaultNumberDecoratorConfig extends NumberDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'line',\n /**\n * The minimum value of the number.\n */\n min?: number,\n /**\n * The maximum value of the number.\n */\n max?: number\n}\n\n/**\n * The configuration options for a number property displayed in a dropdown.\n */\nexport interface DropdownNumberDecoratorConfig extends NumberDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown',\n /**\n * The values of the dropdown, consisting of a name to display and the actual value.\n */\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownValues: { displayName: string, value: number }[]\n}","import { Entity } from '../../classes/entity-model.class';\nimport { PropertyDecoratorConfigInternal } from '../base/property-decorator-internal.data';\nimport { DefaultObjectDecoratorConfig } from './object-decorator.data';\n\n/**\n * The internal DefaultObjectDecoratorConfig. Sets default values.\n */\nexport class DefaultObjectDecoratorConfigInternal<EntityType extends Entity>\n extends PropertyDecoratorConfigInternal implements DefaultObjectDecoratorConfig<EntityType> {\n\n\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'inline';\n // eslint-disable-next-line jsdoc/require-jsdoc\n type: new (entity?: EntityType) => EntityType;\n\n constructor(data: DefaultObjectDecoratorConfig<EntityType>) {\n super(data);\n this.displayStyle = data.displayStyle;\n this.type = data.type;\n }\n}","import { baseProperty } from '../base/base-property.decorator';\nimport { Entity } from '../../classes/entity-model.class';\nimport { DecoratorTypes } from '../base/decorator-types.enum';\nimport { DefaultObjectDecoratorConfig } from './object-decorator.data';\nimport { DefaultObjectDecoratorConfigInternal } from './object-decorator-internal.data';\n\n/**\n * Decorator for setting and getting object property metadata.\n *\n * @param metadata - The metadata of the object property.\n * @returns The method that defines the metadata.\n */\nexport function object<EntityType extends Entity>(\n metadata: DefaultObjectDecoratorConfig<EntityType>\n): (target: object, propertyKey: string) => void {\n return baseProperty(new DefaultObjectDecoratorConfigInternal(metadata), DecoratorTypes.OBJECT);\n}","import { Entity } from '../../classes/entity-model.class';\nimport { PropertyDecoratorConfig } from '../base/property-decorator.data';\n\n/**\n * Definition for the @object metadata.\n */\nabstract class ObjectDecoratorConfig<EntityType extends Entity> extends PropertyDecoratorConfig {\n /**\n * The entity type of the object.\n */\n type!: new (entity?: EntityType) => EntityType;\n\n /**\n * How to display the object.\n *\n * The objects properties are added as input fields in an section of the entity.\n * Useful if the object only contains a few properties (e.g. A address on a user).\n */\n displayStyle!: 'inline';\n}\n\n/**\n * The configuration options for a object property.\n */\nexport interface DefaultObjectDecoratorConfig<EntityType extends Entity> extends ObjectDecoratorConfig<EntityType> {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'inline'\n}","import { PropertyDecoratorConfig } from '../base/property-decorator.data';\n\n/**\n * Definition for the @string metadata.\n */\nabstract class StringDecoratorConfig extends PropertyDecoratorConfig {\n /**\n * How to display the string.\n */\n displayStyle!: 'line' | 'textbox' | 'autocomplete' | 'dropdown';\n}\n\n/**\n * The configuration options for a string property displayed as a dropdown.\n */\nexport interface DropdownStringDecoratorConfig extends StringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'dropdown',\n /**\n * The values of the dropdown, consisting of a name to display and the actual value\n * Can also receive a function to determine the values.\n */\n // eslint-disable-next-line jsdoc/require-jsdoc\n dropdownValues: { displayName: string, value: string }[]\n}\n\n/**\n * The configuration options for a string property displayed in a default text input.\n */\nexport interface DefaultStringDecoratorConfig extends StringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'line',\n /**\n * The minimum required length of the string.\n */\n minLength?: number,\n /**\n * The maximum required length of the string.\n */\n maxLength?: number,\n /**\n * A regex used for validation.\n */\n regex?: RegExp\n}\n\n/**\n * The configuration options for a string property displayed in a textbox input.\n */\nexport interface TextboxStringDecoratorConfig extends StringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'textbox',\n /**\n * The minimum required length of the string.\n */\n minLength?: number,\n /**\n * The maximum required length of the string.\n */\n maxLength?: number\n}\n\n/**\n * The configuration options for a string property displayed in a mat-autocomplete input.\n */\nexport interface AutocompleteStringDecoratorConfig extends StringDecoratorConfig {\n // eslint-disable-next-line jsdoc/require-jsdoc\n displayStyle: 'autocomplete',\n /**\n * The autocomplete values.\n */\n autocompleteValues: string[],\n /**\n * The minimum required length of the string.\n */\n minLength?: number,\n /**\n * The maximum required length of the string.\n */\n maxLength?: number,\n /**\n * A regex used for validation.\n */\n regex?: RegExp\n}","/**\n * Public API Surface of ngx-material-entity.\n */\nimport 'reflect-metadata';\n\n// classes\nexport * from './classes/entity-model.class';\nexport * from './classes/entity-service.class';\nexport * from './classes/entity-utilities.class';\n\n// components\nexport * from './components/confirm-dialog/confirm-dialog-data';\nexport * from './components/confirm-dialog/confirm-dialog.component';\nexport * from './components/confirm-dialog/confirm-dialog.module';\n\nexport * from './components/input/input.module';\nexport * from './components/input/input.component';\n\nexport * from './components/table/table-data';\nexport * from './components/table/table.component';\nexport * from './components/table/table.module';\n\nexport * from './components/table/create-dialog/create-entity-dialog-data';\nexport * from './components/table/create-dialog/create-entity-dialog.module';\nexport * from './components/table/create-dialog/create-entity-dialog.component';\n\nexport * from './components/table/edit-dialog/edit-entity-dialog-data';\nexport * from './components/table/edit-dialog/edit-entity-dialog.module';\nexport * from './components/table/edit-dialog/edit-entity-dialog.component';\n\nexport * from './components/get-validation-error-message.function';\n\n// decorators\nexport * from './decorators/base/decorator-types.enum';\n\nexport * from './decorators/array/array.decorator';\nexport * from './decorators/array/array-decorator.data';\n\nexport * from './decorators/boolean/boolean.decorator';\nexport * from './decorators/boolean/boolean-decorator.data';\n\nexport * from './decorators/number/number.decorator';\nexport * from './decorators/number/number-decorator.data';\n\nexport * from './decorators/object/object.decorator';\nexport * from './decorators/object/object-decorator.data';\n\nexport * from './decorators/string/string.decorator';\nexport * from './decorators/string/string-decorator.data';","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2","i4","i5","i3","i8","i2.NgxMatEntityInputComponent","i3.NgxMatEntityInputComponent","i7","i9"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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