gristlabs_grist-core/app/client/ui/PredefinedCustomSectionConfig.ts
George Gevoian e70c294e3d (core) Add custom widget gallery
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
2024-08-14 16:48:36 -04:00

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 [];
}
}