@mediusinc/mng-commons 4.1.0-rc.0 → 5.0.0-rc.0-c31d5206

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 (251) hide show
  1. package/assets/i18n/en.json +13 -66
  2. package/assets/i18n/sl.json +12 -67
  3. package/data-api/README.md +3 -0
  4. package/data-api/class-dto/README.md +3 -0
  5. package/data-api/class-dto/helpers/tableview-crud-create.d.ts +40 -0
  6. package/data-api/class-dto/index.d.ts +7 -0
  7. package/data-api/class-dto/models/query-result.model.d.ts +13 -0
  8. package/data-api/class-dto/obsolete/README.md +3 -0
  9. package/data-api/class-dto/obsolete/helpers/query-param-convert.d.ts +23 -0
  10. package/data-api/class-dto/obsolete/helpers/tableview-crud-create.d.ts +22 -0
  11. package/data-api/class-dto/obsolete/index.d.ts +14 -0
  12. package/data-api/class-dto/obsolete/models/builders/query-param.builder.d.ts +36 -0
  13. package/{lib/api → data-api/class-dto/obsolete}/models/filter-param.model.d.ts +1 -1
  14. package/{lib/api → data-api/class-dto/obsolete}/models/query-param.model.d.ts +1 -1
  15. package/{lib/api → data-api/class-dto/obsolete}/models/query-result.model.d.ts +1 -1
  16. package/data-api/class-dto/obsolete/provide.d.ts +9 -0
  17. package/data-api/class-dto/obsolete/services/api.abstract.service.d.ts +36 -0
  18. package/{lib/api → data-api/class-dto/obsolete}/services/crud-api.abstract.service.d.ts +20 -5
  19. package/data-api/class-dto/obsolete/services/get-all-api.abstract.service.d.ts +30 -0
  20. package/data-api/class-dto/obsolete/tableview/tableview-crud.data-provider.d.ts +28 -0
  21. package/data-api/class-dto/obsolete/utils/query-param-map.util.d.ts +22 -0
  22. package/{lib/api/utils/object-serializer.util.d.ts → data-api/class-dto/serder/object-serializer.d.ts} +1 -1
  23. package/{lib/api → data-api/class-dto}/services/api.abstract.service.d.ts +2 -4
  24. package/data-api/class-dto/services/crud-api.abstract.service.d.ts +25 -0
  25. package/data-api/class-dto/services/get-all-api.abstract.service.d.ts +14 -0
  26. package/data-api/class-dto/tableview/tableview-crud.data-provider.d.ts +17 -0
  27. package/data-api/helpers/get-all-params.d.ts +69 -0
  28. package/data-api/helpers/tableview-get-all-params-create.d.ts +14 -0
  29. package/data-api/index.d.ts +5 -0
  30. package/data-api/models/request-params.model.d.ts +61 -0
  31. package/data-api/rxjs/map-to-data-list.operator.d.ts +9 -0
  32. package/data-api/types/extract-get-all-params.type.d.ts +14 -0
  33. package/esm2022/data-api/class-dto/helpers/tableview-crud-create.mjs +40 -0
  34. package/esm2022/data-api/class-dto/index.mjs +13 -0
  35. package/esm2022/data-api/class-dto/mediusinc-mng-commons-data-api-class-dto.mjs +5 -0
  36. package/esm2022/data-api/class-dto/models/query-result.model.mjs +24 -0
  37. package/esm2022/data-api/class-dto/obsolete/helpers/query-param-convert.mjs +103 -0
  38. package/esm2022/data-api/class-dto/obsolete/helpers/tableview-crud-create.mjs +21 -0
  39. package/esm2022/data-api/class-dto/obsolete/index.mjs +21 -0
  40. package/esm2022/data-api/class-dto/obsolete/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs +5 -0
  41. package/esm2022/data-api/class-dto/obsolete/models/builders/query-param.builder.mjs +83 -0
  42. package/esm2022/data-api/class-dto/obsolete/models/filter-match-type.model.mjs +27 -0
  43. package/esm2022/data-api/class-dto/obsolete/models/filter-param.model.mjs +33 -0
  44. package/esm2022/data-api/class-dto/obsolete/models/query-mode.model.mjs +18 -0
  45. package/esm2022/data-api/class-dto/obsolete/models/query-param.model.mjs +68 -0
  46. package/esm2022/data-api/class-dto/obsolete/models/query-result.model.mjs +24 -0
  47. package/esm2022/data-api/class-dto/obsolete/provide.mjs +40 -0
  48. package/esm2022/data-api/class-dto/obsolete/services/api.abstract.service.mjs +70 -0
  49. package/esm2022/data-api/class-dto/obsolete/services/crud-api.abstract.service.mjs +83 -0
  50. package/esm2022/data-api/class-dto/obsolete/services/get-all-api.abstract.service.mjs +38 -0
  51. package/esm2022/data-api/class-dto/obsolete/tableview/tableview-crud.data-provider.mjs +51 -0
  52. package/esm2022/data-api/class-dto/obsolete/utils/query-param-map.util.mjs +57 -0
  53. package/esm2022/data-api/class-dto/serder/object-serializer.mjs +184 -0
  54. package/esm2022/data-api/class-dto/services/api.abstract.service.mjs +55 -0
  55. package/esm2022/data-api/class-dto/services/crud-api.abstract.service.mjs +82 -0
  56. package/esm2022/data-api/class-dto/services/get-all-api.abstract.service.mjs +49 -0
  57. package/esm2022/data-api/class-dto/tableview/tableview-crud.data-provider.mjs +49 -0
  58. package/esm2022/data-api/helpers/get-all-params.mjs +180 -0
  59. package/esm2022/data-api/helpers/tableview-get-all-params-create.mjs +18 -0
  60. package/esm2022/data-api/index.mjs +10 -0
  61. package/esm2022/data-api/mediusinc-mng-commons-data-api.mjs +5 -0
  62. package/esm2022/data-api/models/request-params.model.mjs +2 -0
  63. package/esm2022/data-api/rxjs/map-to-data-list.operator.mjs +19 -0
  64. package/esm2022/data-api/types/extract-get-all-params.type.mjs +2 -0
  65. package/esm2022/index.mjs +3 -6
  66. package/esm2022/lib/components/action/action.component.mjs +4 -5
  67. package/esm2022/lib/components/action/editor/injector-context/action-editor-injector-context.component.mjs +2 -2
  68. package/esm2022/lib/components/action/models/action-execution.model.mjs +5 -4
  69. package/esm2022/lib/components/action/route/action-route.component.mjs +1 -2
  70. package/esm2022/lib/components/action/table/action-table.component.mjs +4 -6
  71. package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +29 -17
  72. package/esm2022/lib/components/form/dropdown/dropdown.component.mjs +3 -7
  73. package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +20 -18
  74. package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +2 -2
  75. package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +23 -12
  76. package/esm2022/lib/components/table/column-filter-full/column-filter-full.component.mjs +162 -33
  77. package/esm2022/lib/components/table/column-value/column-value.component.mjs +3 -3
  78. package/esm2022/lib/components/table/models/table.event.mjs +1 -1
  79. package/esm2022/lib/components/table/models/table.interface.mjs +1 -1
  80. package/esm2022/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.mjs +4 -4
  81. package/esm2022/lib/components/table/table.component.mjs +117 -191
  82. package/esm2022/lib/components/tableview/actions/tableview-default-actions.mjs +215 -0
  83. package/esm2022/lib/components/tableview/builders/tableview-builder.mjs +162 -0
  84. package/esm2022/lib/components/tableview/helpers/tableview-create.mjs +24 -0
  85. package/esm2022/lib/components/tableview/index.mjs +5 -2
  86. package/esm2022/lib/components/tableview/models/tableview.model.mjs +2 -0
  87. package/esm2022/lib/components/tableview/route/tableview-route.component.mjs +7 -39
  88. package/esm2022/lib/components/tableview/tableview.component.mjs +4 -4
  89. package/esm2022/lib/data-providers/editor.data-provider.mjs +13 -13
  90. package/esm2022/lib/data-providers/index.mjs +1 -2
  91. package/esm2022/lib/data-providers/lookup.data-provider.mjs +1 -1
  92. package/esm2022/lib/data-providers/table.data-provider.mjs +4 -5
  93. package/esm2022/lib/data-providers/tableview.data-provider.mjs +1 -1
  94. package/esm2022/lib/descriptors/action/action-confirmation.descriptor.mjs +1 -1
  95. package/esm2022/lib/descriptors/action/action-editor.descriptor.mjs +10 -6
  96. package/esm2022/lib/descriptors/action/action.descriptor.mjs +2 -3
  97. package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +13 -17
  98. package/esm2022/lib/descriptors/editor/field-lookup.descriptor.mjs +12 -17
  99. package/esm2022/lib/descriptors/editor/field.descriptor.mjs +5 -8
  100. package/esm2022/lib/descriptors/editor/internal/editor-fields.model.mjs +1 -1
  101. package/esm2022/lib/descriptors/filter/filter-lookup.descriptor.mjs +28 -52
  102. package/esm2022/lib/descriptors/filter/filter.descriptor.mjs +40 -23
  103. package/esm2022/lib/descriptors/model/enum.descriptor.mjs +31 -0
  104. package/esm2022/lib/descriptors/model/index.mjs +3 -1
  105. package/esm2022/lib/descriptors/model/model.descriptor.mjs +10 -1
  106. package/esm2022/lib/descriptors/model/type.descriptor.mjs +11 -0
  107. package/esm2022/lib/descriptors/table/column.descriptor.mjs +12 -107
  108. package/esm2022/lib/descriptors/table/index.mjs +2 -1
  109. package/esm2022/lib/descriptors/table/internal/table-columns.model.mjs +1 -1
  110. package/esm2022/lib/descriptors/table/internal/table.model.mjs +1 -1
  111. package/esm2022/lib/descriptors/table/sort.descriptor.mjs +45 -0
  112. package/esm2022/lib/descriptors/table/table.descriptor.mjs +208 -57
  113. package/esm2022/lib/descriptors/tableview/internal/tableview.model.mjs +1 -1
  114. package/esm2022/lib/descriptors/tableview/tableview.descriptor.mjs +114 -17
  115. package/esm2022/lib/descriptors/types/filter.type.mjs +1 -19
  116. package/esm2022/lib/descriptors/types/table.type.mjs +1 -5
  117. package/esm2022/lib/error/error.handler.mjs +1 -1
  118. package/esm2022/lib/helpers/data-provider-executors.mjs +80 -0
  119. package/esm2022/lib/models/data-list.model.mjs +2 -0
  120. package/esm2022/lib/models/filter-match.model.mjs +105 -0
  121. package/esm2022/lib/models/index.mjs +3 -1
  122. package/esm2022/lib/models/view-container.model.mjs +1 -1
  123. package/esm2022/lib/pipes/enum.pipe.mjs +6 -6
  124. package/esm2022/lib/provide.mjs +101 -0
  125. package/esm2022/lib/registry/type.registry.mjs +3 -10
  126. package/esm2022/lib/router/models/router.model.mjs +1 -1
  127. package/esm2022/lib/router/tableview-route-builder.mjs +1 -1
  128. package/esm2022/lib/services/action/action-executor.service.mjs +54 -32
  129. package/esm2022/lib/services/commons.service.mjs +1 -37
  130. package/esm2022/lib/services/data-provider-executor.service.mjs +52 -0
  131. package/esm2022/lib/services/index.mjs +2 -1
  132. package/esm2022/lib/services/view/view-container.service.mjs +1 -1
  133. package/esm2022/lib/types/action-descriptor.types.mjs +1 -1
  134. package/esm2022/lib/types/type.model.mjs +1 -1
  135. package/esm2022/lib/utils/data-list-params.util.mjs +416 -0
  136. package/esm2022/lib/utils/date.util.mjs +8 -2
  137. package/esm2022/lib/utils/enum.util.mjs +2 -1
  138. package/esm2022/lib/utils/error.util.mjs +3 -3
  139. package/esm2022/lib/utils/export.util.mjs +1 -1
  140. package/esm2022/lib/utils/index.mjs +2 -2
  141. package/esm2022/lib/utils/route.util.mjs +1 -2
  142. package/fesm2022/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs +698 -0
  143. package/fesm2022/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs.map +1 -0
  144. package/fesm2022/mediusinc-mng-commons-data-api-class-dto.mjs +480 -0
  145. package/fesm2022/mediusinc-mng-commons-data-api-class-dto.mjs.map +1 -0
  146. package/fesm2022/mediusinc-mng-commons-data-api.mjs +224 -0
  147. package/fesm2022/mediusinc-mng-commons-data-api.mjs.map +1 -0
  148. package/fesm2022/mediusinc-mng-commons.mjs +2634 -2549
  149. package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
  150. package/index.d.ts +2 -4
  151. package/lib/components/action/action.component.d.ts +13 -13
  152. package/lib/components/action/models/action-execution.model.d.ts +47 -46
  153. package/lib/components/action/table/action-table.component.d.ts +15 -16
  154. package/lib/components/form/autocomplete/autocomplete.component.d.ts +1 -1
  155. package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +3 -5
  156. package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +10 -10
  157. package/lib/components/table/column-filter-full/column-filter-full.component.d.ts +25 -9
  158. package/lib/components/table/models/table.event.d.ts +2 -2
  159. package/lib/components/table/models/table.interface.d.ts +4 -1
  160. package/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.d.ts +2 -2
  161. package/lib/components/table/table.component.d.ts +19 -18
  162. package/lib/components/tableview/actions/tableview-default-actions.d.ts +36 -0
  163. package/lib/components/tableview/builders/tableview-builder.d.ts +115 -0
  164. package/lib/components/tableview/helpers/tableview-create.d.ts +16 -0
  165. package/lib/components/tableview/index.d.ts +4 -1
  166. package/lib/components/tableview/models/tableview.model.d.ts +8 -0
  167. package/lib/components/tableview/route/tableview-route.component.d.ts +5 -14
  168. package/lib/components/tableview/tableview.component.d.ts +12 -12
  169. package/lib/data-providers/editor.data-provider.d.ts +12 -12
  170. package/lib/data-providers/index.d.ts +0 -1
  171. package/lib/data-providers/lookup.data-provider.d.ts +2 -2
  172. package/lib/data-providers/table.data-provider.d.ts +25 -25
  173. package/lib/data-providers/tableview.data-provider.d.ts +18 -18
  174. package/lib/descriptors/action/action-confirmation.descriptor.d.ts +1 -1
  175. package/lib/descriptors/action/action-editor.descriptor.d.ts +20 -17
  176. package/lib/descriptors/editor/editor.descriptor.d.ts +8 -12
  177. package/lib/descriptors/editor/field-base.descriptor.d.ts +3 -3
  178. package/lib/descriptors/editor/field-lookup.descriptor.d.ts +11 -11
  179. package/lib/descriptors/editor/field-many.descriptor.d.ts +4 -4
  180. package/lib/descriptors/editor/field.descriptor.d.ts +2 -2
  181. package/lib/descriptors/editor/internal/editor-fields.model.d.ts +6 -5
  182. package/lib/descriptors/filter/filter-lookup.descriptor.d.ts +15 -14
  183. package/lib/descriptors/filter/filter.descriptor.d.ts +17 -18
  184. package/lib/descriptors/model/enum.descriptor.d.ts +14 -0
  185. package/lib/descriptors/model/index.d.ts +2 -0
  186. package/lib/descriptors/model/model.descriptor.d.ts +9 -0
  187. package/lib/descriptors/model/type.descriptor.d.ts +5 -0
  188. package/lib/descriptors/table/column.descriptor.d.ts +10 -24
  189. package/lib/descriptors/table/index.d.ts +1 -0
  190. package/lib/descriptors/table/internal/table-columns.model.d.ts +36 -5
  191. package/lib/descriptors/table/internal/table.model.d.ts +5 -2
  192. package/lib/descriptors/table/sort.descriptor.d.ts +17 -0
  193. package/lib/descriptors/table/table.descriptor.d.ts +57 -33
  194. package/lib/descriptors/tableview/internal/tableview.model.d.ts +3 -3
  195. package/lib/descriptors/tableview/tableview.descriptor.d.ts +49 -19
  196. package/lib/descriptors/types/filter.type.d.ts +0 -17
  197. package/lib/descriptors/types/table.type.d.ts +0 -3
  198. package/lib/error/error.handler.d.ts +1 -1
  199. package/lib/helpers/data-provider-executors.d.ts +19 -0
  200. package/lib/models/data-list.model.d.ts +27 -0
  201. package/lib/models/filter-match.model.d.ts +36 -0
  202. package/lib/models/index.d.ts +2 -0
  203. package/lib/models/view-container.model.d.ts +2 -2
  204. package/lib/pipes/enum.pipe.d.ts +2 -2
  205. package/lib/provide.d.ts +10 -0
  206. package/lib/router/models/router.model.d.ts +1 -1
  207. package/lib/router/tableview-route-builder.d.ts +1 -2
  208. package/lib/services/action/action-executor.service.d.ts +18 -16
  209. package/lib/services/data-provider-executor.service.d.ts +60 -0
  210. package/lib/services/index.d.ts +1 -0
  211. package/lib/services/view/view-container.service.d.ts +11 -11
  212. package/lib/types/action-descriptor.types.d.ts +2 -2
  213. package/lib/types/type.model.d.ts +1 -3
  214. package/lib/utils/data-list-params.util.d.ts +84 -0
  215. package/lib/utils/date.util.d.ts +3 -1
  216. package/lib/utils/enum.util.d.ts +4 -3
  217. package/lib/utils/export.util.d.ts +1 -1
  218. package/lib/utils/index.d.ts +1 -1
  219. package/openapi/angular/modelEnum.mustache +0 -3
  220. package/package.json +20 -2
  221. package/esm2022/lib/api/models/builders/query-param.builder.mjs +0 -59
  222. package/esm2022/lib/api/models/filter-match-type.model.mjs +0 -27
  223. package/esm2022/lib/api/models/filter-param.model.mjs +0 -33
  224. package/esm2022/lib/api/models/index.mjs +0 -7
  225. package/esm2022/lib/api/models/query-mode.model.mjs +0 -18
  226. package/esm2022/lib/api/models/query-param.model.mjs +0 -68
  227. package/esm2022/lib/api/models/query-result.model.mjs +0 -35
  228. package/esm2022/lib/api/services/api.abstract.service.mjs +0 -58
  229. package/esm2022/lib/api/services/crud-api.abstract.service.mjs +0 -75
  230. package/esm2022/lib/api/services/get-all-api.abstract.service.mjs +0 -30
  231. package/esm2022/lib/api/services/index.mjs +0 -4
  232. package/esm2022/lib/api/utils/index.mjs +0 -3
  233. package/esm2022/lib/api/utils/medius-rest.util.mjs +0 -293
  234. package/esm2022/lib/api/utils/object-serializer.util.mjs +0 -185
  235. package/esm2022/lib/components/tableview/route/tableview-route.abstract.component.mjs +0 -158
  236. package/esm2022/lib/data-providers/tableview-crud.data-provider.mjs +0 -32
  237. package/esm2022/lib/provide-commons.mjs +0 -88
  238. package/esm2022/lib/utils/action-data-provider.util.mjs +0 -171
  239. package/lib/api/models/builders/query-param.builder.d.ts +0 -13
  240. package/lib/api/models/index.d.ts +0 -6
  241. package/lib/api/services/get-all-api.abstract.service.d.ts +0 -14
  242. package/lib/api/services/index.d.ts +0 -3
  243. package/lib/api/utils/index.d.ts +0 -2
  244. package/lib/api/utils/medius-rest.util.d.ts +0 -32
  245. package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -35
  246. package/lib/data-providers/tableview-crud.data-provider.d.ts +0 -12
  247. package/lib/provide-commons.d.ts +0 -3
  248. package/lib/utils/action-data-provider.util.d.ts +0 -35
  249. package/templates/tableview-route.component.html +0 -5
  250. /package/{lib/api → data-api/class-dto/obsolete}/models/filter-match-type.model.d.ts +0 -0
  251. /package/{lib/api → data-api/class-dto/obsolete}/models/query-mode.model.d.ts +0 -0
