@finos/legend-query-builder 4.14.18 → 4.14.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (133) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +5 -3
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
  5. package/lib/components/QueryBuilderConstantExpressionPanel.js +71 -45
  6. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  7. package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
  8. package/lib/components/QueryBuilderDiffPanel.js +2 -1
  9. package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
  10. package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
  11. package/lib/components/QueryBuilderParametersPanel.js +25 -26
  12. package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
  13. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +11 -2
  14. package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
  15. package/lib/components/QueryBuilderPropertyExpressionEditor.js +35 -10
  16. package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
  17. package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
  18. package/lib/components/QueryBuilderSideBar.js +6 -1
  19. package/lib/components/QueryBuilderSideBar.js.map +1 -1
  20. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  21. package/lib/components/QueryBuilderTextEditor.js +3 -3
  22. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  23. package/lib/components/QueryLoader.d.ts.map +1 -1
  24. package/lib/components/QueryLoader.js +90 -39
  25. package/lib/components/QueryLoader.js.map +1 -1
  26. package/lib/components/QueryUsageViewer.d.ts.map +1 -1
  27. package/lib/components/QueryUsageViewer.js +2 -2
  28. package/lib/components/QueryUsageViewer.js.map +1 -1
  29. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +2 -0
  30. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
  31. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +19 -2
  32. package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
  33. package/lib/components/data-access/DataAccessOverview.d.ts.map +1 -1
  34. package/lib/components/data-access/DataAccessOverview.js +6 -1
  35. package/lib/components/data-access/DataAccessOverview.js.map +1 -1
  36. package/lib/components/execution-plan/ExecutionPlanViewer.d.ts.map +1 -1
  37. package/lib/components/execution-plan/ExecutionPlanViewer.js +6 -6
  38. package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
  39. package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
  40. package/lib/components/explorer/QueryBuilderExplorerPanel.js +3 -2
  41. package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
  42. package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
  43. package/lib/components/explorer/QueryBuilderMilestoningEditor.js +3 -2
  44. package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
  45. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
  46. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +6 -3
  47. package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
  48. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  49. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +4 -3
  50. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  51. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  52. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +11 -22
  53. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  54. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
  55. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +2 -2
  56. package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
  57. package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
  58. package/lib/components/result/QueryBuilderResultPanel.js +2 -1
  59. package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
  60. package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
  61. package/lib/components/result/tds/QueryBuilderTDSGridResult.js +5 -1
  62. package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
  63. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts.map +1 -1
  64. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +11 -2
  65. package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
  66. package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
  67. package/lib/components/shared/BasicValueSpecificationEditor.js +25 -22
  68. package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
  69. package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
  70. package/lib/components/shared/CustomDatePicker.js +8 -5
  71. package/lib/components/shared/CustomDatePicker.js.map +1 -1
  72. package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
  73. package/lib/components/shared/LambdaEditor.js +17 -3
  74. package/lib/components/shared/LambdaEditor.js.map +1 -1
  75. package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
  76. package/lib/components/shared/LambdaParameterValuesEditor.js +2 -2
  77. package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
  78. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts +6 -0
  79. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
  80. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +40 -3
  81. package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
  82. package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
  83. package/lib/components/watermark/QueryBuilderWatermark.js +28 -12
  84. package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
  85. package/lib/index.css +17 -1
  86. package/lib/index.css.map +1 -1
  87. package/lib/package.json +1 -1
  88. package/lib/stores/QueryBuilderConstantsState.d.ts +1 -0
  89. package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
  90. package/lib/stores/QueryBuilderConstantsState.js +7 -1
  91. package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
  92. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +24 -1
  93. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
  94. package/lib/stores/QueryLoaderState.d.ts +14 -4
  95. package/lib/stores/QueryLoaderState.d.ts.map +1 -1
  96. package/lib/stores/QueryLoaderState.js +35 -5
  97. package/lib/stores/QueryLoaderState.js.map +1 -1
  98. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +1 -2
  99. package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
  100. package/lib/stores/watermark/QueryBuilderWatermarkState.js +2 -12
  101. package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
  102. package/package.json +8 -8
  103. package/src/components/QueryBuilder.tsx +14 -2
  104. package/src/components/QueryBuilderConstantExpressionPanel.tsx +145 -69
  105. package/src/components/QueryBuilderDiffPanel.tsx +10 -2
  106. package/src/components/QueryBuilderParametersPanel.tsx +42 -37
  107. package/src/components/QueryBuilderPropertyExpressionEditor.tsx +87 -24
  108. package/src/components/QueryBuilderSideBar.tsx +20 -0
  109. package/src/components/QueryBuilderTextEditor.tsx +6 -4
  110. package/src/components/QueryLoader.tsx +291 -130
  111. package/src/components/QueryUsageViewer.tsx +7 -1
  112. package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +40 -4
  113. package/src/components/data-access/DataAccessOverview.tsx +9 -1
  114. package/src/components/execution-plan/ExecutionPlanViewer.tsx +11 -8
  115. package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -2
  116. package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +5 -2
  117. package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +12 -5
  118. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +8 -4
  119. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +56 -72
  120. package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +8 -2
  121. package/src/components/result/QueryBuilderResultPanel.tsx +8 -1
  122. package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +6 -3
  123. package/src/components/result/tds/QueryBuilderTDSSimpleGridResult.tsx +14 -4
  124. package/src/components/shared/BasicValueSpecificationEditor.tsx +39 -25
  125. package/src/components/shared/CustomDatePicker.tsx +18 -5
  126. package/src/components/shared/LambdaEditor.tsx +27 -11
  127. package/src/components/shared/LambdaParameterValuesEditor.tsx +4 -1
  128. package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +115 -64
  129. package/src/components/watermark/QueryBuilderWatermark.tsx +60 -19
  130. package/src/stores/QueryBuilderConstantsState.ts +12 -0
  131. package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +39 -1
  132. package/src/stores/QueryLoaderState.ts +64 -12
  133. package/src/stores/watermark/QueryBuilderWatermarkState.ts +2 -12
