diff --git a/src/containers/Tenant/EntityTitle/EntityTitle.tsx b/src/containers/Tenant/EntityTitle/EntityTitle.tsx
new file mode 100644
index 000000000..953291d40
--- /dev/null
+++ b/src/containers/Tenant/EntityTitle/EntityTitle.tsx
@@ -0,0 +1,23 @@
+import {Flex, Label} from '@gravity-ui/uikit';
+
+import type {TPathDescription} from '../../../types/api/schema';
+import i18n from '../i18n';
+import {getEntityName, isReadOnlyTable} from '../utils';
+
+interface EntityTitleProps {
+ data?: TPathDescription;
+}
+
+export function EntityTitle({data}: EntityTitleProps) {
+ const entityName = getEntityName(data);
+
+ if (isReadOnlyTable(data)) {
+ return (
+
+ {entityName}
+
+ );
+ }
+
+ return entityName;
+}
diff --git a/src/containers/Tenant/ObjectSummary/ObjectSummary.tsx b/src/containers/Tenant/ObjectSummary/ObjectSummary.tsx
index ca7c84d57..c558bd5b8 100644
--- a/src/containers/Tenant/ObjectSummary/ObjectSummary.tsx
+++ b/src/containers/Tenant/ObjectSummary/ObjectSummary.tsx
@@ -15,7 +15,6 @@ import type {InfoViewerItem} from '../../../components/InfoViewer/InfoViewer';
import {LinkWithIcon} from '../../../components/LinkWithIcon/LinkWithIcon';
import {Loader} from '../../../components/Loader';
import SplitPane from '../../../components/SplitPane';
-import {getEntityName} from '../../../containers/Tenant/utils';
import routes, {createExternalUILink, createHref} from '../../../routes';
import {schemaApi, setShowPreview} from '../../../store/reducers/schema/schema';
import {
@@ -33,6 +32,7 @@ import {
import {formatDateTime, formatSecondsToHours} from '../../../utils/dataFormatters/dataFormatters';
import {useTypedDispatch, useTypedSelector} from '../../../utils/hooks';
import {Acl} from '../Acl/Acl';
+import {EntityTitle} from '../EntityTitle/EntityTitle';
import {SchemaTree} from '../Schema/SchemaTree/SchemaTree';
import {SchemaViewer} from '../Schema/SchemaViewer/SchemaViewer';
import {TENANT_INFO_TABS, TENANT_SCHEMA_TAB, TenantTabsGroups} from '../TenantPages';
@@ -159,7 +159,8 @@ export function ObjectSummary({
});
const {PathDescription} = currentObjectData;
- const title = getEntityName(PathDescription);
+
+ const title = ;
const getPathTypeOverview: Record InfoViewerItem[]) | undefined> = {
[EPathType.EPathTypeInvalid]: undefined,
diff --git a/src/containers/Tenant/TenantNavigation/TenantNavigation.tsx b/src/containers/Tenant/TenantNavigation/TenantNavigation.tsx
index a346fba13..61fbc2626 100644
--- a/src/containers/Tenant/TenantNavigation/TenantNavigation.tsx
+++ b/src/containers/Tenant/TenantNavigation/TenantNavigation.tsx
@@ -40,7 +40,7 @@ export const TenantNavigation = () => {
onUpdate={handleUpdate}
size="l"
className={b('body')}
- defaultValue={getCurrentItem().id}
+ value={getCurrentItem().id}
options={navigationItems.map(transformItemToOption)}
/>
diff --git a/src/containers/Tenant/i18n/en.json b/src/containers/Tenant/i18n/en.json
index defb9ee44..8b358bb9a 100644
--- a/src/containers/Tenant/i18n/en.json
+++ b/src/containers/Tenant/i18n/en.json
@@ -21,6 +21,7 @@
"summary.mode": "Mode",
"summary.format": "Format",
"summary.retention": "Retention",
+ "label.read-only": "ReadOnly",
"actions.copied": "The path is copied to the clipboard",
"actions.notCopied": "Couldn’t copy the path",
"actions.copyPath": "Copy path",
@@ -29,6 +30,7 @@
"actions.createExternalTable": "Create external table...",
"actions.createTopic": "Create topic...",
"actions.createColumnTable": "Create column table...",
+ "actions.createAsyncReplication": "Create async replication...",
"actions.createView": "Create view...",
"actions.dropTable": "Drop table...",
"actions.dropTopic": "Drop topic...",
@@ -36,5 +38,7 @@
"actions.alterTable": "Alter table...",
"actions.alterTopic": "Alter topic...",
"actions.selectQuery": "Select query...",
- "actions.upsertQuery": "Upsert query..."
+ "actions.upsertQuery": "Upsert query...",
+ "actions.alterReplication": "Alter async replicaton...",
+ "actions.dropReplication": "Drop async replicaton..."
}
diff --git a/src/containers/Tenant/utils/index.ts b/src/containers/Tenant/utils/index.ts
index f85b2ccca..d0861b5a8 100644
--- a/src/containers/Tenant/utils/index.ts
+++ b/src/containers/Tenant/utils/index.ts
@@ -7,3 +7,9 @@ export const getEntityName = (pathDescription?: TPathDescription) => {
return mapPathTypeToEntityName(PathType, PathSubType);
};
+
+export const isReadOnlyTable = (pathDescription?: TPathDescription) => {
+ return pathDescription?.UserAttributes?.some(({Key, Value}) => {
+ return Key === '__async_replica' && Value === 'true';
+ });
+};
diff --git a/src/containers/Tenant/utils/queryTemplates.ts b/src/containers/Tenant/utils/queryTemplates.ts
index a6958cbe4..7b367bc38 100644
--- a/src/containers/Tenant/utils/queryTemplates.ts
+++ b/src/containers/Tenant/utils/queryTemplates.ts
@@ -42,6 +42,20 @@ CREATE TABLE \`${path}/ydb_column_table\` (
PARTITION BY HASH(id)
WITH (STORE = COLUMN)`;
};
+export const createAsyncReplicationTemplate = () => {
+ return `CREATE OBJECT secret_name (TYPE SECRET) WITH value="secret_value";
+
+CREATE ASYNC REPLICATION my_replication
+FOR \`/remote_database/table_name\` AS \`local_table_name\` --[, \`/remote_database/another_table_name\` AS \`another_local_table_name\` ...]
+WITH (
+ CONNECTION_STRING="grpcs://mydb.ydb.tech:2135/?database=/remote_database",
+ TOKEN_SECRET_NAME = "secret_name"
+ -- ENDPOINT="mydb.ydb.tech:2135",
+ -- DATABASE=\`/remote_database\`,
+ -- USER="user",
+ -- PASSWORD_SECRET_NAME="your_password"
+);`;
+};
export const alterTableTemplate = (path: string) => {
return `ALTER TABLE \`${path}\`
ADD COLUMN is_deleted Bool;`;
@@ -131,3 +145,10 @@ export const createViewTemplate = (path: string) => {
export const dropViewTemplate = (path: string) => {
return `DROP VIEW \`${path}\`;`;
};
+export const dropAsyncReplicationTemplate = (path: string) => {
+ return `DROP ASYNC REPLICATION \`${path}\`;`;
+};
+
+export const alterAsyncReplicationTemplate = (path: string) => {
+ return `ALTER ASYNC REPLICATION \`${path}\` SET (STATE = "DONE", FAILOVER_MODE = "FORCE");`;
+};
diff --git a/src/containers/Tenant/utils/schemaActions.ts b/src/containers/Tenant/utils/schemaActions.ts
index 95aee7d3c..f3b34ecf1 100644
--- a/src/containers/Tenant/utils/schemaActions.ts
+++ b/src/containers/Tenant/utils/schemaActions.ts
@@ -9,13 +9,16 @@ import createToast from '../../../utils/createToast';
import i18n from '../i18n';
import {
+ alterAsyncReplicationTemplate,
alterTableTemplate,
alterTopicTemplate,
+ createAsyncReplicationTemplate,
createColumnTableTemplate,
createExternalTableTemplate,
createTableTemplate,
createTopicTemplate,
createViewTemplate,
+ dropAsyncReplicationTemplate,
dropExternalTableTemplate,
dropTopicTemplate,
dropViewTemplate,
@@ -49,6 +52,9 @@ const bindActions = (
return {
createTable: inputQuery(createTableTemplate, 'script'),
createColumnTable: inputQuery(createColumnTableTemplate, 'script'),
+ createAsyncReplication: inputQuery(createAsyncReplicationTemplate, 'script'),
+ alterAsyncReplication: inputQuery(alterAsyncReplicationTemplate, 'script'),
+ dropAsyncReplication: inputQuery(dropAsyncReplicationTemplate, 'script'),
alterTable: inputQuery(alterTableTemplate, 'script'),
selectQuery: inputQuery(selectQueryTemplate),
upsertQuery: inputQuery(upsertQueryTemplate),
@@ -92,6 +98,10 @@ export const getActions =
[
{text: i18n('actions.createTable'), action: actions.createTable},
{text: i18n('actions.createColumnTable'), action: actions.createColumnTable},
+ {
+ text: i18n('actions.createAsyncReplication'),
+ action: actions.createAsyncReplication,
+ },
{text: i18n('actions.createTopic'), action: actions.createTopic},
{text: i18n('actions.createView'), action: actions.createView},
],
@@ -135,12 +145,20 @@ export const getActions =
[{text: i18n('actions.dropView'), action: actions.dropView}],
];
+ const ASYNC_REPLICATION_SET: ActionsSet = [
+ [copyItem],
+ [
+ {text: i18n('actions.alterReplication'), action: actions.alterAsyncReplication},
+ {text: i18n('actions.dropReplication'), action: actions.dropAsyncReplication},
+ ],
+ ];
+
const JUST_COPY: ActionsSet = [copyItem];
// verbose mapping to guarantee a correct actions set for new node types
// TS will error when a new type is added in the lib but is not mapped here
const nodeTypeToActions: Record
= {
- async_replication: JUST_COPY,
+ async_replication: ASYNC_REPLICATION_SET,
database: DIR_SET,
directory: DIR_SET,
diff --git a/src/containers/UserSettings/Setting.tsx b/src/containers/UserSettings/Setting.tsx
index c251eb555..14c3bb07d 100644
--- a/src/containers/UserSettings/Setting.tsx
+++ b/src/containers/UserSettings/Setting.tsx
@@ -1,10 +1,13 @@
-import {Settings} from '@gravity-ui/navigation';
import {RadioButton, Switch} from '@gravity-ui/uikit';
-import {LabelWithPopover} from '../../components/LabelWithPopover/LabelWithPopover';
import {useSetting} from '../../utils/hooks';
-import {b} from './UserSettings';
+export interface SettingsInfoFieldProps {
+ type: 'info';
+ title: string;
+ description?: React.ReactNode;
+ content: React.ReactNode;
+}
export type SettingsElementType = 'switch' | 'radio';
@@ -13,7 +16,6 @@ export interface SettingProps {
title: string;
description?: React.ReactNode;
settingKey: string;
- helpPopoverContent?: React.ReactNode;
options?: {value: string; content: string}[];
defaultValue?: unknown;
onValueUpdate?: VoidFunction;
@@ -22,9 +24,6 @@ export interface SettingProps {
export const Setting = ({
type = 'switch',
settingKey,
- title,
- description,
- helpPopoverContent,
options,
defaultValue,
onValueUpdate,
@@ -36,73 +35,30 @@ export const Setting = ({
onValueUpdate?.();
};
- const renderTitleComponent = (value: React.ReactNode) => {
- if (helpPopoverContent) {
- return (
-
- );
+ switch (type) {
+ case 'switch': {
+ return ;
}
- return value;
- };
-
- const getSettingsElement = (elementType: SettingsElementType) => {
- switch (elementType) {
- case 'switch': {
- return ;
- }
-
- case 'radio': {
- if (!options) {
- return null;
- }
-
- return (
-
- {options.map(({value, content}) => {
- return (
-
- {content}
-
- );
- })}
-
- );
+ case 'radio': {
+ if (!options) {
+ return null;
}
- default:
- return null;
+ return (
+
+ {options.map(({value, content}) => {
+ return (
+
+ {content}
+
+ );
+ })}
+
+ );
}
- };
-
- return (
-
- {getSettingsElement(type)}
-
- );
-};
-
-export interface SettingsInfoFieldProps {
- type: 'info';
- title: string;
- description?: React.ReactNode;
- content: React.ReactNode;
-}
-export const SettingsInfoField = ({title, description, content}: SettingsInfoFieldProps) => {
- return (
-
- {content}
-
- );
+ default:
+ return null;
+ }
};
diff --git a/src/containers/UserSettings/UserSettings.scss b/src/containers/UserSettings/UserSettings.scss
deleted file mode 100644
index 62068a567..000000000
--- a/src/containers/UserSettings/UserSettings.scss
+++ /dev/null
@@ -1,9 +0,0 @@
-.ydb-user-settings {
- &__item-with-popup {
- max-width: 180px;
- }
-
- &__popup {
- max-width: 370px;
- }
-}
diff --git a/src/containers/UserSettings/UserSettings.tsx b/src/containers/UserSettings/UserSettings.tsx
index b0057d706..2500d0de3 100644
--- a/src/containers/UserSettings/UserSettings.tsx
+++ b/src/containers/UserSettings/UserSettings.tsx
@@ -1,15 +1,9 @@
import {Settings} from '@gravity-ui/navigation';
-import {cn} from '../../utils/cn';
-
-import {Setting, SettingsInfoField} from './Setting';
+import {Setting} from './Setting';
import type {YDBEmbeddedUISettings} from './settings';
import {settings} from './settings';
-import './UserSettings.scss';
-
-export const b = cn('ydb-user-settings');
-
interface UserSettingsProps {
settings?: YDBEmbeddedUISettings;
}
@@ -30,13 +24,16 @@ export const UserSettings = ({settings: userSettings = settings}: UserSettingsPr
{sectionSettings.map((setting) => {
if (setting.type === 'info') {
return (
-
+
+ {setting.content}
+
);
}
- return ;
+ return (
+
+
+
+ );
})}
);
diff --git a/src/containers/UserSettings/i18n/en.json b/src/containers/UserSettings/i18n/en.json
index 03f80807e..0de5561ca 100644
--- a/src/containers/UserSettings/i18n/en.json
+++ b/src/containers/UserSettings/i18n/en.json
@@ -32,13 +32,13 @@
"settings.invertedDisks.title": "Inverted disks space indicators",
"settings.useNodesEndpoint.title": "Break the Nodes tab in Diagnostics",
- "settings.useNodesEndpoint.popover": "Use /viewer/json/nodes endpoint for Nodes Tab in diagnostics. It could return incorrect data on some versions",
+ "settings.useNodesEndpoint.popover": "Use /viewer/json/nodes endpoint for Nodes tab in diagnostics. It could return incorrect data on versions before 24-1",
"settings.useVirtualTables.title": "Use table with data load on scroll for Nodes and Storage tabs",
"settings.useVirtualTables.popover": "It will increase performance, but could work unstable",
"settings.queryUseMultiSchema.title": "Allow queries with multiple result sets",
- "settings.queryUseMultiSchema.popover": "Use 'multi' schema for queries that enables queries with multiple result sets. Returns nothing on versions 23-3 and older",
+ "settings.queryUseMultiSchema.popover": "Use 'multi' schema for queries. It enables queries with multiple result sets. It returns nothing on versions 23-3 and older",
"settings.about.interfaceVersionInfoField.title": "Interface version"
}
diff --git a/src/containers/UserSettings/settings.tsx b/src/containers/UserSettings/settings.tsx
index 62b0414ed..9a47202c4 100644
--- a/src/containers/UserSettings/settings.tsx
+++ b/src/containers/UserSettings/settings.tsx
@@ -96,17 +96,17 @@ export const invertedDisksSetting: SettingProps = {
export const useNodesEndpointSetting: SettingProps = {
settingKey: USE_NODES_ENDPOINT_IN_DIAGNOSTICS_KEY,
title: i18n('settings.useNodesEndpoint.title'),
- helpPopoverContent: i18n('settings.useNodesEndpoint.popover'),
+ description: i18n('settings.useNodesEndpoint.popover'),
};
export const useVirtualTables: SettingProps = {
settingKey: USE_BACKEND_PARAMS_FOR_TABLES_KEY,
title: i18n('settings.useVirtualTables.title'),
- helpPopoverContent: i18n('settings.useVirtualTables.popover'),
+ description: i18n('settings.useVirtualTables.popover'),
};
export const queryUseMultiSchemaSetting: SettingProps = {
settingKey: QUERY_USE_MULTI_SCHEMA_KEY,
title: i18n('settings.queryUseMultiSchema.title'),
- helpPopoverContent: i18n('settings.queryUseMultiSchema.popover'),
+ description: i18n('settings.queryUseMultiSchema.popover'),
};
export const enableAutocompleteSetting: SettingProps = {
diff --git a/src/containers/Versions/NodesTable/NodesTable.tsx b/src/containers/Versions/NodesTable/NodesTable.tsx
index bcb892824..d2e0ef04c 100644
--- a/src/containers/Versions/NodesTable/NodesTable.tsx
+++ b/src/containers/Versions/NodesTable/NodesTable.tsx
@@ -51,12 +51,12 @@ const columns: Column[] = [
align: DataTable.LEFT,
},
{
- name: 'uptime',
+ name: 'Uptime',
header: 'Uptime',
sortAccessor: ({StartTime}) => StartTime && -StartTime,
width: 120,
align: DataTable.LEFT,
- render: ({row}) => row.uptime,
+ render: ({row}) => row.Uptime,
},
{
name: 'MemoryUsed',
@@ -90,15 +90,14 @@ const columns: Column[] = [
{
name: 'LoadAverage',
header: 'Load average',
- sortAccessor: ({LoadAverage = []}) =>
- LoadAverage.slice(0, 1).reduce((acc, item) => acc + item, 0),
+ sortAccessor: ({LoadAveragePercents = []}) => LoadAveragePercents[0],
defaultOrder: DataTable.DESCENDING,
width: 140,
resizeMinWidth: 140,
render: ({row}) =>
- row.LoadAverage && row.LoadAverage.length > 0 ? (
+ row.LoadAveragePercents && row.LoadAveragePercents.length > 0 ? (
({
@@ -13,12 +11,7 @@ export const clusterNodesApi = api.injectEndpoints({
try {
const result = await window.api.getClusterNodes();
const {SystemStateInfo: nodes = []} = result;
- const data: PreparedClusterNode[] = nodes.map((node) => {
- return {
- ...node,
- uptime: calcUptime(node.StartTime),
- };
- });
+ const data: PreparedClusterNode[] = nodes.map(prepareNodeSystemState);
return {data};
} catch (error) {
return {error};
diff --git a/src/store/reducers/nodes/types.ts b/src/store/reducers/nodes/types.ts
index 8800ce8d7..05e3e7a68 100644
--- a/src/store/reducers/nodes/types.ts
+++ b/src/store/reducers/nodes/types.ts
@@ -34,6 +34,7 @@ export interface NodesPreparedEntity {
PoolStats?: TPoolStats[];
LoadAverage?: number[];
+ LoadAveragePercents?: number[];
Tablets?: TFullTabletStateInfo[] | TComputeTabletStateInfo[];
Endpoints?: TEndpoint[];
diff --git a/src/store/reducers/nodes/utils.ts b/src/store/reducers/nodes/utils.ts
index 0190b4edc..caec30288 100644
--- a/src/store/reducers/nodes/utils.ts
+++ b/src/store/reducers/nodes/utils.ts
@@ -2,17 +2,18 @@ import type {TComputeInfo, TComputeNodeInfo, TComputeTenantInfo} from '../../../
import type {TNodesInfo} from '../../../types/api/nodes';
import {calcUptime} from '../../../utils/dataFormatters/dataFormatters';
import {generateEvaluator} from '../../../utils/generateEvaluator';
-import {prepareNodeSystemState} from '../../../utils/nodes';
+import {calculateLoadAveragePercents, prepareNodeSystemState} from '../../../utils/nodes';
import type {NodesHandledResponse, NodesPreparedEntity} from './types';
-const prepareComputeNode = (node: TComputeNodeInfo, tenantName?: string) => {
+const prepareComputeNode = (node: TComputeNodeInfo, tenantName?: string): NodesPreparedEntity => {
return {
...node,
// v2 response has tenant name, v1 - doesn't
TenantName: node.Tenant ?? tenantName,
SystemState: node?.Overall,
Uptime: calcUptime(node?.StartTime),
+ LoadAveragePercents: calculateLoadAveragePercents(node),
DC: node.DataCenter,
};
diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss
index 571b99130..af80fbe18 100644
--- a/src/styles/mixins.scss
+++ b/src/styles/mixins.scss
@@ -35,6 +35,11 @@
line-height: var(--g-text-subheader-3-line-height);
}
+@mixin subheader-2-typography() {
+ font-size: var(--g-text-subheader-2-font-size);
+ line-height: var(--g-text-subheader-2-line-height);
+}
+
@mixin header-1-typography() {
font-size: var(--g-text-header-1-font-size);
line-height: var(--g-text-header-1-line-height);
diff --git a/src/styles/themes.scss b/src/styles/themes.scss
index df980850d..1d543486f 100644
--- a/src/styles/themes.scss
+++ b/src/styles/themes.scss
@@ -7,7 +7,7 @@
.g-root {
--g-text-header-font-weight: 500;
- --g-text-subheader-font-weight: 500;
+ --g-text-subheader-font-weight: 600;
--g-text-display-font-weight: 500;
--g-text-accent-font-weight: 500;
diff --git a/src/types/api/acl.ts b/src/types/api/acl.ts
index ae0bae32e..411c4e651 100644
--- a/src/types/api/acl.ts
+++ b/src/types/api/acl.ts
@@ -19,7 +19,8 @@ export interface TMetaCommonInfo {
export interface TACE {
AccessType: string;
AccessRights?: string[];
+ AccessRules?: string[];
Subject: string;
InheritanceType?: string[];
- AccessRule: string;
+ AccessRule?: string;
}
diff --git a/src/types/api/schema/schema.ts b/src/types/api/schema/schema.ts
index 2bc0c781d..f4929b271 100644
--- a/src/types/api/schema/schema.ts
+++ b/src/types/api/schema/schema.ts
@@ -61,6 +61,7 @@ export interface TPathDescription {
/** info about the path itself */
Self?: TDirEntry;
DomainDescription?: TDomainDescription;
+ UserAttributes?: TUserAttribute[];
// for directory
Children?: TDirEntry[];
@@ -309,3 +310,8 @@ interface TTablePartition {
/** uint64 */
DatashardId?: string;
}
+
+interface TUserAttribute {
+ Key?: string;
+ Value?: string;
+}
diff --git a/src/utils/nodes.ts b/src/utils/nodes.ts
index 93106d444..60c7f84bf 100644
--- a/src/utils/nodes.ts
+++ b/src/utils/nodes.ts
@@ -3,6 +3,7 @@ import {z} from 'zod';
import type {NodesPreparedEntity} from '../store/reducers/nodes/types';
import {ProblemFilterValues} from '../store/reducers/settings/settings';
import type {ProblemFilterValue} from '../store/reducers/settings/types';
+import type {TComputeNodeInfo} from '../types/api/compute';
import {EFlag} from '../types/api/enums';
import type {TSystemStateInfo} from '../types/api/nodes';
import type {TNodeInfo} from '../types/api/nodesList';
@@ -12,6 +13,8 @@ import type {NodesMap} from '../types/store/nodesList';
import {HOUR_IN_SECONDS} from './constants';
import {calcUptime} from './dataFormatters/dataFormatters';
+import {valueIsDefined} from '.';
+
export enum NodesUptimeFilterValues {
'All' = 'All',
'SmallUptime' = 'SmallUptime',
@@ -38,9 +41,22 @@ export const prepareNodesMap = (nodesList?: TNodeInfo[]) => {
}, new Map());
};
+export function calculateLoadAveragePercents(node: TSystemStateInfo | TComputeNodeInfo = {}) {
+ const {LoadAverage, NumberOfCpus} = node;
+
+ if (!valueIsDefined(LoadAverage) || !valueIsDefined(NumberOfCpus)) {
+ return undefined;
+ }
+
+ return LoadAverage.map((value) => {
+ return (value * 100) / NumberOfCpus;
+ });
+}
+
export interface PreparedNodeSystemState extends TSystemStateInfo {
Rack?: string;
DC?: string;
+ LoadAveragePercents?: number[];
Uptime: string;
}
@@ -53,11 +69,14 @@ export const prepareNodeSystemState = (
const Uptime = calcUptime(systemState.StartTime);
+ const LoadAveragePercents = calculateLoadAveragePercents(systemState);
+
return {
...systemState,
Rack,
DC,
Uptime,
+ LoadAveragePercents,
};
};
diff --git a/tsconfig.json b/tsconfig.json
index 58aec1883..f8d811f10 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -2,7 +2,9 @@
"extends": "@gravity-ui/tsconfig/tsconfig",
"compilerOptions": {
"outDir": "build/esm",
- "module": "esnext",
+ "target": "ES2018",
+ "module": "ESNext",
+ "moduleResolution": "Bundler",
"jsx": "react-jsx",
"lib": ["dom", "dom.iterable", "esnext"],
"allowSyntheticDefaultImports": true,
diff --git a/tsconfig.package.json b/tsconfig.package.json
index 8185af8cf..1858681a4 100644
--- a/tsconfig.package.json
+++ b/tsconfig.package.json
@@ -2,10 +2,11 @@
"extends": "./tsconfig",
"compilerOptions": {
"outDir": "dist",
+ "rootDir": "src",
"declaration": true,
"noEmit": false,
"importHelpers": true
},
- "include": ["src/**/*", "package.json"],
+ "include": ["src/**/*"],
"exclude": ["src/setup*", "src/index.tsx", "**/__tests__", "**/tests"]
}