@mediusinc/mng-commons-data-api-class 5.5.0-rc.0 → 5.5.0-rc.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons-data-api-class-tableview.mjs","sources":["../../tableview/src/tableview-crud.data-provider.ts","../../tableview/src/tableview-crud-create.ts","../../tableview/src/mediusinc-mng-commons-data-api-class-tableview.ts"],"sourcesContent":["import {Type} from '@angular/core';\n\nimport {map} from 'rxjs/operators';\n\nimport {ICommonsCrudApiService, ICommonsGetAllApiService, QueryResult} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType, FilterMatchMode, ServiceClassType, mapToDataList} from '@mediusinc/mng-commons/core';\nimport {findClassIdAttribute} from '@mediusinc/mng-commons/model';\nimport {TableviewDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nexport type ToRequestMapFnType<Model, RequestModel> = (item?: Model) => RequestModel;\n\nexport class TableviewCrudDataProviderInst<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n> extends TableviewDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {\n private _toRequestMap: ToRequestMapFnType<Model, RequestModel> = item => item as RequestModel;\n\n protected constructor(\n type: ClassType<Model>,\n protected requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idPropertyName?: string,\n useGetAllForFetch = false\n ) {\n super(type, serviceType);\n this.withGetAll((params, service, locale) => service.getAllGet(params, undefined, locale).pipe(mapToDataList()));\n\n if (useGetAllForFetch) {\n const selectedIdPropertyName = idPropertyName ?? findClassIdAttribute(type) ?? 'id';\n this.withFetch((id, service) => {\n return service!\n .getAllGet({\n limit: 1,\n filters: {\n [selectedIdPropertyName]: {\n value: id,\n matchMode: FilterMatchMode.Equals\n }\n }\n })\n .pipe(map(res => res.data![0]));\n });\n } else {\n this.withFetch((id, service, locale) => service!.getByIdGet!(id, undefined, locale));\n }\n this.withCreate((item, service) => service.createPost!(this.toRequestMap(item)));\n this.withUpdate((id, item, service) => service.updatePut!(id, this.toRequestMap(item)));\n this.withDelete((id, item, service) => service.removeDelete!(id, item));\n }\n\n public get toRequestMap() {\n return this._toRequestMap;\n }\n\n public withToRequestMap(fn: ToRequestMapFnType<Model, RequestModel>) {\n this._toRequestMap = fn;\n return this;\n }\n}\n\nexport class TableviewCrudDataProvider extends TableviewCrudDataProviderInst<any, any, any> {\n public static create<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idProperty?: keyof Model,\n useGetAllForFetch = false\n ): TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters> {\n return TableviewCrudDataProvider.createUnsafe<Model, RequestModel, Service, Sorts, Filters>(type, requestType, serviceType, idProperty as string, useGetAllForFetch);\n }\n\n public static createUnsafe<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idProperty?: string,\n useGetAllForFetch = false\n ): TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters> {\n return new TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>(type, requestType, serviceType, idProperty, useGetAllForFetch);\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ICommonsCrudApiService, ICommonsGetAllApiService, QueryResult} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {TypeDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableviewDescriptorInst, TableviewInputBuilder, tableviewDescriptorFromClass} from '@mediusinc/mng-commons/tableview/api';\n\nimport {TableviewCrudDataProvider, TableviewCrudDataProviderInst} from './tableview-crud.data-provider';\n\nfunction prepareBuilder<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts,\n Filters extends keyof any\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(\n tableviewDescriptorFromClass(type, {id: modelConfig?.idProperty, title: modelConfig?.titleProperty, i18nBase: modelConfig?.i18nBaseKey}),\n TableviewCrudDataProvider.create(type, requestType, service, modelConfig?.idProperty),\n inject(Injector)\n );\n buildFn?.(builder);\n return builder.build();\n}\n\n/**\n * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.\n * Sorts and filters are expected to be keys of class.\n *\n * @param {ClassType<Model>} type - The class representing the model.\n * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.\n * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.\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 A tableview instance with descriptor, data provider and actions.\n */\nexport function tableviewCrud<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n return prepareBuilder<Model, RequestModel, Service, Sorts, Filters>(type, requestType, service, modelConfig, buildFn);\n}\n\n/**\n * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.\n *\n * @param {ClassType<Model>} type - The class representing the model.\n * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.\n * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.\n * @param {TypeDescriptor<Sorts>} sorts - The available sort keys of get all request.\n * @param {TypeDescriptor<Filters>} filters - The available filter keys of get all request.\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 A tableview instance with descriptor, data provider and actions.\n */\nexport function tableviewCrudWithSortAndFilter<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts,\n Filters extends keyof any\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n sorts: TypeDescriptor<Sorts>,\n filters: TypeDescriptor<Filters>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n return prepareBuilder<Model, RequestModel, Service, Sorts, Filters>(type, requestType, service, modelConfig, buildFn);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAWM,MAAO,6BAMX,SAAQ,yBAAsG,CAAA;IAG5G,WACI,CAAA,IAAsB,EACZ,WAAoC,EAC9C,WAA0B,EAC1B,cAAuB,EACvB,iBAAiB,GAAG,KAAK,EAAA;AAEzB,QAAA,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QALf,IAAW,CAAA,WAAA,GAAX,WAAW,CAAyB;AAJ1C,QAAA,IAAA,CAAA,aAAa,GAA4C,IAAI,IAAI,IAAoB,CAAC;AAU1F,QAAA,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,CAAC;QAEjH,IAAI,iBAAiB,EAAE;YACnB,MAAM,sBAAsB,GAAG,cAAc,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC;YACpF,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,OAAO,KAAI;AAC3B,gBAAA,OAAO,OAAQ;AACV,qBAAA,SAAS,CAAC;AACP,oBAAA,KAAK,EAAE,CAAC;AACR,oBAAA,OAAO,EAAE;wBACL,CAAC,sBAAsB,GAAG;AACtB,4BAAA,KAAK,EAAE,EAAE;4BACT,SAAS,EAAE,eAAe,CAAC,MAAM;AACpC,yBAAA;AACJ,qBAAA;iBACJ,CAAC;AACD,qBAAA,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-commons-data-api-class-tableview.mjs","sources":["../../tableview/src/tableview-crud.data-provider.ts","../../tableview/src/tableview-crud-create.ts","../../tableview/src/mediusinc-mng-commons-data-api-class-tableview.ts"],"sourcesContent":["import {Type} from '@angular/core';\n\nimport {map} from 'rxjs/operators';\n\nimport {ICommonsCrudApiService, ICommonsGetAllApiService, QueryResult} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType, FilterMatchMode, ServiceClassType, mapToDataList} from '@mediusinc/mng-commons/core';\nimport {findClassIdAttribute} from '@mediusinc/mng-commons/model';\nimport {TableviewDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nexport type ToRequestMapFnType<Model, RequestModel> = (item?: Model) => RequestModel;\n\nexport class TableviewCrudDataProviderInst<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n> extends TableviewDataProviderInst<Model, Service, Sorts, Filters, ClassType<Model>, ServiceClassType<Service>> {\n private _toRequestMap: ToRequestMapFnType<Model, RequestModel> = item => item as RequestModel;\n\n protected constructor(\n type: ClassType<Model>,\n protected requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idPropertyName?: string,\n useGetAllForFetch = false\n ) {\n super(type, serviceType);\n this.withGetAll((params, service, locale) => service.getAllGet(params, undefined, locale).pipe(mapToDataList()));\n\n if (useGetAllForFetch) {\n const selectedIdPropertyName = idPropertyName ?? findClassIdAttribute(type) ?? 'id';\n this.withFetch((id, service) => {\n return service!\n .getAllGet({\n limit: 1,\n filters: {\n [selectedIdPropertyName]: {\n value: id,\n matchMode: FilterMatchMode.Equals\n }\n }\n })\n .pipe(map(res => res.data![0]));\n });\n } else {\n this.withFetch((id, service, locale) => service!.getByIdGet!(id, undefined, locale));\n }\n this.withCreate((item, service) => service.createPost!(this.toRequestMap(item)));\n this.withUpdate((id, item, service) => service.updatePut!(id, this.toRequestMap(item)));\n this.withDelete((id, item, service) => service.removeDelete!(id, item));\n }\n\n public get toRequestMap() {\n return this._toRequestMap;\n }\n\n public withToRequestMap(fn: ToRequestMapFnType<Model, RequestModel>) {\n this._toRequestMap = fn;\n return this;\n }\n}\n\nexport class TableviewCrudDataProvider extends TableviewCrudDataProviderInst<any, any, any> {\n public static create<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idProperty?: keyof Model,\n useGetAllForFetch = false\n ): TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters> {\n return TableviewCrudDataProvider.createUnsafe<Model, RequestModel, Service, Sorts, Filters>(type, requestType, serviceType, idProperty as string, useGetAllForFetch);\n }\n\n public static createUnsafe<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n serviceType: Type<Service>,\n idProperty?: string,\n useGetAllForFetch = false\n ): TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters> {\n return new TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>(type, requestType, serviceType, idProperty, useGetAllForFetch);\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ICommonsCrudApiService, ICommonsGetAllApiService, QueryResult} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {TypeDescriptor} from '@mediusinc/mng-commons/model';\nimport {TableviewDescriptorInst, TableviewInputBuilder, tableviewDescriptorFromClass} from '@mediusinc/mng-commons/tableview/api';\n\nimport {TableviewCrudDataProvider, TableviewCrudDataProviderInst} from './tableview-crud.data-provider';\n\nfunction prepareBuilder<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts,\n Filters extends keyof any\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(\n tableviewDescriptorFromClass(type, {id: modelConfig?.idProperty, title: modelConfig?.titleProperty, i18nBase: modelConfig?.i18nBaseKey}),\n TableviewCrudDataProvider.create(type, requestType, service, modelConfig?.idProperty),\n inject(Injector)\n );\n buildFn?.(builder);\n return builder.build();\n}\n\n/**\n * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.\n * Sorts and filters are expected to be keys of class.\n *\n * @param {ClassType<Model>} type - The class representing the model.\n * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.\n * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.\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 A tableview instance with descriptor, data provider and actions.\n */\nexport function tableviewCrud<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n return prepareBuilder<Model, RequestModel, Service, Sorts, Filters>(type, requestType, service, modelConfig, buildFn);\n}\n\n/**\n * Creates a tableview with the given class, request class, service based on data API v2, sort, filters and optional class/model configuration.\n *\n * @param {ClassType<Model>} type - The class representing the model.\n * @param {ClassType<RequestModel>} requestType - The class representing the model for create and update operations.\n * @param {ServiceClassType<Service>} service - The class type of the service implementing `IMngCrudApiService` and `IMngGetAllApiService`.\n * @param {TypeDescriptor<Sorts>} sorts - The available sort keys of get all request.\n * @param {TypeDescriptor<Filters>} filters - The available filter keys of get all request.\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 A tableview instance with descriptor, data provider and actions.\n */\nexport function tableviewCrudWithSortAndFilter<\n Model,\n RequestModel,\n Service extends ICommonsCrudApiService<Model, RequestModel> & ICommonsGetAllApiService<QueryResult<Model>>,\n Sorts,\n Filters extends keyof any\n>(\n type: ClassType<Model>,\n requestType: ClassType<RequestModel>,\n service: ServiceClassType<Service>,\n sorts: TypeDescriptor<Sorts>,\n filters: TypeDescriptor<Filters>,\n modelConfig?: {\n idProperty?: keyof Model;\n titleProperty?: keyof Model;\n i18nBaseKey?: string;\n },\n buildFn?: (\n builder: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudDataProviderInst<Model, RequestModel, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n return prepareBuilder<Model, RequestModel, Service, Sorts, Filters>(type, requestType, service, modelConfig, buildFn);\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAWM,MAAO,6BAMX,SAAQ,yBAAsG,CAAA;IAG5G,WACI,CAAA,IAAsB,EACZ,WAAoC,EAC9C,WAA0B,EAC1B,cAAuB,EACvB,iBAAiB,GAAG,KAAK,EAAA;AAEzB,QAAA,KAAK,CAAC,IAAI,EAAE,WAAW,CAAC;QALd,IAAW,CAAA,WAAA,GAAX,WAAW;AAJjB,QAAA,IAAA,CAAA,aAAa,GAA4C,IAAI,IAAI,IAAoB;AAUzF,QAAA,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC;QAEhH,IAAI,iBAAiB,EAAE;YACnB,MAAM,sBAAsB,GAAG,cAAc,IAAI,oBAAoB,CAAC,IAAI,CAAC,IAAI,IAAI;YACnF,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,OAAO,KAAI;AAC3B,gBAAA,OAAO;AACF,qBAAA,SAAS,CAAC;AACP,oBAAA,KAAK,EAAE,CAAC;AACR,oBAAA,OAAO,EAAE;wBACL,CAAC,sBAAsB,GAAG;AACtB,4BAAA,KAAK,EAAE,EAAE;4BACT,SAAS,EAAE,eAAe,CAAC;AAC9B;AACJ;iBACJ;AACA,qBAAA,IAAI,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,IAAK,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,aAAC,CAAC;;aACC;YACH,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,MAAM,KAAK,OAAQ,CAAC,UAAW,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,CAAC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4B,CAAC,IAAI,EAAE,EAAC,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAC,CAAC,EACxI,yBAAyB,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,UAAU,CAAC,EACrF,MAAM,CAAC,QAAQ,CAAC,CACnB;AACD,IAAA,OAAO,GAAG,OAAO,CAAC;AAClB,IAAA,OAAO,OAAO,CAAC,KAAK,EAAE;AAC1B;AAEA;;;;;;;;;;;AAWG;AACG,SAAU,aAAa,CAOzB,IAAsB,EACtB,WAAoC,EACpC,OAAkC,EAClC,WAIC,EACD,OASS,EAAA;AAET,IAAA,OAAO,cAAc,CAA+C,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC;AACzH;AAEA;;;;;;;;;;;;AAYG;AACa,SAAA,8BAA8B,CAO1C,IAAsB,EACtB,WAAoC,EACpC,OAAkC,EAClC,KAA4B,EAC5B,OAAgC,EAChC,WAIC,EACD,OASS,EAAA;AAET,IAAA,OAAO,cAAc,CAA+C,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,WAAW,EAAE,OAAO,CAAC;AACzH;;ACtIA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons-data-api-class-v1.mjs","sources":["../../v1/src/models/filter-match-type.model.ts","../../v1/src/models/filter-param.model.ts","../../v1/src/models/query-mode.model.ts","../../v1/src/models/query-param.model.ts","../../v1/src/models/builders/query-param.builder.ts","../../v1/src/helpers/query-param-convert.ts","../../v1/src/tableview/tableview-crud.data-provider.ts","../../v1/src/helpers/tableview-crud-create.ts","../../v1/src/models/query-result.model.ts","../../v1/src/services/tokens/data-api-class.token.ts","../../v1/src/services/api.abstract.service.ts","../../v1/src/services/get-all-api.abstract.service.ts","../../v1/src/services/crud-api.abstract.service.ts","../../v1/src/utils/query-param-map.util.ts","../../v1/src/provide.ts","../../v1/src/index.ts","../../v1/src/mediusinc-mng-commons-data-api-class-v1.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/core';\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/core';\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 {CommonsInternalError, DataListFilter, DataListFilterValueType, DataListParams, DataListResult, FilterMatchMode} from '@mediusinc/mng-commons/core';\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 toV1QueryParam(): undefined;\nexport function toV1QueryParam<Sorts = string, Filters extends keyof any = string>(params: DataListParams<Sorts, Filters>, map?: QueryParamMap<Sorts, Filters>): MediusQueryParam;\nexport function toV1QueryParam<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 toV1QueryParam<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 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 ? toV1FilterMatchType(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 toV1FilterMatchType(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 CommonsInternalError(`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 executeV1GetAll<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 = toV1QueryParam(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, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {findClassIdAttribute} from '@mediusinc/mng-commons/model';\nimport {TableviewDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nimport {toV1QueryParam} 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 {ICommonsCrudV1ApiService} from '../services/crud-api.abstract.service';\nimport {ICommonsGetAllV1ApiService} 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 TableviewCrudV1DataProviderInst<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<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.getAllPost(toV1QueryParam(params), undefined, locale).pipe(map(res => ({data: res.pageData ?? [], totalCount: res.allDataCount ?? res.pageData?.length ?? 0})))\n );\n\n if (useGetAllForFetch) {\n const selectedIdPropertyName = idPropertyName ?? findClassIdAttribute(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 TableviewCrudV1DataProvider extends TableviewCrudV1DataProviderInst<any, any> {\n /**\n * @deprecated\n */\n public static create<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: keyof Model, useGetAllForFetch = false): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters> {\n return TableviewCrudV1DataProvider.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 ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: string, useGetAllForFetch = false): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters> {\n return new TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>(type, serviceType, idProperty, useGetAllForFetch);\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {TableviewDescriptorInst, TableviewInputBuilder, tableviewDescriptorFromClass} from '@mediusinc/mng-commons/tableview/api';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ICommonsCrudV1ApiService} from '../services/crud-api.abstract.service';\nimport {ICommonsGetAllV1ApiService} from '../services/get-all-api.abstract.service';\nimport {TableviewCrudV1DataProvider, TableviewCrudV1DataProviderInst} 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 tableviewCrudV1<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<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: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(\n tableviewDescriptorFromClass(type, {id: modelConfig?.idProperty, title: modelConfig?.titleProperty, i18nBase: modelConfig?.i18nBaseKey}),\n TableviewCrudV1DataProvider.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/core';\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 {InjectionToken} from '@angular/core';\n\n/**\n * Some fake token to incept needed types for query params and object serializer setup\n */\nexport const COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT = new InjectionToken<boolean>('CommonsDataApiClassObsolete');\n","import {HttpClient} from '@angular/common/http';\nimport {inject} from '@angular/core';\n\nimport {ObjectSerializer} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType} from '@mediusinc/mng-commons/core';\n\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT} from './tokens/data-api-class.token';\n\n/**\n * This is an abstract class that provides base functionality for API services.\n *\n * @deprecated\n */\nexport abstract class ACommonsBaseV1ApiService {\n protected readonly objectSerializer: ObjectSerializer = ObjectSerializer.get();\n protected readonly http = inject(HttpClient);\n protected readonly obsoleteConfig = inject(COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT);\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 ACommonsV1ApiService.\n *\n * @typeparam T The main type of data to be handled by the service.\n *\n * @deprecated\n */\nexport abstract class ACommonsV1ApiService<T> extends ACommonsBaseV1ApiService {\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/core';\n\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ACommonsV1ApiService} 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 ICommonsGetAllV1ApiService<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 ACommonsGetAllV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsV1ApiService<T> implements ICommonsGetAllV1ApiService<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/core';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ACommonsGetAllV1ApiService} 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 ICommonsCrudV1ApiService<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 ACommonsCrudV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsGetAllV1ApiService<T, QRT> implements ICommonsCrudV1ApiService<T> {\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/core';\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, Provider} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {ObjectSerializer} from '@mediusinc/mng-commons-data-api-class';\nimport {COMMONS_MODULE_CONFIG_IT, CommonsFeature, CommonsFeatureTypeEnum, CommonsModuleConfig, TypeRegistry} from '@mediusinc/mng-commons/core';\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';\nimport {COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT} from './services/tokens/data-api-class.token';\n\nfunction initializeQpTypesAndSerDer(config: CommonsModuleConfig): boolean {\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\n return true;\n}\n\nfunction initializeDataApiObsolete(config: CommonsModuleConfig): () => Observable<void> {\n return () => {\n initializeQpTypesAndSerDer(config);\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 withDataApiV1(): CommonsFeature {\n return {\n type: CommonsFeatureTypeEnum.DataApiAsClassV1,\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: initializeDataApiObsolete,\n deps: [COMMONS_MODULE_CONFIG_IT],\n multi: true\n },\n {\n provide: COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT,\n useValue: true\n }\n ]\n };\n}\n\nexport function provideDataApiV1Child(): Provider {\n return {\n provide: COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT,\n useFactory: initializeQpTypesAndSerDer,\n deps: [COMMONS_MODULE_CONFIG_IT]\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/tokens/data-api-class.token';\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,IAAI,EAAE,UAAU;AAChB,YAAA,QAAQ,EAAE,UAAU;AACpB,YAAA,IAAI,EAAE,QAAQ;AACjB,SAAA;AACD,QAAA;AACI,YAAA,IAAI,EAAE,aAAa;AACnB,YAAA,QAAQ,EAAE,cAAc;AACxB,YAAA,IAAI,EAAE,QAAQ;AACj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,CAAC,wBAAwB,CAAC;AAChC,gBAAA,KAAK,EAAE,IAAI;AACd,aAAA;AACD,YAAA;AACI,gBAAA,OAAO,EAAE,yCAAyC;AAClD,gBAAA,QAAQ,EAAE,IAAI;AACjB,aAAA;AACJ,SAAA;KACJ,CAAC;AACN,CAAC;SAEe,qBAAqB,GAAA;IACjC,OAAO;AACH,QAAA,OAAO,EAAE,yCAAyC;AAClD,QAAA,UAAU,EAAE,0BAA0B;QACtC,IAAI,EAAE,CAAC,wBAAwB,CAAC;KACnC,CAAC;AACN;;AC/DA;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mediusinc-mng-commons-data-api-class-v1.mjs","sources":["../../v1/src/models/filter-match-type.model.ts","../../v1/src/models/filter-param.model.ts","../../v1/src/models/query-mode.model.ts","../../v1/src/models/query-param.model.ts","../../v1/src/models/builders/query-param.builder.ts","../../v1/src/helpers/query-param-convert.ts","../../v1/src/tableview/tableview-crud.data-provider.ts","../../v1/src/helpers/tableview-crud-create.ts","../../v1/src/models/query-result.model.ts","../../v1/src/services/tokens/data-api-class.token.ts","../../v1/src/services/api.abstract.service.ts","../../v1/src/services/get-all-api.abstract.service.ts","../../v1/src/services/crud-api.abstract.service.ts","../../v1/src/utils/query-param-map.util.ts","../../v1/src/provide.ts","../../v1/src/index.ts","../../v1/src/mediusinc-mng-commons-data-api-class-v1.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/core';\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/core';\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 {CommonsInternalError, DataListFilter, DataListFilterValueType, DataListParams, DataListResult, FilterMatchMode} from '@mediusinc/mng-commons/core';\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 toV1QueryParam(): undefined;\nexport function toV1QueryParam<Sorts = string, Filters extends keyof any = string>(params: DataListParams<Sorts, Filters>, map?: QueryParamMap<Sorts, Filters>): MediusQueryParam;\nexport function toV1QueryParam<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 toV1QueryParam<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 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 ? toV1FilterMatchType(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 toV1FilterMatchType(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 CommonsInternalError(`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 executeV1GetAll<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 = toV1QueryParam(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, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {findClassIdAttribute} from '@mediusinc/mng-commons/model';\nimport {TableviewDataProviderInst} from '@mediusinc/mng-commons/tableview/api';\n\nimport {toV1QueryParam} 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 {ICommonsCrudV1ApiService} from '../services/crud-api.abstract.service';\nimport {ICommonsGetAllV1ApiService} 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 TableviewCrudV1DataProviderInst<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<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.getAllPost(toV1QueryParam(params), undefined, locale).pipe(map(res => ({data: res.pageData ?? [], totalCount: res.allDataCount ?? res.pageData?.length ?? 0})))\n );\n\n if (useGetAllForFetch) {\n const selectedIdPropertyName = idPropertyName ?? findClassIdAttribute(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 TableviewCrudV1DataProvider extends TableviewCrudV1DataProviderInst<any, any> {\n /**\n * @deprecated\n */\n public static create<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: keyof Model, useGetAllForFetch = false): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters> {\n return TableviewCrudV1DataProvider.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 ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<MediusQueryResult<Model>>,\n Sorts = keyof Model,\n Filters extends keyof any = keyof Model\n >(type: ClassType<Model>, serviceType: Type<Service>, idProperty?: string, useGetAllForFetch = false): TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters> {\n return new TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>(type, serviceType, idProperty, useGetAllForFetch);\n }\n}\n","import {Injector, inject} from '@angular/core';\n\nimport {ClassType, ServiceClassType} from '@mediusinc/mng-commons/core';\nimport {TableviewDescriptorInst, TableviewInputBuilder, tableviewDescriptorFromClass} from '@mediusinc/mng-commons/tableview/api';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ICommonsCrudV1ApiService} from '../services/crud-api.abstract.service';\nimport {ICommonsGetAllV1ApiService} from '../services/get-all-api.abstract.service';\nimport {TableviewCrudV1DataProvider, TableviewCrudV1DataProviderInst} 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 tableviewCrudV1<\n Model,\n Service extends ICommonsCrudV1ApiService<Model> & ICommonsGetAllV1ApiService<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: TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >\n ) => void\n) {\n const builder = new TableviewInputBuilder<\n Model,\n Service,\n TableviewDescriptorInst<Model, Sorts, Filters>,\n TableviewCrudV1DataProviderInst<Model, Service, Sorts, Filters>,\n Sorts,\n Filters\n >(\n tableviewDescriptorFromClass(type, {id: modelConfig?.idProperty, title: modelConfig?.titleProperty, i18nBase: modelConfig?.i18nBaseKey}),\n TableviewCrudV1DataProvider.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/core';\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 {InjectionToken} from '@angular/core';\n\n/**\n * Some fake token to incept needed types for query params and object serializer setup\n */\nexport const COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT = new InjectionToken<boolean>('CommonsDataApiClassObsolete');\n","import {HttpClient} from '@angular/common/http';\nimport {inject} from '@angular/core';\n\nimport {ObjectSerializer} from '@mediusinc/mng-commons-data-api-class';\nimport {ClassType} from '@mediusinc/mng-commons/core';\n\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT} from './tokens/data-api-class.token';\n\n/**\n * This is an abstract class that provides base functionality for API services.\n *\n * @deprecated\n */\nexport abstract class ACommonsBaseV1ApiService {\n protected readonly objectSerializer: ObjectSerializer = ObjectSerializer.get();\n protected readonly http = inject(HttpClient);\n protected readonly obsoleteConfig = inject(COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT);\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 ACommonsV1ApiService.\n *\n * @typeparam T The main type of data to be handled by the service.\n *\n * @deprecated\n */\nexport abstract class ACommonsV1ApiService<T> extends ACommonsBaseV1ApiService {\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/core';\n\nimport {MediusQueryParam} from '../models/query-param.model';\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ACommonsV1ApiService} 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 ICommonsGetAllV1ApiService<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 ACommonsGetAllV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsV1ApiService<T> implements ICommonsGetAllV1ApiService<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/core';\n\nimport {MediusQueryResult} from '../models/query-result.model';\nimport {ACommonsGetAllV1ApiService} 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 ICommonsCrudV1ApiService<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 ACommonsCrudV1ApiService<T, QRT extends MediusQueryResult<any>> extends ACommonsGetAllV1ApiService<T, QRT> implements ICommonsCrudV1ApiService<T> {\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/core';\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, Provider} from '@angular/core';\n\nimport {Observable, of} from 'rxjs';\n\nimport {ObjectSerializer} from '@mediusinc/mng-commons-data-api-class';\nimport {COMMONS_MODULE_CONFIG_IT, CommonsFeature, CommonsFeatureTypeEnum, CommonsModuleConfig, TypeRegistry} from '@mediusinc/mng-commons/core';\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';\nimport {COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT} from './services/tokens/data-api-class.token';\n\nfunction initializeQpTypesAndSerDer(config: CommonsModuleConfig): boolean {\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\n return true;\n}\n\nfunction initializeDataApiObsolete(config: CommonsModuleConfig): () => Observable<void> {\n return () => {\n initializeQpTypesAndSerDer(config);\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 withDataApiV1(): CommonsFeature {\n return {\n type: CommonsFeatureTypeEnum.DataApiAsClassV1,\n providers: [\n {\n provide: APP_INITIALIZER,\n useFactory: initializeDataApiObsolete,\n deps: [COMMONS_MODULE_CONFIG_IT],\n multi: true\n },\n {\n provide: COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT,\n useValue: true\n }\n ]\n };\n}\n\nexport function provideDataApiV1Child(): Provider {\n return {\n provide: COMMONS_DATA_API_CLASS_OBSOLETE_CONFIG_IT,\n useFactory: initializeQpTypesAndSerDer,\n deps: [COMMONS_MODULE_CONFIG_IT]\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/tokens/data-api-class.token';\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;AAAZ,CAAA,UAAY,qBAAqB,EAAA;AAC7B,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,qBAAA,CAAA,WAAA,CAAA,GAAA,YAAwB;AACxB,IAAA,qBAAA,CAAA,QAAA,CAAA,GAAA,SAAkB;AAClB,IAAA,qBAAA,CAAA,UAAA,CAAA,GAAA,UAAqB;AACrB,IAAA,qBAAA,CAAA,YAAA,CAAA,GAAA,aAA0B;AAC1B,IAAA,qBAAA,CAA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AA2B,EAAA;AAC1D,IAAA,OAAO,MAAK;QACR,0BAA0B,CAAC,MAAM,CAAC;AAClC,QAAA,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;AACrB,KAAC;AACL;AAEA;;;;;;AAMG;SACa,aAAa,GAAA;IACzB,OAAO;QACH,IAAI,EAAE,sBAAsB,CAAC,gBAAgB;AAC7C,QAAA,SAAS,EAAE;AACP,YAAA;AACI,gBAAA,OAAO,EAAE,eAAe;AACxB,gBAAA,UAAU,EAAE,yBAAyB;gBACrC,IAAI,EAAE,CAAC,wBAAwB,CAAC;AAChC,gBAAA,KAAK,EAAE;AACV,aAAA;AACD,YAAA;AACI,gBAAA,OAAO,EAAE,yCAAyC;AAClD,gBAAA,QAAQ,EAAE;AACb;AACJ;KACJ;AACL;SAEgB,qBAAqB,GAAA;IACjC,OAAO;AACH,QAAA,OAAO,EAAE,yCAAyC;AAClD,QAAA,UAAU,EAAE,0BAA0B;QACtC,IAAI,EAAE,CAAC,wBAAwB;KAClC;AACL;;AC/DA;;ACAA;;AAEG;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"mediusinc-mng-commons-data-api-class.mjs","sources":["../../src/lib/models/query-result.model.ts","../../src/lib/serder/object-serializer.ts","../../src/lib/services/api.abstract.service.ts","../../src/lib/services/get-all-api.abstract.service.ts","../../src/lib/services/crud-api.abstract.service.ts","../../src/index.ts","../../src/mediusinc-mng-commons-data-api-class.ts"],"sourcesContent":["import {ClassAttributeDef} from '@mediusinc/mng-commons/core';\n\nexport class QueryResult<Item> implements IMediusQueryResultV2<Item> {\n totalCount?: number;\n data?: Array<Item>;\n\n static discriminator?: string;\n\n static fromArray<Item>(pageData: Item[], allDataCount?: number) {\n const mqr = new QueryResult<Item>();\n mqr.totalCount = allDataCount ?? pageData.length;\n mqr.data = pageData;\n return mqr;\n }\n\n static attributeTypeMap: Array<ClassAttributeDef> = [\n {\n name: 'totalCount',\n baseName: 'totalCount',\n type: 'number'\n },\n {\n name: 'data',\n baseName: 'data',\n type: 'Array<T>'\n }\n ];\n\n static getAttributeTypeMap() {\n return QueryResult.attributeTypeMap;\n }\n}\n\nexport interface IMediusQueryResultV2<Item> {\n totalCount?: number;\n data?: Array<Item>;\n}\n","import {ClassAttributeDef, ClassType, TypeRegistry, dateToIsoString, findReflectTypeName} from '@mediusinc/mng-commons/core';\n\nexport class ObjectSerializer {\n private static _instance: ObjectSerializer = new ObjectSerializer();\n private readonly _logCategory = 'ObjectSerializer';\n private readonly _primitives: string[] = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];\n\n private dateTimeInUtc = false;\n private dateTimeWithTimezone = true;\n private dateTimeWithMillis = true;\n\n public get primitives() {\n return this._primitives;\n }\n\n /**\n * Only use one instance of object (out of Angular context)\n */\n public static get(): ObjectSerializer {\n return ObjectSerializer._instance;\n }\n\n public configure(config: {dateTimeInUtc?: boolean; dateTimeWithTimezone?: boolean; dateTimeWithMillis?: boolean}): void {\n if (config.dateTimeInUtc !== undefined) {\n this.dateTimeInUtc = config.dateTimeInUtc;\n }\n if (config.dateTimeWithTimezone !== undefined) {\n this.dateTimeWithTimezone = config.dateTimeWithTimezone;\n }\n if (config.dateTimeWithMillis !== undefined) {\n this.dateTimeWithMillis = config.dateTimeWithMillis;\n }\n }\n\n public findCorrectType(data: any, expectedTypeName: string): string {\n if (data == undefined) {\n return expectedTypeName;\n } else if (this._primitives.indexOf(expectedTypeName.toLowerCase()) !== -1) {\n return expectedTypeName;\n } else if (expectedTypeName === 'Date') {\n return expectedTypeName;\n } else {\n const enumType = TypeRegistry.get().findEnum(expectedTypeName);\n if (enumType) {\n return expectedTypeName;\n }\n\n const type = TypeRegistry.get().findType(expectedTypeName);\n if (!type) {\n return expectedTypeName; // w/e we don't know the type\n }\n\n // Check the discriminator\n const discriminatorProperty = type.discriminator;\n if (discriminatorProperty == null) {\n return expectedTypeName; // the type does not have a discriminator. use it.\n } else {\n if (data[discriminatorProperty]) {\n const discriminatorType = data[discriminatorProperty];\n const type = TypeRegistry.get().findType(expectedTypeName);\n if (type) {\n return discriminatorType; // use the type given in the discriminator\n } else {\n return expectedTypeName; // discriminator did not map to a type\n }\n } else {\n return expectedTypeName; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n\n public serializeClass<T>(data: T, type: ClassType<T>) {\n return this.serialize(data, findReflectTypeName(type) ?? undefined);\n }\n\n public serializeClassArray<T>(data: Array<T>, type: ClassType<T>) {\n return this.serialize(data, `Array<${findReflectTypeName(type)}>`);\n }\n\n public serialize(data: any, typeName?: string, subtype?: string) {\n if (data == undefined) {\n return data;\n } else if (typeName && this._primitives.indexOf(typeName.toLowerCase()) !== -1) {\n return data;\n } else if (typeName && typeName.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = typeName.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.serialize(datum, subType));\n }\n return transformedData;\n } else if (typeName === 'Date') {\n const dateOnly = subtype?.toLowerCase() === 'date';\n return dateToIsoString(data, dateOnly ? 'date' : 'date-time', {\n utc: this.dateTimeInUtc,\n noTimezone: !this.dateTimeWithTimezone,\n noMillis: !this.dateTimeWithMillis\n });\n } else if (typeName) {\n const enumType = TypeRegistry.get().findEnum(typeName);\n if (enumType) {\n return data;\n }\n\n const type = TypeRegistry.get().findType(typeName);\n if (!type) {\n // in case we dont know the type\n return data;\n }\n\n // Get the actual type of this object\n const correctedTypeName = this.findCorrectType(data, typeName);\n const correctedType = TypeRegistry.get().findType(correctedTypeName);\n\n // get the map for the correct type.\n const attributeTypes = correctedType.getAttributeTypeMap() as Array<ClassAttributeDef>;\n const instance: {[index: string]: any} = {};\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.baseName] = this.serialize(data[attributeType.name], attributeType.type, attributeType.subtype);\n }\n return instance;\n } else {\n return data;\n }\n }\n\n public deserializeClass<T>(data: any, type: ClassType<T>): T {\n return this.deserialize(data, findReflectTypeName(type) ?? undefined);\n }\n\n public deserializeClassArray<T>(data: any, type: ClassType<T>): Array<T> {\n return this.deserialize(data, `Array<${findReflectTypeName(type)}>`);\n }\n\n public deserialize(data: any, type?: string) {\n // polymorphism may change the actual type.\n if (data == undefined || !type) {\n return data;\n }\n\n const correctedTypeName = this.findCorrectType(data, type);\n\n if (this._primitives.indexOf(correctedTypeName.toLowerCase()) !== -1) {\n return data;\n } else if (correctedTypeName.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = correctedTypeName.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.deserialize(datum, subType));\n }\n return transformedData;\n } else if (correctedTypeName === 'Date') {\n return new Date(data);\n } else {\n const enumType = TypeRegistry.get().findEnum(correctedTypeName);\n if (enumType) {\n // is Enum\n return data;\n }\n\n const correctedType = TypeRegistry.get().findType(correctedTypeName);\n if (!correctedType) {\n // dont know the type\n return data;\n }\n const instance = new correctedType();\n const attributeTypes = correctedType.getAttributeTypeMap() as Array<ClassAttributeDef>;\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.name] = this.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {inject} from '@angular/core';\n\nimport {ClassType} from '@mediusinc/mng-commons/core';\n\nimport {ObjectSerializer} from '../serder/object-serializer';\n\nexport abstract class ACommonsBaseApiService {\n protected readonly objectSerializer = ObjectSerializer.get();\n protected readonly http = inject(HttpClient);\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 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\nexport abstract class ACommonsApiService<T> extends ACommonsBaseApiService {\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, DataListParams, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery} from '@mediusinc/mng-commons/core';\n\nimport {QueryResult} from '../models/query-result.model';\nimport {ACommonsApiService} from './api.abstract.service';\n\nexport interface ICommonsGetAllApiService<QRT extends QueryResult<any>> {\n getAllGet(requestParams?: DataListParams<any, any>, params?: HttpParams, locale?: string): Observable<QRT>;\n}\n\nexport abstract class ACommonsGetAllApiService<FetchType, QueryResultType extends QueryResult<any>>\n extends ACommonsApiService<FetchType>\n implements ICommonsGetAllApiService<QueryResultType>\n{\n protected constructor(\n fetchType: ClassType<FetchType>,\n protected queryResultType: ClassType<QueryResultType>\n ) {\n super(fetchType);\n }\n\n public getAllGet(requestParams?: DataListParams, params?: HttpParams, locale?: string): Observable<QueryResultType> {\n const url = this.getUrl(this.getGetAllGetPath());\n if (!params) {\n params = new HttpParams();\n }\n if (locale) {\n params = params.set('lang', locale);\n }\n\n if (requestParams?.limit) {\n params = params.set('limit', requestParams.limit);\n }\n if (requestParams?.offset) {\n params = params.set('offset', requestParams.offset);\n }\n\n const sort = dataListParamsSortToUrlQuery(requestParams);\n if (sort) {\n params = params.set('sort', sort);\n }\n\n if (requestParams?.filters) {\n Object.keys(requestParams.filters).forEach(key => {\n const value = dataListParamsFiltersToUrlQuery(requestParams, key);\n if (value) {\n params = params!.set(key, value);\n }\n });\n }\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.deserializeQueryResult(res, this.queryResultType)));\n }\n\n protected getGetAllGetPath(): 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/core';\n\nimport {QueryResult} from '../models/query-result.model';\nimport {ACommonsGetAllApiService} from './get-all-api.abstract.service';\n\nexport interface ICommonsCrudApiService<FetchType, RequestType> {\n createPost?(item: RequestType, params?: HttpParams): Observable<FetchType>;\n\n getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<FetchType>;\n\n updatePut?(id: IdType, item: RequestType, params?: HttpParams): Observable<FetchType>;\n\n removeDelete?(id: IdType, item?: FetchType, params?: HttpParams): Observable<FetchType | null>;\n}\n\nexport abstract class ACommonsCrudApiService<FetchType, RequestType, QueryResultType extends QueryResult<any>>\n extends ACommonsGetAllApiService<FetchType, QueryResultType>\n implements ICommonsCrudApiService<FetchType, RequestType>\n{\n protected constructor(\n fetchType: ClassType<FetchType>,\n protected requestType: ClassType<RequestType>,\n queryResultType: ClassType<QueryResultType>\n ) {\n super(fetchType, queryResultType);\n }\n\n public createPost(item: RequestType, params?: HttpParams): Observable<FetchType> {\n const url = this.getUrl(this.getCreatePostPath(item));\n return this.http\n .post<unknown>(url, this.serializeRequest(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<FetchType> {\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: RequestType, params?: HttpParams): Observable<FetchType> {\n const url = this.getUrl(this.getUpdatePutPath(id, item));\n return this.http\n .put<unknown>(url, this.serializeRequest(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?: FetchType, params?: HttpParams): Observable<FetchType | 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: RequestType): string {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getUpdatePutPath(id: IdType, item: RequestType): string {\n return ``;\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?: FetchType) {\n return `/${id}`;\n }\n\n protected deserializeRequest(item: any): RequestType {\n return this.deserializeClass(item, this.requestType);\n }\n\n protected serializeRequest(item: RequestType): any {\n return this.serializeClass(item, this.requestType);\n }\n}\n","// models\nexport * from './lib/models/query-result.model';\n\n// serder\nexport * from './lib/serder/object-serializer';\n\n// services\nexport * from './lib/services/api.abstract.service';\nexport * from './lib/services/crud-api.abstract.service';\nexport * from './lib/services/get-all-api.abstract.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAEa,WAAW,CAAA;AAMpB,IAAA,OAAO,SAAS,CAAO,QAAgB,EAAE,YAAqB,EAAA;AAC1D,QAAA,MAAM,GAAG,GAAG,IAAI,WAAW,EAAQ,CAAC;QACpC,GAAG,CAAC,UAAU,GAAG,YAAY,IAAI,QAAQ,CAAC,MAAM,CAAC;AACjD,QAAA,GAAG,CAAC,IAAI,GAAG,QAAQ,CAAC;AACpB,QAAA,OAAO,GAAG,CAAC;KACd;AAEM,IAAA,SAAA,IAAA,CAAA,gBAAgB,GAA6B;AAChD,QAAA;AACI,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,QAAQ,EAAE,YAAY;AACtB,YAAA,IAAI,EAAE,QAAQ;AACjB,SAAA;AACD,QAAA;AACI,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,IAAI,EAAE,UAAU;AACnB,SAAA;KACJ,CAAC,EAAA;AAEF,IAAA,OAAO,mBAAmB,GAAA;QACtB,OAAO,WAAW,CAAC,gBAAgB,CAAC;KACvC;;;MC5BQ,gBAAgB,CAAA;AAA7B,IAAA,WAAA,GAAA;QAEqB,IAAY,CAAA,YAAA,GAAG,kBAAkB,CAAC;AAClC,QAAA,IAAA,CAAA,WAAW,GAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAA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,CAAA,EAAI,EAAE,CAAA,CAAE,CAAC;KACnB;;IAGS,mBAAmB,CAAC,EAAU,EAAE,IAAgB,EAAA;QACtD,OAAO,CAAA,CAAA,EAAI,EAAE,CAAA,CAAE,CAAC;KACnB;AAES,IAAA,kBAAkB,CAAC,IAAS,EAAA;QAClC,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;KACxD;AAES,IAAA,gBAAgB,CAAC,IAAiB,EAAA;QACxC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC,CAAC;KACtD;AACJ;;AChHD;;ACAA;;AAEG;;;;"}
1
+ {"version":3,"file":"mediusinc-mng-commons-data-api-class.mjs","sources":["../../src/lib/models/query-result.model.ts","../../src/lib/serder/object-serializer.ts","../../src/lib/services/api.abstract.service.ts","../../src/lib/services/get-all-api.abstract.service.ts","../../src/lib/services/crud-api.abstract.service.ts","../../src/index.ts","../../src/mediusinc-mng-commons-data-api-class.ts"],"sourcesContent":["import {ClassAttributeDef} from '@mediusinc/mng-commons/core';\n\nexport class QueryResult<Item> implements IMediusQueryResultV2<Item> {\n totalCount?: number;\n data?: Array<Item>;\n\n static discriminator?: string;\n\n static fromArray<Item>(pageData: Item[], allDataCount?: number) {\n const mqr = new QueryResult<Item>();\n mqr.totalCount = allDataCount ?? pageData.length;\n mqr.data = pageData;\n return mqr;\n }\n\n static attributeTypeMap: Array<ClassAttributeDef> = [\n {\n name: 'totalCount',\n baseName: 'totalCount',\n type: 'number'\n },\n {\n name: 'data',\n baseName: 'data',\n type: 'Array<T>'\n }\n ];\n\n static getAttributeTypeMap() {\n return QueryResult.attributeTypeMap;\n }\n}\n\nexport interface IMediusQueryResultV2<Item> {\n totalCount?: number;\n data?: Array<Item>;\n}\n","import {ClassAttributeDef, ClassType, TypeRegistry, dateToIsoString, findReflectTypeName} from '@mediusinc/mng-commons/core';\n\nexport class ObjectSerializer {\n private static _instance: ObjectSerializer = new ObjectSerializer();\n private readonly _logCategory = 'ObjectSerializer';\n private readonly _primitives: string[] = ['string', 'boolean', 'double', 'integer', 'long', 'float', 'number', 'any'];\n\n private dateTimeInUtc = false;\n private dateTimeWithTimezone = true;\n private dateTimeWithMillis = true;\n\n public get primitives() {\n return this._primitives;\n }\n\n /**\n * Only use one instance of object (out of Angular context)\n */\n public static get(): ObjectSerializer {\n return ObjectSerializer._instance;\n }\n\n public configure(config: {dateTimeInUtc?: boolean; dateTimeWithTimezone?: boolean; dateTimeWithMillis?: boolean}): void {\n if (config.dateTimeInUtc !== undefined) {\n this.dateTimeInUtc = config.dateTimeInUtc;\n }\n if (config.dateTimeWithTimezone !== undefined) {\n this.dateTimeWithTimezone = config.dateTimeWithTimezone;\n }\n if (config.dateTimeWithMillis !== undefined) {\n this.dateTimeWithMillis = config.dateTimeWithMillis;\n }\n }\n\n public findCorrectType(data: any, expectedTypeName: string): string {\n if (data == undefined) {\n return expectedTypeName;\n } else if (this._primitives.indexOf(expectedTypeName.toLowerCase()) !== -1) {\n return expectedTypeName;\n } else if (expectedTypeName === 'Date') {\n return expectedTypeName;\n } else {\n const enumType = TypeRegistry.get().findEnum(expectedTypeName);\n if (enumType) {\n return expectedTypeName;\n }\n\n const type = TypeRegistry.get().findType(expectedTypeName);\n if (!type) {\n return expectedTypeName; // w/e we don't know the type\n }\n\n // Check the discriminator\n const discriminatorProperty = type.discriminator;\n if (discriminatorProperty == null) {\n return expectedTypeName; // the type does not have a discriminator. use it.\n } else {\n if (data[discriminatorProperty]) {\n const discriminatorType = data[discriminatorProperty];\n const type = TypeRegistry.get().findType(expectedTypeName);\n if (type) {\n return discriminatorType; // use the type given in the discriminator\n } else {\n return expectedTypeName; // discriminator did not map to a type\n }\n } else {\n return expectedTypeName; // discriminator was not present (or an empty string)\n }\n }\n }\n }\n\n public serializeClass<T>(data: T, type: ClassType<T>) {\n return this.serialize(data, findReflectTypeName(type) ?? undefined);\n }\n\n public serializeClassArray<T>(data: Array<T>, type: ClassType<T>) {\n return this.serialize(data, `Array<${findReflectTypeName(type)}>`);\n }\n\n public serialize(data: any, typeName?: string, subtype?: string) {\n if (data == undefined) {\n return data;\n } else if (typeName && this._primitives.indexOf(typeName.toLowerCase()) !== -1) {\n return data;\n } else if (typeName && typeName.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = typeName.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.serialize(datum, subType));\n }\n return transformedData;\n } else if (typeName === 'Date') {\n const dateOnly = subtype?.toLowerCase() === 'date';\n return dateToIsoString(data, dateOnly ? 'date' : 'date-time', {\n utc: this.dateTimeInUtc,\n noTimezone: !this.dateTimeWithTimezone,\n noMillis: !this.dateTimeWithMillis\n });\n } else if (typeName) {\n const enumType = TypeRegistry.get().findEnum(typeName);\n if (enumType) {\n return data;\n }\n\n const type = TypeRegistry.get().findType(typeName);\n if (!type) {\n // in case we dont know the type\n return data;\n }\n\n // Get the actual type of this object\n const correctedTypeName = this.findCorrectType(data, typeName);\n const correctedType = TypeRegistry.get().findType(correctedTypeName);\n\n // get the map for the correct type.\n const attributeTypes = correctedType.getAttributeTypeMap() as Array<ClassAttributeDef>;\n const instance: {[index: string]: any} = {};\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.baseName] = this.serialize(data[attributeType.name], attributeType.type, attributeType.subtype);\n }\n return instance;\n } else {\n return data;\n }\n }\n\n public deserializeClass<T>(data: any, type: ClassType<T>): T {\n return this.deserialize(data, findReflectTypeName(type) ?? undefined);\n }\n\n public deserializeClassArray<T>(data: any, type: ClassType<T>): Array<T> {\n return this.deserialize(data, `Array<${findReflectTypeName(type)}>`);\n }\n\n public deserialize(data: any, type?: string) {\n // polymorphism may change the actual type.\n if (data == undefined || !type) {\n return data;\n }\n\n const correctedTypeName = this.findCorrectType(data, type);\n\n if (this._primitives.indexOf(correctedTypeName.toLowerCase()) !== -1) {\n return data;\n } else if (correctedTypeName.lastIndexOf('Array<', 0) === 0) {\n // string.startsWith pre es6\n let subType: string = correctedTypeName.replace('Array<', ''); // Array<Type> => Type>\n subType = subType.substring(0, subType.length - 1); // Type> => Type\n const transformedData: any[] = [];\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < data.length; index++) {\n const datum = data[index];\n transformedData.push(this.deserialize(datum, subType));\n }\n return transformedData;\n } else if (correctedTypeName === 'Date') {\n return new Date(data);\n } else {\n const enumType = TypeRegistry.get().findEnum(correctedTypeName);\n if (enumType) {\n // is Enum\n return data;\n }\n\n const correctedType = TypeRegistry.get().findType(correctedTypeName);\n if (!correctedType) {\n // dont know the type\n return data;\n }\n const instance = new correctedType();\n const attributeTypes = correctedType.getAttributeTypeMap() as Array<ClassAttributeDef>;\n // tslint:disable-next-line:prefer-for-of\n for (let index = 0; index < attributeTypes.length; index++) {\n const attributeType = attributeTypes[index];\n instance[attributeType.name] = this.deserialize(data[attributeType.baseName], attributeType.type);\n }\n return instance;\n }\n }\n}\n","import {HttpClient} from '@angular/common/http';\nimport {inject} from '@angular/core';\n\nimport {ClassType} from '@mediusinc/mng-commons/core';\n\nimport {ObjectSerializer} from '../serder/object-serializer';\n\nexport abstract class ACommonsBaseApiService {\n protected readonly objectSerializer = ObjectSerializer.get();\n protected readonly http = inject(HttpClient);\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 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\nexport abstract class ACommonsApiService<T> extends ACommonsBaseApiService {\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, DataListParams, dataListParamsFiltersToUrlQuery, dataListParamsSortToUrlQuery} from '@mediusinc/mng-commons/core';\n\nimport {QueryResult} from '../models/query-result.model';\nimport {ACommonsApiService} from './api.abstract.service';\n\nexport interface ICommonsGetAllApiService<QRT extends QueryResult<any>> {\n getAllGet(requestParams?: DataListParams<any, any>, params?: HttpParams, locale?: string): Observable<QRT>;\n}\n\nexport abstract class ACommonsGetAllApiService<FetchType, QueryResultType extends QueryResult<any>>\n extends ACommonsApiService<FetchType>\n implements ICommonsGetAllApiService<QueryResultType>\n{\n protected constructor(\n fetchType: ClassType<FetchType>,\n protected queryResultType: ClassType<QueryResultType>\n ) {\n super(fetchType);\n }\n\n public getAllGet(requestParams?: DataListParams, params?: HttpParams, locale?: string): Observable<QueryResultType> {\n const url = this.getUrl(this.getGetAllGetPath());\n if (!params) {\n params = new HttpParams();\n }\n if (locale) {\n params = params.set('lang', locale);\n }\n\n if (requestParams?.limit) {\n params = params.set('limit', requestParams.limit);\n }\n if (requestParams?.offset) {\n params = params.set('offset', requestParams.offset);\n }\n\n const sort = dataListParamsSortToUrlQuery(requestParams);\n if (sort) {\n params = params.set('sort', sort);\n }\n\n if (requestParams?.filters) {\n Object.keys(requestParams.filters).forEach(key => {\n const value = dataListParamsFiltersToUrlQuery(requestParams, key);\n if (value) {\n params = params!.set(key, value);\n }\n });\n }\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.deserializeQueryResult(res, this.queryResultType)));\n }\n\n protected getGetAllGetPath(): 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/core';\n\nimport {QueryResult} from '../models/query-result.model';\nimport {ACommonsGetAllApiService} from './get-all-api.abstract.service';\n\nexport interface ICommonsCrudApiService<FetchType, RequestType> {\n createPost?(item: RequestType, params?: HttpParams): Observable<FetchType>;\n\n getByIdGet?(id: IdType, params?: HttpParams, locale?: string): Observable<FetchType>;\n\n updatePut?(id: IdType, item: RequestType, params?: HttpParams): Observable<FetchType>;\n\n removeDelete?(id: IdType, item?: FetchType, params?: HttpParams): Observable<FetchType | null>;\n}\n\nexport abstract class ACommonsCrudApiService<FetchType, RequestType, QueryResultType extends QueryResult<any>>\n extends ACommonsGetAllApiService<FetchType, QueryResultType>\n implements ICommonsCrudApiService<FetchType, RequestType>\n{\n protected constructor(\n fetchType: ClassType<FetchType>,\n protected requestType: ClassType<RequestType>,\n queryResultType: ClassType<QueryResultType>\n ) {\n super(fetchType, queryResultType);\n }\n\n public createPost(item: RequestType, params?: HttpParams): Observable<FetchType> {\n const url = this.getUrl(this.getCreatePostPath(item));\n return this.http\n .post<unknown>(url, this.serializeRequest(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<FetchType> {\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: RequestType, params?: HttpParams): Observable<FetchType> {\n const url = this.getUrl(this.getUpdatePutPath(id, item));\n return this.http\n .put<unknown>(url, this.serializeRequest(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?: FetchType, params?: HttpParams): Observable<FetchType | 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: RequestType): string {\n return '';\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n protected getUpdatePutPath(id: IdType, item: RequestType): string {\n return ``;\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?: FetchType) {\n return `/${id}`;\n }\n\n protected deserializeRequest(item: any): RequestType {\n return this.deserializeClass(item, this.requestType);\n }\n\n protected serializeRequest(item: RequestType): any {\n return this.serializeClass(item, this.requestType);\n }\n}\n","// models\nexport * from './lib/models/query-result.model';\n\n// serder\nexport * from './lib/serder/object-serializer';\n\n// services\nexport * from './lib/services/api.abstract.service';\nexport * from './lib/services/crud-api.abstract.service';\nexport * from './lib/services/get-all-api.abstract.service';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;MAEa,WAAW,CAAA;AAMpB,IAAA,OAAO,SAAS,CAAO,QAAgB,EAAE,YAAqB,EAAA;AAC1D,QAAA,MAAM,GAAG,GAAG,IAAI,WAAW,EAAQ;QACnC,GAAG,CAAC,UAAU,GAAG,YAAY,IAAI,QAAQ,CAAC,MAAM;AAChD,QAAA,GAAG,CAAC,IAAI,GAAG,QAAQ;AACnB,QAAA,OAAO,GAAG;;AAGP,IAAA,SAAA,IAAA,CAAA,gBAAgB,GAA6B;AAChD,QAAA;AACI,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,QAAQ,EAAE,YAAY;AACtB,YAAA,IAAI,EAAE;AACT,SAAA;AACD,QAAA;AACI,YAAA,IAAI,EAAE,MAAM;AACZ,YAAA,QAAQ,EAAE,MAAM;AAChB,YAAA,IAAI,EAAE;AACT;KACJ,CAAC;AAEF,IAAA,OAAO,mBAAmB,GAAA;QACtB,OAAO,WAAW,CAAC,gBAAgB;;;;MC3B9B,gBAAgB,CAAA;AAA7B,IAAA,WAAA,GAAA;QAEqB,IAAY,CAAA,YAAA,GAAG,kBAAkB;AACjC,QAAA,IAAA,CAAA,WAAW,GAAa,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,CAAC;QAE7G,IAAa,CAAA,aAAA,GAAG,KAAK;QACrB,IAAoB,CAAA,oBAAA,GAAG,IAAI;QAC3B,IAAkB,CAAA,kBAAA,GAAG,IAAI;;AANlB,IAAA,SAAA,IAAA,CAAA,SAAS,GAAqB,IAAI,gBAAgB,EAAE,CAAC;AAQpE,IAAA,IAAW,UAAU,GAAA;QACjB,OAAO,IAAI,CAAC,WAAW;;AAG3B;;AAEG;AACI,IAA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,EAAA;QAClC,OAAO,IAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC;;AAG9C,IAAA,gBAAgB,CAAC,IAAiB,EAAA;QACxC,OAAO,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,IAAI,CAAC,WAAW,CAAC;;AAEzD;;AChHD;;ACAA;;AAEG;;;;"}
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons-data-api-class",
3
- "version": "5.5.0-rc.0",
3
+ "version": "5.5.0-rc.1",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^17.3.0 || ^18.0.0",
6
6
  "@angular/core": "^17.3.0 || ^18.0.0",
7
- "@mediusinc/mng-commons": "~5.5.0-rc.0"
7
+ "@mediusinc/mng-commons": "~5.5.0-rc.1"
8
8
  },
9
9
  "dependencies": {
10
- "tslib": "^2.3.0"
10
+ "tslib": "^2.8.1"
11
11
  },
12
12
  "publishConfig": {
13
13
  "directory": "dist"
package/version-info.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@mediusinc/mng-commons-data-api-class",
3
- "version": "5.5.0-rc.0",
3
+ "version": "5.5.0-rc.1",
4
4
  "tag": "v5.4.0-rc.7",
5
- "distance": 5,
6
- "hash": "4f490c8b",
5
+ "distance": 21,
6
+ "hash": "8c9a8e96",
7
7
  "dirty": true,
8
- "semver": "5.4.0-rc.7+5.g4f490c8b.dirty",
8
+ "semver": "5.4.0-rc.7+21.g8c9a8e96.dirty",
9
9
  "buildTimestamp": null,
10
- "raw": "v5.4.0-rc.7-5-4f490c8b-dirty"
10
+ "raw": "v5.4.0-rc.7-21-8c9a8e96-dirty"
11
11
  }