@finos/legend-query-builder 3.1.0 → 3.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts +20 -20
  2. package/lib/__lib__/QueryBuilderTelemetryHelper.d.ts.map +1 -1
  3. package/lib/__lib__/QueryBuilderTelemetryHelper.js +40 -40
  4. package/lib/__lib__/QueryBuilderTelemetryHelper.js.map +1 -1
  5. package/lib/components/QueryLoader.d.ts +30 -0
  6. package/lib/components/QueryLoader.d.ts.map +1 -0
  7. package/lib/components/QueryLoader.js +160 -0
  8. package/lib/components/QueryLoader.js.map +1 -0
  9. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.d.ts.map +1 -1
  10. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js +2 -1
  11. package/lib/components/shared/QueryBuilderPanelIssueCountBadge.js.map +1 -1
  12. package/lib/index.css +2 -2
  13. package/lib/index.css.map +1 -1
  14. package/lib/index.d.ts +3 -0
  15. package/lib/index.d.ts.map +1 -1
  16. package/lib/index.js +3 -0
  17. package/lib/index.js.map +1 -1
  18. package/lib/package.json +1 -1
  19. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts +30 -0
  20. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.d.ts.map +1 -0
  21. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.js +17 -0
  22. package/lib/stores/QueryBuilder_LegendApplicationPlugin_Extension.js.map +1 -0
  23. package/lib/stores/QueryLoaderState.d.ts +67 -0
  24. package/lib/stores/QueryLoaderState.d.ts.map +1 -0
  25. package/lib/stores/QueryLoaderState.js +205 -0
  26. package/lib/stores/QueryLoaderState.js.map +1 -0
  27. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts +3 -1
  28. package/lib/stores/shared/ValueSpecificationEditorHelper.d.ts.map +1 -1
  29. package/lib/stores/shared/ValueSpecificationEditorHelper.js +7 -1
  30. package/lib/stores/shared/ValueSpecificationEditorHelper.js.map +1 -1
  31. package/package.json +8 -8
  32. package/src/__lib__/QueryBuilderTelemetryHelper.ts +40 -59
  33. package/src/components/QueryLoader.tsx +501 -0
  34. package/src/components/shared/QueryBuilderPanelIssueCountBadge.tsx +2 -1
  35. package/src/index.ts +3 -0
  36. package/src/stores/QueryBuilder_LegendApplicationPlugin_Extension.ts +36 -0
  37. package/src/stores/QueryLoaderState.ts +298 -0
  38. package/src/stores/shared/ValueSpecificationEditorHelper.ts +39 -2
  39. package/tsconfig.json +3 -0
@@ -19,26 +19,26 @@ type QueryExecution_TelemetryData = GraphManagerOperationReport & {
19
19
  dependenciesCount: number;
20
20
  };
