@finos/legend-query-builder 4.19.22 → 4.19.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/components/QueryBuilder.d.ts.map +1 -1
- package/lib/components/QueryBuilder.js +65 -50
- package/lib/components/QueryBuilder.js.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts +2 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.d.ts.map +1 -1
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js +2 -2
- package/lib/components/__test-utils__/QueryBuilderComponentTestUtils.js.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +11 -7
- package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
- package/lib/components/shared/LambdaEditor.d.ts.map +1 -1
- package/lib/components/shared/LambdaEditor.js +4 -13
- package/lib/components/shared/LambdaEditor.js.map +1 -1
- package/lib/components/sql-playground/SQLPlaygroundEditor.d.ts.map +1 -1
- package/lib/components/sql-playground/SQLPlaygroundEditor.js +4 -4
- package/lib/components/sql-playground/SQLPlaygroundEditor.js.map +1 -1
- package/lib/data-access-overview.css +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts +10 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.d.ts.map +1 -1
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js +16 -0
- package/lib/stores/query-workflow/QueryBuilderWorkFlowState.js.map +1 -1
- package/package.json +8 -8
- package/src/components/QueryBuilder.tsx +392 -365
- package/src/components/__test-utils__/QueryBuilderComponentTestUtils.tsx +3 -1
- package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +383 -371
- package/src/components/shared/LambdaEditor.tsx +10 -13
- package/src/components/sql-playground/SQLPlaygroundEditor.tsx +6 -5
- package/src/index.ts +1 -0
- package/src/stores/query-workflow/QueryBuilderWorkFlowState.ts +19 -0
|
@@ -985,243 +985,251 @@ const QueryBuilderProjectionColumnEditor = observer(
|
|
|
985
985
|
</div>
|
|
986
986
|
</>
|
|
987
987
|
)}
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
988
|
+
{tdsState.queryBuilderState.workflowState
|
|
989
|
+
.showProjectionAggregation && (
|
|
990
|
+
<div className="query-builder__projection__column__aggregate">
|
|
991
|
+
<div className="query-builder__projection__column__aggregate__operator">
|
|
992
|
+
{aggregateColumnState && (
|
|
993
|
+
<div className="query-builder__projection__column__aggregate__operator">
|
|
994
|
+
<div className="query-builder__projection__column__aggregate__operator__label">
|
|
995
|
+
{aggregateColumnState.operator.getLabel(
|
|
996
|
+
projectionColumnState,
|
|
997
|
+
)}
|
|
998
|
+
{aggregateColumnState.operator instanceof
|
|
999
|
+
QueryBuilderAggregateOperator_Wavg && (
|
|
1000
|
+
<WavgParamDNDZone
|
|
1001
|
+
column={aggregateColumnState.operator}
|
|
1002
|
+
tdsState={tdsState}
|
|
1003
|
+
/>
|
|
1004
|
+
)}
|
|
1005
|
+
{aggregateColumnState.operator instanceof
|
|
1006
|
+
QueryBuilderAggregateOperator_Percentile && (
|
|
1007
|
+
<button
|
|
1008
|
+
className="query-builder__projection__column__aggregate__operator__percentile__badge"
|
|
1009
|
+
ref={percentileButtonRef}
|
|
1010
|
+
onClick={setPercentileArguments}
|
|
1011
|
+
title="Set Percentile Argument(s)..."
|
|
1012
|
+
>
|
|
1013
|
+
{getPercentileDisplayValue()}
|
|
1014
|
+
</button>
|
|
1015
|
+
)}
|
|
1016
|
+
</div>
|
|
1014
1017
|
</div>
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1018
|
+
)}
|
|
1019
|
+
{aggregateColumnState && isPercentileOpen && (
|
|
1020
|
+
<BasePopover
|
|
1021
|
+
open={isPercentileOpen}
|
|
1022
|
+
slotProps={{
|
|
1023
|
+
paper: {
|
|
1024
|
+
classes: {
|
|
1025
|
+
root: 'query-builder__projection__column__aggregate__operator__percentile__container__root',
|
|
1026
|
+
},
|
|
1024
1027
|
},
|
|
1025
|
-
}
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
data-testid={
|
|
1058
|
-
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_PERCENTILE_PANEL
|
|
1059
|
-
}
|
|
1028
|
+
}}
|
|
1029
|
+
className={clsx(
|
|
1030
|
+
'query-builder__projection__column__aggregate__operator__percentile__container',
|
|
1031
|
+
)}
|
|
1032
|
+
anchorEl={percentileButtonRef.current}
|
|
1033
|
+
onClose={() => {
|
|
1034
|
+
const percentileOperator =
|
|
1035
|
+
aggregateColumnState.operator as QueryBuilderAggregateOperator_Percentile;
|
|
1036
|
+
if (percentileValue === '') {
|
|
1037
|
+
percentileOperator.setPercentile(undefined);
|
|
1038
|
+
} else {
|
|
1039
|
+
percentileOperator.setPercentile(
|
|
1040
|
+
Number(percentileValue),
|
|
1041
|
+
);
|
|
1042
|
+
}
|
|
1043
|
+
if (
|
|
1044
|
+
acending !== undefined &&
|
|
1045
|
+
continuous !== undefined
|
|
1046
|
+
) {
|
|
1047
|
+
percentileOperator.setAcending(acending);
|
|
1048
|
+
percentileOperator.setContinuous(continuous);
|
|
1049
|
+
}
|
|
1050
|
+
setIsPercentileOpen(false);
|
|
1051
|
+
}}
|
|
1052
|
+
anchorOrigin={{
|
|
1053
|
+
vertical: 'bottom',
|
|
1054
|
+
horizontal: 'left',
|
|
1055
|
+
}}
|
|
1056
|
+
transformOrigin={{
|
|
1057
|
+
vertical: 'top',
|
|
1058
|
+
horizontal: 'center',
|
|
1059
|
+
}}
|
|
1060
1060
|
>
|
|
1061
|
-
<div
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
<
|
|
1073
|
-
ref={percentileInputRef}
|
|
1061
|
+
<div
|
|
1062
|
+
data-testid={
|
|
1063
|
+
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_PERCENTILE_PANEL
|
|
1064
|
+
}
|
|
1065
|
+
>
|
|
1066
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo">
|
|
1067
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo__label">
|
|
1068
|
+
Percentile
|
|
1069
|
+
<br />
|
|
1070
|
+
(0-100)
|
|
1071
|
+
</div>
|
|
1072
|
+
<div
|
|
1074
1073
|
className={clsx(
|
|
1075
|
-
'query-
|
|
1074
|
+
'query-builder__projection__column__aggregate__operator__percentile__argument-combo__value',
|
|
1076
1075
|
)}
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1076
|
+
>
|
|
1077
|
+
<InputWithInlineValidation
|
|
1078
|
+
ref={percentileInputRef}
|
|
1079
|
+
className={clsx(
|
|
1080
|
+
'query-builder__projection__column__aggregate__operator__percentile__input input--dark',
|
|
1081
|
+
)}
|
|
1082
|
+
type="text"
|
|
1083
|
+
inputMode="numeric"
|
|
1084
|
+
onChange={onPercentileValueChange}
|
|
1085
|
+
value={percentileValue}
|
|
1086
|
+
error={
|
|
1087
|
+
percentileValue && Number(percentileValue) > 100
|
|
1088
|
+
? `Invalid aggregation agruement for ${aggregateColumnState.columnName}`
|
|
1089
|
+
: undefined
|
|
1090
|
+
}
|
|
1091
|
+
/>
|
|
1092
|
+
</div>
|
|
1093
|
+
</div>
|
|
1094
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo">
|
|
1095
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo__label">
|
|
1096
|
+
Acending
|
|
1097
|
+
</div>
|
|
1098
|
+
<CustomSelectorInput
|
|
1099
|
+
className="query-loader__results__sort-by__selector query-builder__projection__column__aggregate__operator__percentile__argument-combo__value"
|
|
1100
|
+
options={percentileOptions}
|
|
1101
|
+
onChange={(option: {
|
|
1102
|
+
label: string;
|
|
1103
|
+
value: string;
|
|
1104
|
+
}) => {
|
|
1105
|
+
setAcending(
|
|
1106
|
+
option.value === 'true' ? true : false,
|
|
1107
|
+
);
|
|
1108
|
+
}}
|
|
1109
|
+
value={{
|
|
1110
|
+
label:
|
|
1111
|
+
acending === undefined
|
|
1112
|
+
? ''
|
|
1113
|
+
: acending
|
|
1114
|
+
? 'true'
|
|
1115
|
+
: 'false',
|
|
1116
|
+
value:
|
|
1117
|
+
acending === undefined
|
|
1118
|
+
? ''
|
|
1119
|
+
: acending
|
|
1120
|
+
? 'true'
|
|
1121
|
+
: 'false',
|
|
1122
|
+
}}
|
|
1123
|
+
darkMode={
|
|
1124
|
+
!applicationStore.layoutService
|
|
1125
|
+
.TEMPORARY__isLightColorThemeEnabled
|
|
1085
1126
|
}
|
|
1086
1127
|
/>
|
|
1087
1128
|
</div>
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1129
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo">
|
|
1130
|
+
<div className="query-builder__projection__column__aggregate__operator__percentile__argument-combo__label">
|
|
1131
|
+
Continous
|
|
1132
|
+
</div>
|
|
1133
|
+
<CustomSelectorInput
|
|
1134
|
+
className="query-loader__results__sort-by__selector query-builder__projection__column__aggregate__operator__percentile__argument-combo__value"
|
|
1135
|
+
options={percentileOptions}
|
|
1136
|
+
onChange={(option: {
|
|
1137
|
+
label: string;
|
|
1138
|
+
value: string;
|
|
1139
|
+
}) =>
|
|
1140
|
+
setContinuous(
|
|
1141
|
+
option.value === 'true' ? true : false,
|
|
1142
|
+
)
|
|
1143
|
+
}
|
|
1144
|
+
value={{
|
|
1145
|
+
label:
|
|
1146
|
+
continuous === undefined
|
|
1147
|
+
? ''
|
|
1148
|
+
: continuous
|
|
1149
|
+
? 'true'
|
|
1150
|
+
: 'false',
|
|
1151
|
+
value:
|
|
1152
|
+
continuous === undefined
|
|
1153
|
+
? ''
|
|
1154
|
+
: continuous
|
|
1155
|
+
? 'true'
|
|
1156
|
+
: 'false',
|
|
1157
|
+
}}
|
|
1158
|
+
darkMode={
|
|
1159
|
+
!applicationStore.layoutService
|
|
1160
|
+
.TEMPORARY__isLightColorThemeEnabled
|
|
1161
|
+
}
|
|
1162
|
+
/>
|
|
1092
1163
|
</div>
|
|
1093
|
-
<CustomSelectorInput
|
|
1094
|
-
className="query-loader__results__sort-by__selector query-builder__projection__column__aggregate__operator__percentile__argument-combo__value"
|
|
1095
|
-
options={percentileOptions}
|
|
1096
|
-
onChange={(option: {
|
|
1097
|
-
label: string;
|
|
1098
|
-
value: string;
|
|
1099
|
-
}) => {
|
|
1100
|
-
setAcending(option.value === 'true' ? true : false);
|
|
1101
|
-
}}
|
|
1102
|
-
value={{
|
|
1103
|
-
label:
|
|
1104
|
-
acending === undefined
|
|
1105
|
-
? ''
|
|
1106
|
-
: acending
|
|
1107
|
-
? 'true'
|
|
1108
|
-
: 'false',
|
|
1109
|
-
value:
|
|
1110
|
-
acending === undefined
|
|
1111
|
-
? ''
|
|
1112
|
-
: acending
|
|
1113
|
-
? 'true'
|
|
1114
|
-
: 'false',
|
|
1115
|
-
}}
|
|
1116
|
-
darkMode={
|
|
1117
|
-
!applicationStore.layoutService
|
|
1118
|
-
.TEMPORARY__isLightColorThemeEnabled
|
|
1119
|
-
}
|
|
1120
|
-
/>
|
|
1121
1164
|
</div>
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
continuous === undefined
|
|
1140
|
-
? ''
|
|
1141
|
-
: continuous
|
|
1142
|
-
? 'true'
|
|
1143
|
-
: 'false',
|
|
1144
|
-
value:
|
|
1145
|
-
continuous === undefined
|
|
1146
|
-
? ''
|
|
1147
|
-
: continuous
|
|
1148
|
-
? 'true'
|
|
1149
|
-
: 'false',
|
|
1150
|
-
}}
|
|
1151
|
-
darkMode={
|
|
1152
|
-
!applicationStore.layoutService
|
|
1153
|
-
.TEMPORARY__isLightColorThemeEnabled
|
|
1154
|
-
}
|
|
1155
|
-
/>
|
|
1165
|
+
</BasePopover>
|
|
1166
|
+
)}
|
|
1167
|
+
{isCalendarEnabled &&
|
|
1168
|
+
aggregateColumnState &&
|
|
1169
|
+
aggregateCalendarFunctions.length > 0 && (
|
|
1170
|
+
<div
|
|
1171
|
+
className={clsx(
|
|
1172
|
+
'query-builder__projection__column__aggregate__calendar__toggler',
|
|
1173
|
+
{
|
|
1174
|
+
'query-builder__projection__column__aggregate__calendar__toggler--active':
|
|
1175
|
+
!aggregateColumnState.hideCalendarColumnState,
|
|
1176
|
+
},
|
|
1177
|
+
)}
|
|
1178
|
+
onClick={toggleHideCalendarColumnState}
|
|
1179
|
+
title="Toggle calendar aggregation"
|
|
1180
|
+
>
|
|
1181
|
+
<CalendarClockIcon />
|
|
1156
1182
|
</div>
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1183
|
+
)}
|
|
1184
|
+
<ControlledDropdownMenu
|
|
1185
|
+
className="query-builder__projection__column__aggregate__operator__dropdown"
|
|
1186
|
+
title="Choose Aggregate Operator..."
|
|
1187
|
+
disabled={!aggreateOperators.length}
|
|
1188
|
+
content={
|
|
1189
|
+
<MenuContent>
|
|
1190
|
+
{aggregateColumnState && (
|
|
1191
|
+
<MenuContentItem
|
|
1192
|
+
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
|
1193
|
+
onClick={changeOperator(undefined)}
|
|
1194
|
+
>
|
|
1195
|
+
(none)
|
|
1196
|
+
</MenuContentItem>
|
|
1197
|
+
)}
|
|
1198
|
+
{aggreateOperators.map((op) => (
|
|
1199
|
+
<MenuContentItem
|
|
1200
|
+
key={op.uuid}
|
|
1201
|
+
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
|
1202
|
+
onClick={changeOperator(op)}
|
|
1203
|
+
>
|
|
1204
|
+
{op.getLabel(projectionColumnState)}
|
|
1205
|
+
</MenuContentItem>
|
|
1206
|
+
))}
|
|
1207
|
+
</MenuContent>
|
|
1208
|
+
}
|
|
1209
|
+
menuProps={{
|
|
1210
|
+
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
|
1211
|
+
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
|
1212
|
+
elevation: 7,
|
|
1213
|
+
}}
|
|
1214
|
+
>
|
|
1163
1215
|
<div
|
|
1164
1216
|
className={clsx(
|
|
1165
|
-
'query-
|
|
1217
|
+
'query-builder__projection__column__aggregate__operator__badge',
|
|
1166
1218
|
{
|
|
1167
|
-
'query-
|
|
1168
|
-
|
|
1219
|
+
'query-builder__projection__column__aggregate__operator__badge--activated':
|
|
1220
|
+
Boolean(aggregateColumnState),
|
|
1169
1221
|
},
|
|
1170
1222
|
)}
|
|
1171
|
-
onClick={toggleHideCalendarColumnState}
|
|
1172
|
-
title="Toggle calendar aggregation"
|
|
1173
1223
|
>
|
|
1174
|
-
<
|
|
1224
|
+
<SigmaIcon />
|
|
1175
1225
|
</div>
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
content={
|
|
1182
|
-
<MenuContent>
|
|
1183
|
-
{aggregateColumnState && (
|
|
1184
|
-
<MenuContentItem
|
|
1185
|
-
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
|
1186
|
-
onClick={changeOperator(undefined)}
|
|
1187
|
-
>
|
|
1188
|
-
(none)
|
|
1189
|
-
</MenuContentItem>
|
|
1190
|
-
)}
|
|
1191
|
-
{aggreateOperators.map((op) => (
|
|
1192
|
-
<MenuContentItem
|
|
1193
|
-
key={op.uuid}
|
|
1194
|
-
className="query-builder__projection__column__aggregate__operator__dropdown__option"
|
|
1195
|
-
onClick={changeOperator(op)}
|
|
1196
|
-
>
|
|
1197
|
-
{op.getLabel(projectionColumnState)}
|
|
1198
|
-
</MenuContentItem>
|
|
1199
|
-
))}
|
|
1200
|
-
</MenuContent>
|
|
1201
|
-
}
|
|
1202
|
-
menuProps={{
|
|
1203
|
-
anchorOrigin: { vertical: 'bottom', horizontal: 'left' },
|
|
1204
|
-
transformOrigin: { vertical: 'top', horizontal: 'left' },
|
|
1205
|
-
elevation: 7,
|
|
1206
|
-
}}
|
|
1207
|
-
>
|
|
1208
|
-
<div
|
|
1209
|
-
className={clsx(
|
|
1210
|
-
'query-builder__projection__column__aggregate__operator__badge',
|
|
1211
|
-
{
|
|
1212
|
-
'query-builder__projection__column__aggregate__operator__badge--activated':
|
|
1213
|
-
Boolean(aggregateColumnState),
|
|
1214
|
-
},
|
|
1215
|
-
)}
|
|
1216
|
-
>
|
|
1217
|
-
<SigmaIcon />
|
|
1218
|
-
</div>
|
|
1219
|
-
<div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
|
|
1220
|
-
<CaretDownIcon />
|
|
1221
|
-
</div>
|
|
1222
|
-
</ControlledDropdownMenu>
|
|
1226
|
+
<div className="query-builder__projection__column__aggregate__operator__dropdown__trigger">
|
|
1227
|
+
<CaretDownIcon />
|
|
1228
|
+
</div>
|
|
1229
|
+
</ControlledDropdownMenu>
|
|
1230
|
+
</div>
|
|
1223
1231
|
</div>
|
|
1224
|
-
|
|
1232
|
+
)}
|
|
1225
1233
|
<div className="query-builder__projection__column__actions">
|
|
1226
1234
|
<button
|
|
1227
1235
|
className="query-builder__projection__column__action"
|
|
@@ -1572,221 +1580,225 @@ export const QueryBuilderTDSPanel = observer(
|
|
|
1572
1580
|
return (
|
|
1573
1581
|
<PanelContent>
|
|
1574
1582
|
<div className="query-builder__projection__toolbar">
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1582
|
-
<
|
|
1583
|
-
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1583
|
+
{tdsState.queryBuilderState.workflowState.showQueryOptions && (
|
|
1584
|
+
<div
|
|
1585
|
+
className="query-builder__projection__result-modifier-prompt"
|
|
1586
|
+
data-testid={
|
|
1587
|
+
QUERY_BUILDER_TEST_ID.QUERY_BUILDER_TDS_RESULT_MODIFIER_PROMPT
|
|
1588
|
+
}
|
|
1589
|
+
>
|
|
1590
|
+
<div className="query-builder__projection__result-modifier-prompt__header">
|
|
1591
|
+
<button
|
|
1592
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1593
|
+
onClick={openResultSetModifierEditor}
|
|
1594
|
+
title="Configure Query Options..."
|
|
1595
|
+
>
|
|
1596
|
+
<CogIcon className="query-builder__projection__result-modifier-prompt__header__label__icon" />
|
|
1597
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1598
|
+
{tdsState.isQueryOptionsSet
|
|
1599
|
+
? 'Query Options'
|
|
1600
|
+
: 'Set Query Options'}
|
|
1601
|
+
</div>
|
|
1602
|
+
</button>
|
|
1594
1603
|
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1604
|
+
<div
|
|
1605
|
+
className={clsx(
|
|
1606
|
+
'query-builder__projection__result-modifier-prompt__divider',
|
|
1607
|
+
{
|
|
1608
|
+
'query-builder__projection__result-modifier-prompt__divider--light':
|
|
1609
|
+
applicationStore.layoutService
|
|
1610
|
+
.TEMPORARY__isLightColorThemeEnabled,
|
|
1611
|
+
},
|
|
1612
|
+
)}
|
|
1613
|
+
>
|
|
1614
|
+
{tdsState.isQueryOptionsSet && ' - '}
|
|
1615
|
+
</div>
|
|
1616
|
+
{tdsState.queryBuilderState.milestoningState
|
|
1617
|
+
.isAllVersionsEnabled &&
|
|
1618
|
+
!tdsState.queryBuilderState.milestoningState
|
|
1619
|
+
.isAllVersionsInRangeEnabled && (
|
|
1620
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1621
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1622
|
+
All Versions
|
|
1623
|
+
</div>
|
|
1624
|
+
<button
|
|
1625
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1626
|
+
onClick={openResultSetModifierEditor}
|
|
1627
|
+
>
|
|
1628
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1629
|
+
Yes
|
|
1630
|
+
</div>
|
|
1631
|
+
</button>
|
|
1632
|
+
</div>
|
|
1633
|
+
)}
|
|
1634
|
+
{tdsState.queryBuilderState.milestoningState
|
|
1635
|
+
.isAllVersionsInRangeEnabled &&
|
|
1636
|
+
tdsState.queryBuilderState.milestoningState.startDate &&
|
|
1637
|
+
tdsState.queryBuilderState.milestoningState.endDate && (
|
|
1638
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1639
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1640
|
+
All Versions
|
|
1641
|
+
</div>
|
|
1642
|
+
<button
|
|
1643
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1644
|
+
onClick={openResultSetModifierEditor}
|
|
1645
|
+
>
|
|
1646
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1647
|
+
(
|
|
1648
|
+
{getNameOfValueSpecification(
|
|
1649
|
+
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1650
|
+
tdsState.queryBuilderState.milestoningState
|
|
1651
|
+
.startDate,
|
|
1652
|
+
) ??
|
|
1653
|
+
tdsState.queryBuilderState.milestoningState
|
|
1654
|
+
.startDate,
|
|
1655
|
+
tdsState.queryBuilderState,
|
|
1656
|
+
)}{' '}
|
|
1657
|
+
-{' '}
|
|
1658
|
+
{getNameOfValueSpecification(
|
|
1659
|
+
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1660
|
+
tdsState.queryBuilderState.milestoningState
|
|
1661
|
+
.endDate,
|
|
1662
|
+
) ??
|
|
1663
|
+
tdsState.queryBuilderState.milestoningState
|
|
1664
|
+
.endDate,
|
|
1665
|
+
tdsState.queryBuilderState,
|
|
1666
|
+
)}
|
|
1667
|
+
)
|
|
1668
|
+
</div>
|
|
1669
|
+
</button>
|
|
1670
|
+
</div>
|
|
1671
|
+
)}
|
|
1672
|
+
{tdsState.queryBuilderState.milestoningState.businessDate && (
|
|
1611
1673
|
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1612
1674
|
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1613
|
-
|
|
1675
|
+
Business Date
|
|
1614
1676
|
</div>
|
|
1615
1677
|
<button
|
|
1616
1678
|
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1617
1679
|
onClick={openResultSetModifierEditor}
|
|
1618
1680
|
>
|
|
1619
1681
|
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1620
|
-
|
|
1682
|
+
{getNameOfValueSpecification(
|
|
1683
|
+
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1684
|
+
tdsState.queryBuilderState.milestoningState
|
|
1685
|
+
.businessDate,
|
|
1686
|
+
) ??
|
|
1687
|
+
tdsState.queryBuilderState.milestoningState
|
|
1688
|
+
.businessDate,
|
|
1689
|
+
tdsState.queryBuilderState,
|
|
1690
|
+
)}
|
|
1621
1691
|
</div>
|
|
1622
1692
|
</button>
|
|
1623
1693
|
</div>
|
|
1624
1694
|
)}
|
|
1625
|
-
|
|
1626
|
-
.isAllVersionsInRangeEnabled &&
|
|
1627
|
-
tdsState.queryBuilderState.milestoningState.startDate &&
|
|
1628
|
-
tdsState.queryBuilderState.milestoningState.endDate && (
|
|
1695
|
+
{tdsState.queryBuilderState.milestoningState.processingDate && (
|
|
1629
1696
|
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1630
1697
|
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1631
|
-
|
|
1698
|
+
Processing Date
|
|
1632
1699
|
</div>
|
|
1633
1700
|
<button
|
|
1634
1701
|
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1635
1702
|
onClick={openResultSetModifierEditor}
|
|
1636
1703
|
>
|
|
1637
1704
|
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1638
|
-
(
|
|
1639
1705
|
{getNameOfValueSpecification(
|
|
1640
1706
|
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1641
1707
|
tdsState.queryBuilderState.milestoningState
|
|
1642
|
-
.
|
|
1708
|
+
.processingDate,
|
|
1643
1709
|
) ??
|
|
1644
1710
|
tdsState.queryBuilderState.milestoningState
|
|
1645
|
-
.
|
|
1646
|
-
tdsState.queryBuilderState,
|
|
1647
|
-
)}{' '}
|
|
1648
|
-
-{' '}
|
|
1649
|
-
{getNameOfValueSpecification(
|
|
1650
|
-
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1651
|
-
tdsState.queryBuilderState.milestoningState.endDate,
|
|
1652
|
-
) ??
|
|
1653
|
-
tdsState.queryBuilderState.milestoningState.endDate,
|
|
1711
|
+
.processingDate,
|
|
1654
1712
|
tdsState.queryBuilderState,
|
|
1655
1713
|
)}
|
|
1656
|
-
)
|
|
1657
1714
|
</div>
|
|
1658
1715
|
</button>
|
|
1659
1716
|
</div>
|
|
1660
1717
|
)}
|
|
1661
|
-
|
|
1718
|
+
</div>
|
|
1719
|
+
{tdsState.resultSetModifierState.limit && (
|
|
1662
1720
|
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1663
1721
|
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1664
|
-
|
|
1722
|
+
Max Rows
|
|
1665
1723
|
</div>
|
|
1666
1724
|
<button
|
|
1667
1725
|
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1668
1726
|
onClick={openResultSetModifierEditor}
|
|
1669
1727
|
>
|
|
1670
1728
|
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1671
|
-
{
|
|
1672
|
-
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1673
|
-
tdsState.queryBuilderState.milestoningState
|
|
1674
|
-
.businessDate,
|
|
1675
|
-
) ??
|
|
1676
|
-
tdsState.queryBuilderState.milestoningState
|
|
1677
|
-
.businessDate,
|
|
1678
|
-
tdsState.queryBuilderState,
|
|
1679
|
-
)}
|
|
1729
|
+
{tdsState.resultSetModifierState.limit}
|
|
1680
1730
|
</div>
|
|
1681
1731
|
</button>
|
|
1682
1732
|
</div>
|
|
1683
1733
|
)}
|
|
1684
|
-
{tdsState.
|
|
1734
|
+
{tdsState.resultSetModifierState.distinct && (
|
|
1685
1735
|
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1686
1736
|
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1687
|
-
|
|
1737
|
+
Eliminate Duplicate Rows
|
|
1688
1738
|
</div>
|
|
1689
1739
|
<button
|
|
1690
1740
|
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1691
1741
|
onClick={openResultSetModifierEditor}
|
|
1692
1742
|
>
|
|
1693
1743
|
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1694
|
-
|
|
1695
|
-
tdsState.queryBuilderState.milestoningState.getMilestoningParameterValue(
|
|
1696
|
-
tdsState.queryBuilderState.milestoningState
|
|
1697
|
-
.processingDate,
|
|
1698
|
-
) ??
|
|
1699
|
-
tdsState.queryBuilderState.milestoningState
|
|
1700
|
-
.processingDate,
|
|
1701
|
-
tdsState.queryBuilderState,
|
|
1702
|
-
)}
|
|
1744
|
+
Yes
|
|
1703
1745
|
</div>
|
|
1704
1746
|
</button>
|
|
1705
1747
|
</div>
|
|
1706
1748
|
)}
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
Max Rows
|
|
1712
|
-
</div>
|
|
1713
|
-
<button
|
|
1714
|
-
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1715
|
-
onClick={openResultSetModifierEditor}
|
|
1716
|
-
>
|
|
1717
|
-
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1718
|
-
{tdsState.resultSetModifierState.limit}
|
|
1749
|
+
{tdsState.resultSetModifierState.sortColumns.length > 0 && (
|
|
1750
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1751
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1752
|
+
Sort
|
|
1719
1753
|
</div>
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1754
|
+
{tdsState.resultSetModifierState.sortColumns.map(
|
|
1755
|
+
(columnState) => (
|
|
1756
|
+
<button
|
|
1757
|
+
key={columnState.columnState.uuid}
|
|
1758
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1759
|
+
onClick={openResultSetModifierEditor}
|
|
1760
|
+
>
|
|
1761
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1762
|
+
{`${columnState.columnState.columnName} ${columnState.sortType}`}
|
|
1763
|
+
</div>
|
|
1764
|
+
</button>
|
|
1765
|
+
),
|
|
1766
|
+
)}
|
|
1727
1767
|
</div>
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
Yes
|
|
1768
|
+
)}
|
|
1769
|
+
{tdsState.resultSetModifierState.slice && (
|
|
1770
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1771
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1772
|
+
Slice
|
|
1734
1773
|
</div>
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
{tdsState.resultSetModifierState.sortColumns.map(
|
|
1744
|
-
(columnState) => (
|
|
1745
|
-
<button
|
|
1746
|
-
key={columnState.columnState.uuid}
|
|
1747
|
-
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1748
|
-
onClick={openResultSetModifierEditor}
|
|
1749
|
-
>
|
|
1750
|
-
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1751
|
-
{`${columnState.columnState.columnName} ${columnState.sortType}`}
|
|
1752
|
-
</div>
|
|
1753
|
-
</button>
|
|
1754
|
-
),
|
|
1755
|
-
)}
|
|
1756
|
-
</div>
|
|
1757
|
-
)}
|
|
1758
|
-
{tdsState.resultSetModifierState.slice && (
|
|
1759
|
-
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1760
|
-
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1761
|
-
Slice
|
|
1774
|
+
<button
|
|
1775
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1776
|
+
onClick={openResultSetModifierEditor}
|
|
1777
|
+
>
|
|
1778
|
+
<div className="query-builder__projection__result-modifier-prompt__header__label__title">
|
|
1779
|
+
{`${tdsState.resultSetModifierState.slice[0]},${tdsState.resultSetModifierState.slice[1]}`}
|
|
1780
|
+
</div>
|
|
1781
|
+
</button>
|
|
1762
1782
|
</div>
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
{`${tdsState.resultSetModifierState.slice[0]},${tdsState.resultSetModifierState.slice[1]}`}
|
|
1783
|
+
)}
|
|
1784
|
+
{tdsState.queryBuilderState.watermarkState.value && (
|
|
1785
|
+
<div className="query-builder__projection__result-modifier-prompt__group">
|
|
1786
|
+
<div className="query-builder__projection__result-modifier-prompt__group__label">
|
|
1787
|
+
Watermark
|
|
1769
1788
|
</div>
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1789
|
+
<button
|
|
1790
|
+
className="query-builder__projection__result-modifier-prompt__header__label editable-value"
|
|
1791
|
+
onClick={openResultSetModifierEditor}
|
|
1792
|
+
>
|
|
1793
|
+
{getNameOfValueSpecification(
|
|
1794
|
+
tdsState.queryBuilderState.watermarkState.value,
|
|
1795
|
+
tdsState.queryBuilderState,
|
|
1796
|
+
)}
|
|
1797
|
+
</button>
|
|
1777
1798
|
</div>
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
>
|
|
1782
|
-
{getNameOfValueSpecification(
|
|
1783
|
-
tdsState.queryBuilderState.watermarkState.value,
|
|
1784
|
-
tdsState.queryBuilderState,
|
|
1785
|
-
)}
|
|
1786
|
-
</button>
|
|
1787
|
-
</div>
|
|
1788
|
-
)}
|
|
1789
|
-
</div>
|
|
1799
|
+
)}
|
|
1800
|
+
</div>
|
|
1801
|
+
)}
|
|
1790
1802
|
<div className="query-builder__projection__toolbar__actions">
|
|
1791
1803
|
<button
|
|
1792
1804
|
className="panel__header__action"
|