@finos/legend-query-builder 4.7.2 → 4.7.4
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/components/QueryBuilderResultPanel.d.ts.map +1 -1
- package/lib/components/QueryBuilderResultPanel.js +14 -23
- package/lib/components/QueryBuilderResultPanel.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +4 -4
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/graph-manager/QueryBuilderConst.d.ts +1 -0
- package/lib/graph-manager/QueryBuilderConst.d.ts.map +1 -1
- package/lib/graph-manager/QueryBuilderConst.js +1 -0
- package/lib/graph-manager/QueryBuilderConst.js.map +1 -1
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +8 -8
- package/lib/stores/QueryBuilderResultState.d.ts +9 -9
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +20 -20
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/package.json +16 -16
- package/src/components/QueryBuilderResultPanel.tsx +34 -46
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +78 -84
- package/src/graph-manager/QueryBuilderConst.ts +2 -0
- package/src/stores/QueryBuilderResultState.ts +20 -22
@@ -30,7 +30,6 @@ import {
|
|
30
30
|
PanelDropZone,
|
31
31
|
DragPreviewLayer,
|
32
32
|
useDragPreviewLayer,
|
33
|
-
OptionsIcon,
|
34
33
|
PlusIcon,
|
35
34
|
PanelContent,
|
36
35
|
TrashIcon,
|
@@ -1063,97 +1062,92 @@ export const QueryBuilderTDSPanel = observer(
|
|
1063
1062
|
return (
|
1064
1063
|
<PanelContent>
|
1065
1064
|
<div className="query-builder__projection__toolbar">
|
1066
|
-
<
|
1067
|
-
className="
|
1068
|
-
|
1069
|
-
|
1070
|
-
title="Configure result set modifiers..."
|
1071
|
-
>
|
1072
|
-
<OptionsIcon className="query-builder__icon query-builder__icon__query-option" />
|
1073
|
-
</button>
|
1074
|
-
<button
|
1075
|
-
className="panel__header__action"
|
1076
|
-
disabled={isEmpty}
|
1077
|
-
onClick={clearAllProjectionColumns}
|
1078
|
-
tabIndex={-1}
|
1079
|
-
title={
|
1080
|
-
isEmpty
|
1081
|
-
? 'No projection columns to clear'
|
1082
|
-
: 'Clear all projection columns'
|
1065
|
+
<div
|
1066
|
+
className="query-builder__projection__result-modifier-prompt"
|
1067
|
+
data-testid={
|
1068
|
+
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS_RESULT_MODIFIER_PROMPT
|
1083
1069
|
}
|
1084
1070
|
>
|
1085
|
-
<
|
1086
|
-
|
1087
|
-
|
1088
|
-
className="panel__header__action"
|
1089
|
-
onClick={addNewBlankDerivation}
|
1090
|
-
tabIndex={-1}
|
1091
|
-
title="Add a new derivation"
|
1092
|
-
>
|
1093
|
-
<PlusIcon />
|
1094
|
-
</button>
|
1095
|
-
</div>
|
1096
|
-
<div
|
1097
|
-
className="query-builder__projection__result-modifier-prompt"
|
1098
|
-
data-testid={
|
1099
|
-
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS_RESULT_MODIFIER_PROMPT
|
1100
|
-
}
|
1101
|
-
>
|
1102
|
-
<div className="query-builder__projection__result-modifier-prompt__header">
|
1103
|
-
<button
|
1104
|
-
className="query-builder__projection__result-modifier-prompt__header__label"
|
1105
|
-
onClick={openResultSetModifierEditor}
|
1106
|
-
>
|
1107
|
-
<CogIcon className="query-builder__projection__result-modifier-prompt__header__label__icon" />
|
1108
|
-
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
1109
|
-
Query Options
|
1110
|
-
</div>
|
1111
|
-
</button>
|
1112
|
-
</div>
|
1113
|
-
{tdsState.resultSetModifierState.limit && (
|
1114
|
-
<div className="query-builder__projection__result-modifier-prompt__group">
|
1115
|
-
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
1116
|
-
Max Rows
|
1117
|
-
</div>
|
1118
|
-
<div
|
1119
|
-
className="query-builder__projection__result-modifier-prompt__group__content"
|
1071
|
+
<div className="query-builder__projection__result-modifier-prompt__header">
|
1072
|
+
<button
|
1073
|
+
className="query-builder__projection__result-modifier-prompt__header__label"
|
1120
1074
|
onClick={openResultSetModifierEditor}
|
1075
|
+
title="Configure result set modifiers..."
|
1121
1076
|
>
|
1122
|
-
|
1123
|
-
|
1077
|
+
<CogIcon className="query-builder__projection__result-modifier-prompt__header__label__icon" />
|
1078
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
1079
|
+
Query Options
|
1080
|
+
</div>
|
1081
|
+
</button>
|
1124
1082
|
</div>
|
1125
|
-
|
1126
|
-
|
1127
|
-
|
1128
|
-
|
1129
|
-
|
1083
|
+
{tdsState.resultSetModifierState.limit && (
|
1084
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
1085
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
1086
|
+
Max Rows
|
1087
|
+
</div>
|
1088
|
+
<div
|
1089
|
+
className="query-builder__projection__result-modifier-prompt__group__content"
|
1090
|
+
onClick={openResultSetModifierEditor}
|
1091
|
+
>
|
1092
|
+
{tdsState.resultSetModifierState.limit}
|
1093
|
+
</div>
|
1130
1094
|
</div>
|
1131
|
-
|
1132
|
-
|
1133
|
-
|
1134
|
-
|
1135
|
-
|
1095
|
+
)}
|
1096
|
+
{tdsState.resultSetModifierState.distinct && (
|
1097
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
1098
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
1099
|
+
Eliminate Duplicate Rows
|
1100
|
+
</div>
|
1101
|
+
<div
|
1102
|
+
className="query-builder__projection__result-modifier-prompt__group__content"
|
1103
|
+
onClick={openResultSetModifierEditor}
|
1104
|
+
>
|
1105
|
+
Yes
|
1106
|
+
</div>
|
1136
1107
|
</div>
|
1137
|
-
|
1138
|
-
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1108
|
+
)}
|
1109
|
+
{tdsState.resultSetModifierState.sortColumns.length > 0 && (
|
1110
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
1111
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
1112
|
+
Sort
|
1113
|
+
</div>
|
1114
|
+
{tdsState.resultSetModifierState.sortColumns.map(
|
1115
|
+
(columnState) => (
|
1116
|
+
<div
|
1117
|
+
className="query-builder__projection__result-modifier-prompt__group__content"
|
1118
|
+
key={columnState.columnState.uuid}
|
1119
|
+
onClick={openResultSetModifierEditor}
|
1120
|
+
>
|
1121
|
+
{`${columnState.columnState.columnName} ${columnState.sortType}`}
|
1122
|
+
</div>
|
1123
|
+
),
|
1124
|
+
)}
|
1143
1125
|
</div>
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
|
1149
|
-
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1126
|
+
)}
|
1127
|
+
</div>
|
1128
|
+
<div className="query-builder__projection__toolbar__actions">
|
1129
|
+
<button
|
1130
|
+
className="panel__header__action"
|
1131
|
+
disabled={isEmpty}
|
1132
|
+
onClick={clearAllProjectionColumns}
|
1133
|
+
tabIndex={-1}
|
1134
|
+
title={
|
1135
|
+
isEmpty
|
1136
|
+
? 'No projection columns to clear'
|
1137
|
+
: 'Clear all projection columns'
|
1138
|
+
}
|
1139
|
+
>
|
1140
|
+
<TrashIcon className="query-builder__icon query-builder__icon__query-option--small" />
|
1141
|
+
</button>
|
1142
|
+
<button
|
1143
|
+
className="panel__header__action"
|
1144
|
+
onClick={addNewBlankDerivation}
|
1145
|
+
tabIndex={-1}
|
1146
|
+
title="Add a new derivation"
|
1147
|
+
>
|
1148
|
+
<PlusIcon />
|
1149
|
+
</button>
|
1150
|
+
</div>
|
1157
1151
|
</div>
|
1158
1152
|
<div className="query-builder__projection__content">
|
1159
1153
|
<PanelDropZone
|
@@ -98,13 +98,13 @@ export class QueryBuilderResultState {
|
|
98
98
|
mousedOverCell: observable,
|
99
99
|
isRunningQuery: observable,
|
100
100
|
isSelectingCells: observable,
|
101
|
-
setIsSelectingCells: action,
|
102
101
|
isQueryUsageViewerOpened: observable,
|
102
|
+
setIsSelectingCells: action,
|
103
103
|
setIsRunningQuery: action,
|
104
104
|
setExecutionResult: action,
|
105
105
|
setExecutionDuration: action,
|
106
106
|
setPreviewLimit: action,
|
107
|
-
|
107
|
+
addSelectedCell: action,
|
108
108
|
setSelectedCells: action,
|
109
109
|
setMouseOverCell: action,
|
110
110
|
setQueryRunPromise: action,
|
@@ -124,43 +124,41 @@ export class QueryBuilderResultState {
|
|
124
124
|
);
|
125
125
|
}
|
126
126
|
|
127
|
-
setIsSelectingCells
|
127
|
+
setIsSelectingCells(val: boolean): void {
|
128
128
|
this.isSelectingCells = val;
|
129
|
-
}
|
129
|
+
}
|
130
130
|
|
131
|
-
setIsRunningQuery
|
131
|
+
setIsRunningQuery(val: boolean): void {
|
132
132
|
this.isRunningQuery = val;
|
133
|
-
}
|
133
|
+
}
|
134
134
|
|
135
|
-
setExecutionResult
|
135
|
+
setExecutionResult(val: ExecutionResult | undefined): void {
|
136
136
|
this.executionResult = val;
|
137
|
-
}
|
137
|
+
}
|
138
138
|
|
139
|
-
setExecutionDuration
|
139
|
+
setExecutionDuration(val: number | undefined): void {
|
140
140
|
this.executionDuration = val;
|
141
|
-
}
|
141
|
+
}
|
142
142
|
|
143
|
-
setPreviewLimit
|
143
|
+
setPreviewLimit(val: number): void {
|
144
144
|
this.previewLimit = Math.max(1, val);
|
145
|
-
}
|
145
|
+
}
|
146
146
|
|
147
|
-
|
147
|
+
addSelectedCell(val: QueryBuilderTDSResultCellData): void {
|
148
148
|
this.selectedCells.push(val);
|
149
|
-
}
|
149
|
+
}
|
150
150
|
|
151
|
-
setSelectedCells
|
151
|
+
setSelectedCells(val: QueryBuilderTDSResultCellData[]): void {
|
152
152
|
this.selectedCells = val;
|
153
|
-
}
|
153
|
+
}
|
154
154
|
|
155
|
-
setMouseOverCell
|
155
|
+
setMouseOverCell(val: QueryBuilderTDSResultCellData | null): void {
|
156
156
|
this.mousedOverCell = val;
|
157
|
-
}
|
157
|
+
}
|
158
158
|
|
159
|
-
setQueryRunPromise
|
160
|
-
promise: Promise<ExecutionResult> | undefined,
|
161
|
-
): void => {
|
159
|
+
setQueryRunPromise(promise: Promise<ExecutionResult> | undefined): void {
|
162
160
|
this.queryRunPromise = promise;
|
163
|
-
}
|
161
|
+
}
|
164
162
|
|
165
163
|
setIsQueryUsageViewerOpened(val: boolean): void {
|
166
164
|
this.isQueryUsageViewerOpened = val;
|