ngx-material-entity 18.2.5 → 20.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 (257) hide show
  1. package/fesm2022/ngx-material-entity.mjs +165 -155
  2. package/fesm2022/ngx-material-entity.mjs.map +1 -1
  3. package/index.d.ts +4501 -3
  4. package/package.json +10 -12
  5. package/classes/base.builder.d.ts +0 -37
  6. package/classes/entity.model.d.ts +0 -27
  7. package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +0 -24
  8. package/components/confirm-dialog/confirm-dialog-data.d.ts +0 -48
  9. package/components/confirm-dialog/confirm-dialog.component.d.ts +0 -36
  10. package/components/create-page/create-data.route.d.ts +0 -16
  11. package/components/create-page/create-page.component.d.ts +0 -141
  12. package/components/create-page/page-create-data.builder.d.ts +0 -18
  13. package/components/custom-table/custom-table-configuration.model.d.ts +0 -65
  14. package/components/custom-table/custom-table.component.d.ts +0 -111
  15. package/components/edit-page/edit-data.route.d.ts +0 -16
  16. package/components/edit-page/edit-page.component.d.ts +0 -167
  17. package/components/edit-page/page-edit-data.builder.d.ts +0 -18
  18. package/components/form/form.component.d.ts +0 -64
  19. package/components/input/array/array-date-input/array-date-input.component.d.ts +0 -17
  20. package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +0 -25
  21. package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +0 -26
  22. package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +0 -30
  23. package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +0 -36
  24. package/components/input/array/array-table.class.d.ts +0 -56
  25. package/components/input/base-input.component.d.ts +0 -64
  26. package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +0 -10
  27. package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +0 -13
  28. package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +0 -10
  29. package/components/input/custom/custom.component.d.ts +0 -13
  30. package/components/input/date/date-input/date-input.component.d.ts +0 -11
  31. package/components/input/date/date-range-input/date-range-input.component.d.ts +0 -22
  32. package/components/input/date/date-time-input/date-time-input.component.d.ts +0 -32
  33. package/components/input/file/file-default-input/file-default-input.component.d.ts +0 -11
  34. package/components/input/file/file-image-input/file-image-input.component.d.ts +0 -28
  35. package/components/input/file/file-input/file-input.component.d.ts +0 -45
  36. package/components/input/input.component.d.ts +0 -590
  37. package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +0 -24
  38. package/components/input/number/number-input/number-input.component.d.ts +0 -9
  39. package/components/input/number/number-slider-input/number-slider-input.component.d.ts +0 -10
  40. package/components/input/relations/references-many-input/references-many-input.component.d.ts +0 -43
  41. package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +0 -19
  42. package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +0 -24
  43. package/components/input/string/string-input/string-input.component.d.ts +0 -9
  44. package/components/input/string/string-password-input/string-password-input.component.d.ts +0 -31
  45. package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +0 -9
  46. package/components/table/create-dialog/create-data.builder.d.ts +0 -25
  47. package/components/table/create-dialog/create-entity-data.builder.d.ts +0 -21
  48. package/components/table/create-dialog/create-entity-data.d.ts +0 -19
  49. package/components/table/create-dialog/create-entity-dialog.component.d.ts +0 -77
  50. package/components/table/default.actions.d.ts +0 -25
  51. package/components/table/display-column-value/base-display-column-value.component.d.ts +0 -15
  52. package/components/table/display-column-value/display-column-value.component.d.ts +0 -26
  53. package/components/table/edit-dialog/edit-data.builder.d.ts +0 -44
  54. package/components/table/edit-dialog/edit-entity-data.d.ts +0 -27
  55. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +0 -118
  56. package/components/table/edit-dialog/edit-entity.builder.d.ts +0 -23
  57. package/components/table/table-data.builder.d.ts +0 -102
  58. package/components/table/table-data.d.ts +0 -340
  59. package/components/table/table.component.d.ts +0 -119
  60. package/components/tooltip/tooltip.component.d.ts +0 -14
  61. package/decorators/array/array-decorator-internal.data.d.ts +0 -129
  62. package/decorators/array/array-decorator.data.d.ts +0 -252
  63. package/decorators/array/array.decorator.d.ts +0 -9
  64. package/decorators/base/base-property.decorator.d.ts +0 -9
  65. package/decorators/base/decorator-types.enum.d.ts +0 -48
  66. package/decorators/base/dropdown-value.interface.d.ts +0 -14
  67. package/decorators/base/property-decorator-internal.data.d.ts +0 -41
  68. package/decorators/base/property-decorator.data.d.ts +0 -88
  69. package/decorators/boolean/boolean-decorator-internal.data.d.ts +0 -26
  70. package/decorators/boolean/boolean-decorator.data.d.ts +0 -39
  71. package/decorators/boolean/boolean.decorator.d.ts +0 -7
  72. package/decorators/custom/custom-decorator-internal.data.d.ts +0 -17
  73. package/decorators/custom/custom-decorator.data.d.ts +0 -35
  74. package/decorators/custom/custom.decorator.d.ts +0 -9
  75. package/decorators/date/date-decorator-internal.data.d.ts +0 -45
  76. package/decorators/date/date-decorator.data.d.ts +0 -126
  77. package/decorators/date/date.decorator.d.ts +0 -7
  78. package/decorators/file/file-decorator-internal.data.d.ts +0 -93
  79. package/decorators/file/file-decorator.data.d.ts +0 -88
  80. package/decorators/file/file.decorator.d.ts +0 -8
  81. package/decorators/has-many/has-many-decorator-internal.data.d.ts +0 -16
  82. package/decorators/has-many/has-many-decorator.data.d.ts +0 -34
  83. package/decorators/has-many/has-many.decorator.d.ts +0 -8
  84. package/decorators/number/number-decorator-internal.data.d.ts +0 -38
  85. package/decorators/number/number-decorator.data.d.ts +0 -63
  86. package/decorators/number/number.decorator.d.ts +0 -7
  87. package/decorators/object/object-decorator-internal.data.d.ts +0 -23
  88. package/decorators/object/object-decorator.data.d.ts +0 -42
  89. package/decorators/object/object.decorator.d.ts +0 -8
  90. package/decorators/references-many/references-many-decorator-internal.data.d.ts +0 -30
  91. package/decorators/references-many/references-many-decorator.data.d.ts +0 -63
  92. package/decorators/references-many/references-many.decorator.d.ts +0 -8
  93. package/decorators/references-one/references-one-decorator-internal.data.d.ts +0 -16
  94. package/decorators/references-one/references-one-decorator.data.d.ts +0 -32
  95. package/decorators/references-one/references-one.decorator.d.ts +0 -8
  96. package/decorators/string/string-decorator-internal.data.d.ts +0 -56
  97. package/decorators/string/string-decorator.data.d.ts +0 -116
  98. package/decorators/string/string.decorator.d.ts +0 -7
  99. package/default-global-configuration-values.d.ts +0 -13
  100. package/directives/drag-drop.directive.d.ts +0 -29
  101. package/directives/dynamic-style-class.directive.d.ts +0 -24
  102. package/directives/included-in.directive.d.ts +0 -14
  103. package/directives/number.directive.d.ts +0 -16
  104. package/directives/password-match.directive.d.ts +0 -14
  105. package/directives/tooltip.directive.d.ts +0 -42
  106. package/encapsulation/js-2-xml.utilities.d.ts +0 -14
  107. package/encapsulation/jszip.utilities.d.ts +0 -12
  108. package/encapsulation/lodash.utilities.d.ts +0 -60
  109. package/encapsulation/reflect.utilities.d.ts +0 -59
  110. package/encapsulation/uuid.utilities.d.ts +0 -10
  111. package/esm2022/classes/base.builder.mjs +0 -47
  112. package/esm2022/classes/entity.model.mjs +0 -26
  113. package/esm2022/components/confirm-dialog/confirm-dialog-data.builder.mjs +0 -57
  114. package/esm2022/components/confirm-dialog/confirm-dialog-data.mjs +0 -2
  115. package/esm2022/components/confirm-dialog/confirm-dialog.component.mjs +0 -71
  116. package/esm2022/components/create-page/create-data.route.mjs +0 -12
  117. package/esm2022/components/create-page/create-page.component.mjs +0 -276
  118. package/esm2022/components/create-page/page-create-data.builder.mjs +0 -30
  119. package/esm2022/components/custom-table/custom-table-configuration.model.mjs +0 -37
  120. package/esm2022/components/custom-table/custom-table.component.mjs +0 -213
  121. package/esm2022/components/edit-page/edit-data.route.mjs +0 -12
  122. package/esm2022/components/edit-page/edit-page.component.mjs +0 -362
  123. package/esm2022/components/edit-page/page-edit-data.builder.mjs +0 -33
  124. package/esm2022/components/form/form.component.mjs +0 -106
  125. package/esm2022/components/input/array/array-date-input/array-date-input.component.mjs +0 -56
  126. package/esm2022/components/input/array/array-date-range-input/array-date-range-input.component.mjs +0 -82
  127. package/esm2022/components/input/array/array-date-time-input/array-date-time-input.component.mjs +0 -82
  128. package/esm2022/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +0 -81
  129. package/esm2022/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +0 -74
  130. package/esm2022/components/input/array/array-table.class.mjs +0 -107
  131. package/esm2022/components/input/base-input.component.mjs +0 -102
  132. package/esm2022/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +0 -29
  133. package/esm2022/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +0 -40
  134. package/esm2022/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +0 -29
  135. package/esm2022/components/input/custom/custom.component.mjs +0 -28
  136. package/esm2022/components/input/date/date-input/date-input.component.mjs +0 -28
  137. package/esm2022/components/input/date/date-range-input/date-range-input.component.mjs +0 -84
  138. package/esm2022/components/input/date/date-time-input/date-time-input.component.mjs +0 -90
  139. package/esm2022/components/input/file/file-default-input/file-default-input.component.mjs +0 -18
  140. package/esm2022/components/input/file/file-image-input/file-image-input.component.mjs +0 -104
  141. package/esm2022/components/input/file/file-input/file-input.component.mjs +0 -228
  142. package/esm2022/components/input/input.component.mjs +0 -1361
  143. package/esm2022/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +0 -65
  144. package/esm2022/components/input/number/number-input/number-input.component.mjs +0 -23
  145. package/esm2022/components/input/number/number-slider-input/number-slider-input.component.mjs +0 -27
  146. package/esm2022/components/input/relations/references-many-input/references-many-input.component.mjs +0 -145
  147. package/esm2022/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +0 -56
  148. package/esm2022/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +0 -65
  149. package/esm2022/components/input/string/string-input/string-input.component.mjs +0 -23
  150. package/esm2022/components/input/string/string-password-input/string-password-input.component.mjs +0 -107
  151. package/esm2022/components/input/string/string-textbox-input/string-textbox-input.component.mjs +0 -24
  152. package/esm2022/components/table/create-dialog/create-data.builder.mjs +0 -56
  153. package/esm2022/components/table/create-dialog/create-entity-data.builder.mjs +0 -32
  154. package/esm2022/components/table/create-dialog/create-entity-data.mjs +0 -2
  155. package/esm2022/components/table/create-dialog/create-entity-dialog.component.mjs +0 -180
  156. package/esm2022/components/table/default.actions.mjs +0 -83
  157. package/esm2022/components/table/display-column-value/base-display-column-value.component.mjs +0 -27
  158. package/esm2022/components/table/display-column-value/display-column-value.component.mjs +0 -41
  159. package/esm2022/components/table/edit-dialog/edit-data.builder.mjs +0 -136
  160. package/esm2022/components/table/edit-dialog/edit-entity-data.mjs +0 -2
  161. package/esm2022/components/table/edit-dialog/edit-entity-dialog.component.mjs +0 -295
  162. package/esm2022/components/table/edit-dialog/edit-entity.builder.mjs +0 -39
  163. package/esm2022/components/table/table-data.builder.mjs +0 -304
  164. package/esm2022/components/table/table-data.mjs +0 -2
  165. package/esm2022/components/table/table.component.mjs +0 -324
  166. package/esm2022/components/tooltip/tooltip.component.mjs +0 -26
  167. package/esm2022/decorators/array/array-decorator-internal.data.mjs +0 -310
  168. package/esm2022/decorators/array/array-decorator.data.mjs +0 -51
  169. package/esm2022/decorators/array/array.decorator.mjs +0 -37
  170. package/esm2022/decorators/base/base-property.decorator.mjs +0 -17
  171. package/esm2022/decorators/base/decorator-types.enum.mjs +0 -35
  172. package/esm2022/decorators/base/dropdown-value.interface.mjs +0 -2
  173. package/esm2022/decorators/base/property-decorator-internal.data.mjs +0 -101
  174. package/esm2022/decorators/base/property-decorator.data.mjs +0 -59
  175. package/esm2022/decorators/boolean/boolean-decorator-internal.data.mjs +0 -45
  176. package/esm2022/decorators/boolean/boolean-decorator.data.mjs +0 -11
  177. package/esm2022/decorators/boolean/boolean.decorator.mjs +0 -21
  178. package/esm2022/decorators/custom/custom-decorator-internal.data.mjs +0 -34
  179. package/esm2022/decorators/custom/custom-decorator.data.mjs +0 -2
  180. package/esm2022/decorators/custom/custom.decorator.mjs +0 -13
  181. package/esm2022/decorators/date/date-decorator-internal.data.mjs +0 -92
  182. package/esm2022/decorators/date/date-decorator.data.mjs +0 -11
  183. package/esm2022/decorators/date/date.decorator.mjs +0 -22
  184. package/esm2022/decorators/file/file-decorator-internal.data.mjs +0 -143
  185. package/esm2022/decorators/file/file-decorator.data.mjs +0 -59
  186. package/esm2022/decorators/file/file.decorator.mjs +0 -25
  187. package/esm2022/decorators/has-many/has-many-decorator-internal.data.mjs +0 -41
  188. package/esm2022/decorators/has-many/has-many-decorator.data.mjs +0 -2
  189. package/esm2022/decorators/has-many/has-many.decorator.mjs +0 -13
  190. package/esm2022/decorators/number/number-decorator-internal.data.mjs +0 -68
  191. package/esm2022/decorators/number/number-decorator.data.mjs +0 -11
  192. package/esm2022/decorators/number/number.decorator.mjs +0 -22
  193. package/esm2022/decorators/object/object-decorator-internal.data.mjs +0 -42
  194. package/esm2022/decorators/object/object-decorator.data.mjs +0 -22
  195. package/esm2022/decorators/object/object.decorator.mjs +0 -20
  196. package/esm2022/decorators/references-many/references-many-decorator-internal.data.mjs +0 -55
  197. package/esm2022/decorators/references-many/references-many-decorator.data.mjs +0 -2
  198. package/esm2022/decorators/references-many/references-many.decorator.mjs +0 -13
  199. package/esm2022/decorators/references-one/references-one-decorator-internal.data.mjs +0 -34
  200. package/esm2022/decorators/references-one/references-one-decorator.data.mjs +0 -2
  201. package/esm2022/decorators/references-one/references-one.decorator.mjs +0 -12
  202. package/esm2022/decorators/string/string-decorator-internal.data.mjs +0 -119
  203. package/esm2022/decorators/string/string-decorator.data.mjs +0 -11
  204. package/esm2022/decorators/string/string.decorator.mjs +0 -29
  205. package/esm2022/default-global-configuration-values.mjs +0 -91
  206. package/esm2022/directives/drag-drop.directive.mjs +0 -60
  207. package/esm2022/directives/dynamic-style-class.directive.mjs +0 -51
  208. package/esm2022/directives/included-in.directive.mjs +0 -33
  209. package/esm2022/directives/number.directive.mjs +0 -37
  210. package/esm2022/directives/password-match.directive.mjs +0 -30
  211. package/esm2022/directives/tooltip.directive.mjs +0 -142
  212. package/esm2022/encapsulation/js-2-xml.utilities.mjs +0 -17
  213. package/esm2022/encapsulation/jszip.utilities.mjs +0 -16
  214. package/esm2022/encapsulation/lodash.utilities.mjs +0 -80
  215. package/esm2022/encapsulation/reflect.utilities.mjs +0 -79
  216. package/esm2022/encapsulation/uuid.utilities.mjs +0 -14
  217. package/esm2022/functions/default-false.function.mjs +0 -9
  218. package/esm2022/functions/default-style-classes.function.mjs +0 -7
  219. package/esm2022/functions/default-true.function.mjs +0 -9
  220. package/esm2022/functions/dropdown-values-to-function.function.mjs +0 -15
  221. package/esm2022/functions/get-changes-tooltip-content.function.mjs +0 -23
  222. package/esm2022/functions/get-config-value.function.mjs +0 -14
  223. package/esm2022/functions/get-validation-error-message.function.mjs +0 -54
  224. package/esm2022/functions/get-validation-errors-tooltip-content.function.mjs +0 -23
  225. package/esm2022/functions/is-async-function.function.mjs +0 -9
  226. package/esm2022/functions/table-column-value-to-sort-value.function.mjs +0 -33
  227. package/esm2022/global-configuration-values.mjs +0 -27
  228. package/esm2022/mocks/placeholder-data.png.mjs +0 -3
  229. package/esm2022/ngx-material-entity.mjs +0 -5
  230. package/esm2022/public-api.mjs +0 -68
  231. package/esm2022/services/entity.service.mjs +0 -269
  232. package/esm2022/services/unsaved-changes.guard.mjs +0 -13
  233. package/esm2022/utilities/date.utilities.mjs +0 -138
  234. package/esm2022/utilities/entity.utilities.mjs +0 -611
  235. package/esm2022/utilities/file.utilities.mjs +0 -172
  236. package/esm2022/utilities/selection.utilities.mjs +0 -49
  237. package/esm2022/utilities/validation.utilities.mjs +0 -543
  238. package/functions/default-false.function.d.ts +0 -6
  239. package/functions/default-style-classes.function.d.ts +0 -6
  240. package/functions/default-true.function.d.ts +0 -6
  241. package/functions/dropdown-values-to-function.function.d.ts +0 -11
  242. package/functions/get-changes-tooltip-content.function.d.ts +0 -13
  243. package/functions/get-config-value.function.d.ts +0 -7
  244. package/functions/get-validation-error-message.function.d.ts +0 -5
  245. package/functions/get-validation-errors-tooltip-content.function.d.ts +0 -12
  246. package/functions/is-async-function.function.d.ts +0 -6
  247. package/functions/table-column-value-to-sort-value.function.d.ts +0 -9
  248. package/global-configuration-values.d.ts +0 -205
  249. package/mocks/placeholder-data.png.d.ts +0 -1
  250. package/public-api.d.ts +0 -60
  251. package/services/entity.service.d.ts +0 -146
  252. package/services/unsaved-changes.guard.d.ts +0 -23
  253. package/utilities/date.utilities.d.ts +0 -92
  254. package/utilities/entity.utilities.d.ts +0 -236
  255. package/utilities/file.utilities.d.ts +0 -67
  256. package/utilities/selection.utilities.d.ts +0 -28
  257. package/utilities/validation.utilities.d.ts +0 -58
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ngx-material-entity",
3
- "version": "18.2.5",
3
+ "version": "20.0.0",
4
4
  "license": "MIT",
