@valtimo/object-management 0.0.0

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.
@@ -0,0 +1,76 @@
1
+ import { TemplateRef } from '@angular/core';
2
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
+ import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
4
+ import { ConfigService, SearchFieldColumnView, SearchFieldDataType } from '@valtimo/shared';
5
+ import { ListField } from '@valtimo/components';
6
+ import { FormControl, FormGroup } from '@angular/forms';
7
+ import { ListItem } from 'carbon-components-angular';
8
+ import { ActivatedRoute } from '@angular/router';
9
+ import { TranslateService } from '@ngx-translate/core';
10
+ import { ObjectManagementService } from '../../../../services/object-management.service';
11
+ import * as i0 from "@angular/core";
12
+ export declare class ObjectManagementListSearchFieldsComponent {
13
+ private readonly objectManagementService;
14
+ private readonly route;
15
+ private readonly translateService;
16
+ private readonly configService;
17
+ private readonly sanitizer;
18
+ moveRowButtonsTemplateRef: TemplateRef<any>;
19
+ readonly downloadName$: BehaviorSubject<string>;
20
+ readonly downloadUrl$: BehaviorSubject<SafeUrl>;
21
+ readonly loading$: BehaviorSubject<boolean>;
22
+ readonly currentModalType$: BehaviorSubject<string>;
23
+ readonly showModal$: BehaviorSubject<boolean>;
24
+ readonly disableInput$: BehaviorSubject<boolean>;
25
+ readonly showDeleteModal$: Subject<boolean>;
26
+ readonly deleteRowIndex$: BehaviorSubject<number>;
27
+ readonly INVALID_KEY = "invalid";
28
+ readonly formGroup: FormGroup<{
29
+ title: FormControl<string>;
30
+ key: FormControl<string>;
31
+ path: FormControl<string>;
32
+ dataType: FormControl<{
33
+ key: string;
34
+ }>;
35
+ fieldType: FormControl<{
36
+ key: string;
37
+ }>;
38
+ }>;
39
+ private readonly COLUMNS;
40
+ readonly DATA_TYPES: Array<SearchFieldDataType>;
41
+ private readonly FIELD_TYPES;
42
+ private cachedObjectManagementListSearchFields;
43
+ private readonly refreshObjectManagementListSearchFields$;
44
+ readonly objectManagementFields$: Observable<Array<ListField>>;
45
+ readonly objectId$: Observable<string>;
46
+ private readonly objectManagementListSearchFields$;
47
+ readonly translatedObjectManagementListSearchFields$: Observable<Array<SearchFieldColumnView>>;
48
+ readonly selectedDataTypeItemIndex$: BehaviorSubject<number>;
49
+ readonly dataTypeItems$: Observable<Array<ListItem>>;
50
+ readonly selectedFieldTypeItemIndex$: BehaviorSubject<number>;
51
+ readonly fieldTypeItems$: Observable<Array<ListItem>>;
52
+ readonly validKey$: Observable<boolean>;
53
+ readonly valid$: Observable<boolean>;
54
+ constructor(objectManagementService: ObjectManagementService, route: ActivatedRoute, translateService: TranslateService, configService: ConfigService, sanitizer: DomSanitizer);
55
+ openModal(modalType: string): void;
56
+ closeModal(): void;
57
+ deleteRow(listSearchFieldRowIndex: number, clickEvent: MouseEvent): void;
58
+ deleteRowConfirmation(listSearchFieldRowIndex: number): void;
59
+ getColumnKey(listSearchFieldRowIndex: number): string;
60
+ moveRow(listSearchFieldRowIndex: number, moveUp: boolean, clickEvent: MouseEvent, objectId: string): void;
61
+ saveListSearchFields(): void;
62
+ columnRowClicked(row: {
63
+ key: string;
64
+ }): void;
65
+ private updateObjectManagementListSearchField;
66
+ private addSearchField;
67
+ private updateSearchField;
68
+ private setDownload;
69
+ private disableInput;
70
+ private enableInput;
71
+ private refreshObjectManagementListSearchFields;
72
+ private resetFormGroup;
73
+ private mapFormValuesToColumn;
74
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementListSearchFieldsComponent, never>;
75
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectManagementListSearchFieldsComponent, "valtimo-object-management-list-search-fields", never, {}, {}, never, never, false, never>;
76
+ }
@@ -0,0 +1,26 @@
1
+ import { BehaviorSubject, Observable } from 'rxjs';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ import { ObjectManagementService } from '../../services/object-management.service';
4
+ import { Objecttype } from '../../models/object-management.model';
5
+ import { ObjectManagementStateService } from '../../services/object-management-state.service';
6
+ import { Router } from '@angular/router';
7
+ import * as i0 from "@angular/core";
8
+ export declare class ObjectManagementListComponent {
9
+ private readonly objectManagementService;
10
+ private readonly objectManagementState;
11
+ private readonly translateService;
12
+ private router;
13
+ readonly loading$: BehaviorSubject<boolean>;
14
+ readonly fields$: BehaviorSubject<{
15
+ key: string;
16
+ label: string;
17
+ }[]>;
18
+ readonly objecttypesInstances$: Observable<Array<Objecttype>>;
19
+ constructor(objectManagementService: ObjectManagementService, objectManagementState: ObjectManagementStateService, translateService: TranslateService, router: Router);
20
+ showAddModal(): void;
21
+ showUploadModal(): void;
22
+ redirectToDetails(objectManagement: Objecttype): void;
23
+ private setFields;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementListComponent, never>;
25
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectManagementListComponent, "valtimo-object-management-list", never, {}, {}, never, never, false, never>;
26
+ }
@@ -0,0 +1,47 @@
1
+ import { AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { BehaviorSubject, Observable, Subscription } from 'rxjs';
3
+ import { ObjectManagementStateService } from '../../services/object-management-state.service';
4
+ import { PluginConfiguration, PluginManagementService } from '@valtimo/plugin';
5
+ import { ObjectManagementService } from '../../services/object-management.service';
6
+ import { Objecttype } from '../../models/object-management.model';
7
+ import { FormService } from '@valtimo/form';
8
+ import { VModalComponent, ModalService } from '@valtimo/components';
9
+ import * as i0 from "@angular/core";
10
+ export declare class ObjectManagementModalComponent implements AfterViewInit, OnDestroy {
11
+ private readonly objectManagementState;
12
+ private readonly objectManagementService;
13
+ private readonly formService;
14
+ private readonly pluginManagementService;
15
+ private readonly modalService;
16
+ objectManagementModal: VModalComponent;
17
+ prefillObject$: Observable<Objecttype>;
18
+ readonly disabled$: Observable<boolean>;
19
+ readonly valid$: BehaviorSubject<boolean>;
20
+ readonly showForm$: Observable<boolean>;
21
+ readonly modalType$: Observable<any>;
22
+ readonly formData$: BehaviorSubject<any>;
23
+ showSubscription: Subscription;
24
+ hideSubscription: Subscription;
25
+ readonly selectedObjecttype$: BehaviorSubject<string>;
26
+ readonly formDefinitions$: Observable<Array<{
27
+ id: string;
28
+ text: string;
29
+ }>>;
30
+ readonly configurationInstances$: Observable<Array<PluginConfiguration>>;
31
+ readonly objectsApiConfigurations$: Observable<any>;
32
+ readonly objecttypesApiConfigurations$: Observable<any>;
33
+ constructor(objectManagementState: ObjectManagementStateService, objectManagementService: ObjectManagementService, formService: FormService, pluginManagementService: PluginManagementService, modalService: ModalService);
34
+ ngAfterViewInit(): void;
35
+ ngOnDestroy(): void;
36
+ hide(): void;
37
+ cancel(): void;
38
+ save(): void;
39
+ private openShowSubscription;
40
+ private openHideSubscription;
41
+ private show;
42
+ formValueChange(data: any): void;
43
+ private setValid;
44
+ selectObjectType(objecttype: any): void;
45
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementModalComponent, never>;
46
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectManagementModalComponent, "valtimo-object-management-modal", never, { "prefillObject$": { "alias": "prefillObject$"; "required": false; }; }, {}, never, never, false, never>;
47
+ }
@@ -0,0 +1,52 @@
1
+ import { AfterViewInit, OnDestroy } from '@angular/core';
2
+ import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
+ import { ObjectManagementStateService } from '../../services/object-management-state.service';
4
+ import { FormManagementService } from '@valtimo/form-management';
5
+ import { PluginManagementService } from '@valtimo/plugin';
6
+ import { ObjectManagementService } from '../../services/object-management.service';
7
+ import { TranslateService } from '@ngx-translate/core';
8
+ import { Objecttype, ObjecttypeKeys } from '../../models/object-management.model';
9
+ import { VModalComponent, ModalService } from '@valtimo/components';
10
+ import * as i0 from "@angular/core";
11
+ export declare class ObjectManagementUploadModalComponent implements AfterViewInit, OnDestroy {
12
+ private readonly objectManagementState;
13
+ private readonly objectManagementService;
14
+ private readonly formManagementService;
15
+ private readonly pluginManagementService;
16
+ private readonly modalService;
17
+ private readonly translateService;
18
+ objectManagementUploadModal: VModalComponent;
19
+ objecttypes?: Objecttype[];
20
+ readonly clear$: Subject<unknown>;
21
+ readonly jsonString$: BehaviorSubject<string>;
22
+ readonly error$: BehaviorSubject<string>;
23
+ readonly disabled$: BehaviorSubject<boolean>;
24
+ readonly showForm$: Observable<boolean>;
25
+ private readonly file$;
26
+ private showSubscription;
27
+ private hideSubscription;
28
+ private fileSubscription;
29
+ private errorSubscription;
30
+ constructor(objectManagementState: ObjectManagementStateService, objectManagementService: ObjectManagementService, formManagementService: FormManagementService, pluginManagementService: PluginManagementService, modalService: ModalService, translateService: TranslateService);
31
+ ngAfterViewInit(): void;
32
+ ngOnDestroy(): void;
33
+ hide(): void;
34
+ cancel(): void;
35
+ setFile(file: File): void;
36
+ uploadDefinition(): void;
37
+ private openErrorSubscription;
38
+ private closeErrorSubscription;
39
+ private openFileSubscription;
40
+ private openShowSubscription;
41
+ private openHideSubscription;
42
+ private show;
43
+ private clearError;
44
+ private clearJsonString;
45
+ private clearDropzone;
46
+ private isValidJsonObjecttype;
47
+ validateObject(obj: object, requiredKeys: ObjecttypeKeys[]): boolean;
48
+ private disable;
49
+ private enable;
50
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementUploadModalComponent, never>;
51
+ static ɵcmp: i0.ɵɵComponentDeclaration<ObjectManagementUploadModalComponent, "valtimo-object-management-upload-modal", never, { "objecttypes": { "alias": "objecttypes"; "required": false; }; }, {}, never, never, false, never>;
52
+ }
@@ -0,0 +1,54 @@
1
+ interface Objecttype {
2
+ id: string;
3
+ title: string;
4
+ objecttypenApiPluginConfigurationId: string;
5
+ objecttypeId: string;
6
+ objecttypeVersion: number;
7
+ objectenApiPluginConfigurationId: string;
8
+ showInDataMenu: boolean;
9
+ formDefinitionView?: string;
10
+ formDefinitionEdit?: string;
11
+ }
12
+ export interface SearchListColumn {
13
+ ownerId?: string;
14
+ title: string;
15
+ key: string;
16
+ path: string;
17
+ displayType: DisplayType;
18
+ sortable: boolean;
19
+ defaultSort: string;
20
+ }
21
+ export interface SearchColumn {
22
+ propertyName: string;
23
+ translationKey: string;
24
+ sortable?: boolean;
25
+ viewType?: string;
26
+ default?: boolean | string;
27
+ enum?: Array<string> | {
28
+ [key: string]: string;
29
+ };
30
+ title?: string;
31
+ format?: string;
32
+ key?: string;
33
+ }
34
+ export interface SearchListColumnView {
35
+ title: string;
36
+ key: string;
37
+ path: string;
38
+ displayType: string;
39
+ displayTypeParameters: string;
40
+ sortable: boolean;
41
+ defaultSort: string;
42
+ }
43
+ export interface DisplayType {
44
+ type: string;
45
+ displayTypeParameters: DisplayTypeParameters;
46
+ }
47
+ export interface DisplayTypeParameters {
48
+ enum?: {
49
+ [key: string]: string;
50
+ };
51
+ dateFormat?: string;
52
+ }
53
+ type ObjecttypeKeys = keyof Objecttype;
54
+ export { Objecttype, ObjecttypeKeys };
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "@angular/common";
3
+ import * as i2 from "@angular/router";
4
+ export declare class ObjectManagementRoutingModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementRoutingModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ObjectManagementRoutingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule], [typeof i2.RouterModule]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<ObjectManagementRoutingModule>;
8
+ }
@@ -0,0 +1,19 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/object-management-list/object-management-list.component";
3
+ import * as i2 from "./components/object-management-detail-container/object-management-detail-container.component";
4
+ import * as i3 from "./components/object-management-detail-container/tabs/object-management-detail/object-management-detail.component";
5
+ import * as i4 from "./components/object-management-detail-container/tabs/object-management-list-columns/object-management-list-columns.component";
6
+ import * as i5 from "./components/object-management-modal/object-management-modal.component";
7
+ import * as i6 from "./components/object-management-upload-modal/object-management-upload-modal.component";
8
+ import * as i7 from "./components/object-management-detail-container/tabs/object-management-list-search-fields/object-management-list-search-fields.component";
9
+ import * as i8 from "@angular/common";
10
+ import * as i9 from "@valtimo/components";
11
+ import * as i10 from "@ngx-translate/core";
12
+ import * as i11 from "./object-management-routing.module";
13
+ import * as i12 from "carbon-components-angular";
14
+ import * as i13 from "@angular/forms";
15
+ export declare class ObjectManagementModule {
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementModule, never>;
17
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ObjectManagementModule, [typeof i1.ObjectManagementListComponent, typeof i2.ObjectManagementDetailContainerComponent, typeof i3.ObjectManagementDetailComponent, typeof i4.ObjectManagementListColumnsComponent, typeof i5.ObjectManagementModalComponent, typeof i6.ObjectManagementUploadModalComponent, typeof i7.ObjectManagementListSearchFieldsComponent], [typeof i8.CommonModule, typeof i9.DropzoneModule, typeof i9.WidgetModule, typeof i10.TranslateModule, typeof i11.ObjectManagementRoutingModule, typeof i9.VModalModule, typeof i9.FormModule, typeof i9.InputModule, typeof i9.SelectModule, typeof i12.InputModule, typeof i12.ButtonModule, typeof i9.TooltipIconModule, typeof i9.CarbonMultiInputModule, typeof i12.ModalModule, typeof i12.NotificationModule, typeof i12.LoadingModule, typeof i12.DropdownModule, typeof i12.CheckboxModule, typeof i12.LinkModule, typeof i12.IconModule, typeof i13.ReactiveFormsModule, typeof i9.ConfirmationModalModule, typeof i9.SpinnerModule, typeof i9.ModalModule, typeof i9.ValtimoCdsModalDirective, typeof i9.CarbonListModule], never>;
18
+ static ɵinj: i0.ɵɵInjectorDeclaration<ObjectManagementModule>;
19
+ }
@@ -0,0 +1,19 @@
1
+ import { Observable } from 'rxjs';
2
+ import * as i0 from "@angular/core";
3
+ export declare class ObjectManagementStateService {
4
+ private readonly _showModal$;
5
+ private readonly _hideModal$;
6
+ private readonly _refresh$;
7
+ private readonly _modalType$;
8
+ constructor();
9
+ get showModal$(): Observable<any>;
10
+ get hideModal$(): Observable<any>;
11
+ get refresh$(): Observable<any>;
12
+ get modalType$(): Observable<any>;
13
+ showModal(): void;
14
+ hideModal(): void;
15
+ refresh(): void;
16
+ setModalType(type: any): void;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementStateService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<ObjectManagementStateService>;
19
+ }
@@ -0,0 +1,26 @@
1
+ import { Observable } from 'rxjs';
2
+ import { HttpClient } from '@angular/common/http';
3
+ import { ConfigService, SearchField } from '@valtimo/shared';
4
+ import { Objecttype, SearchListColumn } from '../models/object-management.model';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ObjectManagementService {
7
+ private http;
8
+ private valtimoEndpointUri;
9
+ constructor(http: HttpClient, configService: ConfigService);
10
+ getAllObjects(): Observable<Objecttype[]>;
11
+ getObjectById(id: string): Observable<Objecttype>;
12
+ createObject(payload: Objecttype): Observable<Objecttype>;
13
+ editObject(payload: Objecttype): Observable<Objecttype>;
14
+ getSearchList(ownerId: string): Observable<Array<SearchListColumn>>;
15
+ postSearchList(ownerId: string, request: SearchListColumn): Observable<SearchListColumn>;
16
+ putSearchList(ownerId: string, columnKey: string, request: SearchListColumn): Observable<Array<SearchListColumn>>;
17
+ putSearchListColumns(ownerId: string, request: Array<SearchListColumn>): Observable<Array<SearchListColumn>>;
18
+ deleteSearchList(ownerId: string, columnKey: string): Observable<SearchListColumn>;
19
+ getSearchField(ownerId: string): Observable<Array<SearchField>>;
20
+ postSearchField(ownerId: string, request: SearchField): Observable<SearchField>;
21
+ putSearchField(ownerId: string, key: string, request: SearchField): Observable<Array<SearchField>>;
22
+ putSearchFields(ownerId: string, request: Array<SearchField>): Observable<Array<SearchField>>;
23
+ deleteSearchField(ownerId: string, key: string): Observable<SearchField>;
24
+ static ɵfac: i0.ɵɵFactoryDeclaration<ObjectManagementService, never>;
25
+ static ɵprov: i0.ɵɵInjectableDeclaration<ObjectManagementService>;
26
+ }
@@ -0,0 +1,5 @@
1
+ export declare enum TabEnum {
2
+ GENERAL = "general",
3
+ LIST = "list",
4
+ SEARCH = "search"
5
+ }
@@ -0,0 +1,10 @@
1
+ import { Observable } from 'rxjs';
2
+ import { TabEnum } from './tab.enum';
3
+ import * as i0 from "@angular/core";
4
+ export declare class TabService {
5
+ private _currentTab$;
6
+ get currentTab$(): Observable<TabEnum>;
7
+ set currentTab(tab: TabEnum);
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<TabService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<TabService>;
10
+ }
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@valtimo/object-management",
3
+ "license": "EUPL-1.2",
4
+ "version": "0.0.0",
5
+ "peerDependencies": {
6
+ "@angular/common": "^19.2.8",
7
+ "@angular/core": "^19.2.8"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "2.8.1"
11
+ },
12
+ "module": "fesm2022/valtimo-object-management.mjs",
13
+ "typings": "index.d.ts",
14
+ "exports": {
15
+ "./package.json": {
16
+ "default": "./package.json"
17
+ },
18
+ ".": {
19
+ "types": "./index.d.ts",
20
+ "default": "./fesm2022/valtimo-object-management.mjs"
21
+ }
22
+ },
23
+ "sideEffects": false
24
+ }
@@ -0,0 +1,3 @@
1
+ export * from './lib/models/object-management.model';
2
+ export * from './lib/services/object-management.service';
3
+ export * from './lib/object-management.module';