mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Update grainjs, fix some code affected by stronger types.
Summary: Also clean up dom-ownership in Charts using the new grainjs maybeOwned() method. Test Plan: Should be no behaviour changes; existing tests should pass Reviewers: georgegevoian Reviewed By: georgegevoian Differential Revision: https://phab.getgrist.com/D3166
This commit is contained in:
@@ -50,7 +50,7 @@ function createLoadedDocMenu(home: HomeModel) {
|
||||
return css.docList(
|
||||
dom.maybe(!home.app.currentFeatures.workspaces, () => [
|
||||
css.docListHeader('This service is not available right now'),
|
||||
dom.text('(The organization needs a paid plan)')
|
||||
dom('span', '(The organization needs a paid plan)')
|
||||
]),
|
||||
|
||||
// currentWS and showIntro observables change together. We capture both in one domComputed call.
|
||||
|
||||
@@ -323,25 +323,23 @@ export class RightPanel extends Disposable {
|
||||
vct._buildChartConfigDom(),
|
||||
]),
|
||||
|
||||
dom.maybe((use) => use(this._pageWidgetType) === 'custom', () => [
|
||||
cssLabel('CUSTOM'),
|
||||
() => {
|
||||
const parts = vct._buildCustomTypeItems() as any[];
|
||||
return [
|
||||
// If 'customViewPlugin' feature is on, show the toggle that allows switching to
|
||||
// plugin mode. Note that the default mode for a new 'custom' view is 'url', so that's
|
||||
// the only one that will be shown without the feature flag.
|
||||
dom.maybe((use) => use(this._gristDoc.app.features).customViewPlugin,
|
||||
() => dom('div', parts[0].buildDom())),
|
||||
dom.maybe(use => use(activeSection.customDef.mode) === 'plugin',
|
||||
() => dom('div', parts[2].buildDom())),
|
||||
// In the default url mode, allow picking a url and granting/forbidding
|
||||
// access to data.
|
||||
dom.maybe(use => use(activeSection.customDef.mode) === 'url',
|
||||
() => dom.create(CustomSectionConfig, activeSection, this._gristDoc.app.topAppModel.api)),
|
||||
];
|
||||
}
|
||||
]),
|
||||
dom.maybe((use) => use(this._pageWidgetType) === 'custom', () => {
|
||||
const parts = vct._buildCustomTypeItems() as any[];
|
||||
return [
|
||||
cssLabel('CUSTOM'),
|
||||
// If 'customViewPlugin' feature is on, show the toggle that allows switching to
|
||||
// plugin mode. Note that the default mode for a new 'custom' view is 'url', so that's
|
||||
// the only one that will be shown without the feature flag.
|
||||
dom.maybe((use) => use(this._gristDoc.app.features).customViewPlugin,
|
||||
() => dom('div', parts[0].buildDom())),
|
||||
dom.maybe(use => use(activeSection.customDef.mode) === 'plugin',
|
||||
() => dom('div', parts[2].buildDom())),
|
||||
// In the default url mode, allow picking a url and granting/forbidding
|
||||
// access to data.
|
||||
dom.maybe(use => use(activeSection.customDef.mode) === 'url',
|
||||
() => dom.create(CustomSectionConfig, activeSection, this._gristDoc.app.topAppModel.api)),
|
||||
];
|
||||
}),
|
||||
|
||||
dom.maybe((use) => use(this._pageWidgetType) !== 'chart', () => [
|
||||
cssSeparator(),
|
||||
|
||||
Reference in New Issue
Block a user