@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.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +5 -3
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderConstantExpressionPanel.js +71 -45
- package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderDiffPanel.js +2 -1
- package/lib/components/QueryBuilderDiffPanel.js.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderParametersPanel.js +25 -26
- package/lib/components/QueryBuilderParametersPanel.js.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts +11 -2
- package/lib/components/QueryBuilderPropertyExpressionEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderPropertyExpressionEditor.js +35 -10
- package/lib/components/QueryBuilderPropertyExpressionEditor.js.map +1 -1
- package/lib/components/QueryBuilderSideBar.d.ts.map +1 -1
- package/lib/components/QueryBuilderSideBar.js +6 -1
- package/lib/components/QueryBuilderSideBar.js.map +1 -1
- package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
- package/lib/components/QueryBuilderTextEditor.js +3 -3
- package/lib/components/QueryBuilderTextEditor.js.map +1 -1
- package/lib/components/QueryLoader.d.ts.map +1 -1
- package/lib/components/QueryLoader.js +90 -39
- package/lib/components/QueryLoader.js.map +1 -1
- package/lib/components/QueryUsageViewer.d.ts.map +1 -1
- package/lib/components/QueryUsageViewer.js +2 -2
- package/lib/components/QueryUsageViewer.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +2 -0
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +19 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/data-access/DataAccessOverview.d.ts.map +1 -1
- package/lib/components/data-access/DataAccessOverview.js +6 -1
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.d.ts.map +1 -1
- package/lib/components/execution-plan/ExecutionPlanViewer.js +6 -6
- package/lib/components/execution-plan/ExecutionPlanViewer.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +3 -2
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js +3 -2
- package/lib/components/explorer/QueryBuilderMilestoningEditor.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js +6 -3
- package/lib/components/fetch-structure/QueryBuilderGraphFetchTreePanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +4 -3
- package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +11 -22
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js +2 -2
- package/lib/components/fetch-structure/QueryBuilderTDSWindowPanel.js.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/result/QueryBuilderResultPanel.js +2 -1
- package/lib/components/result/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js +5 -1
- package/lib/components/result/tds/QueryBuilderTDSGridResult.js.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.d.ts.map +1 -1
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js +11 -2
- package/lib/components/result/tds/QueryBuilderTDSSimpleGridResult.js.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.d.ts.map +1 -1
- package/lib/components/shared/BasicValueSpecificationEditor.js +25 -22
- package/lib/components/shared/BasicValueSpecificationEditor.js.map +1 -1
- package/lib/components/shared/CustomDatePicker.d.ts.map +1 -1
- package/lib/components/shared/CustomDatePicker.js +8 -5
- package/lib/components/shared/CustomDatePicker.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +17 -3
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaParameterValuesEditor.js +2 -2
- package/lib/components/shared/LambdaParameterValuesEditor.js.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts +6 -0
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.d.ts.map +1 -1
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js +40 -3
- package/lib/components/shared/QueryBuilderPropertyInfoTooltip.js.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.d.ts.map +1 -1
- package/lib/components/watermark/QueryBuilderWatermark.js +28 -12
- package/lib/components/watermark/QueryBuilderWatermark.js.map +1 -1
- package/lib/index.css +17 -1
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderConstantsState.d.ts +1 -0
- package/lib/stores/QueryBuilderConstantsState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderConstantsState.js +7 -1
- package/lib/stores/QueryBuilderConstantsState.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +24 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/QueryLoaderState.d.ts +14 -4
- package/lib/stores/QueryLoaderState.d.ts.map +1 -1
- package/lib/stores/QueryLoaderState.js +35 -5
- package/lib/stores/QueryLoaderState.js.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts +1 -2
- package/lib/stores/watermark/QueryBuilderWatermarkState.d.ts.map +1 -1
- package/lib/stores/watermark/QueryBuilderWatermarkState.js +2 -12
- package/lib/stores/watermark/QueryBuilderWatermarkState.js.map +1 -1
- package/package.json +8 -8
- package/src/components/QueryBuilder.tsx +14 -2
- package/src/components/QueryBuilderConstantExpressionPanel.tsx +145 -69
- package/src/components/QueryBuilderDiffPanel.tsx +10 -2
- package/src/components/QueryBuilderParametersPanel.tsx +42 -37
- package/src/components/QueryBuilderPropertyExpressionEditor.tsx +87 -24
- package/src/components/QueryBuilderSideBar.tsx +20 -0
- package/src/components/QueryBuilderTextEditor.tsx +6 -4
- package/src/components/QueryLoader.tsx +291 -130
- package/src/components/QueryUsageViewer.tsx +7 -1
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +40 -4
- package/src/components/data-access/DataAccessOverview.tsx +9 -1
- package/src/components/execution-plan/ExecutionPlanViewer.tsx +11 -8
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +5 -2
- package/src/components/explorer/QueryBuilderMilestoningEditor.tsx +5 -2
- package/src/components/fetch-structure/QueryBuilderGraphFetchTreePanel.tsx +12 -5
- package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +8 -4
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +56 -72
- package/src/components/fetch-structure/QueryBuilderTDSWindowPanel.tsx +8 -2
- package/src/components/result/QueryBuilderResultPanel.tsx +8 -1
- package/src/components/result/tds/QueryBuilderTDSGridResult.tsx +6 -3
- package/src/components/result/tds/QueryBuilderTDSSimpleGridResult.tsx +14 -4
- package/src/components/shared/BasicValueSpecificationEditor.tsx +39 -25
- package/src/components/shared/CustomDatePicker.tsx +18 -5
- package/src/components/shared/LambdaEditor.tsx +27 -11
- package/src/components/shared/LambdaParameterValuesEditor.tsx +4 -1
- package/src/components/shared/QueryBuilderPropertyInfoTooltip.tsx +115 -64
- package/src/components/watermark/QueryBuilderWatermark.tsx +60 -19
- package/src/stores/QueryBuilderConstantsState.ts +12 -0
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +39 -1
- package/src/stores/QueryLoaderState.ts +64 -12
- 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={
|
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={
|
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
|
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={
|
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={
|
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
|
-
<
|
350
|
-
className="
|
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
|
-
</
|
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:
|
428
|
+
darkMode:
|
429
|
+
!applicationStore.layoutService
|
430
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
427
431
|
})}
|
428
|
-
darkMode={
|
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={
|
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 {
|
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 {
|
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 {
|
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
|
-
|
153
|
-
error?:
|
164
|
+
changeColumnName: (event: ChangeEvent<HTMLInputElement>) => void;
|
165
|
+
error?: string | undefined;
|
154
166
|
}) => {
|
155
|
-
const { projectionColumnState,
|
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
|
-
<
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
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
|
-
|
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
|
-
|
787
|
-
<
|
788
|
-
|
789
|
-
|
790
|
-
|
791
|
-
|
792
|
-
|
793
|
-
|
794
|
-
|
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
|
-
<
|
824
|
-
|
825
|
-
|
826
|
-
|
827
|
-
|
828
|
-
|
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={
|
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
|
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
|
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
|
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('
|
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
|
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)}
|