ngx-material-entity 15.3.1 → 16.0.0

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 (202) hide show
  1. package/classes/entity.model.d.ts +2 -2
  2. package/components/confirm-dialog/confirm-dialog-data.d.ts +1 -1
  3. package/components/edit-page/edit-page.component.d.ts +1 -1
  4. package/components/edit-page/page-edit-data.builder.d.ts +1 -1
  5. package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +1 -0
  6. package/components/input/array/array-table.class.d.ts +1 -1
  7. package/components/input/base-input.component.d.ts +5 -1
  8. package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +1 -1
  9. package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +1 -1
  10. package/components/input/file/file-input/file-input.component.d.ts +1 -1
  11. package/components/input/input.component.d.ts +2 -1
  12. package/components/table/display-column-value/base-display-column-value.component.d.ts +1 -1
  13. package/components/table/display-column-value/display-column-value.component.d.ts +1 -1
  14. package/components/table/table-data.builder.d.ts +1 -1
  15. package/components/table/table-data.d.ts +1 -1
  16. package/components/table/table.component.d.ts +1 -1
  17. package/decorators/base/decorator-types.enum.d.ts +1 -1
  18. package/decorators/base/property-decorator.data.d.ts +1 -1
  19. package/decorators/file/file-decorator.data.d.ts +1 -1
  20. package/decorators/number/number-decorator.data.d.ts +1 -1
  21. package/decorators/string/string-decorator.data.d.ts +1 -1
  22. package/encapsulation/jszip.utilities.d.ts +1 -1
  23. package/encapsulation/uuid.utilities.d.ts +11 -0
  24. package/esm2022/classes/base.builder.mjs +44 -0
  25. package/esm2022/classes/entity.model.mjs +26 -0
  26. package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +58 -0
  27. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +60 -0
  28. package/esm2022/components/edit-page/edit-page.component.mjs +291 -0
  29. package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +23 -0
  30. package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +49 -0
  31. package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +49 -0
  32. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +50 -0
  33. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +69 -0
  34. package/esm2022/components/input/array/array-table.class.mjs +100 -0
  35. package/esm2022/components/input/base-input.component.mjs +88 -0
  36. package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +21 -0
  37. package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +17 -0
  38. package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +21 -0
  39. package/esm2022/components/input/custom/custom.component.mjs +28 -0
  40. package/esm2022/components/input/date/date-input/date-input.component.mjs +19 -0
  41. package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +68 -0
  42. package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +69 -0
  43. package/{esm2020 → esm2022}/components/input/file/file-default-input/file-default-input.component.mjs +4 -4
  44. package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +101 -0
  45. package/esm2022/components/input/file/file-input/dragDrop.directive.mjs +62 -0
  46. package/esm2022/components/input/file/file-input/file-input.component.mjs +206 -0
  47. package/esm2022/components/input/input.component.mjs +849 -0
  48. package/esm2022/components/input/input.module.mjs +172 -0
  49. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +23 -0
  50. package/esm2022/components/input/number/number-input/number-input.component.mjs +16 -0
  51. package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +17 -0
  52. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +102 -0
  53. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +36 -0
  54. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +23 -0
  55. package/esm2022/components/input/string/string-input/string-input.component.mjs +16 -0
  56. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +39 -0
  57. package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +17 -0
  58. package/esm2022/components/table/create-dialog/create-dialog-data.builder.mjs +42 -0
  59. package/esm2022/components/table/create-dialog/create-entity-dialog-data.builder.mjs +32 -0
  60. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +107 -0
  61. package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +28 -0
  62. package/esm2022/components/table/display-column-value/display-column-value.component.mjs +37 -0
  63. package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +106 -0
  64. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +209 -0
  65. package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +39 -0
  66. package/esm2022/components/table/table-data.builder.mjs +269 -0
  67. package/esm2022/components/table/table.component.mjs +348 -0
  68. package/esm2022/decorators/array/array-decorator-internal.data.mjs +286 -0
  69. package/esm2022/decorators/array/array-decorator.data.mjs +21 -0
  70. package/esm2022/decorators/base/property-decorator-internal.data.mjs +82 -0
  71. package/esm2022/decorators/base/property-decorator.data.mjs +56 -0
  72. package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +43 -0
  73. package/esm2022/decorators/boolean/boolean-decorator.data.mjs +11 -0
  74. package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +35 -0
  75. package/{esm2020 → esm2022}/decorators/date/date-decorator-internal.data.mjs +43 -1
  76. package/esm2022/decorators/date/date-decorator.data.mjs +11 -0
  77. package/esm2022/decorators/file/file-decorator-internal.data.mjs +143 -0
  78. package/esm2022/decorators/file/file-decorator.data.mjs +64 -0
  79. package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +42 -0
  80. package/esm2022/decorators/number/number-decorator-internal.data.mjs +76 -0
  81. package/esm2022/decorators/number/number-decorator.data.mjs +11 -0
  82. package/esm2022/decorators/object/object-decorator-internal.data.mjs +20 -0
  83. package/esm2022/decorators/object/object-decorator.data.mjs +22 -0
  84. package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +48 -0
  85. package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +24 -0
  86. package/esm2022/decorators/string/string-decorator-internal.data.mjs +114 -0
  87. package/esm2022/decorators/string/string-decorator.data.mjs +11 -0
  88. package/esm2022/encapsulation/uuid.utilities.mjs +15 -0
  89. package/esm2022/services/entity.service.mjs +276 -0
  90. package/esm2022/utilities/date.utilities.mjs +159 -0
  91. package/esm2022/utilities/entity.utilities.mjs +905 -0
  92. package/{fesm2020 → fesm2022}/ngx-material-entity.mjs +1225 -376
  93. package/fesm2022/ngx-material-entity.mjs.map +1 -0
  94. package/package.json +11 -17
  95. package/utilities/date.utilities.d.ts +1 -1
  96. package/esm2020/classes/base.builder.mjs +0 -42
  97. package/esm2020/classes/entity.model.mjs +0 -22
  98. package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +0 -44
  99. package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +0 -57
  100. package/esm2020/components/edit-page/edit-page.component.mjs +0 -277
  101. package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +0 -26
  102. package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +0 -50
  103. package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +0 -49
  104. package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +0 -49
  105. package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +0 -70
  106. package/esm2020/components/input/array/array-table.class.mjs +0 -96
  107. package/esm2020/components/input/base-input.component.mjs +0 -64
  108. package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +0 -21
  109. package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +0 -17
  110. package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +0 -21
  111. package/esm2020/components/input/custom/custom.component.mjs +0 -26
  112. package/esm2020/components/input/date/date-input/date-input.component.mjs +0 -22
  113. package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +0 -71
  114. package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +0 -71
  115. package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +0 -100
  116. package/esm2020/components/input/file/file-input/dragDrop.directive.mjs +0 -63
  117. package/esm2020/components/input/file/file-input/file-input.component.mjs +0 -198
  118. package/esm2020/components/input/input.component.mjs +0 -755
  119. package/esm2020/components/input/input.module.mjs +0 -173
  120. package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +0 -26
  121. package/esm2020/components/input/number/number-input/number-input.component.mjs +0 -16
  122. package/esm2020/components/input/number/number-slider-input/number-slider-input.component.mjs +0 -17
  123. package/esm2020/components/input/relations/references-many-input/references-many-input.component.mjs +0 -100
  124. package/esm2020/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +0 -34
  125. package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +0 -26
  126. package/esm2020/components/input/string/string-input/string-input.component.mjs +0 -16
  127. package/esm2020/components/input/string/string-password-input/string-password-input.component.mjs +0 -42
  128. package/esm2020/components/input/string/string-textbox-input/string-textbox-input.component.mjs +0 -17
  129. package/esm2020/components/table/create-dialog/create-dialog-data.builder.mjs +0 -32
  130. package/esm2020/components/table/create-dialog/create-entity-dialog-data.builder.mjs +0 -26
  131. package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +0 -100
  132. package/esm2020/components/table/display-column-value/base-display-column-value.component.mjs +0 -27
  133. package/esm2020/components/table/display-column-value/display-column-value.component.mjs +0 -33
  134. package/esm2020/components/table/edit-dialog/edit-data.builder.mjs +0 -76
  135. package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +0 -198
  136. package/esm2020/components/table/edit-dialog/edit-entity.builder.mjs +0 -29
  137. package/esm2020/components/table/table-data.builder.mjs +0 -205
  138. package/esm2020/components/table/table.component.mjs +0 -333
  139. package/esm2020/decorators/array/array-decorator-internal.data.mjs +0 -150
  140. package/esm2020/decorators/array/array-decorator.data.mjs +0 -7
  141. package/esm2020/decorators/base/property-decorator-internal.data.mjs +0 -58
  142. package/esm2020/decorators/base/property-decorator.data.mjs +0 -6
  143. package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +0 -33
  144. package/esm2020/decorators/boolean/boolean-decorator.data.mjs +0 -7
  145. package/esm2020/decorators/custom/custom-decorator-internal.data.mjs +0 -27
  146. package/esm2020/decorators/date/date-decorator.data.mjs +0 -7
  147. package/esm2020/decorators/file/file-decorator-internal.data.mjs +0 -97
  148. package/esm2020/decorators/file/file-decorator.data.mjs +0 -7
  149. package/esm2020/decorators/has-many/has-many-decorator-internal.data.mjs +0 -32
  150. package/esm2020/decorators/number/number-decorator-internal.data.mjs +0 -54
  151. package/esm2020/decorators/number/number-decorator.data.mjs +0 -7
  152. package/esm2020/decorators/object/object-decorator-internal.data.mjs +0 -14
  153. package/esm2020/decorators/object/object-decorator.data.mjs +0 -7
  154. package/esm2020/decorators/references-many/references-many-decorator-internal.data.mjs +0 -30
  155. package/esm2020/decorators/references-one/references-one-decorator-internal.data.mjs +0 -16
  156. package/esm2020/decorators/string/string-decorator-internal.data.mjs +0 -72
  157. package/esm2020/decorators/string/string-decorator.data.mjs +0 -7
  158. package/esm2020/services/entity.service.mjs +0 -274
  159. package/esm2020/utilities/date.utilities.mjs +0 -159
  160. package/esm2020/utilities/entity.utilities.mjs +0 -905
  161. package/fesm2015/ngx-material-entity.mjs +0 -6322
  162. package/fesm2015/ngx-material-entity.mjs.map +0 -1
  163. package/fesm2020/ngx-material-entity.mjs.map +0 -1
  164. /package/{esm2020 → esm2022}/components/confirm-dialog/confirm-dialog-data.mjs +0 -0
  165. /package/{esm2020 → esm2022}/components/edit-page/edit-data.route.mjs +0 -0
  166. /package/{esm2020 → esm2022}/components/edit-page/page-edit-data.builder.mjs +0 -0
  167. /package/{esm2020 → esm2022}/components/get-validation-error-message.function.mjs +0 -0
  168. /package/{esm2020 → esm2022}/components/table/create-dialog/create-entity-dialog-data.mjs +0 -0
  169. /package/{esm2020 → esm2022}/components/table/default.actions.mjs +0 -0
  170. /package/{esm2020 → esm2022}/components/table/edit-dialog/edit-entity-data.mjs +0 -0
  171. /package/{esm2020 → esm2022}/components/table/table-data.mjs +0 -0
  172. /package/{esm2020 → esm2022}/decorators/array/array.decorator.mjs +0 -0
  173. /package/{esm2020 → esm2022}/decorators/base/base-property.decorator.mjs +0 -0
  174. /package/{esm2020 → esm2022}/decorators/base/decorator-types.enum.mjs +0 -0
  175. /package/{esm2020 → esm2022}/decorators/base/dropdown-value.interface.mjs +0 -0
  176. /package/{esm2020 → esm2022}/decorators/boolean/boolean.decorator.mjs +0 -0
  177. /package/{esm2020 → esm2022}/decorators/custom/custom-decorator.data.mjs +0 -0
  178. /package/{esm2020 → esm2022}/decorators/custom/custom.decorator.mjs +0 -0
  179. /package/{esm2020 → esm2022}/decorators/date/date.decorator.mjs +0 -0
  180. /package/{esm2020 → esm2022}/decorators/file/file.decorator.mjs +0 -0
  181. /package/{esm2020 → esm2022}/decorators/has-many/has-many-decorator.data.mjs +0 -0
  182. /package/{esm2020 → esm2022}/decorators/has-many/has-many.decorator.mjs +0 -0
  183. /package/{esm2020 → esm2022}/decorators/number/number.decorator.mjs +0 -0
  184. /package/{esm2020 → esm2022}/decorators/object/object.decorator.mjs +0 -0
  185. /package/{esm2020 → esm2022}/decorators/references-many/references-many-decorator.data.mjs +0 -0
  186. /package/{esm2020 → esm2022}/decorators/references-many/references-many.decorator.mjs +0 -0
  187. /package/{esm2020 → esm2022}/decorators/references-one/references-one-decorator.data.mjs +0 -0
  188. /package/{esm2020 → esm2022}/decorators/references-one/references-one.decorator.mjs +0 -0
  189. /package/{esm2020 → esm2022}/decorators/string/string.decorator.mjs +0 -0
  190. /package/{esm2020 → esm2022}/encapsulation/js-2-xml.utilities.mjs +0 -0
  191. /package/{esm2020 → esm2022}/encapsulation/jszip.utilities.mjs +0 -0
  192. /package/{esm2020 → esm2022}/encapsulation/lodash.utilities.mjs +0 -0
  193. /package/{esm2020 → esm2022}/encapsulation/reflect.utilities.mjs +0 -0
  194. /package/{esm2020 → esm2022}/functions/default-false.function.mjs +0 -0
  195. /package/{esm2020 → esm2022}/functions/default-true.function.mjs +0 -0
  196. /package/{esm2020 → esm2022}/functions/is-async-function.function.mjs +0 -0
  197. /package/{esm2020 → esm2022}/mocks/placeholder-data.png.mjs +0 -0
  198. /package/{esm2020 → esm2022}/ngx-material-entity.mjs +0 -0
  199. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  200. /package/{esm2020 → esm2022}/services/unsaved-changes.guard.mjs +0 -0
  201. /package/{esm2020 → esm2022}/utilities/file.utilities.mjs +0 -0
  202. /package/{esm2020 → esm2022}/utilities/selection.utilities.mjs +0 -0
