Skip to content

Commit

Permalink
Merge branch 'main' into group-controls-editor-config
Browse files Browse the repository at this point in the history
  • Loading branch information
goshander authored Jan 24, 2024
2 parents de351d4 + 6cf3e92 commit b772670
Show file tree
Hide file tree
Showing 70 changed files with 1,211 additions and 847 deletions.
14 changes: 0 additions & 14 deletions .lintstagedrc

This file was deleted.

3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@
"*.{css,scss}": [
"stylelint --fix --quiet",
"prettier --write"
],
"src/i18n-keysets/**/!({keyset,context}).json": [
"npm run lint:i18n"
]
}
16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@doc-tools/transform": "^2.18.3",
"@gravity-ui/app-layout": "^1.2.0",
"@gravity-ui/browserslist-config": "^4.3.0",
"@gravity-ui/chartkit": "^4.15.0",
"@gravity-ui/chartkit": "^4.17.0",
"@gravity-ui/dashkit": "^6.7.2",
"@gravity-ui/date-utils": "^1.3.1",
"@gravity-ui/expresskit": "^1.1.2",
Expand Down
28 changes: 28 additions & 0 deletions scripts/i18n-keysets-sort.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/**
* Weblate create PR with changed and approved keysets with sorted keys
* That's why we need to decrease diff
*/

const {spawnSync} = require('child_process');
const {readFileSync, writeFileSync} = require('fs');