21
21
  export declare class QueryBuilderTelemetryHelper {
22
- static logEvent_QueryRunLaunched(telemetryService: TelemetryService): void;
23
- static logEvent_ExecutionPlanGenerationLaunched(telemetryService: TelemetryService): void;
24
- static logEvent_ExecutionPlanDebugLaunched(telemetryService: TelemetryService): void;
25
- static logEvent_QueryRunSucceeded(telemetryService: TelemetryService, data: QueryExecution_TelemetryData): void;
26
- static logEvent_ExecutionPlanGenerationSucceeded(telemetryService: TelemetryService, data: QueryExecution_TelemetryData): void;
27
- static logEvent_ExecutionPlanDebugSucceeded(telemetryService: TelemetryService, data: QueryExecution_TelemetryData): void;
28
- static logEvent_FilterCreateConditionLaunched(telemetryService: TelemetryService): void;
29
- static logEvent_FilterCleanupTreeLaunched(telemetryService: TelemetryService): void;
30
- static logEvent_FilterCollapseTreeLaunched(telemetryService: TelemetryService): void;
31
- static logEvent_FilterCreateGroupFromConditionLaunched(telemetryService: TelemetryService): void;
32
- static logEvent_FilterCreateLogicalGroupLaunched(telemetryService: TelemetryService): void;
33
- static logEvent_FilterExpandTreeLaunched(telemetryService: TelemetryService): void;
34
- static logEvent_FilterSimplifyTreeLaunched(telemetryService: TelemetryService): void;
35
- static logEvent_PostFilterCreateConditionLaunched(telemetryService: TelemetryService): void;
36
- static logEvent_PostFilterCleanupTreeLaunched(telemetryService: TelemetryService): void;
37
- static logEvent_PostFilterCollapseTreeLaunched(telemetryService: TelemetryService): void;
38
- static logEvent_PostFilterCreateGroupFromConditionLaunched(telemetryService: TelemetryService): void;
39
- static logEvent_PostFilterCreateLogicalGroupLaunched(telemetryService: TelemetryService): void;
40
- static logEvent_PostFilterExpandTreeLaunched(telemetryService: TelemetryService): void;
41
- static logEvent_PostFilterSimplifyTreeLaunched(telemetryService: TelemetryService): void;
22
+ static logEvent_QueryRunLaunched(service: TelemetryService): void;
23
+ static logEvent_ExecutionPlanGenerationLaunched(service: TelemetryService): void;
24
+ static logEvent_ExecutionPlanDebugLaunched(service: TelemetryService): void;
25
+ static logEvent_QueryRunSucceeded(service: TelemetryService, data: QueryExecution_TelemetryData): void;
26
+ static logEvent_ExecutionPlanGenerationSucceeded(service: TelemetryService, data: QueryExecution_TelemetryData): void;
27
+ static logEvent_ExecutionPlanDebugSucceeded(service: TelemetryService, data: QueryExecution_TelemetryData): void;
28
+ static logEvent_FilterCreateConditionLaunched(service: TelemetryService): void;
29
+ static logEvent_FilterCleanupTreeLaunched(service: TelemetryService): void;
30
+ static logEvent_FilterCollapseTreeLaunched(service: TelemetryService): void;
31
+ static logEvent_FilterCreateGroupFromConditionLaunched(service: TelemetryService): void;
32
+ static logEvent_FilterCreateLogicalGroupLaunched(service: TelemetryService): void;
33
+ static logEvent_FilterExpandTreeLaunched(service: TelemetryService): void;
34
+ static logEvent_FilterSimplifyTreeLaunched(service: TelemetryService): void;
35
+ static logEvent_PostFilterCreateConditionLaunched(service: TelemetryService): void;
36
+ static logEvent_PostFilterCleanupTreeLaunched(service: TelemetryService): void;
37
+ static logEvent_PostFilterCollapseTreeLaunched(service: TelemetryService): void;
38
+ static logEvent_PostFilterCreateGroupFromConditionLaunched(service: TelemetryService): void;
39
+ static logEvent_PostFilterCreateLogicalGroupLaunched(service: TelemetryService): void;
40
+ static logEvent_PostFilterExpandTreeLaunched(service: TelemetryService): void;
41
+ static logEvent_PostFilterSimplifyTreeLaunched(service: TelemetryService): void;
42
42
  }
43
43
  export {};
44
44
  //# sourceMappingURL=QueryBuilderTelemetryHelper.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderTelemetryHelper.d.ts","sourceRoot":"","sources":["../../src/__lib__/QueryBuilderTelemetryHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAOlE,KAAK,4BAA4B,GAAG,2BAA2B,GAAG;IAChE,iBAAiB,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,qBAAa,2BAA2B;IACtC,MAAM,CAAC,yBAAyB,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,IAAI;IAI1E,MAAM,CAAC,wCAAwC,CAC7C,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,mCAAmC,CACxC,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,0BAA0B,CAC/B,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;IAIP,MAAM,CAAC,yCAAyC,CAC9C,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;IAOP,MAAM,CAAC,oCAAoC,CACzC,gBAAgB,EAAE,gBAAgB,EAClC,IAAI,EAAE,4BAA4B,GACjC,IAAI;IAOP,MAAM,CAAC,sCAAsC,CAC3C,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,kCAAkC,CACvC,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,mCAAmC,CACxC,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,+CAA+C,CACpD,gBAAgB,EAAE,gBAAgB,GACjC,IAAI;IAOP,MAAM,CAAC,yCAAyC,CAC9C,gBAAgB,EAAE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, QUERY_BUILDER_FILTER_EVENT, QUERY_BUILDER_POST_FILTER_EVENT, } from './QueryBuilderEvent.js';
17
17
  export class QueryBuilderTelemetryHelper {
18
- static logEvent_QueryRunLaunched(telemetryService) {
19
- telemetryService.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__LAUNCH, {});
18
+ static logEvent_QueryRunLaunched(service) {
19
+ service.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__LAUNCH, {});
20
20
  }
