wj-elements
Version:
WebJET Elements is a modern set of user interface tools harnessing the power of web components designed to simplify web application development.
56 lines (55 loc) • 1.84 kB
TypeScript
import { default as WJElement } from '../wje-element/element.js';
/**
* @summary Orgchart is a custom web component that extends WJElement.
* @documentation https://elements.webjet.sk/components/Orgchart
* @status stable
* @augments WJElement
* @attribute {boolean} flat - Removes the incoming connector spacing for nested charts that should visually continue on the same level.
* @csspart - Styles the element.
* @csspart native - Styles the native element.
* @tag wje-orgchart
* @example
*/
export default class Orgchart extends WJElement {
/**
* Returns the CSS styles for the component.
* @static
* @returns {CSSStyleSheet}
*/
static get cssStyleSheet(): CSSStyleSheet;
/**
* Returns attributes that trigger a redraw when they change.
* @returns {Array<string>} Attribute names that require a new template render.
*/
static get observedAttributes(): Array<string>;
/**
* Sets whether the chart should omit its incoming connector spacing.
* @param {boolean} value True when the chart should render without top connector spacing.
*/
set flat(value: boolean);
/**
* Gets whether the chart omits its incoming connector spacing.
* @returns {boolean} True when the chart has the flat attribute.
*/
get flat(): boolean;
/**
* Draws the component for the org chart.
* @returns {DocumentFragment}
*/
draw(): DocumentFragment;
native: HTMLDivElement;
defaultSlot: HTMLSlotElement;
/**
* Syncs flat chart state to direct slotted children.
*/
afterDraw(): void;
/**
* Marks direct children that are rendered inside a flat chart.
*/
syncFlatChildren: () => void;
flatChildren: Set<Element>;
/**
* Sync ARIA attributes on host.
*/
syncAria(): void;
}