ydb-embedded-ui 6.1.0 → 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. package/dist/components/DateRange/DateRange.scss +7 -0
  2. package/dist/components/EntityStatus/EntityStatus.d.ts +3 -1
  3. package/dist/components/EntityStatus/EntityStatus.js +4 -4
  4. package/dist/components/EntityStatus/EntityStatus.scss +2 -10
  5. package/dist/components/NodeHostWrapper/NodeHostWrapper.js +3 -2
  6. package/dist/components/NodeHostWrapper/NodeHostWrapper.scss +1 -10
  7. package/dist/components/QueryResultTable/QueryResultTable.d.ts +2 -2
  8. package/dist/components/QueryResultTable/QueryResultTable.js +2 -1
  9. package/dist/components/QueryResultTable/QueryResultTable.scss +1 -0
  10. package/dist/components/ResizeableDataTable/ResizeableDataTable.d.ts +7 -0
  11. package/dist/components/ResizeableDataTable/ResizeableDataTable.js +14 -0
  12. package/dist/components/ResizeableDataTable/ResizeableDataTable.scss +8 -0
  13. package/dist/components/VirtualTable/ResizeHandler.d.ts +8 -0
  14. package/dist/components/VirtualTable/ResizeHandler.js +62 -0
  15. package/dist/components/VirtualTable/ResizeableVirtualTable.d.ts +6 -0
  16. package/dist/components/VirtualTable/ResizeableVirtualTable.js +16 -0
  17. package/dist/components/VirtualTable/TableHead.d.ts +3 -3
  18. package/dist/components/VirtualTable/TableHead.js +16 -31
  19. package/dist/components/VirtualTable/VirtualTable.d.ts +2 -4
  20. package/dist/components/VirtualTable/VirtualTable.scss +24 -4
  21. package/dist/components/VirtualTable/types.d.ts +3 -0
  22. package/dist/components/VirtualTable/utils.d.ts +2 -0
  23. package/dist/components/VirtualTable/utils.js +21 -0
  24. package/dist/containers/ClusterModeGuard/ClusterModeGuard.js +1 -1
  25. package/dist/containers/Clusters/Clusters.js +3 -2
  26. package/dist/containers/Clusters/Clusters.scss +5 -0
  27. package/dist/containers/Clusters/columns.d.ts +1 -0
  28. package/dist/containers/Clusters/columns.js +4 -3
  29. package/dist/containers/Nodes/Nodes.js +4 -4
  30. package/dist/containers/Nodes/Nodes.scss +0 -5
  31. package/dist/containers/Nodes/VirtualNodes.js +4 -6
  32. package/dist/containers/Nodes/getNodesColumns.d.ts +1 -0
  33. package/dist/containers/Nodes/getNodesColumns.js +9 -1
  34. package/dist/containers/PDiskPage/PDiskGroups.js +3 -3
  35. package/dist/containers/Storage/Storage.scss +0 -4
  36. package/dist/containers/Storage/StorageGroups/StorageGroups.js +3 -3
  37. package/dist/containers/Storage/StorageGroups/VirtualStorageGroups.js +3 -3
  38. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.d.ts +3 -0
  39. package/dist/containers/Storage/StorageGroups/getStorageGroupsColumns.js +7 -3
  40. package/dist/containers/Storage/StorageNodes/StorageNodes.js +3 -3
  41. package/dist/containers/Storage/StorageNodes/VirtualStorageNodes.js +3 -3
  42. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.d.ts +3 -0
  43. package/dist/containers/Storage/StorageNodes/getStorageNodesColumns.js +2 -0
  44. package/dist/containers/Tablet/Tablet.scss +0 -4
  45. package/dist/containers/Tablet/TabletTable/TabletTable.js +5 -3
  46. package/dist/containers/Tenant/Acl/Acl.js +3 -2
  47. package/dist/containers/Tenant/Acl/Acl.scss +0 -6
  48. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.js +3 -3
  49. package/dist/containers/Tenant/Diagnostics/Consumers/Consumers.scss +2 -0
  50. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.d.ts +1 -0
  51. package/dist/containers/Tenant/Diagnostics/Consumers/columns/columns.js +2 -0
  52. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.js +5 -4
  53. package/dist/containers/Tenant/Diagnostics/HotKeys/HotKeys.scss +1 -5
  54. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.js +8 -4
  55. package/dist/containers/Tenant/Diagnostics/Partitions/Partitions.scss +2 -0
  56. package/dist/containers/Tenant/Diagnostics/Partitions/PartitionsControls/PartitionsControls.js +1 -1
  57. package/dist/containers/Tenant/Diagnostics/Partitions/columns/Columns.scss +0 -8
  58. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.d.ts +1 -0
  59. package/dist/containers/Tenant/Diagnostics/Partitions/columns/columns.js +11 -4
  60. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByCpu.js +2 -2
  61. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopNodesByLoad.js +2 -2
  62. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -2
  63. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopShards.js +2 -2
  64. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -2
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverview.scss +3 -7
  66. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.d.ts +2 -2
  67. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantOverviewTableLayout.js +2 -2
  68. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopGroups.js +2 -2
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantStorage/TopTables.js +4 -2
  70. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +8 -11
  71. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.scss +2 -24
  72. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.d.ts +1 -0
  73. package/dist/containers/Tenant/Diagnostics/TopQueries/getTopQueriesColumns.js +7 -0
  74. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.d.ts +1 -2
  75. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.js +3 -4
  76. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.d.ts +0 -1
  77. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.js +8 -10
  78. package/dist/containers/Tenant/Diagnostics/TopShards/TopShards.scss +4 -15
  79. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.d.ts +1 -0
  80. package/dist/containers/Tenant/Diagnostics/TopShards/getTopShardsColumns.js +5 -0
  81. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.js +1 -1
  82. package/dist/containers/Tenant/ObjectSummary/ObjectSummary.scss +0 -6
  83. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.scss +1 -21
  84. package/dist/containers/Tenant/Query/ExplainResult/ExplainResult.js +4 -4
  85. package/dist/containers/Tenant/Query/ExplainResult/utils.d.ts +0 -3
  86. package/dist/containers/Tenant/Query/ExplainResult/utils.js +0 -34
  87. package/dist/containers/Tenant/Query/Preview/Preview.js +3 -2
  88. package/dist/containers/Tenant/Query/Preview/Preview.scss +6 -3
  89. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +4 -2
  90. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.scss +0 -1
  91. package/dist/containers/Tenant/Query/QueryEditor/helpers.js +2 -1
  92. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +4 -1
  93. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.scss +0 -1
  94. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.d.ts +1 -2
  95. package/dist/containers/Tenant/Schema/SchemaViewer/SchemaViewer.js +4 -3
  96. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.d.ts +1 -0
  97. package/dist/containers/Tenant/Schema/SchemaViewer/helpers.js +4 -2
  98. package/dist/containers/Tenants/Tenants.js +12 -7
  99. package/dist/containers/Tenants/Tenants.scss +15 -9
  100. package/dist/containers/Versions/GroupedNodesTree/GroupedNodesTree.scss +0 -2
  101. package/dist/containers/Versions/NodesTable/NodesTable.js +14 -9
  102. package/dist/styles/mixins.scss +0 -47
  103. package/dist/utils/constants.d.ts +25 -10
  104. package/dist/utils/hooks/useTableResize.d.ts +2 -7
  105. package/dist/utils/hooks/useTableResize.js +12 -24
  106. package/package.json +10 -10
  107. package/dist/containers/Tenant/Diagnostics/TopShards/Filters/Filters.scss +0 -8
