@valtimo-plugins/open-product 1.3.1 → 1.4.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/fesm2022/valtimo-plugins-open-product.mjs +459 -30
- package/fesm2022/valtimo-plugins-open-product.mjs.map +1 -1
- package/lib/components/create-or-update-product/create-or-update-product-configuration.component.d.ts +59 -0
- package/lib/components/create-or-update-product/models/create-or-update-product-config.d.ts +25 -0
- package/lib/components/create-product/create-product-configuration.component.d.ts +9 -1
- package/lib/components/create-product/models/create-product-config.d.ts +2 -1
- package/lib/components/update-product/models/update-product-config.d.ts +2 -0
- package/lib/components/update-product/update-product-configuration.component.d.ts +8 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/ja-nee.d.ts +9 -0
- package/lib/open-product-plugin.module.d.ts +7 -4
- package/lib/services/open-product-api.service.d.ts +32 -0
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { FormArray, FormBuilder, FormGroup } from '@angular/forms';
|
|
3
|
+
import { FunctionConfigurationComponent, PluginConfigurationData } from '@valtimo/plugin';
|
|
4
|
+
import { BehaviorSubject, Observable } from 'rxjs';
|
|
5
|
+
import { OpenProductApiService, Producttype } from '../../services/open-product-api.service';
|
|
6
|
+
import { CreateOrUpdateProductConfig, EigenaarType } from './models/create-or-update-product-config';
|
|
7
|
+
import * as i0 from "@angular/core";
|
|
8
|
+
interface StandardField {
|
|
9
|
+
key: keyof CreateOrUpdateProductConfig;
|
|
10
|
+
options?: string[];
|
|
11
|
+
}
|
|
12
|
+
interface DataobjectField {
|
|
13
|
+
key: string;
|
|
14
|
+
type: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
}
|
|
17
|
+
export declare class CreateOrUpdateProductConfigurationComponent implements FunctionConfigurationComponent, OnInit, OnDestroy {
|
|
18
|
+
private readonly formBuilder;
|
|
19
|
+
private readonly openProductApiService;
|
|
20
|
+
save$: Observable<void>;
|
|
21
|
+
disabled$: Observable<boolean>;
|
|
22
|
+
pluginId: string;
|
|
23
|
+
prefillConfiguration$: Observable<CreateOrUpdateProductConfig>;
|
|
24
|
+
selectedPluginConfigurationData$: Observable<PluginConfigurationData>;
|
|
25
|
+
valid: EventEmitter<boolean>;
|
|
26
|
+
configuration: EventEmitter<CreateOrUpdateProductConfig>;
|
|
27
|
+
readonly standardFields: StandardField[];
|
|
28
|
+
readonly eigenaarTypes: EigenaarType[];
|
|
29
|
+
readonly producttypen$: BehaviorSubject<Producttype[]>;
|
|
30
|
+
readonly dataobjectFields$: BehaviorSubject<DataobjectField[]>;
|
|
31
|
+
readonly loadError$: BehaviorSubject<boolean>;
|
|
32
|
+
readonly form: FormGroup;
|
|
33
|
+
private readonly configurationId$;
|
|
34
|
+
private readonly subscriptions;
|
|
35
|
+
private prefillMapping;
|
|
36
|
+
private prefillProducttypeUuid;
|
|
37
|
+
private disabled;
|
|
38
|
+
constructor(formBuilder: FormBuilder, openProductApiService: OpenProductApiService);
|
|
39
|
+
get dataobjectArray(): FormArray;
|
|
40
|
+
ngOnInit(): void;
|
|
41
|
+
ngOnDestroy(): void;
|
|
42
|
+
private openProducttypenSubscription;
|
|
43
|
+
private openSchemaSubscription;
|
|
44
|
+
private openPrefillSubscription;
|
|
45
|
+
private openDisabledSubscription;
|
|
46
|
+
private setDataobjectFields;
|
|
47
|
+
private save;
|
|
48
|
+
private toConfiguration;
|
|
49
|
+
private toDataobjectMapping;
|
|
50
|
+
private isValid;
|
|
51
|
+
private emitValid;
|
|
52
|
+
private valueGroup;
|
|
53
|
+
private toValueGroup;
|
|
54
|
+
private fromValueGroup;
|
|
55
|
+
private withoutPvPrefix;
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CreateOrUpdateProductConfigurationComponent, never>;
|
|
57
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CreateOrUpdateProductConfigurationComponent, "valtimo-create-or-update-product-configuration", never, { "save$": { "alias": "save$"; "required": false; }; "disabled$": { "alias": "disabled$"; "required": false; }; "pluginId": { "alias": "pluginId"; "required": false; }; "prefillConfiguration$": { "alias": "prefillConfiguration$"; "required": false; }; "selectedPluginConfigurationData$": { "alias": "selectedPluginConfigurationData$"; "required": false; }; }, { "valid": "valid"; "configuration": "configuration"; }, never, never, false, never>;
|
|
58
|
+
}
|
|
59
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
type EigenaarType = 'bsn' | 'kvk_nummer' | 'klantnummer';
|
|
2
|
+
type ValueMode = 'fixed' | 'pv';
|
|
3
|
+
interface DataobjectMappingEntry {
|
|
4
|
+
key: string;
|
|
5
|
+
value: string;
|
|
6
|
+
}
|
|
7
|
+
interface CreateOrUpdateProductConfig {
|
|
8
|
+
producttypeUuid: string;
|
|
9
|
+
eigenaarType: EigenaarType;
|
|
10
|
+
eigenaarIdentificatie: string;
|
|
11
|
+
eigenaarVestigingsnummer?: string;
|
|
12
|
+
productNaam?: string;
|
|
13
|
+
productStatus?: string;
|
|
14
|
+
productPrijs?: string;
|
|
15
|
+
productFrequentie?: string;
|
|
16
|
+
gepubliceerd?: string;
|
|
17
|
+
startDatum?: string;
|
|
18
|
+
eindDatum?: string;
|
|
19
|
+
aanvraagZaakUrn?: string;
|
|
20
|
+
aanvraagZaakUrl?: string;
|
|
21
|
+
documenten?: string;
|
|
22
|
+
dataobjectMapping: DataobjectMappingEntry[];
|
|
23
|
+
resultaatVariabelNaam?: string;
|
|
24
|
+
}
|
|
25
|
+
export { CreateOrUpdateProductConfig, DataobjectMappingEntry, EigenaarType, ValueMode };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { FunctionConfigurationComponent } from "@valtimo/plugin";
|
|
2
|
+
import { FunctionConfigurationComponent, PluginTranslationService } from "@valtimo/plugin";
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { CreateProductConfig } from './models/create-product-config';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class CreateProductConfigurationComponent implements FunctionConfigurationComponent, OnInit, OnDestroy {
|
|
7
|
+
private readonly pluginTranslationService;
|
|
7
8
|
save$: Observable<void>;
|
|
8
9
|
disabled$: Observable<boolean>;
|
|
9
10
|
pluginId: string;
|
|
@@ -13,7 +14,14 @@ export declare class CreateProductConfigurationComponent implements FunctionConf
|
|
|
13
14
|
private saveSubscription;
|
|
14
15
|
private readonly formValue$;
|
|
15
16
|
private readonly valid$;
|
|
17
|
+
jaNeeSelectItems$: Observable<Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}>>;
|
|
21
|
+
constructor(pluginTranslationService: PluginTranslationService);
|
|
16
22
|
ngOnInit(): void;
|
|
23
|
+
gepubliceerdSelectionId(prefill: CreateProductConfig | null): string;
|
|
24
|
+
koppelZaakDocumentenSelectionId(prefill: CreateProductConfig | null): string;
|
|
17
25
|
ngOnDestroy(): void;
|
|
18
26
|
formValueChange(formValue: CreateProductConfig): void;
|
|
19
27
|
private handleValid;
|
|
@@ -2,12 +2,13 @@ interface CreateProductConfig {
|
|
|
2
2
|
productNaam: string;
|
|
3
3
|
productTypeUuid: string;
|
|
4
4
|
eigenaarBsn: string;
|
|
5
|
-
aanvraagZaakUrn
|
|
5
|
+
aanvraagZaakUrn?: string;
|
|
6
6
|
aanvraagZaakUrl: string;
|
|
7
7
|
gepubliceerd: boolean;
|
|
8
8
|
productPrijs: string;
|
|
9
9
|
productFrequentie: string;
|
|
10
10
|
productStatus: string;
|
|
11
11
|
dataobjectVariabelNaam?: string;
|
|
12
|
+
koppelZaakDocumenten?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export { CreateProductConfig };
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
|
-
import { FunctionConfigurationComponent } from "@valtimo/plugin";
|
|
2
|
+
import { FunctionConfigurationComponent, PluginTranslationService } from "@valtimo/plugin";
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { UpdateProductConfig } from './models/update-product-config';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export declare class UpdateProductConfigurationComponent implements FunctionConfigurationComponent, OnInit, OnDestroy {
|
|
7
|
+
private readonly pluginTranslationService;
|
|
7
8
|
save$: Observable<void>;
|
|
8
9
|
disabled$: Observable<boolean>;
|
|
9
10
|
pluginId: string;
|
|
@@ -13,7 +14,13 @@ export declare class UpdateProductConfigurationComponent implements FunctionConf
|
|
|
13
14
|
private saveSubscription;
|
|
14
15
|
private readonly formValue$;
|
|
15
16
|
private readonly valid$;
|
|
17
|
+
jaNeeSelectItems$: Observable<Array<{
|
|
18
|
+
id: string;
|
|
19
|
+
text: string;
|
|
20
|
+
}>>;
|
|
21
|
+
constructor(pluginTranslationService: PluginTranslationService);
|
|
16
22
|
ngOnInit(): void;
|
|
23
|
+
koppelZaakDocumentenSelectionId(prefill: UpdateProductConfig | null): string;
|
|
17
24
|
ngOnDestroy(): void;
|
|
18
25
|
formValueChange(formValue: UpdateProductConfig): void;
|
|
19
26
|
private handleValid;
|
package/lib/models/index.d.ts
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PluginTranslationService } from '@valtimo/plugin';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
declare const jaNeeSelectItems$: (pluginTranslationService: PluginTranslationService, pluginId: string) => Observable<Array<{
|
|
4
|
+
id: string;
|
|
5
|
+
text: string;
|
|
6
|
+
}>>;
|
|
7
|
+
declare const toJaNeeSelectionId: (value: boolean | string | null | undefined) => string;
|
|
8
|
+
declare const fromJaNeeSelectionId: (value: boolean | string | null | undefined) => boolean;
|
|
9
|
+
export { jaNeeSelectItems$, toJaNeeSelectionId, fromJaNeeSelectionId };
|
|
@@ -6,11 +6,14 @@ import * as i4 from "./components/get-zaak-documenten/get-zaak-documenten-config
|
|
|
6
6
|
import * as i5 from "./components/create-product/create-product-configuration.component";
|
|
7
7
|
import * as i6 from "./components/update-product/update-product-configuration.component";
|
|
8
8
|
import * as i7 from "./components/delete-product/delete-product-configuration.component";
|
|
9
|
-
import * as i8 from "
|
|
10
|
-
import * as i9 from "@
|
|
11
|
-
import * as i10 from "@valtimo/
|
|
9
|
+
import * as i8 from "./components/create-or-update-product/create-or-update-product-configuration.component";
|
|
10
|
+
import * as i9 from "@angular/common";
|
|
11
|
+
import * as i10 from "@valtimo/plugin";
|
|
12
|
+
import * as i11 from "@valtimo/components";
|
|
13
|
+
import * as i12 from "@angular/forms";
|
|
14
|
+
import * as i13 from "carbon-components-angular";
|
|
12
15
|
export declare class OpenProductPluginModule {
|
|
13
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<OpenProductPluginModule, never>;
|
|
14
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<OpenProductPluginModule, [typeof i1.OpenProductConfigurationComponent, typeof i2.GetProductConfigurationComponent, typeof i3.GetAllProductsConfigurationComponent, typeof i4.GetZaakDocumentenConfigurationComponent, typeof i5.CreateProductConfigurationComponent, typeof i6.UpdateProductConfigurationComponent, typeof i7.DeleteProductConfigurationComponent], [typeof
|
|
17
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<OpenProductPluginModule, [typeof i1.OpenProductConfigurationComponent, typeof i2.GetProductConfigurationComponent, typeof i3.GetAllProductsConfigurationComponent, typeof i4.GetZaakDocumentenConfigurationComponent, typeof i5.CreateProductConfigurationComponent, typeof i6.UpdateProductConfigurationComponent, typeof i7.DeleteProductConfigurationComponent, typeof i8.CreateOrUpdateProductConfigurationComponent], [typeof i9.CommonModule, typeof i10.PluginTranslatePipeModule, typeof i11.FormModule, typeof i11.InputModule, typeof i11.SelectModule, typeof i11.CarbonMultiInputModule, typeof i12.ReactiveFormsModule, typeof i13.InputModule, typeof i13.SelectModule], [typeof i1.OpenProductConfigurationComponent, typeof i2.GetProductConfigurationComponent, typeof i3.GetAllProductsConfigurationComponent, typeof i4.GetZaakDocumentenConfigurationComponent, typeof i5.CreateProductConfigurationComponent, typeof i6.UpdateProductConfigurationComponent, typeof i7.DeleteProductConfigurationComponent, typeof i8.CreateOrUpdateProductConfigurationComponent]>;
|
|
15
18
|
static ɵinj: i0.ɵɵInjectorDeclaration<OpenProductPluginModule>;
|
|
16
19
|
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { BaseApiService, ConfigService } from '@valtimo/shared';
|
|
3
|
+
import { Observable } from 'rxjs';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
interface Producttype {
|
|
6
|
+
uuid: string;
|
|
7
|
+
naam: string | null;
|
|
8
|
+
code: string | null;
|
|
9
|
+
}
|
|
10
|
+
interface JsonSchemaProperty {
|
|
11
|
+
type?: string | string[];
|
|
12
|
+
title?: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
interface DataobjectSchema {
|
|
16
|
+
schema: {
|
|
17
|
+
properties?: {
|
|
18
|
+
[key: string]: JsonSchemaProperty;
|
|
19
|
+
};
|
|
20
|
+
required?: string[];
|
|
21
|
+
} | null;
|
|
22
|
+
}
|
|
23
|
+
declare class OpenProductApiService extends BaseApiService {
|
|
24
|
+
protected readonly httpClient: HttpClient;
|
|
25
|
+
protected readonly configService: ConfigService;
|
|
26
|
+
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
27
|
+
getProducttypen(pluginConfigurationId: string): Observable<Producttype[]>;
|
|
28
|
+
getDataobjectSchema(pluginConfigurationId: string, producttypeUuid: string): Observable<DataobjectSchema>;
|
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<OpenProductApiService, never>;
|
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<OpenProductApiService>;
|
|
31
|
+
}
|
|
32
|
+
export { DataobjectSchema, JsonSchemaProperty, OpenProductApiService, Producttype };
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED
|
@@ -8,3 +8,4 @@ export * from './lib/components/get-zaak-documenten/get-zaak-documenten-configur
|
|
|
8
8
|
export * from './lib/components/create-product/create-product-configuration.component';
|
|
9
9
|
export * from './lib/components/delete-product/delete-product-configuration.component';
|
|
10
10
|
export * from './lib/components/update-product/update-product-configuration.component';
|
|
11
|
+
export * from './lib/components/create-or-update-product/create-or-update-product-configuration.component';
|