mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Show summary tables on Raw Data page
Summary: Summary tables now have their own raw viewsection, and are shown under Raw Data Tables on the Raw Data page. Test Plan: Browser and Python tests. Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3495
This commit is contained in:
@@ -1,18 +1,19 @@
|
||||
import {TableData} from 'app/common/TableData';
|
||||
import {UIRowId} from 'app/common/UIRowId';
|
||||
import {TableData} from "./TableData";
|
||||
|
||||
/**
|
||||
* Return whether a table identified by the rowId of its metadata record, should normally be
|
||||
* hidden from the user (e.g. as an option in the page-widget picker).
|
||||
* Return whether a table (identified by the rowId of its metadata record) should
|
||||
* normally be hidden from the user (e.g. as an option in the page-widget picker).
|
||||
*/
|
||||
export function isHiddenTable(tablesData: TableData, tableRef: UIRowId): boolean {
|
||||
const tableId = tablesData.getValue(tableRef, 'tableId') as string|undefined;
|
||||
return !isRawTable(tablesData, tableRef) || Boolean(tableId?.startsWith('GristHidden'));
|
||||
return isSummaryTable(tablesData, tableRef) || Boolean(tableId?.startsWith('GristHidden'));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether a table identified by the rowId of its metadata record should be visible on Raw Data page.
|
||||
* Return whether a table (identified by the rowId of its metadata record) is a
|
||||
* summary table.
|
||||
*/
|
||||
export function isRawTable(tablesData: TableData, tableRef: UIRowId): boolean {
|
||||
return tablesData.getValue(tableRef, 'summarySourceTable') === 0;
|
||||
export function isSummaryTable(tablesData: TableData, tableRef: UIRowId): boolean {
|
||||
return tablesData.getValue(tableRef, 'summarySourceTable') !== 0;
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ import { GristObjCode } from "app/plugin/GristData";
|
||||
|
||||
// tslint:disable:object-literal-key-quotes
|
||||
|
||||
export const SCHEMA_VERSION = 29;
|
||||
export const SCHEMA_VERSION = 30;
|
||||
|
||||
export const schema = {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user