@alauda-fe/common
Version:
Alauda frontend team common codes.
32 lines (31 loc) • 1.33 kB
TypeScript
import { AbstractControl } from '@angular/forms';
import * as i0 from "@angular/core";
declare const LabelsEditorComponent_base: new () => import("../../core/public-api").BaseNestedFormControl<Record<string, string>, Pair[]>;
export declare class LabelsEditorComponent extends LabelsEditorComponent_base {
K8S_RESOURCE_LABEL_VALUE_PATTERN: {
pattern: RegExp;
tip: string;
};
duplicatedRows: Record<number, boolean>;
addLabel(): void;
editLabel(index: number, key: keyof Pair, value: string): void;
removeLabel(index: number): void;
validateLabelKey: (duplicatedRows: Record<number, boolean>, index: number) => (control: AbstractControl) => {
duplicated: any;
pattern: boolean;
};
writeValue(value: Record<string, string>): void;
emitValue(value: Record<string, string>): void;
protected valueIn(value: Record<string, string>): Pair[];
protected modelOut(model: Pair[]): Record<string, string>;
private checkDuplicatedRows;
private keyPattern;
private keyDuplicated;
static ɵfac: i0.ɵɵFactoryDeclaration<LabelsEditorComponent, never>;
static ɵcmp: i0.ɵɵComponentDeclaration<LabelsEditorComponent, "acl-labels-editor", never, {}, {}, never, never, true, never>;
}
interface Pair {
key: string;
value: string;
}
export {};