@@ -1,3 +1,5 @@
1
+ /// <reference types="react" />
2
+ import type { Settings } from '@gravity-ui/react-data-table';
1
3
  export declare const AUTO_RELOAD_INTERVAL: number;
2
4
  export declare const DEFAULT_POLLING_INTERVAL: number;
3
5
  export declare const KILOBYTE = 1000;
@@ -66,19 +68,32 @@ export declare const DEFAULT_IS_TENANT_SUMMARY_COLLAPSED = "default-is-tenant-su
66
68
  export declare const DEFAULT_IS_TENANT_COMMON_INFO_COLLAPSED = "default-is-tenant-common-info-collapsed";
67
69
  export declare const DEFAULT_IS_QUERY_RESULT_COLLAPSED = "default-is-query-result-collapsed";
68
70
  export declare const DEFAULT_CLUSTER_TAB_KEY = "default-cluster-tab";
69
- export declare const DEFAULT_TABLE_SETTINGS: {
70
- readonly displayIndices: false;
71
- readonly stickyHead: "moving";
72
- readonly syncHeadOnResize: true;
73
- readonly dynamicRender: true;
74
- readonly highlightRows: true;
75
- };
71
+ export declare const DEFAULT_TABLE_SETTINGS: Settings;
76
72
  export declare const TENANT_OVERVIEW_TABLES_SETTINGS: {
77
73
  readonly stickyHead: "fixed";
78
74
  readonly dynamicRender: false;
79
- readonly displayIndices: false;
80
- readonly syncHeadOnResize: true;
81
- readonly highlightRows: true;
75
+ readonly displayIndices?: boolean | undefined;
76
+ readonly stickyTop?: number | "auto" | undefined;
77
+ readonly syncHeadOnResize?: boolean | undefined;
78
+ readonly stickyFooter?: import("@gravity-ui/react-data-table").HeadPosition | undefined;
79
+ readonly stickyBottom?: number | "auto" | undefined;
80
+ readonly dynamicInnerRef?: import("react").Ref<ReactList> | undefined;
81
+ readonly dynamicRenderType?: "simple" | "uniform" | "variable" | undefined;
82
+ readonly dynamicItemSizeEstimator?: any;
83
+ readonly dynamicItemSizeGetter?: any;
84
+ readonly dynamicRenderMinSize?: number | undefined;
85
+ readonly dynamicRenderUseStaticSize?: boolean | undefined;
86
+ readonly dynamicRenderThreshold?: number | undefined;
87
+ readonly dynamicRenderScrollParentGetter?: any;
88
+ readonly dynamicRenderScrollParentViewportSizeGetter?: (() => number) | undefined;
89
+ readonly sortable?: boolean | undefined;
90
+ readonly externalSort?: boolean | undefined;
91
+ readonly disableSortReset?: boolean | undefined;
92
+ readonly defaultOrder?: import("@gravity-ui/react-data-table").OrderType | undefined;
93
+ readonly defaultResizeable?: boolean | undefined;
94
+ readonly highlightRows?: boolean | undefined;
95
+ readonly stripedRows?: boolean | undefined;
96
+ readonly headerMod?: "multiline" | "pre" | undefined;
82
97
  };
