This is an automated email from the ASF dual-hosted git repository.
bossenti pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/streampipes.git
The following commit(s) were added to refs/heads/dev by this push:
new 9e5fdc3cd [#1879] Inject DisplayRecommendedPipe to NaryMappingProperty
(#1981)
9e5fdc3cd is described below
commit 9e5fdc3cdb12e291c1c240dbaaa09841853a075f
Author: Leaf <[email protected]>
AuthorDate: Mon Oct 2 01:12:06 2023 -0700
[#1879] Inject DisplayRecommendedPipe to NaryMappingProperty (#1981)
* implement new round processor
* add English locale, icon, and documentation
* fix checkstyle
* support different rounding modes
* add rounding mode in documentation
* fix time display
* let NaryMapping selection account for property scope
---
.../static-mapping-nary.component.ts | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git
a/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
b/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
index 42b6208d9..98e9c8044 100644
---
a/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
+++
b/ui/src/app/core-ui/static-properties/static-mapping-nary/static-mapping-nary.component.ts
@@ -19,6 +19,7 @@
import { Component, EventEmitter, OnInit, Output } from '@angular/core';
import { StaticMappingComponent } from '../static-mapping/static-mapping';
import { MappingPropertyNary } from '@streampipes/platform-services';
+import { DisplayRecommendedPipe } from '../filter/display-recommended.pipe';
@Component({
selector: 'sp-app-static-mapping-nary',
@@ -31,7 +32,7 @@ export class StaticMappingNaryComponent
{
@Output() inputEmitter: EventEmitter<boolean> = new
EventEmitter<boolean>();
- constructor() {
+ constructor(private displayRecommendedPipe: DisplayRecommendedPipe) {
super();
}
@@ -40,7 +41,12 @@ export class StaticMappingNaryComponent
if (!this.staticProperty.selectedProperties) {
this.selectNone();
} else {
- this.availableProperties.forEach(ep => {
+ let recommendedProperties = this.displayRecommendedPipe.transform(
+ this.availableProperties,
+ this.staticProperty.propertyScope,
+ this.displayRecommended,
+ );
+ recommendedProperties.forEach(ep => {
if (
this.staticProperty.selectedProperties.indexOf(
ep.propertySelector,
@@ -85,7 +91,12 @@ export class StaticMappingNaryComponent
selectAll() {
this.selectNone();
- this.availableProperties.forEach(ep => {
+ let recommendedProperties = this.displayRecommendedPipe.transform(
+ this.availableProperties,
+ this.staticProperty.propertyScope,
+ this.displayRecommended,
+ );
+ recommendedProperties.forEach(ep => {
ep['checked'] = true;
this.addProperty(ep);
});