@finos/legend-query-builder 0.6.18 → 0.6.20

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. package/lib/components/QueryBuilder.d.ts.map +1 -1
  2. package/lib/components/QueryBuilder.js +27 -3
  3. package/lib/components/QueryBuilder.js.map +1 -1
  4. package/lib/components/QueryBuilderConstantExpressionPanel.js +1 -1
  5. package/lib/components/QueryBuilderConstantExpressionPanel.js.map +1 -1
  6. package/lib/components/QueryBuilderTextEditor.d.ts.map +1 -1
  7. package/lib/components/QueryBuilderTextEditor.js +6 -4
  8. package/lib/components/QueryBuilderTextEditor.js.map +1 -1
  9. package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts +4 -0
  10. package/lib/components/QueryBuilder_LegendApplicationPlugin.d.ts.map +1 -1
  11. package/lib/components/QueryBuilder_LegendApplicationPlugin.js +3 -0
  12. package/lib/components/QueryBuilder_LegendApplicationPlugin.js.map +1 -1
  13. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.d.ts.map +1 -1
  14. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js +1 -1
  15. package/lib/components/fetch-structure/QueryBuilderResultModifierPanel.js.map +1 -1
  16. package/lib/components/fetch-structure/QueryBuilderTDSPanel.d.ts.map +1 -1
  17. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js +9 -2
  18. package/lib/components/fetch-structure/QueryBuilderTDSPanel.js.map +1 -1
  19. package/lib/graphManager/QueryBuilderHashUtils.d.ts +2 -1
  20. package/lib/graphManager/QueryBuilderHashUtils.d.ts.map +1 -1
  21. package/lib/graphManager/QueryBuilderHashUtils.js +1 -0
  22. package/lib/graphManager/QueryBuilderHashUtils.js.map +1 -1
  23. package/lib/index.css +2 -2
  24. package/lib/index.css.map +1 -1
  25. package/lib/index.d.ts +1 -1
  26. package/lib/index.d.ts.map +1 -1
  27. package/lib/index.js +1 -1
  28. package/lib/index.js.map +1 -1
  29. package/lib/package.json +3 -3
  30. package/lib/stores/QueryBuilderState.d.ts +4 -0
  31. package/lib/stores/QueryBuilderState.d.ts.map +1 -1
  32. package/lib/stores/QueryBuilderState.js +12 -0
  33. package/lib/stores/QueryBuilderState.js.map +1 -1
  34. package/lib/stores/QueryBuilderTextEditorState.d.ts +2 -1
  35. package/lib/stores/QueryBuilderTextEditorState.d.ts.map +1 -1
  36. package/lib/stores/QueryBuilderTextEditorState.js +4 -1
  37. package/lib/stores/QueryBuilderTextEditorState.js.map +1 -1
  38. package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.d.ts +25 -0
  39. package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.d.ts.map +1 -0
  40. package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js +40 -0
  41. package/lib/stores/entitlements/QueryBuilderCheckEntitlementsState.js.map +1 -0
  42. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts +2 -0
  43. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.d.ts.map +1 -1
  44. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js +22 -0
  45. package/lib/stores/fetch-structure/tds/QueryBuilderTDSState.js.map +1 -1
  46. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts +4 -4
  47. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.d.ts.map +1 -1
  48. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js +1 -1
  49. package/lib/stores/fetch-structure/tds/QueryResultSetModifierState.js.map +1 -1
  50. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.d.ts.map +1 -1
  51. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js +3 -1
  52. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.js.map +1 -1
  53. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.d.ts.map +1 -1
  54. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js +1 -0
  55. package/lib/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.js.map +1 -1
  56. package/package.json +10 -10
  57. package/src/components/QueryBuilder.tsx +75 -0
  58. package/src/components/QueryBuilderConstantExpressionPanel.tsx +1 -1
  59. package/src/components/QueryBuilderTextEditor.tsx +19 -2
  60. package/src/components/QueryBuilder_LegendApplicationPlugin.ts +9 -0
  61. package/src/components/fetch-structure/QueryBuilderResultModifierPanel.tsx +3 -3
  62. package/src/components/fetch-structure/QueryBuilderTDSPanel.tsx +20 -0
  63. package/src/graphManager/QueryBuilderHashUtils.ts +2 -0
  64. package/src/index.ts +4 -1
  65. package/src/stores/QueryBuilderState.ts +13 -0
  66. package/src/stores/QueryBuilderTextEditorState.ts +6 -0
  67. package/src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts +46 -0
  68. package/src/stores/fetch-structure/tds/QueryBuilderTDSState.ts +27 -0
  69. package/src/stores/fetch-structure/tds/QueryResultSetModifierState.ts +6 -6
  70. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionStateBuilder.ts +5 -4
  71. package/src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts +1 -0
  72. package/tsconfig.json +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderProjectionValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAEL,uBAAuB,EACvB,0BAA0B,EAC1B,WAAW,EACX,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EAExB,mCAAmC,EACnC,iCAAiC,EACjC,qBAAqB,EACrB,iCAAiC,EACjC,iBAAiB,EACjB,aAAa,GACd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,oBAAoB,EACpB,yBAAyB,GAC1B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,2CAA2C,EAC3C,uCAAuC,GACx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BAAuB,CAAC,iBAAiB,EAC/D,qBAAqB,CAAC,mBAAmB,CAC1C;iBACF,EACD,iBAAiB,CAAC,iBAAiB,CAAC,KAAK,CAC1C,CAAC;aACH;iBAAM,IACL,qBAAqB;gBACrB,2CAA2C,EAC3C;gBACA,YAAY,GAAG,IAAI,mCAAmC,CACpD,iCAAiC,CAC/B,qBAAqB,CACnB,qBAAqB,CAAC,MAAM,EAC5B,IAAI,iCAAiC;gBACnC,iDAAiD;gBACjD,EAAE,CACH;qBACE,6BAA6B,CAC5B,OAAO,CAAC,OAAO,EAAE,qBAAqB,CAAC,CACxC;qBACA,KAAK,EAAE,CACX,CACF,CACF,CAAC;aACH;iBAAM;gBACL,MAAM,IAAI,yBAAyB,CACjC,8EAA8E,EAC9E,qBAAqB,CACtB,CAAC;aACH;YACD,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACvC,CAAC,CAAC,CAAC;QACH,eAAe,CAAC,gBAAgB,GAAG;YACjC,mBAAmB;YACnB,UAAU;YACV,UAAU;SACX,CAAC;QACF,cAAc,CAAC,kBAAkB,CAAC,CAAC,CAAC,GAAG,eAAe,CAAC;KACxD;IAED,oBAAoB;IACpB,sBAAsB,CAAC,QAAQ,CAAC,gBAAgB,EAAE,cAAc,CAAC,CAAC;IAElE,oBAAoB;IACpB,gBAAgB,CAAC,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IAE3D,6BAA6B;IAC7B,uBAAuB,CAAC,QAAQ,CAAC,sBAAsB,EAAE,cAAc,EAAE;QACvE,eAAe,EAAE,OAAO,EAAE,wBAAwB;YAChD,CAAC,CAAC,iBAAiB,CAAC,WAAW,CAAC,YAAY;YAC5C,CAAC,CAAC,SAAS;KACd,CAAC,CAAC;AACL,CAAC,CAAC"}
