import { Constructor, LitElement, PropertyDeclarations, TemplateResult, html } from 'lit-element'; import { BooleanSelector } from '@foxy.io/sdk/core'; import { InferrableMixinHost } from './inferrable'; import { ScopeCollection, ScopeRule } from '../utils/user-scope'; export declare class ConfigurableMixinHost { /** Template render functions mapped to their name. */ templates: Partial>>; /** * Toggles additional functionality for developers on and off. In particular, * setting this property (or attribute with the same name) to "development" will * start tracking changes in templates, allowing developers to edit HTML in the browser * and see results without having to refresh the page every time. */ mode: 'development' | 'production'; /** * If true, makes every editable control inside of this element read-only. * This property is reflected to the `readonly` boolean attribute. * * @since 1.4.0 */ readonly: boolean; /** * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting * controls to render as read-only. Parsed version of the `readonlycontrols` attribute value. * * @type {BooleanSelector} * @since 1.4.0 * @default BooleanSelector.False */ readonlyControls: BooleanSelector; /** * If true, disables every interactive control inside of this element. * This property is reflected to the `disabled` boolean attribute. * * @since 1.4.0 */ disabled: boolean; /** * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting * controls to render as disabled. Parsed version of the `disabledcontrols` attribute value. * * @type {BooleanSelector} * @since 1.4.0 * @default BooleanSelector.False */ disabledControls: BooleanSelector; /** * If true, hides every configurable control inside of this element. * This property is reflected to the `hidden` boolean attribute. * * @since 1.4.0 */ hidden: boolean; /** * [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) selecting * controls to hide. Parsed version of the `hiddencontrols` attribute value. * * @type {BooleanSelector} * @since 1.4.0 * @default BooleanSelector.False */ hiddenControls: BooleanSelector; /** * Space-separated API token scope of the current user, e.g. `transactions_read`. When set, * controls the user cannot access are hidden or made read-only. Inferred from parent elements; * an unset value never overrides one set on an ancestor. Empty or unset means no restrictions. */ currentUserScope: string | null; /** * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `readonlyControls` * and `readonly` properties. If `readonly` is true, this selector will match any control, * otherwise it will match the same controls as in `readonlyControls`. * * @since 1.4.0 */ get readonlySelector(): BooleanSelector; /** * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `disabledControls` * and `disabled` properties. If `disabled` is true, this selector will match any control, * otherwise it will match the same controls as in `disabledControls`. * * @since 1.4.0 */ get disabledSelector(): BooleanSelector; /** * Combined [BooleanSelector](https://sdk.foxy.dev/classes/_core_index_.booleanselector.html) for `hiddenControls` * and `hidden` properties. If `hidden` is true, this selector will match any control, * otherwise it will match the same controls as in `hiddenControls`. * * @since 1.4.0 */ get hiddenSelector(): BooleanSelector; /** * Collection this element edits. Elements override this to lock themselves when the user * can only read it. `null` by default. */ get scopeCollection(): ScopeCollection | null; /** Per-control scope rules. Elements override this to hide or lock controls. Empty by default. */ get scopeRules(): ScopeRule[]; /** * Looks for templates in element's children and compiles them to render functions. * * @param replace If true, all existing templates will be removed. */ compileTemplates(replace?: boolean): void; /** * Renders a template with the given name if available and a slot otherwise. * For empty name looks for a "default" template first and renders it if found – otherwise renders a default slot. * * @param name Name of the template/slot to render. * @param context Context to provide template renderer with. */ renderTemplateOrSlot(name?: string, context?: any): void; /** * Zooms into templates with complex names. For example, zooming on `customer` in `customer:header:before` * will return `header:before`. * * @param id Name to zoom on. */ getNestedTemplates>>>(id: string): T; } declare type Base = Constructor & Constructor & { properties?: PropertyDeclarations; inferredProperties: string[]; }; declare type TemplateFunction = typeof html; export declare type Renderer = (html: TemplateFunction, host: THost) => TemplateResult; export declare const ConfigurableMixin: (BaseElement: TBase) => TBase & Constructor; export {};