mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
(core) updates from grist-core
This commit is contained in:
commit
1d93923efe
4
.gitignore
vendored
4
.gitignore
vendored
@ -74,4 +74,8 @@ jspm_packages/
|
|||||||
# dotenv environment variables file
|
# dotenv environment variables file
|
||||||
.env
|
.env
|
||||||
|
|
||||||
|
# Test
|
||||||
|
timings.txt
|
||||||
|
xunit.xml
|
||||||
|
|
||||||
**/_build
|
**/_build
|
||||||
|
@ -5,6 +5,7 @@ const dom = require('app/client/lib/dom');
|
|||||||
const kd = require('app/client/lib/koDom');
|
const kd = require('app/client/lib/koDom');
|
||||||
const koDomScrolly = require('app/client/lib/koDomScrolly');
|
const koDomScrolly = require('app/client/lib/koDomScrolly');
|
||||||
const {renderAllRows} = require('app/client/components/Printing');
|
const {renderAllRows} = require('app/client/components/Printing');
|
||||||
|
const {isNarrowScreen} = require('app/client/ui2018/cssVars');
|
||||||
|
|
||||||
require('app/client/lib/koUtil'); // Needed for subscribeInit.
|
require('app/client/lib/koUtil'); // Needed for subscribeInit.
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ const {RowContextMenu} = require('../ui/RowContextMenu');
|
|||||||
const {parsePasteForView} = require("./BaseView2");
|
const {parsePasteForView} = require("./BaseView2");
|
||||||
const {columnInfoTooltip} = require("../ui/tooltips");
|
const {columnInfoTooltip} = require("../ui/tooltips");
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* DetailView component implements a list of record layouts.
|
* DetailView component implements a list of record layouts.
|
||||||
*/
|
*/
|
||||||
@ -75,6 +77,7 @@ function DetailView(gristDoc, viewSectionModel) {
|
|||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// Set up DOM event handling.
|
// Set up DOM event handling.
|
||||||
|
this._twoLastFieldIdsSelected = [null, null];
|
||||||
|
|
||||||
// Clicking on a detail field selects that field.
|
// Clicking on a detail field selects that field.
|
||||||
this.onEvent(this.viewPane, 'mousedown', '.g_record_detail_el', function(elem, event) {
|
this.onEvent(this.viewPane, 'mousedown', '.g_record_detail_el', function(elem, event) {
|
||||||
@ -82,6 +85,8 @@ function DetailView(gristDoc, viewSectionModel) {
|
|||||||
var rowModel = this.recordLayout.getContainingRow(elem, this.viewPane);
|
var rowModel = this.recordLayout.getContainingRow(elem, this.viewPane);
|
||||||
var field = this.recordLayout.getContainingField(elem, this.viewPane);
|
var field = this.recordLayout.getContainingField(elem, this.viewPane);
|
||||||
commands.allCommands.setCursor.run(rowModel, field);
|
commands.allCommands.setCursor.run(rowModel, field);
|
||||||
|
this._twoLastFieldIdsSelected.unshift(field.id());
|
||||||
|
this._twoLastFieldIdsSelected.pop();
|
||||||
});
|
});
|
||||||
|
|
||||||
// Double-clicking on a field also starts editing the field.
|
// Double-clicking on a field also starts editing the field.
|
||||||
@ -89,6 +94,18 @@ function DetailView(gristDoc, viewSectionModel) {
|
|||||||
this.activateEditorAtCursor();
|
this.activateEditorAtCursor();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// We authorize single click only on the value to avoid conflict with tooltip
|
||||||
|
this.onEvent(this.viewPane, 'click', '.g_record_detail_value', function(elem, event) {
|
||||||
|
var field = this.recordLayout.getContainingField(elem, this.viewPane);
|
||||||
|
if (
|
||||||
|
this._twoLastFieldIdsSelected[0] === this._twoLastFieldIdsSelected[1]
|
||||||
|
&& !isNarrowScreen()
|
||||||
|
&& this._canSingleClick(field)
|
||||||
|
) {
|
||||||
|
this.activateEditorAtCursor();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
//--------------------------------------------------
|
//--------------------------------------------------
|
||||||
// Instantiate CommandGroups for the different modes.
|
// Instantiate CommandGroups for the different modes.
|
||||||
this.autoDispose(commands.createGroup(DetailView.generalCommands, this, this.viewSection.hasFocus));
|
this.autoDispose(commands.createGroup(DetailView.generalCommands, this, this.viewSection.hasFocus));
|
||||||
@ -430,4 +447,20 @@ DetailView.prototype._duplicateRows = async function() {
|
|||||||
this.setCursorPos({rowId: addRowIds[0]})
|
this.setCursorPos({rowId: addRowIds[0]})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DetailView.prototype._canSingleClick = function(field) {
|
||||||
|
// we can't simple click if :
|
||||||
|
// - the field is a formula
|
||||||
|
// - the field is toggle (switch or checkbox)
|
||||||
|
if (
|
||||||
|
field.column().isRealFormula() || field.column().hasTriggerFormula()
|
||||||
|
|| (
|
||||||
|
field.column().pureType() === "Bool"
|
||||||
|
&& ["Switch", "CheckBox"].includes(field.column().visibleColFormatter().widgetOpts.widget)
|
||||||
|
)
|
||||||
|
) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
module.exports = DetailView;
|
module.exports = DetailView;
|
||||||
|
@ -46,7 +46,7 @@ import {DocTutorial} from 'app/client/ui/DocTutorial';
|
|||||||
import {isTourActive} from "app/client/ui/OnBoardingPopups";
|
import {isTourActive} from "app/client/ui/OnBoardingPopups";
|
||||||
import {IPageWidget, toPageWidget} from 'app/client/ui/PageWidgetPicker';
|
import {IPageWidget, toPageWidget} from 'app/client/ui/PageWidgetPicker';
|
||||||
import {linkFromId, selectBy} from 'app/client/ui/selectBy';
|
import {linkFromId, selectBy} from 'app/client/ui/selectBy';
|
||||||
import {startWelcomeTour} from 'app/client/ui/welcomeTour';
|
import {startWelcomeTour} from 'app/client/ui/WelcomeTour';
|
||||||
import {IWidgetType} from 'app/client/ui/widgetTypes';
|
import {IWidgetType} from 'app/client/ui/widgetTypes';
|
||||||
import {PlayerState, YouTubePlayer} from 'app/client/ui/YouTubePlayer';
|
import {PlayerState, YouTubePlayer} from 'app/client/ui/YouTubePlayer';
|
||||||
import {isNarrowScreen, mediaSmall, mediaXSmall, testId, theme} from 'app/client/ui2018/cssVars';
|
import {isNarrowScreen, mediaSmall, mediaXSmall, testId, theme} from 'app/client/ui2018/cssVars';
|
||||||
|
@ -951,7 +951,7 @@
|
|||||||
"HyperLinkEditor": {
|
"HyperLinkEditor": {
|
||||||
"[link label] url": "[Linkbezeichnung] URL"
|
"[link label] url": "[Linkbezeichnung] URL"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Add New": "Neu hinzufügen",
|
"Add New": "Neu hinzufügen",
|
||||||
"Building up": "Zubauend",
|
"Building up": "Zubauend",
|
||||||
"Configuring your document": "Konfigurieren Ihres Dokuments",
|
"Configuring your document": "Konfigurieren Ihres Dokuments",
|
||||||
|
@ -897,7 +897,7 @@
|
|||||||
"Row ID": "Row ID",
|
"Row ID": "Row ID",
|
||||||
"SHOW COLUMN": "SHOW COLUMN"
|
"SHOW COLUMN": "SHOW COLUMN"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Add New": "Add New",
|
"Add New": "Add New",
|
||||||
"Browse our {{templateLibrary}} to discover what's possible and get inspired.": "Browse our {{templateLibrary}} to discover what's possible and get inspired.",
|
"Browse our {{templateLibrary}} to discover what's possible and get inspired.": "Browse our {{templateLibrary}} to discover what's possible and get inspired.",
|
||||||
"Building up": "Building up",
|
"Building up": "Building up",
|
||||||
@ -965,7 +965,8 @@
|
|||||||
"Access rules give you the power to create nuanced rules to determine who can see or edit which parts of your document.": "Access rules give you the power to create nuanced rules to determine who can see or edit which parts of your document.",
|
"Access rules give you the power to create nuanced rules to determine who can see or edit which parts of your document.": "Access rules give you the power to create nuanced rules to determine who can see or edit which parts of your document.",
|
||||||
"Add New": "Add New",
|
"Add New": "Add New",
|
||||||
"Use the 𝚺 icon to create summary (or pivot) tables, for totals or subtotals.": "Use the 𝚺 icon to create summary (or pivot) tables, for totals or subtotals.",
|
"Use the 𝚺 icon to create summary (or pivot) tables, for totals or subtotals.": "Use the 𝚺 icon to create summary (or pivot) tables, for totals or subtotals.",
|
||||||
"Anchor Links": "Anchor Links"
|
"Anchor Links": "Anchor Links",
|
||||||
|
"Custom Widgets": "Custom Widgets"
|
||||||
},
|
},
|
||||||
"DescriptionConfig": {
|
"DescriptionConfig": {
|
||||||
"DESCRIPTION": "DESCRIPTION"
|
"DESCRIPTION": "DESCRIPTION"
|
||||||
|
@ -919,7 +919,7 @@
|
|||||||
"Errors in all {{numErrors}} cells": "Errores en todas las {{numErrors}} celdas",
|
"Errors in all {{numErrors}} cells": "Errores en todas las {{numErrors}} celdas",
|
||||||
"editingFormula is required": "ediciónFórmula es necesaria"
|
"editingFormula is required": "ediciónFórmula es necesaria"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Add New": "Agregar Nuevo",
|
"Add New": "Agregar Nuevo",
|
||||||
"Configuring your document": "Configurando tu documento",
|
"Configuring your document": "Configurando tu documento",
|
||||||
"Enter": "Intro",
|
"Enter": "Intro",
|
||||||
|
@ -811,7 +811,7 @@
|
|||||||
"Save field settings for {{colId}} as common": "Sauvegarder les paramètres pour {{colId}}",
|
"Save field settings for {{colId}} as common": "Sauvegarder les paramètres pour {{colId}}",
|
||||||
"Use separate field settings for {{colId}}": "Utiliser des paramètres spécifiques pour {{colId}}"
|
"Use separate field settings for {{colId}}": "Utiliser des paramètres spécifiques pour {{colId}}"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Customizing columns": "Personnaliser les colonnes",
|
"Customizing columns": "Personnaliser les colonnes",
|
||||||
"template library": "Bibliothèque de modèles",
|
"template library": "Bibliothèque de modèles",
|
||||||
"Share": "Partager",
|
"Share": "Partager",
|
||||||
|
@ -307,7 +307,7 @@
|
|||||||
"HyperLinkEditor": {
|
"HyperLinkEditor": {
|
||||||
"[link label] url": "[testo link] URL"
|
"[link label] url": "[testo link] URL"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Editing Data": "Modificare i dati",
|
"Editing Data": "Modificare i dati",
|
||||||
"Sharing": "Condividendo",
|
"Sharing": "Condividendo",
|
||||||
"Browse our {{templateLibrary}} to discover what's possible and get inspired.": "Sfoglia la nostra {{templateLibrary}} per scoprire che cosa è possibile fare e farti ispirare.",
|
"Browse our {{templateLibrary}} to discover what's possible and get inspired.": "Sfoglia la nostra {{templateLibrary}} per scoprire che cosa è possibile fare e farti ispirare.",
|
||||||
|
@ -761,7 +761,7 @@
|
|||||||
"Row ID": "Rad-ID",
|
"Row ID": "Rad-ID",
|
||||||
"SHOW COLUMN": "Vis kolonne"
|
"SHOW COLUMN": "Vis kolonne"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Configuring your document": "Oppsett av dokumentet ditt",
|
"Configuring your document": "Oppsett av dokumentet ditt",
|
||||||
"Customizing columns": "Oppsett av kolonner",
|
"Customizing columns": "Oppsett av kolonner",
|
||||||
"Building up": "Oppbygging",
|
"Building up": "Oppbygging",
|
||||||
|
@ -892,7 +892,7 @@
|
|||||||
"Row ID": "Identyfikator wiersza",
|
"Row ID": "Identyfikator wiersza",
|
||||||
"SHOW COLUMN": "POKAŻ KOLUMNĘ"
|
"SHOW COLUMN": "POKAŻ KOLUMNĘ"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Add New": "Dodaj nowy",
|
"Add New": "Dodaj nowy",
|
||||||
"Building up": "Budowanie",
|
"Building up": "Budowanie",
|
||||||
"Flying higher": "Latanie wyżej",
|
"Flying higher": "Latanie wyżej",
|
||||||
|
@ -866,7 +866,7 @@
|
|||||||
"View As": "Ver como",
|
"View As": "Ver como",
|
||||||
"Example Users": "Usuários de exemplo"
|
"Example Users": "Usuários de exemplo"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Use {{helpCenter}} for documentation or questions.": "Use {{helpCenter}} para documentação ou perguntas.",
|
"Use {{helpCenter}} for documentation or questions.": "Use {{helpCenter}} para documentação ou perguntas.",
|
||||||
"convert to card view, select data, and more.": "converta para a visualização de cartão, selecione dados e muito mais.",
|
"convert to card view, select data, and more.": "converta para a visualização de cartão, selecione dados e muito mais.",
|
||||||
"Start with {{equal}} to enter a formula.": "Comece com {{equal}} para inserir uma fórmula.",
|
"Start with {{equal}} to enter a formula.": "Comece com {{equal}} para inserir uma fórmula.",
|
||||||
|
@ -765,7 +765,7 @@
|
|||||||
"Default currency ({{defaultCurrency}})": "Валюта по умолчанию ({{defaultCurrency}})",
|
"Default currency ({{defaultCurrency}})": "Валюта по умолчанию ({{defaultCurrency}})",
|
||||||
"Decimals": "Десятичные"
|
"Decimals": "Десятичные"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"convert to card view, select data, and more.": "преобразовать в представление карточки, выбрать данные, и более.",
|
"convert to card view, select data, and more.": "преобразовать в представление карточки, выбрать данные, и более.",
|
||||||
"creator panel": "панель создателя",
|
"creator panel": "панель создателя",
|
||||||
"template library": "библиотека шаблонов",
|
"template library": "библиотека шаблонов",
|
||||||
|
@ -889,7 +889,7 @@
|
|||||||
"Row ID": "ID рядка",
|
"Row ID": "ID рядка",
|
||||||
"SHOW COLUMN": "ПОКАЗАТИ СТОВПЕЦЬ"
|
"SHOW COLUMN": "ПОКАЗАТИ СТОВПЕЦЬ"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Add New": "Додати",
|
"Add New": "Додати",
|
||||||
"Building up": "Створюйте",
|
"Building up": "Створюйте",
|
||||||
"Configuring your document": "Налаштування вашого документа",
|
"Configuring your document": "Налаштування вашого документа",
|
||||||
|
@ -263,7 +263,7 @@
|
|||||||
"Open Snapshot": "打开快照",
|
"Open Snapshot": "打开快照",
|
||||||
"Snapshots are unavailable.": "快照不可用。"
|
"Snapshots are unavailable.": "快照不可用。"
|
||||||
},
|
},
|
||||||
"welcomeTour": {
|
"WelcomeTour": {
|
||||||
"Share": "分享",
|
"Share": "分享",
|
||||||
"Reference": "参考",
|
"Reference": "参考",
|
||||||
"Flying higher": "飞得更高",
|
"Flying higher": "飞得更高",
|
||||||
|
@ -8,7 +8,7 @@ import {WebElement} from 'mocha-webdriver';
|
|||||||
import fetch from 'node-fetch';
|
import fetch from 'node-fetch';
|
||||||
import {authenticator} from 'otplib';
|
import {authenticator} from 'otplib';
|
||||||
import * as path from 'path';
|
import * as path from 'path';
|
||||||
import {WebDriver} from 'selenium-webdriver';
|
import { Key, WebDriver } from 'selenium-webdriver';
|
||||||
|
|
||||||
import {UserProfile} from 'app/common/LoginSessionAPI';
|
import {UserProfile} from 'app/common/LoginSessionAPI';
|
||||||
import {BehavioralPrompt, UserPrefs, WelcomePopup} from 'app/common/Prefs';
|
import {BehavioralPrompt, UserPrefs, WelcomePopup} from 'app/common/Prefs';
|
||||||
@ -146,6 +146,8 @@ export class HomeUtil {
|
|||||||
* to be more nuanced.
|
* to be more nuanced.
|
||||||
*/
|
*/
|
||||||
public async removeLogin(org: string = "") {
|
public async removeLogin(org: string = "") {
|
||||||
|
// If cursor is on field editor, escape before remove login
|
||||||
|
await this.driver.sendKeys(Key.ESCAPE);
|
||||||
if (!this.server.isExternalServer()) {
|
if (!this.server.isExternalServer()) {
|
||||||
const testingHooks = await this.server.getTestingHooks();
|
const testingHooks = await this.server.getTestingHooks();
|
||||||
const sid = await this.getGristSid();
|
const sid = await this.getGristSid();
|
||||||
|
Loading…
Reference in New Issue
Block a user