ydb-embedded-ui 6.32.0 → 6.34.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. package/dist/components/ConfirmationDialog/ConfirmationDialog.d.ts +21 -0
  2. package/dist/components/ConfirmationDialog/ConfirmationDialog.js +31 -0
  3. package/dist/components/ConfirmationDialog/ConfirmationDialog.js.map +1 -0
  4. package/dist/components/ConfirmationDialog/ConfirmationDialog.scss +6 -0
  5. package/dist/components/ConfirmationDialog/i18n/en.json +3 -0
  6. package/dist/components/ConfirmationDialog/i18n/index.d.ts +1 -0
  7. package/dist/components/ConfirmationDialog/i18n/index.js +5 -0
  8. package/dist/components/ConfirmationDialog/i18n/index.js.map +1 -0
  9. package/dist/components/EntityStatus/EntityStatus.js +1 -1
  10. package/dist/components/EntityStatus/EntityStatus.js.map +1 -1
  11. package/dist/components/MemoryViewer/MemoryViewer.d.ts +14 -0
  12. package/dist/components/MemoryViewer/MemoryViewer.js +84 -0
  13. package/dist/components/MemoryViewer/MemoryViewer.js.map +1 -0
  14. package/dist/components/MemoryViewer/MemoryViewer.scss +104 -0
  15. package/dist/components/MemoryViewer/i18n/en.json +11 -0
  16. package/dist/components/MemoryViewer/i18n/index.d.ts +2 -0
  17. package/dist/components/MemoryViewer/i18n/index.js +5 -0
  18. package/dist/components/MemoryViewer/i18n/index.js.map +1 -0
  19. package/dist/components/MemoryViewer/utils.d.ts +10 -0
  20. package/dist/components/MemoryViewer/utils.js +71 -0
  21. package/dist/components/MemoryViewer/utils.js.map +1 -0
  22. package/dist/components/PDiskInfo/i18n/index.d.ts +1 -1
  23. package/dist/components/ProgressViewer/ProgressViewer.d.ts +1 -1
  24. package/dist/components/TooltipsContent/NodeEndpointsTooltipContent/NodeEndpointsTooltipContent.scss +1 -1
  25. package/dist/components/VDiskInfo/i18n/index.d.ts +1 -1
  26. package/dist/components/nodesColumns/columns.d.ts +4 -7
  27. package/dist/components/nodesColumns/columns.js +9 -17
  28. package/dist/components/nodesColumns/columns.js.map +1 -1
  29. package/dist/components/nodesColumns/constants.d.ts +4 -5
  30. package/dist/components/nodesColumns/constants.js +78 -11
  31. package/dist/components/nodesColumns/constants.js.map +1 -1
  32. package/dist/components/nodesColumns/i18n/en.json +8 -5
  33. package/dist/components/nodesColumns/i18n/index.d.ts +1 -1
  34. package/dist/containers/App/App.d.ts +1 -1
  35. package/dist/containers/App/Providers.js +2 -1
  36. package/dist/containers/App/Providers.js.map +1 -1
  37. package/dist/containers/AsideNavigation/AsideNavigation.d.ts +2 -0
  38. package/dist/containers/AsideNavigation/AsideNavigation.js +2 -1
  39. package/dist/containers/AsideNavigation/AsideNavigation.js.map +1 -1
  40. package/dist/containers/Clusters/Clusters.js +1 -1
  41. package/dist/containers/Clusters/Clusters.js.map +1 -1
  42. package/dist/containers/Clusters/Clusters.scss +5 -2
  43. package/dist/containers/Clusters/constants.d.ts +1 -1
  44. package/dist/containers/Nodes/columns/columns.js +2 -2
  45. package/dist/containers/Nodes/columns/columns.js.map +1 -1
  46. package/dist/containers/Nodes/columns/constants.js +2 -4
  47. package/dist/containers/Nodes/columns/constants.js.map +1 -1
  48. package/dist/containers/Nodes/getNodes.js +4 -5
  49. package/dist/containers/Nodes/getNodes.js.map +1 -1
  50. package/dist/containers/Storage/StorageGroups/columns/columns.js +3 -3
  51. package/dist/containers/Storage/StorageGroups/columns/columns.js.map +1 -1
  52. package/dist/containers/Storage/StorageGroups/columns/constants.d.ts +3 -7
  53. package/dist/containers/Storage/StorageGroups/columns/constants.js +54 -10
  54. package/dist/containers/Storage/StorageGroups/columns/constants.js.map +1 -1
  55. package/dist/containers/Storage/StorageGroups/getGroups.js +3 -5
  56. package/dist/containers/Storage/StorageGroups/getGroups.js.map +1 -1
  57. package/dist/containers/Storage/StorageNodes/columns/columns.js +2 -3
  58. package/dist/containers/Storage/StorageNodes/columns/columns.js.map +1 -1
  59. package/dist/containers/Storage/StorageNodes/columns/constants.js +2 -2
  60. package/dist/containers/Storage/StorageNodes/columns/constants.js.map +1 -1
  61. package/dist/containers/Storage/StorageNodes/getNodes.js +4 -5
  62. package/dist/containers/Storage/StorageNodes/getNodes.js.map +1 -1
  63. package/dist/containers/Storage/utils/index.d.ts +1 -1
  64. package/dist/containers/Tablets/i18n/index.d.ts +1 -1
  65. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js +3 -1
  66. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantCpu/TopQueries.js.map +1 -1
  67. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js +2 -7
  68. package/dist/containers/Tenant/Diagnostics/TenantOverview/TenantMemory/TopNodesByMemory.js.map +1 -1
  69. package/dist/containers/Tenant/Diagnostics/TenantOverview/i18n/index.d.ts +1 -1
  70. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js +3 -1
  71. package/dist/containers/Tenant/Diagnostics/TopQueries/TopQueries.js.map +1 -1
  72. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js +5 -1
  73. package/dist/containers/Tenant/ObjectSummary/SchemaTree/SchemaTree.js.map +1 -1
  74. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js +5 -2
  75. package/dist/containers/Tenant/Query/ExecuteResult/ExecuteResult.js.map +1 -1
  76. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.d.ts +7 -0
  77. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js +40 -0
  78. package/dist/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.js.map +1 -0
  79. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js +1 -1
  80. package/dist/containers/Tenant/Query/ExecuteResult/TraceButton.js.map +1 -1
  81. package/dist/containers/Tenant/Query/ExecuteResult/i18n/en.json +4 -1
  82. package/dist/containers/Tenant/Query/ExecuteResult/i18n/index.d.ts +1 -1
  83. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js +8 -1
  84. package/dist/containers/Tenant/Query/NewSQL/NewSQL.js.map +1 -1
  85. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js +3 -1
  86. package/dist/containers/Tenant/Query/QueriesHistory/QueriesHistory.js.map +1 -1
  87. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.d.ts +2 -27
  88. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js +32 -51
  89. package/dist/containers/Tenant/Query/QueryEditor/QueryEditor.js.map +1 -1
  90. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js +1 -1
  91. package/dist/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.js.map +1 -1
  92. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.d.ts +9 -3
  93. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js +23 -12
  94. package/dist/containers/Tenant/Query/SaveQuery/SaveQuery.js.map +1 -1
  95. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js +8 -3
  96. package/dist/containers/Tenant/Query/SavedQueries/SavedQueries.js.map +1 -1
  97. package/dist/containers/Tenant/utils/newSQLQueryActions.d.ts +1 -1
  98. package/dist/containers/Tenant/utils/newSQLQueryActions.js +2 -3
  99. package/dist/containers/Tenant/utils/newSQLQueryActions.js.map +1 -1
  100. package/dist/containers/Tenant/utils/schemaActions.d.ts +1 -0
  101. package/dist/containers/Tenant/utils/schemaActions.js +59 -40
  102. package/dist/containers/Tenant/utils/schemaActions.js.map +1 -1
  103. package/dist/containers/Tenant/utils/schemaQueryTemplates.js +1 -1
  104. package/dist/containers/UserSettings/i18n/en.json +2 -0
  105. package/dist/containers/UserSettings/i18n/index.d.ts +1 -1
  106. package/dist/containers/UserSettings/settings.d.ts +1 -0
  107. package/dist/containers/UserSettings/settings.js +7 -2
  108. package/dist/containers/UserSettings/settings.js.map +1 -1
  109. package/dist/services/api.d.ts +4 -0
  110. package/dist/services/api.js +11 -0
  111. package/dist/services/api.js.map +1 -1
  112. package/dist/services/settings.d.ts +1 -0
  113. package/dist/services/settings.js +2 -1
  114. package/dist/services/settings.js.map +1 -1
  115. package/dist/store/configureStore.d.ts +25 -11
  116. package/dist/store/defaultStore.d.ts +12 -5
  117. package/dist/store/reducers/capabilities/capabilities.d.ts +48 -8
  118. package/dist/store/reducers/cluster/cluster.d.ts +36 -6
  119. package/dist/store/reducers/executeQuery.d.ts +41 -51
  120. package/dist/store/reducers/executeQuery.js +64 -160
  121. package/dist/store/reducers/executeQuery.js.map +1 -1
  122. package/dist/store/reducers/healthcheckInfo/healthcheckInfo.d.ts +120 -20
  123. package/dist/store/reducers/index.d.ts +19 -10
  124. package/dist/store/reducers/node/selectors.d.ts +6 -1
  125. package/dist/store/reducers/nodes/utils.d.ts +1 -1
  126. package/dist/store/reducers/nodesList.d.ts +6 -1
  127. package/dist/store/reducers/planToSvg.d.ts +8 -0
  128. package/dist/store/reducers/planToSvg.js +21 -0
  129. package/dist/store/reducers/planToSvg.js.map +1 -0
  130. package/dist/store/reducers/queryActions/queryActions.d.ts +0 -27
  131. package/dist/store/reducers/queryActions/queryActions.js +1 -1
  132. package/dist/store/reducers/queryActions/queryActions.js.map +1 -1
  133. package/dist/store/reducers/schema/schema.d.ts +22 -7
  134. package/dist/store/reducers/schema/schema.js +16 -20
  135. package/dist/store/reducers/schema/schema.js.map +1 -1
  136. package/dist/store/reducers/tablets.d.ts +30 -5
  137. package/dist/store/reducers/tenantOverview/topShards/utils.d.ts +1 -1
  138. package/dist/store/reducers/tenants/selectors.d.ts +54 -9
  139. package/dist/store/reducers/tooltip.d.ts +1 -1
  140. package/dist/store/reducers/topic.d.ts +90 -15
  141. package/dist/store/reducers/trace.d.ts +1 -1
  142. package/dist/store/reducers/trace.js +1 -1
  143. package/dist/store/reducers/trace.js.map +1 -1
  144. package/dist/types/api/nodes.d.ts +18 -4
  145. package/dist/types/api/nodes.js.map +1 -1
  146. package/dist/types/store/executeQuery.d.ts +3 -6
  147. package/dist/types/store/executeQuery.js.map +1 -1
  148. package/dist/utils/constants.d.ts +1 -0
  149. package/dist/utils/constants.js +1 -0
  150. package/dist/utils/constants.js.map +1 -1
  151. package/dist/utils/hooks/withConfirmation/i18n/en.json +4 -0
  152. package/dist/utils/hooks/withConfirmation/i18n/index.d.ts +2 -0
  153. package/dist/utils/hooks/withConfirmation/i18n/index.js +5 -0
  154. package/dist/utils/hooks/withConfirmation/i18n/index.js.map +1 -0
  155. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.d.ts +3 -0
  156. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js +53 -0
  157. package/dist/utils/hooks/withConfirmation/useChangeInputWithConfirmation.js.map +1 -0
  158. package/dist/utils/monaco/yql/constants.d.ts +1 -1
  159. package/dist/utils/monaco/yql/generateSuggestions.d.ts +2 -1
  160. package/dist/utils/monaco/yql/generateSuggestions.js +36 -15
  161. package/dist/utils/monaco/yql/generateSuggestions.js.map +1 -1
  162. package/dist/utils/monaco/yql/yqlSuggestions.js +1 -1
  163. package/dist/utils/monaco/yql/yqlSuggestions.js.map +1 -1
  164. package/dist/utils/nodes.d.ts +1 -4
  165. package/dist/utils/nodes.js +0 -36
  166. package/dist/utils/nodes.js.map +1 -1
  167. package/dist/utils/query.d.ts +1 -1
  168. package/dist/utils/storage.d.ts +1 -3
  169. package/dist/utils/storage.js +0 -17
  170. package/dist/utils/storage.js.map +1 -1
  171. package/package.json +3 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanToSvgButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/PlanToSvgButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,EAAC,MAAM,mBAAmB,CAAC;AACzD,OAAO,EAAC,MAAM,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAC,YAAY,EAAC,MAAM,sCAAsC,CAAC;AAGlE,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,SAAS,aAAa,CAAC,KAAoB,EAAE,SAAk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,GAAG,EAAE;QACjB,OAAO,GAAG,EAAE;YACR,IAAI,OAAO,EAAE,CAAC;gBACV,GAAG,CAAC,eAAe,CAAC,OAAO,CAAC,CAAC;YACjC,CAAC;QACL,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,OAAO,CACH,KAAC,OAAO,IACJ,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,qBAAqB,EAAE,EAAC,KAAK,EAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,YAElF,MAAC,MAAM,IACH,IAAI,EAAE,aAAa,CAAC,KAAK,EAAE,SAAS,CAAC,EACrC,OAAO,EAAE,SAAS,EAClB,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,SAAS,aAElB,IAAI,CAAC,eAAe,CAAC,EACtB,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,sBAAsB,KAAG,GAChB,IACT,GACH,CACb,CAAC;AACN,CAAC"}