@@ -193,20 +193,17 @@
193
193
  "equals": "Equals",
194
194
  "notEquals": "Not equals",
195
195
  "noFilter": "No Filter",
196
- "lt": "Less than",
197
- "lte": "Less than or equal to",
198
- "gt": "Greater than",
199
- "gte": "Greater than or equal to",
196
+ "lessThan": "Less than",
197
+ "lessThanOrEqualTo": "Less than or equal to",
198
+ "greaterThan": "Greater than",
199
+ "greaterThanOrEqualTo": "Greater than or equal to",
200
200
  "in": "Has one of",
201
+ "notIn": "Does not have one of",
201
202
  "is": "Has value",
202
203
  "isNot": "Does not have value",
203
- "before": "Before",
204
- "after": "After",
205
- "dateIs": "Equals",
206
- "dateIsNot": "Not equals",
207
- "dateBefore": "Date is before",
208
- "dateAfter": "Date is after",
209
- "between": "From - to",
204
+ "exists": "Exists",
205
+ "doesNotExist": "Does not exist",
206
+ "between": "Between",
210
207
  "clear": "Clear",
211
208
  "apply": "Apply",
212
209
  "matchAll": "Match All",
@@ -218,61 +215,11 @@
218
215
  "choose": "Choose",
219
216
  "upload": "Upload",