5
5
  "keywords": [
6
6
  "angular",
@@ -9,21 +9,21 @@
9
9
  "entity"
10
10
  ],
11
11
  "peerDependencies": {
12
- "@angular/animations": "18",
13
- "@angular/cdk": "18",
14
- "@angular/common": "18",
15
- "@angular/core": "18",
16
- "@angular/forms": "18",
17
- "@angular/material": "18",
12
+ "@angular/animations": "20",
13
+ "@angular/cdk": "20",
14
+ "@angular/common": "20",
15
+ "@angular/core": "20",
16
+ "@angular/forms": "20",
17
+ "@angular/material": "20",
18
18
  "js2xmlparser": "^5.0.0",
19
19
  "jszip": "^3.10.1",
20
20
  "lodash": "4",
21
21
  "uuid": "9",
22
- "@fortawesome/angular-fontawesome": "^0.15",
23
- "@fortawesome/free-solid-svg-icons": "^6"
22
+ "@fortawesome/angular-fontawesome": "^3",
23
+ "@fortawesome/free-solid-svg-icons": "^7"
24
24
  },
25
25
  "dependencies": {
26
- "tslib": "^2.6.2"
26
+ "tslib": "^2.8.1"
27
27
  },
28
28
  "module": "fesm2022/ngx-material-entity.mjs",
