@veloceapps/sdk 7.0.2-15 → 7.0.2-17
Sign up to get free protection for your applications and to get access to all the features.
- package/cms/plugins/element-hover.plugin.d.ts +2 -0
- package/cms/vendor-map.d.ts +1 -1
- package/core/utils/line-item.utils.d.ts +1 -1
- package/esm2020/cms/plugins/element-hover.plugin.mjs +9 -1
- package/esm2020/core/utils/line-item.utils.mjs +3 -3
- package/esm2020/src/flow-routing.module.mjs +2 -1
- package/fesm2015/veloceapps-sdk-cms.mjs +8 -0
- package/fesm2015/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk-core.mjs +2 -2
- package/fesm2015/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2015/veloceapps-sdk.mjs +1 -0
- package/fesm2015/veloceapps-sdk.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-cms.mjs +8 -0
- package/fesm2020/veloceapps-sdk-cms.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk-core.mjs +2 -2
- package/fesm2020/veloceapps-sdk-core.mjs.map +1 -1
- package/fesm2020/veloceapps-sdk.mjs +1 -0
- package/fesm2020/veloceapps-sdk.mjs.map +1 -1
- package/package.json +1 -1
@@ -1001,6 +1001,7 @@ class ElementHoverPlugin {
|
|
1001
1001
|
this.destroyed$ = new Subject();
|
1002
1002
|
this.mouseOverListenerBound = this.mouseOverListener.bind(this);
|
1003
1003
|
this.mouseLeaveListenerBound = this.mouseLeaveListener.bind(this);
|
1004
|
+
this.clickListenerBound = this.clickListener.bind(this);
|
1004
1005
|
combineLatest([this.runtimeEditorService.editorMode$, this.isHovered$, this.isSelected$])
|
1005
1006
|
.pipe(takeUntil(this.destroyed$))
|
1006
1007
|
.subscribe(([editorMode]) => {
|
@@ -1027,10 +1028,12 @@ class ElementHoverPlugin {
|
|
1027
1028
|
attachListeners() {
|
1028
1029
|
this.el.nativeElement.addEventListener('mouseover', this.mouseOverListenerBound);
|
1029
1030
|
this.el.nativeElement.addEventListener('mouseleave', this.mouseLeaveListenerBound);
|
1031
|
+
this.el.nativeElement.addEventListener('click', this.clickListenerBound);
|
1030
1032
|
}
|
1031
1033
|
detachListeners() {
|
1032
1034
|
this.el.nativeElement.removeEventListener('mouseover', this.mouseOverListenerBound);
|
1033
1035
|
this.el.nativeElement.removeEventListener('mouseleave', this.mouseLeaveListenerBound);
|
1036
|
+
this.el.nativeElement.removeEventListener('click', this.clickListenerBound);
|
1034
1037
|
}
|
1035
1038
|
mouseOverListener(e) {
|
1036
1039
|
const path = e.composedPath();
|
@@ -1044,6 +1047,11 @@ class ElementHoverPlugin {
|
|
1044
1047
|
this.isHovered$.next(isHovered);
|
1045
1048
|
}
|
1046
1049
|
}
|
1050
|
+
clickListener(e) {
|
1051
|
+
if (this.el.nativeElement === e.target) {
|
1052
|
+
this.runtimeEditorService.selectedElementPath$.next(this.metadata.path);
|
1053
|
+
}
|
1054
|
+
}
|
1047
1055
|
mouseLeaveListener() {
|
1048
1056
|
this.isHovered$.next(false);
|
1049
1057
|
}
|