220
217
  "cancel": "Cancel",
221
- "dayNames": [
222
- "Sunday",
223
- "Monday",
224
- "Tuesday",
225
- "Wednesday",
226
- "Thursday",
227
- "Friday",
228
- "Saturday"
229
- ],
230
- "dayNamesShort": [
231
- "Sun",
232
- "Mon",
233
- "Tue",
234
- "Wed",
235
- "Thu",
236
- "Fri",
237
- "Sat"
238
- ],
239
- "dayNamesMin": [
240
- "Su",
241
- "Mo",
242
- "Tu",
243
- "We",
244
- "Th",
245
- "Fr",
246
- "Sa"
247
- ],
248
- "monthNames": [
249
- "January",
250
- "February",
251
- "March",
252
- "April",
253
- "May",
254
- "June",
255
- "July",
256
- "August",
257
- "September",
258
- "October",
259
- "November",
260
- "December"
261
- ],
262
- "monthNamesShort": [
263
- "Jan",
264
- "Feb",
265
- "Mar",
266
- "Apr",
267
- "May",
268
- "Jun",
269
- "Jul",
270
- "Aug",
271
- "Sep",
272
- "Oct",
273
- "Nov",
274
- "Dec"
275
- ],
218
+ "dayNames": ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
219
+ "dayNamesShort": ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
220
+ "dayNamesMin": ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
221
+ "monthNames": ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
222
+ "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
276
223
  "dateFormat": "mm/dd/yy",