29
29
  "typings": "index.d.ts",
@@ -33,8 +33,6 @@
33
33
  },
34
34
  ".": {
35
35
  "types": "./index.d.ts",
36
- "esm2022": "./esm2022/ngx-material-entity.mjs",
37
- "esm": "./esm2022/ngx-material-entity.mjs",
38
36
  "default": "./fesm2022/ngx-material-entity.mjs"
39
37
  }
40
38
  },
@@ -1,37 +0,0 @@
1
- import { BaseEntityType } from './entity.model';
2
- import { NgxGlobalDefaultValues } from '../global-configuration-values';
3
- /**
4
- * The abstract BaseBuilder class.
5
- */
6
- export declare abstract class BaseBuilder<InternalType extends InputType, InputType extends BaseEntityType<InputType>> {
7
- private readonly data;
8
- private readonly inputData?;
9
- /**
10
- * The global configuration, is used for providing default values to fallback to.
11
- */
12
- protected readonly globalConfig: NgxGlobalDefaultValues;
13
- protected constructor(globalConfig: NgxGlobalDefaultValues, data?: InputType);
14
- /**
15
- * Generates the internal data from the given user inputs.
16
- * @param data - The input from the user.
17
- * @returns The internal data.
18
- */
19
- protected abstract generateBaseData(data?: InputType): InternalType;
20
- /**
21
- * Used to validate the user input in the constructor.
22
- * @param data - The user input.
23
- */
24
- protected validateInput(data?: InputType): void;
25
- /**
26
- * Sets the value for the given key if no user value was provided.
27
- * @param key - The key to set the default value for.
28
- * @param value - The value to set when nothing was provided.
29
- * @returns The Builder.
30
- */
31
- withDefault(key: keyof InputType, value: Omit<InternalType[keyof InputType], 'undefined'>): BaseBuilder<InternalType, InputType>;
32
- /**
33
- * Method used to get the final build value after applying all chaining.
34
- * @returns The build value.
35
- */
36
- getResult(): InternalType;
37
- }
@@ -1,27 +0,0 @@
1
- import { HttpClient } from '@angular/common/http';
2
- import { EnvironmentInjector } from '@angular/core';
3
- import { EntityService } from '../services/entity.service';
4
- /**
5
- * The newable type used whenever an entity class is passed to create an entity and initialize its metadata.
6
- */
7
- export type EntityClassNewable<EntityType extends BaseEntityType<EntityType>> = new (data?: EntityType) => EntityType;
8
- /**
9
- * The newable type used whenever an entity service class is passed.
10
- */
11
- export type EntityServiceClassNewable<EntityType extends BaseEntityType<EntityType>> = new (http: HttpClient, injector: EnvironmentInjector) => EntityService<EntityType>;
12
- /**
13
- * The Generic Base EntityType.
14
- */
15
- export type BaseEntityType<T> = {
16
- [K in keyof T]: unknown;
17
- };
18
- /**
19
- * A base Entity class with a builtin id.
20
- */
21
- export declare abstract class Entity {
22
- /**
23
- * A unique identifier for the Entity.
24
- */
25
- readonly id: string;
26
- constructor(entity?: Entity);
27
- }
@@ -1,24 +0,0 @@
1
- import { ConfirmDialogData, ConfirmDialogTypes } from './confirm-dialog-data';
2
- import { BaseBuilder } from '../../classes/base.builder';
3
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
4
- /**
5
- * The internal ConfirmDialogData. Requires all default values the user can leave out.
6
- */
7
- export declare class ConfirmDialogDataInternal implements ConfirmDialogData {
8
- text: string[];
9
- type: ConfirmDialogTypes;
10
- confirmButtonLabel: string;
11
- cancelButtonLabel: string;
12
- title: string;
13
- requireConfirmation: boolean;
14
- confirmationText?: string;
15
- constructor(text: string[], type: ConfirmDialogTypes, confirmButtonLabel: string, cancelButtonLabel: string, title: string, requireConfirmation: boolean, confirmationText?: string);
16
- }
17
- /**
18
- * The Builder for the ConfirmDialogData. Sets default values.
19
- */
20
- export declare class ConfirmDialogDataBuilder extends BaseBuilder<ConfirmDialogDataInternal, ConfirmDialogData> {
21
- constructor(globalConfig: NgxGlobalDefaultValues, data?: ConfirmDialogData);
22
- protected generateBaseData(data?: ConfirmDialogData): ConfirmDialogDataInternal;
23
- protected validateInput(data?: ConfirmDialogData): void;
24
- }
@@ -1,48 +0,0 @@
1
- /**
2
- * The different types of a confirm dialog.
3
- * Is used for displaying different buttons accordingly.
4
- */
5
- export type ConfirmDialogTypes = 'default' | 'delete' | 'info-only';
6
- /**
7
- * The Definition of the Confirm Dialog Data.
8
- */
9
- export interface ConfirmDialogData {
10
- /**
11
- * An array of paragraphs to display inside the dialog body.
12
- */
13
- text?: string[];
14
- /**
15
- * The type of the Confirm Dialog. Changes the button layout. Can be either:
16
- *
17
- * 'default': A confirm- and a cancel-button.
18
- *
19
- * 'delete': Like default but the confirm-button is red.
20
- *
21
- * 'info-only': Only a cancel-button.
22
- */
23
- type?: ConfirmDialogTypes;
24
- /**
25
- * The label of the button that confirms the dialog.
26
- * In case of the 'delete' Dialog this is the string that is shown on the delete-button.
27
- * @default 'Confirm' or 'Delete', depending on the type
28
- */
29
- confirmButtonLabel?: string;
30
- /**
31
- * The label of the button that closes the dialog without doing anything.
32
- * @default 'Cancel'
33
- */
34
- cancelButtonLabel?: string;
35
- /**
36
- * The title of the dialog.
37
- */
38
- title?: string;
39
- /**
40
- * Whether or not a checkbox needs to be selected before the user can confirm the dialog.
41
- * @default false
42
- */
43
- requireConfirmation?: boolean;
44
- /**
45
- * The text to display on the checkbox if 'requireConfirmation' is set to true.
46
- */
47
- confirmationText?: string;
48
- }
@@ -1,36 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { MatDialogRef } from '@angular/material/dialog';
3
- import { ConfirmDialogData } from './confirm-dialog-data';
4
- import { ConfirmDialogDataInternal } from './confirm-dialog-data.builder';
5
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
6
- import * as i0 from "@angular/core";
7
- /**
8
- * The Dialog used whenever confirmation by the user is required (e.g. When the user tries to delete an entity).
9
- *
10
- * Can be customized with the MAT_DIALOG_DATA "inputData". Customization options are defined in "ConfirmDialogData".
11
- */
12
- export declare class NgxMatEntityConfirmDialogComponent implements OnInit {
13
- private readonly dialogRef;
14
- private readonly inputData;
15
- protected readonly globalConfig: NgxGlobalDefaultValues;
16
- /**
17
- * Whether or not the user needs to tick a checkbox to enable the confirm button.
18
- */
19
- confirm: boolean;
20
- /**
21
- * The configuration data of the dialog.
22
- */
23
- data: ConfirmDialogDataInternal;
24
- constructor(dialogRef: MatDialogRef<NgxMatEntityConfirmDialogComponent>, inputData: ConfirmDialogData, globalConfig: NgxGlobalDefaultValues);
25
- ngOnInit(): void;
26
- /**
27
- * Closes the dialog with true to signal that the action should be run.
28
- */
29
- confirmAction(): void;
30
- /**
31
- * Closes the dialog.
32
- */
33
- cancel(): void;
34
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityConfirmDialogComponent, never>;
35
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityConfirmDialogComponent, "ngx-mat-entity-confirm-dialog", never, {}, {}, never, never, true, never>;
36
- }
@@ -1,16 +0,0 @@
1
- import { EnvironmentProviders, Provider, Type } from '@angular/core';
2
- import { DefaultExport, Route } from '@angular/router';
3
- import { Observable } from 'rxjs';
4
- /**
5
- * The definition for a route to use with the "NgxMatEntityCreatePageComponent".
6
- */
7
- export interface CreateDataRoute extends Route {
8
- loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>;
9
- providers: (Provider | EnvironmentProviders)[];
10
- title: string;
11
- path: string;
12
- }
13
- /**
14
- * The default data for a create route.
15
- */
16
- export declare const defaultCreateDataRoute: Omit<CreateDataRoute, 'providers'>;
@@ -1,141 +0,0 @@
1
- import { Location } from '@angular/common';
2
- import { HttpClient } from '@angular/common/http';
3
- import { ElementRef, EnvironmentInjector, InjectionToken, OnInit, Renderer2 } from '@angular/core';
4
- import { MatDialog } from '@angular/material/dialog';
5
- import { IconDefinition } from '@fortawesome/angular-fontawesome';
6
- import { PageCreateDataInternal } from './page-create-data.builder';
7
- import { BaseEntityType, EntityClassNewable } from '../../classes/entity.model';
8
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
9
- import { EntityService } from '../../services/entity.service';
10
- import { UnsavedChangesPage } from '../../services/unsaved-changes.guard';
11
- import { EntityUtilities } from '../../utilities/entity.utilities';
12
- import { ValidationError } from '../../utilities/validation.utilities';
13
- import { ConfirmDialogData } from '../confirm-dialog/confirm-dialog-data';
14
- import { CreateEntityData } from '../table/create-dialog/create-entity-data';
15
- import { CreateData } from '../table/table-data';
16
- import * as i0 from "@angular/core";
17
- /**
18
- * The data that needs to be provided for a route to be able to create a entity.
19
- */
20
- export type PageCreateData<EntityType extends BaseEntityType<EntityType>> = Omit<CreateEntityData<EntityType>, 'entity' | 'EntityServiceClass'> & {
21
- /**
22
- * Whether or not to display a loading spinner while the data for the page is loaded.
23
- * @default true
24
- */
25
- displayLoadingSpinner?: boolean;
26
- /**
27
- * The data of the default create page.
28
- */
29
- createData?: CreateData & {
30
- /**
31
- * The data for the dialog when the user tries to leave the site with unsaved changes.
32
- */
33
- confirmUnsavedChangesDialogData?: ConfirmDialogData;
34
- /**
35
- * Whether or not leaving with unsaved changes should require a confirm dialog.
36
- * @default true
37
- */
38
- unsavedChangesRequireConfirmDialog?: boolean;
39
- };
40
- };
41
- /**
42
- * The entity service that needs to be provided in the providers array of the create page route.
43
- */
44
- export declare const NGX_CREATE_DATA_ENTITY_SERVICE: InjectionToken<EntityService<any>>;
45
- /**
46
- * The entity class that needs to be provided in the providers array of the create page route.
47
- */
48
- export declare const NGX_CREATE_DATA_ENTITY: InjectionToken<EntityClassNewable<any>>;
49
- /**
50
- * The configuration that needs to be provided in the providers array of the create page route.
51
- */
52
- export declare const NGX_CREATE_DATA: InjectionToken<PageCreateData<any>>;
53
- /**
54
- * A generic page that allows you to create a specific entity.
55
- * For this to work you need to provide some data for the route.
56
- */
57
- export declare class NgxMatEntityCreatePageComponent<EntityType extends BaseEntityType<EntityType>> implements OnInit, UnsavedChangesPage {
58
- private readonly dialog;
59
- private readonly location;
60
- private readonly injector;
61
- readonly entityService: EntityService<EntityType>;
62
- private readonly EntityClass;
63
- private readonly inputData;
64
- private readonly http;
65
- private readonly el;
66
- private readonly renderer;
67
- protected readonly globalConfig: NgxGlobalDefaultValues;
68
- faChevronLeft: IconDefinition;
69
- faWarning: IconDefinition;
70
- /**
71
- * Contains HelperMethods around handling Entities and their property-metadata.
72
- */
73
- EntityUtilities: typeof EntityUtilities;
74
- /**
75
- * The entity to create.
76
- */
77
- entity: EntityType;
78
- /**
79
- * The entity before any changes have been made.
80
- * This is used to determine if leaving the page is possible without interruption.
81
- */
82
- entityPriorChanges: EntityType;
83
- /**
84
- * Configuration data for this component.
85
- */
86
- data: PageCreateDataInternal<EntityType>;
87
- /**
88
- * All validation errors of the entity.
89
- */
90
- validationErrors: ValidationError[];
91
- /**
92
- * Whether or not the entity is valid.
93
- */
94
- isEntityValid: boolean;
95
- /**
96
- * Whether or not the entity is dirty.
97
- */
98
- isEntityDirty: boolean;
99
- /**
100
- * What to display inside the tooltip.
101
- */
102
- tooltipContent: string;
103
- /**
104
- * Whether or not the page has been loaded.
105
- */
106
- isLoaded: boolean;
107
- private inConfirmNavigation;
108
- get hasUnsavedChanges(): boolean;
109
- constructor(dialog: MatDialog, location: Location, injector: EnvironmentInjector, entityService: EntityService<EntityType>, EntityClass: EntityClassNewable<EntityType>, inputData: PageCreateData<EntityType>, http: HttpClient, el: ElementRef, renderer: Renderer2, globalConfig: NgxGlobalDefaultValues);
110
- ngOnInit(): void;
111
- canDeactivate(): boolean;
112
- /**
113
- * Checks if the bottom row should be displayed as fixed.
114
- */
115
- checkOffset(): void;
116
- /**
117
- * Checks if the entity has become invalid or dirty.
118
- */
119
- checkEntity(): Promise<void>;
120
- private checkIsEntityValid;
121
- /**
122
- * Tries create the entity and navigate back afterwards.
123
- * Also handles the confirmation if required.
124
- */
125
- create(): Promise<void>;
126
- private confirmCreate;
127
- /**
128
- * Tries to navigate back.
129
- */
130
- navigateBack(): Promise<void>;
131
- openConfirmNavigationDialog(): Promise<boolean>;
132
- private confirmNavigateBack;
133
- /**
134
- * Checks if the input with the given key is readonly.
135
- * @param key - The key for the input to check.
136
- * @returns Whether or not the input for the key is read only.
137
- */
138
- isReadOnly(key: keyof EntityType): boolean;
139
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityCreatePageComponent<any>, never>;
140
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityCreatePageComponent<any>, "ngx-mat-entity-create-page", never, {}, {}, never, never, true, never>;
141
- }
@@ -1,18 +0,0 @@
1
- import { PageCreateData } from './create-page.component';
2
- import { BaseBuilder } from '../../classes/base.builder';
3
- import { BaseEntityType } from '../../classes/entity.model';
4
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
5
- import { ConfirmDialogDataInternal } from '../confirm-dialog/confirm-dialog-data.builder';
6
- import { CreateDataInternal } from '../table/create-dialog/create-data.builder';
7
- import { CreateEntityDataInternal } from '../table/create-dialog/create-entity-data.builder';
8
- export type PageCreateDataInternal<EntityType extends BaseEntityType<EntityType>> = Omit<CreateEntityDataInternal<EntityType>, 'entity' | 'EntityServiceClass'> & {
9
- displayLoadingSpinner: boolean;
10
- createData: CreateDataInternal & {
11
- confirmUnsavedChangesDialogData: ConfirmDialogDataInternal;
12
- unsavedChangesRequireConfirmDialog: boolean;
13
- };
14
- };
15
- export declare class PageCreateDataBuilder<EntityType extends BaseEntityType<EntityType>> extends BaseBuilder<PageCreateDataInternal<EntityType>, PageCreateData<EntityType>> {
16
- constructor(data: PageCreateData<EntityType>, globalConfig: NgxGlobalDefaultValues);
17
- protected generateBaseData(data: PageCreateData<EntityType>): PageCreateDataInternal<EntityType>;
18
- }
@@ -1,65 +0,0 @@
1
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
2
- import { DisplayColumn, DynamicStyleClasses } from '../table/table-data';
3
- /**
4
- * Configuration for the custom table.
5
- */
6
- export interface CustomTableConfiguration<T = unknown> {
7
- /**
8
- * Configuration for css classes that should be applied to table rows based on a condition.
9
- * This could be used to eg. Set the background color to green when an item has the status completed etc.
10
- * INFO: You need to use ng-deep or apply the styling in the styles.scss.
11
- * @default () => []
12
- */
13
- dynamicRowStyleClasses?: DynamicStyleClasses<T>;
14
- /**
15
- * The columns to display inside the custom table.
16
- */
17
- displayColumns: DisplayColumn<T>[];
18
- /**
19
- * Whether or not a loading spinner should be shown.
20
- * Only works when you provide the "loading" input to the custom table.
21
- * @default true
22
- */
23
- displayLoadingSpinner?: boolean;
24
- /**
25
- * Whether or not the select column should be enabled.
26
- * @default true
27
- */
28
- withSelection: boolean;
29
- /**
30
- * A function that resolves a row value to a string that can be searched for.
31
- * By default this uses a built in search filter.
32
- */
33
- searchStringForRow?: (value: T) => string;
34
- /**
35
- * Whether or not the user is allowed to click on entries in the custom table.
36
- * @default () => true
37
- */
38
- allowClick?: (value: T) => boolean;
39
- /**
40
- * An error message to show when the table contains no entries.
41
- * Also applies styling to the table.
42
- */
43
- emptyErrorMessage?: string;
44
- /**
45
- * Resolves the given id for an entity.
46
- * This is used for the referencesMany input,
47
- * where you want to show values of the entity in the table rows and not the id.
48
- */
49
- resolveToReferencedEntity?: (id: unknown) => unknown;
50
- }
51
- /**
52
- * Internal configuration for the custom table.
53
- * Provides default values.
54
- */
55
- export declare class InternalCustomTableConfiguration<T = unknown> implements CustomTableConfiguration<T> {
56
- dynamicRowStyleClasses: DynamicStyleClasses<T>;
57
- displayColumns: DisplayColumn<T>[];
58
- displayLoadingSpinner: boolean;
59
- withSelection: boolean;
60
- searchStringForRow: (value: T) => string;
61
- allowClick: (value: T) => boolean;
62
- emptyErrorMessage: string;
63
- resolveToReferencedEntity?: (id: unknown) => unknown;
64
- constructor(globalConfig: NgxGlobalDefaultValues, configuration: CustomTableConfiguration<T>);
65
- }
@@ -1,111 +0,0 @@
1
- import { SelectionModel } from '@angular/cdk/collections';
2
- import { EnvironmentInjector, EventEmitter, OnInit } from '@angular/core';
3
- import { MatCheckboxChange } from '@angular/material/checkbox';
4
- import { MatTableDataSource } from '@angular/material/table';
5
- import { CustomTableConfiguration, InternalCustomTableConfiguration } from './custom-table-configuration.model';
6
- import { BaseEntityType } from '../../classes/entity.model';
7
- import { NgxGlobalDefaultValues } from '../../global-configuration-values';
8
- import { SelectionUtilities } from '../../utilities/selection.utilities';
9
- import { DisplayColumn, TableColumnValue } from '../table/table-data';
10
- import * as i0 from "@angular/core";
11
- /**
12
- * The event for clicking on a table cell.
13
- */
14
- export type CellClickedEvent<T> = {
15
- /**
16
- * The column that was clicked.
17
- */
18
- displayColumn: DisplayColumn<T>;
19
- /**
20
- * The value of the row that was clicked.
21
- */
22
- value: T;
23
- };
24
- /**
25
- * A custom table that has things like sorting and pagination already built in.
26
- */
27
- export declare class CustomTableComponent<T, EntityType extends BaseEntityType<EntityType>> implements OnInit {
28
- private readonly injector;
29
- private readonly globalConfig;
30
- SelectionUtilities: typeof SelectionUtilities;
31
- /**
32
- * Updates the table entries.
33
- */
34
- set data(value: T[]);
35
- /**
36
- * Applies the given string as a filter to the table.
37
- */
38
- set searchString(value: string);
39
- set required(value: boolean);
40
- /**
41
- * Whether or not the table should show an error message when the table is empty.
42
- */
43
- shouldShowMissingError: boolean;
44
- /**
45
- * Whether or not the table data is currently loading.
46
- */
47
- isLoading: boolean;
48
- /**
49
- * The configuration of the table.
50
- */
51
- configuration: CustomTableConfiguration<T>;
52
- internalConfiguration: InternalCustomTableConfiguration<T>;
53
- /**
54
- * Emits when a cell is clicked that is neither disabled nor disallowed to be clicked.
55
- */
56
- readonly cellClicked: EventEmitter<CellClickedEvent<T>>;
57
- /**
58
- * Emits when the selected values change.
59
- */
60
- readonly selectionChanged: EventEmitter<T[]>;
61
- /**
62
- * The paginator from the html.
63
- */
64
- private readonly paginator;
65
- /**
66
- * The sort from the html.
67
- */
68
- private readonly sort;
69
- /**
70
- * The data source for the table.
71
- */
72
- dataSource: MatTableDataSource<T>;
73
- /**
74
- * The selection of the table.
75
- */
76
- selection: SelectionModel<T>;
77
- /**
78
- * The columns of the table.
79
- */
80
- displayedColumns: string[];
81
- constructor(injector: EnvironmentInjector, globalConfig: NgxGlobalDefaultValues);
82
- ngOnInit(): void;
83
- private setupDataSource;
84
- /**
85
- * Emits a cellClicked event when the clicked column is enabled and clicking is allowed by the configuration.
86
- * @param value - The value of the row that was clicked.
87
- * @param dCol - The display column of the row that was clicked.
88
- */
89
- clickCell(value: T, dCol: DisplayColumn<T>): void;
90
- /**
91
- * Toggles a single table row.
92
- * @param value - The value of the row that was clicked.
93
- * @param event - The change event from the checkbox.
94
- */
95
- toggle(value: T, event?: MatCheckboxChange): void;
96
- /**
97
- * Toggles all table rows.
98
- * @param event - The change event from the checkbox.
99
- */
100
- masterToggle(event?: MatCheckboxChange): void;
101
- /**
102
- * Gets the value to display in the column.
103
- * Runs in environment context to enable injection.
104
- * @param value - The column value to get the display string from.
105
- * @param displayColumn - The display column to get the value from.
106
- * @returns The value of the display column.
107
- */
108
- getDisplayColumnValue(value: T, displayColumn: DisplayColumn<T>): TableColumnValue;
109
- static ɵfac: i0.ɵɵFactoryDeclaration<CustomTableComponent<any, any>, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<CustomTableComponent<any, any>, "custom-table", never, { "data": { "alias": "data"; "required": true; }; "searchString": { "alias": "searchString"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isLoading": { "alias": "isLoading"; "required": false; }; "configuration": { "alias": "configuration"; "required": true; }; }, { "cellClicked": "cellClicked"; "selectionChanged": "selectionChanged"; }, never, never, true, never>;
111
- }
@@ -1,16 +0,0 @@
1
- import { EnvironmentProviders, Provider, Type } from '@angular/core';
2
- import { DefaultExport, Route } from '@angular/router';
3
- import { Observable } from 'rxjs';
4
- /**
5
- * The definition for a route to use with the "NgxMatEntityEditPageComponent".
6
- */
7
- export interface EditDataRoute extends Route {
8
- loadComponent: () => Type<unknown> | Observable<Type<unknown> | DefaultExport<Type<unknown>>> | Promise<Type<unknown> | DefaultExport<Type<unknown>>>;
9
- providers: (Provider | EnvironmentProviders)[];
10
- title: string;
11
- path: string;
12
- }
13
- /**
14
- * The default data for a edit route.
15
- */
16
- export declare const defaultEditDataRoute: Omit<EditDataRoute, 'providers'>;