/**
 * pacem v0.51.10-faraday (https://js.pacem.it)
 * Copyright 2025 Pacem (https://pacem.it)
 * Licensed under Apache-2.0
 */
declare namespace Pacem.Scaffolding {
    export type DisplayMetadata = {
        name?: string | PropertyMetadataLabelFactory;
        description?: string;
        short?: string;
        watermark?: string;
        null?: string;
        ui?: string;
        format?: string | Intl.DateTimeFormatOptions | Intl.NumberFormatOptions;
        css?: {
            [name: string]: string;
        };
        cssClass?: string[];
        /** Metadata icons are currently managed only at TypeMetadata-level and only in particular scenarios (e.g. CMS). */
        icon?: string;
    };
    type CompareValidatorOperator = 'equal' | 'lessOrEqual' | 'less' | 'greater' | 'greaterOrEqual' | 'notEqual';
    export type KnownValidatorMetadata = {
        type: 'required';
        errorMessage: string;
    } | {
        type: 'email';
        errorMessage: string;
    } | {
        type: 'length';
        errorMessage: string;
        params: {
            min?: number;
            max?: number;
        };
    } | {
        type: 'range';
        errorMessage: string;
        params: {
            min?: number | string | Date;
            max?: number | string | Date;
        };
    } | {
        type: 'regex';
        errorMessage: string;
        params: {
            pattern: string | RegExp;
        };
    } | {
        type: 'binary';
        errorMessage: string;
        params: {
            pattern?: string;
            maxSize?: number;
        };
    } | {
        type: 'compare';
        errorMessage: string;
        params: {
            value: any;
            operator?: CompareValidatorOperator;
        } | {
            to: string;
            operator?: CompareValidatorOperator;
        } | {
            toProperty: string;
            operator?: CompareValidatorOperator;
        };
    } | {
        type: 'async';
        errorMessage: string;
        params: {
            url: string;
            verb?: Pacem.Net.HttpMethod;
            dependsOn?: DependsOn[];
        };
    };
    export type ValidatorType = Omit<string, 'required' | 'email' | 'length' | 'range' | 'regex' | 'binary' | 'compare' | 'async'>;
    export type ValidatorManifest = {
        [name: string]: string;
    };
    export type PropertyMetadataValidatorFactory = (host: Element, hostRef?: string, entityRef?: string) => ValidatorManifest;
    export type ValidatorMetadata = KnownValidatorMetadata | {
        type: ValidatorType;
        errorMessage: string;
        params?: any;
    } | {
        type: ValidatorType;
        attributes: PropertyMetadataValidatorFactory;
    };
    export type CommandMetadata = {
        name: string;
        tooltip?: string;
        icon: string;
        cssClass?: string[];
        prepend?: boolean;
        dependsOnValue?: boolean;
    };
    export type DependsOn = {
        prop: string;
        alias?: string;
        /** The (optional) value to check equality against. */
        value?: any;
        /** Whether this dependency disables the field when its value is null or empty (optional: false) or not (optional: true). Default is `false`.
         If {@link DependsOn#value} is provided, then the `optional` flag is always considered `true`.
         */
        optional?: boolean;
        hide?: boolean;
    };
    type TooltipTypeMetadata = 'html' | 'md' | 'markdown' | 'text' | boolean;
    export type TooltipBalloonMetadata = {
        type: TooltipTypeMetadata;
        position?: Pacem.Components.UI.BalloonPosition;
        trigger?: Pacem.Components.UI.BalloonTrigger;
        align?: Pacem.Components.UI.BalloonAlignment;
    };
    export type TooltipMetadata = {
        tooltip?: TooltipTypeMetadata | TooltipBalloonMetadata;
    };
    type PropertyMetadataExtraCore = {
        dependsOn?: DependsOn[] | PropertyMetadataDependsOnFactory;
        autofocus?: boolean;
    } & TooltipMetadata;
    type PropertyMetadataExtraDatasource = {
        source?: Function | any[];
        sourceUrl?: string;
        verb?: Pacem.Net.HttpMethod;
        valueProperty?: string;
        textProperty?: string;
        disabledProperty?: string;
    } & {
        enum?: any[];
    } & {
        itemtemplate?: string | HTMLTemplateElement;
        maxSuggestions?: number;
        filterFields?: string[] | string;
    };
    type PropertyMetadataExtraSnapshot = {
        width?: number;
        height?: number;
        quality?: number;
    };
    type PropertyMetadataExtraTags = {
        allowNew?: boolean;
        allowDuplicates?: boolean;
    };
    type PropertyMetadataExtraChildform = {
        lockItems?: boolean;
    };
    export type BinarySelectMode = 'file' | 'multiple' | 'directory-picker' | 'directory' | 'file-picker' | 'multiple-picker';
    type PropertyMetadataExtraUpload = {
        maxImageWidth?: number;
        maxImageHeight?: number;
        parallelism?: number;
        chunkSize?: number;
        uploadUrl?: string;
        mode?: BinarySelectMode;
    };
    type PropertyMetadataExtraSlider = {
        step?: 'any' | number;
    };
    type PropertyMetadataExtraDatetime = {
        /** @deprecated use display format field instead. */
        format?: string | Intl.DateTimeFormatOptions;
        disabledRanges?: Pacem.Components.UI.DateRange[];
    };
    export type PropertyMetadataExtra = PropertyMetadataExtraCore & (PropertyMetadataExtraDatasource & PropertyMetadataExtraSnapshot & PropertyMetadataExtraTags & PropertyMetadataExtraChildform & PropertyMetadataExtraUpload & PropertyMetadataExtraSlider & PropertyMetadataExtraDatetime);
    export type FieldManifest = {
        tagName: string;
        attrs?: {
            [name: string]: string;
        };
        children?: FieldManifest[];
    };
    export type PropertyMetadataFieldFactory = (host: Element, hostRef?: string, entityRef?: string) => FieldManifest;
    export type DependsOnManifest = {
        disabledAttr: string;
        hideAttr?: string; /**@ dependency parameters */
        parameterAttrs?: {
            [alias: string]: string;
        };
    };
    export type PropertyMetadataDependsOnFactory = (host: Element, hostRef?: string, entityRef?: string, fieldEntityRef?: string) => DependsOnManifest;
    export type LabelManifest = {
        contentAttr: string;
    };
    export type PropertyMetadataLabelFactory = (host: Element, hostRef?: string, entityRef?: string, formRef?: string) => LabelManifest;
    export type PropertyMetadata = {
        prop: string;
        type: 'object' | 'array' | string | /* let the possibility to inject custom scaffolding elements */ PropertyMetadataFieldFactory;
        display?: DisplayMetadata;
        extra?: PropertyMetadataExtra & {
            [key: string]: any;
        };
        isReadOnly?: boolean;
        dataType?: string;
        isComplexType?: boolean;
        isNullable?: boolean;
        validators?: ValidatorMetadata[];
        commands?: CommandMetadata[];
        /** Either the metadata of an 'object' or the metadata of the single item of an homogeneous 'array'. */
        props?: TypeMetadata | PropertyMetadata[];
    };
    export type TypeMetadata = {
        display?: DisplayMetadata;
        props: PropertyMetadata[];
        type?: 'object' | 'array';
    };
    export {};
}
declare namespace Pacem.Components.Scaffolding {
    /** @deprecated */
    type PropertyMetadata = Pacem.Scaffolding.PropertyMetadata;
    interface PacemFormOrField {
        dirty: boolean;
        valid: boolean;
        name: string;
        form: PacemFormElement;
        setPristine(): void;
        setDirty(): void;
    }
    interface PacemModel extends PacemFormOrField {
        value: any;
        viewValue: string;
        reset(): void;
    }
    type BinaryValue = {
        name: string;
        size: number;
        type: string;
        lastModified: number | string | Date; /** base64 binary string */
        content: string;
        encoding?: string;
    };
    abstract class PacemFormRelevantElement extends PacemElement {
        form: PacemFormElement;
        viewActivatedCallback(): void;
    }
    abstract class PacemModelElement extends PacemFormRelevantElement implements PacemModel {
        viewActivatedCallback(): void;
        private _registerFieldConditionally;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        disconnectedCallback(): void;
        protected get originalValue(): any;
        private _setAsOriginalValue;
        protected abstract getViewValue(value: any): string;
        reset(): void;
        setPristine(): void;
        setDirty(): void;
        protected abstract convertValueAttributeToProperty(attr: string): any;
        protected abstract compareValuePropertyValues(old: any, val: any): boolean;
        viewValue: string;
        value: any;
        dirty: boolean;
        valid: boolean;
        name: string;
    }
    abstract class PacemBaseElement extends PacemModelElement {
        protected compareValuePropertyValues(old: any, val: any): boolean;
        required: boolean;
        autofocus: boolean;
        readonly: boolean;
        name: string;
        placeholder: string;
        protected abstract get inputFields(): HTMLElement[];
        protected abstract toggleReadonlyView(readonly: boolean): void;
        protected get preventKeyboardSubmit(): boolean;
        /**
         * When implemented in a derived class, must handle the `UI -> value` change logic and returns the value that has been set.
         * @param evt {Event} Original event triggered by the user
         */
        protected abstract onChange(evt?: Event): PromiseLike<any>;
        /**
         * When implemented in a derived class, must handle the `value -> UI` synchronization logic.
         * @param val Current value
         */
        protected abstract acceptValue(val: any): any;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        private _preFocusValue;
        protected focusHandler: (evt: FocusEvent) => void;
        protected changeHandler: (evt: Event) => void;
        protected keydownHandler: (evt: KeyboardEvent) => void;
        protected keyupHandler: (evt: KeyboardEvent) => void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        focus(): void;
        blur(): void;
    }
    type DataSourceItem = {
        value: any;
        viewValue: string;
        disabled?: boolean;
        data: any;
    };
    type DataSource = DataSourceItem[];
    abstract class PacemItemElement<TContainer extends PacemItemsContainerBaseElement<any>> extends PacemElement {
        #private;
        /** @overridable */
        protected findContainer(): TContainer;
        protected get container(): TContainer;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
    }
    abstract class PacemItemsContainerBaseElement<TItem extends HTMLElement> extends PacemBaseElement implements ItemsContainer<TItem> {
        items: TItem[];
        /**
         * Registers a new item among the items.
         * @param item {PacemDataItemElement} Item to be enrolled
         */
        register(item: TItem): boolean;
        /**
         * Removes an existing element from the items.
         * @param item {PacemDataItemElement} Item to be removed
         */
        unregister(item: TItem): boolean;
    }
    class PacemDataItemElement extends PacemItemElement<PacemDataSourceElement> {
        value: any;
        label: string;
        disabled: boolean;
    }
    abstract class PacemDataSourceElement extends PacemItemsContainerBaseElement<PacemDataItemElement> {
        protected multipleChoice: boolean;
        constructor(multipleChoice?: boolean);
        datasource: any[];
        valueProperty: string;
        textProperty: string;
        disabledProperty: string;
        compareBy: string;
        protected adaptedDatasource: DataSource;
        /**
         * Registers a new item among the items.
         * @param item {PacemDataItemElement} Item to be enrolled
         */
        register(item: PacemDataItemElement): boolean;
        /**
         * Removes an existing element from the items.
         * @param item {PacemDataItemElement} Item to be removed
         */
        unregister(item: PacemDataItemElement): boolean;
        private _itemPropertyChangedHandler;
        protected buildAdaptedDatasource(ds?: any[]): DataSource;
        protected databind(datasource?: DataSource): void;
        protected handleDatasourceMismatch(datasource: DataSourceItem[]): void;
        /**
         * Checks wether the provided `item` matches the control's criteria for a selected option against a provided value (which defaults to control's value).
         * @param item {any} item to check against
         * @param value {any} value to match
         */
        protected isItemSelected(item: any, value?: any): boolean;
        /**
         * Checks wether the provided `item` matches the control's criteria for a selected option against a provided value (which defaults to control's value).
         * @param item {DataSourceItem} item to check against
         * @param value {any} value to match
         */
        protected isDataSourceItemSelected(item: DataSourceItem, value?: any): boolean;
        protected mapEntityToValue(entity: any): any;
        protected mapEntityToViewValue(entity: any): string;
        protected mapEntityToItem(entity: any): DataSourceItem;
        private _handle;
        private _handleItems;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        protected getViewValue(val: any): string;
        protected convertValueAttributeToProperty(attr: string): string | string[];
        protected compareValuePropertyValues(old: any, val: any): boolean;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemCalendarMonthPickerElement extends PacemElement {
        month: Date | string | number;
        viewYear: number;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _getMonthLabel;
        private _isThisMonth;
        private _isSelectedMonth;
        private _setMonth;
    }
    class CalendarDateUnselectEvent extends Pacem.Components.UI.DateSelectEvent {
        constructor();
    }
    class PacemCalendarYearPickerElement extends PacemElement {
        year: Date | string | number;
        viewYear: number;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _getYearLabel;
        private _isThisYear;
        private _isSelectedYear;
        private _setYear;
    }
    class PacemCalendarPickerElement extends PacemBaseElement {
        #private;
        private _input;
        private _span;
        private _clearButton;
        private _proxy;
        private _calendar;
        private _monthPicker;
        private _yearPicker;
        private _monthLabel;
        private _yearLabel;
        private _rangeLabel;
        private _dropdown;
        private _swiper;
        format: Intl.DateTimeFormatOptions | string;
        disabledRanges: Pacem.Components.UI.DateRange[];
        weekStart: 'mon' | 'sun' | 'm' | 's' | 'monday' | 'sunday';
        viewmode: 'calendar' | 'month' | 'year';
        private _week;
        private _viewDate;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        private _swipeHandler;
        private _clearBtnHandler;
        private _getHeaderLabel;
        private _prev;
        private _next;
        private _jumpMonths;
        private _setMonth;
        private _setYear;
        private _viewDateChangeHandler;
        private _onViewDateChange;
        private _popCalendarHandler;
        private _hideCalendarHandler;
        private _hideCalendar;
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected compareValuePropertyValues(old: any, val: any): boolean;
        protected convertValueAttributeToProperty(attr: string): any;
    }
}
declare namespace Pacem.Components.Scaffolding {
    const CHAR_COUNTER_CHILD: string;
    class PacemCharCountElement extends PacemElement {
        minlength: number;
        maxlength: number;
        string: string;
        private _isValid;
        private _length;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemCheckboxListElement extends PacemDataSourceElement {
        protected acceptValue(val: any): void;
        constructor();
        protected get inputFields(): any[];
        private _span;
        private _repeater;
        private _disable;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        protected toggleReadonlyView(readonly: boolean): void;
        private _selectedUiItems;
        private _selectionChanged;
        protected onChange(evt?: Event): Promise<any[]>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemCheckboxElement extends PacemBaseElement {
        constructor();
        private _key;
        protected convertValueAttributeToProperty(attr: string): void;
        private _checkbox;
        private _label;
        span: HTMLElement;
        caption: string;
        trueValue: any;
        falseValue: any;
        selected: boolean;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
        protected onChange(evt?: Event): Promise<any>;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _synchronizeUi;
        protected acceptValue(val: any): void;
        protected getViewValue(val: any): string;
    }
}
declare namespace Pacem.Components.Scaffolding {
    type FormSubmitEventArgs = {
        parameters: {
            [key: string]: any;
        };
        fields: {
            [key: string]: PacemModel;
        };
    };
    const FormSubmitEventName = "submit";
    const FormResetEventName = "reset";
    class FormSubmitEvent extends CustomTypedEvent<FormSubmitEventArgs> {
        constructor(args: FormSubmitEventArgs);
    }
    class FormResetEvent extends Event {
        constructor();
    }
    class FormEventEmitter {
        private _element;
        constructor(_element: PacemEventTarget);
        start(): void;
        private _itemEmitHandler;
        stop(): void;
    }
    class PacemFormElement extends PacemFormRelevantElement implements Pacem.Net.OAuthFetchable {
        #private;
        fetcher: PacemFetchElement;
        fetchCredentials: RequestCredentials;
        fetchHeaders: {
            [key: string]: string;
        };
        method: Pacem.Net.HttpMethod;
        submitCaption: string;
        resetCaption: string;
        private _emitter;
        constructor();
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        private _buildUpForm;
        private _buttons;
        /** Gets the 'submit' and 'reset' form buttons. */
        get formButtons(): {
            submit: Element;
            reset: Element;
        };
        get fetching(): boolean;
        private _keyupHandler;
        private _submit;
        /**
         * Submits the form data via a provided fetcher.
         * @param fetcher The fetching delegate.
         */
        submit(fetcher: Pacem.Net.Fetcher): PromiseLike<any>;
        /** Resets the form to its pristine values. */
        reset(): void;
        private _submitInternally;
        private _getAllFields;
        private _reset;
        /** Modifies the state of the current entity programmatically. */
        apply(state: {
            [key: string]: any;
        }): void;
        /** Sets the current form (or the fields of it having the specified names) in a pristine state. */
        setPristine(...names: string[]): void;
        /** Sets the current form (or the fields of it having the specified names) in a dirty state. */
        setDirty(...names: string[]): void;
        private _setAs;
        private _fields;
        private _validators;
        private _subForms;
        private _fieldPropertyChanged;
        private _validatorPropertyChanged;
        private _checkFieldValidity;
        validate(name?: string): PromiseLike<boolean>;
        private _validateAllFields;
        private _validateField;
        private _checkDirtyness;
        private _checkValidity;
        registerSubForm(form: PacemFormElement): void;
        unregisterSubForm(form: PacemFormElement): void;
        registerField(name: string, model: PacemModel): void;
        unregisterField(name: string, check?: boolean): void;
        registerValidator(name: string, validator: Validator): void;
        unregisterValidator(name: string, validator: Validator): void;
        private _unregisterValidator;
        valid: boolean;
        dirty: boolean;
        readonly: boolean;
        success: boolean;
        fail: boolean;
        entity: any;
        entityName: string;
        metadata: Pacem.Scaffolding.TypeMetadata | PropertyMetadata[];
        autogenerate: boolean;
        /** Gets or sets whether to hint invalid fields even if still pristine (default 'true').
         * When 'true' - and form is autogenerated - the submit button status is tightly bound to the form valid state. */
        suddenValidation: boolean;
        /** Gets or sets whether the form should show - when autogenerated - the reset button. */
        resettable: boolean;
        action: string;
    }
}
declare namespace Pacem.Components.Scaffolding {
    /** For internal use ONLY! */
    class PacemChildFormPropagatorElement extends PacemEventTarget {
        property: string;
        watch: any;
        model: any;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        private _synchronize;
    }
    /** Represents a sub-form for automatic generation of editing fields for sub-entities.  */
    class PacemChildFormElement extends PacemBaseElement implements Pacem.Net.OAuthFetchable {
        fetchCredentials: RequestCredentials;
        fetchHeaders: {
            [key: string]: string;
        };
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected convertValueAttributeToProperty(attr: string): any;
        private _container;
        private _dragger;
        private _floater;
        mode: 'array' | 'object';
        lockItems: boolean;
        metadata: Pacem.Scaffolding.TypeMetadata | PropertyMetadata[];
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        /** Internal representation of the entity. */
        private _model;
        private _dragStart;
        private _dragEnd;
        reset(): void;
        private _subForms;
        private _itemCreate;
        private _itemChange;
        private _deleteAt;
        private _addItem;
        private _triggerChange;
        private _entityToModel;
        private _modelToEntity;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class ContenteditableDOMObserver {
        #private;
        constructor(contentElement: HTMLElement, mutationCallback: (item: Node, removed?: boolean) => void, selector?: string);
        private _initContainer;
        private _disposeContainer;
        dispose(): void;
    }
    type RangeWrapTestResult = {
        result: boolean;
        element?: Node;
    };
    class ContenteditableUtils {
        static getDefaultDashboard(): DocumentFragment;
        /**
         * Seeks for a Selection' surrounding node of a given type and returns it, if any.
         * @param range
         * @param type
         */
        static findSurroundingNode(range: Range, tagName: string): Element;
        static findSurroundingNode(node: Node, tagName: string): Element;
        static findSurroundingNode(range: Range, filter: (node: Node) => boolean): Element;
        static findSurroundingNode<TNode extends Node>(range: Range, type: Type<TNode>): TNode;
        static findSurroundingBlockElement(range: Range): Element;
        static findSurroundingSiblingBlockElements(range: Range): Element[];
        static findContainingRootElements(range: Range): Element[];
        static isBlockElement(node: Node): node is Element;
        static select(node: Node, inside?: boolean): Range;
        static copyAttributes(to: Element, from: Element): void;
        /**
         * Checks whether the provided range wraps an 'inert' (contentEditable=false) element, and returns result accordingly.
         * @param range
         */
        static testInertElementWrapping(range: Range): RangeWrapTestResult;
    }
}
declare namespace Pacem.Components.Scaffolding {
    interface ContenteditableCommand {
        exec(...args: any[]): Promise<unknown>;
    }
    abstract class PacemContenteditableCommandElement extends PacemItemElement<PacemContenteditableElement> implements ContenteditableCommand {
        abstract exec(...args: any[]): Promise<any>;
        abstract isRelevant(range: Range): boolean;
        /**
         * Cleans up all its relevant markup in order to obtain the most pure output.
         * @param contentElement
         */
        abstract cleanUp(contentElement: HTMLElement): void;
        protected execCommand(...args: any[]): void;
        connectedCallback(): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        protected range: Range;
        protected contentElement: HTMLDivElement;
        private _containerPropChangeHandler;
        protected containerPropertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
    }
    interface ContenteditableFileCommand extends ContenteditableCommand {
        pasteCallback(file: File): PromiseLike<any>;
    }
    class PacemContenteditableElement extends PacemItemsContainerBaseElement<PacemContenteditableCommandElement> {
        #private;
        constructor();
        get history(): HistoryService<string>;
        reset(): void;
        private _fireHistoryChange;
        protected convertValueAttributeToProperty(attr: string): string;
        private _container;
        private _dashboard;
        range: Range;
        protected toggleReadonlyView(readonly: boolean): void;
        register(item: PacemContenteditableCommandElement): boolean;
        unregister(item: PacemContenteditableCommandElement): boolean;
        /** @override */
        protected get preventKeyboardSubmit(): boolean;
        protected get inputFields(): HTMLDivElement[];
        get contentElement(): HTMLDivElement;
        protected onChange(evt?: Event): Promise<string>;
        private _fixRangeMarkup;
        private _ensureInteractiveMarkup;
        private _focusHandler;
        private _blurHandler;
        private _pasteHandler;
        private _shortcutHandler;
        private _inputHandler;
        private _checkChangedHandler;
        private _updateHistory;
        private _selectionChangeHandler;
        protected acceptValue(val: any): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        protected getViewValue(val: any): any;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemDatetimePickerElement extends PacemBaseElement {
        constructor();
        private _yearel;
        private _monthel;
        private _dateel;
        private _hourel;
        private _minel;
        private _secel;
        protected get inputFields(): PacemSelectElement[];
        private _allFields;
        protected toggleReadonlyView(readonly: boolean): void;
        protected convertValueAttributeToProperty(attr: string): any;
        dateValue: Date;
        min: string | Date;
        max: string | Date;
        precision: 'day' | 'minute' | 'second';
        format: Intl.DateTimeFormatOptions | string;
        connectedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected acceptValue(val: any): void;
        private _disassembleDate;
        private _months;
        private _dates;
        private _a24;
        private _a60;
        private _years;
        private year;
        private month;
        private date;
        private hours;
        private minutes;
        private seconds;
        private _setupYears;
        protected onChange(evt?: Event): Promise<unknown>;
        private _buildupDates;
        private _computeValue;
        private _buildup;
        protected getViewValue(val: any): string;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemFormFieldElement extends PacemElement implements Pacem.Net.OAuthFetchable {
        private _md;
        constructor(_md?: MarkdownService);
        private _field;
        private _key;
        private _label;
        private _container;
        private _balloon;
        private _fetcher;
        private _form;
        private _validators;
        get key(): string;
        get fetcher(): Pacem.Net.Fetcher;
        metadata: Pacem.Scaffolding.PropertyMetadata;
        fetchHeaders: {
            [key: string]: string;
        };
        fetchCredentials: RequestCredentials;
        readonly: boolean;
        entity: any;
        get field(): HTMLElement;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old?: any, val?: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _entityPropertyChangeHandler;
        private _normalizeTooltip;
        private _ensureBalloon;
        private _buildUpLabel;
        private _labelClickHandler;
        private _isValueNullOrEmpty;
        /**
         * Reflects the value onto the entity attribute, if the 'entity' is an instance of HTMLElement.
         */
        private _handleValueChange;
        /**
         * 'Prettifies' the input value (for some specific cases) to be included in an URL segment or query string.
         * @param v Input value
         */
        private _adjustDependencyValue;
        private _broadcastFetchResult;
        private _buildUpFetcher;
        private _buildUpForm;
        private _buildUpField;
    }
}
declare namespace Pacem.Components.Scaffolding {
    type Address = Pacem.Maps.Address;
    type Icon = Pacem.Components.Maps.Icon;
    export class PacemGeolocateElement extends PacemBaseElement {
        #private;
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: CustomEvent<Address[]>): PromiseLike<any>;
        fetch(search: Pacem.Maps.LatLng): void;
        protected compareValuePropertyValues(old: Address, any: Address): boolean;
        protected acceptValue(val: Address): void;
        protected getViewValue(value: Address): string;
        protected convertValueAttributeToProperty(attr: string): any;
        adapter: Pacem.Components.Maps.PacemMapAdapterElement;
        map: Pacem.Components.Maps.PacemMapElement;
        icon: string | Icon;
        private _datasource;
        private _suggest;
        private _geocoder;
        private _reverseGeocoder;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _setupAdapters;
        private _setupSuggest;
        private _detachMarker;
        private _dragendHandler;
        private _createMarker;
        private _disposeMarker;
        private _setupMapMarker;
        private _setup;
    }
    export {};
}
declare namespace Pacem.Components.Scaffolding {
    type HierarchyDataSourceItem = DataSourceItem & {
        parents?: HierarchyDataSource;
    };
    type HierarchyDataSource = HierarchyDataSourceItem[];
    class PacemHierarchyElement extends PacemBaseElement {
        #private;
        protected getViewValue(value: any): string;
        protected convertValueAttributeToProperty(attr: string): any;
        constructor();
        private _balloon;
        private _defaultTemplate;
        private _repeater;
        private _dragger;
        private _dragger2;
        private _shellProxy;
        datasource: any[];
        valueProperty: string;
        textProperty: string;
        disabledProperty: string;
        unlinkCaption: string;
        private _adaptedDatasource;
        itemtemplate: HTMLTemplateElement;
        private _template;
        /**
         * */
        parentsProperty: string;
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        viewActivatedCallback(): void;
        private _handle;
        private _handle2;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _buildAdaptedDatasource;
        private _mapEntityToValue;
        private _mapEntityToViewValue;
        private _mapEntityToItem;
        private _unlink;
        private _binderClickHandler;
        private _buildHierarchyItemDomId;
        private _itemCreate;
        private _itemRemove;
        private _setupItemTemplate;
        private _compileHierarchy;
        private _cleanupHierarchy;
        private _dragInitHandler;
        private _dragStartHandler;
        private _dragHandler;
        private _dragEndHandler;
        private _dropHandler;
        private _dragOverHandler;
        private _dragOutHandler;
        private _setupDragger;
        private _disposeDragger;
        private _popoutHandler;
        private _setupBalloon;
        private _disposeBalloon;
        private _isInAncestors;
        private _isInDescendants;
        private _databind;
        private _databindByParents;
    }
}
declare namespace Pacem.Components.Scaffolding {
    enum ChangePolicy {
        Input = "input",
        Blur = "blur"
    }
    abstract class PacemBaseInputElement extends PacemBaseElement {
        debounce: number | boolean;
        changePolicy: ChangePolicy;
        autoselect: boolean;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _focusHandler;
        protected acceptValue(val: any): void;
        protected get inputField(): HTMLInputElement;
        protected abstract getValue(value: string): any;
        private _handle;
        protected onChange(evt?: Event): DeferPromise<any>;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
    }
    abstract class PacemOrdinalInputElement extends PacemBaseInputElement {
        min: any;
        max: any;
        step: any;
        protected convertValueAttributeToProperty(attr: string): number;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
    }
    abstract class PacemTextualInputElement extends PacemBaseInputElement {
        pattern: string;
        minlength: number;
        maxlength: number;
        protected convertValueAttributeToProperty(attr: string): string;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        protected getValue(val: string): any;
        protected getViewValue(val: any): string;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemColorInputElement extends PacemBaseElement {
        protected acceptValue(val: any): void;
        protected convertValueAttributeToProperty(attr: string): string;
        protected onChange(evt?: Event): PromiseLike<any>;
        constructor();
        _tint: HTMLInputElement;
        _alpha: HTMLInputElement;
        _wrapper: HTMLElement;
        _span: PacemSpanElement;
        protected toggleReadonlyView(readonly: boolean): void;
        private _getValue;
        private _parseValue;
        protected getViewValue(value: any): string;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemEmailInputElement extends PacemTextualInputElement {
        input: HTMLInputElement;
        anchor: UI.PacemAnchorElement;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    const FileUploadEventName = "fileupload";
    const FileChangeEventName = "filechange";
    type FileUploadEventArgs = {
        complete: boolean;
        percentage: number;
        uid: string;
        filename: string;
        originalFilename: string;
        size: number;
    };
    type FileChangeEventArgs = {
        file?: File | FileSystemFileHandle;
        files?: File[] | FileSystemFileHandle[];
        directory?: FileSystemDirectoryHandle;
        valid: boolean;
    };
    class FileUploadEvent extends CustomTypedEvent<FileUploadEventArgs> {
        constructor(file: FileUploadEventArgs);
    }
    class FileChangeEvent extends CustomTypedEvent<FileChangeEventArgs> {
        constructor(file: FileChangeEventArgs);
    }
    /**
     * PacemUploader Component
     */
    class PacemUploadElement extends PacemBaseElement implements Net.OAuthFetchable {
        private _tweener;
        fetchCredentials: RequestCredentials;
        fetchHeaders: {
            [key: string]: string;
        };
        constructor(_tweener?: Animations.TweenService);
        protected convertValueAttributeToProperty(attr: string): string;
        protected acceptValue(val: any): void;
        private _fileupload;
        private _tuner;
        undoCaption: string;
        retryCaption: string;
        clearCaption: string;
        pattern: string;
        url: string;
        maxImageWidth: number;
        parallelism: number;
        chunkSize: number;
        maxImageHeight: number;
        /** Gets or sets the max blob size in bytes. */
        maxSize: number;
        selectMode: Pacem.Scaffolding.BinarySelectMode;
        uploading: boolean;
        size: number;
        percentage: number;
        complete: boolean;
        failed: boolean;
        invalidFile: boolean;
        private _getMimeIcon;
        get blob(): Blob;
        protected get inputFields(): HTMLInputElement[];
        protected getViewValue(val: any): string;
        protected toggleReadonlyView(readonly: boolean): void;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _setupInputElement;
        /**
         * Triggered from the component's template.
         */
        private _dispatchDownload;
        reset(): void;
        private _fields;
        private _validateAll;
        private _validateSingleFile;
        upload(file: Blob, filename?: string, state?: string): Promise<Response>;
        private _upload;
        private _blobToBase64;
        private _doUpload;
        private _manage;
        private _stats;
        private _localValue;
        private _buildLocalValue;
        private _canPick;
        private _tryPickDirectory;
        private _tryPickFiles;
        /**
         * Called from the template.
         * @param evt
         */
        private _clickHandler;
        private _mimicCompute;
        protected onChange(evt: Event): Promise<unknown>;
        private _fetch;
        private _undo;
        private _tweenPercentage;
        private _retry;
        private _clear;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemHiddenInputElement extends PacemTextualInputElement {
        constructor();
        input: HTMLInputElement;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    enum SnapshotStep {
        Start = "start",
        Taking = "taking",
        Confirm = "confirm"
    }
    class PacemSnapshotElement extends PacemBaseElement {
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected convertValueAttributeToProperty(attr: string): any;
        private _root;
        private _stage;
        private _grabber;
        private _player;
        private _picker;
        private _snapshooter;
        private _taker;
        private _timer;
        private _confirmer;
        step: SnapshotStep;
        width: number;
        height: number;
        quality: number;
        get _getUserMedia(): any;
        private _canUseWebcam;
        private _countdown;
        private _webcamInitialized;
        private _buffer;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        private _syncSize;
        private _grabberChangeHandler;
        private _snapshooterClickHandler;
        private _pickerClickHandler;
        private _takerClickHandler;
        private _timerClickHandler;
        private _confirmerClickHandler;
        private _shutter;
        private _renderValue;
        private _setToBeConfirmed;
        private _refreshBuffer;
        private _ensureWebcamRunning;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemUrlInputElement extends PacemTextualInputElement {
        constructor();
        input: HTMLInputElement;
        anchor: UI.PacemAnchorElement;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    class Picture {
        thumbnailSrc: string;
        src: string;
        caption?: string;
    }
    type PictureSet = {
        total: number;
        skip: number;
        take: number;
        set: Picture[];
    };
    const ImageFetchRequestEventName = "imagefetchrequest";
    type FetchRequestEventArgs = {
        hint?: string;
        skip: number;
        take?: number;
    };
    class ImageFetchRequestEvent extends CustomTypedEvent<FetchRequestEventArgs> {
        constructor(args: FetchRequestEventArgs);
    }
    class PacemEditImageElement extends PacemElement {
        private _uploaderPropertyChangedCallback;
        private _thumbnailUploaderPropertyChangedCallback;
        private _uploaderFileUploadCallback;
        private _done;
        private _snapshotPropertyChangedCallback;
        reset(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        uploadUrl: string;
        private _index;
        hint: string;
        imageSet: PictureSet;
        value: string;
        maxWidth: number;
        maxHeight: number;
        maxThumbnailWidth: number;
        maxThumbnailHeight: number;
        allowSnapshot: boolean;
        private _fetching;
        private _images;
        private _repeater;
        private _uploader;
        private _thumbUploader;
        private _snapshot;
        private _progressbar;
        private _imagefetchSuddenly;
        private _imagefetch;
    }
    class PacemImageInputElement extends PacemBaseElement {
        protected convertValueAttributeToProperty(attr: string): string;
        private _editImage;
        private _dialog;
        private _image;
        private _editBtn;
        private _clearBtn;
        private _input;
        getViewValue(value: any): any;
        protected get inputFields(): any[];
        private _clear;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected toggleReadonlyView(readonly: boolean): void;
        private _addDialog;
        private _removeDialog;
        private _addEditImage;
        private _removeEditImage;
        private _broadcastFetchRequestEventName;
        private _innerValueChangedHandler;
        connectedCallback(): void;
        disconnectedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected acceptValue(val: any): void;
        private _update;
        private _retrieve;
        _edit(evt: Event): void;
        uploadUrl: string;
        imageSet: PictureSet;
        maxWidth: number;
        maxHeight: number;
        maxThumbnailWidth: number;
        maxThumbnailHeight: number;
        allowSnapshot: boolean;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemNumberInputElement extends PacemOrdinalInputElement {
        private _input;
        private _span;
        format: Intl.NumberFormatOptions;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
        getViewValue(val: any): string;
        private _format;
        getValue(val: string): number;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemPasswordInputElement extends PacemTextualInputElement {
        constructor();
        private _input;
        private _span;
        private _toggler;
        protected get inputFields(): HTMLInputElement[];
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        toggleVisibility(): void;
        private _syncToggler;
        protected toggleReadonlyView(readonly: boolean): void;
        protected getViewValue(val: any): string;
        private _togglerMousedownHandler;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemSearchInputElement extends PacemTextualInputElement {
        constructor();
        input: HTMLInputElement;
        protected get inputFields(): HTMLInputElement[];
        protected toggleReadonlyView(readonly: boolean): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemTelInputElement extends PacemTextualInputElement {
        constructor();
        input: HTMLInputElement;
        anchor: UI.PacemAnchorElement;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemTextInputElement extends PacemTextualInputElement {
        constructor();
        private _input;
        private _span;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
    }
}
declare namespace Pacem.Components.Scaffolding {
    const DEFAULT_TILES = "";
    const DEFAULT_ATTRIBUTION = "";
    interface LatLngOptions {
        provider: 'osm' | 'leaflet' | 'azure' | 'google' | 'gmaps' | 'leafletjs';
        tiles?: string;
        attribution?: string;
        apiKey?: string;
        icon?: any;
    }
    class PacemLatLngElement extends PacemBaseElement {
        protected convertValueAttributeToProperty(attr: string): {
            lat: number;
            lng: number;
        };
        protected compareValuePropertyValues(old: any, val: any): boolean;
        protected getViewValue(value: any): string;
        private _getViewValue;
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected acceptValue(val: any): void;
        private _ensureValue;
        protected onChange(evt?: Event): PromiseLike<any>;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        private _synchronizeOptions;
        private _leafletAdapter;
        private _azureAdapter;
        private _googleAdapter;
        private _map;
        private _marker;
        private _latInput;
        private _lngInput;
        private _inputContainer;
        private _fetcher;
        options: LatLngOptions;
        private _lat;
        private _lng;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemNameValueListElement extends PacemBaseElement {
        protected inputFields: HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected compareValuePropertyValues(old: any, val: any): boolean;
        protected convertValueAttributeToProperty(attr: string): any;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        /** Gets or sets whether the names should be unique */
        dictionary: boolean;
        private _bag;
        private _bagToValue;
        private _valueToBag;
        private _deleteAt;
        private _addItem;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemPropertyPickerElement extends PacemBaseElement {
        protected get inputFields(): HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected convertValueAttributeToProperty(attr: string): any;
        private _select;
        target: HTMLElement;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _databind;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemRadioListElement extends PacemDataSourceElement {
        protected acceptValue(val: any): void;
        constructor();
        protected get inputFields(): any[];
        private _repeater;
        private _disable;
        private _span;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        viewActivatedCallback(): void;
        protected toggleReadonlyView(readonly: boolean): void;
        private _selectedValue;
        private _selectionChanged;
        protected onChange(evt?: Event): Promise<any>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemRadioElement extends PacemBaseElement implements OnPropertyChanged, OnViewActivated {
        protected convertValueAttributeToProperty(attr: string): string;
        constructor();
        private _key;
        private _radio;
        private _label;
        span: HTMLElement;
        caption: string;
        selected: boolean;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLInputElement[];
        protected onChange(evt?: Event): Promise<string>;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected acceptValue(val: any): void;
        protected getViewValue(val: any): string;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemSelectElement extends PacemDataSourceElement {
        private _select;
        private _repeater;
        private _span;
        emptyOption: boolean;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLSelectElement[];
        private _manageDom;
        protected onChange(evt?: Event): Promise<any>;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected buildAdaptedDatasource(ds?: any[]): DataSource;
        protected handleDatasourceMismatch(ds: DataSource): void;
        protected acceptValue(val: any): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemSliderElement extends PacemBaseElement {
        protected inputFields: HTMLElement[];
        protected onChange(evt?: Event): PromiseLike<any>;
        private _draw;
        private _format;
        protected acceptValue(val: any): void;
        protected getViewValue(value: any): string;
        protected convertValueAttributeToProperty(attr: string): number;
        min: number;
        max: number;
        thumbLabel: boolean;
        step: 'any' | number;
        changePolicy: 'drag' | 'end';
        format: Intl.NumberFormatOptions;
        private _track;
        private _progress;
        private _thumb;
        private _min;
        private _max;
        private _dragger;
        private _shellProxy;
        protected toggleReadonlyView(readonly: boolean): void;
        private _trackSize;
        private _setTrackSize;
        private _computeAndAssignValue;
        private _setValue;
        private _dragHandler;
        private _endHandler;
        private _startHandler;
        private _downHandler;
        private _keydownHandler;
        connectedCallback(): void;
        viewActivatedCallback(): void;
        private _syncThumbLabel;
        disconnectedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemSuggestElement extends PacemDataSourceElement {
        #private;
        private _input;
        private _repeater;
        private span;
        private _defaultTemplate;
        private _tmplProxy;
        private _btnArrow;
        private _btnClear;
        private _balloon;
        protected get inputFields(): HTMLInputElement[];
        hint: string;
        /** Default: 10 (i.e. assumed `10` when not defined) */
        maxSuggestions: number;
        /** Default: true (i.e. assumed `true` when not defined) */
        allowTyping: boolean;
        /** Relevant in a rich/plain text header dashboard, in order to avoid the editing control to lose focus. */
        preventFocus: boolean;
        itemtemplate: HTMLTemplateElement;
        /** Fields (in addition to 'textProperty') used to filter the datasource */
        filterFields: string[];
        /** Whether allow or not values not available in the suggestions. If set to `true`, works only for primitive values. */
        allowNew: boolean;
        protected acceptValue(val: any): void;
        protected getViewValue(val: any): string;
        protected onChange(evt?: Event): Promise<any>;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _databind;
        private _syncButtons;
        private _toggleBtnHandler;
        private _clearBtnHandler;
        private get _isTyping();
        private _balloonPopupHandler;
        private _balloonPopoutHandler;
        private _inputHandler;
        private _keyupHandler;
        private _focusHandler;
        private _blurHandler;
        private _undo;
        private _findFirstAvailableListItem;
        private _keydownHandler;
        private _selectHandler;
        private _setDropdownMode;
        private _setupItemTemplate;
        private _focus;
        private _select;
        private _filter;
        private _itemCreate;
        private _itemRemove;
        protected toggleReadonlyView(readonly: boolean): void;
        popup(delay?: number): void;
        popout(delay?: number): void;
        private _checkBalloon;
        private _createBalloon;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemTagElement extends PacemElement {
        tag: string;
        readonly: boolean;
        private _btn;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _remove;
    }
    class PacemTagsElement extends PacemDataSourceElement {
        constructor();
        hint: string;
        allowDuplicates: boolean;
        allowNew: boolean;
        private _justAddedIndex;
        private _suggest;
        private _tags;
        protected inputFields: HTMLElement[];
        protected toggleReadonlyView(readonly: boolean): void;
        private _tagRemove;
        private _tagAdd;
        protected handleDatasourceMismatch(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected onChange(evt?: Event): PromiseLike<any>;
        protected acceptValue(val: any): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemMarkdownTextAreaElement extends PacemTextualInputElement implements OnPropertyChanged, OnViewActivated, OnDisconnected {
        private _md;
        constructor(_md?: MarkdownService);
        rows: number;
        cols: number;
        input: HTMLTextAreaElement;
        private _markdown;
        protected toggleReadonlyView(readonly: boolean): void;
        /** @override */
        protected get preventKeyboardSubmit(): boolean;
        protected get inputFields(): HTMLTextAreaElement[];
        protected getViewValue(val: any): string;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        private _keydownHandler;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemTextAreaElement extends PacemTextualInputElement {
        rows: number;
        cols: number;
        private _input;
        private _span;
        /** @override */
        protected get preventKeyboardSubmit(): boolean;
        protected toggleReadonlyView(readonly: boolean): void;
        protected get inputFields(): HTMLTextAreaElement[];
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    interface Validator {
        invalid: boolean;
        validate: (val: any) => PromiseLike<boolean>;
    }
    abstract class PacemBaseValidatorElement extends PacemFormRelevantElement implements Validator {
        #private;
        constructor();
        invalid: boolean;
        errorMessage: string;
        watch: string;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first: boolean): void;
        protected triggerFormFieldValidation(): void;
        validate(val: any): PromiseLike<boolean>;
        protected abstract evaluate(val: any): PromiseLike<boolean>;
    }
    const BASIC_VALIDATOR_TEMPLATE: string;
    class PacemRequiredValidatorElement extends PacemBaseValidatorElement {
        evaluate(val: any): Promise<boolean>;
    }
    class PacemRegexValidatorElement extends PacemBaseValidatorElement {
        pattern: string | RegExp;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        evaluate(val: any): Promise<boolean>;
    }
    class PacemLengthValidatorElement extends PacemBaseValidatorElement {
        min: number;
        max: number;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        evaluate(val: any): Promise<boolean>;
    }
    class PacemRangeValidatorElement extends PacemBaseValidatorElement {
        min: any;
        max: any;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        evaluate(val: any): Promise<boolean>;
    }
    class PacemCompareValidatorElement extends PacemBaseValidatorElement {
        operator: 'equal' | 'lessOrEqual' | 'less' | 'greater' | 'greaterOrEqual' | 'notEqual';
        to: any;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        private _prepareValuesForComparison;
        evaluate(val: any): Promise<boolean>;
    }
    class PacemBinaryValidatorElement extends PacemBaseValidatorElement {
        pattern: string | RegExp;
        maxSize: number;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected evaluate(val: string | BinaryValue): PromiseLike<boolean>;
    }
    class PacemAsyncValidatorElement extends PacemBaseValidatorElement implements Pacem.Net.OAuthFetchable {
        #private;
        private _evaluateResult;
        private _fetch;
        private _debouncer;
        private _deferredToken;
        evaluate(val: any): PromiseLike<boolean>;
        parameters: any;
        fetchCredentials: RequestCredentials;
        fetchHeaders: {
            [key: string]: string;
        };
        url: string;
        method: Pacem.Net.HttpMethod;
        private _fetcher;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
    }
    class PacemCustomValidatorElement extends PacemBaseValidatorElement {
        isValid: boolean;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected evaluate(val: any): PromiseLike<boolean>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    abstract class PacemContenteditableButtonCommandElement extends PacemContenteditableCommandElement {
        icon: string;
        keyboardShortcut: string;
        altText: string;
        active: boolean;
        cleanUp(_: HTMLElement): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected getTooltip(altText?: string, shortcut?: string): string;
    }
    const CONTENTELEMENT_BUTTONCOMMAND_TEMPLATE: string;
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditableAlignCommandElement extends PacemContenteditableButtonCommandElement {
        isRelevant(range: Range): boolean;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        align: 'left' | 'right' | 'center' | 'justify';
        exec(): Promise<void>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    enum KnownExecCommand {
        Bold = "bold",
        Italic = "italic",
        Underline = "underline",
        StrikeThrough = "strikeThrough",
        OrderedList = "insertOrderedList",
        UnorderedList = "insertUnorderedList",
        JustifyLeft = "justifyLeft",
        JustifyCenter = "justifyCenter",
        JustifyRight = "justifyRight",
        JustifyFull = "justifyFull"
    }
    class PacemContenteditableExecCommandElement extends PacemContenteditableButtonCommandElement {
        private _matchRelevance;
        isRelevant(range: Range): boolean;
        command: KnownExecCommand;
        argument: string;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        exec(): Promise<void>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditableHistoryCommandElement extends PacemContenteditableButtonCommandElement {
        exec(): Promise<any>;
        isRelevant(_: Range): boolean;
        command: 'undo' | 'redo';
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        protected containerPropertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditableImageCommandElement extends PacemContenteditableButtonCommandElement implements ContenteditableFileCommand {
        #private;
        pasteCallback(f: File): Promise<HTMLPictureElement>;
        cleanUp(content: HTMLElement): void;
        isRelevant(range: Range): boolean;
        private _file;
        private _rescale;
        viewActivatedCallback(): void;
        disconnectedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        exec(): Promise<void>;
        private _rescaleImg;
        private _rangeChangeCallback;
        private _setBehaviorHandler;
        private _disposeBehaviorHandler;
        private _enhancePictureElement;
        private _downgradePictureElement;
        private _initContainer;
        private _disposeContainer;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditableLinkCommandElement extends PacemContenteditableButtonCommandElement {
        isRelevant(range: Range): boolean;
        target: string;
        viewActivatedCallback(): void;
        exec(arg?: string, target?: string): Promise<void>;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditablePlaceholderElement extends PacemContenteditableCommandElement {
        #private;
        private _itemtemplate;
        private _dropdown;
        cleanUp(content: HTMLElement): void;
        exec(ph: string): Promise<any>;
        datasource: (string | {
            placeholder: string;
            definition?: string;
        })[];
        isRelevant(_: Range): boolean;
        viewActivatedCallback(): void;
        propertyChangedCallback(name: string, old: any, val: any, first?: boolean): void;
        disconnectedCallback(): void;
        private _changeRelevancy;
        private _fillDropdown;
        private _initContainer;
        private _disposeContainer;
        private _focusHandler;
        private _enhancePlaceholderElement;
        private _downgradePlaceholderElement;
    }
}
declare namespace Pacem.Components.Scaffolding {
    class PacemContenteditableWrapCommandElement extends PacemContenteditableButtonCommandElement {
        isRelevant(range: Range): boolean;
        tagname: string;
        exec(): Promise<void>;
    }
}
declare namespace Pacem.Scaffolding.OpenApi {
    type ApiEndpoint = {
        method: Pacem.Net.HttpMethod;
        path: string;
        parameters: ApiParameter[];
        response?: ApiResponse;
    };
    type Parameter = {
        name: string;
        required: boolean;
    };
    type Schema = {
        meta?: OpenApiSwagger.Schema;
        fullType?: string;
        fields?: DataField[];
    };
    interface ApiParameter extends Parameter, Schema {
        type?: ApiParameterType;
    }
    enum ApiParameterType {
        String = "string",
        Number = "number",
        Datetime = "datetime",
        Boolean = "boolean",
        Binary = "binary",
        Object = "object"
    }
    interface DataField extends PropertyMetadata {
        props?: DataField[];
    }
    interface ApiResponse extends Schema {
        type: string;
    }
    type ApiManifest = {
        definitions: {
            [name: string]: OpenApiSwagger.Schema;
        };
        endpoints: ApiEndpoint[];
        baseUrl: string;
    };
    type PagedSet<T> = {
        set: T[];
        skip: number;
        take: number;
        total: number;
        size: number;
    };
    interface ApiParser {
        parse(content: any): ApiManifest;
        load(url: string): Promise<ApiManifest>;
    }
    abstract class ApiParserBase implements ApiParser {
        abstract parse(content: any, url?: string): ApiManifest;
        load(url: string, headers?: {
            [name: string]: string;
        }): Promise<ApiManifest>;
    }
    function getOpenApiDefinition(manifest: ApiManifest, $ref: string): {
        name: string;
        schema: OpenApiSwagger.Schema;
    };
}
declare namespace Pacem.Scaffolding.OpenApi {
    type OpenApi3SchemaRef = {
        "$ref": string;
    };
    type OpenApi3SimpleSchemaType = {
        type: "boolean";
    } | {
        type: "string";
        format?: "date-time" | "byte" | "email";
        maxLength?: number;
        minLength?: number;
        pattern?: string;
    } | {
        type: "integer";
        format: "int32" | "int64" | "int16";
        enum?: number[];
        minimum?: number;
        maximum?: number;
        default?: number;
    } | {
        type: "number";
        format: "double";
        minimum?: number;
        maximum?: number;
        default?: number;
    };
    type OpenApi3SchemaType = {
        nullable?: boolean;
        description?: string;
        readOnly?: boolean;
        required?: string[];
    } & (OpenApi3SimpleSchemaType | {
        type: "array";
        items: OpenApi3SchemaRef | OpenApi3SchemaType;
    } | {
        type: "object";
        properties: {
            [name: string]: OpenApi3SchemaType;
        };
        additionalProperties?: boolean | {
            [name: string]: OpenApi3SchemaType;
        };
    } | OpenApi3SchemaRef);
    type OpenApi3Response = {
        description: string;
        content: {
            [mime: string]: {
                schema: OpenApi3SchemaType;
            };
        };
    };
    type OpenApi3Parameter = {
        name: string;
        in?: string;
        description?: string;
        required: boolean;
        schema: OpenApi3SchemaType;
    };
    type OpenApi3Path = {
        [method: string]: {
            tags?: string[];
            summary?: string;
            description: string;
            responses: {
                [status: string]: OpenApi3Response;
            };
            parameters?: OpenApi3Parameter[];
        };
    };
    export type OpenApi3Schema = {
        openapi: string;
        info?: {
            title?: string;
            version?: string;
        };
        paths: {
            [endpoint: string]: OpenApi3Path;
        };
        components: {
            schemas: {
                [type: string]: OpenApi3SchemaType;
            };
        };
    };
    export class OpenApi3Parser extends ApiParserBase {
        parse(content: any, url?: string): ApiManifest;
        private _convertToApiParameters;
        private _translateType;
        private _gatherDefinitions;
        private _findDefinition;
        private _findDefinitionName;
        private _tryGetResponse;
    }
    export {};
}
declare namespace Pacem.Scaffolding.OpenApi {
    class SwaggerParser extends ApiParserBase {
        private _findDefinitionName;
        parse(content: any, url?: string): ApiManifest;
        private _tryGetEndpoint;
        private _translateType;
        private _tryGetParameters;
        private _tryGetResponse;
    }
}
declare namespace Pacem.Scaffolding.OpenApi {
    class OpenApiParser extends ApiParserBase {
        private _openApi3;
        private _swagger;
        constructor(_openApi3?: OpenApi3Parser, _swagger?: SwaggerParser);
        parse(content: any, url?: string): ApiManifest;
    }
}