277
224
  "firstDayOfWeek": 0,
278
225
  "today": "Today",
@@ -192,19 +192,14 @@
192
192
  "equals": "Je enako",
193
193
  "notEquals": "Ni enako",
194
194
  "noFilter": "Brez filtra",
195
- "lt": "Manj kot",
196
- "lte": "Manj ali enako kot",
197
- "gt": "Večje kot",
198
- "gte": "Večje ali enako kot",
195
+ "lessThan": "Manj kot",
196
+ "lessThanOrEqualTo": "Manj ali enako kot",
197
+ "greaterThan": "Večje kot",
198
+ "greaterThanOrEqualTo": "Večje ali enako kot",
199
199
  "in": "Vsebuje eno od",
200
- "is": "Ima vrednost",
201
- "isNot": "Nima vrednost",
202
- "before": "Pred",
203
- "after": "Po",
204
- "dateIs": "Je enako",
205
- "dateIsNot": "Ni enako",
206
- "dateBefore": "Datum je pred",
207
- "dateAfter": "Datum je po",
200
+ "notIn": "Ne vsebuje ene od",
201
+ "exists": "Ima vrednost",
202
+ "doesNotExist": "Nima vrednost",
208
203
  "between": "Od - do",
209
204
  "clear": "Pobriši",
210
205
  "apply": "Potrdi",
@@ -217,61 +212,11 @@
217
212
  "choose": "Izberi",
218
213
  "upload": "Naloži",
219
214
  "cancel": "Prekliči",