@@ -148,11 +148,13 @@ export const ExecutionPlanViewerPanelContent: React.FC<{
148
148
  executionPlanState: ExecutionPlanState;
149
149
  }> = observer((props) => {
150
150
  const { executionPlanState } = props;
151
- const applicationStore = executionPlanState.applicationStore;
152
151
  const globalImplementationSupport =
153
152
  executionPlanState.plan?.globalImplementationSupport;
154
153
  const templateFunctions =
155
154
  executionPlanState.plan?.processingTemplateFunctions ?? [];
155
+ const isDarkMode =
156
+ !executionPlanState.applicationStore.layoutService
157
+ .TEMPORARY__isLightColorThemeEnabled;
156
158
 
157
159
  if (
158
160
  globalImplementationSupport &&
@@ -210,10 +212,7 @@ export const ExecutionPlanViewerPanelContent: React.FC<{
210
212
  <ResizablePanelGroup orientation="vertical">
211
213
  <ResizablePanel minSize={30} size={400}>
212
214
  <PanelContent
213
- darkMode={
214
- !applicationStore.layoutService
215
- .TEMPORARY__isLightColorThemeEnabled
216
- }
215
+ darkMode={isDarkMode}
217
216
  className="query-builder__java__container__panel"
218
217
  >
219
218
  <div className="query-builder__java__container">
@@ -773,7 +772,7 @@ const ExecutionPlanViewerContent = observer(
773
772
  <ResizablePanel size={300} minSize={300}>
774
773
  <div className="panel execution-plan-viewer__explorer">
775
774
  <PanelSideBarHeader
776
- darkMode={true}
775
+ darkMode={isDarkMode}
777
776
  title="execution plan explorer"
778
777
  />
779
778
  <div className="panel__content execution-plan-viewer__explorer__content__container">
@@ -846,7 +845,7 @@ export const ExecutionPlanViewer = observer(
846
845
  paper: 'editor-modal__content',
847
846
  }}
848
847
  >
849
- <Modal className="editor-modal" darkMode={true}>
848
+ <Modal className="editor-modal" darkMode={isDarkMode}>
850
849
  <ModalHeader title="Execution Plan" />
851
850
  <ModalBody>
852
851
  {executionPlanState.debugText ? (
@@ -891,7 +890,11 @@ export const ExecutionPlanViewer = observer(
891
890
  )}
892
891
  </ModalBody>
893
892
  <ModalFooter>
894
- <ModalFooterButton onClick={closePlanViewer} text="Close" />
893
+ <ModalFooterButton
894
+ onClick={closePlanViewer}
895
+ text="Close"
896
+ type="secondary"
897
+ />
895
898
  </ModalFooter>
896
899
  </Modal>
897
900
  </Dialog>
@@ -217,6 +217,7 @@ export const QueryBuilderSubclassInfoTooltip: React.FC<{
217
217
  const QueryBuilderExplorerPreviewDataModal = observer(
218
218
  (props: { queryBuilderState: QueryBuilderState }) => {
219
219
  const { queryBuilderState } = props;
220
+ const applicationStore = queryBuilderState.applicationStore;
220
221
  const previewDataState = queryBuilderState.explorerState.previewDataState;
221
222
  const close = (): void => previewDataState.setPreviewData(undefined);
222
223
 
@@ -234,7 +235,9 @@ const QueryBuilderExplorerPreviewDataModal = observer(
234
235
  }}
235
236
  >
236
237
  <Modal
237
- darkMode={true}
238
+ darkMode={
239
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
240
+ }
238
241
  className="editor-modal query-builder__explorer__preview-data-modal"
239
242
  >
240
243
  <ModalHeader title={prettyCONSTName(previewDataState.propertyName)} />
@@ -276,7 +279,7 @@ const QueryBuilderExplorerPreviewDataModal = observer(
276
279
  )}
277
280
  </ModalBody>
278
281
  <ModalFooter>
279
- <ModalFooterButton text="Close" onClick={close} />
282
+ <ModalFooterButton text="Close" onClick={close} type="secondary" />
280
283
  </ModalFooter>
281
284
  </Modal>
282
285
  </Dialog>
@@ -281,6 +281,7 @@ const AllVersionsInRangelMilestoningParametersEditor = observer(
281
281
  export const MilestoningParametersEditor = observer(
282
282
  (props: { queryBuilderState: QueryBuilderState }) => {
283
283
  const { queryBuilderState } = props;
284
+ const applicationStore = queryBuilderState.applicationStore;
284
285
  const milestoningState = queryBuilderState.milestoningState;
285
286
  const close = (): void => milestoningState.setShowMilestoningEditor(false);
286
287
  const isCompatibleMilestoningParameter = (
@@ -302,7 +303,9 @@ export const MilestoningParametersEditor = observer(
302
303
  }}
303
304
  >
304
305
  <Modal
305
- darkMode={true}
306
+ darkMode={
307
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
308
+ }
306
309
  className="editor-modal query-builder__variables__modal"
307
310
  >
308
311
  <ModalHeader title="Milestoning Parameters" />
@@ -352,7 +355,7 @@ export const MilestoningParametersEditor = observer(
352
355
  </div>
353
356
  </ModalBody>
354
357
  <ModalFooter>
355
- <ModalFooterButton text="Close" onClick={close} />
358
+ <ModalFooterButton text="Close" onClick={close} type="secondary" />
356
359
  </ModalFooter>
357
360
  </Modal>
358
361
  </Dialog>
@@ -346,12 +346,13 @@ const PureSerializationConfigModal = observer(
346
346
  onClick={removeConfig}
347
347
  />
348
348
  )}
349
- <button
350
- className="btn modal__footer__close-btn btn--dark"
349
+ <ModalFooterButton
350
+ className="modal__footer__close-btn"
351
351
  onClick={handleAction}
352
+ type={toAdd ? 'primary' : 'secondary'}
352
353
  >
353
354
  {toAdd ? 'Add Config' : 'Close'}
354
- </button>
355
+ </ModalFooterButton>
355
356
  </ModalFooter>
356
357
  </Modal>
357
358
  </Dialog>
@@ -379,6 +380,7 @@ export const QueryBuilderGraphFetchExternalConfig = observer(
379
380
  value: serializationState.targetBinding,
380
381
  label: serializationState.targetBinding.name,
381
382
  };
383
+ const applicationStore = graphFetchState.queryBuilderState.applicationStore;
382
384
  const onBindingChange = (
383
385
  val: PackageableElementOption<Binding> | null,
384
386
  ): void => {
@@ -423,9 +425,14 @@ export const QueryBuilderGraphFetchExternalConfig = observer(
423
425
  onChange={onBindingChange}
424
426
  value={selectedBinding}
425
427
  formatOptionLabel={getBindingFormatter({
426
- darkMode: true,
428
+ darkMode:
429
+ !applicationStore.layoutService
430
+ .TEMPORARY__isLightColorThemeEnabled,
427
431
  })}
428
- darkMode={true}
432
+ darkMode={
433
+ !applicationStore.layoutService
434
+ .TEMPORARY__isLightColorThemeEnabled
435
+ }
429
436
  />
430
437
  </div>
431
438
  <div className="service-execution-editor__configuration__item">
@@ -227,8 +227,10 @@ const cloneSortColumnStateArray = (
227
227
 
228
228
  export const QueryResultModifierModal = observer(
229
229
  (props: { tdsState: QueryBuilderTDSState }) => {
230
- // Read current state
231
230
  const { tdsState } = props;
231
+ const applicationStore = tdsState.queryBuilderState.applicationStore;
232
+
233
+ // Read current state
232
234
  const resultSetModifierState = tdsState.resultSetModifierState;
233
235
  const stateSortColumns = resultSetModifierState.sortColumns;
234
236
  const stateDistinct = resultSetModifierState.distinct;
@@ -331,7 +333,9 @@ export const QueryResultModifierModal = observer(
331
333
  data-testid={QUERY_BUILDER_TEST_ID.QUERY_BUILDER_RESULT_MODIFIER_PANEL}
332
334
  >
333
335
  <Modal
334
- darkMode={true}
336
+ darkMode={
337
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
338
+ }
335
339
  className="editor-modal query-builder__projection__modal"
336
340
  >
337
341
  <ModalHeader title="Result Set Modifier" />
@@ -403,7 +407,7 @@ export const QueryResultModifierModal = observer(
403
407
  <div className="query-builder__result__slice__input__wrapper">
404
408
  <InputWithInlineValidation
405
409
  id="query-builder__projection__modal__slice-start-input"
406
- className="input--dark query-builder__result__slice__input"
410
+ className="input--dark query-builder__result__slice__input panel__content__form__section__input"
407
411
  spellCheck={false}
408
412
  value={slice[0] ?? ''}
409
413
  onChange={changeSliceStart}
@@ -414,7 +418,7 @@ export const QueryResultModifierModal = observer(
414
418
  <div className="query-builder__result__slice__range">..</div>
415
419
  <div className="query-builder__result__slice__input__wrapper">
416
420
  <InputWithInlineValidation
417
- className="input--dark query-builder__result__slice__input"
421
+ className="input--dark query-builder__result__slice__input panel__content__form__section__input"
418
422
  spellCheck={false}
419
423
  value={slice[1] ?? ''}
420
424
  onChange={changeSliceEnd}
@@ -14,18 +14,25 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- import { useEffect, useRef, useCallback, useState, forwardRef } from 'react';
17
+ import {
18
+ useEffect,
19
+ useRef,
20
+ useCallback,
21
+ useState,
22
+ forwardRef,
23
+ type ChangeEvent,
24
+ } from 'react';
18
25
  import { observer } from 'mobx-react-lite';
19
26
  import {
20
27
  clsx,
21
28
  BlankPanelPlaceholder,
29
+ CalculatorIcon,
22
30
  TimesIcon,
23
31
  DropdownMenu,
24
32
  MenuContent,
25
33
  MenuContentItem,
26
34
  CaretDownIcon,
27
35
  ContextMenu,
28
- InputWithInlineValidation,
29
36
  SigmaIcon,
30
37
  PanelDropZone,
31
38
  DragPreviewLayer,
@@ -34,7 +41,6 @@ import {
34
41
  PanelContent,
35
42
  TrashIcon,
36
43
  PanelDnDEntry,
37
- PanelEntryDragHandle,
38
44
  CalendarIcon,
39
45
  CalendarClockIcon,
40
46
  CustomSelectorInput,
@@ -62,7 +68,10 @@ import {
62
68
  QueryBuilderSimpleProjectionColumnState,
63
69
  QUERY_BUILDER_PROJECTION_COLUMN_DND_TYPE,
64
70
  } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
65
- import { QueryBuilderPropertyExpressionBadge } from '../QueryBuilderPropertyExpressionEditor.js';
71
+ import {
72
+ QueryBuilderEditablePropertyName,
73
+ QueryBuilderPropertyExpressionBadge,
74
+ } from '../QueryBuilderPropertyExpressionEditor.js';
66
75
  import { QueryResultModifierModal } from './QueryBuilderResultModifierPanel.js';
67
76
  import { QUERY_BUILDER_TEST_ID } from '../../__lib__/QueryBuilderTesting.js';
68
77
  import { flowResult } from 'mobx';
@@ -110,7 +119,10 @@ import {
110
119
  } from '../../stores/QueryBuilderPropertyEditorState.js';
111
120
  import { generateDefaultValueForPrimitiveType } from '../../stores/QueryBuilderValueSpecificationHelper.js';
112
121
  import { QUERY_BUILDER_CALENDAR_TYPE } from '../../graph-manager/QueryBuilderConst.js';
113
- import { QueryBuilderPropertyInfoTooltip } from '../shared/QueryBuilderPropertyInfoTooltip.js';
122
+ import {
123
+ QueryBuilderDerivationInfoTooltip,
124
+ QueryBuilderPropertyInfoTooltip,
125
+ } from '../shared/QueryBuilderPropertyInfoTooltip.js';
114
126
 
115
127
  const QueryBuilderProjectionColumnContextMenu = observer(
116
128
  forwardRef<
@@ -149,10 +161,10 @@ const QueryBuilderProjectionColumnContextMenu = observer(
149
161
  const QueryBuilderSimpleProjectionColumnEditor = observer(
150
162
  (props: {
151
163
  projectionColumnState: QueryBuilderSimpleProjectionColumnState;
152
- setIsEditingColumnName: (isEditing: boolean) => void;
153
- error?: boolean | undefined;
164
+ changeColumnName: (event: ChangeEvent<HTMLInputElement>) => void;
165
+ error?: string | undefined;
154
166
  }) => {
155
- const { projectionColumnState, setIsEditingColumnName, error } = props;
167
+ const { projectionColumnState, changeColumnName, error } = props;
156
168
  const onPropertyExpressionChange = (
157
169
  node: QueryBuilderExplorerTreePropertyNodeData,
158
170
  ): void =>
@@ -163,17 +175,13 @@ const QueryBuilderSimpleProjectionColumnEditor = observer(
163
175
  );
164
176
 
165
177
  return (
166
- <div className="query-builder__projection__column__value__property">
167
- <QueryBuilderPropertyExpressionBadge
168
- columnName={projectionColumnState.columnName}
169
- propertyExpressionState={
170
- projectionColumnState.propertyExpressionState
171
- }
172
- onPropertyExpressionChange={onPropertyExpressionChange}
173
- setIsEditingColumnName={setIsEditingColumnName}
174
- error={error}
175
- />
176
- </div>
178
+ <QueryBuilderPropertyExpressionBadge
179
+ columnName={projectionColumnState.columnName}
180
+ propertyExpressionState={projectionColumnState.propertyExpressionState}
181
+ onPropertyExpressionChange={onPropertyExpressionChange}
182
+ changeColumnName={changeColumnName}
183
+ error={error}
184
+ />
177
185
  );
178
186
  },
179
187
  );
@@ -388,13 +396,6 @@ const QueryBuilderProjectionColumnEditor = observer(
388
396
  ) => projectionColumnState.setColumnName(event.target.value);
389
397
  const isDuplicatedColumnName =
390
398
  projectionColumnState.tdsState.isDuplicateColumn(projectionColumnState);
391
- const [isEditingColumnName, setIsEditingColumnName] = useState(false);
392
- const columnNameInputRef = useRef<HTMLInputElement>(null);
393
- useEffect(() => {
394
- if (isEditingColumnName) {
395
- columnNameInputRef.current?.focus();
396
- }
397
- }, [isEditingColumnName, columnNameInputRef]);
398
399
 
399
400
  // aggregation
400
401
  const aggregateColumnState = tdsState.aggregationState.columns.find(
@@ -705,6 +706,7 @@ const QueryBuilderProjectionColumnEditor = observer(
705
706
  }),
706
707
  [handleDrop],
707
708
  );
709
+
708
710
  return (
709
711
  <PanelDnDEntry
710
712
  ref={ref}
@@ -752,13 +754,12 @@ const QueryBuilderProjectionColumnEditor = observer(
752
754
  data-testid={
753
755
  QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS_PROJECTION_COLUMN
754
756
  }
755
- className="query-builder__projection__column__container"
757
+ ref={dragHandleRef}
758
+ className={clsx('query-builder__projection__column__container', {
759
+ 'query-builder__projection__column__container--dragging':
760
+ projectionColumnBeingDragged !== undefined,
761
+ })}
756
762
  >
757
- <PanelEntryDragHandle
758
- isDragging={false}
759
- dragSourceConnector={dragHandleRef}
760
- className="query-builder__projection__column__drag-handle__container"
761
- />
762
763
  {projectionColumnState instanceof
763
764
  QueryBuilderSimpleProjectionColumnState && (
764
765
  <>
@@ -783,55 +784,38 @@ const QueryBuilderProjectionColumnEditor = observer(
783
784
  <InfoCircleIcon />
784
785
  </div>
785
786
  </QueryBuilderPropertyInfoTooltip>
786
- {isEditingColumnName ? (
787
- <div className="query-builder__projection__column__name">
788
- <InputWithInlineValidation
789
- className="query-builder__projection__column__name__input input-group__input"
790
- spellCheck={false}
791
- value={projectionColumnState.columnName}
792
- onChange={changeColumnName}
793
- onKeyDown={(
794
- event: React.KeyboardEvent<HTMLInputElement>,
795
- ) => {
796
- if (event.key === 'Enter') {
797
- setIsEditingColumnName(false);
798
- }
799
- }}
800
- onBlur={() => {
801
- setIsEditingColumnName(false);
802
- }}
803
- error={
804
- isDuplicatedColumnName ? 'Duplicated column' : undefined
805
- }
806
- ref={columnNameInputRef}
807
- />
808
- </div>
809
- ) : (
810
- <div className="query-builder__projection__column__value">
811
- <QueryBuilderSimpleProjectionColumnEditor
812
- projectionColumnState={projectionColumnState}
813
- setIsEditingColumnName={setIsEditingColumnName}
814
- error={isDuplicatedColumnName}
815
- />
816
- </div>
817
- )}
787
+ <div className="query-builder__projection__column__value">
788
+ <QueryBuilderSimpleProjectionColumnEditor
789
+ projectionColumnState={projectionColumnState}
790
+ changeColumnName={changeColumnName}
791
+ error={
792
+ isDuplicatedColumnName ? 'Duplicated column' : undefined
793
+ }
794
+ />
795
+ </div>
818
796
  </>
819
797
  )}
820
798
  {projectionColumnState instanceof
821
799
  QueryBuilderDerivationProjectionColumnState && (
822
800
  <>
823
- <div className="query-builder__projection__column__name query-builder__projection__column__name__derivation">
824
- <InputWithInlineValidation
825
- className="query-builder__projection__column__name__input input-group__input"
826
- spellCheck={false}
827
- value={projectionColumnState.columnName}
828
- onChange={changeColumnName}
801
+ <QueryBuilderDerivationInfoTooltip
802
+ title={projectionColumnState.columnName}
803
+ type={projectionColumnState.returnType}
804
+ placement="bottom-start"
805
+ >
806
+ <div className="query-builder-property-expression-badge__property__info">
807
+ <CalculatorIcon />
808
+ </div>
809
+ </QueryBuilderDerivationInfoTooltip>
810
+ <div className="query-builder__projection__column__value">
811
+ <QueryBuilderEditablePropertyName
812
+ columnName={projectionColumnState.columnName}
813
+ changeColumnName={changeColumnName}
829
814
  error={
830
815
  isDuplicatedColumnName ? 'Duplicated column' : undefined
831
816
  }
817
+ title={projectionColumnState.columnName}
832
818
  />
833
- </div>
834
- <div className="query-builder__projection__column__value">
835
819
  <QueryBuilderDerivationProjectionColumnEditor
836
820
  projectionColumnState={projectionColumnState}
837
821
  />
@@ -274,7 +274,9 @@ const QueryBuilderWindowColumnModalEditor = observer(
274
274
  }}
275
275
  >
276
276
  <Modal
277
- darkMode={true}
277
+ darkMode={
278
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled
279
+ }
278
280
  className={clsx([
279
281
  'query-builder__olap__modal',
280
282
  {
@@ -525,7 +527,11 @@ const QueryBuilderWindowColumnModalEditor = observer(
525
527
  {createNewWindow ? (
526
528
  <ModalFooterButton text="Create" onClick={create} />
527
529
  ) : (
528
- <ModalFooterButton text="Close" onClick={close} />
530
+ <ModalFooterButton
531
+ text="Close"
532
+ onClick={close}
533
+ type="secondary"
534
+ />
529
535
  )}
530
536
  </ModalFooter>
531
537
  </Modal>
@@ -316,7 +316,13 @@ export const QueryBuilderResultPanel = observer(
316
316
  open={Boolean(showSqlModal)}
317
317
  onClose={() => setShowSqlModal(false)}
318
318
  >
319
- <Modal className="editor-modal" darkMode={true}>
319
+ <Modal
320
+ className="editor-modal"
321
+ darkMode={
322
+ !applicationStore.layoutService
323
+ .TEMPORARY__isLightColorThemeEnabled
324
+ }
325
+ >
320
326
  <ModalHeader title="Executed SQL Query" />
321
327
  <ModalBody className="query-builder__sql__modal">
322
328
  <>
@@ -340,6 +346,7 @@ export const QueryBuilderResultPanel = observer(
340
346
  <ModalFooterButton
341
347
  onClick={() => setShowSqlModal(false)}
342
348
  text="Close"
349
+ type="secondary"
343
350
  />
344
351
  </ModalFooter>
345
352
  </Modal>
@@ -230,6 +230,8 @@ export const QueryBuilderTDSGridResult = observer(
230
230
  const colDefs = isLocalModeEnabled
231
231
  ? getLocalColDefs(executionResult, resultState)
232
232
  : getColDefs(executionResult, resultState);
233
+ const darkMode =
234
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
233
235
 
234
236
  const onSaveGridColumnState = (): void => {
235
237
  if (!columnAPi) {
@@ -338,9 +340,10 @@ export const QueryBuilderTDSGridResult = observer(
338
340
  className="query-builder__result__values__table"
339
341
  >
340
342
  <div
341
- className={clsx(
342
- 'ag-theme-balham-dark query-builder__result__tds-grid',
343
- )}
343
+ className={clsx('query-builder__result__tds-grid', {
344
+ 'ag-theme-balham': !darkMode,
345
+ 'ag-theme-balham-dark': darkMode,
346
+ })}
344
347
  >
345
348
  {isLocalModeEnabled ? (
346
349
  <DataGrid
@@ -49,6 +49,9 @@ const QueryResultCellRenderer = observer(
49
49
  resultState.queryBuilderState.fetchStructureState.implementation;
50
50
  const applicationStore = resultState.queryBuilderState.applicationStore;
51
51
  const cellValue = params.value as QueryBuilderTDSResultCellDataType;
52
+ const darkMode =
53
+ !applicationStore.layoutService.TEMPORARY__isLightColorThemeEnabled;
54
+
52
55
  const formattedCellValue = (): QueryBuilderTDSResultCellDataType => {
53
56
  if (isNumber(cellValue)) {
54
57
  return Intl.NumberFormat(DEFAULT_LOCALE, {
@@ -311,7 +314,10 @@ const QueryResultCellRenderer = observer(
311
314
  !resultState.mousedOverCell
312
315
  }
313
316
  menuProps={{ elevation: 7 }}
314
- className={clsx('ag-theme-balham-dark query-builder__result__tds-grid')}
317
+ className={clsx('query-builder__result__tds-grid', {
318
+ 'ag-theme-balham': !darkMode,
319
+ 'ag-theme-balham-dark': darkMode,
320
+ })}
315
321
  >
316
322
  <div
317
323
  className={clsx('query-builder__result__values__table__cell', {
@@ -342,6 +348,9 @@ export const QueryBuilderTDSSimpleGridResult = observer(
342
348
  }) => {
343
349
  const { executionResult, queryBuilderState } = props;
344
350
  const resultState = queryBuilderState.resultState;
351
+ const darkMode =
352
+ !queryBuilderState.applicationStore.layoutService
353
+ .TEMPORARY__isLightColorThemeEnabled;
345
354
  const colDefs = executionResult.result.columns.map(
346
355
  (colName) =>
347
356
  ({
@@ -364,9 +373,10 @@ export const QueryBuilderTDSSimpleGridResult = observer(
364
373
  className="query-builder__result__values__table"
365
374
  >
366
375
  <div
367
- className={clsx(
368
- 'ag-theme-balham-dark query-builder__result__tds-grid',
369
- )}
376
+ className={clsx('query-builder__result__tds-grid', {
377
+ 'ag-theme-balham': !darkMode,
378
+ 'ag-theme-balham-dark': darkMode,
379
+ })}
370
380
  >
371
381
  <DataGrid
372
382
  rowData={getRowDataFromExecutionResult(executionResult)}