ngx-material-entity 0.1.2 → 0.1.5

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 (183) hide show
  1. package/README.md +533 -326
  2. package/capsulation/lodash.utilities.d.ts +62 -0
  3. package/capsulation/reflect.utilities.d.ts +56 -0
  4. package/classes/base.builder.d.ts +36 -0
  5. package/classes/date.utilities.d.ts +70 -0
  6. package/classes/entity.model.d.ts +19 -0
  7. package/classes/entity.service.d.ts +108 -0
  8. package/classes/entity.utilities.d.ts +180 -0
  9. package/classes/file.utilities.d.ts +52 -0
  10. package/components/confirm-dialog/confirm-dialog-data.builder.d.ts +10 -11
  11. package/components/confirm-dialog/confirm-dialog-data.d.ts +4 -0
  12. package/components/confirm-dialog/confirm-dialog.component.d.ts +11 -0
  13. package/components/input/add-array-item-dialog-data.builder.d.ts +21 -0
  14. package/components/input/{array-table/add-array-item-dialog/add-array-item-dialog-data.d.ts → add-array-item-dialog-data.d.ts} +6 -3
  15. package/components/input/array/array-date-input/array-date-input.component.d.ts +22 -0
  16. package/components/input/array/array-date-range-input/array-date-range-input.component.d.ts +30 -0
  17. package/components/input/array/array-date-time-input/array-date-time-input.component.d.ts +32 -0
  18. package/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.d.ts +58 -0
  19. package/components/input/array/array-string-chips-input/array-string-chips-input.component.d.ts +51 -0
  20. package/components/input/array/array-table.class.d.ts +48 -0
  21. package/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.d.ts +17 -0
  22. package/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.d.ts +17 -0
  23. package/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.d.ts +17 -0
  24. package/components/input/date/date-input/date-input.component.d.ts +21 -0
  25. package/components/input/date/date-range-input/date-range-input.component.d.ts +27 -0
  26. package/components/input/date/date-time-input/date-time-input.component.d.ts +38 -0
  27. package/components/input/file/file-default-input/file-default-input.component.d.ts +21 -0
  28. package/components/input/file/file-image-input/file-image-input.component.d.ts +30 -0
  29. package/components/input/file/file-input/dragDrop.directive.d.ts +32 -0
  30. package/components/input/file/file-input/file-input.component.d.ts +32 -0
  31. package/components/input/input.component.d.ts +108 -39
  32. package/components/input/input.module.d.ts +37 -13
  33. package/components/input/number/number-dropdown-input/number-dropdown-input.component.d.ts +17 -0
  34. package/components/input/number/number-input/number-input.component.d.ts +17 -0
  35. package/components/input/string/string-autocomplete-input/string-autocomplete-input.component.d.ts +25 -0
  36. package/components/input/string/string-dropdown-input/string-dropdown-input.component.d.ts +17 -0
  37. package/components/input/string/string-input/string-input.component.d.ts +17 -0
  38. package/components/input/string/string-textbox-input/string-textbox-input.component.d.ts +17 -0
  39. package/components/table/create-dialog/create-dialog-data.builder.d.ts +9 -8
  40. package/components/table/create-dialog/create-entity-dialog-data.builder.d.ts +12 -6
  41. package/components/table/create-dialog/create-entity-dialog-data.d.ts +3 -3
  42. package/components/table/create-dialog/create-entity-dialog.component.d.ts +23 -7
  43. package/components/table/edit-dialog/edit-dialog-data.builder.d.ts +11 -13
  44. package/components/table/edit-dialog/edit-entity-dialog-data.d.ts +3 -3
  45. package/components/table/edit-dialog/edit-entity-dialog.builder.d.ts +12 -6
  46. package/components/table/edit-dialog/edit-entity-dialog.component.d.ts +25 -7
  47. package/components/table/table-data.builder.d.ts +25 -14
  48. package/components/table/table-data.d.ts +22 -10
  49. package/components/table/table.component.d.ts +48 -2
  50. package/components/table/table.module.d.ts +3 -1
  51. package/decorators/array/array-decorator-internal.data.d.ts +85 -9
  52. package/decorators/array/array-decorator.data.d.ts +200 -25
  53. package/decorators/array/array.decorator.d.ts +4 -4
  54. package/decorators/base/base-property.decorator.d.ts +2 -3
  55. package/decorators/base/decorator-types.enum.d.ts +13 -4
  56. package/decorators/base/dropdown-value.interface.d.ts +14 -0
  57. package/decorators/base/property-decorator-internal.data.d.ts +16 -3
  58. package/decorators/base/property-decorator.data.d.ts +26 -5
  59. package/decorators/boolean/boolean-decorator-internal.data.d.ts +9 -0
  60. package/decorators/boolean/boolean-decorator.data.d.ts +9 -0
  61. package/decorators/boolean/boolean.decorator.d.ts +1 -1
  62. package/decorators/date/date-decorator-internal.data.d.ts +44 -0
  63. package/decorators/date/date-decorator.data.d.ts +129 -0
  64. package/decorators/date/date.decorator.d.ts +8 -0
  65. package/decorators/file/file-decorator-internal.data.d.ts +92 -0
  66. package/decorators/file/file-decorator.data.d.ts +92 -0
  67. package/decorators/file/file.decorator.d.ts +9 -0
  68. package/decorators/number/number-decorator-internal.data.d.ts +8 -4
  69. package/decorators/number/number-decorator.data.d.ts +8 -4
  70. package/decorators/number/number.decorator.d.ts +2 -2
  71. package/decorators/object/object-decorator-internal.data.d.ts +6 -3
  72. package/decorators/object/object-decorator.data.d.ts +8 -5
  73. package/decorators/object/object.decorator.d.ts +3 -3
  74. package/decorators/string/string-decorator-internal.data.d.ts +14 -4
  75. package/decorators/string/string-decorator.data.d.ts +14 -4
  76. package/decorators/string/string.decorator.d.ts +1 -1
  77. package/esm2020/capsulation/lodash.utilities.mjs +75 -0
  78. package/esm2020/capsulation/reflect.utilities.mjs +69 -0
  79. package/esm2020/classes/base.builder.mjs +42 -0
  80. package/esm2020/classes/date.utilities.mjs +158 -0
  81. package/esm2020/classes/entity.model.mjs +19 -0
  82. package/esm2020/classes/entity.service.mjs +180 -0
  83. package/esm2020/classes/entity.utilities.mjs +669 -0
  84. package/esm2020/classes/file.utilities.mjs +123 -0
  85. package/esm2020/components/confirm-dialog/confirm-dialog-data.builder.mjs +17 -50
  86. package/esm2020/components/confirm-dialog/confirm-dialog-data.mjs +1 -1
  87. package/esm2020/components/confirm-dialog/confirm-dialog.component.mjs +15 -4
  88. package/esm2020/components/get-validation-error-message.function.mjs +5 -1
  89. package/esm2020/components/input/add-array-item-dialog-data.builder.mjs +30 -0
  90. package/esm2020/components/input/add-array-item-dialog-data.mjs +2 -0
  91. package/esm2020/components/input/array/array-date-input/array-date-input.component.mjs +44 -0
  92. package/esm2020/components/input/array/array-date-range-input/array-date-range-input.component.mjs +68 -0
  93. package/esm2020/components/input/array/array-date-time-input/array-date-time-input.component.mjs +65 -0
  94. package/esm2020/components/input/array/array-string-autocomplete-chips/array-string-autocomplete-chips.component.mjs +131 -0
  95. package/esm2020/components/input/array/array-string-chips-input/array-string-chips-input.component.mjs +116 -0
  96. package/esm2020/components/input/array/array-table.class.mjs +92 -0
  97. package/esm2020/components/input/boolean/boolean-checkbox-input/boolean-checkbox-input.component.mjs +38 -0
  98. package/esm2020/components/input/boolean/boolean-dropdown-input/boolean-dropdown-input.component.mjs +35 -0
  99. package/esm2020/components/input/boolean/boolean-toggle-input/boolean-toggle-input.component.mjs +38 -0
  100. package/esm2020/components/input/date/date-input/date-input.component.mjs +38 -0
  101. package/esm2020/components/input/date/date-range-input/date-range-input.component.mjs +63 -0
  102. package/esm2020/components/input/date/date-time-input/date-time-input.component.mjs +74 -0
  103. package/esm2020/components/input/file/file-default-input/file-default-input.component.mjs +39 -0
  104. package/esm2020/components/input/file/file-image-input/file-image-input.component.mjs +95 -0
  105. package/esm2020/components/input/file/file-input/dragDrop.directive.mjs +64 -0
  106. package/esm2020/components/input/file/file-input/file-input.component.mjs +152 -0
  107. package/esm2020/components/input/input.component.mjs +207 -110
  108. package/esm2020/components/input/input.module.mjs +87 -10
  109. package/esm2020/components/input/number/number-dropdown-input/number-dropdown-input.component.mjs +36 -0
  110. package/esm2020/components/input/number/number-input/number-input.component.mjs +34 -0
  111. package/esm2020/components/input/string/string-autocomplete-input/string-autocomplete-input.component.mjs +52 -0
  112. package/esm2020/components/input/string/string-dropdown-input/string-dropdown-input.component.mjs +36 -0
  113. package/esm2020/components/input/string/string-input/string-input.component.mjs +34 -0
  114. package/esm2020/components/input/string/string-textbox-input/string-textbox-input.component.mjs +35 -0
  115. package/esm2020/components/table/create-dialog/create-dialog-data.builder.mjs +18 -40
  116. package/esm2020/components/table/create-dialog/create-entity-dialog-data.builder.mjs +15 -7
  117. package/esm2020/components/table/create-dialog/create-entity-dialog-data.mjs +1 -1
  118. package/esm2020/components/table/create-dialog/create-entity-dialog.component.mjs +36 -22
  119. package/esm2020/components/table/create-dialog/create-entity-dialog.module.mjs +20 -4
  120. package/esm2020/components/table/edit-dialog/edit-dialog-data.builder.mjs +23 -63
  121. package/esm2020/components/table/edit-dialog/edit-entity-dialog-data.mjs +1 -1
  122. package/esm2020/components/table/edit-dialog/edit-entity-dialog.builder.mjs +15 -7
  123. package/esm2020/components/table/edit-dialog/edit-entity-dialog.component.mjs +50 -31
  124. package/esm2020/components/table/table-data.builder.mjs +31 -15
  125. package/esm2020/components/table/table-data.mjs +1 -1
  126. package/esm2020/components/table/table.component.mjs +77 -32
  127. package/esm2020/components/table/table.module.mjs +12 -4
  128. package/esm2020/decorators/array/array-decorator-internal.data.mjs +111 -12
  129. package/esm2020/decorators/array/array-decorator.data.mjs +2 -2
  130. package/esm2020/decorators/array/array.decorator.mjs +9 -3
  131. package/esm2020/decorators/base/base-property.decorator.mjs +4 -3
  132. package/esm2020/decorators/base/decorator-types.enum.mjs +9 -1
  133. package/esm2020/decorators/base/dropdown-value.interface.mjs +2 -0
  134. package/esm2020/decorators/base/property-decorator-internal.data.mjs +33 -10
  135. package/esm2020/decorators/base/property-decorator.data.mjs +1 -1
  136. package/esm2020/decorators/boolean/boolean-decorator-internal.data.mjs +12 -1
  137. package/esm2020/decorators/boolean/boolean-decorator.data.mjs +1 -1
  138. package/esm2020/decorators/boolean/boolean.decorator.mjs +2 -2
  139. package/esm2020/decorators/date/date-decorator-internal.data.mjs +48 -0
  140. package/esm2020/decorators/date/date-decorator.data.mjs +7 -0
  141. package/esm2020/decorators/date/date.decorator.mjs +21 -0
  142. package/esm2020/decorators/file/file-decorator-internal.data.mjs +98 -0
  143. package/esm2020/decorators/file/file-decorator.data.mjs +7 -0
  144. package/esm2020/decorators/file/file.decorator.mjs +22 -0
  145. package/esm2020/decorators/number/number-decorator-internal.data.mjs +7 -1
  146. package/esm2020/decorators/number/number-decorator.data.mjs +1 -1
  147. package/esm2020/decorators/number/number.decorator.mjs +3 -3
  148. package/esm2020/decorators/object/object-decorator-internal.data.mjs +5 -2
  149. package/esm2020/decorators/object/object-decorator.data.mjs +1 -1
  150. package/esm2020/decorators/object/object.decorator.mjs +2 -2
  151. package/esm2020/decorators/string/string-decorator-internal.data.mjs +13 -1
  152. package/esm2020/decorators/string/string-decorator.data.mjs +1 -1
  153. package/esm2020/decorators/string/string.decorator.mjs +2 -2
  154. package/esm2020/mocks/placeholder-data.png.mjs +3 -0
  155. package/esm2020/public-api.mjs +12 -5
  156. package/fesm2015/ngx-material-entity.mjs +3271 -894
  157. package/fesm2015/ngx-material-entity.mjs.map +1 -1
  158. package/fesm2020/ngx-material-entity.mjs +3140 -829
  159. package/fesm2020/ngx-material-entity.mjs.map +1 -1
  160. package/mocks/placeholder-data.png.d.ts +1 -0
  161. package/package.json +7 -1
  162. package/public-api.d.ts +12 -5
  163. package/classes/entity-model.class.d.ts +0 -9
  164. package/classes/entity-service.class.d.ts +0 -66
  165. package/classes/entity-utilities.class.d.ts +0 -112
  166. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.builder.d.ts +0 -17
  167. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.d.ts +0 -22
  168. package/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.d.ts +0 -12
  169. package/components/input/array-table/array-table.component.d.ts +0 -34
  170. package/components/input/array-table/array-table.module.d.ts +0 -19
  171. package/components/input/internal-input/internal-input.component.d.ts +0 -54
  172. package/components/input/internal-input/internal-input.module.d.ts +0 -16
  173. package/esm2020/classes/entity-model.class.mjs +0 -19
  174. package/esm2020/classes/entity-service.class.mjs +0 -76
  175. package/esm2020/classes/entity-utilities.class.mjs +0 -329
  176. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.builder.mjs +0 -33
  177. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog-data.mjs +0 -2
  178. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.component.mjs +0 -45
  179. package/esm2020/components/input/array-table/add-array-item-dialog/add-array-item-dialog.module.mjs +0 -22
  180. package/esm2020/components/input/array-table/array-table.component.mjs +0 -119
  181. package/esm2020/components/input/array-table/array-table.module.mjs +0 -66
  182. package/esm2020/components/input/internal-input/internal-input.component.mjs +0 -70
  183. package/esm2020/components/input/internal-input/internal-input.module.mjs +0 -54