@@ -1,11 +1,11 @@
1
1
  /**
2
2
  * The newable type used whenever an entity class is passed to create an entity and initialize its metadata.
3
3
  */
4
- export declare type EntityClassNewable<EntityType extends BaseEntityType<EntityType>> = new (data?: EntityType) => EntityType;
4
+ export type EntityClassNewable<EntityType extends BaseEntityType<EntityType>> = new (data?: EntityType) => EntityType;
5
5
  /**
6
6
  * The Generic Base EntityType.
7
7
  */
8
- export declare type BaseEntityType<T> = {
8
+ export type BaseEntityType<T> = {
9
9
  [K in keyof T]: unknown;
10
10
  };
11
11
  /**
@@ -2,7 +2,7 @@
2
2
  * The different types of a confirm dialog.
3
3
  * Is used for displaying different buttons accordingly.
4
4
  */
5
- export declare type ConfirmDialogTypes = 'default' | 'delete' | 'info-only';
5
+ export type ConfirmDialogTypes = 'default' | 'delete' | 'info-only';
6
6
  /**
7
7
  * The Definition of the Confirm Dialog Data.
8
8
  */
@@ -16,7 +16,7 @@ import * as i0 from "@angular/core";
16
16
  /**
17
17
  * The data that needs to be provided for a route to be able to edit a entity.
18
18
  */
19
- export declare type PageEditData<EntityType extends BaseEntityType<EntityType>> = Omit<EditEntityData<EntityType>, 'entity' | 'EntityServiceClass'> & {
19
+ export type PageEditData<EntityType extends BaseEntityType<EntityType>> = Omit<EditEntityData<EntityType>, 'entity' | 'EntityServiceClass'> & {
20
20
  /**
21
21
  * Whether or not to display a loading spinner while the entity for the page is loaded.
22
22
  *
@@ -4,7 +4,7 @@ import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data
4
4
  import { EditDataInternal } from '../table/edit-dialog/edit-data.builder';
5
5
  import { EditEntityDataInternal } from '../table/edit-dialog/edit-entity.builder';
6
6
  import { PageEditData } from './edit-page.component';
7
- export declare type PageEditDataInternal<EntityType extends BaseEntityType<EntityType>> = Omit<EditEntityDataInternal<EntityType>, 'entity' | 'EntityServiceClass'> & {
7
+ export type PageEditDataInternal<EntityType extends BaseEntityType<EntityType>> = Omit<EditEntityDataInternal<EntityType>, 'entity' | 'EntityServiceClass'> & {
8
8
  displayLoadingSpinner: boolean;
9
9
  editData: EditDataInternal<EntityType> & {
10
10
  confirmUnsavedChangesDialogData: ConfirmDialogDataInternal;
@@ -5,6 +5,7 @@ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum
5
5
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
6
6
  import * as i0 from "@angular/core";
7
7
  export declare class ArrayStringChipsInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.ARRAY_STRING_CHIPS, string[]> implements OnInit {
8
+ uuid2: string;
8
9
  chipsInput: string;
9
10
  /**
10
11
  * Handles adding strings to the chipsArray.
@@ -9,7 +9,7 @@ import { SelectionUtilities } from '../../../utilities/selection.utilities';
9
9
  import { DisplayColumn } from '../../table/table-data';
10
10
  import { NgxMatEntityBaseInputComponent } from '../base-input.component';
11
11
  import * as i0 from "@angular/core";
12
- declare type ArrayTableType = DecoratorTypes.ARRAY | DecoratorTypes.ARRAY_DATE | DecoratorTypes.ARRAY_DATE_RANGE | DecoratorTypes.ARRAY_DATE_TIME;
12
+ type ArrayTableType = DecoratorTypes.ARRAY | DecoratorTypes.ARRAY_DATE | DecoratorTypes.ARRAY_DATE_RANGE | DecoratorTypes.ARRAY_DATE_TIME;
13
13
  /**
14
14
  * The base component needed for all arrays that are displayed as a table.
15
15
  */
@@ -47,11 +47,15 @@ export declare abstract class NgxMatEntityBaseInputComponent<EntityType extends
47
47
  * The metadata of the property.
48
48
  */
49
49
  metadata: DecoratorType<Type, CustomMetadataType>;
50
+ /**
51
+ * A uuid that is used to specify unique name values for inputs.
52
+ */
53
+ uuid: string;
50
54
  ngOnInit(): void;
51
55
  /**
52
56
  * Should emit when the input has changed. This is needed to trigger validation and dirty checks.
53
57
  */
54
58
  emitChange(): void;
55
59
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, never>;
56
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, "ngx-mat-entity-base-input", never, { "entity": "entity"; "key": "key"; "getValidationErrorMessage": "getValidationErrorMessage"; "isReadOnly": "isReadOnly"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
60
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseInputComponent<any, any, any, any>, "ngx-mat-entity-base-input", never, { "entity": { "alias": "entity"; "required": false; }; "key": { "alias": "key"; "required": false; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
57
61
  }
@@ -1,6 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
3
2
  import { BaseEntityType } from '../../../../classes/entity.model';
3
+ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class BooleanCheckboxInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_CHECKBOX, boolean> implements OnInit {
@@ -1,6 +1,6 @@
1
1
  import { OnInit } from '@angular/core';
2
- import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
3
2
  import { BaseEntityType } from '../../../../classes/entity.model';
3
+ import { DecoratorTypes } from '../../../../decorators/base/decorator-types.enum';
4
4
  import { NgxMatEntityBaseInputComponent } from '../../base-input.component';
5
5
  import * as i0 from "@angular/core";
6
6
  export declare class BooleanDropdownInputComponent<EntityType extends BaseEntityType<EntityType>> extends NgxMatEntityBaseInputComponent<EntityType, DecoratorTypes.BOOLEAN_DROPDOWN, boolean> implements OnInit {
@@ -34,5 +34,5 @@ export declare class FileInputComponent<EntityType extends BaseEntityType<Entity
34
34
  downloadAllEnabled(): boolean;
35
35
  downloadAll(): Promise<void>;
36
36
  static ɵfac: i0.ɵɵFactoryDeclaration<FileInputComponent<any>, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "propertyValue": "propertyValue"; "entity": "entity"; "key": "key"; "metadata": "metadata"; "getValidationErrorMessage": "getValidationErrorMessage"; "isReadOnly": "isReadOnly"; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never, false, never>;
37
+ static ɵcmp: i0.ɵɵComponentDeclaration<FileInputComponent<any>, "file-input", never, { "propertyValue": { "alias": "propertyValue"; "required": false; }; "entity": { "alias": "entity"; "required": false; }; "key": { "alias": "key"; "required": false; }; "metadata": { "alias": "metadata"; "required": false; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "fileDataChangeEvent": "fileDataChangeEvent"; }, never, never, false, never>;
38
38
  }
@@ -136,6 +136,7 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
136
136
  EntityUtilities: typeof EntityUtilities;
137
137
  DateUtilities: typeof DateUtilities;
138
138
  SelectionUtilities: typeof SelectionUtilities;
139
+ referencesOneUUID: string;
139
140
  constructor(dialog: MatDialog, injector: EnvironmentInjector, router: Router, defaultGetValidationErrorMessage: (model: NgModel) => string, http: HttpClient);
140
141
  /**
141
142
  * Checks if the input with the given key on the given property is readonly.
@@ -316,5 +317,5 @@ export declare class NgxMatEntityInputComponent<EntityType extends BaseEntityTyp
316
317
  */
317
318
  removeFromEntityArray(): void;
318
319
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInputComponent<any>, never>;
319
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "getValidationErrorMessage": "getValidationErrorMessage"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; "validEmpty": "validEmpty"; "isReadOnly": "isReadOnly"; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
320
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInputComponent<any>, "ngx-mat-entity-input", never, { "entity": { "alias": "entity"; "required": false; }; "propertyKey": { "alias": "propertyKey"; "required": false; }; "getValidationErrorMessage": { "alias": "getValidationErrorMessage"; "required": false; }; "hideOmitForCreate": { "alias": "hideOmitForCreate"; "required": false; }; "hideOmitForEdit": { "alias": "hideOmitForEdit"; "required": false; }; "validEmpty": { "alias": "validEmpty"; "required": false; }; "isReadOnly": { "alias": "isReadOnly"; "required": false; }; }, { "inputChangeEvent": "inputChangeEvent"; }, never, never, false, never>;
320
321
  }
@@ -11,5 +11,5 @@ export declare abstract class NgxMatEntityBaseDisplayColumnValueComponent<Entity
11
11
  constructor();
12
12
  ngOnInit(): void;
13
13
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, never>;
14
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, "ngx-mat-entity-base-display-column-value", never, { "entity": "entity"; }, {}, never, never, false, never>;
14
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityBaseDisplayColumnValueComponent<any>, "ngx-mat-entity-base-display-column-value", never, { "entity": { "alias": "entity"; "required": false; }; }, {}, never, never, false, never>;
15
15
  }
@@ -13,5 +13,5 @@ export declare class DisplayColumnValueComponent<EntityType extends BaseEntityTy
13
13
  constructor(viewContainerRef: ViewContainerRef);
14
14
  ngOnInit(): void;
15
15
  static ɵfac: i0.ɵɵFactoryDeclaration<DisplayColumnValueComponent<any>, never>;
16
- static ɵcmp: i0.ɵɵComponentDeclaration<DisplayColumnValueComponent<any>, "display-column-value", never, { "entity": "entity"; "ComponentClass": "ComponentClass"; }, {}, never, never, true, never>;
16
+ static ɵcmp: i0.ɵɵComponentDeclaration<DisplayColumnValueComponent<any>, "display-column-value", never, { "entity": { "alias": "entity"; "required": false; }; "ComponentClass": { "alias": "ComponentClass"; "required": false; }; }, {}, never, never, true, never>;
17
17
  }
@@ -35,7 +35,7 @@ export declare class MultiSelectActionInternal<EntityType extends BaseEntityType
35
35
  /**
36
36
  * The Internal Table Action. Sets default values.
37
37
  */
38
- export declare type TableActionInternal<EntityType extends BaseEntityType<EntityType>> = BaseTableActionInternal | MultiSelectActionInternal<EntityType>;
38
+ export type TableActionInternal<EntityType extends BaseEntityType<EntityType>> = BaseTableActionInternal | MultiSelectActionInternal<EntityType>;
39
39
  /**
40
40
  * The internal TableData. Requires all default values the user can leave out.
41
41
  */
@@ -96,7 +96,7 @@ export interface MultiSelectAction<EntityType extends BaseEntityType<EntityType>
96
96
  /**
97
97
  * An action for the table. Can either be independent or run on the selected entities in the table.
98
98
  */
99
- export declare type TableAction<EntityType extends BaseEntityType<EntityType>> = BaseTableAction | MultiSelectAction<EntityType>;
99
+ export type TableAction<EntityType extends BaseEntityType<EntityType>> = BaseTableAction | MultiSelectAction<EntityType>;
100
100
  /**
101
101
  * The base data of the ngx-mat-entity-table.
102
102
  */
@@ -107,5 +107,5 @@ export declare class NgxMatEntityTableComponent<EntityType extends BaseEntityTyp
107
107
  */
108
108
  applyFilter(event: Event): void;
109
109
  static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityTableComponent<any>, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": "tableData"; }, {}, never, never, true, never>;
110
+ static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityTableComponent<any>, "ngx-mat-entity-table", never, { "tableData": { "alias": "tableData"; "required": false; }; }, {}, never, never, true, never>;
111
111
  }
@@ -44,4 +44,4 @@ export declare enum DecoratorTypes {
44
44
  /**
45
45
  * Gives the metadata-config Type based on the DecoratorTypes enum.
46
46
  */
47
- export declare type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
47
+ export type DecoratorType<T, CustomMetadataType extends Record<string, unknown>> = T extends DecoratorTypes.STRING ? DefaultStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_TEXTBOX ? TextboxStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_DROPDOWN ? DropdownStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_AUTOCOMPLETE ? AutocompleteStringDecoratorConfigInternal : T extends DecoratorTypes.STRING_PASSWORD ? PasswordStringDecoratorConfigInternal : T extends DecoratorTypes.NUMBER ? DefaultNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_DROPDOWN ? DropdownNumberDecoratorConfigInternal : T extends DecoratorTypes.NUMBER_SLIDER ? SliderNumberDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_CHECKBOX ? CheckboxBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_TOGGLE ? ToggleBooleanDecoratorConfigInternal : T extends DecoratorTypes.BOOLEAN_DROPDOWN ? DropdownBooleanDecoratorConfigInternal : T extends DecoratorTypes.OBJECT ? DefaultObjectDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY ? EntityArrayDecoratorConfigInternal<any> : T extends DecoratorTypes.ARRAY_DATE ? DateArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_TIME ? DateTimeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_DATE_RANGE ? DateRangeArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_CHIPS ? StringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.ARRAY_STRING_AUTOCOMPLETE_CHIPS ? AutocompleteStringChipsArrayDecoratorConfigInternal : T extends DecoratorTypes.DATE ? DefaultDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_RANGE ? DateRangeDateDecoratorConfigInternal : T extends DecoratorTypes.DATE_TIME ? DateTimeDateDecoratorConfigInternal : T extends DecoratorTypes.FILE_DEFAULT ? DefaultFileDecoratorConfigInternal : T extends DecoratorTypes.FILE_IMAGE ? ImageFileDecoratorConfigInternal : T extends DecoratorTypes.REFERENCES_MANY ? ReferencesManyDecoratorConfigInternal<any> : T extends DecoratorTypes.REFERENCES_ONE ? ReferencesOneDecoratorConfigInternal<any> : T extends DecoratorTypes.HAS_MANY ? HasManyDecoratorConfigInternal<any, any> : T extends DecoratorTypes.CUSTOM ? CustomDecoratorConfigInternal<any, any, CustomMetadataType, any> : never;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A bootstrap column value (a range from 1 - 12).
3
3
  */
4
- export declare type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
4
+ export type Col = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
5
5
  /**
6
6
  * The base options for all propertyDecorators.
7
7
  */
@@ -4,7 +4,7 @@ import { FileDataWithFile, FileDataWithUrl } from './file-decorator-internal.dat
4
4
  /**
5
5
  * The type of a property annotated with @file.
6
6
  */
7
- export declare type FileData = FileDataWithFile | FileDataWithUrl;
7
+ export type FileData = FileDataWithFile | FileDataWithUrl;
8
8
  /**
9
9
  * Definition for the @file metadata.
10
10
  */
@@ -1,6 +1,6 @@
1
1
  import { DropdownValue } from '../base/dropdown-value.interface';
2
2
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
3
- export declare type NumberDropdownValues = DropdownValue<number | undefined>[] | ((entity: any) => DropdownValue<number | undefined>[]) | ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
3
+ export type NumberDropdownValues = DropdownValue<number | undefined>[] | ((entity: any) => DropdownValue<number | undefined>[]) | ((entity: any) => Promise<DropdownValue<number | undefined>[]>);
4
4
  /**
5
5
  * Definition for the @number metadata.
6
6
  */
@@ -1,6 +1,6 @@
1
1
  import { DropdownValue } from '../base/dropdown-value.interface';
2
2
  import { PropertyDecoratorConfig } from '../base/property-decorator.data';
3
- export declare type StringDropdownValues = DropdownValue<string | undefined>[] | ((entity: any) => DropdownValue<string | undefined>[]) | ((entity: any) => Promise<DropdownValue<string | undefined>[]>);
3
+ export type StringDropdownValues = DropdownValue<string | undefined>[] | ((entity: any) => DropdownValue<string | undefined>[]) | ((entity: any) => Promise<DropdownValue<string | undefined>[]>);
4
4
  /**
5
5
  * Definition for the @string metadata.
6
6
  */
@@ -1,5 +1,5 @@
1
1
  import JSZip from 'jszip';
2
- export declare type Zip = JSZip;
2
+ export type Zip = JSZip;
3
3
  /**
4
4
  * Encapsulates JSZip functionality.
5
5
  */
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Encapsulates functionality of the uuid package.
3
+ */
4
+ export declare abstract class UUIDUtilities {
5
+ /**
6
+ * Creates a new v4 uuid.
7
+ *
8
+ * @returns The created uuid.
9
+ */
10
+ static create(): string;
11
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * The abstract BaseBuilder class.
3
+ */
4
+ export class BaseBuilder {
5
+ data;
6
+ inputData;
7
+ constructor(data) {
8
+ this.validateInput(data);
9
+ this.inputData = data;
10
+ this.data = this.generateBaseData(data);
11
+ return this;
12
+ }
13
+ /**
14
+ * Used to validate the user input in the constructor.
15
+ *
16
+ * @param data - The user input.
17
+ */
18
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
19
+ validateInput(data) {
20
+ // By default, no validation is done
21
+ }
22
+ /**
23
+ * Sets the value for the given key if no user value was provided.
24
+ *
25
+ * @param key - The key to set the default value for.
26
+ * @param value - The value to set when nothing was provided.
27
+ * @returns The Builder.
28
+ */
29
+ withDefault(key, value) {
30
+ if (this.inputData == null || this.inputData[key] == null) {
31
+ this.data[key] = value;
32
+ }
33
+ return this;
34
+ }
35
+ /**
36
+ * Method used to get the final build value after applying all chaining.
37
+ *
38
+ * @returns The build value.
39
+ */
40
+ getResult() {
41
+ return this.data;
42
+ }
43
+ }
44
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYmFzZS5idWlsZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9iYXNlLmJ1aWxkZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7O0dBRUc7QUFDSCxNQUFNLE9BQWdCLFdBQVc7SUFFWixJQUFJLENBQWU7SUFDbkIsU0FBUyxDQUFhO0lBRXZDLFlBQXNCLElBQWdCO1FBQ2xDLElBQUksQ0FBQyxhQUFhLENBQUMsSUFBSSxDQUFDLENBQUM7UUFDekIsSUFBSSxDQUFDLFNBQVMsR0FBRyxJQUFJLENBQUM7UUFDdEIsSUFBSSxDQUFDLElBQUksR0FBRyxJQUFJLENBQUMsZ0JBQWdCLENBQUMsSUFBSSxDQUFDLENB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ZhbHVlIC0gVGhlIHZhbHVlIHRvIHNldCB3aGVuIG5vdGhpbmcgd2FzIHByb3ZpZGVkLlxuICAgICAqIEByZXR1cm5zIFRoZSBCdWlsZGVyLlxuICAgICAqL1xuICAgIHdpdGhEZWZhdWx0KGtleToga2V5b2YgSW5wdXRUeXBlLCB2YWx1ZTogT21pdDxJbnRlcm5hbFR5cGVba2V5b2YgSW5wdXRUeXBlXSwgJ3VuZGVmaW5lZCc+KTogQmFzZUJ1aWxkZXI8SW50ZXJuYWxUeXBlLCBJbnB1dFR5cGU+IHtcbiAgICAgICAgaWYgKHRoaXMuaW5wdXREYXRhID09IG51bGwgfHwgdGhpcy5pbnB1dERhdGFba2V5XSA9PSBudWxsKSB7XG4gICAgICAgICAgICB0aGlzLmRhdGFba2V5XSA9IHZhbHVlIGFzIEludGVybmFsVHlwZVtrZXlvZiBJbnB1dFR5cGVdO1xuICAgICAgICB9XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIC8qKlxuICAgICAqIE1ldGhvZCB1c2VkIHRvIGdldCB0aGUgZmluYWwgYnVpbGQgdmFsdWUgYWZ0ZXIgYXBwbHlpbmcgYWxsIGNoYWluaW5nLlxuICAgICAqXG4gICAgICogQHJldHVybnMgVGhlIGJ1aWxkIHZhbHVlLlxuICAgICAqL1xuICAgIGdldFJlc3VsdCgpOiBJbnRlcm5hbFR5cGUge1xuICAgICAgICByZXR1cm4gdGhpcy5kYXRhO1xuICAgIH1cbn0iXX0=
@@ -0,0 +1,26 @@
1
+ import { __decorate, __metadata } from "tslib";
2
+ import { string } from '../decorators/string/string.decorator';
3
+ /**
4
+ * A base Entity class with a builtin id.
5
+ */
6
+ export class Entity {
7
+ /**
8
+ * A unique identifier for the Entity.
9
+ */
10
+ id;
11
+ constructor(entity) {
12
+ this.id = entity?.id;
13
+ }
14
+ }
15
+ __decorate([
16
+ string({
17
+ omitForCreate: true,
18
+ omitForUpdate: true,
19
+ display: false,
20
+ displayStyle: 'line',
21
+ displayName: 'ID',
22
+ required: true
23
+ }),
24
+ __metadata("design:type", String)
25
+ ], Entity.prototype, "id", void 0);
26
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5Lm1vZGVsLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9lbnRpdHkubW9kZWwudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQVkvRDs7R0FFRztBQUNILE1BQU0sT0FBZ0IsTUFBTTtJQUN4Qjs7T0FFRztJQVNNLEVBQUUsQ0FBVTtJQUVyQixZQUFZLE1BQWU7UUFDdkIsSUFBSSxDQUFDLEVBQUUsR0FBRyxNQUFNLEVBQUUsRUFBWSxDQUFDO0lBQ25DLENBQUM7Q0FDSjtBQUxZO0lBUlIsTUFBTSxDQUFDO1FBQ0osYUFBYSxFQUFFLElBQUk7UUFDbkIsYUFBYSxFQUFFLElBQUk7UUFDbkIsT0FBTyxFQUFFLEtBQUs7UUFDZCxZQUFZLEVBQUUsTUFBTTtRQUNwQixXQUFXLEVBQUUsSUFBSTtRQUNqQixRQUFRLEVBQUUsSUFBSTtLQUNqQixDQUFDOztrQ0FDbUIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzdHJpbmcgfSBmcm9tICcuLi9kZWNvcmF0b3JzL3N0cmluZy9zdHJpbmcuZGVjb3JhdG9yJztcblxuLyoqXG4gKiBUaGUgbmV3YWJsZSB0eXBlIHVzZWQgd2hlbmV2ZXIgYW4gZW50aXR5IGNsYXNzIGlzIHBhc3NlZCB0byBjcmVhdGUgYW4gZW50aXR5IGFuZCBpbml0aWFsaXplIGl0cyBtZXRhZGF0YS5cbiAqL1xuZXhwb3J0IHR5cGUgRW50aXR5Q2xhc3NOZXdhYmxlPEVudGl0eVR5cGUgZXh0ZW5kcyBCYXNlRW50aXR5VHlwZTxFbnRpdHlUeXBlPj4gPSBuZXcoZGF0YT86IEVudGl0eVR5cGUpID0+IEVudGl0eVR5cGU7XG5cbi8qKlxuICogVGhlIEdlbmVyaWMgQmFzZSBFbnRpdHlUeXBlLlxuICovXG5leHBvcnQgdHlwZSBCYXNlRW50aXR5VHlwZTxUPiA9IHsgW0sgaW4ga2V5b2YgVF06IHVua25vd24gfTtcblxuLyoqXG4gKiBBIGJhc2UgRW50aXR5IGNsYXNzIHdpdGggYSBidWlsdGluIGlkLlxuICovXG5leHBvcnQgYWJzdHJhY3QgY2xhc3MgRW50aXR5IHtcbiAgICAvKipcbiAgICAgKiBBIHVuaXF1ZSBpZGVudGlmaWVyIGZvciB0aGUgRW50aXR5LlxuICAgICAqL1xuICAgIEBzdHJpbmcoe1xuICAgICAgICBvbWl0Rm9yQ3JlYXRlOiB0cnVlLFxuICAgICAgICBvbWl0Rm9yVXBkYXRlOiB0cnVlLFxuICAgICAgICBkaXNwbGF5OiBmYWxzZSxcbiAgICAgICAgZGlzcGxheVN0eWxlOiAnbGluZScsXG4gICAgICAgIGRpc3BsYXlOYW1lOiAnSUQnLFxuICAgICAgICByZXF1aXJlZDogdHJ1ZVxuICAgIH0pXG4gICAgcmVhZG9ubHkgaWQhOiBzdHJpbmc7XG5cbiAgICBjb25zdHJ1Y3RvcihlbnRpdHk/OiBFbnRpdHkpIHtcbiAgICAgICAgdGhpcy5pZCA9IGVudGl0eT8uaWQgYXMgc3RyaW5nO1xuICAgIH1cbn0iXX0=
@@ -0,0 +1,58 @@
1
+ import { BaseBuilder } from '../../classes/base.builder';
2
+ /**
3
+ * The internal ConfirmDialogData. Requires all default values the user can leave out.
4
+ */
5
+ export class ConfirmDialogDataInternal {
6
+ // eslint-disable-next-line jsdoc/require-jsdoc
7
+ text;
8
+ // eslint-disable-next-line jsdoc/require-jsdoc
9
+ type;
10
+ // eslint-disable-next-line jsdoc/require-jsdoc
11
+ confirmButtonLabel;
12
+ // eslint-disable-next-line jsdoc/require-jsdoc
13
+ cancelButtonLabel;
14
+ // eslint-disable-next-line jsdoc/require-jsdoc
15
+ title;
16
+ // eslint-disable-next-line jsdoc/require-jsdoc
17
+ requireConfirmation;
18
+ // eslint-disable-next-line jsdoc/require-jsdoc
19
+ confirmationText;
20
+ constructor(text, type, confirmButtonLabel, cancelButtonLabel, title, requireConfirmation, confirmationText) {
21
+ this.text = text;
22
+ this.type = type;
23
+ this.confirmButtonLabel = confirmButtonLabel;
24
+ this.cancelButtonLabel = cancelButtonLabel;
25
+ this.title = title;
26
+ this.requireConfirmation = requireConfirmation;
27
+ this.confirmationText = confirmationText;
28
+ }
29
+ }
30
+ /**
31
+ * The Builder for the ConfirmDialogData. Sets default values.
32
+ */
33
+ export class ConfirmDialogDataBuilder extends BaseBuilder {
34
+ constructor(data) {
35
+ super(data);
36
+ }
37
+ // eslint-disable-next-line jsdoc/require-jsdoc
38
+ generateBaseData(data) {
39
+ return new ConfirmDialogDataInternal(data?.text ?? ['Do you really want to do this?'], data?.type ?? 'default', data?.confirmButtonLabel ?? 'Confirm', data?.cancelButtonLabel ?? 'Cancel', data?.title ?? 'Confirmation', data?.requireConfirmation ?? false, data?.confirmationText);
40
+ }
41
+ // eslint-disable-next-line jsdoc/require-jsdoc
42
+ validateInput(data) {
43
+ if (!data) {
44
+ return;
45
+ }
46
+ if (data.requireConfirmation === true && !data.confirmationText) {
47
+ // eslint-disable-next-line max-len
48
+ throw new Error('Missing required Input data "confirmationText". You can only omit this value when "requireConfirmation" is false.');
49
+ }
50
+ if (data.requireConfirmation !== true && data.confirmationText) {
51
+ throw new Error('The "confirmationText" will never be shown because "requireConfirmation" is not set to true');
52
+ }
53
+ if (data.type === 'info-only' && data.cancelButtonLabel) {
54
+ throw new Error('The "cancelButtonLabel" will never be shown because "type" is set to "info-only"');
55
+ }
56
+ }
57
+ }
58
+ //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icpO1xuICAgICAgICB9XG4gICAgfVxufSJdfQ==
@@ -0,0 +1,60 @@
1
+ import { Component, Inject } from '@angular/core';
2
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialogModule } from '@angular/material/dialog';
3
+ import { ConfirmDialogDataBuilder } from './confirm-dialog-data.builder';
4
+ import { FormsModule } from '@angular/forms';
5
+ import { MatButtonModule } from '@angular/material/button';
6
+ import { MatCheckboxModule } from '@angular/material/checkbox';
7
+ import { NgFor, NgIf } from '@angular/common';
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "@angular/material/dialog";
10
+ import * as i2 from "@angular/forms";
11
+ import * as i3 from "@angular/material/checkbox";
12
+ import * as i4 from "@angular/material/button";
13
+ /**
14
+ * The Dialog used whenever confirmation by the user is required (e.g. When the user tries to delete an entity).
15
+ *
16
+ * Can be customized with the MAT_DIALOG_DATA "inputData". Customization options are defined in "ConfirmDialogData".
17
+ */
18
+ export class NgxMatEntityConfirmDialogComponent {
19
+ dialogRef;
20
+ inputData;
21
+ confirm = false;
22
+ data;
23
+ constructor(dialogRef, inputData) {
24
+ this.dialogRef = dialogRef;
25
+ this.inputData = inputData;
26
+ }
27
+ ngOnInit() {
28
+ this.data = new ConfirmDialogDataBuilder(this.inputData).getResult();
29
+ this.dialogRef.disableClose = true;
30
+ }
31
+ /**
32
+ * Closes the dialog with true to signal that the action should be run.
33
+ */
34
+ confirmAction() {
35
+ this.dialogRef.close(true);
36
+ }
37
+ /**
38
+ * Closes the dialog.
39
+ */
40
+ cancel() {
41
+ this.dialogRef.close(false);
42
+ }
43
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
44
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.2.0", type: NgxMatEntityConfirmDialogComponent, isStandalone: true, selector: "ngx-mat-entity-confirm-dialog", ngImport: i0, template: "<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 type=\"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 type=\"button\" *ngIf=\"data.type !== 'delete'\" mat-raised-button (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel}}\n </button>\n <button type=\"button\" *ngIf=\"data.type !== 'info-only'\" mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.cancelButtonLabel}}\n </button>\n</mat-dialog-actions>", styles: [".checkbox-wrapper{min-height:50px;display:flex}.checkbox-wrapper>mat-checkbox{align-self:center}mat-dialog-actions{justify-content:space-between}\n"], dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: MatDialogModule }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MatCheckboxModule }, { kind: "component", type: i3.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "ngmodule", type: MatButtonModule }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }] });
45
+ }
46
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.0", ngImport: i0, type: NgxMatEntityConfirmDialogComponent, decorators: [{
47
+ type: Component,
48
+ args: [{ selector: 'ngx-mat-entity-confirm-dialog', standalone: true, imports: [
49
+ NgIf,
50
+ NgFor,
51
+ MatDialogModule,
52
+ FormsModule,
53
+ MatCheckboxModule,
54
+ MatButtonModule
55
+ ], template: "<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 type=\"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 type=\"button\" *ngIf=\"data.type !== 'delete'\" mat-raised-button (click)=\"confirmAction()\" [disabled]=\"data.requireConfirmation && !confirm\" class=\"confirm-button\">\n {{data.confirmButtonLabel}}\n </button>\n <button type=\"button\" *ngIf=\"data.type !== 'info-only'\" mat-raised-button (click)=\"cancel()\" class=\"cancel-button\">\n {{data.cancelButtonLabel}}\n </button>\n</mat-dialog-actions>", styles: [".checkbox-wrapper{min-height:50px;display:flex}.checkbox-wrapper>mat-checkbox{align-self:center}mat-dialog-actions{justify-content:space-between}\n"] }]
56
+ }], ctorParameters: function () { return [{ type: i1.MatDialogRef }, { type: undefined, decorators: [{
57
+ type: Inject,
58
+ args: [MAT_DIALOG_DATA]
59
+ }] }]; } });
60
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlybS1kaWFsb2cuY29tcG9uZW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY29tcG9uZW50cy9jb25maXJtLWRpYWxvZy9jb25maXJtLWRpYWxvZy5jb21wb25lbnQudHMiLCIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9uZ3gtbWF0ZXJpYWwtZW50aXR5L3NyYy9jb21wb25lbnRzL2NvbmZpcm0tZGlhbG9nL2NvbmZpcm0tZGlhbG9nLmNvbXBvbmVudC5odG1sIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxFQUFVLE1BQU0sZUFBZSxDQUFDO0FBQzFELE9BQU8sRUFBRSxZQUFZLEVBQUUsZUFBZSxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTFGLE9BQU8sRUFBRSx3QkFBd0IsRUFBNkIsTUFBTSwrQkFBK0IsQ0FBQztBQUNwRyxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDN0MsT0FBTyxFQUFFLGVBQWUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBQzNELE9BQU8sRUFBRSxpQkFBaUI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