mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
e70c294e3d
Summary: Custom widgets are now shown in a gallery. The gallery is automatically opened when a new custom widget is added to a page. Descriptions, authors, and update times are pulled from the widget manifest. Test Plan: Browser tests. Reviewers: jarek Reviewed By: jarek Subscribers: dsagal Differential Revision: https://phab.getgrist.com/D4309
25 lines
674 B
TypeScript
25 lines
674 B
TypeScript
import {GristDoc} from 'app/client/components/GristDoc';
|
|
import {ViewSectionRec} from 'app/client/models/entities/ViewSectionRec';
|
|
import {CustomSectionConfig} from 'app/client/ui/CustomSectionConfig';
|
|
import {ICustomWidget} from 'app/common/CustomWidget';
|
|
|
|
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<ICustomWidget[]> {
|
|
return [];
|
|
}
|
|
}
|