@@ -0,0 +1 @@
1
+ export declare const placeholder = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABLAAAAMgCAMAAAAEPmswAAAANlBMVEXx8/XCy9LFztXu8PPs7/Lp7e/W3OHL0tnZ3+PN1NrS2d7i5urn6u7f5OjI0Nfc4ebP1tzk6excnoRZAAAXh0lEQVR42uzUAQ0AAAzDoN+/6eloAiK4B4gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLCBDWECGsIAMYQEZwgIyhAVkCAvIEBaQISwgQ1hAhrCADGEBGcICMoQFZAgLyBAWkCEsIENYQIawgAxhARnCAjKEBWQIC8gQFpAhLGDs1AEJAAAAgKD/r9sR6Ag3hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBbETh2QAAAAAAj6/7odgY6QDWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hAVsCAvYEBawISxgQ1jAhrCADWEBG8ICNoQFbAgL2BAWsCEsYENYwIawgA1hARvCAjaEBWwIC9gQFrAhLGBDWMCGsIANYQEbwgI2hA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9GWAutRpwkdFtrYR7bFXmDlPGXvSS/SnQRWTL1BXpHPNY6Uu9AuPDMDatEhd6HlFdCl3iCvgC71BnkFdLkLbd4OdKk3yCugS71BXgFd6g367UCTeoP7zsAPHeoe9l8BU7CrX7WyXxRoUm9Yu6gA/GHvDnMThmEwgNZpF9LQUrj/ZfdvmmBMDEabSu8dIkrsz85O4g3VeQW8ZhjjPv+lAk3pa9whzgA0J8ePxBmABs3xZqP2ILCTVe/2LgI7aRYm04NA1+1iFvog3Q503S6ahZ6DwJe2FycnaQbgLY4p/lnVHQS+abj07noFXGl2TsfsIHCrydS76xVwq8lCViquV8D7fRwU24HdyPGa0aQzsJrpFM8bFa+ANfUlnnS+dADrGmo8oZobBLYwLKf4k1NRagc2M9UUD0rZWxDYVj8/cmalOotdAS2Yyhi/OBcpBqAh/WXJY4or6ZwXhxXQpGE6znMpOZdlmY+TVyAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAPDJHhwIAAAAAAD5vzaCqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqwBwcCAAAAAED+r42gqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqirswYEAAAAAAJD/ayOoqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqkp7cCAAAAAAIMjfepArAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgKcAnTNeiLeG1rEAAAAASUVORK5CYII=";
package/package.json CHANGED
@@ -1,7 +1,13 @@
1
1
  {
2
2
  "name": "ngx-material-entity",
3
- "version": "0.1.2",
3
+ "version": "0.1.5",
4
4
  "license": "MIT",
5
+ "keywords": [
6
+ "angular",
7
+ "material",
8
+ "crud",
9
+ "entity"
10
+ ],
5
11
  "peerDependencies": {
6
12
  "@angular/animations": "~13.3.0",
7
13
  "@angular/cdk": "^13.3.9",
package/public-api.d.ts CHANGED
@@ -2,9 +2,11 @@
2
2
  * Public API Surface of ngx-material-entity.
3
3
  */
4
4
  import 'reflect-metadata';
5
- export * from './classes/entity-model.class';
6
- export * from './classes/entity-service.class';
7
- export * from './classes/entity-utilities.class';
5
+ export * from './classes/entity.model';
6
+ export * from './classes/entity.service';
7
+ export * from './classes/entity.utilities';
8
+ export * from './classes/date.utilities';
9
+ export * from './classes/file.utilities';
8
10
  export * from './components/confirm-dialog/confirm-dialog-data';
9
11
  export * from './components/confirm-dialog/confirm-dialog.component';
10
12
  export * from './components/confirm-dialog/confirm-dialog.module';
@@ -20,15 +22,20 @@ export * from './components/table/edit-dialog/edit-entity-dialog-data';
20
22
  export * from './components/table/edit-dialog/edit-entity-dialog.module';
21
23
  export * from './components/table/edit-dialog/edit-entity-dialog.component';
22
24
  export * from './components/get-validation-error-message.function';
23
- export * from './decorators/base/decorator-types.enum';
24
- export { cols } from './decorators/base/property-decorator.data';
25
25
  export * from './decorators/array/array.decorator';
26
26
  export * from './decorators/array/array-decorator.data';
27
+ export * from './decorators/base/decorator-types.enum';
28
+ export * from './decorators/base/dropdown-value.interface';
29
+ export { Col, Position } from './decorators/base/property-decorator.data';
27
30
  export * from './decorators/boolean/boolean.decorator';
28
31
  export * from './decorators/boolean/boolean-decorator.data';
32
+ export * from './decorators/date/date.decorator';
33
+ export * from './decorators/date/date-decorator.data';
29
34
  export * from './decorators/number/number.decorator';
30
35
  export * from './decorators/number/number-decorator.data';
31
36
  export * from './decorators/object/object.decorator';
32
37
  export * from './decorators/object/object-decorator.data';
33
38
  export * from './decorators/string/string.decorator';
34
39
  export * from './decorators/string/string-decorator.data';
40
+ export * from './decorators/file/file.decorator';
41
+ export * from './decorators/file/file-decorator.data';
@@ -1,9 +0,0 @@
1
- /**
2
- * The base Entity class.
3
- */
4
- export declare abstract class Entity {
5
- /**
6
- * A unique identifier for the Entity.
7
- */
8
- id: string;
9
- }
@@ -1,66 +0,0 @@
1
- import { Entity } from './entity-model.class';
2
- import { HttpClient } from '@angular/common/http';
3
- import { BehaviorSubject } from 'rxjs';
4
- /**
5
- * A generic EntityService class.
6
- * Offers basic CRUD-functionality.
7
- * You should create a service for every Entity you have.
8
- * If you extend from this you need to make sure that the extended Service can be injected.
9
- */
10
- export declare abstract class EntityService<EntityType extends Entity> {
11
- private readonly http;
12
- /**
13
- * The base url used for api requests. If u want to have more control over this,
14
- * you can override the create, read, update and delete methods.
15
- *
16
- * Create Sends a POST-Request to baseUrl.
17
- *
18
- * Read Sends a GET-Request to baseUrl.
19
- *
20
- * Update Sends a PATCH-Request to baseUrl/{id}.
21
- *
22
- * Delete Sends a DEL-Request to baseUrl/{id}.
23
- */
24
- abstract readonly baseUrl: string;
25
- /**
26
- * A subject of all the entity values.
27
- * Can be subscribed to when you want to do a specific thing whenever the entities change.
28
- */
29
- readonly entitiesSubject: BehaviorSubject<EntityType[]>;
30
- /**
31
- * Gets the entities in an array from the internal entitiesSubject.
32
- *
33
- * @returns The current entities in form of an array.
34
- */
35
- get entities(): EntityType[];
36
- constructor(http: HttpClient);
37
- /**
38
- * Creates a new Entity and pushes it to the entities array.
39
- *
40
- * @param entity - The data of the entity to create.
41
- * All values that should be omitted will be removed from it inside this method.
42
- * @returns A Promise of the created entity.
43
- */
44
- create(entity: EntityType): Promise<EntityType>;
45
- /**
46
- * Gets all existing entities and pushes them to the entites array.
47
- *
48
- * @returns A Promise of all received Entities.
49
- */
50
- read(): Promise<EntityType[]>;
51
- /**
52
- * Updates a specific Entity.
53
- *
54
- * @param entity - The updated Entity
55
- * All values that should be omitted will be removed from it inside this method.
56
- * @param entityPriorChanges - The current Entity.
57
- * It Is used to get changed values and only update them instead of sending the whole entity data.
58
- */
59
- update(entity: EntityType, entityPriorChanges: EntityType): Promise<void>;
60
- /**
61
- * Deletes a specific Entity.
62
- *
63
- * @param id - The id of the element to delete.
64
- */
65
- delete(id: string): Promise<void>;
66
- }
@@ -1,112 +0,0 @@
1
- import { DecoratorType, DecoratorTypes } from '../decorators/base/decorator-types.enum';
2
- import { Entity } from './entity-model.class';
3
- /**
4
- * Contains HelperMethods around handling Entities and their property-metadata.
5
- */
6
- export declare abstract class EntityUtilities {
7
- /**
8
- * Gets the properties to omit when updating the entity.
9
- *
10
- * @param entity - The entity to get the properties which should be left out for updating from.
11
- * @returns The properties which should be left out for updating an Entity.
12
- */
13
- static getOmitForUpdate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[];
14
- /**
15
- * Gets the properties to omit when creating new entities.
16
- *
17
- * @param entity - The entity to get the properties which should be left out for creating from.
18
- * @returns The properties which should be left out for creating a new Entity.
19
- */
20
- static getOmitForCreate<EntityType extends Entity>(entity: EntityType): (keyof EntityType)[];
21
- /**
22
- * Gets the metadata included in an property.
23
- *
24
- * @param entity - The entity with the property to get the metadata from.
25
- * @param propertyKey - The property on the given Entity to get the metadata from.
26
- * @param type - For secure Typing, defines the returned PropertyConfig.
27
- * @returns The metadata of the property.
28
- * @throws When no metadata can be found for the given property.
29
- */
30
- static getPropertyMetadata<EntityType extends Entity, T extends DecoratorTypes>(entity: EntityType, propertyKey: keyof EntityType, type: T): DecoratorType<T>;
31
- /**
32
- * Gets the type of the property-metadata.
33
- *
34
- * @param entity - The entity with the property to get the type from.
35
- * @param propertyKey - The property on the given Entity to get the type from.
36
- * @returns The type of the metadata.
37
- * @throws Will throw an error if no metadata can be found for the given property.
38
- */
39
- static getPropertyType<EntityType extends Entity>(entity: EntityType, propertyKey: keyof EntityType): DecoratorTypes;
40
- /**
41
- * Sets all property values based on a given entity data-object.
42
- *
43
- * @param target - The target object that needs to be constructed (if called inside an Entity constructor its usually this).
44
- * @param entity - The data object to get the property values from.
45
- * @alias new
46
- * @alias build
47
- * @alias construct
48
- */
49
- static new<EntityType extends Entity>(target: EntityType, entity?: EntityType): void;
50
- static construct: typeof EntityUtilities.new;
51
- static build: typeof EntityUtilities.new;
52
- /**
53
- * Checks if the values on an entity are valid.
54
- * Also checks all the validators given by the metadata ("required", "maxLength" etc.).
55
- *
56
- * @param entity - The entity to validate.
57
- * @param omit - Whether to check for creatiung or editing validity.
58
- * @returns Whether or not the entity is valid.
59
- */
60
- static isEntityValid<EntityType extends Entity>(entity: EntityType, omit: 'create' | 'update'): boolean;
61
- /**
62
- * Checks if a single property value is valid.
63
- *
64
- * @param entity - The entity where the property is from.
65
- * @param key - The name of the property.
66
- * @param omit - Whether to check if the given entity is valid for creation or updating.
67
- * @returns Whether or not the property value is valid.
68
- * @throws Throws when it extracts an unknown metadata type.
69
- */
70
- private static isPropertyValid;
71
- /**
72
- * Checks if an entity is "dirty" (if its values have changed).
73
- *
74
- * @param entity - The entity after all changes.
75
- * @param entityPriorChanges - The entity before the changes.
76
- * @returns Whether or not the entity is dirty.
77
- */
78
- static dirty(entity: Entity, entityPriorChanges: Entity): boolean;
79
- /**
80
- * Compares two Entities and returns their difference in an object.
81
- *
82
- * @param entity - The first entity to compare.
83
- * @param entityPriorChanges - The second entity to compare.
84
- * @returns The difference between the two Entities in form of a Partial.
85
- */
86
- static difference<EntityType extends Entity>(entity: EntityType, entityPriorChanges: EntityType): Partial<EntityType>;
87
- /**
88
- * Compare function for sorting entity keys by their order value.
89
- *
90
- * @param a - First key of entity.
91
- * @param b - Second key of entity.
92
- * @param entity - Current entity (used to get metadata of entity keys).
93
- * @returns 0 if both values have the same order, a negative value if X, a positive value if Y.
94
- */
95
- static compareOrder<EntityType extends Entity>(a: keyof EntityType, b: keyof EntityType, entity: EntityType): number;
96
- /**
97
- * Gets the bootstrap column values for "lg", "md", "sm".
98
- *
99
- * @param entity - Entity to get the bootstrap column values of the key.
100
- * @param key - Key of the property to get bootstrap column values from.
101
- * @param type - Defines for which screensize the column values should be returned.
102
- * @returns Bootstrap column value.
103
- */
104
- static getWidth<EntityType extends Entity>(entity: EntityType, key: keyof EntityType, type: 'lg' | 'md' | 'sm'): number;
105
- /**
106
- * Resets all changes on an entity.
107
- *
108
- * @param entity - The entity to reset.
109
- * @param entityPriorChanges - The entity before any changes.
110
- */
111
- static resetChangesOnEntity<EntityType extends Entity>(entity: EntityType, entityPriorChanges: EntityType): void;
112
- }
@@ -1,17 +0,0 @@
1
- import { NgModel } from '@angular/forms';
2
- import { Entity } from '../../../../classes/entity-model.class';
3
- import { CreateDialogDataInternal } from '../../../table/create-dialog/create-dialog-data.builder';
4
- import { AddArrayItemDialogData } from './add-array-item-dialog-data';
5
- export declare class AddArrayItemDialogDataInternal<EntityType extends Entity> implements AddArrayItemDialogData<EntityType> {
6
- entity: EntityType;
7
- createDialogData: CreateDialogDataInternal;
8
- getValidationErrorMessage: (model: NgModel) => string;
9
- constructor(entity: EntityType, createDialogData: CreateDialogDataInternal, getValidationErrorMessage: (model: NgModel) => string);
10
- }
11
- export declare class AddArrayItemDialogDataBuilder<EntityType extends Entity> {
12
- addArrayItemDialogData: AddArrayItemDialogDataInternal<EntityType>;
13
- private readonly dataInput;
14
- constructor(data: AddArrayItemDialogData<EntityType>);
15
- withDefaultCreateDialogData(createDialogData: CreateDialogDataInternal): AddArrayItemDialogDataBuilder<EntityType>;
16
- withDefaultGetValidationErrorMessage(getValidationErrorMessage: (model: NgModel) => string): AddArrayItemDialogDataBuilder<EntityType>;
17
- }
@@ -1,22 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { MatDialogRef } from '@angular/material/dialog';
3
- import { Entity } from '../../../../classes/entity-model.class';
4
- import { EntityUtilities } from '../../../../classes/entity-utilities.class';
5
- import { AddArrayItemDialogData } from './add-array-item-dialog-data';
6
- import { AddArrayItemDialogDataInternal } from './add-array-item-dialog-data.builder';
7
- import * as i0 from "@angular/core";
8
- export declare class NgxMatEntityAddArrayItemDialogComponent<EntityType extends Entity> implements OnInit {
9
- private readonly inputData;
10
- dialogRef: MatDialogRef<NgxMatEntityAddArrayItemDialogComponent<EntityType>>;
11
- EntityUtilities: typeof EntityUtilities;
12
- entityKeys: (keyof EntityType)[];
13
- getWidth: typeof EntityUtilities.getWidth;
14
- data: AddArrayItemDialogDataInternal<EntityType>;
15
- constructor(inputData: AddArrayItemDialogData<EntityType>, dialogRef: MatDialogRef<NgxMatEntityAddArrayItemDialogComponent<EntityType>>);
16
- ngOnInit(): void;
17
- private setEntityKeys;
18
- create(): void;
19
- cancel(): void;
20
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityAddArrayItemDialogComponent<any>, never>;
21
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityAddArrayItemDialogComponent<any>, "ngx-mat-entity-add-array-item-dialog", never, {}, {}, never, never>;
22
- }
@@ -1,12 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./add-array-item-dialog.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "../../internal-input/internal-input.module";
5
- import * as i4 from "@angular/material/dialog";
6
- import * as i5 from "@angular/forms";
7
- import * as i6 from "@angular/material/button";
8
- export declare class NgxMatEntityAddArrayItemDialogModule {
9
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityAddArrayItemDialogModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityAddArrayItemDialogModule, [typeof i1.NgxMatEntityAddArrayItemDialogComponent], [typeof i2.CommonModule, typeof i3.NgxMatEntityInternalInputModule, typeof i4.MatDialogModule, typeof i5.FormsModule, typeof i6.MatButtonModule], [typeof i1.NgxMatEntityAddArrayItemDialogComponent]>;
11
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityAddArrayItemDialogModule>;
12
- }
@@ -1,34 +0,0 @@
1
- import { SelectionModel } from '@angular/cdk/collections';
2
- import { OnInit } from '@angular/core';
3
- import { Entity } from '../../../classes/entity-model.class';
4
- import { EntityUtilities } from '../../../classes/entity-utilities.class';
5
- import { NgModel } from '@angular/forms';
6
- import { MatTableDataSource } from '@angular/material/table';
7
- import { MatDialog } from '@angular/material/dialog';
8
- import { EntityArrayDecoratorConfigInternal } from '../../../decorators/array/array-decorator-internal.data';
9
- import * as i0 from "@angular/core";
10
- export declare class NgxMatEntityArrayTableComponent<EntityType extends Entity> implements OnInit {
11
- private readonly dialog;
12
- arrayItems: EntityType[];
13
- metadata: EntityArrayDecoratorConfigInternal<EntityType>;
14
- getValidationErrorMessage: (model: NgModel) => string;
15
- omit: 'create' | 'update';
16
- dataSource: MatTableDataSource<EntityType>;
17
- selection: SelectionModel<EntityType>;
18
- displayedColumns: string[];
19
- arrayItem: EntityType;
20
- private arrayItemPriorChanges;
21
- getWidth: typeof EntityUtilities.getWidth;
22
- EntityUtilities: typeof EntityUtilities;
23
- constructor(dialog: MatDialog);
24
- trackByFn(index: unknown): unknown;
25
- ngOnInit(): void;
26
- private validateInput;
27
- add(): void;
28
- remove(): void;
29
- getObjectProperties(): (keyof EntityType)[];
30
- masterToggle(): void;
31
- isAllSelected(): boolean;
32
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityArrayTableComponent<any>, never>;
33
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityArrayTableComponent<any>, "ngx-mat-entity-array-table", never, { "arrayItems": "arrayItems"; "metadata": "metadata"; "getValidationErrorMessage": "getValidationErrorMessage"; "omit": "omit"; }, {}, never, never>;
34
- }
@@ -1,19 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./array-table.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/material/input";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "@angular/material/form-field";
7
- import * as i6 from "@angular/material/select";
8
- import * as i7 from "@angular/material/autocomplete";
9
- import * as i8 from "@angular/material/checkbox";
10
- import * as i9 from "@angular/material/slide-toggle";
11
- import * as i10 from "@angular/material/table";
12
- import * as i11 from "../internal-input/internal-input.module";
13
- import * as i12 from "@angular/material/button";
14
- import * as i13 from "./add-array-item-dialog/add-array-item-dialog.module";
15
- export declare class NgxMatEntityArrayTableModule {
16
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityArrayTableModule, never>;
17
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityArrayTableModule, [typeof i1.NgxMatEntityArrayTableComponent], [typeof i2.CommonModule, typeof i3.MatInputModule, typeof i4.FormsModule, typeof i5.MatFormFieldModule, typeof i6.MatSelectModule, typeof i7.MatAutocompleteModule, typeof i8.MatCheckboxModule, typeof i9.MatSlideToggleModule, typeof i10.MatTableModule, typeof i11.NgxMatEntityInternalInputModule, typeof i12.MatButtonModule, typeof i13.NgxMatEntityAddArrayItemDialogModule], [typeof i1.NgxMatEntityArrayTableComponent]>;
18
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityArrayTableModule>;
19
- }
@@ -1,54 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { DecoratorTypes } from '../../../decorators/base/decorator-types.enum';
3
- import { Entity } from '../../../classes/entity-model.class';
4
- import { EntityUtilities } from '../../../classes/entity-utilities.class';
5
- import { NgModel } from '@angular/forms';
6
- import { DropdownBooleanDecoratorConfigInternal } from '../../../decorators/boolean/boolean-decorator-internal.data';
7
- import { DefaultNumberDecoratorConfigInternal, DropdownNumberDecoratorConfigInternal } from '../../../decorators/number/number-decorator-internal.data';
8
- import { DefaultObjectDecoratorConfigInternal } from '../../../decorators/object/object-decorator-internal.data';
9
- import { AutocompleteStringDecoratorConfigInternal, DefaultStringDecoratorConfigInternal, DropdownStringDecoratorConfigInternal, TextboxStringDecoratorConfigInternal } from '../../../decorators/string/string-decorator-internal.data';
10
- import { PropertyDecoratorConfigInternal } from '../../../decorators/base/property-decorator-internal.data';
11
- import * as i0 from "@angular/core";
12
- export declare class NgxMatEntityInternalInputComponent<EntityType extends Entity> implements OnInit {
13
- /**
14
- * The entity on which the property exists. Used in conjuction with the "propertyKey"
15
- * to determine the property for which the input should be generated.
16
- */
17
- entity: EntityType;
18
- /**
19
- * The name of the property to generate the input for. Used in conjuction with the "entity".
20
- */
21
- propertyKey: keyof EntityType;
22
- /**
23
- * Whether to hide a value if it is omitted for creation.
24
- * Is used internally for the object property.
25
- */
26
- hideOmitForCreate?: boolean;
27
- /**
28
- * Whether to hide a value if it is omitted for editing.
29
- * Is used internally for the object property.
30
- */
31
- hideOmitForEdit?: boolean;
32
- /**
33
- * (optional) A custom function to generate the error-message for invalid inputs.
34
- */
35
- getValidationErrorMessage: (model: NgModel) => string;
36
- type: DecoratorTypes;
37
- metadata: PropertyDecoratorConfigInternal;
38
- metadataDefaultString: DefaultStringDecoratorConfigInternal;
39
- metadataTextboxString: TextboxStringDecoratorConfigInternal;
40
- metadataAutocompleteString: AutocompleteStringDecoratorConfigInternal;
41
- metadataDropdownString: DropdownStringDecoratorConfigInternal;
42
- metadataDropdownBoolean: DropdownBooleanDecoratorConfigInternal;
43
- metadataDefaultNumber: DefaultNumberDecoratorConfigInternal;
44
- metadataDropdownNumber: DropdownNumberDecoratorConfigInternal;
45
- metadataDefaultObject: DefaultObjectDecoratorConfigInternal<EntityType>;
46
- objectProperty: Entity;
47
- readonly DecoratorTypes: typeof DecoratorTypes;
48
- getWidth: typeof EntityUtilities.getWidth;
49
- trackByFn(index: unknown): unknown;
50
- ngOnInit(): void;
51
- getObjectProperties(): (keyof Entity)[];
52
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInternalInputComponent<any>, never>;
53
- static ɵcmp: i0.ɵɵComponentDeclaration<NgxMatEntityInternalInputComponent<any>, "ngx-mat-entity-internal-input", never, { "entity": "entity"; "propertyKey": "propertyKey"; "hideOmitForCreate": "hideOmitForCreate"; "hideOmitForEdit": "hideOmitForEdit"; "getValidationErrorMessage": "getValidationErrorMessage"; }, {}, never, never>;
54
- }
@@ -1,16 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./internal-input.component";
3
- import * as i2 from "@angular/common";
4
- import * as i3 from "@angular/material/input";
5
- import * as i4 from "@angular/forms";
6
- import * as i5 from "@angular/material/form-field";
7
- import * as i6 from "@angular/material/select";
8
- import * as i7 from "@angular/material/autocomplete";
9
- import * as i8 from "@angular/material/checkbox";
10
- import * as i9 from "@angular/material/slide-toggle";
11
- import * as i10 from "@angular/material/table";
12
- export declare class NgxMatEntityInternalInputModule {
13
- static ɵfac: i0.ɵɵFactoryDeclaration<NgxMatEntityInternalInputModule, never>;
14
- static ɵmod: i0.ɵɵNgModuleDeclaration<NgxMatEntityInternalInputModule, [typeof i1.NgxMatEntityInternalInputComponent], [typeof i2.CommonModule, typeof i3.MatInputModule, typeof i4.FormsModule, typeof i5.MatFormFieldModule, typeof i6.MatSelectModule, typeof i7.MatAutocompleteModule, typeof i8.MatCheckboxModule, typeof i9.MatSlideToggleModule, typeof i10.MatTableModule], [typeof i1.NgxMatEntityInternalInputComponent]>;
15
- static ɵinj: i0.ɵɵInjectorDeclaration<NgxMatEntityInternalInputModule>;
16
- }
@@ -1,19 +0,0 @@
1
- import { __decorate, __metadata } from "tslib";
2
- import { string } from '../decorators/string/string.decorator';
3
- /**
4
- * The base Entity class.
5
- */
6
- export class Entity {
7
- }
8
- __decorate([
9
- string({
10
- omitForCreate: true,
11
- omitForUpdate: true,
12
- display: false,
13
- displayStyle: 'line',
14
- displayName: 'ID',
15
- required: true
16
- }),
17
- __metadata("design:type", String)
18
- ], Entity.prototype, "id", void 0);
19
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5LW1vZGVsLmNsYXNzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcHJvamVjdHMvbmd4LW1hdGVyaWFsLWVudGl0eS9zcmMvY2xhc3Nlcy9lbnRpdHktbW9kZWwuY2xhc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSx1Q0FBdUMsQ0FBQztBQUUvRDs7R0FFRztBQUNILE1BQU0sT0FBZ0IsTUFBTTtDQWEzQjtBQURHO0lBUkMsTUFBTSxDQUFDO1FBQ0osYUFBYSxFQUFFLElBQUk7UUFDbkIsYUFBYSxFQUFFLElBQUk7UUFDbkIsT0FBTyxFQUFFLEtBQUs7UUFDZCxZQUFZLEVBQUUsTUFBTTtRQUNwQixXQUFXLEVBQUUsSUFBSTtRQUNqQixRQUFRLEVBQUUsSUFBSTtLQUNqQixDQUFDOztrQ0FDVSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHN0cmluZyB9IGZyb20gJy4uL2RlY29yYXRvcnMvc3RyaW5nL3N0cmluZy5kZWNvcmF0b3InO1xuXG4vKipcbiAqIFRoZSBiYXNlIEVudGl0eSBjbGFzcy5cbiAqL1xuZXhwb3J0IGFic3RyYWN0IGNsYXNzIEVudGl0eSB7XG4gICAgLyoqXG4gICAgICogQSB1bmlxdWUgaWRlbnRpZmllciBmb3IgdGhlIEVudGl0eS5cbiAgICAgKi9cbiAgICBAc3RyaW5nKHtcbiAgICAgICAgb21pdEZvckNyZWF0ZTogdHJ1ZSxcbiAgICAgICAgb21pdEZvclVwZGF0ZTogdHJ1ZSxcbiAgICAgICAgZGlzcGxheTogZmFsc2UsXG4gICAgICAgIGRpc3BsYXlTdHlsZTogJ2xpbmUnLFxuICAgICAgICBkaXNwbGF5TmFtZTogJ0lEJyxcbiAgICAgICAgcmVxdWlyZWQ6IHRydWVcbiAgICB9KVxuICAgIGlkITogc3RyaW5nO1xufSJdfQ==
@@ -1,76 +0,0 @@
1
- import { BehaviorSubject, firstValueFrom } from 'rxjs';
2
- import { isNil, omit, omitBy } from 'lodash';
3
- import { EntityUtilities } from './entity-utilities.class';
4
- /**
5
- * A generic EntityService class.
6
- * Offers basic CRUD-functionality.
7
- * You should create a service for every Entity you have.
8
- * If you extend from this you need to make sure that the extended Service can be injected.
9
- */
10
- export class EntityService {
11
- constructor(http) {
12
- this.http = http;
13
- /**
14
- * A subject of all the entity values.
15
- * Can be subscribed to when you want to do a specific thing whenever the entities change.
16
- */
17
- this.entitiesSubject = new BehaviorSubject([]);
18
- }
19
- /**
20
- * Gets the entities in an array from the internal entitiesSubject.
21
- *
22
- * @returns The current entities in form of an array.
23
- */
24
- get entities() {
25
- return this.entitiesSubject.value;
26
- }
27
- /**
28
- * Creates a new Entity and pushes it to the entities array.
29
- *
30
- * @param entity - The data of the entity to create.
31
- * All values that should be omitted will be removed from it inside this method.
32
- * @returns A Promise of the created entity.
33
- */
34
- async create(entity) {
35
- const body = omit(entity, EntityUtilities.getOmitForCreate(entity));
36
- const e = await firstValueFrom(this.http.post(this.baseUrl, body));
37
- this.entities.push(e);
38
- this.entitiesSubject.next(this.entities);
39
- return e;
40
- }
41
- /**
42
- * Gets all existing entities and pushes them to the entites array.
43
- *
44
- * @returns A Promise of all received Entities.
45
- */
46
- async read() {
47
- const e = await firstValueFrom(this.http.get(this.baseUrl));
48
- this.entitiesSubject.next(e);
49
- return e;
50
- }
51
- /**
52
- * Updates a specific Entity.
53
- *
54
- * @param entity - The updated Entity
55
- * All values that should be omitted will be removed from it inside this method.
56
- * @param entityPriorChanges - The current Entity.
57
- * It Is used to get changed values and only update them instead of sending the whole entity data.
58
- */
59
- async update(entity, entityPriorChanges) {
60
- const reqBody = omit(EntityUtilities.difference(entity, entityPriorChanges), EntityUtilities.getOmitForUpdate(entity));
61
- const updatedEntity = await firstValueFrom(this.http.patch(`${this.baseUrl}/${entityPriorChanges.id}`, omitBy(reqBody, isNil)));
62
- this.entities[this.entities.findIndex((e) => e.id === entityPriorChanges.id)] = updatedEntity;
63
- this.entitiesSubject.next(this.entities);
64
- }
65
- /**
66
- * Deletes a specific Entity.
67
- *
68
- * @param id - The id of the element to delete.
69
- */
70
- async delete(id) {
71
- await firstValueFrom(this.http.delete(`${this.baseUrl}/${id}`));
72
- this.entities.splice(this.entities.findIndex((e) => e.id === id), 1);
73
- this.entitiesSubject.next(this.entities);
74
- }
75
- }
76
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5LX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