@@ -10,7 +10,7 @@ export function TraceButton({ traceId, isTraceReady }) {
10
10
  const { traceCheck, traceView } = useClusterBaseInfo();
11
11
  const checkTraceUrl = (traceCheck === null || traceCheck === void 0 ? void 0 : traceCheck.url) ? replaceParams(traceCheck.url, { traceId }) : '';
12
12
  const traceUrl = (traceView === null || traceView === void 0 ? void 0 : traceView.url) ? replaceParams(traceView.url, { traceId }) : '';
13
- const [checkTrace, { isLoading, isUninitialized }] = traceApi.useCheckTraceMutation();
13
+ const [checkTrace, { isLoading, isUninitialized }] = traceApi.useLazyCheckTraceQuery();
14
14
  React.useEffect(() => {
15
15
  let checkTraceMutation;
16
16
  if (checkTraceUrl && !isTraceReady) {
@@ -1 +1 @@
1
- {"version":3,"file":"TraceButton.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/ExecuteResult/TraceButton.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,sBAAsB,E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,SAAS,CAAE,GAAG,EAAC,CAAC,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,EAAE,EAAC,OAAO,EAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/E,MAAM,CAAC,UAAU,EAAE,EAAC,SAAS,EAAE,eAAe,EAAC,CAAC,GAAG,QAAQ,CAAC,sBAAsB,EAAE,CAAC;IAErF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,IAAI,kBAA8C,CAAC;QACnD,IAAI,aAAa,IAAI,CAAC,YAAY,EAAE,CAAC;YACjC,kBAAkB,GAAG,UAAU,CAAC,EAAC,GAAG,EAAE,aAAa,EAAC,CAAC,CAAC;QAC1D,CAAC;QAED,OAAO,GAAG,EAAE,CAAC,kBAAkB,aAAlB,kBAAkB,uBAAlB,kBAAkB,CAAE,KAAK,EAAE,CAAC;IAC7C,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9C,IAAI,CAAC,QAAQ,IAAI,CAAC,eAAe,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAClD,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,OAAO,CACH,MAAC,MAAM,IACH,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,WAAW,EAChD,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,QAAQ,EACd,MAAM,EAAC,QAAQ,aAEd,IAAI,CAAC,OAAO,CAAC,EACd,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,sBAAsB,KAAG,GAChB,IACT,CACZ,CAAC;AACN,CAAC"}
@@ -7,5 +7,8 @@
7
7
  "action.copy": "Copy {{activeSection}}",
8
8
  "trace": "Trace",
9
9
  "title.truncated": "Truncated",
10
- "title.result": "Result"
10
+ "title.result": "Result",
11
+ "text_plan-svg": "Execution plan",
12
+ "text_open-plan-svg": "Open execution plan in new window",
13
+ "text_error-plan-svg": "Error: {{error}}"
11
14
  }
@@ -1,2 +1,2 @@
1
- declare const _default: (key: "trace" | "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.explain-plan" | "action.copy" | "title.truncated" | "title.result", params?: import("@gravity-ui/i18n").Params) => string;
1
+ declare const _default: (key: "trace" | "description.graph-is-not-supported" | "action.result" | "action.stats" | "action.schema" | "action.explain-plan" | "action.copy" | "title.truncated" | "title.result" | "text_plan-svg" | "text_open-plan-svg" | "text_error-plan-svg", params?: import("@gravity-ui/i18n").Params) => string;
2
2
  export default _default;
@@ -1,12 +1,19 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import { ChevronDown } from '@gravity-ui/icons';
3
4
  import { Button, DropdownMenu } from '@gravity-ui/uikit';
5
+ import { changeUserInput } from '../../../../store/reducers/executeQuery';
4
6
  import { useTypedDispatch } from '../../../../utils/hooks';
7
+ import { useChangeInputWithConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
5
8
  import { bindActions } from '../../utils/newSQLQueryActions';
6
9
  import i18n from './i18n';
7
10
  export function NewSQL() {
8
11
  const dispatch = useTypedDispatch();
9
- const actions = bindActions(dispatch);
12
+ const insertTemplate = React.useCallback((input) => {
13
+ dispatch(changeUserInput({ input }));
14
+ }, [dispatch]);
15
+ const onTemplateClick = useChangeInputWithConfirmation(insertTemplate);
16
+ const actions = bindActions(onTemplateClick);
10
17
  const items = [
11
18
  {
12
19
  text: i18n('menu.tables'),
@@ -1 +1 @@
1
- {"version":3,"file":"NewSQL.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/NewSQL/NewSQL.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAC,MAAM,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAEvD,OAAO,EAAC,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AACzD,OAAO,EAAC,WA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AAC,gBAAgB,CAAC,EACvB,KAAC,MAAM,CAAC,IAAI,cACR,KAAC,WAAW,KAAG,GACL,IACT,CACZ,EACD,UAAU,EAAE,EAAC,SAAS,EAAE,KAAK,EAAC,GAChC,CACL,CAAC;AACN,CAAC"}
@@ -9,6 +9,7 @@ import { setQueryTab } from '../../../../store/reducers/tenant/tenant';
9
9
  import { cn } from '../../../../utils/cn';
10
10
  import { formatDateTime } from '../../../../utils/dataFormatters/dataFormatters';
11
11
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
12
+ import { useChangeInputWithConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
12
13
  import { formatToMs, parseUsToMs } from '../../../../utils/timeParsers';
13
14
  import { MAX_QUERY_HEIGHT, QUERY_TABLE_SETTINGS } from '../../utils/constants';
14
15
  import i18n from '../i18n';
@@ -20,10 +21,11 @@ function QueriesHistory({ changeUserInput }) {
20
21
  const queriesHistory = useTypedSelector(selectQueriesHistory);
21
22
  const filter = useTypedSelector(selectQueriesHistoryFilter);
22
23
  const reversedHistory = [...queriesHistory].reverse();
23
- const onQueryClick = (query) => {
24
+ const applyQueryClick = (query) => {
24
25
  changeUserInput({ input: query.queryText });
25
26
  dispatch(setQueryTab(TENANT_QUERY_TABS_ID.newQuery));
26
27
  };
28
+ const onQueryClick = useChangeInputWithConfirmation(applyQueryClick);
27
29
  const onChangeFilter = (value) => {
28
30
  dispatch(setQueryHistoryFilter(value));
29
31
  };
@@ -1 +1 @@
1
- {"version":3,"file":"QueriesHistory.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,cAAc,EAAC,MAAM,sDAA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ACH,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,cAAc,EACxB,WAAW,EAAE,IAAI,CAAC,yBAAyB,CAAC,EAC5C,SAAS,EAAE,CAAC,CAAC,QAAQ,CAAC,GACxB,GAC6B,EACnC,KAAC,uBAAuB,CAAC,KAAK,cAC1B,KAAC,mBAAmB,IAChB,iBAAiB,EAAE,oCAAoC,EACvD,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,oBAAoB,EAC9B,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC,EACzE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,GACpC,GAC0B,IACV,CAC7B,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"QueriesHistory.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueriesHistory/QueriesHistory.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,MAAM,EAAC,MAAM,+BAA+B,CAAC;AACrD,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,cAAc,EAAC,MAAM,sDAAsD,CAAC;AACpF,OAAO,EACH,oBAAoB,EACpB,0BAA0B,EAC1B,qBAAqB,GACxB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,oBAAoB,EAAC,MAAM,6CAA6C,CAAC;AACjF,OAAO,EAAC,WAAW,EAAC,MAAM,0CAA0C,CAAC;AAErE,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,cAAc,EAAC,MAAM,iDAAiD,CAAC;AAC/E,OAAO,EAAC,gBAAgB,EA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EAAE,oCAAoC,EACvD,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,eAAe,EACrB,QAAQ,EAAE,oBAAoB,EAC9B,gBAAgB,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,eAAe,CAAC,EACzE,UAAU,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,GAAG,CAAC,EACtC,YAAY,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,GACpC,GAC0B,IACV,CAC7B,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
@@ -1,9 +1,4 @@
1
- import React from 'react';
2
- import { goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath } from '../../../../store/reducers/executeQuery';
3
- import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
4
- import { setShowPreview } from '../../../../store/reducers/schema/schema';
5
1
  import type { EPathType } from '../../../../types/api/schema';
6
- import type { ExecuteQueryState } from '../../../../types/store/executeQuery';
7
2
  import './QueryEditor.scss';
8
3
  interface QueryEditorProps {
9
4
  tenantName: string;
@@ -11,28 +6,8 @@ interface QueryEditorProps {
11
6
  changeUserInput: (arg: {
12
7
  input: string;
13
8
  }) => void;
14
- goToNextQuery: (...args: Parameters<typeof goToNextQuery>) => void;
15
- goToPreviousQuery: (...args: Parameters<typeof goToPreviousQuery>) => void;
16
- setTenantPath: (...args: Parameters<typeof setTenantPath>) => void;
17
- setQueryAction: (...args: Parameters<typeof setQueryAction>) => void;
18
- setQueryResult: (...args: Parameters<typeof setQueryResult>) => void;
19
- executeQuery: ExecuteQueryState;
20
9
  theme: string;
21
10
  type?: EPathType;
22
- showPreview: boolean;
23
- setShowPreview: (...args: Parameters<typeof setShowPreview>) => void;
24
- saveQueryToHistory: (...args: Parameters<typeof saveQueryToHistory>) => void;
25
11
  }
26
- declare function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
27
- declare const _default: import("react-redux").ConnectedComponent<typeof QueryEditor, {
28
- theme: string;
29
- path: string;
30
- type?: EPathType;
31
- tenantName: string;
32
- changeUserInput: (arg: {
33
- input: string;
34
- }) => void;
35
- context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction> | null>;
36
- store?: import("redux").Store;
37
- }>;
38
- export default _default;
12
+ export default function QueryEditor(props: QueryEditorProps): import("react/jsx-runtime").JSX.Element;
13
+ export {};
@@ -2,19 +2,18 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { isEqual } from 'lodash';
4
4
  import throttle from 'lodash/throttle';
5
- import { connect } from 'react-redux';
6
5
  import { v4 as uuidv4 } from 'uuid';
7
6
  import { MonacoEditor } from '../../../../components/MonacoEditor/MonacoEditor';
8
7
  import SplitPane from '../../../../components/SplitPane';
9
8
  import { useTracingLevelOptionAvailable } from '../../../../store/reducers/capabilities/hooks';
10
- import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, setQueryResult, setTenantPath, } from '../../../../store/reducers/executeQuery';
9
+ import { executeQueryApi, goToNextQuery, goToPreviousQuery, saveQueryToHistory, selectQueriesHistory, selectQueriesHistoryCurrentIndex, selectResult, selectTenantPath, selectUserInput, setTenantPath, } from '../../../../store/reducers/executeQuery';
11
10
  import { explainQueryApi } from '../../../../store/reducers/explainQuery/explainQuery';
12
11
  import { setQueryAction } from '../../../../store/reducers/queryActions/queryActions';
13
- import { setShowPreview } from '../../../../store/reducers/schema/schema';
12
+ import { selectShowPreview, setShowPreview } from '../../../../store/reducers/schema/schema';
14
13
  import { ResultType } from '../../../../types/store/executeQuery';
15
14
  import { cn } from '../../../../utils/cn';
16
15
  import { DEFAULT_IS_QUERY_RESULT_COLLAPSED, DEFAULT_SIZE_RESULT_PANE_KEY, LAST_USED_QUERY_ACTION_KEY, } from '../../../../utils/constants';
17
- import { useEventHandler, useQueryExecutionSettings, useSetting } from '../../../../utils/hooks';
16
+ import { useEventHandler, useQueryExecutionSettings, useSetting, useTypedDispatch, useTypedSelector, } from '../../../../utils/hooks';
18
17
  import { useChangedQuerySettings } from '../../../../utils/hooks/useChangedQuerySettings';
19
18
  import { useLastQueryExecutionSettings } from '../../../../utils/hooks/useLastQueryExecutionSettings';
20
19
  import { YQL_LANGUAGE_ID } from '../../../../utils/monaco/constats';
@@ -37,12 +36,17 @@ const initialTenantCommonInfoState = {
37
36
  triggerCollapse: false,
38
37
  collapsed: true,
39
38
  };
40
- function QueryEditor(props) {
41
- var _a;
39
+ export default function QueryEditor(props) {
42
40
  const editorOptions = useEditorOptions();
43
- const { tenantName, path, setTenantPath: setPath, executeQuery, type, theme, changeUserInput, setQueryResult, showPreview, } = props;
44
- const { tenantPath: savedPath } = executeQuery;
45
- const isResultLoaded = Boolean(executeQuery.result);
41
+ const dispatch = useTypedDispatch();
42
+ const { tenantName, path, type, theme, changeUserInput } = props;
43
+ const savedPath = useTypedSelector(selectTenantPath);
44
+ const result = useTypedSelector(selectResult);
45
+ const historyQueries = useTypedSelector(selectQueriesHistory);
46
+ const historyCurrentIndex = useTypedSelector(selectQueriesHistoryCurrentIndex);
47
+ const input = useTypedSelector(selectUserInput);
48
+ const showPreview = useTypedSelector(selectShowPreview);
49
+ const isResultLoaded = Boolean(result);
46
50
  const [querySettings] = useQueryExecutionSettings();
47
51
  const enableTracingLevel = useTracingLevelOptionAvailable();
48
52
  const [lastQueryExecutionSettings, setLastQueryExecutionSettings] = useLastQueryExecutionSettings();
@@ -52,33 +56,29 @@ function QueryEditor(props) {
52
56
  const [sendExplainQuery] = explainQueryApi.useExplainQueryMutation();
53
57
  React.useEffect(() => {
54
58
  if (savedPath !== tenantName) {
55
- if (savedPath) {
56
- changeUserInput({ input: '' });
57
- setQueryResult();
58
- }
59
- setPath(tenantName);
59
+ dispatch(setTenantPath(tenantName));
60
60
  }
61
- }, [changeUserInput, setPath, setQueryResult, tenantName, savedPath]);
61
+ }, [dispatch, tenantName, savedPath]);
62
62
  const [resultVisibilityState, dispatchResultVisibilityState] = React.useReducer(paneVisibilityToggleReducerCreator(DEFAULT_IS_QUERY_RESULT_COLLAPSED), initialTenantCommonInfoState);
63
63
  React.useEffect(() => {
64
64
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
65
65
  }, []);
66
66
  React.useEffect(() => {
67
- if (props.showPreview || isResultLoaded) {
67
+ if (showPreview || isResultLoaded) {
68
68
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
69
69
  }
70
70
  else {
71
71
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
72
72
  }
73
- }, [props.showPreview, isResultLoaded]);
73
+ }, [showPreview, isResultLoaded]);
74
74
  const getLastQueryText = useEventHandler(() => {
75
- var _a;
76
- const { history } = executeQuery;
77
- return ((_a = history.queries[history.queries.length - 1]) === null || _a === void 0 ? void 0 : _a.queryText) || '';
75
+ if (!historyQueries || historyQueries.length === 0) {
76
+ return '';
77
+ }
78
+ return historyQueries[historyQueries.length - 1].queryText;
78
79
  });
79
80
  const handleSendExecuteClick = useEventHandler((text) => {
80
81
  var _a;
81
- const { input, history } = executeQuery;
82
82
  const query = text !== null && text !== void 0 ? text : input;
83
83
  setLastUsedQueryAction(QUERY_ACTIONS.execute);
84
84
  if (!isEqual(lastQueryExecutionSettings, querySettings)) {
@@ -93,21 +93,19 @@ function QueryEditor(props) {
93
93
  enableTracingLevel,
94
94
  queryId,
95
95
  });
96
- props.setShowPreview(false);
96
+ dispatch(setShowPreview(false));
97
97
  // Don't save partial queries in history
98
98
  if (!text) {
99
- const { queries, currentIndex } = history;
100
- if (query !== ((_a = queries[currentIndex]) === null || _a === void 0 ? void 0 : _a.queryText)) {
101
- props.saveQueryToHistory(input, queryId);
99
+ if (query !== ((_a = historyQueries[historyCurrentIndex]) === null || _a === void 0 ? void 0 : _a.queryText)) {
100
+ dispatch(saveQueryToHistory({ queryText: input, queryId }));
102
101
  }
103
102
  }
104
103
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
105
104
  });
106
105
  const handleSettingsClick = () => {
107
- props.setQueryAction('settings');
106
+ dispatch(setQueryAction('settings'));
108
107
  };
109
108
  const handleGetExplainQueryClick = useEventHandler(() => {
110
- const { input } = executeQuery;
111
109
  setLastUsedQueryAction(QUERY_ACTIONS.explain);
112
110
  if (!isEqual(lastQueryExecutionSettings, querySettings)) {
113
111
  resetBanner();
@@ -121,7 +119,7 @@ function QueryEditor(props) {
121
119
  enableTracingLevel,
122
120
  queryId,
123
121
  });
124
- props.setShowPreview(false);
122
+ dispatch(setShowPreview(false));
125
123
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerExpand);
126
124
  });
127
125
  const handleSendQuery = useEventHandler(() => {
@@ -186,7 +184,7 @@ function QueryEditor(props) {
186
184
  contextMenuGroupId: CONTEXT_MENU_GROUP_ID,
187
185
  contextMenuOrder: 2,
188
186
  run: () => {
189
- props.goToPreviousQuery();
187
+ dispatch(goToPreviousQuery());
190
188
  },
191
189
  });
192
190
  editor.addAction({
@@ -196,7 +194,7 @@ function QueryEditor(props) {
196
194
  contextMenuGroupId: CONTEXT_MENU_GROUP_ID,
197
195
  contextMenuOrder: 3,
198
196
  run: () => {
199
- props.goToNextQuery();
197
+ dispatch(goToNextQuery());
200
198
  },
201
199
  });
202
200
  editor.addAction({
@@ -204,12 +202,12 @@ function QueryEditor(props) {
204
202
  label: i18n('action.save-query'),
205
203
  keybindings: [keybindings.saveQuery],
206
204
  run: () => {
207
- props.setQueryAction('save');
205
+ dispatch(setQueryAction('save'));
208
206
  },
209
207
  });
210
208
  };
211
209
  const onChange = (newValue) => {
212
- props.changeUserInput({ input: newValue });
210
+ changeUserInput({ input: newValue });
213
211
  };
214
212
  const onCollapseResultHandler = () => {
215
213
  dispatchResultVisibilityState(PaneVisibilityActionTypes.triggerCollapse);
@@ -221,29 +219,12 @@ function QueryEditor(props) {
221
219
  dispatchResultVisibilityState(PaneVisibilityActionTypes.clear);
222
220
  };
223
221
  const renderControls = () => {
224
- var _a;
225
- return (_jsx(QueryEditorControls, { handleSendExecuteClick: handleSendExecuteClick, onSettingsButtonClick: handleSettingsClick, isLoading: Boolean((_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.isLoading), handleGetExplainQueryClick: handleGetExplainQueryClick, disabled: !executeQuery.input, highlightedAction: lastUsedQueryAction }));
222
+ return (_jsx(QueryEditorControls, { handleSendExecuteClick: handleSendExecuteClick, onSettingsButtonClick: handleSettingsClick, isLoading: Boolean(result === null || result === void 0 ? void 0 : result.isLoading), handleGetExplainQueryClick: handleGetExplainQueryClick, disabled: !input, highlightedAction: lastUsedQueryAction }));
226
223
  };
227
224
  return (_jsxs("div", { className: b(), children: [_jsxs(SplitPane, { direction: "vertical", defaultSizePaneKey: DEFAULT_SIZE_RESULT_PANE_KEY, triggerCollapse: resultVisibilityState.triggerCollapse, triggerExpand: resultVisibilityState.triggerExpand, minSize: [0, 52], collapsedSizes: [100, 0], onSplitStartDragAdditional: onSplitStartDragAdditional, children: [_jsxs("div", { className: b('pane-wrapper', {
228
225
  top: true,
229
- }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: executeQuery.input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, result: executeQuery.result, tenantName: tenantName, path: path, showPreview: showPreview }, (_a = executeQuery.result) === null || _a === void 0 ? void 0 : _a.queryId) })] }), _jsx(SaveQueryDialog, {}), _jsx(QuerySettingsDialog, {})] }));
226
+ }), children: [_jsx("div", { className: b('monaco-wrapper'), children: _jsx("div", { className: b('monaco'), children: _jsx(MonacoEditor, { language: YQL_LANGUAGE_ID, value: input, options: editorOptions, onChange: onChange, editorDidMount: editorDidMount, theme: `vs-${theme}` }) }) }), renderControls()] }), _jsx("div", { className: b('pane-wrapper'), children: _jsx(Result, { resultVisibilityState: resultVisibilityState, onExpandResultHandler: onExpandResultHandler, onCollapseResultHandler: onCollapseResultHandler, type: type, theme: theme, result: result, tenantName: tenantName, path: path, showPreview: showPreview }, result === null || result === void 0 ? void 0 : result.queryId) })] }), _jsx(SaveQueryDialog, {}), _jsx(QuerySettingsDialog, {})] }));
230
227
  }
231
- const mapStateToProps = (state) => {
232
- return {
233
- executeQuery: state.executeQuery,
234
- showPreview: state.schema.showPreview,
235
- };
236
- };
237
- const mapDispatchToProps = {
238
- saveQueryToHistory,
239
- goToPreviousQuery,
240
- goToNextQuery,
241
- setShowPreview,
242
- setTenantPath,
243
- setQueryAction,
244
- setQueryResult,
245
- };
246
- export default connect(mapStateToProps, mapDispatchToProps)(QueryEditor);
247
228
  function Result({ resultVisibilityState, onExpandResultHandler, onCollapseResultHandler, type, theme, result, tenantName, path, showPreview, }) {
248
229
  if (showPreview) {
249
230
  return _jsx(Preview, { database: tenantName, path: path, type: type });
@@ -1 +1 @@
1
- {"version":3,"file":"QueryEditor.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAC/B,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAC,OAAO,EAAC,MAAM,aAAa,CAAC;AACpC,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,YAAY,EAAC,MAAM,kDAAkD,CAAC;AAC9E,OAAO,SAAS,MAAM,kCAAkC,CAAC;AAEzD,OAAO,EAAC,8BAA8B,EAAC,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EACH,eAAe,EACf,aAAa,EACb,iBAA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AK,CAAC;IAE5D,IAAI,eAAe,EAAE,CAAC;QAClB,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE;YAC1B,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,wCAAwC;YACxC,CAAC,CAAC,WAAW,GAAG,EAAE,CAAC;QACvB,CAAC,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACjC,CAAC;AACL,CAAC"}
1
+ {"version":3,"file":"QueryEditor.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueryEditor/QueryEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,OAAO,EAAC,MAAM,QAAQ,CAAC;AAC/B,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AAEvC,OAAO,EAAC,EAAE,IAAI,MAAM,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,YAAY,EAAC,MAAM,kDAAkD,CAAC;AAC9E,OAAO,SAAS,MAAM,kCAAkC,CAAC;AACzD,OAAO,EAAC,8BAA8B,EAAC,MAAM,+CAA+C,CAAC;AAC7F,OAAO,EACH,eAAe,EACf,aAAa,EACb,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,gCAAgC,EAChC,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,aAAa,GAChB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAC,eAAe,EAAC,MAAM,sDAAsD,CAAC;AACrF,OAAO,EAAC,cAAc,EAAC,MAAM,sDAAsD,CAAC;AACpF,OAAO,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,0CAA0C,CAAC;AAE3F,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAC;AAGhE,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EACH,iCAAiC,EACjC,4BAA4B,EAC5B,0BAA0B,GAC7B,MA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AAED,SAAS,cAAc,CAAC,MAA2C,EAAE,cAA4B;IAC7F,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IACnD,MAAM,CAAC,uBAAuB,CAAC,GAAG,EAAE;QAChC,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE,cAAc,EAAE,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,YAAY,CAAC,GAAG,EAAE;QACrB,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACjC,CAAC,CAAC,CAAC;AACP,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,WAAmB;IACpD,MAAM,eAAe,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC;IAE5D,IAAI,eAAe,EAAE,CAAC;QAClB,MAAM,CAAC,cAAc,GAAG,CAAC,CAAC,EAAE,EAAE;YAC1B,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,wCAAwC;YACxC,CAAC,CAAC,WAAW,GAAG,EAAE,CAAC;QACvB,CAAC,CAAC;IACN,CAAC;SAAM,CAAC;QACJ,MAAM,CAAC,cAAc,GAAG,IAAI,CAAC;IACjC,CAAC;AACL,CAAC"}
@@ -25,6 +25,6 @@ export const QueryEditorControls = ({ disabled, isLoading, highlightedAction, ha
25
25
  const onExplainButtonClick = () => {
26
26
  handleGetExplainQueryClick();
27
27
  };
28
- return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('left'), children: [_jsxs(Button, { onClick: onRunButtonClick, disabled: disabled, loading: isLoading, view: runView, className: b('run-button'), children: [_jsx(Icon, { data: PlayFill, size: 14 }), 'Run'] }), _jsx(Button, { onClick: onExplainButtonClick, disabled: disabled, loading: isLoading, view: explainView, children: "Explain" }), _jsx(SettingsButton, { onClick: onSettingsButtonClick, runIsLoading: isLoading })] }), _jsxs("div", { className: b('right'), children: [_jsx(NewSQL, {}), _jsx(SaveQuery, { isSaveButtonDisabled: disabled })] })] }));
28
+ return (_jsxs("div", { className: b(), children: [_jsxs("div", { className: b('left'), children: [_jsxs(Button, { onClick: onRunButtonClick, disabled: disabled, loading: isLoading, view: runView, className: b('run-button'), children: [_jsx(Icon, { data: PlayFill, size: 14 }), 'Run'] }), _jsx(Button, { onClick: onExplainButtonClick, disabled: disabled, loading: isLoading, view: explainView, children: "Explain" }), _jsx(SettingsButton, { onClick: onSettingsButtonClick, runIsLoading: isLoading })] }), _jsxs("div", { className: b('right'), children: [_jsx(NewSQL, {}), _jsx(SaveQuery, { buttonProps: { disabled } })] })] }));
29
29
  };