21
- static logEvent_ExecutionPlanGenerationLaunched(telemetryService) {
22
- telemetryService.logEvent(QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__LAUNCH, {});
21
+ static logEvent_ExecutionPlanGenerationLaunched(service) {
22
+ service.logEvent(QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__LAUNCH, {});
23
23
  }
24
- static logEvent_ExecutionPlanDebugLaunched(telemetryService) {
25
- telemetryService.logEvent(QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__LAUNCH, {});
24
+ static logEvent_ExecutionPlanDebugLaunched(service) {
25
+ service.logEvent(QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__LAUNCH, {});
26
26
  }
27
- static logEvent_QueryRunSucceeded(telemetryService, data) {
28
- telemetryService.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__SUCCESS, data);
27
+ static logEvent_QueryRunSucceeded(service, data) {
28
+ service.logEvent(QUERY_BUILDER_EVENT.RUN_QUERY__SUCCESS, data);
29
29
  }
30
- static logEvent_ExecutionPlanGenerationSucceeded(telemetryService, data) {
31
- telemetryService.logEvent(QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__SUCCESS, data);
30
+ static logEvent_ExecutionPlanGenerationSucceeded(service, data) {
31
+ service.logEvent(QUERY_BUILDER_EVENT.GENERATE_EXECUTION_PLAN__SUCCESS, data);
32
32
  }
33
- static logEvent_ExecutionPlanDebugSucceeded(telemetryService, data) {
34
- telemetryService.logEvent(QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__SUCCESS, data);
33
+ static logEvent_ExecutionPlanDebugSucceeded(service, data) {
34
+ service.logEvent(QUERY_BUILDER_EVENT.DEBUG_EXECUTION_PLAN__SUCCESS, data);
35
35
  }
36
- static logEvent_FilterCreateConditionLaunched(telemetryService) {
37
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__CONDITION__LAUNCH, {});
36
+ static logEvent_FilterCreateConditionLaunched(service) {
37
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__CONDITION__LAUNCH, {});
38
38
  }
39
- static logEvent_FilterCleanupTreeLaunched(telemetryService) {
40
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CLEANUP__TREE__LAUNCH, {});
39
+ static logEvent_FilterCleanupTreeLaunched(service) {
40
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CLEANUP__TREE__LAUNCH, {});
41
41
  }
42
- static logEvent_FilterCollapseTreeLaunched(telemetryService) {
43
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__COLLAPSE__TREE__LAUNCH, {});
42
+ static logEvent_FilterCollapseTreeLaunched(service) {
43
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__COLLAPSE__TREE__LAUNCH, {});
44
44
  }
45
- static logEvent_FilterCreateGroupFromConditionLaunched(telemetryService) {
46
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__GROUP__FROM__CONDITION__LAUNCH, {});
45
+ static logEvent_FilterCreateGroupFromConditionLaunched(service) {
46
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__GROUP__FROM__CONDITION__LAUNCH, {});
47
47
  }
48
- static logEvent_FilterCreateLogicalGroupLaunched(telemetryService) {
49
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__LOGICAL__GROUP__LAUNCH, {});
48
+ static logEvent_FilterCreateLogicalGroupLaunched(service) {
49
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__CREATE__LOGICAL__GROUP__LAUNCH, {});
50
50
  }
51
- static logEvent_FilterExpandTreeLaunched(telemetryService) {
52
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__EXPAND__TREE__LAUNCH, {});
51
+ static logEvent_FilterExpandTreeLaunched(service) {
52
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__EXPAND__TREE__LAUNCH, {});
53
53
  }
54
- static logEvent_FilterSimplifyTreeLaunched(telemetryService) {
55
- telemetryService.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__SIMPLIFY__TREE__LAUNCH, {});
54
+ static logEvent_FilterSimplifyTreeLaunched(service) {
55
+ service.logEvent(QUERY_BUILDER_FILTER_EVENT.FILTER__SIMPLIFY__TREE__LAUNCH, {});
56
56
  }
57
- static logEvent_PostFilterCreateConditionLaunched(telemetryService) {
58
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__CONDITION__LAUNCH, {});
57
+ static logEvent_PostFilterCreateConditionLaunched(service) {
58
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__CONDITION__LAUNCH, {});
59
59
  }
60
- static logEvent_PostFilterCleanupTreeLaunched(telemetryService) {
61
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CLEANUP__TREE__LAUNCH, {});
60
+ static logEvent_PostFilterCleanupTreeLaunched(service) {
61
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CLEANUP__TREE__LAUNCH, {});
62
62
  }
63
- static logEvent_PostFilterCollapseTreeLaunched(telemetryService) {
64
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__COLLAPSE__TREE__LAUNCH, {});
63
+ static logEvent_PostFilterCollapseTreeLaunched(service) {
64
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__COLLAPSE__TREE__LAUNCH, {});
65
65
  }
66
- static logEvent_PostFilterCreateGroupFromConditionLaunched(telemetryService) {
67
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__GROUP__FROM__CONDITION__LAUNCH, {});
66
+ static logEvent_PostFilterCreateGroupFromConditionLaunched(service) {
67
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__GROUP__FROM__CONDITION__LAUNCH, {});
68
68
  }