const keysetFiles = process.argv.slice(2);
keysetFiles.forEach((filePath) => {
const fileContent = readFileSync(filePath).toString();
try {
const keysets = JSON.parse(fileContent);
const res = {};
Object.keys(keysets)
.sort()
.forEach((key) => {
res[key] = keysets[key];
});
writeFileSync(filePath, JSON.stringify(res, null, 2));

spawnSync('git', ['add', filePath]);
process.exitCode = 0;
} catch (e) {
console.error(e);
process.exitCode = 1;
}
});
4 changes: 2 additions & 2 deletions src/i18n-keysets/collections/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@
"action_create-workbook": "Создать воркбук",
"action_delete": "Удалить",
"action_edit": "Редактировать",
"action_move": "Переместить",
"action_reset-all": "Снять все",
"action_select": "Выбрать",
"action_select-all": "Выбрать все",
"action_reset-all": "Снять все",
"action_move": "Переместить",
"label_add-demo-workbook": "Добавить пример воркбука",
"label_add-learning-materials-workbook": "Добавить учебные материалы",
"label_delete-collection": "Удаление коллекции",
Expand Down
23 changes: 23 additions & 0 deletions src/i18n-keysets/connections.yadocs.view/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"button_add": "Add",
"button_apply": "Add",
"button_auth": "Authentication",
"button_cancel": "Cancel",
"button_update": "Update data",
"label_403-not-authotized-description": "Log in to your Yandex account or change the file access type and try adding it again",
"label_access-type": "Access type",
"label_add-document": "Add document",
"label_add-input-help": "It is forbidden to add links to or download files restricted by password. Use private files that are available after authentication.",
"label_add-input-private": "Path to file",
"label_add-input-private-note": "Example: /path/to/document",
"label_add-input-public": "Link to file",
"label_add-input-public-note": "Example: https://disk.yandex.ru/i/id",
"label_auto-update": "Update automatically",
"label_auto-update-help": "Data in the tables will be updated no more than once every 30 minutes",
"label_form-tile": "Yandex Documents",
"label_logout-dialog-description": "Sheets from files with restricted access will no longer be displayed",
"label_logout-dialog-title": "Are you sure you want to revoke your token?",
"label_radio-value-private": "Private",
"label_radio-value-public": "Public",
"label_workspace-placeholder": "To create a connection, add links to files in Yandex Documents. Supported formats: {{formats}}."
}
23 changes: 23 additions & 0 deletions src/i18n-keysets/connections.yadocs.view/ru.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"button_add": "Добавить",
"button_apply": "Добавить",
"button_auth": "Аутентификация",
"button_cancel": "Отмена",
"button_update": "Обновить данные",
"label_403-not-authotized-description": "Войдите в свой аккаунт на Яндексе или измените тип доступа к файлу и попробуйте добавить его снова",
"label_access-type": "Доступ к файлу",
"label_add-document": "Добавить документ",
"label_add-input-help": "Добавлять ссылки на файлы, доступ к которым ограничен с помощью пароля, а также скачивать такие файлы запрещено. Используйте приватные файлы, доступные после аутентификации.",
"label_add-input-private": "Путь до файла",
"label_add-input-private-note": "Пример: /path/to/document",
"label_add-input-public": "Ссылка на файл",
"label_add-input-public-note": "Пример: https://disk.yandex.ru/i/id",
"label_auto-update": "Обновлять автоматически",
"label_auto-update-help": "Данные в таблицах будут обновляться не чаще, чем один раз за 30 минут.",
"label_form-tile": "Яндекс Документы",
"label_logout-dialog-description": "Содержимое файлов с приватным доступом перестанет отображаться",
"label_logout-dialog-title": "Вы действительно хотите отозвать свой токен?",
"label_radio-value-private": "Приватный",
"label_radio-value-public": "Публичный",
"label_workspace-placeholder": "Чтобы создать подключение, добавьте ссылки на файлы в Яндекс Документах. Поддерживаемые форматы: {{formats}}."
}
7 changes: 4 additions & 3 deletions src/i18n-keysets/sql/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
"label_duplicate": "Duplicate",
"label_empty-chart": "The visualization will appear here as soon as you write the SQL query and press Run in the bottom-left corner",
"label_empty-chart_il": "The visualization will appear here as soon as you select a connection, write an SQL query, and click Run in the bottom-left corner.",
"label_failed-connection-text": "Failed to load connection",
"label_new-chart-type-text": "Select chart type to start:",
"label_new-connection-text": "Select connection to start:",
"label_new-connection-text": "To start, select a connection",
"label_params": "Params",
"label_placeholder-default-value": "Default value",
"label_placeholder-name": "Name",
"label_ql-auto-execution-chart": "Automatically apply changes",
"label_query": "Query",
"label_run": "Run",
"label_select-connection": "Select",
Expand All @@ -52,6 +54,5 @@
"label_visualization-pie": "Pie chart",
"label_visualization-scatter": "Scatter chart",
"label_visualization-treemap": "Tree chart",
"text_default-name": "New QL-сhart",
"label_ql-auto-execution-chart": "Automatically apply changes"
"text_default-name": "New QL-сhart"
}
4 changes: 4 additions & 0 deletions src/i18n-keysets/sql/keyset.json
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,10 @@
"en": "APPROVED",
"ru": "APPROVED"
},
"label_failed-connection-text": {
"en": "APPROVED",
"ru": "APPROVED"
},
"label_params": {
"en": "APPROVED",
"ru": "APPROVED"
Expand Down
7 changes: 4 additions & 3 deletions src/i18n-keysets/sql/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@
"label_duplicate": "Дублировать",
"label_empty-chart": "Визуализация появится, как только вы напишете SQL-запрос и нажмете кнопку «Запустить» в левом нижнем углу",
"label_empty-chart_il": "Чтобы построить визуализацию, выберите подключение, напишите SQL-запрос и нажмите кнопку «Запустить» в левом нижнем углу.",
"label_failed-connection-text": "Не удалось загрузить подключение",
"label_new-chart-type-text": "Выберите тип чарта, чтобы начать:",
"label_new-connection-text": "Выберите подключение, чтобы начать:",
"label_new-connection-text": "Выберите подключение, чтобы начать",
"label_params": "Параметры",
"label_placeholder-default-value": "Значение по умолчанию",
"label_placeholder-name": "Имя",
"label_ql-auto-execution-chart": "Автоматически применять изменения",
"label_query": "Запрос",
"label_run": "Запустить",
"label_select-connection": "Выбрать",
Expand All @@ -52,6 +54,5 @@
"label_visualization-pie": "Круговая диаграмма",
"label_visualization-scatter": "Точечная диаграмма",
"label_visualization-treemap": "Древовидная диаграмма",
"text_default-name": "Новый QL-чарт",
"label_ql-auto-execution-chart": "Автоматически применять изменения"
"text_default-name": "Новый QL-чарт"
}
1 change: 0 additions & 1 deletion src/i18n-keysets/temp2/context.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/i18n-keysets/temp2/en.json

