mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Cursor in custom widgets
Summary: Adding a new method `setCursorPos` in the widget API, and a new configuration option for the ready message `allowSelectBy` that exposes custom widgets in the `Select by` dropdown. With this, a custom widget can control the position of the linked widgets and is able to change the column in the creator panel. Test Plan: Added new test. Existing tests should pass. Reviewers: JakubSerafin Reviewed By: JakubSerafin Subscribers: JakubSerafin Differential Revision: https://phab.getgrist.com/D3993
This commit is contained in:
@@ -1,11 +1,10 @@
|
||||
import {ActionGroup} from 'app/common/ActionGroup';
|
||||
import {BulkAddRecord, CellValue, TableDataAction, UserAction} from 'app/common/DocActions';
|
||||
import {FormulaProperties} from 'app/common/GranularAccessClause';
|
||||
import {UIRowId} from 'app/common/TableData';
|
||||
import {FetchUrlOptions, UploadResult} from 'app/common/uploads';
|
||||
import {DocStateComparison, PermissionData, UserAccessData} from 'app/common/UserAPI';
|
||||
import {ParseOptions} from 'app/plugin/FileParserAPI';
|
||||
import {AccessTokenOptions, AccessTokenResult} from 'app/plugin/GristAPI';
|
||||
import {AccessTokenOptions, AccessTokenResult, UIRowId} from 'app/plugin/GristAPI';
|
||||
import {IMessage} from 'grain-rpc';
|
||||
|
||||
export interface ApplyUAOptions {
|
||||
|
||||
@@ -2,21 +2,18 @@
|
||||
* TableData maintains a single table's data.
|
||||
*/
|
||||
import {ActionDispatcher} from 'app/common/ActionDispatcher';
|
||||
import {
|
||||
BulkAddRecord, BulkColValues, CellValue, ColInfo, ColInfoWithId, ColValues, DocAction,
|
||||
import {BulkAddRecord, BulkColValues, CellValue, ColInfo, ColInfoWithId, ColValues, DocAction,
|
||||
isSchemaAction, ReplaceTableData, RowRecord, TableDataAction} from 'app/common/DocActions';
|
||||
import {getDefaultForType} from 'app/common/gristTypes';
|
||||
import {arrayRemove, arraySplice, getDistinctValues} from 'app/common/gutil';
|
||||
import {SchemaTypes} from "app/common/schema";
|
||||
import {SchemaTypes} from 'app/common/schema';
|
||||
import {UIRowId} from 'app/plugin/GristAPI';
|
||||
import isEqual = require('lodash/isEqual');
|
||||
import fromPairs = require('lodash/fromPairs');
|
||||
|
||||
export interface ColTypeMap { [colId: string]: string; }
|
||||
|
||||
// This is the row ID used in the client, but it's helpful to have available in some common code
|
||||
// as well, which is why it's declared in app/common. Note that for data actions and stored data,
|
||||
// 'new' is not used.
|
||||
export type UIRowId = number | 'new';
|
||||
|
||||
|
||||
type UIRowFunc<T> = (rowId: UIRowId) => T;
|
||||
|
||||
|
||||
@@ -5,9 +5,9 @@ import {encodeQueryParams, isAffirmative} from 'app/common/gutil';
|
||||
import {LocalPlugin} from 'app/common/plugin';
|
||||
import {StringUnion} from 'app/common/StringUnion';
|
||||
import {TelemetryLevel} from 'app/common/Telemetry';
|
||||
import {UIRowId} from 'app/common/TableData';
|
||||
import {getGristConfig} from 'app/common/urlUtils';
|
||||
import {Document} from 'app/common/UserAPI';
|
||||
import {UIRowId} from 'app/plugin/GristAPI';
|
||||
import clone = require('lodash/clone');
|
||||
import pickBy = require('lodash/pickBy');
|
||||
import {ThemeAppearance, ThemeAppearanceChecker, ThemeName, ThemeNameChecker} from './ThemePrefs';
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {TableData, UIRowId} from 'app/common/TableData';
|
||||
import {TableData} from 'app/common/TableData';
|
||||
import {UIRowId} from 'app/plugin/GristAPI';
|
||||
|
||||
/**
|
||||
* Return whether a table (identified by the rowId of its metadata record) should
|
||||
|
||||
Reference in New Issue
Block a user