@finos/legend-data-cube 0.1.4 → 0.1.5
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/lib/__lib__/DataCubeSetting.d.ts +2 -0
- package/lib/__lib__/DataCubeSetting.d.ts.map +1 -1
- package/lib/__lib__/DataCubeSetting.js +2 -0
- package/lib/__lib__/DataCubeSetting.js.map +1 -1
- package/lib/components/DataCube.d.ts +2 -2
- package/lib/components/DataCube.d.ts.map +1 -1
- package/lib/components/DataCube.js +12 -11
- package/lib/components/DataCube.js.map +1 -1
- package/lib/components/DataCubePlaceholder.d.ts +2 -2
- package/lib/components/DataCubePlaceholder.d.ts.map +1 -1
- package/lib/components/DataCubePlaceholder.js.map +1 -1
- package/lib/components/DataCubeTitleBar.d.ts +3 -2
- package/lib/components/DataCubeTitleBar.d.ts.map +1 -1
- package/lib/components/DataCubeTitleBar.js +29 -9
- package/lib/components/DataCubeTitleBar.js.map +1 -1
- package/lib/index.css +1 -1
- package/lib/index.d.ts +3 -3
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +2 -2
- package/lib/index.js.map +1 -1
- package/lib/package.json +1 -1
- package/lib/stores/DataCubeAPI.d.ts +17 -4
- package/lib/stores/DataCubeAPI.d.ts.map +1 -1
- package/lib/stores/DataCubeAPI.js +9 -3
- package/lib/stores/DataCubeAPI.js.map +1 -1
- package/lib/stores/DataCubeOptions.d.ts +11 -8
- package/lib/stores/DataCubeOptions.d.ts.map +1 -1
- package/lib/stores/DataCubeOptions.js +4 -1
- package/lib/stores/DataCubeOptions.js.map +1 -1
- package/lib/stores/DataCubeState.d.ts +3 -3
- package/lib/stores/DataCubeState.d.ts.map +1 -1
- package/lib/stores/DataCubeState.js +3 -3
- package/lib/stores/DataCubeState.js.map +1 -1
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts +3 -3
- package/lib/stores/core/DataCubeConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeConfigurationBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeEngine.d.ts +5 -5
- package/lib/stores/core/DataCubeEngine.d.ts.map +1 -1
- package/lib/stores/core/DataCubeEngine.js +6 -6
- package/lib/stores/core/DataCubeEngine.js.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilder.d.ts +4 -4
- package/lib/stores/core/DataCubeQueryBuilder.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilder.js +2 -2
- package/lib/stores/core/DataCubeQueryBuilder.js.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts +5 -5
- package/lib/stores/core/DataCubeQueryBuilderUtils.d.ts.map +1 -1
- package/lib/stores/core/DataCubeQueryBuilderUtils.js +2 -2
- package/lib/stores/core/DataCubeQueryBuilderUtils.js.map +1 -1
- package/lib/stores/core/{DataCubeQuerySnapshot.d.ts → DataCubeSnapshot.d.ts} +28 -28
- package/lib/stores/core/DataCubeSnapshot.d.ts.map +1 -0
- package/lib/stores/core/{DataCubeQuerySnapshot.js → DataCubeSnapshot.js} +5 -5
- package/lib/stores/core/DataCubeSnapshot.js.map +1 -0
- package/lib/stores/core/{DataCubeQuerySnapshotBuilder.d.ts → DataCubeSnapshotBuilder.d.ts} +8 -8
- package/lib/stores/core/DataCubeSnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/core/{DataCubeQuerySnapshotBuilder.js → DataCubeSnapshotBuilder.js} +12 -12
- package/lib/stores/core/DataCubeSnapshotBuilder.js.map +1 -0
- package/lib/stores/core/{DataCubeQuerySnapshotBuilderUtils.d.ts → DataCubeSnapshotBuilderUtils.d.ts} +6 -6
- package/lib/stores/core/DataCubeSnapshotBuilderUtils.d.ts.map +1 -0
- package/lib/stores/core/{DataCubeQuerySnapshotBuilderUtils.js → DataCubeSnapshotBuilderUtils.js} +16 -10
- package/lib/stores/core/DataCubeSnapshotBuilderUtils.js.map +1 -0
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts +3 -3
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation.d.ts.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__First.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.js.map +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.d.ts +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js +1 -1
- package/lib/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js +2 -2
- package/lib/stores/core/filter/DataCubeQueryFilterEditorState.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts +4 -4
- package/lib/stores/core/filter/DataCubeQueryFilterOperation.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Contain.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__Equal.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__IsNull.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThan.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotContain.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWith.js.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts +3 -3
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.d.ts.map +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js +1 -1
- package/lib/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.js.map +1 -1
- package/lib/stores/core/model/DataCubeConfiguration.d.ts +1 -1
- package/lib/stores/core/model/DataCubeConfiguration.js +1 -1
- package/lib/stores/core/model/{DataCubeQuery.d.ts → DataCubeSpecification.d.ts} +8 -3
- package/lib/stores/core/model/DataCubeSpecification.d.ts.map +1 -0
- package/lib/stores/core/model/{DataCubeQuery.js → DataCubeSpecification.js} +12 -4
- package/lib/stores/core/model/DataCubeSpecification.js.map +1 -0
- package/lib/stores/services/DataCubeSettingService.d.ts +1 -0
- package/lib/stores/services/DataCubeSettingService.d.ts.map +1 -1
- package/lib/stores/services/DataCubeSettingService.js +22 -0
- package/lib/stores/services/DataCubeSettingService.js.map +1 -1
- package/lib/stores/services/DataCubeSnapshotService.d.ts +59 -0
- package/lib/stores/services/DataCubeSnapshotService.d.ts.map +1 -0
- package/lib/stores/services/{DataCubeQuerySnapshotService.js → DataCubeSnapshotService.js} +77 -31
- package/lib/stores/services/DataCubeSnapshotService.js.map +1 -0
- package/lib/stores/view/DataCubeInfoState.d.ts +4 -4
- package/lib/stores/view/DataCubeInfoState.d.ts.map +1 -1
- package/lib/stores/view/DataCubeInfoState.js +2 -2
- package/lib/stores/view/DataCubeInfoState.js.map +1 -1
- package/lib/stores/view/DataCubeViewState.d.ts +12 -9
- package/lib/stores/view/DataCubeViewState.d.ts.map +1 -1
- package/lib/stores/view/DataCubeViewState.js +107 -19
- package/lib/stores/view/DataCubeViewState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorColumnsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorMutableConfiguration.d.ts +2 -2
- 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 +3 -3
- package/lib/stores/view/editor/DataCubeEditorPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js +2 -2
- package/lib/stores/view/editor/DataCubeEditorPivotLayoutPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorSortsPanelState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorState.d.ts +6 -6
- package/lib/stores/view/editor/DataCubeEditorState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorState.js +3 -3
- package/lib/stores/view/editor/DataCubeEditorState.js.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.d.ts +3 -3
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.d.ts.map +1 -1
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js +1 -1
- package/lib/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.js.map +1 -1
- package/lib/stores/view/extend/DataCubeColumnEditorState.d.ts +2 -2
- package/lib/stores/view/extend/DataCubeColumnEditorState.d.ts.map +1 -1
- package/lib/stores/view/extend/DataCubeColumnEditorState.js.map +1 -1
- package/lib/stores/view/extend/DataCubeExtendManagerState.d.ts +8 -8
- package/lib/stores/view/extend/DataCubeExtendManagerState.d.ts.map +1 -1
- package/lib/stores/view/extend/DataCubeExtendManagerState.js +3 -3
- package/lib/stores/view/extend/DataCubeExtendManagerState.js.map +1 -1
- package/lib/stores/view/filter/DataCubeFilterEditorState.d.ts +4 -4
- package/lib/stores/view/filter/DataCubeFilterEditorState.d.ts.map +1 -1
- package/lib/stores/view/filter/DataCubeFilterEditorState.js +4 -4
- package/lib/stores/view/filter/DataCubeFilterEditorState.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientEngine.d.ts +2 -2
- package/lib/stores/view/grid/DataCubeGridClientEngine.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridClientEngine.js +3 -3
- package/lib/stores/view/grid/DataCubeGridClientEngine.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.d.ts +4 -4
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js +3 -3
- package/lib/stores/view/grid/DataCubeGridConfigurationBuilder.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridControllerState.d.ts +5 -5
- package/lib/stores/view/grid/DataCubeGridControllerState.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridControllerState.js +6 -6
- package/lib/stores/view/grid/DataCubeGridControllerState.js.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.d.ts +2 -2
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.js +2 -2
- package/lib/stores/view/grid/DataCubeGridQueryBuilder.js.map +1 -1
- package/lib/stores/view/grid/{DataCubeGridQuerySnapshotBuilder.d.ts → DataCubeGridSnapshotBuilder.d.ts} +5 -5
- package/lib/stores/view/grid/DataCubeGridSnapshotBuilder.d.ts.map +1 -0
- package/lib/stores/view/grid/{DataCubeGridQuerySnapshotBuilder.js → DataCubeGridSnapshotBuilder.js} +6 -6
- package/lib/stores/view/grid/DataCubeGridSnapshotBuilder.js.map +1 -0
- package/lib/stores/view/grid/DataCubeGridState.d.ts +7 -5
- package/lib/stores/view/grid/DataCubeGridState.d.ts.map +1 -1
- package/lib/stores/view/grid/DataCubeGridState.js +7 -6
- package/lib/stores/view/grid/DataCubeGridState.js.map +1 -1
- package/package.json +3 -3
- package/src/__lib__/DataCubeSetting.ts +2 -0
- package/src/components/DataCube.tsx +14 -12
- package/src/components/DataCubePlaceholder.tsx +5 -2
- package/src/components/DataCubeTitleBar.tsx +49 -19
- package/src/index.tsx +3 -2
- package/src/stores/DataCubeAPI.ts +25 -6
- package/src/stores/DataCubeOptions.ts +13 -11
- package/src/stores/DataCubeState.tsx +4 -4
- package/src/stores/core/DataCubeConfigurationBuilder.ts +3 -3
- package/src/stores/core/DataCubeEngine.tsx +8 -8
- package/src/stores/core/DataCubeQueryBuilder.ts +4 -4
- package/src/stores/core/DataCubeQueryBuilderUtils.ts +8 -8
- package/src/stores/core/{DataCubeQuerySnapshot.ts → DataCubeSnapshot.ts} +31 -34
- package/src/stores/core/{DataCubeQuerySnapshotBuilder.ts → DataCubeSnapshotBuilder.ts} +22 -22
- package/src/stores/core/{DataCubeQuerySnapshotBuilderUtils.ts → DataCubeSnapshotBuilderUtils.ts} +39 -25
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation.ts +3 -3
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Average.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Count.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__First.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__JoinStrings.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Last.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Max.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Min.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevPopulation.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__StdDevSample.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__Sum.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__UniqueValue.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VariancePopulation.tsx +1 -1
- package/src/stores/core/aggregation/DataCubeQueryAggregateOperation__VarianceSample.tsx +1 -1
- package/src/stores/core/filter/DataCubeQueryFilterEditorState.ts +8 -8
- package/src/stores/core/filter/DataCubeQueryFilterOperation.ts +4 -4
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Contain.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__ContainCaseInsensitive.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWith.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EndWithCaseInsensitive.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__Equal.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitive.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualCaseInsensitiveColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__EqualColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThan.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqual.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__GreaterThanOrEqualColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNotNull.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__IsNull.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThan.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqual.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__LessThanOrEqualColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotContain.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEndWith.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqual.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitive.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualCaseInsensitiveColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotEqualColumn.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__NotStartWith.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWith.tsx +3 -3
- package/src/stores/core/filter/DataCubeQueryFilterOperation__StartWithCaseInsensitive.tsx +3 -3
- package/src/stores/core/model/DataCubeConfiguration.ts +1 -1
- package/src/stores/core/model/{DataCubeQuery.ts → DataCubeSpecification.ts} +17 -3
- package/src/stores/services/DataCubeSettingService.tsx +23 -0
- package/src/stores/services/{DataCubeQuerySnapshotService.ts → DataCubeSnapshotService.ts} +116 -65
- package/src/stores/view/DataCubeInfoState.ts +5 -5
- package/src/stores/view/DataCubeViewState.ts +143 -23
- package/src/stores/view/editor/DataCubeEditorColumnPropertiesPanelState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorColumnsPanelState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorGeneralPropertiesPanelState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorHorizontalPivotsPanelState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorMutableConfiguration.ts +2 -2
- package/src/stores/view/editor/DataCubeEditorPanelState.ts +4 -4
- package/src/stores/view/editor/DataCubeEditorPivotLayoutPanelState.ts +4 -7
- package/src/stores/view/editor/DataCubeEditorSortsPanelState.ts +3 -6
- package/src/stores/view/editor/DataCubeEditorState.tsx +9 -9
- package/src/stores/view/editor/DataCubeEditorVerticalPivotsPanelState.ts +3 -6
- package/src/stores/view/extend/DataCubeColumnEditorState.tsx +2 -2
- package/src/stores/view/extend/DataCubeExtendManagerState.tsx +11 -11
- package/src/stores/view/filter/DataCubeFilterEditorState.tsx +7 -7
- package/src/stores/view/grid/DataCubeGridClientEngine.ts +6 -6
- package/src/stores/view/grid/DataCubeGridConfigurationBuilder.tsx +12 -12
- package/src/stores/view/grid/DataCubeGridControllerState.ts +12 -12
- package/src/stores/view/grid/DataCubeGridQueryBuilder.ts +4 -4
- package/src/stores/view/grid/{DataCubeGridQuerySnapshotBuilder.ts → DataCubeGridSnapshotBuilder.ts} +6 -6
- package/src/stores/view/grid/DataCubeGridState.ts +15 -9
- package/tsconfig.json +6 -6
- package/lib/stores/core/DataCubeQuerySnapshot.d.ts.map +0 -1
- package/lib/stores/core/DataCubeQuerySnapshot.js.map +0 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.d.ts.map +0 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilder.js.map +0 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.d.ts.map +0 -1
- package/lib/stores/core/DataCubeQuerySnapshotBuilderUtils.js.map +0 -1
- package/lib/stores/core/model/DataCubeQuery.d.ts.map +0 -1
- package/lib/stores/core/model/DataCubeQuery.js.map +0 -1
- package/lib/stores/services/DataCubeQuerySnapshotService.d.ts +0 -54
- package/lib/stores/services/DataCubeQuerySnapshotService.d.ts.map +0 -1
- package/lib/stores/services/DataCubeQuerySnapshotService.js.map +0 -1
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.d.ts.map +0 -1
- package/lib/stores/view/grid/DataCubeGridQuerySnapshotBuilder.js.map +0 -1
|
@@ -19,22 +19,29 @@ import { DataCubeEditorState } from './editor/DataCubeEditorState.js';
|
|
|
19
19
|
import {
|
|
20
20
|
ActionState,
|
|
21
21
|
assertErrorThrown,
|
|
22
|
+
deepEqual,
|
|
22
23
|
IllegalStateError,
|
|
23
24
|
} from '@finos/legend-shared';
|
|
24
|
-
import {
|
|
25
|
+
import { DataCubeSnapshotService } from '../services/DataCubeSnapshotService.js';
|
|
25
26
|
import { DataCubeInfoState } from './DataCubeInfoState.js';
|
|
26
|
-
import {
|
|
27
|
+
import { validateAndBuildSnapshot } from '../core/DataCubeSnapshotBuilder.js';
|
|
27
28
|
import { DataCubeFilterEditorState } from './filter/DataCubeFilterEditorState.js';
|
|
28
29
|
import { DataCubeExtendManagerState } from './extend/DataCubeExtendManagerState.js';
|
|
29
30
|
import type { DataCubeState } from '../DataCubeState.js';
|
|
30
31
|
import { type DataCubeEngine } from '../core/DataCubeEngine.js';
|
|
31
32
|
import type { DataCubeSource } from '../core/model/DataCubeSource.js';
|
|
32
|
-
import {
|
|
33
|
+
import { DataCubeSpecification } from '../core/model/DataCubeSpecification.js';
|
|
33
34
|
import { DataCubeTaskService } from '../services/DataCubeTaskService.js';
|
|
34
35
|
import type { DataCubeLogService } from '../services/DataCubeLogService.js';
|
|
35
36
|
import { DataCubeConfiguration } from '../core/model/DataCubeConfiguration.js';
|
|
36
|
-
import
|
|
37
|
-
|
|
37
|
+
import {
|
|
38
|
+
DEFAULT_ALERT_WINDOW_CONFIG,
|
|
39
|
+
type DataCubeLayoutService,
|
|
40
|
+
} from '../services/DataCubeLayoutService.js';
|
|
41
|
+
import {
|
|
42
|
+
AlertType,
|
|
43
|
+
type DataCubeAlertService,
|
|
44
|
+
} from '../services/DataCubeAlertService.js';
|
|
38
45
|
import type { DataCubeSettingService } from '../services/DataCubeSettingService.js';
|
|
39
46
|
import { CachedDataCubeSource } from '../core/model/CachedDataCubeSource.js';
|
|
40
47
|
import { DataCubeSettingKey } from '../../__lib__/DataCubeSetting.js';
|
|
@@ -48,7 +55,7 @@ export class DataCubeViewState {
|
|
|
48
55
|
readonly layoutService: DataCubeLayoutService;
|
|
49
56
|
readonly alertService: DataCubeAlertService;
|
|
50
57
|
readonly settingService: DataCubeSettingService;
|
|
51
|
-
readonly snapshotService:
|
|
58
|
+
readonly snapshotService: DataCubeSnapshotService;
|
|
52
59
|
|
|
53
60
|
readonly info: DataCubeInfoState;
|
|
54
61
|
readonly editor: DataCubeEditorState;
|
|
@@ -60,7 +67,8 @@ export class DataCubeViewState {
|
|
|
60
67
|
readonly processCacheState = ActionState.create();
|
|
61
68
|
|
|
62
69
|
private _source?: DataCubeSource | undefined;
|
|
63
|
-
private
|
|
70
|
+
private _initialSource?: DataCubeSource | undefined;
|
|
71
|
+
private _initialSpecification?: DataCubeSpecification | undefined;
|
|
64
72
|
|
|
65
73
|
constructor(dataCube: DataCubeState) {
|
|
66
74
|
this.dataCube = dataCube;
|
|
@@ -71,9 +79,9 @@ export class DataCubeViewState {
|
|
|
71
79
|
this.alertService = dataCube.alertService;
|
|
72
80
|
this.settingService = dataCube.settingService;
|
|
73
81
|
// NOTE: snapshot manager must be instantiated before subscribers
|
|
74
|
-
this.snapshotService = new
|
|
75
|
-
this.engine,
|
|
82
|
+
this.snapshotService = new DataCubeSnapshotService(
|
|
76
83
|
this.logService,
|
|
84
|
+
this.settingService,
|
|
77
85
|
);
|
|
78
86
|
|
|
79
87
|
this.info = new DataCubeInfoState(this);
|
|
@@ -83,14 +91,14 @@ export class DataCubeViewState {
|
|
|
83
91
|
this.extend = new DataCubeExtendManagerState(this);
|
|
84
92
|
}
|
|
85
93
|
|
|
86
|
-
|
|
87
|
-
return this.
|
|
94
|
+
getInitialSource() {
|
|
95
|
+
return this._initialSource;
|
|
88
96
|
}
|
|
89
97
|
|
|
90
|
-
async
|
|
91
|
-
const snapshot = this.snapshotService.
|
|
92
|
-
const query = new
|
|
93
|
-
query.source = this.dataCube.
|
|
98
|
+
async generateSpecification() {
|
|
99
|
+
const snapshot = this.snapshotService.getCurrentSnapshot();
|
|
100
|
+
const query = new DataCubeSpecification();
|
|
101
|
+
query.source = this.dataCube.specification.source;
|
|
94
102
|
query.configuration = DataCubeConfiguration.serialization.fromJson(
|
|
95
103
|
snapshot.data.configuration,
|
|
96
104
|
);
|
|
@@ -105,6 +113,61 @@ export class DataCubeViewState {
|
|
|
105
113
|
return this._source;
|
|
106
114
|
}
|
|
107
115
|
|
|
116
|
+
updateName(name: string) {
|
|
117
|
+
const baseSnapshot = this.snapshotService.getCurrentSnapshot();
|
|
118
|
+
const snapshot = baseSnapshot.clone();
|
|
119
|
+
|
|
120
|
+
const configuration = DataCubeConfiguration.serialization.fromJson(
|
|
121
|
+
baseSnapshot.data.configuration,
|
|
122
|
+
);
|
|
123
|
+
if (configuration.name === name) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
configuration.name = name;
|
|
127
|
+
snapshot.data.configuration = configuration.serialize();
|
|
128
|
+
|
|
129
|
+
snapshot.finalize();
|
|
130
|
+
if (snapshot.hashCode !== baseSnapshot.hashCode) {
|
|
131
|
+
this.snapshotService.broadcastSnapshot(snapshot);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async applySpecification(specification: DataCubeSpecification) {
|
|
136
|
+
const task = this.taskService.newTask('Applying specification...');
|
|
137
|
+
|
|
138
|
+
try {
|
|
139
|
+
if (!this._initialSource || !this._initialSpecification) {
|
|
140
|
+
throw new Error(`DataCube is not initialized`);
|
|
141
|
+
}
|
|
142
|
+
if (!deepEqual(specification.source, this._initialSpecification.source)) {
|
|
143
|
+
throw new Error(`Can't apply specification with different source`);
|
|
144
|
+
}
|
|
145
|
+
const partialQuery = await this.engine.parseValueSpecification(
|
|
146
|
+
specification.query,
|
|
147
|
+
);
|
|
148
|
+
const snapshot = await validateAndBuildSnapshot(
|
|
149
|
+
partialQuery,
|
|
150
|
+
this._initialSource,
|
|
151
|
+
specification,
|
|
152
|
+
this.engine,
|
|
153
|
+
);
|
|
154
|
+
snapshot.finalize();
|
|
155
|
+
if (
|
|
156
|
+
snapshot.hashCode !== this.snapshotService.getCurrentSnapshot().hashCode
|
|
157
|
+
) {
|
|
158
|
+
this.snapshotService.broadcastSnapshot(snapshot);
|
|
159
|
+
}
|
|
160
|
+
} catch (error) {
|
|
161
|
+
assertErrorThrown(error);
|
|
162
|
+
this.alertService.alertError(error, {
|
|
163
|
+
message: `Specification Application Failure: ${error.message}`,
|
|
164
|
+
});
|
|
165
|
+
this.initializeState.fail();
|
|
166
|
+
} finally {
|
|
167
|
+
this.taskService.endTask(task);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
108
171
|
async initializeCache() {
|
|
109
172
|
this.processCacheState.inProgress();
|
|
110
173
|
const task = this.taskService.newTask('Initializing cache...');
|
|
@@ -129,7 +192,7 @@ export class DataCubeViewState {
|
|
|
129
192
|
this.alertService.alertError(error, {
|
|
130
193
|
message: `Cache Processing Failure: ${error.message}`,
|
|
131
194
|
});
|
|
132
|
-
this._source = this.
|
|
195
|
+
this._source = this._initialSource;
|
|
133
196
|
this.processCacheState.fail();
|
|
134
197
|
} finally {
|
|
135
198
|
this.taskService.endTask(task);
|
|
@@ -141,7 +204,7 @@ export class DataCubeViewState {
|
|
|
141
204
|
return;
|
|
142
205
|
}
|
|
143
206
|
const cachedSource = this._source;
|
|
144
|
-
this._source = this.
|
|
207
|
+
this._source = this._initialSource;
|
|
145
208
|
|
|
146
209
|
this.processCacheState.inProgress();
|
|
147
210
|
const task = this.taskService.newTask('Disposing cache...');
|
|
@@ -159,7 +222,7 @@ export class DataCubeViewState {
|
|
|
159
222
|
}
|
|
160
223
|
}
|
|
161
224
|
|
|
162
|
-
async initialize(
|
|
225
|
+
async initialize(specification: DataCubeSpecification) {
|
|
163
226
|
this.initializeState.inProgress();
|
|
164
227
|
const task = this.taskService.newTask('Initializing...');
|
|
165
228
|
|
|
@@ -176,18 +239,75 @@ export class DataCubeViewState {
|
|
|
176
239
|
this.snapshotService.registerSubscriber(state);
|
|
177
240
|
}),
|
|
178
241
|
);
|
|
179
|
-
const source = await this.engine.
|
|
242
|
+
const source = await this.engine.processSource(specification.source);
|
|
180
243
|
this._source = source;
|
|
181
|
-
this.
|
|
244
|
+
this._initialSource = source;
|
|
245
|
+
this._initialSpecification = specification;
|
|
182
246
|
const partialQuery = await this.engine.parseValueSpecification(
|
|
183
|
-
|
|
247
|
+
specification.query,
|
|
184
248
|
);
|
|
185
|
-
const initialSnapshot = await
|
|
249
|
+
const initialSnapshot = await validateAndBuildSnapshot(
|
|
186
250
|
partialQuery,
|
|
187
251
|
source,
|
|
188
|
-
|
|
252
|
+
specification,
|
|
189
253
|
this.engine,
|
|
190
254
|
);
|
|
255
|
+
|
|
256
|
+
// auto-enable cache if specified before broadcasting the first snapshot
|
|
257
|
+
// so first data-fetches will be against cache
|
|
258
|
+
if (specification.options?.autoEnableCache) {
|
|
259
|
+
await this.grid.setCachingEnabled(true, {
|
|
260
|
+
suppressWarning: true,
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
if (
|
|
264
|
+
this.settingService.getBooleanValue(
|
|
265
|
+
DataCubeSettingKey.GRID_CLIENT__SHOW_AUTO_ENABLE_CACHE_PERFORMANCE_WARNING,
|
|
266
|
+
)
|
|
267
|
+
) {
|
|
268
|
+
this.alertService.alert({
|
|
269
|
+
message: `Caching is auto-enabled for this DataCube`,
|
|
270
|
+
text: `When enabled, the source dataset will be cached locally in order to boost query performance. But depending on computational resource available to your environment, sometimes, caching can negatively impact the overall performance, and can even lead to crashes.\n\nOverall, caching is still an experimental feature where we only support queries with simple execution plans, certain queries might not work.\n\nYou can disable caching if needed, otherwise, please proceed with caution.`,
|
|
271
|
+
type: AlertType.WARNING,
|
|
272
|
+
actions: [
|
|
273
|
+
{
|
|
274
|
+
label: 'OK',
|
|
275
|
+
handler: () => {},
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
label: 'Disable Caching',
|
|
279
|
+
handler: () => {
|
|
280
|
+
this.grid
|
|
281
|
+
.setCachingEnabled(false, {
|
|
282
|
+
suppressWarning: true,
|
|
283
|
+
})
|
|
284
|
+
.catch((error) =>
|
|
285
|
+
this.alertService.alertUnhandledError(error),
|
|
286
|
+
);
|
|
287
|
+
},
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
label: 'Dismiss Warning',
|
|
291
|
+
handler: () => {
|
|
292
|
+
this.settingService.updateValue(
|
|
293
|
+
this.dataCube.api,
|
|
294
|
+
DataCubeSettingKey.GRID_CLIENT__SHOW_AUTO_ENABLE_CACHE_PERFORMANCE_WARNING,
|
|
295
|
+
false,
|
|
296
|
+
);
|
|
297
|
+
},
|
|
298
|
+
},
|
|
299
|
+
],
|
|
300
|
+
windowConfig: {
|
|
301
|
+
...DEFAULT_ALERT_WINDOW_CONFIG,
|
|
302
|
+
width: 600,
|
|
303
|
+
height: 300,
|
|
304
|
+
minWidth: 300,
|
|
305
|
+
minHeight: 150,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
|
|
191
311
|
this.snapshotService.broadcastSnapshot(initialSnapshot);
|
|
192
312
|
this.dataCube.options?.onViewInitialized?.({
|
|
193
313
|
api: this.dataCube.api,
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
18
18
|
import type { DataCubeViewState } from '../DataCubeViewState.js';
|
|
19
|
-
import { type
|
|
19
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
20
20
|
import type { DataCubeQueryEditorPanelState } from './DataCubeEditorPanelState.js';
|
|
21
21
|
import type { DataCubeEditorState } from './DataCubeEditorState.js';
|
|
22
22
|
import { DataCubeEditorMutableColumnConfiguration } from './DataCubeEditorMutableConfiguration.js';
|
|
@@ -79,7 +79,7 @@ export class DataCubeEditorColumnPropertiesPanelState
|
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
applySnaphot(
|
|
82
|
-
snapshot:
|
|
82
|
+
snapshot: DataCubeSnapshot,
|
|
83
83
|
configuration: DataCubeConfiguration,
|
|
84
84
|
) {
|
|
85
85
|
this.setColumns(
|
|
@@ -98,10 +98,7 @@ export class DataCubeEditorColumnPropertiesPanelState
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
buildSnapshot(
|
|
102
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
103
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
104
|
-
) {
|
|
101
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
105
102
|
newSnapshot.data.configuration = {
|
|
106
103
|
...newSnapshot.data.configuration,
|
|
107
104
|
columns: this.columns.map((column) => column.serialize()),
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { action, makeObservable, observable, override } from 'mobx';
|
|
18
|
-
import { type
|
|
18
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
19
19
|
import { _findCol, _toCol } from '../../core/model/DataCubeColumn.js';
|
|
20
20
|
import type { DataCubeQueryEditorPanelState } from './DataCubeEditorPanelState.js';
|
|
21
21
|
import {
|
|
@@ -149,7 +149,7 @@ export class DataCubeEditorColumnsPanelState
|
|
|
149
149
|
}
|
|
150
150
|
|
|
151
151
|
applySnaphot(
|
|
152
|
-
snapshot:
|
|
152
|
+
snapshot: DataCubeSnapshot,
|
|
153
153
|
configuration: DataCubeConfiguration,
|
|
154
154
|
) {
|
|
155
155
|
this.selector.setSelectedColumns(
|
|
@@ -167,10 +167,7 @@ export class DataCubeEditorColumnsPanelState
|
|
|
167
167
|
);
|
|
168
168
|
}
|
|
169
169
|
|
|
170
|
-
buildSnapshot(
|
|
171
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
172
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
173
|
-
) {
|
|
170
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
174
171
|
this.propagateChanges();
|
|
175
172
|
// NOTE: these columns make up just part of the set of columns we want to fetch with `select()`.
|
|
176
173
|
// Subsequently, we need to include columns used for horizontal pivots and vertical pivots.
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { action, makeObservable, observable } from 'mobx';
|
|
18
|
-
import { type
|
|
18
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
19
19
|
import type { DataCubeQueryEditorPanelState } from './DataCubeEditorPanelState.js';
|
|
20
20
|
import type { DataCubeEditorState } from './DataCubeEditorState.js';
|
|
21
21
|
import { DataCubeEditorMutableConfiguration } from './DataCubeEditorMutableConfiguration.js';
|
|
@@ -43,7 +43,7 @@ export class DataCubeEditorGeneralPropertiesPanelState
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
applySnaphot(
|
|
46
|
-
snapshot:
|
|
46
|
+
snapshot: DataCubeSnapshot,
|
|
47
47
|
configuration: DataCubeConfiguration,
|
|
48
48
|
) {
|
|
49
49
|
this.setLimit(
|
|
@@ -56,10 +56,7 @@ export class DataCubeEditorGeneralPropertiesPanelState
|
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
buildSnapshot(
|
|
60
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
61
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
62
|
-
) {
|
|
59
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
63
60
|
const data = newSnapshot.data;
|
|
64
61
|
data.limit =
|
|
65
62
|
this.limit === undefined || this.limit < 0 ? undefined : this.limit;
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
DataCubeQuerySortDirection,
|
|
22
22
|
isPivotResultColumnName,
|
|
23
23
|
} from '../../core/DataCubeQueryEngine.js';
|
|
24
|
-
import { type
|
|
24
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
25
25
|
import {
|
|
26
26
|
_findCol,
|
|
27
27
|
_toCol,
|
|
@@ -117,7 +117,7 @@ export class DataCubeEditorHorizontalPivotsPanelState
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
applySnaphot(
|
|
120
|
-
snapshot:
|
|
120
|
+
snapshot: DataCubeSnapshot,
|
|
121
121
|
configuration: DataCubeConfiguration,
|
|
122
122
|
) {
|
|
123
123
|
this.selector.setSelectedColumns(
|
|
@@ -135,10 +135,7 @@ export class DataCubeEditorHorizontalPivotsPanelState
|
|
|
135
135
|
this.setCastColumns(snapshot.data.pivot?.castColumns ?? []);
|
|
136
136
|
}
|
|
137
137
|
|
|
138
|
-
buildSnapshot(
|
|
139
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
140
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
141
|
-
) {
|
|
138
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
142
139
|
newSnapshot.data.pivot = this.selector.selectedColumns.length
|
|
143
140
|
? {
|
|
144
141
|
columns: this.selector.selectedColumns.map(_toCol),
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
DataCubeConfiguration,
|
|
48
48
|
DataCubePivotLayoutConfiguration,
|
|
49
49
|
} from '../../core/model/DataCubeConfiguration.js';
|
|
50
|
-
import { type
|
|
50
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
51
51
|
import { type DataCubeQueryAggregateOperation } from '../../core/aggregation/DataCubeQueryAggregateOperation.js';
|
|
52
52
|
|
|
53
53
|
export class DataCubeEditorMutableColumnConfiguration extends DataCubeColumnConfiguration {
|
|
@@ -56,7 +56,7 @@ export class DataCubeEditorMutableColumnConfiguration extends DataCubeColumnConf
|
|
|
56
56
|
|
|
57
57
|
static create(
|
|
58
58
|
json: PlainObject<DataCubeColumnConfiguration>,
|
|
59
|
-
snapshot:
|
|
59
|
+
snapshot: DataCubeSnapshot | undefined,
|
|
60
60
|
aggregateOperations: DataCubeQueryAggregateOperation[],
|
|
61
61
|
): DataCubeEditorMutableColumnConfiguration {
|
|
62
62
|
const configuration = Object.assign(
|
|
@@ -15,14 +15,14 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import type { DataCubeConfiguration } from '../../core/model/DataCubeConfiguration.js';
|
|
18
|
-
import type {
|
|
18
|
+
import type { DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
19
19
|
|
|
20
20
|
export interface DataCubeQueryEditorPanelState {
|
|
21
21
|
/**
|
|
22
22
|
* Update the editor state based on the snapshot
|
|
23
23
|
*/
|
|
24
24
|
applySnaphot(
|
|
25
|
-
snapshot:
|
|
25
|
+
snapshot: DataCubeSnapshot,
|
|
26
26
|
configuration: DataCubeConfiguration,
|
|
27
27
|
): void;
|
|
28
28
|
|
|
@@ -31,7 +31,7 @@ export interface DataCubeQueryEditorPanelState {
|
|
|
31
31
|
* @returns whether the snapshot should be updated or not
|
|
32
32
|
*/
|
|
33
33
|
buildSnapshot(
|
|
34
|
-
newSnapshot:
|
|
35
|
-
baseSnapshot:
|
|
34
|
+
newSnapshot: DataCubeSnapshot,
|
|
35
|
+
baseSnapshot: DataCubeSnapshot,
|
|
36
36
|
): void;
|
|
37
37
|
}
|
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { action, makeObservable, observable } from 'mobx';
|
|
18
|
-
import { type
|
|
18
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
19
19
|
import type { DataCubeQueryEditorPanelState } from './DataCubeEditorPanelState.js';
|
|
20
20
|
import type { DataCubeEditorState } from './DataCubeEditorState.js';
|
|
21
21
|
import { DataCubeEditorMutablePivotLayoutConfiguration } from './DataCubeEditorMutableConfiguration.js';
|
|
22
22
|
import type { DataCubeConfiguration } from '../../core/model/DataCubeConfiguration.js';
|
|
23
23
|
import type { PlainObject } from '@finos/legend-shared';
|
|
24
|
-
import { _pruneExpandedPaths } from '../../core/
|
|
24
|
+
import { _pruneExpandedPaths } from '../../core/DataCubeSnapshotBuilderUtils.js';
|
|
25
25
|
|
|
26
26
|
export class DataCubeEditorPivotLayoutPanelState
|
|
27
27
|
implements DataCubeQueryEditorPanelState
|
|
@@ -41,7 +41,7 @@ export class DataCubeEditorPivotLayoutPanelState
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
applySnaphot(
|
|
44
|
-
snapshot:
|
|
44
|
+
snapshot: DataCubeSnapshot,
|
|
45
45
|
configuration: DataCubeConfiguration,
|
|
46
46
|
) {
|
|
47
47
|
this.pivotLayout = DataCubeEditorMutablePivotLayoutConfiguration.create(
|
|
@@ -49,10 +49,7 @@ export class DataCubeEditorPivotLayoutPanelState
|
|
|
49
49
|
);
|
|
50
50
|
}
|
|
51
51
|
|
|
52
|
-
buildSnapshot(
|
|
53
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
54
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
55
|
-
) {
|
|
52
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
56
53
|
this.pivotLayout.setExpandedPaths(
|
|
57
54
|
_pruneExpandedPaths(
|
|
58
55
|
baseSnapshot.data.groupBy?.columns ?? [],
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import { type
|
|
17
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
18
18
|
import { _findCol, _toCol } from '../../core/model/DataCubeColumn.js';
|
|
19
19
|
import {
|
|
20
20
|
DataCubeColumnKind,
|
|
@@ -96,7 +96,7 @@ export class DataCubeEditorSortsPanelState
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
applySnaphot(
|
|
99
|
-
snapshot:
|
|
99
|
+
snapshot: DataCubeSnapshot,
|
|
100
100
|
configuration: DataCubeConfiguration,
|
|
101
101
|
) {
|
|
102
102
|
this.selector.setSelectedColumns(
|
|
@@ -111,10 +111,7 @@ export class DataCubeEditorSortsPanelState
|
|
|
111
111
|
);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
buildSnapshot(
|
|
115
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
116
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
117
|
-
) {
|
|
114
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
118
115
|
newSnapshot.data.sortColumns = this.selector.selectedColumns.map((col) => ({
|
|
119
116
|
..._toCol(col),
|
|
120
117
|
direction: col.direction,
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
import { action, makeObservable, observable } from 'mobx';
|
|
18
18
|
import type { DataCubeViewState } from '../DataCubeViewState.js';
|
|
19
19
|
import { DataCubeEditorSortsPanelState } from './DataCubeEditorSortsPanelState.js';
|
|
20
|
-
import {
|
|
20
|
+
import { DataCubeSnapshotController } from '../../services/DataCubeSnapshotService.js';
|
|
21
21
|
import {
|
|
22
|
-
type
|
|
23
|
-
type
|
|
24
|
-
} from '../../core/
|
|
22
|
+
type DataCubeSnapshot,
|
|
23
|
+
type DataCubeSnapshotExtendedColumn,
|
|
24
|
+
} from '../../core/DataCubeSnapshot.js';
|
|
25
25
|
import {
|
|
26
26
|
_findCol,
|
|
27
27
|
_toCol,
|
|
@@ -62,7 +62,7 @@ export enum DataCubeEditorTab {
|
|
|
62
62
|
* It could also host other form editor states like filter editors, but due to ergonomic
|
|
63
63
|
* reasons, those have been separated out into their own respective query editor states.
|
|
64
64
|
*/
|
|
65
|
-
export class DataCubeEditorState extends
|
|
65
|
+
export class DataCubeEditorState extends DataCubeSnapshotController {
|
|
66
66
|
readonly view: DataCubeViewState;
|
|
67
67
|
readonly display: DisplayState;
|
|
68
68
|
readonly finalizationState = ActionState.create();
|
|
@@ -79,8 +79,8 @@ export class DataCubeEditorState extends DataCubeQuerySnapshotController {
|
|
|
79
79
|
currentTab = DataCubeEditorTab.GENERAL_PROPERTIES;
|
|
80
80
|
|
|
81
81
|
sourceColumns: DataCubeColumn[] = [];
|
|
82
|
-
leafExtendColumns:
|
|
83
|
-
groupExtendColumns:
|
|
82
|
+
leafExtendColumns: DataCubeSnapshotExtendedColumn[] = [];
|
|
83
|
+
groupExtendColumns: DataCubeSnapshotExtendedColumn[] = [];
|
|
84
84
|
|
|
85
85
|
constructor(view: DataCubeViewState) {
|
|
86
86
|
super(view.engine, view.settingService, view.snapshotService);
|
|
@@ -118,8 +118,8 @@ export class DataCubeEditorState extends DataCubeQuerySnapshotController {
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
override async applySnapshot(
|
|
121
|
-
snapshot:
|
|
122
|
-
previousSnapshot:
|
|
121
|
+
snapshot: DataCubeSnapshot,
|
|
122
|
+
previousSnapshot: DataCubeSnapshot | undefined,
|
|
123
123
|
) {
|
|
124
124
|
this.sourceColumns = snapshot.data.sourceColumns;
|
|
125
125
|
this.leafExtendColumns = snapshot.data.leafExtendedColumns;
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
import { uniqBy } from '@finos/legend-shared';
|
|
18
18
|
import type { DataCubeConfiguration } from '../../core/model/DataCubeConfiguration.js';
|
|
19
19
|
import { DataCubeColumnKind } from '../../core/DataCubeQueryEngine.js';
|
|
20
|
-
import { type
|
|
20
|
+
import { type DataCubeSnapshot } from '../../core/DataCubeSnapshot.js';
|
|
21
21
|
import { _findCol, _toCol } from '../../core/model/DataCubeColumn.js';
|
|
22
22
|
import {
|
|
23
23
|
DataCubeEditorColumnSelectorColumnState,
|
|
@@ -74,7 +74,7 @@ export class DataCubeEditorVerticalPivotsPanelState
|
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
applySnaphot(
|
|
77
|
-
snapshot:
|
|
77
|
+
snapshot: DataCubeSnapshot,
|
|
78
78
|
configuration: DataCubeConfiguration,
|
|
79
79
|
) {
|
|
80
80
|
this.selector.setSelectedColumns(
|
|
@@ -85,10 +85,7 @@ export class DataCubeEditorVerticalPivotsPanelState
|
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
buildSnapshot(
|
|
89
|
-
newSnapshot: DataCubeQuerySnapshot,
|
|
90
|
-
baseSnapshot: DataCubeQuerySnapshot,
|
|
91
|
-
) {
|
|
88
|
+
buildSnapshot(newSnapshot: DataCubeSnapshot, baseSnapshot: DataCubeSnapshot) {
|
|
92
89
|
newSnapshot.data.groupBy = this.selector.selectedColumns.length
|
|
93
90
|
? {
|
|
94
91
|
columns: this.selector.selectedColumns.map(_toCol),
|
|
@@ -46,7 +46,7 @@ import {
|
|
|
46
46
|
type V1_ValueSpecification,
|
|
47
47
|
} from '@finos/legend-graph';
|
|
48
48
|
import type { DataCubeColumnConfiguration } from '../../core/model/DataCubeConfiguration.js';
|
|
49
|
-
import type {
|
|
49
|
+
import type { DataCubeSnapshotExtendedColumn } from '../../core/DataCubeSnapshot.js';
|
|
50
50
|
import { _lambda } from '../../core/DataCubeQueryBuilderUtils.js';
|
|
51
51
|
import { _findCol } from '../../core/model/DataCubeColumn.js';
|
|
52
52
|
|
|
@@ -404,7 +404,7 @@ export class DataCubeExistingColumnEditorState extends DataCubeColumnBaseEditorS
|
|
|
404
404
|
|
|
405
405
|
constructor(
|
|
406
406
|
manager: DataCubeExtendManagerState,
|
|
407
|
-
column:
|
|
407
|
+
column: DataCubeSnapshotExtendedColumn,
|
|
408
408
|
kind: DataCubeColumnKind,
|
|
409
409
|
isGroupLevel: boolean,
|
|
410
410
|
) {
|
|
@@ -16,9 +16,9 @@
|
|
|
16
16
|
|
|
17
17
|
import { action, computed, makeObservable, observable } from 'mobx';
|
|
18
18
|
import {
|
|
19
|
-
type
|
|
20
|
-
type
|
|
21
|
-
} from '../../core/
|
|
19
|
+
type DataCubeSnapshot,
|
|
20
|
+
type DataCubeSnapshotExtendedColumn,
|
|
21
|
+
} from '../../core/DataCubeSnapshot.js';
|
|
22
22
|
import {
|
|
23
23
|
_findCol,
|
|
24
24
|
_toCol,
|
|
@@ -32,7 +32,7 @@ import {
|
|
|
32
32
|
uniqBy,
|
|
33
33
|
} from '@finos/legend-shared';
|
|
34
34
|
import type { DataCubeViewState } from '../DataCubeViewState.js';
|
|
35
|
-
import {
|
|
35
|
+
import { DataCubeSnapshotController } from '../../services/DataCubeSnapshotService.js';
|
|
36
36
|
import {
|
|
37
37
|
DataCubeConfiguration,
|
|
38
38
|
type DataCubeColumnConfiguration,
|
|
@@ -53,9 +53,9 @@ import { EngineError } from '@finos/legend-graph';
|
|
|
53
53
|
class DataCubeQueryExtendedColumnState {
|
|
54
54
|
readonly name: string;
|
|
55
55
|
readonly type: string;
|
|
56
|
-
readonly data:
|
|
56
|
+
readonly data: DataCubeSnapshotExtendedColumn;
|
|
57
57
|
|
|
58
|
-
constructor(data:
|
|
58
|
+
constructor(data: DataCubeSnapshotExtendedColumn) {
|
|
59
59
|
this.name = data.name;
|
|
60
60
|
this.type = data.type;
|
|
61
61
|
this.data = data;
|
|
@@ -65,7 +65,7 @@ class DataCubeQueryExtendedColumnState {
|
|
|
65
65
|
/**
|
|
66
66
|
* This query editor state backs the form editor for extend columns, i.e. creating new columns.
|
|
67
67
|
*/
|
|
68
|
-
export class DataCubeExtendManagerState extends
|
|
68
|
+
export class DataCubeExtendManagerState extends DataCubeSnapshotController {
|
|
69
69
|
readonly view: DataCubeViewState;
|
|
70
70
|
|
|
71
71
|
columnConfigurations: DataCubeColumnConfiguration[] = [];
|
|
@@ -165,7 +165,7 @@ export class DataCubeExtendManagerState extends DataCubeQuerySnapshotController
|
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
addNewColumn(
|
|
168
|
-
column:
|
|
168
|
+
column: DataCubeSnapshotExtendedColumn,
|
|
169
169
|
isGroupLevel: boolean,
|
|
170
170
|
columnKind: DataCubeColumnKind | undefined,
|
|
171
171
|
editor: DataCubeNewColumnState,
|
|
@@ -193,7 +193,7 @@ export class DataCubeExtendManagerState extends DataCubeQuerySnapshotController
|
|
|
193
193
|
|
|
194
194
|
async updateColumn(
|
|
195
195
|
columnName: string,
|
|
196
|
-
updatedColumn:
|
|
196
|
+
updatedColumn: DataCubeSnapshotExtendedColumn,
|
|
197
197
|
isGroupLevel: boolean,
|
|
198
198
|
columnKind: DataCubeColumnKind | undefined,
|
|
199
199
|
) {
|
|
@@ -416,8 +416,8 @@ export class DataCubeExtendManagerState extends DataCubeQuerySnapshotController
|
|
|
416
416
|
}
|
|
417
417
|
|
|
418
418
|
override async applySnapshot(
|
|
419
|
-
snapshot:
|
|
420
|
-
previousSnapshot:
|
|
419
|
+
snapshot: DataCubeSnapshot,
|
|
420
|
+
previousSnapshot: DataCubeSnapshot | undefined,
|
|
421
421
|
): Promise<void> {
|
|
422
422
|
const configuration = DataCubeConfiguration.serialization.fromJson(
|
|
423
423
|
snapshot.data.configuration,
|