ydb-ui-components 4.0.0 → 4.2.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/README.md +1 -1
- package/build/cjs/components/NavigationTree/NavigationTreeNode.js +6 -0
- package/build/cjs/components/NavigationTree/types.d.ts +1 -1
- package/build/cjs/components/icons/AsyncReplication.d.ts +2 -0
- package/build/cjs/components/icons/AsyncReplication.js +8 -0
- package/build/cjs/components/icons/View.d.ts +2 -0
- package/build/cjs/components/icons/View.js +8 -0
- package/build/esm/components/NavigationTree/NavigationTreeNode.js +6 -0
- package/build/esm/components/NavigationTree/types.d.ts +1 -1
- package/build/esm/components/icons/AsyncReplication.d.ts +2 -0
- package/build/esm/components/icons/AsyncReplication.js +5 -0
- package/build/esm/components/icons/View.d.ts +2 -0
- package/build/esm/components/icons/View.js +5 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# ydb-ui-components
|
|
1
|
+
# ydb-ui-components · [](https://www.npmjs.com/package/ydb-ui-components) [](https://github.com/ydb-platform/ydb-ui-components/actions/workflows/ci.yml?query=branch:main)
|
|
2
2
|
|
|
3
3
|
A set of React components used in YDB interfaces.
|
|
4
4
|
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
7
|
const TreeView_1 = require("../TreeView/TreeView");
|
|
8
|
+
const AsyncReplication_1 = require("../icons/AsyncReplication");
|
|
8
9
|
const ColumnTable_1 = require("../icons/ColumnTable");
|
|
9
10
|
const Database_1 = require("../icons/Database");
|
|
10
11
|
const ExternalDataSource_1 = require("../icons/ExternalDataSource");
|
|
@@ -14,9 +15,12 @@ const FolderOpen_1 = require("../icons/FolderOpen");
|
|
|
14
15
|
const Index_1 = require("../icons/Index");
|
|
15
16
|
const Table_1 = require("../icons/Table");
|
|
16
17
|
const Topic_1 = require("../icons/Topic");
|
|
18
|
+
const View_1 = require("../icons/View");
|
|
17
19
|
const state_1 = require("./state");
|
|
18
20
|
function renderIcon(type, collapsed) {
|
|
19
21
|
switch (type) {
|
|
22
|
+
case 'async_replication':
|
|
23
|
+
return (0, jsx_runtime_1.jsx)(AsyncReplication_1.AsyncReplicationIcon, { height: 16 });
|
|
20
24
|
case 'database':
|
|
21
25
|
// this icon is larger than the others, therefore 14 for a better fit
|
|
22
26
|
return (0, jsx_runtime_1.jsx)(Database_1.DatabaseIcon, { height: 14 });
|
|
@@ -36,6 +40,8 @@ function renderIcon(type, collapsed) {
|
|
|
36
40
|
return (0, jsx_runtime_1.jsx)(ExternalTable_1.ExternalTableIcon, { height: 16 });
|
|
37
41
|
case 'external_data_source':
|
|
38
42
|
return (0, jsx_runtime_1.jsx)(ExternalDataSource_1.ExternalDataSourceIcon, { height: 16 });
|
|
43
|
+
case 'view':
|
|
44
|
+
return (0, jsx_runtime_1.jsx)(View_1.ViewIcon, { height: 16 });
|
|
39
45
|
default:
|
|
40
46
|
return null;
|
|
41
47
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DropdownMenuItemMixed } from '@gravity-ui/uikit';
|
|
3
|
-
export type NavigationTreeNodeType = 'database' | 'directory' | '
|
|
3
|
+
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'table' | 'topic' | 'view';
|
|
4
4
|
export interface NavigationTreeDataItem {
|
|
5
5
|
name: string;
|
|
6
6
|
type: NavigationTreeNodeType;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AsyncReplicationIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function AsyncReplicationIcon(props) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor" }, props, { children: (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.22 15.03s-.001 0 0 0a.75.75 0 0 0 1.06-1.06l-.47-.47H10a3.016 3.016 0 0 0 1.507-.405A2.999 2.999 0 0 0 13 10.5V7.896h.003a2.735 2.735 0 0 0 .785-.366 2.75 2.75 0 1 0-2.288.366V10.5A1.5 1.5 0 0 1 10 12h-.19l.47-.47s0 .001 0 0a.75.75 0 0 0-1.06-1.06l-.47.47-1.28 1.28a.75.75 0 0 0 0 1.06l1.75 1.75ZM5.72 2.97a.75.75 0 0 1 1.06 0l.47.47 1.28 1.28a.748.748 0 0 1 0 1.06L6.78 7.53c.001 0 0 0 0 0a.751.751 0 0 1-1.06-1.06L6.19 6H6a1.5 1.5 0 0 0-1.5 1.5v2.604a2.757 2.757 0 0 1 2 2.646 2.738 2.738 0 0 1-1.212 2.28 2.737 2.737 0 0 1-1.538.47A2.747 2.747 0 0 1 1 12.75a2.751 2.751 0 0 1 2-2.646V7.5a2.999 2.999 0 0 1 3-3h.19l-.47-.47a.75.75 0 0 1 0-1.06Zm-.908 9.121A1.246 1.246 0 0 1 5 12.75a1.25 1.25 0 1 1-.188-.659ZM11 5.25a1.25 1.25 0 1 1 2.5 0 1.25 1.25 0 0 1-2.5 0Z" }) })));
|
|
7
|
+
}
|
|
8
|
+
exports.AsyncReplicationIcon = AsyncReplicationIcon;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ViewIcon = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
function ViewIcon(props) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsxs)("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor" }, props, { children: [(0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.625 2H7.49951C6.47457 2.77006 5.7552 3.92488 5.55588 5.25H1.625V7.6875H5.79193C6.48417 9.6186 8.33076 11 10.5 11C10.877 11 11.2443 10.9583 11.5974 10.8792L12.7748 12.5799C12.4905 13.0601 11.9665 13.375 11.375 13.375H1.625C0.710938 13.375 0 12.6641 0 11.75V3.625C0 2.73633 0.710938 2 1.625 2ZM1.625 11.75V9.3125H5.6875V11.75H1.625Z" }), (0, jsx_runtime_1.jsx)("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.4411 8.71106C14.0985 7.9983 14.5 7.04604 14.5 6C14.5 3.79086 12.7091 2 10.5 2C8.29086 2 6.5 3.79086 6.5 6C6.5 8.20914 8.29086 10 10.5 10C11.0316 10 11.5389 9.89631 12.0029 9.70806L14.2807 12.9981C14.5557 13.3955 15.1008 13.4946 15.4981 13.2195C15.8955 12.9444 15.9946 12.3993 15.7195 12.002L13.4411 8.71106ZM12.5 6C12.5 7.10457 11.6046 8 10.5 8C9.39543 8 8.5 7.10457 8.5 6C8.5 4.89543 9.39543 4 10.5 4C11.6046 4 12.5 4.89543 12.5 6Z" })] })));
|
|
7
|
+
}
|
|
8
|
+
exports.ViewIcon = ViewIcon;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { TreeView } from '../TreeView/TreeView';
|
|
4
|
+
import { AsyncReplicationIcon } from '../icons/AsyncReplication';
|
|
4
5
|
import { ColumnTableIcon } from '../icons/ColumnTable';
|
|
5
6
|
import { DatabaseIcon } from '../icons/Database';
|
|
6
7
|
import { ExternalDataSourceIcon } from '../icons/ExternalDataSource';
|
|
@@ -10,9 +11,12 @@ import { FolderOpenIcon } from '../icons/FolderOpen';
|
|
|
10
11
|
import { IndexIcon } from '../icons/Index';
|
|
11
12
|
import { TableIcon } from '../icons/Table';
|
|
12
13
|
import { TopicIcon } from '../icons/Topic';
|
|
14
|
+
import { ViewIcon } from '../icons/View';
|
|
13
15
|
import { NavigationTreeActionType } from './state';
|
|
14
16
|
function renderIcon(type, collapsed) {
|
|
15
17
|
switch (type) {
|
|
18
|
+
case 'async_replication':
|
|
19
|
+
return _jsx(AsyncReplicationIcon, { height: 16 });
|
|
16
20
|
case 'database':
|
|
17
21
|
// this icon is larger than the others, therefore 14 for a better fit
|
|
18
22
|
return _jsx(DatabaseIcon, { height: 14 });
|
|
@@ -32,6 +36,8 @@ function renderIcon(type, collapsed) {
|
|
|
32
36
|
return _jsx(ExternalTableIcon, { height: 16 });
|
|
33
37
|
case 'external_data_source':
|
|
34
38
|
return _jsx(ExternalDataSourceIcon, { height: 16 });
|
|
39
|
+
case 'view':
|
|
40
|
+
return _jsx(ViewIcon, { height: 16 });
|
|
35
41
|
default:
|
|
36
42
|
return null;
|
|
37
43
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { DropdownMenuItemMixed } from '@gravity-ui/uikit';
|
|
3
|
-
export type NavigationTreeNodeType = 'database' | 'directory' | '
|
|
3
|
+
export type NavigationTreeNodeType = 'async_replication' | 'column_table' | 'database' | 'directory' | 'external_data_source' | 'external_table' | 'index_table' | 'index' | 'stream' | 'table' | 'topic' | 'view';
|
|
4
4
|
export interface NavigationTreeDataItem {
|
|
5
5
|
name: string;
|
|
6
6
|
type: NavigationTreeNodeType;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export function AsyncReplicationIcon(props) {
|
|
4
|
+
return (_jsx("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor" }, props, { children: _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.22 15.03s-.001 0 0 0a.75.75 0 0 0 1.06-1.06l-.47-.47H10a3.016 3.016 0 0 0 1.507-.405A2.999 2.999 0 0 0 13 10.5V7.896h.003a2.735 2.735 0 0 0 .785-.366 2.75 2.75 0 1 0-2.288.366V10.5A1.5 1.5 0 0 1 10 12h-.19l.47-.47s0 .001 0 0a.75.75 0 0 0-1.06-1.06l-.47.47-1.28 1.28a.75.75 0 0 0 0 1.06l1.75 1.75ZM5.72 2.97a.75.75 0 0 1 1.06 0l.47.47 1.28 1.28a.748.748 0 0 1 0 1.06L6.78 7.53c.001 0 0 0 0 0a.751.751 0 0 1-1.06-1.06L6.19 6H6a1.5 1.5 0 0 0-1.5 1.5v2.604a2.757 2.757 0 0 1 2 2.646 2.738 2.738 0 0 1-1.212 2.28 2.737 2.737 0 0 1-1.538.47A2.747 2.747 0 0 1 1 12.75a2.751 2.751 0 0 1 2-2.646V7.5a2.999 2.999 0 0 1 3-3h.19l-.47-.47a.75.75 0 0 1 0-1.06Zm-.908 9.121A1.246 1.246 0 0 1 5 12.75a1.25 1.25 0 1 1-.188-.659ZM11 5.25a1.25 1.25 0 1 1 2.5 0 1.25 1.25 0 0 1-2.5 0Z" }) })));
|
|
5
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export function ViewIcon(props) {
|
|
4
|
+
return (_jsxs("svg", Object.assign({ xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 16 16", fill: "currentColor" }, props, { children: [_jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.625 2H7.49951C6.47457 2.77006 5.7552 3.92488 5.55588 5.25H1.625V7.6875H5.79193C6.48417 9.6186 8.33076 11 10.5 11C10.877 11 11.2443 10.9583 11.5974 10.8792L12.7748 12.5799C12.4905 13.0601 11.9665 13.375 11.375 13.375H1.625C0.710938 13.375 0 12.6641 0 11.75V3.625C0 2.73633 0.710938 2 1.625 2ZM1.625 11.75V9.3125H5.6875V11.75H1.625Z" }), _jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M13.4411 8.71106C14.0985 7.9983 14.5 7.04604 14.5 6C14.5 3.79086 12.7091 2 10.5 2C8.29086 2 6.5 3.79086 6.5 6C6.5 8.20914 8.29086 10 10.5 10C11.0316 10 11.5389 9.89631 12.0029 9.70806L14.2807 12.9981C14.5557 13.3955 15.1008 13.4946 15.4981 13.2195C15.8955 12.9444 15.9946 12.3993 15.7195 12.002L13.4411 8.71106ZM12.5 6C12.5 7.10457 11.6046 8 10.5 8C9.39543 8 8.5 7.10457 8.5 6C8.5 4.89543 9.39543 4 10.5 4C11.6046 4 12.5 4.89543 12.5 6Z" })] })));
|
|
5
|
+
}
|