220
- "dayNames": [
221
- "Nedelja",
222
- "Ponedeljek",
223
- "Torek",
224
- "Sreda",
225
- "Četrtek",
226
- "Petek",
227
- "Sobota"
228
- ],
229
- "dayNamesShort": [
230
- "Ned",
231
- "Pon",
232
- "Tor",
233
- "Sre",
234
- "Čet",
235
- "Pet",
236
- "Sob"
237
- ],
238
- "dayNamesMin": [
239
- "Ne",
240
- "Po",
241
- "To",
242
- "Sr",
243
- "Če",
244
- "Pe",
245
- "So"
246
- ],
247
- "monthNames": [
248
- "Januar",
249
- "Februar",
250
- "Marec",
251
- "April",
252
- "Maj",
253
- "Junij",
254
- "Julij",
255
- "Avgust",
256
- "September",
257
- "Oktober",
258
- "November",
259
- "December"
260
- ],
261
- "monthNamesShort": [
262
- "Jan",
263
- "Feb",
264
- "Mar",
265
- "Apr",
266
- "Maj",
267
- "Jun",
268
- "Jul",
269
- "Avg",
270
- "Sep",
271
- "Okt",
272
- "Nov",
273
- "Dec"
274
- ],
215
+ "dayNames": ["Nedelja", "Ponedeljek", "Torek", "Sreda", "Četrtek", "Petek", "Sobota"],
216
+ "dayNamesShort": ["Ned", "Pon", "Tor", "Sre", "Čet", "Pet", "Sob"],
217
+ "dayNamesMin": ["Ne", "Po", "To", "Sr", "Če", "Pe", "So"],
218
+ "monthNames": ["Januar", "Februar", "Marec", "April", "Maj", "Junij", "Julij", "Avgust", "September", "Oktober", "November", "December"],
219
+ "monthNamesShort": ["Jan", "Feb", "Mar", "Apr", "Maj", "Jun", "Jul", "Avg", "Sep", "Okt", "Nov", "Dec"],
275
220
  "dateFormat": "dd.mm.yy",
276
221
  "firstDayOfWeek": 0,
277
222
  "today": "Danes",