This file was deleted.

20 changes: 0 additions & 20 deletions src/i18n-keysets/temp2/keyset.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/i18n-keysets/temp2/ru.json

This file was deleted.

1 change: 0 additions & 1 deletion src/i18n-keysets/temp3/context.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/i18n-keysets/temp3/en.json

This file was deleted.

20 changes: 0 additions & 20 deletions src/i18n-keysets/temp3/keyset.json

This file was deleted.

4 changes: 0 additions & 4 deletions src/i18n-keysets/temp3/ru.json

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export function prepareD3Line(args: PrepareFunctionArgs): ChartKitWidgetData {
width: 36,
},
},
dashStyle: graph.dashStyle,
};
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,10 @@ export function prepareLineData(args: PrepareFunctionArgs) {
});
}

if (visualizationId === WizardVisualizationId.Line) {
if (
visualizationId === WizardVisualizationId.Line ||
visualizationId === WizardVisualizationId.LineD3
) {
mapAndShapeGraph({
graphs,
shapesConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {SymbolType} from '@gravity-ui/chartkit/build/constants';
import type {
ChartKitWidgetData,
ScatterSeries,
Expand All @@ -20,7 +21,7 @@ type MapScatterSeriesArgs = {
function mapScatterSeries(args: MapScatterSeriesArgs): ScatterSeries<PointCustomData> {
const {x, y, graph} = args;

return {
const series: ScatterSeries<PointCustomData> = {
type: 'scatter',
name: graph.name || '',
color: typeof graph.color === 'string' ? graph.color : undefined,
Expand Down Expand Up @@ -66,6 +67,12 @@ function mapScatterSeries(args: MapScatterSeriesArgs): ScatterSeries<PointCustom
return pointData;
}) || [],
};

if (graph.marker?.symbol) {
series.symbolType = graph.marker?.symbol as SymbolType;
}

return series;
}

export function prepareD3Scatter(
Expand Down
8 changes: 0 additions & 8 deletions src/shared/constants/qa/components.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ export enum MenuItemsQA {
}

export enum ParamsSettingsQA {
AddOld = 'params-settings-add-old-btn',
ApplyOld = 'params-settings-apply-old-btn',
CancelOld = 'params-settings-cancel-old-btn',
ParamOld = 'params-settings-param-old',
ParamContentOld = 'params-settings-param-content-old',
ParamEditOld = 'params-settings-param-edit-old',
ParamRemoveOld = 'params-settings-param-remove-old',

Settings = 'params-settings',
Open = 'params-settings-open-btn',
Add = 'params-settings-add-btn',
Expand Down
1 change: 0 additions & 1 deletion src/shared/types/feature.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export enum Feature {
InnerDocumentation = 'InnerDocumentation',
Comments = 'Comments',
ShowFilteringChartSetting = 'ShowFilteringChartSetting',
DashBoardGlobalParams = 'dashBoardGlobalParams',
EmptySelector = 'emptySelector',
ChartEditorDeveloperModeCheck = 'ChartEditorDeveloperModeCheck',
StartInDataLens = 'StartInDataLens',
Expand Down
Loading

0 comments on commit b772670

Please sign in to comment.