mirror of
https://github.com/google/blockly.git
synced 2026-01-08 17:40:09 +01:00
* chore: add and configure prettier * chore: remove clang-format * chore: remove clang-format config * chore: lint additional ts files * chore: fix lint errors in blocks * chore: add prettier-ignore where needed * chore: ignore js blocks when formatting * chore: fix playground html syntax * chore: fix yaml spacing from merge * chore: convert text blocks to use arrow functions * chore: format everything with prettier * chore: fix lint unused imports in blocks
35 lines
944 B
TypeScript
35 lines
944 B
TypeScript
/**
|
|
* @license
|
|
* Copyright 2020 Google LLC
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*/
|
|
|
|
import * as goog from '../../closure/goog/goog.js';
|
|
goog.declareModuleId('Blockly.ICollapsibleToolboxItem');
|
|
|
|
import type {ISelectableToolboxItem} from './i_selectable_toolbox_item.js';
|
|
import type {IToolboxItem} from './i_toolbox_item.js';
|
|
|
|
/**
|
|
* Interface for an item in the toolbox that can be collapsed.
|
|
*/
|
|
export interface ICollapsibleToolboxItem extends ISelectableToolboxItem {
|
|
/**
|
|
* Gets any children toolbox items. (ex. Gets the subcategories)
|
|
*
|
|
* @returns The child toolbox items.
|
|
*/
|
|
getChildToolboxItems(): IToolboxItem[];
|
|
|
|
/**
|
|
* Whether the toolbox item is expanded to show its child subcategories.
|
|
*
|
|
* @returns True if the toolbox item shows its children, false if it is
|
|
* collapsed.
|
|
*/
|
|
isExpanded(): boolean;
|
|
|
|
/** Toggles whether or not the toolbox item is expanded. */
|
|
toggleExpanded(): void;
|
|
}
|