File

global-context/integration/link-buttons/link-buttons.component.ts

Implements

AfterViewInit OnDestroy

Metadata

Index

Properties
Methods
Inputs
Outputs

Inputs

config
Type : GlobalContextState
Default value : {}
controls
Type : PresetName | PresetDefinition
Default value : PRESET_NAME.DEFAULT
dashboardChild
Type : DashboardChildComponent
isLinked
Type : boolean
Required :  true

Outputs

toggle
Type : boolean

Methods

ngAfterViewInit
ngAfterViewInit()
Returns : void
ngOnDestroy
ngOnDestroy()
Returns : void

Properties

masterTooltipText
Type : unknown
Default value : computed<string>(() => { const controls = this.visibleControls(); const clickToToggleLabel = this.translateService.instant(gettext('(click to toggle)')); if (!this.isLinked()) { const usingWidgetCustomTimeSettingsLabel = this.translateService.instant( gettext('Using widget custom time settings') ); return `${usingWidgetCustomTimeSettingsLabel}\n${clickToToggleLabel}`; } const linkedNames = controls.map(control => this.translateService.instant(control.label)); const formatter = new Intl.ListFormat( this.translateService.getCurrentLang()?.replace('_', '-'), { type: 'conjunction' } ); const linkedNamesList = formatter.format(linkedNames); const linkedToDashboardLabel = this.translateService.instant(gettext('Synced to dashboard:')); return `${linkedToDashboardLabel}\n${linkedNamesList}\n${clickToToggleLabel}`; })
visibleControls
Type : unknown
Default value : computed(() => { const controlsInput = this.controls(); const presetDef = typeof controlsInput === 'string' ? CONTROL_PRESETS[controlsInput] : controlsInput; const refreshOption = this.config().refreshOption || REFRESH_OPTION.LIVE; const dashboardControls = presetDef[GLOBAL_CONTEXT_DISPLAY_MODE.DASHBOARD]; const activeControls = applyModeConstraints(dashboardControls, refreshOption); return activeControls.map(key => CONTROL_DISPLAY_CONFIG[key]).filter(Boolean); })

results matching ""

    No results matching ""