@finos/legend-application-data-cube 0.1.1 → 0.1.3

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 (78) hide show
  1. package/lib/__lib__/LegendDataCubeNavigation.d.ts +27 -0
  2. package/lib/__lib__/LegendDataCubeNavigation.d.ts.map +1 -0
  3. package/lib/__lib__/LegendDataCubeNavigation.js +30 -0
  4. package/lib/__lib__/LegendDataCubeNavigation.js.map +1 -0
  5. package/lib/components/DataCubeEditor.d.ts.map +1 -1
  6. package/lib/components/DataCubeEditor.js +31 -3
  7. package/lib/components/DataCubeEditor.js.map +1 -1
  8. package/lib/components/LegendDataCubeWebApplication.d.ts.map +1 -1
  9. package/lib/components/LegendDataCubeWebApplication.js +4 -2
  10. package/lib/components/LegendDataCubeWebApplication.js.map +1 -1
  11. package/lib/components/source/DataCubeSourceEditor.js.map +1 -1
  12. package/lib/components/source/ExistingDataCubeQuery.d.ts +19 -0
  13. package/lib/components/source/ExistingDataCubeQuery.d.ts.map +1 -0
  14. package/lib/components/source/ExistingDataCubeQuery.js +36 -0
  15. package/lib/components/source/ExistingDataCubeQuery.js.map +1 -0
  16. package/lib/index.css +1 -1
  17. package/lib/package.json +11 -10
  18. package/lib/stores/LegendDataCubeEditorStore.d.ts +9 -3
  19. package/lib/stores/LegendDataCubeEditorStore.d.ts.map +1 -1
  20. package/lib/stores/LegendDataCubeEditorStore.js +66 -4
  21. package/lib/stores/LegendDataCubeEditorStore.js.map +1 -1
  22. package/lib/stores/model/DataCubeGenericSource.d.ts +18 -0
  23. package/lib/stores/model/DataCubeGenericSource.d.ts.map +1 -0
  24. package/lib/stores/model/DataCubeGenericSource.js +18 -0
  25. package/lib/stores/model/DataCubeGenericSource.js.map +1 -0
  26. package/lib/stores/model/DataCubeGenericSourceHelper.d.ts +24 -0
  27. package/lib/stores/model/DataCubeGenericSourceHelper.d.ts.map +1 -0
  28. package/lib/stores/model/DataCubeGenericSourceHelper.js +58 -0
  29. package/lib/stores/model/DataCubeGenericSourceHelper.js.map +1 -0
  30. package/lib/stores/model/DataCubeQueryContent.d.ts +23 -0
  31. package/lib/stores/model/DataCubeQueryContent.d.ts.map +1 -0
  32. package/lib/stores/model/DataCubeQueryContent.js +21 -0
  33. package/lib/stores/model/DataCubeQueryContent.js.map +1 -0
  34. package/lib/stores/model/LegendSavedQuerySource.d.ts +21 -0
  35. package/lib/stores/model/LegendSavedQuerySource.d.ts.map +1 -0
  36. package/lib/stores/model/LegendSavedQuerySource.js +24 -0
  37. package/lib/stores/model/LegendSavedQuerySource.js.map +1 -0
  38. package/lib/stores/source/CubeInputSource.d.ts +0 -6
  39. package/lib/stores/source/CubeInputSource.d.ts.map +1 -1
  40. package/lib/stores/source/CubeInputSource.js +0 -9
  41. package/lib/stores/source/CubeInputSource.js.map +1 -1
  42. package/lib/stores/source/CubeInputSourceLoader.d.ts +3 -3
  43. package/lib/stores/source/CubeInputSourceLoader.d.ts.map +1 -1
  44. package/lib/stores/source/CubeInputSourceLoader.js +1 -2
  45. package/lib/stores/source/CubeInputSourceLoader.js.map +1 -1
  46. package/lib/stores/source/LegendCubeViewer.d.ts +3 -3
  47. package/lib/stores/source/LegendCubeViewer.d.ts.map +1 -1
  48. package/lib/stores/source/LegendCubeViewer.js.map +1 -1
  49. package/lib/stores/source/LegendDataCubeSourceBuilder.d.ts +2 -2
  50. package/lib/stores/source/LegendDataCubeSourceBuilder.d.ts.map +1 -1
  51. package/lib/stores/source/LegendDataCubeSourceBuilder.js.map +1 -1
  52. package/lib/stores/source/SavedQueryInputSourceState.d.ts +2 -2
  53. package/lib/stores/source/SavedQueryInputSourceState.d.ts.map +1 -1
  54. package/lib/stores/source/SavedQueryInputSourceState.js +1 -1
  55. package/lib/stores/source/SavedQueryInputSourceState.js.map +1 -1
  56. package/package.json +21 -20
  57. package/src/__lib__/LegendDataCubeNavigation.ts +36 -0
  58. package/src/components/DataCubeEditor.tsx +100 -3
  59. package/src/components/LegendDataCubeWebApplication.tsx +10 -1
  60. package/src/components/source/DataCubeSourceEditor.tsx +2 -2
  61. package/src/components/source/ExistingDataCubeQuery.tsx +101 -0
  62. package/src/stores/LegendDataCubeEditorStore.ts +121 -5
  63. package/src/stores/model/DataCubeGenericSource.ts +17 -0
  64. package/src/stores/model/DataCubeGenericSourceHelper.ts +97 -0
  65. package/src/stores/model/DataCubeQueryContent.ts +24 -0
  66. package/src/stores/model/LegendSavedQuerySource.ts +26 -0
  67. package/src/stores/source/CubeInputSource.ts +0 -11
  68. package/src/stores/source/CubeInputSourceLoader.ts +3 -3
  69. package/src/stores/source/LegendCubeViewer.ts +3 -3
  70. package/src/stores/source/LegendDataCubeSourceBuilder.ts +2 -2
  71. package/src/stores/source/SavedQueryInputSourceState.ts +3 -5
  72. package/tsconfig.json +8 -1
  73. package/tsconfig.package.json +2 -0
  74. package/lib/stores/source/SavedDepotInputSourceState.d.ts +0 -47
  75. package/lib/stores/source/SavedDepotInputSourceState.d.ts.map +0 -1
  76. package/lib/stores/source/SavedDepotInputSourceState.js +0 -77
  77. package/lib/stores/source/SavedDepotInputSourceState.js.map +0 -1
  78. package/src/stores/source/SavedDepotInputSourceState.ts +0 -103
