@mediusinc/mng-commons-audit 5.0.0-rc.0-c31d5206 → 5.0.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.
- package/README.md +12 -26
- package/esm2022/lib/api/models/entityChange.mjs +10 -10
- package/esm2022/lib/api/models/guiEntityModel.mjs +10 -10
- package/esm2022/lib/api/models/guiPropertyModel.mjs +10 -10
- package/esm2022/lib/api/models/guiPropertyType.mjs +13 -13
- package/esm2022/lib/api/models/guiRelationModel.mjs +10 -10
- package/esm2022/lib/api/models/revEntityWithChangesDto.mjs +10 -10
- package/esm2022/lib/api/models/revEntityWithStateDto.mjs +10 -10
- package/esm2022/lib/api/models/revisionType.mjs +11 -10
- package/esm2022/lib/api/services/audit-revisions-api.service.mjs +15 -15
- package/esm2022/lib/api/services/audit.service.mjs +12 -12
- package/esm2022/lib/audit.routes.mjs +17 -16
- package/esm2022/lib/components/entity-changes-field/entity-changes-field.component.mjs +17 -14
- package/esm2022/lib/components/pages/audit/audit.page.component.mjs +5 -5
- package/esm2022/lib/components/pages/entity-revisions/audit-entity-revisions.page.component.mjs +24 -20
- package/esm2022/lib/components/pages/revisions/audit-revisions.page.component.mjs +22 -19
- package/esm2022/lib/models/config.model.mjs +1 -1
- package/esm2022/lib/models/entity-revision-change-state.model.mjs +6 -6
- package/esm2022/lib/models/entity-revision-changes.model.mjs +6 -6
- package/esm2022/lib/models/guiEntityModelWithI18n.model.mjs +7 -7
- package/esm2022/lib/models/rev-entity-detailed.model.mjs +7 -7
- package/esm2022/lib/models/rev-entity.model.mjs +6 -6
- package/esm2022/lib/models/revEntityWithId.model.mjs +8 -8
- package/esm2022/lib/service/module-config.token.mjs +2 -2
- package/esm2022/lib/utils/audit.util.mjs +27 -25
- package/fesm2022/mediusinc-mng-commons-audit.mjs +153 -146
- package/fesm2022/mediusinc-mng-commons-audit.mjs.map +1 -1
- package/lib/api/models/entityChange.d.ts +4 -4
- package/lib/api/models/guiEntityModel.d.ts +4 -4
- package/lib/api/models/guiPropertyModel.d.ts +6 -6
- package/lib/api/models/guiPropertyType.d.ts +1 -1
- package/lib/api/models/guiRelationModel.d.ts +2 -2
- package/lib/api/models/revEntityWithChangesDto.d.ts +4 -4
- package/lib/api/models/revEntityWithStateDto.d.ts +4 -4
- package/lib/api/models/revisionType.d.ts +2 -2
- package/lib/api/services/audit-revisions-api.service.d.ts +13 -13
- package/lib/api/services/audit.service.d.ts +7 -7
- package/lib/audit.routes.d.ts +5 -5
- package/lib/components/entity-changes-field/entity-changes-field.component.d.ts +6 -6
- package/lib/components/pages/audit/audit.page.component.d.ts +3 -3
- package/lib/components/pages/entity-revisions/audit-entity-revisions.page.component.d.ts +15 -14
- package/lib/components/pages/revisions/audit-revisions.page.component.d.ts +9 -9
- package/lib/models/config.model.d.ts +1 -1
- package/lib/models/entity-revision-change-state.model.d.ts +3 -3
- package/lib/models/entity-revision-changes.model.d.ts +3 -3
- package/lib/models/guiEntityModelWithI18n.model.d.ts +2 -2
- package/lib/models/rev-entity-detailed.model.d.ts +4 -4
- package/lib/models/rev-entity.model.d.ts +2 -2
- package/lib/models/revEntityWithId.model.d.ts +2 -2
- package/lib/service/module-config.token.d.ts +2 -2
- package/lib/utils/audit.util.d.ts +15 -13
- package/package.json +7 -6
- /package/{assets/i18n → i18n}/en.json +0 -0
- /package/{assets/i18n → i18n}/sl.json +0 -0
package/lib/audit.routes.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { Routes } from '@angular/router';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { CommonsMenuItem, RouteBuilder } from '@mediusinc/mng-commons/core';
|
|
3
|
+
import { CommonsAuditModuleConfig } from './models/config.model';
|
|
4
4
|
/**
|
|
5
5
|
* Provides routes for the mng-commons-audit functionalities.
|
|
6
6
|
* @param config Module config for audit section.
|
|
7
7
|
* @param routeConfig Optionally provide route configs.
|
|
8
8
|
*/
|
|
9
|
-
export declare function
|
|
9
|
+
export declare function provideAuditRoutes(config: CommonsAuditModuleConfig, routeConfig?: {
|
|
10
10
|
defaultRedirect?: string;
|
|
11
11
|
preRevisionRoutes?: RouteBuilder[];
|
|
12
12
|
postRevisionRoutes?: RouteBuilder[];
|
|
13
|
-
revisionsMenuItem?:
|
|
14
|
-
entityRevisionsMenuItem?:
|
|
13
|
+
revisionsMenuItem?: CommonsMenuItem;
|
|
14
|
+
entityRevisionsMenuItem?: CommonsMenuItem;
|
|
15
15
|
}): Routes;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { Injector, OnInit } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject } from 'rxjs';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { AFormlyCustomFieldComponent } from '@mediusinc/mng-commons/tableview/api';
|
|
4
|
+
import { EntityRevisionChangeState } from '../../models/entity-revision-change-state.model';
|
|
5
|
+
import { EntityRevisionChanges } from '../../models/entity-revision-changes.model';
|
|
6
6
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class EntityChangesFieldComponent extends
|
|
7
|
+
export declare class EntityChangesFieldComponent extends AFormlyCustomFieldComponent implements OnInit {
|
|
8
8
|
injector?: Injector;
|
|
9
9
|
private destroyRef;
|
|
10
|
-
entityChanges:
|
|
10
|
+
entityChanges: EntityRevisionChanges[];
|
|
11
11
|
modelFetched: BehaviorSubject<boolean>;
|
|
12
12
|
private auditModel;
|
|
13
13
|
private fieldValue?;
|
|
14
14
|
ngOnInit(): void;
|
|
15
|
-
createDescriptor(entityChanges:
|
|
15
|
+
createDescriptor(entityChanges: EntityRevisionChanges): import("@mediusinc/mng-commons/table/api").TableDescriptorInst<EntityRevisionChangeState, keyof EntityRevisionChangeState, keyof EntityRevisionChangeState>;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityChangesFieldComponent, never>;
|
|
17
17
|
static ɵcmp: i0.ɵɵComponentDeclaration<EntityChangesFieldComponent, "mng-entity-changes-field", never, { "injector": { "alias": "injector"; "required": false; }; }, {}, never, never, true, never>;
|
|
18
18
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class
|
|
3
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
4
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
2
|
+
export declare class AuditPageComponent {
|
|
3
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditPageComponent, never>;
|
|
4
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuditPageComponent, "mng-audit-page", never, {}, {}, never, never, true, never>;
|
|
5
5
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { Nullable } from '@mediusinc/mng-commons/core';
|
|
2
|
+
import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
3
|
+
import { GuiEntityModelDto } from '../../../api/models/guiEntityModel';
|
|
4
|
+
import { AuditRevisionsApiService } from '../../../api/services/audit-revisions-api.service';
|
|
5
|
+
import { GuiEntityModelWithI18n } from '../../../models/guiEntityModelWithI18n.model';
|
|
6
|
+
import { RevEntityWithId } from '../../../models/revEntityWithId.model';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
|
-
export declare class
|
|
8
|
+
export declare class AuditEntityRevisionsPageComponent {
|
|
8
9
|
private readonly router;
|
|
9
10
|
private readonly route;
|
|
10
11
|
private readonly translate;
|
|
@@ -12,14 +13,14 @@ export declare class MngAuditEntityRevisionsPageComponent {
|
|
|
12
13
|
private readonly revModel;
|
|
13
14
|
private readonly auditModel;
|
|
14
15
|
private readonly entityClass;
|
|
15
|
-
readonly selectedRevisionEntity: import("@angular/core").Signal<
|
|
16
|
-
readonly descriptor: import("@angular/core").Signal<import("@mediusinc/mng-commons").TableviewDescriptorInst<
|
|
17
|
-
readonly dataProvider: import("@angular/core").Signal<import("@mediusinc/mng-commons").TableviewDataProviderInst<
|
|
18
|
-
readonly actions: import("@angular/core").Signal<ActionDescriptorInst<
|
|
19
|
-
revisionEntitiesLookupProvider: import("@mediusinc/mng-commons").LookupDataProviderInst<
|
|
16
|
+
readonly selectedRevisionEntity: import("@angular/core").Signal<GuiEntityModelDto | undefined>;
|
|
17
|
+
readonly descriptor: import("@angular/core").Signal<import("@mediusinc/mng-commons/tableview/api").TableviewDescriptorInst<RevEntityWithId, keyof RevEntityWithId, keyof RevEntityWithId> | undefined>;
|
|
18
|
+
readonly dataProvider: import("@angular/core").Signal<import("@mediusinc/mng-commons/tableview/api").TableviewDataProviderInst<RevEntityWithId, AuditRevisionsApiService, any, keyof RevEntityWithId, import("@mediusinc/mng-commons/core").ClassType<RevEntityWithId>, import("@mediusinc/mng-commons/core").ServiceClassType<AuditRevisionsApiService>> | undefined>;
|
|
19
|
+
readonly actions: import("@angular/core").Signal<ActionDescriptorInst<RevEntityWithId, any>[]>;
|
|
20
|
+
revisionEntitiesLookupProvider: import("@mediusinc/mng-commons/form/api").LookupDataProviderInst<GuiEntityModelWithI18n, undefined, import("@mediusinc/mng-commons/core").ClassType<GuiEntityModelWithI18n>, undefined>;
|
|
20
21
|
showTableview: import("@angular/core").WritableSignal<boolean>;
|
|
21
22
|
constructor();
|
|
22
|
-
onRevisionEntityChange(value: Nullable<
|
|
23
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
23
|
+
onRevisionEntityChange(value: Nullable<GuiEntityModelDto>): void;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditEntityRevisionsPageComponent, never>;
|
|
25
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuditEntityRevisionsPageComponent, "mng-audit-entity-revisions-page", never, {}, {}, never, never, true, never>;
|
|
25
26
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { ActionDescriptorInst } from '@mediusinc/mng-commons';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { ActionDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
2
|
+
import { AuditRevisionsApiService } from '../../../api/services/audit-revisions-api.service';
|
|
3
|
+
import { RevEntity } from '../../../models/rev-entity.model';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
5
|
+
export declare class AuditRevisionsPageComponent {
|
|
6
6
|
private injector;
|
|
7
7
|
private auditService;
|
|
8
8
|
private revModel;
|
|
9
9
|
showTableview: import("@angular/core").Signal<boolean>;
|
|
10
|
-
descriptor: import("@angular/core").Signal<import("@mediusinc/mng-commons").TableviewDescriptorInst<
|
|
11
|
-
dataProvider: import("@angular/core").WritableSignal<import("@mediusinc/mng-commons").TableviewDataProviderInst<
|
|
12
|
-
actions: import("@angular/core").Signal<ActionDescriptorInst<
|
|
13
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<
|
|
10
|
+
descriptor: import("@angular/core").Signal<import("@mediusinc/mng-commons/tableview/api").TableviewDescriptorInst<RevEntity, keyof RevEntity, keyof RevEntity>>;
|
|
11
|
+
dataProvider: import("@angular/core").WritableSignal<import("@mediusinc/mng-commons/tableview/api").TableviewDataProviderInst<RevEntity, AuditRevisionsApiService, keyof RevEntity, keyof RevEntity, import("@mediusinc/mng-commons/core").ClassType<RevEntity>, import("@mediusinc/mng-commons/core").ServiceClassType<AuditRevisionsApiService>>>;
|
|
12
|
+
actions: import("@angular/core").Signal<ActionDescriptorInst<RevEntity, any>[]>;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AuditRevisionsPageComponent, never>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<AuditRevisionsPageComponent, "mng-audit-revisions-page", never, {}, {}, never, never, true, never>;
|
|
15
15
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class
|
|
3
|
-
revType?:
|
|
1
|
+
import { RevisionTypeDto } from '../api/models/revisionType';
|
|
2
|
+
export declare class EntityRevisionChangeState {
|
|
3
|
+
revType?: RevisionTypeDto;
|
|
4
4
|
color?: 'green' | 'red';
|
|
5
5
|
[key: string]: unknown;
|
|
6
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class
|
|
1
|
+
import { EntityRevisionChangeState } from './entity-revision-change-state.model';
|
|
2
|
+
export declare class EntityRevisionChanges {
|
|
3
3
|
entityType?: string;
|
|
4
|
-
items?:
|
|
4
|
+
items?: EntityRevisionChangeState[];
|
|
5
5
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class
|
|
1
|
+
import { GuiEntityModelDto } from '../api/models/guiEntityModel';
|
|
2
|
+
export declare class GuiEntityModelWithI18n extends GuiEntityModelDto {
|
|
3
3
|
entityNameI18n?: string;
|
|
4
4
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export declare class
|
|
1
|
+
import { EntityChangeDto } from '../api/models/entityChange';
|
|
2
|
+
import { RevEntity } from './rev-entity.model';
|
|
3
|
+
export declare class RevEntityDetailed extends RevEntity {
|
|
4
4
|
revEntity?: {
|
|
5
5
|
[key: string]: unknown;
|
|
6
6
|
};
|
|
7
7
|
entityNameChangesMap?: {
|
|
8
|
-
[key: string]: Array<
|
|
8
|
+
[key: string]: Array<EntityChangeDto>;
|
|
9
9
|
};
|
|
10
10
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare class
|
|
1
|
+
import { RevEntityWithStateDto } from '../api/models/revEntityWithStateDto';
|
|
2
|
+
export declare class RevEntityWithId extends RevEntityWithStateDto {
|
|
3
3
|
mergedId?: string;
|
|
4
4
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
export declare const
|
|
2
|
+
import { CommonsAuditModuleConfig } from '../models/config.model';
|
|
3
|
+
export declare const COMMONS_AUDIT_MODULE_CONFIG_IT: InjectionToken<CommonsAuditModuleConfig>;
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
import { HttpParams } from '@angular/common/http';
|
|
2
|
-
import { DataListParams
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
2
|
+
import { DataListParams } from '@mediusinc/mng-commons/core';
|
|
3
|
+
import { TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
4
|
+
import { EditorDescriptorInst, TableviewDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
5
|
+
import { EntityChangeDto } from '../api/models/entityChange';
|
|
6
|
+
import { GuiEntityModelDto } from '../api/models/guiEntityModel';
|
|
7
|
+
import { GuiPropertyModelDto } from '../api/models/guiPropertyModel';
|
|
8
|
+
import { RevEntityWithStateDto } from '../api/models/revEntityWithStateDto';
|
|
9
|
+
import { EntityRevisionChanges } from '../models/entity-revision-changes.model';
|
|
8
10
|
export declare class AuditUtil {
|
|
9
11
|
private static _dateRegex;
|
|
10
|
-
static addColumnsFromModel<T>(descriptor: TableDescriptorInst<T>, properties:
|
|
11
|
-
static getPropertyTitleKey(property:
|
|
12
|
-
static addFieldsFromModel<T>(descriptor: EditorDescriptorInst<T>, properties:
|
|
13
|
-
static buildDescriptorForEntityRevision(descriptor: TableviewDescriptorInst<
|
|
14
|
-
static findEnum(property:
|
|
12
|
+
static addColumnsFromModel<T>(descriptor: TableDescriptorInst<T>, properties: GuiPropertyModelDto[], modelType?: 'revEntity' | 'entityState' | undefined, addFilters?: boolean, addSorts?: boolean): TableDescriptorInst<T>;
|
|
13
|
+
static getPropertyTitleKey(property: GuiPropertyModelDto, modelType?: 'revEntity' | 'entityState' | undefined): string;
|
|
14
|
+
static addFieldsFromModel<T>(descriptor: EditorDescriptorInst<T>, properties: GuiPropertyModelDto[], modelType?: 'revEntity' | 'entityState'): EditorDescriptorInst<T>;
|
|
15
|
+
static buildDescriptorForEntityRevision(descriptor: TableviewDescriptorInst<RevEntityWithStateDto>, revModel: GuiEntityModelDto, entityModel: GuiEntityModelDto): TableviewDescriptorInst<RevEntityWithStateDto>;
|
|
16
|
+
static findEnum(property: GuiPropertyModelDto): import("@mediusinc/mng-commons/model").EnumDescriptor<any> | undefined;
|
|
15
17
|
static extractPropertyName(fullPropertyName: string | undefined): string | undefined;
|
|
16
18
|
static paramsToHttpParams(params: DataListParams): HttpParams;
|
|
17
19
|
static mapItemsToEntityChangesArray(fieldValue: {
|
|
18
|
-
[key: string]: Array<
|
|
19
|
-
}): Array<
|
|
20
|
+
[key: string]: Array<EntityChangeDto>;
|
|
21
|
+
}): Array<EntityRevisionChanges>;
|
|
20
22
|
}
|
package/package.json
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons-audit",
|
|
3
|
-
"version": "5.0.0-rc.
|
|
3
|
+
"version": "5.0.0-rc.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
|
-
"@angular/common": "^17.
|
|
6
|
-
"@angular/core": "^17.
|
|
7
|
-
"@angular/router": "^17.
|
|
8
|
-
"@angular/forms": "^17.
|
|
5
|
+
"@angular/common": "^17.3.0",
|
|
6
|
+
"@angular/core": "^17.3.0",
|
|
7
|
+
"@angular/router": "^17.3.0",
|
|
8
|
+
"@angular/forms": "^17.3.0",
|
|
9
9
|
"@ngx-formly/core": "^6.3.0",
|
|
10
10
|
"@ngx-translate/core": "^15.0.0",
|
|
11
|
-
"@mediusinc/mng-commons": "~5.0.0-rc.
|
|
11
|
+
"@mediusinc/mng-commons": "~5.0.0-rc.1",
|
|
12
|
+
"@mediusinc/mng-commons-data-api-class": "~5.0.0-rc.1"
|
|
12
13
|
},
|
|
13
14
|
"dependencies": {
|
|
14
15
|
"tslib": "^2.6.2"
|
|
File without changes
|
|
File without changes
|