@valtimo/case-migration 0.0.0-test

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,376 @@
1
+ import * as i0 from '@angular/core';
2
+ import { Injectable, Component, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import * as i2 from '@valtimo/shared';
5
+ import { ROLE_ADMIN } from '@valtimo/shared';
6
+ import * as i1$2 from '@angular/router';
7
+ import { RouterModule } from '@angular/router';
8
+ import * as i6 from '@angular/common';
9
+ import { CommonModule } from '@angular/common';
10
+ import { AuthGuardService } from '@valtimo/security';
11
+ import { BehaviorSubject, map, shareReplay, startWith, combineLatest, take, switchMap } from 'rxjs';
12
+ import { WatsonHealthStackedMove16 } from '@carbon/icons';
13
+ import * as i1$1 from '@valtimo/document';
14
+ import * as i3 from 'carbon-components-angular';
15
+ import { DropdownModule, InputModule, ButtonModule, IconModule, NotificationModule } from 'carbon-components-angular';
16
+ import * as i5 from '@ngx-translate/core';
17
+ import { TranslateModule } from '@ngx-translate/core';
18
+ import * as i7 from '@valtimo/components';
19
+ import { WidgetModule, RenderInPageHeaderDirective, TooltipIconModule, CarbonMultiInputModule, ConfirmationModalModule } from '@valtimo/components';
20
+ import { ReactiveFormsModule, FormsModule } from '@angular/forms';
21
+
22
+ /*
23
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
24
+ *
25
+ * Licensed under EUPL, Version 1.2 (the "License");
26
+ * you may not use this file except in compliance with the License.
27
+ * You may obtain a copy of the License at
28
+ *
29
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
30
+ *
31
+ * Unless required by applicable law or agreed to in writing, software
32
+ * distributed under the License is distributed on an "AS IS" basis,
33
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
34
+ * See the License for the specific language governing permissions and
35
+ * limitations under the License.
36
+ */
37
+
38
+ /*
39
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
40
+ *
41
+ * Licensed under EUPL, Version 1.2 (the "License");
42
+ * you may not use this file except in compliance with the License.
43
+ * You may obtain a copy of the License at
44
+ *
45
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
46
+ *
47
+ * Unless required by applicable law or agreed to in writing, software
48
+ * distributed under the License is distributed on an "AS IS" basis,
49
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
50
+ * See the License for the specific language governing permissions and
51
+ * limitations under the License.
52
+ */
53
+
54
+ /*
55
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
56
+ *
57
+ * Licensed under EUPL, Version 1.2 (the "License");
58
+ * you may not use this file except in compliance with the License.
59
+ * You may obtain a copy of the License at
60
+ *
61
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
62
+ *
63
+ * Unless required by applicable law or agreed to in writing, software
64
+ * distributed under the License is distributed on an "AS IS" basis,
65
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
66
+ * See the License for the specific language governing permissions and
67
+ * limitations under the License.
68
+ */
69
+ class CaseMigrationService {
70
+ constructor(http, configService) {
71
+ this.http = http;
72
+ this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;
73
+ }
74
+ getConflicts(request) {
75
+ return this.http.post(`${this.valtimoEndpointUri}management/v1/document-definition/migration/conflicts`, request);
76
+ }
77
+ migrate(request) {
78
+ return this.http.post(`${this.valtimoEndpointUri}management/v1/document-definition/migrate`, request);
79
+ }
80
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationService, deps: [{ token: i1.HttpClient }, { token: i2.ConfigService }], target: i0.ɵɵFactoryTarget.Injectable }); }
81
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationService, providedIn: 'root' }); }
82
+ }
83
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationService, decorators: [{
84
+ type: Injectable,
85
+ args: [{
86
+ providedIn: 'root',
87
+ }]
88
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: i2.ConfigService }] });
89
+
90
+ /*
91
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
92
+ *
93
+ * Licensed under EUPL, Version 1.2 (the "License");
94
+ * you may not use this file except in compliance with the License.
95
+ * You may obtain a copy of the License at
96
+ *
97
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
98
+ *
99
+ * Unless required by applicable law or agreed to in writing, software
100
+ * distributed under the License is distributed on an "AS IS" basis,
101
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
102
+ * See the License for the specific language governing permissions and
103
+ * limitations under the License.
104
+ */
105
+
106
+ /*
107
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
108
+ *
109
+ * Licensed under EUPL, Version 1.2 (the "License");
110
+ * you may not use this file except in compliance with the License.
111
+ * You may obtain a copy of the License at
112
+ *
113
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
114
+ *
115
+ * Unless required by applicable law or agreed to in writing, software
116
+ * distributed under the License is distributed on an "AS IS" basis,
117
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
118
+ * See the License for the specific language governing permissions and
119
+ * limitations under the License.
120
+ */
121
+ class CaseMigrationComponent {
122
+ constructor(documentService, caseMigrationService, iconService, globalNotificationService, translateService) {
123
+ this.documentService = documentService;
124
+ this.caseMigrationService = caseMigrationService;
125
+ this.iconService = iconService;
126
+ this.globalNotificationService = globalNotificationService;
127
+ this.translateService = translateService;
128
+ this.sourceCaseDefinitionKeySelected$ = new BehaviorSubject(null);
129
+ this.sourceCaseDefinitionVersionTagSelected$ = new BehaviorSubject(null);
130
+ this.targetCaseDefinitionKeySelected$ = new BehaviorSubject(null);
131
+ this.targetCaseDefinitionVersionTagSelected$ = new BehaviorSubject(null);
132
+ this.patchItems$ = new BehaviorSubject([]);
133
+ this.errors$ = new BehaviorSubject(null);
134
+ this.showConfirmationModal$ = new BehaviorSubject(false);
135
+ this.caseDefinitions$ = this.documentService
136
+ .getCaseDefinitionsManagement({ sort: 'name,id.versionTag', size: 100000 })
137
+ .pipe(map(caseDefinitionsPage => caseDefinitionsPage.content), shareReplay(1));
138
+ this.sourceCaseDefinitionKeyItems$ = this.caseDefinitions$.pipe(map(caseDefinitions => [
139
+ ...new Map(caseDefinitions.map(item => [item.caseDefinitionKey, item])).values(),
140
+ ]), map(caseDefinitions => caseDefinitions.map(caseDefinition => ({
141
+ caseDefinitionKey: caseDefinition.caseDefinitionKey,
142
+ content: caseDefinition.name,
143
+ selected: false,
144
+ }))), map(items => ({
145
+ value: items,
146
+ isLoading: false,
147
+ })), startWith({ isLoading: true }));
148
+ this.sourceCaseDefinitionVersionTagItems$ = combineLatest([this.sourceCaseDefinitionKeySelected$, this.caseDefinitions$]).pipe(map(([sourceCaseDefinitionKeySelected, caseDefinitions]) => caseDefinitions.filter(caseDefinition => caseDefinition.caseDefinitionKey === sourceCaseDefinitionKeySelected)), map(caseDefinitions => caseDefinitions.map(caseDefinition => caseDefinition.caseDefinitionVersionTag)), map(versions => versions.map(version => ({
149
+ caseDefinitionVersionTag: version,
150
+ content: version.toString(),
151
+ selected: false,
152
+ }))));
153
+ this.targetCaseDefinitionKeyItems$ = this.caseDefinitions$.pipe(map(caseDefinitions => [
154
+ ...new Map(caseDefinitions.map(item => [item.caseDefinitionKey, item])).values(),
155
+ ]), map(caseDefinitions => caseDefinitions.map(caseDefinition => ({
156
+ caseDefinitionKey: caseDefinition.caseDefinitionKey,
157
+ content: caseDefinition.name,
158
+ selected: false,
159
+ }))), map(items => ({
160
+ value: items,
161
+ isLoading: false,
162
+ })), startWith({ isLoading: true }));
163
+ this.targetCaseDefinitionVersionTagItems$ = combineLatest([this.targetCaseDefinitionKeySelected$, this.caseDefinitions$]).pipe(map(([targetCaseDefinitionKeySelected, caseDefinitions]) => caseDefinitions.filter(caseDefinition => caseDefinition.caseDefinitionKey === targetCaseDefinitionKeySelected)), map(caseDefinitions => caseDefinitions.map(caseDefinition => caseDefinition.caseDefinitionVersionTag)), map(versions => versions.map(version => ({
164
+ caseDefinitionVersionTag: version,
165
+ content: version.toString(),
166
+ selected: false,
167
+ }))));
168
+ this.patches$ = this.patchItems$.pipe(map(patchItems => patchItems.map(patchItem => ({
169
+ source: patchItem.key,
170
+ target: patchItem.value,
171
+ }))));
172
+ this.CARBON_THEME = 'g10';
173
+ this.iconService.registerAll([WatsonHealthStackedMove16]);
174
+ }
175
+ mappingValueChange(patches) {
176
+ this.patchItems$.next(patches);
177
+ }
178
+ checkPatches() {
179
+ this.errors$.next(null);
180
+ combineLatest([
181
+ this.sourceCaseDefinitionKeySelected$,
182
+ this.sourceCaseDefinitionVersionTagSelected$,
183
+ this.targetCaseDefinitionKeySelected$,
184
+ this.targetCaseDefinitionVersionTagSelected$,
185
+ this.patches$,
186
+ ])
187
+ .pipe(take(1), map(([caseDefinitionKeySource, caseDefinitionVersionTagSource, caseDefinitionKeyTarget, caseDefinitionVersionTagTarget, patches,]) => ({
188
+ documentDefinitionNameSource: caseDefinitionKeySource,
189
+ caseDefinitionIdSource: {
190
+ key: caseDefinitionKeySource,
191
+ versionTag: caseDefinitionVersionTagSource,
192
+ },
193
+ documentDefinitionNameTarget: caseDefinitionKeyTarget,
194
+ caseDefinitionIdTarget: {
195
+ key: caseDefinitionKeyTarget,
196
+ versionTag: caseDefinitionVersionTagTarget,
197
+ },
198
+ patches,
199
+ })), switchMap(request => this.caseMigrationService.getConflicts(request)))
200
+ .subscribe(response => {
201
+ this.errors$.next(response.errors.concat(response.conflicts.filter(c => !!c.error).map(c => c.source + ': ' + c.error)));
202
+ });
203
+ }
204
+ migrate() {
205
+ this.errors$.next(null);
206
+ combineLatest([
207
+ this.sourceCaseDefinitionKeySelected$,
208
+ this.sourceCaseDefinitionVersionTagSelected$,
209
+ this.targetCaseDefinitionKeySelected$,
210
+ this.targetCaseDefinitionVersionTagSelected$,
211
+ this.patches$,
212
+ ])
213
+ .pipe(take(1), map(([caseDefinitionKeySource, caseDefinitionVersionTagSource, caseDefinitionKeyTarget, caseDefinitionVersionTagTarget, patches,]) => ({
214
+ documentDefinitionNameSource: caseDefinitionKeySource,
215
+ caseDefinitionIdSource: {
216
+ key: caseDefinitionKeySource,
217
+ versionTag: caseDefinitionVersionTagSource,
218
+ },
219
+ documentDefinitionNameTarget: caseDefinitionKeyTarget,
220
+ caseDefinitionIdTarget: {
221
+ key: caseDefinitionKeyTarget,
222
+ versionTag: caseDefinitionVersionTagTarget,
223
+ },
224
+ patches,
225
+ })), switchMap(request => this.caseMigrationService.migrate(request)))
226
+ .subscribe({
227
+ next: () => {
228
+ this.errors$.next([]);
229
+ this.globalNotificationService.showToast({
230
+ title: this.translateService.instant('caseMigration.noErrors'),
231
+ type: 'success',
232
+ });
233
+ },
234
+ error: error => this.errors$.next([error.message]),
235
+ });
236
+ }
237
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationComponent, deps: [{ token: i1$1.DocumentService }, { token: CaseMigrationService }, { token: i3.IconService }, { token: i2.GlobalNotificationService }, { token: i5.TranslateService }], target: i0.ɵɵFactoryTarget.Component }); }
238
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.20", type: CaseMigrationComponent, isStandalone: false, selector: "valtimo-case-migration", ngImport: i0, template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n class=\"case-count-configuration-form\"\n *ngIf=\"{\n sourceCaseDefinitionKeyItems: sourceCaseDefinitionKeyItems$ | async,\n sourceCaseDefinitionVersionTagItems: sourceCaseDefinitionVersionTagItems$ | async,\n targetCaseDefinitionKeyItems: targetCaseDefinitionKeyItems$ | async,\n targetCaseDefinitionVersionTagItems: targetCaseDefinitionVersionTagItems$ | async,\n sourceCaseDefinitionKeySelected: sourceCaseDefinitionKeySelected$ | async,\n sourceCaseDefinitionVersionTagSelected: sourceCaseDefinitionVersionTagSelected$ | async,\n targetCaseDefinitionKeySelected: targetCaseDefinitionKeySelected$ | async,\n targetCaseDefinitionVersionTagSelected: targetCaseDefinitionVersionTagSelected$ | async,\n patchItems: patchItems$ | async,\n errors: errors$ | async,\n showConfirmationModal: showConfirmationModal$,\n } as obs\"\n>\n <ng-container>\n <div class=\"pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'caseMigration.warningBeta' | translate,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.caseDefinition' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n (selected)=\"sourceCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n sourceCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"targetCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n targetCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2 pb-2\">\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.patches' | translate }}</h2>\n </div>\n </div>\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n (valueChange)=\"mappingValueChange($event)\"\n [title]=\"' '\"\n [tooltip]=\"'caseMigration.patchTooltip' | translate\"\n [defaultValues]=\"[]\"\n [keyColumnTitle]=\"'caseMigration.patchSource' | translate\"\n [valueColumnTitle]=\"'caseMigration.patchTarget' | translate\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2\">\n <div *ngIf=\"obs.errors?.length === 0\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n {{ 'caseMigration.noErrors' | translate }}\n </div>\n </div>\n <div *ngIf=\"obs.errors?.length >= 1\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.errors' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"pb-2\" *ngFor=\"let error of obs.errors\">\n <cds-notification\n [notificationObj]=\"{\n type: 'error',\n title: error,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </div>\n </ng-container>\n\n <ng-container>\n <button\n class=\"mt-2 mb-2 mr-2\"\n cdsButton=\"secondary\"\n size=\"md\"\n (click)=\"checkPatches()\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.checkPatches' | translate }}\n </button>\n <button\n class=\"mt-2 mb-2 ml-2\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"showConfirmationModal$.next(true)\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.migrate' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"watsonHealthStackedMove\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"migrate()\"\n (cancelEvent)=\"showConfirmationModal$.next(false)\"\n cancelButtonType=\"ghost\"\n confirmButtonTextTranslationKey=\"caseMigration.modalTitle\"\n titleTranslationKey=\"caseMigration.modalTitle\"\n contentTranslationKey=\"caseMigration.modalContent\"\n ></valtimo-confirmation-modal>\n</ng-container>\n", dependencies: [{ kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i3.Dropdown, selector: "cds-dropdown, ibm-dropdown", inputs: ["id", "label", "hideLabel", "helperText", "placeholder", "displayValue", "clearText", "size", "type", "theme", "disabled", "readonly", "skeleton", "inline", "disableArrowKeys", "invalid", "invalidText", "warn", "warnText", "appendInline", "scrollableContainer", "itemValueKey", "selectionFeedback", "menuButtonLabel", "selectedLabel", "dropUp", "fluid"], outputs: ["selected", "onClose", "close"] }, { kind: "component", type: i3.DropdownList, selector: "cds-dropdown-list, ibm-dropdown-list", inputs: ["ariaLabel", "items", "listTpl", "type", "showTitles"], outputs: ["select", "scroll", "blurIntent"] }, { kind: "directive", type: i3.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "directive", type: i3.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "component", type: i7.CarbonMultiInputComponent, selector: "valtimo-carbon-multi-input", inputs: ["addRowText", "addButtonType", "addRowTranslationKey", "arbitraryAmountTitles", "arbitraryValueAmount", "defaultValues", "deleteRowText", "deleteRowTranslationKey", "disabled", "dropdownColumnTitle", "dropdownItems", "dropdownWidth", "fullWidth", "hideAddButton", "hideDeleteButton", "initialAmountOfRows", "keyColumnTitle", "margin", "maxRows", "minimumAmountOfRows", "name", "required", "title", "titleTranslationKey", "tooltip", "type", "valueColumnTitle", "valuePathSelectorCaseDefinitionKey", "valuePathSelectorPrefixes", "valuePathSelectorShowCaseDefinitionSelector", "valuePathSelectorNotation", "keyColumnFlex", "dropdownColumnFlex", "valueColumnFlex"], outputs: ["valueChange", "allValuesValidEvent"] }, { kind: "component", type: i7.ConfirmationModalComponent, selector: "valtimo-confirmation-modal", inputs: ["titleTranslationKey", "title", "content", "contentTranslationKey", "confirmButtonText", "confirmButtonTextTranslationKey", "confirmButtonType", "showOptionalButton", "optionalButtonText", "optionalButtonTextTranslationKey", "optionalButtonType", "cancelButtonText", "cancelButtonTextTranslationKey", "cancelButtonType", "showModalSubject$", "outputOnConfirm", "outputOnOptional", "spacerAfterCancelButton"], outputs: ["confirmEvent", "optionalEvent", "cancelEvent"] }, { kind: "component", type: i3.Notification, selector: "cds-notification, cds-inline-notification, ibm-notification, ibm-inline-notification", inputs: ["notificationObj"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }, { kind: "pipe", type: i5.TranslatePipe, name: "translate" }] }); }
239
+ }
240
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationComponent, decorators: [{
241
+ type: Component,
242
+ args: [{ standalone: false, selector: 'valtimo-case-migration', template: "<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n class=\"case-count-configuration-form\"\n *ngIf=\"{\n sourceCaseDefinitionKeyItems: sourceCaseDefinitionKeyItems$ | async,\n sourceCaseDefinitionVersionTagItems: sourceCaseDefinitionVersionTagItems$ | async,\n targetCaseDefinitionKeyItems: targetCaseDefinitionKeyItems$ | async,\n targetCaseDefinitionVersionTagItems: targetCaseDefinitionVersionTagItems$ | async,\n sourceCaseDefinitionKeySelected: sourceCaseDefinitionKeySelected$ | async,\n sourceCaseDefinitionVersionTagSelected: sourceCaseDefinitionVersionTagSelected$ | async,\n targetCaseDefinitionKeySelected: targetCaseDefinitionKeySelected$ | async,\n targetCaseDefinitionVersionTagSelected: targetCaseDefinitionVersionTagSelected$ | async,\n patchItems: patchItems$ | async,\n errors: errors$ | async,\n showConfirmationModal: showConfirmationModal$,\n } as obs\"\n>\n <ng-container>\n <div class=\"pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'caseMigration.warningBeta' | translate,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.caseDefinition' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n (selected)=\"sourceCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n sourceCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"targetCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n targetCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2 pb-2\">\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.patches' | translate }}</h2>\n </div>\n </div>\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n (valueChange)=\"mappingValueChange($event)\"\n [title]=\"' '\"\n [tooltip]=\"'caseMigration.patchTooltip' | translate\"\n [defaultValues]=\"[]\"\n [keyColumnTitle]=\"'caseMigration.patchSource' | translate\"\n [valueColumnTitle]=\"'caseMigration.patchTarget' | translate\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2\">\n <div *ngIf=\"obs.errors?.length === 0\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n {{ 'caseMigration.noErrors' | translate }}\n </div>\n </div>\n <div *ngIf=\"obs.errors?.length >= 1\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.errors' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"pb-2\" *ngFor=\"let error of obs.errors\">\n <cds-notification\n [notificationObj]=\"{\n type: 'error',\n title: error,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </div>\n </ng-container>\n\n <ng-container>\n <button\n class=\"mt-2 mb-2 mr-2\"\n cdsButton=\"secondary\"\n size=\"md\"\n (click)=\"checkPatches()\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.checkPatches' | translate }}\n </button>\n <button\n class=\"mt-2 mb-2 ml-2\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"showConfirmationModal$.next(true)\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.migrate' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"watsonHealthStackedMove\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"migrate()\"\n (cancelEvent)=\"showConfirmationModal$.next(false)\"\n cancelButtonType=\"ghost\"\n confirmButtonTextTranslationKey=\"caseMigration.modalTitle\"\n titleTranslationKey=\"caseMigration.modalTitle\"\n contentTranslationKey=\"caseMigration.modalContent\"\n ></valtimo-confirmation-modal>\n</ng-container>\n" }]
243
+ }], ctorParameters: () => [{ type: i1$1.DocumentService }, { type: CaseMigrationService }, { type: i3.IconService }, { type: i2.GlobalNotificationService }, { type: i5.TranslateService }] });
244
+
245
+ /*
246
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
247
+ *
248
+ * Licensed under EUPL, Version 1.2 (the "License");
249
+ * you may not use this file except in compliance with the License.
250
+ * You may obtain a copy of the License at
251
+ *
252
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
253
+ *
254
+ * Unless required by applicable law or agreed to in writing, software
255
+ * distributed under the License is distributed on an "AS IS" basis,
256
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
257
+ * See the License for the specific language governing permissions and
258
+ * limitations under the License.
259
+ */
260
+ const routes = [
261
+ {
262
+ path: 'case-migration',
263
+ component: CaseMigrationComponent,
264
+ canActivate: [AuthGuardService],
265
+ data: { title: 'Case migration', roles: [ROLE_ADMIN] },
266
+ },
267
+ ];
268
+ class CaseMigrationRoutingModule {
269
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationRoutingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
270
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationRoutingModule, imports: [CommonModule, i1$2.RouterModule], exports: [RouterModule] }); }
271
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationRoutingModule, imports: [CommonModule, RouterModule.forChild(routes), RouterModule] }); }
272
+ }
273
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationRoutingModule, decorators: [{
274
+ type: NgModule,
275
+ args: [{
276
+ imports: [CommonModule, RouterModule.forChild(routes)],
277
+ exports: [RouterModule],
278
+ }]
279
+ }] });
280
+
281
+ /*
282
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
283
+ *
284
+ * Licensed under EUPL, Version 1.2 (the "License");
285
+ * you may not use this file except in compliance with the License.
286
+ * You may obtain a copy of the License at
287
+ *
288
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
289
+ *
290
+ * Unless required by applicable law or agreed to in writing, software
291
+ * distributed under the License is distributed on an "AS IS" basis,
292
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
293
+ * See the License for the specific language governing permissions and
294
+ * limitations under the License.
295
+ */
296
+ class CaseMigrationModule {
297
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
298
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationModule, declarations: [CaseMigrationComponent], imports: [CommonModule,
299
+ CaseMigrationRoutingModule,
300
+ ReactiveFormsModule,
301
+ WidgetModule,
302
+ FormsModule,
303
+ TranslateModule,
304
+ DropdownModule,
305
+ RenderInPageHeaderDirective,
306
+ InputModule,
307
+ TooltipIconModule,
308
+ ButtonModule,
309
+ IconModule,
310
+ CarbonMultiInputModule,
311
+ ConfirmationModalModule,
312
+ NotificationModule] }); }
313
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationModule, imports: [CommonModule,
314
+ CaseMigrationRoutingModule,
315
+ ReactiveFormsModule,
316
+ WidgetModule,
317
+ FormsModule,
318
+ TranslateModule,
319
+ DropdownModule,
320
+ InputModule,
321
+ TooltipIconModule,
322
+ ButtonModule,
323
+ IconModule,
324
+ CarbonMultiInputModule,
325
+ ConfirmationModalModule,
326
+ NotificationModule] }); }
327
+ }
328
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.20", ngImport: i0, type: CaseMigrationModule, decorators: [{
329
+ type: NgModule,
330
+ args: [{
331
+ declarations: [CaseMigrationComponent],
332
+ imports: [
333
+ CommonModule,
334
+ CaseMigrationRoutingModule,
335
+ ReactiveFormsModule,
336
+ WidgetModule,
337
+ FormsModule,
338
+ TranslateModule,
339
+ DropdownModule,
340
+ RenderInPageHeaderDirective,
341
+ InputModule,
342
+ TooltipIconModule,
343
+ ButtonModule,
344
+ IconModule,
345
+ CarbonMultiInputModule,
346
+ ConfirmationModalModule,
347
+ NotificationModule,
348
+ ],
349
+ }]
350
+ }] });
351
+
352
+ /*
353
+ * Copyright 2015-2025 Ritense BV, the Netherlands.
354
+ *
355
+ * Licensed under EUPL, Version 1.2 (the "License");
356
+ * you may not use this file except in compliance with the License.
357
+ * You may obtain a copy of the License at
358
+ *
359
+ * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12
360
+ *
361
+ * Unless required by applicable law or agreed to in writing, software
362
+ * distributed under the License is distributed on an "AS IS" basis,
363
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
364
+ * See the License for the specific language governing permissions and
365
+ * limitations under the License.
366
+ */
367
+ /*
368
+ * Public API Surface of case-migration
369
+ */
370
+
371
+ /**
372
+ * Generated bundle index. Do not edit.
373
+ */
374
+
375
+ export { CaseMigrationModule, CaseMigrationService };
376
+ //# sourceMappingURL=valtimo-case-migration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valtimo-case-migration.mjs","sources":["../../../../projects/valtimo/case-migration/src/lib/models/case-migration.model.ts","../../../../projects/valtimo/case-migration/src/lib/models/index.ts","../../../../projects/valtimo/case-migration/src/lib/services/case-migration.service.ts","../../../../projects/valtimo/case-migration/src/lib/services/index.ts","../../../../projects/valtimo/case-migration/src/lib/components/case-migration-component/case-migration.component.ts","../../../../projects/valtimo/case-migration/src/lib/components/case-migration-component/case-migration.component.html","../../../../projects/valtimo/case-migration/src/lib/case-migration-routing.module.ts","../../../../projects/valtimo/case-migration/src/lib/case-migration.module.ts","../../../../projects/valtimo/case-migration/src/public-api.ts","../../../../projects/valtimo/case-migration/src/valtimo-case-migration.ts"],"sourcesContent":["/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {CaseDefinitionId} from '@valtimo/document';\n\ninterface LoadedValue<T> {\n isLoading: boolean;\n value?: T;\n}\n\ninterface DocumentMigrationConflictRequest {\n documentDefinitionNameSource: string;\n caseDefinitionIdSource: CaseDefinitionId;\n documentDefinitionNameTarget: string;\n caseDefinitionIdTarget: CaseDefinitionId;\n patches: DocumentMigrationPatch[];\n}\n\ninterface DocumentMigrationConflictResponse {\n documentDefinitionNameSource: string;\n caseDefinitionIdSource: CaseDefinitionId;\n documentDefinitionNameTarget: string;\n caseDefinitionIdTarget: CaseDefinitionId;\n conflicts: DocumentMigrationPatch[];\n errors: Array<string>;\n documentCount: number;\n}\n\ninterface DocumentMigrationPatch {\n source: string;\n target?: string;\n error?: string;\n}\n\nexport {\n LoadedValue,\n DocumentMigrationConflictRequest,\n DocumentMigrationConflictResponse,\n DocumentMigrationPatch,\n};\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './case-migration.model';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Injectable} from '@angular/core';\nimport {HttpClient} from '@angular/common/http';\nimport {ConfigService} from '@valtimo/shared';\nimport {Observable} from 'rxjs';\nimport {DocumentMigrationConflictRequest, DocumentMigrationConflictResponse} from '../models';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class CaseMigrationService {\n private readonly valtimoEndpointUri!: string;\n\n constructor(\n private http: HttpClient,\n configService: ConfigService\n ) {\n this.valtimoEndpointUri = configService.config.valtimoApi.endpointUri;\n }\n\n public getConflicts(\n request: DocumentMigrationConflictRequest\n ): Observable<DocumentMigrationConflictResponse> {\n return this.http.post<DocumentMigrationConflictResponse>(\n `${this.valtimoEndpointUri}management/v1/document-definition/migration/conflicts`,\n request\n );\n }\n\n public migrate(request: DocumentMigrationConflictRequest): Observable<void> {\n return this.http.post<void>(\n `${this.valtimoEndpointUri}management/v1/document-definition/migrate`,\n request\n );\n }\n}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nexport * from './case-migration.service';\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {Component} from '@angular/core';\nimport {CaseDefinition, DocumentService} from '@valtimo/document';\nimport {MultiInputValues} from '@valtimo/components';\nimport {\n BehaviorSubject,\n combineLatest,\n map,\n Observable,\n shareReplay,\n startWith,\n switchMap,\n take,\n} from 'rxjs';\nimport {ListItem} from 'carbon-components-angular/dropdown';\nimport {DocumentMigrationConflictRequest, DocumentMigrationPatch, LoadedValue} from '../../models';\nimport {CaseMigrationService} from '../../services';\nimport {WatsonHealthStackedMove16} from '@carbon/icons';\nimport {IconService} from 'carbon-components-angular';\nimport {GlobalNotificationService} from '@valtimo/shared';\nimport {TranslateService} from '@ngx-translate/core';\n\n@Component({\n standalone: false,\n selector: 'valtimo-case-migration',\n templateUrl: './case-migration.component.html',\n})\nexport class CaseMigrationComponent {\n public readonly sourceCaseDefinitionKeySelected$ = new BehaviorSubject<string | null>(null);\n public readonly sourceCaseDefinitionVersionTagSelected$ = new BehaviorSubject<string | null>(\n null\n );\n public readonly targetCaseDefinitionKeySelected$ = new BehaviorSubject<string | null>(null);\n public readonly targetCaseDefinitionVersionTagSelected$ = new BehaviorSubject<string | null>(\n null\n );\n public readonly patchItems$ = new BehaviorSubject<MultiInputValues>([]);\n public readonly errors$ = new BehaviorSubject<Array<string> | null>(null);\n public readonly showConfirmationModal$ = new BehaviorSubject<boolean>(false);\n\n constructor(\n private readonly documentService: DocumentService,\n private readonly caseMigrationService: CaseMigrationService,\n private readonly iconService: IconService,\n private readonly globalNotificationService: GlobalNotificationService,\n private readonly translateService: TranslateService\n ) {\n this.iconService.registerAll([WatsonHealthStackedMove16]);\n }\n\n public readonly caseDefinitions$: Observable<Array<CaseDefinition>> = this.documentService\n .getCaseDefinitionsManagement({sort: 'name,id.versionTag', size: 100000})\n .pipe(\n map(caseDefinitionsPage => caseDefinitionsPage.content),\n shareReplay(1)\n );\n public readonly sourceCaseDefinitionKeyItems$: Observable<LoadedValue<Array<ListItem>>> =\n this.caseDefinitions$.pipe(\n map(caseDefinitions => [\n ...new Map(caseDefinitions.map(item => [item.caseDefinitionKey, item])).values(),\n ]),\n map(caseDefinitions =>\n caseDefinitions.map(\n caseDefinition =>\n ({\n caseDefinitionKey: caseDefinition.caseDefinitionKey,\n content: caseDefinition.name,\n selected: false,\n }) as ListItem\n )\n ),\n map(items => ({\n value: items,\n isLoading: false,\n })),\n startWith({isLoading: true})\n );\n public readonly sourceCaseDefinitionVersionTagItems$: Observable<Array<ListItem>> = combineLatest(\n [this.sourceCaseDefinitionKeySelected$, this.caseDefinitions$]\n ).pipe(\n map(([sourceCaseDefinitionKeySelected, caseDefinitions]) =>\n caseDefinitions.filter(\n caseDefinition => caseDefinition.caseDefinitionKey === sourceCaseDefinitionKeySelected\n )\n ),\n map(caseDefinitions =>\n caseDefinitions.map(caseDefinition => caseDefinition.caseDefinitionVersionTag)\n ),\n map(versions =>\n versions.map(\n version =>\n ({\n caseDefinitionVersionTag: version,\n content: version.toString(),\n selected: false,\n }) as ListItem\n )\n )\n );\n public readonly targetCaseDefinitionKeyItems$: Observable<LoadedValue<Array<ListItem>>> =\n this.caseDefinitions$.pipe(\n map(caseDefinitions => [\n ...new Map(caseDefinitions.map(item => [item.caseDefinitionKey, item])).values(),\n ]),\n map(caseDefinitions =>\n caseDefinitions.map(\n caseDefinition =>\n ({\n caseDefinitionKey: caseDefinition.caseDefinitionKey,\n content: caseDefinition.name,\n selected: false,\n }) as ListItem\n )\n ),\n map(items => ({\n value: items,\n isLoading: false,\n })),\n startWith({isLoading: true})\n );\n public readonly targetCaseDefinitionVersionTagItems$: Observable<Array<ListItem>> = combineLatest(\n [this.targetCaseDefinitionKeySelected$, this.caseDefinitions$]\n ).pipe(\n map(([targetCaseDefinitionKeySelected, caseDefinitions]) =>\n caseDefinitions.filter(\n caseDefinition => caseDefinition.caseDefinitionKey === targetCaseDefinitionKeySelected\n )\n ),\n map(caseDefinitions =>\n caseDefinitions.map(caseDefinition => caseDefinition.caseDefinitionVersionTag)\n ),\n map(versions =>\n versions.map(\n version =>\n ({\n caseDefinitionVersionTag: version,\n content: version.toString(),\n selected: false,\n }) as ListItem\n )\n )\n );\n public readonly patches$: Observable<Array<DocumentMigrationPatch>> = this.patchItems$.pipe(\n map(patchItems =>\n patchItems.map(\n patchItem =>\n ({\n source: patchItem.key,\n target: patchItem.value,\n }) as DocumentMigrationPatch\n )\n )\n );\n\n mappingValueChange(patches: MultiInputValues): void {\n this.patchItems$.next(patches);\n }\n\n checkPatches() {\n this.errors$.next(null);\n combineLatest([\n this.sourceCaseDefinitionKeySelected$,\n this.sourceCaseDefinitionVersionTagSelected$,\n this.targetCaseDefinitionKeySelected$,\n this.targetCaseDefinitionVersionTagSelected$,\n this.patches$,\n ])\n .pipe(\n take(1),\n map(\n ([\n caseDefinitionKeySource,\n caseDefinitionVersionTagSource,\n caseDefinitionKeyTarget,\n caseDefinitionVersionTagTarget,\n patches,\n ]) =>\n ({\n documentDefinitionNameSource: caseDefinitionKeySource,\n caseDefinitionIdSource: {\n key: caseDefinitionKeySource,\n versionTag: caseDefinitionVersionTagSource,\n },\n documentDefinitionNameTarget: caseDefinitionKeyTarget,\n caseDefinitionIdTarget: {\n key: caseDefinitionKeyTarget,\n versionTag: caseDefinitionVersionTagTarget,\n },\n patches,\n }) as DocumentMigrationConflictRequest\n ),\n switchMap(request =>\n this.caseMigrationService.getConflicts(request as DocumentMigrationConflictRequest)\n )\n )\n .subscribe(response => {\n this.errors$.next(\n response.errors.concat(\n response.conflicts.filter(c => !!c.error).map(c => c.source + ': ' + c.error)\n )\n );\n });\n }\n\n migrate() {\n this.errors$.next(null);\n combineLatest([\n this.sourceCaseDefinitionKeySelected$,\n this.sourceCaseDefinitionVersionTagSelected$,\n this.targetCaseDefinitionKeySelected$,\n this.targetCaseDefinitionVersionTagSelected$,\n this.patches$,\n ])\n .pipe(\n take(1),\n map(\n ([\n caseDefinitionKeySource,\n caseDefinitionVersionTagSource,\n caseDefinitionKeyTarget,\n caseDefinitionVersionTagTarget,\n patches,\n ]) =>\n ({\n documentDefinitionNameSource: caseDefinitionKeySource,\n caseDefinitionIdSource: {\n key: caseDefinitionKeySource,\n versionTag: caseDefinitionVersionTagSource,\n },\n documentDefinitionNameTarget: caseDefinitionKeyTarget,\n caseDefinitionIdTarget: {\n key: caseDefinitionKeyTarget,\n versionTag: caseDefinitionVersionTagTarget,\n },\n patches,\n }) as DocumentMigrationConflictRequest\n ),\n switchMap(request =>\n this.caseMigrationService.migrate(request as DocumentMigrationConflictRequest)\n )\n )\n .subscribe({\n next: () => {\n this.errors$.next([]);\n this.globalNotificationService.showToast({\n title: this.translateService.instant('caseMigration.noErrors'),\n type: 'success',\n });\n },\n error: error => this.errors$.next([error.message]),\n });\n }\n\n protected readonly CARBON_THEME = 'g10';\n}\n","<!--\n ~ Copyright 2015-2025 Ritense BV, the Netherlands.\n ~\n ~ Licensed under EUPL, Version 1.2 (the \"License\");\n ~ you may not use this file except in compliance with the License.\n ~ You may obtain a copy of the License at\n ~\n ~ https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n ~\n ~ Unless required by applicable law or agreed to in writing, software\n ~ distributed under the License is distributed on an \"AS IS\" basis,\n ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n ~ See the License for the specific language governing permissions and\n ~ limitations under the License.\n -->\n\n<ng-container\n class=\"case-count-configuration-form\"\n *ngIf=\"{\n sourceCaseDefinitionKeyItems: sourceCaseDefinitionKeyItems$ | async,\n sourceCaseDefinitionVersionTagItems: sourceCaseDefinitionVersionTagItems$ | async,\n targetCaseDefinitionKeyItems: targetCaseDefinitionKeyItems$ | async,\n targetCaseDefinitionVersionTagItems: targetCaseDefinitionVersionTagItems$ | async,\n sourceCaseDefinitionKeySelected: sourceCaseDefinitionKeySelected$ | async,\n sourceCaseDefinitionVersionTagSelected: sourceCaseDefinitionVersionTagSelected$ | async,\n targetCaseDefinitionKeySelected: targetCaseDefinitionKeySelected$ | async,\n targetCaseDefinitionVersionTagSelected: targetCaseDefinitionVersionTagSelected$ | async,\n patchItems: patchItems$ | async,\n errors: errors$ | async,\n showConfirmationModal: showConfirmationModal$,\n } as obs\"\n>\n <ng-container>\n <div class=\"pb-2\">\n <cds-notification\n [notificationObj]=\"{\n type: 'warning',\n title: 'caseMigration.warningBeta' | translate,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.caseDefinition' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.sourceCaseDefinitionKeyItems.isLoading\"\n (selected)=\"sourceCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.sourceCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n sourceCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.sourceCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"row m-0\">\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionKey' | translate\"\n [style.width.px]=\"350\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"targetCaseDefinitionKeySelected$.next($event.item.caseDefinitionKey)\"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionKeyItems.value || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n <cds-dropdown\n class=\"pr-2 pb-2\"\n [label]=\"'caseMigration.targetCaseDefinitionVersionTag' | translate\"\n [style.width.px]=\"300\"\n [disabled]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n [dropUp]=\"false\"\n [skeleton]=\"obs.targetCaseDefinitionKeyItems.isLoading\"\n (selected)=\"\n targetCaseDefinitionVersionTagSelected$.next($event.item.caseDefinitionVersionTag)\n \"\n >\n <cds-dropdown-list\n [items]=\"obs.targetCaseDefinitionVersionTagItems || []\"\n ></cds-dropdown-list>\n </cds-dropdown>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2 pb-2\">\n <div class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.patches' | translate }}</h2>\n </div>\n </div>\n <valtimo-carbon-multi-input\n type=\"keyValue\"\n (valueChange)=\"mappingValueChange($event)\"\n [title]=\"' '\"\n [tooltip]=\"'caseMigration.patchTooltip' | translate\"\n [defaultValues]=\"[]\"\n [keyColumnTitle]=\"'caseMigration.patchSource' | translate\"\n [valueColumnTitle]=\"'caseMigration.patchTarget' | translate\"\n [fullWidth]=\"true\"\n ></valtimo-carbon-multi-input>\n </div>\n </ng-container>\n\n <ng-container>\n <div class=\"pt-2\">\n <div *ngIf=\"obs.errors?.length === 0\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n {{ 'caseMigration.noErrors' | translate }}\n </div>\n </div>\n <div *ngIf=\"obs.errors?.length >= 1\" class=\"input-group mt-4 mb-2 align-items-center\">\n <div>\n <h2>{{ 'caseMigration.errors' | translate }}</h2>\n </div>\n </div>\n\n <div class=\"pb-2\" *ngFor=\"let error of obs.errors\">\n <cds-notification\n [notificationObj]=\"{\n type: 'error',\n title: error,\n showClose: false,\n }\"\n >\n </cds-notification>\n </div>\n </div>\n </ng-container>\n\n <ng-container>\n <button\n class=\"mt-2 mb-2 mr-2\"\n cdsButton=\"secondary\"\n size=\"md\"\n (click)=\"checkPatches()\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.checkPatches' | translate }}\n </button>\n <button\n class=\"mt-2 mb-2 ml-2\"\n cdsButton=\"primary\"\n size=\"md\"\n (click)=\"showConfirmationModal$.next(true)\"\n [disabled]=\"\n !obs.sourceCaseDefinitionKeySelected ||\n !obs.sourceCaseDefinitionVersionTagSelected ||\n !obs.targetCaseDefinitionKeySelected ||\n !obs.targetCaseDefinitionVersionTagSelected\n \"\n >\n {{ 'caseMigration.migrate' | translate }}\n <svg class=\"cds--btn__icon\" cdsIcon=\"watsonHealthStackedMove\" size=\"16\"></svg>\n </button>\n </ng-container>\n\n <valtimo-confirmation-modal\n [showModalSubject$]=\"obs.showConfirmationModal\"\n (confirmEvent)=\"migrate()\"\n (cancelEvent)=\"showConfirmationModal$.next(false)\"\n cancelButtonType=\"ghost\"\n confirmButtonTextTranslationKey=\"caseMigration.modalTitle\"\n titleTranslationKey=\"caseMigration.modalTitle\"\n contentTranslationKey=\"caseMigration.modalContent\"\n ></valtimo-confirmation-modal>\n</ng-container>\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {RouterModule, Routes} from '@angular/router';\nimport {CommonModule} from '@angular/common';\nimport {AuthGuardService} from '@valtimo/security';\nimport {ROLE_ADMIN} from '@valtimo/shared';\nimport {CaseMigrationComponent} from './components/case-migration-component/case-migration.component';\n\nconst routes: Routes = [\n {\n path: 'case-migration',\n component: CaseMigrationComponent,\n canActivate: [AuthGuardService],\n data: {title: 'Case migration', roles: [ROLE_ADMIN]},\n },\n];\n\n@NgModule({\n imports: [CommonModule, RouterModule.forChild(routes)],\n exports: [RouterModule],\n})\nexport class CaseMigrationRoutingModule {}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport {NgModule} from '@angular/core';\nimport {CaseMigrationRoutingModule} from './case-migration-routing.module';\nimport {CommonModule} from '@angular/common';\nimport {FormsModule, ReactiveFormsModule} from '@angular/forms';\nimport {\n CarbonMultiInputModule,\n ConfirmationModalModule,\n RenderInPageHeaderDirective,\n TooltipIconModule,\n WidgetModule,\n} from '@valtimo/components';\nimport {TranslateModule} from '@ngx-translate/core';\nimport {CaseMigrationComponent} from './components/case-migration-component/case-migration.component';\nimport {\n ButtonModule,\n DropdownModule,\n IconModule,\n InputModule,\n NotificationModule,\n} from 'carbon-components-angular';\n\n@NgModule({\n declarations: [CaseMigrationComponent],\n imports: [\n CommonModule,\n CaseMigrationRoutingModule,\n ReactiveFormsModule,\n WidgetModule,\n FormsModule,\n TranslateModule,\n DropdownModule,\n RenderInPageHeaderDirective,\n InputModule,\n TooltipIconModule,\n ButtonModule,\n IconModule,\n CarbonMultiInputModule,\n ConfirmationModalModule,\n NotificationModule,\n ],\n})\nexport class CaseMigrationModule {}\n","/*\n * Copyright 2015-2025 Ritense BV, the Netherlands.\n *\n * Licensed under EUPL, Version 1.2 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" basis,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\n/*\n * Public API Surface of case-migration\n */\n\nexport * from './lib/models';\nexport * from './lib/services';\nexport * from './lib/case-migration.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1","i2.CaseMigrationService","i4"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;;ACdH;;;;;;;;;;;;;;AAcG;MAWU,oBAAoB,CAAA;IAG/B,WACU,CAAA,IAAgB,EACxB,aAA4B,EAAA;QADpB,IAAI,CAAA,IAAA,GAAJ,IAAI;QAGZ,IAAI,CAAC,kBAAkB,GAAG,aAAa,CAAC,MAAM,CAAC,UAAU,CAAC,WAAW;;AAGhE,IAAA,YAAY,CACjB,OAAyC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BAAkB,CAAA,EAAA,CAAA,CAAA;;4FAGT,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBApB/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACR,YAAY,EAAE,CAAC,sBAAsB,CAAC;AACtC,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,0BAA0B;wBAC1B,mBAAmB;wBACnB,YAAY;wBACZ,WAAW;wBACX,eAAe;wBACf,cAAc;wBACd,2BAA2B;wBAC3B,WAAW;wBACX,iBAAiB;wBACjB,YAAY;wBACZ,UAAU;wBACV,sBAAsB;wBACtB,uBAAuB;wBACvB,kBAAkB;AACnB,qBAAA;AACF,iBAAA;;;ACxDD;;;;;;;;;;;;;;AAcG;AAEH;;AAEG;;AClBH;;AAEG;;;;"}
package/index.d.ts ADDED
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@valtimo/case-migration" />
5
+ export * from './public-api';
@@ -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 CaseMigrationRoutingModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CaseMigrationRoutingModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CaseMigrationRoutingModule, never, [typeof i1.CommonModule, typeof i2.RouterModule], [typeof i2.RouterModule]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<CaseMigrationRoutingModule>;
8
+ }
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./components/case-migration-component/case-migration.component";
3
+ import * as i2 from "@angular/common";
4
+ import * as i3 from "./case-migration-routing.module";
5
+ import * as i4 from "@angular/forms";
6
+ import * as i5 from "@valtimo/components";
7
+ import * as i6 from "@ngx-translate/core";
8
+ import * as i7 from "carbon-components-angular";
9
+ export declare class CaseMigrationModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<CaseMigrationModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<CaseMigrationModule, [typeof i1.CaseMigrationComponent], [typeof i2.CommonModule, typeof i3.CaseMigrationRoutingModule, typeof i4.ReactiveFormsModule, typeof i5.WidgetModule, typeof i4.FormsModule, typeof i6.TranslateModule, typeof i7.DropdownModule, typeof i5.RenderInPageHeaderDirective, typeof i7.InputModule, typeof i5.TooltipIconModule, typeof i7.ButtonModule, typeof i7.IconModule, typeof i5.CarbonMultiInputModule, typeof i5.ConfirmationModalModule, typeof i7.NotificationModule], never>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<CaseMigrationModule>;
13
+ }
@@ -0,0 +1,37 @@
1
+ import { CaseDefinition, DocumentService } from '@valtimo/document';
2
+ import { MultiInputValues } from '@valtimo/components';
3
+ import { BehaviorSubject, Observable } from 'rxjs';
4
+ import { ListItem } from 'carbon-components-angular/dropdown';
5
+ import { DocumentMigrationPatch, LoadedValue } from '../../models';
6
+ import { CaseMigrationService } from '../../services';
7
+ import { IconService } from 'carbon-components-angular';
8
+ import { GlobalNotificationService } from '@valtimo/shared';
9
+ import { TranslateService } from '@ngx-translate/core';
10
+ import * as i0 from "@angular/core";
11
+ export declare class CaseMigrationComponent {
12
+ private readonly documentService;
13
+ private readonly caseMigrationService;
14
+ private readonly iconService;
15
+ private readonly globalNotificationService;
16
+ private readonly translateService;
17
+ readonly sourceCaseDefinitionKeySelected$: BehaviorSubject<string>;
18
+ readonly sourceCaseDefinitionVersionTagSelected$: BehaviorSubject<string>;
19
+ readonly targetCaseDefinitionKeySelected$: BehaviorSubject<string>;
20
+ readonly targetCaseDefinitionVersionTagSelected$: BehaviorSubject<string>;
21
+ readonly patchItems$: BehaviorSubject<MultiInputValues>;
22
+ readonly errors$: BehaviorSubject<string[]>;
23
+ readonly showConfirmationModal$: BehaviorSubject<boolean>;
24
+ constructor(documentService: DocumentService, caseMigrationService: CaseMigrationService, iconService: IconService, globalNotificationService: GlobalNotificationService, translateService: TranslateService);
25
+ readonly caseDefinitions$: Observable<Array<CaseDefinition>>;
26
+ readonly sourceCaseDefinitionKeyItems$: Observable<LoadedValue<Array<ListItem>>>;
27
+ readonly sourceCaseDefinitionVersionTagItems$: Observable<Array<ListItem>>;
28
+ readonly targetCaseDefinitionKeyItems$: Observable<LoadedValue<Array<ListItem>>>;
29
+ readonly targetCaseDefinitionVersionTagItems$: Observable<Array<ListItem>>;
30
+ readonly patches$: Observable<Array<DocumentMigrationPatch>>;
31
+ mappingValueChange(patches: MultiInputValues): void;
32
+ checkPatches(): void;
33
+ migrate(): void;
34
+ protected readonly CARBON_THEME = "g10";
35
+ static ɵfac: i0.ɵɵFactoryDeclaration<CaseMigrationComponent, never>;
36
+ static ɵcmp: i0.ɵɵComponentDeclaration<CaseMigrationComponent, "valtimo-case-migration", never, {}, {}, never, never, false, never>;
37
+ }
@@ -0,0 +1,27 @@
1
+ import { CaseDefinitionId } from '@valtimo/document';
2
+ interface LoadedValue<T> {
3
+ isLoading: boolean;
4
+ value?: T;
5
+ }
6
+ interface DocumentMigrationConflictRequest {
7
+ documentDefinitionNameSource: string;
8
+ caseDefinitionIdSource: CaseDefinitionId;
9
+ documentDefinitionNameTarget: string;
10
+ caseDefinitionIdTarget: CaseDefinitionId;
11
+ patches: DocumentMigrationPatch[];
12
+ }
13
+ interface DocumentMigrationConflictResponse {
14
+ documentDefinitionNameSource: string;
15
+ caseDefinitionIdSource: CaseDefinitionId;
16
+ documentDefinitionNameTarget: string;
17
+ caseDefinitionIdTarget: CaseDefinitionId;
18
+ conflicts: DocumentMigrationPatch[];
19
+ errors: Array<string>;
20
+ documentCount: number;
21
+ }
22
+ interface DocumentMigrationPatch {
23
+ source: string;
24
+ target?: string;
25
+ error?: string;
26
+ }
27
+ export { LoadedValue, DocumentMigrationConflictRequest, DocumentMigrationConflictResponse, DocumentMigrationPatch, };
@@ -0,0 +1 @@
1
+ export * from './case-migration.model';
@@ -0,0 +1,14 @@
1
+ import { HttpClient } from '@angular/common/http';
2
+ import { ConfigService } from '@valtimo/shared';
3
+ import { Observable } from 'rxjs';
4
+ import { DocumentMigrationConflictRequest, DocumentMigrationConflictResponse } from '../models';
5
+ import * as i0 from "@angular/core";
6
+ export declare class CaseMigrationService {
7
+ private http;
8
+ private readonly valtimoEndpointUri;
9
+ constructor(http: HttpClient, configService: ConfigService);
10
+ getConflicts(request: DocumentMigrationConflictRequest): Observable<DocumentMigrationConflictResponse>;
11
+ migrate(request: DocumentMigrationConflictRequest): Observable<void>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<CaseMigrationService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<CaseMigrationService>;
14
+ }
@@ -0,0 +1 @@
1
+ export * from './case-migration.service';
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@valtimo/case-migration",
3
+ "license": "EUPL-1.2",
4
+ "version": "0.0.0-test",
5
+ "peerDependencies": {
6
+ "@angular/common": "19.2.20",
7
+ "@angular/core": "19.2.20"
8
+ },
9
+ "dependencies": {
10
+ "tslib": "2.8.1"
11
+ },
12
+ "module": "fesm2022/valtimo-case-migration.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-case-migration.mjs"
21
+ }
22
+ },
23
+ "sideEffects": false
24
+ }
@@ -0,0 +1,3 @@
1
+ export * from './lib/models';
2
+ export * from './lib/services';
3
+ export * from './lib/case-migration.module';