mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
942fc96225
Summary: Added boilerplate code needed to create new wigets in "Add new" menu, that are wrapped around existing custom widgets. More details can be found here: https://grist.quip.com/larhAGRKyl6Z/Custom-widgets-in-Add-Widget-menu Test Plan: nbowser tests added to verify if item in menu exits, if widget is rendered, and right side menu has widget selection and read access selection hided. Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3994
24 lines
584 B
TypeScript
24 lines
584 B
TypeScript
import {GristDoc} from "../components/GristDoc";
|
|
import {ViewSectionRec} from "../models/entities/ViewSectionRec";
|
|
import {CustomSectionConfig} from "./CustomSectionConfig";
|
|
|
|
export class PredefinedCustomSectionConfig extends CustomSectionConfig {
|
|
|
|
|
|
constructor(section: ViewSectionRec, gristDoc: GristDoc) {
|
|
super(section, gristDoc);
|
|
}
|
|
|
|
public buildDom() {
|
|
return this._customSectionConfigurationConfig.buildDom();
|
|
}
|
|
|
|
protected shouldRenderWidgetSelector(): boolean {
|
|
return false;
|
|
}
|
|
|
|
protected async _getWidgets(): Promise<void> {
|
|
// Do nothing.
|
|
}
|
|
}
|