@finos/legend-query-builder 4.13.2 → 4.13.4
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/data-access/DataAccessOverview.d.ts.map +1 -1
- package/lib/components/data-access/DataAccessOverview.js +15 -1
- package/lib/components/data-access/DataAccessOverview.js.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.d.ts.map +1 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js +2 -1
- package/lib/components/explorer/QueryBuilderExplorerPanel.js.map +1 -1
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.d.ts +24 -0
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.d.ts.map +1 -0
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js +37 -0
- package/lib/components/shared/QueryBuilderRootClassInfoTooltip.js.map +1 -0
- package/lib/index.css +2 -2
- package/lib/index.css.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/QueryBuilderResultState.d.ts.map +1 -1
- package/lib/stores/QueryBuilderResultState.js +1 -0
- package/lib/stores/QueryBuilderResultState.js.map +1 -1
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +7 -0
- package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.d.ts.map +1 -1
- package/lib/stores/filter/QueryBuilderFilterState.js +13 -2
- package/lib/stores/filter/QueryBuilderFilterState.js.map +1 -1
- package/package.json +8 -8
- package/src/components/data-access/DataAccessOverview.tsx +35 -2
- package/src/components/explorer/QueryBuilderExplorerPanel.tsx +11 -1
- package/src/components/shared/QueryBuilderRootClassInfoTooltip.tsx +79 -0
- package/src/stores/QueryBuilderResultState.ts +1 -0
- package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +9 -0
- package/src/stores/filter/QueryBuilderFilterState.ts +21 -1
- package/tsconfig.json +1 -0
@@ -45,6 +45,10 @@ export type QueryExportUsageConfiguration = {
|
|
45
45
|
renderer(): React.ReactNode;
|
46
46
|
};
|
47
47
|
|
48
|
+
export type WarehouseEntitlementRender = {
|
49
|
+
renderer: (dataAccessState: DataAccessState) => React.ReactNode;
|
50
|
+
};
|
51
|
+
|
48
52
|
export type QueryChatRenderer = (
|
49
53
|
queryBuilderState: QueryBuilderState,
|
50
54
|
) => React.ReactNode;
|
@@ -56,6 +60,11 @@ export interface QueryBuilder_LegendApplicationPlugin_Extension
|
|
56
60
|
*/
|
57
61
|
getExtraLoadQueryFilterOptions?(): LoadQueryFilterOption[];
|
58
62
|
|
63
|
+
/**
|
64
|
+
* Get the list of warehouse entitlement configurations
|
65
|
+
*/
|
66
|
+
getWarehouseEntitlementRenders?(): WarehouseEntitlementRender[];
|
67
|
+
|
59
68
|
/**
|
60
69
|
* Get the list of dataset entitlement access report action configurations.
|
61
70
|
*/
|
@@ -42,6 +42,8 @@ import {
|
|
42
42
|
type ValueSpecification,
|
43
43
|
type VariableExpression,
|
44
44
|
observe_ValueSpecification,
|
45
|
+
CollectionInstanceValue,
|
46
|
+
InstanceValue,
|
45
47
|
} from '@finos/legend-graph';
|
46
48
|
import { DEFAULT_LAMBDA_VARIABLE_NAME } from '../QueryBuilderConfig.js';
|
47
49
|
import type { QueryBuilderProjectionColumnDragSource } from '../fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
|
@@ -54,6 +56,7 @@ import type { QueryBuilderFilterOperator } from './QueryBuilderFilterOperator.js
|
|
54
56
|
import { QUERY_BUILDER_GROUP_OPERATION } from '../QueryBuilderGroupOperationHelper.js';
|
55
57
|
import { QUERY_BUILDER_STATE_HASH_STRUCTURE } from '../QueryBuilderStateHashUtils.js';
|
56
58
|
import { isValueExpressionReferencedInValue } from '../QueryBuilderValueSpecificationHelper.js';
|
59
|
+
import { instanceValue_setValues } from '../shared/ValueSpecificationModifierHelper.js';
|
57
60
|
|
58
61
|
export enum QUERY_BUILDER_FILTER_DND_TYPE {
|
59
62
|
GROUP_CONDITION = 'GROUP_CONDITION',
|
@@ -195,7 +198,24 @@ export class FilterConditionState implements Hashable {
|
|
195
198
|
changeOperator(val: QueryBuilderFilterOperator): void {
|
196
199
|
this.setOperator(val);
|
197
200
|
if (!this.operator.isCompatibleWithFilterConditionValue(this)) {
|
198
|
-
this.
|
201
|
+
let defaultValue = this.operator.getDefaultFilterConditionValue(this);
|
202
|
+
if (
|
203
|
+
defaultValue instanceof CollectionInstanceValue &&
|
204
|
+
this.value instanceof InstanceValue
|
205
|
+
) {
|
206
|
+
instanceValue_setValues(
|
207
|
+
defaultValue,
|
208
|
+
[this.value],
|
209
|
+
this.filterState.queryBuilderState.observerContext,
|
210
|
+
);
|
211
|
+
} else if (
|
212
|
+
defaultValue instanceof InstanceValue &&
|
213
|
+
this.value instanceof CollectionInstanceValue &&
|
214
|
+
this.value.values.length
|
215
|
+
) {
|
216
|
+
defaultValue = this.value.values[0];
|
217
|
+
}
|
218
|
+
this.setValue(defaultValue);
|
199
219
|
}
|
200
220
|
}
|
201
221
|
|
package/tsconfig.json
CHANGED
@@ -266,6 +266,7 @@
|
|
266
266
|
"./src/components/shared/LambdaParameterValuesEditor.tsx",
|
267
267
|
"./src/components/shared/QueryBuilderPanelIssueCountBadge.tsx",
|
268
268
|
"./src/components/shared/QueryBuilderPropertyInfoTooltip.tsx",
|
269
|
+
"./src/components/shared/QueryBuilderRootClassInfoTooltip.tsx",
|
269
270
|
"./src/components/shared/QueryBuilderVariableSelector.tsx",
|
270
271
|
"./src/components/watermark/QueryBuilderWatermark.tsx",
|
271
272
|
"./src/components/workflows/ClassQueryBuilder.tsx",
|