69
- static logEvent_PostFilterCreateLogicalGroupLaunched(telemetryService) {
70
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__LOGICAL__GROUP__LAUNCH, {});
69
+ static logEvent_PostFilterCreateLogicalGroupLaunched(service) {
70
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__CREATE__LOGICAL__GROUP__LAUNCH, {});
71
71
  }
72
- static logEvent_PostFilterExpandTreeLaunched(telemetryService) {
73
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__EXPAND__TREE__LAUNCH, {});
72
+ static logEvent_PostFilterExpandTreeLaunched(service) {
73
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__EXPAND__TREE__LAUNCH, {});
74
74
  }
75
- static logEvent_PostFilterSimplifyTreeLaunched(telemetryService) {
76
- telemetryService.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__SIMPLIFY__TREE__LAUNCH, {});
75
+ static logEvent_PostFilterSimplifyTreeLaunched(service) {
76
+ service.logEvent(QUERY_BUILDER_POST_FILTER_EVENT.FILTER__SIMPLIFY__TREE__LAUNCH, {});
77
77
  }
78
78
  }
79
79
  //# sourceMappingURL=QueryBuilderTelemetryHelper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderTelemetryHelper.js","sourceRoot":"","sources":["../../src/__lib__/QueryBuilderTelemetryHelper.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OA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AAC,QAAQ,CACd,+BAA+B,CAAC,6BAA6B,EAC7D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,uCAAuC,CAC5C,OAAyB;QAEzB,OAAO,CAAC,QAAQ,CACd,+BAA+B,CAAC,8BAA8B,EAC9D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,mDAAmD,CACxD,OAAyB;QAEzB,OAAO,CAAC,QAAQ,CACd,+BAA+B,CAAC,8CAA8C,EAC9E,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,6CAA6C,CAClD,OAAyB;QAEzB,OAAO,CAAC,QAAQ,CACd,+BAA+B,CAAC,sCAAsC,EACtE,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,qCAAqC,CAC1C,OAAyB;QAEzB,OAAO,CAAC,QAAQ,CACd,+BAA+B,CAAC,4BAA4B,EAC5D,EAAE,CACH,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,uCAAuC,CAC5C,OAAyB;QAEzB,OAAO,CAAC,QAAQ,CACd,+BAA+B,CAAC,8BAA8B,EAC9D,EAAE,CACH,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,30 @@
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
+ import { type QueryLoaderState } from '../stores/QueryLoaderState.js';
17
+ export declare const QueryLoader: ((props: {
18
+ queryLoaderState: QueryLoaderState;
19
+ loadActionLabel: string;
20
+ }) => JSX.Element) & {
21
+ displayName: string;
22
+ };
23
+ export declare const QueryLoaderDialog: ((props: {
24
+ queryLoaderState: QueryLoaderState;
25
+ title: string;
26
+ loadActionLabel?: string | undefined;
27
+ }) => JSX.Element) & {
28
+ displayName: string;
29
+ };
30
+ //# sourceMappingURL=QueryLoader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryLoader.d.ts","sourceRoot":"","sources":["../../src/components/QueryLoader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAuCH,OAAO,EAEL,KAAK,gBAAgB,EACtB,MAAM,+BAA+B,CAAC;AA4CvC,eAAO,MAAM,WAAW,WACd;IAAE,gBAAgB,EAAE,gBAAgB,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE;;CAyVxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,WACpB;IACN,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;;CA+CF,CAAC"}
@@ -0,0 +1,160 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /**
3
+ * Copyright (c) 2020-present, Goldman Sachs
4
+ *
5
+ * Licensed under the Apache License, Version 2.0 (the "License");
6
+ * you may not use this file except in compliance with the License.
7
+ * You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+ import { useApplicationStore } from '@finos/legend-application';
18
+ import { CODE_EDITOR_LANGUAGE, CodeEditor, } from '@finos/legend-lego/code-editor';
19
+ import { Dialog, Modal, ModalTitle, clsx, SearchIcon, TimesIcon, DropdownMenu, MenuContent, MenuContentItem, BlankPanelContent, PanelLoadingIndicator, ModalHeader, ModalBody, ModalFooter, ModalFooterButton, UserIcon, LastModifiedIcon, MoreVerticalIcon, ThinChevronRightIcon, InfoCircleIcon, } from '@finos/legend-art';
20
+ import { debounce, formatDistanceToNow, guaranteeNonNullable, quantifyList, } from '@finos/legend-shared';
21
+ import { flowResult } from 'mobx';
22
+ import { observer } from 'mobx-react-lite';
23
+ import { useRef, useState, useMemo, useEffect } from 'react';
24
+ import { QUERY_LOADER_TYPEAHEAD_SEARCH_LIMIT, } from '../stores/QueryLoaderState.js';
25
+ const QueryPreviewViewer = observer((props) => {
26
+ const { queryLoaderState } = props;
27
+ const close = () => {
28
+ queryLoaderState.setShowPreviewViewer(false);
29
+ };
30
+ return (_jsx(Dialog, { open: queryLoaderState.showPreviewViewer, onClose: close, classes: {
31
+ root: 'editor-modal__root-container',
32
+ container: 'editor-modal__container',
33
+ paper: 'editor-modal__content',
34
+ }, children: _jsxs(Modal, { className: "editor-modal", darkMode: true, children: [_jsx(ModalHeader, { title: guaranteeNonNullable(queryLoaderState.queryPreviewContent).name }), _jsx(ModalBody, { children: _jsx(CodeEditor, { inputValue: guaranteeNonNullable(queryLoaderState.queryPreviewContent)
35
+ .content, isReadOnly: true, language: CODE_EDITOR_LANGUAGE.PURE, showMiniMap: true }) }), _jsx(ModalFooter, { children: _jsx(ModalFooterButton, { onClick: close, text: "Close" }) })] }) }));
36
+ });
37
+ export const QueryLoader = observer((props) => {
38
+ const { queryLoaderState, loadActionLabel } = props;
39
+ const applicationStore = useApplicationStore();
40
+ const searchInputRef = useRef(null);
41
+ const queryRenameInputRef = useRef(null);
42
+ const results = queryLoaderState.queries;
43
+ const [isMineOnly, setIsMineOnly] = useState(false);
44
+ const [showQueryNameEditInput, setShowQueryNameEditInput] = useState();
45
+ useEffect(() => {
46
+ queryRenameInputRef.current?.focus();
47
+ queryRenameInputRef.current?.select();
48
+ }, [showQueryNameEditInput]);
49
+ const [queryNameInputValue, setQueryNameInputValue] = useState('');
50
+ const showEditQueryNameInput = (value, idx) => () => {
51
+ setQueryNameInputValue(value);
52
+ setShowQueryNameEditInput(idx);
53
+ };
54
+ const hideEditQueryNameInput = () => {
55
+ setShowQueryNameEditInput(undefined);
56
+ setQueryNameInputValue('');
57
+ };
58
+ const changeQueryNameInputValue = (event) => setQueryNameInputValue(event.target.value);
59
+ // search text
60
+ const debouncedLoadQueries = useMemo(() => debounce((input) => {
61
+ flowResult(queryLoaderState.searchQueries(input)).catch(applicationStore.alertUnhandledError);
62
+ }, 500), [applicationStore.alertUnhandledError, queryLoaderState]);
63
+ const onSearchTextChange = (event) => {
64
+ if (event.target.value !== queryLoaderState.searchText) {
65
+ queryLoaderState.setSearchText(event.target.value);
66
+ debouncedLoadQueries.cancel();
67
+ debouncedLoadQueries(event.target.value);
68
+ }
69
+ };
70
+ const clearQuerySearching = () => {
71
+ queryLoaderState.setSearchText('');
72
+ debouncedLoadQueries.cancel();
73
+ debouncedLoadQueries('');
74
+ };
75
+ const toggleShowCurrentUserQueriesOnly = () => {
76
+ queryLoaderState.setShowCurrentUserQueriesOnly(!queryLoaderState.showCurrentUserQueriesOnly);
77
+ setIsMineOnly(!isMineOnly);
78
+ debouncedLoadQueries.cancel();
79
+ debouncedLoadQueries(queryLoaderState.searchText);
80
+ };
81
+ const toggleExtraFilters = (key) => {
82
+ queryLoaderState.extraFilters.set(key, !queryLoaderState.extraFilters.get(key));
83
+ debouncedLoadQueries.cancel();
84
+ debouncedLoadQueries(queryLoaderState.searchText);
85
+ };
86
+ useEffect(() => {
87
+ flowResult(queryLoaderState.searchQueries('')).catch(applicationStore.alertUnhandledError);
88
+ }, [applicationStore, queryLoaderState]);
89
+ useEffect(() => {
90
+ searchInputRef.current?.focus();
91
+ }, [queryLoaderState]);
92
+ // actions
93
+ const renameQuery = (query) => () => {
94
+ if (!queryLoaderState.isReadOnly) {
95
+ flowResult(queryLoaderState.renameQuery(query.id, queryNameInputValue))
96
+ .catch(applicationStore.alertUnhandledError)
97
+ .finally(() => hideEditQueryNameInput());
98
+ }
99
+ };
100
+ const deleteQuery = (query) => () => {
101
+ if (!queryLoaderState.isReadOnly) {
102
+ flowResult(queryLoaderState.deleteQuery(query.id)).catch(applicationStore.alertUnhandledError);
103
+ }
104
+ };
105
+ const showPreview = (queryId) => {
106
+ flowResult(queryLoaderState.getPreviewQueryContent(queryId)).catch(applicationStore.alertUnhandledError);
107
+ queryLoaderState.setShowPreviewViewer(true);
108
+ };
109
+ return (_jsxs("div", { className: "query-loader", children: [_jsxs("div", { className: "query-loader__header", children: [_jsx("div", { className: "query-loader__search", children: _jsxs("div", { className: "query-loader__search__input__container", children: [_jsx("input", { ref: searchInputRef, className: clsx('query-loader__search__input input--dark', {
110
+ 'query-loader__search__input--searching': queryLoaderState.searchText,
111
+ }), onChange: onSearchTextChange, value: queryLoaderState.searchText, placeholder: "Search for queries by name or ID" }), !queryLoaderState.searchText ? (_jsx("div", { className: "query-loader__search__input__search__icon", children: _jsx(SearchIcon, {}) })) : (_jsx(_Fragment, { children: _jsx("button", { className: "query-loader__search__input__clear-btn", tabIndex: -1, onClick: clearQuerySearching, title: "Clear", children: _jsx(TimesIcon, {}) }) }))] }) }), _jsx("div", { className: "query-loader__filter", children: _jsxs("div", { className: "query-loader__filter__toggler", children: [_jsx("button", { className: clsx('query-loader__filter__toggler__btn', {
112
+ 'query-loader__filter__toggler__btn--toggled': isMineOnly,
113
+ }), onClick: toggleShowCurrentUserQueriesOnly, tabIndex: -1, children: "Mine Only" }), queryLoaderState.extraFilterOptions.length > 0 && (_jsx("div", { className: "query-loader__filter__extra__filters", children: Array.from(queryLoaderState.extraFilters.entries()).map(([key, value]) => (_jsx("button", { className: clsx('query-loader__filter__toggler__btn', {
114
+ 'query-loader__filter__toggler__btn--toggled': value,
115
+ }), onClick: () => toggleExtraFilters(key), tabIndex: -1, children: key }, key))) }))] }) })] }), _jsxs("div", { className: "query-loader__content", children: [_jsx(PanelLoadingIndicator, { isLoading: queryLoaderState.searchQueriesState.isInProgress ||
116
+ queryLoaderState.renameQueryState.isInProgress ||
117
+ queryLoaderState.deleteQueryState.isInProgress ||
118
+ queryLoaderState.previewQueryState.isInProgress }), _jsxs("div", { className: "query-loader__results", children: [queryLoaderState.searchQueriesState.hasCompleted && (_jsxs(_Fragment, { children: [_jsx("div", { className: "query-loader__results__summary", children: queryLoaderState.showingDefaultQueries ? (queryLoaderState.generateDefaultQueriesSummaryText?.(results) ?? 'Refine your search to get better matches') : results.length >= QUERY_LOADER_TYPEAHEAD_SEARCH_LIMIT ? (_jsxs(_Fragment, { children: [`Found ${QUERY_LOADER_TYPEAHEAD_SEARCH_LIMIT}+ matches`, ' ', _jsx(InfoCircleIcon, { title: "Some queries are not listed, refine your search to get better matches", className: "query-loader__results__summary__info" })] })) : (`Found ${quantifyList(results, 'match', 'matches')}`) }), results
119
+ .slice(0, QUERY_LOADER_TYPEAHEAD_SEARCH_LIMIT)
120
+ .map((query, idx) => (_jsxs("div", { className: "query-loader__result", title: `Click to ${loadActionLabel}...`, onClick: () => queryLoaderState.loadQuery(query), children: [_jsxs("div", { className: "query-loader__result__content", children: [showQueryNameEditInput === idx ? (_jsx("div", { className: "query-loader__result__title__editor", children: _jsx("input", { className: "query-loader__result__title__editor__input input--dark", spellCheck: false, ref: queryRenameInputRef, value: queryNameInputValue, onChange: changeQueryNameInputValue, onKeyDown: (event) => {
121
+ if (event.code === 'Enter') {
122
+ renameQuery(query)();
123
+ }
124
+ else if (event.code === 'Escape') {
125
+ hideEditQueryNameInput();
126
+ }
127
+ }, onBlur: () => hideEditQueryNameInput() }) })) : (_jsx("div", { className: "query-loader__result__title", title: query.name, children: query.name })), _jsxs("div", { className: "query-loader__result__description", children: [_jsx("div", { className: "query-loader__result__description__date__icon", children: _jsx(LastModifiedIcon, {}) }), _jsx("div", { className: "query-loader__result__description__date", children: query.lastUpdatedAt
128
+ ? formatDistanceToNow(new Date(query.lastUpdatedAt), {
129
+ includeSeconds: true,
130
+ addSuffix: true,
131
+ })
132
+ : '(unknown)' }), _jsx("div", { className: clsx('query-loader__result__description__author__icon', {
133
+ 'query-loader__result__description__author__icon--owner': query.isCurrentUserQuery,
134
+ }), children: _jsx(UserIcon, {}) }), _jsx("div", { className: "query-loader__result__description__author__name", children: query.isCurrentUserQuery ? (_jsx("div", { title: query.owner, className: "query-loader__result__description__owner", children: "Me" })) : (query.owner) })] })] }), _jsx(DropdownMenu, { className: "query-loader__result__actions-menu", title: "More Actions...", content: _jsxs(MenuContent, { children: [_jsx(MenuContentItem, { onClick: () => showPreview(query.id), children: "Show Query Preview" }), !queryLoaderState.isReadOnly && (_jsx(MenuContentItem, { disabled: !query.isCurrentUserQuery, onClick: deleteQuery(query), children: "Delete" })), !queryLoaderState.isReadOnly && (_jsx(MenuContentItem, { disabled: !query.isCurrentUserQuery, onClick: showEditQueryNameInput(query.name, idx), children: "Rename" }))] }), menuProps: {
135
+ anchorOrigin: {
136
+ vertical: 'bottom',
137
+ horizontal: 'left',
138
+ },
139
+ transformOrigin: {
140
+ vertical: 'top',
141
+ horizontal: 'left',
142
+ },
143
+ elevation: 7,
144
+ }, children: _jsx(MoreVerticalIcon, {}) }), _jsx("div", { className: "query-loader__result__arrow", children: _jsx(ThinChevronRightIcon, {}) })] }, query.id)))] })), !queryLoaderState.searchQueriesState.hasCompleted && (_jsx(BlankPanelContent, { children: "Loading queries..." }))] }), queryLoaderState.showPreviewViewer &&
145
+ queryLoaderState.queryPreviewContent && (_jsx(QueryPreviewViewer, { queryLoaderState: queryLoaderState }))] })] }));
146
+ });
147
+ export const QueryLoaderDialog = observer((props) => {
148
+ const { queryLoaderState, title, loadActionLabel } = props;
149
+ const close = () => {
150
+ queryLoaderState.setQueryLoaderDialogOpen(false);
151
+ queryLoaderState.reset();
152
+ };
153
+ return (_jsx(Dialog, { open: queryLoaderState.isQueryLoaderDialogOpen, onClose: close, classes: {
154
+ root: 'query-loader__dialog',
155
+ container: 'query-loader__dialog__container',
156
+ }, PaperProps: {
157
+ classes: { root: 'query-loader__dialog__body' },
158
+ }, children: _jsxs(Modal, { darkMode: true, className: "modal query-loader__dialog__body__content", children: [_jsxs("div", { className: "modal query-loader__dialog__header", children: [_jsx(ModalTitle, { className: "query-loader__dialog__header__title", title: title }), _jsx("button", { className: "query-loader__dialog__header__close-btn", title: "Close", onClick: close, children: _jsx(TimesIcon, {}) })] }), _jsx("div", { className: "modal query-loader__dialog__content", children: _jsx(QueryLoader, { queryLoaderState: queryLoaderState, loadActionLabel: loadActionLabel ?? title.toLowerCase() }) })] }) }));
159
+ });
160
+ //# sourceMappingURL=QueryLoader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QueryLoader.js","sourceRoot":"","sources":["../../src/components/QueryLoader.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EACL,oBAAoB,EACpB,UAAU,GACX,MAAM,gCAAgC,CAAC;AACxC,OAAO,EACL,MAAM,EACN,KAAK,EACL,UAAU,EACV,IAAI,EACJ,UAAU,EACV,SAAS,EACT,YAAY,EACZ,WAAW,EACX,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,WAAW,EACX,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,QAAQ,EACR,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,EACpB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,QAAQ,EACR,mBAAmB,EACnB,oBAAoB,EACpB,YAAY,GACb,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC7D,OAAO,EACL,mCAAmC,GAEpC,MAAM,+BAA+B,CAAC;AAEvC,MAAM,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AAgB,CAAC,KAAK,EAAE,CAAC;IAC3B,CAAC,CAAC;IAEF,OAAO,CACL,KAAC,MAAM,IACL,IAAI,EAAE,gBAAgB,CAAC,uBAAuB,EAC9C,OAAO,EAAE,KAAK,EACd,OAAO,EAAE;YACP,IAAI,EAAE,sBAAsB;YAC5B,SAAS,EAAE,iCAAiC;SAC7C,EACD,UAAU,EAAE;YACV,OAAO,EAAE,EAAE,IAAI,EAAE,4BAA4B,EAAE;SAChD,YAED,MAAC,KAAK,IACJ,QAAQ,EAAE,IAAI,EACd,SAAS,EAAC,2CAA2C,aAErD,eAAK,SAAS,EAAC,oCAAoC,aACjD,KAAC,UAAU,IACT,SAAS,EAAC,qCAAqC,EAC/C,KAAK,EAAE,KAAK,GACZ,EACF,iBACE,SAAS,EAAC,yCAAyC,EACnD,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,KAAK,YAEd,KAAC,SAAS,KAAG,GACN,IACL,EACN,cAAK,SAAS,EAAC,qCAAqC,YAClD,KAAC,WAAW,IACV,gBAAgB,EAAE,gBAAgB,EAClC,eAAe,EAAE,eAAe,IAAI,KAAK,CAAC,WAAW,EAAE,GACvD,GACE,IACA,GACD,CACV,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderPanelIssueCountBadge.d.ts","sourceRoot":"","sources":["../../../src/components/shared/QueryBuilderPanelIssueCountBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAIH,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAAE,CAAC;IACtD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC9B,CAmBA,CAAC"}
1
+ {"version":3,"file":"QueryBuilderPanelIssueCountBadge.d.ts","sourceRoot":"","sources":["../../../src/components/shared/QueryBuilderPanelIssueCountBadge.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;;AAKH,eAAO,MAAM,gCAAgC,EAAE,KAAK,CAAC,EAAE,CAAC;IACtD,MAAM,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAC9B,CAmBA,CAAC"}
@@ -15,12 +15,13 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
15
15
  * limitations under the License.
16
16
  */
