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:
@@ -370,7 +370,7 @@ export interface UserAPI {
|
||||
}
|
||||
|
||||
/**
|
||||
* Parameters for the download CSV and XLSX endpoint (/download/csv & /download/csv).
|
||||
* Parameters for the download CSV and XLSX endpoint (/download/table-schema & /download/csv & /download/csv).
|
||||
*/
|
||||
export interface DownloadDocParams {
|
||||
tableId: string;
|
||||
@@ -418,6 +418,7 @@ export interface DocAPI {
|
||||
getDownloadUrl(template?: boolean): string;
|
||||
getDownloadXlsxUrl(params?: DownloadDocParams): string;
|
||||
getDownloadCsvUrl(params: DownloadDocParams): string;
|
||||
getDownloadTableSchemaUrl(params: DownloadDocParams): string;
|
||||
/**
|
||||
* Exports current document to the Google Drive as a spreadsheet file. To invoke this method, first
|
||||
* acquire "code" via Google Auth Endpoint (see ShareMenu.ts for an example).
|
||||
@@ -920,6 +921,11 @@ export class DocAPIImpl extends BaseAPI implements DocAPI {
|
||||
return this._url + '/download/csv?' + encodeQueryParams({...params});
|
||||
}
|
||||
|
||||
public getDownloadTableSchemaUrl(params: DownloadDocParams) {
|
||||
// We spread `params` to work around TypeScript being overly cautious.
|
||||
return this._url + '/download/table-schema?' + encodeQueryParams({...params});
|
||||
}
|
||||
|
||||
public async sendToDrive(code: string, title: string): Promise<{url: string}> {
|
||||
const url = new URL(`${this._url}/send-to-drive`);
|
||||
url.searchParams.append('title', title);
|
||||
|
||||
11
app/common/WidgetOptions.ts
Normal file
11
app/common/WidgetOptions.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import {NumberFormatOptions} from 'app/common/NumberFormat';
|
||||
|
||||
export interface WidgetOptions extends NumberFormatOptions {
|
||||
textColor?: 'string';
|
||||
fillColor?: 'string';
|
||||
alignment?: 'left' | 'center' | 'right';
|
||||
dateFormat?: string;
|
||||
timeFormat?: string;
|
||||
widget?: 'HyperLink';
|
||||
choices?: Array<string>;
|
||||
}
|
||||
Reference in New Issue
Block a user