@finos/legend-application-repl 1.0.34 → 1.0.35

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.
Files changed (54) hide show
  1. package/lib/__lib__/LegendREPLSetting.d.ts +2 -5
  2. package/lib/__lib__/LegendREPLSetting.d.ts.map +1 -1
  3. package/lib/__lib__/LegendREPLSetting.js +4 -7
  4. package/lib/__lib__/LegendREPLSetting.js.map +1 -1
  5. package/lib/application/LegendREPL.js +1 -1
  6. package/lib/application/LegendREPL.js.map +1 -1
  7. package/lib/application/LegendREPLNavigation.d.ts +1 -1
  8. package/lib/application/LegendREPLNavigation.js +1 -1
  9. package/lib/components/LegendREPLDataCubeHeader.d.ts +1 -1
  10. package/lib/components/LegendREPLDataCubeHeader.d.ts.map +1 -1
  11. package/lib/components/LegendREPLDataCubeHeader.js +18 -2
  12. package/lib/components/LegendREPLDataCubeHeader.js.map +1 -1
  13. package/lib/components/LegendREPLFramworkProvider.d.ts.map +1 -1
  14. package/lib/components/LegendREPLFramworkProvider.js +2 -2
  15. package/lib/components/LegendREPLFramworkProvider.js.map +1 -1
  16. package/lib/components/LegendREPLPublishDataCubeAlert.js +1 -1
  17. package/lib/components/LegendREPLPublishDataCubeAlert.js.map +1 -1
  18. package/lib/components/{LegendREPLApplication.d.ts → LegendREPLWebApplication.d.ts} +1 -1
  19. package/lib/components/LegendREPLWebApplication.d.ts.map +1 -0
  20. package/lib/components/{LegendREPLApplication.js → LegendREPLWebApplication.js} +28 -21
  21. package/lib/components/LegendREPLWebApplication.js.map +1 -0
  22. package/lib/index.css +1 -1
  23. package/lib/package.json +1 -1
  24. package/lib/stores/LegendREPLBaseStore.d.ts +8 -1
  25. package/lib/stores/LegendREPLBaseStore.d.ts.map +1 -1
  26. package/lib/stores/LegendREPLBaseStore.js +50 -18
  27. package/lib/stores/LegendREPLBaseStore.js.map +1 -1
  28. package/lib/stores/LegendREPLDataCubeEngine.d.ts +14 -11
  29. package/lib/stores/LegendREPLDataCubeEngine.d.ts.map +1 -1
  30. package/lib/stores/LegendREPLDataCubeEngine.js +51 -52
  31. package/lib/stores/LegendREPLDataCubeEngine.js.map +1 -1
  32. package/lib/stores/LegendREPLDataCubeSource.d.ts +14 -2
  33. package/lib/stores/LegendREPLDataCubeSource.d.ts.map +1 -1
  34. package/lib/stores/LegendREPLDataCubeSource.js +24 -0
  35. package/lib/stores/LegendREPLDataCubeSource.js.map +1 -1
  36. package/lib/stores/LegendREPLServerClient.d.ts +5 -17
  37. package/lib/stores/LegendREPLServerClient.d.ts.map +1 -1
  38. package/lib/stores/LegendREPLServerClient.js +1 -26
  39. package/lib/stores/LegendREPLServerClient.js.map +1 -1
  40. package/package.json +6 -6
  41. package/src/__lib__/LegendREPLSetting.ts +2 -5
  42. package/src/application/LegendREPL.tsx +1 -1
  43. package/src/application/LegendREPLNavigation.ts +1 -1
  44. package/src/components/LegendREPLDataCubeHeader.tsx +4 -4
  45. package/src/components/LegendREPLFramworkProvider.tsx +2 -4
  46. package/src/components/LegendREPLPublishDataCubeAlert.tsx +1 -1
  47. package/src/components/{LegendREPLApplication.tsx → LegendREPLWebApplication.tsx} +50 -43
  48. package/src/stores/LegendREPLBaseStore.tsx +61 -21
  49. package/src/stores/LegendREPLDataCubeEngine.ts +84 -90
  50. package/src/stores/LegendREPLDataCubeSource.ts +35 -2
  51. package/src/stores/LegendREPLServerClient.ts +3 -39
  52. package/tsconfig.json +1 -1
  53. package/lib/components/LegendREPLApplication.d.ts.map +0 -1
  54. package/lib/components/LegendREPLApplication.js.map +0 -1