17
17
  import { TimesCircleIcon } from '@finos/legend-art';
18
+ import { quantifyList } from '@finos/legend-shared';
18
19
  export const QueryBuilderPanelIssueCountBadge = (props) => {
19
20
  const { issues } = props;
20
21
  if (!issues) {
21
22
  return null;
22
23
  }
23
- const labelText = `${issues.length} issue${issues.length > 1 ? 's' : ''}`;
24
+ const labelText = quantifyList(issues, 'issue');
24
25
  return (_jsxs("div", { className: "query-builder-panel-issue-count-badge", title: `Found ${labelText}:\n${issues
25
26
  .map((issue) => `\u2022 ${issue}`)
26
27
  .join('\n')}`, children: [_jsx(TimesCircleIcon, { className: "query-builder-panel-issue-count-badge__icon" }), _jsx("div", { className: "query-builder-panel-issue-count-badge__text", children: labelText })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"QueryBuilderPanelIssueCountBadge.js","sourceRoot":"","sources":["../../../src/components/shared/QueryBuilderPanelIssueCountBadge.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,CAAC,MAAM,gCAAgC,GAExC,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IACD,MAAM,SAAS,GAAG,GAAG,MAAM,CAAC,MAAM,SAAS,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;IAC1E,OAAO,CACL,eACE,SAAS,EAAC,uCAAuC,EACjD,KAAK,EAAE,SAAS,SAAS,MAAM,MAAM;aAClC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,KAAK,EAAE,CAAC;aACjC,IAAI,CAAC,IAAI,CAAC,EAAE,aAEf,KAAC,eAAe,IAAC,SAAS,EAAC,6CAA6C,GAAG,EAC3E,cAAK,SAAS,EAAC,6CAA6C,YACzD,SAAS,GACN,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"QueryBuilderPanelIssueCountBadge.js","sourceRoot":"","sources":["../../../src/components/shared/QueryBuilderPanelIssueCountBadge.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,MAAM,CAAC,MAAM,gCAAgC,GAExC,CAAC,KAAK,EAAE,EAAE;IACb,MAAM,EAAE,MAAM,EAAE,GAAG,KAAK,CAAC;IACzB,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,IAAI,CAAC;KACb;IACD,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChD,OAAO,CACL,eACE,SAAS,EAAC,uCAAuC,EACjD,KAAK,EAAE,SAAS,SAAS,MAAM,MAAM;aAClC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,KAAK,EAAE,CAAC;aACjC,IAAI,CAAC,IAAI,CAAC,EAAE,aAEf,KAAC,eAAe,IAAC,SAAS,EAAC,6CAA6C,GAAG,EAC3E,cAAK,SAAS,EAAC,6CAA6C,YACzD,SAAS,GACN,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}