@@ -1,77 +0,0 @@
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 { UnsupportedOperationError, guaranteeNonNullable, } from '@finos/legend-shared';
17
- import {} from './CubeInputSource.js';
18
- import { CubeInputSourceState, DataCubeSourceType, } from './CubeInputSourceLoader.js';
19
- import { makeObservable, observable } from 'mobx';
20
- export var SAVED_DEPOT_TYPE;
21
- (function (SAVED_DEPOT_TYPE) {
22
- SAVED_DEPOT_TYPE["SERVICE"] = "SERVICE";
23
- SAVED_DEPOT_TYPE["FUNCTION"] = "FUNCTION";
24
- SAVED_DEPOT_TYPE["TABLE"] = "TABLE";
25
- })(SAVED_DEPOT_TYPE || (SAVED_DEPOT_TYPE = {}));
26
- export class SavedDepotSourceState {
27
- }
28
- export class ServiceDepotSourceState extends SavedDepotSourceState {
29
- get label() {
30
- return SAVED_DEPOT_TYPE.SERVICE;
31
- }
32
- }
33
- export class SavedDepotInputSourceState extends CubeInputSourceState {
34
- project;
35
- selectedSource;
36
- constructor(context) {
37
- super(context);
38
- makeObservable(this, {
39
- project: observable,
40
- selectedSource: observable,
41
- });
42
- this.selectedSource = this.build(guaranteeNonNullable(this.options[0]));
43
- }
44
- get options() {
45
- return Object.values(SAVED_DEPOT_TYPE);
46
- }
47
- process() {
48
- // assertTrue(this.isValid);
49
- // if (this.element instanceof Service) {
50
- // }
51
- throw new UnsupportedOperationError('');
52
- }
53
- *fectchAssociatedProjectsAndVersions() {
54
- throw new UnsupportedOperationError('not supported yet');
55
- }
56
- static builder(context) {
57
- return new SavedDepotInputSourceState(context);
58
- }
59
- build(source) {
60
- // if (source === SAVED_DEPOT_TYPE.SERVICE) {
61
- // }
62
- throw new UnsupportedOperationError('');
63
- }
64
- get label() {
65
- return DataCubeSourceType.DEPOT_QUERY;
66
- }
67
- setup() {
68
- throw new Error('Method not implemented.');
69
- }
70
- async buildCubeEngine() {
71
- throw new Error('Method not implemented.');
72
- }
73
- get isValid() {
74
- throw new Error('Method not implemented.');
75
- }
76
- }
77
- //# sourceMappingURL=SavedDepotInputSourceState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SavedDepotInputSourceState.js","sourceRoot":"","sources":["../../../src/stores/source/SavedDepotInputSourceState.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,yBAAyB,EACzB,oBA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,CAAC,OAAO,CAAC,CAAC;IACjD,CAAC;IAED,KAAK,CAAC,MAAwB;QAC5B,6CAA6C;QAC7C,IAAI;QAEJ,MAAM,IAAI,yBAAyB,CAAC,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,IAAa,KAAK;QAChB,OAAO,kBAAkB,CAAC,WAAW,CAAC;IACxC,CAAC;IACQ,KAAK;QACZ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,eAAe;QACnB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,IAAa,OAAO;QAClB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -1,103 +0,0 @@
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 {
18
- UnsupportedOperationError,
19
- guaranteeNonNullable,
20
- type GeneratorFn,
21
- } from '@finos/legend-shared';
22
- import { type CubeInputSource } from './CubeInputSource.js';
23
- import type { VersionedProjectData } from '@finos/legend-server-depot';
24
- import type { DataCubeEngine } from '@finos/legend-data-cube';
25
- import {
26
- CubeInputSourceState,
27
- DataCubeSourceType,
28
- } from './CubeInputSourceLoader.js';
29
- import type { LegendDataCubeStoreContext } from '../LegendDataCubeEditorStore.js';
30
- import { makeObservable, observable } from 'mobx';
31
-
32
- export enum SAVED_DEPOT_TYPE {
33
- SERVICE = 'SERVICE',
34
- FUNCTION = 'FUNCTION',
35
- TABLE = 'TABLE',
36
- }
37
-
38
- export abstract class SavedDepotSourceState {
39
- abstract get label(): SAVED_DEPOT_TYPE;
40
- }
41
-
42
- export class ServiceDepotSourceState extends SavedDepotSourceState {
43
- override get label(): SAVED_DEPOT_TYPE {
44
- return SAVED_DEPOT_TYPE.SERVICE;
45
- }
46
- }
47
-
48
- export class SavedDepotInputSourceState extends CubeInputSourceState {
49
- project: VersionedProjectData | undefined;
50
- selectedSource: SavedDepotSourceState;
51
-
52
- constructor(context: LegendDataCubeStoreContext) {
53
- super(context);
54
- makeObservable(this, {
55
- project: observable,
56
- selectedSource: observable,
57
- });
58
-
59
- this.selectedSource = this.build(guaranteeNonNullable(this.options[0]));
60
- }
61
-
62
- get options(): SAVED_DEPOT_TYPE[] {
63
- return Object.values(SAVED_DEPOT_TYPE);
64
- }
65
- override process(): CubeInputSource {
66
- // assertTrue(this.isValid);
67
- // if (this.element instanceof Service) {
68
- // }
69
-
70
- throw new UnsupportedOperationError('');
71
- }
72
-
73
- *fectchAssociatedProjectsAndVersions(): GeneratorFn<void> {
74
- throw new UnsupportedOperationError('not supported yet');
75
- }
76
-
77
- static override builder(
78
- context: LegendDataCubeStoreContext,
79
- ): CubeInputSourceState {
80
- return new SavedDepotInputSourceState(context);
81
- }
82
-
83
- build(source: SAVED_DEPOT_TYPE): SavedDepotSourceState {
84
- // if (source === SAVED_DEPOT_TYPE.SERVICE) {
85
- // }
86
-
87
- throw new UnsupportedOperationError('');
88
- }
89
-
90
- override get label(): DataCubeSourceType {
91
- return DataCubeSourceType.DEPOT_QUERY;
92
- }
93
- override setup(): Promise<void> {
94
- throw new Error('Method not implemented.');
95
- }
96
- async buildCubeEngine(): Promise<DataCubeEngine | undefined> {
97
- throw new Error('Method not implemented.');
98
- }
99
-
100
- override get isValid(): boolean {
101
- throw new Error('Method not implemented.');
102
- }
103
- }