@@ -0,0 +1,3 @@
1
+ # @mediusinc/mng-commons/data-api
2
+
3
+ Secondary entry point of `@mediusinc/mng-commons`. It can be used by importing from `@mediusinc/mng-commons/data-api`.
@@ -0,0 +1,3 @@
1
+ # @mediusinc/mng-commons/data-api/class-dto
2
+
3
+ Secondary entry point of `@mediusinc/mng-commons`. It can be used by importing from `@mediusinc/mng-commons/data-api/class-dto`.
@@ -0,0 +1,40 @@
1
+ import { ClassType, ServiceClassType, TableviewBuilder, TableviewDescriptorInst, TypeDescriptor } from '@mediusinc/mng-commons';
2
+ import { QueryResult } from '../models/query-result.model';
3
+ import { IMngCrudApiService } from '../services/crud-api.abstract.service';
4
+ import { IMngGetAllApiService } from '../services/get-all-api.abstract.service';
5
+ import { TableviewCrudDataProviderInst } from '../tableview/tableview-crud.data-provider';
6
+ /**
7
+ * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.
8
+ * Sorts and filters are expected to be keys of class.
9
+ *
10
+ * @param {ClassType<Model>} type - The class representing the model.
11
+ * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.
12
+ * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.
13
+ * @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.
14
+ * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.
15
+ *
16
+ * @returns A tableview instance with descriptor, data provider and actions.
17
+ */
18
+ export declare function tableviewCrud<Model, RequestModel, Service extends IMngCrudApiService<Model, RequestModel> & IMngGetAllApiService<QueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, requestType: ClassType<RequestModel>, service: ServiceClassType<Service>, modelConfig?: {
19
+ idProperty?: keyof Model;
20
+ titleProperty?: keyof Model;
21
+ i18nBaseKey?: string;
22
+ }, buildFn?: (builder: TableviewBuilder<Model, Service, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>, Sorts, Filters>) => void): import("@mediusinc/mng-commons").ITableview<Model, Service, Sorts, Filters, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>>;
23
+ /**
24
+ * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.
25
+ *
26
+ * @param {ClassType<Model>} type - The class representing the model.
27
+ * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.
28
+ * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.
29
+ * @param {TypeDescriptor<Sorts>} sorts - The available sort keys of get all request.
30
+ * @param {TypeDescriptor<Filters>} filters - The available filter keys of get all request.
31
+ * @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.
32
+ * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.
33
+ *
34
+ * @returns A tableview instance with descriptor, data provider and actions.
35
+ */
36
+ export declare function tableviewCrudWithSortAndFilter<Model, RequestModel, Service extends IMngCrudApiService<Model, RequestModel> & IMngGetAllApiService<QueryResult<Model>>, Sorts, Filters extends keyof any>(type: ClassType<Model>, requestType: ClassType<RequestModel>, service: ServiceClassType<Service>, sorts: TypeDescriptor<Sorts>, filters: TypeDescriptor<Filters>, modelConfig?: {
37
+ idProperty?: keyof Model;
38
+ titleProperty?: keyof Model;
39
+ i18nBaseKey?: string;
40
+ }, buildFn?: (builder: TableviewBuilder<Model, Service, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>, Sorts, Filters>) => void): import("@mediusinc/mng-commons").ITableview<Model, Service, Sorts, Filters, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>>;
@@ -0,0 +1,7 @@
1
+ export * from './helpers/tableview-crud-create';
2
+ export * from './models/query-result.model';
3
+ export * from './serder/object-serializer';
4
+ export * from './services/api.abstract.service';
5
+ export * from './services/crud-api.abstract.service';
6
+ export * from './services/get-all-api.abstract.service';
7
+ export * from './tableview/tableview-crud.data-provider';
@@ -0,0 +1,13 @@
1
+ import { ClassAttributeDef } from '@mediusinc/mng-commons';
2
+ export declare class QueryResult<Item> implements IMediusQueryResultV2<Item> {
3
+ totalCount?: number;
4
+ data?: Array<Item>;
5
+ static discriminator?: string;
6
+ static fromArray<Item>(pageData: Item[], allDataCount?: number): QueryResult<Item>;
7
+ static attributeTypeMap: Array<ClassAttributeDef>;
8
+ static getAttributeTypeMap(): ClassAttributeDef[];
9
+ }
10
+ export interface IMediusQueryResultV2<Item> {
11
+ totalCount?: number;
12
+ data?: Array<Item>;
13
+ }
@@ -0,0 +1,3 @@
1
+ # @mediusinc/mng-commons/data-api/class-dto/obsolete
2
+
3
+ Secondary entry point of `@mediusinc/mng-commons`. It can be used by importing from `@mediusinc/mng-commons/data-api/class-dto/obsolete`.
@@ -0,0 +1,23 @@
1
+ import { Observable } from 'rxjs';
2
+ import { DataListParams, DataListResult } from '@mediusinc/mng-commons';
3
+ import { MediusFilterMatchType } from '../models/filter-match-type.model';
4
+ import { MediusQueryParam } from '../models/query-param.model';
5
+ import { MediusQueryResult } from '../models/query-result.model';
6
+ import { QueryParamMap } from '../utils/query-param-map.util';
7
+ export declare function toObsoleteV1QueryParam(): undefined;
8
+ export declare function toObsoleteV1QueryParam<Sorts = string, Filters extends keyof any = string>(params: DataListParams<Sorts, Filters>, map?: QueryParamMap<Sorts, Filters>): MediusQueryParam;
9
+ export declare function toObsoleteV1QueryParam<Sorts = string, Filters extends keyof any = string>(params: DataListParams<Sorts, Filters> | undefined, map?: QueryParamMap<Sorts, Filters>): MediusQueryParam | undefined;
10
+ export declare function toObsoleteV1FilterMatchType(match: string): MediusFilterMatchType;
11
+ /**
12
+ * Convert a query result from an obsolete API version 1 to a `DataListResult`
13
+ *
14
+ * @param {DataListParams} params - The data list parameters for the query
15
+ * @param {Service} service - The service object used to make the API call
16
+ * @param {function} apiOperation - The API operation function that returns an `Observable<MediusQueryResult<Item>>`
17
+ * @param {any} additionalParams - Additional parameters to pass to the API operation function (optional)
18
+ *
19
+ * @returns {Observable<DataListResult<Item>>} - An observable that emits a `DataListResult` object
20
+ *
21
+ * @deprecated
22
+ */
23
+ export declare function toObsoleteV1QueryResult<Item, Service>(params: DataListParams, service: Service, apiOperation: (qp: MediusQueryParam, ...additionalParams: any) => Observable<MediusQueryResult<Item>>, additionalParams?: any): Observable<DataListResult<Item>>;
@@ -0,0 +1,22 @@
1
+ import { ClassType, ServiceClassType, TableviewBuilder, TableviewDescriptorInst } from '@mediusinc/mng-commons';
2
+ import { MediusQueryResult } from '../models/query-result.model';
3
+ import { IMngCrudObsoleteV1ApiService } from '../services/crud-api.abstract.service';
4
+ import { IMngGetAllObsoleteV1ApiService } from '../services/get-all-api.abstract.service';
5
+ import { TableviewCrudObsoleteV1DataProviderInst } from '../tableview/tableview-crud.data-provider';
6
+ /**
7
+ * Creates a tableview with the given class, service based on data API v1 (obsolete) and optional class/model configuration.
8
+ *
9
+ * @param {ClassType<Model>} type - The class representing the model.
10
+ * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudObsoleteV1ApiService` and `IMngGetAllObsoleteV1ApiService`.
11
+ * @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.
12
+ * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.
13
+ *
14
+ * @returns {Tableview} - The built table view.
15
+ *
16
+ * @deprecated
17
+ */
18
+ export declare function tableviewCrudObsoleteV1<Model, Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, service: ServiceClassType<Service>, modelConfig?: {
19
+ idProperty?: keyof Model;
20
+ titleProperty?: keyof Model;
21
+ i18nBaseKey?: ClassType<any> | string;
22
+ }, buildFn?: (builder: TableviewBuilder<Model, Service, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>, Sorts, Filters>) => void): import("@mediusinc/mng-commons").ITableview<Model, Service, Sorts, Filters, TableviewDescriptorInst<Model, Sorts, Filters>, TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>>;
@@ -0,0 +1,14 @@
1
+ export * from './helpers/query-param-convert';
2
+ export * from './helpers/tableview-crud-create';
3
+ export * from './models/builders/query-param.builder';
4
+ export * from './models/filter-match-type.model';
5
+ export * from './models/filter-param.model';
6
+ export * from './models/query-mode.model';
7
+ export * from './models/query-param.model';
8
+ export * from './models/query-result.model';
9
+ export * from './services/api.abstract.service';
10
+ export * from './services/crud-api.abstract.service';
11
+ export * from './services/get-all-api.abstract.service';
12
+ export * from './tableview/tableview-crud.data-provider';
13
+ export * from './utils/query-param-map.util';
14
+ export * from './provide';
@@ -0,0 +1,36 @@
1
+ import { MediusFilterMatchType } from '../filter-match-type.model';
2
+ import { MediusQueryMode } from '../query-mode.model';
3
+ import { MediusQueryParam } from '../query-param.model';
4
+ export declare class MediusQueryParamBuilder {
5
+ private queryParam;
6
+ private constructor();
7
+ /**
8
+ * Creates a new instance of `MediusQueryParamBuilder` with the specified `itemsPerPage` and `itemsOffset` values.
9
+ *
10
+ * @param {number} [itemsPerPage=50] - The number of items per page.
11
+ * @param {number} [itemsOffset=0] - The offset value for the items.
12
+ *
13
+ * @returns {MediusQueryParamBuilder} A new instance of `MediusQueryParamBuilder`.
14
+ *
15
+ * @deprecated
16
+ */
17
+ static create(itemsPerPage?: number, itemsOffset?: number): MediusQueryParamBuilder;
18
+ /**
19
+ * Creates a new instance of MediusQueryParamBuilder based on an existing MediusQueryParam object.
20
+ *
21
+ * @param {MediusQueryParam} queryParam - The existing MediusQueryParam object to create from.
22
+ * @param {number} [itemsPerPage] - The number of items per page for the new instance. If not provided, default value is used.
23
+ * @param {number} [itemsOffset] - The offset for the new instance. If not provided, default value is used.
24
+ *
25
+ * @returns {MediusQueryParamBuilder} - A new instance of MediusQueryParamBuilder.
26
+ *
27
+ * @deprecated
28
+ */
29
+ static createFromExisting(queryParam: MediusQueryParam, itemsPerPage?: number, itemsOffset?: number): MediusQueryParamBuilder;
30
+ withItemsPerPage(itemsPerPage: number): MediusQueryParamBuilder;
31
+ withItemsOffset(itemsOffset: number): MediusQueryParamBuilder;
32
+ withQueryMode(queryMode: MediusQueryMode): MediusQueryParamBuilder;
33
+ withSort(property: string, asc?: boolean): MediusQueryParamBuilder;
34
+ withFilter(property: string, value: any, valueTo?: any, matchType?: MediusFilterMatchType, matchCaseSensitive?: boolean): MediusQueryParamBuilder;
35
+ build(): MediusQueryParam;
36
+ }
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ClassAttributeDef } from '../../models';
12
+ import { ClassAttributeDef } from '@mediusinc/mng-commons';
13
13
  import { MediusFilterMatchType } from './filter-match-type.model';
