ngx-json-ui
Version:
This project was generated using [Angular CLI](https://github.com/angular/angular-cli) version 19.2.0.
37 lines (36 loc) • 1.84 kB
TypeScript
import { OnChanges, SimpleChanges } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';
import { BaseFormControlComponent } from '../../../../shared/base/base-form-control.component';
import { FormControlComponentModel } from '../../../../core/models/component-models/form-control-component.model';
import { ExtendedFormControl } from '../../../../core/models/system/extended-form-control.model';
import { FormSubmitBroadcastService } from '../../../../core/services/form-submit-broadcast.service';
import * as i0 from "@angular/core";
export declare class SwitchComponent extends BaseFormControlComponent<FormControlComponentModel, ExtendedFormControl> implements OnChanges {
protected submitBroadcastService: FormSubmitBroadcastService;
constraints: any;
switchButtons: any[];
defaultActiveClass: string;
defaultInactiveClass: string;
constructor(sanitizer: DomSanitizer, submitBroadcastService: FormSubmitBroadcastService);
/**
* Called when any @Input properties change.
* Applies updated config and re-evaluates switch button state.
*/
ngOnChanges(changes: SimpleChanges): void;
/**
* Triggered when a user selects a switch button.
* Updates UI state and form control value accordingly.
*
* @param selectedButton - Button object selected by the user
*/
onSwitchButtonClick(selectedButton: any): void;
/**
* Marks active/inactive buttons based on the selected value.
* Applies CSS class dynamically from config or default.
*
* @param value - The current selected value
*/
private updateButtonStates;
static ɵfac: i0.ɵɵFactoryDeclaration<SwitchComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<SwitchComponent, "nju-switch", never, {}, {}, never, never, false, never>;
}