@finos/legend-data-cube 0.0.36 → 0.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/__lib__/DataCubeDocumentation.d.ts +7 -7
- package/lib/__lib__/DataCubeDocumentation.d.ts.map +1 -1
- package/lib/__lib__/DataCubeDocumentation.js +9 -9
- package/lib/__lib__/DataCubeDocumentation.js.map +1 -1
- package/lib/__lib__/DataCubeEvent.d.ts +21 -0
- package/lib/__lib__/DataCubeEvent.d.ts.map +1 -0
- package/lib/__lib__/DataCubeEvent.js +22 -0
- package/lib/__lib__/DataCubeEvent.js.map +1 -0
- package/lib/__lib__/DataCubeSetting.d.ts +24 -0
- package/lib/__lib__/DataCubeSetting.d.ts.map +1 -0
- package/lib/__lib__/DataCubeSetting.js +25 -0
- package/lib/__lib__/DataCubeSetting.js.map +1 -0
- package/lib/components/DataCube.d.ts +3 -1
- package/lib/components/DataCube.d.ts.map +1 -1
- package/lib/components/DataCube.js +32 -39
- package/lib/components/DataCube.js.map +1 -1
- package/lib/components/DataCubePlaceholder.d.ts +40 -0
- package/lib/components/DataCubePlaceholder.d.ts.map +1 -0
- package/lib/components/DataCubePlaceholder.js +34 -0
- package/lib/components/DataCubePlaceholder.js.map +1 -0
- package/lib/components/DataCubeProvider.js +1 -1
- package/lib/components/DataCubeProvider.js.map +1 -1
- package/lib/components/DataCubeStatusBar.d.ts +24 -0
- package/lib/components/DataCubeStatusBar.d.ts.map +1 -0
- package/lib/components/DataCubeStatusBar.js +30 -0
- package/lib/components/DataCubeStatusBar.js.map +1 -0
- package/lib/components/DataCubeTitleBar.d.ts +24 -0
- package/lib/components/DataCubeTitleBar.d.ts.map +1 -0
- package/lib/components/DataCubeTitleBar.js +36 -0
- package/lib/components/DataCubeTitleBar.js.map +1 -0
- package/lib/components/DataCubeView.d.ts.map +1 -1
- package/lib/components/DataCubeView.js +10 -12
- package/lib/components/DataCubeView.js.map +1 -1
- package/lib/components/core/DataCubeAlert.d.ts +1 -21
- package/lib/components/core/DataCubeAlert.d.ts.map +1 -1
- package/lib/components/core/DataCubeAlert.js +4 -55
- package/lib/components/core/DataCubeAlert.js.map +1 -1
- package/lib/components/core/DataCubeDocumentationPanel.js +1 -1
- package/lib/components/core/DataCubeDocumentationPanel.js.map +1 -1
- package/lib/components/core/DataCubeFormUtils.d.ts +26 -0
- package/lib/components/core/DataCubeFormUtils.d.ts.map +1 -1
- package/lib/components/core/DataCubeFormUtils.js +135 -12
- package/lib/components/core/DataCubeFormUtils.js.map +1 -1
- package/lib/components/core/{DataCubeLayoutManager.d.ts → DataCubeLayout.d.ts} +5 -5
- package/lib/components/core/DataCubeLayout.d.ts.map +1 -0
- package/lib/components/core/{DataCubeLayoutManager.js → DataCubeLayout.js} +15 -6
- package/lib/components/core/DataCubeLayout.js.map +1 -0
- package/lib/components/core/DataCubePureCodeEditorUtils.d.ts +3 -2
- package/lib/components/core/DataCubePureCodeEditorUtils.d.ts.map +1 -1
- package/lib/components/core/DataCubePureCodeEditorUtils.js +2 -2
- package/lib/components/core/DataCubePureCodeEditorUtils.js.map +1 -1
- package/lib/components/core/DataCubeSettingsPanel.d.ts.map +1 -1
- package/lib/components/core/DataCubeSettingsPanel.js +53 -27
- package/lib/components/core/DataCubeSettingsPanel.js.map +1 -1
- package/lib/components/view/editor/DataCubeEditor.d.ts.map +1 -1
- package/lib/components/view/editor/DataCubeEditor.js +11 -8
- package/lib/components/view/editor/DataCubeEditor.js.map +1 -1
- package/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.d.ts.map +1 -1
- package/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.js +18 -17
- package/lib/components/view/editor/DataCubeEditorColumnPropertiesPanel.js.map +1 -1
- package/lib/components/view/editor/DataCubeEditorColumnsPanel.d.ts.map +1 -1
- package/lib/components/view/editor/DataCubeEditorColumnsPanel.js +6 -5
- package/lib/components/view/editor/DataCubeEditorColumnsPanel.js.map +1 -1
- package/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.d.ts.map +1 -1
- package/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.js +4 -4
- package/lib/components/view/editor/DataCubeEditorGeneralPropertiesPanel.js.map +1 -1
- package/lib/components/view/extend/DataCubeColumnEditor.d.ts.map +1 -1
- package/lib/components/view/extend/DataCubeColumnEditor.js +22 -20
- package/lib/components/view/extend/DataCubeColumnEditor.js.map +1 -1
- package/lib/components/view/filter/DataCubeFilterEditor.d.ts.map +1 -1
- package/lib/components/view/filter/DataCubeFilterEditor.js +8 -6
- package/lib/components/view/filter/DataCubeFilterEditor.js.map +1 -1
- package/lib/components/view/grid/DataCubeGrid.d.ts.map +1 -1
- package/lib/components/view/grid/DataCubeGrid.js +7 -7
- package/lib/components/view/grid/DataCubeGrid.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +16 -8
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +16 -8
- package/lib/index.js.map +1 -1
- package/lib/package.json +2 -2
- package/lib/stores/DataCubeAPI.d.ts +36 -3
- package/lib/stores/DataCubeAPI.d.ts.map +1 -1
- package/lib/stores/DataCubeAPI.js +29 -1
- package/lib/stores/DataCubeAPI.js.map +1 -1
- package/lib/stores/DataCubeOptions.d.ts +84 -9
- package/lib/stores/DataCubeOptions.d.ts.map +1 -1
- package/lib/stores/DataCubeState.d.ts +29 -23
- package/lib/stores/DataCubeState.d.ts.map +1 -1
- package/lib/stores/DataCubeState.js +65 -87
- package/lib/stores/DataCubeState.js.map +1 -1
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts +2 -2
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeConfigurationBuilder.js +1 -1
- package/lib/stores/core/DataCubeConfigurationBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeEngine.d.ts +23 -50
- package/lib/stores/core/DataCubeEngine.d.ts.map +1 -1
- package/lib/stores/core/DataCubeEngine.js +15 -98
- package/lib/stores/core/DataCubeEngine.js.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilder.d.ts +3 -2
- package/lib/stores/core/DataCubeQueryBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilder.js +1 -1
- package/lib/stores/core/DataCubeQueryBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts +5 -2
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilderUtils.js +14 -3
- package/lib/stores/core/DataCubeQueryBuilderUtils.js.map +1 -1
- package/lib/stores/core/DataCubeQueryEngine.d.ts +26 -26
- package/lib/stores/core/DataCubeQueryEngine.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshot.d.ts +2 -2
- package/lib/stores/core/DataCubeQuerySnapshot.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts +2 -2
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js +57 -40
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js +5 -5
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts +2 -2
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/model/AdhocQueryDataCubeSource.d.ts +29 -0
- package/lib/stores/core/model/AdhocQueryDataCubeSource.d.ts.map +1 -0
- package/lib/stores/core/model/AdhocQueryDataCubeSource.js +35 -0
- package/lib/stores/core/model/AdhocQueryDataCubeSource.js.map +1 -0
- package/lib/stores/core/model/DataCubeColumn.d.ts.map +1 -0
- package/lib/stores/core/model/DataCubeColumn.js.map +1 -0
- package/lib/stores/core/model/DataCubeConfiguration.d.ts.map +1 -0
- package/lib/stores/core/model/DataCubeConfiguration.js.map +1 -0
- package/lib/stores/core/model/DataCubeQuery.d.ts.map +1 -0
- package/lib/stores/core/model/DataCubeQuery.js.map +1 -0
- package/lib/stores/core/{models → model}/DataCubeSource.d.ts +1 -1
- package/lib/stores/core/model/DataCubeSource.d.ts.map +1 -0
- package/lib/stores/core/{models → model}/DataCubeSource.js +1 -1
- package/lib/stores/core/model/DataCubeSource.js.map +1 -0
- package/lib/stores/services/DataCubeAlertService.d.ts +56 -0
- package/lib/stores/services/DataCubeAlertService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeAlertService.js +89 -0
- package/lib/stores/services/DataCubeAlertService.js.map +1 -0
- package/lib/stores/services/DataCubeDocumentationService.d.ts +29 -0
- package/lib/stores/services/DataCubeDocumentationService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeDocumentationService.js +41 -0
- package/lib/stores/services/DataCubeDocumentationService.js.map +1 -0
- package/lib/stores/{core/DataCubeLayoutManagerState.d.ts → services/DataCubeLayoutService.d.ts} +28 -7
- package/lib/stores/services/DataCubeLayoutService.d.ts.map +1 -0
- package/lib/stores/{core/DataCubeLayoutManagerState.js → services/DataCubeLayoutService.js} +58 -21
- package/lib/stores/services/DataCubeLayoutService.js.map +1 -0
- package/lib/stores/services/DataCubeLogService.d.ts +29 -0
- package/lib/stores/services/DataCubeLogService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeLogService.js +43 -0
- package/lib/stores/services/DataCubeLogService.js.map +1 -0
- package/lib/stores/services/DataCubeNavigationService.d.ts +22 -0
- package/lib/stores/services/DataCubeNavigationService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeNavigationService.js +25 -0
- package/lib/stores/services/DataCubeNavigationService.js.map +1 -0
- package/lib/stores/{view/DataCubeQuerySnapshotManager.d.ts → services/DataCubeQuerySnapshotService.d.ts} +18 -13
- package/lib/stores/services/DataCubeQuerySnapshotService.d.ts.map +1 -0
- package/lib/stores/{view/DataCubeQuerySnapshotManager.js → services/DataCubeQuerySnapshotService.js} +42 -29
- package/lib/stores/services/DataCubeQuerySnapshotService.js.map +1 -0
- package/lib/stores/services/DataCubeSettingService.d.ts +75 -0
- package/lib/stores/services/DataCubeSettingService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeSettingService.js +312 -0
- package/lib/stores/services/DataCubeSettingService.js.map +1 -0
- package/lib/stores/services/DataCubeTaskService.d.ts +41 -0
- package/lib/stores/services/DataCubeTaskService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeTaskService.js +84 -0
- package/lib/stores/services/DataCubeTaskService.js.map +1 -0
- package/lib/stores/services/DataCubeTelemetryService.d.ts +23 -0
- package/lib/stores/services/DataCubeTelemetryService.d.ts.map +1 -0
- package/lib/stores/services/DataCubeTelemetryService.js +25 -0
- package/lib/stores/services/DataCubeTelemetryService.js.map +1 -0
- package/lib/stores/view/DataCubeInfoState.d.ts +2 -1
- package/lib/stores/view/DataCubeInfoState.d.ts.map +1 -1
- package/lib/stores/view/DataCubeInfoState.js +10 -4
- package/lib/stores/view/DataCubeInfoState.js.map +1 -1
- package/lib/stores/view/DataCubeViewState.d.ts +20 -19
- package/lib/stores/view/DataCubeViewState.d.ts.map +1 -1
- package/lib/stores/view/DataCubeViewState.js +47 -57
- package/lib/stores/view/DataCubeViewState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.d.ts +2 -4
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js +3 -5
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.d.ts +1 -3
- package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.js +3 -5
- package/lib/stores/view/editor/DataCubeEditorColumnSelectorState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.d.ts +2 -4
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js +15 -17
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts +1 -4
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js +0 -4
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts +3 -5
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js +7 -9
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.d.ts +1 -1
- package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorPanelState.d.ts +1 -1
- package/lib/stores/view/editor/DataCubeEditorPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.d.ts +2 -4
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js +3 -5
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.d.ts +1 -4
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.js +10 -14
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorState.d.ts +4 -3
- package/lib/stores/view/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorState.js +11 -9
- package/lib/stores/view/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.d.ts +1 -4
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js +4 -8
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js.map +1 -1
- package/lib/stores/view/extend/DataCubeColumnEditorState.d.ts +4 -4
- package/lib/stores/view/extend/DataCubeColumnEditorState.d.ts.map +1 -1
- package/lib/stores/view/extend/DataCubeColumnEditorState.js +22 -22
- package/lib/stores/view/extend/DataCubeColumnEditorState.js.map +1 -1
- package/lib/stores/view/extend/DataCubeExtendManagerState.d.ts +7 -6
- package/lib/stores/view/extend/DataCubeExtendManagerState.d.ts.map +1 -1
- package/lib/stores/view/extend/DataCubeExtendManagerState.js +18 -20
- package/lib/stores/view/extend/DataCubeExtendManagerState.js.map +1 -1
- package/lib/stores/view/filter/DataCubeFilterEditorState.d.ts +4 -3
- package/lib/stores/view/filter/DataCubeFilterEditorState.d.ts.map +1 -1
- package/lib/stores/view/filter/DataCubeFilterEditorState.js +8 -6
- package/lib/stores/view/filter/DataCubeFilterEditorState.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientEngine.d.ts +6 -4
- package/lib/stores/view/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientEngine.js +46 -35
- package/lib/stores/view/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientExportEngine.d.ts +1 -3
- package/lib/stores/view/grid/DataCubeGridClientExportEngine.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientExportEngine.js +7 -9
- package/lib/stores/view/grid/DataCubeGridClientExportEngine.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.d.ts +2 -2
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js +5 -5
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridControllerState.d.ts +8 -6
- package/lib/stores/view/grid/DataCubeGridControllerState.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridControllerState.js +8 -3
- package/lib/stores/view/grid/DataCubeGridControllerState.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridMenuBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridMenuBuilder.js +7 -7
- package/lib/stores/view/grid/DataCubeGridMenuBuilder.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.d.ts +1 -1
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.js +3 -3
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.d.ts +2 -2
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.js +2 -2
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridState.d.ts +4 -2
- package/lib/stores/view/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridState.js +18 -11
- package/lib/stores/view/grid/DataCubeGridState.js.map +1 -1
- package/package.json +6 -6
- package/src/__lib__/DataCubeDocumentation.ts +7 -7
- package/src/__lib__/DataCubeEvent.ts +21 -0
- package/src/__lib__/DataCubeSetting.ts +24 -0
- package/src/components/DataCube.tsx +61 -85
- package/src/components/DataCubePlaceholder.tsx +97 -0
- package/src/components/DataCubeProvider.tsx +1 -1
- package/src/components/DataCubeStatusBar.tsx +71 -0
- package/src/components/DataCubeTitleBar.tsx +81 -0
- package/src/components/DataCubeView.tsx +20 -44
- package/src/components/core/DataCubeAlert.tsx +15 -104
- package/src/components/core/DataCubeDocumentationPanel.tsx +1 -1
- package/src/components/core/DataCubeFormUtils.tsx +256 -24
- package/src/components/core/{DataCubeLayoutManager.tsx → DataCubeLayout.tsx} +33 -22
- package/src/components/core/DataCubePureCodeEditorUtils.tsx +9 -5
- package/src/components/core/DataCubeSettingsPanel.tsx +166 -134
- package/src/components/view/editor/DataCubeEditor.tsx +18 -19
- package/src/components/view/editor/DataCubeEditorColumnPropertiesPanel.tsx +24 -22
- package/src/components/view/editor/DataCubeEditorColumnsPanel.tsx +14 -18
- package/src/components/view/editor/DataCubeEditorGeneralPropertiesPanel.tsx +6 -5
- package/src/components/view/extend/DataCubeColumnEditor.tsx +43 -38
- package/src/components/view/filter/DataCubeFilterEditor.tsx +14 -20
- package/src/components/view/grid/DataCubeGrid.tsx +9 -8
- package/src/index.tsx +30 -8
- package/src/stores/DataCubeAPI.ts +58 -3
- package/src/stores/DataCubeOptions.ts +108 -15
- package/src/stores/DataCubeState.tsx +93 -123
- package/src/stores/core/DataCubeConfigurationBuilder.ts +2 -2
- package/src/stores/core/DataCubeEngine.tsx +51 -234
- package/src/stores/core/DataCubeQueryBuilder.ts +3 -2
- package/src/stores/core/DataCubeQueryBuilderUtils.ts +19 -2
- package/src/stores/core/DataCubeQueryEngine.ts +27 -27
- package/src/stores/core/DataCubeQuerySnapshot.ts +2 -2
- package/src/stores/core/DataCubeQuerySnapshotBuilder.ts +77 -42
- package/src/stores/core/DataCubeQuerySnapshotBuilderUtils.ts +5 -5
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation.ts +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__First.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.tsx +2 -2
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.tsx +2 -2
- package/src/stores/core/filter/DataCubeQueryFilterEditorState.ts +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation.ts +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Contain.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Equal.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +1 -1
- package/src/stores/core/model/AdhocQueryDataCubeSource.ts +45 -0
- package/src/stores/core/{models → model}/DataCubeSource.ts +1 -1
- package/src/stores/services/DataCubeAlertService.tsx +169 -0
- package/src/stores/services/DataCubeDocumentationService.tsx +74 -0
- package/src/stores/{core/DataCubeLayoutManagerState.ts → services/DataCubeLayoutService.tsx} +96 -23
- package/src/stores/services/DataCubeLogService.ts +54 -0
- package/src/stores/services/DataCubeNavigationService.ts +29 -0
- package/src/stores/{view/DataCubeQuerySnapshotManager.ts → services/DataCubeQuerySnapshotService.ts} +62 -40
- package/src/stores/services/DataCubeSettingService.tsx +489 -0
- package/src/stores/services/DataCubeTaskService.ts +102 -0
- package/src/stores/services/DataCubeTelemetryService.ts +30 -0
- package/src/stores/view/DataCubeInfoState.ts +12 -4
- package/src/stores/view/DataCubeViewState.ts +60 -68
- package/src/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.ts +4 -6
- package/src/stores/view/editor/DataCubeEditorColumnSelectorState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorColumnsPanelState.ts +16 -18
- package/src/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.ts +1 -8
- package/src/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.ts +9 -11
- package/src/stores/view/editor/DataCubeEditorMutableConfiguration.ts +1 -1
- package/src/stores/view/editor/DataCubeEditorPanelState.ts +1 -1
- package/src/stores/view/editor/DataCubeEditorPivotLayoutPanelState.ts +4 -7
- package/src/stores/view/editor/DataCubeEditorSortsPanelState.ts +11 -16
- package/src/stores/view/editor/DataCubeEditorState.tsx +23 -15
- package/src/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.ts +5 -10
- package/src/stores/view/extend/DataCubeColumnEditorState.tsx +30 -28
- package/src/stores/view/extend/DataCubeExtendManagerState.tsx +39 -30
- package/src/stores/view/filter/DataCubeFilterEditorState.tsx +11 -8
- package/src/stores/view/grid/DataCubeGridClientEngine.ts +69 -50
- package/src/stores/view/grid/DataCubeGridClientExportEngine.ts +7 -10
- package/src/stores/view/grid/DataCubeGridConfigurationBuilder.tsx +3 -6
- package/src/stores/view/grid/DataCubeGridControllerState.ts +11 -3
- package/src/stores/view/grid/DataCubeGridMenuBuilder.tsx +20 -8
- package/src/stores/view/grid/DataCubeGridQueryBuilder.ts +9 -3
- package/src/stores/view/grid/DataCubeGridQuerySnapshotBuilder.ts +2 -2
- package/src/stores/view/grid/DataCubeGridState.ts +37 -14
- package/tsconfig.json +20 -8
- package/lib/components/core/DataCubeLayoutManager.d.ts.map +0 -1
- package/lib/components/core/DataCubeLayoutManager.js.map +0 -1
- package/lib/stores/DataCubeSettings.d.ts +0 -42
- package/lib/stores/DataCubeSettings.d.ts.map +0 -1
- package/lib/stores/DataCubeSettings.js +0 -76
- package/lib/stores/DataCubeSettings.js.map +0 -1
- package/lib/stores/core/DataCubeLayoutManagerState.d.ts.map +0 -1
- package/lib/stores/core/DataCubeLayoutManagerState.js.map +0 -1
- package/lib/stores/core/models/DataCubeColumn.d.ts.map +0 -1
- package/lib/stores/core/models/DataCubeColumn.js.map +0 -1
- package/lib/stores/core/models/DataCubeConfiguration.d.ts.map +0 -1
- package/lib/stores/core/models/DataCubeConfiguration.js.map +0 -1
- package/lib/stores/core/models/DataCubeQuery.d.ts.map +0 -1
- package/lib/stores/core/models/DataCubeQuery.js.map +0 -1
- package/lib/stores/core/models/DataCubeSource.d.ts.map +0 -1
- package/lib/stores/core/models/DataCubeSource.js.map +0 -1
- package/lib/stores/view/DataCubeQuerySnapshotManager.d.ts.map +0 -1
- package/lib/stores/view/DataCubeQuerySnapshotManager.js.map +0 -1
- package/src/stores/DataCubeSettings.ts +0 -107
- /package/lib/stores/core/{models → model}/DataCubeColumn.d.ts +0 -0
- /package/lib/stores/core/{models → model}/DataCubeColumn.js +0 -0
- /package/lib/stores/core/{models → model}/DataCubeConfiguration.d.ts +0 -0
- /package/lib/stores/core/{models → model}/DataCubeConfiguration.js +0 -0
- /package/lib/stores/core/{models → model}/DataCubeQuery.d.ts +0 -0
- /package/lib/stores/core/{models → model}/DataCubeQuery.js +0 -0
- /package/src/stores/core/{models → model}/DataCubeColumn.ts +0 -0
- /package/src/stores/core/{models → model}/DataCubeConfiguration.ts +0 -0
- /package/src/stores/core/{models → model}/DataCubeQuery.ts +0 -0
|
@@ -0,0 +1,489 @@
|
|
|
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 { DataCubeSettingKey } from '../../__lib__/DataCubeSetting.js';
|
|
18
|
+
import {
|
|
19
|
+
hashArray,
|
|
20
|
+
IllegalStateError,
|
|
21
|
+
isBoolean,
|
|
22
|
+
isNumber,
|
|
23
|
+
isString,
|
|
24
|
+
LogEvent,
|
|
25
|
+
UnsupportedOperationError,
|
|
26
|
+
} from '@finos/legend-shared';
|
|
27
|
+
import { DataCubeEvent } from '../../__lib__/DataCubeEvent.js';
|
|
28
|
+
import type { DataCubeOptions } from '../DataCubeOptions.js';
|
|
29
|
+
import {
|
|
30
|
+
action,
|
|
31
|
+
computed,
|
|
32
|
+
makeObservable,
|
|
33
|
+
observable,
|
|
34
|
+
runInAction,
|
|
35
|
+
} from 'mobx';
|
|
36
|
+
import type {
|
|
37
|
+
DataCubeLayoutService,
|
|
38
|
+
DisplayState,
|
|
39
|
+
} from './DataCubeLayoutService.js';
|
|
40
|
+
import { DataCubeSettingsPanel } from '../../components/core/DataCubeSettingsPanel.js';
|
|
41
|
+
import type { DataCubeEngine } from '../core/DataCubeEngine.js';
|
|
42
|
+
import type { DataCubeAPI, INTERNAL__DataCubeAPI } from '../DataCubeAPI.js';
|
|
43
|
+
import type { DataCubeLogService } from './DataCubeLogService.js';
|
|
44
|
+
|
|
45
|
+
export type DataCubeSettingValue =
|
|
46
|
+
| string
|
|
47
|
+
| number
|
|
48
|
+
| boolean
|
|
49
|
+
| object
|
|
50
|
+
| undefined;
|
|
51
|
+
|
|
52
|
+
export type DataCubeSettingValues = {
|
|
53
|
+
[key: string]: DataCubeSettingValue;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export enum DataCubeSettingGroup {
|
|
57
|
+
DEBUG = 'Debug',
|
|
58
|
+
GRID = 'Grid',
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export enum DataCubeSettingType {
|
|
62
|
+
BOOLEAN = 'boolean',
|
|
63
|
+
NUMERIC = 'numeric',
|
|
64
|
+
STRING = 'string',
|
|
65
|
+
ACTION = 'action',
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
|
+
export type DataCubeSetting<T extends DataCubeSettingValue = any> = {
|
|
70
|
+
key: string;
|
|
71
|
+
title: string;
|
|
72
|
+
group: string;
|
|
73
|
+
type: DataCubeSettingType;
|
|
74
|
+
defaultValue: T;
|
|
75
|
+
action?: ((api: DataCubeAPI, newValue: T) => void) | undefined;
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
valueOptional?: boolean | undefined;
|
|
78
|
+
requiresReload?: boolean | undefined;
|
|
79
|
+
// numeric value specifics - TODO: we might want to break these downw to separate types
|
|
80
|
+
numericValueMin?: number | undefined;
|
|
81
|
+
numericValueMax?: number | undefined;
|
|
82
|
+
numericValueStep?: number | undefined;
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
export class DataCubeSettingService {
|
|
86
|
+
private readonly _engine: DataCubeEngine;
|
|
87
|
+
private readonly _logService: DataCubeLogService;
|
|
88
|
+
private readonly _layoutService: DataCubeLayoutService;
|
|
89
|
+
private readonly _options?: DataCubeOptions | undefined;
|
|
90
|
+
|
|
91
|
+
readonly display: DisplayState;
|
|
92
|
+
readonly configurations = new Map<string, DataCubeSetting>();
|
|
93
|
+
readonly defaultValues = new Map<string, DataCubeSettingValue>();
|
|
94
|
+
private readonly _defaultValuesHashCode!: string;
|
|
95
|
+
readonly values = new Map<string, DataCubeSettingValue>();
|
|
96
|
+
readonly currentValues = new Map<string, DataCubeSettingValue>();
|
|
97
|
+
|
|
98
|
+
constructor(
|
|
99
|
+
engine: DataCubeEngine,
|
|
100
|
+
logService: DataCubeLogService,
|
|
101
|
+
layoutService: DataCubeLayoutService,
|
|
102
|
+
options?: DataCubeOptions | undefined,
|
|
103
|
+
) {
|
|
104
|
+
makeObservable<
|
|
105
|
+
DataCubeSettingService,
|
|
106
|
+
'valuesHashCode' | 'currentValuesHashCode'
|
|
107
|
+
>(this, {
|
|
108
|
+
values: observable,
|
|
109
|
+
save: action,
|
|
110
|
+
valuesHashCode: computed,
|
|
111
|
+
|
|
112
|
+
currentValues: observable,
|
|
113
|
+
restoreDefaultValues: action,
|
|
114
|
+
currentValuesHashCode: computed,
|
|
115
|
+
|
|
116
|
+
allowRestoreDefaultValues: computed,
|
|
117
|
+
});
|
|
118
|
+
|
|
119
|
+
this._engine = engine;
|
|
120
|
+
this._logService = logService;
|
|
121
|
+
this._layoutService = layoutService;
|
|
122
|
+
this._options = options;
|
|
123
|
+
|
|
124
|
+
this.display = this._layoutService.newDisplay(
|
|
125
|
+
'Settings',
|
|
126
|
+
() => <DataCubeSettingsPanel />,
|
|
127
|
+
{
|
|
128
|
+
x: -50,
|
|
129
|
+
y: 50,
|
|
130
|
+
width: 600,
|
|
131
|
+
height: 400,
|
|
132
|
+
minWidth: 300,
|
|
133
|
+
minHeight: 200,
|
|
134
|
+
center: false,
|
|
135
|
+
},
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
const CORE_SETTINGS: DataCubeSetting[] = [
|
|
139
|
+
{
|
|
140
|
+
key: DataCubeSettingKey.DEBUGGER__ENABLE_DEBUG_MODE,
|
|
141
|
+
title: `Debug Mode: Enabled`,
|
|
142
|
+
description: `Enables debug logging when running data queries, updating snapshots, etc.`,
|
|
143
|
+
group: DataCubeSettingGroup.DEBUG,
|
|
144
|
+
type: DataCubeSettingType.BOOLEAN,
|
|
145
|
+
defaultValue: false,
|
|
146
|
+
} satisfies DataCubeSetting<boolean>,
|
|
147
|
+
{
|
|
148
|
+
key: DataCubeSettingKey.DEBUGGER__ACTION__RELOAD,
|
|
149
|
+
title: `Reload`,
|
|
150
|
+
description: `Manually reload DataCube (keeping all states). This is needed when making changes to settings that require reloading to take effect.`,
|
|
151
|
+
group: DataCubeSettingGroup.DEBUG,
|
|
152
|
+
type: DataCubeSettingType.ACTION,
|
|
153
|
+
action: (api) => api.reload(),
|
|
154
|
+
defaultValue: undefined,
|
|
155
|
+
} satisfies DataCubeSetting,
|
|
156
|
+
{
|
|
157
|
+
key: DataCubeSettingKey.GRID_CLIENT__SUPPRESS_LARGE_DATASET_WARNING,
|
|
158
|
+
title: `Large Dataset Warning: Disabled`,
|
|
159
|
+
description: `Suggests user to enable pagination when handling large datasets to improve performance.`,
|
|
160
|
+
group: DataCubeSettingGroup.GRID,
|
|
161
|
+
type: DataCubeSettingType.BOOLEAN,
|
|
162
|
+
defaultValue: false,
|
|
163
|
+
} satisfies DataCubeSetting<boolean>,
|
|
164
|
+
{
|
|
165
|
+
key: DataCubeSettingKey.GRID_CLIENT__ROW_BUFFER,
|
|
166
|
+
title: `Row Buffer`,
|
|
167
|
+
description: `Sets the number of rows the grid renders outside of the viewable area. e.g. if the buffer is 10 and your grid is showing 50 rows (as that's all that fits on your screen without scrolling), then the grid will actually render 70 in total (10 extra above and 10 extra below). Then when you scroll, the grid will already have 10 rows ready and waiting to show, no redraw is needed. A low small buffer will make initial draws of the grid faster; whereas a big one will reduce the redraw visible vertically scrolling.`,
|
|
168
|
+
group: DataCubeSettingGroup.GRID,
|
|
169
|
+
type: DataCubeSettingType.NUMERIC,
|
|
170
|
+
defaultValue: 50,
|
|
171
|
+
numericValueMin: 10,
|
|
172
|
+
numericValueStep: 10,
|
|
173
|
+
action: (api, newValue) =>
|
|
174
|
+
(api as INTERNAL__DataCubeAPI)._runTaskForEachView((view) => {
|
|
175
|
+
view.grid.client.updateGridOptions({
|
|
176
|
+
rowBuffer: newValue,
|
|
177
|
+
});
|
|
178
|
+
}),
|
|
179
|
+
} satisfies DataCubeSetting<number>,
|
|
180
|
+
{
|
|
181
|
+
key: DataCubeSettingKey.GRID_CLIENT__PURGE_CLOSED_ROW_NODES,
|
|
182
|
+
title: `Refresh Group Node Data: Enabled`,
|
|
183
|
+
description: `Forces refresh data when group node is opened.`,
|
|
184
|
+
group: DataCubeSettingGroup.GRID,
|
|
185
|
+
type: DataCubeSettingType.BOOLEAN,
|
|
186
|
+
defaultValue: false,
|
|
187
|
+
action: (api, newValue) =>
|
|
188
|
+
(api as INTERNAL__DataCubeAPI)._runTaskForEachView((view) => {
|
|
189
|
+
view.grid.client.updateGridOptions({
|
|
190
|
+
purgeClosedRowNodes: newValue,
|
|
191
|
+
});
|
|
192
|
+
}),
|
|
193
|
+
} satisfies DataCubeSetting<boolean>,
|
|
194
|
+
{
|
|
195
|
+
key: DataCubeSettingKey.GRID_CLIENT__ACTION__RETRY_FAILED_DATA_FETCHES,
|
|
196
|
+
title: `Retry Failed Data Fetches: Action`,
|
|
197
|
+
description: `Manually re-runs all failed data fetches in the grid.`,
|
|
198
|
+
group: DataCubeSettingGroup.GRID,
|
|
199
|
+
type: DataCubeSettingType.ACTION,
|
|
200
|
+
action: (api) => api.retryFailedDataFetches(),
|
|
201
|
+
defaultValue: undefined,
|
|
202
|
+
} satisfies DataCubeSetting,
|
|
203
|
+
];
|
|
204
|
+
|
|
205
|
+
const { configurations, values } = options?.settingsData ?? {};
|
|
206
|
+
|
|
207
|
+
[...CORE_SETTINGS, ...(configurations ?? [])].forEach((configuration) => {
|
|
208
|
+
this.configurations.set(configuration.key, configuration);
|
|
209
|
+
this.setValue(configuration.key, configuration.defaultValue, [
|
|
210
|
+
this.defaultValues,
|
|
211
|
+
this.values,
|
|
212
|
+
this.currentValues,
|
|
213
|
+
]);
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
const settingValues = values ?? {};
|
|
217
|
+
Object.keys(settingValues).forEach((key) => {
|
|
218
|
+
const value = settingValues[key];
|
|
219
|
+
// for unknown settings (e.g. outdated settings, settings' keys changed, etc.), we ignore them
|
|
220
|
+
const configuration = this.configurations.get(key);
|
|
221
|
+
if (!configuration) {
|
|
222
|
+
return;
|
|
223
|
+
}
|
|
224
|
+
this.setValue(key, value, [this.values, this.currentValues]);
|
|
225
|
+
});
|
|
226
|
+
|
|
227
|
+
// NOTE: if we support explicity setting values from options, they should
|
|
228
|
+
// be processed here, as they should override the settings retrieved from
|
|
229
|
+
// cache.
|
|
230
|
+
|
|
231
|
+
this._defaultValuesHashCode = this.computeValuesHashCode(
|
|
232
|
+
this.defaultValues,
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
private setValue(
|
|
237
|
+
key: string,
|
|
238
|
+
value: unknown,
|
|
239
|
+
valueIndexes: Map<string, unknown>[],
|
|
240
|
+
) {
|
|
241
|
+
const configuration = this.configurations.get(key);
|
|
242
|
+
if (!configuration) {
|
|
243
|
+
this._logService.logWarning(
|
|
244
|
+
LogEvent.create(
|
|
245
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
246
|
+
),
|
|
247
|
+
`Can't set value for unregistered setting '${key}'`,
|
|
248
|
+
);
|
|
249
|
+
return false;
|
|
250
|
+
}
|
|
251
|
+
switch (configuration.type) {
|
|
252
|
+
case DataCubeSettingType.BOOLEAN: {
|
|
253
|
+
if (
|
|
254
|
+
!(
|
|
255
|
+
isBoolean(value) ||
|
|
256
|
+
(value === undefined && configuration.valueOptional)
|
|
257
|
+
)
|
|
258
|
+
) {
|
|
259
|
+
this._logService.logWarning(
|
|
260
|
+
LogEvent.create(
|
|
261
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
262
|
+
),
|
|
263
|
+
`Can't set value for setting '${key}': boolean value expected`,
|
|
264
|
+
);
|
|
265
|
+
return false;
|
|
266
|
+
}
|
|
267
|
+
break;
|
|
268
|
+
}
|
|
269
|
+
case DataCubeSettingType.NUMERIC: {
|
|
270
|
+
if (
|
|
271
|
+
!(
|
|
272
|
+
isNumber(value) ||
|
|
273
|
+
(value === undefined && configuration.valueOptional)
|
|
274
|
+
)
|
|
275
|
+
) {
|
|
276
|
+
this._logService.logWarning(
|
|
277
|
+
LogEvent.create(
|
|
278
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
279
|
+
),
|
|
280
|
+
`Can't set value for setting '${key}': numeric value expected`,
|
|
281
|
+
);
|
|
282
|
+
return false;
|
|
283
|
+
}
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
case DataCubeSettingType.STRING: {
|
|
287
|
+
if (
|
|
288
|
+
!(
|
|
289
|
+
isString(value) ||
|
|
290
|
+
(value === undefined && configuration.valueOptional)
|
|
291
|
+
)
|
|
292
|
+
) {
|
|
293
|
+
this._logService.logWarning(
|
|
294
|
+
LogEvent.create(
|
|
295
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
296
|
+
),
|
|
297
|
+
`Can't set value for setting '${key}': string value expected`,
|
|
298
|
+
);
|
|
299
|
+
return false;
|
|
300
|
+
}
|
|
301
|
+
break;
|
|
302
|
+
}
|
|
303
|
+
case DataCubeSettingType.ACTION: {
|
|
304
|
+
return false;
|
|
305
|
+
}
|
|
306
|
+
default:
|
|
307
|
+
throw new UnsupportedOperationError(
|
|
308
|
+
`Can't set value for unsupported setting type '${configuration.type}'`,
|
|
309
|
+
);
|
|
310
|
+
}
|
|
311
|
+
valueIndexes.forEach((valueIndex) => {
|
|
312
|
+
runInAction(() => valueIndex.set(key, value));
|
|
313
|
+
});
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
private getConfiguration(key: string) {
|
|
318
|
+
const configuration = this.configurations.get(key);
|
|
319
|
+
if (!configuration) {
|
|
320
|
+
this._logService.logWarning(
|
|
321
|
+
LogEvent.create(
|
|
322
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
323
|
+
),
|
|
324
|
+
`Can't retrieve value for unregistered setting '${key}'`,
|
|
325
|
+
);
|
|
326
|
+
throw new IllegalStateError(
|
|
327
|
+
`Can't retrieve value for unregistered setting '${key}'`,
|
|
328
|
+
);
|
|
329
|
+
}
|
|
330
|
+
return configuration;
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
getBooleanValue(key: string) {
|
|
334
|
+
const value = this.values.get(key);
|
|
335
|
+
const configuration = this.getConfiguration(key);
|
|
336
|
+
if (
|
|
337
|
+
configuration.type !== DataCubeSettingType.BOOLEAN ||
|
|
338
|
+
!isBoolean(value)
|
|
339
|
+
) {
|
|
340
|
+
this._logService.logWarning(
|
|
341
|
+
LogEvent.create(
|
|
342
|
+
DataCubeEvent.SETTINGS__FAILURE__RETRIEVE_INCOMPATIBLE_VALUE,
|
|
343
|
+
),
|
|
344
|
+
`Can't retrieve boolean value for setting '${key}'`,
|
|
345
|
+
);
|
|
346
|
+
throw new IllegalStateError(
|
|
347
|
+
`Can't retrieve boolean value for setting '${key}'`,
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
return value;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
getNumericValue(key: string) {
|
|
354
|
+
const value = this.values.get(key);
|
|
355
|
+
const configuration = this.getConfiguration(key);
|
|
356
|
+
if (
|
|
357
|
+
configuration.type !== DataCubeSettingType.NUMERIC ||
|
|
358
|
+
!isNumber(value)
|
|
359
|
+
) {
|
|
360
|
+
this._logService.logWarning(
|
|
361
|
+
LogEvent.create(
|
|
362
|
+
DataCubeEvent.SETTINGS__FAILURE__RETRIEVE_INCOMPATIBLE_VALUE,
|
|
363
|
+
),
|
|
364
|
+
`Can't retrieve numeric value for setting '${key}'`,
|
|
365
|
+
);
|
|
366
|
+
throw new IllegalStateError(
|
|
367
|
+
`Can't retrieve numeric value for setting '${key}'`,
|
|
368
|
+
);
|
|
369
|
+
}
|
|
370
|
+
return value;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
getStringValue(key: string) {
|
|
374
|
+
const value = this.values.get(key);
|
|
375
|
+
const configuration = this.getConfiguration(key);
|
|
376
|
+
if (configuration.type !== DataCubeSettingType.STRING || !isString(value)) {
|
|
377
|
+
this._logService.logWarning(
|
|
378
|
+
LogEvent.create(
|
|
379
|
+
DataCubeEvent.SETTINGS__FAILURE__RETRIEVE_INCOMPATIBLE_VALUE,
|
|
380
|
+
),
|
|
381
|
+
`Can't retrieve string value for setting '${key}'`,
|
|
382
|
+
);
|
|
383
|
+
throw new IllegalStateError(
|
|
384
|
+
`Can't retrieve string value for setting '${key}'`,
|
|
385
|
+
);
|
|
386
|
+
}
|
|
387
|
+
return value;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
private computeValuesHashCode(values: Map<string, DataCubeSettingValue>) {
|
|
391
|
+
return hashArray(
|
|
392
|
+
Array.from(values.entries())
|
|
393
|
+
.toSorted((a, b) => a[0].localeCompare(b[0]))
|
|
394
|
+
.map(([key, value]) => `${key}:${value}`),
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
private get valuesHashCode() {
|
|
399
|
+
return this.computeValuesHashCode(this.values);
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
private get currentValuesHashCode() {
|
|
403
|
+
return this.computeValuesHashCode(this.currentValues);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
get allowRestoreDefaultValues() {
|
|
407
|
+
return this._defaultValuesHashCode !== this.currentValuesHashCode;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
restoreDefaultValues() {
|
|
411
|
+
this.currentValues.clear();
|
|
412
|
+
this.defaultValues.forEach((value, key) =>
|
|
413
|
+
this.currentValues.set(key, value),
|
|
414
|
+
);
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
private getCurrentSettingValues() {
|
|
418
|
+
const settingValues: DataCubeSettingValues = {};
|
|
419
|
+
this.values.forEach((value, key) => {
|
|
420
|
+
const configuration = this.configurations.get(key);
|
|
421
|
+
// skip if value is the same as default value
|
|
422
|
+
if (configuration && value !== configuration.defaultValue) {
|
|
423
|
+
settingValues[key] = value;
|
|
424
|
+
}
|
|
425
|
+
});
|
|
426
|
+
return settingValues;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
updateValue(api: DataCubeAPI, key: string, value: DataCubeSettingValue) {
|
|
430
|
+
const configuration = this.configurations.get(key);
|
|
431
|
+
if (!configuration) {
|
|
432
|
+
this._logService.logWarning(
|
|
433
|
+
LogEvent.create(
|
|
434
|
+
DataCubeEvent.SETTINGS__FAILURE__FOUND_UNREGISTERED_SETTING,
|
|
435
|
+
),
|
|
436
|
+
`Can't set value for unregistered setting '${key}'`,
|
|
437
|
+
);
|
|
438
|
+
return;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
if (!this.setValue(key, value, [this.values, this.currentValues])) {
|
|
442
|
+
return;
|
|
443
|
+
}
|
|
444
|
+
|
|
445
|
+
// trigger hook
|
|
446
|
+
this._options?.onSettingsChanged?.({
|
|
447
|
+
api,
|
|
448
|
+
values: this.getCurrentSettingValues(),
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// trigger action
|
|
452
|
+
configuration.action?.(api, value);
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
save(api: DataCubeAPI) {
|
|
456
|
+
const changedSettingKeys = new Set<string>();
|
|
457
|
+
this.values.forEach((value, key) => {
|
|
458
|
+
if (value !== this.currentValues.get(key)) {
|
|
459
|
+
changedSettingKeys.add(key);
|
|
460
|
+
}
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
// update values
|
|
464
|
+
this.values.clear();
|
|
465
|
+
this.currentValues.forEach((value, key) => this.values.set(key, value));
|
|
466
|
+
|
|
467
|
+
// trigger hook
|
|
468
|
+
this._options?.onSettingsChanged?.({
|
|
469
|
+
api,
|
|
470
|
+
values: this.getCurrentSettingValues(),
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
// trigger action
|
|
474
|
+
let requiresReload = false;
|
|
475
|
+
for (const key of changedSettingKeys) {
|
|
476
|
+
const configuration = this.configurations.get(key);
|
|
477
|
+
if (configuration?.requiresReload) {
|
|
478
|
+
requiresReload = true;
|
|
479
|
+
}
|
|
480
|
+
if (configuration?.action) {
|
|
481
|
+
configuration.action(api, this.values.get(key));
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
if (requiresReload) {
|
|
486
|
+
api.reload();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { uuid } from '@finos/legend-shared';
|
|
18
|
+
import { action, computed, makeObservable, observable } from 'mobx';
|
|
19
|
+
|
|
20
|
+
export class Task {
|
|
21
|
+
readonly uuid = uuid();
|
|
22
|
+
readonly name: string;
|
|
23
|
+
readonly startTime = Date.now();
|
|
24
|
+
readonly ownerId?: string | undefined;
|
|
25
|
+
|
|
26
|
+
endTime?: number | undefined;
|
|
27
|
+
|
|
28
|
+
constructor(name: string, ownerId?: string | undefined) {
|
|
29
|
+
this.name = name;
|
|
30
|
+
this.ownerId = ownerId;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
end() {
|
|
34
|
+
this.endTime = Date.now();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class TaskManager {
|
|
39
|
+
// TODO?: keep a hashmap, in parallel, for faster lookup
|
|
40
|
+
tasks: Task[] = [];
|
|
41
|
+
|
|
42
|
+
constructor() {
|
|
43
|
+
makeObservable(this, {
|
|
44
|
+
tasks: observable,
|
|
45
|
+
newTask: action,
|
|
46
|
+
endTask: action,
|
|
47
|
+
endTasks: action,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
newTask(name: string, ownerId?: string | undefined) {
|
|
52
|
+
const task = new Task(name, ownerId);
|
|
53
|
+
this.tasks.push(task);
|
|
54
|
+
return task;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
endTask(task: Task) {
|
|
58
|
+
const match = this.tasks.find((t) => t.uuid === task.uuid);
|
|
59
|
+
if (match) {
|
|
60
|
+
this.tasks = this.tasks.filter((t) => t.uuid !== task.uuid);
|
|
61
|
+
task.end();
|
|
62
|
+
}
|
|
63
|
+
return task;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
endTasks(tasks: Task[]) {
|
|
67
|
+
this.tasks = this.tasks.filter(
|
|
68
|
+
(task) => !tasks.find((t) => t.uuid === task.uuid),
|
|
69
|
+
);
|
|
70
|
+
tasks.forEach((task) => task.end());
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export class DataCubeTaskService {
|
|
75
|
+
readonly uuid = uuid();
|
|
76
|
+
readonly manager: TaskManager;
|
|
77
|
+
|
|
78
|
+
constructor(manager?: TaskManager | undefined) {
|
|
79
|
+
makeObservable(this, {
|
|
80
|
+
tasks: computed,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
this.manager = manager ?? new TaskManager();
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
get tasks() {
|
|
87
|
+
return this.manager.tasks.filter((task) => task.ownerId === this.uuid);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
newTask(name: string) {
|
|
91
|
+
return this.manager.newTask(name, this.uuid);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
endTask(task: Task) {
|
|
95
|
+
return this.manager.endTask(task);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
dispose() {
|
|
99
|
+
// remove all tasks owned by this service
|
|
100
|
+
this.manager.endTasks(this.tasks);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
@@ -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
|
+
|
|
17
|
+
import type { PlainObject } from '@finos/legend-shared';
|
|
18
|
+
import type { DataCubeEngine } from '../core/DataCubeEngine.js';
|
|
19
|
+
|
|
20
|
+
export class DataCubeTelemetryService {
|
|
21
|
+
private readonly _engine: DataCubeEngine;
|
|
22
|
+
|
|
23
|
+
constructor(engine: DataCubeEngine) {
|
|
24
|
+
this._engine = engine;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
sendTelemetry(event: string, data: PlainObject) {
|
|
28
|
+
this._engine.sendTelemetry(event, data);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import { action, makeObservable, observable } from 'mobx';
|
|
18
18
|
import type { DataCubeViewState } from './DataCubeViewState.js';
|
|
19
|
-
import { DataCubeQuerySnapshotController } from '
|
|
19
|
+
import { DataCubeQuerySnapshotController } from '../services/DataCubeQuerySnapshotService.js';
|
|
20
20
|
import type { DataCubeQuerySnapshot } from '../core/DataCubeQuerySnapshot.js';
|
|
21
|
-
import { DataCubeConfiguration } from '../core/
|
|
21
|
+
import { DataCubeConfiguration } from '../core/model/DataCubeConfiguration.js';
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Unlike other query editor state, this state does not support making any
|
|
@@ -26,17 +26,21 @@ import { DataCubeConfiguration } from '../core/models/DataCubeConfiguration.js';
|
|
|
26
26
|
* from the latest snapshot to help display latest static info about the query.
|
|
27
27
|
*/
|
|
28
28
|
export class DataCubeInfoState extends DataCubeQuerySnapshotController {
|
|
29
|
+
private readonly _view: DataCubeViewState;
|
|
30
|
+
|
|
29
31
|
name = '';
|
|
30
32
|
// TODO: filter preview text
|
|
31
33
|
|
|
32
34
|
constructor(view: DataCubeViewState) {
|
|
33
|
-
super(view);
|
|
35
|
+
super(view.engine, view.settingService, view.snapshotService);
|
|
34
36
|
|
|
35
37
|
makeObservable(this, {
|
|
36
38
|
name: observable,
|
|
37
39
|
|
|
38
40
|
applySnapshot: action,
|
|
39
41
|
});
|
|
42
|
+
|
|
43
|
+
this._view = view;
|
|
40
44
|
}
|
|
41
45
|
|
|
42
46
|
override getSnapshotSubscriberName() {
|
|
@@ -55,7 +59,11 @@ export class DataCubeInfoState extends DataCubeQuerySnapshotController {
|
|
|
55
59
|
if (configuration.name !== this.name) {
|
|
56
60
|
this.name = configuration.name;
|
|
57
61
|
// TODO: make sure we only call this for the main view of data cube when we support multi views
|
|
58
|
-
this.
|
|
62
|
+
this._view.dataCube.options?.onNameChanged?.({
|
|
63
|
+
api: this._view.dataCube.api,
|
|
64
|
+
name: this.name,
|
|
65
|
+
source: this._view.source,
|
|
66
|
+
});
|
|
59
67
|
}
|
|
60
68
|
|
|
61
69
|
// TODO: filter preview text
|