1
+ {"version":3,"file":"QueryBuilderProjectionValueSpecificationBuilder.js","sourceRoot":"","sources":["../../../../../src/stores/fetch-structure/tds/projection/QueryBuilderProjectionValueSpecificationBuilder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gB,CAAC,QAAQ,CAAC,eAAe,EAAE,cAAc,CAAC,CAAC;IAE3D,6BAA6B;IAC7B,uBAAuB,CAAC,QAAQ,CAAC,sBAAsB,EAAE,cAAc,EAAE;QACvE,eAAe,EAAE,OAAO,EAAE,wBAAwB;YAChD,CAAC,CAAC,iBAAiB,CAAC,WAAW,CAAC,YAAY;YAC5C,CAAC,CAAC,SAAS;KACd,CAAC,CAAC;AACL,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-query-builder",
3
- "version": "0.6.18",
3
+ "version": "0.6.20",
4
4
  "description": "Legend query builder core",
5
5
  "keywords": [
6
6
  "legend",
@@ -44,12 +44,12 @@
44
44
  "@ag-grid-community/client-side-row-model": "28.2.1",
45
45
  "@ag-grid-community/core": "28.2.1",
46
46
  "@ag-grid-community/react": "28.2.1",
47
- "@finos/legend-application": "10.2.9",
48
- "@finos/legend-art": "5.0.20",
49
- "@finos/legend-graph": "22.2.1",
50
- "@finos/legend-server-depot": "4.2.6",
51
- "@finos/legend-shared": "6.2.14",
52
- "@finos/legend-storage": "3.0.29",
47
+ "@finos/legend-application": "10.2.11",
48
+ "@finos/legend-art": "5.0.21",
49
+ "@finos/legend-graph": "22.2.3",
50
+ "@finos/legend-server-depot": "4.2.7",
51
+ "@finos/legend-shared": "6.2.15",
52
+ "@finos/legend-storage": "3.0.30",
53
53
  "@testing-library/react": "13.4.0",
54
54
  "@types/papaparse": "5.3.7",
55
55
  "@types/react": "18.0.27",
@@ -64,11 +64,11 @@
64
64
  "serializr": "3.0.2"
65
65
  },
66
66
  "devDependencies": {
67
- "@finos/legend-dev-utils": "2.0.37",
68
- "@jest/globals": "29.3.1",
67
+ "@finos/legend-dev-utils": "2.0.38",
68
+ "@jest/globals": "29.4.1",
69
69
  "cross-env": "7.0.3",
70
70
  "eslint": "8.32.0",
71
- "jest": "29.3.1",
71
+ "jest": "29.4.1",
72
72
  "npm-run-all": "4.1.5",
73
73
  "rimraf": "3.0.2",
74
74
  "sass": "1.57.1",
@@ -33,6 +33,12 @@ import {
33
33
  WaterDropIcon,
34
34
  AssistantIcon,
35
35
  MenuContentDivider,
36
+ Dialog,
37
+ Modal,
38
+ ModalBody,
39
+ ModalFooter,
40
+ ModalHeader,
41
+ BlankPanelContent,
36
42
  } from '@finos/legend-art';
37
43
  import { QueryBuilderFilterPanel } from './filter/QueryBuilderFilterPanel.js';
38
44
  import { QueryBuilderExplorerPanel } from './explorer/QueryBuilderExplorerPanel.js';
@@ -60,6 +66,7 @@ import { QueryBuilderGraphFetchTreeState } from '../stores/fetch-structure/graph
60
66
  import { QueryBuilderPostTDSPanel } from './fetch-structure/QueryBuilderPostTDSPanel.js';
61
67
  import { QueryBuilderWatermarkEditor } from './watermark/QueryBuilderWatermark.js';
62
68
  import { QueryBuilderConstantExpressionPanel } from './QueryBuilderConstantExpressionPanel.js';
69
+ import { QueryBuilder_LegendApplicationPlugin } from './QueryBuilder_LegendApplicationPlugin.js';
63
70
 
64
71
  export const QUERY_BUILDER_BACKDROP_CONTAINER_ID =
65
72
  'query-builder.backdrop-container';
@@ -190,6 +197,54 @@ const QueryBuilderPostGraphFetchPanel = observer(
190
197
  },
191
198
  );
192
199
 
200
+ const renderCheckEntitlementsEditor = (
201
+ queryBuilderState: QueryBuilderState,
202
+ plugins: QueryBuilder_LegendApplicationPlugin[],
203
+ ): React.ReactNode => {
204
+ const checkEntitlementsEditorRenderers = plugins.flatMap(
205
+ (plugin) => plugin.getCheckEntitlementsEditorRender() ?? [],
206
+ );
207
+ for (const editorRenderer of checkEntitlementsEditorRenderers) {
208
+ const editor = editorRenderer(queryBuilderState);
209
+ if (editor) {
210
+ return editor;
211
+ }
212
+ }
213
+
214
+ const handleClose = (): void => {
215
+ queryBuilderState.checkEntitlementsState.setIsCheckingEntitlements(false);
216
+ };
217
+
218
+ return (
219
+ <Dialog
220
+ open={queryBuilderState.checkEntitlementsState.isCheckingEntitlements}
221
+ onClose={handleClose}
222
+ classes={{
223
+ root: 'editor-modal__root-container',
224
+ container: 'editor-modal__container',
225
+ paper: 'editor-modal__content',
226
+ }}
227
+ >
228
+ <Modal darkMode={true} className="editor-modal">
229
+ <ModalHeader title="Query Entitlements" />
230
+ <ModalBody>
231
+ <BlankPanelContent>
232
+ Check Entitlements are not supported
233
+ </BlankPanelContent>
234
+ </ModalBody>
235
+ <ModalFooter>
236
+ <button
237
+ className="btn modal__footer__close-btn"
238
+ onClick={handleClose}
239
+ >
240
+ Close
241
+ </button>
242
+ </ModalFooter>
243
+ </Modal>
244
+ </Dialog>
245
+ );
246
+ };
247
+
193
248
  export const QueryBuilder = observer(
194
249
  (props: { queryBuilderState: QueryBuilderState }) => {
195
250
  const { queryBuilderState } = props;
@@ -250,6 +305,10 @@ export const QueryBuilder = observer(
250
305
  openLambdaEditor(QueryBuilderTextEditorMode.JSON);
251
306
  };
252
307
 
308
+ const openCheckEntitlmentsEditor = (): void => {
309
+ queryBuilderState.checkEntitlementsState.setIsCheckingEntitlements(true);
310
+ };
311
+
253
312
  useCommands(queryBuilderState);
254
313
  const toggleShowOLAPGroupByPanel = (): void => {
255
314
  if (isTDSState) {
@@ -444,6 +503,12 @@ export const QueryBuilder = observer(
444
503
  Show Watermark
445
504
  </MenuContentItemLabel>
446
505
  </MenuContentItem>
506
+ <MenuContentItem onClick={openCheckEntitlmentsEditor}>
507
+ <MenuContentItemIcon>{null}</MenuContentItemIcon>
508
+ <MenuContentItemLabel className="query-builder__sub-header__menu-content">
509
+ Check Entitlements
510
+ </MenuContentItemLabel>
511
+ </MenuContentItem>
447
512
  <MenuContentDivider />
448
513
  <MenuContentItem onClick={editQueryInPure}>
449
514
  <MenuContentItemIcon>{null}</MenuContentItemIcon>
@@ -588,6 +653,16 @@ export const QueryBuilder = observer(
588
653
  {queryBuilderState.textEditorState.mode && (
589
654
  <QueryBuilderTextEditor queryBuilderState={queryBuilderState} />
590
655
  )}
656
+ {queryBuilderState.checkEntitlementsState.isCheckingEntitlements &&
657
+ renderCheckEntitlementsEditor(
658
+ queryBuilderState,
659
+ applicationStore.pluginManager
660
+ .getApplicationPlugins()
661
+ .filter(
662
+ (plugin) =>
663
+ plugin instanceof QueryBuilder_LegendApplicationPlugin,
664
+ ) as QueryBuilder_LegendApplicationPlugin[],
665
+ )}
591
666
  </div>
592
667
  <QueryBuilderStatusBar queryBuilderState={queryBuilderState} />
593
668
  </div>
@@ -271,7 +271,7 @@ export const QueryBuilderConstantExpressionPanel = observer(
271
271
  ))}
272
272
  {!constantState.constants.length && (
273
273
  <BlankPanelPlaceholder
274
- text="Add a Constants"
274
+ text="Add a Constant"
275
275
  disabled={isReadOnly}
276
276
  onClick={addConstant}
277
277
  clickActionType="add"
@@ -19,10 +19,12 @@ import { observer } from 'mobx-react-lite';
19
19
  import {
20
20
  clsx,
21
21
  Dialog,
22
+ LoadingIcon,
22
23
  Modal,
23
24
  ModalBody,
24
25
  ModalFooter,
25
26
  ModalHeader,
27
+ PanelLoadingIndicator,
26
28
  } from '@finos/legend-art';
27
29
  import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
28
30
  import { QueryBuilderTextEditorMode } from '../stores/QueryBuilderTextEditorState.js';
@@ -80,6 +82,11 @@ export const QueryBuilderTextEditor = observer(
80
82
  </div>
81
83
  )}
82
84
  </ModalHeader>
85
+ <PanelLoadingIndicator
86
+ isLoading={
87
+ queryBuilderState.textEditorState.closingQueryState.isInProgress
88
+ }
89
+ />
83
90
  <ModalBody>
84
91
  <div
85
92
  className={clsx('query-builder-text-mode__modal__content', {
@@ -119,9 +126,19 @@ export const QueryBuilderTextEditor = observer(
119
126
  <button
120
127
  className="btn btn--dark"
121
128
  onClick={close}
122
- disabled={Boolean(queryTextEditorState.parserError)}
129
+ disabled={
130
+ Boolean(queryTextEditorState.parserError) ||
131
+ queryBuilderState.textEditorState.closingQueryState.isInProgress
132
+ }
123
133
  >
124
- Close
134
+ {queryBuilderState.textEditorState.closingQueryState
135
+ .isInProgress ? (
136
+ <>
137
+ <LoadingIcon isLoading={true} /> Closing
138
+ </>
139
+ ) : (
140
+ <> Close </>
141
+ )}
125
142
  </button>
126
143
  </ModalFooter>
127
144
  </Modal>
@@ -22,6 +22,11 @@ import {
22
22
  } from '@finos/legend-application';
23
23
  import packageJson from '../../package.json';
24
24
  import { QUERY_BUILDER_COMMAND_CONFIG } from '../stores/QueryBuilderCommand.js';
25
+ import type { QueryBuilderState } from '../stores/QueryBuilderState.js';
26
+
27
+ export type CheckEntitlementEditorRender = (
28
+ queryBuilderState: QueryBuilderState,
29
+ ) => React.ReactNode | undefined;
25
30
 
26
31
  export class QueryBuilder_LegendApplicationPlugin extends LegendApplicationPlugin {
27
32
  static NAME = packageJson.extensions.applicationPlugin;
@@ -41,4 +46,8 @@ export class QueryBuilder_LegendApplicationPlugin extends LegendApplicationPlugi
41
46
  QUERY_BUILDER_COMMAND_CONFIG,
42
47
  );
43
48
  }
49
+
50
+ getCheckEntitlementsEditorRender(): CheckEntitlementEditorRender | undefined {
51
+ return undefined;
52
+ }
44
53
  }
@@ -32,17 +32,17 @@ import {
32
32
  COLUMN_SORT_TYPE,
33
33
  SortColumnState,
34
34
  } from '../../stores/fetch-structure/tds/QueryResultSetModifierState.js';
35
- import type { QueryBuilderProjectionColumnState } from '../../stores/fetch-structure/tds/projection/QueryBuilderProjectionColumnState.js';
36
35
  import { guaranteeNonNullable } from '@finos/legend-shared';
37
36
  import { useApplicationStore } from '@finos/legend-application';
38
37
  import type { QueryBuilderTDSState } from '../../stores/fetch-structure/tds/QueryBuilderTDSState.js';
38
+ import type { QueryBuilderTDSColumnState } from '../../stores/fetch-structure/tds/QueryBuilderTDSColumnState.js';
39
39
 
40
40
  const ColumnSortEditor = observer(
41
41
  (props: { tdsState: QueryBuilderTDSState; sortState: SortColumnState }) => {
42
42
  const { tdsState, sortState } = props;
43
43
  const applicationStore = useApplicationStore();
44
44
  const sortColumns = tdsState.resultSetModifierState.sortColumns;
45
- const projectionOptions = tdsState.projectionColumns
45
+ const projectionOptions = tdsState.tdsColumns
46
46
  .filter(
47
47
  (projectionCol) =>
48
48
  projectionCol === sortState.columnState ||
@@ -57,7 +57,7 @@ const ColumnSortEditor = observer(
57
57
  value: sortState,
58
58
  };
59
59
  const onChange = (
60
- val: { label: string; value: QueryBuilderProjectionColumnState } | null,
60
+ val: { label: string; value: QueryBuilderTDSColumnState } | null,
61
61
  ): void => {
62
62
  if (val !== null) {
63
63
  sortState.setColumnState(val.value);
@@ -35,6 +35,7 @@ import {
35
35
  OptionsIcon,
36
36
  PlusIcon,
37
37
  PanelContent,
38
+ BrushIcon,
38
39
  } from '@finos/legend-art';
39
40
  import {
40
41
  type QueryBuilderExplorerTreeDragSource,
@@ -478,6 +479,12 @@ export const QueryBuilderTDSPanel = observer(
478
479
  tdsState.resultSetModifierState.setShowModal(true);
479
480
  const addNewBlankDerivation = (): void => tdsState.addNewBlankDerivation();
480
481
 
482
+ const clearAllProjectionColumns = (): void => {
483
+ tdsState.checkBeforeClearingColumns(() => {
484
+ tdsState.removeAllColumns();
485
+ });
486
+ };
487
+
481
488
  // Drag and Drop
482
489
  const handleDrop = useCallback(
483
490
  (
@@ -565,6 +572,19 @@ export const QueryBuilderTDSPanel = observer(
565
572
  >
566
573
  <OptionsIcon className="query-builder__icon query-builder__icon__query-option" />
567
574
  </button>
575
+ <button
576
+ className="panel__header__action"
577
+ disabled={tdsState.projectionColumns.length < 1}
578
+ onClick={clearAllProjectionColumns}
579
+ tabIndex={-1}
580
+ title={
581
+ tdsState.projectionColumns.length < 1
582
+ ? 'No projection columns to clear'
583
+ : 'Clear all projection columns'
584
+ }
585
+ >
586
+ <BrushIcon className="query-builder__icon query-builder__icon__query-option--small" />
587
+ </button>
568
588
  <button
569
589
  className="panel__header__action"
570
590
  onClick={addNewBlankDerivation}
@@ -113,4 +113,6 @@ export enum QUERY_BUILDER_HASH_STRUCTURE {
113
113
  MILESTONING_STATE = 'MILESTONING_STATE',
114
114
  UNSUPPORTED_QUERY_STATE = 'UNSUPPORTED_QUERY_STATE',
115
115
  QUERY_BUILDER_STATE = 'QUERY_BUILDER_STATE',
116
+
117
+ CHECK_ENTITLEMENTS_STATE = 'CHECK_ENTITLEMENTS_STATE',
116
118
  }
package/src/index.ts CHANGED
@@ -18,7 +18,10 @@ export * from './stores/QueryBuilderBootstraper.js';
18
18
  export { QueryBuilder_GraphManagerPreset } from './graphManager/QueryBuilder_GraphManagerPreset.js';
19
19
 
20
20
  export { QUERY_BUILDER_TEST_ID } from './components/QueryBuilder_TestID.js';
21
- export { QueryBuilder_LegendApplicationPlugin } from './components/QueryBuilder_LegendApplicationPlugin.js';
21
+ export {
22
+ type CheckEntitlementEditorRender,
23
+ QueryBuilder_LegendApplicationPlugin,
24
+ } from './components/QueryBuilder_LegendApplicationPlugin.js';
22
25
  export { QueryBuilderNavigationBlocker } from './components/QueryBuilderNavigationBlocker.js';
23
26
  export {
24
27
  QueryBuilder,
@@ -77,6 +77,7 @@ import { QUERY_BUILDER_HASH_STRUCTURE } from '../graphManager/QueryBuilderHashUt
77
77
  import { QUERY_BUILDER_COMMAND_KEY } from './QueryBuilderCommand.js';
78
78
  import { QueryBuilderWatermarkState } from './watermark/QueryBuilderWatermarkState.js';
79
79
  import { QueryBuilderConstantsState } from './QueryBuilderConstantsState.js';
80
+ import { QueryBuilderCheckEntitlementsState } from './entitlements/QueryBuilderCheckEntitlementsState.js';
80
81
 
81
82
  export abstract class QueryBuilderState implements CommandRegistrar {
82
83
  applicationStore: GenericLegendApplicationStore;
@@ -91,6 +92,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
91
92
  fetchStructureState: QueryBuilderFetchStructureState;
92
93
  filterState: QueryBuilderFilterState;
93
94
  watermarkState: QueryBuilderWatermarkState;
95
+ checkEntitlementsState: QueryBuilderCheckEntitlementsState;
94
96
  filterOperators: QueryBuilderFilterOperator[] =
95
97
  getQueryBuilderCoreFilterOperators();
96
98
  resultState: QueryBuilderResultState;
@@ -102,6 +104,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
102
104
  showFunctionsExplorerPanel = false;
103
105
  showParametersPanel = false;
104
106
  isEditingWatermark = false;
107
+ isCheckingEntitlments = false;
105
108
 
106
109
  class?: Class | undefined;
107
110
  mapping?: Mapping | undefined;
@@ -123,12 +126,14 @@ export abstract class QueryBuilderState implements CommandRegistrar {
123
126
  fetchStructureState: observable,
124
127
  filterState: observable,
125
128
  watermarkState: observable,
129
+ checkEntitlementsState: observable,
126
130
  resultState: observable,
127
131
  textEditorState: observable,
128
132
  unsupportedQueryState: observable,
129
133
  showFunctionsExplorerPanel: observable,
130
134
  showParametersPanel: observable,
131
135
  isEditingWatermark: observable,
136
+ isCheckingEntitlments: observable,
132
137
  changeDetectionState: observable,
133
138
  class: observable,
134
139
  mapping: observable,
@@ -141,6 +146,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
141
146
  setShowFunctionsExplorerPanel: action,
142
147
  setShowParametersPanel: action,
143
148
  setIsEditingWatermark: action,
149
+ setIsCheckingEntitlments: action,
144
150
  setClass: action,
145
151
  setMapping: action,
146
152
  setRuntimeValue: action,
@@ -167,6 +173,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
167
173
  this.fetchStructureState = new QueryBuilderFetchStructureState(this);
168
174
  this.filterState = new QueryBuilderFilterState(this, this.filterOperators);
169
175
  this.watermarkState = new QueryBuilderWatermarkState(this);
176
+ this.checkEntitlementsState = new QueryBuilderCheckEntitlementsState(this);
170
177
  this.resultState = new QueryBuilderResultState(this);
171
178
  this.textEditorState = new QueryBuilderTextEditorState(this);
172
179
  this.unsupportedQueryState = new QueryBuilderUnsupportedQueryState(this);
@@ -230,6 +237,10 @@ export abstract class QueryBuilderState implements CommandRegistrar {
230
237
  this.isEditingWatermark = val;
231
238
  }
232
239
 
240
+ setIsCheckingEntitlments(val: boolean): void {
241
+ this.isCheckingEntitlments = val;
242
+ }
243
+
233
244
  setClass(val: Class | undefined): void {
234
245
  this.class = val;
235
246
  }
@@ -291,6 +302,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
291
302
  this.functionsExplorerState = new QueryFunctionsExplorerState(this);
292
303
  this.filterState = new QueryBuilderFilterState(this, this.filterOperators);
293
304
  this.watermarkState = new QueryBuilderWatermarkState(this);
305
+ this.checkEntitlementsState = new QueryBuilderCheckEntitlementsState(this);
294
306
 
295
307
  const currentFetchStructureImplementationType =
296
308
  this.fetchStructureState.implementation.type;
@@ -528,6 +540,7 @@ export abstract class QueryBuilderState implements CommandRegistrar {
528
540
  this.parametersState,
529
541
  this.filterState,
530
542
  this.watermarkState,
543
+ this.checkEntitlementsState,
531
544
  this.fetchStructureState.implementation,
532
545
  ]);
533
546
  }
@@ -26,6 +26,7 @@ import {
26
26
  type GeneratorFn,
27
27
  assertErrorThrown,
28
28
  LogEvent,
29
+ ActionState,
29
30
  } from '@finos/legend-shared';
30
31
  import { observable, action, flow, makeObservable, flowResult } from 'mobx';
31
32
  import type { QueryBuilderState } from './QueryBuilderState.js';
@@ -59,6 +60,8 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
59
60
  rawLambdaState: QueryBuilderRawLambdaState;
60
61
  isConvertingLambdaToString = false;
61
62
  mode: QueryBuilderTextEditorMode | undefined;
63
+ closingQueryState = ActionState.create();
64
+
62
65
  /**
63
66
  * This is used to store the JSON string when viewing the query in JSON mode
64
67
  * TODO: consider moving this to another state if we need to simplify the logic of text-mode
@@ -187,6 +190,7 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
187
190
  }
188
191
 
189
192
  *closeModal(): GeneratorFn<void> {
193
+ this.closingQueryState.inProgress();
190
194
  if (this.mode === QueryBuilderTextEditorMode.TEXT) {
191
195
  yield flowResult(this.convertLambdaGrammarStringToObject());
192
196
  if (this.parserError) {
@@ -199,6 +203,8 @@ export class QueryBuilderTextEditorState extends LambdaEditorState {
199
203
  }
200
204
  return;
201
205
  }
206
+ this.closingQueryState.complete();
207
+
202
208
  this.setMode(undefined);
203
209
  }
204
210
  }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Copyright (c) 2020-present, Goldman Sachs
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+
17
+ import { type Hashable, hashArray } from '@finos/legend-shared';
18
+ import { makeObservable, observable, action, computed } from 'mobx';
19
+ import { QUERY_BUILDER_HASH_STRUCTURE } from '../../graphManager/QueryBuilderHashUtils.js';
20
+ import type { QueryBuilderState } from '../QueryBuilderState.js';
21
+
22
+ export class QueryBuilderCheckEntitlementsState implements Hashable {
23
+ readonly queryBuilderState: QueryBuilderState;
24
+ isCheckingEntitlements = false;
25
+
26
+ constructor(queryBuilderState: QueryBuilderState) {
27
+ makeObservable(this, {
28
+ isCheckingEntitlements: observable,
29
+ setIsCheckingEntitlements: action,
30
+ hashCode: computed,
31
+ });
32
+
33
+ this.queryBuilderState = queryBuilderState;
34
+ }
35
+
36
+ setIsCheckingEntitlements(val: boolean): void {
37
+ this.isCheckingEntitlements = val;
38
+ }
39
+
40
+ get hashCode(): string {
41
+ return hashArray([
42
+ QUERY_BUILDER_HASH_STRUCTURE.CHECK_ENTITLEMENTS_STATE,
43
+ this.isCheckingEntitlements,
44
+ ]);
45
+ }
46
+ }
@@ -428,6 +428,11 @@ export class QueryBuilderTDSState
428
428
  changeEntry(this.projectionColumns, oldVal, newVal);
429
429
  }
430
430
 
431
+ removeAllColumns(): void {
432
+ this.projectionColumns = [];
433
+ this.aggregationState.columns = [];
434
+ }
435
+
431
436
  removeColumn(val: QueryBuilderProjectionColumnState): void {
432
437
  deleteEntry(this.projectionColumns, val);
433
438
 
@@ -603,6 +608,28 @@ export class QueryBuilderTDSState
603
608
  });
604
609
  }
605
610
 
611
+ checkBeforeClearingColumns(onChange: () => void): void {
612
+ this.queryBuilderState.applicationStore.setActionAlertInfo({
613
+ message:
614
+ 'You will be clearing all projection columns. Do you still want to proceed?',
615
+ type: ActionAlertType.CAUTION,
616
+ actions: [
617
+ {
618
+ label: 'Proceed',
619
+ type: ActionAlertActionType.PROCEED_WITH_CAUTION,
620
+ handler: this.queryBuilderState.applicationStore.guardUnhandledError(
621
+ async () => onChange(),
622
+ ),
623
+ },
624
+ {
625
+ label: 'Cancel',
626
+ type: ActionAlertActionType.PROCEED,
627
+ default: true,
628
+ },
629
+ ],
630
+ });
631
+ }
632
+
606
633
  checkBeforeChangingImplementation(onChange: () => void): void {
607
634
  if (
608
635
  this.projectionColumns.length > 0
@@ -16,7 +16,6 @@
16
16
 
17
17
  import { action, computed, makeObservable, observable } from 'mobx';
18
18
  import type { QueryBuilderTDSState } from './QueryBuilderTDSState.js';
19
- import type { QueryBuilderProjectionColumnState } from './projection/QueryBuilderProjectionColumnState.js';
20
19
  import {
21
20
  addUniqueEntry,
22
21
  deleteEntry,
@@ -24,6 +23,7 @@ import {
24
23
  hashArray,
25
24
  } from '@finos/legend-shared';
26
25
  import { QUERY_BUILDER_HASH_STRUCTURE } from '../../../graphManager/QueryBuilderHashUtils.js';
26
+ import type { QueryBuilderTDSColumnState } from './QueryBuilderTDSColumnState.js';
27
27
 
28
28
  export enum COLUMN_SORT_TYPE {
29
29
  ASC = 'ASC',
@@ -31,10 +31,10 @@ export enum COLUMN_SORT_TYPE {
31
31
  }
32
32
 
33
33
  export class SortColumnState implements Hashable {
34
- columnState: QueryBuilderProjectionColumnState;
34
+ columnState: QueryBuilderTDSColumnState;
35
35
  sortType = COLUMN_SORT_TYPE.ASC;
36
36
 
37
- constructor(columnState: QueryBuilderProjectionColumnState) {
37
+ constructor(columnState: QueryBuilderTDSColumnState) {
38
38
  makeObservable(this, {
39
39
  columnState: observable,
40
40
  sortType: observable,
@@ -46,7 +46,7 @@ export class SortColumnState implements Hashable {
46
46
  this.columnState = columnState;
47
47
  }
48
48
 
49
- setColumnState(val: QueryBuilderProjectionColumnState): void {
49
+ setColumnState(val: QueryBuilderTDSColumnState): void {
50
50
  this.columnState = val;
51
51
  }
52
52
 
@@ -109,8 +109,8 @@ export class QueryResultSetModifierState implements Hashable {
109
109
  }
110
110
 
111
111
  updateSortColumns(): void {
112
- this.sortColumns = this.sortColumns.filter((e) =>
113
- this.tdsState.projectionColumns.includes(e.columnState),
112
+ this.sortColumns = this.sortColumns.filter((colState) =>
113
+ this.tdsState.tdsColumns.includes(colState.columnState),
114
114
  );
115
115
  }
116
116
 
@@ -263,6 +263,7 @@ export const processTDSTakeExpression = (
263
263
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
264
264
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
265
265
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER,
266
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY,
266
267
  ]),
267
268
  `Can't process take() expression: only support take() in TDS expression`,
268
269
  );
@@ -311,6 +312,7 @@ export const processTDSDistinctExpression = (
311
312
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
312
313
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
313
314
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER,
315
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY,
314
316
  ]),
315
317
  `Can't process distinct() expression: only support distinct() in TDS expression`,
316
318
  );
@@ -418,10 +420,9 @@ export const processTDSSortDirectionExpression = (
418
420
  const sortColumnName = extractNullableStringFromInstanceValue(
419
421
  guaranteeNonNullable(expression.parametersValues[0]),
420
422
  );
421
- const queryBuilderProjectionColumnState =
422
- projectionState.projectionColumns.find(
423
- (e) => e.columnName === sortColumnName,
424
- );
423
+ const queryBuilderProjectionColumnState = projectionState.tdsColumns.find(
424
+ (e) => e.columnName === sortColumnName,
425
+ );
425
426
  if (queryBuilderProjectionColumnState) {
426
427
  const sortColumnState = new SortColumnState(
427
428
  queryBuilderProjectionColumnState,
@@ -85,6 +85,7 @@ const appendResultSetModifier = (
85
85
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_PROJECT,
86
86
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_GROUP_BY,
87
87
  QUERY_BUILDER_SUPPORTED_FUNCTIONS.TDS_FILTER,
88
+ QUERY_BUILDER_SUPPORTED_FUNCTIONS.OLAP_GROUPBY,
88
89
  ])
89
90
  ) {
90
91
  let currentExpression = func;
package/tsconfig.json CHANGED
@@ -68,6 +68,7 @@
68
68
  "./src/stores/QueryBuilderValueSpecificationBuilderHelper.ts",
69
69
  "./src/stores/QueryBuilderValueSpecificationHelper.ts",
70
70
  "./src/stores/ServiceInfo.ts",
71
+ "./src/stores/entitlements/QueryBuilderCheckEntitlementsState.ts",
71
72
  "./src/stores/explorer/QueryBuilderExplorerState.ts",
72
73
  "./src/stores/explorer/QueryBuilderPropertySearchState.ts",
73
74
  "./src/stores/explorer/QueryFunctionsExplorerState.ts",