14
14
  export declare class MediusFilterParam {
15
15
  property?: string;
@@ -9,7 +9,7 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import { ClassAttributeDef } from '../../models';
12
+ import { ClassAttributeDef } from '@mediusinc/mng-commons';
13
13
  import { MediusFilterParam } from './filter-param.model';
14
14
  import { MediusQueryMode } from './query-mode.model';
15
15
  export declare class MediusQueryParam {
@@ -1,4 +1,3 @@
1
- import { ClassAttributeDef } from '../../models';
2
1
  /**
3
2
  * Generated API
4
3
  * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
@@ -10,6 +9,7 @@ import { ClassAttributeDef } from '../../models';
10
9
  * https://openapi-generator.tech
11
10
  * Do not edit the class manually.
12
11
  */
12
+ import { ClassAttributeDef } from '@mediusinc/mng-commons';
13
13
  export declare class MediusQueryResult<T> implements IMediusQueryResult<T> {
14
14
  allDataCount?: number;
15
15
  pageData?: Array<T>;
@@ -0,0 +1,9 @@
1
+ import { CommonsFeature } from '@mediusinc/mng-commons';
2
+ /**
3
+ * Prepares providers for usage of the Obsolete Data API functionalities.
4
+ *
5
+ * @returns {CommonsFeature} The `CommonsFeature` object with the Data API Obsolete configuration.
6
+ *
7
+ * @deprecated.
8
+ */
9
+ export declare function withDataApiObsolete(): CommonsFeature;
@@ -0,0 +1,36 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ClassType } from '@mediusinc/mng-commons';
3
+ import { ObjectSerializer } from '@mediusinc/mng-commons/data-api/class-dto';
4
+ import { MediusQueryParam } from '../models/query-param.model';
5
+ /**
6
+ * This is an abstract class that provides base functionality for API services.
7
+ *
8
+ * @deprecated
9
+ */
10
+ export declare abstract class AMngBaseObsoleteV1ApiService {
11
+ protected readonly objectSerializer: ObjectSerializer;
12
+ protected readonly http: HttpClient;
13
+ protected constructor();
14
+ protected abstract getBasePath(): string;
15
+ protected abstract getServiceBasePath(): string | null;
16
+ protected getUrl(...pathSegments: Array<string>): string;
17
+ protected serializeQueryParam(queryParam: MediusQueryParam, type?: string): any;
18
+ protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR;
19
+ protected deserializeClass<C>(item: any, type: ClassType<C>): C;
20
+ protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C>;
21
+ protected serializeClass<C>(item: C, type: ClassType<C>): any;
22
+ protected serializeClassArray<C>(item: Array<C>, type: ClassType<C>): any;
23
+ }
24
+ /**
25
+ * Represents an abstract base class for the AMngObsoleteV1ApiService.
26
+ *
27
+ * @typeparam T The main type of data to be handled by the service.
28
+ *
29
+ * @deprecated
30
+ */
31
+ export declare abstract class AMngObsoleteV1ApiService<T> extends AMngBaseObsoleteV1ApiService {
32
+ protected type: ClassType<T>;
33
+ protected constructor(type: ClassType<T>);
34
+ protected deserialize(item: any): T;
35
+ protected serialize(item: T): any;
36
+ }
@@ -1,15 +1,30 @@
1
1
  import { HttpParams } from '@angular/common/http';
2
2
  import { Observable } from 'rxjs';
3
- import { ClassType, IdType } from '../../types';
4
- import { MediusQueryResult } from '../models';
5
- import { AMngGetAllApiService } from './get-all-api.abstract.service';
6
- export interface IMngCrudApiService<T> {
3
+ import { ClassType, IdType } from '@mediusinc/mng-commons';
4
+ import { MediusQueryResult } from '../models/query-result.model';
5
+ import { AMngGetAllObsoleteV1ApiService } from './get-all-api.abstract.service';
6
+ /**
7
+ * A service interface for CRUD operation on a resource.
8
+ *
9
+ * @typeparam T The main type of data to be handled by the service.
10
+ *
11
+ * @deprecated
12
+ */
13
+ export interface IMngCrudObsoleteV1ApiService<T> {
7
14
  createPost?(item: T, params?: HttpParams): Observable<T>;
8
15
  getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
9
16
  updatePut?(id: IdType, item: T, params?: HttpParams): Observable<T>;
10
17
  removeDelete?(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;
11
18
  }
12
- export declare abstract class AMngCrudApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllApiService<T, QRT> implements IMngCrudApiService<T> {
19
+ /**
20
+ * Abstract class for creating CRUD API service implementation.
21
+ *
22
+ * @typeparam T The type of the entity.
23
+ * @typeparam QRT The type of the query result.
24
+ *
25
+ * @deprecated
26
+ */
27
+ export declare abstract class AMngCrudObsoleteV1ApiService<T, QRT extends MediusQueryResult<any>> extends AMngGetAllObsoleteV1ApiService<T, QRT> implements IMngCrudObsoleteV1ApiService<T> {
13
28
  protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
14
29
  createPost(item: T, params?: HttpParams): Observable<T>;
15
30
  getByIdGet(id: IdType, params?: HttpParams, locale?: string): Observable<T>;
@@ -0,0 +1,30 @@
1
+ import { HttpParams } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ClassType } from '@mediusinc/mng-commons';
4
+ import { MediusQueryParam } from '../models/query-param.model';
5
+ import { MediusQueryResult } from '../models/query-result.model';
6
+ import { AMngObsoleteV1ApiService } from './api.abstract.service';
7
+ /**
8
+ * A service interface for getting paginated data results using POST method.
9
+ *
10
+ * @typeparam QRT The type of the query result in get all operation.
11
+ *
12
+ * @deprecated
13
+ */
14
+ export interface IMngGetAllObsoleteV1ApiService<QRT extends MediusQueryResult<any>> {
15
+ getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
16
+ }
17
+ /**
18
+ * An abstract class representing a service for retrieving all obsolete entities.
19
+ *
20
+ * @typeparam T The main type of data to be handled by the service.
21
+ * @typeparam QRT The type of the query result in get all operation.
22
+ *
23
+ * @deprecated
24
+ */
25
+ export declare abstract class AMngGetAllObsoleteV1ApiService<T, QRT extends MediusQueryResult<any>> extends AMngObsoleteV1ApiService<T> implements IMngGetAllObsoleteV1ApiService<QRT> {
26
+ protected queryResultType: ClassType<QRT>;
27
+ protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>);
28
+ getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;
29
+ protected getGetAllPostPath(): string;
30
+ }
@@ -0,0 +1,28 @@
1
+ import { Type } from '@angular/core';
2
+ import { ClassType, ServiceClassType, TableviewDataProviderInst } from '@mediusinc/mng-commons';
3
+ import { MediusQueryResult } from '../models/query-result.model';
4
+ import { IMngCrudObsoleteV1ApiService } from '../services/crud-api.abstract.service';
5
+ import { IMngGetAllObsoleteV1ApiService } from '../services/get-all-api.abstract.service';
6
+ /**
7
+ * A data provider for a CRUD table view that uses an obsolete version 1 API service.
8
+ *
9
+ * @typeparam Model - The type of the data model.
10
+ * @typeparam Service - The type of the API service.
11
+ * @typeparam Sorts - The type for available sort keys on get all operation.
12
+ * @typeparam Filters - The type for available sort keys on get all operation.
13
+ *
14
+ * @deprecated
15
+ */
16
+ export declare class TableviewCrudObsoleteV1DataProviderInst<Model, Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model> extends TableviewDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {
17
+ protected constructor(type: ClassType<Model>, serviceType: Type<Service>, idPropertyName?: string, useGetAllForFetch?: boolean);
18
+ }
19
+ export declare class TableviewCrudObsoleteV1DataProvider extends TableviewCrudObsoleteV1DataProviderInst<any, any> {
20
+ /**
21
+ * @deprecated
22
+ */
23
+ static create<Model, Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: keyof Model, useGetAllForFetch?: boolean): TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>;
24
+ /**
25
+ * @deprecated
26
+ */
27
+ static createUnsafe<Model, Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>, Sorts = keyof Model, Filters extends keyof any = keyof Model>(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: string, useGetAllForFetch?: boolean): TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>;
28
+ }
@@ -0,0 +1,22 @@
1
+ import { DataListParams } from '@mediusinc/mng-commons';
2
+ /**
3
+ * A class representing a mapping of query parameters.
4
+ *
5
+ * @typeparam Sorts - The type for available sort keys on get all operation.
6
+ * @typeparam Filters - The type for available sort keys on get all operation.
7
+ *
8
+ * @deprecated
9
+ */
10
+ export declare class QueryParamMap<Sorts, Filters extends keyof any> {
11
+ private readonly _params?;
12
+ private readonly _sorts;
13
+ private readonly _filters;
14
+ protected constructor(_params?: DataListParams<Sorts, Filters> | undefined);
15
+ static create(): QueryParamMap<string, string>;
16
+ static forParams<Sorts, Filters extends keyof any>(params?: DataListParams<Sorts, Filters>): QueryParamMap<Sorts, Filters>;
17
+ withSortMap(sort: Sorts, mapTo: string): this;
18
+ withFilterMap(filter: Filters, mapTo: string): this;
19
+ mapSort(sort: string): string;
20
+ mapFilter(filter: string): string;
21
+ mapParams(): DataListParams<any, any> | undefined;
22
+ }
@@ -1,4 +1,4 @@
1
- import { ClassType } from '../../types';
1
+ import { ClassType } from '@mediusinc/mng-commons';
2
2
  export declare class ObjectSerializer {
3
3
  private static _instance;
4
4
  private readonly _logCategory;
@@ -1,7 +1,6 @@
1
1
  import { HttpClient } from '@angular/common/http';
2
- import { ClassType } from '../../types';
3
- import { MediusQueryParam } from '../models';
4
- import { ObjectSerializer } from '../utils/object-serializer.util';
2
+ import { ClassType } from '@mediusinc/mng-commons';
3
+ import { ObjectSerializer } from '../serder/object-serializer';
5
4
  export declare abstract class AMngBaseApiService {
6
5
  protected readonly objectSerializer: ObjectSerializer;
7
6
  protected readonly http: HttpClient;
@@ -9,7 +8,6 @@ export declare abstract class AMngBaseApiService {
9
8
  protected abstract getBasePath(): string;
10
9
  protected abstract getServiceBasePath(): string | null;
11
10
  protected getUrl(...pathSegments: Array<string>): string;
12
- protected serializeQueryParam(queryParam: MediusQueryParam, type?: string): any;
13
11
  protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR;
14
12
  protected deserializeClass<C>(item: any, type: ClassType<C>): C;
15
13
  protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C>;
@@ -0,0 +1,25 @@
1
+ import { HttpParams } from '@angular/common/http';
2
+ import { Observable } from 'rxjs';
3
+ import { ClassType, IdType } from '@mediusinc/mng-commons';
4
+ import { QueryResult } from '../models/query-result.model';
5
+ import { AMngGetAllApiService } from './get-all-api.abstract.service';
6
+ export interface IMngCrudApiService<FetchType, RequestType> {
7
+ createPost?(item: RequestType, params?: HttpParams): Observable<FetchType>;
8
+ getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<FetchType>;
9
+ updatePut?(id: IdType, item: RequestType, params?: HttpParams): Observable<FetchType>;
10
+ removeDelete?(id: IdType, item?: FetchType, params?: HttpParams): Observable<FetchType | null>;
11
+ }
12
+ export declare abstract class AMngCrudApiService<FetchType, RequestType, QueryResultType extends QueryResult<any>> extends AMngGetAllApiService<FetchType, QueryResultType> implements IMngCrudApiService<FetchType, RequestType> {
13
+ protected requestType: ClassType<RequestType>;
14
+ protected constructor(fetchType: ClassType<FetchType>, requestType: ClassType<RequestType>, queryResultType: ClassType<QueryResultType>);
15
+ createPost(item: RequestType, params?: HttpParams): Observable<FetchType>;
16
+ getByIdGet(id: IdType, params?: HttpParams, locale?: string): Observable<FetchType>;
17
+ updatePut(id: IdType, item: RequestType, params?: HttpParams): Observable<FetchType>;
18
+ removeDelete(id: IdType, item?: FetchType, params?: HttpParams): Observable<FetchType | null>;
19
+ protected getCreatePostPath(item: RequestType): string;
20
+ protected getUpdatePutPath(id: IdType, item: RequestType): string;
21
+ protected getGetByIdGetPath(id: IdType): string;
22
+ protected getRemoveDeletePath(id: IdType, item?: FetchType): string;
23
+ protected deserializeRequest(item: any): RequestType;
24
+ protected serializeRequest(item: RequestType): any;
25
+ }