mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) updates from grist-core
This commit is contained in:
@@ -28,7 +28,7 @@ import toPairs = require('lodash/toPairs');
|
||||
* removal of a table (or column) as the special name pair [finalName, null].
|
||||
*
|
||||
* An ActionSummary contains two fields:
|
||||
* - tableRenames: a list of table name changes (incuding addition/removal).
|
||||
* - tableRenames: a list of table name changes (including addition/removal).
|
||||
* - tableDeltas: a dictionary of changes within a table.
|
||||
*
|
||||
* The key of the tableDeltas dictionary is the name of a table at the end of the
|
||||
@@ -45,7 +45,7 @@ import toPairs = require('lodash/toPairs');
|
||||
*
|
||||
* The changes within a table are represented as a TableDelta, which has the following
|
||||
* fields:
|
||||
* - columnRenames: a list of column name changes (incuding addition/removal).
|
||||
* - columnRenames: a list of column name changes (including addition/removal).
|
||||
* - columnDeltas: a dictionary of changes within a column.
|
||||
* - updateRows, removeRows, addRows: lists of affected rows.
|
||||
*
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface ImportResult {
|
||||
|
||||
export interface ImportTableResult {
|
||||
hiddenTableId: string;
|
||||
uploadFileIndex: number; // Index into upload.files array, for the file reponsible for this table.
|
||||
uploadFileIndex: number; // Index into upload.files array, for the file responsible for this table.
|
||||
origTableName: string;
|
||||
transformSectionRef: number;
|
||||
destTableId: string|null;
|
||||
|
||||
@@ -132,7 +132,7 @@ BinaryIndexedTree.prototype.fillFromCumulative = function(cumulValues) {
|
||||
|
||||
|
||||
/**
|
||||
* Creates a tree from an array of invididual values.
|
||||
* Creates a tree from an array of individual values.
|
||||
* Takes time linear in the size of the array.
|
||||
* @param {Array<number>} - array with each element containing the value to insert.
|
||||
*/
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* InactivityTimer allows to set a function that executes after a certain time of
|
||||
* inactivity. Activities can be of two kinds: synchronous or asynchronous. Asynchronous activities,
|
||||
* are handle with the `disableUntiFinish` method that takes in a Promise and makes sure that the
|
||||
* timer does not start before the promise resolves. Synchroneous activities are monitored with the
|
||||
* timer does not start before the promise resolves. Synchronous activities are monitored with the
|
||||
* `ping` method which resets the timer if called during inactivity.
|
||||
*
|
||||
* Timer won't start before any activity happens, but you may simply call ping() after construction
|
||||
|
||||
@@ -12,7 +12,7 @@ import {RenderOptions, RenderTarget} from 'app/plugin/RenderOptions';
|
||||
export type ComponentKind = "safeBrowser" | "safePython" | "unsafeNode";
|
||||
|
||||
// Describes a function that appends some html content to `containerElement` given some
|
||||
// options. Usefull for provided by a plugin.
|
||||
// options. Useful for provided by a plugin.
|
||||
export type TargetRenderFunc = (containerElement: HTMLElement, options?: RenderOptions) => void;
|
||||
|
||||
/**
|
||||
@@ -93,7 +93,7 @@ export abstract class BaseComponent implements IForwarderDest {
|
||||
* Node Implementation for the PluginElement interface. A PluginInstance take care of activation of
|
||||
* the the plugins's components (activating, timing and deactivating), and create the api's for each contributions.
|
||||
*
|
||||
* Do not try to instanciate yourself, PluginManager does it for you. Instead use the
|
||||
* Do not try to instantiate yourself, PluginManager does it for you. Instead use the
|
||||
* PluginManager.getPlugin(id) method that get instances for you.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -64,7 +64,7 @@ export function typedCompare(val1: any, val2: any): number {
|
||||
if ((result = nativeCompare(type1 = typeof val1, typeof val2)) !== 0) {
|
||||
return result;
|
||||
}
|
||||
// We need to worry about Array comparisons because formulas returing Any may return null or
|
||||
// We need to worry about Array comparisons because formulas returning Any may return null or
|
||||
// object values represented as arrays (e.g. ['D', ...] for dates). Comparing those without
|
||||
// distinguishing types would break the sort. Also, arrays need a special comparator.
|
||||
if (type1 === 'object') {
|
||||
|
||||
@@ -40,7 +40,7 @@ function hasNestedObjects(value: any[]) {
|
||||
* Formats a decoded Grist value for displaying it. For top-level values, formats them the way we
|
||||
* like to see them in a cell or in, say, CSV export.
|
||||
* For top-level lists containing only simple values like strings and dates, formats them as a CSV row.
|
||||
* Nested lists and objects are formatted slighly differently, with quoted strings and ISO format for dates.
|
||||
* Nested lists and objects are formatted slightly differently, with quoted strings and ISO format for dates.
|
||||
*/
|
||||
export function formatDecoded(value: unknown, isTopLevel: boolean = true): string {
|
||||
if (typeof value === 'object' && value) {
|
||||
|
||||
Reference in New Issue
Block a user