export declare class Alert extends Alert_base { static get styles(): string; static get properties(): Record; render(): NodePatchingData; private _renderIcon; private _getIconName; private _renderCloseTool; } declare const Alert_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; /** * The root class of the SPA * Centralizes: Authorization, Localization, Errors display */ export declare class App extends CustomElement { static get state(): Record; render(): NodePatchingData; renderErrors(): NodePatchingData; connectedCallback(): void; disconnectedCallback(): void; handleError(event: CustomEvent): void; } /** * The singleton application controller so it is accessable from everywhere */ declare class AppCtrl { /** * The auth provider of the application */ /** * The error handler of the application */ errorHandler: ErrorHandler; /** * The logged in user of the application */ /** * The internationalization provider of the app */ intlProvider?: IntlProvider; /** * Initializes the application controller */ init(): void; } export declare const appCtrl: AppCtrl; export declare class Badge extends Badge_base { static get styles(): string; render(): NodePatchingData; } declare const Badge_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; export declare class Button extends Button_base { static get styles(): string; static get properties(): Record; render(): NodePatchingData; } declare const Button_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; export declare class CloseTool extends Tool { constructor(); static get properties(): Record; click(): void; } export declare class ComboBox extends ComboBox_base { static get properties(): Record; render(): NodePatchingData; renderHeader(): NodePatchingData; renderSelectTemplate(): NodePatchingData; renderSingleSelectionTemplate(selection: any): NodePatchingData; renderMultipleSelectionTemplate(selection: any): NodePatchingData; didMountCallback(): void; } declare const ComboBox_base: { new (): { [x: string]: any; isSelectionContainer: boolean; attributeChangedCallback(attributeName: string, oldValue: string, newValue: string): void; updateSelection(event: CustomEvent): void; }; [x: string]: any; readonly properties: Record; readonly state: Record; }; declare interface CompiledNodePatcherRule { /** * The type of patching to do to that node */ type: NodePatcherRuleTypes; /** * The node the rule is acting upon */ node: Node; /** * The name of the attribute to patch * Only populated if it is an attribute or an event */ name?: string; } declare type Constructor = new () => any; export declare abstract class CustomElement extends CustomElement_base { dispatchCustomEvent(type: string, detail: Record): void; abstract render(): NodePatchingData | NodePatchingData[]; } declare const CustomElement_base: any; /** * Describes the configurator of the component */ export declare interface CustomElementComponentMetadata { /** * Whether to create a shadow DOM for the component * Defaults to true */ shadow?: boolean; } /** * Describes the configurator of the properties */ export declare interface CustomElementPropertyMetadata { /** * The name of the property in the props object * It corresponds to the key of the record */ name?: string; /** * The name of the HTML attribute mapped to the property */ attribute?: string; /** * The type of the property. If not provided it defaults to a string */ type?: Function | Function[]; /** * When the type of the property is a function and we don't want to evaluate the function when initializing it value * but we want to call that function at a later time */ defer?: boolean; /** * The default value of the property if no attribute is set in HTML */ value?: any; /** * Whether the value of the property can be changed */ mutable?: boolean; /** * Whether to reflect the change of the property in its mapped HTML attribute */ reflect?: boolean; /** * Whether to request the value of the property in the parent if it is not set in the child. e.g., size, kind, etc. */ inherit?: boolean; /** * The range to restrict the values of the property */ options?: string[]; /** * Whether the property must have a value by the time the connectedCallback method is called */ required?: boolean; /** * Hook to allow for extra manipulation of the property value before being set */ transform?: (value: any) => any; /** * Called when the property has changed but after the DOM has been updated * Used to perform modifications to the DOM after updating it */ afterUpdate?: Function; } /** * Describes the configurator of the state */ declare interface CustomElementStateMetadata { /** * The name of the property in the state object */ name?: string; /** * The default value of the state */ value: any; } export declare class DataCell extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; } export declare class DataGrid extends DataGrid_base { static get styles(): string; static get properties(): Record; render(): NodePatchingData; renderHeader(): NodePatchingData; renderBody(): NodePatchingData[]; } declare const DataGrid_base: { new (): { [x: string]: any; }; [x: string]: any; readonly properties: Record; }; declare interface DataGridFieldDescriptor { /** * The name of the field */ name: string; /** * The display (label) of the field */ display: string | Function; /** * The CSS width of the field */ width: string; /** * Whether the field can be sorted */ sortable: boolean; /** * The style for the header of the field (column) */ headerStyle: string | object; /** * The custom renderer of the field */ render: (record: Record, field: DataGridFieldDescriptor) => NodePatchingData; } export declare class DataHeader extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData[]; } export declare class DataHeaderCell extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; renderCellContainer(field: DataGridFieldDescriptor, display: NodePatchingData): NodePatchingData; renderSorter(): NodePatchingData; } export declare class DataList extends DataList_base { static get properties(): Record; render(): NodePatchingData; renderItems(): NodePatchingData; getItemStyle(): string; renderItem(record: Record): NodePatchingData; } declare const DataList_base: { new (): { [x: string]: any; isSelectionContainer: boolean; attributeChangedCallback(attributeName: string, oldValue: string, newValue: string): void; updateSelection(event: CustomEvent): void; }; [x: string]: any; readonly properties: Record; readonly state: Record; }; export declare class DataRow extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData[]; } export declare class DateField extends Field { render(): NodePatchingData; } export declare function defineCustomElement(name: string, constructor: CustomElementConstructor | Constructor): void; /** * Wrapper to allow selection when clicked for the child element */ export declare class Draggable extends Draggable_base { render(): NodePatchingData; } declare const Draggable_base: { new (): { [x: string]: any; connectedCallback(): void; disconnectedCallback(): void; handleDragStart(evt: DragEvent): void; }; [x: string]: any; readonly properties: Record; }; export declare class DropDown extends CustomElement { static get styles(): string; static get state(): Record; constructor(); render(): NodePatchingData; connectedCallback(): void; disconnectedCallback(): void; handleDropChanged(evt: CustomEvent): void; hideContent(): void; } /** * Wrapper to allow selection when clicked for the child element */ export declare class Droppable extends Droppable_base { render(): NodePatchingData; } declare const Droppable_base: { new (): { [x: string]: any; connectedCallback(): void; disconnectedCallback(): void; handleDragOver(e: DragEvent): void; handleDrop(e: DragEvent): void; }; [x: string]: any; readonly properties: Record; }; export declare class DropTool extends Tool { constructor(); static get state(): Record; iconName: () => "chevron-down" | "chevron-up"; hideContent(): void; updateShowing(showing: boolean): void; click: () => void; } declare interface ErrorHandler { handleError: (event: CustomEvent) => void; } /** * The error response returned by the server */ declare interface ErrorResponse { status: number; statusText: string; /** * Extra data returned by the server in the response */ payload: any; } declare abstract class Field extends Field_base { private _tempValue; isField: boolean; static get styles(): string; static get properties(): Record; attributeChangedCallback(attributeName: string, oldValue: string, newValue: string): void; hasRequiredValidator(): boolean; didAdoptChildCallback(parent: any, child: any): void; handleBlur(event: any): void; /** * Called every time the input changes * Perform validation to give instantaneous feedback but do not update the current value since it might keep changing * @param event * @returns */ handleInput(event: any): void; createValidationContext(): { label: string; value: any; warnings: any[]; errors: any[]; }; initializeValidator(validator: string): RequiredValidator; getLabel(): string; handleChange(event: any): void; getNewValue(input: HTMLInputElement): any; } declare const Field_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; declare interface FieldValidationContext extends ValidationContext { /** The label of the field */ label: string; } export declare class FileField extends Field { static get properties(): Record; render(): NodePatchingData; openFileDialog(): void; renderFileList(): NodePatchingData[]; } export declare class Form extends Form_base { private _fields; private _record; constructor(); static get styles(): string; static get properties(): Record; render(): NodePatchingData; private _renderButton; getSubmitData(): any; submit(): void; createValidationContext(): ValidationContext; /** * Handles the data that was loaded from the server * @param data The data returned by the server */ handleLoadedData(data: Record): void; /** * Called when a response from a submission is received from a server * @param data The data returned by the server */ handleSubmitResponse(data: Record): void; private _populateFields; initializeValidator(validator: string): void; validate(): boolean; connectedCallback(): void; disconnectedCallback(): void; handleFieldAdded(event: CustomEvent): void; handleChange(event: CustomEvent): void; } declare const Form_base: { new (): { [x: string]: any; renderSubmitting(): NodePatchingData; connectedCallback(): void; submit(): void; getMethod(data: Record): any; handleSubmitData(data: Record): void; handleSubmitError(error: ErrorResponse): void; }; [x: string]: any; readonly properties: Record; readonly state: Record; }; export declare class FormField extends FormField_base { static get styles(): string; static get properties(): Record; static get state(): Record; render(): NodePatchingData; connectedCallback(): void; disconnectedCallback(): void; handleInput(event: CustomEvent): void; handleValidation(event: CustomEvent): void; } declare const FormField_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; export declare class FormLabel extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; } export declare class HiddenField extends Field { render(): NodePatchingData; } export declare function html(strings: TemplateStringsArray, ...values: any): NodePatchingData; export declare class Icon extends Icon_base { static atomic: boolean; static get styles(): string; static get properties(): Record; render(): NodePatchingData; } declare const Icon_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; declare class IntlProvider extends Observer { /** * The current language set in the provider */ lang: string; /** * The data with the translation */ data: any; constructor( /** * The current language set in the provider */ lang: string, /** * The data with the translation */ data: any); setLanguage(lang: string): void; /** * Retrieves the translated text or returns a string with the key value if the translation was not found */ getTranslation(lang: string | undefined, key: string): string; } /** * Wrapper to allow loading data for a child component */ export declare class Loader extends Loader_base { render(): NodePatchingData; didMountCallback(): void; handleLoadedData(data: any): void; } declare const Loader_base: { new (): { [x: string]: any; renderLoading(): NodePatchingData; connectedCallback(): void; load(): void; handleLoadData(data: Record): void; handleLoadError(error: ErrorResponse): void; }; [x: string]: any; readonly properties: Record; readonly state: Record; }; declare const LocalizedText_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; declare class NodePatcher { /** * The inner HTML of the template content to help debugging */ templateString: string; /** * The template to clone and generate the node from */ template: HTMLTemplateElement; /** * The rules to be cloned (compiled)to execute the patching */ rules: NodePatcherRule[]; /** * The index of the dynamic property where the key is */ keyIndex: number; /** * Whether the content of the template has a single element */ isSingleElement: boolean; constructor(strings: TemplateStringsArray); firstPatch(parentNode: Node, rules: CompiledNodePatcherRule[], values?: any[]): void; patchNode(parentNode: Node, rules: CompiledNodePatcherRule[], oldValues?: any[], newValues?: any[], compareValues?: boolean): void; } /** * The rule to "compile" to patch the DOM node */ declare interface NodePatcherRule { /** * The type of patching to do to that node */ type: NodePatcherRuleTypes; /** * The path to locate the node */ path: number[]; /** * The name of the attribute to patch * Only populated if it is an attribute or an event */ name?: string; } declare enum NodePatcherRuleTypes { PATCH_NODE = 1, PATCH_ATTRIBUTE = 2, PATCH_EVENT = 3 } /** * The patching data with the information to patch a node */ export declare interface NodePatchingData { /** * The node to be patched (it does not exist until it is created if needed) */ node?: Node; /** * The patcher to patch the node with the values according to the rules */ patcher: NodePatcher; /** * The rules to use to patch the node */ rules: CompiledNodePatcherRule[]; /** * The values used to feed the rules */ values: any[]; } declare class Observer { /** * The name of the callback the subscriber is using when notified */ callbackName: string; private _subscribers; constructor( /** * The name of the callback the subscriber is using when notified */ callbackName?: string); subscribe(subscriber: Subscriber): void; unsubscribe(subscriber: Subscriber): void; notify(...args: any[]): void; } export declare class Overlay extends CustomElement { static get styles(): string; render(): NodePatchingData; } declare class RequiredValidator extends SingleValueFieldValidator { /** If true, allows '' as a valid value */ allowEmpty: boolean; constructor(options?: RequiredValidatorOptions); validate(context: SingleValueFieldValidationContext): boolean; } declare interface RequiredValidatorOptions extends ValidatorOptions { /** If true, allows '' as a valid value */ allowEmpty?: boolean; } export declare class Row extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; } /** * Wrapper to allow selection when clicked for the child element */ export declare class Selectable extends Selectable_base { render(): NodePatchingData; } declare const Selectable_base: any; declare interface SingleValueFieldValidationContext extends FieldValidationContext { /** The value to validate */ value?: any; } declare abstract class SingleValueFieldValidator extends Validator { } export declare class Slider extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; refreshSlider(value: number): Promise; connectedCallback(): void; updateX(x: any): void; eventHandler(e: any): void; } export declare class SorterTool extends Tool { static get properties(): Record; static get state(): Record; iconName: () => "arrow-down-up" | "arrow-up" | "arrow-down"; click: () => void; } declare interface Subscriber { } /** * Component that uses data and a template to generate its content */ export declare class TemplatedItem extends CustomElement { static get properties(): Record; render(): NodePatchingData; } declare class Text_2 extends LocalizedText_base { static atomic: boolean; static get styles(): string; static get properties(): Record; connectedCallback(): void; disconnectedCallback(): void; render(): NodePatchingData; handleLanguageChanged(provider: any): void; } export { Text_2 as Text } export declare class TextField extends Field { render(): NodePatchingData; } export declare abstract class Tool extends Tool_base { static get properties(): Record; render(): NodePatchingData; } declare const Tool_base: { new (): { [x: string]: any; }; [x: string]: any; readonly styles: string; readonly properties: Record; }; export declare class ToolTip extends CustomElement { static get styles(): string; static get properties(): Record; render(): NodePatchingData; connectedCallback(): void; didMountCallback(): void; didUpdateCallback(): void; handleResize(): void; /** * Positions the content since we don't know its dimensions until it is rendered in the DOM */ private _positionContent; /** * Returns the requested position if there is enough room for that * @param trigger * @param pos * @returns */ getFittingPosition(trigger: HTMLElement, content: HTMLElement, pos: string): string; } declare interface ValidationContext { /** The error messages */ errors: string[]; /** The warning messages */ warnings: string[]; } export declare class ValidationSummary extends CustomElement { static get properties(): Record; render(): NodePatchingData; renderWarnings(): any; renderErrors(): any; } declare abstract class Validator { /** The message to add to the validation context */ message?: string; constructor(options: ValidatorOptions); abstract validate(context: ValidationContext): boolean; /** * Adds an error message to the arrays of errors of the context * @param context The context containing the array of errors * @param data The data to replace the template placeholders with */ emitErrors(context: ValidationContext, data: any): void; /** * Adds an warning message to the arrays of warnings of the context * @param context The context containing the array of warnings * @param data The data to replace the template placeholders with */ emitWarnings(context: ValidationContext, data: any): void; } declare interface ValidatorOptions { message?: string; } export { }