ydb-ui-components 4.7.0 → 5.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/components/NavigationTree/EmptyView/EmptyView.js +4 -2
- package/build/cjs/components/NavigationTree/ErrorView/ErrorView.js +4 -2
- package/build/cjs/components/NavigationTree/NavigationTree.js +5 -3
- package/build/cjs/components/NavigationTree/NavigationTreeNode.js +5 -2
- package/build/cjs/components/NavigationTree/i18n/index.d.ts +5 -1
- package/build/cjs/components/NavigationTree/i18n/index.js +5 -3
- package/build/cjs/components/NavigationTree/index.js +15 -2
- package/build/cjs/components/NavigationTree/types.d.ts +1 -1
- package/build/cjs/components/TreeView/TreeView.css +3 -2
- package/build/cjs/components/TreeView/TreeView.js +4 -2
- package/build/cjs/components/TreeView/index.js +15 -2
- package/build/cjs/components/icons/Transfer.js +2 -1
- package/build/cjs/index.js +16 -3
- package/build/esm/components/NavigationTree/NavigationTreeNode.js +1 -0
- package/build/esm/components/NavigationTree/i18n/index.d.ts +5 -1
- package/build/esm/components/NavigationTree/types.d.ts +1 -1
- package/build/esm/components/TreeView/TreeView.css +3 -2
- package/build/esm/components/icons/Transfer.js +2 -1
- package/package.json +5 -4
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.EmptyView = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
8
|
const cn_1 = require("../../../utils/cn");
|
|
7
9
|
const TreeView_1 = require("../../TreeView/TreeView");
|
|
8
|
-
const i18n_1 =
|
|
10
|
+
const i18n_1 = __importDefault(require("../i18n"));
|
|
9
11
|
require("./EmptyView.css");
|
|
10
12
|
const b = (0, cn_1.block)('ydb-navigation-tree-view-empty');
|
|
11
13
|
function EmptyView({ level }) {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.ErrorView = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
8
|
const cn_1 = require("../../../utils/cn");
|
|
7
9
|
const TreeView_1 = require("../../TreeView/TreeView");
|
|
8
|
-
const i18n_1 =
|
|
10
|
+
const i18n_1 = __importDefault(require("../i18n"));
|
|
9
11
|
require("./ErrorView.css");
|
|
10
12
|
const b = (0, cn_1.block)('ydb-navigation-tree-view-error');
|
|
11
13
|
function ErrorView({ level }) {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.NavigationTree = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 =
|
|
7
|
-
const react_list_1 =
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_list_1 = __importDefault(require("react-list"));
|
|
8
10
|
const EmptyView_1 = require("./EmptyView/EmptyView");
|
|
9
11
|
const ErrorView_1 = require("./ErrorView/ErrorView");
|
|
10
12
|
const LoaderView_1 = require("./LoaderView/LoaderView");
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.NavigationTreeNode = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 =
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
7
9
|
const TreeView_1 = require("../TreeView/TreeView");
|
|
8
10
|
const AsyncReplication_1 = require("../icons/AsyncReplication");
|
|
9
11
|
const ColumnTable_1 = require("../icons/ColumnTable");
|
|
@@ -34,6 +36,7 @@ function renderIcon(type, collapsed) {
|
|
|
34
36
|
return (0, jsx_runtime_1.jsx)(Index_1.IndexIcon, { height: 16 });
|
|
35
37
|
case 'table':
|
|
36
38
|
case 'index_table':
|
|
39
|
+
case 'system_table':
|
|
37
40
|
return (0, jsx_runtime_1.jsx)(Table_1.TableIcon, { height: 16 });
|
|
38
41
|
case 'column_table':
|
|
39
42
|
return (0, jsx_runtime_1.jsx)(ColumnTable_1.ColumnTableIcon, { height: 16 });
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
declare const _default: (key: "label_error" | "label_empty", params?: import("@gravity-ui/i18n").Params | undefined) => string
|
|
1
|
+
declare const _default: ((key: "label_error" | "label_empty", params?: import("@gravity-ui/i18n").Params | undefined) => string) & {
|
|
2
|
+
keysetData: {
|
|
3
|
+
"ydb-navigation-tree": Record<"label_error" | "label_empty", import("@gravity-ui/i18n").KeyData>;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
2
6
|
export default _default;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const tslib_1 = require("tslib");
|
|
4
6
|
const i18n_1 = require("@gravity-ui/uikit/i18n");
|
|
5
|
-
const en_json_1 =
|
|
6
|
-
const ru_json_1 =
|
|
7
|
+
const en_json_1 = __importDefault(require("./en.json"));
|
|
8
|
+
const ru_json_1 = __importDefault(require("./ru.json"));
|
|
7
9
|
const COMPONENT = 'ydb-navigation-tree';
|
|
8
10
|
exports.default = (0, i18n_1.addComponentKeysets)({ en: en_json_1.default, ru: ru_json_1.default }, COMPONENT);
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./NavigationTree"), exports);
|
|
17
|
+
__exportStar(require("./NavigationTree"), exports);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DropdownMenuItemMixed } from '@gravity-ui/uikit';
|
|
3
|
-
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'resource_pool' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'table' | 'topic' | 'transfer' | 'view';
|
|
3
|
+
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'resource_pool' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'system_table' | 'table' | 'topic' | 'transfer' | 'view';
|
|
4
4
|
export interface NavigationTreeDataItem<M = unknown> {
|
|
5
5
|
name: string;
|
|
6
6
|
type: NavigationTreeNodeType;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
background-color: var(--g-color-base-simple-hover);
|
|
20
20
|
}
|
|
21
21
|
.ydb-tree-view__item:hover .ydb-tree-view__actions {
|
|
22
|
-
|
|
22
|
+
visibility: visible;
|
|
23
23
|
}
|
|
24
24
|
.ydb-tree-view__item_active {
|
|
25
25
|
font-weight: bold;
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
text-overflow: ellipsis;
|
|
54
54
|
}
|
|
55
55
|
.ydb-tree-view__actions {
|
|
56
|
-
display:
|
|
56
|
+
display: flex;
|
|
57
|
+
visibility: hidden;
|
|
57
58
|
margin-left: 6px;
|
|
58
59
|
align-items: center;
|
|
59
60
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
6
|
exports.TreeView = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
7
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 =
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
7
9
|
const uikit_1 = require("@gravity-ui/uikit");
|
|
8
10
|
const cn_1 = require("../../utils/cn");
|
|
9
11
|
require("./TreeView.css");
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
tslib_1.__exportStar(require("./TreeView"), exports);
|
|
17
|
+
__exportStar(require("./TreeView"), exports);
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TransferIcon = void 0;
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const icons_1 = require("@gravity-ui/icons");
|
|
5
6
|
function TransferIcon(props) {
|
|
6
|
-
return (
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(icons_1.FileArrowRightOut, Object.assign({}, props));
|
|
7
8
|
}
|
|
8
9
|
exports.TransferIcon = TransferIcon;
|
package/build/cjs/index.js
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
tslib_1.__exportStar(require("./components/TreeView"), exports);
|
|
17
|
+
__exportStar(require("./components/NavigationTree"), exports);
|
|
18
|
+
__exportStar(require("./components/TreeView"), exports);
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
declare const _default: (key: "label_error" | "label_empty", params?: import("@gravity-ui/i18n").Params | undefined) => string
|
|
1
|
+
declare const _default: ((key: "label_error" | "label_empty", params?: import("@gravity-ui/i18n").Params | undefined) => string) & {
|
|
2
|
+
keysetData: {
|
|
3
|
+
"ydb-navigation-tree": Record<"label_error" | "label_empty", import("@gravity-ui/i18n").KeyData>;
|
|
4
|
+
};
|
|
5
|
+
};
|
|
2
6
|
export default _default;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DropdownMenuItemMixed } from '@gravity-ui/uikit';
|
|
3
|
-
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'resource_pool' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'table' | 'topic' | 'transfer' | 'view';
|
|
3
|
+
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'resource_pool' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'system_table' | 'table' | 'topic' | 'transfer' | 'view';
|
|
4
4
|
export interface NavigationTreeDataItem<M = unknown> {
|
|
5
5
|
name: string;
|
|
6
6
|
type: NavigationTreeNodeType;
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
background-color: var(--g-color-base-simple-hover);
|
|
20
20
|
}
|
|
21
21
|
.ydb-tree-view__item:hover .ydb-tree-view__actions {
|
|
22
|
-
|
|
22
|
+
visibility: visible;
|
|
23
23
|
}
|
|
24
24
|
.ydb-tree-view__item_active {
|
|
25
25
|
font-weight: bold;
|
|
@@ -53,7 +53,8 @@
|
|
|
53
53
|
text-overflow: ellipsis;
|
|
54
54
|
}
|
|
55
55
|
.ydb-tree-view__actions {
|
|
56
|
-
display:
|
|
56
|
+
display: flex;
|
|
57
|
+
visibility: hidden;
|
|
57
58
|
margin-left: 6px;
|
|
58
59
|
align-items: center;
|
|
59
60
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
|
+
import { FileArrowRightOut } from '@gravity-ui/icons';
|
|
3
4
|
export function TransferIcon(props) {
|
|
4
|
-
return
|
|
5
|
+
return _jsx(FileArrowRightOut, Object.assign({}, props));
|
|
5
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ydb-ui-components",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"exports": {
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"lint": "run-p lint:*",
|
|
38
38
|
"prettier": "prettier '**/*.{json,md,yaml,yml}'",
|
|
39
39
|
"typecheck": "tsc --noEmit",
|
|
40
|
-
"start": "storybook dev -p
|
|
40
|
+
"start": "storybook dev -p 7003",
|
|
41
41
|
"prepublishOnly": "npm run build",
|
|
42
42
|
"prepare": "husky"
|
|
43
43
|
},
|
|
@@ -54,10 +54,11 @@
|
|
|
54
54
|
"@commitlint/cli": "^19.0.3",
|
|
55
55
|
"@commitlint/config-conventional": "^19.0.3",
|
|
56
56
|
"@gravity-ui/eslint-config": "^3.1.1",
|
|
57
|
+
"@gravity-ui/icons": "^2.16.0",
|
|
57
58
|
"@gravity-ui/prettier-config": "^1.1.0",
|
|
58
59
|
"@gravity-ui/stylelint-config": "^4.0.1",
|
|
59
60
|
"@gravity-ui/tsconfig": "^1.0.0",
|
|
60
|
-
"@gravity-ui/uikit": "^
|
|
61
|
+
"@gravity-ui/uikit": "^7.11.0",
|
|
61
62
|
"@storybook/addon-essentials": "^7.6.17",
|
|
62
63
|
"@storybook/preset-scss": "^1.0.3",
|
|
63
64
|
"@storybook/react": "^7.6.17",
|
|
@@ -85,7 +86,7 @@
|
|
|
85
86
|
"typescript": "^5.3.3"
|
|
86
87
|
},
|
|
87
88
|
"peerDependencies": {
|
|
88
|
-
"@gravity-ui/uikit": "^
|
|
89
|
+
"@gravity-ui/uikit": "^7.0.0",
|
|
89
90
|
"react": "^16.0.0 || ^17.0.0 || ^18.0.0",
|
|
90
91
|
"react-dom": "^16.0.0 || ^17.0.0 || ^18.0.0"
|
|
91
92
|
},
|