@@ -13,10 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare enum LEGEND_REPL_SETTING_KEY {
17
- ENABLE_DEBUG_MODE = "legend-repl.engine.enableDebugMode",
18
- GRID_CLIENT_ROW_BUFFER = "legend-repl.engine.grid-client.rowBuffer",
19
- GRID_CLIENT_PURGE_CLOSED_ROW_NODES = "legend-repl.engine.grid-client.purgeClosedRowNodes",
20
- GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING = "legend-repl.engine.grid-client.suppressLargeDatasetWarning"
16
+ export declare enum LegendREPLSettingStorageKey {
17
+ DATA_CUBE = "data-cube"
21
18
  }
22
19
  //# sourceMappingURL=LegendREPLSetting.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLSetting.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendREPLSetting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,uBAAuB;IACjC,iBAAiB,uCAAuC;IACxD,sBAAsB,6CAA6C;IACnE,kCAAkC,uDAAuD;IACzF,0CAA0C,+DAA+D;CAC1G"}
1
+ {"version":3,"file":"LegendREPLSetting.d.ts","sourceRoot":"","sources":["../../src/__lib__/LegendREPLSetting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,oBAAY,2BAA2B;IACrC,SAAS,cAAc;CACxB"}
@@ -13,11 +13,8 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export var LEGEND_REPL_SETTING_KEY;
17
- (function (LEGEND_REPL_SETTING_KEY) {
18
- LEGEND_REPL_SETTING_KEY["ENABLE_DEBUG_MODE"] = "legend-repl.engine.enableDebugMode";
19
- LEGEND_REPL_SETTING_KEY["GRID_CLIENT_ROW_BUFFER"] = "legend-repl.engine.grid-client.rowBuffer";
20
- LEGEND_REPL_SETTING_KEY["GRID_CLIENT_PURGE_CLOSED_ROW_NODES"] = "legend-repl.engine.grid-client.purgeClosedRowNodes";
21
- LEGEND_REPL_SETTING_KEY["GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING"] = "legend-repl.engine.grid-client.suppressLargeDatasetWarning";
22
- })(LEGEND_REPL_SETTING_KEY || (LEGEND_REPL_SETTING_KEY = {}));
16
+ export var LegendREPLSettingStorageKey;
17
+ (function (LegendREPLSettingStorageKey) {
18
+ LegendREPLSettingStorageKey["DATA_CUBE"] = "data-cube";
19
+ })(LegendREPLSettingStorageKey || (LegendREPLSettingStorageKey = {}));
23
20
  //# sourceMappingURL=LegendREPLSetting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLSetting.js","sourceRoot":"","sources":["../../src/__lib__/LegendREPLSetting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,mFAAwD,CAAA;IACxD,8FAAmE,CAAA;IACnE,oHAAyF,CAAA;IACzF,oIAAyG,CAAA;AAC3G,CAAC,EALW,uBAAuB,KAAvB,uBAAuB,QAKlC"}
1
+ {"version":3,"file":"LegendREPLSetting.js","sourceRoot":"","sources":["../../src/__lib__/LegendREPLSetting.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,2BAEX;AAFD,WAAY,2BAA2B;IACrC,sDAAuB,CAAA;AACzB,CAAC,EAFW,2BAA2B,KAA3B,2BAA2B,QAEtC"}
@@ -17,7 +17,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
17
17
  import { createRoot } from 'react-dom/client';
18
18
  import { LegendApplication, ApplicationStoreProvider, getApplicationRootElement, LegendApplicationPluginManager, Core_LegendApplicationPlugin, } from '@finos/legend-application';
19
19
  import { LegendREPLApplicationConfig, } from './LegendREPLApplicationConfig.js';
20
- import { LegendREPLWebApplication } from '../components/LegendREPLApplication.js';
20
+ import { LegendREPLWebApplication } from '../components/LegendREPLWebApplication.js';
21
21
  export class LegendREPL extends LegendApplication {
22
22
  static create() {
23
23
  const application = new LegendREPL(new LegendApplicationPluginManager());
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPL.js","sourceRoot":"","sources":["../../src/application/LegendREPL.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO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AAC,MAAM;QACX,MAAM,WAAW,GAAG,IAAI,UAAU,CAAC,IAAI,8BAA8B,EAAE,CAAC,CAAC;QACzE,WAAW,CAAC,eAAe,CAAC,CAAC,IAAI,4BAA4B,EAAE,CAAC,CAAC,CAAC;QAClE,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,KAAK,CAAC,oBAAoB,CACxB,KAA2E;QAE3E,OAAO,IAAI,2BAA2B,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAED,KAAK,CAAC,eAAe,CAAC,WAAuC;QAC3D,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAC,MAAM,CAC5C,KAAC,wBAAwB,IAAC,KAAK,EAAE,WAAW,YAC1C,KAAC,wBAAwB,IAAC,OAAO,EAAE,IAAI,CAAC,WAAW,GAAI,GAC9B,CAC5B,CAAC;IACJ,CAAC;CACF"}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /**
17
- * @external_application_navigation This depends on Legend Data Cube routing and is hardcoded so it's potentially brittle
17
+ * @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle
18
18
  */
19
19
  export declare const EXTERNAL_APPLICATION_NAVIGATION__generateDataCubeViewUrl: (hostedApplicationBaseUrl: string, id: string) => string;
20
20
  //# sourceMappingURL=LegendREPLNavigation.d.ts.map
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  /**
17
- * @external_application_navigation This depends on Legend Data Cube routing and is hardcoded so it's potentially brittle
17
+ * @external_application_navigation This depends on Legend DataCube routing and is hardcoded so it's potentially brittle
18
18
  */
19
19
  export const EXTERNAL_APPLICATION_NAVIGATION__generateDataCubeViewUrl = (hostedApplicationBaseUrl, id) => `${hostedApplicationBaseUrl}/${id}`;
20
20
  //# sourceMappingURL=LegendREPLNavigation.js.map
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import type { DataCubeState } from '@finos/legend-data-cube';
16
+ import { type DataCubeState } from '@finos/legend-data-cube';
17
17
  export declare const LegendREPLDataCubeHeader: ((props: {
18
18
  dataCube: DataCubeState;
19
19
  }) => import("react/jsx-runtime").JSX.Element | null) & {
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLDataCubeHeader.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAK7D,eAAO,MAAM,wBAAwB,WAC3B;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE;;CA8BpC,CAAC"}
1
+ {"version":3,"file":"LegendREPLDataCubeHeader.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAKzE,eAAO,MAAM,wBAAwB,WAC3B;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE;;CA8BpC,CAAC"}
@@ -1,4 +1,20 @@
1
1
  import { jsx as _jsx } 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 { FormButton } from '@finos/legend-data-cube';
2
18
  import { observer } from 'mobx-react-lite';
3
19
  import { LegendREPLDataCubeSource } from '../stores/LegendREPLDataCubeSource.js';
4
20
  import { useLegendREPLBaseStore } from './LegendREPLFramworkProvider.js';
@@ -12,10 +28,10 @@ export const LegendREPLDataCubeHeader = observer((props) => {
12
28
  dataCube.view.source.isPersistenceSupported &&
13
29
  // eslint-disable-next-line no-process-env
14
30
  (process.env.NODE_ENV === 'development' || !dataCube.view.source.isLocal);
15
- return (_jsx("div", { className: "flex h-full items-center", children: _jsx("button", { disabled: !isPublishAllowed || store.publishState.isInProgress, onClick: () => {
31
+ return (_jsx("div", { className: "flex h-full items-center", children: _jsx(FormButton, { compact: true, disabled: !isPublishAllowed || store.publishState.isInProgress, onClick: () => {
16
32
  store
17
33
  .publishDataCube(dataCube)
18
34
  .catch((error) => dataCube.engine.logUnhandledError(error));
19
- }, className: "h- w-20 border border-neutral-400 bg-neutral-300 px-2 hover:brightness-95 disabled:cursor-not-allowed disabled:border-neutral-300 disabled:text-neutral-400 disabled:hover:brightness-100", children: "Publish" }) }));
35
+ }, children: "Publish" }) }));
20
36
  });
21
37
  //# sourceMappingURL=LegendREPLDataCubeHeader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLDataCubeHeader.js","sourceRoot":"","sources":["../../src/components/LegendREPLDataCubeHeader.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,MAAM,CAAC,MAAM,wBAAwB,GAAG,QAAQ,CAC9C,CAAC,KAAkC,EAAE,EAAE;IACrC,MAAM,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAC3B,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IAEvC,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,iBAAiB,IAAI,CAAC,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAClE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GACpB,QAAQ,CA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AClE,OAAO,IAAI,CAAC;IACd,CAAC;IAED,MAAM,gBAAgB,GACpB,QAAQ,CAAC,IAAI,CAAC,MAAM,YAAY,wBAAwB;QACxD,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,sBAAsB;QAC3C,0CAA0C;QAC1C,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAE5E,OAAO,CACL,cAAK,SAAS,EAAC,0BAA0B,YACvC,KAAC,UAAU,IACT,OAAO,EAAE,IAAI,EACb,QAAQ,EAAE,CAAC,gBAAgB,IAAI,KAAK,CAAC,YAAY,CAAC,YAAY,EAC9D,OAAO,EAAE,GAAG,EAAE;gBACZ,KAAK;qBACF,eAAe,CAAC,QAAQ,CAAC;qBACzB,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;YAChE,CAAC,wBAGU,GACT,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLFramworkProvider.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLFramworkProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AA+BvE,eAAO,MAAM,sBAAsB,QAAO,mBAIvC,CAAC;AAEJ,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAIA,CAAC"}
1
+ {"version":3,"file":"LegendREPLFramworkProvider.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLFramworkProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AA6BvE,eAAO,MAAM,sBAAsB,QAAO,mBAIvC,CAAC;AAEJ,eAAO,MAAM,2BAA2B,EAAE,KAAK,CAAC,EAAE,CAAC;IACjD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B,CAIA,CAAC"}
@@ -22,8 +22,8 @@ import {} from '../application/LegendREPLApplicationConfig.js';
22
22
  import { useApplicationStore, ApplicationFrameworkProvider, } from '@finos/legend-application';
23
23
  const LegendREPLBaseStoreContext = createContext(undefined);
24
24
  const LegendREPLBaseStoreProvider = ({ children }) => {
25
- const applicationStore = useApplicationStore();
26
- const store = useLocalObservable(() => new LegendREPLBaseStore(applicationStore));
25
+ const application = useApplicationStore();
26
+ const store = useLocalObservable(() => new LegendREPLBaseStore(application));
27
27
  return (_jsx(LegendREPLBaseStoreContext.Provider, { value: store, children: children }));
28
28
  };
29
29
  export const useLegendREPLBaseStore = () => guaranteeNonNullable(useContext(LegendREPLBaseStoreContext), `Can't find Legend Query base store in context`);
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLFramworkProvider.js","sourceRoot":"","sources":["../../src/components/LegendREPLFramworkProvider.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAoC,MAAM,+CAA+C,CAAC;AACjG,OAAO,EACL,mBAAmB,EACnB,4BAA4B,GAG7B,MAAM,2BAA2B,CAAC;AAEnC,MAAM,0BAA0B,GAAG,aAAa,CAE9C,SAAS,CAAC,CAAC;AAEb,MAAM,2BAA2B,GAE5B,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE;IACpB,MAAM,gBAAgB,G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AAE,CAAC,IAAI,mBAAmB,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7E,OAAO,CACL,KAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAC9C,QAAQ,GAC2B,CACvC,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAwB,EAAE,CAC9D,oBAAoB,CAClB,UAAU,CAAC,0BAA0B,CAAC,EACtC,+CAA+C,CAChD,CAAC;AAEJ,MAAM,CAAC,MAAM,2BAA2B,GAEnC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CACrB,KAAC,4BAA4B,IAAC,MAAM,EAAE,IAAI,YACxC,KAAC,2BAA2B,cAAE,QAAQ,GAA+B,GACxC,CAChC,CAAC"}
@@ -23,7 +23,7 @@ export const LegendREPLPublishDataCubeAlert = (props) => {
23
23
  const link = store.hostedApplicationBaseUrl
24
24
  ? EXTERNAL_APPLICATION_NAVIGATION__generateDataCubeViewUrl(store.hostedApplicationBaseUrl, query.id)
25
25
  : undefined;
26
- return (_jsxs("div", { className: "h-full w-full p-6", children: [_jsxs("div", { className: "flex w-full overflow-auto", children: [_jsx("div", { className: "mr-3", children: _jsx(DataCubeIcon.AlertInfo, { className: "flex-shrink-0 stroke-[0.5px] text-[40px] text-sky-500" }) }), _jsxs("div", { children: [_jsx("div", { className: "whitespace-break-spaces text-lg", children: "Published query successfully!" }), link && (_jsx("div", { className: "mt-1 whitespace-break-spaces text-neutral-500", children: "To view or share the published query, use the link below." })), !link && (_jsx("div", { className: "mt-1 whitespace-break-spaces text-neutral-500", children: "See the published query ID below." }))] })] }), link && (_jsxs("div", { className: "mt-3 flex h-6 w-full", children: [_jsx("div", { className: "flex h-full w-[calc(100%_-_20px)] items-center border border-r-0 border-neutral-400 bg-neutral-200 px-1.5", children: _jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: link }) }), _jsx("button", { className: "flex aspect-square h-full w-6 items-center justify-center border border-neutral-400 bg-neutral-300 hover:brightness-95", onClick: () => {
26
+ return (_jsxs("div", { className: "h-full w-full p-6", children: [_jsxs("div", { className: "flex w-full overflow-auto", children: [_jsx("div", { className: "mr-3", children: _jsx(DataCubeIcon.AlertSuccess, { className: "flex-shrink-0 stroke-[0.5px] text-[40px] text-green-500" }) }), _jsxs("div", { children: [_jsx("div", { className: "whitespace-break-spaces text-lg", children: "Published query successfully!" }), link && (_jsx("div", { className: "mt-1 whitespace-break-spaces text-neutral-500", children: "To view or share the published query, use the link below." })), !link && (_jsx("div", { className: "mt-1 whitespace-break-spaces text-neutral-500", children: "See the published query ID below." }))] })] }), link && (_jsxs("div", { className: "mt-3 flex h-6 w-full", children: [_jsx("div", { className: "flex h-full w-[calc(100%_-_20px)] items-center border border-r-0 border-neutral-400 bg-neutral-200 px-1.5", children: _jsx("a", { href: link, target: "_blank", rel: "noopener noreferrer", className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: link }) }), _jsx("button", { className: "flex aspect-square h-full w-6 items-center justify-center border border-neutral-400 bg-neutral-300 hover:brightness-95", onClick: () => {
27
27
  store.application.clipboardService
28
28
  .copyTextToClipboard(link)
29
29
  .catch(store.application.alertUnhandledError);
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLPublishDataCubeAlert.js","sourceRoot":"","sources":["../../src/components/LegendREPLPublishDataCubeAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,wDAAwD,EAAE,MAAM,wCAAwC,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAE9C,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,KAAK,GAAG,sBAAsB,EAA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4BACZ,KAAK,CAAC,WAAW,CAAC,gBAAgB;iCAC/B,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;iCAC7B,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;wBAClD,CAAC,EACD,KAAK,EAAC,SAAS,YAEf,KAAC,YAAY,CAAC,SAAS,KAAG,GACnB,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"file":"LegendREPLPublishDataCubeAlert.js","sourceRoot":"","sources":["../../src/components/LegendREPLPublishDataCubeAlert.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAEzE,OAAO,EAAE,wDAAwD,EAAE,MAAM,wCAAwC,CAAC;AAClH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAEjD,MAAM,CAAC,MAAM,8BAA8B,GAAG,CAAC,KAE9C,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IACxB,MAAM,KAAK,GAAG,sBAAsB,EAAE,CAAC;IACvC,MAAM,IAAI,GAAG,KAAK,CAAC,wBAAwB;QACzC,CAAC,CAAC,wDAAwD,CACtD,KAAK,CAAC,wBAAwB,EAC9B,KAAK,CAAC,EAAE,CACT;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,CACL,eAAK,SAAS,EAAC,mBAAmB,aAChC,eAAK,SAAS,EAAC,2BAA2B,aACxC,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,YAAY,CAAC,YAAY,IAAC,SAAS,EAAC,yDAAyD,GAAG,GAC7F,EACN,0BACE,cAAK,SAAS,EAAC,iCAAiC,8CAE1C,EACL,IAAI,IAAI,CACP,cAAK,SAAS,EAAC,+CAA+C,0EAExD,CACP,EACA,CAAC,IAAI,IAAI,CACR,cAAK,SAAS,EAAC,+CAA+C,kDAExD,CACP,IACG,IACF,EACL,IAAI,IAAI,CACP,eAAK,SAAS,EAAC,sBAAsB,aACnC,cAAK,SAAS,EAAC,2GAA2G,YACxH,YACE,IAAI,EAAE,IAAI,EACV,MAAM,EAAC,QAAQ,EACf,GAAG,EAAC,qBAAqB,EACzB,SAAS,EAAC,qDAAqD,YAE9D,IAAI,GACH,GACA,EACN,iBACE,SAAS,EAAC,wHAAwH,EAClI,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,WAAW,CAAC,gBAAgB;iCAC/B,mBAAmB,CAAC,IAAI,CAAC;iCACzB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;wBAClD,CAAC,EACD,KAAK,EAAC,WAAW,YAEjB,KAAC,YAAY,CAAC,SAAS,KAAG,GACnB,IACL,CACP,EACA,CAAC,IAAI,IAAI,CACR,eAAK,SAAS,EAAC,sBAAsB,aACnC,cAAK,SAAS,EAAC,2GAA2G,YACxH,cAAK,SAAS,EAAC,qDAAqD,YACjE,KAAK,CAAC,EAAE,GACL,GACF,EACN,iBACE,SAAS,EAAC,wHAAwH,EAClI,OAAO,EAAE,GAAG,EAAE;4BACZ,KAAK,CAAC,WAAW,CAAC,gBAAgB;iCAC/B,mBAAmB,CAAC,KAAK,CAAC,EAAE,CAAC;iCAC7B,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC;wBAClD,CAAC,EACD,KAAK,EAAC,SAAS,YAEf,KAAC,YAAY,CAAC,SAAS,KAAG,GACnB,IACL,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -22,4 +22,4 @@ export declare const LegendREPLRouter: (() => import("react/jsx-runtime").JSX.El
22
22
  export declare const LegendREPLWebApplication: (props: {
23
23
  baseUrl: string;
24
24
  }) => import("react/jsx-runtime").JSX.Element;
25
- //# sourceMappingURL=LegendREPLApplication.d.ts.map
25
+ //# sourceMappingURL=LegendREPLWebApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendREPLWebApplication.d.ts","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAgFH,eAAO,MAAM,qCAAqC;;EAEhD,CAAC;AAEH,eAAO,MAAM,gBAAgB;;CAqB3B,CAAC;AAEH,eAAO,MAAM,wBAAwB,UAAW;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,4CAUlE,CAAC"}
@@ -16,52 +16,59 @@ import { jsx as _jsx } from "react/jsx-runtime";
16
16
  */
17
17
  import { BrowserEnvironmentProvider, Route, Routes, } from '@finos/legend-application/browser';
18
18
  import { observer } from 'mobx-react-lite';
19
- import { useEffect, useMemo } from 'react';
19
+ import { useEffect } from 'react';
20
20
  import { formatDate, LogEvent } from '@finos/legend-shared';
21
- import { LegendREPLDataCubeEngine } from '../stores/LegendREPLDataCubeEngine.js';
22
- import { DataCube, DataCubeSettingKey } from '@finos/legend-data-cube';
21
+ import { DataCube, } from '@finos/legend-data-cube';
23
22
  import { APPLICATION_EVENT } from '@finos/legend-application';
24
23
  import { LegendREPLDataCubeSource } from '../stores/LegendREPLDataCubeSource.js';
25
24
  import { LegendREPLDataCubeHeader } from './LegendREPLDataCubeHeader.js';
26
25
  import { LegendREPLFrameworkProvider, useLegendREPLBaseStore, } from './LegendREPLFramworkProvider.js';
27
- const LegendREPLDataCube = observer(() => {
28
- const baseStore = useLegendREPLBaseStore();
29
- const engine = useMemo(() => new LegendREPLDataCubeEngine(baseStore), [baseStore]);
30
- const application = baseStore.application;
26
+ import { LegendREPLSettingStorageKey } from '../__lib__/LegendREPLSetting.js';
27
+ const LegendREPLDataCube = observer((props) => {
28
+ const { query } = props;
29
+ const store = useLegendREPLBaseStore();
30
+ const application = store.application;
31
31
  useEffect(() => {
32
- engine.blockNavigation(
32
+ application.navigationService.navigator.blockNavigation(
33
33
  // Only block navigation in production
34
34
  // eslint-disable-next-line no-process-env
35
35
  [() => process.env.NODE_ENV === 'production'], undefined, () => {
36
- engine.logWarning(LogEvent.create(APPLICATION_EVENT.NAVIGATION_BLOCKED), `Navigation from the application is blocked`);
36
+ application.logService.warn(LogEvent.create(APPLICATION_EVENT.NAVIGATION_BLOCKED), `Navigation from the application is blocked`);
37
37
  });
38
38
  return () => {
39
- engine.unblockNavigation();
39
+ application.navigationService.navigator.unblockNavigation();
40
40
  };
41
- }, [engine]);
42
- return (_jsx(DataCube, { engine: engine, options: {
41
+ }, [application]);
42
+ return (_jsx(DataCube, { query: query, engine: store.engine, options: {
43
43
  onNameChanged(name, source) {
44
44
  const timestamp = source instanceof LegendREPLDataCubeSource
45
45
  ? source.timestamp
46
46
  : undefined;
47
47
  application.layoutService.setWindowTitle(`\u229E ${name}${timestamp ? ` - ${formatDate(new Date(timestamp), 'HH:mm:ss EEE MMM dd yyyy')}` : ''}`);
48
48
  },
49
- onSettingChanged(key, value) {
50
- engine.persistSettingValue(key, value);
51
- },
52
- enableDebugMode: application.settingService.getBooleanValue(DataCubeSettingKey.ENABLE_DEBUG_MODE),
53
- gridClientRowBuffer: application.settingService.getNumericValue(DataCubeSettingKey.GRID_CLIENT_ROW_BUFFER),
54
- gridClientPurgeClosedRowNodes: application.settingService.getBooleanValue(DataCubeSettingKey.GRID_CLIENT_PURGE_CLOSED_ROW_NODES),
55
- gridClientSuppressLargeDatasetWarning: application.settingService.getBooleanValue(DataCubeSettingKey.GRID_CLIENT_SUPPRESS_LARGE_DATASET_WARNING),
56
49
  innerHeaderComponent: (dataCube) => (_jsx(LegendREPLDataCubeHeader, { dataCube: dataCube })),
50
+ getSettingValues() {
51
+ return application.settingService.getObjectValue(LegendREPLSettingStorageKey.DATA_CUBE);
52
+ },
53
+ onSettingValuesChanged(values) {
54
+ application.settingService.persistValue(LegendREPLSettingStorageKey.DATA_CUBE, values);
55
+ },
57
56
  } }));
58
57
  });
59
58
  export const LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN = Object.freeze({
60
59
  DATA_CUBE: `/dataCube`,
61
60
  });
62
- export const LegendREPLRouter = observer(() => (_jsx("div", { className: "h-full", children: _jsx(Routes, { children: _jsx(Route, { path: LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE, element: _jsx(LegendREPLDataCube, {}) }) }) })));
61
+ export const LegendREPLRouter = observer(() => {
62
+ const store = useLegendREPLBaseStore();
63
+ useEffect(() => {
64
+ store
65
+ .initialize()
66
+ .catch((error) => store.application.alertUnhandledError(error));
67
+ }, [store]);
68
+ return (_jsx("div", { className: "h-full", children: store.initializeState.hasSucceeded && store.query && (_jsx(Routes, { children: _jsx(Route, { path: LEGEND_REPL_GRID_CLIENT_ROUTE_PATTERN.DATA_CUBE, element: _jsx(LegendREPLDataCube, { query: store.query }) }) })) }));
69
+ });
63
70
  export const LegendREPLWebApplication = (props) => {
64
71
  const { baseUrl } = props;
65
72
  return (_jsx(BrowserEnvironmentProvider, { baseUrl: baseUrl, children: _jsx(LegendREPLFrameworkProvider, { children: _jsx(LegendREPLRouter, {}) }) }));
66
73
  };
67
- //# sourceMappingURL=LegendREPLApplication.js.map
74
+ //# sourceMappingURL=LegendREPLWebApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LegendREPLWebApplication.js","sourceRoot":"","sources":["../../src/components/LegendREPLWebApplication.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,0BAA0B,EAC1B,KAAK,EACL,MAAM,GACP,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EACL,QAAQ,GAGT,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,uC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ACK,CACV,GACG,CACP,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAA0B,EAAE,EAAE;IACrE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAE1B,OAAO,CACL,KAAC,0BAA0B,IAAC,OAAO,EAAE,OAAO,YAC1C,KAAC,2BAA2B,cAC1B,KAAC,gBAAgB,KAAG,GACQ,GACH,CAC9B,CAAC;AACJ,CAAC,CAAC"}
package/lib/index.css CHANGED
@@ -1,4 +1,4 @@
1
- /** @license @finos/legend-application-repl v1.0.34
1
+ /** @license @finos/legend-application-repl v1.0.35
2
2
  * Copyright (c) 2020-present, Goldman Sachs
3
3
  *
4
4
  * Licensed under the Apache License, Version 2.0 (the "License");
package/lib/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finos/legend-application-repl",
3
- "version": "1.0.34",
3
+ "version": "1.0.35",
4
4
  "description": "Legend REPL Grid client application core",
5
5
  "keywords": [
6
6
  "legend",
@@ -16,16 +16,23 @@
16
16
  import { ActionState } from '@finos/legend-shared';
17
17
  import type { LegendREPLApplicationStore } from '../application/LegendREPLApplicationStore.js';
18
18
  import { LegendREPLServerClient } from './LegendREPLServerClient.js';
19
- import { type DataCubeState } from '@finos/legend-data-cube';
19
+ import { DataCubeQuery, type DataCubeState } from '@finos/legend-data-cube';
20
+ import { LegendREPLDataCubeEngine } from './LegendREPLDataCubeEngine.js';
20
21
  export declare class LegendREPLBaseStore {
21
22
  readonly application: LegendREPLApplicationStore;
22
23
  readonly client: LegendREPLServerClient;
24
+ readonly engine: LegendREPLDataCubeEngine;
25
+ readonly initializeState: ActionState;
23
26
  readonly publishState: ActionState;
24
27
  sourceQuery?: string | undefined;
25
28
  currentUser?: string | undefined;
29
+ gridClientLicense?: string | undefined;
26
30
  queryServerBaseUrl?: string | undefined;
27
31
  hostedApplicationBaseUrl?: string | undefined;
32
+ query?: DataCubeQuery | undefined;
28
33
  constructor(application: LegendREPLApplicationStore);
34
+ setQuery(query: DataCubeQuery | undefined): void;
35
+ initialize(): Promise<void>;
29
36
  publishDataCube(dataCube: DataCubeState): Promise<void>;
30
37
  }
31
38
  //# sourceMappingURL=LegendREPLBaseStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EAKZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAKjC,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,YAAY,cAAwB;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAElC,WAAW,EAAE,0BAA0B;IAe7C,eAAe,CAAC,QAAQ,EAAE,aAAa;CAyE9C"}
1
+ {"version":3,"file":"LegendREPLBaseStore.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLBaseStore.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,WAAW,EAMZ,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAEL,aAAa,EAIb,KAAK,aAAa,EACnB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE,qBAAa,mBAAmB;IAC9B,QAAQ,CAAC,WAAW,EAAE,0BAA0B,CAAC;IACjD,QAAQ,CAAC,MAAM,EAAE,sBAAsB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,wBAAwB,CAAC;IAC1C,QAAQ,CAAC,eAAe,cAAwB;IAChD,QAAQ,CAAC,YAAY,cAAwB;IAE7C,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACvC,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,wBAAwB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9C,KAAK,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;gBAEtB,WAAW,EAAE,0BAA0B;IAqBnD,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,IAAI;IAI1C,UAAU;IA6BV,eAAe,CAAC,QAAQ,EAAE,aAAa;CAiE9C"}
@@ -14,21 +14,32 @@ import { jsx as _jsx } from "react/jsx-runtime";
14
14
  * See the License for the specific language governing permissions and
15
15
  * limitations under the License.
16
16
  */
17
- import { ActionState, NetworkClient, assertErrorThrown, guaranteeNonNullable, uuid, } from '@finos/legend-shared';
17
+ import { ActionState, LogEvent, NetworkClient, assertErrorThrown, guaranteeNonNullable, uuid, } from '@finos/legend-shared';
18
18
  import { LegendREPLServerClient } from './LegendREPLServerClient.js';
19
- import { DataCubeConfiguration, DataCubeQuery, LayoutConfiguration, WindowState, } from '@finos/legend-data-cube';
19
+ import { DataCubeConfiguration, DataCubeQuery, LayoutConfiguration, RawAdhocQueryDataCubeSource, WindowState, } from '@finos/legend-data-cube';
20
20
  import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
21
21
  import { PersistentDataCubeQuery } from '@finos/legend-graph';
22
22
  import { LegendREPLPublishDataCubeAlert } from '../components/LegendREPLPublishDataCubeAlert.js';
23
+ import { APPLICATION_EVENT } from '@finos/legend-application';
24
+ import { action, makeObservable, observable } from 'mobx';
25
+ import { LegendREPLDataCubeEngine } from './LegendREPLDataCubeEngine.js';
23
26
  export class LegendREPLBaseStore {
24
27
  application;
25
28
  client;
29
+ engine;
30
+ initializeState = ActionState.create();
26
31
  publishState = ActionState.create();
27
32
  sourceQuery;
28
33
  currentUser;
34
+ gridClientLicense;
29
35
  queryServerBaseUrl;
30
36
  hostedApplicationBaseUrl;
37
+ query;
31
38
  constructor(application) {
39
+ makeObservable(this, {
40
+ query: observable,
41
+ setQuery: action,
42
+ });
32
43
  this.application = application;
33
44
  this.client = new LegendREPLServerClient(new NetworkClient({
34
45
  baseUrl: application.config.useDynamicREPLServer
@@ -36,32 +47,53 @@ export class LegendREPLBaseStore {
36
47
  guaranteeNonNullable(application.config.baseAddress).replace('/repl/', '')
37
48
  : application.config.replUrl,
38
49
  }));
50
+ this.engine = new LegendREPLDataCubeEngine(this);
51
+ }
52
+ setQuery(query) {
53
+ this.query = query;
54
+ }
55
+ async initialize() {
56
+ this.initializeState.inProgress();
57
+ try {
58
+ const info = await this.client.getInfrastructureInfo();
59
+ this.currentUser = info.currentUser;
60
+ if (info.currentUser) {
61
+ this.application.identityService.setCurrentUser(info.currentUser);
62
+ }
63
+ this.application.telemetryService.setup();
64
+ this.queryServerBaseUrl = info.queryServerBaseUrl;
65
+ this.hostedApplicationBaseUrl = info.hostedApplicationBaseUrl;
66
+ this.gridClientLicense = info.gridClientLicense;
67
+ this.setQuery(DataCubeQuery.serialization.fromJson(await this.client.getBaseQuery()));
68
+ this.initializeState.pass();
69
+ }
70
+ catch (error) {
71
+ assertErrorThrown(error);
72
+ this.application.logService.error(LogEvent.create(APPLICATION_EVENT.APPLICATION_LOAD__FAILURE), `Can't initialize REPL`, error);
73
+ this.initializeState.fail();
74
+ }
39
75
  }
40
76
  async publishDataCube(dataCube) {
41
- const isPublishAllowed = dataCube.view.source instanceof LegendREPLDataCubeSource &&
42
- dataCube.view.source.isPersistenceSupported &&
43
- // eslint-disable-next-line no-process-env
44
- (process.env.NODE_ENV === 'development' || !dataCube.view.source.isLocal);
45
77
  if (!this.sourceQuery ||
46
78
  !dataCube.view.isSourceProcessed ||
47
79
  !this.queryServerBaseUrl ||
48
- !isPublishAllowed) {
80
+ !(dataCube.view.source instanceof LegendREPLDataCubeSource) ||
81
+ !dataCube.view.source.isPersistenceSupported ||
82
+ !dataCube.view.source.model ||
83
+ // eslint-disable-next-line no-process-env
84
+ !(process.env.NODE_ENV === 'development' || !dataCube.view.source.isLocal)) {
49
85
  return;
50
86
  }
51
87
  this.publishState.inProgress();
52
- const task = dataCube.view.newTask('Validate query');
88
+ const task = dataCube.view.newTask('Publish query');
53
89
  try {
54
90
  const query = new DataCubeQuery();
55
- query.query = await dataCube.engine.getValueSpecificationCode(dataCube.engine.generateInitialQuery(dataCube.view.snapshotManager.currentSnapshot));
56
- query.source = {
57
- // TODO: I can't think of a better name for now, but this form should be
58
- // moved to the common module potentially
59
- _type: 'basicQuery',
60
- query: this.sourceQuery,
61
- runtime: dataCube.view.source.runtime,
62
- columns: dataCube.view.source.sourceColumns,
63
- model: dataCube.view.source.model,
64
- };
91
+ query.query = await dataCube.engine.getPartialQueryCode(dataCube.view.snapshotManager.currentSnapshot);
92
+ const source = new RawAdhocQueryDataCubeSource();
93
+ source.query = this.sourceQuery;
94
+ source.runtime = dataCube.view.source.runtime;
95
+ source.model = dataCube.view.source.model;
96
+ query.source = RawAdhocQueryDataCubeSource.serialization.toJson(source);
65
97
  const newQuery = new PersistentDataCubeQuery();
66
98
  newQuery.id = uuid();
67
99
  newQuery.name = DataCubeConfiguration.serialization.fromJson(dataCube.view.snapshotManager.currentSnapshot.data.configuration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AE,GAAG;gBACd,MAAM,EAAE,IAAI;aACb,CAAC;YACF,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QAC3C,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,iBAAiB,CAAC,KAAK,CAAC,CAAC;YACzB,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,EAAE;gBACrC,OAAO,EAAE,2CAA2C;gBACpD,IAAI,EAAE,UAAU,KAAK,CAAC,OAAO,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;gBAAS,CAAC;YACT,QAAQ,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;YAC5B,IAAI,CAAC,YAAY,CAAC,QAAQ,EAAE,CAAC;QAC/B,CAAC;IACH,CAAC;CACF"}
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { type LegendREPLServerClient } from './LegendREPLServerClient.js';
17
- import { DataCubeEngine, type DataCubeSource, type DataCubeAPI, DataCubeQuery } from '@finos/legend-data-cube';
17
+ import { DataCubeEngine, type DataCubeSource, type DataCubeExecutionOptions } from '@finos/legend-data-cube';
18
18
  import { TDSExecutionResult, type V1_AppliedFunction, type V1_Lambda, type V1_ValueSpecification } from '@finos/legend-graph';
19
19
  import { type DocumentationEntry, LogEvent, type PlainObject } from '@finos/legend-shared';
20
20
  import { LegendREPLDataCubeSource } from './LegendREPLDataCubeSource.js';
@@ -25,20 +25,23 @@ export declare class LegendREPLDataCubeEngine extends DataCubeEngine {
25
25
  readonly baseStore: LegendREPLBaseStore;
26
26
  readonly client: LegendREPLServerClient;
27
27
  constructor(baseStore: LegendREPLBaseStore);
28
- blockNavigation(blockCheckers: (() => boolean)[], onBlock?: ((onProceed: () => void) => void) | undefined, onNativePlatformNavigationBlock?: (() => void) | undefined): void;
29
- unblockNavigation(): void;
30
- persistSettingValue(key: string, value: string | number | boolean | object | undefined): void;
31
- fetchConfiguration(): Promise<{
32
- gridClientLicense: string | undefined;
33
- }>;
34
- getBaseQuery(): Promise<DataCubeQuery>;
35
28
  processQuerySource(value: PlainObject): Promise<LegendREPLDataCubeSource>;
36
29
  parseValueSpecification(code: string, returnSourceInformation?: boolean): Promise<V1_ValueSpecification>;
37
30
  getValueSpecificationCode(value: V1_ValueSpecification, pretty?: boolean): Promise<string>;
38
31
  getQueryTypeahead(code: string, baseQuery: V1_Lambda, source: DataCubeSource): Promise<import("@finos/legend-data-cube").CompletionItem[]>;
39
- getQueryRelationType(query: V1_Lambda, source: DataCubeSource): Promise<import("@finos/legend-data-cube").RelationType>;
40
- getQueryCodeRelationReturnType(code: string, baseQuery: V1_ValueSpecification, source: DataCubeSource): Promise<import("@finos/legend-data-cube").RelationType>;
41
- executeQuery(query: V1_Lambda, source: DataCubeSource, api: DataCubeAPI): Promise<{
32
+ getQueryRelationType(query: V1_Lambda, source: DataCubeSource): Promise<{
33
+ columns: {
34
+ name: string;
35
+ type: string;
36
+ }[];
37
+ }>;
38
+ getQueryCodeRelationReturnType(code: string, baseQuery: V1_ValueSpecification, source: DataCubeSource): Promise<{
39
+ columns: {
40
+ name: string;
41
+ type: string;
42
+ }[];
43
+ }>;
44
+ executeQuery(query: V1_Lambda, source: DataCubeSource, options?: DataCubeExecutionOptions | undefined): Promise<{
42
45
  result: TDSExecutionResult;
43
46
  executedQuery: string;
44
47
  executedSQL: string;
@@ -1 +1 @@
1
- {"version":3,"file":"LegendREPLDataCubeEngine.d.ts","sourceRoot":"","sources":["../../src/stores/LegendREPLDataCubeEngine.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAGL,KAAK,sBAAsB,EAC5B,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAIL,cAAc,EAEd,KAAK,cAAc,EACnB,KAAK,WAAW,EAChB,aAAa,EACd,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,kBAAkB,EAClB,KAAK,kBAAkB,EAKvB,KA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