@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.
- package/assets/i18n/en.json +13 -66
- package/assets/i18n/sl.json +12 -67
- package/data-api/README.md +3 -0
- package/data-api/class-dto/README.md +3 -0
- package/data-api/class-dto/helpers/tableview-crud-create.d.ts +40 -0
- package/data-api/class-dto/index.d.ts +7 -0
- package/data-api/class-dto/models/query-result.model.d.ts +13 -0
- package/data-api/class-dto/obsolete/README.md +3 -0
- package/data-api/class-dto/obsolete/helpers/query-param-convert.d.ts +23 -0
- package/data-api/class-dto/obsolete/helpers/tableview-crud-create.d.ts +22 -0
- package/data-api/class-dto/obsolete/index.d.ts +14 -0
- package/data-api/class-dto/obsolete/models/builders/query-param.builder.d.ts +36 -0
- package/{lib/api → data-api/class-dto/obsolete}/models/filter-param.model.d.ts +1 -1
- package/{lib/api → data-api/class-dto/obsolete}/models/query-param.model.d.ts +1 -1
- package/{lib/api → data-api/class-dto/obsolete}/models/query-result.model.d.ts +1 -1
- package/data-api/class-dto/obsolete/provide.d.ts +9 -0
- package/data-api/class-dto/obsolete/services/api.abstract.service.d.ts +36 -0
- package/{lib/api → data-api/class-dto/obsolete}/services/crud-api.abstract.service.d.ts +20 -5
- package/data-api/class-dto/obsolete/services/get-all-api.abstract.service.d.ts +30 -0
- package/data-api/class-dto/obsolete/tableview/tableview-crud.data-provider.d.ts +28 -0
- package/data-api/class-dto/obsolete/utils/query-param-map.util.d.ts +22 -0
- package/{lib/api/utils/object-serializer.util.d.ts → data-api/class-dto/serder/object-serializer.d.ts} +1 -1
- package/{lib/api → data-api/class-dto}/services/api.abstract.service.d.ts +2 -4
- package/data-api/class-dto/services/crud-api.abstract.service.d.ts +25 -0
- package/data-api/class-dto/services/get-all-api.abstract.service.d.ts +14 -0
- package/data-api/class-dto/tableview/tableview-crud.data-provider.d.ts +17 -0
- package/data-api/helpers/get-all-params.d.ts +69 -0
- package/data-api/helpers/tableview-get-all-params-create.d.ts +14 -0
- package/data-api/index.d.ts +5 -0
- package/data-api/models/request-params.model.d.ts +61 -0
- package/data-api/rxjs/map-to-data-list.operator.d.ts +9 -0
- package/data-api/types/extract-get-all-params.type.d.ts +14 -0
- package/esm2022/data-api/class-dto/helpers/tableview-crud-create.mjs +40 -0
- package/esm2022/data-api/class-dto/index.mjs +13 -0
- package/esm2022/data-api/class-dto/mediusinc-mng-commons-data-api-class-dto.mjs +5 -0
- package/esm2022/data-api/class-dto/models/query-result.model.mjs +24 -0
- package/esm2022/data-api/class-dto/obsolete/helpers/query-param-convert.mjs +103 -0
- package/esm2022/data-api/class-dto/obsolete/helpers/tableview-crud-create.mjs +21 -0
- package/esm2022/data-api/class-dto/obsolete/index.mjs +21 -0
- package/esm2022/data-api/class-dto/obsolete/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs +5 -0
- package/esm2022/data-api/class-dto/obsolete/models/builders/query-param.builder.mjs +83 -0
- package/esm2022/data-api/class-dto/obsolete/models/filter-match-type.model.mjs +27 -0
- package/esm2022/data-api/class-dto/obsolete/models/filter-param.model.mjs +33 -0
- package/esm2022/data-api/class-dto/obsolete/models/query-mode.model.mjs +18 -0
- package/esm2022/data-api/class-dto/obsolete/models/query-param.model.mjs +68 -0
- package/esm2022/data-api/class-dto/obsolete/models/query-result.model.mjs +24 -0
- package/esm2022/data-api/class-dto/obsolete/provide.mjs +40 -0
- package/esm2022/data-api/class-dto/obsolete/services/api.abstract.service.mjs +70 -0
- package/esm2022/data-api/class-dto/obsolete/services/crud-api.abstract.service.mjs +83 -0
- package/esm2022/data-api/class-dto/obsolete/services/get-all-api.abstract.service.mjs +38 -0
- package/esm2022/data-api/class-dto/obsolete/tableview/tableview-crud.data-provider.mjs +51 -0
- package/esm2022/data-api/class-dto/obsolete/utils/query-param-map.util.mjs +57 -0
- package/esm2022/data-api/class-dto/serder/object-serializer.mjs +184 -0
- package/esm2022/data-api/class-dto/services/api.abstract.service.mjs +55 -0
- package/esm2022/data-api/class-dto/services/crud-api.abstract.service.mjs +82 -0
- package/esm2022/data-api/class-dto/services/get-all-api.abstract.service.mjs +49 -0
- package/esm2022/data-api/class-dto/tableview/tableview-crud.data-provider.mjs +49 -0
- package/esm2022/data-api/helpers/get-all-params.mjs +180 -0
- package/esm2022/data-api/helpers/tableview-get-all-params-create.mjs +18 -0
- package/esm2022/data-api/index.mjs +10 -0
- package/esm2022/data-api/mediusinc-mng-commons-data-api.mjs +5 -0
- package/esm2022/data-api/models/request-params.model.mjs +2 -0
- package/esm2022/data-api/rxjs/map-to-data-list.operator.mjs +19 -0
- package/esm2022/data-api/types/extract-get-all-params.type.mjs +2 -0
- package/esm2022/index.mjs +3 -6
- package/esm2022/lib/components/action/action.component.mjs +4 -5
- package/esm2022/lib/components/action/editor/injector-context/action-editor-injector-context.component.mjs +2 -2
- package/esm2022/lib/components/action/models/action-execution.model.mjs +5 -4
- package/esm2022/lib/components/action/route/action-route.component.mjs +1 -2
- package/esm2022/lib/components/action/table/action-table.component.mjs +4 -6
- package/esm2022/lib/components/form/autocomplete/autocomplete.component.mjs +29 -17
- package/esm2022/lib/components/form/dropdown/dropdown.component.mjs +3 -7
- package/esm2022/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.mjs +20 -18
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-form/formly-field-table-dialog-form.component.mjs +2 -2
- package/esm2022/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.mjs +23 -12
- package/esm2022/lib/components/table/column-filter-full/column-filter-full.component.mjs +162 -33
- package/esm2022/lib/components/table/column-value/column-value.component.mjs +3 -3
- package/esm2022/lib/components/table/models/table.event.mjs +1 -1
- package/esm2022/lib/components/table/models/table.interface.mjs +1 -1
- package/esm2022/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.mjs +4 -4
- package/esm2022/lib/components/table/table.component.mjs +117 -191
- package/esm2022/lib/components/tableview/actions/tableview-default-actions.mjs +215 -0
- package/esm2022/lib/components/tableview/builders/tableview-builder.mjs +162 -0
- package/esm2022/lib/components/tableview/helpers/tableview-create.mjs +24 -0
- package/esm2022/lib/components/tableview/index.mjs +5 -2
- package/esm2022/lib/components/tableview/models/tableview.model.mjs +2 -0
- package/esm2022/lib/components/tableview/route/tableview-route.component.mjs +7 -39
- package/esm2022/lib/components/tableview/tableview.component.mjs +4 -4
- package/esm2022/lib/data-providers/editor.data-provider.mjs +13 -13
- package/esm2022/lib/data-providers/index.mjs +1 -2
- package/esm2022/lib/data-providers/lookup.data-provider.mjs +1 -1
- package/esm2022/lib/data-providers/table.data-provider.mjs +4 -5
- package/esm2022/lib/data-providers/tableview.data-provider.mjs +1 -1
- package/esm2022/lib/descriptors/action/action-confirmation.descriptor.mjs +1 -1
- package/esm2022/lib/descriptors/action/action-editor.descriptor.mjs +10 -6
- package/esm2022/lib/descriptors/action/action.descriptor.mjs +2 -3
- package/esm2022/lib/descriptors/editor/editor.descriptor.mjs +13 -17
- package/esm2022/lib/descriptors/editor/field-lookup.descriptor.mjs +12 -17
- package/esm2022/lib/descriptors/editor/field.descriptor.mjs +5 -8
- package/esm2022/lib/descriptors/editor/internal/editor-fields.model.mjs +1 -1
- package/esm2022/lib/descriptors/filter/filter-lookup.descriptor.mjs +28 -52
- package/esm2022/lib/descriptors/filter/filter.descriptor.mjs +40 -23
- package/esm2022/lib/descriptors/model/enum.descriptor.mjs +31 -0
- package/esm2022/lib/descriptors/model/index.mjs +3 -1
- package/esm2022/lib/descriptors/model/model.descriptor.mjs +10 -1
- package/esm2022/lib/descriptors/model/type.descriptor.mjs +11 -0
- package/esm2022/lib/descriptors/table/column.descriptor.mjs +12 -107
- package/esm2022/lib/descriptors/table/index.mjs +2 -1
- package/esm2022/lib/descriptors/table/internal/table-columns.model.mjs +1 -1
- package/esm2022/lib/descriptors/table/internal/table.model.mjs +1 -1
- package/esm2022/lib/descriptors/table/sort.descriptor.mjs +45 -0
- package/esm2022/lib/descriptors/table/table.descriptor.mjs +208 -57
- package/esm2022/lib/descriptors/tableview/internal/tableview.model.mjs +1 -1
- package/esm2022/lib/descriptors/tableview/tableview.descriptor.mjs +114 -17
- package/esm2022/lib/descriptors/types/filter.type.mjs +1 -19
- package/esm2022/lib/descriptors/types/table.type.mjs +1 -5
- package/esm2022/lib/error/error.handler.mjs +1 -1
- package/esm2022/lib/helpers/data-provider-executors.mjs +80 -0
- package/esm2022/lib/models/data-list.model.mjs +2 -0
- package/esm2022/lib/models/filter-match.model.mjs +105 -0
- package/esm2022/lib/models/index.mjs +3 -1
- package/esm2022/lib/models/view-container.model.mjs +1 -1
- package/esm2022/lib/pipes/enum.pipe.mjs +6 -6
- package/esm2022/lib/provide.mjs +101 -0
- package/esm2022/lib/registry/type.registry.mjs +3 -10
- package/esm2022/lib/router/models/router.model.mjs +1 -1
- package/esm2022/lib/router/tableview-route-builder.mjs +1 -1
- package/esm2022/lib/services/action/action-executor.service.mjs +54 -32
- package/esm2022/lib/services/commons.service.mjs +1 -37
- package/esm2022/lib/services/data-provider-executor.service.mjs +52 -0
- package/esm2022/lib/services/index.mjs +2 -1
- package/esm2022/lib/services/view/view-container.service.mjs +1 -1
- package/esm2022/lib/types/action-descriptor.types.mjs +1 -1
- package/esm2022/lib/types/type.model.mjs +1 -1
- package/esm2022/lib/utils/data-list-params.util.mjs +416 -0
- package/esm2022/lib/utils/date.util.mjs +8 -2
- package/esm2022/lib/utils/enum.util.mjs +2 -1
- package/esm2022/lib/utils/error.util.mjs +3 -3
- package/esm2022/lib/utils/export.util.mjs +1 -1
- package/esm2022/lib/utils/index.mjs +2 -2
- package/esm2022/lib/utils/route.util.mjs +1 -2
- package/fesm2022/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs +698 -0
- package/fesm2022/mediusinc-mng-commons-data-api-class-dto-obsolete.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-data-api-class-dto.mjs +480 -0
- package/fesm2022/mediusinc-mng-commons-data-api-class-dto.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons-data-api.mjs +224 -0
- package/fesm2022/mediusinc-mng-commons-data-api.mjs.map +1 -0
- package/fesm2022/mediusinc-mng-commons.mjs +2634 -2549
- package/fesm2022/mediusinc-mng-commons.mjs.map +1 -1
- package/index.d.ts +2 -4
- package/lib/components/action/action.component.d.ts +13 -13
- package/lib/components/action/models/action-execution.model.d.ts +47 -46
- package/lib/components/action/table/action-table.component.d.ts +15 -16
- package/lib/components/form/autocomplete/autocomplete.component.d.ts +1 -1
- package/lib/components/form/formly/fields/formly-field-lookup-dialog/formly-field-lookup-dialog.component.d.ts +3 -5
- package/lib/components/form/formly/fields/formly-field-table-dialog-multiselect/formly-field-table-dialog-multiselect.component.d.ts +10 -10
- package/lib/components/table/column-filter-full/column-filter-full.component.d.ts +25 -9
- package/lib/components/table/models/table.event.d.ts +2 -2
- package/lib/components/table/models/table.interface.d.ts +4 -1
- package/lib/components/table/table-column-filter-class/table-column-filter-class.pipe.d.ts +2 -2
- package/lib/components/table/table.component.d.ts +19 -18
- package/lib/components/tableview/actions/tableview-default-actions.d.ts +36 -0
- package/lib/components/tableview/builders/tableview-builder.d.ts +115 -0
- package/lib/components/tableview/helpers/tableview-create.d.ts +16 -0
- package/lib/components/tableview/index.d.ts +4 -1
- package/lib/components/tableview/models/tableview.model.d.ts +8 -0
- package/lib/components/tableview/route/tableview-route.component.d.ts +5 -14
- package/lib/components/tableview/tableview.component.d.ts +12 -12
- package/lib/data-providers/editor.data-provider.d.ts +12 -12
- package/lib/data-providers/index.d.ts +0 -1
- package/lib/data-providers/lookup.data-provider.d.ts +2 -2
- package/lib/data-providers/table.data-provider.d.ts +25 -25
- package/lib/data-providers/tableview.data-provider.d.ts +18 -18
- package/lib/descriptors/action/action-confirmation.descriptor.d.ts +1 -1
- package/lib/descriptors/action/action-editor.descriptor.d.ts +20 -17
- package/lib/descriptors/editor/editor.descriptor.d.ts +8 -12
- package/lib/descriptors/editor/field-base.descriptor.d.ts +3 -3
- package/lib/descriptors/editor/field-lookup.descriptor.d.ts +11 -11
- package/lib/descriptors/editor/field-many.descriptor.d.ts +4 -4
- package/lib/descriptors/editor/field.descriptor.d.ts +2 -2
- package/lib/descriptors/editor/internal/editor-fields.model.d.ts +6 -5
- package/lib/descriptors/filter/filter-lookup.descriptor.d.ts +15 -14
- package/lib/descriptors/filter/filter.descriptor.d.ts +17 -18
- package/lib/descriptors/model/enum.descriptor.d.ts +14 -0
- package/lib/descriptors/model/index.d.ts +2 -0
- package/lib/descriptors/model/model.descriptor.d.ts +9 -0
- package/lib/descriptors/model/type.descriptor.d.ts +5 -0
- package/lib/descriptors/table/column.descriptor.d.ts +10 -24
- package/lib/descriptors/table/index.d.ts +1 -0
- package/lib/descriptors/table/internal/table-columns.model.d.ts +36 -5
- package/lib/descriptors/table/internal/table.model.d.ts +5 -2
- package/lib/descriptors/table/sort.descriptor.d.ts +17 -0
- package/lib/descriptors/table/table.descriptor.d.ts +57 -33
- package/lib/descriptors/tableview/internal/tableview.model.d.ts +3 -3
- package/lib/descriptors/tableview/tableview.descriptor.d.ts +49 -19
- package/lib/descriptors/types/filter.type.d.ts +0 -17
- package/lib/descriptors/types/table.type.d.ts +0 -3
- package/lib/error/error.handler.d.ts +1 -1
- package/lib/helpers/data-provider-executors.d.ts +19 -0
- package/lib/models/data-list.model.d.ts +27 -0
- package/lib/models/filter-match.model.d.ts +36 -0
- package/lib/models/index.d.ts +2 -0
- package/lib/models/view-container.model.d.ts +2 -2
- package/lib/pipes/enum.pipe.d.ts +2 -2
- package/lib/provide.d.ts +10 -0
- package/lib/router/models/router.model.d.ts +1 -1
- package/lib/router/tableview-route-builder.d.ts +1 -2
- package/lib/services/action/action-executor.service.d.ts +18 -16
- package/lib/services/data-provider-executor.service.d.ts +60 -0
- package/lib/services/index.d.ts +1 -0
- package/lib/services/view/view-container.service.d.ts +11 -11
- package/lib/types/action-descriptor.types.d.ts +2 -2
- package/lib/types/type.model.d.ts +1 -3
- package/lib/utils/data-list-params.util.d.ts +84 -0
- package/lib/utils/date.util.d.ts +3 -1
- package/lib/utils/enum.util.d.ts +4 -3
- package/lib/utils/export.util.d.ts +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/openapi/angular/modelEnum.mustache +0 -3
- package/package.json +20 -2
- package/esm2022/lib/api/models/builders/query-param.builder.mjs +0 -59
- package/esm2022/lib/api/models/filter-match-type.model.mjs +0 -27
- package/esm2022/lib/api/models/filter-param.model.mjs +0 -33
- package/esm2022/lib/api/models/index.mjs +0 -7
- package/esm2022/lib/api/models/query-mode.model.mjs +0 -18
- package/esm2022/lib/api/models/query-param.model.mjs +0 -68
- package/esm2022/lib/api/models/query-result.model.mjs +0 -35
- package/esm2022/lib/api/services/api.abstract.service.mjs +0 -58
- package/esm2022/lib/api/services/crud-api.abstract.service.mjs +0 -75
- package/esm2022/lib/api/services/get-all-api.abstract.service.mjs +0 -30
- package/esm2022/lib/api/services/index.mjs +0 -4
- package/esm2022/lib/api/utils/index.mjs +0 -3
- package/esm2022/lib/api/utils/medius-rest.util.mjs +0 -293
- package/esm2022/lib/api/utils/object-serializer.util.mjs +0 -185
- package/esm2022/lib/components/tableview/route/tableview-route.abstract.component.mjs +0 -158
- package/esm2022/lib/data-providers/tableview-crud.data-provider.mjs +0 -32
- package/esm2022/lib/provide-commons.mjs +0 -88
- package/esm2022/lib/utils/action-data-provider.util.mjs +0 -171
- package/lib/api/models/builders/query-param.builder.d.ts +0 -13
- package/lib/api/models/index.d.ts +0 -6
- package/lib/api/services/get-all-api.abstract.service.d.ts +0 -14
- package/lib/api/services/index.d.ts +0 -3
- package/lib/api/utils/index.d.ts +0 -2
- package/lib/api/utils/medius-rest.util.d.ts +0 -32
- package/lib/components/tableview/route/tableview-route.abstract.component.d.ts +0 -35
- package/lib/data-providers/tableview-crud.data-provider.d.ts +0 -12
- package/lib/provide-commons.d.ts +0 -3
- package/lib/utils/action-data-provider.util.d.ts +0 -35
- package/templates/tableview-route.component.html +0 -5
- /package/{lib/api → data-api/class-dto/obsolete}/models/filter-match-type.model.d.ts +0 -0
- /package/{lib/api → data-api/class-dto/obsolete}/models/query-mode.model.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mediusinc-mng-commons-data-api-class-dto-obsolete.mjs","sources":["../../data-api/class-dto/obsolete/src/models/filter-match-type.model.ts","../../data-api/class-dto/obsolete/src/models/filter-param.model.ts","../../data-api/class-dto/obsolete/src/models/query-mode.model.ts","../../data-api/class-dto/obsolete/src/models/query-param.model.ts","../../data-api/class-dto/obsolete/src/models/builders/query-param.builder.ts","../../data-api/class-dto/obsolete/src/helpers/query-param-convert.ts","../../data-api/class-dto/obsolete/src/tableview/tableview-crud.data-provider.ts","../../data-api/class-dto/obsolete/src/helpers/tableview-crud-create.ts","../../data-api/class-dto/obsolete/src/models/query-result.model.ts","../../data-api/class-dto/obsolete/src/services/api.abstract.service.ts","../../data-api/class-dto/obsolete/src/services/get-all-api.abstract.service.ts","../../data-api/class-dto/obsolete/src/services/crud-api.abstract.service.ts","../../data-api/class-dto/obsolete/src/utils/query-param-map.util.ts","../../data-api/class-dto/obsolete/src/provide.ts","../../data-api/class-dto/obsolete/src/index.ts","../../data-api/class-dto/obsolete/src/mediusinc-mng-commons-data-api-class-dto-obsolete.ts"],"sourcesContent":["/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusFilterMatchType {\n Equals = 'EQUALS',\n NotEquals = 'NOT_EQUALS',\n FromTo = 'FROM_TO',\n Contains = 'CONTAINS',\n StartsWith = 'STARTS_WITH',\n EndsWith = 'ENDS_WITH',\n In = 'IN',\n NotIn = 'NOT_IN',\n SmallerThan = 'SMALLER_THAN',\n GreaterThan = 'GREATER_THAN',\n Exists = 'EXISTS',\n DoesNotExist = 'DOES_NOT_EXIST'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {ClassAttributeDef} from '@mediusinc/mng-commons';\n\nimport {MediusFilterMatchType} from './filter-match-type.model';\n\nexport class MediusFilterParam {\n property?: string;\n filterValue?: any;\n filterValueTo?: any;\n filterMatchType?: MediusFilterMatchType;\n filterMatchCaseSensitive?: boolean;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<ClassAttributeDef> = [\n {\n name: 'property',\n baseName: 'property',\n type: 'string'\n },\n {\n name: 'filterValue',\n baseName: 'filter_value',\n type: 'object'\n },\n {\n name: 'filterValueTo',\n baseName: 'filter_value_to',\n type: 'object'\n },\n {\n name: 'filterMatchType',\n baseName: 'filter_match_type',\n type: 'FilterMatchType'\n },\n {\n name: 'filterMatchCaseSensitive',\n baseName: 'filter_match_case_sensitive',\n type: 'boolean'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusFilterParam.attributeTypeMap;\n }\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport enum MediusQueryMode {\n Count = 'COUNT',\n Data = 'DATA',\n All = 'ALL'\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {ClassAttributeDef} from '@mediusinc/mng-commons';\n\nimport {MediusFilterParam} from './filter-param.model';\nimport {MediusQueryMode} from './query-mode.model';\n\nexport class MediusQueryParam {\n sortProperty?: Array<string>;\n sortAsc?: Array<boolean>;\n itemsOffset?: number;\n itemsPerPage?: number;\n filterParams?: Array<MediusFilterParam>;\n filterAllParam?: string;\n filterAllProperties?: Array<string>;\n validateProperties?: Array<string>;\n selectInTwoSteps?: boolean;\n sortEnumByOrdinal?: boolean;\n groupByProperties?: Array<string>;\n queryMode?: MediusQueryMode;\n\n public static discriminator?: string;\n\n public static attributeTypeMap: Array<ClassAttributeDef> = [\n {\n name: 'sortProperty',\n baseName: 'sort_property',\n type: 'Array<string>'\n },\n {\n name: 'sortAsc',\n baseName: 'sort_asc',\n type: 'Array<boolean>'\n },\n {\n name: 'itemsOffset',\n baseName: 'items_offset',\n type: 'number'\n },\n {\n name: 'itemsPerPage',\n baseName: 'items_per_page',\n type: 'number'\n },\n {\n name: 'filterParams',\n baseName: 'filter_params',\n type: 'Array<FilterParam>'\n },\n {\n name: 'filterAllParam',\n baseName: 'filter_all_param',\n type: 'string'\n },\n {\n name: 'filterAllProperties',\n baseName: 'filter_all_properties',\n type: 'Array<string>'\n },\n {\n name: 'validateProperties',\n baseName: 'validate_properties',\n type: 'Array<string>'\n },\n {\n name: 'selectInTwoSteps',\n baseName: 'select_in_two_steps',\n type: 'boolean'\n },\n {\n name: 'sortEnumByOrdinal',\n baseName: 'sort_enum_by_ordinal',\n type: 'boolean'\n },\n {\n name: 'groupByProperties',\n baseName: 'group_by_properties',\n type: 'Array<string>'\n },\n {\n name: 'queryMode',\n baseName: 'query_mode',\n type: 'QueryMode'\n }\n ];\n\n public static getAttributeTypeMap() {\n return MediusQueryParam.attributeTypeMap;\n }\n}\n","import {MediusFilterMatchType} from '../filter-match-type.model';\nimport {MediusFilterParam} from '../filter-param.model';\nimport {MediusQueryMode} from '../query-mode.model';\nimport {MediusQueryParam} from '../query-param.model';\n\nexport class MediusQueryParamBuilder {\n private constructor(private queryParam: MediusQueryParam) {}\n\n /**\n * Creates a new instance of `MediusQueryParamBuilder` with the specified `itemsPerPage` and `itemsOffset` values.\n *\n * @param {number} [itemsPerPage=50] - The number of items per page.\n * @param {number} [itemsOffset=0] - The offset value for the items.\n *\n * @returns {MediusQueryParamBuilder} A new instance of `MediusQueryParamBuilder`.\n *\n * @deprecated\n */\n public static create(itemsPerPage = 50, itemsOffset = 0): MediusQueryParamBuilder {\n const queryParam = new MediusQueryParam();\n queryParam.itemsPerPage = itemsPerPage;\n queryParam.itemsOffset = itemsOffset;\n queryParam.queryMode = MediusQueryMode.All;\n return new MediusQueryParamBuilder(queryParam);\n }\n\n /**\n * Creates a new instance of MediusQueryParamBuilder based on an existing MediusQueryParam object.\n *\n * @param {MediusQueryParam} queryParam - The existing MediusQueryParam object to create from.\n * @param {number} [itemsPerPage] - The number of items per page for the new instance. If not provided, default value is used.\n * @param {number} [itemsOffset] - The offset for the new instance. If not provided, default value is used.\n *\n * @returns {MediusQueryParamBuilder} - A new instance of MediusQueryParamBuilder.\n *\n * @deprecated\n */\n public static createFromExisting(queryParam: MediusQueryParam, itemsPerPage?: number, itemsOffset?: number): MediusQueryParamBuilder {\n queryParam.itemsPerPage = itemsPerPage ?? queryParam.itemsPerPage ?? 50;\n queryParam.itemsOffset = itemsOffset ?? queryParam.itemsOffset ?? 0;\n queryParam.queryMode = queryParam.queryMode ?? MediusQueryMode.All;\n return new MediusQueryParamBuilder(queryParam);\n }\n\n public withItemsPerPage(itemsPerPage: number): MediusQueryParamBuilder {\n this.queryParam.itemsPerPage = itemsPerPage;\n return this;\n }\n\n public withItemsOffset(itemsOffset: number): MediusQueryParamBuilder {\n this.queryParam.itemsOffset = itemsOffset;\n return this;\n }\n\n public withQueryMode(queryMode: MediusQueryMode): MediusQueryParamBuilder {\n this.queryParam.queryMode = queryMode;\n return this;\n }\n\n public withSort(property: string, asc = true): MediusQueryParamBuilder {\n if (!this.queryParam.sortProperty || !this.queryParam.sortAsc) {\n this.queryParam.sortProperty = [];\n this.queryParam.sortAsc = [];\n }\n this.queryParam.sortProperty.push(property);\n this.queryParam.sortAsc.push(asc);\n return this;\n }\n\n public withFilter(\n property: string,\n value: any,\n valueTo: any = undefined,\n matchType: MediusFilterMatchType = MediusFilterMatchType.Contains,\n matchCaseSensitive = false\n ): MediusQueryParamBuilder {\n if (!this.queryParam.filterParams) {\n this.queryParam.filterParams = [];\n }\n const filterParam = new MediusFilterParam();\n filterParam.property = property;\n filterParam.filterValue = value;\n filterParam.filterValueTo = valueTo;\n filterParam.filterMatchType = matchType;\n filterParam.filterMatchCaseSensitive = matchCaseSensitive;\n this.queryParam.filterParams.push(filterParam);\n return this;\n }\n\n public build(): MediusQueryParam {\n const queryParam = this.queryParam;\n this.queryParam = new MediusQueryParam();\n return queryParam;\n }\n}\n","import {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {DataListFilter, DataListFilterValueType, DataListParams, DataListResult, FilterMatchMode, MngInternalError} from '@mediusinc/mng-commons';\n\nimport {MediusQueryParamBuilder} from '../models/builders/query-param.builder';\nimport {MediusFilterMatchType} from '../models/filter-match-type.model';\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {QueryParamMap} from '../utils/query-param-map.util';\n\nexport function toObsoleteV1QueryParam(): undefined;\nexport function toObsoleteV1QueryParam<Sorts = string, Filters extends keyof any = string>(\n params: DataListParams<Sorts, Filters>,\n map?: QueryParamMap<Sorts, Filters>\n): MediusQueryParam;\nexport function toObsoleteV1QueryParam<Sorts = string, Filters extends keyof any = string>(\n params: DataListParams<Sorts, Filters> | undefined,\n map?: QueryParamMap<Sorts, Filters>\n): MediusQueryParam | undefined;\n/**\n * Converts the given DataListParams object to an ObsoleteV1QueryParam object.\n *\n * @param {DataListParams} params - The object to convert.\n * @param {QueryParamMap} map - The configuration object used to map sort and filter properties.\n *\n * @returns The converted ObsoleteV1QueryParam object if params is not null or undefined, otherwise returns undefined.\n *\n * @deprecated\n */\nexport function toObsoleteV1QueryParam<Sorts = string, Filters extends keyof any = string>(\n params?: DataListParams<Sorts, Filters>,\n map?: QueryParamMap<Sorts, Filters>\n): MediusQueryParam | undefined {\n if (!params) return undefined;\n\n const builder = MediusQueryParamBuilder.create();\n\n if (params.offset !== undefined) {\n builder.withItemsOffset(params.offset);\n }\n if (params.limit !== undefined) {\n builder.withItemsPerPage(params.limit);\n }\n if (Array.isArray(params.sort)) {\n params.sort.forEach(s => builder.withSort(map?.mapSort(s.property as string) ?? (s.property as string), s.ascending));\n }\n if (typeof params.filters === 'object') {\n Object.entries(params.filters).forEach(([key, value]) => {\n const filter = value as DataListFilter;\n if (filter.value != null) {\n const matchMode = filter.matchMode ? toObsoleteV1FilterMatchType(filter.matchMode) : MediusFilterMatchType.Equals;\n let value: DataListFilterValueType = undefined;\n let valueTo: DataListFilterValueType = undefined;\n if (matchMode === MediusFilterMatchType.FromTo) {\n if (Array.isArray(filter.value)) {\n if (filter.value.length > 0) value = filter.value[0];\n if (filter.value.length > 1) valueTo = filter.value[1];\n }\n } else {\n value = filter.value;\n }\n\n builder.withFilter(map?.mapFilter(key) ?? key, value, valueTo, matchMode, filter.caseSensitive);\n }\n });\n }\n\n return builder.build();\n}\n\nexport function toObsoleteV1FilterMatchType(match: string): MediusFilterMatchType {\n switch (match) {\n case FilterMatchMode.Equals:\n return MediusFilterMatchType.Equals;\n case FilterMatchMode.NotEquals:\n return MediusFilterMatchType.NotEquals;\n case FilterMatchMode.Contains:\n return MediusFilterMatchType.Contains;\n case FilterMatchMode.In:\n return MediusFilterMatchType.In;\n case FilterMatchMode.NotIn:\n return MediusFilterMatchType.NotIn;\n case FilterMatchMode.StartsWith:\n return MediusFilterMatchType.StartsWith;\n case FilterMatchMode.EndsWith:\n return MediusFilterMatchType.EndsWith;\n case FilterMatchMode.LessThan:\n return MediusFilterMatchType.SmallerThan;\n case FilterMatchMode.GreaterThan:\n return MediusFilterMatchType.GreaterThan;\n case FilterMatchMode.Between:\n return MediusFilterMatchType.FromTo;\n case FilterMatchMode.Exists:\n return MediusFilterMatchType.Exists;\n case FilterMatchMode.DoesNotExist:\n return MediusFilterMatchType.DoesNotExist;\n case FilterMatchMode.NotContains:\n case FilterMatchMode.LessThanOrEqualTo:\n case FilterMatchMode.GreaterThanOrEqualTo:\n default:\n throw new MngInternalError(`Filter match type '${match}' not supported.`);\n }\n}\n\n/**\n * Convert a query result from an obsolete API version 1 to a `DataListResult`\n *\n * @param {DataListParams} params - The data list parameters for the query\n * @param {Service} service - The service object used to make the API call\n * @param {function} apiOperation - The API operation function that returns an `Observable<MediusQueryResult<Item>>`\n * @param {any} additionalParams - Additional parameters to pass to the API operation function (optional)\n *\n * @returns {Observable<DataListResult<Item>>} - An observable that emits a `DataListResult` object\n *\n * @deprecated\n */\nexport function toObsoleteV1QueryResult<Item, Service>(\n params: DataListParams,\n service: Service,\n apiOperation: (qp: MediusQueryParam, ...additionalParams: any) => Observable<MediusQueryResult<Item>>,\n additionalParams?: any\n): Observable<DataListResult<Item>> {\n const queryParam = toObsoleteV1QueryParam(params);\n return apiOperation\n .bind(service)(queryParam, ...(additionalParams ?? []))\n .pipe(map(res => ({data: res.pageData ?? [], totalCount: res.allDataCount})));\n}\n","import {Type} from '@angular/core';\n\nimport {map} from 'rxjs/operators';\n\nimport {ClassType, ModelUtil, ServiceClassType, TableviewDataProviderInst} from '@mediusinc/mng-commons';\n\nimport {toObsoleteV1QueryParam} from '../helpers/query-param-convert';\nimport {MediusQueryParamBuilder} from '../models/builders/query-param.builder';\nimport {MediusFilterMatchType} from '../models/filter-match-type.model';\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {IMngCrudObsoleteV1ApiService} from '../services/crud-api.abstract.service';\nimport {IMngGetAllObsoleteV1ApiService} from '../services/get-all-api.abstract.service';\n\n/**\n * A data provider for a CRUD table view that uses an obsolete version 1 API service.\n *\n * @typeparam Model - The type of the data model.\n * @typeparam Service - The type of the API service.\n * @typeparam Sorts - The type for available sort keys on get all operation.\n * @typeparam Filters - The type for available sort keys on get all operation.\n *\n * @deprecated\n */\nexport class TableviewCrudObsoleteV1DataProviderInst<\n Model,\n Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n> extends TableviewDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {\n protected constructor(type: ClassType<Model>, serviceType: Type<Service>, idPropertyName?: string, useGetAllForFetch = false) {\n super(type, serviceType);\n this.withGetAll((params, service, locale) =>\n service\n .getAllPost(toObsoleteV1QueryParam(params), undefined, locale)\n .pipe(map(res => ({data: res.pageData ?? [], totalCount: res.allDataCount ?? res.pageData?.length ?? 0})))\n );\n\n if (useGetAllForFetch) {\n const selectedIdPropertyName = idPropertyName ?? ModelUtil.findIdAttribute(type) ?? 'id';\n this.withFetch((id, service) => {\n const qp: MediusQueryParam = MediusQueryParamBuilder.create(10, 0).withFilter(selectedIdPropertyName, id, id, MediusFilterMatchType.Equals, true).build();\n return service!.getAllPost(qp).pipe(map(res => res.pageData![0]));\n });\n } else {\n this.withFetch((id, service, locale) => service!.getByIdGet!(id, undefined, locale));\n }\n this.withCreate((item, service) => service!.createPost!(item!));\n this.withUpdate((id, item, service) => service!.updatePut!(id, item!));\n this.withDelete((id, item, service) => service!.removeDelete!(id, item));\n }\n}\n\nexport class TableviewCrudObsoleteV1DataProvider extends TableviewCrudObsoleteV1DataProviderInst<any, any> {\n /**\n * @deprecated\n */\n public static create<\n Model,\n Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(\n type: ClassType<Model>,\n serviceType: Type<Service>,\n idProperty?: keyof Model,\n useGetAllForFetch = false\n ): TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters> {\n return TableviewCrudObsoleteV1DataProvider.createUnsafe<Model, Service, Sorts, Filters>(type, serviceType, idProperty as string, useGetAllForFetch);\n }\n\n /**\n * @deprecated\n */\n public static createUnsafe<\n Model,\n Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: string, useGetAllForFetch = false): TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters> {\n return new TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>(type, serviceType, idProperty, useGetAllForFetch);\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ClassType, ServiceClassType, TableviewBuilder, TableviewDescriptor, TableviewDescriptorInst} from '@mediusinc/mng-commons';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {IMngCrudObsoleteV1ApiService} from '../services/crud-api.abstract.service';\nimport {IMngGetAllObsoleteV1ApiService} from '../services/get-all-api.abstract.service';\nimport {TableviewCrudObsoleteV1DataProvider, TableviewCrudObsoleteV1DataProviderInst} from '../tableview/tableview-crud.data-provider';\n\n/**\n * Creates a tableview with the given class, service based on data API v1 (obsolete) and optional class/model configuration.\n *\n * @param {ClassType<Model>} type - The class representing the model.\n * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudObsoleteV1ApiService` and `IMngGetAllObsoleteV1ApiService`.\n * @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.\n * @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.\n *\n * @returns {Tableview} - The built table view.\n *\n * @deprecated\n */\nexport function tableviewCrudObsoleteV1<\n Model,\n Service extends IMngCrudObsoleteV1ApiService<Model> & IMngGetAllObsoleteV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n>(\n type: ClassType<Model>,\n service: ServiceClassType<Service>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: ClassType<any> | string;\n },\n buildFn?: (\n builder: TableviewBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n const builder = new TableviewBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudObsoleteV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(\n TableviewDescriptor.fromClass(type, modelConfig?.idProperty, modelConfig?.titleProperty, modelConfig?.i18nBaseKey),\n TableviewCrudObsoleteV1DataProvider.create(type, service, modelConfig?.idProperty),\n inject(Injector)\n );\n buildFn?.(builder);\n return builder.build();\n}\n","/**\n * Generated API\n * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)\n *\n * The version of the OpenAPI document: 1.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\nimport {ClassAttributeDef} from '@mediusinc/mng-commons';\n\nexport class MediusQueryResult<T> implements IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n\n static discriminator?: string;\n\n static fromArray<T>(pageData: T[], allDataCount?: number) {\n const mqr = new MediusQueryResult<T>();\n mqr.allDataCount = allDataCount ?? pageData.length;\n mqr.pageData = pageData;\n return mqr;\n }\n\n static attributeTypeMap: Array<ClassAttributeDef> = [\n {\n name: 'allDataCount',\n baseName: 'all_data_count',\n type: 'number'\n },\n {\n name: 'pageData',\n baseName: 'page_data',\n type: 'Array<T>'\n }\n ];\n\n static getAttributeTypeMap() {\n return MediusQueryResult.attributeTypeMap;\n }\n}\n\nexport interface IMediusQueryResult<T> {\n allDataCount?: number;\n pageData?: Array<T>;\n}\n","import {HttpClient} from '@angular/common/http';\nimport {inject} from '@angular/core';\n\nimport {ClassType} from '@mediusinc/mng-commons';\nimport {ObjectSerializer} from '@mediusinc/mng-commons/data-api/class-dto';\n\nimport {MediusQueryParam} from '../models/query-param.model';\n\n/**\n * This is an abstract class that provides base functionality for API services.\n *\n * @deprecated\n */\nexport abstract class AMngBaseObsoleteV1ApiService {\n protected readonly objectSerializer: ObjectSerializer = ObjectSerializer.get();\n protected readonly http: HttpClient;\n\n protected constructor() {\n this.http = inject(HttpClient);\n }\n\n protected abstract getBasePath(): string;\n\n protected abstract getServiceBasePath(): string | null;\n\n protected getUrl(...pathSegments: Array<string>): string {\n let baseUrl = this.getBasePath();\n if (baseUrl.endsWith('/')) {\n baseUrl = baseUrl.substring(0, baseUrl.length - 1);\n }\n const serviceBasePath = this.getServiceBasePath();\n let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');\n // omit first and last '/'\n if (path.startsWith('/')) {\n path = path.substring(1);\n }\n if (path.endsWith('/')) {\n path = path.substring(0, path.length - 1);\n }\n // replace any double '//' from path that could come from joining paths\n path = path.replace('//', '/');\n return `${baseUrl}/${path}`;\n }\n\n protected serializeQueryParam(queryParam: MediusQueryParam, type = 'QueryParam') {\n return this.objectSerializer.serialize(queryParam, type);\n }\n\n protected deserializeQueryResult<QR>(item: any, qrType: ClassType<QR>): QR {\n return this.deserializeClass(item, qrType);\n }\n\n protected deserializeClass<C>(item: any, type: ClassType<C>): C {\n return this.objectSerializer.deserializeClass(item, type);\n }\n\n protected deserializeClassArray<C>(item: any, type: ClassType<C>): Array<C> {\n return this.objectSerializer.deserializeClassArray(item, type);\n }\n\n protected serializeClass<C>(item: C, type: ClassType<C>): any {\n return this.objectSerializer.serializeClass(item, type);\n }\n\n protected serializeClassArray<C>(item: Array<C>, type: ClassType<C>): any {\n return this.objectSerializer.serializeClassArray(item, type);\n }\n}\n\n/**\n * Represents an abstract base class for the AMngObsoleteV1ApiService.\n *\n * @typeparam T The main type of data to be handled by the service.\n *\n * @deprecated\n */\nexport abstract class AMngObsoleteV1ApiService<T> extends AMngBaseObsoleteV1ApiService {\n protected constructor(protected type: ClassType<T>) {\n super();\n }\n\n protected deserialize(item: any): T {\n return this.deserializeClass(item, this.type);\n }\n\n protected serialize(item: T): any {\n return this.serializeClass(item, this.type);\n }\n}\n","import {HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType} from '@mediusinc/mng-commons';\n\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {AMngObsoleteV1ApiService} from './api.abstract.service';\n\n/**\n * A service interface for getting paginated data results using POST method.\n *\n * @typeparam QRT The type of the query result in get all operation.\n *\n * @deprecated\n */\nexport interface IMngGetAllObsoleteV1ApiService<QRT extends MediusQueryResult<any>> {\n getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT>;\n}\n\n/**\n * An abstract class representing a service for retrieving all obsolete entities.\n *\n * @typeparam T The main type of data to be handled by the service.\n * @typeparam QRT The type of the query result in get all operation.\n *\n * @deprecated\n */\nexport abstract class AMngGetAllObsoleteV1ApiService<T, QRT extends MediusQueryResult<any>> extends AMngObsoleteV1ApiService<T> implements IMngGetAllObsoleteV1ApiService<QRT> {\n protected constructor(\n type: ClassType<T>,\n protected queryResultType: ClassType<QRT>\n ) {\n super(type);\n }\n\n public getAllPost(queryParamBody?: MediusQueryParam, params?: HttpParams, locale?: string): Observable<QRT> {\n const url = this.getUrl(this.getGetAllPostPath());\n if (params && locale) {\n params = params.set('lang', locale);\n } else if (locale) {\n params = new HttpParams().set('lang', locale);\n }\n return this.http\n .post<any>(url, queryParamBody ? this.serializeQueryParam(queryParamBody) : undefined, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserializeQueryResult(res, this.queryResultType)));\n }\n\n protected getGetAllPostPath(): string {\n return '/get-all';\n }\n}\n","import {HttpParams} from '@angular/common/http';\n\nimport {Observable} from 'rxjs';\nimport {map} from 'rxjs/operators';\n\nimport {ClassType, IdType} from '@mediusinc/mng-commons';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {AMngGetAllObsoleteV1ApiService} from './get-all-api.abstract.service';\n\n/**\n * A service interface for CRUD operation on a resource.\n *\n * @typeparam T The main type of data to be handled by the service.\n *\n * @deprecated\n */\nexport interface IMngCrudObsoleteV1ApiService<T> {\n createPost?(item: T, params?: HttpParams): Observable<T>;\n\n getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<T>;\n\n updatePut?(id: IdType, item: T, params?: HttpParams): Observable<T>;\n\n removeDelete?(id: IdType, item?: T, params?: HttpParams): Observable<T | null>;\n}\n\n/**\n * Abstract class for creating CRUD API service implementation.\n *\n * @typeparam T The type of the entity.\n * @typeparam QRT The type of the query result.\n *\n * @deprecated\n */\nexport abstract class AMngCrudObsoleteV1ApiService<T, QRT extends MediusQueryResult<any>>\n extends AMngGetAllObsoleteV1ApiService<T, QRT>\n implements IMngCrudObsoleteV1ApiService<T>\n{\n protected constructor(type: ClassType<T>, queryResultType: ClassType<QRT>) {\n super(type, queryResultType);\n }\n\n public createPost(item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getCreatePostPath(item));\n return this.http\n .post<unknown>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public getByIdGet(id: IdType, params?: HttpParams, locale?: string): Observable<T> {\n const url = this.getUrl(this.getGetByIdGetPath(id));\n if (params && locale) {\n params = params.set('lang', locale);\n } else if (locale) {\n params = new HttpParams().set('lang', locale);\n }\n return this.http\n .get<unknown>(url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public updatePut(id: IdType, item: T, params?: HttpParams): Observable<T> {\n const url = this.getUrl(this.getUpdatePutPath(id, item));\n return this.http\n .put<unknown>(url, this.serialize(item), {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n params: params\n })\n .pipe(map(res => this.deserialize(res)));\n }\n\n public removeDelete(id: IdType, item?: T, params?: HttpParams): Observable<T | null> {\n const url = this.getUrl(this.getRemoveDeletePath(id, item));\n return this.http\n .request<unknown>('delete', url, {\n withCredentials: true,\n observe: 'body',\n reportProgress: false,\n body: item ? this.serialize(item) : undefined,\n params: params\n })\n .pipe(map(res => (res ? this.deserialize(res) : null)));\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getCreatePostPath(item: T): string {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getUpdatePutPath(id: IdType, item: T): string {\n return `/${id}`;\n }\n\n protected getGetByIdGetPath(id: IdType): string {\n return `/${id}`;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getRemoveDeletePath(id: IdType, item?: T) {\n return `/${id}`;\n }\n}\n","import {DataListFilter, DataListParams} from '@mediusinc/mng-commons';\n\n/**\n * A class representing a mapping of query parameters.\n *\n * @typeparam Sorts - The type for available sort keys on get all operation.\n * @typeparam Filters - The type for available sort keys on get all operation.\n *\n * @deprecated\n */\nexport class QueryParamMap<Sorts, Filters extends keyof any> {\n private readonly _sorts: Record<string, string> = {};\n private readonly _filters: Record<string, string> = {};\n\n protected constructor(private readonly _params?: DataListParams<Sorts, Filters>) {\n // empty line\n }\n\n public static create() {\n return new QueryParamMap<string, string>();\n }\n\n public static forParams<Sorts, Filters extends keyof any>(params?: DataListParams<Sorts, Filters>) {\n return new QueryParamMap<Sorts, Filters>(params);\n }\n\n withSortMap(sort: Sorts, mapTo: string) {\n this._sorts[sort as string] = mapTo;\n return this;\n }\n\n withFilterMap(filter: Filters, mapTo: string) {\n this._filters[filter as string] = mapTo;\n return this;\n }\n\n mapSort(sort: string): string {\n return this._sorts[sort] ?? (sort as string);\n }\n\n mapFilter(filter: string): string {\n return this._filters[filter] ?? (filter as string);\n }\n\n mapParams(): DataListParams<any, any> | undefined {\n if (!this._params) {\n return undefined;\n }\n\n const params = {\n offset: this._params.offset,\n limit: this._params.limit,\n search: this._params.search,\n sort: this._params.sort?.map(s => ({property: this.mapSort(s.property as string), ascending: s.ascending}))\n } as DataListParams<any, any>;\n\n if (this._params.filters) {\n params.filters = {};\n Object.entries(this._params.filters).forEach(([key, value]) => {\n params.filters![this.mapFilter(key)] = {\n ...(value as DataListFilter)\n };\n });\n }\n\n return params;\n }\n}\n","import {APP_INITIALIZER} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {CommonsFeature, CommonsFeatureTypeEnum, MngModuleConfig, TypeRegistry} from '@mediusinc/mng-commons';\nimport {ObjectSerializer} from '@mediusinc/mng-commons/data-api/class-dto';\n\nimport {MediusFilterMatchType} from './models/filter-match-type.model';\nimport {MediusFilterParam} from './models/filter-param.model';\nimport {MediusQueryMode} from './models/query-mode.model';\nimport {MediusQueryParam} from './models/query-param.model';\n\nfunction initializeDataApiObsolete(config: MngModuleConfig): () => Observable<void> {\n return () => {\n const typeRegistry = TypeRegistry.get();\n typeRegistry.registerType(MediusFilterParam, 'FilterParam');\n typeRegistry.registerType(MediusQueryParam, 'QueryParam');\n typeRegistry.registerEnum(MediusFilterMatchType, 'FilterMatchType');\n typeRegistry.registerEnum(MediusQueryMode, 'QueryMode');\n\n ObjectSerializer.get().configure({...(config?.serialization ?? {})});\n return of(void 0);\n };\n}\n\n/**\n * Prepares providers for usage of the Obsolete Data API functionalities.\n *\n * @returns {CommonsFeature} The `CommonsFeature` object with the Data API Obsolete configuration.\n *\n * @deprecated.\n */\nexport function withDataApiObsolete(): CommonsFeature {\n return {\n type: CommonsFeatureTypeEnum.DataApiObsolete,\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: initializeDataApiObsolete,\n deps: [],\n multi: true\n }\n ]\n };\n}\n","// helpers\nexport * from './helpers/query-param-convert';\nexport * from './helpers/tableview-crud-create';\n\n// models\nexport * from './models/builders/query-param.builder';\nexport * from './models/filter-match-type.model';\nexport * from './models/filter-param.model';\nexport * from './models/query-mode.model';\nexport * from './models/query-param.model';\nexport * from './models/query-result.model';\n\n// services\nexport * from './services/api.abstract.service';\nexport * from './services/crud-api.abstract.service';\nexport * from './services/get-all-api.abstract.service';\n\n// tableview\nexport * from './tableview/tableview-crud.data-provider';\n\n// utils\nexport * from './utils/query-param-map.util';\n\n// provider\nexport * from './provide';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAAA;;;;;;;;;;AAUG;IAES,sBAaX;AAbD,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,YAAwB,CAAA;AACxB,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,SAAkB,CAAA;AAClB,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB,CAAA;AACrB,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,aAA0B,CAAA;AAC1B,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,WAAsB,CAAA;AACtB,IAAA,qBAAA,CAAA,IAAA,CAAA,GAAA,IAAS,CAAA;AACT,IAAA,qBAAA,CAAA,OAAA,CAAA,GAAA,QAAgB,CAAA;AAChB,IAAA,qBAAA,CAAA,aAAA,CAAA,GAAA,cAA4B,CAAA;AAC5B,IAAA,qBAAA,CAAA,aAAA,CAAA,GAAA,cAA4B,CAAA;AAC5B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB,CAAA;AACjB,IAAA,qBAAA,CAAA,cAAA,CAAA,GAAA,gBAA+B,CAAA;AACnC,CAAC,EAbW,qBAAqB,KAArB,qBAAqB,GAahC,EAAA,CAAA,CAAA;;MCVY,iBAAiB,CAAA;AASZ,IAAA,SAAA,IAAA,CAAA,gBAAgB,GAA6B;AACvD,QAAA;AACI,YAAA,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AE;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,yBAAyB;AACrC,gBAAA,IAAI,EAAE,EAAE;AACR,gBAAA,KAAK,EAAE,IAAI;AACd,aAAA;AACJ,SAAA;KACJ,CAAC;AACN;;AC5CA;;ACAA;;AAEG;;;;"}
|
|
@@ -0,0 +1,480 @@
|
|
|
1
|
+
import { inject, Injector } from '@angular/core';
|
|
2
|
+
import { TableviewDataProviderInst, ModelUtil, FilterMatchMode, TableviewBuilder, TableviewDescriptor, TypeRegistry, DecoratorMetadataUtil, DateUtil, DataListParamsUtil } from '@mediusinc/mng-commons';
|
|
3
|
+
import { map } from 'rxjs/operators';
|
|
4
|
+
import { mapToDataList } from '@mediusinc/mng-commons/data-api';
|
|
5
|
+
import { HttpClient, HttpParams } from '@angular/common/http';
|
|
6
|
+
|
|
7
|
+
class TableviewCrudDataProviderInst extends TableviewDataProviderInst {
|
|
8
|
+
constructor(type, requestType, serviceType, idPropertyName, useGetAllForFetch = false) {
|
|
9
|
+
super(type, serviceType);
|
|
10
|
+
this.requestType = requestType;
|
|
11
|
+
this._toRequestMap = item => item;
|
|
12
|
+
this.withGetAll((params, service, locale) => service.getAllGet(params, undefined, locale).pipe(mapToDataList()));
|
|
13
|
+
if (useGetAllForFetch) {
|
|
14
|
+
const selectedIdPropertyName = idPropertyName ?? ModelUtil.findIdAttribute(type) ?? 'id';
|
|
15
|
+
this.withFetch((id, service) => {
|
|
16
|
+
return service
|
|
17
|
+
.getAllGet({
|
|
18
|
+
limit: 1,
|
|
19
|
+
filters: {
|
|
20
|
+
[selectedIdPropertyName]: {
|
|
21
|
+
value: id,
|
|
22
|
+
matchMode: FilterMatchMode.Equals
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
})
|
|
26
|
+
.pipe(map(res => res.data[0]));
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
this.withFetch((id, service, locale) => service.getByIdGet(id, undefined, locale));
|
|
31
|
+
}
|
|
32
|
+
this.withCreate((item, service) => service.createPost(this.toRequestMap(item)));
|
|
33
|
+
this.withUpdate((id, item, service) => service.updatePut(id, this.toRequestMap(item)));
|
|
34
|
+
this.withDelete((id, item, service) => service.removeDelete(id, item));
|
|
35
|
+
}
|
|
36
|
+
get toRequestMap() {
|
|
37
|
+
return this._toRequestMap;
|
|
38
|
+
}
|
|
39
|
+
withToRequestMap(fn) {
|
|
40
|
+
this._toRequestMap = fn;
|
|
41
|
+
return this;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
class TableviewCrudDataProvider extends TableviewCrudDataProviderInst {
|
|
45
|
+
static create(type, requestType, serviceType, idProperty, useGetAllForFetch = false) {
|
|
46
|
+
return TableviewCrudDataProvider.createUnsafe(type, requestType, serviceType, idProperty, useGetAllForFetch);
|
|
47
|
+
}
|
|
48
|
+
static createUnsafe(type, requestType, serviceType, idProperty, useGetAllForFetch = false) {
|
|
49
|
+
return new TableviewCrudDataProviderInst(type, requestType, serviceType, idProperty, useGetAllForFetch);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function prepareBuilder(type, requestType, service, modelConfig, buildFn) {
|
|
54
|
+
const builder = new TableviewBuilder(TableviewDescriptor.fromClass(type, modelConfig?.idProperty, modelConfig?.titleProperty, modelConfig?.i18nBaseKey), TableviewCrudDataProvider.create(type, requestType, service, modelConfig?.idProperty), inject(Injector));
|
|
55
|
+
buildFn?.(builder);
|
|
56
|
+
return builder.build();
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.
|
|
60
|
+
* Sorts and filters are expected to be keys of class.
|
|
61
|
+
*
|
|
62
|
+
* @param {ClassType<Model>} type - The class representing the model.
|
|
63
|
+
* @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.
|
|
64
|
+
* @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.
|
|
65
|
+
* @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.
|
|
66
|
+
* @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.
|
|
67
|
+
*
|
|
68
|
+
* @returns A tableview instance with descriptor, data provider and actions.
|
|
69
|
+
*/
|
|
70
|
+
function tableviewCrud(type, requestType, service, modelConfig, buildFn) {
|
|
71
|
+
return prepareBuilder(type, requestType, service, modelConfig, buildFn);
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.
|
|
75
|
+
*
|
|
76
|
+
* @param {ClassType<Model>} type - The class representing the model.
|
|
77
|
+
* @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.
|
|
78
|
+
* @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.
|
|
79
|
+
* @param {TypeDescriptor<Sorts>} sorts - The available sort keys of get all request.
|
|
80
|
+
* @param {TypeDescriptor<Filters>} filters - The available filter keys of get all request.
|
|
81
|
+
* @param {{ idProperty?: keyof Model; titleProperty?: keyof Model; i18nBaseKey?: ClassType<any> | string; }} [modelConfig] - Additional optional model configuration.
|
|
82
|
+
* @param {(builder: TableviewBuilder) => void} [buildFn] - The optional callback function to customize the tableview using the prepared builder.
|
|
83
|
+
*
|
|
84
|
+
* @returns A tableview instance with descriptor, data provider and actions.
|
|
85
|
+
*/
|
|
86
|
+
function tableviewCrudWithSortAndFilter(type, requestType, service, sorts, filters, modelConfig, buildFn) {
|
|
87
|
+
return prepareBuilder(type, requestType, service, modelConfig, buildFn);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
class QueryResult {
|
|
91
|
+
static fromArray(pageData, allDataCount) {
|
|
92
|
+
const mqr = new QueryResult();
|
|
93
|
+
mqr.totalCount = allDataCount ?? pageData.length;
|
|
94
|
+
mqr.data = pageData;
|
|
95
|
+
return mqr;
|
|
96
|
+
}
|
|
97
|
+
static { this.attributeTypeMap = [
|
|
98
|
+
{
|
|
99
|
+
name: 'totalCount',
|
|
100
|
+
baseName: 'totalCount',
|
|
101
|
+
type: 'number'
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
name: 'data',
|
|
105
|
+
baseName: 'data',
|
|
106
|
+
type: 'Array<T>'
|
|
107
|
+
}
|
|
108
|
+
]; }
|
|
109
|
+
static getAttributeTypeMap() {
|
|
110
|
+
return QueryResult.attributeTypeMap;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
class ObjectSerializer {
|
|
115
|
+
constructor() {
|
|
116
|
+
this._logCategory = 'ObjectSerializer';
|
|
117
|
+
this._primitives = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];
|
|
118
|
+
this.dateTimeInUtc = false;
|
|
119
|
+
this.dateTimeWithTimezone = true;
|
|
120
|
+
this.dateTimeWithMillis = true;
|
|
121
|
+
}
|
|
122
|
+
static { this._instance = new ObjectSerializer(); }
|
|
123
|
+
get primitives() {
|
|
124
|
+
return this._primitives;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Only use one instance of object (out of Angular context)
|
|
128
|
+
*/
|
|
129
|
+
static get() {
|
|
130
|
+
return ObjectSerializer._instance;
|
|
131
|
+
}
|
|
132
|
+
configure(config) {
|
|
133
|
+
if (config.dateTimeInUtc !== undefined) {
|
|
134
|
+
this.dateTimeInUtc = config.dateTimeInUtc;
|
|
135
|
+
}
|
|
136
|
+
if (config.dateTimeWithTimezone !== undefined) {
|
|
137
|
+
this.dateTimeWithTimezone = config.dateTimeWithTimezone;
|
|
138
|
+
}
|
|
139
|
+
if (config.dateTimeWithMillis !== undefined) {
|
|
140
|
+
this.dateTimeWithMillis = config.dateTimeWithMillis;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
findCorrectType(data, expectedTypeName) {
|
|
144
|
+
if (data == undefined) {
|
|
145
|
+
return expectedTypeName;
|
|
146
|
+
}
|
|
147
|
+
else if (this._primitives.indexOf(expectedTypeName.toLowerCase()) !== -1) {
|
|
148
|
+
return expectedTypeName;
|
|
149
|
+
}
|
|
150
|
+
else if (expectedTypeName === 'Date') {
|
|
151
|
+
return expectedTypeName;
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
const enumType = TypeRegistry.get().findEnum(expectedTypeName);
|
|
155
|
+
if (enumType) {
|
|
156
|
+
return expectedTypeName;
|
|
157
|
+
}
|
|
158
|
+
const type = TypeRegistry.get().findType(expectedTypeName);
|
|
159
|
+
if (!type) {
|
|
160
|
+
return expectedTypeName; // w/e we don't know the type
|
|
161
|
+
}
|
|
162
|
+
// Check the discriminator
|
|
163
|
+
const discriminatorProperty = type.discriminator;
|
|
164
|
+
if (discriminatorProperty == null) {
|
|
165
|
+
return expectedTypeName; // the type does not have a discriminator. use it.
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
if (data[discriminatorProperty]) {
|
|
169
|
+
const discriminatorType = data[discriminatorProperty];
|
|
170
|
+
const type = TypeRegistry.get().findType(expectedTypeName);
|
|
171
|
+
if (type) {
|
|
172
|
+
return discriminatorType; // use the type given in the discriminator
|
|
173
|
+
}
|
|
174
|
+
else {
|
|
175
|
+
return expectedTypeName; // discriminator did not map to a type
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
else {
|
|
179
|
+
return expectedTypeName; // discriminator was not present (or an empty string)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
serializeClass(data, type) {
|
|
185
|
+
return this.serialize(data, DecoratorMetadataUtil.findTypeName(type) ?? undefined);
|
|
186
|
+
}
|
|
187
|
+
serializeClassArray(data, type) {
|
|
188
|
+
return this.serialize(data, `Array<${DecoratorMetadataUtil.findTypeName(type)}>`);
|
|
189
|
+
}
|
|
190
|
+
serialize(data, typeName, subtype) {
|
|
191
|
+
if (data == undefined) {
|
|
192
|
+
return data;
|
|
193
|
+
}
|
|
194
|
+
else if (typeName && this._primitives.indexOf(typeName.toLowerCase()) !== -1) {
|
|
195
|
+
return data;
|
|
196
|
+
}
|
|
197
|
+
else if (typeName && typeName.lastIndexOf('Array<', 0) === 0) {
|
|
198
|
+
// string.startsWith pre es6
|
|
199
|
+
let subType = typeName.replace('Array<', ''); // Array<Type> => Type>
|
|
200
|
+
subType = subType.substring(0, subType.length - 1); // Type> => Type
|
|
201
|
+
const transformedData = [];
|
|
202
|
+
// tslint:disable-next-line:prefer-for-of
|
|
203
|
+
for (let index = 0; index < data.length; index++) {
|
|
204
|
+
const datum = data[index];
|
|
205
|
+
transformedData.push(this.serialize(datum, subType));
|
|
206
|
+
}
|
|
207
|
+
return transformedData;
|
|
208
|
+
}
|
|
209
|
+
else if (typeName === 'Date') {
|
|
210
|
+
const dateOnly = subtype?.toLowerCase() === 'date';
|
|
211
|
+
return DateUtil.toIsoString(data, dateOnly ? 'date' : 'date-time', {
|
|
212
|
+
utc: this.dateTimeInUtc,
|
|
213
|
+
noTimezone: !this.dateTimeWithTimezone,
|
|
214
|
+
noMillis: !this.dateTimeWithMillis
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
else if (typeName) {
|
|
218
|
+
const enumType = TypeRegistry.get().findEnum(typeName);
|
|
219
|
+
if (enumType) {
|
|
220
|
+
return data;
|
|
221
|
+
}
|
|
222
|
+
const type = TypeRegistry.get().findType(typeName);
|
|
223
|
+
if (!type) {
|
|
224
|
+
// in case we dont know the type
|
|
225
|
+
return data;
|
|
226
|
+
}
|
|
227
|
+
// Get the actual type of this object
|
|
228
|
+
const correctedTypeName = this.findCorrectType(data, typeName);
|
|
229
|
+
const correctedType = TypeRegistry.get().findType(correctedTypeName);
|
|
230
|
+
// get the map for the correct type.
|
|
231
|
+
const attributeTypes = correctedType.getAttributeTypeMap();
|
|
232
|
+
const instance = {};
|
|
233
|
+
// tslint:disable-next-line:prefer-for-of
|
|
234
|
+
for (let index = 0; index < attributeTypes.length; index++) {
|
|
235
|
+
const attributeType = attributeTypes[index];
|
|
236
|
+
instance[attributeType.baseName] = this.serialize(data[attributeType.name], attributeType.type, attributeType.subtype);
|
|
237
|
+
}
|
|
238
|
+
return instance;
|
|
239
|
+
}
|
|
240
|
+
else {
|
|
241
|
+
return data;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
deserializeClass(data, type) {
|
|
245
|
+
return this.deserialize(data, DecoratorMetadataUtil.findTypeName(type) ?? undefined);
|
|
246
|
+
}
|
|
247
|
+
deserializeClassArray(data, type) {
|
|
248
|
+
return this.deserialize(data, `Array<${DecoratorMetadataUtil.findTypeName(type)}>`);
|
|
249
|
+
}
|
|
250
|
+
deserialize(data, type) {
|
|
251
|
+
// polymorphism may change the actual type.
|
|
252
|
+
if (data == undefined || !type) {
|
|
253
|
+
return data;
|
|
254
|
+
}
|
|
255
|
+
const correctedTypeName = this.findCorrectType(data, type);
|
|
256
|
+
if (this._primitives.indexOf(correctedTypeName.toLowerCase()) !== -1) {
|
|
257
|
+
return data;
|
|
258
|
+
}
|
|
259
|
+
else if (correctedTypeName.lastIndexOf('Array<', 0) === 0) {
|
|
260
|
+
// string.startsWith pre es6
|
|
261
|
+
let subType = correctedTypeName.replace('Array<', ''); // Array<Type> => Type>
|
|
262
|
+
subType = subType.substring(0, subType.length - 1); // Type> => Type
|
|
263
|
+
const transformedData = [];
|
|
264
|
+
// tslint:disable-next-line:prefer-for-of
|
|
265
|
+
for (let index = 0; index < data.length; index++) {
|
|
266
|
+
const datum = data[index];
|
|
267
|
+
transformedData.push(this.deserialize(datum, subType));
|
|
268
|
+
}
|
|
269
|
+
return transformedData;
|
|
270
|
+
}
|
|
271
|
+
else if (correctedTypeName === 'Date') {
|
|
272
|
+
return new Date(data);
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
const enumType = TypeRegistry.get().findEnum(correctedTypeName);
|
|
276
|
+
if (enumType) {
|
|
277
|
+
// is Enum
|
|
278
|
+
return data;
|
|
279
|
+
}
|
|
280
|
+
const correctedType = TypeRegistry.get().findType(correctedTypeName);
|
|
281
|
+
if (!correctedType) {
|
|
282
|
+
// dont know the type
|
|
283
|
+
return data;
|
|
284
|
+
}
|
|
285
|
+
const instance = new correctedType();
|
|
286
|
+
const attributeTypes = correctedType.getAttributeTypeMap();
|
|
287
|
+
// tslint:disable-next-line:prefer-for-of
|
|
288
|
+
for (let index = 0; index < attributeTypes.length; index++) {
|
|
289
|
+
const attributeType = attributeTypes[index];
|
|
290
|
+
instance[attributeType.name] = this.deserialize(data[attributeType.baseName], attributeType.type);
|
|
291
|
+
}
|
|
292
|
+
return instance;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
class AMngBaseApiService {
|
|
298
|
+
constructor() {
|
|
299
|
+
this.objectSerializer = ObjectSerializer.get();
|
|
300
|
+
this.http = inject(HttpClient);
|
|
301
|
+
}
|
|
302
|
+
getUrl(...pathSegments) {
|
|
303
|
+
let baseUrl = this.getBasePath();
|
|
304
|
+
if (baseUrl.endsWith('/')) {
|
|
305
|
+
baseUrl = baseUrl.substring(0, baseUrl.length - 1);
|
|
306
|
+
}
|
|
307
|
+
const serviceBasePath = this.getServiceBasePath();
|
|
308
|
+
let path = [serviceBasePath, ...pathSegments].filter(s => s && s.length).join('/');
|
|
309
|
+
// omit first and last '/'
|
|
310
|
+
if (path.startsWith('/')) {
|
|
311
|
+
path = path.substring(1);
|
|
312
|
+
}
|
|
313
|
+
if (path.endsWith('/')) {
|
|
314
|
+
path = path.substring(0, path.length - 1);
|
|
315
|
+
}
|
|
316
|
+
// replace any double '//' from path that could come from joining paths
|
|
317
|
+
path = path.replace('//', '/');
|
|
318
|
+
return `${baseUrl}/${path}`;
|
|
319
|
+
}
|
|
320
|
+
deserializeQueryResult(item, qrType) {
|
|
321
|
+
return this.deserializeClass(item, qrType);
|
|
322
|
+
}
|
|
323
|
+
deserializeClass(item, type) {
|
|
324
|
+
return this.objectSerializer.deserializeClass(item, type);
|
|
325
|
+
}
|
|
326
|
+
deserializeClassArray(item, type) {
|
|
327
|
+
return this.objectSerializer.deserializeClassArray(item, type);
|
|
328
|
+
}
|
|
329
|
+
serializeClass(item, type) {
|
|
330
|
+
return this.objectSerializer.serializeClass(item, type);
|
|
331
|
+
}
|
|
332
|
+
serializeClassArray(item, type) {
|
|
333
|
+
return this.objectSerializer.serializeClassArray(item, type);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
class AMngApiService extends AMngBaseApiService {
|
|
337
|
+
constructor(type) {
|
|
338
|
+
super();
|
|
339
|
+
this.type = type;
|
|
340
|
+
}
|
|
341
|
+
deserialize(item) {
|
|
342
|
+
return this.deserializeClass(item, this.type);
|
|
343
|
+
}
|
|
344
|
+
serialize(item) {
|
|
345
|
+
return this.serializeClass(item, this.type);
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
class AMngGetAllApiService extends AMngApiService {
|
|
350
|
+
constructor(fetchType, queryResultType) {
|
|
351
|
+
super(fetchType);
|
|
352
|
+
this.queryResultType = queryResultType;
|
|
353
|
+
}
|
|
354
|
+
getAllGet(requestParams, params, locale) {
|
|
355
|
+
const url = this.getUrl(this.getGetAllGetPath());
|
|
356
|
+
if (!params) {
|
|
357
|
+
params = new HttpParams();
|
|
358
|
+
}
|
|
359
|
+
if (locale) {
|
|
360
|
+
params = params.set('lang', locale);
|
|
361
|
+
}
|
|
362
|
+
if (requestParams?.limit) {
|
|
363
|
+
params = params.set('limit', requestParams.limit);
|
|
364
|
+
}
|
|
365
|
+
if (requestParams?.offset) {
|
|
366
|
+
params = params.set('offset', requestParams.offset);
|
|
367
|
+
}
|
|
368
|
+
const sort = DataListParamsUtil.sortToUrlQuery(requestParams);
|
|
369
|
+
if (sort) {
|
|
370
|
+
params = params.set('sort', sort);
|
|
371
|
+
}
|
|
372
|
+
if (requestParams?.filters) {
|
|
373
|
+
Object.keys(requestParams.filters).forEach(key => {
|
|
374
|
+
const value = DataListParamsUtil.paramsFilterToUrlQuery(requestParams, key);
|
|
375
|
+
if (value) {
|
|
376
|
+
params = params.set(key, value);
|
|
377
|
+
}
|
|
378
|
+
});
|
|
379
|
+
}
|
|
380
|
+
return this.http
|
|
381
|
+
.get(url, {
|
|
382
|
+
withCredentials: true,
|
|
383
|
+
observe: 'body',
|
|
384
|
+
reportProgress: false,
|
|
385
|
+
params: params
|
|
386
|
+
})
|
|
387
|
+
.pipe(map(res => this.deserializeQueryResult(res, this.queryResultType)));
|
|
388
|
+
}
|
|
389
|
+
getGetAllGetPath() {
|
|
390
|
+
return '/';
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
class AMngCrudApiService extends AMngGetAllApiService {
|
|
395
|
+
constructor(fetchType, requestType, queryResultType) {
|
|
396
|
+
super(fetchType, queryResultType);
|
|
397
|
+
this.requestType = requestType;
|
|
398
|
+
}
|
|
399
|
+
createPost(item, params) {
|
|
400
|
+
const url = this.getUrl(this.getCreatePostPath(item));
|
|
401
|
+
return this.http
|
|
402
|
+
.post(url, this.serializeRequest(item), {
|
|
403
|
+
withCredentials: true,
|
|
404
|
+
observe: 'body',
|
|
405
|
+
reportProgress: false,
|
|
406
|
+
params: params
|
|
407
|
+
})
|
|
408
|
+
.pipe(map(res => this.deserialize(res)));
|
|
409
|
+
}
|
|
410
|
+
getByIdGet(id, params, locale) {
|
|
411
|
+
const url = this.getUrl(this.getGetByIdGetPath(id));
|
|
412
|
+
if (params && locale) {
|
|
413
|
+
params = params.set('lang', locale);
|
|
414
|
+
}
|
|
415
|
+
else if (locale) {
|
|
416
|
+
params = new HttpParams().set('lang', locale);
|
|
417
|
+
}
|
|
418
|
+
return this.http
|
|
419
|
+
.get(url, {
|
|
420
|
+
withCredentials: true,
|
|
421
|
+
observe: 'body',
|
|
422
|
+
reportProgress: false,
|
|
423
|
+
params: params
|
|
424
|
+
})
|
|
425
|
+
.pipe(map(res => this.deserialize(res)));
|
|
426
|
+
}
|
|
427
|
+
updatePut(id, item, params) {
|
|
428
|
+
const url = this.getUrl(this.getUpdatePutPath(id, item));
|
|
429
|
+
return this.http
|
|
430
|
+
.put(url, this.serializeRequest(item), {
|
|
431
|
+
withCredentials: true,
|
|
432
|
+
observe: 'body',
|
|
433
|
+
reportProgress: false,
|
|
434
|
+
params: params
|
|
435
|
+
})
|
|
436
|
+
.pipe(map(res => this.deserialize(res)));
|
|
437
|
+
}
|
|
438
|
+
removeDelete(id, item, params) {
|
|
439
|
+
const url = this.getUrl(this.getRemoveDeletePath(id, item));
|
|
440
|
+
return this.http
|
|
441
|
+
.request('delete', url, {
|
|
442
|
+
withCredentials: true,
|
|
443
|
+
observe: 'body',
|
|
444
|
+
reportProgress: false,
|
|
445
|
+
body: item ? this.serialize(item) : undefined,
|
|
446
|
+
params: params
|
|
447
|
+
})
|
|
448
|
+
.pipe(map(res => (res ? this.deserialize(res) : null)));
|
|
449
|
+
}
|
|
450
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
451
|
+
getCreatePostPath(item) {
|
|
452
|
+
return '';
|
|
453
|
+
}
|
|
454
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
455
|
+
getUpdatePutPath(id, item) {
|
|
456
|
+
return ``;
|
|
457
|
+
}
|
|
458
|
+
getGetByIdGetPath(id) {
|
|
459
|
+
return `/${id}`;
|
|
460
|
+
}
|
|
461
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
462
|
+
getRemoveDeletePath(id, item) {
|
|
463
|
+
return `/${id}`;
|
|
464
|
+
}
|
|
465
|
+
deserializeRequest(item) {
|
|
466
|
+
return this.deserializeClass(item, this.requestType);
|
|
467
|
+
}
|
|
468
|
+
serializeRequest(item) {
|
|
469
|
+
return this.serializeClass(item, this.requestType);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
// helpers
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* Generated bundle index. Do not edit.
|
|
477
|
+
*/
|
|
478
|
+
|
|
479
|
+
export { AMngApiService, AMngBaseApiService, AMngCrudApiService, AMngGetAllApiService, ObjectSerializer, QueryResult, TableviewCrudDataProvider, TableviewCrudDataProviderInst, tableviewCrud, tableviewCrudWithSortAndFilter };
|
|
480
|
+
//# sourceMappingURL=mediusinc-mng-commons-data-api-class-dto.mjs.map
|