import { Resource } from 'ember-resources/core'; import { Column } from "./-private/column.js"; import { TablePreferences } from "./-private/preferences.js"; import { Row } from "./-private/row.js"; import { BasePlugin, Plugin } from "./plugins/index.js"; import { Class } from "./-private/private-types.js"; import { TableConfig } from "./-private/interfaces/index.js"; interface Signature { Named: TableConfig; } /** * Because the table is our entry-point object to all the table behaviors, * we need a stable way to know which table we have. * Normally, this could be done with referential integrity / identity. * However, due to how resources are implemented, if the consumer opts to * not use the `@use` decorator, then proxies get involved. * The proxies don't maintain instanceof checks, which may be a bug in * ember-resources. */ declare const TABLE_KEY: unique symbol; declare const TABLE_META_KEY: unique symbol; declare const COLUMN_META_KEY: unique symbol; declare const ROW_META_KEY: unique symbol; declare class Table extends Resource> { /** * @private */ [TABLE_KEY]: string; /** * @private */ [TABLE_META_KEY]: Map, any>; /** * @private */ [COLUMN_META_KEY]: WeakMap, Map, any>>; /** * @private */ [ROW_META_KEY]: WeakMap>, Map, any>>; /** * @private * * Unused for now, may be used in the future. * This data is collected along with the scrollContainerWidth, (which is currently in use) */ scrollContainerHeight?: number; /** * @private * * Used to help determine how much space we can give to columns. * As we generate widths for columns, the columns' widths must * add up to about this number. */ scrollContainerWidth?: number; /** * @private * * Lazy way to delay consuming arguments until they are needed. */ args: { named: Signature['Named']; }; /** * @private */ scrollContainerElement?: HTMLElement; /** * Interact with, save, modify, etc the preferences for the table, * plugins, columns, etc */ preferences: TablePreferences; /** * @private */ /** * @private */ modify(_: [] | undefined, named: Signature['Named']): void; /** * Collection of utility modifiers that are the result of composing modifiers * from plugins. * * Using this is optional, and you can "just" use modifiers from specific plugins * in specific places if you wish -- but these exists as a "convenience". * * These are all no-use, no-cost utilities */ modifiers: { container: import("ember-modifier").FunctionBasedModifier<{ Args: { Named: Record; Positional: unknown[]; }; Element: HTMLElement; }>; columnHeader: import("ember-modifier").FunctionBasedModifier<{ Args: { Named: Record; Positional: [Column]; }; Element: HTMLElement; }>; row: import("ember-modifier").FunctionBasedModifier<{ Args: { Named: Record; Positional: [Row]; }; Element: HTMLElement; }>; }; /** * @private * * For all configured plugins, instantiates each one. * If the plugins argument changes to the Table (either directly or through * headlessTable, all state is lost and re-created) */ get plugins(): Plugin[]; /** * Get the active plugin instance for the given plugin class */ /** * Get the active plugin instance for the given plugin class */ pluginOf>(klass: Class): Instance | undefined; /** * @private * * used by other private APIs */ get config(): TableConfig; rows: import("ember-resources/util/map").MappedArray>; columns: import("ember-resources/util/map").MappedArray>; /** * @private */ /** * @private */ resetScrollContainer(): void; resetToDefaults(): void; } export { TABLE_KEY, TABLE_META_KEY, COLUMN_META_KEY, ROW_META_KEY, Table };