83
98
  export declare const QUERY_INITIAL_MODE_KEY = "query_initial_mode";
84
99
  export declare const LAST_USED_QUERY_ACTION_KEY = "last_used_query_action";
@@ -1,7 +1,2 @@
1
- import type { Column as DataTableColumn } from '@gravity-ui/react-data-table';
2
- import type { Column as VirtualTableColumn } from '../../components/VirtualTable';
3
- export type Column<T> = VirtualTableColumn<T> & DataTableColumn<T>;
4
- export type TableColumnsWidthSetup = Record<string, number>;
5
- export type HandleTableColumnsResize = (newSetup: TableColumnsWidthSetup) => void;
6
- export declare const updateColumnsWidth: <T>(columns: Column<T>[], columnsWidthSetup: TableColumnsWidthSetup) => Column<T>[];
7
- export declare const useTableResize: (localStorageKey: string) => [TableColumnsWidthSetup, HandleTableColumnsResize];
1
+ import type { ColumnWidthByName, HandleResize } from '@gravity-ui/react-data-table';
2
+ export declare const useTableResize: (localStorageKey?: string) => [ColumnWidthByName, HandleResize];
@@ -1,29 +1,17 @@
1
1
  import React from 'react';
2
- import { DEFAULT_RESIZEABLE } from '../../components/VirtualTable';
2
+ import { useTableResize as libUseTableResize } from '@gravity-ui/react-data-table';
3
3
  import { settingsManager } from '../../services/settings';
