@valtimo/process-link 13.13.0 → 13.14.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.
@@ -619,7 +619,7 @@ class ProcessLinkService {
619
619
  formData.append('startableByUser', String(startableByUser));
620
620
  return this.http.post(`${this.VALTIMO_ENDPOINT_URI}management/v1/case-definition/${caseDefinitionKey}/version/${caseDefinitionVersionTag}/process-definition`, formData);
621
621
  }
622
- deployProcessWithProcessLinksForBuildingBlock(processLinks = [], processDefinitionId, processXml, buildingBlockKey, buildingBlockVersionTag) {
622
+ deployProcessWithProcessLinksForBuildingBlock(processLinks = [], processDefinitionId, processXml, buildingBlockKey, buildingBlockVersionTag, replace = false) {
623
623
  const formData = new FormData();
624
624
  const processLinksBlob = new Blob([JSON.stringify(processLinks.map(processLink => this.emptyStringToNull(processLink)))], { type: 'application/json' });
625
625
  if (processXml) {
@@ -629,7 +629,10 @@ class ProcessLinkService {
629
629
  formData.append('processDefinitionId', processDefinitionId);
630
630
  }
631
631
  formData.append('processLinks', processLinksBlob);
632
- return this.http.post(`${this.VALTIMO_ENDPOINT_URI}management/v1/building-block/${buildingBlockKey}/version/${buildingBlockVersionTag}/process-definition/${processDefinitionId}`, formData);
632
+ return this.http.post(`${this.VALTIMO_ENDPOINT_URI}management/v1/building-block/${buildingBlockKey}/version/${buildingBlockVersionTag}/process-definition/${processDefinitionId}`, formData, {
633
+ headers: new HttpHeaders().set(InterceptorSkip, '409'),
634
+ params: replace ? new HttpParams().set('replace', 'true') : undefined,
635
+ });
633
636
  }
634
637
  submitForm(processLinkId, formData, documentId, taskInstanceId, documentDefinitionName) {
635
638
  let params = new HttpParams();
@@ -2431,10 +2434,12 @@ class ConfigureBuildingBlockMappingsComponent {
2431
2434
  this.buildingBlockParams$ = getBuildingBlockManagementRouteParams(this.route);
2432
2435
  this.ValuePathSelectorPrefix = ValuePathSelectorPrefix;
2433
2436
  this.sourceIsCase$ = new BehaviorSubject(true);
2437
+ this.sourceIsIndependent$ = new BehaviorSubject(false);
2434
2438
  /**
2435
2439
  * Returns the name of the source/target context in mappings.
2436
2440
  * When in a building block context, shows the parent building block name.
2437
2441
  * When in a case context, shows the case name.
2442
+ * When in an independent process context, shows the process label.
2438
2443
  */
2439
2444
  this.sourceContextName$ = combineLatest([
2440
2445
  this.params$,
@@ -2442,6 +2447,7 @@ class ConfigureBuildingBlockMappingsComponent {
2442
2447
  ]).pipe(switchMap$1(([caseParams, bbParams]) => {
2443
2448
  if (bbParams?.buildingBlockDefinitionKey && bbParams?.buildingBlockDefinitionVersionTag) {
2444
2449
  this.sourceIsCase$.next(false);
2450
+ this.sourceIsIndependent$.next(false);
2445
2451
  // We're in a building block context - fetch the parent building block name
2446
2452
  return this.buildingBlockApiService
2447
2453
  .getBuildingBlockDefinition(bbParams.buildingBlockDefinitionKey, bbParams.buildingBlockDefinitionVersionTag)
@@ -2449,12 +2455,16 @@ class ConfigureBuildingBlockMappingsComponent {
2449
2455
  }
2450
2456
  else if (caseParams?.caseDefinitionKey && caseParams?.caseDefinitionVersionTag) {
2451
2457
  this.sourceIsCase$.next(true);
2458
+ this.sourceIsIndependent$.next(false);
2452
2459
  // We're in a case context - fetch the case name
2453
2460
  return this.buildingBlockApiService
2454
2461
  .getCaseDefinition(caseParams.caseDefinitionKey, caseParams.caseDefinitionVersionTag)
2455
2462
  .pipe(map$1(def => def?.name ?? caseParams.caseDefinitionKey));
2456
2463
  }
2457
- return of(this.translateService.instant('processLinkConfiguration.buildingBlock.case'));
2464
+ // We're in an independent process context
2465
+ this.sourceIsCase$.next(false);
2466
+ this.sourceIsIndependent$.next(true);
2467
+ return of(this.translateService.instant('processLinkConfiguration.buildingBlock.process'));
2458
2468
  }));
2459
2469
  /**
2460
2470
  * Returns the name of the building block being configured.
@@ -2473,6 +2483,8 @@ class ConfigureBuildingBlockMappingsComponent {
2473
2483
  this._subscriptions = new Subscription();
2474
2484
  this._syncingFromState = false;
2475
2485
  this._suppressValidation = false;
2486
+ this._inputRefreshHandle = null;
2487
+ this._destroyed = false;
2476
2488
  this.allInputsMapped$ = combineLatest([
2477
2489
  this.buildingBlockFields$,
2478
2490
  this.inputsForm.valueChanges.pipe(startWith(this.inputsForm.value)),
@@ -2485,11 +2497,12 @@ class ConfigureBuildingBlockMappingsComponent {
2485
2497
  }));
2486
2498
  }
2487
2499
  ngOnInit() {
2488
- combineLatest([this.buildingBlockFields$, this.buildingBlockStateService.inputMappings$])
2489
- .pipe(take(1))
2490
- .subscribe(([fields, mappings]) => {
2491
- this.syncInputsFromState(fields, mappings);
2492
- });
2500
+ this._subscriptions.add(combineLatest([
2501
+ this.buildingBlockFields$,
2502
+ this.buildingBlockStateService.inputMappings$,
2503
+ ]).subscribe(([fields, mappings]) => {
2504
+ this.syncInputsIfNeeded(fields, mappings);
2505
+ }));
2493
2506
  this.buildingBlockStateService.outputMappings$.pipe(take(1)).subscribe(mappings => {
2494
2507
  this.syncOutputsFromState(mappings);
2495
2508
  });
@@ -2512,7 +2525,15 @@ class ConfigureBuildingBlockMappingsComponent {
2512
2525
  this.persistInputFormState();
2513
2526
  }));
2514
2527
  }
2528
+ ngAfterViewInit() {
2529
+ this.queueInputSourceRefresh();
2530
+ }
2515
2531
  ngOnDestroy() {
2532
+ this._destroyed = true;
2533
+ if (this._inputRefreshHandle !== null) {
2534
+ clearTimeout(this._inputRefreshHandle);
2535
+ this._inputRefreshHandle = null;
2536
+ }
2516
2537
  this._subscriptions.unsubscribe();
2517
2538
  }
2518
2539
  createInputGroup(mapping) {
@@ -2572,6 +2593,60 @@ class ConfigureBuildingBlockMappingsComponent {
2572
2593
  });
2573
2594
  this._syncingFromState = false;
2574
2595
  this.triggerValidation();
2596
+ this.queueInputSourceRefresh();
2597
+ }
2598
+ syncInputsIfNeeded(fields, mappings) {
2599
+ if (this._syncingFromState) {
2600
+ return;
2601
+ }
2602
+ const requiredTargets = fields.filter(f => f.required).map(f => f.name);
2603
+ const currentTargets = this.inputs.controls
2604
+ .map(group => group.controls.target.value)
2605
+ .filter((target) => !!target) ?? [];
2606
+ const missingRequired = requiredTargets.some(target => !currentTargets.includes(target));
2607
+ const shouldSync = (this.inputs.length === 0 && (mappings.length > 0 || fields.length > 0)) || missingRequired;
2608
+ if (shouldSync) {
2609
+ this.syncInputsFromState(fields, mappings);
2610
+ return;
2611
+ }
2612
+ this.applyMappingSources(mappings);
2613
+ }
2614
+ applyMappingSources(mappings) {
2615
+ const mappingByTarget = new Map(mappings.filter(mapping => !!mapping.target).map(mapping => [mapping.target, mapping]));
2616
+ let updated = false;
2617
+ this._syncingFromState = true;
2618
+ this.inputs.controls.forEach(group => {
2619
+ const target = group.controls.target.value;
2620
+ if (!target)
2621
+ return;
2622
+ const mapping = mappingByTarget.get(target);
2623
+ if (!mapping?.source)
2624
+ return;
2625
+ if (!group.controls.source.value) {
2626
+ group.controls.source.setValue(mapping.source);
2627
+ updated = true;
2628
+ }
2629
+ });
2630
+ this._syncingFromState = false;
2631
+ if (updated) {
2632
+ this.triggerValidation();
2633
+ this.queueInputSourceRefresh();
2634
+ }
2635
+ }
2636
+ queueInputSourceRefresh() {
2637
+ if (this._inputRefreshHandle !== null) {
2638
+ clearTimeout(this._inputRefreshHandle);
2639
+ }
2640
+ this._inputRefreshHandle = window.setTimeout(() => {
2641
+ if (this._destroyed)
2642
+ return;
2643
+ this.inputs.controls.forEach(group => {
2644
+ const value = group.controls.source.value ?? '';
2645
+ group.controls.source.setValue(value, { emitEvent: false });
2646
+ });
2647
+ this.changeDetectorRef.detectChanges();
2648
+ this._inputRefreshHandle = null;
2649
+ }, 0);
2575
2650
  }
2576
2651
  isSyncTimingSelected(group, value) {
2577
2652
  return group.controls.syncTiming.value === value;
@@ -2777,7 +2852,7 @@ class ConfigureBuildingBlockMappingsComponent {
2777
2852
  return fields.some(field => field.required && field.name === target);
2778
2853
  }
2779
2854
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ConfigureBuildingBlockMappingsComponent, deps: [{ token: i1$2.FormBuilder }, { token: BuildingBlockStateService }, { token: ProcessLinkButtonService }, { token: ProcessLinkStepService }, { token: ProcessLinkService }, { token: ProcessLinkStateService }, { token: i3.TranslateService }, { token: i3$3.ActivatedRoute }, { token: i0.ChangeDetectorRef }, { token: ProcessLinkBuildingBlockApiService }, { token: ProcessLinkStateService }], target: i0.ɵɵFactoryTarget.Component }); }
2780
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: ConfigureBuildingBlockMappingsComponent, isStandalone: true, selector: "valtimo-configure-building-block-mappings", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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@let obs =\n {\n fields: (buildingBlockFields$ | async),\n fieldItems: (buildingBlockFieldItems$ | async),\n params: (params$ | async),\n buildingBlockParams: (buildingBlockParams$ | async),\n sourceContextName: (sourceContextName$ | async),\n targetBuildingBlockName: (targetBuildingBlockName$ | async),\n sourceIsCase: (sourceIsCase$ | async),\n caseLabelTranslation: ('Case' | translate),\n buildingBlockLabelTranslation:\n ('processLinkConfiguration.buildingBlock.selectLabel' | translate),\n };\n\n<div class=\"mapping-step\">\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.inputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"inputsForm\">\n <div class=\"mapping-header input\">\n <v-input-label\n [title]=\"\n (obs.sourceIsCase ? obs.caseLabelTranslation : obs.buildingBlockLabelTranslation) +\n ': ' +\n obs.sourceContextName\n \"\n />\n\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n </div>\n\n <div formArrayName=\"inputs\">\n @for (group of inputs.controls; let inputIndex = $index; track inputIndex) {\n <div class=\"mapping-row input\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [formControl]=\"group.get('source')\"\n ></valtimo-value-path-selector>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n @if (isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <div class=\"required-target\">\n {{ 'doc:' + group.get('target')?.value }}\n </div>\n } @else {\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"target\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [items]=\"getBuildingBlockFieldItemsForRow$(group) | async\"\n [dropUp]=\"false\"\n >\n </v-select>\n }\n </div>\n\n <div class=\"mapping-cell-actions\">\n @if (!isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteInput(inputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n } @else {\n <div class=\"required-indicator\">*</div>\n\n <div>\n {{ 'interface.required' | translate }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addInput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addInput' | translate\"\n [disabled]=\"allInputsMapped$ | async\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addInput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.outputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"outputsForm\">\n <div class=\"mapping-header output\">\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n\n <v-input-label\n [title]=\"\n (obs.sourceIsCase ? obs.caseLabelTranslation : obs.buildingBlockLabelTranslation) +\n ': ' +\n obs.sourceContextName\n \"\n />\n\n <div class=\"sync-options\" [style.display]=\"'none'\">\n <v-input-label\n [title]=\"'processLinkConfiguration.buildingBlock.sync.title' | translate\"\n />\n </div>\n </div>\n\n <div formArrayName=\"outputs\">\n @for (group of outputs.controls; let outputIndex = $index; track outputIndex) {\n <div class=\"mapping-row output\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"source\"\n [items]=\"obs.fieldItems || []\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [dropUp]=\"true\"\n >\n </v-select>\n </div>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [formControl]=\"group.get('target')\"\n [appendInline]=\"false\"\n [filterItems]=\"getUsedCaseTargetsForRow$(group) | async\"\n [dropUp]=\"true\"\n ></valtimo-value-path-selector>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\" [style.display]=\"'none'\">\n <cds-radio-group\n class=\"sync-radio-group\"\n formControlName=\"syncTiming\"\n [attr.name]=\"'syncTiming-' + outputIndex\"\n >\n @for (item of syncTimingItems; track item.id) {\n <cds-radio [value]=\"item.id\" [checked]=\"isSyncTimingSelected(group, item.id)\">\n {{ item.labelKey | translate }}\n </cds-radio>\n }\n </cds-radio-group>\n </div>\n\n <div class=\"mapping-cell-actions\">\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteOutput(outputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addOutput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addOutput' | translate\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addOutput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n</div>\n", styles: [".section-header{font-size:14px;line-height:18px;font-weight:600}.mapping-section{margin-bottom:16px}.mapping-row,.mapping-header{display:grid;align-items:center}.mapping-row.input,.mapping-header.input{grid-template-columns:1fr 1fr}.mapping-row.output,.mapping-header.output{grid-template-columns:5fr 6fr 58px}.mapping-header .output .sync-options{padding-left:10px;display:flex}.mapping-row{margin-bottom:8px;padding:8px;background-color:var(--cds-layer)}.mapping-row .mapping-part{display:flex}.mapping-row .arrow{text-align:center;width:40px;line-height:40px;font-size:large}.mapping-row .mapping-cell{flex:1;min-width:0}.mapping-row .mapping-cell-actions{display:flex;align-self:flex-end;text-transform:capitalize;margin-left:10px}.mapping-row .mapping-cell-actions .required-indicator{margin:0 5px;color:var(--cds-text-error)}.mapping-row .mapping-cell-actions button{margin-bottom:5px}.mapping-row .mapping-cell-actions button ::ng-deep .cds--btn__icon{margin:0!important}.mapping-row .sync-radio-group{padding-left:10px;margin-top:8px}.mapping-row .sync-radio-group .sync-radio:first-child{margin-right:0}.mapping-row .sync-radio-group ::ng-deep .cds--radio-button__label{justify-content:normal}::ng-deep .process-link-modal-container .cds--modal-container{max-width:1280px}\n/*!\n * Copyright 2015-2026 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: ComboBoxModule }, { kind: "ngmodule", type: RadioModule }, { kind: "component", type: i3$2.Radio, selector: "cds-radio, ibm-radio", inputs: ["checked", "name", "disabled", "labelPlacement", "ariaLabelledby", "ariaLabel", "required", "value", "skeleton", "id"], outputs: ["change"] }, { kind: "component", type: i3$2.RadioGroup, selector: "cds-radio-group, ibm-radio-group", inputs: ["selected", "value", "name", "disabled", "skeleton", "orientation", "labelPlacement", "legend", "ariaLabel", "ariaLabelledby", "helperText", "invalid", "invalidText", "warn", "warnText"], outputs: ["change"] }, { kind: "ngmodule", type: InputModule }, { kind: "component", type: ValuePathSelectorComponent, selector: "valtimo-value-path-selector", inputs: ["name", "appendInline", "margin", "marginLg", "marginXl", "disabled", "caseDefinitionKey", "caseDefinitionVersionTag", "buildingBlockDefinitionKey", "buildingBlockDefinitionVersionTag", "prefixes", "label", "tooltip", "required", "showCaseDefinitionSelector", "notation", "dropUp", "defaultValue", "type", "parentItem", "filterItems"], outputs: ["valueChangeEvent", "collectionSelected"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i2$1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3$2.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "warn", "warnText", "dataTestId"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i3$2.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2855
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.18", type: ConfigureBuildingBlockMappingsComponent, isStandalone: true, selector: "valtimo-configure-building-block-mappings", ngImport: i0, template: "<!--\n ~ Copyright 2015-2026 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@let obs =\n {\n fields: (buildingBlockFields$ | async),\n fieldItems: (buildingBlockFieldItems$ | async),\n params: (params$ | async),\n buildingBlockParams: (buildingBlockParams$ | async),\n sourceContextName: (sourceContextName$ | async),\n targetBuildingBlockName: (targetBuildingBlockName$ | async),\n sourceIsCase: (sourceIsCase$ | async),\n sourceIsIndependent: (sourceIsIndependent$ | async),\n caseLabelTranslation: ('Case' | translate),\n processLabelTranslation: ('processLinkConfiguration.buildingBlock.process' | translate),\n buildingBlockLabelTranslation:\n ('processLinkConfiguration.buildingBlock.selectLabel' | translate),\n };\n\n<div class=\"mapping-step\">\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.inputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"inputsForm\">\n <div class=\"mapping-header input\">\n <v-input-label\n [title]=\"\n (obs.sourceIsIndependent\n ? obs.processLabelTranslation\n : obs.sourceIsCase\n ? obs.caseLabelTranslation\n : obs.buildingBlockLabelTranslation) +\n (obs.sourceIsIndependent ? '' : ': ' + obs.sourceContextName)\n \"\n />\n\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n </div>\n\n <div formArrayName=\"inputs\">\n @for (group of inputs.controls; let inputIndex = $index; track inputIndex) {\n <div class=\"mapping-row input\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n @if (obs.sourceIsIndependent) {\n <input [cdsLayer]=\"2\" cdsText formControlName=\"source\" [placeholder]=\"'pv:'\" />\n } @else {\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [formControl]=\"group.get('source')\"\n ></valtimo-value-path-selector>\n }\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n @if (isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <div class=\"required-target\">\n {{ 'doc:' + group.get('target')?.value }}\n </div>\n } @else {\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"target\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [items]=\"getBuildingBlockFieldItemsForRow$(group) | async\"\n [dropUp]=\"false\"\n >\n </v-select>\n }\n </div>\n\n <div class=\"mapping-cell-actions\">\n @if (!isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteInput(inputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n } @else {\n <div class=\"required-indicator\">*</div>\n\n <div>\n {{ 'interface.required' | translate }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addInput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addInput' | translate\"\n [disabled]=\"allInputsMapped$ | async\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addInput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.outputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"outputsForm\">\n <div class=\"mapping-header output\">\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n\n <v-input-label\n [title]=\"\n (obs.sourceIsIndependent\n ? obs.processLabelTranslation\n : obs.sourceIsCase\n ? obs.caseLabelTranslation\n : obs.buildingBlockLabelTranslation) +\n (obs.sourceIsIndependent ? '' : ': ' + obs.sourceContextName)\n \"\n />\n\n <div class=\"sync-options\" [style.display]=\"'none'\">\n <v-input-label\n [title]=\"'processLinkConfiguration.buildingBlock.sync.title' | translate\"\n />\n </div>\n </div>\n\n <div formArrayName=\"outputs\">\n @for (group of outputs.controls; let outputIndex = $index; track outputIndex) {\n <div class=\"mapping-row output\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"source\"\n [items]=\"obs.fieldItems || []\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [dropUp]=\"true\"\n >\n </v-select>\n </div>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n @if (obs.sourceIsIndependent) {\n <input [cdsLayer]=\"2\" cdsText formControlName=\"target\" [placeholder]=\"'pv:'\" />\n } @else {\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [formControl]=\"group.get('target')\"\n [appendInline]=\"false\"\n [filterItems]=\"getUsedCaseTargetsForRow$(group) | async\"\n [dropUp]=\"true\"\n ></valtimo-value-path-selector>\n }\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\" [style.display]=\"'none'\">\n <cds-radio-group\n class=\"sync-radio-group\"\n formControlName=\"syncTiming\"\n [attr.name]=\"'syncTiming-' + outputIndex\"\n >\n @for (item of syncTimingItems; track item.id) {\n <cds-radio [value]=\"item.id\" [checked]=\"isSyncTimingSelected(group, item.id)\">\n {{ item.labelKey | translate }}\n </cds-radio>\n }\n </cds-radio-group>\n </div>\n\n <div class=\"mapping-cell-actions\">\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteOutput(outputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addOutput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addOutput' | translate\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addOutput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n</div>\n", styles: [".section-header{font-size:14px;line-height:18px;font-weight:600}.mapping-section{margin-bottom:16px}.mapping-row,.mapping-header{display:grid;align-items:center}.mapping-row.input,.mapping-header.input{grid-template-columns:1fr 1fr}.mapping-row.output,.mapping-header.output{grid-template-columns:5fr 6fr 58px}.mapping-header .output .sync-options{padding-left:10px;display:flex}.mapping-row{margin-bottom:8px;padding:8px;background-color:var(--cds-layer)}.mapping-row .mapping-part{display:flex}.mapping-row .arrow{text-align:center;width:40px;line-height:40px;font-size:large}.mapping-row .mapping-cell{flex:1;min-width:0}.mapping-row .mapping-cell-actions{display:flex;align-self:flex-end;text-transform:capitalize;margin-left:10px}.mapping-row .mapping-cell-actions .required-indicator{margin:0 5px;color:var(--cds-text-error)}.mapping-row .mapping-cell-actions button{margin-bottom:5px}.mapping-row .mapping-cell-actions button ::ng-deep .cds--btn__icon{margin:0!important}.mapping-row .sync-radio-group{padding-left:10px;margin-top:8px}.mapping-row .sync-radio-group .sync-radio:first-child{margin-right:0}.mapping-row .sync-radio-group ::ng-deep .cds--radio-button__label{justify-content:normal}::ng-deep .process-link-modal-container .cds--modal-container{max-width:1280px}\n/*!\n * Copyright 2015-2026 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"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i3$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1$2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$2.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1$2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i1$2.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "ngmodule", type: ComboBoxModule }, { kind: "ngmodule", type: RadioModule }, { kind: "component", type: i3$2.Radio, selector: "cds-radio, ibm-radio", inputs: ["checked", "name", "disabled", "labelPlacement", "ariaLabelledby", "ariaLabel", "required", "value", "skeleton", "id"], outputs: ["change"] }, { kind: "component", type: i3$2.RadioGroup, selector: "cds-radio-group, ibm-radio-group", inputs: ["selected", "value", "name", "disabled", "skeleton", "orientation", "labelPlacement", "legend", "ariaLabel", "ariaLabelledby", "helperText", "invalid", "invalidText", "warn", "warnText"], outputs: ["change"] }, { kind: "ngmodule", type: InputModule }, { kind: "directive", type: i3$2.TextInput, selector: "[cdsText], [ibmText]", inputs: ["theme", "size", "invalid", "warn", "skeleton"] }, { kind: "component", type: ValuePathSelectorComponent, selector: "valtimo-value-path-selector", inputs: ["name", "appendInline", "margin", "marginLg", "marginXl", "disabled", "caseDefinitionKey", "caseDefinitionVersionTag", "buildingBlockDefinitionKey", "buildingBlockDefinitionVersionTag", "prefixes", "label", "tooltip", "required", "showCaseDefinitionSelector", "notation", "dropUp", "defaultValue", "type", "parentItem", "filterItems"], outputs: ["valueChangeEvent", "collectionSelected"] }, { kind: "ngmodule", type: InputLabelModule }, { kind: "component", type: i2$1.InputLabelComponent, selector: "v-input-label", inputs: ["name", "tooltip", "tooltipTranslationKey", "largeMargin", "small", "noMargin", "title", "titleTranslationKey", "required", "disabled", "carbonTheme"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3.TranslatePipe, name: "translate" }, { kind: "ngmodule", type: ButtonModule }, { kind: "directive", type: i3$2.Button, selector: "[cdsButton], [ibmButton]", inputs: ["ibmButton", "cdsButton", "size", "skeleton", "iconOnly", "isExpressive"] }, { kind: "ngmodule", type: IconModule }, { kind: "directive", type: i3$2.IconDirective, selector: "[cdsIcon], [ibmIcon]", inputs: ["ibmIcon", "cdsIcon", "size", "title", "ariaLabel", "ariaLabelledBy", "ariaHidden", "isFocusable"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$1.SelectComponent, selector: "v-select", inputs: ["items", "defaultSelection", "defaultSelectionId", "defaultSelectionIds", "disabled", "dropUp", "invalid", "multiple", "margin", "widthInPx", "notFoundText", "clearAllText", "clearText", "clearable", "name", "title", "titleTranslationKey", "clearSelectionSubject$", "tooltip", "required", "loading", "loadingText", "placeholder", "smallMargin", "carbonTheme", "appendInline", "warn", "warnText", "dataTestId"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: LayerModule }, { kind: "directive", type: i3$2.LayerDirective, selector: "[cdsLayer], [ibmLayer]", inputs: ["ibmLayer", "cdsLayer"], exportAs: ["layer"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
2781
2856
  }
2782
2857
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImport: i0, type: ConfigureBuildingBlockMappingsComponent, decorators: [{
2783
2858
  type: Component,
@@ -2794,7 +2869,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.18", ngImpo
2794
2869
  IconModule,
2795
2870
  SelectModule,
2796
2871
  LayerModule,
2797
- ], template: "<!--\n ~ Copyright 2015-2026 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@let obs =\n {\n fields: (buildingBlockFields$ | async),\n fieldItems: (buildingBlockFieldItems$ | async),\n params: (params$ | async),\n buildingBlockParams: (buildingBlockParams$ | async),\n sourceContextName: (sourceContextName$ | async),\n targetBuildingBlockName: (targetBuildingBlockName$ | async),\n sourceIsCase: (sourceIsCase$ | async),\n caseLabelTranslation: ('Case' | translate),\n buildingBlockLabelTranslation:\n ('processLinkConfiguration.buildingBlock.selectLabel' | translate),\n };\n\n<div class=\"mapping-step\">\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.inputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"inputsForm\">\n <div class=\"mapping-header input\">\n <v-input-label\n [title]=\"\n (obs.sourceIsCase ? obs.caseLabelTranslation : obs.buildingBlockLabelTranslation) +\n ': ' +\n obs.sourceContextName\n \"\n />\n\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n </div>\n\n <div formArrayName=\"inputs\">\n @for (group of inputs.controls; let inputIndex = $index; track inputIndex) {\n <div class=\"mapping-row input\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [formControl]=\"group.get('source')\"\n ></valtimo-value-path-selector>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n @if (isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <div class=\"required-target\">\n {{ 'doc:' + group.get('target')?.value }}\n </div>\n } @else {\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"target\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [items]=\"getBuildingBlockFieldItemsForRow$(group) | async\"\n [dropUp]=\"false\"\n >\n </v-select>\n }\n </div>\n\n <div class=\"mapping-cell-actions\">\n @if (!isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteInput(inputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n } @else {\n <div class=\"required-indicator\">*</div>\n\n <div>\n {{ 'interface.required' | translate }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addInput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addInput' | translate\"\n [disabled]=\"allInputsMapped$ | async\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addInput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.outputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"outputsForm\">\n <div class=\"mapping-header output\">\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n\n <v-input-label\n [title]=\"\n (obs.sourceIsCase ? obs.caseLabelTranslation : obs.buildingBlockLabelTranslation) +\n ': ' +\n obs.sourceContextName\n \"\n />\n\n <div class=\"sync-options\" [style.display]=\"'none'\">\n <v-input-label\n [title]=\"'processLinkConfiguration.buildingBlock.sync.title' | translate\"\n />\n </div>\n </div>\n\n <div formArrayName=\"outputs\">\n @for (group of outputs.controls; let outputIndex = $index; track outputIndex) {\n <div class=\"mapping-row output\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"source\"\n [items]=\"obs.fieldItems || []\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [dropUp]=\"true\"\n >\n </v-select>\n </div>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [formControl]=\"group.get('target')\"\n [appendInline]=\"false\"\n [filterItems]=\"getUsedCaseTargetsForRow$(group) | async\"\n [dropUp]=\"true\"\n ></valtimo-value-path-selector>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\" [style.display]=\"'none'\">\n <cds-radio-group\n class=\"sync-radio-group\"\n formControlName=\"syncTiming\"\n [attr.name]=\"'syncTiming-' + outputIndex\"\n >\n @for (item of syncTimingItems; track item.id) {\n <cds-radio [value]=\"item.id\" [checked]=\"isSyncTimingSelected(group, item.id)\">\n {{ item.labelKey | translate }}\n </cds-radio>\n }\n </cds-radio-group>\n </div>\n\n <div class=\"mapping-cell-actions\">\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteOutput(outputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addOutput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addOutput' | translate\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addOutput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n</div>\n", styles: [".section-header{font-size:14px;line-height:18px;font-weight:600}.mapping-section{margin-bottom:16px}.mapping-row,.mapping-header{display:grid;align-items:center}.mapping-row.input,.mapping-header.input{grid-template-columns:1fr 1fr}.mapping-row.output,.mapping-header.output{grid-template-columns:5fr 6fr 58px}.mapping-header .output .sync-options{padding-left:10px;display:flex}.mapping-row{margin-bottom:8px;padding:8px;background-color:var(--cds-layer)}.mapping-row .mapping-part{display:flex}.mapping-row .arrow{text-align:center;width:40px;line-height:40px;font-size:large}.mapping-row .mapping-cell{flex:1;min-width:0}.mapping-row .mapping-cell-actions{display:flex;align-self:flex-end;text-transform:capitalize;margin-left:10px}.mapping-row .mapping-cell-actions .required-indicator{margin:0 5px;color:var(--cds-text-error)}.mapping-row .mapping-cell-actions button{margin-bottom:5px}.mapping-row .mapping-cell-actions button ::ng-deep .cds--btn__icon{margin:0!important}.mapping-row .sync-radio-group{padding-left:10px;margin-top:8px}.mapping-row .sync-radio-group .sync-radio:first-child{margin-right:0}.mapping-row .sync-radio-group ::ng-deep .cds--radio-button__label{justify-content:normal}::ng-deep .process-link-modal-container .cds--modal-container{max-width:1280px}\n/*!\n * Copyright 2015-2026 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"] }]
2872
+ ], template: "<!--\n ~ Copyright 2015-2026 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@let obs =\n {\n fields: (buildingBlockFields$ | async),\n fieldItems: (buildingBlockFieldItems$ | async),\n params: (params$ | async),\n buildingBlockParams: (buildingBlockParams$ | async),\n sourceContextName: (sourceContextName$ | async),\n targetBuildingBlockName: (targetBuildingBlockName$ | async),\n sourceIsCase: (sourceIsCase$ | async),\n sourceIsIndependent: (sourceIsIndependent$ | async),\n caseLabelTranslation: ('Case' | translate),\n processLabelTranslation: ('processLinkConfiguration.buildingBlock.process' | translate),\n buildingBlockLabelTranslation:\n ('processLinkConfiguration.buildingBlock.selectLabel' | translate),\n };\n\n<div class=\"mapping-step\">\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.inputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"inputsForm\">\n <div class=\"mapping-header input\">\n <v-input-label\n [title]=\"\n (obs.sourceIsIndependent\n ? obs.processLabelTranslation\n : obs.sourceIsCase\n ? obs.caseLabelTranslation\n : obs.buildingBlockLabelTranslation) +\n (obs.sourceIsIndependent ? '' : ': ' + obs.sourceContextName)\n \"\n />\n\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n </div>\n\n <div formArrayName=\"inputs\">\n @for (group of inputs.controls; let inputIndex = $index; track inputIndex) {\n <div class=\"mapping-row input\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n @if (obs.sourceIsIndependent) {\n <input [cdsLayer]=\"2\" cdsText formControlName=\"source\" [placeholder]=\"'pv:'\" />\n } @else {\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [appendInline]=\"false\"\n [dropUp]=\"false\"\n [formControl]=\"group.get('source')\"\n ></valtimo-value-path-selector>\n }\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n @if (isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <div class=\"required-target\">\n {{ 'doc:' + group.get('target')?.value }}\n </div>\n } @else {\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"target\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [items]=\"getBuildingBlockFieldItemsForRow$(group) | async\"\n [dropUp]=\"false\"\n >\n </v-select>\n }\n </div>\n\n <div class=\"mapping-cell-actions\">\n @if (!isRequiredTarget(obs.fields, group.get('target')?.value)) {\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteInput(inputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n } @else {\n <div class=\"required-indicator\">*</div>\n\n <div>\n {{ 'interface.required' | translate }}\n </div>\n }\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addInput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addInput' | translate\"\n [disabled]=\"allInputsMapped$ | async\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addInput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n\n <section class=\"mapping-section\">\n <h4 class=\"section-header\">\n {{ 'processLinkConfiguration.buildingBlock.outputTitle' | translate }}\n </h4>\n\n <div class=\"mapping-table\" [formGroup]=\"outputsForm\">\n <div class=\"mapping-header output\">\n <v-input-label\n [title]=\"obs.buildingBlockLabelTranslation + ': ' + obs.targetBuildingBlockName\"\n />\n\n <v-input-label\n [title]=\"\n (obs.sourceIsIndependent\n ? obs.processLabelTranslation\n : obs.sourceIsCase\n ? obs.caseLabelTranslation\n : obs.buildingBlockLabelTranslation) +\n (obs.sourceIsIndependent ? '' : ': ' + obs.sourceContextName)\n \"\n />\n\n <div class=\"sync-options\" [style.display]=\"'none'\">\n <v-input-label\n [title]=\"'processLinkConfiguration.buildingBlock.sync.title' | translate\"\n />\n </div>\n </div>\n\n <div formArrayName=\"outputs\">\n @for (group of outputs.controls; let outputIndex = $index; track outputIndex) {\n <div class=\"mapping-row output\" [formGroup]=\"group\">\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\">\n <v-select\n [cdsLayer]=\"2\"\n [appendInline]=\"false\"\n formControlName=\"source\"\n [items]=\"obs.fieldItems || []\"\n [placeholder]=\"\n 'processLinkConfiguration.buildingBlock.selectedBuildingBlockFieldPlaceholder'\n | translate\n \"\n [dropUp]=\"true\"\n >\n </v-select>\n </div>\n\n <div class=\"arrow\">\u2192</div>\n </div>\n\n <div class=\"mapping-part\">\n @if (obs.sourceIsIndependent) {\n <input [cdsLayer]=\"2\" cdsText formControlName=\"target\" [placeholder]=\"'pv:'\" />\n } @else {\n <valtimo-value-path-selector\n [cdsLayer]=\"2\"\n [prefixes]=\"[ValuePathSelectorPrefix.DOC, ValuePathSelectorPrefix.CASE]\"\n [caseDefinitionKey]=\"obs.params?.caseDefinitionKey\"\n [caseDefinitionVersionTag]=\"obs.params?.caseDefinitionVersionTag\"\n [buildingBlockDefinitionKey]=\"obs.buildingBlockParams?.buildingBlockDefinitionKey\"\n [buildingBlockDefinitionVersionTag]=\"\n obs.buildingBlockParams?.buildingBlockDefinitionVersionTag\n \"\n [formControl]=\"group.get('target')\"\n [appendInline]=\"false\"\n [filterItems]=\"getUsedCaseTargetsForRow$(group) | async\"\n [dropUp]=\"true\"\n ></valtimo-value-path-selector>\n }\n </div>\n\n <div class=\"mapping-part\">\n <div class=\"mapping-cell\" [style.display]=\"'none'\">\n <cds-radio-group\n class=\"sync-radio-group\"\n formControlName=\"syncTiming\"\n [attr.name]=\"'syncTiming-' + outputIndex\"\n >\n @for (item of syncTimingItems; track item.id) {\n <cds-radio [value]=\"item.id\" [checked]=\"isSyncTimingSelected(group, item.id)\">\n {{ item.labelKey | translate }}\n </cds-radio>\n }\n </cds-radio-group>\n </div>\n\n <div class=\"mapping-cell-actions\">\n <button\n cdsButton=\"danger--ghost\"\n iconOnly\n size=\"sm\"\n (click)=\"deleteOutput(outputIndex)\"\n >\n <svg cdsIcon=\"trash-can\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </div>\n </div>\n </div>\n }\n </div>\n </div>\n\n <button\n cdsButton=\"tertiary\"\n size=\"sm\"\n (click)=\"addOutput()\"\n [title]=\"'processLinkConfiguration.buildingBlock.addOutput' | translate\"\n >\n {{ 'processLinkConfiguration.buildingBlock.addOutput' | translate }}\n\n <svg cdsIcon=\"add\" class=\"cds--btn__icon\" size=\"16\"></svg>\n </button>\n </section>\n</div>\n", styles: [".section-header{font-size:14px;line-height:18px;font-weight:600}.mapping-section{margin-bottom:16px}.mapping-row,.mapping-header{display:grid;align-items:center}.mapping-row.input,.mapping-header.input{grid-template-columns:1fr 1fr}.mapping-row.output,.mapping-header.output{grid-template-columns:5fr 6fr 58px}.mapping-header .output .sync-options{padding-left:10px;display:flex}.mapping-row{margin-bottom:8px;padding:8px;background-color:var(--cds-layer)}.mapping-row .mapping-part{display:flex}.mapping-row .arrow{text-align:center;width:40px;line-height:40px;font-size:large}.mapping-row .mapping-cell{flex:1;min-width:0}.mapping-row .mapping-cell-actions{display:flex;align-self:flex-end;text-transform:capitalize;margin-left:10px}.mapping-row .mapping-cell-actions .required-indicator{margin:0 5px;color:var(--cds-text-error)}.mapping-row .mapping-cell-actions button{margin-bottom:5px}.mapping-row .mapping-cell-actions button ::ng-deep .cds--btn__icon{margin:0!important}.mapping-row .sync-radio-group{padding-left:10px;margin-top:8px}.mapping-row .sync-radio-group .sync-radio:first-child{margin-right:0}.mapping-row .sync-radio-group ::ng-deep .cds--radio-button__label{justify-content:normal}::ng-deep .process-link-modal-container .cds--modal-container{max-width:1280px}\n/*!\n * Copyright 2015-2026 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"] }]
2798
2873
  }], ctorParameters: () => [{ type: i1$2.FormBuilder }, { type: BuildingBlockStateService }, { type: ProcessLinkButtonService }, { type: ProcessLinkStepService }, { type: ProcessLinkService }, { type: ProcessLinkStateService }, { type: i3.TranslateService }, { type: i3$3.ActivatedRoute }, { type: i0.ChangeDetectorRef }, { type: ProcessLinkBuildingBlockApiService }, { type: ProcessLinkStateService }] });
2799
2874
 
2800
2875
  /*