30
30
  //# sourceMappingURL=QueryEditorControls.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryEditorControls.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAExD,OAAO,wBAAwB,MAAM,0EAA0E,CAAC;AAEhH,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,uBAAuB,EAAC,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,SAAS,EAAC,MAAM,wBAAwB,CAAC;AACjD,OAAO,IAAI,MAAM,SAAS,CAAC;AAE3B,OAAO,4BAA4B,CAAC;AAEpC,MAAM,CAAC,GAAG,EAAE,CAAC,2BAA2B,CAAC,CAAC;AAO1C,MAAM,cAAc,GAAG,CAAC,EAAC,OAAO,EAAE,YAAY,EAAsB,EAAE,EAAE;IACpE,MAAM,EAAC,sBAAsB,EAAE,kCAAkC,EAAC,GAAG,uBAAuB,EAAE,CAAC;IAE/F,MAAM,cAAc,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AAE;QAC9B,0BAA0B,EAAE,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,EAAE,aACf,eAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,aACrB,MAAC,MAAM,IACH,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,aAE1B,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAI,EACjC,KAAK,IACD,EACT,KAAC,MAAM,IACH,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,WAAW,wBAGZ,EACT,KAAC,cAAc,IAAC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,GAAI,IACzE,EACN,eAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,aACtB,KAAC,MAAM,KAAG,EACV,KAAC,SAAS,IAAC,oBAAoB,EAAE,QAAQ,GAAI,IAC3C,IACJ,CACT,CAAC;AACN,CAAC,CAAC"}