4
- export const updateColumnsWidth = (columns, columnsWidthSetup) => {
5
- return columns.map((column) => {
6
- var _a, _b;
7
- const resizeable = (_a = column.resizeable) !== null && _a !== void 0 ? _a : DEFAULT_RESIZEABLE;
8
- if (!resizeable) {
9
- return column;
10
- }
11
- return Object.assign(Object.assign({}, column), { width: (_b = columnsWidthSetup[column.name]) !== null && _b !== void 0 ? _b : column.width });
12
- });
13
- };
14
4
  export const useTableResize = (localStorageKey) => {
15
- const [tableColumnsWidthSetup, setTableColumnsWidth] = React.useState(() => {
16
- const setupFromLS = settingsManager.readUserSettingsValue(localStorageKey, {});
17
- return setupFromLS;
18
- });
19
- const handleSetupChange = React.useCallback((newSetup) => {
20
- setTableColumnsWidth((previousSetup) => {
21
- // ResizeObserver callback may be triggered only for currently resized column
22
- // or for the whole set of columns
23
- const setup = Object.assign(Object.assign({}, previousSetup), newSetup);
24
- settingsManager.setUserSettingsValue(localStorageKey, setup);
25
- return setup;
26
- });
5
+ const getSizes = React.useCallback(() => {
6
+ if (!localStorageKey) {
7
+ return {};
8
+ }
9
+ return settingsManager.readUserSettingsValue(localStorageKey, {});
10
+ }, [localStorageKey]);
11
+ const saveSizes = React.useCallback((value) => {
12
+ if (localStorageKey) {
13
+ settingsManager.setUserSettingsValue(localStorageKey, value);
14
+ }
27
15
  }, [localStorageKey]);
28
- return [tableColumnsWidthSetup, handleSetupChange];
16
+ return libUseTableResize({ saveSizes, getSizes });
29
17
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ydb-embedded-ui",
3
- "version": "6.1.0",
3
+ "version": "6.2.1",
4
4
  "files": [
5
5
  "dist"
6
6
  ],
@@ -12,15 +12,15 @@
12
12
  "dependencies": {
13
13
  "@bem-react/classname": "^1.6.0",
14
14
  "@gravity-ui/axios-wrapper": "^1.4.1",
15
- "@gravity-ui/chartkit": "^5.3.0",
16
- "@gravity-ui/components": "^3.4.1",
17
- "@gravity-ui/date-utils": "^2.2.0",
18
- "@gravity-ui/i18n": "^1.4.0",
15
+ "@gravity-ui/chartkit": "^5.5.0",
16
+ "@gravity-ui/components": "^3.6.0",
17
+ "@gravity-ui/date-utils": "^2.4.0",
18
+ "@gravity-ui/i18n": "^1.5.0",
19
19
  "@gravity-ui/icons": "^2.9.1",
20
- "@gravity-ui/navigation": "^2.7.0",
21
- "@gravity-ui/paranoid": "^1.4.1",
22
- "@gravity-ui/react-data-table": "^2.0.1",
23
- "@gravity-ui/uikit": "^6.10.2",
20
+ "@gravity-ui/navigation": "^2.10.0",
21
+ "@gravity-ui/paranoid": "^2.0.1",
22
+ "@gravity-ui/react-data-table": "^2.1.1",
23
+ "@gravity-ui/uikit": "^6.15.0",
24
24
  "@gravity-ui/websql-autocomplete": "^8.1.0",
25
25
  "@reduxjs/toolkit": "^2.2.3",
26
26
  "axios": "^1.6.8",
@@ -122,7 +122,7 @@
122
122
  "devDependencies": {
123
123
  "@commitlint/cli": "^19.2.1",
124
124
  "@commitlint/config-conventional": "^19.1.0",
125
- "@gravity-ui/eslint-config": "^3.1.1",
125
+ "@gravity-ui/eslint-config": "^3.2.0",
126
126
  "@gravity-ui/prettier-config": "^1.1.0",
127
127
  "@gravity-ui/stylelint-config": "^4.0.1",
128
128
  "@gravity-ui/tsconfig": "^1.0.0",
@@ -1,8 +0,0 @@
1
- .top-shards {
2
- &__filters {
3
- display: flex;
4
- flex-wrap: wrap;
5
- align-items: baseline;
6
- gap: 16px;
7
- }
8
- }