Merge pull request #12997 from vvlladd28/improvement/popover-settings/disable-close-click-outside

Disabled closing the settings panel popover on outside click
This commit is contained in:
Igor Kulikov 2025-03-21 19:07:47 +02:00 committed by GitHub
commit d6acf00ba2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
22 changed files with 28 additions and 27 deletions

View File

@ -305,7 +305,7 @@ export class EntityVersionDiffComponent extends PageComponent implements OnInit,
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const restoreVersionPopover = this.popoverService.displayPopover(trigger, this.renderer, const restoreVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionRestoreComponent, 'leftTop', true, null, this.viewContainerRef, EntityVersionRestoreComponent, 'leftTop', false, null,
{ {
versionName: this.versionName, versionName: this.versionName,
versionId: this.versionId, versionId: this.versionId,

View File

@ -212,7 +212,7 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const createVersionPopover = this.popoverService.displayPopover(trigger, this.renderer, const createVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionCreateComponent, 'leftTop', true, null, this.viewContainerRef, EntityVersionCreateComponent, 'leftTop', false, null,
{ {
branch: this.branch, branch: this.branch,
entityId: this.entityId, entityId: this.entityId,
@ -244,7 +244,7 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const complexCreateVersionPopover = this.popoverService.displayPopover(trigger, this.renderer, const complexCreateVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ComplexVersionCreateComponent, 'leftTop', true, null, this.viewContainerRef, ComplexVersionCreateComponent, 'leftTop', false, null,
{ {
branch: this.branch, branch: this.branch,
onClose: (result: VersionCreationResult | null, branch: string | null) => { onClose: (result: VersionCreationResult | null, branch: string | null) => {
@ -296,7 +296,7 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const restoreVersionPopover = this.popoverService.displayPopover(trigger, this.renderer, const restoreVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, EntityVersionRestoreComponent, 'leftTop', true, null, this.viewContainerRef, EntityVersionRestoreComponent, 'leftTop', false, null,
{ {
versionName: entityVersion.name, versionName: entityVersion.name,
versionId: entityVersion.id, versionId: entityVersion.id,
@ -323,7 +323,7 @@ export class EntityVersionsTableComponent extends PageComponent implements OnIni
this.popoverService.hidePopover(trigger); this.popoverService.hidePopover(trigger);
} else { } else {
const restoreEntitiesVersionPopover = this.popoverService.displayPopover(trigger, this.renderer, const restoreEntitiesVersionPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ComplexVersionLoadComponent, 'leftTop', true, null, this.viewContainerRef, ComplexVersionLoadComponent, 'leftTop', false, null,
{ {
versionName: entityVersion.name, versionName: entityVersion.name,
versionId: entityVersion.id, versionId: entityVersion.id,

View File

@ -142,7 +142,7 @@ export class GetValueActionSettingsComponent implements OnInit, ControlValueAcce
}; };
const getValueSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const getValueSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, GetValueActionSettingsPanelComponent, this.viewContainerRef, GetValueActionSettingsPanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -125,7 +125,7 @@ export class SetValueActionSettingsComponent implements OnInit, ControlValueAcce
}; };
const setValueSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const setValueSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, SetValueActionSettingsPanelComponent, this.viewContainerRef, SetValueActionSettingsPanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -123,7 +123,7 @@ export class WidgetActionSettingsComponent implements OnInit, ControlValueAccess
}; };
const widgetActionSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const widgetActionSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, WidgetActionSettingsPanelComponent, this.viewContainerRef, WidgetActionSettingsPanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -83,7 +83,7 @@ export class AutoDateFormatSettingsComponent implements OnInit, ControlValueAcce
defaultValues: this.defaultValues defaultValues: this.defaultValues
}; };
const autoDateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const autoDateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, AutoDateFormatSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, AutoDateFormatSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -37,9 +37,10 @@ import { TbPopoverService } from '@shared/components/popover.service';
import { import {
BackgroundSettingsPanelComponent BackgroundSettingsPanelComponent
} from '@home/components/widget/lib/settings/common/background-settings-panel.component'; } from '@home/components/widget/lib/settings/common/background-settings-panel.component';
import { Observable, of } from 'rxjs'; import { Observable, of, pipe } from 'rxjs';
import { ImagePipe } from '@shared/pipe/image.pipe'; import { ImagePipe } from '@shared/pipe/image.pipe';
import { DomSanitizer } from '@angular/platform-browser'; import { DomSanitizer } from '@angular/platform-browser';
import { tap } from 'rxjs/operators';
@Component({ @Component({
selector: 'tb-background-settings', selector: 'tb-background-settings',
@ -110,7 +111,7 @@ export class BackgroundSettingsComponent implements OnInit, ControlValueAccessor
backgroundSettings: this.modelValue backgroundSettings: this.modelValue
}; };
const backgroundSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const backgroundSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, BackgroundSettingsPanelComponent, ['left'], true, null, this.viewContainerRef, BackgroundSettingsPanelComponent, ['left'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -133,7 +133,7 @@ export class WidgetButtonCustomStyleComponent implements OnInit, OnChanges, Cont
}; };
const widgetButtonCustomStylePanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const widgetButtonCustomStylePanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, WidgetButtonCustomStylePanelComponent, this.viewContainerRef, WidgetButtonCustomStylePanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -137,7 +137,7 @@ export class WidgetButtonToggleCustomStyleComponent implements OnInit, OnChanges
}; };
const widgetButtonCustomStylePanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const widgetButtonCustomStylePanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, WidgetButtonToggleCustomStylePanelComponent, this.viewContainerRef, WidgetButtonToggleCustomStylePanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -92,7 +92,7 @@ export class TimeSeriesChartAxisSettingsButtonComponent implements OnInit, Contr
advanced: this.advanced advanced: this.advanced
}; };
const axisSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const axisSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, TimeSeriesChartAxisSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, TimeSeriesChartAxisSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -108,7 +108,7 @@ export class TimeSeriesChartThresholdSettingsComponent implements OnInit, Contro
yAxisIds: this.yAxisIds yAxisIds: this.yAxisIds
}; };
const thresholdSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const thresholdSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, TimeSeriesChartThresholdSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, TimeSeriesChartThresholdSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -158,7 +158,7 @@ export class TimeSeriesChartYAxisRowComponent implements ControlValueAccessor, O
advanced: this.advanced advanced: this.advanced
}; };
const yAxisSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const yAxisSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, TimeSeriesChartAxisSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, TimeSeriesChartAxisSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -126,7 +126,7 @@ export class ColorRangeSettingsComponent implements OnInit, ControlValueAccessor
settingsComponents: this.colorSettingsComponentService.getOtherColorSettingsComponents(this) settingsComponents: this.colorSettingsComponentService.getOtherColorSettingsComponents(this)
}; };
const colorRangeSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const colorRangeSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ColorRangePanelComponent, 'left', true, null, this.viewContainerRef, ColorRangePanelComponent, 'left', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -171,7 +171,7 @@ export class ColorSettingsComponent implements OnInit, ControlValueAccessor, OnD
maxValue: this.maxValue maxValue: this.maxValue
}; };
const colorSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const colorSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, ColorSettingsPanelComponent, 'left', true, null, this.viewContainerRef, ColorSettingsPanelComponent, 'left', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -166,7 +166,7 @@ export class DateFormatSelectComponent implements OnInit, ControlValueAccessor {
dateFormat: deepClone(this.modelValue) dateFormat: deepClone(this.modelValue)
}; };
const dateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const dateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, DateFormatSettingsPanelComponent, 'top', true, null, this.viewContainerRef, DateFormatSettingsPanelComponent, 'top', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);
@ -192,7 +192,7 @@ export class DateFormatSelectComponent implements OnInit, ControlValueAccessor {
defaultAutoDateFormatSettings, this.modelValue.autoDateFormatSettings) defaultAutoDateFormatSettings, this.modelValue.autoDateFormatSettings)
}; };
const autoDateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const autoDateFormatSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, AutoDateFormatSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, AutoDateFormatSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -175,7 +175,7 @@ export class DynamicFormPropertyRowComponent implements ControlValueAccessor, On
property: deepClone(this.modelValue) property: deepClone(this.modelValue)
}; };
const dynamicFormPropertyPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const dynamicFormPropertyPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, DynamicFormPropertyPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, DynamicFormPropertyPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -110,7 +110,7 @@ export class FontSettingsComponent implements OnInit, ControlValueAccessor {
} }
} }
const fontSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const fontSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, FontSettingsPanelComponent, 'left', true, null, this.viewContainerRef, FontSettingsPanelComponent, 'left', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -106,7 +106,7 @@ export class DataLayerColorSettingsComponent implements ControlValueAccessor {
helpId: this.helpId helpId: this.helpId
}; };
const colorSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const colorSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, DataLayerColorSettingsPanelComponent, 'left', true, null, this.viewContainerRef, DataLayerColorSettingsPanelComponent, 'left', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -184,7 +184,7 @@ export class MapLayerRowComponent implements ControlValueAccessor, OnInit {
mapLayerSettings: deepClone(this.modelValue) mapLayerSettings: deepClone(this.modelValue)
}; };
const mapLayerSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const mapLayerSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, MapLayerSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, MapLayerSettingsPanelComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -162,7 +162,7 @@ export class MapTooltipTagActionsComponent implements ControlValueAccessor, OnIn
}; };
const widgetActionSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const widgetActionSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, WidgetActionSettingsPanelComponent, this.viewContainerRef, WidgetActionSettingsPanelComponent,
['leftTopOnly', 'leftOnly', 'leftBottomOnly'], true, null, ['leftTopOnly', 'leftOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -80,7 +80,7 @@ export class MarkerImageSettingsComponent implements ControlValueAccessor {
markerImageSettings: this.modelValue, markerImageSettings: this.modelValue,
}; };
const markerImageSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const markerImageSettingsPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, MarkerImageSettingsPanelComponent, 'left', true, null, this.viewContainerRef, MarkerImageSettingsPanelComponent, 'left', false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);

View File

@ -522,7 +522,7 @@ export class JsFuncComponent implements OnInit, OnChanges, OnDestroy, ControlVal
modules: deepClone(this.modules) modules: deepClone(this.modules)
}; };
const modulesPanelPopover = this.popoverService.displayPopover(trigger, this.renderer, const modulesPanelPopover = this.popoverService.displayPopover(trigger, this.renderer,
this.viewContainerRef, JsFuncModulesComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], true, null, this.viewContainerRef, JsFuncModulesComponent, ['leftOnly', 'leftTopOnly', 'leftBottomOnly'], false, null,
ctx, ctx,
{}, {},
{}, {}, true); {}, {}, true);