1
+ {"version":3,"file":"QueryEditorControls.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/QueryEditorControls/QueryEditorControls.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAC,IAAI,EAAE,QAAQ,EAAC,MAAM,mBAAmB,CAAC;AAEjD,OAAO,EAAC,MAAM,EAAE,IAAI,EAAE,OAAO,EAAC,MAAM,mBAAmB,CAAC;AAExD,OAAO,wBAAwB,MAAM,0EAA0E,CAAC;AAEhH,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,uBAAuB,EAAC,MAAM,iDAAiD,CAAC;AACxF,OAAO,EAAC,MAAM,EAAC,MAAM,kBAAkB,CAAC;AACxC,OAAO,EAAC,SAAS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,MAAM,OAAO,GAA2B,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/F,MAAM,WAAW,GACb,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC;IAE3D,MAAM,gBAAgB,GAAG,GAAG,EAAE;QAC1B,sBAAsB,EAAE,CAAC;IAC7B,CAAC,CAAC;IAEF,MAAM,oBAAoB,GAAG,GAAG,EAAE;QAC9B,0BAA0B,EAAE,CAAC;IACjC,CAAC,CAAC;IAEF,OAAO,CACH,eAAK,SAAS,EAAE,CAAC,EAAE,aACf,eAAK,SAAS,EAAE,CAAC,CAAC,MAAM,CAAC,aACrB,MAAC,MAAM,IACH,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,OAAO,EACb,SAAS,EAAE,CAAC,CAAC,YAAY,CAAC,aAE1B,KAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,GAAI,EACjC,KAAK,IACD,EACT,KAAC,MAAM,IACH,OAAO,EAAE,oBAAoB,EAC7B,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,SAAS,EAClB,IAAI,EAAE,WAAW,wBAGZ,EACT,KAAC,cAAc,IAAC,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,SAAS,GAAI,IACzE,EACN,eAAK,SAAS,EAAE,CAAC,CAAC,OAAO,CAAC,aACtB,KAAC,MAAM,KAAG,EACV,KAAC,SAAS,IAAC,WAAW,EAAE,EAAC,QAAQ,EAAC,GAAI,IACpC,IACJ,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,7 +1,13 @@
1
+ import type { ButtonProps } from '@gravity-ui/uikit';
1
2
  import './SaveQuery.scss';
2
3
  interface SaveQueryProps {
3
- isSaveButtonDisabled?: boolean;
4
+ buttonProps?: ButtonProps;
4
5
  }
5
- export declare function SaveQuery({ isSaveButtonDisabled }: SaveQueryProps): import("react/jsx-runtime").JSX.Element;
6
- export declare function SaveQueryDialog(): import("react/jsx-runtime").JSX.Element;
6
+ export declare function SaveQueryButton(props: ButtonProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function SaveQuery({ buttonProps }: SaveQueryProps): import("react/jsx-runtime").JSX.Element;
8
+ interface SaveQueryDialogProps {
9
+ onSuccess?: () => void;
10
+ onCancel?: () => void;
11
+ }
12
+ export declare function SaveQueryDialog({ onSuccess, onCancel }: SaveQueryDialogProps): import("react/jsx-runtime").JSX.Element;
7
13
  export {};
@@ -8,20 +8,26 @@ import { useSavedQueries } from '../utils/useSavedQueries';
8
8
  import i18n from './i18n';
9
9
  import './SaveQuery.scss';
10
10
  const b = cn('ydb-save-query');
11
- export function SaveQuery({ isSaveButtonDisabled }) {
11
+ function useSaveQueryHandler() {
12
12
  const dispatch = useTypedDispatch();
13
- const queryNameToEdit = useTypedSelector(selectQueryName);
14
- const onSaveQueryClick = () => {
13
+ const onSaveQueryClick = React.useCallback(() => {
15
14
  dispatch(setQueryAction('save'));
16
15
  dispatch(clearQueryNameToEdit());
17
- };
16
+ }, [dispatch]);
17
+ return onSaveQueryClick;
18
+ }
19
+ export function SaveQueryButton(props) {
20
+ const onSaveQueryClick = useSaveQueryHandler();
21
+ return (_jsx(Button, { onClick: onSaveQueryClick, ...props, children: i18n('action.save') }));
22
+ }
23
+ export function SaveQuery({ buttonProps = {} }) {
24
+ const dispatch = useTypedDispatch();
25
+ const queryNameToEdit = useTypedSelector(selectQueryName);
26
+ const onSaveQueryClick = useSaveQueryHandler();
18
27
  const onEditQueryClick = () => {
19
28
  dispatch(saveQuery(queryNameToEdit));
20
29
  dispatch(clearQueryNameToEdit());
21
30
  };
22
- const renderSaveButton = () => {
23
- return (_jsx(Button, { onClick: onSaveQueryClick, disabled: isSaveButtonDisabled, children: i18n('action.save') }));
24
- };
25
31
  const renderSaveDropdownMenu = () => {
26
32
  const items = [
27
33
  {
@@ -33,11 +39,11 @@ export function SaveQuery({ isSaveButtonDisabled }) {
33
39
  text: i18n('action.save-as-new'),
34
40
  },
35
41
  ];
36
- return (_jsx(DropdownMenu, { items: items, renderSwitcher: (props) => (_jsx(Button, { ...props, disabled: isSaveButtonDisabled, children: i18n('action.edit') })), popupProps: { placement: 'top' } }));
42
+ return (_jsx(DropdownMenu, { items: items, renderSwitcher: (props) => (_jsx(Button, { ...props, ...buttonProps, children: i18n('action.edit') })), popupProps: { placement: 'top' } }));
37
43
  };
38
- return queryNameToEdit ? renderSaveDropdownMenu() : renderSaveButton();
44
+ return queryNameToEdit ? renderSaveDropdownMenu() : _jsx(SaveQueryButton, {});
39
45
  }
40
- export function SaveQueryDialog() {
46
+ export function SaveQueryDialog({ onSuccess, onCancel }) {
41
47
  const savedQueries = useSavedQueries();
42
48
  const dispatch = useTypedDispatch();
43
49
  const queryAction = useTypedSelector(selectQueryAction);
@@ -57,6 +63,10 @@ export function SaveQueryDialog() {
57
63
  setQueryName('');
58
64
  setValidationError(undefined);
59
65
  };
66
+ const onCloseWithoutSave = () => {
67
+ onCancel === null || onCancel === void 0 ? void 0 : onCancel();
68
+ onCloseDialog();
69
+ };
60
70
  const handleQueryNameChange = (value) => {
61
71
  setQueryName(value);
62
72
  setValidationError(undefined);
@@ -64,15 +74,16 @@ export function SaveQueryDialog() {
64
74
  const onSaveClick = () => {
65
75
  dispatch(saveQuery(queryName));
66
76
  onCloseDialog();
77
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess();
67
78
  };
68
- return (_jsxs(Dialog, { open: queryAction === 'save', hasCloseButton: false, size: "s", onClose: onCloseDialog, children: [_jsx(Dialog.Header, { caption: i18n('action.save') }), _jsxs("form", { onSubmit: (e) => {
79
+ return (_jsxs(Dialog, { open: queryAction === 'save', hasCloseButton: false, size: "s", onClose: onCloseWithoutSave, children: [_jsx(Dialog.Header, { caption: i18n('action.save') }), _jsxs("form", { onSubmit: (e) => {
69
80
  e.preventDefault();
70
81
  const validationError = validateQueryName(queryName);
71
82
  setValidationError(validationError);
72
83
  if (!validationError) {
73
84
  onSaveClick();
74
85
  }
75
- }, children: [_jsxs(Dialog.Body, { className: b('dialog-body'), children: [_jsx("div", { className: b('dialog-row'), children: i18n('description') }), _jsxs("div", { className: b('dialog-row'), children: [_jsx("label", { htmlFor: "queryName", className: b('field-title', 'required'), children: i18n('input-label') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(TextInput, { id: "queryName", placeholder: i18n('input-placeholder'), value: queryName, onUpdate: handleQueryNameChange, hasClear: true, autoFocus: true, autoComplete: false, validationState: validationError ? 'invalid' : undefined, errorMessage: validationError }) })] })] }), _jsx(Dialog.Footer, { textButtonApply: i18n('button-apply'), textButtonCancel: i18n('button-cancel'), onClickButtonCancel: onCloseDialog, propsButtonApply: {
86
+ }, children: [_jsxs(Dialog.Body, { className: b('dialog-body'), children: [_jsx("div", { className: b('dialog-row'), children: i18n('description') }), _jsxs("div", { className: b('dialog-row'), children: [_jsx("label", { htmlFor: "queryName", className: b('field-title', 'required'), children: i18n('input-label') }), _jsx("div", { className: b('control-wrapper'), children: _jsx(TextInput, { id: "queryName", placeholder: i18n('input-placeholder'), value: queryName, onUpdate: handleQueryNameChange, hasClear: true, autoFocus: true, autoComplete: false, validationState: validationError ? 'invalid' : undefined, errorMessage: validationError }) })] })] }), _jsx(Dialog.Footer, { textButtonApply: i18n('button-apply'), textButtonCancel: i18n('button-cancel'), onClickButtonCancel: onCloseWithoutSave, propsButtonApply: {
76
87
  type: 'submit',
77
88
  } })] })] }));
78
89
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SaveQuery.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/SaveQuery/SaveQuery.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC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aAAa,CAAC,GAChB,EACR,cAAK,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,YAChC,KAAC,SAAS,IACN,EAAE,EAAC,WAAW,EACd,WAAW,EAAE,IAAI,CAAC,mBAAmB,CAAC,EACtC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,qBAAqB,EAC/B,QAAQ,QACR,SAAS,QACT,YAAY,EAAE,KAAK,EACnB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACxD,YAAY,EAAE,eAAe,GAC/B,GACA,IACJ,IACI,EACd,KAAC,MAAM,CAAC,MAAM,IACV,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,EACrC,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,mBAAmB,EAAE,aAAa,EAClC,gBAAgB,EAAE;4BACd,IAAI,EAAE,QAAQ;yBACjB,GACH,IACC,IACF,CACZ,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"SaveQuery.js","sourceRoot":"","sources":["../../../../../src/containers/Tenant/Query/SaveQuery/SaveQuery.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACH,oBAAoB,EACpB,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,GACjB,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAC,EAAE,EAAC,MAAM,sBAAsB,CAAC;AACxC,OAAO,EAAC,gBAAgB,EAAE,gBAAgB,EAAC,MAAM,yBAAyB,CAAC;AAC3E,OAAO,EAAC,eAAe,EAAC,MAAM,0BAA0B,CAAC;AAEzD,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,kBAAkB,CAAC;AAE1B,MAAM,CAAC,GAAG,EAAE,CAAC,gBAAgB,CAAC,CAAC;AAM/B,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AC,aAAa,EAAE,UAAU,CAAC,YAC7D,IAAI,CAAC,aAAa,CAAC,GAChB,EACR,cAAK,SAAS,EAAE,CAAC,CAAC,iBAAiB,CAAC,YAChC,KAAC,SAAS,IACN,EAAE,EAAC,WAAW,EACd,WAAW,EAAE,IAAI,CAAC,mBAAmB,CAAC,EACtC,KAAK,EAAE,SAAS,EAChB,QAAQ,EAAE,qBAAqB,EAC/B,QAAQ,QACR,SAAS,QACT,YAAY,EAAE,KAAK,EACnB,eAAe,EAAE,eAAe,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,EACxD,YAAY,EAAE,eAAe,GAC/B,GACA,IACJ,IACI,EACd,KAAC,MAAM,CAAC,MAAM,IACV,eAAe,EAAE,IAAI,CAAC,cAAc,CAAC,EACrC,gBAAgB,EAAE,IAAI,CAAC,eAAe,CAAC,EACvC,mBAAmB,EAAE,kBAAkB,EACvC,gBAAgB,EAAE;4BACd,IAAI,EAAE,QAAQ;yBACjB,GACH,IACC,IACF,CACZ,CAAC;AACN,CAAC"}
@@ -12,6 +12,7 @@ import { TENANT_QUERY_TABS_ID } from '../../../../store/reducers/tenant/constant
12
12
  import { setQueryTab } from '../../../../store/reducers/tenant/tenant';
13
13
  import { cn } from '../../../../utils/cn';
14
14
  import { useTypedDispatch, useTypedSelector } from '../../../../utils/hooks';
15
+ import { useChangeInputWithConfirmation } from '../../../../utils/hooks/withConfirmation/useChangeInputWithConfirmation';
15
16
  import { MAX_QUERY_HEIGHT, QUERY_TABLE_SETTINGS } from '../../utils/constants';
16
17
  import i18n from '../i18n';
17
18
  import { useSavedQueries } from '../utils/useSavedQueries';
@@ -39,11 +40,12 @@ export const SavedQueries = ({ changeUserInput }) => {
39
40
  dispatch(deleteSavedQuery(queryNameToDelete));
40
41
  setQueryNameToDelete('');
41
42
  };
42
- const onQueryClick = (queryText, queryName) => {
43
+ const applyQueryClick = React.useCallback(({ queryText, queryName }) => {
43
44
  changeUserInput({ input: queryText });
44
45
  dispatch(setQueryNameToEdit(queryName));
45
46
  dispatch(setQueryTab(TENANT_QUERY_TABS_ID.newQuery));
46
- };
47
+ }, [changeUserInput, dispatch]);
48
+ const onQueryClick = useChangeInputWithConfirmation(applyQueryClick);
47
49
  const onDeleteQueryClick = (queryName) => {
48
50
  return (event) => {
49
51
  event.stopPropagation();
@@ -69,7 +71,10 @@ export const SavedQueries = ({ changeUserInput }) => {
69
71
  resizeMinWidth: 650,
70
72
  },
71
73
  ];
72
- return (_jsxs(React.Fragment, { children: [_jsxs(TableWithControlsLayout, { className: b(), children: [_jsx(TableWithControlsLayout.Controls, { children: _jsx(Search, { onChange: onChangeFilter, placeholder: i18n('filter.text.placeholder'), className: b('search') }) }), _jsx(TableWithControlsLayout.Table, { children: _jsx(ResizeableDataTable, { columnsWidthLSKey: SAVED_QUERIES_COLUMNS_WIDTH_LS_KEY, columns: columns, data: savedQueries, settings: QUERY_TABLE_SETTINGS, emptyDataMessage: i18n(filter ? 'history.empty-search' : 'saved.empty'), rowClassName: () => b('row'), onRowClick: (row) => onQueryClick(row.body, row.name), initialSortOrder: {
74
+ return (_jsxs(React.Fragment, { children: [_jsxs(TableWithControlsLayout, { className: b(), children: [_jsx(TableWithControlsLayout.Controls, { children: _jsx(Search, { onChange: onChangeFilter, placeholder: i18n('filter.text.placeholder'), className: b('search') }) }), _jsx(TableWithControlsLayout.Table, { children: _jsx(ResizeableDataTable, { columnsWidthLSKey: SAVED_QUERIES_COLUMNS_WIDTH_LS_KEY, columns: columns, data: savedQueries, settings: QUERY_TABLE_SETTINGS, emptyDataMessage: i18n(filter ? 'history.empty-search' : 'saved.empty'), rowClassName: () => b('row'), onRowClick: (row) => onQueryClick({
75
+ queryText: row.body,
76
+ queryName: row.name,
77
+ }), initialSortOrder: {
73
78
  columnId: 'name',
74
79
  order: DataTable.ASCENDING,
75
80
  } }) })] }), _jsx(DeleteDialog, { visible: isDeleteDialogVisible, queryName: queryNameToDelete, onCancelClick: onCancelDeleteClick, onConfirmClick: onConfirmDeleteClick })] }));